2023/06/15

2023-06-15 00:07:50 +0200oac(~oac@72-50-214-210.fttp.usinternet.com) (Quit: oac)
2023-06-15 00:10:44 +0200acidjnk(~acidjnk@p200300d6e7072f92b0f51e98686b2908.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2023-06-15 00:12:26 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-06-15 00:16:44 +0200ai5lk(~ai5lk@209-188-121-236.taosnet.com) (Quit: WeeChat 3.8)
2023-06-15 00:22:59 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Ping timeout: 240 seconds)
2023-06-15 00:25:23 +0200pat67(~pat@45.88.220.221)
2023-06-15 00:26:13 +0200user2(~user@103.206.114.124)
2023-06-15 00:26:25 +0200user2wns
2023-06-15 00:30:49 +0200 <pat67> I was looking at the documention for the manyTill function in Data.Attoparsec.ByteString and noticed that it mentions that the use of overlapping parsers in the simpleComment example is not very efficient because it would cause a lot of backtracking. If that is the case, what would be an efficient version of that same parser?
2023-06-15 00:45:17 +0200oac(~oac@72-50-214-210.fttp.usinternet.com)
2023-06-15 00:45:45 +0200oac(~oac@72-50-214-210.fttp.usinternet.com) (Remote host closed the connection)
2023-06-15 00:47:00 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 00:54:00 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Ping timeout: 240 seconds)
2023-06-15 00:57:05 +0200 <mauke> in regex terms, you could try <!--[^-]*-([^-]+-)*-+([^-]+-([^-]+-)*)*->
2023-06-15 00:57:28 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-06-15 00:59:12 +0200 <mauke> I mean, I haven't tried it, but the crucial part is probably implementing [^-]* and [^-]+ as takeWhile/takeWhile1 ('-' /=)
2023-06-15 00:59:39 +0200 <mauke> alternatively, encode it as a state machien for scan
2023-06-15 01:00:21 +0200 <mauke> of course, this is all highly theoretical because real HTML comment syntax doesn't work like that
2023-06-15 01:01:38 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-06-15 01:02:02 +0200 <EvanR> I can't remember if the edkmett monoidal parser video brilliantly solved parsing of comments or tossed the possibility of comments out entirely
2023-06-15 01:02:52 +0200jinsun(~jinsun@user/jinsun)
2023-06-15 01:08:18 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2023-06-15 01:10:48 +0200 <mauke> https://github.com/mauke/HTML-Blitz/blob/main/lib/HTML/Blitz/Parser.pm#L225-L263 here's how I parse HTML comments
2023-06-15 01:11:04 +0200 <mauke> translation to (efficient) Haskell is left as an exercise for the reader
2023-06-15 01:15:30 +0200wns(~user@103.206.114.124) (Quit: WeeChat 3.8)
2023-06-15 01:16:03 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 01:19:43 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
2023-06-15 01:20:12 +0200 <ijqq_> im now very confused and would appreciate any help. so have read the section parsing expressions (https://craftinginterpreters.com/parsing-expressions.html#recursive-descent-parsing here just a bit above section 6.2) and so now to convert that to haskell. to make a tree surely i just need to implement that and then it will form the syntax tree as it's recursive but im struggling to implement the data definitions for it.
2023-06-15 01:20:12 +0200 <ijqq_> http://sprunge.us/lNkwBi here at the end is what i have so far but I think that's wrong. first of all, now in the commented out data Term ... I can't use Minus as it's already been used as the constructor in unary. also have defined everything again not reusing anything from my tokens e.g. saying . any suggestions?
2023-06-15 01:20:55 +0200 <ijqq_> I thought i understood how to use data yesterday i get the differernce bewteen the constructors now but still i am unable to write it
2023-06-15 01:21:18 +0200 <ijqq_> i think i am doing something completetely wrong?
2023-06-15 01:21:58 +0200mei(~mei@user/mei) (Remote host closed the connection)
2023-06-15 01:22:18 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 01:23:07 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Remote host closed the connection)
2023-06-15 01:23:30 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 01:24:24 +0200mei(~mei@user/mei)
2023-06-15 01:25:39 +0200mncheckm(~mncheck@193.224.205.254) (Ping timeout: 268 seconds)
2023-06-15 01:26:59 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-06-15 01:27:21 +0200smalltalkman(uid545680@id-545680.hampstead.irccloud.com)
2023-06-15 01:28:21 +0200 <mauke> oh, your expression type mirrors the structure of a naive parser
2023-06-15 01:28:27 +0200 <mauke> it doesn't have to!
2023-06-15 01:29:06 +0200segfaultfizzbuzz(~segfaultf@12.172.217.142)
2023-06-15 01:29:10 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-06-15 01:29:12 +0200gurkenglas(~user@dynamic-046-114-177-119.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-06-15 01:29:34 +0200 <segfaultfizzbuzz> are commercial compilers of significance written in haskell?
2023-06-15 01:30:00 +0200 <mauke> data Expression = ExprBinary BinOp Expression Expression | ExprUnary UnOp Expression | ExprValue Value
2023-06-15 01:30:43 +0200 <mauke> I can't say much about token reuse. I generally don't use tokens
2023-06-15 01:31:00 +0200 <mauke> I've already got a parser, so I just parse from a stream of chars
2023-06-15 01:32:29 +0200 <mauke> that approach makes it much easier to do context-dependent lexing
2023-06-15 01:33:25 +0200cheater(~Username@user/cheater) (Ping timeout: 260 seconds)
2023-06-15 01:33:42 +0200 <mauke> (for example, in JavaScript / is both an infix operator and the start of a regex literal, depending on where you are in an expression)
2023-06-15 01:36:39 +0200cheater(~Username@user/cheater)
2023-06-15 01:39:44 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Remote host closed the connection)
2023-06-15 01:40:07 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 01:41:57 +0200 <c_wraith> mauke: isn't it worse in perl, where which one it is can depend on the value of a variable or something?
2023-06-15 01:42:05 +0200pat67(~pat@45.88.220.221) (Ping timeout: 240 seconds)
2023-06-15 01:42:10 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2023-06-15 01:42:19 +0200 <mauke> wat
2023-06-15 01:42:31 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-06-15 01:42:55 +0200 <EvanR> lol
2023-06-15 01:43:08 +0200 <EvanR> the parse perl you must first parse and execute perl
2023-06-15 01:43:13 +0200 <c_wraith> https://www.perlmonks.org/index.pl?node_id=663393
2023-06-15 01:43:15 +0200 <EvanR> to parse*
2023-06-15 01:43:19 +0200 <mauke> that's just lisp
2023-06-15 01:43:31 +0200 <mauke> in that we can run arbitrary code at parse time
2023-06-15 01:43:38 +0200 <EvanR> lisp is easily parsed without lisp
2023-06-15 01:43:44 +0200 <EvanR> oh
2023-06-15 01:43:52 +0200 <mauke> yeah, you try that with code that defines and uses reader macros
2023-06-15 01:44:39 +0200segfaultfizzbuzz(~segfaultf@12.172.217.142) (Quit: segfaultfizzbuzz)
2023-06-15 01:44:42 +0200 <mauke> the thing about / is that it means different things depending on whether the parser currently expects a value or an operator
2023-06-15 01:45:23 +0200 <mauke> this syntactic context depends on the set of defined (or at least declared) functions in scope
2023-06-15 01:45:45 +0200 <mauke> since you can run arbitrary code in the parser, you can (dynamically, randomly) define functions or not
2023-06-15 01:46:17 +0200pat67(~pat@75.102.136.100)
2023-06-15 01:47:34 +0200pat67(~pat@75.102.136.100) (Read error: Connection reset by peer)
2023-06-15 01:48:28 +0200mrmr(~mrmr@user/mrmr) (Ping timeout: 268 seconds)
2023-06-15 01:50:25 +0200 <mauke> the perlmonks post doesn't strike me as particularly insightful
2023-06-15 01:50:52 +0200 <mauke> if you want to hang the perl parser, all you have to do is put 'BEGIN { while (1) {} }' in your code
2023-06-15 01:51:23 +0200 <mauke> replace 1 by solve_halting_problem() or whatever
2023-06-15 01:51:37 +0200mrmr(~mrmr@user/mrmr)
2023-06-15 01:52:25 +0200 <mauke> that is, to me there is nothing technically challenging about parsing Perl
2023-06-15 01:53:13 +0200 <mauke> it's just that doing so depends on dynamic state that can be modified by arbitrary embedded parse-time code
2023-06-15 01:53:28 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-06-15 01:53:28 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-06-15 01:53:28 +0200wroathe(~wroathe@user/wroathe)
2023-06-15 01:53:49 +0200 <mauke> in other words, "parsing" perl is impossible, but in a simple and boring way
2023-06-15 01:54:02 +0200wroathe(~wroathe@user/wroathe) (Client Quit)
2023-06-15 01:54:06 +0200 <EvanR> are you saying that the parser would not hang on the while(1) because it cleverly recognizes that as an infinite loop lol
2023-06-15 01:54:20 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-06-15 01:54:20 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-06-15 01:54:20 +0200wroathe(~wroathe@user/wroathe)
2023-06-15 01:54:20 +0200 <mauke> no, this isn't C++ :-)
2023-06-15 01:58:51 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 255 seconds)
2023-06-15 01:58:51 +0200mauke_(~mauke@user/mauke)
2023-06-15 01:59:09 +0200 <mauke_> BEGIN { exec '/bin/echo', 'oops, where has my perl gone?'; } is a fun one. since we are replacing the perl interpreter by a new program while it is still parsing the code, you could argue that anything following the "}" is somehow valid Perl syntax
2023-06-15 01:59:29 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Ping timeout: 240 seconds)
2023-06-15 02:00:17 +0200mauke(~mauke@user/mauke) (Ping timeout: 246 seconds)
2023-06-15 02:00:17 +0200mauke_mauke
2023-06-15 02:00:45 +0200 <hpc> the one i learned was changing a function's signature based on a condition
2023-06-15 02:00:56 +0200 <hpc> and then later in the code making / parse as division or a regex as a parameter to a function
2023-06-15 02:01:27 +0200cheater_(~Username@user/cheater)
2023-06-15 02:01:52 +0200 <mauke> right. although "signature" is now used to refer to parameter lists; the other thing is called a "prototype"
2023-06-15 02:01:58 +0200califax(~califax@user/califx) (Remote host closed the connection)
2023-06-15 02:02:01 +0200 <hpc> ... oh, i didn't even click that perlmonks link, that's exactly what i remember :D
2023-06-15 02:02:23 +0200cheater(~Username@user/cheater) (Ping timeout: 246 seconds)
2023-06-15 02:02:31 +0200 <hpc> ah yeah, it's been a while
2023-06-15 02:02:32 +0200cheater_cheater
2023-06-15 02:03:25 +0200califax(~califax@user/califx)
2023-06-15 02:03:42 +0200 <mauke> C has a very similar issue
2023-06-15 02:03:59 +0200 <hpc> whoa, just looked up perl signatures
2023-06-15 02:04:05 +0200 <hpc> where has this feature been all my life
2023-06-15 02:04:20 +0200 <mauke> in that A(B); can parse as a function call or a declaration (of B) depending on how A is declared
2023-06-15 02:04:21 +0200 <EvanR> I don't recall having any trouble parsing B code which has a / and /* comments
2023-06-15 02:04:56 +0200pat67(~pat67@45.85.144.239)
2023-06-15 02:04:56 +0200chiselfuse(~chiselfus@user/chiselfuse) (Ping timeout: 240 seconds)
2023-06-15 02:04:59 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2023-06-15 02:05:18 +0200 <mauke> C "resolves" the ambiguity by looking at the set of currently active declarations and (crucially) not letting the programmer run arbitrary code at parse time
2023-06-15 02:05:19 +0200 <hpc> EvanR: lexing takes care of that for you
2023-06-15 02:05:31 +0200ystael(~ystael@user/ystael) (Ping timeout: 260 seconds)
2023-06-15 02:05:33 +0200 <hpc> suppose you were allowed to write block comments as / * blahblah * /
2023-06-15 02:06:23 +0200chiselfuse(~chiselfus@user/chiselfuse)
2023-06-15 02:06:45 +0200 <mauke> if C had a staged execution feature like BEGIN, then you couldn't "parse C" anymore, either :-)
2023-06-15 02:08:45 +0200 <mauke> and you already can't parse C++ because properly lexing C++ requires template resolution, and template resolution can embed arbitrary* computation
2023-06-15 02:08:56 +0200 <chromoblob> ijqq_: any constructor name belongs only to one datatype, can't reuse same name for constructors of different types
2023-06-15 02:09:02 +0200 <mauke> * OK, in practice you're usually limited to some fixed recursion level
2023-06-15 02:10:03 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2023-06-15 02:10:08 +0200 <EvanR> hold on, this feature where you can't even parse the language. Isn't this something that's supposed to feature in esolangs?
2023-06-15 02:10:09 +0200 <chromoblob> you typically add a different prefix so you have Minus for Term and UMinus for Unary
2023-06-15 02:10:12 +0200 <mauke> WhateverYouWant<Lol>::A(B); // ???
2023-06-15 02:10:36 +0200hugo(znc@verdigris.lysator.liu.se)
2023-06-15 02:10:49 +0200 <EvanR> you have esolangs that you can't program in, like malbolge, but what about ones you can't parse
2023-06-15 02:11:58 +0200 <mauke> can you generate fixity declarations from Template Haskell?
2023-06-15 02:12:07 +0200ystael(~ystael@user/ystael)
2023-06-15 02:15:24 +0200 <ijqq_> http://sprunge.us/NZIPSz
2023-06-15 02:15:24 +0200 <ijqq_> I have updated it to this
2023-06-15 02:15:28 +0200 <ijqq_> But I think it is worse
2023-06-15 02:15:33 +0200 <ijqq_> Or more confusing
2023-06-15 02:18:38 +0200 <chromoblob> ijqq_: since in the tutorial equality may contain multiple != or ==, your Equality type should reflect this structure
2023-06-15 02:19:03 +0200 <chromoblob> data Equality = Equals Comparison Equality | NotEquals Comparison Equality | Comparison Comparison
2023-06-15 02:19:31 +0200 <chromoblob> same with comparison, term and factor
2023-06-15 02:19:59 +0200 <ijqq_> Oh I get it, to represent the asterisk in for example `term โ†’ factor ( ( "-" | "+" ) factor )*`?
2023-06-15 02:20:03 +0200 <chromoblob> yes
2023-06-15 02:20:36 +0200 <ijqq_> I was going to ask how to do that so you pre-empted my question haha
2023-06-15 02:21:02 +0200 <ijqq_> still trying to wrap my head around it all, i think ill need to bring out the pencil and paper
2023-06-15 02:21:06 +0200 <chromoblob> note that you can use infix syntax so that the Haskell terms look more like the code
2023-06-15 02:21:23 +0200 <chromoblob> a `Equals` (b `NotEquals` c)
2023-06-15 02:21:31 +0200 <chromoblob> the same as: Equals a (NotEquals b c)
2023-06-15 02:21:46 +0200 <ijqq_> oh yep I should do that
2023-06-15 02:21:47 +0200 <ijqq_> thanks
2023-06-15 02:22:17 +0200 <chromoblob> you can also give fixity declaration for the infix constructors so that you can omit parentheses
2023-06-15 02:22:26 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 260 seconds)
2023-06-15 02:28:43 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 02:29:38 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
2023-06-15 02:31:29 +0200 <chromoblob> ijqq_: actually, i don't know whether it should be "Equals Comparison Equality" or "Equals Equality Comparison", this depends on how you're going to parse =='s and !='s
2023-06-15 02:34:48 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2)
2023-06-15 02:36:45 +0200 <chromoblob> you could do it either "recursively", so that your Equality is "right-associative", you first determine the leftmost operator and then recursively form the rest of sequence
2023-06-15 02:37:18 +0200 <chromoblob> or you could do it by accumulating the sequence that you have already read
2023-06-15 02:37:31 +0200 <chromoblob> in this case, Equality is "left-associative"
2023-06-15 02:38:03 +0200 <chromoblob> in first case, it should be "Equals Comparison Equality", in second case, it should be "Equals Equality Comparison"
2023-06-15 02:38:59 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds)
2023-06-15 02:39:13 +0200 <chromoblob> note that you could also decide this by considering which structure of these two will be used later more easily
2023-06-15 02:42:03 +0200barrucadu(~barrucadu@carcosa.barrucadu.co.uk) (Server closed connection)
2023-06-15 02:42:20 +0200barrucadu(~barrucadu@carcosa.barrucadu.co.uk)
2023-06-15 02:50:58 +0200 <ijqq_> Ah interesting
2023-06-15 02:51:01 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds)
2023-06-15 02:51:16 +0200 <ijqq_> I think i've fixed the data declarations now, and I gave an example
2023-06-15 02:51:17 +0200 <ijqq_> http://sprunge.us/K4e5n5
2023-06-15 02:52:41 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-06-15 02:52:58 +0200 <ijqq_> It feels a bit weird that to get an expression of a literal string I need to do `Equality (Comparison (Term (Factor (Unary (Primary (LoxString "hi"))))))`
2023-06-15 02:54:26 +0200 <ijqq_> But I guess the point of doing all this is that it is a way of representing the precedence of operators
2023-06-15 02:55:22 +0200 <mauke> yeah, but ... you don't really need to do that in the expression type
2023-06-15 02:55:25 +0200 <chromoblob> you have a typo, in the term there is Minus, but in the comment there is plus, between 50 and 4
2023-06-15 02:55:41 +0200 <chromoblob> mauke: ijqq_'s types reflect a grammar
2023-06-15 02:55:59 +0200 <ijqq_> oh yep ty
2023-06-15 02:56:12 +0200 <mauke> chromoblob: yes. but why?
2023-06-15 02:56:37 +0200 <chromoblob> mauke: ijqq_ is following a specific parser tutorial
2023-06-15 02:56:50 +0200 <mauke> the java code doesn't look like this
2023-06-15 02:58:37 +0200 <ijqq_> yep I was a bit confused on what he was doing in java, in the previous section he wrote a code to generate lots of different java classes. but i thought that this might be a reasonable way to do it in haskell
2023-06-15 02:58:44 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 240 seconds)
2023-06-15 02:58:54 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-06-15 03:00:22 +0200 <ijqq_> what i mean to say, is that based on their grammar, i thought that this is how the ast is so all i need to do is to convert the token stream into it?
2023-06-15 03:01:08 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Ping timeout: 240 seconds)
2023-06-15 03:03:24 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 03:04:05 +0200 <ijqq_> mauke do you have a suggestion? i see earlier you wrote that you can allow an expression to derive directly to a value, is that what you mean by not needing to do it ? (i left it how it shows in their grammar for now because i didn't want to get confused too much)
2023-06-15 03:04:18 +0200 <mauke> yes
2023-06-15 03:04:41 +0200 <mauke> you can do that, but right now the shape of your data mirrors the internal structure of your parser
2023-06-15 03:04:56 +0200 <mauke> that's usually not essential in an AST
2023-06-15 03:06:04 +0200 <mauke> like, if you want to represent 'a + b', you probably want to know that it is an expression involving a binary operator (+) applied to two operands, a variable (a) and another variable (b)
2023-06-15 03:06:58 +0200 <mauke> at least for pretty-printing, or evaluating expressions, or some other kind of analysis
2023-06-15 03:07:36 +0200 <mauke> the whole Equality (Comparison (Term ...)) thing is an implementation detail of the parser
2023-06-15 03:08:05 +0200 <ijqq_> so if I understand, the whole point of having a separation of equality comparison etc, is just a way of implementing preceence? but you're saying by achieving that by other means, i can make the representation cleaner?
2023-06-15 03:08:34 +0200 <mauke> as to the first one, yes
2023-06-15 03:08:47 +0200 <chromoblob> ok...
2023-06-15 03:09:24 +0200 <mauke> you can still implement the grammar the same way, with each non-terminal corresponding to a function, etc
2023-06-15 03:09:35 +0200 <chromoblob> equality/comparison is just in a grammar, no need to build a datatype out of grammar directly
2023-06-15 03:09:41 +0200 <mauke> but you don't have to make a separate result type for each function
2023-06-15 03:10:40 +0200Sciencentistguy8(~sciencent@hacksoc/ordinary-member)
2023-06-15 03:10:59 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-06-15 03:11:18 +0200 <mauke> (also, the layering approach to precedence is simple in theory, but kind of annoying and inefficient in practice)
2023-06-15 03:11:37 +0200 <mauke> (but it's fine for a toy parser)
2023-06-15 03:13:05 +0200Sciencentistguy(~sciencent@hacksoc/ordinary-member) (Ping timeout: 246 seconds)
2023-06-15 03:13:05 +0200Sciencentistguy8Sciencentistguy
2023-06-15 03:13:14 +0200 <ijqq_> so you are saying that I can do the layering in the parse functions but not have multiple data declarations? i see... I think i will try to finish the parser and then improve the code after to your suggestion. thank you
2023-06-15 03:14:13 +0200 <chromoblob> ijqq_: try to follow the definition of AST in https://craftinginterpreters.com/representing-code.html#metaprogramming-the-trees
2023-06-15 03:14:20 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Ping timeout: 240 seconds)
2023-06-15 03:14:24 +0200 <mauke> yes, exactly
2023-06-15 03:15:21 +0200 <mauke> in the extreme, you can just ... not have an AST. the parse functions can just directly evaluate the code
2023-06-15 03:16:25 +0200 <mauke> like, instead of turning "2 + 3" into something like ExprBinary OpAdd (ExprVal (Int 2)) (ExprVal (Int 3)), you'd make it return 5
2023-06-15 03:16:35 +0200 <ijqq_> oh so you mean I would have four data declarations: binary, grouping, literal, and unary?
2023-06-15 03:16:49 +0200 <mauke> at least if you're just building a calculator. it's less practical for a programming language :-)
2023-06-15 03:17:07 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-06-15 03:17:15 +0200 <ijqq_> i think ill leave it like this for now mauke, this is my first time doing something like this so I want to try to stick somewhat close to the tutorial...... plus i think for optimisations maybe the ast is required?
2023-06-15 03:17:51 +0200 <ijqq_> anyway i am quite tired and a bit confused so i think ill call it a night and come back tomorrow, thank you for the help :)
2023-06-15 03:18:06 +0200 <chromoblob> it's straightforward: data Expr = Binary Expr Op Expr | Literal Literal | Unary Op Expr
2023-06-15 03:18:34 +0200 <chromoblob> i don't know whether you need Grouping Expr, but probably not
2023-06-15 03:18:41 +0200 <ijqq_> i feel so stupid now...
2023-06-15 03:19:05 +0200 <ijqq_> spent like 2 hours on just that for it useless lol
2023-06-15 03:19:23 +0200 <mauke> hah. the string in the defineAst() call is almost Haskell
2023-06-15 03:19:29 +0200 <mauke> with a few syntactic differences
2023-06-15 03:20:12 +0200 <mauke> "Binary : Expr left, Token operator, Expr right"? that's basically data Binary = Binary{ left :: Expr, operator :: Token, right :: Expr }
2023-06-15 03:20:31 +0200 <chromoblob> mauke: really it shouldn't be Token here
2023-06-15 03:20:50 +0200 <chromoblob> the tutorial is just abusing/reusing the classes
2023-06-15 03:20:58 +0200 <chromoblob> ab/re-using
2023-06-15 03:21:26 +0200 <chromoblob> also, Binary,Grouping,Literal,Unary are just subclasses
2023-06-15 03:21:45 +0200 <chromoblob> so in Haskell they may just as well be represented as different constructors of Expr
2023-06-15 03:22:56 +0200 <chromoblob> also, later, it calls for Visitor pattern......
2023-06-15 03:23:03 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 03:23:24 +0200 <chromoblob> i haven't used the visitor pattern yet and i have no idea how to translate it into Haskell
2023-06-15 03:23:31 +0200 <mauke> yeah, it's not an optimal ("tight") representation
2023-06-15 03:23:44 +0200 <chromoblob> i don't even remember the essence of visitor
2023-06-15 03:23:48 +0200 <mauke> the tutorial is actually quite nice
2023-06-15 03:24:21 +0200 <mauke> it discusses the expression problem and explains the complementary approaches taken by Java on one side and ML/Haskell on the other
2023-06-15 03:25:16 +0200 <mauke> the visitor pattern is like pattern matching, in an inside-out way
2023-06-15 03:27:23 +0200Helle(~helle@user/Helle) (Server closed connection)
2023-06-15 03:27:30 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-06-15 03:27:30 +0200Helle(~helle@user/Helle)
2023-06-15 03:29:34 +0200mixfix41(~sdeny9ee@user/mixfix41) (Quit: choosey moms choose bitchx)
2023-06-15 03:31:38 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 246 seconds)
2023-06-15 03:36:24 +0200 <hololeap> just a mild complaint: cabal-install-solver has an optional dependency on tracetree: https://hackage.haskell.org/package/cabal-install-solver-3.8.1.0/revision/1.cabal
2023-06-15 03:37:19 +0200 <hololeap> tracetree depends on containers <0.6 which hasn't been bundled with ghc since 8.4.4
2023-06-15 03:38:13 +0200 <hololeap> why would a new-ish package depend on something with such outdated dependencies?
2023-06-15 03:38:30 +0200 <hololeap> (I understand most people don't use the debug flag for cabal-install-solver)
2023-06-15 03:40:08 +0200ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
2023-06-15 03:40:33 +0200ec_(~ec@gateway/tor-sasl/ec)
2023-06-15 03:43:19 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2)
2023-06-15 04:03:45 +0200mz_(~mz@190.15.90.11) (Ping timeout: 240 seconds)
2023-06-15 04:05:46 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2023-06-15 04:06:12 +0200 <ijqq_> chromoblob, when you said Binary Expr Op Expr | Literal Literal | Unary Op Expr, should the two ops be different? As the only unary operators are negation and not?
2023-06-15 04:06:57 +0200 <ijqq_> Or just keep it like that, and give a user error if there a binary operator is applied to as unary?
2023-06-15 04:07:03 +0200tureba(~tureba@tureba.org) (Server closed connection)
2023-06-15 04:07:21 +0200tureba(~tureba@tureba.org)
2023-06-15 04:13:22 +0200Katarushisu7(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
2023-06-15 04:15:05 +0200Katarushisu(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 240 seconds)
2023-06-15 04:15:05 +0200Katarushisu7Katarushisu
2023-06-15 04:15:19 +0200thegeekinside(~thegeekin@189.217.90.138) (Read error: Connection reset by peer)
2023-06-15 04:15:26 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 04:18:35 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-06-15 04:18:35 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-06-15 04:18:35 +0200finn_elijaFinnElija
2023-06-15 04:22:05 +0200 <chromoblob> ijqq_: yeah, make them different
2023-06-15 04:24:29 +0200xff0x_(~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 268 seconds)
2023-06-15 04:34:42 +0200thegeekinside(~thegeekin@189.217.90.138)
2023-06-15 04:37:28 +0200 <ijqq_> http://sprunge.us/5dPLbS
2023-06-15 04:37:31 +0200thegeekinside(~thegeekin@189.217.90.138) (Read error: Connection reset by peer)
2023-06-15 04:37:36 +0200 <ijqq_> now the same tree looks much nicer
2023-06-15 04:39:00 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 04:40:31 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2023-06-15 04:41:30 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 240 seconds)
2023-06-15 04:41:56 +0200td_(~td@i53870918.versanet.de) (Ping timeout: 240 seconds)
2023-06-15 04:42:42 +0200bilegeek(~bilegeek@2600:1008:b08c:4ad1:bfd8:bc79:38c4:f740)
2023-06-15 04:43:08 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-06-15 04:44:00 +0200td_(~td@i53870914.versanet.de)
2023-06-15 04:44:08 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2023-06-15 04:44:29 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-06-15 04:44:29 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-06-15 04:44:29 +0200wroathe(~wroathe@user/wroathe)
2023-06-15 04:47:00 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-06-15 04:49:17 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Remote host closed the connection)
2023-06-15 04:49:39 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-06-15 04:49:39 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c)
2023-06-15 04:50:20 +0200 <chromoblob> ijqq_: you have a typo again
2023-06-15 04:50:35 +0200 <chromoblob> your term says "50 + (4 - 1)"
2023-06-15 04:50:49 +0200 <chromoblob> unlike the expression in comment
2023-06-15 04:50:53 +0200falafel(~falafel@152.86.89.30)
2023-06-15 04:51:20 +0200 <ijqq_> oh oops, thanks
2023-06-15 04:51:37 +0200 <ijqq_> i take that as a sign i should go to sleep haha.. almost sunrise here
2023-06-15 04:53:09 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-06-15 04:54:07 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:2cf1:36b7:6ec2:d529) (Remote host closed the connection)
2023-06-15 04:54:27 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:2cf1:36b7:6ec2:d529)
2023-06-15 04:54:31 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2)
2023-06-15 05:06:33 +0200justache(~justache@user/justache) (Server closed connection)
2023-06-15 05:06:34 +0200xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2023-06-15 05:06:54 +0200justache(~justache@user/justache)
2023-06-15 05:10:21 +0200jero98772(~jero98772@2800:484:1d7f:5d36::2) (Remote host closed the connection)
2023-06-15 05:15:32 +0200fbytez_(~uid@user/fbytez) (Ping timeout: 240 seconds)
2023-06-15 05:18:44 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-06-15 05:19:01 +0200Fischmiep(~Fischmiep@user/Fischmiep)
2023-06-15 05:24:59 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
2023-06-15 05:31:32 +0200falafel(~falafel@152.86.89.30) (Ping timeout: 240 seconds)
2023-06-15 05:32:33 +0200cheater_(~Username@user/cheater)
2023-06-15 05:34:30 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-06-15 05:34:38 +0200cheater_cheater
2023-06-15 05:39:02 +0200raym(~ray@user/raym)
2023-06-15 05:43:09 +0200jargon(~jargon@184.101.75.235)
2023-06-15 05:43:35 +0200mei(~mei@user/mei) (Ping timeout: 246 seconds)
2023-06-15 05:44:59 +0200bilegeek(~bilegeek@2600:1008:b08c:4ad1:bfd8:bc79:38c4:f740) (Quit: Leaving)
2023-06-15 05:47:37 +0200thegeekinside(~thegeekin@189.217.90.138)
2023-06-15 05:50:42 +0200ormaaaj(~ormaaj@user/ormaaj) (Remote host closed the connection)
2023-06-15 05:52:07 +0200ormaaaj(~ormaaj@user/ormaaj)
2023-06-15 05:59:07 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2023-06-15 06:01:40 +0200falafel(~falafel@152.86.89.30)
2023-06-15 06:06:53 +0200thegeekinside(~thegeekin@189.217.90.138) (Read error: Connection reset by peer)
2023-06-15 06:08:05 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2023-06-15 06:10:13 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-06-15 06:24:34 +0200mcglk(~mcglk@131.191.19.145) (Remote host closed the connection)
2023-06-15 06:26:36 +0200Xe(~cadey@tailscale/xe) (Ping timeout: 255 seconds)
2023-06-15 06:28:36 +0200Xe(~cadey@tailscale/xe)
2023-06-15 06:30:23 +0200gurkenglas(~user@dynamic-046-114-179-246.46.114.pool.telefonica.de)
2023-06-15 06:32:01 +0200falafel(~falafel@152.86.89.30) (Ping timeout: 240 seconds)
2023-06-15 06:36:30 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2023-06-15 06:36:54 +0200 <sm> https://hackage.haskell.org/package/megaparsec-9.4.0/docs/Text-Megaparsec.html#v:getSourcePos now requires me to add `Monad m =>` to type signatures, though the haddock has not changed since 9.3.x. Would anyone know the reason ?
2023-06-15 06:37:59 +0200 <sm> and ideally an easier fix that updating 140 type signatures ?
2023-06-15 06:38:07 +0200 <sm> s/that/than/
2023-06-15 06:38:37 +0200sm[i](~smi]@plaintextaccounting/sm)
2023-06-15 06:39:06 +0200thegeekinside(~thegeekin@189.217.90.138)
2023-06-15 06:40:41 +0200mei(~mei@user/mei)
2023-06-15 06:47:29 +0200mcglk(~mcglk@131.191.19.145)
2023-06-15 06:50:02 +0200pat67(~pat67@45.85.144.239) (Remote host closed the connection)
2023-06-15 06:50:04 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2023-06-15 06:50:44 +0200end-(~end@2001:470:69fc:105::3:673f) (Remote host closed the connection)
2023-06-15 06:51:28 +0200thegeekinside(~thegeekin@189.217.90.138) (Read error: Connection reset by peer)
2023-06-15 07:07:33 +0200son0p(~ff@181.136.122.143) (Ping timeout: 255 seconds)
2023-06-15 07:10:00 +0200bontaq(~user@ool-45779b84.dyn.optonline.net) (Ping timeout: 240 seconds)
2023-06-15 07:10:01 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2023-06-15 07:10:59 +0200reach(~reach@2607:fea8:4c0:990:4d7:b700:e6a6:d72c) (Ping timeout: 240 seconds)
2023-06-15 07:11:27 +0200fbytez(~uid@2001:bc8:2117:100::)
2023-06-15 07:13:21 +0200michalz(~michalz@185.246.207.221)
2023-06-15 07:17:47 +0200ijqq_(uid603979@id-603979.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 07:26:32 +0200ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
2023-06-15 07:29:57 +0200ec_(~ec@gateway/tor-sasl/ec)
2023-06-15 07:34:14 +0200 <hololeap> sm: (Ord e, Stream s, Monad m) => MonadParsec e s (ParsecT e s m)
2023-06-15 07:34:31 +0200 <hololeap> did it switch from Identity to m somehow?
2023-06-15 07:36:07 +0200 <hololeap> for instance changing a type alias from Parsec to ParsecT
2023-06-15 07:37:43 +0200 <sm> hololeap: thanks.. perhaps more clues at https://github.com/mrkkrp/megaparsec/issues/532 later
2023-06-15 07:41:48 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2023-06-15 07:53:48 +0200tom_(~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Remote host closed the connection)
2023-06-15 07:54:05 +0200tom_(~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684)
2023-06-15 07:59:26 +0200trev(~trev@user/trev)
2023-06-15 08:01:12 +0200acidjnk(~acidjnk@p200300d6e7072f114cfca53a33335870.dip0.t-ipconnect.de)
2023-06-15 08:01:33 +0200 <chreekat> sm: I assume this is with the same ghc version? To avoid confounders
2023-06-15 08:02:04 +0200 <sm> yup
2023-06-15 08:07:38 +0200 <probie> sm: https://github.com/mrkkrp/megaparsec/commit/cf5d3472e5ee9312a3032fb53c86d4c6e071325d#diff-84345f76โ€ฆ this looks to be the offender
2023-06-15 08:08:54 +0200 <probie> A side effect of adding the new `mkParsec` primitive
2023-06-15 08:08:56 +0200m1dnight_(~christoph@78-22-4-67.access.telenet.be) (Read error: Connection reset by peer)
2023-06-15 08:09:31 +0200m1dnight_(~christoph@78-22-4-67.access.telenet.be)
2023-06-15 08:09:59 +0200shapr(~user@2600:1700:c640:3100:3dca:cf49:f271:c6b2) (Ping timeout: 240 seconds)
2023-06-15 08:12:57 +0200retropikzel(9d1a4f9f46@2604:bf00:561:2000::ce) ()
2023-06-15 08:17:52 +0200mncheckm(~mncheck@193.224.205.254)
2023-06-15 08:22:30 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-06-15 08:24:40 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
2023-06-15 08:26:23 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-06-15 08:27:59 +0200mauke(~mauke@user/mauke) (Ping timeout: 240 seconds)
2023-06-15 08:28:07 +0200sm[i](~smi]@plaintextaccounting/sm) (Quit: Client closed)
2023-06-15 08:30:59 +0200kuribas(~user@ptr-17d51eok8qyevk6ux0s.18120a2.ip6.access.telenet.be) (Ping timeout: 240 seconds)
2023-06-15 08:38:01 +0200ru0mad(~ru0mad@82-64-17-144.subs.proxad.net) (Ping timeout: 240 seconds)
2023-06-15 08:41:22 +0200arrowhead(~arrowhead@2603-7000-9b3f-6934-692d-d473-e85f-7fbb.res6.spectrum.com)
2023-06-15 08:45:19 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-06-15 08:46:02 +0200bliminse(~bliminse@user/bliminse) (Quit: leaving)
2023-06-15 08:48:07 +0200 <probie> Sometimes I wonder if type classes were a good idea. They're so useful, but due to their global nature, they make dependencies so fragile
2023-06-15 08:49:37 +0200 <arrowhead> that is why r7rs introduced first-class enviroments, so nothing is global anymore and you solve that problem at the root
2023-06-15 08:50:28 +0200fendor(~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a)
2023-06-15 08:51:56 +0200 <arrowhead> environments*
2023-06-15 08:53:03 +0200bliminse(~bliminse@user/bliminse)
2023-06-15 08:53:03 +0200 <arrowhead> haskeell researchers think at the fringes of computer science and scheme researchers think at the core, it seems like.
2023-06-15 08:54:30 +0200gensyst(~gensyst@user/gensyst)
2023-06-15 08:55:12 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 268 seconds)
2023-06-15 08:56:14 +0200fbytez(~uid@2001:bc8:2117:100::) (Quit: byte byte)
2023-06-15 08:56:25 +0200 <gensyst> I have IO actions that run concurrently. I want to record (e.g. into an mvar) which action was the last to finish. How?
2023-06-15 08:56:53 +0200 <Axman6> probie: "Megaparsec follows SemVer." I guess a n.x version update for changing the API is ok, seems like it would've been nice to warn people in the changelog, poor sm
2023-06-15 08:57:24 +0200 <gensyst> I'm not sure putting modifyMVar_ after the IO actions works, because in between another IO action might already complete.
2023-06-15 08:58:29 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 08:58:46 +0200 <arrowhead> record a timestamp and ID of each thread?
2023-06-15 08:59:08 +0200 <Axman6> gensyst: not sure I understand what the problem you're having is
2023-06-15 09:00:06 +0200 <int-e> Why an MVar? IORef should work for this.
2023-06-15 09:00:07 +0200 <probie> If you spin up n threads, have each thread send some sort of ID to a `Chan` and another thread receiving on the `Chan` (but only paying attention to the nth message)
2023-06-15 09:00:25 +0200fbytez(~uid@user/fbytez)
2023-06-15 09:00:50 +0200 <int-e> Ignoring the "because in between another IO action might already complete" part because that seems *impossible* to resolve without OS support for timestamping the completion of operation.
2023-06-15 09:00:54 +0200 <int-e> +s
2023-06-15 09:01:01 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-06-15 09:01:03 +0200 <arrowhead> if you're storing x in the var, store (x, [id_and_timestamp_of_each_action]) instead and append as each thread arrives
2023-06-15 09:01:17 +0200 <Axman6> A bit surprised not to see a function with type MVar a -> (Maybe a -> Maybe a) -> IO (Maybe a) actually
2023-06-15 09:01:47 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:9367:8258:f0e4:54ad)
2023-06-15 09:02:25 +0200 <Axman6> (I guess the general return type would be (Maybe a, Maybe a) but not sure it's that useful)
2023-06-15 09:02:41 +0200 <gensyst> This is what I have in mind: https://dpaste.com/F97PJFBDA
2023-06-15 09:02:41 +0200arrowhead(~arrowhead@2603-7000-9b3f-6934-692d-d473-e85f-7fbb.res6.spectrum.com) (Read error: Connection reset by peer)
2023-06-15 09:03:27 +0200arrowhead(~arrowhead@cpe-74-66-76-151.nyc.res.rr.com)
2023-06-15 09:03:28 +0200 <Axman6> seems like this is really a problem of semantics
2023-06-15 09:03:55 +0200 <Axman6> does each action complete when it's run, or when it's recorded that it's run?
2023-06-15 09:04:37 +0200 <Axman6> same thing with timestamps really, who's to say that one of the actions finished before the other, but read the time later?
2023-06-15 09:04:41 +0200 <chreekat> Depends what "last to finish" means :P
2023-06-15 09:04:54 +0200 <Axman6> I reckon a Chan is a fairly reasonable way to deal with this
2023-06-15 09:04:54 +0200 <chreekat> What Axman said, yaeh
2023-06-15 09:04:58 +0200 <Axman6> chreekat: yeah exactly
2023-06-15 09:05:08 +0200Axman6high fives
2023-06-15 09:05:31 +0200son0p(~ff@181.136.122.143)
2023-06-15 09:06:44 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-06-15 09:07:08 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-06-15 09:11:10 +0200 <int-e> Axman6: conceptually, MVars are either empty or filled; there's no separate state "waiting to settle" that they could take while the `Maybe a -> Maybe a` function is evaluating.
2023-06-15 09:12:36 +0200 <gensyst> Axman6, how do channels help with this
2023-06-15 09:12:38 +0200 <int-e> (There is a lock for the whole MVar "closure" but I'm pretty sure that this is only supposed to be taken for the duration of a single primitive operation.)
2023-06-15 09:13:09 +0200 <int-e> channels don't reorder items sent through them
2023-06-15 09:14:29 +0200 <int-e> Though I still think that an IORef will do the job to the extent that it's actually possible.
2023-06-15 09:16:13 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 09:16:41 +0200 <[Leary]> Yeah, I'd just replace the MVar with an IORef and be done with it.
2023-06-15 09:17:54 +0200gmg(~user@user/gehmehgeh)
2023-06-15 09:18:06 +0200telser(~quassel@user/telser) (Server closed connection)
2023-06-15 09:18:21 +0200telser(~quassel@user/telser)
2023-06-15 09:20:08 +0200 <gensyst> i thought they behaved the same :S
2023-06-15 09:20:58 +0200 <gensyst> how does using ioref change anything
2023-06-15 09:21:16 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-06-15 09:21:58 +0200 <chreekat> https://stackoverflow.com/a/15440209/994643
2023-06-15 09:23:00 +0200 <chreekat> I'd use stm/TVar -- anything else would be early optimization ๐Ÿ™ƒ
2023-06-15 09:25:59 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:9367:8258:f0e4:54ad) (Quit: WeeChat 2.8)
2023-06-15 09:27:05 +0200 <int-e> gensyst: It'll always contain the last value written if you use `atomicWriteIORef`. None of this, short of introducting a global lock, will solve the problem of determining when an IO action "finished". Heck, it even poses paraphilosophical challenges (does an IO action finish when the underlying system call returns? or when it is written to a hardware device? or, in the case of a storage device,...
2023-06-15 09:27:09 +0200 <[Leary]> Well, it's just a matter of going from MVar/TMVar to IORef/TVar since there's no need for the locking behaviour, which only complicates things here. It should be as correct as is reasonable.
2023-06-15 09:27:11 +0200 <int-e> ...when it actually hits the nonvolatile storage?)
2023-06-15 09:28:56 +0200taupiqueur(~taupiqueu@2a02-842a-8180-4601-d400-db44-b04e-c735.rev.sfr.net)
2023-06-15 09:28:57 +0200gurkenglas(~user@dynamic-046-114-179-246.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-06-15 09:31:13 +0200dhil(~dhil@78.45.150.83.ewm.ftth.as8758.net)
2023-06-15 09:34:11 +0200 <gensyst> int-e: "(does an IO action finish when the underlying system call returns" in my case we can assume yes.
2023-06-15 09:34:56 +0200 <gensyst> i.e., once the io action is done it's really done
2023-06-15 09:35:53 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b) (Remote host closed the connection)
2023-06-15 09:36:10 +0200 <gensyst> so the problem is, how to avoid another io action (on another thread), finishing in between io action finish and ioref modification on thread 1.
2023-06-15 09:37:17 +0200 <gensyst> ok i see what you mean
2023-06-15 09:37:18 +0200 <int-e> And still. the OS may pause your thread the instant the system call returns. There's fundamentally nothing you can do to determine which of two threads finished a system call first; the OS would have to tell you that as part of the system call API. And even then, what are you going to do with the information?
2023-06-15 09:37:32 +0200 <gensyst> ok i get you
2023-06-15 09:37:42 +0200 <gensyst> thanks. my original question made no sense lol
2023-06-15 09:37:48 +0200 <gensyst> sorry for wasting your time
2023-06-15 09:37:54 +0200 <gensyst> :(
2023-06-15 09:38:15 +0200 <gensyst> s/lol/soz
2023-06-15 09:40:33 +0200trev(~trev@user/trev) (Quit: trev)
2023-06-15 09:40:52 +0200trev(~trev@user/trev)
2023-06-15 09:41:24 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-06-15 09:42:49 +0200hisa387(~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net)
2023-06-15 09:44:35 +0200hisa38(~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Ping timeout: 260 seconds)
2023-06-15 09:44:36 +0200hisa387hisa38
2023-06-15 09:48:10 +0200gurkenglas(~user@dynamic-046-114-179-246.46.114.pool.telefonica.de)
2023-06-15 09:48:40 +0200tessier(~treed@ec2-184-72-149-67.compute-1.amazonaws.com) (Ping timeout: 260 seconds)
2023-06-15 09:51:37 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-06-15 09:52:55 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:9367:8258:f0e4:54ad)
2023-06-15 10:01:08 +0200taupiqueur(~taupiqueu@2a02-842a-8180-4601-d400-db44-b04e-c735.rev.sfr.net) (Ping timeout: 240 seconds)
2023-06-15 10:01:13 +0200opqdonut(opqdonut@pseudo.fixme.fi) (Server closed connection)
2023-06-15 10:01:22 +0200opqdonut(opqdonut@pseudo.fixme.fi)
2023-06-15 10:03:56 +0200cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2023-06-15 10:05:00 +0200zeenk(~zeenk@2a02:2f04:a106:3c00::7fe)
2023-06-15 10:07:20 +0200gmg(~user@user/gehmehgeh) (Ping timeout: 240 seconds)
2023-06-15 10:08:25 +0200Pickchea(~private@user/pickchea)
2023-06-15 10:09:05 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 260 seconds)
2023-06-15 10:10:31 +0200gmg(~user@user/gehmehgeh)
2023-06-15 10:15:23 +0200Athas(athas@sigkill.dk) (Server closed connection)
2023-06-15 10:15:33 +0200Athas(athas@sigkill.dk)
2023-06-15 10:18:08 +0200ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
2023-06-15 10:19:31 +0200titibandit(~titibandi@user/titibandit)
2023-06-15 10:20:34 +0200cheater(~Username@user/cheater)
2023-06-15 10:20:51 +0200ec_(~ec@gateway/tor-sasl/ec)
2023-06-15 10:22:05 +0200hugo(znc@verdigris.lysator.liu.se)
2023-06-15 10:24:30 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:2cf1:36b7:6ec2:d529) (Remote host closed the connection)
2023-06-15 10:24:48 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:2cf1:36b7:6ec2:d529)
2023-06-15 10:26:06 +0200kmein(~weechat@user/kmein) (Server closed connection)
2023-06-15 10:26:30 +0200kmein(~weechat@user/kmein)
2023-06-15 10:28:05 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-06-15 10:30:25 +0200cheater(~Username@user/cheater)
2023-06-15 10:30:31 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 240 seconds)
2023-06-15 10:30:32 +0200cfricke(~cfricke@user/cfricke)
2023-06-15 10:34:02 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-06-15 10:35:38 +0200Techcable(~Techcable@user/Techcable)
2023-06-15 10:36:23 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b)
2023-06-15 10:39:01 +0200jmorris(uid604645@id-604645.hampstead.irccloud.com)
2023-06-15 10:39:42 +0200puke(~puke@user/puke) (Quit: puke)
2023-06-15 10:40:16 +0200puke(~puke@user/puke)
2023-06-15 10:40:29 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b) (Ping timeout: 240 seconds)
2023-06-15 10:42:46 +0200danse-nr3(~francesco@151.37.252.72)
2023-06-15 10:44:01 +0200hugo(znc@verdigris.lysator.liu.se)
2023-06-15 10:45:53 +0200diagprov(sid348783@user/diagprov)
2023-06-15 10:46:46 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-06-15 10:47:16 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-06-15 10:48:36 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-06-15 10:55:11 +0200tessier(~treed@ec2-184-72-149-67.compute-1.amazonaws.com)
2023-06-15 10:55:42 +0200texasmynsted(~username@99.96.221.112) (Ping timeout: 255 seconds)
2023-06-15 10:55:46 +0200adziahel(~adziahelm@2001:470:69fc:105::b4d)
2023-06-15 10:57:27 +0200texasmynsted(~username@99.96.221.112)
2023-06-15 10:58:29 +0200chromoblob(~user@37.113.180.121) (Ping timeout: 240 seconds)
2023-06-15 10:58:41 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2023-06-15 10:58:51 +0200vpan(~0@mail.elitnet.lt)
2023-06-15 10:59:21 +0200califax(~califax@user/califx) (Remote host closed the connection)
2023-06-15 10:59:38 +0200tessier(~treed@ec2-184-72-149-67.compute-1.amazonaws.com) (Ping timeout: 246 seconds)
2023-06-15 11:03:53 +0200gensyst(~gensyst@user/gensyst) (Quit: Leaving)
2023-06-15 11:08:17 +0200mc47(~mc47@xmonad/TheMC47)
2023-06-15 11:09:51 +0200arrowhead(~arrowhead@cpe-74-66-76-151.nyc.res.rr.com) (Remote host closed the connection)
2023-06-15 11:09:56 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2023-06-15 11:10:06 +0200arrowhead(~arrowhead@2603-7000-9b3f-6934-692d-d473-e85f-7fbb.res6.spectrum.com)
2023-06-15 11:10:13 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2023-06-15 11:10:13 +0200arrowhead(~arrowhead@2603-7000-9b3f-6934-692d-d473-e85f-7fbb.res6.spectrum.com) (Read error: Connection reset by peer)
2023-06-15 11:10:16 +0200Co0kie(~Jura@145.224.73.17)
2023-06-15 11:14:49 +0200euandreh1(~Thunderbi@189.6.18.7)
2023-06-15 11:15:19 +0200Lycurgus(~juan@user/Lycurgus)
2023-06-15 11:16:05 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 246 seconds)
2023-06-15 11:16:06 +0200euandreh1euandreh
2023-06-15 11:16:56 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 11:17:03 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2023-06-15 11:18:44 +0200laxmik(~laxmik@cfeld-pcx40162.desy.de)
2023-06-15 11:21:32 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-06-15 11:29:41 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.8)
2023-06-15 11:36:42 +0200wns(~user@103.206.114.101)
2023-06-15 11:38:10 +0200laxmik(~laxmik@cfeld-pcx40162.desy.de) (Quit: laxmik)
2023-06-15 11:41:13 +0200econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 11:44:28 +0200ft(~ft@p508dbdef.dip0.t-ipconnect.de) (Quit: leaving)
2023-06-15 11:45:44 +0200zer0bitz(~zer0bitz@user/zer0bitz)
2023-06-15 11:48:07 +0200MasseR46(thelounge@2001:bc8:62c:1e19::1) (Quit: The Lounge - https://thelounge.chat)
2023-06-15 11:53:14 +0200chromoblob(~user@37.113.180.121)
2023-06-15 11:55:49 +0200razetime(~quassel@117.254.34.131)
2023-06-15 11:59:41 +0200ijqq_(uid603979@id-603979.helmsley.irccloud.com)
2023-06-15 11:59:59 +0200chromoblob(~user@37.113.180.121) (Ping timeout: 240 seconds)
2023-06-15 12:04:45 +0200xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds)
2023-06-15 12:18:59 +0200johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Ping timeout: 240 seconds)
2023-06-15 12:19:52 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-06-15 12:20:49 +0200Vq(~vq@90-227-195-9-no77.tbcn.telia.com) (Remote host closed the connection)
2023-06-15 12:21:50 +0200johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
2023-06-15 12:23:47 +0200 <jean-paul[m]> looking for a copy of "Behavior to B", Mac Lane, 1998, anyone know where this is available?
2023-06-15 12:27:29 +0200Co0kie(~Jura@145.224.73.17) (Ping timeout: 240 seconds)
2023-06-15 12:27:56 +0200Franciman(~Franciman@2a02:c207:2044:6185::1) (Server closed connection)
2023-06-15 12:28:10 +0200Franciman(~Franciman@mx1.fracta.dev)
2023-06-15 12:29:40 +0200taupiqueur(~taupiqueu@2a02-842a-8180-4601-d400-db44-b04e-c735.rev.sfr.net)
2023-06-15 12:30:57 +0200haskl[error](~haskl@user/haskl) (Read error: Connection reset by peer)
2023-06-15 12:33:15 +0200haskl(~haskl@user/haskl)
2023-06-15 12:33:16 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2023-06-15 12:34:15 +0200euandreh1(~Thunderbi@189.6.18.7)
2023-06-15 12:34:41 +0200 <ijqq_> Hi, I am trying to use cabal for the first time in a project. I've done cabal init -n and I wanted to use this library https://github.com/kowainik/tomland. I didn't find install instructions, but I assumed it would be cabal install tomland. Now it's saying Could not resolve dependencies, but tomland is the only thing I've tried to install.
2023-06-15 12:35:30 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 240 seconds)
2023-06-15 12:35:33 +0200euandreh1euandreh
2023-06-15 12:35:47 +0200 <ijqq_> http://sprunge.us/f4kDqc is the full message
2023-06-15 12:37:04 +0200smalltalkman(uid545680@id-545680.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 12:37:17 +0200 <geekosaur> you don't install libraries manually, you list them as dependencies and cabal installs appropriate versions for you. trying to install a library directly will usually get you a complaint that it's a library and you should only install executables
2023-06-15 12:38:12 +0200 <geekosaur> okay, that error is basically saying tomland doesn't work with the version of ghc you have installed
2023-06-15 12:38:29 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b)
2023-06-15 12:38:30 +0200 <geekosaur> (`base` is tied to a ghc version, so in practive indicates the ghc version)
2023-06-15 12:39:19 +0200laxmik(~user@cfeld-pcx40162.desy.de)
2023-06-15 12:39:30 +0200 <ijqq_> So base is like all the standard libraries?
2023-06-15 12:40:01 +0200 <ijqq_> And prelude is everything imported by default from base?
2023-06-15 12:40:23 +0200 <jade[m]1> yes
2023-06-15 12:40:34 +0200 <geekosaur> well, not exactly
2023-06-15 12:40:40 +0200 <geekosaur> but close enough
2023-06-15 12:40:45 +0200gurkenglas(~user@dynamic-046-114-179-246.46.114.pool.telefonica.de) (Ping timeout: 260 seconds)
2023-06-15 12:40:48 +0200 <geekosaur> base contains a bunch of stuff not in Prelude
2023-06-15 12:41:02 +0200 <jade[m]1> yeah, I think they understood that
2023-06-15 12:41:06 +0200 <jade[m]1> atleast how I read it
2023-06-15 12:41:14 +0200 <geekosaur> but most importantly it contains everything that ghc needs hardwired references to
2023-06-15 12:42:07 +0200shriekingnoise_(~shrieking@186.137.175.87)
2023-06-15 12:42:15 +0200 <lortabac> I don't understand why the relation between base and GHC versions is so hidden
2023-06-15 12:43:09 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b) (Ping timeout: 258 seconds)
2023-06-15 12:43:17 +0200shriekingnoise(~shrieking@186.137.175.87) (Ping timeout: 246 seconds)
2023-06-15 12:43:19 +0200 <geekosaur> neither do I, tbh. it's been proposed before that base version be tied to ghc version more obviously, but ghc is taking a different path
2023-06-15 12:44:03 +0200 <lortabac> I've been using GHC for 10 years and I don't even know where it's documented
2023-06-15 12:44:09 +0200 <geekosaur> (splitting base into a separate ghc-base package that holds the stuff tied to ghc and which can be upgraded separately hopefully without breaking stuff)
2023-06-15 12:44:33 +0200 <jade[m]1> geekosaur: that ... would make sense
2023-06-15 12:45:28 +0200 <lortabac> wouldn't this make things even more complicated?
2023-06-15 12:45:38 +0200 <ijqq_> So how can I fix this? Do I need to change my version of haskell itself just in order to use this library? Part of the says (conflict: tomland => base>=4.11 && <4.17) [__2] skipping: base-4.18.0. So I need to have a version of ghc which includes an earlier version of base? How do I figure out exactly what version I need? And there is also a conflict with megaparsec too.
2023-06-15 12:45:57 +0200tessier(~treed@ec2-184-72-149-67.compute-1.amazonaws.com)
2023-06-15 12:45:58 +0200 <ijqq_> part of the error*
2023-06-15 12:46:17 +0200 <lortabac> we would have two different base packages that are morally the same thing but are split due to implementation details
2023-06-15 12:47:11 +0200 <ijqq_> I thought the point of cabal was to be a tool similar those used in other languages where it is an isolated environment, so it should download the correct versions of everything and just work?
2023-06-15 12:47:26 +0200 <geekosaur> https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/compiler/wired-in is I think the main thing that documents the links between base and ghc
2023-06-15 12:47:36 +0200 <ijqq_> E.g. cargo in rust
2023-06-15 12:47:38 +0200shriekingnoise(~shrieking@186.137.175.87)
2023-06-15 12:47:40 +0200 <lortabac> ijqq_: yes, but if a package is not compatible with a given GHC version there is nothing to do
2023-06-15 12:48:02 +0200 <geekosaur> ijqq_, the one thing cabal doesn't currently download for you is a different compiler. (stack will do that, but that causes other problems, specifically if you use HLS)
2023-06-15 12:48:19 +0200 <jade[m]1> ijqq_: you specify a base version range here zhat can't be resolved
2023-06-15 12:48:38 +0200 <geekosaur> anyway https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history says you need ghc 9.2.x but you have a 9.4.x version installed
2023-06-15 12:48:43 +0200jmorris(uid604645@id-604645.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 12:48:46 +0200 <geekosaur> (look at the version information for base)
2023-06-15 12:49:07 +0200 <ijqq_> So say I want to use tomland here, and then in another project I want to use a package which sepcifies base >= 4.18, I need to manage two ghci installs?
2023-06-15 12:49:21 +0200 <geekosaur> yes, but that's what ghcup is for
2023-06-15 12:49:23 +0200shriekingnoise_(~shrieking@186.137.175.87) (Ping timeout: 265 seconds)
2023-06-15 12:49:42 +0200 <geekosaur> or, as I said, stack will do that but it doesn't play well with haskell-language-server
2023-06-15 12:49:44 +0200 <ijqq_> Thanks for the link
2023-06-15 12:50:01 +0200 <geekosaur> ghcup manages HLS along with ghc so things work properly
2023-06-15 12:50:51 +0200 <ijqq_> So would would you recommend geekosar? As in the best solution for all of this dependency stuff so I don't need to manager ghc versions myself? Should I get ghcup?
2023-06-15 12:51:00 +0200 <geekosaur> anyway you cna install multiple ghc versions using ghcup and then use cabal's -w option to specify which ghc version to use
2023-06-15 12:51:14 +0200 <geekosaur> ghcup is preferred these days, yes
2023-06-15 12:51:52 +0200danse-nr3(~francesco@151.37.252.72) (Read error: Connection reset by peer)
2023-06-15 12:52:22 +0200danse-nr3(~francesco@151.37.245.207)
2023-06-15 12:53:33 +0200 <ijqq_> Ah I see the install script on their website wants to install all the binaries
2023-06-15 12:53:54 +0200 <ijqq_> So I should uninstall my current ghc and cabaal?
2023-06-15 12:54:31 +0200 <geekosaur> generally, yes
2023-06-15 12:54:46 +0200 <geekosaur> you can do it without but that gets confusing
2023-06-15 12:56:24 +0200 <ijqq_> okay thanks
2023-06-15 12:56:26 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Remote host closed the connection)
2023-06-15 12:56:27 +0200 <ijqq_> also is hls good?
2023-06-15 12:56:37 +0200 <ijqq_> should I get it?
2023-06-15 12:56:47 +0200 <geekosaur> once you get your editor configured for it, yes
2023-06-15 12:56:57 +0200 <geekosaur> ghcup will install HLS along with ghc
2023-06-15 12:56:59 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-06-15 12:57:36 +0200 <geekosaur> I( use VS Code for Haskell editing and HLS integration "just works" after you install the Haskell plugin from the Marketplace
2023-06-15 12:57:57 +0200 <geekosaur> I've heard of varying results if you use vim/nvim or emacs
2023-06-15 12:58:14 +0200 <ijqq_> Okay cool, I use vim hopefully there is something that works
2023-06-15 12:58:55 +0200 <ijqq_> Although in my (extremely limited) experience so far, I haven't had a bad time writing haskell by itself
2023-06-15 12:58:55 +0200xff0x_(~xff0x@ai098135.d.east.v6connect.net)
2023-06-15 12:59:23 +0200 <geekosaur> someone else here can probably help you, or there is #haskell-language-server
2023-06-15 12:59:35 +0200 <ijqq_> for example, I have seen people writing java and I tihnk there is so much the ide does, autocompelte and lots of refactoring
2023-06-15 13:00:00 +0200 <lortabac> I've never been able to make HLS work reliably on vim/nvim and kakoune
2023-06-15 13:00:20 +0200 <lortabac> at the very least you have to restart the editor from time to time
2023-06-15 13:00:26 +0200 <ijqq_> i feel like haskell is more straightforward? like maybe hls can give me jump definition or i can inspect the type of any variable, but I don't know what else it might be able to do that is useful
2023-06-15 13:00:57 +0200 <lortabac> I wish static-ls supported more GHC versions
2023-06-15 13:01:11 +0200 <geekosaur> automatic import management, for one
2023-06-15 13:04:32 +0200Vq(~vq@90-227-195-9-no77.tbcn.telia.com)
2023-06-15 13:05:47 +0200Stone(~Stone@2405:201:c02a:1274:850b:b49c:2b8c:901a)
2023-06-15 13:07:29 +0200 <ijqq_> oh cool there is a ghcup tui
2023-06-15 13:07:42 +0200 <mzg> yeah, that's convienient
2023-06-15 13:07:46 +0200 <ijqq_> so ghcup itself is just a manager for versions of ghc, cabal, etc. ?
2023-06-15 13:08:19 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-06-15 13:08:39 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-06-15 13:09:26 +0200Guest67(~Guest67@95-25-88-111.broadband.corbina.ru)
2023-06-15 13:10:04 +0200Guest95(~Guest67@95-25-88-111.broadband.corbina.ru)
2023-06-15 13:11:29 +0200 <carbolymer> ijqq_: yes, you can install desired version of the tools
2023-06-15 13:11:46 +0200Guest81(~Guest99@95-25-88-111.broadband.corbina.ru)
2023-06-15 13:12:33 +0200use-value1(~Thunderbi@2a00:23c6:8a03:2f01:69bc:d752:c9a5:d7d7)
2023-06-15 13:14:05 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:2cf1:36b7:6ec2:d529) (Ping timeout: 246 seconds)
2023-06-15 13:14:06 +0200use-value1use-value
2023-06-15 13:14:45 +0200Guest81(~Guest99@95-25-88-111.broadband.corbina.ru) (Client Quit)
2023-06-15 13:15:21 +0200Guest95(~Guest67@95-25-88-111.broadband.corbina.ru) (Quit: Client closed)
2023-06-15 13:17:41 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 13:19:41 +0200 <jean-paul[m]> ijqq_: other things hls helps with - rename things for you, add signatures for things, add and remove imports
2023-06-15 13:19:57 +0200 <jean-paul[m]> Something called "fold" and "unfold" that I never use
2023-06-15 13:22:38 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 258 seconds)
2023-06-15 13:23:29 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:69bc:d752:c9a5:d7d7) (Quit: use-value)
2023-06-15 13:24:31 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds)
2023-06-15 13:24:33 +0200 <ijqq_> Okay So now I installed the library, and copied the readme example to app/Main.hs. if I do cabal run I get some errors (lol) but if I do ghci Main.hs or ghci app/Main.hs I get even more errors saying it can't find the libraries. So from where am I supposed to launch ghci so it can see the my dependencies?
2023-06-15 13:25:24 +0200 <geekosaur> usually you create a project and use `cabal repl`
2023-06-15 13:25:30 +0200 <lortabac> you can execute 'cabal repl' to launch ghci with all the necessary dependencies
2023-06-15 13:26:29 +0200 <geekosaur> alternatives are `cabal repl --build-depends=tomland` or installing it with `cabal install --lib`; the latter can cause messes down the road, and is buggy in cabal 3.10
2023-06-15 13:26:32 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-06-15 13:29:30 +0200 <ijqq_> great, thank you
2023-06-15 13:29:34 +0200 <ijqq_> cabal reply works
2023-06-15 13:38:01 +0200Co0kie(~Jura@145.224.73.17)
2023-06-15 13:38:15 +0200 <ijqq_> Okay i've tried the example from the readme (http://sprunge.us/I0uWiG) and I got a few errors but i just needed to add some language flags. Butnt I get could not match [Char] with Toml.Key a bunch of times. Is some other language extension needed? I remember that there was something.so you can use text and string interchanably or something like that but i forgot the name?
2023-06-15 13:38:44 +0200 <ijqq_> https://github.com/kowainik/tomland/blob/main/examples/Main.hs here I mean
2023-06-15 13:40:11 +0200 <ncf> OverloadedStrings
2023-06-15 13:40:30 +0200 <geekosaur> that'd be my guess
2023-06-15 13:40:35 +0200 <ijqq_> ah great, thank you
2023-06-15 13:40:41 +0200 <ijqq_> that was it
2023-06-15 13:40:49 +0200 <ijqq_> now the example finally compiles :)
2023-06-15 13:42:29 +0200 <ijqq_> So do you think it is an issue with the example that the author forgot to add {-# LANGUAGE LambdaCase #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-}
2023-06-15 13:42:29 +0200 <ijqq_> to the top of the file? Or did they just run it a different way which means you don't need to include those
2023-06-15 13:42:49 +0200 <ncf> those are in the cabal file
2023-06-15 13:42:51 +0200 <geekosaur> you can put extensions in a cabal file instead of the source
2023-06-15 13:43:08 +0200 <ncf> but yes it'd probably be better for the examples to be self-contained wrt extensions
2023-06-15 13:43:55 +0200 <ijqq_> ah okay i got it
2023-06-15 13:44:12 +0200cheater_(~Username@user/cheater)
2023-06-15 13:44:58 +0200shriekingnoise(~shrieking@186.137.175.87) (Ping timeout: 265 seconds)
2023-06-15 13:45:21 +0200ripspin(~chatzilla@1.145.231.135)
2023-06-15 13:45:49 +0200shriekingnoise(~shrieking@186.137.175.87)
2023-06-15 13:46:29 +0200taupiqueur(~taupiqueu@2a02-842a-8180-4601-d400-db44-b04e-c735.rev.sfr.net) (Ping timeout: 240 seconds)
2023-06-15 13:47:00 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-06-15 13:47:32 +0200Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 240 seconds)
2023-06-15 13:49:31 +0200Maxdamantus(~Maxdamant@user/maxdamantus)
2023-06-15 13:50:41 +0200cheater_cheater
2023-06-15 13:50:41 +0200cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2023-06-15 13:52:16 +0200ubert(~Thunderbi@2a02:8109:abc0:6434:7bd5:34d9:f45f:b1fb)
2023-06-15 13:54:33 +0200ripspin(~chatzilla@1.145.231.135) (Read error: Connection reset by peer)
2023-06-15 13:56:12 +0200Guest67(~Guest67@95-25-88-111.broadband.corbina.ru) (Quit: Client closed)
2023-06-15 13:58:23 +0200Stone(~Stone@2405:201:c02a:1274:850b:b49c:2b8c:901a) (Quit: Client closed)
2023-06-15 14:04:06 +0200cfricke(~cfricke@user/cfricke)
2023-06-15 14:05:26 +0200kritty(~crumb@c-76-155-235-153.hsd1.co.comcast.net)
2023-06-15 14:07:17 +0200arrowhead(~arrowhead@2603-7000-9b3f-6934-692d-d473-e85f-7fbb.res6.spectrum.com)
2023-06-15 14:12:23 +0200cheater_(~Username@user/cheater)
2023-06-15 14:12:23 +0200cheater_cheater
2023-06-15 14:13:29 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 265 seconds)
2023-06-15 14:15:49 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-06-15 14:21:13 +0200Arsen(arsen@gentoo/developer/managarm.dev.Arsen) (Quit: Quit.)
2023-06-15 14:22:19 +0200ddellacosta(~ddellacos@143.244.47.89) (Quit: WeeChat 3.8)
2023-06-15 14:24:36 +0200ripspin(~chatzilla@1.145.231.135)
2023-06-15 14:26:33 +0200cfricke(~cfricke@user/cfricke)
2023-06-15 14:26:58 +0200Arsen(arsen@gentoo/developer/managarm.dev.Arsen)
2023-06-15 14:27:52 +0200 <ijqq_> http://sprunge.us/qD4mVN How can I make ghci actually print it, instead of showing the text inside quotes?
2023-06-15 14:28:22 +0200 <jean-paul[m]> print uses the Show instance for the value
2023-06-15 14:28:44 +0200dtman34(~dtman34@2601:447:d000:93c9:a04d:f386:6724:b122) (Ping timeout: 240 seconds)
2023-06-15 14:28:50 +0200 <geekosaur> putStr?
2023-06-15 14:28:56 +0200 <jean-paul[m]> If the value is already String or Text or ByteString, you can use the right putStr / putStrLn (or various other functions that work directly on those types)
2023-06-15 14:28:56 +0200__monty__(~toonn@user/toonn)
2023-06-15 14:29:25 +0200 <geekosaur> Show is intended to produce Haskell source representations, so String and friends are quoted and escaped
2023-06-15 14:29:53 +0200 <geekosaur> basically you should use it for debugging, not general output
2023-06-15 14:30:25 +0200 <ijqq_> putStrLn $ show $ Toml.enode ... still shows it in ghci inside the quotes
2023-06-15 14:30:36 +0200 <geekosaur> don't use show
2023-06-15 14:31:04 +0200 <geekosaur> you're doing the same thing print does, going through the Show instance
2023-06-15 14:31:07 +0200 <ijqq_> โ€ข Couldn't match type โ€˜Textโ€™ with โ€˜[Char]โ€™
2023-06-15 14:31:07 +0200 <ijqq_> Expected: String
2023-06-15 14:31:07 +0200 <ijqq_> Actual: Text
2023-06-15 14:31:39 +0200 <geekosaur> Text should have its own putStrLn, or you can use Text.unpack
2023-06-15 14:33:02 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-06-15 14:33:18 +0200danse-nr3(~francesco@151.37.245.207) (Ping timeout: 265 seconds)
2023-06-15 14:34:08 +0200 <ijqq_> ah i gt it, putStrLn $ unpack
2023-06-15 14:34:08 +0200 <ijqq_> thanks
2023-06-15 14:34:09 +0200arrowhead(~arrowhead@2603-7000-9b3f-6934-692d-d473-e85f-7fbb.res6.spectrum.com) (Read error: Connection reset by peer)
2023-06-15 14:34:28 +0200 <ijqq_> but i agree it's for debugging , i was just wondering how to do it
2023-06-15 14:35:40 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2023-06-15 14:36:07 +0200 <geekosaur> https://hackage.haskell.org/package/text-2.0.2/docs/Data-Text-IO.html#v:putStrLn avoids the unpack and as such is more efficient
2023-06-15 14:36:26 +0200 <geekosaur> (not that it's likely to be a bottleneck for you)
2023-06-15 14:41:23 +0200 <ijqq_> also is there a built-in module for working with dates and times in haskell? like datetime in python for example?
2023-06-15 14:41:53 +0200 <merijn> ijqq_: Define builtin
2023-06-15 14:42:01 +0200 <merijn> There's
2023-06-15 14:42:04 +0200 <merijn> @hackage time
2023-06-15 14:42:04 +0200 <lambdabot> https://hackage.haskell.org/package/time
2023-06-15 14:42:07 +0200danse-nr3(~francesco@151.37.245.207)
2023-06-15 14:42:16 +0200 <ijqq_> Like i can just run ghci and do import
2023-06-15 14:42:20 +0200 <ijqq_> so in base i guess?
2023-06-15 14:43:06 +0200 <merijn> then no, because not even text and bytestring are in base
2023-06-15 14:43:38 +0200 <ijqq_> oh right
2023-06-15 14:43:50 +0200 <ijqq_> but I can do import Data.Text fine but not import Time?
2023-06-15 14:44:03 +0200 <kritty> Text is included with GHC yeah?
2023-06-15 14:44:22 +0200 <ijqq_> but in the readme of that it says it's bundled with ghc
2023-06-15 14:44:45 +0200 <merijn> kritty: Text is a dependency of GHC and thus generally will be installed when GHC is, but it's not in base
2023-06-15 14:44:49 +0200 <ijqq_> oh data.time*
2023-06-15 14:44:58 +0200 <ijqq_> oh right
2023-06-15 14:45:32 +0200 <ijqq_> ah okay base is onnly stuff in here https://hackage.haskell.org/package/base
2023-06-15 14:45:57 +0200 <kritty> merijn: that's what I was attempting to say haha
2023-06-15 14:46:17 +0200 <ijqq_> but thank you merijn i think this time should be wha ti need
2023-06-15 14:46:25 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-06-15 14:46:29 +0200 <merijn> base is specifically, well, base which lives in the GHC tree and is hard-wired into your GHC version, then there are GHC boot libs (i.e. GHCs dependencies) which ship with and are installed with GHC, and then there is "the rest of the world"
2023-06-15 14:47:10 +0200 <merijn> The distinction is that, you are forced to use the version of base provided by your GHC version, but you are allowed to use newer/older versions of boot libraries IFF your code does not depend on GHC itself
2023-06-15 14:47:45 +0200 <merijn> (if your code depends on GHC, i.e. you're using GHC as a lirary, then you are stuck running the exact versions of boot libs that GHC uses)
2023-06-15 14:52:33 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.8)
2023-06-15 14:52:43 +0200chromoblob(~user@37.113.180.121)
2023-06-15 14:54:13 +0200mc47(~mc47@xmonad/TheMC47)
2023-06-15 15:00:45 +0200chromoblob(~user@37.113.180.121) (Ping timeout: 260 seconds)
2023-06-15 15:05:24 +0200laxmik(~user@cfeld-pcx40162.desy.de) (Quit: ERC (IRC client for Emacs 26.3))
2023-06-15 15:10:06 +0200bontaq(~user@ool-45779b84.dyn.optonline.net)
2023-06-15 15:12:14 +0200dtman34(~dtman34@76.156.89.180)
2023-06-15 15:29:16 +0200pierrot(~pi@user/pierrot) (Server closed connection)
2023-06-15 15:29:32 +0200acidjnk(~acidjnk@p200300d6e7072f114cfca53a33335870.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2023-06-15 15:29:40 +0200pierrot(~pi@user/pierrot)
2023-06-15 15:32:49 +0200ripspin(~chatzilla@1.145.231.135) (Remote host closed the connection)
2023-06-15 15:36:51 +0200califax(~califax@user/califx)
2023-06-15 15:44:03 +0200Putonlalla(~Putonlall@it-cyan.it.jyu.fi) (Server closed connection)
2023-06-15 15:45:14 +0200Putonlalla(~Putonlall@it-cyan.it.jyu.fi)
2023-06-15 15:49:32 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-06-15 15:49:32 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-06-15 15:49:32 +0200wroathe(~wroathe@user/wroathe)
2023-06-15 15:57:30 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2023-06-15 16:05:20 +0200razetime(~quassel@117.254.34.131) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2023-06-15 16:17:30 +0200kritty(~crumb@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Leaving)
2023-06-15 16:18:39 +0200cfricke(~cfricke@user/cfricke)
2023-06-15 16:22:08 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:9367:8258:f0e4:54ad) (Quit: WeeChat 2.8)
2023-06-15 16:25:20 +0200wns(~user@103.206.114.101) (Read error: Connection reset by peer)
2023-06-15 16:25:24 +0200acidjnk(~acidjnk@p200300d6e7072f11fda1cc9dbde3bde1.dip0.t-ipconnect.de)
2023-06-15 16:25:59 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 268 seconds)
2023-06-15 16:26:16 +0200wns(~user@103.206.114.101)
2023-06-15 16:27:12 +0200thegeekinside(~thegeekin@189.217.90.138)
2023-06-15 16:30:42 +0200bontaq(~user@ool-45779b84.dyn.optonline.net) (Remote host closed the connection)
2023-06-15 16:31:26 +0200bontaq(~user@ool-45779b84.dyn.optonline.net)
2023-06-15 16:32:05 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 16:41:38 +0200Lycurgus(~juan@user/Lycurgus)
2023-06-15 16:48:20 +0200euandreh(~Thunderbi@189.6.18.7) (Remote host closed the connection)
2023-06-15 16:49:33 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2023-06-15 16:50:13 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 16:50:36 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
2023-06-15 16:52:09 +0200danse-nr3_(~francesco@151.43.249.224)
2023-06-15 16:54:37 +0200danse-nr3(~francesco@151.37.245.207) (Ping timeout: 258 seconds)
2023-06-15 16:54:58 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 268 seconds)
2023-06-15 17:00:21 +0200Sgeo(~Sgeo@user/sgeo)
2023-06-15 17:02:57 +0200zeenk(~zeenk@2a02:2f04:a106:3c00::7fe) (Quit: Konversation terminated!)
2023-06-15 17:07:18 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-06-15 17:10:45 +0200shapr(~user@2600:1700:c640:3100:fffb:4059:917:b753)
2023-06-15 17:14:06 +0200zero(~z@user/zero) (Server closed connection)
2023-06-15 17:14:26 +0200zero(~z@user/zero)
2023-06-15 17:19:12 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 17:21:30 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 265 seconds)
2023-06-15 17:23:13 +0200jludwig(~justin@li657-110.members.linode.com) (Server closed connection)
2023-06-15 17:23:30 +0200jludwig(~justin@li657-110.members.linode.com)
2023-06-15 17:23:44 +0200ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
2023-06-15 17:23:57 +0200danse-nr3_(~francesco@151.43.249.224) (Ping timeout: 268 seconds)
2023-06-15 17:24:08 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 258 seconds)
2023-06-15 17:24:37 +0200danse-nr3_(~francesco@151.43.249.224)
2023-06-15 17:25:29 +0200ec_(~ec@gateway/tor-sasl/ec)
2023-06-15 17:25:37 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-06-15 17:32:54 +0200hugo(znc@verdigris.lysator.liu.se)
2023-06-15 17:35:01 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 17:35:55 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.8)
2023-06-15 17:36:05 +0200thegeekinside(~thegeekin@189.217.90.138) (Remote host closed the connection)
2023-06-15 17:39:28 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 258 seconds)
2023-06-15 17:42:40 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 17:48:06 +0200gabiruh(~gabiruh@191.252.222.55) (Server closed connection)
2023-06-15 17:48:21 +0200gabiruh(~gabiruh@vps19177.publiccloud.com.br)
2023-06-15 17:56:15 +0200end-(~end^@user/end/x-0094621)
2023-06-15 17:56:20 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 240 seconds)
2023-06-15 17:59:58 +0200vpan(~0@mail.elitnet.lt) (Quit: Leaving.)
2023-06-15 18:02:29 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:9cc1:498b:2bbc:7bd3)
2023-06-15 18:05:14 +0200Co0kie(~Jura@145.224.73.17) (Ping timeout: 246 seconds)
2023-06-15 18:05:15 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b)
2023-06-15 18:08:33 +0200califax(~califax@user/califx) (Remote host closed the connection)
2023-06-15 18:08:57 +0200califax(~califax@user/califx)
2023-06-15 18:09:35 +0200remedan(~remedan@ip-94-112-0-18.bb.vodafone.cz) (Read error: Connection reset by peer)
2023-06-15 18:12:01 +0200remedan(~remedan@ip-94-112-0-18.bb.vodafone.cz)
2023-06-15 18:16:41 +0200chromoblob(~user@37.113.180.121)
2023-06-15 18:17:29 +0200thegeekinside(~thegeekin@189.217.90.138)
2023-06-15 18:19:41 +0200mauke(~mauke@user/mauke)
2023-06-15 18:24:25 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b) (Remote host closed the connection)
2023-06-15 18:24:33 +0200kritty(~crumb@c-76-155-235-153.hsd1.co.comcast.net)
2023-06-15 18:28:41 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:9cc1:498b:2bbc:7bd3) (Quit: laxmik)
2023-06-15 18:33:58 +0200ripspin(~chatzilla@1.145.207.135)
2023-06-15 18:35:17 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2023-06-15 18:36:43 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 268 seconds)
2023-06-15 18:38:07 +0200cheater(~Username@user/cheater) (Ping timeout: 258 seconds)
2023-06-15 18:39:02 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2023-06-15 18:40:29 +0200cheater(~Username@user/cheater)
2023-06-15 18:41:11 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 258 seconds)
2023-06-15 18:43:34 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b)
2023-06-15 18:46:00 +0200erisco(~erisco@d24-141-66-165.home.cgocable.net) (Ping timeout: 240 seconds)
2023-06-15 18:46:16 +0200zxrom(~zxrom@mm-136-12-212-37.vitebsk.dynamic.pppoe.byfly.by)
2023-06-15 18:48:56 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 18:52:52 +0200ubert(~Thunderbi@2a02:8109:abc0:6434:7bd5:34d9:f45f:b1fb) (Remote host closed the connection)
2023-06-15 18:52:59 +0200Nosrep(~Nosrep@user/nosrep) (Ping timeout: 240 seconds)
2023-06-15 19:02:11 +0200trev(~trev@user/trev) (Quit: trev)
2023-06-15 19:03:03 +0200trev(~trev@user/trev)
2023-06-15 19:13:47 +0200taupiqueur(~taupiqueu@2a02-842a-8180-4601-718f-332c-cdd5-d125.rev.sfr.net)
2023-06-15 19:16:39 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:a031:36aa:a52b:1d5b) (Remote host closed the connection)
2023-06-15 19:18:44 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds)
2023-06-15 19:21:36 +0200erisco(~erisco@d24-141-66-165.home.cgocable.net)
2023-06-15 19:25:56 +0200danse-nr3_(~francesco@151.43.249.224) (Read error: Connection reset by peer)
2023-06-15 19:26:03 +0200danse-nr3(~francesco@151.35.226.97)
2023-06-15 19:27:21 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2023-06-15 19:27:57 +0200euandreh(~Thunderbi@189.6.18.7) (Remote host closed the connection)
2023-06-15 19:28:41 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 19:31:02 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-06-15 19:33:27 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 268 seconds)
2023-06-15 19:36:01 +0200taupiqueur1(~taupiqueu@2a02-842a-8180-4601-119c-28f2-ecbf-54da.rev.sfr.net)
2023-06-15 19:38:17 +0200taupiqueur(~taupiqueu@2a02-842a-8180-4601-718f-332c-cdd5-d125.rev.sfr.net) (Ping timeout: 265 seconds)
2023-06-15 19:41:48 +0200titibandit(~titibandi@user/titibandit) (Remote host closed the connection)
2023-06-15 19:42:03 +0200lawt(~lawt@129.159.36.129) (Server closed connection)
2023-06-15 19:42:33 +0200lawt(~lawt@129.159.36.129)
2023-06-15 19:44:37 +0200ripspin(~chatzilla@1.145.207.135) (Remote host closed the connection)
2023-06-15 19:45:11 +0200pat67(~pat67@145.14.135.137)
2023-06-15 19:48:33 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-06-15 19:49:29 +0200ijqq_(uid603979@id-603979.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 19:53:32 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-06-15 19:55:38 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-06-15 20:00:29 +0200__monty__(~toonn@user/toonn)
2023-06-15 20:09:45 +0200briandaed(~briandaed@185.234.210.211)
2023-06-15 20:13:05 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 20:17:08 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-06-15 20:21:35 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2023-06-15 20:28:02 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds)
2023-06-15 20:30:49 +0200danse-nr3(~francesco@151.35.226.97) (Ping timeout: 258 seconds)
2023-06-15 20:36:48 +0200danse-nr3(~francesco@151.35.226.97)
2023-06-15 20:41:17 +0200raym(~ray@user/raym) (Ping timeout: 268 seconds)
2023-06-15 20:41:45 +0200ijqq_(uid603979@id-603979.helmsley.irccloud.com)
2023-06-15 20:42:14 +0200wns(~user@103.206.114.101) (Quit: WeeChat 3.8)
2023-06-15 20:43:06 +0200 <ijqq_> im watching a video on functors and applicatives. so f <$> x is the same as pure f <*> x right?
2023-06-15 20:43:32 +0200 <mauke> yes
2023-06-15 20:43:36 +0200gmg(~user@user/gehmehgeh)
2023-06-15 20:43:53 +0200briandaed(~briandaed@185.234.210.211) (Quit: Lost terminal)
2023-06-15 20:44:18 +0200 <ijqq_> cool
2023-06-15 20:44:50 +0200 <jade[m]1> that arises from the laws
2023-06-15 20:45:43 +0200 <EvanR> does it?
2023-06-15 20:45:55 +0200 <EvanR> or is it an additional law between Applicative and Functor
2023-06-15 20:46:03 +0200 <jade[m]1> hoogle even mentions that
2023-06-15 20:46:12 +0200 <jade[m]1> s/hoogle/the docs
2023-06-15 20:46:22 +0200 <jade[m]1> (brain fart)
2023-06-15 20:46:40 +0200dcoutts_(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 260 seconds)
2023-06-15 20:46:43 +0200 <EvanR> typeclassopedia does not :(
2023-06-15 20:46:59 +0200 <jade[m]1> > As a consequence of these laws, the Functor instance for f will satisfy
2023-06-15 20:46:59 +0200 <jade[m]1> fmap f x = pure f <*> x
2023-06-15 20:47:01 +0200 <lambdabot> <hint>:1:18: error: parse error on input โ€˜ofโ€™
2023-06-15 20:47:49 +0200raym(~ray@user/raym)
2023-06-15 20:51:05 +0200 <mauke> EvanR: yes, it does
2023-06-15 20:51:38 +0200 <ncf> identity law + naturality of <*> and pure
2023-06-15 20:51:47 +0200 <mauke> https://wiki.haskell.org/Typeclassopedia#Laws_2 "There is also a law specifying how Applicative should relate to Functor: fmap g x = pure g <*> x"
2023-06-15 20:51:52 +0200 <ncf> i'm surprised typeclassopedia mentions it as an additional law
2023-06-15 20:52:36 +0200 <EvanR> yes it does say that, but not that it can be derived from the previously mentioned laws on the page
2023-06-15 20:52:49 +0200 <EvanR> muchless how
2023-06-15 20:53:10 +0200 <mauke> ah
2023-06-15 20:58:29 +0200 <mauke> huh. "For the purposes of ApplicativeDo, a pattern match against a newtype constructor is considered strict."
2023-06-15 20:59:08 +0200 <mauke> which means ~(SomeNewtypeConstructor x) can actually be semantically significant
2023-06-15 20:59:55 +0200 <mauke> (normally the ~ makes no sense here because unwrapping a newtype is a no-op operationally)
2023-06-15 21:03:36 +0200dibblego(~dibblego@haskell/developer/dibblego) (Server closed connection)
2023-06-15 21:03:53 +0200dibblego(~dibblego@122-199-1-30.ip4.superloop.au)
2023-06-15 21:03:53 +0200dibblego(~dibblego@122-199-1-30.ip4.superloop.au) (Changing host)
2023-06-15 21:03:53 +0200dibblego(~dibblego@haskell/developer/dibblego)
2023-06-15 21:06:28 +0200Nosrep(~Nosrep@user/nosrep)
2023-06-15 21:07:04 +0200zeenk(~zeenk@2a02:2f04:a106:3c00::7fe)
2023-06-15 21:07:32 +0200danse-nr3(~francesco@151.35.226.97) (Ping timeout: 240 seconds)
2023-06-15 21:14:27 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-06-15 21:18:34 +0200epolanski(uid312403@id-312403.helmsley.irccloud.com)
2023-06-15 21:18:48 +0200zaidhaan(~zai@2001:f40:960:1c54:3c0f:370:d2d1:4fb9)
2023-06-15 21:20:22 +0200taupiqueur2(~taupiqueu@2a02-842a-8180-4601-d145-30ad-2d63-7b2d.rev.sfr.net)
2023-06-15 21:20:45 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-06-15 21:22:34 +0200taupiqueur1(~taupiqueu@2a02-842a-8180-4601-119c-28f2-ecbf-54da.rev.sfr.net) (Ping timeout: 258 seconds)
2023-06-15 21:22:47 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:9cc1:498b:2bbc:7bd3)
2023-06-15 21:25:41 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
2023-06-15 21:27:49 +0200xeroxSchwenkermeister
2023-06-15 21:28:09 +0200wz1000(~zubin@static.11.113.47.78.clients.your-server.de) (Ping timeout: 268 seconds)
2023-06-15 21:29:52 +0200zxrom_(~zxrom@mm-136-12-212-37.vitebsk.dynamic.pppoe.byfly.by)
2023-06-15 21:31:44 +0200zxrom(~zxrom@mm-136-12-212-37.vitebsk.dynamic.pppoe.byfly.by) (Ping timeout: 248 seconds)
2023-06-15 21:31:58 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-06-15 21:32:33 +0200yaroot(~yaroot@p3136152-ipngn5601souka.saitama.ocn.ne.jp) (Server closed connection)
2023-06-15 21:32:48 +0200yaroot(~yaroot@2400:4052:ac0:d900:1cf4:2aff:fe51:c04c)
2023-06-15 21:34:04 +0200Pickchea(~private@user/pickchea)
2023-06-15 21:37:45 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:9cc1:498b:2bbc:7bd3) (Quit: laxmik)
2023-06-15 21:38:17 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 258 seconds)
2023-06-15 21:40:02 +0200zaidhaan(~zai@2001:f40:960:1c54:3c0f:370:d2d1:4fb9) (Quit: WeeChat 3.8)
2023-06-15 21:42:00 +0200ddellacosta(~ddellacos@143.244.47.100)
2023-06-15 21:52:19 +0200jgtf(~jgtf@38.49.161.250)
2023-06-15 21:52:51 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 258 seconds)
2023-06-15 21:57:10 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-06-15 21:57:26 +0200Pickchea(~private@user/pickchea)
2023-06-15 22:00:24 +0200elain4(~textual@c-73-216-134-157.hsd1.va.comcast.net)
2023-06-15 22:01:28 +0200euandreh(~Thunderbi@189.6.18.7)
2023-06-15 22:06:39 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-06-15 22:06:51 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-06-15 22:08:34 +0200zeenk(~zeenk@2a02:2f04:a106:3c00::7fe) (Quit: Konversation terminated!)
2023-06-15 22:10:48 +0200dcoutts_(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-06-15 22:12:13 +0200Cale(~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) (Server closed connection)
2023-06-15 22:12:36 +0200Cale(~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com)
2023-06-15 22:13:03 +0200ft(~ft@p508dbdef.dip0.t-ipconnect.de)
2023-06-15 22:14:38 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2023-06-15 22:19:32 +0200dhil(~dhil@78.45.150.83.ewm.ftth.as8758.net) (Quit: Leaving)
2023-06-15 22:22:18 +0200elain4(~textual@c-73-216-134-157.hsd1.va.comcast.net) (Quit: Textual IRC Client: www.textualapp.com)
2023-06-15 22:24:12 +0200finsternis(~X@23.226.237.192)
2023-06-15 22:24:22 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2023-06-15 22:24:26 +0200finsternis(~X@23.226.237.192) (Client Quit)
2023-06-15 22:24:53 +0200 <jade[m]1> why does readFile append a newline even when the file doesn't contain one?
2023-06-15 22:24:59 +0200mncheckm(~mncheck@193.224.205.254) (Ping timeout: 246 seconds)
2023-06-15 22:26:09 +0200 <probie> jade[m]1: What OS are you on? For me at least (on linux) it doesn't
2023-06-15 22:26:23 +0200 <jade[m]1> I'm on linux
2023-06-15 22:26:48 +0200 <geekosaur> are you sure it is readFile?
2023-06-15 22:27:01 +0200 <geekosaur> because I can think of something that will
2023-06-15 22:27:15 +0200 <geekosaur> > unlines (lines "a\nb")
2023-06-15 22:27:17 +0200 <lambdabot> "a\nb\n"
2023-06-15 22:28:32 +0200 <jade[m]1> I'm using `foo . T.pack <$> readFile str`
2023-06-15 22:28:38 +0200 <jade[m]1> and I've rechecked multiple times that the file does not have a trailing newline
2023-06-15 22:28:43 +0200 <jade[m]1> yet it does show me there is one
2023-06-15 22:28:44 +0200 <probie> Try (in an empty dir) `echo -n foo > foo; echo 'main = readFile "foo" >>= print' > Test.hs; runhaskell Test.hs; rm foo Test.hs` and see if it prints `"foo"` or "foo\n"`
2023-06-15 22:28:44 +0200finsternis(~X@23.226.237.192)
2023-06-15 22:29:00 +0200 <mauke> how did you check the file?
2023-06-15 22:30:47 +0200 <jade[m]1> ok well I might have been tricked by neovim
2023-06-15 22:30:48 +0200dcoutts_(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 258 seconds)
2023-06-15 22:31:03 +0200 <mauke> wat
2023-06-15 22:31:17 +0200 <jade[m]1> probie: this showed me no newline
2023-06-15 22:31:28 +0200 <mauke> note that a (non-empty) text file with no newline is malformed
2023-06-15 22:31:32 +0200 <mauke> \n is a line *terminator*
2023-06-15 22:31:48 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-06-15 22:31:53 +0200 <jade[m]1> ah
2023-06-15 22:32:01 +0200 <jade[m]1> this is for a token file
2023-06-15 22:34:34 +0200dcoutts_(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-06-15 22:34:37 +0200trev(~trev@user/trev) (Quit: trev)
2023-06-15 22:34:41 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:5c22:2ef3:9056:4b38)
2023-06-15 22:34:57 +0200 <dolio> Vim automatically makes sure files follow the convention mauke mentions, unless you tell it not to.
2023-06-15 22:35:38 +0200 <mauke> (... by switching to binary mode and setting noeol IIRC)
2023-06-15 22:38:50 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:5c22:2ef3:9056:4b38) (Quit: Client closed)
2023-06-15 22:38:56 +0200elain4(~textual@2601:5c0:8200:990:74bf:d62b:128c:c613)
2023-06-15 22:42:17 +0200hisa38(~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net) (Quit: Ping timeout (120 seconds))
2023-06-15 22:42:34 +0200Schwenkermeisterxerox
2023-06-15 22:42:48 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:5c22:2ef3:9056:4b38)
2023-06-15 22:44:01 +0200pavonia(~user@user/siracusa)
2023-06-15 22:48:58 +0200talismanick(~user@campus-006-229.ucdavis.edu)
2023-06-15 22:49:21 +0200 <talismanick> Now that r/haskell is private, where is everyone?
2023-06-15 22:49:49 +0200 <yushyin> we are here!
2023-06-15 22:50:07 +0200tstat_(~tstat@user/tstat) (Quit: ZNC 1.8.2 - https://znc.in)
2023-06-15 22:50:32 +0200 <talismanick> yushyin: this place is great, but it's not for every question, you know?
2023-06-15 22:50:39 +0200 <yushyin> and i guess, https://discourse.haskell.org/ ?
2023-06-15 22:51:25 +0200 <talismanick> I wish all my questions were of the quality (in curtness and specificity) to fit here, but I'm not that advanced :P
2023-06-15 22:53:51 +0200 <talismanick> Also, curious about other niche-tech Fediverse instances in general
2023-06-15 22:57:14 +0200laxmik(~laxmik@2a01:c23:8dd1:4d00:5c22:2ef3:9056:4b38) (Quit: laxmik)
2023-06-15 22:57:29 +0200michalz(~michalz@185.246.207.221) (Remote host closed the connection)
2023-06-15 22:57:29 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2023-06-15 23:01:26 +0200wz1000(~zubin@static.11.113.47.78.clients.your-server.de)
2023-06-15 23:07:15 +0200 <Hecate> talismanick: /r/haskellquestions
2023-06-15 23:09:27 +0200 <talismanick> Thanks, sounds like I can get any questions answered in the interim before I find new places away from Reddit entirely
2023-06-15 23:10:30 +0200zazaeil(~zazaeil@91.234.25.217)
2023-06-15 23:11:15 +0200ijqq_(uid603979@id-603979.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 23:12:41 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-06-15 23:14:17 +0200 <geekosaur> there's also https://discord.gg/5ay2HNK2
2023-06-15 23:15:01 +0200hometown(~blurb@96.45.2.121) (Ping timeout: 240 seconds)
2023-06-15 23:15:24 +0200 <geekosaur> and a separate (not bridged here) matrix room, #haskell:matrix.org
2023-06-15 23:20:01 +0200 <sm> +1 for the matrix room and discourse, and there's the #haskell tag on mastodon, eg https://fosstodon.org/tags/haskell
2023-06-15 23:20:58 +0200 <sm> and indeed the whole #haskell-space-meta:matrix.org . And the http://planet.haskell.org keeps on ticking
2023-06-15 23:25:06 +0200hisa38(~hisa38@104-181-102-238.lightspeed.wepbfl.sbcglobal.net)
2023-06-15 23:26:14 +0200 <sm> stop me if I'm becoming a bore.. we shouldn't completely ignore https://mail.haskell.org/pipermail/haskell-cafe .. and https://haskell.pl-a.net is a great overview
2023-06-15 23:26:44 +0200gentauro(~gentauro@user/gentauro) (Ping timeout: 240 seconds)
2023-06-15 23:27:30 +0200 <jade[m]1> not stopping you, all these resources are very cool and neat
2023-06-15 23:28:10 +0200 <sm> I found some at my own https://haskell-links.org
2023-06-15 23:28:11 +0200epolanski(uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2023-06-15 23:28:45 +0200dcoutts_(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 240 seconds)
2023-06-15 23:29:00 +0200 <sm> long story short: we are all over the place
2023-06-15 23:33:54 +0200gentauro(~gentauro@user/gentauro)
2023-06-15 23:36:13 +0200 <talismanick> sm: thank you! I'll be sure to check these out
2023-06-15 23:36:26 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2023-06-15 23:37:27 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-06-15 23:43:45 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 240 seconds)
2023-06-15 23:44:20 +0200talismanick(~user@campus-006-229.ucdavis.edu) (Ping timeout: 240 seconds)
2023-06-15 23:44:58 +0200fendor(~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) (Remote host closed the connection)
2023-06-15 23:48:59 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-06-15 23:49:52 +0200biberu(~biberu@user/biberu)
2023-06-15 23:49:52 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-06-15 23:50:09 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-06-15 23:55:47 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)