2022/01/13

2022-01-13 00:00:05 +0100zincy(~zincy@2a00:23c8:970c:4801:911c:c4ab:2f7e:d3f1)
2022-01-13 00:00:26 +0100Jonno_FTW(~come@user/jonno-ftw/x-0835346)
2022-01-13 00:02:27 +0100 <Guest54> ¿por qué llamamos funciones de suma y multiplicación?
2022-01-13 00:02:56 +0100 <Guest54> why do we call addition and multiplication functions?
2022-01-13 00:03:41 +0100 <davean> How could they ever no be functions?
2022-01-13 00:03:47 +0100 <davean> They're like the most classical examples
2022-01-13 00:03:54 +0100 <Axman6> :t (+)
2022-01-13 00:03:55 +0100 <lambdabot> Num a => a -> a -> a
2022-01-13 00:03:58 +0100 <Axman6> definitely a function
2022-01-13 00:03:59 +0100 <davean> They take parameters and produce a result
2022-01-13 00:04:02 +0100 <geekosaur> mathematics does not have any distinction between a function and an operator
2022-01-13 00:04:17 +0100 <geekosaur> haskell does for parsing reasons, but has ways to override both
2022-01-13 00:04:21 +0100 <Axman6> :t (<>) -- also a function
2022-01-13 00:04:22 +0100 <lambdabot> Semigroup a => a -> a -> a
2022-01-13 00:04:37 +0100 <EvanR> is Guest54 asking about etymology of "function" in general
2022-01-13 00:04:50 +0100 <EvanR> why is anything called a function
2022-01-13 00:05:08 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 250 seconds)
2022-01-13 00:06:25 +0100 <Guest54> svosotros
2022-01-13 00:06:34 +0100 <Guest54> por qué
2022-01-13 00:06:59 +0100 <Guest54> why
2022-01-13 00:07:43 +0100 <monochrom> If you know "function", then note that addition is a special case.
2022-01-13 00:08:30 +0100 <geekosaur> did you understand anything we said?
2022-01-13 00:09:37 +0100 <Guest54> More and less
2022-01-13 00:10:34 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-01-13 00:11:34 +0100 <Guest54> Is true if there are not diference in operation or function
2022-01-13 00:11:47 +0100 <hpc> correct
2022-01-13 00:12:15 +0100 <hpc> you'd be hard-pressed to find a difference between (+) and some hypothetical function "plus = \x y -> x + y"
2022-01-13 00:12:24 +0100 <Guest54> set and element
2022-01-13 00:12:28 +0100 <monochrom> Oh you can even make a case that distinguishes between "operator" and "operation".
2022-01-13 00:12:43 +0100dhouthoo(~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4)
2022-01-13 00:14:45 +0100hololeap(~hololeap@user/hololeap) (Ping timeout: 276 seconds)
2022-01-13 00:14:54 +0100hololeap_(~hololeap@user/hololeap)
2022-01-13 00:16:55 +0100 <Guest54> thanks
2022-01-13 00:17:12 +0100Guest54(~Guest54@186.139.149.253) (Quit: Client closed)
2022-01-13 00:17:42 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2022-01-13 00:20:04 +0100Nolrai2(~Nolrai2@73.240.1.39)
2022-01-13 00:20:06 +0100Cale(~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Remote host closed the connection)
2022-01-13 00:20:50 +0100 <Nolrai2> Is it normal for linking a small program to take over a minute?
2022-01-13 00:21:15 +0100 <geekosaur> it can be, yes. linkers are often slow
2022-01-13 00:22:13 +0100Cale(~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com)
2022-01-13 00:22:19 +0100 <hpc> it's a weirdly heavy operation in a number of ways
2022-01-13 00:22:51 +0100 <hpc> back when the 64-bit transition was just happening, it was a big deal when it was suddenly impossible to build webkit on 32-bit because linking required more than 4 gigs of addressable memory
2022-01-13 00:23:50 +0100coot(~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
2022-01-13 00:23:56 +0100 <Nolrai2> Damn, I was hoping something was wrong. Its a bit crazy to wait that long to see if a change works. Well I guess having constants be settable by comand line args is good practice anyway. In both senses of "good practice". :)
2022-01-13 00:25:30 +0100acidjnk(~acidjnk@p200300d0c7271e5531e75586a8fe0593.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-01-13 00:25:49 +0100 <monochrom> Oh haha so you're like me, when benchmarking, change "n = 10" to "n = 100000" in the source file and rebuild...
2022-01-13 00:25:56 +0100burnsidesLlama(~burnsides@dhcp168-028.wadham.ox.ac.uk) (Remote host closed the connection)
2022-01-13 00:26:11 +0100 <monochrom> In fact I don't even bother to have "n =" haha.
2022-01-13 00:28:24 +0100 <EvanR> Nolrai2, reloading particular files in ghci after modifying them is good... also a hot code reloading after you rebuild a part of the application would be nice
2022-01-13 00:28:39 +0100zincy(~zincy@2a00:23c8:970c:4801:911c:c4ab:2f7e:d3f1) (Remote host closed the connection)
2022-01-13 00:28:44 +0100 <EvanR> assuming linking of THAT isn't slow
2022-01-13 00:28:46 +0100 <EvanR> which is might be
2022-01-13 00:29:22 +0100 <EvanR> linking was the bog-down last time I tried code reloading
2022-01-13 00:30:55 +0100lagash(lagash@lagash.shelltalk.net)
2022-01-13 00:31:52 +0100 <opticblast> when I say "reusing a Builder", I mean that I have a particular builder, and I need to use it twice. is it better to use it directly twice, or should I convert it into a lazy bytestring and use that twice?
2022-01-13 00:32:00 +0100mikoto-chan(~mikoto-ch@194.157.16.89) (Ping timeout: 250 seconds)
2022-01-13 00:32:15 +0100 <opticblast> if a builder is like a function, then "calling" it twice means redoing all of the work used to make it
2022-01-13 00:33:01 +0100cyphase(~cyphase@user/cyphase) (Ping timeout: 240 seconds)
2022-01-13 00:33:06 +0100 <EvanR> calling a function twice might not be as much as work x 2, depending on how it's made
2022-01-13 00:33:27 +0100 <opticblast> true, it could be like "let heavy = expr in \x -> foo heavy x"
2022-01-13 00:33:30 +0100 <EvanR> because laziness
2022-01-13 00:34:08 +0100 <opticblast> which when called twice does foo twice but heavy only once
2022-01-13 00:35:01 +0100 <Nolrai2> Now I just need to figure out if this crazy behavior is a bug, a result of numerical approximation, or 'real'.
2022-01-13 00:35:06 +0100 <EvanR> but if a builder would have been generated lazily and consumed on use, holding onto it for 2nd use now means it becomes materialized
2022-01-13 00:35:25 +0100 <EvanR> this is where "duplicate thunk" would be handy?
2022-01-13 00:35:54 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 250 seconds)
2022-01-13 00:36:02 +0100 <Nolrai2> opticblast: honestly I would just try both. Should be a pretty simple change, no?
2022-01-13 00:36:46 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 00:37:41 +0100zincy(~zincy@2a00:23c8:970c:4801:911c:c4ab:2f7e:d3f1)
2022-01-13 00:37:42 +0100zincy(~zincy@2a00:23c8:970c:4801:911c:c4ab:2f7e:d3f1) (Remote host closed the connection)
2022-01-13 00:37:45 +0100 <monochrom> In Fortran, "real" is a numerical approximation. So, same difference. >:)
2022-01-13 00:37:47 +0100tanners(~tanners@pool-71-127-59-41.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2022-01-13 00:38:01 +0100 <EvanR> ironic naming
2022-01-13 00:38:02 +0100tanners(~tanners@2600:1003:b10c:b4b6:4e2:294a:11a:8db2)
2022-01-13 00:43:57 +0100pritambaral(~pritam@user/pritambaral) (Ping timeout: 240 seconds)
2022-01-13 00:44:54 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 00:44:54 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 00:44:54 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 00:45:16 +0100cyphase(~cyphase@user/cyphase)
2022-01-13 00:45:51 +0100Nolrai2(~Nolrai2@73.240.1.39) (Quit: Client closed)
2022-01-13 00:46:17 +0100 <Axman6> opticblast: the real answer is benchmark and see, in the case of builders it depends a lot on what that builder is doing. If it's made up of lots of small builders then running it once and storing the result might be useful, adding a bytestring to a builder is pretty cheap because all the sizes are known
2022-01-13 00:47:01 +0100Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
2022-01-13 00:49:50 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 00:51:05 +0100 <opticblast> thanks
2022-01-13 00:53:01 +0100max22-(~maxime@2a01cb0883359800d1e94aeeb9e074b6.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2022-01-13 00:58:03 +0100 <EvanR> so if I take a list, and want to return a tuple whose first component is a lazy scan of that list, and the second component is the "final state" (which corresponds to the end of the scan)
2022-01-13 00:58:53 +0100 <EvanR> it seems like break/scan territory, and via some magic I can consume that scan without drawing out the whole list due to the second component?
2022-01-13 00:59:09 +0100 <EvanR> break/span
2022-01-13 01:00:13 +0100 <EvanR> f xs = let ys = scanl whatever start xs in (ys, last ys) -- ? xD
2022-01-13 01:01:16 +0100DavSanchez(~DavSanche@73.red-83-34-157.dynamicip.rima-tde.net)
2022-01-13 01:01:29 +0100 <monochrom> If you don't evaluate the final state too early, the scan can be consumed lazily.
2022-01-13 01:01:56 +0100 <monochrom> And I mean resulting in lazily taking in the input list.
2022-01-13 01:02:04 +0100 <EvanR> and finally, when you do want to evaluate the 2nd component, you don't chew through a million thunks?
2022-01-13 01:02:21 +0100 <DavSanchez> Hi team! Quick question. How does one include the README.md file at the root of a repo in the haddock documentation? Is it possible to have this rendered locally or does it work only when uploading to Hackage?
2022-01-13 01:03:01 +0100 <monochrom> The final state may or may not be a huge thunk itself depending on at least 2 factors.
2022-01-13 01:03:21 +0100 <EvanR> I have my "update frame" shrine decorated
2022-01-13 01:03:36 +0100 <EvanR> candels lit
2022-01-13 01:03:41 +0100 <monochrom> You can cook up a custom version of scanl that mitigates it.
2022-01-13 01:03:56 +0100 <monochrom> But the way you consume the scan can also mitigate it.
2022-01-13 01:04:26 +0100 <monochrom> Here is a small example that helps understand the phenomenon.
2022-01-13 01:04:53 +0100 <monochrom> Define b = scanl (+) 0 [1..]
2022-01-13 01:05:37 +0100 <monochrom> "print b" and "print (b !! n)" have extremely different space behaviour. O(1) vs Ω(n).
2022-01-13 01:05:54 +0100 <monochrom> If you find out why, you understand my "But the way you consume the scan can also mitigate it."
2022-01-13 01:06:33 +0100 <EvanR> I appreciate the puzzler
2022-01-13 01:07:17 +0100 <EvanR> @src print
2022-01-13 01:07:17 +0100 <lambdabot> print x = putStrLn (show x)
2022-01-13 01:08:04 +0100 <monochrom> Well, you can replace "print b" by "mapM_ print b" if you want "print" to always be about a single Integer.
2022-01-13 01:08:16 +0100 <EvanR> @src putStrLn
2022-01-13 01:08:16 +0100 <lambdabot> putStrLn s = do putStr s; putChar '\n'
2022-01-13 01:08:28 +0100 <EvanR> @src putStr
2022-01-13 01:08:28 +0100 <lambdabot> putStr s = hPutStr stdout s
2022-01-13 01:08:41 +0100 <EvanR> @src hPutStr
2022-01-13 01:08:41 +0100 <lambdabot> Source not found. Where did you learn to type?
2022-01-13 01:08:53 +0100 <monochrom> But let's say "print b" ensures that you evaluate b!!100 before you evaluate b!!101
2022-01-13 01:09:02 +0100 <geekosaur> hPutStr's a bit more involved
2022-01-13 01:09:31 +0100chomwitt(~chomwitt@2a02:587:dc11:fb00:12c3:7bff:fe6d:d374) (Ping timeout: 245 seconds)
2022-01-13 01:10:33 +0100 <EvanR> um ok, so whatever does the printing will traverse the list, which is a scanl
2022-01-13 01:10:41 +0100 <EvanR> @src scanl
2022-01-13 01:10:41 +0100 <lambdabot> scanl f q ls = q : case ls of
2022-01-13 01:10:41 +0100 <lambdabot> [] -> []
2022-01-13 01:10:41 +0100 <lambdabot> x:xs -> scanl f (f q x) xs
2022-01-13 01:10:58 +0100alx741(~alx741@157.100.93.160) (Read error: Connection reset by peer)
2022-01-13 01:11:51 +0100 <EvanR> it will try to discard the q's but the 100th one depends on all those f q x
2022-01-13 01:12:27 +0100 <EvanR> q = f q x from previous iteration
2022-01-13 01:13:16 +0100 <EvanR> and hence all the x from the original list
2022-01-13 01:13:20 +0100 <EvanR> so the original list sticks around
2022-01-13 01:13:31 +0100 <EvanR> or becomes a thing when it wouldn't have, potentially
2022-01-13 01:14:00 +0100 <EvanR> is that right
2022-01-13 01:14:17 +0100Codaraxis_(~Codaraxis@user/codaraxis) (Remote host closed the connection)
2022-01-13 01:14:51 +0100Codaraxis_(~Codaraxis@user/codaraxis)
2022-01-13 01:15:45 +0100nhs(~nhs@136.49.226.20) (Ping timeout: 256 seconds)
2022-01-13 01:16:01 +0100alx741(~alx741@157.100.93.160)
2022-01-13 01:18:26 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-01-13 01:18:32 +0100jkaye_(~jkaye@2601:281:8300:7530:6a7d:d789:f2c1:154c) (Ping timeout: 240 seconds)
2022-01-13 01:19:41 +0100 <EvanR> where is scanl' xD
2022-01-13 01:21:30 +0100 <opticblast> Data.List
2022-01-13 01:22:04 +0100 <EvanR> oh there it is
2022-01-13 01:22:06 +0100 <geekosaur> @index scanl'
2022-01-13 01:22:06 +0100 <lambdabot> GHC.OldList, Data.List
2022-01-13 01:22:10 +0100 <geekosaur> huh
2022-01-13 01:24:13 +0100DavSanchez(~DavSanche@73.red-83-34-157.dynamicip.rima-tde.net) (Quit: Ping timeout (120 seconds))
2022-01-13 01:24:17 +0100tanners(~tanners@2600:1003:b10c:b4b6:4e2:294a:11a:8db2) (Ping timeout: 240 seconds)
2022-01-13 01:24:18 +0100 <EvanR> alright good to know. Unfortunately I still don't know how to predict or explain (ys, last ys). Say I print ys in IO, then go to use last ys for something, was the list consumed or not
2022-01-13 01:24:53 +0100 <EvanR> normally I'd say no it string up in memory but then break/span ...
2022-01-13 01:27:53 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-01-13 01:28:24 +0100tanners(~tanners@pool-71-127-59-41.washdc.fios.verizon.net)
2022-01-13 01:29:22 +0100 <EvanR> > scanl (+) 0 [1..] !! 100000
2022-01-13 01:29:24 +0100 <lambdabot> 5000050000
2022-01-13 01:29:27 +0100 <EvanR> > scanl (+) 0 [1..] !! 10000000
2022-01-13 01:29:33 +0100 <lambdabot> 50000005000000
2022-01-13 01:29:38 +0100 <EvanR> > scanl' (+) 0 [1..] !! 10000000
2022-01-13 01:29:40 +0100 <lambdabot> 50000005000000
2022-01-13 01:29:45 +0100 <EvanR> shrug xD
2022-01-13 01:29:54 +0100arahael(~arahael@118.208.232.68)
2022-01-13 01:31:47 +0100seer(~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
2022-01-13 01:31:51 +0100seerInst
2022-01-13 01:31:54 +0100 <Inst> hmmm
2022-01-13 01:32:02 +0100 <Inst> Axman6, Evanr
2022-01-13 01:32:07 +0100 <Inst> why did you guys use this book?
2022-01-13 01:32:09 +0100 <Inst> https://www.amazon.com/Haskell-Functional-Programming-International-Computer/dp/0201882957/ref=sr_…
2022-01-13 01:33:05 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
2022-01-13 01:34:44 +0100 <monochrom> EvanR: I have "merely" ys = [1..n], print (ys, last ys). It takes much space, even under -O2
2022-01-13 01:35:30 +0100 <EvanR> then the break span magic doesn't work on this planet
2022-01-13 01:36:03 +0100 <EvanR> at least that result is understandable
2022-01-13 01:36:46 +0100 <monochrom> "last" is much less transparent than break/span in the context of having the optimizer and/or the RTS to see through what's going on and discard data.
2022-01-13 01:37:48 +0100 <EvanR> so some kind of version of scanl that does... something... is in order
2022-01-13 01:38:26 +0100nhs(~nhs@136.49.226.20)
2022-01-13 01:38:46 +0100 <monochrom> (ys, last ys) is likely in the same genre as (sum xs, length xs)
2022-01-13 01:39:03 +0100 <monochrom> Even under a very efficient sum.
2022-01-13 01:39:14 +0100 <EvanR> yeah i never learned the solution to that one xD
2022-01-13 01:39:33 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 01:40:22 +0100 <monochrom> Basically the solution is to give up and write a fairly custom handcoding.
2022-01-13 01:41:17 +0100 <EvanR> (sum xs, length xs) seems like use a pair of states in the fold
2022-01-13 01:41:24 +0100 <monochrom> "data SL a = SL !a !Int", foldl' (\(SL a n) b -> SL (a+b) (n+1))
2022-01-13 01:41:29 +0100 <EvanR> make sure both components get evaluated along the way
2022-01-13 01:41:30 +0100 <monochrom> Yeah.
2022-01-13 01:41:49 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
2022-01-13 01:42:07 +0100 <monochrom> And then there are libraries and theories for doing it generally.
2022-01-13 01:42:22 +0100 <monochrom> For example if you have heard of the "Fold" type, that's one.
2022-01-13 01:42:28 +0100 <Axman6> Inst: I think I used the second edition of that at uni
2022-01-13 01:42:37 +0100 <EvanR> in (ys, last ys) I'm 'folding' one of them and not doing anything on the other...
2022-01-13 01:42:45 +0100 <monochrom> And someone else use the theory of "attribute grammars" for it. I don't understand this one.
2022-01-13 01:42:53 +0100 <Inst> i mean for teaching
2022-01-13 01:43:25 +0100 <Inst> i'd have been really big on it if the last edition weren't 2011
2022-01-13 01:44:55 +0100 <EvanR> resumable folds
2022-01-13 01:46:42 +0100 <Axman6> the fundamentals of HAskell haven't changed much in the last decade. I would be surprised if there's much in there that isn't worth learning
2022-01-13 01:47:14 +0100 <geekosaur> I'd mostly be worried about things like Eq and Show being removed from Num, and AMP
2022-01-13 01:47:24 +0100 <monochrom> Consider (sum xs, last xs). I would do it by:
2022-01-13 01:47:28 +0100 <geekosaur> both meaning various type signatures may need to be adjusted
2022-01-13 01:47:40 +0100LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection)
2022-01-13 01:48:09 +0100 <monochrom> data P a b = P !a !b; foldl' (\(P a _) x -> P (a+x) x) (P 0 undefined)
2022-01-13 01:48:29 +0100LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao)
2022-01-13 01:48:30 +0100 <Inst> axman6: the problem I have now is, well, no one actually teaches modern haskell unless they're a corporate trainer
2022-01-13 01:49:07 +0100 <Inst> in the sense at the production outfits seem to be running custom preludes, string has been replaced by text
2022-01-13 01:49:15 +0100 <EvanR> yeah...
2022-01-13 01:49:30 +0100 <EvanR> last, sum, length are left folds
2022-01-13 01:49:44 +0100 <EvanR> 'the list itself' is a right fold
2022-01-13 01:49:46 +0100xb0o2(~xb0o2@user/xb0o2) (Quit: Client closed)
2022-01-13 01:49:52 +0100 <monochrom> Ah.
2022-01-13 01:50:04 +0100 <monochrom> May I introduce you to DList... >:)
2022-01-13 01:50:57 +0100 <monochrom> foldl' (\(P a _) x -> P (a . (x:)) x) (P id undefined)
2022-01-13 01:51:24 +0100 <EvanR> what is this, rebuilding the list along the way in such a way it's not reversed? xD
2022-01-13 01:51:32 +0100 <monochrom> I have not benchmarked it though heh
2022-01-13 01:51:43 +0100 <Axman6> Inst: you need to know the fundamentals before you learn modern haskell
2022-01-13 01:52:08 +0100 <EvanR> I think I need one of these advanced foldl types...
2022-01-13 01:52:56 +0100DavSanchez(~DavSanche@73.red-83-34-157.dynamicip.rima-tde.net)
2022-01-13 01:52:58 +0100 <Inst> is that why people don't stick with Haskell?
2022-01-13 01:53:11 +0100 <monochrom> Yes.
2022-01-13 01:53:15 +0100 <Inst> or, like, the accusations that Haskell is a toy language are true, except specifically of the version that's taught?
2022-01-13 01:53:25 +0100 <monochrom> Yes.
2022-01-13 01:53:28 +0100 <geekosaur> you need to learn how to walk before you can run. should people not ever run?
2022-01-13 01:54:00 +0100 <monochrom> No. Babies should learn how to drive so they never need worry about walking or running.
2022-01-13 01:54:08 +0100 <Axman6> I think trying to generalise the reasons down to one or two things is a fruitless persuit
2022-01-13 01:54:23 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 01:54:23 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 01:54:23 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 01:54:25 +0100 <monochrom> Hell, not either, just learn how to order UberEats online so they won't even drive.
2022-01-13 01:54:34 +0100 <Inst> Axman6: my feeling about string is that string is perfect for learning recursion and naive parsing
2022-01-13 01:55:25 +0100 <geekosaur> you'll still be using the same String primitives on Text, btw
2022-01-13 01:55:38 +0100 <monochrom> Recall that walking is the #1 cause of baby injuries, running is the #1 cause of children injuries, and driving is the #1 cause of adult injuries.
2022-01-13 01:55:58 +0100 <monochrom> Haskell is also the #1 of hand injuries among Haskellers.
2022-01-13 01:56:15 +0100 <Inst> as long as it's not some other reason, it's perfectly acceptable
2022-01-13 01:56:37 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-01-13 01:56:48 +0100 <Inst> geekosaur: why I hate text: the idea of unpacking / packing it every time I want to do an operation on it :(
2022-01-13 01:56:56 +0100 <geekosaur> nope
2022-01-13 01:57:00 +0100 <Inst> but that's my fault
2022-01-13 01:57:12 +0100 <geekosaur> Text has its own versions of all the same operations
2022-01-13 01:57:19 +0100 <geekosaur> but they're the same operations
2022-01-13 01:57:26 +0100 <Axman6> yeah, if you're unpacking Texts you're doing something wrong
2022-01-13 01:57:27 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-01-13 01:57:28 +0100 <geekosaur> you won't be learning a different API when the time comes
2022-01-13 01:57:30 +0100 <Inst> no, but, like, i'd rather hand craft the operations
2022-01-13 01:57:33 +0100 <dsal> You only have to pack or unpack if you're doing something not with Text.
2022-01-13 01:57:36 +0100 <Inst> i don't know enough about text to do that yet
2022-01-13 01:57:37 +0100 <EvanR> you could convert Text to String and back when something needs String... which is possible ...
2022-01-13 01:57:41 +0100 <EvanR> you only*
2022-01-13 01:58:15 +0100 <EvanR> but that's not Text's fault
2022-01-13 01:58:20 +0100 <geekosaur> also I will note that I work with a number of Haskell programs and String is perfectly fine for them
2022-01-13 01:58:26 +0100 <Inst> bleh, sorry, i'll run off and stop wasting your time, need to do more exercises / stop with the dumb exercises and actually build a file handler lib for myself at this point
2022-01-13 01:58:36 +0100 <geekosaur> (Text is actually wasteful if your strings are all short)
2022-01-13 01:59:04 +0100 <EvanR> handleFile :: (File -> r) -> FilePath -> IO r
2022-01-13 01:59:04 +0100 <monochrom> I understand the sentiment. Many Haskellers like to hand craft arithmetic, too. They prefer "data N = Z | S N" and, when confronted with 4+5, unpack 4 and 5 to N, run their hand crafted addition, pack.
2022-01-13 01:59:09 +0100 <Axman6> but with text-2.0, less wasteful!
2022-01-13 02:00:42 +0100 <Inst> monochrom: you're being sarcastic, right?
2022-01-13 02:00:52 +0100 <monochrom> What do you think?
2022-01-13 02:01:00 +0100 <geekosaur> for the past several minutes, yes
2022-01-13 02:01:35 +0100 <Inst> possibility one: this is incredibly sarcastic. possibility two: there might be haskellers who derive pleasure from forcing a custom implementation of arithmetic that's computationally wasteful
2022-01-13 02:01:43 +0100 <geekosaur> some people look at Haskell having 3 string-like types and think that it is a sign that Haskell is a toy language
2022-01-13 02:02:09 +0100 <Inst> given what i've seen of haskellers so far, i love you guys for that specific reason
2022-01-13 02:02:11 +0100 <geekosaur> they do not consider that they're abusing one string-like type to do things that should not be conflated, like ByteString vs. String or Text
2022-01-13 02:02:32 +0100 <geekosaur> or that there are optimization reasons to choose String over Text or vice versa
2022-01-13 02:02:52 +0100 <geekosaur> Haskell forces you to think about these things, as usual
2022-01-13 02:03:07 +0100 <geekosaur> many programmers don't like being forced to think
2022-01-13 02:03:25 +0100Guest54(~Guest54@186.139.149.253)
2022-01-13 02:03:29 +0100 <Inst> this, at least in my impression, is a language
2022-01-13 02:03:41 +0100 <Inst> where programming newbies craft the same code 3 different ways and rate them on beauty and efficiency
2022-01-13 02:04:17 +0100Guest54(~Guest54@186.139.149.253) (Client Quit)
2022-01-13 02:05:03 +0100cheater(~Username@user/cheater) (Ping timeout: 256 seconds)
2022-01-13 02:06:37 +0100 <Axman6> @quote+ geekosaur many programmers don't like being forced to think
2022-01-13 02:06:37 +0100 <lambdabot> No quotes match. Just try something else.
2022-01-13 02:06:47 +0100 <geekosaur> it;s @remember
2022-01-13 02:07:38 +0100 <Axman6> @remember geekosaur many programmers don't like being forced to think
2022-01-13 02:07:38 +0100 <lambdabot> I will never forget.
2022-01-13 02:07:49 +0100 <Axman6> god it's been so long since I've done that, or seen anyone do it
2022-01-13 02:08:37 +0100 <Inst> is that a problem if they don't like being forced to think? they're work-a-day wage laborers
2022-01-13 02:08:49 +0100 <Inst> if they're being asked to do overtime, better to do it while not thinking
2022-01-13 02:08:59 +0100 <monochrom> laborer my a**
2022-01-13 02:09:24 +0100 <monochrom> They are overpaid and they still hold too much bargaining power over their employers
2022-01-13 02:10:19 +0100 <Inst> in the sense that they're the only ones that know how the lighting is wired up due to insufficient documentation?
2022-01-13 02:10:28 +0100 <monochrom> In no other employment do we see employees extorting employers to unnecessarily upgrade equipment every couple of years.
2022-01-13 02:11:36 +0100cheater(~Username@user/cheater)
2022-01-13 02:11:53 +0100 <monochrom> Look at all the 4K 42" quad-head monitors and 64-core 2TB RAM computers their employers have to buy for them. And twice as much hardware at their home reflecting how highly they're paid.
2022-01-13 02:12:29 +0100 <monochrom> It also large explains bloatware and hogging websites.
2022-01-13 02:13:01 +0100 <monochrom> Now look at the number of bugs and security holes they produce.
2022-01-13 02:13:26 +0100 <monochrom> Overpaid and unchecked.
2022-01-13 02:14:04 +0100 <Inst> still being sarcastic?
2022-01-13 02:14:26 +0100 <Inst> just because you're being oppressed by your employer doesn't mean you can't be screwing the employer as well
2022-01-13 02:14:28 +0100 <geekosaur> no, this is pretty much truth :(
2022-01-13 02:14:37 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 02:14:45 +0100 <geekosaur> you don't fix bloated software any more, you throw more hardware at it
2022-01-13 02:14:51 +0100 <geekosaur> or more cloud resources
2022-01-13 02:14:55 +0100 <Inst> when i was with my service sector job, i went and quoted a Harvard Business Review article on why overtime is bad
2022-01-13 02:15:00 +0100 <Inst> in an industry where you had ton of people working overtime
2022-01-13 02:15:07 +0100 <Inst> I coined the term "overtime scammers"
2022-01-13 02:15:17 +0100 <Inst> do no work while doing overtime, get paid 1.5x
2022-01-13 02:15:26 +0100 <SethTisue__> 🎵 see we gotta be exploited, see we gotta be exploited, by somebody, by somebody, by somebody 🎵
2022-01-13 02:15:38 +0100 <Inst> at the same time, terrible base wages, terrible working conditions, etc
2022-01-13 02:15:51 +0100 <Inst> corporate policy was not being followed
2022-01-13 02:18:57 +0100Akiva(~Akiva@user/Akiva) (Ping timeout: 240 seconds)
2022-01-13 02:23:36 +0100 <Axman6> this duscussion feels more at home in r/AntiWork (or maybe r/ProEmployer?)
2022-01-13 02:25:38 +0100alx741(~alx741@157.100.93.160) (Remote host closed the connection)
2022-01-13 02:27:39 +0100DavSanchez(~DavSanche@73.red-83-34-157.dynamicip.rima-tde.net) (Quit: Ping timeout (120 seconds))
2022-01-13 02:28:13 +0100 <Axman6> i*
2022-01-13 02:31:07 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-01-13 02:35:05 +0100ProfSimm(~ProfSimm@87.227.196.109) (Ping timeout: 256 seconds)
2022-01-13 02:35:32 +0100tommd(~tommd@75-164-130-101.ptld.qwest.net)
2022-01-13 02:36:02 +0100 <EvanR> I er uh https://paste.tomsmeding.com/Em71JYTL
2022-01-13 02:36:33 +0100 <EvanR> k types are wrong
2022-01-13 02:36:54 +0100 <EvanR> -> Unfolding b s
2022-01-13 02:38:07 +0100 <Axman6> what's wrong with (,) <$> list <*> last from foldl?
2022-01-13 02:38:56 +0100 <EvanR> ah
2022-01-13 02:39:03 +0100 <monochrom> EvanR: I have a feeling that customScan has something to do with Mealy or Moore machines in the machines package. Although, the package does not carefully consider strictness.
2022-01-13 02:41:28 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4)
2022-01-13 02:43:07 +0100jinsun(~quassel@user/jinsun) (Read error: Connection reset by peer)
2022-01-13 02:44:37 +0100 <EvanR> and thanks to your previous puzzler, I see that if I wanted to skip to the End, I'd need to do it carefully
2022-01-13 02:44:49 +0100 <monochrom> :)
2022-01-13 02:48:50 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 02:55:33 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-01-13 02:59:23 +0100 <EvanR> Axman6, wait wait wait...
2022-01-13 02:59:41 +0100 <EvanR> what does that give you, (the list, last (the list)) ?
2022-01-13 03:00:14 +0100 <Axman6> yes
2022-01-13 03:00:28 +0100 <Axman6> list accumulates it in reverse order and reverses it though
2022-01-13 03:00:47 +0100 <EvanR> head scratch
2022-01-13 03:01:41 +0100 <EvanR> well, that's what's wrong with it xD
2022-01-13 03:02:19 +0100 <EvanR> you could skip that by just saving the original list
2022-01-13 03:02:52 +0100 <Axman6> it does decouple the original list and the new one's spines though
2022-01-13 03:03:09 +0100 <EvanR> I guess
2022-01-13 03:06:37 +0100mmhat(~mmh@55d44405.access.ecotel.net) (Ping timeout: 240 seconds)
2022-01-13 03:07:00 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
2022-01-13 03:07:47 +0100drtonkey(~drtonkey@173.28.219.99)
2022-01-13 03:08:54 +0100drtonkey(~drtonkey@173.28.219.99) ()
2022-01-13 03:09:04 +0100xkuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2022-01-13 03:11:34 +0100califax-(~califax@user/califx)
2022-01-13 03:12:05 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 03:14:20 +0100little_mac(~little_ma@2601:410:4300:3ce0:7d45:c5da:471f:1879) (Remote host closed the connection)
2022-01-13 03:14:48 +0100califax(~califax@user/califx) (Ping timeout: 276 seconds)
2022-01-13 03:14:49 +0100califax-califax
2022-01-13 03:16:59 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 03:17:02 +0100wrengr(~wrengr@150.12.83.34.bc.googleusercontent.com) (Quit: leaving)
2022-01-13 03:22:16 +0100 <jackdk> Any haskell-on-windows people here? I would like to know whether `lookupEnv "%UserProfile%"` or `lookupEnv "UserProfile"` is the correct form of the call.
2022-01-13 03:23:54 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
2022-01-13 03:25:44 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-01-13 03:26:00 +0100lagash(lagash@lagash.shelltalk.net) (Remote host closed the connection)
2022-01-13 03:26:30 +0100neurocyte091705(~neurocyte@user/neurocyte)
2022-01-13 03:28:48 +0100neurocyte09170(~neurocyte@user/neurocyte) (Ping timeout: 250 seconds)
2022-01-13 03:28:48 +0100neurocyte091705neurocyte09170
2022-01-13 03:28:57 +0100xff0x(~xff0x@2001:1a81:538c:a900:ca7a:63a1:efb3:59ef) (Ping timeout: 240 seconds)
2022-01-13 03:30:23 +0100lagash(lagash@lagash.shelltalk.net)
2022-01-13 03:31:00 +0100xff0x(~xff0x@2001:1a81:5213:d00:a0e3:bed3:6536:d79e)
2022-01-13 03:33:00 +0100 <EvanR> data Unfolding ω a = End ω | Cons a (Unfolding ω a)
2022-01-13 03:33:05 +0100 <EvanR> forUnfolding_ :: Monad m => (a -> m ()) -> Unfolding ω a -> m ω
2022-01-13 03:33:21 +0100 <EvanR> Traversable was hurting my head
2022-01-13 03:33:49 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-01-13 03:38:59 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4)
2022-01-13 03:43:15 +0100superbil(~superbil@1-34-176-171.hinet-ip.hinet.net) (Quit: WeeChat 3.3)
2022-01-13 03:44:57 +0100polyphem_(~rod@2a02:810d:840:8754:e450:3ca3:b389:687a) (Ping timeout: 240 seconds)
2022-01-13 03:45:32 +0100polyphem_(~rod@2a02:810d:840:8754:e450:3ca3:b389:687a)
2022-01-13 03:46:11 +0100 <EvanR> https://paste.tomsmeding.com/yaMAo2E7
2022-01-13 03:46:37 +0100f33d1[m](~g0nkstead@2001:470:69fc:105::1:320b)
2022-01-13 03:47:21 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2022-01-13 03:47:26 +0100Midjak(~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
2022-01-13 03:51:49 +0100raym(~raym@user/raym) (Ping timeout: 240 seconds)
2022-01-13 03:55:33 +0100benin(~benin@183.82.30.17)
2022-01-13 03:56:16 +0100aeka`(~aeka@2606:6080:1001:f:ed79:9361:ea0e:3e88) (Read error: Connection reset by peer)
2022-01-13 03:57:40 +0100 <EvanR> oh that's traverse
2022-01-13 03:59:00 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
2022-01-13 04:01:22 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-01-13 04:02:23 +0100superbil(~superbil@1-34-176-171.hinet-ip.hinet.net)
2022-01-13 04:03:40 +0100jinsun(~quassel@user/jinsun)
2022-01-13 04:05:10 +0100aeka(~aeka@user/hiruji)
2022-01-13 04:06:19 +0100hueso_(~root@user/hueso) (Ping timeout: 256 seconds)
2022-01-13 04:11:04 +0100nhs_(~nhs@136.49.226.20)
2022-01-13 04:11:04 +0100nhs(~nhs@136.49.226.20) (Read error: Connection reset by peer)
2022-01-13 04:13:28 +0100hueso(~root@user/hueso)
2022-01-13 04:16:26 +0100 <catern> idea: when you instatiate a smart constructor with a literal value, your IDE should do partial evaluation to tell you at the time that you write the value down, if it will pass the smart constructore's checks
2022-01-13 04:16:33 +0100 <catern> has any project ever done this?
2022-01-13 04:19:45 +0100 <Axman6> it can be done with template haskell but there isn't a way to tell the compiler to do that
2022-01-13 04:26:45 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-01-13 04:28:16 +0100euandreh(~euandreh@2804:14c:33:9fe5:567f:a71e:f346:c5f0) (Ping timeout: 245 seconds)
2022-01-13 04:28:53 +0100aeka(~aeka@user/hiruji) (Read error: Connection reset by peer)
2022-01-13 04:30:39 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Client Quit)
2022-01-13 04:31:47 +0100aeka(~aeka@user/hiruji)
2022-01-13 04:32:52 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-01-13 04:33:41 +0100raym(~raym@user/raym)
2022-01-13 04:36:03 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Client Quit)
2022-01-13 04:37:04 +0100vglfr(~vglfr@46.96.134.134) (Ping timeout: 256 seconds)
2022-01-13 04:40:00 +0100aeka(~aeka@user/hiruji) (Read error: Connection reset by peer)
2022-01-13 04:40:48 +0100perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-01-13 04:41:01 +0100td_(~td@94.134.91.149) (Ping timeout: 240 seconds)
2022-01-13 04:41:22 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 04:42:03 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 04:42:48 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-01-13 04:42:57 +0100td_(~td@muedsl-82-207-238-204.citykom.de)
2022-01-13 04:43:06 +0100aeka(~aeka@user/hiruji)
2022-01-13 04:43:59 +0100vglfr(~vglfr@46.96.134.134)
2022-01-13 04:44:02 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-01-13 04:45:05 +0100vysn(~vysn@user/vysn)
2022-01-13 04:45:22 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 04:46:11 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 04:47:55 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 04:48:13 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Ping timeout: 240 seconds)
2022-01-13 04:49:41 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-01-13 04:51:52 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 04:52:13 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
2022-01-13 04:52:30 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 04:58:51 +0100raym(~raym@user/raym) (Quit: kernel update, rebooting...)
2022-01-13 04:59:33 +0100aeka(~aeka@user/hiruji) (Read error: Connection reset by peer)
2022-01-13 05:00:01 +0100haasn(~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
2022-01-13 05:00:42 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
2022-01-13 05:01:22 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 05:01:26 +0100tommd(~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 256 seconds)
2022-01-13 05:01:26 +0100haasn(~nand@haasn.dev)
2022-01-13 05:02:22 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 05:02:59 +0100aeka(~aeka@user/hiruji)
2022-01-13 05:03:02 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 05:03:26 +0100img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-01-13 05:03:41 +0100motherfsck(~motherfsc@user/motherfsck) (Read error: Connection reset by peer)
2022-01-13 05:04:42 +0100vysn(~vysn@user/vysn) (Remote host closed the connection)
2022-01-13 05:04:50 +0100img(~img@user/img)
2022-01-13 05:08:28 +0100aeka(~aeka@user/hiruji) (Read error: Connection reset by peer)
2022-01-13 05:11:19 +0100raym(~raym@user/raym)
2022-01-13 05:12:12 +0100aeka(~aeka@user/hiruji)
2022-01-13 05:12:12 +0100euandreh(~euandreh@2804:14c:33:9fe5:b997:c1f9:27c:1247)
2022-01-13 05:13:16 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 245 seconds)
2022-01-13 05:13:58 +0100aeka(~aeka@user/hiruji) (Read error: Connection reset by peer)
2022-01-13 05:15:35 +0100razetime(~quassel@49.207.203.87)
2022-01-13 05:16:35 +0100aeka(~aeka@user/hiruji)
2022-01-13 05:16:35 +0100aeka(~aeka@user/hiruji) (Read error: Connection reset by peer)
2022-01-13 05:19:34 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 05:20:46 +0100retroid_(~retro@2e40edd9.skybroadband.com)
2022-01-13 05:25:21 +0100mbuf(~Shakthi@122.174.222.201)
2022-01-13 05:26:39 +0100waleee(~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 250 seconds)
2022-01-13 05:28:57 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
2022-01-13 05:30:21 +0100deadmarshal(~deadmarsh@95.38.231.124)
2022-01-13 05:31:11 +0100aeka(~aeka@user/hiruji)
2022-01-13 05:32:13 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 05:36:57 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 05:37:01 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2022-01-13 05:37:13 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 05:40:46 +0100zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-01-13 05:46:40 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 05:47:21 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 05:53:49 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
2022-01-13 05:57:10 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 05:57:54 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 06:05:49 +0100geranim0(~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Ping timeout: 240 seconds)
2022-01-13 06:07:40 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 06:08:21 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 06:09:28 +0100talismanick(~talismani@c-67-164-73-220.hsd1.ca.comcast.net) (Remote host closed the connection)
2022-01-13 06:18:30 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 06:18:49 +0100vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-01-13 06:18:52 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 06:28:41 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 06:29:16 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 06:29:21 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 06:30:06 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 06:30:06 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 06:30:06 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 06:33:34 +0100bliminse(~bliminse@host86-188-36-178.range86-188.btcentralplus.com) (Quit: leaving)
2022-01-13 06:34:47 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 06:42:34 +0100hugo-hugo
2022-01-13 06:42:49 +0100fef(~thedawn@user/thedawn)
2022-01-13 06:43:05 +0100bliminse(~bliminse@host86-188-36-178.range86-188.btcentralplus.com)
2022-01-13 06:56:28 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-01-13 06:56:47 +0100jackson99(~bc8147f2@cerf.good1.com)
2022-01-13 06:58:32 +0100 <jackson99> hi. I am parsing json with aeson, and my field names don't match json names (there is mytypeField prefix, which json obviously doesn't have). do I have to write my own FromJSON instance or is there a more automatic way of doing this?
2022-01-13 06:58:41 +0100ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Ping timeout: 245 seconds)
2022-01-13 06:58:49 +0100ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
2022-01-13 07:00:23 +0100 <jackson99> json also has "alpha-3" key, which may be problematic
2022-01-13 07:02:01 +0100 <c_wraith> if you are parsing json from a source not under your control, you generally have to write your own instances.
2022-01-13 07:02:12 +0100 <c_wraith> ... If the input is consistently formatted.
2022-01-13 07:02:20 +0100 <c_wraith> If it isn't, you can just work with Value
2022-01-13 07:03:47 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-01-13 07:03:49 +0100 <jackdk> I generally prefer to manually write instances, because generically-derived instances often silently change format if you refactor the types.
2022-01-13 07:04:01 +0100 <c_wraith> aeson doesn't require you to parse to a domain data type. If the content isn't part of your domain data, don't.
2022-01-13 07:04:17 +0100 <jackdk> This can also be avoided if you are disciplined in your separation of serialisation types from domain type
2022-01-13 07:04:44 +0100 <jackson99> json isn't under my control. but I thought there was an automatic way of adding haskell type prefix
2022-01-13 07:06:56 +0100 <c_wraith> you can play around with the stuff in Data.Aeson.TH, if you want. It probably won't do what you want.
2022-01-13 07:07:00 +0100 <EvanR> actually having json under my control, and having it have terrible haskell field names, sounds terrible xD
2022-01-13 07:08:50 +0100 <EvanR> json lets you use basic words and lets them collide, it's great
2022-01-13 07:09:10 +0100 <c_wraith> these days having terrible field names in haskell is opt-in
2022-01-13 07:13:16 +0100vglfr(~vglfr@46.96.134.134) (Ping timeout: 250 seconds)
2022-01-13 07:13:21 +0100nunggu(~q@gateway/tor-sasl/nunggu) (Ping timeout: 276 seconds)
2022-01-13 07:14:37 +0100 <EvanR> really
2022-01-13 07:14:47 +0100 <jackson99> are you hinting at record dot syntax?
2022-01-13 07:14:58 +0100 <EvanR> which extensions do I enable to not opt-in
2022-01-13 07:15:49 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 07:17:45 +0100 <jackson99> is it worth using Map over list for just 249 elements?
2022-01-13 07:17:57 +0100 <jackson99> probably not?
2022-01-13 07:21:13 +0100 <EvanR> usually the problem is list doesn't have the API you want, if you should be using Map
2022-01-13 07:21:31 +0100 <jackson99> find is good enough
2022-01-13 07:21:36 +0100 <EvanR> so you end up writing janky list processing functions that Map already has
2022-01-13 07:21:45 +0100 <EvanR> if find is enough then great
2022-01-13 07:22:05 +0100BrokenClutch(~pioneer@2804:d41:c292:6c00:33d8:d2f1:d8af:153e)
2022-01-13 07:22:14 +0100 <EvanR> :t find
2022-01-13 07:22:14 +0100 <jackson99> I am looking up same list by 5 different things, so I'd need 5 Maps
2022-01-13 07:22:15 +0100 <lambdabot> Foldable t => (a -> Bool) -> t a -> Maybe a
2022-01-13 07:22:23 +0100 <EvanR> Data.Map won't even help with that
2022-01-13 07:23:11 +0100hugo(znc@verdigris.lysator.liu.se) (Quit: ZNC 1.8.2 - https://znc.in)
2022-01-13 07:23:32 +0100 <BrokenClutch> Uh, before sleep a question came to my mind. What you all think about haskell's future?
2022-01-13 07:23:58 +0100 <BrokenClutch> I'm like, new to the thing and I don't care much for that stuff. But some people that I try to show haskell to
2022-01-13 07:24:18 +0100 <EvanR> the blind leading the blind?
2022-01-13 07:24:22 +0100 <dibblego> go to sleep
2022-01-13 07:24:28 +0100 <BrokenClutch> ask me this same question and I really don't know how to answer
2022-01-13 07:24:40 +0100 <BrokenClutch> I expected these responses
2022-01-13 07:24:48 +0100 <BrokenClutch> And I'm quite happy about them
2022-01-13 07:24:57 +0100 <EvanR> learn haskell before becoming an evangelist
2022-01-13 07:25:15 +0100hugo(znc@verdigris.lysator.liu.se)
2022-01-13 07:25:18 +0100 <BrokenClutch> Is it the leap of faith thing?
2022-01-13 07:26:32 +0100 <BrokenClutch> dibblego: Yeah, I should, good night
2022-01-13 07:26:37 +0100 <dibblego> g'night
2022-01-13 07:27:17 +0100BrokenClutch(~pioneer@2804:d41:c292:6c00:33d8:d2f1:d8af:153e) ()
2022-01-13 07:27:46 +0100notzmv(~zmv@user/notzmv)
2022-01-13 07:28:37 +0100 <jackson99> would you use Int or String type for country numeric code? code can have leading zeroes, so I am not sure if Int is appropriate. https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes#Current_ISO_3166_country_codes
2022-01-13 07:29:06 +0100 <dibblego> (DecDigit, DecDigit, DecDigit)
2022-01-13 07:29:37 +0100chomwitt(~chomwitt@ppp-94-67-201-202.home.otenet.gr)
2022-01-13 07:29:49 +0100 <dolio> Int has plenty of leading zeroes.
2022-01-13 07:29:50 +0100nunggu(~q@gateway/tor-sasl/nunggu)
2022-01-13 07:29:51 +0100 <jackson99> directly like that, or wrapped in a type?
2022-01-13 07:30:08 +0100 <dibblego> I'd probably enumerate them tbh, because I'm like that
2022-01-13 07:30:44 +0100 <jackson99> dolio yeah that is true, 001 is a valid Int. maybe I'm being too OCD
2022-01-13 07:31:12 +0100 <EvanR> are the leading zeros significant in anyway or just format padding
2022-01-13 07:31:22 +0100 <dolio> You should probably make a separate type for it regardless.
2022-01-13 07:31:56 +0100 <EvanR> newtype CountryCode = CountryCode { noCountry :: Int }
2022-01-13 07:32:33 +0100 <jackson99> EvanR they don't seem to be significant
2022-01-13 07:32:48 +0100 <EvanR> bureaucratic nonsense then xD
2022-01-13 07:34:25 +0100mikoto-chan(~mikoto-ch@194.157.16.89)
2022-01-13 07:34:50 +0100falafel(~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com)
2022-01-13 07:36:04 +0100 <EvanR> country code 0 and 00 every time baby
2022-01-13 07:37:17 +0100shapr(~user@2601:7c0:c202:5190:f73c:d98b:42b3:a084) (Ping timeout: 240 seconds)
2022-01-13 07:37:55 +0100slowButPresent(~slowButPr@user/slowbutpresent) (Quit: leaving)
2022-01-13 07:39:54 +0100Jing(~hedgehog@240e:390:7c53:a7e1:91de:85f0:a816:591c)
2022-01-13 07:43:11 +0100megaTherion_megaTherion
2022-01-13 07:46:46 +0100_ht(~quassel@82-168-34-160.fixed.kpn.net)
2022-01-13 07:47:27 +0100 <opqdonut> phone numbers in general are [Digit], not Integer
2022-01-13 07:47:43 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 07:47:51 +0100 <opqdonut> so I'd store the country codes as [Digit] for ease of concatting with the [Digit] the user has given you
2022-01-13 07:48:11 +0100 <opqdonut> (thinking of the usual web form thing where you have a dropdrown for the country code and then you enter your phone number next to it)
2022-01-13 07:50:09 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 07:51:27 +0100mikoto-chan(~mikoto-ch@194.157.16.89) (Quit: mikoto-chan)
2022-01-13 07:56:16 +0100vicfred(~vicfred@user/vicfred)
2022-01-13 08:00:56 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 250 seconds)
2022-01-13 08:03:05 +0100falafel(~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com) (Remote host closed the connection)
2022-01-13 08:03:21 +0100falafel(~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com)
2022-01-13 08:03:53 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 08:07:07 +0100eldritch_(~eldritch@user/eldritch/x-9272577) (Quit: bye)
2022-01-13 08:07:22 +0100justIrresolute(~justache@user/justache) (Remote host closed the connection)
2022-01-13 08:07:57 +0100eldritch_(~eldritch@user/eldritch/x-9272577)
2022-01-13 08:08:14 +0100justIrresolute(~justache@user/justache)
2022-01-13 08:18:02 +0100shriekingnoise(~shrieking@181.229.0.83) (Quit: Quit)
2022-01-13 08:21:01 +0100mikoto-chan(~mikoto-ch@194.157.37.35)
2022-01-13 08:21:37 +0100schweers(~user@i59F630AB.versanet.de)
2022-01-13 08:23:11 +0100fizbin(~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
2022-01-13 08:26:38 +0100schweers(~user@i59F630AB.versanet.de) (Remote host closed the connection)
2022-01-13 08:27:25 +0100 <jackson99> @hoogle String -> String -> String -> String
2022-01-13 08:27:26 +0100 <lambdabot> Basement.String replace :: String -> String -> String -> String
2022-01-13 08:27:26 +0100 <lambdabot> Foundation.String replace :: String -> String -> String -> String
2022-01-13 08:27:26 +0100 <lambdabot> XMonad.Hooks.DynamicLog wrap :: String -> String -> String -> String
2022-01-13 08:28:00 +0100 <jackson99> which one of the two packages with replace should I use? or should I just roll my own
2022-01-13 08:30:32 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 256 seconds)
2022-01-13 08:37:02 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 08:37:48 +0100 <tdmm> @hoogle [a] -> [a] -> [a] -> [a]
2022-01-13 08:37:49 +0100 <lambdabot> Language.Fixpoint.Misc wrap :: [a] -> [a] -> [a] -> [a]
2022-01-13 08:37:49 +0100 <lambdabot> Data.List.Utils replace :: Eq a => [a] -> [a] -> [a] -> [a]
2022-01-13 08:37:49 +0100 <lambdabot> Data.String.Utils replace :: Eq a => [a] -> [a] -> [a] -> [a]
2022-01-13 08:39:05 +0100 <EvanR> package stringsearch looked promising back in the day, it has replace. Also it's ByteString
2022-01-13 08:43:06 +0100qhong(~qhong@rescomp-21-400677.stanford.edu)
2022-01-13 08:43:24 +0100opticblast(~june@secure-165.caltech.edu) (Ping timeout: 250 seconds)
2022-01-13 08:43:33 +0100akurilin_(uid322841@id-322841.ilkley.irccloud.com)
2022-01-13 08:43:42 +0100nunggu(~q@gateway/tor-sasl/nunggu) (Ping timeout: 276 seconds)
2022-01-13 08:43:58 +0100coot(~coot@89-64-85-93.dynamic.chello.pl)
2022-01-13 08:44:55 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2022-01-13 08:45:07 +0100qhong_(~qhong@rescomp-21-400677.stanford.edu) (Ping timeout: 256 seconds)
2022-01-13 08:45:22 +0100gehmehgeh(~user@user/gehmehgeh)
2022-01-13 08:45:31 +0100nunggu(~q@gateway/tor-sasl/nunggu)
2022-01-13 08:45:39 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
2022-01-13 08:45:53 +0100ahammer(~ahammer@157.122.68.247)
2022-01-13 08:46:32 +0100yauhsien_(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 08:46:58 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-01-13 08:46:58 +0100superbil(~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 256 seconds)
2022-01-13 08:50:12 +0100`2jt(~jtomas@10.red-83-58-228.dynamicip.rima-tde.net)
2022-01-13 08:51:31 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:c21f:deb4:93f3:3ef9)
2022-01-13 08:51:34 +0100schweers(~user@2001:16b8:e978:5100:aaa1:59ff:fe3f:235c)
2022-01-13 08:51:38 +0100unyu(~pyon@user/pyon) (Quit: brb)
2022-01-13 08:52:20 +0100lavaman(~lavaman@98.38.249.169) (Read error: Connection reset by peer)
2022-01-13 08:52:38 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 08:54:52 +0100schuelermine(~schuelerm@user/schuelermine)
2022-01-13 08:56:42 +0100HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato) (Ping timeout: 276 seconds)
2022-01-13 08:57:12 +0100razetime(~quassel@49.207.203.87) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-01-13 08:57:26 +0100HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato)
2022-01-13 08:59:35 +0100juhp(~juhp@128.106.188.82) (Quit: juhp)
2022-01-13 08:59:43 +0100superbil(~superbil@1-34-176-171.hinet-ip.hinet.net)
2022-01-13 09:00:59 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-01-13 09:04:05 +0100 <schuelermine> monochrom: Where is the problem with this?
2022-01-13 09:05:09 +0100 <schuelermine> Also, why are polymorphic instances disallowed? The instances themselves can be represented just fine given ImpredicativeTypes is now a thing
2022-01-13 09:05:28 +0100vpan(~0@212.117.1.172)
2022-01-13 09:05:37 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 240 seconds)
2022-01-13 09:05:39 +0100 <schuelermine> sadly J can't thmest with them because I'm on Android and the only run able binary I could is ghc 8m10
2022-01-13 09:05:57 +0100 <schuelermine> no wait it's 8.8
2022-01-13 09:06:05 +0100 <jackson99> can aeson be used to partially parse json? I only need a couple of fields, out of several dozen
2022-01-13 09:07:10 +0100 <siers> jackson99, you can make another data type with Maybes for those cases
2022-01-13 09:08:33 +0100 <jackson99> is there no way to avoid having to name all the fields, when I need only a few?
2022-01-13 09:09:06 +0100 <siers> unneeded fields are probably going to be ignored
2022-01-13 09:09:43 +0100 <siers> I haven't checked, but it should be that way – if you parse an object with x, y, z, but data is only data Data = { x ::, y :: } it's going to parse
2022-01-13 09:09:58 +0100mc47(~mc47@xmonad/TheMC47)
2022-01-13 09:10:30 +0100 <siers> it should be that way because otherwise backwards compatibility is ruined
2022-01-13 09:10:40 +0100hololeap_(~hololeap@user/hololeap) (Read error: Connection reset by peer)
2022-01-13 09:11:02 +0100 <dminuoso> jackson99: Yes.
2022-01-13 09:11:05 +0100 <jackson99> you're right! they are ignored
2022-01-13 09:11:14 +0100 <dminuoso> Or rather it depends.
2022-01-13 09:11:32 +0100 <dminuoso> There are generics options that let it not ignore extra fields
2022-01-13 09:11:40 +0100 <dminuoso> So you can have it both ways
2022-01-13 09:12:00 +0100hololeap_(~hololeap@user/hololeap)
2022-01-13 09:12:10 +0100 <siers> I was thinking it's probably configurable
2022-01-13 09:12:46 +0100 <jackson99> I am manually writing FromJSON instance, so it just works. perhaps it wouldn't if I just used default instance
2022-01-13 09:13:03 +0100 <dminuoso> jackson99: It would, you can trivially configure it.
2022-01-13 09:13:45 +0100 <dminuoso> https://hackage.haskell.org/package/aeson-2.0.3.0/docs/Data-Aeson.html#v:rejectUnknownFields
2022-01-13 09:13:47 +0100 <jackson99> how about field name mismatch? json has "field", while haskell data is "dataNameField"
2022-01-13 09:14:03 +0100 <dminuoso> jackson99: Same story.
2022-01-13 09:14:14 +0100cfricke(~cfricke@user/cfricke)
2022-01-13 09:14:42 +0100 <dminuoso> So the default implementation for FromJSON looks like this: https://hackage.haskell.org/package/aeson-2.0.3.0/docs/src/Data.Aeson.Types.FromJSON.html#parseJSON
2022-01-13 09:14:50 +0100 <dminuoso> parseJSON = genericParseJSON defaultOptions
2022-01-13 09:14:57 +0100 <jackson99> and weirdly named json fields? alpha-3, while haskell field name is dataNameAlpha3? I need yet another flag for that? :)
2022-01-13 09:15:11 +0100 <dminuoso> Note that defaultOptions :: Options
2022-01-13 09:15:12 +0100ubert(~Thunderbi@p200300ecdf0994878c88f9c813554c3f.dip0.t-ipconnect.de)
2022-01-13 09:15:32 +0100 <dminuoso> You can use field accessors to change it like this:
2022-01-13 09:16:09 +0100 <dminuoso> `genericParseJSON defaultOptions{ fieldLabelModifier = stripping "dataNameField" }` given a suitable function `stripping :: String -> String -> String`
2022-01-13 09:16:19 +0100 <dminuoso> Err sorry a slight typo
2022-01-13 09:16:36 +0100 <dminuoso> genericParseJSON defaultOptions{ fieldLabelModifier = stripping "dataName" }
2022-01-13 09:17:12 +0100juhp(~juhp@128.106.188.82)
2022-01-13 09:17:35 +0100 <dminuoso> So fieldLabelModifier is some arbitrary function that maps the Haskell field name to the JSON field name. It defaults to id
2022-01-13 09:17:44 +0100 <dminuoso> Does this make any sense to you?
2022-01-13 09:18:00 +0100ahammer(~ahammer@157.122.68.247) (Quit: Leaving)
2022-01-13 09:18:15 +0100 <jackson99> it makes sense, I just need to string it all together
2022-01-13 09:20:15 +0100fizbin(~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds)
2022-01-13 09:21:08 +0100mtjm(~mutantmel@2604:a880:2:d0::208b:d001) (Remote host closed the connection)
2022-01-13 09:21:22 +0100MajorBiscuit(~MajorBisc@86-88-79-148.fixed.kpn.net)
2022-01-13 09:22:11 +0100mtjm(~mutantmel@2604:a880:2:d0::208b:d001)
2022-01-13 09:22:28 +0100Major_Biscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl)
2022-01-13 09:22:45 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-01-13 09:23:16 +0100mikoto-chan(~mikoto-ch@194.157.37.35) (Ping timeout: 250 seconds)
2022-01-13 09:26:16 +0100Jing(~hedgehog@240e:390:7c53:a7e1:91de:85f0:a816:591c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-01-13 09:26:18 +0100MajorBiscuit(~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 250 seconds)
2022-01-13 09:26:23 +0100fef(~thedawn@user/thedawn) (Quit: Leaving)
2022-01-13 09:27:39 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 09:28:44 +0100michalz(~michalz@185.246.204.97)
2022-01-13 09:29:20 +0100chele(~chele@user/chele)
2022-01-13 09:29:30 +0100dut(~dut@user/dut) (Quit: Leaving)
2022-01-13 09:34:37 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds)
2022-01-13 09:35:38 +0100random__(~random@185.219.68.251)
2022-01-13 09:37:49 +0100random_(~random@185.219.68.251) (Ping timeout: 240 seconds)
2022-01-13 09:41:30 +0100max22-(~maxime@2a01cb088335980020904b4e9299912b.ipv6.abo.wanadoo.fr)
2022-01-13 09:41:47 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-01-13 09:43:00 +0100Jing(~hedgehog@240e:390:7c53:a7e1:1910:eb62:16d3:8874)
2022-01-13 09:43:43 +0100dut(~dut@user/dut)
2022-01-13 09:45:06 +0100Jing_(~hedgehog@240e:390:7c53:a7e1:dddb:2811:79d2:379)
2022-01-13 09:46:17 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 09:48:17 +0100Jing(~hedgehog@240e:390:7c53:a7e1:1910:eb62:16d3:8874) (Ping timeout: 240 seconds)
2022-01-13 09:51:24 +0100machinedgod(~machinedg@24.105.81.50)
2022-01-13 09:52:44 +0100Major_Biscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl) (Ping timeout: 250 seconds)
2022-01-13 09:53:09 +0100MajorBiscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl)
2022-01-13 09:54:38 +0100max22-(~maxime@2a01cb088335980020904b4e9299912b.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2022-01-13 09:55:25 +0100max22-(~maxime@2a01cb0883359800761b1c69d9198b7f.ipv6.abo.wanadoo.fr)
2022-01-13 09:55:57 +0100schuelermine(~schuelerm@user/schuelermine) (Ping timeout: 256 seconds)
2022-01-13 09:58:34 +0100schuelermine(~schuelerm@user/schuelermine)
2022-01-13 10:00:08 +0100puffnfresh[m](~puffnfres@2001:470:69fc:105::1:22da) (Quit: You have been kicked for being idle)
2022-01-13 10:01:01 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-01-13 10:03:34 +0100coot(~coot@89-64-85-93.dynamic.chello.pl) (Remote host closed the connection)
2022-01-13 10:04:04 +0100coot(~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827)
2022-01-13 10:05:49 +0100coot(~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827) (Remote host closed the connection)
2022-01-13 10:07:14 +0100coot(~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827)
2022-01-13 10:07:27 +0100qeqeqw(~qeqeqw3@2001:861:3a04:e320:31ea:a59b:1c06:51f4)
2022-01-13 10:12:47 +0100max22-(~maxime@2a01cb0883359800761b1c69d9198b7f.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2022-01-13 10:13:02 +0100max22-(~maxime@2a01cb08833598000df4e5a73d13ef2b.ipv6.abo.wanadoo.fr)
2022-01-13 10:15:50 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2022-01-13 10:17:08 +0100max22-(~maxime@2a01cb08833598000df4e5a73d13ef2b.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2022-01-13 10:17:23 +0100max22-(~maxime@2a01cb08833598000df4e5a73d13ef2b.ipv6.abo.wanadoo.fr)
2022-01-13 10:17:31 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-01-13 10:17:31 +0100allbery_b(~geekosaur@xmonad/geekosaur)
2022-01-13 10:17:34 +0100allbery_bgeekosaur
2022-01-13 10:18:02 +0100max22-(~maxime@2a01cb08833598000df4e5a73d13ef2b.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2022-01-13 10:18:09 +0100acidjnk(~acidjnk@p200300d0c7271e5531e75586a8fe0593.dip0.t-ipconnect.de)
2022-01-13 10:20:12 +0100Guest20(~Guest20@217.155.25.33)
2022-01-13 10:20:30 +0100max22-(~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
2022-01-13 10:21:37 +0100Guest20cstml
2022-01-13 10:23:35 +0100cstml(~Guest20@217.155.25.33) (Client Quit)
2022-01-13 10:23:49 +0100cstml(~cstml@217.155.25.33)
2022-01-13 10:25:56 +0100vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-01-13 10:26:10 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-01-13 10:26:32 +0100cstml(~cstml@217.155.25.33) (Changing host)
2022-01-13 10:26:32 +0100cstml(~cstml@user/cstml)
2022-01-13 10:28:58 +0100cstml(~cstml@user/cstml) (Quit: Connection closed)
2022-01-13 10:29:13 +0100cstml(~cstml@user/cstml)
2022-01-13 10:29:20 +0100unyu(~pyon@user/pyon)
2022-01-13 10:29:36 +0100superstar64(~superstar@2600:1700:ed80:50a0:d250:99ff:fe2c:53c4)
2022-01-13 10:30:59 +0100 <superstar64> Is it possible to define something like `typeLamIO :: (forall a. IO (F a)) -> IO (forall a. F a)` assuming impredecative types?
2022-01-13 10:32:38 +0100 <lortabac> superstar64: what would this function do?
2022-01-13 10:34:34 +0100 <superstar64> I'm trying to add first class polymorphism to my effect system and this sort of function being legal would be really useful.
2022-01-13 10:37:06 +0100 <superstar64> I kinda have a gut feeling it's impossible because it seems it would allow things that the value restriction disallows in ml.
2022-01-13 10:39:20 +0100mmhat(~mmh@55d451ef.access.ecotel.net)
2022-01-13 10:39:56 +0100 <superstar64> `typeLamIO (newIORef []) : IO (forall a. IORef [a])`
2022-01-13 10:40:53 +0100jle`(~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 256 seconds)
2022-01-13 10:41:24 +0100 <Axman6> the ol' unsafeCoerce IORef
2022-01-13 10:41:37 +0100 <dminuoso> % data F a = F
2022-01-13 10:41:37 +0100 <yahb> dminuoso:
2022-01-13 10:41:46 +0100 <dminuoso> % f :: (forall a. IO (F a)) -> IO (forall a. F a); f = unsafeCoerce
2022-01-13 10:41:46 +0100 <yahb> dminuoso:
2022-01-13 10:42:09 +0100 <dminuoso> ImpredicativeTypes was enabled previously in a query
2022-01-13 10:42:32 +0100 <dminuoso> This looks benign
2022-01-13 10:42:54 +0100jle`(~jle`@cpe-23-240-75-236.socal.res.rr.com)
2022-01-13 10:43:29 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 10:43:29 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 10:43:29 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 10:44:10 +0100nschoe(~quassel@2a01:e0a:8e:a190:3e5c:6874:4d71:3988)
2022-01-13 10:46:09 +0100pritambaral(~pritam@user/pritambaral)
2022-01-13 10:46:52 +0100 <superstar64> `typeLam :: (forall a. F a) -> IO (forall a. F a)` is obviously safe
2022-01-13 10:47:05 +0100 <superstar64> so `typeLamSTPure :: (forall a s. ST s (F a)) -> ST s (forall a. F a)` should be too
2022-01-13 10:48:12 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 10:53:41 +0100dhouthoo(~dhouthoo@178-117-36-167.access.telenet.be)
2022-01-13 10:55:44 +0100Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
2022-01-13 11:00:32 +0100kaph_(~kaph@net-2-38-107-19.cust.vodafonedsl.it)
2022-01-13 11:00:53 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-01-13 11:01:06 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-01-13 11:01:35 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 11:02:59 +0100kaph(~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Ping timeout: 256 seconds)
2022-01-13 11:05:37 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
2022-01-13 11:06:13 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-01-13 11:07:42 +0100schuelermine(~schuelerm@user/schuelermine) (Ping timeout: 250 seconds)
2022-01-13 11:07:48 +0100qeqeqw(~qeqeqw3@2001:861:3a04:e320:31ea:a59b:1c06:51f4) (Quit: Leaving)
2022-01-13 11:09:28 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
2022-01-13 11:12:39 +0100hololeap(~hololeap@user/hololeap)
2022-01-13 11:13:06 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-01-13 11:13:12 +0100hololeap_(~hololeap@user/hololeap) (Ping timeout: 276 seconds)
2022-01-13 11:13:49 +0100kuribas(~user@ptr-25vy0i9uvgk6lbwz9nb.18120a2.ip6.access.telenet.be)
2022-01-13 11:14:17 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 11:14:17 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 11:14:17 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 11:14:28 +0100 <kuribas> In order to parse whitespace, isn't it easier to tokenize first?
2022-01-13 11:14:32 +0100 <kuribas> I find handling whitespace can become quite messy...
2022-01-13 11:14:43 +0100schuelermine(~schuelerm@user/schuelermine)
2022-01-13 11:14:45 +0100xb0o2(~xb0o2@user/xb0o2)
2022-01-13 11:15:56 +0100 <dminuoso> kuribas: It depends. If you establish some `token` combinator that eats leading or trailing whitespacd and consistently use it, it can work.
2022-01-13 11:16:16 +0100 <kuribas> right, that could work as well...
2022-01-13 11:19:25 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 11:20:39 +0100 <merijn> kuribas: The trick is to not deal with whitespace at all :p
2022-01-13 11:21:01 +0100 <merijn> That's the main reason to tokenize, tbh "remove whitespace from input stream"
2022-01-13 11:21:19 +0100 <kuribas> merijn: to prohibit all whitespace? :-O
2022-01-13 11:21:45 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 250 seconds)
2022-01-13 11:22:23 +0100 <merijn> kuribas: no, the point of lexing is to convert text including whitespace into a stream of tokens (which no longer contain whitespace)
2022-01-13 11:23:24 +0100 <kuribas> merijn: I am not sure what you are suggesting to do?
2022-01-13 11:24:21 +0100 <merijn> kuribas: You said "isn't it easier to tokenize", I'm saying "yes, that's why you even do tokenization"
2022-01-13 11:25:02 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-01-13 11:30:45 +0100Franciman(~Franciman@mx1.fracta.dev)
2022-01-13 11:30:49 +0100 <Franciman> haskell is gruesome
2022-01-13 11:30:51 +0100Franciman(~Franciman@mx1.fracta.dev) (WeeChat 3.4)
2022-01-13 11:31:23 +0100Franciman(~Franciman@mx1.fracta.dev)
2022-01-13 11:31:44 +0100 <Franciman> i can't make template haskell work
2022-01-13 11:31:58 +0100 <Franciman> and get messages i can understand
2022-01-13 11:32:00 +0100 <Hecate> who can?
2022-01-13 11:32:02 +0100 <Axman6> try binding to C from it
2022-01-13 11:32:09 +0100 <Hecate> hehe
2022-01-13 11:32:22 +0100 <[exa]> Franciman: any specific error?
2022-01-13 11:32:23 +0100Hecatesends Axman6 some emotional support
2022-01-13 11:32:32 +0100 <[exa]> o man
2022-01-13 11:33:28 +0100 <kuribas> merijn: right
2022-01-13 11:34:14 +0100 <Franciman> [exa]: half a page
2022-01-13 11:34:17 +0100 <Franciman> and more
2022-01-13 11:34:29 +0100 <Franciman> but after a lot of fight, i was able to get rid of TH
2022-01-13 11:34:32 +0100 <Franciman> T.T
2022-01-13 11:34:40 +0100Photonsphere[m](~maridonke@2001:470:69fc:105::1:688b)
2022-01-13 11:35:26 +0100Photonsphere[m](~maridonke@2001:470:69fc:105::1:688b) ()
2022-01-13 11:35:27 +0100 <Franciman> i have a question. I had read that the haskell community is saying that having another standard version is not on plans, because it requires lots of work
2022-01-13 11:35:41 +0100 <Franciman> so it's preferred to have the GHC proposals workflow
2022-01-13 11:36:02 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
2022-01-13 11:36:03 +0100 <Franciman> i wonder, doesn't this tamper the development of other fellow compilers?
2022-01-13 11:36:24 +0100 <Franciman> i mean nowadays it's pretty rare in the code I saw to not add at least one ghc extension
2022-01-13 11:36:44 +0100schweers(~user@2001:16b8:e978:5100:aaa1:59ff:fe3f:235c) (Remote host closed the connection)
2022-01-13 11:37:10 +0100xff0x(~xff0x@2001:1a81:5213:d00:a0e3:bed3:6536:d79e) (Ping timeout: 250 seconds)
2022-01-13 11:37:44 +0100yauhsien_(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 11:37:45 +0100 <[exa]> Franciman: some of the ghc extensions will inevitably get standardized, many are pretty easy to either port or factor out of code, and sometimes the libs are not really meant to be portable (esp. with low-level stuff)
2022-01-13 11:38:25 +0100 <[exa]> but well, yeah, I guess having a second "big" compiler would help. Perhaps it could also help to make both compilers much less huge.
2022-01-13 11:38:32 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2022-01-13 11:38:35 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 11:39:33 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-01-13 11:40:38 +0100 <Franciman> yes, ofc not everything is meant to be portable
2022-01-13 11:40:47 +0100xff0x(~xff0x@2001:1a81:5213:d00:a0e3:bed3:6536:d79e)
2022-01-13 11:41:06 +0100 <[exa]> increasing the size and user-friendly value of the "standard" (no matter how adhoc its definition is) inevitably increases the complexity of _all_ compilers around that need to jump a larger gap to become "viable" for community
2022-01-13 11:41:51 +0100 <Franciman> and choosing what to put in the standard is _a lot of work_ ok
2022-01-13 11:41:54 +0100 <kritzefitz> I'm not sure I understand your argument. Currently it seems to me like we need another big compiler so developing other compilers is easier, which seems kinda circular. Is there a deeper underlying argument why a language should have multiple implementations?
2022-01-13 11:41:56 +0100 <[exa]> but we still get a better language. :D
2022-01-13 11:42:09 +0100__monty__(~toonn@user/toonn)
2022-01-13 11:42:35 +0100 <[exa]> kritzefitz: it has the nice side effect that standardization, portability and compatibility issues suddenly materialize and get solved quickly
2022-01-13 11:43:00 +0100 <Franciman> it also reduces the «one point» failure
2022-01-13 11:43:03 +0100 <Franciman> vulnerability
2022-01-13 11:43:09 +0100 <Franciman> for companies
2022-01-13 11:43:28 +0100 <Franciman> if you don't have haskell SUPER MASTERS, you may not be able to fix ghc
2022-01-13 11:43:41 +0100 <[exa]> also gives you choices (e.g. a tradeoff may be implemented differently in separate compilers, without having the code destroyed by #ifdefs)
2022-01-13 11:43:54 +0100 <Franciman> now i wonder, do i need to be a haskell SUPER MASTER to professionally use haskell?
2022-01-13 11:43:57 +0100 <Franciman> true [exa]
2022-01-13 11:44:03 +0100 <Franciman> there are many benefits, in my view
2022-01-13 11:44:52 +0100 <[exa]> Franciman: you don't need to, just get productive and don't waste much time on advanced features you don't really need
2022-01-13 11:45:04 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 11:45:04 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 11:45:04 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 11:48:50 +0100 <maerwald> you can only be productive when you stop caring about advanced features
2022-01-13 11:49:08 +0100 <kritzefitz> The portability argument still seems circular to me? Why do we need to find portability problems when we don't have alternative implementations we would want to port to?
2022-01-13 11:49:44 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 11:49:56 +0100 <maerwald> kritzefitz: that's a chicken and egg argument
2022-01-13 11:50:09 +0100x88x88x(~x88x88x@2001:19f0:5:39a8:5400:3ff:feb6:73cb) (Remote host closed the connection)
2022-01-13 11:50:43 +0100 <maerwald> we already have a pretty bad bus factor on GHC
2022-01-13 11:50:55 +0100 <maerwald> making it extra hard for others to start from scratch will not help
2022-01-13 11:51:05 +0100x88x88x(~x88x88x@149.28.53.172)
2022-01-13 11:53:53 +0100 <kritzefitz> But wouldn't maintaining alternative implementations even worsen that bus factor? To me it seems like it would take potential developer time that could be spent on improving GHC.
2022-01-13 11:54:02 +0100 <maerwald> why would it worsen it??
2022-01-13 11:54:26 +0100 <maerwald> are you saying anyone interested in writing a Haskell compiler should be interested in maintaining the GHC hairball?
2022-01-13 11:54:36 +0100 <maerwald> that sounds a little far fetched
2022-01-13 11:54:56 +0100 <kritzefitz> Ok, true.
2022-01-13 11:56:33 +0100 <maerwald> I'm pretty sure there are companies who have the capacity to write one, but didn't because it's hard to keep up with semi-documented features and potentially be incompatible with large parts of the ecosystem
2022-01-13 11:57:00 +0100 <Franciman> kritzefitz: one word: polarisation
2022-01-13 11:57:03 +0100 <Franciman> haskell lacks it
2022-01-13 11:57:07 +0100 <Franciman> and now I'm off
2022-01-13 11:57:10 +0100 <Franciman> see ya
2022-01-13 11:57:14 +0100Franciman(~Franciman@mx1.fracta.dev) (WeeChat 3.4)
2022-01-13 11:57:24 +0100 <yushyin> oO
2022-01-13 11:57:48 +0100 <maerwald> hell, facebook writes compilers and new languages all the time
2022-01-13 11:58:14 +0100 <maerwald> and facebook employees have expressed their anger towards GHC breaking stuff frequently
2022-01-13 11:58:25 +0100 <maerwald> so it seems they would have an interest in that, maybe
2022-01-13 11:59:05 +0100 <maerwald> but only if that actually reduces maintenance issues at the end of the road
2022-01-13 11:59:24 +0100 <dminuoso> Is fb still on 8.6?
2022-01-13 11:59:27 +0100 <maerwald> which is not the case without an up2date standard
2022-01-13 11:59:42 +0100 <dminuoso> Not that 8.6.1 is a bad release, its rock stable..
2022-01-13 11:59:44 +0100 <kritzefitz> Ok, granted it may not work out in practice. But leaving that aside, wouldn't it be preferable to have more developers for GHC instead of splitting that work over multiple implementations?
2022-01-13 12:00:10 +0100 <maerwald> dminuoso: simonmar's post indicates it's 8.8, but not sure
2022-01-13 12:00:36 +0100 <maerwald> kritzefitz: no
2022-01-13 12:01:26 +0100 <maerwald> then you make GHC the testbed for all (crazy) ideas and make it harder to do radical improvements
2022-01-13 12:01:43 +0100 <maerwald> which is exactly our status quo
2022-01-13 12:03:34 +0100 <maerwald> example of a crazy idea: dependent types. Example of radical improvements that seem impossible: having a Haskell compiler whose primary focus is compilation speed
2022-01-13 12:05:04 +0100 <kritzefitz> It seems to me like you implicitly limit “radical improvement“ to changes that don't change the language. Is that correct?
2022-01-13 12:06:04 +0100alx741(~alx741@157.100.93.160)
2022-01-13 12:06:36 +0100 <maerwald> no... a radical improvement to the language would be changing syntax
2022-01-13 12:07:04 +0100pritambaralprite
2022-01-13 12:07:15 +0100 <maerwald> but that's not in the scope of a compiler adhering to the standard
2022-01-13 12:07:38 +0100 <maerwald> you can add dependent types to your compiler while adhering to the standard, though
2022-01-13 12:07:50 +0100 <maerwald> so it's possible for compilers to support a superset of haskell
2022-01-13 12:08:58 +0100 <maerwald> and I'd rather have people fork GHC or write a new compiler when doing that sort of thing, instead of having everything creep into GHC, just because it's the primary implementation and we failed at having a good standard
2022-01-13 12:09:43 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 12:15:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 12:15:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 12:15:51 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 12:20:55 +0100schweers(~user@2001:16b8:e978:5100:aaa1:59ff:fe3f:235c)
2022-01-13 12:21:01 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 12:21:34 +0100superstar64(~superstar@2600:1700:ed80:50a0:d250:99ff:fe2c:53c4) (Quit: Leaving)
2022-01-13 12:23:58 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 250 seconds)
2022-01-13 12:27:04 +0100 <kritzefitz> Ok, I think I understand your argument. Thanks for walking me through it.
2022-01-13 12:34:48 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2022-01-13 12:36:24 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 12:37:51 +0100prite(~pritam@user/pritambaral) (Remote host closed the connection)
2022-01-13 12:38:18 +0100prite(~pritam@user/pritambaral)
2022-01-13 12:41:35 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 12:42:21 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 12:44:30 +0100 <jackdk> dependent types, linear types, first-class `exists`, whatever vs. compile faster, fix the "package-o-orphan-instances" problem on hackage, or the "adding a new superclass breaks the universe" problem
2022-01-13 12:47:48 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2022-01-13 12:48:10 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 12:52:42 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-01-13 12:56:04 +0100jgeerds(~jgeerds@55d4bbed.access.ecotel.net)
2022-01-13 12:57:17 +0100cfricke(~cfricke@user/cfricke) (Ping timeout: 240 seconds)
2022-01-13 13:02:08 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Quit: Reconnecting)
2022-01-13 13:02:20 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2022-01-13 13:04:52 +0100DNH(~DNH@2a02:8108:1100:16d8:189c:6a92:5958:80be)
2022-01-13 13:06:39 +0100bliminse(~bliminse@host86-188-36-178.range86-188.btcentralplus.com) (Quit: leaving)
2022-01-13 13:08:03 +0100 <tomsmeding> jackdk: how is the "adding a new superclass breaks the universe" a solvable problem?
2022-01-13 13:08:34 +0100 <jackdk> I don't know if it is, but I know that it's a problem.
2022-01-13 13:12:01 +0100jakalx(~jakalx@base.jakalx.net) (Disconnected: Replaced by new connection)
2022-01-13 13:12:02 +0100jakalx(~jakalx@base.jakalx.net)
2022-01-13 13:12:56 +0100nschoe(~quassel@2a01:e0a:8e:a190:3e5c:6874:4d71:3988) (Ping timeout: 250 seconds)
2022-01-13 13:13:46 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-01-13 13:14:04 +0100bliminse(~bliminse@host86-188-36-178.range86-188.btcentralplus.com)
2022-01-13 13:14:18 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-01-13 13:15:00 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-01-13 13:16:09 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 13:17:28 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 13:18:06 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 13:18:06 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 13:18:06 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 13:22:47 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 13:23:19 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 13:23:21 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 13:27:38 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2022-01-13 13:28:32 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2022-01-13 13:28:37 +0100cyphase(~cyphase@user/cyphase) (Ping timeout: 240 seconds)
2022-01-13 13:29:02 +0100_ht(~quassel@82-168-34-160.fixed.kpn.net) (Remote host closed the connection)
2022-01-13 13:29:18 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 13:31:30 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 13:32:10 +0100_ht(~quassel@82-168-34-160.fixed.kpn.net)
2022-01-13 13:32:52 +0100tafa(~tafa@user/tafa) (Quit: ZNC - https://znc.in)
2022-01-13 13:33:18 +0100MajorBiscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl) (Ping timeout: 250 seconds)
2022-01-13 13:34:41 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 13:35:13 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 13:35:15 +0100tafa(~tafa@user/tafa)
2022-01-13 13:37:15 +0100cfricke(~cfricke@user/cfricke)
2022-01-13 13:39:01 +0100 <merijn> Axman6: ?? I always found binding C from Haskell absolutely trivial? What are you doing that makes it gruesome?
2022-01-13 13:39:20 +0100 <janus> why does build-constraints.yaml not say anything about 'text' bounds? it doesn't look like it is a boot package, so i would expect many packages to be broken by text 2
2022-01-13 13:40:40 +0100 <merijn> janus: Why?
2022-01-13 13:40:57 +0100 <merijn> I would expect very little to break by Text-2.0, tbh
2022-01-13 13:40:57 +0100MajorBiscuit(~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e)
2022-01-13 13:41:05 +0100 <janus> merijn: because tools like stack will put in automatic bounds on upload such that text 2 is excluded
2022-01-13 13:41:26 +0100Major_Biscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl)
2022-01-13 13:41:41 +0100 <janus> and then there are even people who manually put in bounds that exclude unreleased minor versions, because they'd prefer to have it excluded from solver instead of just hoping it works
2022-01-13 13:41:47 +0100 <merijn> janus: No, I meant why do you expect many packages to break
2022-01-13 13:42:23 +0100 <janus> that's what i am explaining. if i am developing package foobar in the year 2019, text 2 is unreleased, i will put in bounds that exclude text 2. there should be many such packages on hackage
2022-01-13 13:43:03 +0100 <merijn> I'm not sure how that breaks anything?
2022-01-13 13:43:26 +0100 <janus> by 'break' i here mean that it is excluded in build-constraints.yaml. dunno if there is a better word
2022-01-13 13:43:56 +0100 <janus> if stackage nightly has text 2, it would have to exclude the packages that don't work with text 2
2022-01-13 13:44:13 +0100 <merijn> I dunno what build-constraints.yaml does. To me "package breaks due to release of text-2.0" means "the package can no longer compile" OR "the package won't compile with text-2.0"
2022-01-13 13:44:20 +0100cstml(~cstml@user/cstml) (Remote host closed the connection)
2022-01-13 13:44:43 +0100 <janus> they do that by setting a bound "foobar < 0 # tried foobar-0.1, but it's library does not support: text-2"
2022-01-13 13:44:53 +0100 <janus> build-constraints.yaml defines a stackage snapshot, afaik
2022-01-13 13:45:12 +0100 <merijn> janus: tbh, I think the answer to that is "I don't think stackage snapshots are as maintained as many people imagine them to be" :p
2022-01-13 13:45:38 +0100MajorBiscuit(~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) (Ping timeout: 252 seconds)
2022-01-13 13:46:12 +0100 <janus> if the package is excluded from the snapshot, i'd say it doesn't compile ;) since it would require the user to start solving the dep graph
2022-01-13 13:46:36 +0100 <merijn> janus: Packages exists outside of stackage too :)
2022-01-13 13:46:47 +0100 <janus> right, but i am specifically asking about build-constraints.yaml
2022-01-13 13:47:00 +0100 <dminuoso> Of course not. It's not as if fpco hires 40 Haskell developers to spend their full time auditing, vetting and curating resolvers...
2022-01-13 13:47:04 +0100 <merijn> anyway, probably more of a question for #stackage if that still exists?
2022-01-13 13:48:24 +0100 <janus> doesn't seem like it exists on libera.chat, i imagine they may have moved to slack
2022-01-13 13:49:05 +0100 <janus> dminuoso: what is "Of course not" a reply to?
2022-01-13 13:49:31 +0100 <merijn> janus: To my statement about the amount of stackage maintenance :)
2022-01-13 13:49:36 +0100 <merijn> presumably
2022-01-13 13:49:46 +0100 <dminuoso> janus: merijn's remark about stackage snapshots being not as maintained as many people imagine them to be
2022-01-13 13:50:29 +0100 <janus> i am asking this question because there is a bug on the stackage repo for upgrading to mmorph 1.2 and a bug for upgrading to aeson 2, so they are tracking that
2022-01-13 13:50:44 +0100 <janus> and many packages are still excluded cause they are incompatible with bytestring 0.11
2022-01-13 13:50:47 +0100 <dminuoso> It seems more reasonable to consider build plans "curated snapshots that are tested to work", than to assume that others have magically done the job for you.
2022-01-13 13:50:51 +0100 <dminuoso> But that's just me.
2022-01-13 13:51:13 +0100 <janus> how are my questions incompatible with that assertion?
2022-01-13 13:51:41 +0100 <merijn> janus: Anyway, the answer is most simply "because no one submitted a PR to change things yet"?
2022-01-13 13:51:47 +0100 <janus> i am looking through those pr's and i wonder how it can be that packages are excluded based on incompatibility with other packages, but not with text. it is just odd, that's all
2022-01-13 13:52:12 +0100 <janus> a pr wouldn't be necessary to encounter this problem
2022-01-13 13:52:17 +0100 <merijn> janus: Presumably they're hoping those package will be fixed "Real Soon (TM)"
2022-01-13 13:52:17 +0100 <dminuoso> janus: Because incompatibilities depend on what portion of a library you are using.
2022-01-13 13:52:41 +0100 <merijn> Since most packages can probably simply bump their text bounds and call it a day
2022-01-13 13:52:48 +0100 <janus> if there is a package that demands text>=2, and they havn't gotten text 2 yet, they would also have to exclude it. but there isn't any package like that either
2022-01-13 13:52:50 +0100 <merijn> Most people don't use the internal bits that changed
2022-01-13 13:53:10 +0100 <janus> in all of stackage... i think that's odd
2022-01-13 13:53:40 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 13:54:55 +0100 <merijn> janus: I mean your question is, essentially "why did they already ram through text-2.0 if it's incompatible?" and the answer is "you'd have to ask the maintainers who made that change to stackage"?
2022-01-13 13:55:35 +0100max22-(~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 250 seconds)
2022-01-13 13:55:37 +0100 <janus> well they didn't ram text-2 through. so probably the explanation is that they just thought it would break too much
2022-01-13 13:55:39 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 13:55:44 +0100 <geekosaur> wait, are you saying they pushed text 2 into the lts?
2022-01-13 13:55:53 +0100 <janus> no, they didn't even put it in nightly
2022-01-13 13:55:54 +0100 <geekosaur> nightly I can see, that's what it's there for
2022-01-13 13:56:07 +0100 <janus> it's not in nightly either and there is no discussion on it
2022-01-13 13:56:17 +0100 <janus> there is a discussion on aeson-2 though
2022-01-13 13:56:23 +0100 <merijn> ok, now I'm confused about my understanding if the question, so I'll assume I'm misreading everything and giving up :)
2022-01-13 13:56:58 +0100 <janus> right but thank you anyway, i think this did clear up things
2022-01-13 13:58:09 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 13:58:31 +0100 <janus> and my initial assertion that "it doesn't say anything about text bounds" is wrong. because e.g. the package text-all is excluded for incompatibility with text-1.2.4.1.
2022-01-13 13:59:37 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
2022-01-13 14:02:23 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2022-01-13 14:02:37 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
2022-01-13 14:04:10 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-01-13 14:04:30 +0100 <maerwald> stack itself isn't even maintained
2022-01-13 14:05:02 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 14:06:57 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 240 seconds)
2022-01-13 14:09:27 +0100acidjnk(~acidjnk@p200300d0c7271e5531e75586a8fe0593.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-01-13 14:11:43 +0100Pickchea(~private@user/pickchea)
2022-01-13 14:12:07 +0100 <tomsmeding> maerwald: you're going to need to qualify that assertion, will bugs not get fixed?
2022-01-13 14:13:41 +0100 <maerwald> tomsmeding: there are some bugfix PRs that never got any review, correct
2022-01-13 14:13:58 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 14:14:29 +0100 <maerwald> you may be lucky to get a review by chance, depending on who you pinged at what time of day, but that's not "maintained" software
2022-01-13 14:15:46 +0100Inst(~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 250 seconds)
2022-01-13 14:18:22 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 250 seconds)
2022-01-13 14:18:45 +0100jackson99(~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout))
2022-01-13 14:22:33 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-01-13 14:22:55 +0100 <tomsmeding> maerwald: interesting, TIL. Was this an intentional change (e.g. by fpco) or did maintainer activity just naturally decline over time? (If you happen to know)
2022-01-13 14:22:57 +0100geranim0(~geranim0@modemcable242.171-178-173.mc.videotron.ca)
2022-01-13 14:23:17 +0100 <tomsmeding> (not making a judgement call, just assessing situation)
2022-01-13 14:23:18 +0100 <maerwald> tomsmeding: it was also announced here: https://www.snoyman.com/blog/babies-oss-maintenance/
2022-01-13 14:23:20 +0100 <tomsmeding> ah
2022-01-13 14:23:25 +0100chomwitt(~chomwitt@ppp-94-67-201-202.home.otenet.gr) (Ping timeout: 256 seconds)
2022-01-13 14:24:01 +0100 <maerwald> one reason supposedly was that Cabal (the library) is moving too fast
2022-01-13 14:24:11 +0100 <maerwald> I call bs on that, but anyway
2022-01-13 14:25:05 +0100Brandon_1X(~brandon@178-79-138-117.ip.linodeusercontent.com) ()
2022-01-13 14:26:34 +0100chomwitt(~chomwitt@2a02:587:dc11:fb00:12c3:7bff:fe6d:d374)
2022-01-13 14:26:55 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 14:30:05 +0100acidsys(~LSD@2.lsd.systems) (Excess Flood)
2022-01-13 14:30:38 +0100 <tomsmeding> maerwald: thanks for sharing, that post makes lots of sense. I don't see him making a point about Cabal moving too fast; he does say that GHC moves too fast for his wishes.
2022-01-13 14:30:45 +0100cstml(~cstml@user/cstml)
2022-01-13 14:31:11 +0100 <tomsmeding> oh he does mention Cabal in a similar context once
2022-01-13 14:31:31 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 256 seconds)
2022-01-13 14:31:57 +0100schuelermine(~schuelerm@user/schuelermine) (Ping timeout: 240 seconds)
2022-01-13 14:32:14 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 14:34:12 +0100acidsys(~LSD@2.lsd.systems)
2022-01-13 14:38:44 +0100nhs_(~nhs@136.49.226.20) (Read error: Connection reset by peer)
2022-01-13 14:40:54 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 250 seconds)
2022-01-13 14:43:25 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
2022-01-13 14:43:43 +0100nschoe(~quassel@2a01:e0a:8e:a190:42f9:717:c87c:61ed)
2022-01-13 14:45:13 +0100 <merijn> tbh, I have the impression that most FPCO projects start out with a pretty decent quality engineering package and then gradually they just accumulate more and more problems and warts >.>
2022-01-13 14:46:36 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480::41)
2022-01-13 14:50:56 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-01-13 14:53:36 +0100slack1256(~slack1256@191.126.99.83)
2022-01-13 14:57:46 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-01-13 15:05:12 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2022-01-13 15:08:02 +0100max22-(~maxime@2a01cb0883359800450c60e303939557.ipv6.abo.wanadoo.fr)
2022-01-13 15:08:05 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 15:13:03 +0100jkaye_(~jkaye@2601:281:8300:7530:8293:8dc5:8087:f321)
2022-01-13 15:13:17 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 240 seconds)
2022-01-13 15:18:17 +0100 <maerwald> stacks codebase is pretty easy to understand (for a project that big)... so it's not that the entry barrier for contributors is too high
2022-01-13 15:19:06 +0100da39a3ee5e6b4b0d(~textual@2403:6200:8876:c04a:e083:f91a:e3b1:b08b)
2022-01-13 15:24:03 +0100schuelermine(~schuelerm@user/schuelermine)
2022-01-13 15:24:49 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 15:27:57 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-01-13 15:28:13 +0100da39a3ee5e6b4b0_(~textual@2403:6200:8876:c04a:6410:d0a3:c1e2:34d8)
2022-01-13 15:28:57 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 240 seconds)
2022-01-13 15:30:02 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 15:30:02 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 15:30:02 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 15:30:57 +0100da39a3ee5e6b4b0d(~textual@2403:6200:8876:c04a:e083:f91a:e3b1:b08b) (Ping timeout: 240 seconds)
2022-01-13 15:33:16 +0100vpan(~0@212.117.1.172) (Quit: Leaving.)
2022-01-13 15:33:17 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds)
2022-01-13 15:34:37 +0100jumper149(~jumper149@base.felixspringer.xyz)
2022-01-13 15:35:36 +0100 <ProfSimm> How would we approach a function that needs to return multiple named results
2022-01-13 15:35:49 +0100 <ProfSimm> Is there something more conventional than records
2022-01-13 15:36:22 +0100 <merijn> ProfSimm: Not really
2022-01-13 15:36:59 +0100 <ProfSimm> What i want to do is a function where i return a "default" result, but optionally you can fetch more "attributes" at will
2022-01-13 15:37:21 +0100 <ProfSimm> I.e. I want the additional named results to be implicit and only visible when you decide to select them
2022-01-13 15:37:41 +0100 <ProfSimm> I guess I could use a tuple (main result, ...)
2022-01-13 15:38:44 +0100 <ProfSimm> merijn: have you sometimes thought what if all languages returned results as a set of relations, like in SQL.
2022-01-13 15:39:00 +0100 <ProfSimm> Everything is a list, and everything is a record. Depends on what you SELECT
2022-01-13 15:39:06 +0100waleee(~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
2022-01-13 15:39:17 +0100Techcable(~Techcable@168.235.93.147) (Ping timeout: 240 seconds)
2022-01-13 15:41:01 +0100kilolympus(~kilolympu@31.205.200.235) (Ping timeout: 240 seconds)
2022-01-13 15:43:24 +0100 <dminuoso> ProfSimm: well if you separate the algebra, that is certainly possible and how SQL does it.
2022-01-13 15:43:44 +0100kaph_(~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Ping timeout: 250 seconds)
2022-01-13 15:44:17 +0100 <dminuoso> SQL servers usually compile your query into a relational algebra, transform that algebra according to semantic preserving transformations with better performance, and then execute said algebra against the tuples
2022-01-13 15:45:06 +0100 <dminuoso> `lens` works somewhat similarly, in that we can express a sort of "way to look into/modify" data as a first class value that composes nicely, and then at some point run it against our data
2022-01-13 15:45:06 +0100max22-(~maxime@2a01cb0883359800450c60e303939557.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
2022-01-13 15:45:07 +0100 <ProfSimm> dminuoso: I'm itching to imagine a language that has this semantic by default. Everything is a relation. Even moreso than SQL, because SQL has functions.
2022-01-13 15:46:21 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293)
2022-01-13 15:46:38 +0100stef204(~stef204@user/stef204)
2022-01-13 15:47:25 +0100 <dminuoso> ProfSimm: Functions and algebras are not mutually exclusive
2022-01-13 15:47:35 +0100 <dminuoso> Mmm, Im trying to think of the name of a particular prolog based language
2022-01-13 15:48:02 +0100 <kuribas> dminuoso: ugh, sadly using a token operator means I have to reparse the tokens.
2022-01-13 15:48:16 +0100 <ProfSimm> dminuoso: they're not but I prefer to unify them. Say present functions as virtual tables (relations) and eliminate the concept of separate functions
2022-01-13 15:48:18 +0100 <kuribas> dminuoso: when backtracking.
2022-01-13 15:48:52 +0100 <ProfSimm> dminuoso: or inversely, present relations as function, i.e. FROM function WHERE arguments
2022-01-13 15:49:04 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-01-13 15:49:05 +0100 <dminuoso> Ah I was thinking of Datalog, you might be interested in that ProfSimm
2022-01-13 15:50:27 +0100 <ProfSimm> dminuoso: I think i wanna keep the imperative nature of processing, but reduce the "data shapes" to a single universal format, much like relations are
2022-01-13 15:51:18 +0100Rum(~bourbon@user/rum)
2022-01-13 15:54:49 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 15:55:24 +0100xkuru(~xkuru@user/xkuru)
2022-01-13 15:58:31 +0100 <EvanR> why would you want imperative relational algebra
2022-01-13 15:59:17 +0100 <EvanR> also the original question seemed to suggest extensible records
2022-01-13 16:00:09 +0100johnjaye(~pi@154.6.152.74)
2022-01-13 16:00:22 +0100 <johnjaye> should ~/.cabal be created when installing cabal-install?
2022-01-13 16:00:32 +0100 <johnjaye> or do i need to run 'cabal update' given the odd name?
2022-01-13 16:00:39 +0100 <johnjaye> it says cabal is 3.4
2022-01-13 16:00:44 +0100kaph(~kaph@net-2-38-107-19.cust.vodafonedsl.it)
2022-01-13 16:01:57 +0100 <geekosaur> it will be created the first time you run it
2022-01-13 16:02:03 +0100 <geekosaur> just installing it does nothing
2022-01-13 16:02:09 +0100smarton(~smarton@gnu/webmaster/smarton)
2022-01-13 16:02:10 +0100 <geekosaur> except install the binary
2022-01-13 16:02:20 +0100shriekingnoise(~shrieking@181.229.0.83)
2022-01-13 16:02:50 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 16:02:52 +0100 <johnjaye> ok. i tried cabal install nonsensename and it created it
2022-01-13 16:03:00 +0100 <johnjaye> but says it needs to be updated to get hackage
2022-01-13 16:03:09 +0100 <geekosaur> yeh
2022-01-13 16:03:23 +0100 <johnjaye> so i do need to install it then run 'cabal update'. ok
2022-01-13 16:03:50 +0100 <geekosaur> cabal update has to be run manually since you might be relying on your current index as a "snapshot". it'll also tell you how to get back to the old "snapshot" after you run it
2022-01-13 16:03:53 +0100 <merijn> johnjaye: ~/.cabal is created "on-demand" if it doesn't exist yet
2022-01-13 16:04:02 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 16:04:30 +0100 <merijn> johnjaye: 'cabal update' just fetches the latest package index from Hackage so should be run periodically (but cabal will print a reminder you haven't updated in 20 or so days)
2022-01-13 16:04:45 +0100 <johnjaye> idk it just says it updated hackag
2022-01-13 16:04:47 +0100 <johnjaye> nothing else
2022-01-13 16:05:05 +0100 <johnjaye> now to pkg install ghc and see if that work
2022-01-13 16:05:11 +0100 <merijn> johnjaye: It won't
2022-01-13 16:05:17 +0100 <merijn> johnjaye: ghc isn't installable via cabal
2022-01-13 16:05:23 +0100 <merijn> Because it's not a cabal package
2022-01-13 16:05:26 +0100 <johnjaye> yes i'm using pkg.
2022-01-13 16:05:38 +0100 <johnjaye> ghc and cabal are separate packages on bsd
2022-01-13 16:05:40 +0100 <merijn> ah, wait, you meant the system package manager. Nevermind :)
2022-01-13 16:05:41 +0100 <johnjaye> idk why
2022-01-13 16:06:07 +0100 <johnjaye> when i googled for how to install haskell on bsd it said there was a metapackage that installed both of them
2022-01-13 16:06:09 +0100 <johnjaye> but it's gone now
2022-01-13 16:06:10 +0100 <merijn> johnjaye: Because GHC is (in theory) perfectly usable without cabal, using make or something like shake
2022-01-13 16:06:33 +0100 <merijn> And cabal is (in theory) perfectly usable with non-GHC compilers
2022-01-13 16:06:41 +0100 <johnjaye> i see
2022-01-13 16:06:45 +0100 <geekosaur> last I heard BSD was at least considering moving away from packaging haskell and suggesting people use ghcup instead
2022-01-13 16:06:52 +0100 <merijn> Most of them besides UHC are now defunct, but that's coincidental
2022-01-13 16:07:04 +0100 <geekosaur> since thye'd otherwise have to keep multiple versions of everything around
2022-01-13 16:07:08 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-01-13 16:07:09 +0100 <maerwald> geekosaur: oh god
2022-01-13 16:07:15 +0100 <merijn> maerwald: RIP you
2022-01-13 16:07:23 +0100 <maerwald> support for FreeBSD bindists isn't very good atm
2022-01-13 16:07:28 +0100 <maerwald> because FreeBSD CI is a pita
2022-01-13 16:07:34 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 16:08:35 +0100 <maerwald> and they break easily when FreeBSD does something weird to their libraries
2022-01-13 16:09:23 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 256 seconds)
2022-01-13 16:10:05 +0100 <johnjaye> maerwald: i don't know much about how CI systems work. what do you mean it's a pain?
2022-01-13 16:10:18 +0100 <johnjaye> i have a vague idea you send your code to amazon and it runs it 1000000 times
2022-01-13 16:10:22 +0100 <maerwald> johnjaye: well... how do you run freebsd isolated?
2022-01-13 16:10:43 +0100 <johnjaye> isolated from what? hackers?
2022-01-13 16:10:57 +0100 <maerwald> CI system that doesn't have persistent state
2022-01-13 16:11:27 +0100 <johnjaye> idk much about them. i know freebsd has some kind of quarterly release system for the binaries
2022-01-13 16:11:48 +0100 <maerwald> that's not what I meant
2022-01-13 16:11:50 +0100 <geekosaur> freebsd does have CI arrangements… with microsoft azure
2022-01-13 16:12:10 +0100 <maerwald> FreeBSD CI on GHC gitlab (which produces the bindists) currently uses vagrant
2022-01-13 16:12:13 +0100 <maerwald> and it's flaky
2022-01-13 16:12:26 +0100 <maerwald> before it was just a persistent stateful runner
2022-01-13 16:12:51 +0100 <maerwald> github actions doesn't have freebsd support out of the box
2022-01-13 16:13:02 +0100 <maerwald> there's an action that abuses macos vm capability
2022-01-13 16:13:06 +0100 <maerwald> but it's not a very good one
2022-01-13 16:13:37 +0100geekosaurfinds that interesting given that freebsd and microsoft have actually been working together relatively closely for some years
2022-01-13 16:13:51 +0100 <geekosaur> ever since microsoft bought hotmail, in fact
2022-01-13 16:15:58 +0100motherfsck(~motherfsc@user/motherfsck)
2022-01-13 16:16:03 +0100 <maerwald> and: statically linking on freebsd is... I dunno
2022-01-13 16:16:05 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 16:16:14 +0100 <maerwald> not sure it's even possible, but I tried and never managed
2022-01-13 16:16:26 +0100 <maerwald> the linker is just weird
2022-01-13 16:17:25 +0100 <geekosaur> they discourage static linking because that gets you binaries that only work on one point release
2022-01-13 16:17:58 +0100 <merijn> maerwald: Nothing in the handbook?
2022-01-13 16:17:58 +0100 <maerwald> so yeah... you are forced to link dynamically, but have none of the binary compatibility of windows or mac
2022-01-13 16:18:15 +0100 <maerwald> the worst of both worlds
2022-01-13 16:18:55 +0100smarton(~smarton@gnu/webmaster/smarton) (Quit: Quit)
2022-01-13 16:20:17 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
2022-01-13 16:20:37 +0100waleee(~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds)
2022-01-13 16:22:25 +0100 <johnjaye> seems strange as a noob, i've used clang on it before so
2022-01-13 16:22:30 +0100 <johnjaye> idk
2022-01-13 16:23:03 +0100waleee(~waleee@h-98-128-229-110.NA.cust.bahnhof.se)
2022-01-13 16:23:49 +0100 <geekosaur> it's been a while but I used to run fbsd extensively and never had binary compatibility issues
2022-01-13 16:24:26 +0100 <geekosaur> would still run it if the world hadn't gone linux to the extent that it's hard to find drivers for modern hardware :(
2022-01-13 16:24:46 +0100 <johnjaye> ^
2022-01-13 16:24:54 +0100 <johnjaye> supposedly netflix uses freebsd
2022-01-13 16:25:01 +0100 <johnjaye> so i don't know how that circle is squared exactly
2022-01-13 16:25:37 +0100max22-(~maxime@2a01cb0883359800c8a77c004bdd2128.ipv6.abo.wanadoo.fr)
2022-01-13 16:26:35 +0100 <maerwald> geekosaur: http://gregorkopf.de/blog/posts/ghc_ino64.html
2022-01-13 16:26:47 +0100 <maerwald> REALLY?
2022-01-13 16:27:44 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 16:28:20 +0100Sgeo(~Sgeo@user/sgeo)
2022-01-13 16:29:08 +0100 <geekosaur> have you ever seen the crawling horrors linux uses to avoid that kind of issue? spread throughout the kernel and glibc
2022-01-13 16:29:25 +0100 <geekosaur> fine until you do something that breaks it and then it makes that look minor
2022-01-13 16:29:28 +0100shapr(~user@2601:7c0:c37c:46d0:2b64:ce79:8ca:be50)
2022-01-13 16:31:49 +0100 <maerwald> Well, I'm fairly confident they don't care about people distributing binaries
2022-01-13 16:32:03 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 256 seconds)
2022-01-13 16:32:09 +0100 <maerwald> which is a fine stance
2022-01-13 16:32:18 +0100 <maerwald> but then please package your GHC yourself :p
2022-01-13 16:32:45 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 16:33:11 +0100jgeerds(~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 256 seconds)
2022-01-13 16:37:30 +0100kacper(~kacper@kwlan13.uoks.uj.edu.pl)
2022-01-13 16:37:39 +0100 <EvanR> at this point I'm suspicious of my distributor giving me SomeVersion of GHC
2022-01-13 16:37:50 +0100 <EvanR> since it seems like you probably need multiple
2022-01-13 16:38:12 +0100 <EvanR> I guess they could provide multiple versions too
2022-01-13 16:38:41 +0100 <geekosaur> that's what they're trying to avoid, as I understand it
2022-01-13 16:39:06 +0100da39a3ee5e6b4b0_(~textual@2403:6200:8876:c04a:6410:d0a3:c1e2:34d8) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-01-13 16:39:10 +0100 <geekosaur> it's a slippery slope as they end up packaging other things in multiple versions to go with each ghc
2022-01-13 16:39:29 +0100 <geekosaur> especially if they (like pretty much everyone else) use stackage as their starting point
2022-01-13 16:41:36 +0100 <kacper> Hi. I need to generate some random numbers from different distributions (normal, Laplace, ...). What would be a good (simple, reliable) library to use?
2022-01-13 16:43:19 +0100 <geekosaur> doesn't random-1.2 handle multiple distributions these days? not sure about laplace though
2022-01-13 16:44:17 +0100mvk(~mvk@2607:fea8:5cdd:f000::55f8) (Ping timeout: 240 seconds)
2022-01-13 16:44:39 +0100 <geekosaur> (and it's an interface that can be used with multiple backends)
2022-01-13 16:45:02 +0100 <merijn> kacper: mwc-random?
2022-01-13 16:45:18 +0100 <merijn> random itself is just a RNG afaik, no real distributions?
2022-01-13 16:45:21 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 16:45:21 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 16:45:21 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 16:45:22 +0100 <johnjaye> so if i type 'cabal install random' it says it has to download and build them
2022-01-13 16:45:25 +0100 <johnjaye> is that because i'm on bsd?
2022-01-13 16:45:32 +0100 <geekosaur> merijn, not as of 1.2
2022-01-13 16:45:37 +0100falafel(~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-01-13 16:45:47 +0100 <EvanR> random-fu, I recall
2022-01-13 16:46:02 +0100 <EvanR> https://hackage.haskell.org/package/random-fu
2022-01-13 16:46:23 +0100 <merijn> johnjaye: No?
2022-01-13 16:46:24 +0100 <johnjaye> it says i should have run cabal install --lib random
2022-01-13 16:46:28 +0100 <merijn> johnjaye: ah
2022-01-13 16:46:33 +0100 <merijn> johnjaye: You want neither, tbh
2022-01-13 16:46:59 +0100 <maerwald[m]> geekosaur: what else other than ghc do they package?
2022-01-13 16:47:07 +0100 <merijn> johnjaye: What you want is a cabal file for your code that lists random as a dependency and then "it'll just work"
2022-01-13 16:47:24 +0100 <geekosaur> don't know currently. as I said, I *used* to run it extensively
2022-01-13 16:47:30 +0100 <johnjaye> building mersenne-random-pure64 as well as about a dozen other deps
2022-01-13 16:47:49 +0100 <geekosaur> have not checked recently, have heard talk that they want to stop packaging stuff, but afaik they have not acted on it yet
2022-01-13 16:47:53 +0100 <merijn> geekosaur: afaict random only has uniform distribution
2022-01-13 16:47:53 +0100 <johnjaye> merijn: so i'm not supposed to download them with cabal?
2022-01-13 16:48:02 +0100 <merijn> geekosaur: mwc-random has loads of distributions
2022-01-13 16:48:10 +0100 <merijn> johnjaye: "It Depends (TM)"
2022-01-13 16:48:26 +0100 <johnjaye> i just mean to use it in a program
2022-01-13 16:48:27 +0100 <merijn> johnjaye: What you're not supposed to do is: Attempt to globally install packages.
2022-01-13 16:48:42 +0100 <geekosaur> hm, wonder if they removed it all again
2022-01-13 16:48:56 +0100 <merijn> johnjaye: Right, you should make a cabal file for your program that has random as dependency and then do "cabal build" to compile your program
2022-01-13 16:49:13 +0100 <merijn> johnjaye: Then it will fetch and install the dependency for you already
2022-01-13 16:49:19 +0100 <geekosaur> there were some complaints about how they'd added them
2022-01-13 16:50:11 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 16:50:30 +0100 <geekosaur> \right, these days you do not install libraries, you let cabal manage them for you
2022-01-13 16:50:50 +0100 <geekosaur> installing libraries just causes pain later when you need different versions
2022-01-13 16:50:51 +0100 <merijn> johnjaye: The "problem" is that cabal (mostly) got rid of the idea of "globally installed packages", because that leads to conflicts between different projects, etc. instead there's a global store that allows infinitely many conflicting installs of the same package
2022-01-13 16:51:10 +0100 <merijn> johnjaye: So different projects can use different, conflicting versions of the same package without issue
2022-01-13 16:51:30 +0100 <EvanR> out of infinite conflict, comes unlimited victory
2022-01-13 16:51:40 +0100 <merijn> johnjaye: But the result is that "globally installing" becomes a meaningless/useless thing (if package 'foo' is installed 5 times, which is the right global one?!)
2022-01-13 16:52:30 +0100 <merijn> johnjaye: When you build a project (like your program) cabal will automatically select a set of matching dependencies and make only those visible to your code.
2022-01-13 16:53:02 +0100 <johnjaye> sounds like the way virtual memory always got described which was dumb
2022-01-13 16:53:11 +0100 <johnjaye> why would i want multiple programs to use my memory at the same time?
2022-01-13 16:53:37 +0100 <johnjaye> but i guess if people want to use libv4.2 and libv3.7 and libv6.2 at the same time that's how it has to be
2022-01-13 16:53:38 +0100red-snail(~snail@static.151.210.203.116.clients.your-server.de)
2022-01-13 16:53:38 +0100 <geekosaur> because memory that's not being used is wasted
2022-01-13 16:53:40 +0100 <merijn> Virtual memory is one of the best/greatest inventions in the history of operating systems...
2022-01-13 16:54:01 +0100 <johnjaye> merijn: yes but the way its described sounds dumb. at least in my textbook
2022-01-13 16:54:04 +0100 <merijn> johnjaye: I have 2 different projects at work in python that require different versions of the same library
2022-01-13 16:54:04 +0100 <geekosaur> why would you pay good money for memory that won't be used?
2022-01-13 16:54:24 +0100 <merijn> johnjaye: I literally cannot work on both projects unless I manually manage virtual envs to separate them
2022-01-13 16:54:30 +0100 <EvanR> the zen of having 15 gigs of empty ram
2022-01-13 16:54:43 +0100 <johnjaye> merijn: right i get what you're saying it just doesn't make sense
2022-01-13 16:54:48 +0100Major_Biscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl) (Ping timeout: 250 seconds)
2022-01-13 16:54:58 +0100 <merijn> The cabal approach does the same thing, except it does it transparently and can reuse the same install between different projects
2022-01-13 16:55:19 +0100 <johnjaye> cool
2022-01-13 16:57:08 +0100 <merijn> johnjaye: If two projects both want "foo-1.2" then there is just a single foo-1.2 installed. If one wants foo-1.1 and the other foo-3.7, then they both will be, but each project only gets to see one of them
2022-01-13 16:57:42 +0100 <johnjaye> right i understand. it just doesn't make any sense
2022-01-13 16:57:43 +0100Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-01-13 16:57:59 +0100 <johnjaye> it's like saying i have windows xp, windows 7, windows nt, windows me all installed so my program can use the right version
2022-01-13 16:58:10 +0100 <EvanR> what's the context
2022-01-13 16:58:24 +0100 <EvanR> you are developing haskell programs? or just running someones program they already built
2022-01-13 16:58:33 +0100 <merijn> EvanR: "Don't use 'cabal install' to install libraries" :p
2022-01-13 16:58:42 +0100 <EvanR> I mean for johnjaye
2022-01-13 16:59:02 +0100 <EvanR> but yeah merijn is right, if johnjaye is trying to write haskell programs
2022-01-13 16:59:19 +0100 <johnjaye> so cabal install is deprecated or
2022-01-13 16:59:24 +0100 <johnjaye> should i not be using it at all?
2022-01-13 16:59:31 +0100 <johnjaye> to run haskell programs i mean
2022-01-13 16:59:32 +0100 <sclv> the cabal tool is not deprecated its great
2022-01-13 16:59:35 +0100 <merijn> johnjaye: It's still fine for executables
2022-01-13 16:59:51 +0100 <merijn> johnjaye: Like "cabal install happy" (or "cabal install cabal-install" :p)
2022-01-13 16:59:54 +0100 <sclv> just the "cabal install" command is not really the right way to manage lib dependencies when building packages
2022-01-13 17:00:12 +0100 <Clint> unless you like it that way
2022-01-13 17:00:13 +0100jophish(~jophish@2001:470:69fc:105::670) (Quit: You have been kicked for being idle)
2022-01-13 17:00:25 +0100 <merijn> johnjaye: But for making dependencies available, you're best off just adding a dependency to cabal file, running "cabal build" and letting it auto-fetch/build/install your dependencies
2022-01-13 17:00:28 +0100jophish(~jophish@2001:470:69fc:105::670)
2022-01-13 17:00:29 +0100 <EvanR> yeah so cabal install some-cool-game... then run the game. Maybe. Hopefully they release an actual package at some point xD
2022-01-13 17:00:32 +0100 <sclv> if it weren't even more confusing, arguably we would rename the "cabal-install" tool to "cabal-build" or "cabal-exe" or the like :P
2022-01-13 17:01:16 +0100jophish(~jophish@2001:470:69fc:105::670) ()
2022-01-13 17:01:30 +0100 <sclv> the reason it makes sense is that if you're working on a few different haskell projects, each of which has nontrivial transitive deps, the odds that there will be at least one lib solved for with different versions in each project go up very quickly
2022-01-13 17:01:31 +0100fef(~thedawn@user/thedawn)
2022-01-13 17:01:40 +0100 <sclv> especially if one of the projects you're working on is an older codebase than the other
2022-01-13 17:02:03 +0100 <johnjaye> i guess this is similar to python's venv?
2022-01-13 17:02:13 +0100 <sclv> right, its a fancier vrsion of that
2022-01-13 17:02:23 +0100 <EvanR> haskellenv xD
2022-01-13 17:02:35 +0100 <johnjaye> to be fair nix is based on the premise of having any version of any lib you need
2022-01-13 17:02:48 +0100 <johnjaye> which is still insane to me but managed insanity seems to be part of OS stuff these days
2022-01-13 17:02:53 +0100 <sclv> indeed. we call the new v2- style "nix-like" often and it was inspired by it
2022-01-13 17:03:08 +0100 <sclv> it uses a similar hashed chain of deps to uniquely identify each package
2022-01-13 17:03:24 +0100 <EvanR> if everyone in the world used 1 version of every library everywhere... that would be insane xD
2022-01-13 17:04:08 +0100 <johnjaye> imagine if ordering a drink at kfc you said i want lemonade. and the clerk responded, ok, first we have to establish the definition of lemonade to proceed.
2022-01-13 17:04:15 +0100 <sclv> if you accept the premise that deps will have lower bounds (people want to use new features) and deps will have upper bounds (sometimes breaking changes are made) then there's really no way around this
2022-01-13 17:04:40 +0100 <johnjaye> sclv: ah that makes sense. people are greedy and want to use the latest features always
2022-01-13 17:04:43 +0100 <EvanR> are you drinking lemonade or developing a brand new lemonade chemical concoction and have all this lab equipment lying around
2022-01-13 17:04:44 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-01-13 17:04:55 +0100 <sclv> even if they only wanted to use new features rarely it would happen
2022-01-13 17:04:55 +0100kacper(~kacper@kwlan13.uoks.uj.edu.pl) (Quit: Client closed)
2022-01-13 17:05:00 +0100vglfr(~vglfr@46.96.161.71)
2022-01-13 17:05:38 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 250 seconds)
2022-01-13 17:05:59 +0100 <johnjaye> that would be the most philosophical chain restaurant ever. Socratic Fried Chicken
2022-01-13 17:06:24 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:c21f:deb4:93f3:3ef9) (Quit: WeeChat 2.8)
2022-01-13 17:06:27 +0100 <EvanR> btw I am work in a cabal project right now which doesn't specify any of the dep versions
2022-01-13 17:06:29 +0100 <janus> Hecate: i saw you said you have initiated package takeover for basement, memory or cryptonite. where can find more details on your application?
2022-01-13 17:06:30 +0100 <EvanR> working
2022-01-13 17:06:33 +0100 <johnjaye> "Before you can eat your fries, we have to ask: What is the best system of fries for a city-state?"
2022-01-13 17:06:49 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 17:06:49 +0100 <EvanR> which is probably bad, but it contradicts what you're saying johnjaye
2022-01-13 17:07:29 +0100 <EvanR> my cabal file just lists what libs I want, and I it works
2022-01-13 17:07:37 +0100 <EvanR> for now
2022-01-13 17:08:05 +0100 <EvanR> I can also use cabal repl -b lib1 -b lib2 to try shit out
2022-01-13 17:08:13 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk) (Remote host closed the connection)
2022-01-13 17:08:13 +0100 <EvanR> with no file
2022-01-13 17:08:25 +0100 <merijn> EvanR: cabal has a (poorly documented) repl mode too :p
2022-01-13 17:08:52 +0100 <merijn> EvanR: Where you embed the cabal file info in a comments inside a haskell file and it will use runhaskell with the right dependencies available :p
2022-01-13 17:09:05 +0100 <EvanR> cabal script?
2022-01-13 17:09:27 +0100 <EvanR> didn't think that worked as a repl
2022-01-13 17:09:46 +0100 <merijn> eh, script mode, yes
2022-01-13 17:09:49 +0100 <merijn> I have the dumbs
2022-01-13 17:10:27 +0100red-snailred-snail1
2022-01-13 17:10:28 +0100red-snail1red-snail
2022-01-13 17:11:01 +0100wre^(~wre@wsip-98-188-246-242.mc.at.cox.net)
2022-01-13 17:11:09 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-01-13 17:12:34 +0100deadmarshal(~deadmarsh@95.38.231.124) (Ping timeout: 250 seconds)
2022-01-13 17:14:12 +0100slack1256(~slack1256@191.126.99.83) (Remote host closed the connection)
2022-01-13 17:15:53 +0100val-host_(~val-host@2a02:2f0f:9108:b00:6891:37fc:a7bd:3738)
2022-01-13 17:16:02 +0100val-host_(~val-host@2a02:2f0f:9108:b00:6891:37fc:a7bd:3738) (Remote host closed the connection)
2022-01-13 17:16:17 +0100val-host(~val-host@2a02:2f0f:9108:b00:6891:37fc:a7bd:3738)
2022-01-13 17:17:18 +0100val-host(~val-host@2a02:2f0f:9108:b00:6891:37fc:a7bd:3738) (Client Quit)
2022-01-13 17:18:56 +0100mbuf(~Shakthi@122.174.222.201) (Quit: Leaving)
2022-01-13 17:19:39 +0100Techcable(~Techcable@168.235.93.147)
2022-01-13 17:19:51 +0100phma(phma@2001:5b0:2143:8b68:2dec:594f:a26e:5c25) (Read error: Connection reset by peer)
2022-01-13 17:21:49 +0100phma(~phma@host-67-44-209-85.hnremote.net)
2022-01-13 17:24:33 +0100deadmarshal(~deadmarsh@95.38.231.124)
2022-01-13 17:24:40 +0100yangby(~secret@115.199.105.217)
2022-01-13 17:25:08 +0100xff0x(~xff0x@2001:1a81:5213:d00:a0e3:bed3:6536:d79e) (Ping timeout: 250 seconds)
2022-01-13 17:25:17 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2022-01-13 17:25:58 +0100xff0x(~xff0x@2001:1a81:5213:d00:aaa3:1c56:33b0:7a9e)
2022-01-13 17:26:00 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 17:26:28 +0100deadmarshal(~deadmarsh@95.38.231.124) (Client Quit)
2022-01-13 17:26:47 +0100yangby(~secret@115.199.105.217) (Client Quit)
2022-01-13 17:27:45 +0100deadmarshal(~deadmarsh@95.38.231.124)
2022-01-13 17:28:28 +0100yangby(~secret@115.199.105.217)
2022-01-13 17:30:05 +0100yangby(~secret@115.199.105.217) (Client Quit)
2022-01-13 17:30:10 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-01-13 17:31:54 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2022-01-13 17:33:06 +0100ec(~ec@gateway/tor-sasl/ec)
2022-01-13 17:36:35 +0100cyphase(~cyphase@user/cyphase)
2022-01-13 17:37:57 +0100ec(~ec@gateway/tor-sasl/ec) (Client Quit)
2022-01-13 17:39:55 +0100ec(~ec@gateway/tor-sasl/ec)
2022-01-13 17:40:49 +0100DNH(~DNH@2a02:8108:1100:16d8:189c:6a92:5958:80be) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-01-13 17:40:58 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 17:43:00 +0100cstml[m](~cstmlmatr@2001:470:69fc:105::1:5c07)
2022-01-13 17:44:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 17:44:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 17:44:51 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 17:45:04 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 250 seconds)
2022-01-13 17:48:57 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de)
2022-01-13 17:49:23 +0100MajorBiscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl)
2022-01-13 17:49:57 +0100jespada(~jespada@87.74.36.188) (Ping timeout: 240 seconds)
2022-01-13 17:50:59 +0100cfricke(~cfricke@user/cfricke) (Ping timeout: 256 seconds)
2022-01-13 17:51:57 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2022-01-13 17:51:59 +0100jespada(~jespada@87.74.36.188)
2022-01-13 17:53:17 +0100wre^(~wre@wsip-98-188-246-242.mc.at.cox.net) (Ping timeout: 240 seconds)
2022-01-13 17:53:57 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 240 seconds)
2022-01-13 17:54:25 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 17:55:24 +0100Inst(~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
2022-01-13 17:58:20 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-01-13 17:59:29 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 18:02:43 +0100slowButPresent(~slowButPr@user/slowbutpresent)
2022-01-13 18:02:57 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 18:02:57 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 18:02:57 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 18:06:07 +0100ubert(~Thunderbi@p200300ecdf0994878c88f9c813554c3f.dip0.t-ipconnect.de) (Remote host closed the connection)
2022-01-13 18:07:28 +0100Rum(~bourbon@user/rum) (Quit: WeeChat 3.4)
2022-01-13 18:07:33 +0100shapr(~user@2601:7c0:c37c:46d0:2b64:ce79:8ca:be50) (Remote host closed the connection)
2022-01-13 18:10:20 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2022-01-13 18:10:33 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 18:13:17 +0100nschoe(~quassel@2a01:e0a:8e:a190:42f9:717:c87c:61ed) (Ping timeout: 240 seconds)
2022-01-13 18:15:41 +0100Akiva(~Akiva@user/Akiva)
2022-01-13 18:19:33 +0100Sgeo_(~Sgeo@user/sgeo)
2022-01-13 18:20:12 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 18:21:03 +0100Tuplanolla(~Tuplanoll@91-159-68-166.elisa-laajakaista.fi)
2022-01-13 18:21:17 +0100hgolden_(~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Ping timeout: 240 seconds)
2022-01-13 18:22:09 +0100Sgeo(~Sgeo@user/sgeo) (Ping timeout: 256 seconds)
2022-01-13 18:24:13 +0100shapr(~user@2601:7c0:c37c:46d0:fa29:61d1:1155:8385)
2022-01-13 18:24:24 +0100vicfred(~vicfred@user/vicfred)
2022-01-13 18:27:17 +0100 <Inst> do you guys know of any good alternatives to System.IO?
2022-01-13 18:28:00 +0100 <EvanR> Data.ByteString I/O ?
2022-01-13 18:28:19 +0100 <geekosaur> define "good alternatives"
2022-01-13 18:28:33 +0100 <geekosaur> I mean, there's things like conduit
2022-01-13 18:28:57 +0100tanners(~tanners@pool-71-127-59-41.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2022-01-13 18:29:45 +0100tanners(~tanners@2600:1003:b127:bfd4:fcb8:9a4c:c23:f972)
2022-01-13 18:31:25 +0100 <Taneb> What are you trying to do with it, and why aren't you happy with it?
2022-01-13 18:32:46 +0100 <Inst> i just want to use a more "modern" alternative to System.IO
2022-01-13 18:33:10 +0100schuelermine(~schuelerm@user/schuelermine) (Read error: Connection reset by peer)
2022-01-13 18:33:15 +0100anselmschueler(~schuelerm@user/schuelermine)
2022-01-13 18:33:50 +0100 <sshine> Inst, depending on what parts of it you mean, there's RIO: https://hackage.haskell.org/package/rio
2022-01-13 18:34:22 +0100 <Inst> i've installed Z-Io
2022-01-13 18:34:27 +0100jumper149(~jumper149@base.felixspringer.xyz) (Ping timeout: 256 seconds)
2022-01-13 18:35:34 +0100 <EvanR> you should strive to have as little of your program in IO as possible
2022-01-13 18:35:35 +0100shriekingnoise(~shrieking@181.229.0.83) (Ping timeout: 256 seconds)
2022-01-13 18:35:35 +0100jumper149(~jumper149@base.felixspringer.xyz)
2022-01-13 18:36:23 +0100 <EvanR> in which case the choice of System API matters less xD
2022-01-13 18:36:44 +0100 <sshine> Inst, I'm pretty happy with Data.Text.IO for Unicode file I/O.
2022-01-13 18:37:25 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 18:37:49 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
2022-01-13 18:37:54 +0100kmein(~weechat@user/kmein) (Quit: ciao kakao)
2022-01-13 18:38:14 +0100kmein(~weechat@user/kmein)
2022-01-13 18:38:24 +0100 <Inst> "with the understanding that IO will make up large parts of your program anyways"
2022-01-13 18:39:01 +0100 <geekosaur> that depends on what you are doing. also what are you quoting?
2022-01-13 18:39:02 +0100DNH(~DNH@2a02:8108:1100:16d8:189c:6a92:5958:80be)
2022-01-13 18:39:40 +0100 <Inst> when i was talking to others, they seemed to agree that the majority of your program would be in IO-land, i.e, file access, file reading, file writing would be IO-ed
2022-01-13 18:39:50 +0100 <Inst> the actual computation would be in pure functions, but you'd have a lot of IO
2022-01-13 18:39:50 +0100 <EvanR> that doesn't sound right
2022-01-13 18:39:53 +0100 <sshine> Inst, really depends on the program.
2022-01-13 18:39:56 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 18:40:03 +0100 <Inst> i guess in their style that's what happened
2022-01-13 18:40:13 +0100 <EvanR> the majority part
2022-01-13 18:40:38 +0100 <Inst> then call a bunch of pure functions to do the data transformation, which might be in libs, etc
2022-01-13 18:40:42 +0100 <sshine> I would like if the 'network' package had MonadIO instances rather than direct IO.
2022-01-13 18:41:03 +0100 <Inst> bleh, i doubt i'll be ready
2022-01-13 18:41:04 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-01-13 18:41:15 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
2022-01-13 18:41:40 +0100 <Inst> i've been putting this off forever, i have a friend who's doing python and will be out by the 23rd, idea is to start in IO-land with >>= and >> as basic syntactical units, alongside \n -> ...
2022-01-13 18:41:43 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-01-13 18:41:43 +0100 <EvanR> the majority of your program is IO code is the hell we escaped from before using haskell
2022-01-13 18:42:11 +0100 <sshine> Inst, that last sentence is a bit cryptic.
2022-01-13 18:43:02 +0100 <Inst> i mean depict a conventional imperative program
2022-01-13 18:43:04 +0100 <sshine> EvanR, well, *shrug*. maybe you're writing APIs and the business logic is a really small CRUD thing compared to simply accepting requests, passing stuff to a database, and returning responses?
2022-01-13 18:43:08 +0100retroid_(~retro@2e40edd9.skybroadband.com) (Ping timeout: 250 seconds)
2022-01-13 18:43:19 +0100 <Inst> in >>= and >>
2022-01-13 18:43:19 +0100dyeplexer(~dyeplexer@user/dyeplexer)
2022-01-13 18:43:49 +0100 <EvanR> ok, so maybe we didn't escape from that hell
2022-01-13 18:43:59 +0100 <EvanR> yet
2022-01-13 18:44:07 +0100CiaoSen(~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-01-13 18:44:14 +0100 <Inst> maybe better IO libs can help
2022-01-13 18:44:28 +0100gensyst(gensyst@user/gensyst)
2022-01-13 18:44:41 +0100 <gensyst> Why is GHCJS such a beast (huge size and painful to setup and "therefore Nix") but PureScript is not?
2022-01-13 18:44:43 +0100random__(~random@185.219.68.251) (Remote host closed the connection)
2022-01-13 18:44:48 +0100 <gensyst> Both are compiling to JavaScript!
2022-01-13 18:44:58 +0100 <EvanR> GHC is a beast
2022-01-13 18:45:06 +0100random__(~random@185.219.68.251)
2022-01-13 18:45:10 +0100Erutuon(~Erutuon@user/erutuon) (Quit: WeeChat 2.8)
2022-01-13 18:45:18 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 18:45:24 +0100 <Inst> the natural question will be "why are we using >>= and >> instead of just a return key?"
2022-01-13 18:45:34 +0100 <sshine> what's a return key?
2022-01-13 18:45:39 +0100 <EvanR> Enter
2022-01-13 18:45:56 +0100 <EvanR> I have the same question, why don't you start with do notation IO
2022-01-13 18:45:57 +0100 <sshine> do-notation does just that? :)
2022-01-13 18:46:23 +0100 <Inst> EvanR: because then it's an easier introduction to Haskell types, the notion of computing as a lambda calculus, and FAM
2022-01-13 18:46:27 +0100 <EvanR> monads don't really add anything to the understanding of IO
2022-01-13 18:46:28 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 18:46:36 +0100Jing_(~hedgehog@240e:390:7c53:a7e1:dddb:2811:79d2:379) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-01-13 18:46:46 +0100 <EvanR> if you want to introduced computation with lambdas, then don't use IO
2022-01-13 18:46:49 +0100 <geekosaur> and my answer would be "so you understand what's going on underneath and don't get nasty surprises later because of incorrect assumptions""
2022-01-13 18:47:07 +0100 <Inst> i'm convinced that Monads can be taught almost day one
2022-01-13 18:47:10 +0100 <EvanR> starting from IO just seems backwards
2022-01-13 18:47:20 +0100 <Inst> to conventional Haskell teaching, yes, and that's the point
2022-01-13 18:47:23 +0100 <gensyst> EvanR ok but why the need for GHCJS? Why can't we just write Haskell somehow, compile it into JavaScript - just like PureSCript is doing?
2022-01-13 18:47:24 +0100 <EvanR> teach lambda calculus, teach functional programming, teach monads... but IO?
2022-01-13 18:47:27 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-01-13 18:47:31 +0100 <gensyst> I don't quite GET it
2022-01-13 18:47:51 +0100 <Cale> Inst: The thing is, you need to know at least a handful of examples of monads before it makes sense to introduce an abstraction to capture the common pattern
2022-01-13 18:47:53 +0100 <geekosaur> http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html
2022-01-13 18:47:54 +0100Erutuon(~Erutuon@user/erutuon)
2022-01-13 18:48:09 +0100 <geekosaur> gensyst, that's what ghcjs does
2022-01-13 18:48:38 +0100 <geekosaur> it's just that a javascript backend turns out to be fairly complex from an implementation standpoint
2022-01-13 18:48:59 +0100 <sshine> gensyst, you could maybe have a JS back-end for GHC that didn't live in its own fork of GHC. but then again, Asterius, the Haskell-to-WASM compiler, is also a fork.
2022-01-13 18:49:10 +0100 <Inst> i have this problem wherein every new advanced concept i meet that stumps me, i decide is the most important and therefore is worth teaching first
2022-01-13 18:49:13 +0100 <geekosaur> there are almost-haskells that do "better" but don't behave the same way because of fundamental differences between how haskell and javascript do things. see elm
2022-01-13 18:49:37 +0100 <Inst> FP I get, IO in Haskell, at least to me, seems to be undertaught
2022-01-13 18:50:04 +0100 <Cale> I'd be somewhat surprised, but I guess it depends on what resources you're using to learn..
2022-01-13 18:50:13 +0100 <sshine> Inst, in FP, if you start with "functions", you'll eventually get around to most concepts, since most things are made with functions. :)
2022-01-13 18:50:22 +0100 <Inst> i mean for an experienced programmer you have an idea of how to handle IO
2022-01-13 18:50:30 +0100 <Inst> IO already has a very easy branch into functions, i.e, if'
2022-01-13 18:50:39 +0100 <EvanR> yes so you get functions, so why are you planning to each people stuff you don't get
2022-01-13 18:50:49 +0100 <EvanR> what if they don't get functions
2022-01-13 18:50:52 +0100 <Inst> to give me an incentive to learn it
2022-01-13 18:51:22 +0100 <EvanR> e.g. the first thing you say is "here is >>= and monads" and they're like... wtf, what is \
2022-01-13 18:51:22 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 18:51:23 +0100 <gensyst> geekosaur sshine EvanR, From what I know, GHCJS compiles into a separate .js file, with code not really interoperaable with other parts (other JS) of the <html></html> However PureScript is interoperable.
2022-01-13 18:51:25 +0100 <gensyst> Why?
2022-01-13 18:51:31 +0100 <gensyst> Some really fundamental differences!
2022-01-13 18:51:39 +0100 <gensyst> Someone needs to write a beginner tutorial on this!
2022-01-13 18:51:48 +0100 <Inst> EvanR: the first thing I say is this is how we do this C program in Haskell using binds and thens
2022-01-13 18:51:50 +0100 <gensyst> On how all these pieces fit together
2022-01-13 18:51:59 +0100 <EvanR> "I'm starting with >>= and monads because that's what I was interested in last night"
2022-01-13 18:52:17 +0100 <EvanR> people confuse
2022-01-13 18:52:32 +0100 <Inst> no, but psychologically, and sociologically, let's say someone gets monads lesson 2 or week 2
2022-01-13 18:52:42 +0100 <Inst> isn't the rest of Haskell just easy peasy then?
2022-01-13 18:52:52 +0100 <geekosaur> no?
2022-01-13 18:53:17 +0100 <Inst> i'm the type of person who found recursion easy, though, so...
2022-01-13 18:53:19 +0100 <sprout_> you can make anything as complex as you want
2022-01-13 18:53:19 +0100 <Cale> Monad is a very simple abstraction, and it is not a big deal in the grand scheme of things
2022-01-13 18:53:27 +0100 <Inst> but socially, it's a form of gatekeeping
2022-01-13 18:53:28 +0100 <geekosaur> gensyst, for one, memory management works completely differently. then you have things like the concurrency primitives (MVars, STM, …)
2022-01-13 18:53:33 +0100 <Inst> it's almost deliberately badly taught
2022-01-13 18:53:35 +0100chele(~chele@user/chele) (Remote host closed the connection)
2022-01-13 18:53:48 +0100 <EvanR> "wth is \ and recursion" "sorry, I find that easy, we won't be explaining it!"
2022-01-13 18:54:02 +0100 <geekosaur> in effect your one .js file contains a whole Haskell runtime along with your program, and the parts that need the Haskell runtime won't play well with the raw JS backend
2022-01-13 18:54:16 +0100 <geekosaur> this is also why we don't have a JVM backend
2022-01-13 18:54:30 +0100 <geekosaur> or a CLR/Mono backend
2022-01-13 18:54:46 +0100 <dolio> Well, there was one of those, too, but it was another fork instead of being rolled back into GHC.
2022-01-13 18:54:55 +0100 <EvanR> Inst, that sounds like conspiratorial thinking. Unintentionally badly taught, well,
2022-01-13 18:55:24 +0100 <sshine> is that mainly non-strictness that makes Haskell back-ends hard to make in arbitrary VMs?
2022-01-13 18:55:24 +0100 <Inst> recursion iirc is a meme
2022-01-13 18:55:29 +0100 <Inst> as in a good sense, not a bad sense
2022-01-13 18:55:48 +0100 <Inst> "i heard you wanted some bling in your bling, so I gave you some bling in your bling in your bling"
2022-01-13 18:55:54 +0100 <Inst> the no u recursive meme is also there
2022-01-13 18:56:14 +0100 <Cale> Inst: I disagree, it's just a strange kind of thing to abstract over, since (1) many programming languages don't have type constructors and (2) most languages don't have a way to abstract over type constructors, and (3) this pattern is very deeply a functional one, so if you haven't done much functional programming before, you're unlikely to have seen instances of the pattern we're generalising over.
2022-01-13 18:56:39 +0100 <dolio> sshine: JavaScript functions aren't curried by default, either.
2022-01-13 18:56:50 +0100 <gensyst> geekosaur, ok. sound more suited for ppl who want to write single-page web "apps" (JS required) instead of websites (which mostly work fine without JS (with some features missing))
2022-01-13 18:56:55 +0100 <Cale> Inst: So if you haven't had the opportunity to see many examples of monads before, Monad will seem sort of crazy.
2022-01-13 18:57:01 +0100 <Inst> Cale: to get an actually good monad tutorial, you need like 10 lessons
2022-01-13 18:57:14 +0100 <gensyst> geekosaur, PureScript sounds like a great balance for no JS required websites.
2022-01-13 18:57:18 +0100 <Inst> the idea is just to intro the concept, get someone used to using >>= to manipulate type constructors (once they're introduced to the concept)
2022-01-13 18:57:19 +0100 <geekosaur> you can do whole websites in ghcjs, you just have to use ghcjs libs
2022-01-13 18:57:23 +0100 <dolio> So you need some kind of system to keep track of partial applications and such.
2022-01-13 18:57:28 +0100 <Cale> Inst: You just need enough specific examples of monads, like IO and lists, and especially parsers
2022-01-13 18:57:29 +0100 <geekosaur> purescript, elm, etc. are better for interop
2022-01-13 18:57:33 +0100 <sshine> dolio, does that impact performance, or is it just tedious management?
2022-01-13 18:57:49 +0100neverfindme(~hayden@158.123.160.43)
2022-01-13 18:57:57 +0100 <maerwald> list monad confuse most people
2022-01-13 18:58:01 +0100 <EvanR> please don't write a 10 lesson monad tutorial
2022-01-13 18:58:25 +0100 <sshine> Monads for Dummies
2022-01-13 18:58:28 +0100 <Inst> maybe I don't get monads? They're just a typeclass that implements >>=, whose only purpose is to join type constructors of the same monadic type?
2022-01-13 18:58:32 +0100neverfindme(~hayden@158.123.160.43) (Remote host closed the connection)
2022-01-13 18:58:35 +0100 <EvanR> Functors for Dummies
2022-01-13 18:58:44 +0100 <EvanR> actually that might be interesting
2022-01-13 18:58:44 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-01-13 18:58:46 +0100 <Inst> and for chaining
2022-01-13 18:58:48 +0100 <gensyst> geekosaur, yeah. thanks!
2022-01-13 18:58:56 +0100 <Inst> monadic chaining, function of type a-> m a
2022-01-13 18:59:18 +0100 <Cale> Inst: That isn't a precise enough explanation to correctly write the Monad class...
2022-01-13 18:59:19 +0100 <Inst> stops it from creating arbitrarily high stacks of m
2022-01-13 18:59:31 +0100 <dminuoso> Inst: No that kind of misses the point.
2022-01-13 18:59:33 +0100 <Inst> return is already in applicative
2022-01-13 18:59:34 +0100 <sshine> Inst, as far as I understand, monads are just monoids in the category of endofunctors?
2022-01-13 18:59:48 +0100 <Cale> sshine: Now *that's* unhelpful :)
2022-01-13 18:59:53 +0100 <geekosaur> ^
2022-01-13 18:59:57 +0100 <EvanR> haven't seen that one in a while
2022-01-13 18:59:59 +0100 <Inst> >> is defined as *> these days, iirc
2022-01-13 19:00:00 +0100 <dminuoso> Inst: The crux is that is captures a repeating pattern that is hard to see.
2022-01-13 19:00:16 +0100 <Inst> i mean i came in from experience with Maybe monadic type
2022-01-13 19:00:18 +0100 <Cale> Inst: Yeah, though honestly, I feel like Applicative is a distraction.
2022-01-13 19:00:20 +0100 <dolio> sshine: You could compile Haskell functions to curried JS functions, but then you'd need to be able to talk about uncurried JS functions somehow, and possibly produce them from Haskell.
2022-01-13 19:00:29 +0100 <sshine> EvanR, I felt like it was time to repeat it, considering "monads are just ..." popped up on my screen. :-P
2022-01-13 19:00:32 +0100 <dminuoso> Inst: The crucial part is: that pattern is not relevant to most users of Monad.
2022-01-13 19:00:38 +0100 <dminuoso> It's sort of like:
2022-01-13 19:00:38 +0100 <Cale> Inst: You can and probably should understand Monad before understanding Applicative
2022-01-13 19:00:40 +0100econo(uid147250@user/econo)
2022-01-13 19:00:53 +0100 <EvanR> "_ is just a _" red alert shields up xD
2022-01-13 19:00:54 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Ping timeout: 250 seconds)
2022-01-13 19:01:02 +0100 <Inst> it's a deliberate meme
2022-01-13 19:01:08 +0100 <Inst> there's sarcasm inherent in the phrase
2022-01-13 19:01:08 +0100 <Cale> Applicative is more abstract, so if you don't get what Monad is about, Applicative tries to capture an even wider range of situations.
2022-01-13 19:01:31 +0100 <maerwald> Applicative is also less powerful, so I prefer to start with the less powerful concepts
2022-01-13 19:01:41 +0100 <EvanR> Functor
2022-01-13 19:01:41 +0100 <sshine> EvanR, yes. I generally never use the word "just" in mathematics. :) (also not "obvious" and "trivial".)
2022-01-13 19:01:44 +0100 <Inst> yeah tbh if i had gotten stuck on Haskell last time at Monads, instead of Recursion
2022-01-13 19:01:45 +0100 <geekosaur> sarcasm doesn't transmit well over the internet
2022-01-13 19:01:50 +0100 <geekosaur> see monochrom last night
2022-01-13 19:01:56 +0100 <dminuoso> Inst: You dont need an algebra course and study ring theory in order to understand how to multiply and add numbers, right?
2022-01-13 19:02:06 +0100 <Inst> i'd probably be of the type that doesn't want to teach monads because they seem trivial
2022-01-13 19:02:19 +0100 <dolio> Applicative isn't really more abstract. It's more general.
2022-01-13 19:02:22 +0100 <sshine> EvanR, (well, "trivial" can mean something like "base case", that's okay, but maybe a bit unobvious.)
2022-01-13 19:02:29 +0100 <dminuoso> Inst: And yet ring theory captures that pattern, because as it happens, there's other things that have the same shape/laws as adding and multiplying numbers. That doesnt make adding or multiplying numbers itself any harder.
2022-01-13 19:02:31 +0100 <Inst> applicative iirc is just fmap that works for multiple arguments to a function
2022-01-13 19:02:38 +0100 <Cale> dolio: Fair, "more general" is a better way of saying what I meant :)
2022-01-13 19:02:47 +0100 <EvanR> applicative can have effects, while fmap can't
2022-01-13 19:02:58 +0100 <geekosaur> also see poe's law
2022-01-13 19:03:08 +0100 <dminuoso> Inst: Does that make any sense to you?
2022-01-13 19:03:30 +0100 <Cale> dminuoso: That's only going to make any sense if Inst knows what a ring is
2022-01-13 19:03:53 +0100 <dminuoso> Cale: Mmm, that's actually a surprisingly good point.
2022-01-13 19:04:03 +0100 <dminuoso> Bummer, it's such a lovely analogy.
2022-01-13 19:04:06 +0100 <Inst> beyond the simple notion of being some algebraic structure in some abstract algebra
2022-01-13 19:04:13 +0100 <dminuoso> Inst: that's enough.
2022-01-13 19:04:56 +0100benin(~benin@183.82.30.17) (Quit: The Lounge - https://thelounge.chat)
2022-01-13 19:04:59 +0100 <sshine> I thought a ring is an algebra.
2022-01-13 19:05:17 +0100deadmarshal(~deadmarsh@95.38.231.124) (Ping timeout: 240 seconds)
2022-01-13 19:05:29 +0100 <Cale> Inst: Yeah, it's an abstraction where you have a somewhat-arbitrary set of things together with addition and multiplication operations that to some extent have similar properties to the addition and multiplication of numbers that you're familiar with.
2022-01-13 19:05:32 +0100 <Inst> i'm trying to figure out a case where the pure f <*> arg1 <*> arg 2 set-up can create effects
2022-01-13 19:05:51 +0100 <Inst> probably something with IO types
2022-01-13 19:05:57 +0100 <[itchyjunk]> I think i should be able to define more than one thing after where, right?
2022-01-13 19:05:58 +0100 <EvanR> IO, Maybe, etc
2022-01-13 19:06:00 +0100 <Cale> Sure, if you want IO effects
2022-01-13 19:06:04 +0100 <[itchyjunk]> where left = blah right = blah
2022-01-13 19:06:05 +0100 <EvanR> Either e
2022-01-13 19:06:13 +0100 <Inst> should I consider dropping something into Nothing as an effect?
2022-01-13 19:06:22 +0100 <Inst> itchyjunk:
2022-01-13 19:06:28 +0100 <Inst> define one thing, type enter
2022-01-13 19:06:29 +0100 <dminuoso> Inst: Did you have simple linear algebra (vectors) in school?
2022-01-13 19:06:30 +0100 <Cale> You could consider "the ability to fail" as an effect
2022-01-13 19:06:30 +0100 <Inst> align the lines
2022-01-13 19:06:41 +0100 <EvanR> the effect of Maybe is to Nothing early
2022-01-13 19:06:58 +0100 <Inst> that's an effect that could disrupt the rest of the chain of calculations, nice
2022-01-13 19:06:58 +0100cstml(~cstml@user/cstml) (Ping timeout: 250 seconds)
2022-01-13 19:07:02 +0100 <Inst> my haskell theoretical education is shit
2022-01-13 19:07:04 +0100 <EvanR> yes
2022-01-13 19:08:30 +0100 <Inst> where IamaCat = cat
2022-01-13 19:08:32 +0100 <EvanR> State s is also Applicative
2022-01-13 19:08:41 +0100 <Inst> Iamalsoacat = alsoCat
2022-01-13 19:08:42 +0100 <EvanR> where the effects are maybe more obvious
2022-01-13 19:08:48 +0100 <Inst> @[itchyjunk]
2022-01-13 19:08:48 +0100 <lambdabot> Unknown command, try @list
2022-01-13 19:08:51 +0100mikoto-chan(~mikoto-ch@194.157.16.89)
2022-01-13 19:08:57 +0100 <sshine> @list
2022-01-13 19:08:57 +0100 <lambdabot> What module? Try @listmodules for some ideas.
2022-01-13 19:09:07 +0100 <sshine> @list [itchyjunk]
2022-01-13 19:09:07 +0100 <lambdabot> No module "[itchyjunk]" loaded
2022-01-13 19:09:11 +0100anselmschueler(~schuelerm@user/schuelermine) (Ping timeout: 256 seconds)
2022-01-13 19:09:23 +0100 <[itchyjunk]> Inst, i needed to define "left" and "right"
2022-01-13 19:09:29 +0100 <dminuoso> Inst: The key take away is: we can generalize this act of being able to "add" and "multiply" and call it "Ring". The word `ring` has no real meaning in its english sense, so dont even try to infer any intuition from the name itself.
2022-01-13 19:09:34 +0100 <[itchyjunk]> where left = blah right = blah ? no , between them or anything?
2022-01-13 19:09:53 +0100 <Inst> are you doing Haskell from the very Beginning?
2022-01-13 19:10:13 +0100retroid_(~retro@2e40edd9.skybroadband.com)
2022-01-13 19:10:15 +0100 <[itchyjunk]> Hmm, i am doing random stuff i think :<
2022-01-13 19:10:23 +0100 <monochrom> And now I am ready to disrupt your conversation and announce my explanation of parametric polymorphism! http://www.vex.net/~trebla/haskell/abs-type-param.html
2022-01-13 19:10:26 +0100 <Inst> there's a problem like that, wherein you want to have a fmap that takes a result and maps it to Either based on success
2022-01-13 19:10:55 +0100 <geekosaur> at some point you'll want to go from doing random exercises to something more structured, since earlier lessons will be necessary to understand later ones
2022-01-13 19:10:57 +0100 <Inst> ([l],[r]) = function, iirc
2022-01-13 19:11:08 +0100 <Inst> then you define base case as ([],[])
2022-01-13 19:11:10 +0100 <EvanR> partition
2022-01-13 19:11:24 +0100 <EvanR> :t partition
2022-01-13 19:11:25 +0100 <lambdabot> (a -> Bool) -> [a] -> ([a], [a])
2022-01-13 19:11:32 +0100 <geekosaur> :t partitionEithers
2022-01-13 19:11:33 +0100 <lambdabot> [Either a b] -> ([a], [b])
2022-01-13 19:11:43 +0100 <EvanR> oops
2022-01-13 19:12:14 +0100 <dminuoso> I recently have so many partitioning wishes and use cases..
2022-01-13 19:12:20 +0100 <Inst> also, thanks EvanR
2022-01-13 19:12:29 +0100 <dminuoso> Is there something generic to help partition arbitrary sum types?
2022-01-13 19:12:31 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-01-13 19:12:31 +0100 <Inst> I realized I need to have a strong understanding of what an effect is beyond simply IO
2022-01-13 19:12:42 +0100 <dminuoso> Inst: No, that's misleading.
2022-01-13 19:12:46 +0100 <dminuoso> And it wont help probably
2022-01-13 19:12:58 +0100 <Inst> or disrupting a calculation by changing shared variables
2022-01-13 19:13:07 +0100 <dminuoso> This whole notion of effect is not the basis for understanding, it's the *result* of it.
2022-01-13 19:13:23 +0100little_mac(~little_ma@2601:410:4300:3ce0:a09c:720a:f4a0:1ac1)
2022-01-13 19:13:48 +0100kmein(~weechat@user/kmein) (Quit: ciao kakao)
2022-01-13 19:13:51 +0100 <EvanR> changing shared "variables"... sounds like State only
2022-01-13 19:14:06 +0100kmein(~weechat@user/kmein)
2022-01-13 19:14:30 +0100 <EvanR> a special case
2022-01-13 19:15:12 +0100 <EvanR> that's the thing about abstractions, it's hard to get the point across that some example isn't the case in general
2022-01-13 19:15:12 +0100 <dminuoso> Inst: To explain why this is: So Monad captures a particular pattern, that pattern is soley expressible in `>>=` and its laws. But just like QM is perfectly described by its maths, humans have an innate desire for visualization and rationalization guides, which is how QM interpretations arise.
2022-01-13 19:15:30 +0100 <dminuoso> But none of these QM interpretations will help you learn QM in the slightest. Arguably they are completely in the way.
2022-01-13 19:16:02 +0100 <dminuoso> They are what happens after you fully understand quantum mechanics, a sort of result of trying to incorporate your understanding with your belief system
2022-01-13 19:16:28 +0100 <EvanR> and this is how we get the quantum mechanics monad
2022-01-13 19:16:33 +0100 <dminuoso> It's the same with Haskellers and "effect". It's just an attempt of incorporating some innate understanding of Monad with how we think
2022-01-13 19:16:44 +0100 <Cale> dminuoso: If I'm being generous, I'd say Inst is right about needing a stronger understanding of what effects are, insofar as that means learning more examples of monads :)
2022-01-13 19:17:24 +0100 <dminuoso> Cale: Perhaps yeah.
2022-01-13 19:17:40 +0100dyeplexer(~dyeplexer@user/dyeplexer) (Remote host closed the connection)
2022-01-13 19:18:07 +0100 <Cale> But yeah, the key is not to get too focused on the word "effect", and just pick up actual examples. Learn a parsing monad, learn all the basic examples of monads, learn IO specifically, maybe STM or something would be fun also.
2022-01-13 19:18:41 +0100 <Cale> By "basic examples" I mean things like Maybe, lists, Reader, Writer and State
2022-01-13 19:19:12 +0100Ruit(~textual@c-69-248-83-247.hsd1.nj.comcast.net)
2022-01-13 19:19:19 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-01-13 19:19:23 +0100 <Cale> Then once you have all these examples, you'll begin to see what they actually have in common and what they don't.
2022-01-13 19:19:40 +0100ouestbillie(~gallup@192-222-138-215.qc.cable.ebox.net)
2022-01-13 19:19:49 +0100 <dminuoso> And if you dont, just keep using them for months or years.
2022-01-13 19:20:17 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 19:20:17 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 19:20:17 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 19:20:50 +0100DNH(~DNH@2a02:8108:1100:16d8:189c:6a92:5958:80be) (Ping timeout: 250 seconds)
2022-01-13 19:25:37 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 19:26:41 +0100gensyst(gensyst@user/gensyst) (Quit: Leaving)
2022-01-13 19:27:46 +0100MajorBiscuit(~MajorBisc@c-001-009-026.client.tudelft.eduvpn.nl) (Ping timeout: 250 seconds)
2022-01-13 19:27:53 +0100vglfr(~vglfr@46.96.161.71) (Ping timeout: 256 seconds)
2022-01-13 19:29:01 +0100michalz(~michalz@185.246.204.97) (Remote host closed the connection)
2022-01-13 19:29:25 +0100kupi(uid212005@id-212005.hampstead.irccloud.com)
2022-01-13 19:36:23 +0100Constraintegic(~DundiDund@ppp-212-114-229-72.dynamic.mnet-online.de) (Ping timeout: 256 seconds)
2022-01-13 19:37:12 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-01-13 19:38:44 +0100 <Inst> [], IO, Maybe, Either
2022-01-13 19:38:49 +0100 <Inst> () I haven't actually seen its monadic definition
2022-01-13 19:39:18 +0100 <EvanR> pure 'c' :: () -- type error
2022-01-13 19:39:23 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-01-13 19:39:26 +0100 <Inst> well, (a,b)
2022-01-13 19:39:40 +0100 <EvanR> similar
2022-01-13 19:40:08 +0100 <Inst> data (,) a b
2022-01-13 19:40:13 +0100 <EvanR> pure 'c' :: (a,Char) -- where did you get an `a'
2022-01-13 19:40:27 +0100 <sprout_> you either want sequencing or function composition which allows you to compute modulo, or within, some other theory. it isn't that hard
2022-01-13 19:40:38 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 19:40:38 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 19:40:38 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 19:40:56 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-01-13 19:41:09 +0100deadmarshal(~deadmarsh@95.38.231.124)
2022-01-13 19:41:31 +0100 <EvanR> if you modify the type a bit, you can arrange to get an `a' and you have either Reader or State
2022-01-13 19:42:03 +0100 <Inst> interesting fmap definition
2022-01-13 19:42:05 +0100 <Inst> instance Functor ((,) a) where
2022-01-13 19:42:05 +0100 <Inst> fmap f (x,y) = (x, f y)
2022-01-13 19:42:16 +0100 <EvanR> tuple is a Functor but not a Monad
2022-01-13 19:42:30 +0100dut(~dut@user/dut) (Ping timeout: 250 seconds)
2022-01-13 19:42:34 +0100coot(~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827) (Quit: coot)
2022-01-13 19:42:57 +0100 <Inst> instance Monoid a => Monad ((,) a) -- Defined in `GHC.Base'
2022-01-13 19:42:59 +0100coot(~coot@89-64-85-93.dynamic.chello.pl)
2022-01-13 19:43:20 +0100Guest80(~Guest80@188.131.26.124)
2022-01-13 19:43:21 +0100coot(~coot@89-64-85-93.dynamic.chello.pl) (Read error: Connection reset by peer)
2022-01-13 19:43:21 +0100 <EvanR> that's where you can get an `a'
2022-01-13 19:43:28 +0100 <Inst> a monad when a is a monoid
2022-01-13 19:43:42 +0100 <EvanR> that's basically Writer
2022-01-13 19:44:21 +0100 <EvanR> if you do something else you get State
2022-01-13 19:44:35 +0100 <EvanR> and it doesn't require Monoid
2022-01-13 19:45:32 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2022-01-13 19:45:41 +0100 <Inst> reading more random monad explanations
2022-01-13 19:46:40 +0100 <EvanR> the first monad tutorial I read way back when was like, look State, look RNG, look []
2022-01-13 19:46:51 +0100 <Inst> in a way it feels like the parable of the blind men trying to describe an elephant, tbh
2022-01-13 19:46:55 +0100 <EvanR> not a great variety of examples, I was confused xD
2022-01-13 19:47:17 +0100 <Inst> unfortunately, in that parable, you never had the blind mathematician who simply said "an elephant exists"
2022-01-13 19:47:50 +0100 <Inst> for instance, Monad's problem is that in Haskell it refers to two different things, one of which is arguably an incorrect use
2022-01-13 19:48:01 +0100 <Inst> the typeclass, and a type that can be instanced into monad
2022-01-13 19:48:10 +0100 <Inst> the types can be very varied, as well as have very varied instance
2022-01-13 19:48:21 +0100 <Inst> hence the blind men (this is an example of a monad)
2022-01-13 19:48:28 +0100 <EvanR> is that it... I can think of maybe 10 parts of speech where monad is used
2022-01-13 19:48:37 +0100tanners(~tanners@2600:1003:b127:bfd4:fcb8:9a4c:c23:f972) (Ping timeout: 240 seconds)
2022-01-13 19:48:43 +0100 <Inst> monad to refer to category theory, as a synonym for unitary
2022-01-13 19:48:49 +0100 <EvanR> o_O
2022-01-13 19:48:58 +0100tanners(~tanners@pool-71-127-59-41.washdc.fios.verizon.net)
2022-01-13 19:48:58 +0100 <Inst> leibniz monad, spinoza apparently had a monad himself
2022-01-13 19:48:58 +0100 <geekosaur> actually not
2022-01-13 19:49:03 +0100tanners(~tanners@pool-71-127-59-41.washdc.fios.verizon.net) (Client Quit)
2022-01-13 19:49:08 +0100 <geekosaur> @quote MacLane
2022-01-13 19:49:08 +0100 <lambdabot> geekosaur says: so fwiw it looks like [Mac Lane] introduced it in _Categories for the Working Mathematician_, and his terminology note doesn't explain why he picked "monad", but perhaps can be
2022-01-13 19:49:08 +0100 <lambdabot> understood to imply a sort of cross between "monoid" and "triad". (p.138 at http://www.maths.ed.ac.uk/~aar/papers/maclanecat.pdf)
2022-01-13 19:49:35 +0100 <EvanR> unitarity being the higher dimensional complex version of orthogonality?
2022-01-13 19:49:44 +0100 <Inst> oh, spinoza has a different term, not a monad
2022-01-13 19:49:57 +0100 <Inst> that should have been a semicolon, not a comma
2022-01-13 19:50:19 +0100 <Inst> 1a: UNIT, ONE
2022-01-13 19:50:29 +0100 <Inst> https://www.merriam-webster.com/dictionary/monad
2022-01-13 19:50:45 +0100 <EvanR> no monads don't seem to have to do with unitness or oneness
2022-01-13 19:51:05 +0100Unhammer(~Unhammer@user/unhammer) (Read error: Connection reset by peer)
2022-01-13 19:51:13 +0100 <EvanR> despite the apparent root similarity
2022-01-13 19:51:20 +0100 <Inst> i mean i'm against monad mysticism, SPJ even admitted it was a horrible branding mistake
2022-01-13 19:51:45 +0100 <EvanR> agreed
2022-01-13 19:51:58 +0100 <EvanR> many words wouldn't been saved on the confusion
2022-01-13 19:52:04 +0100 <EvanR> er wouldve
2022-01-13 19:53:28 +0100 <EvanR> class ApplicativeMappable f => Flattenable f where join :: f (f a) -> f a
2022-01-13 19:53:35 +0100 <[itchyjunk]> https://bpa.st/34JQ
2022-01-13 19:53:43 +0100 <[itchyjunk]> I am still getting an error for using where it seems
2022-01-13 19:53:44 +0100 <geekosaur> FlatMap
2022-01-13 19:53:49 +0100 <[itchyjunk]> i have it indented correctly
2022-01-13 19:54:01 +0100 <geekosaur> no you don't
2022-01-13 19:54:02 +0100 <dsal> [itchyjunk]: that indentation looks really weird to me.
2022-01-13 19:54:06 +0100 <[itchyjunk]> :<
2022-01-13 19:54:09 +0100vglfr(~vglfr@46.96.161.71)
2022-01-13 19:54:10 +0100 <geekosaur> rather, the where itself is but the line after is not
2022-01-13 19:54:25 +0100 <[itchyjunk]> both starts 1 tab in
2022-01-13 19:54:35 +0100 <Inst> https://cdn.discordapp.com/attachments/528863657363505159/931259915882868806/unknown.png
2022-01-13 19:54:44 +0100 <geekosaur> you need to indent the start of the next line to the start of the variable on the loine with the where
2022-01-13 19:55:11 +0100 <monochrom> "right =" should be aligned with "left ="
2022-01-13 19:55:29 +0100notzmv(~zmv@user/notzmv)
2022-01-13 19:55:40 +0100 <EvanR> > join ["warm","fuzzy","thing"] -- *monads* </aliensmeme>
2022-01-13 19:55:41 +0100 <lambdabot> "warmfuzzything"
2022-01-13 19:56:02 +0100 <monochrom> If you allow yourself to put "where" on its own line and try not to merge it with anything, you will find that you need less indentation.
2022-01-13 19:56:03 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 19:56:35 +0100 <Inst> it's just a typeclass, as well as a name for a class of very different types that can be instanced into this typeclass
2022-01-13 19:56:40 +0100 <Inst> hence why it's such a disaster
2022-01-13 19:56:43 +0100 <EvanR> with laws
2022-01-13 19:56:47 +0100 <[itchyjunk]> i think i fixed it.
2022-01-13 19:56:48 +0100 <EvanR> as good typeclasses have
2022-01-13 19:56:49 +0100 <Inst> yeah
2022-01-13 19:56:50 +0100kuribas(~user@ptr-25vy0i9uvgk6lbwz9nb.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2022-01-13 19:57:00 +0100 <[itchyjunk]> Creating my tree is such a hassle. But i think i tested it and it works
2022-01-13 19:57:07 +0100 <[itchyjunk]> is there an easier way to check?
2022-01-13 19:57:16 +0100 <[itchyjunk]> myTree = Node 1 (Node 2 (Node 3 Nil Nil) (Node 4 Nil Nil)) (Node 5 Nil Nil)
2022-01-13 19:57:23 +0100 <[itchyjunk]> myTreeDepth myTree
2022-01-13 19:57:23 +0100 <[itchyjunk]> 3
2022-01-13 19:57:26 +0100 <Inst> totally feel like you're doing Haskell from the Very Beginning
2022-01-13 19:57:38 +0100 <Inst> chapter 7 or 8, or somewhere, splitEither function shows up
2022-01-13 19:57:39 +0100 <[itchyjunk]> http://sketchtoy.com/70395626
2022-01-13 19:57:41 +0100 <monochrom> We only know of harder ways to check, but the harder ways check way more things, we think it's worth it.
2022-01-13 19:57:44 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 19:57:44 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 19:57:44 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 19:57:45 +0100 <Inst> Chapter 11, iirc, my binary tree
2022-01-13 19:57:46 +0100 <[itchyjunk]> i drew my tree and it makes sense
2022-01-13 19:57:59 +0100 <monochrom> Namely, we have a library for randomized testing...
2022-01-13 19:58:06 +0100 <EvanR> hah sketchtoy is cool
2022-01-13 19:58:24 +0100azimut_(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
2022-01-13 19:58:38 +0100 <[itchyjunk]> since i drew sketchtoy, my code must be right, right?
2022-01-13 19:59:13 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 19:59:13 +0100 <monochrom> No, a million things could go wrong. (Not saying they do today.)
2022-01-13 19:59:18 +0100 <Inst> did you consider implementing a if' function yet?
2022-01-13 19:59:23 +0100 <Inst> also, joining the church of the latter day saints?
2022-01-13 19:59:29 +0100 <[itchyjunk]> can you implement that?
2022-01-13 19:59:35 +0100 <[itchyjunk]> that seems to baked into a language
2022-01-13 19:59:38 +0100 <Inst> if' a b c = if a then b else c
2022-01-13 19:59:54 +0100 <[itchyjunk]> hmm
2022-01-13 19:59:55 +0100 <monochrom> "Does Node 1 (Node 2 (Node 3 Nil Nil) (Node 4 Nil Nil)) (Node 5 Nil Nil) actually correspond to the picture you draw?" would be the first breakable link.
2022-01-13 20:00:07 +0100 <[itchyjunk]> wait, i thought it did
2022-01-13 20:00:12 +0100 <dsal> :t bool
2022-01-13 20:00:13 +0100 <[itchyjunk]> did i draw it wrong? ;o
2022-01-13 20:00:13 +0100 <lambdabot> a -> a -> Bool -> a
2022-01-13 20:00:33 +0100 <monochrom> See, that's my point. I think you drew it right. But you never know!
2022-01-13 20:00:38 +0100 <geekosaur> "if a then b else c" desugars to a case
2022-01-13 20:00:58 +0100 <geekosaur> case is an expression, as is if…then…else
2022-01-13 20:00:59 +0100 <[itchyjunk]> I am atleast 10% sure it's right
2022-01-13 20:01:05 +0100 <monochrom> Or alternatively but equivalently the picture is right the data is wrong.
2022-01-13 20:01:19 +0100 <[itchyjunk]> /o\
2022-01-13 20:01:39 +0100 <[itchyjunk]> i double checked, it am at least twice as sure its correct
2022-01-13 20:02:05 +0100 <monochrom> Look up "confirmation bias".
2022-01-13 20:02:30 +0100 <Inst> one argument against applicative being about effects:
2022-01-13 20:02:32 +0100 <Inst> Identity Monad
2022-01-13 20:02:49 +0100 <EvanR> it's the no effect monad
2022-01-13 20:02:59 +0100 <EvanR> and applicative
2022-01-13 20:03:32 +0100 <monochrom> Haha are we going to also argue about squares not being rectangles, circles being not ellipses, 0 and 1 not being numbers...
2022-01-13 20:03:49 +0100e3615us(~e3615us@188.131.26.124)
2022-01-13 20:03:50 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
2022-01-13 20:03:52 +0100 <geekosaur> the reason this is useful is so things like State vs. StateT are actually the same thing (State is StateT Identity)
2022-01-13 20:03:56 +0100Guest80(~Guest80@188.131.26.124) (Quit: Client closed)
2022-01-13 20:04:03 +0100 <geekosaur> used to be they were separate
2022-01-13 20:04:06 +0100 <[itchyjunk]> I think someone got stabbed for claiming sqrt(2) is irrational
2022-01-13 20:04:30 +0100Ruit(~textual@c-69-248-83-247.hsd1.nj.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-01-13 20:04:33 +0100 <EvanR> I guess that's the opposite problem
2022-01-13 20:04:36 +0100zaquest(~notzaques@5.130.79.72) (Ping timeout: 250 seconds)
2022-01-13 20:05:26 +0100 <EvanR> sqrt(2) is irrational peg in rational hole, while Identity fits exactly
2022-01-13 20:06:04 +0100zaquest(~notzaques@5.130.79.72)
2022-01-13 20:06:12 +0100 <EvanR> and surprises everyone
2022-01-13 20:06:20 +0100 <EvanR> named Inst
2022-01-13 20:06:24 +0100 <monochrom> Oh where is that PLT tumblr thing or something again? It has one about pegs, holes, and IO.
2022-01-13 20:06:31 +0100cosimone(~user@93-47-228-11.ip115.fastwebnet.it)
2022-01-13 20:07:16 +0100 <Inst> the story was about golden ratio, not sqrt (2)
2022-01-13 20:07:35 +0100 <monochrom> This one! https://this-plt-life.tumblr.com/post/44462204757/simon-peyton-jones-adding-the-io-monad-to-haskell
2022-01-13 20:07:36 +0100e3615us(~e3615us@188.131.26.124) (Remote host closed the connection)
2022-01-13 20:07:47 +0100 <EvanR> lol
2022-01-13 20:08:49 +0100 <Inst> what was haskell using before the IO type constructor?
2022-01-13 20:09:05 +0100 <monochrom> [Response] -> [Request]
2022-01-13 20:11:40 +0100 <geekosaur> lazy lists. easy to get out of sync
2022-01-13 20:14:08 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 250 seconds)
2022-01-13 20:14:44 +0100 <EvanR> you can use a monad to suspend and only continue when given the response from the host
2022-01-13 20:15:08 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com)
2022-01-13 20:15:09 +0100 <EvanR> might help
2022-01-13 20:15:33 +0100 <EvanR> if I went back to 1990 I would rule
2022-01-13 20:15:35 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-01-13 20:16:59 +0100_xor(~xor@dsl-50-5-233-169.fuse.net) (Read error: Connection reset by peer)
2022-01-13 20:18:13 +0100lavaman(~lavaman@98.38.249.169)
2022-01-13 20:18:15 +0100 <wmacmil> how do you fmap the aeson decode function for a ByteString with multiple json entries?
2022-01-13 20:19:22 +0100dhouthoo(~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4)
2022-01-13 20:19:25 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-01-13 20:19:42 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-01-13 20:20:36 +0100 <wmacmil> like in this answer
2022-01-13 20:20:38 +0100 <EvanR> it's possible to get the unconsume input back from a parse
2022-01-13 20:20:51 +0100 <Cale> wmacmil: I don't completely understand that question. What types of things do you have/want? If you had multiple ByteStrings stored in some container of some sort, you might be able to fmap decode
2022-01-13 20:20:52 +0100 <EvanR> it's possible to get the unconsumed input back from a parser, and run it again on the rest
2022-01-13 20:20:54 +0100 <wmacmil> they only have a single entry
2022-01-13 20:20:55 +0100 <wmacmil> https://stackoverflow.com/questions/54233506/read-single-field-of-object-using-aeson-without-writi…
2022-01-13 20:21:25 +0100 <EvanR> oh maybe I misunderstood
2022-01-13 20:21:29 +0100 <wmacmil> decode "{ \"foo\": \"bar\", \"baz\": 42 }\n{ \"foo\": \"freak\", \"baz\": 11112 }"
2022-01-13 20:21:35 +0100 <EvanR> no I didn't
2022-01-13 20:21:46 +0100 <Cale> ahh, hmm
2022-01-13 20:22:15 +0100 <EvanR> runParser in aeson returns the unconsumed rest of input, so it's possible
2022-01-13 20:22:25 +0100 <Cale> Yeah, you'll have to run the parser manually
2022-01-13 20:22:41 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
2022-01-13 20:22:57 +0100_xor(~xor@dsl-50-5-233-169.fuse.net)
2022-01-13 20:25:12 +0100 <wmacmil> sorry what that mean exactly, like do some kind of foldr or mapm with parseJSON?
2022-01-13 20:25:13 +0100 <Cale> Something like case parse json s of Done rest o -> ... perhaps do something recursive with rest :: ByteString and the parsed o :: Value ...
2022-01-13 20:25:30 +0100jacks-(~bc8147f2@cerf.good1.com)
2022-01-13 20:25:39 +0100 <Cale> Let me give it an actual try
2022-01-13 20:26:24 +0100 <wmacmil> cool
2022-01-13 20:26:34 +0100 <jacks-> hi. with aeson is it possible to parse a deeply nested json, where I'm only interested in the inner-most part, without having to create haskell data for entire parent structure?
2022-01-13 20:26:41 +0100 <EvanR> wmacmil, generally, it's cool if a parser has an interface like String -> Maybe (a, String), which gives you a value (if successful) and the rest of the input where the parser left off
2022-01-13 20:26:56 +0100 <EvanR> in this case it does, even if it's kind of low level. It saved your ass xD
2022-01-13 20:27:42 +0100 <Cale> λ> parse json s
2022-01-13 20:27:42 +0100 <Cale> Done "\n{ \"foo\": \"freak\", \"baz\": 11112 }" (Object (fromList [("baz",Number 42.0),("foo",String "bar")]))
2022-01-13 20:27:49 +0100 <EvanR> jacks-, the Value type is good for that
2022-01-13 20:28:01 +0100 <EvanR> parse into a Value then dig into that
2022-01-13 20:28:47 +0100 <Cale> wmacmil: and then, despite the initial \n, the json parser will parse that remaining string just fine
2022-01-13 20:28:57 +0100shapr(~user@2601:7c0:c37c:46d0:fa29:61d1:1155:8385) (Ping timeout: 240 seconds)
2022-01-13 20:29:10 +0100 <jacks-> ok I'll try. another option, I guess, would be to write a custom FromJSON instance, that walks through the tree, and just returns a list of inner-most data I care about?
2022-01-13 20:29:21 +0100themc47(~mc47@xmonad/TheMC47)
2022-01-13 20:29:23 +0100 <wmacmil> thanks, Cale
2022-01-13 20:29:28 +0100 <EvanR> that seems like a lot more work
2022-01-13 20:29:37 +0100 <Cale> So, I'd probably just write the recursion by hand, but it's probably possible to express as an unfoldr if you really want
2022-01-13 20:29:38 +0100 <EvanR> you have to represent everything in between
2022-01-13 20:29:39 +0100mc47(~mc47@xmonad/TheMC47) (Ping timeout: 256 seconds)
2022-01-13 20:29:39 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 256 seconds)
2022-01-13 20:30:00 +0100 <[itchyjunk]> working with tree is a pain.
2022-01-13 20:30:02 +0100 <jacks-> I see
2022-01-13 20:30:26 +0100 <[itchyjunk]> Hmm, unless i can create it in a txt file and just "load" it.
2022-01-13 20:30:37 +0100 <[itchyjunk]> How hard is IO stuff in haskell? maybe i need to learn that next :x
2022-01-13 20:30:42 +0100 <Cale> unfoldr (\s -> case parse json s of Done s' o -> Just (o,s'); _ -> Nothing) s
2022-01-13 20:30:57 +0100 <Cale> ^^ this works, though note that it silently ignores failures
2022-01-13 20:31:08 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-01-13 20:31:19 +0100 <Cale> So if your input is cut off or becomes invalid at some point, it will just stop there
2022-01-13 20:31:21 +0100 <johnjaye> [itchyjunk]: hard
2022-01-13 20:31:25 +0100 <[itchyjunk]> :(
2022-01-13 20:31:33 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
2022-01-13 20:31:43 +0100 <Cale> It's not hard
2022-01-13 20:31:57 +0100 <johnjaye> but it kind of has to be. a conceptual model of programming like OO for example often has edge cases that don't fit that model
2022-01-13 20:32:18 +0100 <Cale> IO in Haskell is just a little different from most imperative languages, but then again, what isn't?
2022-01-13 20:32:23 +0100 <EvanR> jacks-, I take it back... if you only have FromJSON and no ToJSON, it might be possible, since you won't be putting the surrounding json back. But what if the location within the structure changes? Just seems like the wrong use for FromJSON
2022-01-13 20:32:25 +0100 <dsal> IO isn't hard in Haskell.
2022-01-13 20:32:37 +0100n3rdy1(~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds)
2022-01-13 20:32:39 +0100 <wmacmil> when you say "parse json s"
2022-01-13 20:32:52 +0100 <dsal> IO is hard in Haskell the same way longjmp is hard in C.
2022-01-13 20:32:53 +0100 <wmacmil> json :: bytestring,
2022-01-13 20:33:03 +0100 <Cale> no
2022-01-13 20:33:12 +0100 <wmacmil> parse = parseJSON
2022-01-13 20:33:13 +0100 <Cale> json :: Parser Value from Data.Aeson
2022-01-13 20:33:18 +0100 <wmacmil> ?
2022-01-13 20:33:21 +0100 <wmacmil> and whats "s"
2022-01-13 20:33:24 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com) (Remote host closed the connection)
2022-01-13 20:33:27 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-01-13 20:33:31 +0100 <Cale> s :: ByteString
2022-01-13 20:33:44 +0100 <Cale> https://hackage.haskell.org/package/attoparsec-0.14.3/docs/Data-Attoparsec-ByteString.html#v:parse
2022-01-13 20:33:47 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com)
2022-01-13 20:33:48 +0100 <Cale> ^^ this is parse
2022-01-13 20:33:59 +0100 <Cale> see the Result type just above where I linked
2022-01-13 20:34:11 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 20:34:12 +0100 <geekosaur> I think they missed it
2022-01-13 20:34:29 +0100 <Cale> json is the parser that Aeson defines here: https://hackage.haskell.org/package/aeson-2.0.3.0/docs/Data-Aeson.html#v:json
2022-01-13 20:34:30 +0100 <wmacmil> sorry it disconnected me for a second
2022-01-13 20:34:31 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 20:34:32 +0100 <Cale> oh
2022-01-13 20:34:39 +0100 <Cale> s :: ByteString
2022-01-13 20:34:47 +0100 <Cale> parse is from https://hackage.haskell.org/package/attoparsec-0.14.3/docs/Data-Attoparsec-ByteString.html#v:parse
2022-01-13 20:35:51 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2022-01-13 20:36:03 +0100 <Cale> Depending on your use case, you may prefer to use json' which will more aggressively convert the json into Haskell datastructures (the unticked json parser will leave lots of unparsed chunks waiting to be parsed when you actually look at them)
2022-01-13 20:36:59 +0100 <[itchyjunk]> Is "System.IO" where I want to start?
2022-01-13 20:37:45 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd)
2022-01-13 20:38:11 +0100 <wmacmil> thank you again, Cale
2022-01-13 20:38:18 +0100 <EvanR> do { putStrLn "Would you like to play a game?"; answer <- getLine; ...; return ()} :: IO ()
2022-01-13 20:39:02 +0100 <[itchyjunk]> hmm
2022-01-13 20:40:06 +0100 <EvanR> thus begins the worst zork ever
2022-01-13 20:41:20 +0100 <[itchyjunk]> I realize idk how to run my haskell without loading it into ghci either..
2022-01-13 20:41:31 +0100 <[itchyjunk]> That was another mystery is needed to solve some day.
2022-01-13 20:42:26 +0100 <geekosaur> runghc?
2022-01-13 20:42:31 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 256 seconds)
2022-01-13 20:42:36 +0100 <geekosaur> and then there'ds compiling it
2022-01-13 20:43:32 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-01-13 20:43:56 +0100wrengr(~wrengr@99.34.197.35.bc.googleusercontent.com)
2022-01-13 20:45:38 +0100 <[itchyjunk]> Yeah one of those.. i required using Main or somesuch and i filed it under "another day"
2022-01-13 20:46:59 +0100 <geekosaur> haskell programs aren't scripts that execute from the top down, they start running at the IO action "main"
2022-01-13 20:47:25 +0100lechner(~lechner@debian/lechner) (Ping timeout: 240 seconds)
2022-01-13 20:47:50 +0100 <wmacmil> now when i try your unfoldr definition, its giving me the following typing error :
2022-01-13 20:47:51 +0100 <wmacmil> Couldn't match type ‘Value’ with ‘GHC.Word.Word8’
2022-01-13 20:47:51 +0100 <geekosaur> but you will probably want to put together either a stack or cabal project
2022-01-13 20:48:22 +0100prite(~pritam@user/pritambaral) (Ping timeout: 250 seconds)
2022-01-13 20:48:59 +0100 <geekosaur> https://github.com/geekosaur/xmonad.hs/tree/skkukuk is a small cabal project for my xmonad configuration, omitting the git checkouts
2022-01-13 20:49:26 +0100 <wmacmil> where its inferring the unfoldr from Data.ByteString.Lazy
2022-01-13 20:50:58 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 250 seconds)
2022-01-13 20:51:00 +0100lechner(~lechner@debian/lechner)
2022-01-13 20:51:53 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-01-13 20:51:57 +0100xb0o2(~xb0o2@user/xb0o2) (Quit: Client closed)
2022-01-13 20:52:51 +0100Midjak(~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
2022-01-13 20:52:52 +0100 <geekosaur> you don't have to worry much about what's in the xmonad.hs aside from the fact that it starts running at the "main =" line
2022-01-13 20:53:08 +0100deadmarshal(~deadmarsh@95.38.231.124) (Ping timeout: 250 seconds)
2022-01-13 20:54:01 +0100xsarnik(xsarnik@lounge.fi.muni.cz) (Ping timeout: 256 seconds)
2022-01-13 20:54:55 +0100 <wmacmil> @Cale, where is the unfoldr you're using coming from?
2022-01-13 20:54:55 +0100 <lambdabot> Unknown command, try @list
2022-01-13 20:55:58 +0100 <EvanR> @index unfoldr
2022-01-13 20:55:58 +0100 <lambdabot> GHC.OldList, Data.List, Data.ByteString.Lazy.Char8, Data.ByteString.Lazy, Data.ByteString.Char8, Data.ByteString, Data.Sequence
2022-01-13 20:56:13 +0100 <EvanR> Data.List probably
2022-01-13 20:56:28 +0100 <Cale> Yeah, Data.List
2022-01-13 20:56:28 +0100briandaed(~root@185.234.208.208.r.toneticgroup.pl)
2022-01-13 20:58:57 +0100Inst(~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
2022-01-13 20:59:34 +0100 <wmacmil> thank you
2022-01-13 20:59:35 +0100 <wmacmil> !
2022-01-13 21:00:24 +0100 <wmacmil> it says something about attoparsec deprecating. is that something I have to manually deal with or will there be a new parser library with ghc?
2022-01-13 21:02:53 +0100 <carbolymer> I'm modelling a tree, which can have three values for leaf, and two of three as a root (A and B). I'm thinking of `data T = A [Either X T] | B [Either X T]` but handling Either additinally seems a bit... impractical. Right now I'm using `data A = A [T] | B [T] | C X`, which is simpler, but the type itself allows for root to be `C X`, which does not make sense in my case. Is there a better way to represent this?
2022-01-13 21:04:15 +0100 <carbolymer> the latter example should be: `data T = A [T] | B [T] | C X`
2022-01-13 21:04:33 +0100opticblast(~june@secure-165.caltech.edu)
2022-01-13 21:04:37 +0100juhp(~juhp@128.106.188.82) (Ping timeout: 240 seconds)
2022-01-13 21:05:09 +0100ubert(~Thunderbi@p200300ecdf099487827ed8c05b109aa8.dip0.t-ipconnect.de)
2022-01-13 21:05:26 +0100 <dsal> What is X?
2022-01-13 21:05:34 +0100 <carbolymer> dsal: a type, you can assume Char
2022-01-13 21:06:06 +0100 <dsal> Why not `x` Then you can `data T x` and then your Either is filled in later.
2022-01-13 21:06:40 +0100 <dsal> Traversable should help you iron the rest out.
2022-01-13 21:06:42 +0100juhp(~juhp@128.106.188.82)
2022-01-13 21:07:52 +0100waleee(~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 250 seconds)
2022-01-13 21:07:54 +0100 <carbolymer> dsal: you mean make T parametric? I think I don't see how constructors would look like then?
2022-01-13 21:08:32 +0100 <dsal> I don't completely understand your use case, but you just pass the type aroudn. `data A x = A [T x] | B [T x] | C x`
2022-01-13 21:08:36 +0100hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
2022-01-13 21:08:42 +0100 <dsal> er, T
2022-01-13 21:08:58 +0100 <carbolymer> I just want to prevent the tree's root to be `C X`
2022-01-13 21:09:08 +0100 <carbolymer> and encode it in a single, quite simple type
2022-01-13 21:09:42 +0100 <c_wraith> If you want the root to have different legal values than the rest of the nodes, then you want it to be a different type than the rest of the nodes
2022-01-13 21:10:14 +0100 <carbolymer> c_wraith: right, I hoped that I could avoid that ;)
2022-01-13 21:10:42 +0100 <carbolymer> c_wraith: because it forces to implement a bunch of corner cases for functions handling tree
2022-01-13 21:11:11 +0100 <c_wraith> Not necessarily. There are different ways to handle "different type"
2022-01-13 21:11:15 +0100 <dsal> But that base type can be `Maybe T`
2022-01-13 21:12:30 +0100fef(~thedawn@user/thedawn) (Ping timeout: 276 seconds)
2022-01-13 21:13:29 +0100 <lyxia> data T_ a = A [T_ X] | B [T_ X] | C a ; type T = T_ Void ; type T' = T_ X
2022-01-13 21:14:13 +0100 <wmacmil> i'm now getting an error with where ByteString is defined
2022-01-13 21:14:36 +0100 <wmacmil> ‘Data.ByteString.Internal.ByteString’ is not the same as 'Data.ByteString.Lazy'
2022-01-13 21:15:01 +0100 <c_wraith> wmacmil: true. those are not the same type. But there are convenient conversion functions.
2022-01-13 21:15:23 +0100 <EvanR> different types for root or branch than for leaves
2022-01-13 21:15:33 +0100 <carbolymer> lyxia: that looks better!
2022-01-13 21:15:43 +0100 <carbolymer> EvanR: how to unify them then?
2022-01-13 21:15:48 +0100 <EvanR> unify?
2022-01-13 21:16:05 +0100 <carbolymer> EvanR: I want to traverse the tree, and I don't want to write special cases for the root
2022-01-13 21:16:31 +0100 <EvanR> oh now I see what you meant, these are all leaves
2022-01-13 21:17:49 +0100madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
2022-01-13 21:19:45 +0100 <c_wraith> you could always use a GADT where the constructors allowed for the root have a different result type than the constructors allowed other places
2022-01-13 21:19:46 +0100 <EvanR> data Leaf tag where A :: Leaf Ok; B :: Leaf Ok; C :: Leaf NotOk
2022-01-13 21:19:55 +0100 <c_wraith> like EvanR just demonstrated
2022-01-13 21:21:24 +0100 <c_wraith> "different type" doesn't need to mean "different data declaration" :)
2022-01-13 21:21:33 +0100 <carbolymer> right
2022-01-13 21:21:55 +0100 <carbolymer> good idea with GADTs, EvanR, c_wraith
2022-01-13 21:21:58 +0100 <carbolymer> thanks
2022-01-13 21:22:23 +0100 <wmacmil> where are those conversion functions documented
2022-01-13 21:23:14 +0100 <c_wraith> wmacmil: https://hackage.haskell.org/package/bytestring-0.11.2.0/docs/Data-ByteString-Lazy.html#v:fromStrict and toStrict, the next function down the page
2022-01-13 21:26:44 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-01-13 21:26:51 +0100shapr(~user@2601:7c0:c37c:46d0:e770:81ff:40e0:b008)
2022-01-13 21:30:51 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 21:32:18 +0100d34df00d(~d34df00d@2600:1700:8c60:3a10::48)
2022-01-13 21:35:36 +0100xsarnik(xsarnik@lounge.fi.muni.cz)
2022-01-13 21:36:57 +0100stef204(~stef204@user/stef204) (Quit: WeeChat 3.4)
2022-01-13 21:37:32 +0100zincy(~zincy@2a00:23c8:970c:4801:911c:c4ab:2f7e:d3f1)
2022-01-13 21:38:35 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 21:38:35 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 21:38:35 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 21:38:54 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com) (Remote host closed the connection)
2022-01-13 21:39:55 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com)
2022-01-13 21:40:30 +0100rekahsoft(~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
2022-01-13 21:43:09 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 21:49:54 +0100 <wmacmil> so is there really no way to import a text file into haskell without always wrapping IO bindings around all the types and always working in a do block
2022-01-13 21:51:33 +0100__monty__(~toonn@user/toonn)
2022-01-13 21:52:07 +0100 <polyphem_> wmacmil: https://sadnesstheory.files.wordpress.com/2015/02/wpid-io-monad.jpg?w=584
2022-01-13 21:53:17 +0100polyphem_polyphem
2022-01-13 21:55:21 +0100 <EvanR> actually IO is Applicative so you can technical wrap everything with <*>'s xD
2022-01-13 21:55:35 +0100 <jkaye_> How would you get a file from on disk into memory without introducing effects? You're going to need an effect of some kind
2022-01-13 21:55:38 +0100 <EvanR> instead of do blocks
2022-01-13 21:55:55 +0100 <jkaye_> The default effect to do that is IO, but there are ways to use a different effect in your code if you want to keep the IO part separate
2022-01-13 21:56:20 +0100 <EvanR> getting a file through I/O is... like the main point of IO
2022-01-13 21:56:22 +0100 <geekosaur> I'm not sure what is meant by "import" here
2022-01-13 21:57:24 +0100jkaye_jkaye
2022-01-13 21:57:29 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk) (Remote host closed the connection)
2022-01-13 21:57:50 +0100 <geekosaur> there are things like https://hackage.haskell.org/package/heredoc-0.2.0.0/docs/Text-Heredoc.html that can embed a file at compile time, hence not requiring IO at runtime
2022-01-13 21:58:00 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 21:58:27 +0100 <polyphem> change perspective, its the procedural view that traps you. instead of writing a subprogram that does file Io and validation, you load the file in main and pass it to pure program logic.
2022-01-13 21:59:58 +0100 <EvanR> main = printAnswer =<< pure . programLogic =<< readFile "name"
2022-01-13 22:00:06 +0100pavonia(~user@user/siracusa)
2022-01-13 22:01:57 +0100 <EvanR> sometimes the way to make more of your program pure program logic is obvious, sometimes it isn't
2022-01-13 22:02:25 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2022-01-13 22:07:54 +0100_ht(~quassel@82-168-34-160.fixed.kpn.net) (Remote host closed the connection)
2022-01-13 22:09:23 +0100 <wmacmil> does (^?) come builtin with Data.Aeson.Lens?
2022-01-13 22:09:31 +0100rekahsoft(~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection)
2022-01-13 22:09:57 +0100sim590(~simon@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 256 seconds)
2022-01-13 22:10:04 +0100rekahsoft(~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
2022-01-13 22:10:10 +0100 <briandaed> wmacmill you may always check such things in hoogle
2022-01-13 22:12:10 +0100ensyde(~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2022-01-13 22:13:15 +0100 <polyphem> wmacmil: if you have a decent terminal , you can use this https://lazamar.github.io/haskell-documentation-in-the-command-line/ , its really nice to work with IMHO
2022-01-13 22:13:24 +0100 <jacks-> wmacmill, the whole point of IO type is to capture things like reading files. there are escape hatches, but they really shouldn't be used for things like reading files in 99% of the cases
2022-01-13 22:19:32 +0100jumper149(~jumper149@base.felixspringer.xyz) (Quit: WeeChat 3.3)
2022-01-13 22:20:12 +0100waleee(~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
2022-01-13 22:20:37 +0100mastarija(~mastarija@2a05:4f46:e0e:5000:a5f9:5faf:f69c:8827)
2022-01-13 22:23:10 +0100sim590(~simon@modemcable090.207-203-24.mc.videotron.ca)
2022-01-13 22:23:33 +0100`2jt(~jtomas@10.red-83-58-228.dynamicip.rima-tde.net) (Ping timeout: 256 seconds)
2022-01-13 22:24:11 +0100travv0_travv0
2022-01-13 22:24:42 +0100travv0(sid293381@id-293381.helmsley.irccloud.com) (Changing host)
2022-01-13 22:24:42 +0100travv0(sid293381@user/travv0)
2022-01-13 22:27:14 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 22:29:27 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 22:29:44 +0100xb0o2(~xb0o2@user/xb0o2)
2022-01-13 22:30:00 +0100acarrico1(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2022-01-13 22:30:39 +0100mastarija_(~mastarija@2a05:4f46:e0e:5000:a5f9:5faf:f69c:8827)
2022-01-13 22:30:49 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2022-01-13 22:31:30 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 250 seconds)
2022-01-13 22:32:01 +0100schweers(~user@2001:16b8:e978:5100:aaa1:59ff:fe3f:235c) (Ping timeout: 245 seconds)
2022-01-13 22:32:59 +0100acarrico1acarrico
2022-01-13 22:33:10 +0100acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Client Quit)
2022-01-13 22:33:27 +0100acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2022-01-13 22:33:37 +0100mastarija(~mastarija@2a05:4f46:e0e:5000:a5f9:5faf:f69c:8827) (Ping timeout: 240 seconds)
2022-01-13 22:33:45 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2022-01-13 22:36:35 +0100mvk(~mvk@2607:fea8:5cdd:f000::55f8)
2022-01-13 22:39:24 +0100jgeerds(~jgeerds@55d4bbed.access.ecotel.net)
2022-01-13 22:41:37 +0100mastarija_(~mastarija@2a05:4f46:e0e:5000:a5f9:5faf:f69c:8827) (Quit: Leaving)
2022-01-13 22:44:17 +0100ph88(~ph88@2a02:8109:9e00:71d0::7e04)
2022-01-13 22:46:25 +0100kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-01-13 22:49:51 +0100acidjnk(~acidjnk@p200300d0c7271e85bcf2712229551d8e.dip0.t-ipconnect.de)
2022-01-13 22:51:45 +0100deadmarshal(~deadmarsh@95.38.231.124)
2022-01-13 22:52:14 +0100 <qrpnxz> It's way too cool i can just say `-threaded` and my program will be threaded. The power of purity and amazing compiler writers
2022-01-13 22:52:57 +0100 <geekosaur> neh. "-threaded" just enables the threaded runtime; you still need to do something with threads :)
2022-01-13 22:53:15 +0100 <geekosaur> automatic threading is very much an unsolved problem
2022-01-13 22:56:12 +0100deadmarshal(~deadmarsh@95.38.231.124) (Ping timeout: 250 seconds)
2022-01-13 22:58:32 +0100yauhsien_(~yauhsien@61-231-29-214.dynamic-ip.hinet.net)
2022-01-13 22:58:32 +0100yauhsien(~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
2022-01-13 22:59:07 +0100 <byorgey> still, the point stands, it's very easy to fork some threads or add some parallelism annotations
2022-01-13 23:01:12 +0100 <monochrom> Taking a step back, it is cool that we encourage multi-threading when communities of other languages fear it.
2022-01-13 23:01:36 +0100coot(~coot@89-64-85-93.dynamic.chello.pl)
2022-01-13 23:03:16 +0100cdeln(~cdeln@212-107-139-206.customers.ownit.se)
2022-01-13 23:04:45 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2022-01-13 23:06:43 +0100cdeln(~cdeln@212-107-139-206.customers.ownit.se) (Quit: leaving)
2022-01-13 23:09:55 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-01-13 23:11:14 +0100xb0o2(~xb0o2@user/xb0o2) (Quit: Client closed)
2022-01-13 23:14:02 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-01-13 23:14:02 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-01-13 23:14:02 +0100wroathe(~wroathe@user/wroathe)
2022-01-13 23:14:16 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 23:17:53 +0100 <shapr> Anyone using the morpheus graphql client with the GitHub API?
2022-01-13 23:19:05 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-01-13 23:19:15 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
2022-01-13 23:20:28 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk) (Ping timeout: 250 seconds)
2022-01-13 23:33:00 +0100wre^(~wre@wsip-98-188-242-61.mc.at.cox.net)
2022-01-13 23:34:50 +0100ec(~ec@gateway/tor-sasl/ec)
2022-01-13 23:37:05 +0100ph88(~ph88@2a02:8109:9e00:71d0::7e04) (Quit: Leaving)
2022-01-13 23:38:07 +0100briandaed(~root@185.234.208.208.r.toneticgroup.pl) (Quit: leaving)
2022-01-13 23:38:50 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com) (Quit: Leaving)
2022-01-13 23:39:54 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-01-13 23:41:32 +0100burnsidesLlama(~burnsides@dhcp168-031.wadham.ox.ac.uk)
2022-01-13 23:41:47 +0100themc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-01-13 23:45:29 +0100wmacmil(~wmacmil@83-233-165-97.cust.bredband2.com)
2022-01-13 23:47:13 +0100tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-01-13 23:48:57 +0100hexemeldlework
2022-01-13 23:50:22 +0100vglfr(~vglfr@46.96.161.71) (Ping timeout: 250 seconds)
2022-01-13 23:52:09 +0100alx741_(~alx741@157.100.93.160)
2022-01-13 23:52:10 +0100alx741_(~alx741@157.100.93.160) (Client Quit)
2022-01-13 23:52:15 +0100alx741(~alx741@157.100.93.160) (Quit: leaving)
2022-01-13 23:58:48 +0100__monty__(~toonn@user/toonn) (Quit: leaving)