Home liberachat/#haskell: Logs Calendar

Logs on 2022-01-13 (liberachat/#haskell)

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

All times are in UTC on 2022-01-13.