Home liberachat/#haskell: Logs Calendar

Logs on 2022-12-23 (liberachat/#haskell)

00:01:37 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
00:02:38 ChaiTRex joins (~ChaiTRex@user/chaitrex)
00:03:21 thegeekinside joins (~thegeekin@189.128.148.159)
00:07:14 v0id_ptr joins (~adrift@user/ptr-frac7al/x-0038398)
00:09:24 × jinsun quits (~jinsun@user/jinsun) (Ping timeout: 255 seconds)
00:10:11 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
00:17:02 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:25:32 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
00:30:05 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 255 seconds)
00:48:16 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:48:16 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:48:16 wroathe joins (~wroathe@user/wroathe)
00:49:06 fizbin joins (~fizbin@user/fizbin)
00:54:33 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
01:00:05 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:05:00 slack1256 joins (~slack1256@186.11.29.60)
01:05:11 thongpv87 joins (~thongpv87@2402:9d80:3c4:ae3b:4b13:46b3:cad7:5da8)
01:09:34 × jargon quits (~jargon@174-22-192-24.phnx.qwest.net) (Remote host closed the connection)
01:10:48 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:12:18 × elevenkb quits (~elevenkb@105.224.37.128) (Ping timeout: 260 seconds)
01:16:29 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
01:16:55 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:17:29 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
01:18:29 bilegeek joins (~bilegeek@2600:1008:b057:74f5:d377:f773:aec0:435a)
01:22:50 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
01:26:41 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:35:33 × bilegeek quits (~bilegeek@2600:1008:b057:74f5:d377:f773:aec0:435a) (Quit: Leaving)
01:35:34 × finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer)
01:37:53 × xff0x quits (~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 246 seconds)
01:47:20 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 246 seconds)
01:52:43 × thongpv87 quits (~thongpv87@2402:9d80:3c4:ae3b:4b13:46b3:cad7:5da8) (Ping timeout: 248 seconds)
01:56:34 thongpv87 joins (~thongpv87@123.31.184.254)
01:57:01 ddellacosta joins (~ddellacos@89.45.224.51)
01:58:38 freeside joins (~mengwong@103.252.202.159)
02:06:00 <ddellacosta> how do I decode a sum type from Dhall into Haskell, like `data Foo = A | B | C`? I don't know if I should be using `constructor` with some kind of decoder argument but it's not obvious what that would be https://hackage.haskell.org/package/dhall-1.31.1/docs/Dhall.html#t:UnionDecoder
02:22:39 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:26:09 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 252 seconds)
02:27:06 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 272 seconds)
02:27:09 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
02:30:36 motherfsck joins (~motherfsc@user/motherfsck)
02:31:39 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 252 seconds)
02:32:58 travv0 joins (sid293381@user/travv0)
02:38:38 razetime joins (~quassel@49.207.230.181)
02:40:56 × cheater quits (~Username@user/cheater) (Quit: Going offline, see ya! (www.adiirc.com))
02:41:32 cheater joins (~Username@user/cheater)
02:52:11 × motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 252 seconds)
03:05:54 morb joins (~morb@pool-72-80-94-112.nycmny.fios.verizon.net)
03:13:02 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 246 seconds)
03:17:23 thongpv joins (~thongpv87@2001:ee0:54a8:aee0:7c8f:cdb6:1db0:5cd9)
03:18:14 × Inst quits (~Inst@2601:6c4:4081:54f0:5c02:2b13:b462:4536) (Read error: Connection reset by peer)
03:19:22 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
03:19:40 × thongpv87 quits (~thongpv87@123.31.184.254) (Ping timeout: 272 seconds)
03:27:36 × td_ quits (~td@83.135.9.52) (Ping timeout: 268 seconds)
03:28:49 td_ joins (~td@83.135.9.52)
03:38:42 × bjourne quits (~bjorn@94.191.153.229) (Read error: Connection reset by peer)
03:44:56 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Ping timeout: 246 seconds)
03:50:20 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
03:52:26 <sm> would anyone have an example of using megaparsec's dbg ? I cannot figure it out
03:54:31 <sm> seems simplel enough >:(
03:56:00 <sm> oh well, moving on
04:03:22 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
04:04:12 <sm> I get the impression dbg in megaparsec 9.2.2 works only for ParsecT parsers. Mine have StateT on top of that. And dbg in megaparsec 9.3 might be more flexible.
04:09:04 × ddellacosta quits (~ddellacos@89.45.224.51) (Ping timeout: 272 seconds)
04:09:10 <sm> how does any of this code work when I understand so little..
04:09:30 mbuf joins (~Shakthi@49.204.130.4)
04:12:23 <sm> yes! dbg from megaparsec 9.3 just worked. \o/
04:15:27 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
04:16:18 <iqubic> What is dbg?
04:16:53 <iqubic> Oh, it's like traceShowId, but for Megaparec Parsers
04:17:01 <iqubic> :t traceShowId
04:17:02 <lambdabot> error: Variable not in scope: traceShowId
04:17:20 freeside joins (~mengwong@103.252.202.159)
04:17:42 <iqubic> Wait... actually it's just trace
04:17:46 <iqubic> :t trace
04:17:47 <lambdabot> error: Variable not in scope: trace
04:18:02 × morb quits (~morb@pool-72-80-94-112.nycmny.fios.verizon.net) (Remote host closed the connection)
04:18:02 <iqubic> @import Debug.Trace
04:18:02 <lambdabot> Unknown command, try @list
04:18:20 <sm> it gives output like this. Better than the home-grown one I used to use. Great!... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/2a034e4c39f94bb40df5277422581bddd5d2ac9a>)
04:18:40 <iqubic> sm: I think dbg is sorta like trace from Debug.Trace: https://hackage.haskell.org/package/base-4.17.0.0/docs/Debug-Trace.html#v:trace
04:19:12 <iqubic> Oh, that's even better
04:19:16 <sm> it uses trace, but shows useful parser-related info without having to figure that out yourself. A must have for debugging parsers
04:19:28 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
04:19:28 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
04:19:28 wroathe joins (~wroathe@user/wroathe)
04:20:32 <iqubic> I've not seen a need to use it myself.
04:21:18 <iqubic> I tend to just use errorBundlePretty to get Megaparsec errors printed in a nice way.
04:22:19 <iqubic> https://hackage.haskell.org/package/megaparsec-9.3.0/docs/Text-Megaparsec.html#v:runParser
04:23:11 <iqubic> That gives me either an complex error type, or something of type a. I then use errorBundlePretty to pretty print the error message.
04:24:13 <sm> sometimes you need to see intermediate state, not just the final error
04:28:22 <iqubic> I've never needed to see the intermediate state. But I can imagine with more complicated parsers that can be useful.
04:32:21 × beefbambi quits (~beefbambi@183.82.204.74) (Ping timeout: 268 seconds)
04:32:36 Sciencentistguy5 joins (~sciencent@hacksoc/ordinary-member)
04:34:13 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
04:34:29 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 260 seconds)
04:34:29 Sciencentistguy5 is now known as Sciencentistguy
04:35:19 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Remote host closed the connection)
04:37:10 beefbambi joins (~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
04:44:56 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
04:47:34 quazimodo joins (~quazimodo@122-199-39-221.ip4.superloop.com)
04:56:01 <sm> yeah it just saved me here where I couldn't figure out what was happening. dbg + emacs coloured highlighting of key parts ftw
04:57:19 sm uploaded an image: (96KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/SDBAoBibDYbYCoyZnyVfjvXp/Screen%20Shot%202022-12-22%20at%2018.57.05.png >
04:58:00 <sm> that second last MATCH was consuming a ( needed by the next parser, until I added a try
05:03:15 × use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Quit: use-value)
05:11:42 L29Ah joins (~L29Ah@wikipedia/L29Ah)
05:17:35 × thegeekinside quits (~thegeekin@189.128.148.159) (Ping timeout: 264 seconds)
05:24:58 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
05:25:10 × mbuf quits (~Shakthi@49.204.130.4) (Remote host closed the connection)
05:25:36 mbuf joins (~Shakthi@49.204.130.4)
05:33:09 Kaiepi joins (~Kaiepi@108.175.84.104)
05:57:44 × poscat quits (~poscat@2408:8206:4823:14c6:2d43:62ac:d2b8:b823) (Quit: Bye)
05:58:03 poscat joins (~poscat@114.245.108.192)
06:05:09 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
06:13:44 trev joins (~trev@user/trev)
06:27:08 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
06:32:41 × johnw quits (~johnw@2600:1700:cf00:db0:3017:1dda:5aaf:2264) (Quit: ZNC - http://znc.in)
06:33:27 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:33:35 <iqubic> @pl \f -> f x y
06:33:35 <lambdabot> flip ($ x) y
06:33:39 <iqubic> Eww...
06:37:04 <c_wraith> that makes sense. And I'd never use it
06:41:03 freeside joins (~mengwong@103.252.202.159)
06:42:34 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
06:45:42 <int-e> ($ y) . ($ x) would be more systematic
06:47:27 <int-e> But I'd use (\f -> f x y) too
06:48:20 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 246 seconds)
06:51:06 jinsun joins (~jinsun@user/jinsun)
06:59:25 cheater_ joins (~Username@user/cheater)
07:01:29 cheater__ joins (~Username@user/cheater)
07:01:35 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
07:01:44 cheater__ is now known as cheater
07:03:28 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Read error: Connection reset by peer)
07:03:44 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
07:05:08 × cheater_ quits (~Username@user/cheater) (Ping timeout: 272 seconds)
07:07:39 <iqubic> int-e: The code I just wrote contains a line of the form "map (\f -> f x y) xs"
07:08:55 <int-e> iqubic: mine has `... >>= \f -> f x y`
07:09:18 Inst joins (~Inst@2601:6c4:4081:54f0:c13a:1faa:a088:6fcb)
07:09:23 <iqubic> Isn't that essentially the same thing?
07:09:23 <Inst> do I understand hylomorphisms?
07:09:27 <Inst> oh, sorry, i'll wait
07:09:45 <iqubic> Inst: Please ask your questions now. No need to wait.
07:09:51 <int-e> iqubic: yes, that's the point. (but >>= instead of map is a tiny difference)
07:10:16 <iqubic> Yeah, (>>=) = concatMap for lists.
07:10:23 <Inst> I'm addicted to accumulating parameters, not sure if others are aware of that
07:10:44 <int-e> iqubic: The real point was, I think I know what your code is for, given the timing, mainly.
07:11:01 <Inst> shouldn't it be flip (>>=) => concatMap?
07:11:02 <iqubic> My code is for Advent of Code, yes.
07:11:18 <int-e> Inst: yep
07:11:31 <Inst> but, i'm abotu to benchmark it properly via criterion
07:11:42 <int-e> I actually had to go back and check that I didn't use a list comprehension :-P
07:11:46 <Inst> it seems that hylomorphisms are faster than accumulating parameters?
07:12:03 <iqubic> int-e: What you might not know is that I actually have a value of type [Set (Int, Int) -> (Int, Int) -> Maybe Int]
07:12:24 <iqubic> And no, it's not the trivial empty listt.
07:12:35 <c_wraith> Inst: they're just not even the same thing. If you're using both to solve a problem, you're using different algorithms. That's the difference you're measuring.
07:12:50 <Inst> are they not?
07:12:56 <Inst> https://reasonablypolymorphic.com/blog/recursion-schemes/
07:13:25 <Inst> i rewrote using foldl', got a 150% speed-up on GHCI
07:13:38 <c_wraith> well, don't benchmark anything in ghci
07:14:16 <iqubic> Yeah. Compiling the code allows you to get better benchmark results.
07:16:16 <Inst> my hylo is about 1% faster than my accumulating parameter version in GHCI, but then again, this is crap, because I'm fixing to int
07:17:19 <iqubic> It's also a test being done in GHCI, which will inherently give worse results
07:17:31 freeside joins (~mengwong@103.252.202.159)
07:18:04 <Inst> erm, not GHCI, criterion
07:18:11 <Inst> criterion finally compiled
07:19:09 <Inst> huh, forget it
07:19:23 <Inst> when i swap out to integer, the fastest factorial i have is the iterate version
07:19:58 <Inst> i'm just looking for a general purpose replacement for accumulating parameter code i use; I know when foldl' / foldr can be used for other simple recursions
07:22:08 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
07:22:33 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
07:25:45 <Inst> about 15% faster, but iterate wins out if i change types from int to integer, i wonder why
07:26:56 freeside joins (~mengwong@103.252.202.159)
07:28:54 <int-e> iqubic: same here :)
07:29:48 <int-e> iqubic: actually, no. the arguments are the same; the result is [(Int,Int)]
07:31:10 <iqubic> Also, technically it's a V2 Int, instead of an (Int, Int), but it's mostly the same here.
07:31:28 <iqubic> https://hackage.haskell.org/package/linear-1.22/docs/Linear-V2.html
07:32:06 <iqubic> V2 has some helpful numerical instances like (Num a) => Num (V2 a) which do pairwise operations
07:32:52 <int-e> Makes sense.
07:34:43 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:40:16 <Inst> c_wraith: why aren't they the same thing? shouldn't unfoldr / foldl' result in code that's equivalent to a for loop via list fusion?
07:40:33 <Inst> and shouldn't accumulating parameter, via TCO, result in a for loop as well?
07:41:25 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:42:28 Invariance joins (~Invarianc@ppp1093.dsl.ontario.net)
07:45:31 × Invariance quits (~Invarianc@ppp1093.dsl.ontario.net) (Client Quit)
07:58:20 MajorBiscuit joins (~MajorBisc@31-23-159.netrun.cytanet.com.cy)
08:00:18 <int-e> Inst: ghci essentially doesn't optimize... there's no fusion (since that's usually based on rewrite rules and heavy inlining). TCO should still work most of the time.
08:00:28 <Inst> i'm doing it via criterion now
08:00:47 <Inst> and i'm pissed, because i feel like, i must have screwed up somewhere, but the iterate solution is massively beating everything else
08:01:23 <Inst> ugh, sigh
08:01:47 <Inst> i want to quit my accumulating parameter habit, iterate is almost worse, because iterate uses a partial function to make it work
08:02:48 <Inst> my goto when i don't know how to solve anything is to get an accumulating parameter, which is basically just getting a for loop, and this is in haskell
08:03:01 <int-e> Well iterate is usually quite good, thanks to build/foldr fusion.
08:03:26 <Inst> iterate is technically a hylomorphism, isn't it?
08:04:11 <Inst> it's a very specific fold; i think, but tbh it should be possible to implement (!!) via foldr, no?
08:05:01 <int-e> It's a specific unfold, so an anamorphism. You need a subsequent fold (catamorphism) to make a hylomorphism.
08:05:13 <Inst> and (!!) counts?
08:06:03 <Inst> i guess when i say iterate, i mean the (iterate (nextIteration) seed !!) pattern
08:06:56 <int-e> > foldr (\x f n -> if n == 0 then x else f (n-1)) undefined "abcdef" 3
08:06:58 <lambdabot> 'd'
08:07:29 thongpv87 joins (~thongpv87@2402:9d80:3c4:ae3b:5372:83e0:6f97:a164)
08:08:08 <int-e> Oh that's essentially the implementation in GHC.List.
08:09:34 × quazimodo quits (~quazimodo@122-199-39-221.ip4.superloop.com) (Remote host closed the connection)
08:09:36 <int-e> So anyway, yes, it's a `foldr`.
08:10:19 × thongpv quits (~thongpv87@2001:ee0:54a8:aee0:7c8f:cdb6:1db0:5cd9) (Ping timeout: 248 seconds)
08:10:28 <Inst> at least i have the fig leaf of a recursion scheme over iterate
08:11:05 <int-e> So build/foldr fusion will turn `iterate f x !! g` into code that uses an accumulator; no point in doing that manually.
08:11:53 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Remote host closed the connection)
08:12:41 <Inst> i think, when i'm benchmarking under criterion, if i let float my accum parameter, it's still the fastest of all my facs
08:12:44 <Inst> i can send you the pastebin
08:13:23 <Inst> https://pastebin.com/UKHpt5Y0
08:14:41 <Inst> when it's all int, accumulating parameter benches best, without the let float, hylomorphism benches better, when it's in integer, only thing that's actually fast is the iterate version
08:17:01 <int-e> try this silly thing... http://paste.debian.net/1265028/
08:17:37 <int-e> Unless your arguments are tiny, with Integer you're spending most of the time multiplying numbers.
08:17:42 <int-e> arg, I messed up
08:18:05 <int-e> http://paste.debian.net/1265029/ is what I wanted
08:18:38 <int-e> (this is still not the best way to compute large factorials... for that, you should count prime factors)
08:19:45 <Inst> tbh, it's just benchmarking to get an idea of how algorithms and approaches behave in Haskell
08:19:57 <int-e> Inst: and on the non-silly front, have you tried product [1..n] ?
08:19:59 <Inst> i probably should go into some willy nilly phase wherein i want to foldl' or foldr everything
08:21:18 <Inst> benchmarking that now
08:22:05 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
08:22:32 <int-e> anyway, I wouldn't be able to say without benchmarking whether fac, fac''', or fac'''' are significantly different; they all have a chance to produce essentially the same accumulating code. Though fac''' may end up maintaining two counters so that may suffer.
08:23:12 <int-e> fac' and fac'' should be inferior.
08:23:26 <int-e> (and about equal to each other)
08:24:15 <Inst> this for me, at least, is the consummate weirdness
08:24:21 <int-e> (because after inlining `fix` and desugaring the case analysis of `fac'`, they're really the same thing)
08:24:23 <Inst> https://media.discordapp.net/attachments/968989726633779215/1055762707296559135/image.png
08:25:04 <Inst> ,bgroup "someCrap" [bench "iterate" $ nf fac''' 100_000]
08:27:23 johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
08:28:27 cheater_ joins (~Username@user/cheater)
08:28:28 <int-e> Is that for Integer? I think it's more meaningful to do all this with `Int` rather than with code that deals with 100ks of digits.
08:30:10 <int-e> (There'll be *a lot* of garbage and it's quite conceivable that different versions of the code spend different proportions of their time in the garbage collector.)
08:30:43 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
08:30:52 cheater_ is now known as cheater
08:33:52 × Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
08:34:54 Xeroine joins (~Xeroine@user/xeroine)
08:35:55 × thongpv87 quits (~thongpv87@2402:9d80:3c4:ae3b:5372:83e0:6f97:a164) (Ping timeout: 248 seconds)
08:38:16 Midjak joins (~Midjak@82.66.147.146)
08:43:32 <Inst> yeah, that's for integer
08:44:39 <Inst> with int, you have the problem that you start getting overflows too quickly, though
08:44:48 <Inst> only 30 iirc, gets you an overflow
08:44:50 thongpv87 joins (~thongpv87@2402:9d80:346:901d:874b:931b:303e:63a1)
08:44:54 <int-e> Doesn't matter; the compiler doesn't know.
08:45:23 <int-e> You could compute triangular numbers instead.
08:45:42 <int-e> > product [1..128] :: Int
08:45:43 <lambdabot> 0
08:46:37 <Inst> 20 is the max you get before you start overflowing
08:47:00 <int-e> you still get meaningful performance measurements though
08:47:10 <Inst> ummm, n^2 - 1?
08:47:21 <Inst> wait, that's not the pattern
08:47:27 <Inst> (n-1)^2 + 1
08:47:41 <Inst> welp, still wrong
08:47:49 <int-e> If you actually want to compute factorials for n > 200, none of those implementations is
08:47:57 <Inst> (n^2 + n) / 2
08:47:58 <int-e> > sum [1..100]
08:47:59 <lambdabot> 5050
08:48:11 <int-e> > product [1..100]
08:48:12 <lambdabot> 9332621544394415268169923885626670049071596826438162146859296389521759999322...
08:48:20 <Jadesheit[m]> > zip [1..] [product [1..n] :: Int | n <- [1..100]]
08:48:21 <lambdabot> [(1,1),(2,2),(3,6),(4,24),(5,120),(6,720),(7,5040),(8,40320),(9,362880),(10,...
08:48:27 <int-e> it's the same recursive pattern with addition instead of multiplication
08:48:57 <int-e> > scanl (*) 1 [1..] !! 10
08:48:59 <lambdabot> 3628800
08:49:09 × thongpv87 quits (~thongpv87@2402:9d80:346:901d:874b:931b:303e:63a1) (Ping timeout: 256 seconds)
08:51:18 <Jadesheit[m]> > filter (== 0) $ zip [1..] (scanl (*) 1 [1..100])
08:51:20 <lambdabot> error:
08:51:20 <lambdabot> • No instance for (Num (Integer, Integer))
08:51:20 <lambdabot> arising from a use of ‘e_10111100’
08:51:42 <int-e> Inst: http://paste.debian.net/1265029/ is a decent (but not great) implementation of factorials for integers... it'll be much faster for 100,000! than what you have.
08:51:50 <Jadesheit[m]> * 1 [1..100] :: [Int])
08:51:56 <int-e> (same paste as earlier)
08:53:12 thongpv87 joins (~thongpv87@2402:9d80:346:901d:126:7968:86ee:f4cf)
08:54:47 <Inst> testing now
08:56:30 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
08:57:05 <Inst> see, i get the feeling the iterate is broken
08:57:21 <Inst> it's still faster than your version, which, admittedly, is MUUUCH faster than all the other versions
08:57:38 <Inst> 45.66 ms vs 1 second vs 1 ms
08:57:52 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
08:59:20 <Jadesheit[m]> Where's the git repo for lambdabot:
09:00:03 × Player-205[m] quits (~sashaserp@2001:470:69fc:105::2:30b8) (Quit: You have been kicked for being idle)
09:00:04 × AdamConner-Sax[m quits (~adamcsmat@2001:470:69fc:105::1:e2c8) (Quit: You have been kicked for being idle)
09:00:08 × yl53[m] quits (~yl53matri@2001:470:69fc:105::85b) (Quit: You have been kicked for being idle)
09:00:36 freeside joins (~mengwong@103.252.202.159)
09:00:52 <mauke> @where lambdabot
09:00:52 <lambdabot> http://haskell.org/haskellwiki/Lambdabot
09:01:21 vpan joins (~0@212.117.1.172)
09:02:28 <mauke> @where+ lambdabot https://hackage.haskell.org/package/lambdabot https://github.com/lambdabot/lambdabot
09:02:28 <lambdabot> I will remember.
09:02:29 <Jadesheit[m]> thank you
09:02:36 <mauke> the wiki is out of date
09:05:51 <Inst> in general, though, is an imperative algorithm just a hylomorphism?
09:05:57 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
09:06:27 <Inst> or rather, can a for loop be categorized as a hylomorphism?
09:07:30 <Inst> tbh, no, i'm wrong, it's a traversal
09:09:11 <Inst> nah, i'm still probably wrong, traversals are the essence of the iterator pattern
09:09:13 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:12:23 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
09:16:20 × arahael quits (~arahael@193-119-109-208.tpgi.com.au) (Ping timeout: 246 seconds)
09:16:41 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 246 seconds)
09:23:00 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:23:15 arahael joins (~arahael@193-119-109-208.tpgi.com.au)
09:25:34 × bollu quits (~bollu@159.65.151.13) (Ping timeout: 260 seconds)
09:26:32 freeside joins (~mengwong@103.252.202.159)
09:27:17 × thongpv87 quits (~thongpv87@2402:9d80:346:901d:126:7968:86ee:f4cf) (Remote host closed the connection)
09:27:36 thongpv87 joins (~thongpv87@2402:9d80:346:901d:bbbb:324b:8132:73e8)
09:33:19 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
09:36:29 × arahael quits (~arahael@193-119-109-208.tpgi.com.au) (Read error: Connection reset by peer)
09:43:03 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
09:45:15 × Midjak quits (~Midjak@82.66.147.146) (Quit: Leaving)
09:54:08 × cheater quits (~Username@user/cheater) (Quit: Going offline, see ya! (www.adiirc.com))
09:54:28 cheater joins (~Username@user/cheater)
09:56:34 × Inst quits (~Inst@2601:6c4:4081:54f0:c13a:1faa:a088:6fcb) (Ping timeout: 252 seconds)
10:01:15 arahael joins (~arahael@193-119-109-208.tpgi.com.au)
10:01:36 __monty__ joins (~toonn@user/toonn)
10:01:56 mc47 joins (~mc47@xmonad/TheMC47)
10:07:49 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
10:08:30 azimut joins (~azimut@gateway/tor-sasl/azimut)
10:11:58 × tabaqui quits (~root@88.231.57.48) (Ping timeout: 272 seconds)
10:12:29 Lycurgus joins (~juan@user/Lycurgus)
10:18:03 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
10:18:13 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
10:19:41 × raym quits (~ray@user/raym) (Quit: server reboot)
10:20:12 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 272 seconds)
10:20:13 fserucas joins (~fserucas@a85-138-107-42.cpe.netcabo.pt)
10:25:16 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 272 seconds)
10:25:49 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
10:26:04 `2jt joins (~jtomas@84.red-88-17-186.dynamicip.rima-tde.net)
10:26:12 akegalj joins (~akegalj@93-136-77-137.adsl.net.t-com.hr)
10:27:22 × shapr quits (~user@68.54.166.125) (Ping timeout: 252 seconds)
10:27:45 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:28:13 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
10:30:35 Lord_of_Life_ is now known as Lord_of_Life
10:30:46 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
10:35:19 × thongpv87 quits (~thongpv87@2402:9d80:346:901d:bbbb:324b:8132:73e8) (Ping timeout: 260 seconds)
10:36:15 <cheater> [exa] hi
10:36:57 <Jadesheit[m]> hello
10:37:27 <Jadesheit[m]> https://en.wikipedia.org/wiki/Haskell,_Texas
10:43:27 <Hecate> indeed
10:43:28 × Vajb quits (~Vajb@2001:999:250:c9:8588:6e93:7809:7816) (Read error: Connection reset by peer)
10:44:03 × akegalj quits (~akegalj@93-136-77-137.adsl.net.t-com.hr) (Quit: leaving)
10:44:43 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
10:50:54 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
10:50:59 unit73e joins (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
10:51:25 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
10:53:15 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
10:53:53 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
10:55:00 kenaryn joins (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr)
10:56:00 CiaoSen joins (~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
10:58:27 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
10:59:22 × zer0bitz quits (~zer0bitz@196.244.192.57) (Read error: Connection reset by peer)
10:59:41 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
11:05:02 <kjlid[m]> How do I indicate a failure when parsing an optparse-applicative option?
11:07:01 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
11:08:43 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
11:09:12 <Hecate> kjlid[m]: abortOption perhaps?
11:09:43 <Hecate> or return a manual https://hackage.haskell.org/package/optparse-applicative-0.17.0.0/docs/Options-Applicative.html#t:ParserInfo
11:15:20 × arahael quits (~arahael@193-119-109-208.tpgi.com.au) (Ping timeout: 246 seconds)
11:16:27 xff0x joins (~xff0x@ai071162.d.east.v6connect.net)
11:19:39 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
11:20:21 <kjlid[m]> I wonder if I'm using the wrong type. According to the documentation: "Options: options with an argument. An option can define a reader, which converts its argument from String to the desired value, or throws a parse error if the argument does not validate correctly"
11:21:08 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
11:22:09 <kjlid[m]> I'm not sure I'm using a reader
11:23:30 Kaiepi joins (~Kaiepi@108.175.84.104)
11:23:32 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 272 seconds)
11:24:01 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
11:24:06 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
11:25:52 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
11:28:44 L29Ah joins (~L29Ah@wikipedia/L29Ah)
11:33:15 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
11:36:45 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds)
11:38:36 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
11:39:20 bjourne joins (~bjorn@94.191.152.226)
11:39:46 <kjlid[m]> Yeah I think I solved it with an eitherReader
11:39:54 <mniip> kjlid[m], a reader in the common sense, not the "reader monad"
11:42:16 <kjlid[m]> well yeah
11:42:23 × bjourne quits (~bjorn@94.191.152.226) (Client Quit)
11:43:59 zer0bitz joins (~zer0bitz@196.244.192.61)
11:45:08 raym joins (~ray@user/raym)
11:46:08 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
11:50:46 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
11:52:02 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
11:55:54 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
11:58:31 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
12:00:23 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
12:02:24 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
12:03:49 freeside joins (~mengwong@101.100.175.180)
12:05:48 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.7.1)
12:07:27 akegalj joins (~akegalj@141-136-145-147.dsl.iskon.hr)
12:08:11 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 248 seconds)
12:14:14 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
12:15:57 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
12:20:08 thongpv87 joins (~thongpv87@2402:9d80:34e:5a49:8993:bc07:c810:9d83)
12:24:53 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
12:26:21 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
12:28:24 fizbin joins (~fizbin@user/fizbin)
12:31:12 freeside joins (~mengwong@101.100.175.180)
12:31:18 jakalx parts (~jakalx@base.jakalx.net) ()
12:32:20 × phma quits (~phma@host-67-44-208-203.hnremote.net) (Read error: Connection reset by peer)
12:33:14 phma joins (phma@2001:5b0:210d:bff8:d3d6:20cf:c049:77a5)
12:33:19 × CiaoSen quits (~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
12:36:05 × kenaryn quits (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving)
12:36:11 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 264 seconds)
12:36:56 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
12:39:20 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 246 seconds)
12:39:32 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:43:45 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
12:44:30 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
12:45:53 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
12:46:10 jakalx joins (~jakalx@base.jakalx.net)
12:48:15 <unit73e> now that I think about, didn't Rust also try to copy Haskell, but poorly?
12:48:54 <stefan-_> xml-conduit's Text.XML.Cursor does not have very good error handling, it just returns an empty result if for example an attribute is missing, is there a better way to parse xml which also produces human-readable errors?
12:52:04 <unit73e> stefan-_, what I usually do is search on hackage: https://hackage.haskell.org/packages/search?terms=xml
12:52:06 <unit73e> and just pick one
12:52:26 <unit73e> there's haxpat and haxml
12:52:26 <c_wraith> what sort of errors? malformed xml? failed schema validation? Some sort of additional semantic layer?
12:52:50 <unit73e> but yeah it seems a rather popular package to have those kinds of problems
12:53:44 <stefan-_> c_wraith, if for example an attribute is queried for, then the processing should fail with an error message "missing attribute"
12:54:04 <stefan-_> malformed xml would also be nice, I guess most xml libraries do this already
12:54:06 <c_wraith> that doesn't sound like any kind of xml error condition I'm aware of
12:54:12 <stefan-_> for schema there is no need
12:54:34 dextaa4 joins (~DV@user/dextaa)
12:54:59 <unit73e> an attribute doesn't necessarily have to exist to be queried, it can just return nothing
12:55:12 <unit73e> *to be queried, and fail
12:55:56 <stefan-_> correction: "if for example an attribute which is queried for is missing"
12:56:43 × dextaa quits (~DV@user/dextaa) (Ping timeout: 260 seconds)
12:56:44 dextaa4 is now known as dextaa
12:57:29 <unit73e> stefan-_, so be clear, you're calling 'attribute :: Name -> Cursor' and returns []?
12:58:15 <unit73e> but you want that function to fail if the attribute doesn't exist?
12:58:17 <stefan-_> correct, attribute :: Name -> Cursor -> [T.Text] returns an empty list
12:58:21 <stefan-_> yep :)
13:00:20 freeside joins (~mengwong@101.100.175.180)
13:00:53 <c_wraith> I don't see how else it could possibly indicate that there are zero matching attributes...
13:02:43 <stefan-_> c_wraith, with this I need to do the error handling manually, I thought there would be an existing monad-like parser
13:03:47 <Rembane> You could see empty list as failure if you squint. A `[a]` is in some ways a much more powerful `Maybe a` where Nothing is empty list and `Just a` is a list with one element.
13:04:16 <unit73e> so attribute returns all attributes that exist, and [] if there's none. Looks okay to me. yeah [] means it doesn't have any.
13:04:28 <unit73e> why not check with that?
13:04:33 <c_wraith> like, that's *not* an error condition
13:04:40 <c_wraith> that's why there's no error logic involved
13:04:48 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 268 seconds)
13:05:15 <unit73e> agreed, I'd use the same library if I'm used to it. not that there's anything wrong with others like haxml or whatever
13:05:28 <unit73e> and just figure out with code what to do
13:05:32 <unit73e> or want to do
13:06:57 <unit73e> also there's check and other functions that.. check.. conditions
13:08:35 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
13:10:25 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
13:10:56 cheater joins (~Username@user/cheater)
13:11:58 <stefan-_> so, that basically means "roll your own error-handling"?
13:12:44 Guest17 joins (~Guest17@194.42.11.29)
13:13:03 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:13:19 <unit73e> yeah because failing because an attribute doesn't exist is not really that common
13:14:07 <unit73e> that's more like, logic you want in your application
13:14:07 × Guest17 quits (~Guest17@194.42.11.29) (Client Quit)
13:15:59 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
13:16:27 <unit73e> you can easily roll out your own Exception or Either, pick your poison, and make it all monadic
13:16:48 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 260 seconds)
13:18:34 <stefan-_> ok, thanks
13:18:49 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
13:19:25 <stefan-_> then one more question, say I have this name: "Martín Abadi", having this as Text and printing it out shows: "Mart\237n Abadi"
13:19:43 <stefan-_> is that the common behaviour for Text with non-ascii characters?
13:20:17 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 252 seconds)
13:20:25 <stefan-_> unpacking as String and printing it shows: "Martín Abadi"
13:20:47 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
13:24:26 freeside joins (~mengwong@101.100.175.180)
13:25:11 <unit73e> statusbot, you should use Data.Text.IO.putStrLn or Text.Printf if you need it
13:25:37 <unit73e> lol wrong person
13:25:41 <unit73e> stefan-_, see above
13:27:55 <stefan-_> coolio, thanks
13:28:08 <stefan-_> am I right that this is a "feature" of the Show instance for Text?
13:28:43 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 248 seconds)
13:29:22 <unit73e> it's sort of a feature. the thing is Text can have multiple encodings, so it will show unicode with Show
13:29:50 <unit73e> I think utf-8 is the default afaik
13:31:00 <unit73e> so basically what matter is Show is showing unicode because that's what Text actually stores
13:31:16 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
13:32:31 Guest323 joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
13:32:46 <__monty__> I think Data.Text uses UTF-16 internally.
13:34:36 <__monty__> I think the Show instance uses escape codes because that's more reliable. Show isn't for rendering pretty things, it's to give a String representation of a value that can (usually) be parsed back into the value by passing it to the corresponding `read`.
13:35:07 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds)
13:35:08 <__monty__> String is just as "unicode" as Text is BTW, it's not restricted to ASCII.
13:36:20 <stefan-_> ok, makes sense, thanks for the explanations
13:36:27 fizbin joins (~fizbin@user/fizbin)
13:36:53 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
13:41:43 <geekosaur> Text 2.x is UTF-8 internally
13:42:22 × acarrico quits (~acarrico@dhcp-68-142-49-34.greenmountainaccess.net) (Quit: Leaving.)
13:43:02 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 268 seconds)
13:43:23 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 246 seconds)
13:44:51 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
13:44:54 Kaiepi joins (~Kaiepi@108.175.84.104)
13:47:28 Reinhilde is now known as MelMalik
13:48:04 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
13:49:31 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
13:49:58 × AlexNoo quits (~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
13:50:21 AlexNoo joins (~AlexNoo@94.233.241.57)
13:50:37 coot joins (~coot@213.134.171.3)
13:52:59 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
13:54:00 × AlexNoo quits (~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
13:55:44 freeside joins (~mengwong@101.100.175.180)
13:57:24 gurkenglas joins (~gurkengla@84.138.199.46)
13:57:24 × AlexZenon quits (~alzenon@94.233.241.57) (Ping timeout: 265 seconds)
13:57:31 × Alex_test quits (~al_test@94.233.241.57) (Ping timeout: 248 seconds)
13:57:59 <mauke> > "Martín Abadi"
13:58:01 <lambdabot> "Mart\237n Abadi"
13:58:27 <mauke> also the Show instance for String
13:58:36 <unit73e> looks like it
13:58:54 <unit73e> yeah tested in ghci, same result
13:59:17 <unit73e> so it's always unicode
14:00:06 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 255 seconds)
14:03:33 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 252 seconds)
14:06:19 CiaoSen joins (~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
14:08:58 <__monty__> geekosaur: Thanks!
14:09:06 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 255 seconds)
14:09:39 <geekosaur> > text "Martín Abadi" -- hack for lambdabot
14:09:41 <lambdabot> Martín Abadi
14:10:16 <Jadesheit[m]> @src (<*>)
14:10:17 <lambdabot> Source not found. Abort, Retry, Panic?
14:10:21 freeside joins (~mengwong@101.100.175.180)
14:10:21 <geekosaur> the prettyprinting lib lambdabot has loaded has a Show instance of id for String. (I don't think it supports Text.)
14:10:56 <geekosaur> actually for Doc, which `text` converts String into
14:11:04 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
14:11:16 <geekosaur> and the @src database predates Applicative so none of those are in it
14:12:03 <geekosaur> it's not actually looking up the source, it's dumping from a small database mostly populated from the Haskell 98 Report
14:12:23 thegeekinside joins (~thegeekin@189.128.148.159)
14:13:09 <[itchyjunk]> Woha, I am reading an article on "Promises" in js and apparently, Haskell order of operation is already like this ( idk what "this" mean but let me vaguely point to the univers)
14:13:50 <__monty__> [itchyjunk]: The "this" is probably referring to call-by-need semantics?
14:14:10 <mauke> yes, <- (in a do block) is a lot like await (in an async function)
14:14:26 <mauke> and >>= correspinds to .then()
14:14:32 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 272 seconds)
14:14:49 <[itchyjunk]> hmm, something like that. http://robotlolita.me/2015/11/15/how-do-promises-work.html
14:15:06 <[itchyjunk]> :o
14:17:15 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
14:18:08 <mauke> ah, that's about laziness in general
14:18:33 jakalx joins (~jakalx@base.jakalx.net)
14:18:45 Kaipei joins (~Kaiepi@108.175.84.104)
14:21:02 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
14:21:54 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
14:22:05 × slack1256 quits (~slack1256@186.11.29.60) (Remote host closed the connection)
14:22:13 AlexNoo joins (~AlexNoo@178.34.150.54)
14:23:03 AlexZenon joins (~alzenon@178.34.150.54)
14:23:31 Alex_test joins (~al_test@178.34.150.54)
14:27:12 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
14:27:52 <Jadesheit[m]> How is the list monad instance defined using list comprehension?
14:28:10 <Jadesheit[m]> Does it not desugar to itself?
14:28:36 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
14:28:53 Kaiepi joins (~Kaiepi@108.175.84.104)
14:29:01 <geekosaur> list coomprehensions actually desugar to regular functions, unless MonadComprehensions is enabled in the source file
14:29:29 × Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
14:30:01 <mauke> @undo [ f x | x <- xs, p x ]
14:30:01 <lambdabot> concatMap (\ x -> if p x then [f x] else []) xs
14:30:20 bunnyhamer joins (~bunnyhame@2a10:8012:21:46dc:6456:24ad:beee:35aa)
14:30:28 <Jadesheit[m]> geekosaur: how would `[y | x <- xs, y <- f x]` desugar then?
14:30:36 <Jadesheit[m]> oh
14:30:39 <Jadesheit[m]> @undo [y | x <- xs, y <- f x]
14:30:39 <lambdabot> concatMap (\ x -> concatMap (\ y -> [y]) (f x)) xs
14:31:59 <Jadesheit[m]> Why is the monad instance for `[]` not `(>>=) = concatMap`
14:32:28 <geekosaur> :t concatMap
14:32:29 <lambdabot> Foldable t => (a -> [b]) -> t a -> [b]
14:32:52 <geekosaur> it's reversed. concatMap is actually =<< iirc
14:33:20 <Rembane> :t (=<<)
14:33:21 <lambdabot> Monad m => (a -> m b) -> m a -> m b
14:33:39 Rembane squints
14:33:39 <Rembane> Yup
14:34:33 <Jadesheit[m]> ah yeah
14:34:48 <Jadesheit[m]> `(>>=) = flip concatMap`
14:35:12 <Jadesheit[m]> wait no it's not
14:35:23 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
14:35:40 manj-gnome joins (~manjaro-g@85.195.196.52)
14:36:04 × Guest323 quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds)
14:36:56 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
14:38:05 <Rembane> Jadesheit[m]: I like that definition: https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.Base.html#%3D%3C%3C
14:41:23 <mauke> Jadesheit[m]: https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.Base.html#line-315
14:42:17 <Rembane> TIL! Sweet!
14:50:00 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 272 seconds)
14:53:09 motherfsck joins (~motherfsc@user/motherfsck)
14:59:23 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
14:59:57 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:00:39 themc47 joins (~mc47@xmonad/TheMC47)
15:00:44 <unit73e> Yesterday I had did an interview with a Junior for a Java+React position, but I asked what a Monad was just as a joke, but joke's on me because he was able to explain what a monad is. we're getting somewhere.
15:01:34 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:01:45 <unit73e> no he didn't open a browser to see, he explained some functions and laws
15:02:10 × mc47 quits (~mc47@xmonad/TheMC47) (Read error: Connection reset by peer)
15:03:54 <Jadesheit[m]> very nice
15:04:33 <Rembane> unit73e: Awesome!
15:04:34 <Jadesheit[m]> so many people now start saying "A monad is a monoid in the category of endofunctors" when I talk about monads on a java server
15:04:36 <Jadesheit[m]> because of the meme
15:04:42 <Rembane> Good meme
15:06:47 <Jadesheit[m]> indeed
15:06:54 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
15:08:21 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:08:52 shriekingnoise joins (~shrieking@186.137.167.202)
15:10:59 × Sauvin quits (~sauvin@user/Sauvin) (Remote host closed the connection)
15:11:21 Sauvin joins (~sauvin@user/Sauvin)
15:13:35 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
15:14:24 mikoto-chan joins (~mikoto-ch@85-76-3-8-nat.elisa-mobile.fi)
15:14:39 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:16:43 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:17:38 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
15:17:51 freeside joins (~mengwong@101.100.175.180)
15:19:39 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
15:21:21 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:22:20 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 260 seconds)
15:22:34 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 260 seconds)
15:22:47 igghibu joins (~igghibu@178.249.211.100)
15:23:15 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
15:26:55 × igghibu quits (~igghibu@178.249.211.100) (Client Quit)
15:27:35 igghibu joins (~igghibu@178.249.211.100)
15:27:55 × akegalj quits (~akegalj@141-136-145-147.dsl.iskon.hr) (Quit: leaving)
15:28:58 jakalx joins (~jakalx@base.jakalx.net)
15:31:25 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:33:04 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
15:33:05 × igghibu quits (~igghibu@178.249.211.100) (Quit: WeeChat 3.7.1)
15:33:22 igghibu joins (~igghibu@178.249.211.100)
15:34:47 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:38:54 Sgeo joins (~Sgeo@user/sgeo)
15:39:45 × bunnyhamer quits (~bunnyhame@2a10:8012:21:46dc:6456:24ad:beee:35aa) (Quit: Client closed)
15:40:02 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
15:40:44 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:43:56 Guest323 joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
15:46:13 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
15:46:51 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:50:25 freeside joins (~mengwong@101.100.175.180)
15:50:36 × MajorBiscuit quits (~MajorBisc@31-23-159.netrun.cytanet.com.cy) (Quit: WeeChat 3.6)
15:51:18 × jimki quits (~jmaki@gazorpazorp.fixme.fi) (Ping timeout: 268 seconds)
15:54:47 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 264 seconds)
15:54:47 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
15:56:13 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:58:39 jimki joins (~jmaki@gazorpazorp.fixme.fi)
15:59:10 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:68e0:626e:e762:49ca)
16:05:00 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds)
16:06:36 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
16:09:30 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
16:09:30 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Client Quit)
16:09:43 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
16:12:15 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds)
16:12:54 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
16:15:31 freeside joins (~mengwong@101.100.175.180)
16:16:17 × razetime quits (~quassel@49.207.230.181) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:17:41 × igghibu quits (~igghibu@178.249.211.100) (Quit: igghibu)
16:17:55 igghibu joins (~igghibu@178.249.211.100)
16:18:11 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
16:18:38 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
16:18:54 × califax quits (~califax@user/califx) (Quit: ZNC 1.8.2 - https://znc.in)
16:19:55 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 248 seconds)
16:20:58 califax joins (~califax@user/califx)
16:21:08 × gurkenglas quits (~gurkengla@84.138.199.46) (Ping timeout: 260 seconds)
16:22:09 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
16:25:19 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
16:26:54 × texasmynsted quits (~texasmyns@99.96.221.112) (Ping timeout: 272 seconds)
16:26:58 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
16:27:01 × manj-gnome quits (~manjaro-g@85.195.196.52) (Quit: Leaving)
16:27:19 × mikoto-chan quits (~mikoto-ch@85-76-3-8-nat.elisa-mobile.fi) (Ping timeout: 260 seconds)
16:28:38 × motherfsck quits (~motherfsc@user/motherfsck) (Quit: quit)
16:28:49 mikoto-chan joins (~mikoto-ch@85-76-142-82-nat.elisa-mobile.fi)
16:30:41 × themc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
16:31:01 themc47 joins (~mc47@xmonad/TheMC47)
16:31:06 × themc47 quits (~mc47@xmonad/TheMC47) (Client Quit)
16:33:19 Heffalump joins (~ganesh@urchin.earth.li)
16:33:38 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
16:33:50 <Heffalump> what's the best way to request a GHC bug fix that's already committed on master be backported to 9.4.x?
16:34:44 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:35:15 califax joins (~califax@user/califx)
16:35:41 freeside joins (~mengwong@101.100.175.180)
16:37:10 dsrt^ joins (~dsrt@76.145.185.103)
16:39:40 × mauke quits (~mauke@user/mauke) (Quit: leaving)
16:39:50 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 246 seconds)
16:40:39 mauke joins (~mauke@user/mauke)
16:41:06 kenran joins (~user@user/kenran)
16:41:07 × mbuf quits (~Shakthi@49.204.130.4) (Quit: Leaving)
16:41:14 × kenran quits (~user@user/kenran) (Remote host closed the connection)
16:45:25 <lyxia> open an issue?
16:45:47 <Heffalump> lyxia: open a new issue rather than commenting on the existing one?
16:46:44 <monochrom> Ugh please don't bring up monads in java communities. :( Here in #haskell we don't bring up checked exceptions either. :D
16:50:14 Kaipei joins (~Kaiepi@108.175.84.104)
16:51:07 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
16:51:11 × CiaoSen quits (~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
16:52:05 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
16:52:50 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
16:52:52 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 272 seconds)
16:52:52 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
16:54:31 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
16:54:53 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
16:57:11 × `2jt quits (~jtomas@84.red-88-17-186.dynamicip.rima-tde.net) (Ping timeout: 264 seconds)
17:00:21 freeside joins (~mengwong@101.100.175.180)
17:04:41 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 268 seconds)
17:04:54 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
17:04:54 × Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 272 seconds)
17:05:03 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
17:05:03 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
17:05:06 <lyxia> Heffalump: yeah
17:05:18 × freeside quits (~mengwong@101.100.175.180) (Ping timeout: 268 seconds)
17:05:53 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
17:06:16 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
17:06:17 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:06:48 <geekosaur> if you have access, I think you're also supposed to attach the issue to the appropriate milestone
17:07:51 azimut joins (~azimut@gateway/tor-sasl/azimut)
17:10:35 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 248 seconds)
17:12:02 × thongpv87 quits (~thongpv87@2402:9d80:34e:5a49:8993:bc07:c810:9d83) (Ping timeout: 246 seconds)
17:16:29 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
17:18:03 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds)
17:19:22 seriously_guest joins (~seriously@2001:1c06:2715:c200:3b35:92eb:bf95:36ea)
17:19:42 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:20:40 <Profpatsch> Hm, can I have a Coercible instance for a type with a “smart” constructor?
17:21:03 <Profpatsch> In particular, I’d like to be able to coerce in and out of the `Label` type here https://gist.github.com/Profpatsch/c1992885fd28294968c549e2237ced3f
17:21:05 <geekosaur> not if the real constructor is hidden
17:21:11 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
17:21:20 Vajb joins (~Vajb@2001:999:250:c9:8588:6e93:7809:7816)
17:21:22 <Profpatsch> But I don’t want to export the constructor, otherwise people start matching on it, but I want them to use the HasField instance
17:21:26 <geekosaur> you may need a .Internal module which exposes it
17:22:00 <Profpatsch> eh, it’s just an optimization anyway
17:22:08 <Profpatsch> in that case I’ll just manually map
17:22:17 <Profpatsch> sufficiently smart compiler and all that
17:22:36 <Profpatsch> geekosaur: but good idea, if I ever put it into a library I might want to export it via .Internal
17:22:48 <seriously_guest> Hey, is anyone familiar with Excercise 3 of Yorgey CIS194 HW 10? https://www.cis.upenn.edu/~cis1940/spring13/hw/10-applicative.pdf . I don't understand this line " Do not implement
17:22:49 <seriously_guest> them using the low-level definition of a Parser! In other words, pre-
17:22:49 <seriously_guest> tend that you do not have access to the Parser constructor or even
17:22:50 <seriously_guest> know how the Parser type is defined."
17:23:22 <Profpatsch> seriously_guest: don’t use the right side of the Parser difinition
17:23:24 <Profpatsch> *definition
17:24:02 <seriously_guest> Profpatsch how would I write this function without using the Parser constructor? abParser :: Parser (Char, Char)
17:24:30 <Profpatsch> seriously_guest: given that you implemented an Applicative instance just before
17:24:56 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:25:03 <Profpatsch> You want to use the functions from Applicative to turn a :: Parser Char b :: Parser Char into abParser :: Parser (Char, Char)
17:25:20 <Profpatsch> so you can get a feel for how Applicative works
17:25:30 <seriously_guest> ok gotcha thanks for the hint
17:26:10 <Profpatsch> seriously_guest: If you want to make sure you are doing the right thing, implement the function abParserA :: Applicative m => m (Char, Char) instead
17:26:36 <Profpatsch> You can use it everywhere you’d use `abParser`, but in the definition you are restricted to only things that Applicative gives you
17:26:57 fizbin joins (~fizbin@user/fizbin)
17:27:06 <Profpatsch> In fact, you can use it for anything that implements Applicative, not just parsers
17:27:23 <Profpatsch> So you could use it as abParserA :: IO (Char, Char)
17:27:57 <seriously_guest> *thumbsup*
17:30:09 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:30:47 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
17:31:20 <Profpatsch> seriously_guest: correction, abParserA :: Applicative m => m Char -> m (Char, Char)
17:31:30 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 272 seconds)
17:32:07 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:35:32 Neuromancer joins (~Neuromanc@user/neuromancer)
17:36:22 × Guest323 quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
17:38:23 econo joins (uid147250@user/econo)
17:39:04 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
17:40:29 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:42:07 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
17:42:46 <seriously_guest> sorry to bother Profpatsch, but is this cheating according to the assignment? https://paste.tomsmeding.com/MjsokyUC
17:43:24 <seriously_guest> theres a function char :: Char -> Parser Char thats defined in the hw already; but that techically uses the Parser constructor itself
17:46:02 × FragByte quits (~christian@user/fragbyte) (Ping timeout: 252 seconds)
17:46:51 FragByte joins (~christian@user/fragbyte)
17:47:13 <int-e> seriously_guest: That's fine. You're putting together simpler parsers (defined earlier) into more complex ones.
17:47:25 <int-e> > (,) 1 'a'
17:47:27 <lambdabot> (1,'a')
17:47:41 <int-e> seriously_guest: you don't really need pairCons, that's just (,)
17:47:54 <seriously_guest> ^^thanks for that; was looking for something simpler
17:49:05 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
17:50:51 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:51:33 Kaiepi joins (~Kaiepi@2605:b100:b28:783c:5975:664c:67a5:edf)
17:55:59 zmt00 joins (~zmt00@user/zmt00)
17:56:08 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
17:56:10 × unit73e quits (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 252 seconds)
17:56:57 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:58:11 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:58:22 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 252 seconds)
18:01:42 Bocaneri joins (~sauvin@user/Sauvin)
18:01:58 mvk joins (~mvk@2607:fea8:5ce3:8500::6126)
18:02:05 Bocaneri is now known as Guest4522
18:02:32 × igghibu quits (~igghibu@178.249.211.100) (Quit: igghibu)
18:03:02 <Profpatsch> seriously_guest: yeah, I’d say that’s the correct solution
18:03:30 <Profpatsch> seriously_guest: if you want to go fancy you can enable ApplicativeDo notation, then you can write
18:03:32 <Profpatsch> do
18:03:37 <Profpatsch> a <- char 'a'
18:03:39 <Profpatsch> b <- char 'b'
18:03:42 <Profpatsch> pure (a, b)
18:04:26 × Sauvin quits (~sauvin@user/Sauvin) (Ping timeout: 272 seconds)
18:04:27 igghibu joins (~igghibu@178.249.211.100)
18:05:10 acidjnk joins (~acidjnk@p200300d6e7137a614441a736a9b750c4.dip0.t-ipconnect.de)
18:05:35 <Profpatsch> (I wanted to link the GHC user guide page on that extension here but then I read the page and … lol … a simple concept described in the most complicated way possible)
18:05:59 <Profpatsch> The Haskell Foundation really needs to hire some good techincal writers
18:06:09 <Profpatsch> *technical
18:08:30 <seriously_guest> tbh, Im trying my hardest not to use any language options until I get to a point where i've mastered everything that comes out the box in ghc
18:09:14 <seriously_guest> otherwise I won't know how we got there... might be the wrong approach but it helps me feel less stressed
18:09:39 <seriously_guest> but thank you
18:09:51 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
18:11:38 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:12:05 × Ram-Z_ quits (Ram-Z@2a01:7e01::f03c:91ff:fe57:d2df) (Ping timeout: 255 seconds)
18:12:47 × vpan quits (~0@212.117.1.172) (Quit: Leaving.)
18:13:59 Ram-Z joins (~Ram-Z@li1814-254.members.linode.com)
18:17:11 × mvk quits (~mvk@2607:fea8:5ce3:8500::6126) (Quit: Going elsewhere)
18:18:15 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
18:19:59 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:20:16 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 272 seconds)
18:23:07 freeside joins (~mengwong@103.252.202.159)
18:24:48 cheater_ joins (~Username@user/cheater)
18:25:34 × trev quits (~trev@user/trev) (Remote host closed the connection)
18:27:35 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
18:27:43 cheater_ is now known as cheater
18:29:01 × seriously_guest quits (~seriously@2001:1c06:2715:c200:3b35:92eb:bf95:36ea) (Quit: Client closed)
18:30:22 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:32:43 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds)
18:34:32 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:36:01 jakalx parts (~jakalx@base.jakalx.net) ()
18:41:35 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
18:42:20 motherfsck joins (~motherfsc@user/motherfsck)
18:42:54 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:45:21 jakalx joins (~jakalx@base.jakalx.net)
18:46:13 × igghibu quits (~igghibu@178.249.211.100) (Quit: igghibu)
18:47:52 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
18:48:41 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
18:48:46 × fserucas quits (~fserucas@a85-138-107-42.cpe.netcabo.pt) (Ping timeout: 272 seconds)
18:50:14 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:56:29 Guest4522 is now known as Sauvin
18:56:55 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
18:58:34 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
18:59:07 finsternis joins (~X@23.226.237.192)
19:00:00 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
19:06:47 × mikoto-chan quits (~mikoto-ch@85-76-142-82-nat.elisa-mobile.fi) (Ping timeout: 268 seconds)
19:10:25 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
19:11:59 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:19:16 <iqubic> Parsers are really cool, yeah
19:19:44 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
19:21:28 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:22:23 × fryguybob quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Ping timeout: 264 seconds)
19:27:24 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
19:27:38 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:32:44 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
19:33:06 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
19:33:14 gmg joins (~user@user/gehmehgeh)
19:33:43 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:34:54 Guest323 joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
19:35:07 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
19:36:20 pavonia joins (~user@user/siracusa)
19:39:28 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
19:41:03 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:46:06 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
19:47:52 × Kaiepi quits (~Kaiepi@2605:b100:b28:783c:5975:664c:67a5:edf) (Read error: Connection reset by peer)
19:48:43 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
19:50:25 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:51:11 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:55:54 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
19:56:30 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
20:01:21 `2jt joins (~jtomas@84.red-88-17-186.dynamicip.rima-tde.net)
20:02:03 jakalx parts (~jakalx@base.jakalx.net) ()
20:06:18 jmdaemon joins (~jmdaemon@user/jmdaemon)
20:06:52 fserucas joins (~fserucas@a85-138-107-42.cpe.netcabo.pt)
20:07:13 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
20:08:42 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:08:56 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
20:10:48 jakalx joins (~jakalx@base.jakalx.net)
20:12:57 × fserucas quits (~fserucas@a85-138-107-42.cpe.netcabo.pt) (Ping timeout: 265 seconds)
20:19:43 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds)
20:21:20 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
20:27:59 × foul_owl quits (~kerry@157.97.134.158) (Ping timeout: 260 seconds)
20:28:11 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
20:29:41 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
20:30:08 fizbin joins (~fizbin@user/fizbin)
20:37:29 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
20:39:35 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
20:40:26 jargon joins (~jargon@174-22-192-24.phnx.qwest.net)
20:41:29 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
20:43:31 foul_owl joins (~kerry@71.212.143.88)
20:50:57 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:68e0:626e:e762:49ca) (Ping timeout: 255 seconds)
20:52:10 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
20:53:53 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
20:56:26 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Read error: Connection reset by peer)
20:56:42 <dgpratt[m]> is there an easy way to render a Rational (aka Ratio Integer) as a decimal formatted string?
20:56:46 Sciencentistguy joins (~sciencent@hacksoc/ordinary-member)
20:57:07 <monochrom> I would convert to Double.
20:59:52 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
21:00:34 mesaoptimizer joins (apotheosis@user/PapuaHardyNet)
21:01:08 × beefbambi quits (~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
21:02:24 beefbambi joins (~beefbambi@183.82.30.144)
21:04:19 <dgpratt[m]> thanks monochrom
21:06:14 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
21:06:55 <mauke> > unfoldr (\x -> if x == 0 then Nothing else Just (properFraction x)) (0.5 :: Rational)
21:06:57 <lambdabot> [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
21:06:57 × motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 256 seconds)
21:07:12 <mauke> > unfoldr (\x -> if x == 0 then Nothing else Just (properFraction (x * 10))) (0.5 :: Rational)
21:07:13 <lambdabot> [5]
21:07:27 <mauke> > unfoldr (\x -> if x == 0 then Nothing else Just (properFraction (x * 10))) (1/7 :: Rational)
21:07:29 <lambdabot> [1,4,2,8,5,7,1,4,2,8,5,7,1,4,2,8,5,7,1,4,2,8,5,7,1,4,2,8,5,7,1,4,2,8,5,7,1,4...
21:08:44 × Guest323 quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds)
21:09:14 <mauke> > (\n -> chr (n + ord '0')) <$> unfoldr (\x -> if x == 0 then Nothing else Just (properFraction (x * 10))) (1/7 :: Rational)
21:09:16 <lambdabot> "142857142857142857142857142857142857142857142857142857142857142857142857142...
21:09:57 × beefbambi quits (~beefbambi@183.82.30.144) (Read error: Connection reset by peer)
21:10:20 beefbambi joins (~beefbambi@183.82.30.144)
21:15:04 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
21:18:16 ircbrowse_tom joins (~ircbrowse@2a01:4f8:1c1c:9319::1)
21:18:22 Server sets mode +Cnt
21:18:31 <Jadesheit[m]> hahaha
21:18:59 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
21:19:19 <mauke> @let showRat r | r < 0 = '-' : showRat (negate r) | otherwise = case properFraction r of (show -> i, map (chr . (ord '0' +)) . unfoldr (\x -> if x == 0 then Nothing else Just (properFraction (x * 10))) -> f) -> i ++ case f of "" -> ""; _ -> '.' : f
21:19:21 <lambdabot> Defined.
21:19:34 <mauke> > showRat (1/3)
21:19:35 <lambdabot> "0.333333333333333303727386009995825588703155517578125"
21:19:59 <Jadesheit[m]> hm
21:20:08 <mauke> > showRat (1/3 :: Rational)
21:20:10 <lambdabot> "0.3333333333333333333333333333333333333333333333333333333333333333333333333...
21:20:40 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
21:21:03 <mauke> > showRat (355/113 :: Rational)
21:21:05 <lambdabot> "3.1415929203539823008849557522123893805309734513274336283185840707964601769...
21:21:13 × beefbambi quits (~beefbambi@183.82.30.144) (Read error: Connection reset by peer)
21:21:38 <mauke> > showRat (0/0)
21:21:40 <lambdabot> "-26965397022934738615939577861835371004269654684134598591014512173659901370...
21:21:47 <Jadesheit[m]> lol
21:22:05 <mauke> > toRational (0/0)
21:22:07 <lambdabot> (-26965397022934738615939577861835371004269654684134598591014512173659901370...
21:22:14 <mauke> faithful!
21:23:13 <mauke> I'm not sure why the '-' is there, though
21:23:20 <mauke> > 0/0 < 0
21:23:22 <lambdabot> False
21:24:21 <geekosaur> becuase properFraction (which toRational uses) takes a shortcut that produces garbage for NaN
21:24:37 × iqubic quits (~avi@2601:602:9502:c70:ddf2:fbad:a58:4a0b) (Ping timeout: 252 seconds)
21:24:42 <geekosaur> (also for Inf and -Inf, not that Rational has those)
21:24:50 <mauke> I'm not using properFraction for negative numbers
21:25:04 <mauke> ooh
21:25:10 <mauke> I get it
21:26:10 <mauke> I thought it was my '-', but it is show's '-'
21:37:43 beefbambi joins (~beefbambi@183.82.30.144)
21:38:53 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
21:40:05 morb joins (~morb@pool-72-80-94-112.nycmny.fios.verizon.net)
21:41:48 gmg joins (~user@user/gehmehgeh)
21:42:32 unit73e joins (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
21:42:44 <talismanick> Is there a "write your own effect system" tutorial anywhere?
21:43:11 <talismanick> from free monad guts to something simple like lexi-lambda's effect system
21:43:43 <talismanick> https://github.com/lexi-lambda/freer-simple
21:43:51 <talismanick> Freer monads, I suppose I should say
21:49:20 Inst joins (~Inst@2601:6c4:4081:54f0:b86b:c7d7:3fe0:861c)
21:49:25 <Inst> int-e
21:49:33 <Inst> wait, did you just show me an optimized foldmap with foldb?
21:50:02 <Inst> that's actually pretty interesting, i'm wondering how to implement it imperatively
21:51:11 pwug joins (~pwug@user/pwug)
21:53:27 <talismanick> Oh, and speaking of effects, has anyone provided a correct implementation (or integration) of non-determinism since this was published? https://github.com/lexi-lambda/eff/blob/8c4df4bf54faf22456354be18095b14825be5e85/notes/semantics-zoo.md
22:05:44 × coot quits (~coot@213.134.171.3) (Quit: coot)
22:06:25 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
22:06:32 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Remote host closed the connection)
22:26:56 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:29:24 × morb quits (~morb@pool-72-80-94-112.nycmny.fios.verizon.net) (Remote host closed the connection)
22:36:08 × thegeekinside quits (~thegeekin@189.128.148.159) (Ping timeout: 272 seconds)
22:36:16 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
22:38:02 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
22:38:50 morb joins (~morb@pool-72-80-94-112.nycmny.fios.verizon.net)
22:40:34 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
22:42:13 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
22:43:18 × morb quits (~morb@pool-72-80-94-112.nycmny.fios.verizon.net) (Remote host closed the connection)
22:44:00 cheater_ joins (~Username@user/cheater)
22:44:42 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
22:47:32 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
22:47:35 cheater_ is now known as cheater
22:48:04 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:49:06 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:49:33 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
22:51:29 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 246 seconds)
22:52:02 × beefbambi quits (~beefbambi@183.82.30.144) (Read error: Connection reset by peer)
22:52:36 beefbambi joins (~beefbambi@183.82.30.144)
22:53:38 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Quit: Lost terminal)
22:55:34 thegeekinside joins (~thegeekin@189.128.148.159)
22:56:11 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
22:57:09 biberu joins (~biberu@user/biberu)
22:57:40 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
22:58:51 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 248 seconds)
23:06:47 <Inst> sort of feels like a shame that the core Haskell team wandered off to industry / random projects
23:07:07 <Inst> the parallelization on Haskell could use improvement
23:07:50 × beefbambi quits (~beefbambi@183.82.30.144) (Read error: Connection reset by peer)
23:08:50 <Jadesheit[m]> I feel like I want to help and contribute to haskell, but im unsure in what ways I could do anything that has a meaningful impact or purpose
23:09:24 <Jadesheit[m]> especially because, even though it has been getting better, my haskell is far from perfect and there are still a lot of things I need to learn
23:10:22 × thegeekinside quits (~thegeekin@189.128.148.159) (Ping timeout: 268 seconds)
23:11:36 <monochrom> If you actually use Haskell, you're already contributing! Because one day people are going to ask "does anyone still use Haskell anymore?" and you're going to ask "I still do, haskell is not going away, not on my watch".
23:13:24 azimut joins (~azimut@gateway/tor-sasl/azimut)
23:13:44 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
23:16:04 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
23:16:04 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
23:16:04 wroathe joins (~wroathe@user/wroathe)
23:16:26 freeside joins (~mengwong@103.252.202.159)
23:18:56 <Jadesheit[m]> Something that meets the intersection of being useful and interesting/fun to me would be writing a library, though I'm unsure what for
23:20:14 × lagash_ quits (lagash@lagash.shelltalk.net) (Quit: ZNC - https://znc.in)
23:20:42 <geekosaur> Inst, I think the core GHC team would be surprised to learn that they no longer exist
23:21:19 <monochrom> Ah but the core Haskell team (exact wording) would not be surprised >:)
23:22:00 <geekosaur> what does parallelization have to do with the language definition?
23:22:13 <monochrom> The core Haskell team writes Haskell code for those who don't write Haskell code for themselves >:D
23:22:36 <monochrom> Right, so this is why I'm pretty sure "core Haskell team" was wrong wording.
23:23:00 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
23:25:00 <monochrom> especially the word "core"
23:25:20 lagash_ joins (lagash@lagash.shelltalk.net)
23:25:51 <monochrom> parallel haskell has always been a kind of DLC rather than any kind of "core", at least for GHC.
23:27:33 <Profpatsch> Is there a way of interleaving a MonadError Foo m and some thing that needs an unlift like foo :: (a -> IO a) -> IO a
23:28:17 <monochrom> Perhaps m needs to support both in the first place.
23:28:44 <Profpatsch> monochrom: yeah, but my problem is that e.g. ExceptT and MonadUnliftIO don’t vibe
23:28:51 <Profpatsch> there can’t be any state if you want to unlift
23:29:02 <monochrom> Alternatively go all out and try one of those effect libraries...
23:30:34 <Profpatsch> More to the point, we use servant, which requires everything to have a a `MonadError ServantError m` restriction, but I’d like to lift stuff like https://hackage.haskell.org/package/postgresql-simple-0.6.5/docs/Database-PostgreSQL-Simple.html#v:fold_ into our m
23:31:03 fizbin joins (~fizbin@user/fizbin)
23:31:43 beefbambi joins (~beefbambi@183.82.30.144)
23:33:18 <monochrom> In this case, perhaps you can runExceptT somewhere and ExceptT-wrap somewhere else. Basically doing the conjugation yourself.
23:33:58 <Profpatsch> yeah I’m thinking about how to build a “degraded” stack that allows that
23:34:10 <monochrom> So basically set a = Either Foo a1
23:34:21 <Profpatsch> hmmm
23:35:02 <monochrom> So I mean something like: ExceptT (fold_ ... (runExceptT ...))
23:35:25 <monochrom> err, ExceptT (fold_ ... (\a r -> runExceptT ...))
23:35:42 <Profpatsch> monochrom: Ah so you mean not over any (UnliftIO m), just over ExceptT
23:35:44 <Profpatsch> hmmm
23:35:46 <Profpatsch> maybe that works
23:35:48 <Profpatsch> I’ll try it out
23:35:53 iqubic joins (~avi@2601:602:9502:c70:4602:12a1:6697:a25f)
23:37:22 <Inst> Haskell is actually doing fairly well on Google Trends
23:37:44 <Inst> I think when the last HF foundation director was kind enough to speak to me, he was absolutely right that Haskell needs lots of improvement in tooling and ecosystem
23:38:01 <dgpratt[m]> @pl f x y = g (h x y)
23:38:02 <lambdabot> f = (g .) . h
23:38:29 <Inst> lol "pl" => "pointless"
23:39:51 <Inst> regarding the parallelism; I'm wondering if there's an intrinsic compatibility between laziness and parallelism
23:40:29 <Inst> Haskell survives because it's lazy-by-default; Haskell was designed to unify lazy languages in FP space, and it seems that no one else is going to do lazy-by-default
23:45:54 <Jadesheit[m]> <Inst> "I think when the last HF..." <- What parts of the ecosystem specifically?
23:46:13 <monochrom> libraries, as usual
23:47:03 <monochrom> there could be more, but libraries are the foundation
23:47:16 <Inst> have you tried python? It's worth it just to see what best-in-class library is
23:47:19 × `2jt quits (~jtomas@84.red-88-17-186.dynamicip.rima-tde.net) (Ping timeout: 256 seconds)
23:47:20 <Inst> erm, ecosystem is
23:47:40 <Inst> the main drawbacks is that Haskell community tends to be more helpful, and on average, more skilled due to higher average experience
23:47:50 <monochrom> Unlike the 1970s (much simpler time), people choose languages by just looking at community libraries.
23:47:58 <Inst> in Py / JS, you'll find people who have difficulty writing a for-loop
23:48:05 <Jadesheit[m]> haha yeah
23:48:25 <Jadesheit[m]> Inst: i've worked with it yeah
23:48:49 <Inst> point of Haskell for me is essentially being able to hang out with Haskellers
23:49:16 <Jadesheit[m]> what, in your opinion, would be an important library or piece of tooling haskell needs?
23:50:21 cheater_ joins (~Username@user/cheater)
23:50:26 <monochrom> the latest fad, i.e., machine learning
23:50:34 <Inst> there are tensorflow bindings, no?
23:50:45 <monochrom> (thank god the other latest fad, blockchain, is already covered)
23:51:09 <Inst> ML isn't a fad; if you look at how far GPTChat has come
23:51:11 <Jadesheit[m]> monochrom: something like numpy (numhs?) or something more specific?
23:51:17 <Inst> numpy is a big hole, afaik
23:51:21 <monochrom> But more seriously, GUI is still in a very bad state. At least how I feel it.
23:51:21 freeside joins (~mengwong@103.252.202.159)
23:51:25 <Inst> Haskell can't compare to Julia when it comes to numerical computation
23:51:28 <Inst> yeah, I agree
23:51:45 <Inst> GUI makes it hard to learn / teach Haskell because people want the endorphin rush of having a GUI they coded
23:51:51 <Jadesheit[m]> monochrom: Everything is web-based nowadays
23:52:01 <Inst> I can't even get threepenny-gui to install on Windows
23:52:02 <Inst> :(
23:52:30 <Jadesheit[m]> I started hating GUIs, then I started hating CLI/TUI and now I don't write any applications anymore
23:52:46 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
23:52:46 cheater_ is now known as cheater
23:52:55 <Jadesheit[m]> (this isn't a joke, btw)
23:53:04 <Inst> so you just do scripts / webdesign?
23:53:09 goober joins (~goober@90-231-13-185-no3430.tbcn.telia.com)
23:53:21 <monochrom> When you finally hate computing altogether, that will be enlightenment.
23:53:46 sagax joins (~sagax_nb@user/sagax)
23:53:50 <Inst> Web honestly is probably the best chance Haskell has of growing its userbase
23:54:04 <Jadesheit[m]> Inst: I exclusively do language intrinsic things lmao
23:54:10 <monochrom> At least computing in practice.
23:54:20 <Inst> so, compilers?
23:54:32 <Jadesheit[m]> not even, no
23:54:35 <Jadesheit[m]> I just code for the sake of coding
23:54:51 <monochrom> Well, web is also a fad, just a much more long-running one.
23:54:51 <Jadesheit[m]> I write functions, doodle around
23:55:04 <Jadesheit[m]> I boot up ghci and try out stuff
23:55:15 <monochrom> Let's face it, popularity = fad. Virtually a tautology.
23:55:16 <Jadesheit[m]> and then I delete my entire projects folder again
23:55:19 <Jadesheit[m]> it's an endless cycle
23:55:44 <monochrom> Aww, you don't have to delete them :)
23:56:07 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
23:56:35 <monochrom> I have a "project" directory and a "study-notes" directory. Inside them are all sorts of subdirectories that are not really different from yours. But I don't delete them.
23:56:48 <Jadesheit[m]> haha I know, but they are usually "projects" with five or less functions because I lose interest so quickly
23:57:15 <Jadesheit[m]> I haven't had something I worked on for more than a day in maybe a year?
23:57:26 <Jadesheit[m]> It just sucks
23:57:34 <Jadesheit[m]> ¯\_(ツ)_/¯
23:57:42 <monochrom> Once in a while, it pays off when I find that something I need today has some unfinished sketch I left 10 years ago.
23:58:20 <Jadesheit[m]> I talk a lot to people and discuss haskell
23:58:30 zero is now known as zzz
23:58:39 × acidjnk quits (~acidjnk@p200300d6e7137a614441a736a9b750c4.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
23:58:43 <Jadesheit[m]> So I write more code on discord or matrix than in ghci/source files
23:58:52 freeside joins (~mengwong@103.252.202.159)

All times are in UTC on 2022-12-23.