Home liberachat/#haskell: Logs Calendar

Logs on 2023-06-15 (liberachat/#haskell)

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

All times are in UTC on 2023-06-15.