Home freenode/#haskell: Logs Calendar

Logs on 2020-11-25 (freenode/#haskell)

00:00:58 × hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 260 seconds)
00:01:27 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
00:03:38 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 264 seconds)
00:04:21 hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net)
00:05:37 × texasmynsted quits (~texasmyns@212.102.45.123) (Ping timeout: 264 seconds)
00:05:42 Nahra joins (~Nahra@unaffiliated/nahra)
00:06:21 christo joins (~chris@81.96.113.213)
00:07:12 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
00:07:38 conal joins (~conal@64.71.133.70)
00:08:05 × Sarma quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
00:08:19 × conal quits (~conal@64.71.133.70) (Client Quit)
00:08:59 conal joins (~conal@64.71.133.70)
00:09:06 × conal quits (~conal@64.71.133.70) (Client Quit)
00:09:41 conal joins (~conal@64.71.133.70)
00:09:41 × conal quits (~conal@64.71.133.70) (Client Quit)
00:10:09 conal joins (~conal@64.71.133.70)
00:10:25 × argent0 quits (~argent0@168.227.98.84) (Ping timeout: 264 seconds)
00:11:05 × christo quits (~chris@81.96.113.213) (Ping timeout: 256 seconds)
00:13:57 × oisdk quits (~oisdk@2001:bb6:3329:d100:199a:baf3:2d99:2a0a) (Quit: oisdk)
00:15:17 texasmynsted joins (~texasmyns@212.102.45.121)
00:15:25 × bergey` quits (~user@107.181.19.30) (Ping timeout: 240 seconds)
00:15:38 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
00:16:39 argent0 joins (~argent0@168.227.98.84)
00:17:35 christo joins (~chris@81.96.113.213)
00:27:38 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:27:47 × borne quits (~fritjof@200116b864eb5c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
00:34:36 × m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 240 seconds)
00:37:09 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
00:37:18 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in)
00:37:56 × Nahra quits (~Nahra@unaffiliated/nahra) (Ping timeout: 240 seconds)
00:38:10 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
00:38:19 Nahra joins (~Nahra@unaffiliated/nahra)
00:38:29 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
00:38:37 × ystael quits (~ystael@209.6.50.55) (Ping timeout: 264 seconds)
00:39:18 ystael joins (~ystael@209.6.50.55)
00:39:30 Jeanne-Kamikaze joins (~Jeanne-Ka@66.115.189.187)
00:40:40 heatsink_ joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
00:41:21 × Francois quits (~francois@2a02:a03f:5ad8:f100:707f:a6cc:c4f1:c0ac) (Read error: Connection reset by peer)
00:41:24 × argent0 quits (~argent0@168.227.98.84) (Ping timeout: 260 seconds)
00:41:56 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
00:44:21 × Aquazi quits (uid312403@gateway/web/irccloud.com/x-wbgzurqeqqwdxxpf) (Quit: Connection closed for inactivity)
00:48:25 sfvm joins (~sfvm@37.228.215.148)
00:50:05 × frdg quits (~nick@pool-71-184-143-249.bstnma.fios.verizon.net) (Ping timeout: 240 seconds)
00:51:01 hackage servant-exceptions 0.2.0 - Extensible exceptions for servant APIs https://hackage.haskell.org/package/servant-exceptions-0.2.0 (ch1bo)
00:52:01 hackage servant-exceptions-server 0.2.0 - Extensible exceptions for servant API servers https://hackage.haskell.org/package/servant-exceptions-server-0.2.0 (ch1bo)
00:52:35 cosimone joins (~cosimone@5.170.240.3)
01:02:12 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
01:02:47 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 260 seconds)
01:05:25 × cjh` quits (chris@segfault.net.nz) (Read error: Connection reset by peer)
01:05:27 × Tattletale quits (~Tattletal@unaffiliated/sundancertp) (Quit: rcirc on GNU Emacs 27.1)
01:05:37 × aredirect quits (~aredirect@197.52.231.124) (Ping timeout: 264 seconds)
01:06:40 frdg joins (~nick@pool-71-184-143-249.bstnma.fios.verizon.net)
01:07:26 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
01:10:05 <ezzieyguywuf> how do I use the haskell language server that ghcup asked me of I wanted to install?
01:10:49 MarcelineVQ joins (~anja@198.254.202.72)
01:11:05 × Nahra quits (~Nahra@unaffiliated/nahra) (Quit: leaving)
01:12:00 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:e1ff:d578:a4d8:f807)
01:12:34 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:13:04 <koz_> ezzieyguywuf: Do you have an editor with support for it?
01:13:25 <ezzieyguywuf> koz_: i think so - vim.
01:13:35 <ezzieyguywuf> (with ALE plugin)
01:13:49 <koz_> ezzieyguywuf: So the answer is 'no unless you wanna run a garbage Node.js slurry', because ALE's support was broken last I checked.
01:13:52 <ezzieyguywuf> do I need to initialize the server myself?
01:13:55 <koz_> (incomplete LSP implementation)
01:14:06 <ezzieyguywuf> oh dang
01:14:52 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in)
01:15:13 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
01:15:16 cjh` joins (chris@segfault.net.nz)
01:16:25 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
01:16:40 argent0 joins (~argent0@168.227.98.84)
01:16:50 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
01:18:12 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
01:18:14 <sm[m]> ezzieyguywuf: the easy way is install vs codes Haskell extension
01:18:37 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:18:41 <koz_> sm[m]: Which naturally involves using VS Code.
01:18:58 <sm[m]> right!
01:19:55 <sm[m]> If only to get a bunch of binaries installed, see how it works, decide if you need it etc.
01:20:26 <ezzieyguywuf> vs codes?
01:20:36 <koz_> ezzieyguywuf: It's an IDE.
01:20:39 <koz_> People seem to like it.
01:20:43 <koz_> I don't understand those people.
01:20:44 <sm[m]> VS Code's
01:20:58 <ezzieyguywuf> oh, I don't think I have that
01:21:25 <sm[m]> I'm an emacs guy but vs code plus hls is extremely good
01:21:50 <sm[m]> If you want to try out hls , it is the easy way
01:22:06 <koz_> sm[m]: Former Emacs, current (Neo)vim, and VS Code left me inordinately and utterly unimpressed.
01:22:11 × cjh` quits (chris@segfault.net.nz) (Quit: leaving)
01:22:26 <koz_> It's a giant slurry which barely functions, makes no sense, and eats resources like it's some kind of factory.
01:22:39 <sm[m]> ymmv
01:22:49 <koz_> Precisely, which is why I insist on mentioning it. :P
01:22:53 <Axman6> I'm a big fan of VS Code these days, heaps of extensions, is actively maintainerd and its performance is improving all the time
01:22:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
01:23:02 <sm[m]> I find it pretty light. Hls is the one eating ram
01:23:05 <koz_> Axman6: Can it run as fast as my Neovim?
01:23:11 <koz_> Because last I checked, it wasn't even close.
01:23:20 <Axman6> it runs fast enought that I haven't noticed any performance issues
01:23:33 <Axman6> HLS on the other hand...
01:23:34 cjh` joins (chris@segfault.net.nz)
01:23:34 <koz_> Axman6: I guess my mileage truly does vary, because I found it intolerably slow.
01:24:01 <sm[m]> it's not the speed king for typing. Nobody installs it for that
01:24:29 <ezzieyguywuf> i was never into the big IDE thing
01:24:35 <sm[m]> Hls ui is noisy and jittery sometimes. Even so - extremely useful
01:24:39 <koz_> sm[m]: What do you mean by 'not the speed king for typing'? I don't understand?
01:24:46 <ezzieyguywuf> I tried IDE whenever I was messing around in android, but even then I ended up reverting back to vim
01:24:52 <Axman6> my only problem with HLS is how much RAM it uses
01:25:04 caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net)
01:25:12 <ezzieyguywuf> i think I'll stop toying with languag server thingy for now, lol
01:25:13 <Axman6> our dev laptops are 64GB for a reason (it's not just HLS, but that definitely doesn't help)
01:25:40 <Axman6> we do also have an enormous codebase though (and technically this is DAML Studio, not HLS, but they share a lot)
01:25:49 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 246 seconds)
01:25:56 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
01:26:05 <Digit> yesterday, watching a talk on "the last programming language" got me itching to move from my text editor being extensible in lisp, to one extensible in haskell. n_n ... will be a while before i get feature parity to emacs in yi.
01:26:17 cjh` is now known as chrisosaurus
01:27:59 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
01:28:25 <sm[m]> koz_: you keep saying vs code is slower than X, I assume you mean for typing and ui response, I agree and also am saying it's somewhat beside the point
01:28:38 <koz_> sm[m]: Not to me it isn't.
01:28:49 <koz_> Again, YMMV is a perfectly valid response to my criticism.
01:28:56 × Ariakenom quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
01:29:07 <sm[m]> I understand. We don't need to keep arguing here :)
01:29:11 <koz_> :D
01:29:12 <int-e> the more times change, the more they stay the same... another round of editor wars...
01:29:18 <ezzieyguywuf> so with optparse-applicative, if you have 50 arguments/flags, then you have some `data MyArgs = Opt1 | Opt2 |....Opt50`?
01:29:32 <koz_> ezzieyguywuf: I mean... you _can_, but I don't think you have to.
01:29:33 <int-e> This should be the first rule of programming: don't talk about editors.
01:30:04 <sm[m]> vs code is extremely good at some things and in some aspects. End of my point.
01:30:11 <monochrom> May I talk about email and usenet news clients? >:)
01:30:17 <koz_> monochrom: :P
01:30:23 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
01:30:26 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
01:30:27 monochrom plans to talk about using emacs for email and usenet news.
01:30:38 <ezzieyguywuf> koz_: what's another way to do it?
01:30:38 <Digit> int-e: n_n this is much more peaceful and ammicable an editor/ide discussion than the wars of old. n_n
01:30:52 <int-e> monochrom: or browsers... lynx, links, elinks, or w3m :P
01:31:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:31:10 <koz_> ezzieyguywuf: What do your 50 flags mean? Can they co-occur? What do they describe? How do you represent this data? Etc etc
01:31:13 <monochrom> I almost used emacs for web browser too.
01:31:16 <Digit> is there a web browser written in haskell? that'd be cool. :)
01:31:18 <koz_> There is no One True Answer to these questions.
01:31:32 <MarcelineVQ> Sure there is, it's the one I say
01:31:32 conal joins (~conal@64.71.133.70)
01:31:32 × conal quits (~conal@64.71.133.70) (Client Quit)
01:31:36 <int-e> Digit: It is. But it's still not going anywhere :P
01:31:58 conal joins (~conal@64.71.133.70)
01:32:17 <monochrom> What saved me from this depravity 20 years ago was that emacs did not have real concurrency.
01:32:20 × conal quits (~conal@64.71.133.70) (Client Quit)
01:32:41 <ezzieyguywuf> koz_: I was using 50 as an example. I currently only have 1 flag, for a filename. I guess my main question is - is the `data MyOpts = FileName String` approach the only way to use an optparse-applicative parser to parse the arguments
01:33:08 <koz_> ezzieyguywuf: No, in the same way as the 'data MyOpts = FileName String' approach would not be the only way to use a megaparsec parser.
01:33:10 conal joins (~conal@64.71.133.70)
01:33:23 <monochrom> Whenever its web browser was waiting for responses, the editor window become unresponsive. That disillusioned me to realize that emacs was not an OS afterall.
01:33:31 <koz_> Like... it's _your_ data, structure it however you want. Your internal representation doesn't have to precisely match the data you get fed.
01:33:46 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
01:34:44 × caecilius quits (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
01:35:21 <ezzieyguywuf> ok let me ask the question differently. Let's say I wanted to add my own "--help" option (just for the sake of argument, I know optparse-applicative has this built-in sorta). I don't really need `data MyData = FileName String | Help`, because if someone passes "--help" I want to display the help info then immediately exit, i.e. do nothing else
01:35:29 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 272 seconds)
01:35:39 <ezzieyguywuf> so how would I accomlish that using optparse-applicative?
01:35:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
01:36:14 <sm[m]> ezzieyguywuf: do the docs not cover it ?
01:36:47 <sm[m]> I'm not being snarky, I want to know if o-a's docs are good enough yet
01:37:04 × sqrt2 quits (~ben@unaffiliated/sqrt2) (Read error: Connection reset by peer)
01:37:07 sqrt2_ joins (~ben@unaffiliated/sqrt2)
01:37:08 Lord_of_Life_ joins (~Lord@46.217.220.129)
01:37:27 <ezzieyguywuf> sm[m]: the docs are really good, but from what I can tell they don't cover this.
01:37:38 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds)
01:37:42 <sm[m]> I found it hard to use but haven't given it a serious try recently
01:37:51 <ezzieyguywuf> sm[m]: or else, it's just not the intended use-case. or else (and this can definetely be the case) I just don't understand the docs enough to see how to do it.
01:38:03 <sm[m]> hard to learn, I meant to say
01:38:18 <koz_> ezzieyguywuf: Write a parser which only parses '--help'. Exec that. If it succeeds, great; if not, try a different one which gets your filename?
01:38:27 <ezzieyguywuf> koz_: ah hah.
01:38:32 <ezzieyguywuf> simple. elegant.
01:38:39 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
01:38:59 <koz_> This may be of use: http://hackage.haskell.org/package/optparse-applicative-0.16.1.0/docs/Options-Applicative.html#v:execParserPure
01:39:17 <ezzieyguywuf> hrm...or maybe using a <|> somewhere, I remember the documentation talking about that.
01:39:21 <koz_> (and some of the functions underneath that)
01:39:27 <ezzieyguywuf> koz_: I was just perusing that!
01:39:28 <ezzieyguywuf> lol
01:39:29 <sm[m]> I will say that you can always do your own preprocessing of args, I do it for exactly that case (short circuit to usage message with --help)
01:39:29 <koz_> You could use <|> I guess.
01:40:05 <koz_> Basically, a good habit to get into is 'break your problem into the smallest possible pieces, and only glue them together if you have to'.
01:40:14 <ezzieyguywuf> I think that (a) optparse-applicative is likely powerful enough to do whatever I want, and (b) I should just start with my one dinky flag and try more as the need arises
01:40:23 <koz_> A lot of the time I find folks instead think 'I need to build an all-singing, all-dancing monolith' and then find it very hard.
01:40:27 <koz_> (myself included)
01:40:28 <ezzieyguywuf> koz_: I think that's a good idea.
01:41:42 <koz_> And yes, start with one flag and work upwards.
01:41:50 <koz_> At least with one flag, you've got the functionality you need right now.
01:42:47 <ezzieyguywuf> precisely
01:43:05 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
01:46:50 <koz_> How exactly does the Alternative instances of the optparse-applicative Parser work? Is it backtracking?
01:47:09 <ezzieyguywuf> hope you're not asking me, lol
01:47:38 <koz_> ezzieyguywuf: Nope - this is a general question to Knowledgeable Folks.
01:48:20 <ezzieyguywuf> nice.
01:48:59 <int-e> . o O ( https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it )
01:49:33 <koz_> int-e: You never know when you need Alternative! :P
01:50:16 <int-e> koz_: refactoring is easy(-ish) with strong types
01:50:32 <koz_> Yup!
01:50:41 <int-e> anyway, it's a good principle, but hard to follow :)
01:50:52 <MarcelineVQ> *impossible
01:51:07 <koz_> sm[m]: You said earlier you wanted feedback on the way optparse-applicative is docced: it'd be nice if the Alternative behaviour for Parser was explained somewhere, because I can't seem to find it.
01:51:08 <int-e> (and hard to apply when you write code for others rather than yourself)
01:51:54 <sm[m]> thx, noted
01:52:04 <koz_> sm[m]: Would you be able to tell me?
01:52:12 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:52:15 <koz_> I'm genuinely curious but the digging through implementation would take too long.
01:52:22 <sm[m]> sorry, I don't know either
01:55:53 vicfred joins (~vicfred@unaffiliated/vicfred)
01:56:58 × vicfred quits (~vicfred@unaffiliated/vicfred) (Max SendQ exceeded)
01:56:59 conal joins (~conal@64.71.133.70)
01:57:01 <ezzieyguywuf> hrm, this section has me a bit confused: https://github.com/pcapriotti/optparse-applicative#running-parsers
01:57:28 vicfred joins (~vicfred@unaffiliated/vicfred)
01:57:43 × conal quits (~conal@64.71.133.70) (Client Quit)
01:57:59 <ezzieyguywuf> if `opts :: ParserInfo Sample`, and `info :: Parser a -> InfoMod a -> ParserInfo a`, then how does the code snippet type-check?
01:58:27 × vicfred quits (~vicfred@unaffiliated/vicfred) (Max SendQ exceeded)
01:58:42 <ezzieyguywuf> it seems to me that `fullDesc <> progDesc "Print a greeting for TARGET"` would be `InfoMod String`
01:58:55 vicfred joins (~vicfred@unaffiliated/vicfred)
01:59:13 <koz_> ezzieyguywuf: The whole thing in brackets is one argument.
01:59:22 <koz_> That whole thing is an InfoMod.
02:00:41 <ezzieyguywuf> koz_: but it seems to me that the typo of the whole bracketed area is "InfoMod String"
02:00:53 <ezzieyguywuf> ahh wait nvm
02:00:54 <koz_> Why would it be?
02:00:56 <ezzieyguywuf> I was being dumb
02:00:59 <koz_> What component of that suggests this?
02:01:06 <koz_> I'm pretty sure the 'a' type param is phantom there.
02:02:37 × forell quits (~forell@unaffiliated/forell) (Ping timeout: 260 seconds)
02:02:42 <ezzieyguywuf> I missed that `progDesc` takes a String as an argument
02:03:11 guest1125 joins (~user@49.5.6.87)
02:04:03 × hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.)
02:04:27 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
02:04:47 MindlessDrone joins (~MindlessD@unaffiliated/mindlessdrone)
02:05:44 <ezzieyguywuf> lol, the movie I'm watching has a character named Haskell
02:08:08 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Quit: hyiltiz)
02:08:31 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
02:09:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:11:04 × darjeeling_ quits (~darjeelin@122.245.219.209) (Ping timeout: 272 seconds)
02:11:09 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Client Quit)
02:11:31 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
02:12:13 alp joins (~alp@2a01:e0a:58b:4920:ed97:230b:9822:a509)
02:12:14 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Client Quit)
02:12:31 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
02:14:25 <guest1125> how to get epoch time in haskell?
02:14:26 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Client Quit)
02:14:44 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
02:15:05 <Axman6> https://hackage.haskell.org/package/time-1.11.1/docs/Data-Time-Clock-POSIX.html?
02:16:59 <guest1125> getCurrentTime :: IO UTCTime
02:17:17 <Axman6> getPOSIXTime :: IO POSIXTime?
02:17:51 <guest1125> every call on those functions will get different values, wow
02:17:59 <guest1125> actions
02:18:25 <guest1125> get time through IO
02:18:38 <Axman6> yes...
02:18:57 <Axman6> by definition it pretty much has to run in IO
02:18:58 <guest1125> but could make it out of IO?
02:19:01 christo joins (~chris@81.96.113.213)
02:19:09 × benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-ymoheyyesupwsnta) (Quit: Connection closed for inactivity)
02:19:12 <Axman6> have you used IO before?
02:19:22 forell joins (~forell@unaffiliated/forell)
02:19:34 <guest1125> yes
02:19:45 <Axman6> do { now <- getPOSIXTime; let result = f now; print result }
02:20:27 <guest1125> I mean IO POSIXTime -> POSIXTime
02:20:30 <ezzieyguywuf> is there anything in base that can turn "~/Some/Path/" into "/home/me/Some/Path"?
02:20:58 <Axman6> guest1125: that's not something you can do, but in the code I wrote above, now :: POSIXTime
02:20:58 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
02:20:59 × Rudd0 quits (~Rudd0@185.189.115.98) (Ping timeout: 265 seconds)
02:21:38 toorevitimirp joins (~tooreviti@117.182.183.18)
02:22:00 <guest1125> Axman6: I'd like name some files with the time when they're created, so I have to do it all in IO?
02:22:02 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
02:22:52 <Axman6> of course, there is nothing pure about the current time
02:23:10 <guest1125> ok
02:23:57 earthy joins (~arthurvl@deban2.xs4all.space)
02:24:13 <Axman6> do { now <- getPOSIXTime; let fileName = "foo-" ++ show now ++ ".txt"; writeFile fileName content }
02:24:22 <Axman6> if you're writing files you're already working in IO
02:24:28 × Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 260 seconds)
02:25:44 <guest1125> what about using time as seed to generate random number? is a good idea?
02:25:55 <Axman6> it's an idea :)
02:26:15 <Axman6> there's lots of "it depends" responses to that question
02:27:20 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Ping timeout: 260 seconds)
02:28:26 <frdg> it helped me to shift my thinking from the idea that I have to do something _in_ IO to realizing that what I am doing _is_ IO.
02:29:26 <guest1125> is anyone familiar with the term "double-barrelled CPS"?
02:29:33 <guest1125> what is it?
02:30:04 <Axman6> never heard the term, where did you find it?
02:30:14 <guest1125> twitter...
02:30:25 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
02:33:07 × xff0x quits (~fox@2001:1a81:526f:8600:55b6:62c6:bb3b:dc43) (Ping timeout: 272 seconds)
02:34:44 xff0x joins (~fox@2001:1a81:52a6:7b00:9da5:3842:e762:e94b)
02:35:01 <guest1125> "As I've told you youngsters before, that type system can be done with double-barrelled CPS, and the folks at Microsoft have already tried it out at http://sml.net. I'll have a paper to show you when I get to that point!"
02:35:02 <Axman6> twitter is a lot of context to have to process
02:35:24 <Axman6> ask for the paper
02:35:43 <guest1125> there's not one yet
02:36:32 <guest1125> he is a scheme player, good at compiler stuff
02:37:29 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
02:38:14 <Digit> i dont think https://www.urbandictionary.com/define.php?term=CPS was helpful. nsfw.
02:38:27 × heatsink_ quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
02:39:51 jamm_ joins (~jamm@unaffiliated/jamm)
02:41:24 Stanley00 joins (~stanley00@unaffiliated/stanley00)
02:42:00 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
02:42:01 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
02:42:25 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
02:44:00 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
02:44:26 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
02:44:53 conal joins (~conal@64.71.133.70)
02:45:03 frdg parts (~nick@pool-71-184-143-249.bstnma.fios.verizon.net) ()
02:45:51 <koz_> Digit: It's a real pro move to look for compsci terms on UD.
02:47:16 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
02:50:03 <monochrom> Wait, what is double-barrelled CPS? I ought to teach it to my students and confuse them!
02:50:13 <keltono> seems to come from this paper
02:50:14 <keltono> https://www.cs.bham.ac.uk/~hxt/research/HOSC-double-barrel.pdf
02:50:43 <Digit> koz_: sometimes you get lucky. n_n
02:51:41 <keltono> the key excerpt being
02:51:42 <keltono> > This transform is double-barrelled in the sense that it always passes two continuations.
02:51:44 <lambdabot> <hint>:1:36: error: <hint>:1:36: error: parse error on input ‘in’
02:51:49 Sonolin joins (~Sonolin@184.103.179.49)
02:52:03 <keltono> whoops
02:54:16 <monochrom> Ah, thanks.
02:55:30 puffnfresh joins (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net)
02:55:50 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 256 seconds)
02:56:40 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
02:56:42 <guest1125> would it be useful for something?
02:56:50 <Sonolin> hmm so I'm playing with FRP and I'm probably not getting things but this doesn't seem too helpful for things that aren't very interactive (like turn based games/roguelikes)?
02:57:43 × brisbin quits (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net) (Ping timeout: 260 seconds)
02:58:17 <guest1125> Sonolin: what FRP is short for?
02:58:24 <Sonolin> functional reactive programming
02:59:00 <guest1125> Frech Representitive?
02:59:44 <guest1125> representative
02:59:57 <Axman6> I was thinking recently what it would look like to implement election vote counting systems in FRP to get live data from results (We use the HAre-Clarke system here, so the processing is actually quite interesting)
03:01:02 <guest1125> Axman6: could it avoid election fraud?
03:02:31 × Suntop1 quits (~Suntop@193.56.252.12) (Remote host closed the connection)
03:03:17 olligobber joins (~olligobbe@unaffiliated/olligobber)
03:07:02 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-yowroavlostcpsuo) (Quit: Connection closed for inactivity)
03:07:51 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
03:08:22 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
03:08:49 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
03:10:14 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 264 seconds)
03:12:34 <koz_> Sonolin: Basically FRP is intended for highly interactive or async systems.
03:12:52 <koz_> If your case _isn't_ one of those two, it's probably not worth it.
03:13:09 <koz_> (like, nothing is stopping you from using FRP for something like that, but it's likely more trouble than it's worth)
03:13:16 <Sonolin> yea I can see how that can be useful, probably not the best for my case
03:13:36 <Sonolin> something to look at if I add multi threading and/or realtime capabilities in the future, though
03:14:29 <koz_> Sonolin: Multi-threading is an implementation detail. Asynchrony not so much.
03:14:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:14:38 × iphy quits (sid67735@gateway/web/irccloud.com/x-yrvorexjtguqopbo) (Read error: Connection reset by peer)
03:14:48 iphy joins (sid67735@gateway/web/irccloud.com/x-mauksswncovsmglx)
03:18:16 × gentauro quits (~gentauro@unaffiliated/gentauro) (Ping timeout: 240 seconds)
03:19:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
03:20:30 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:24:49 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 246 seconds)
03:25:17 gentauro joins (~gentauro@unaffiliated/gentauro)
03:31:21 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
03:31:32 × rdivacky quits (~rdivacky@212.96.173.4) (Ping timeout: 256 seconds)
03:33:23 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
03:36:12 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 260 seconds)
03:37:01 × st8less quits (~st8less@2603:a060:11fd:0:b8c0:f26a:7cc8:b52d) (Quit: WeeChat 2.9)
03:40:37 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (beckett.freenode.net (Nickname regained by services)))
03:40:43 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
03:41:38 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 272 seconds)
03:41:45 rdivacky joins (~rdivacky@212.96.173.4)
03:42:28 × argent0 quits (~argent0@168.227.98.84) (Ping timeout: 260 seconds)
03:45:16 × theDon quits (~td@muedsl-82-207-238-223.citykom.de) (Ping timeout: 240 seconds)
03:47:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
03:47:26 theDon joins (~td@94.134.91.236)
03:47:28 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
03:48:25 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:48:51 plutoniix joins (~q@ppp-27-55-83-62.revip3.asianet.co.th)
03:50:30 conal joins (~conal@64.71.133.70)
03:51:42 × conal quits (~conal@64.71.133.70) (Client Quit)
03:52:49 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
03:53:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:53:26 darjeeling_ joins (~darjeelin@112.16.171.8)
03:57:47 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
04:00:36 × darjeeling_ quits (~darjeelin@112.16.171.8) (Ping timeout: 240 seconds)
04:00:37 Rudd0 joins (~Rudd0@185.189.115.98)
04:00:42 vg joins (~vg@139.59.59.230)
04:00:56 vg is now known as TooDifficult
04:01:28 × Sonolin quits (~Sonolin@184.103.179.49) (Quit: WeeChat 2.4)
04:08:01 <Axman6> guest1125: I doubt it, but it would make for a fun way to visualise things
04:09:10 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
04:13:15 adm_ joins (~adm@43.229.88.197)
04:13:34 <Axman6> guest1125: did you sort out youyr time/file naming issues?
04:13:37 <Axman6> your*
04:13:42 Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
04:13:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
04:14:22 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
04:15:01 hackage language-dickinson 1.4.1.0 - A language for generative literature https://hackage.haskell.org/package/language-dickinson-1.4.1.0 (vmchale)
04:16:05 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 240 seconds)
04:19:17 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
04:24:43 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 265 seconds)
04:27:49 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
04:32:27 × cosimone quits (~cosimone@5.170.240.3) (Quit: cosimone)
04:39:23 × TooDifficult quits (~vg@139.59.59.230) (Quit: TooDifficult)
04:39:40 TooDifficult joins (~vg@139.59.59.230)
04:39:52 × TooDifficult quits (~vg@139.59.59.230) (Remote host closed the connection)
04:40:09 TooDifficult joins (~vg@139.59.59.230)
04:40:18 × TooDifficult quits (~vg@139.59.59.230) (Remote host closed the connection)
04:40:31 TooDifficult joins (~vg@139.59.59.230)
04:40:43 borne joins (~fritjof@200116b864eb5c00394a967dc8ef4e61.dip.versatel-1u1.de)
04:40:43 × TooDifficult quits (~vg@139.59.59.230) (Remote host closed the connection)
04:40:58 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 260 seconds)
04:41:00 TooDifficult joins (~vg@139.59.59.230)
04:41:43 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
04:48:36 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
04:49:49 <triteraflops> Clean uses uniqueness types to do all of its IO. It seems to work fine and is about a billion times easier to understand than monads, no offence.
04:50:12 <triteraflops> Also, it allows destructive updates! There has got to be some kind of catch. What's the catch?
04:50:49 <koz_> triteraflops: Who says monads are about IO?
04:50:53 <Axman6> what makes you think we don't have destructive updates?
04:50:57 <koz_> Also this.
04:51:13 <triteraflops> koz_: haskell implements IO with monads. Therefore monads are about IO.
04:51:21 <triteraflops> They aren't just about IO, but they are about IO.
04:51:44 <dsal> Monads are about IO?
04:52:21 <triteraflops> Have you actually done any IO in haskell? Yes, IO and monads are obviously related.
04:52:26 <dsal> IO is one of the monads I use in my code, but most of the monads I use aren't IO.
04:52:44 <dsal> My mom and I are related, but I'm not my mom.
04:52:44 <koz_> What dsal says, pretty much.
04:52:49 <Digit> would it be fair to say, IO is implemented with monads, but not all monads have anything to do with IO?
04:53:46 <triteraflops> In my first question I didn't even say IO was the only thing monads do.
04:54:04 darjeeling_ joins (~darjeelin@112.16.171.8)
04:54:21 <triteraflops> You understand the question and you know it. If you can answer it, answer it. Save me your mindless pedantry.
04:54:28 <triteraflops> This is why people don't like haskell.
04:54:56 <dsal> Asserting people understanding you doesn't make it so. You can do IO without monads in Haskell.
04:55:11 <koz_> Applicative can easily be enough to do all the IO you need.
04:55:15 <triteraflops> dsal: how in the hell would you do that? Safely?
04:55:18 <koz_> (I've seen a few cases like this)
04:55:19 <dsal> Or even a functor.
04:55:39 <koz_> It's a question of how much power the interface requires.
04:55:49 <triteraflops> Only a subset of IO problems could be solved like that.
04:55:52 <koz_> Sometimes you truly need the full power of monad to describe the IO you wanna do.
04:55:55 <koz_> Sometimes, you don't.
04:56:02 <Axman6> triteraflops: we had IO in Haskell before monadic IO
04:56:24 <triteraflops> Axman6: and it was referentially transparent?
04:56:43 <Axman6> I believe so, I can't remember what it looked like
04:56:45 <triteraflops> It doesn't even matter. Modern haskell IO uses monads generally.
04:57:06 <triteraflops> Clean does not, and is still referentially transparent. It uses uniqueness types.
04:57:12 <triteraflops> Is there some kind of catch?
04:57:34 <koz_> Given that this isn't #clean? I'm not sure anyone really knows here.
04:57:36 <Axman6> I also disagree that monads are difficult to understand, particularly when it comes to IO - it is just an imperative language like any other bog standard language
04:58:14 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
04:58:15 × texasmynsted quits (~texasmyns@212.102.45.121) (Remote host closed the connection)
04:58:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:58:36 <koz_> Also, a word of diplomatic advice? Accusing us of 'mindless pedantry', and opening your so-called question with a very strong subjective claim, which _by your own admission isn't even the point_?
04:58:41 <koz_> Not the best way to get responses.
04:58:45 ocamler joins (3263cbdb@50.99.203.219)
04:58:53 texasmynsted joins (~texasmyns@212.102.45.121)
04:59:15 <ocamler> hey, simple question, how can i declare type ```Maybe Bifunctor [a] [a]```
04:59:16 <Axman6> generally the phrase "of offence" is used when someone intends to cause offence
04:59:24 <ocamler> this is giving me a compile error that I don't fully understand
04:59:38 <Digit> Axman6: monads are difficult to understand, for many, given the explanations. would be nice if disagreeing with those who find monads a slippery concept was enough to help them find it easy to understand though.
04:59:38 <Axman6> ocamler: I have no idea what that's supposed to represent, it's certainly not valid though
04:59:41 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
04:59:48 <koz_> ocamler: You've got a slight mixup here. 'Bifunctor' is a type class.
04:59:55 <ocamler> ohhh
05:00:00 <koz_> I too am not very sure what you're after here.
05:00:03 <ocamler> I see
05:00:14 <koz_> Digit: I feel it's a problem of people focusing too much on 'what is a monad' and less on 'why we care'.
05:00:16 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 240 seconds)
05:00:26 <Axman6> ocamler: what's the intent you're after?
05:00:26 <ocamler> well I want some sort of wrapping type similar to a tuple, where I can fmap on either the first or second of the tuple
05:00:39 <koz_> The answer to the question of 'what is a monad' is both uninteresting (unless you're a cat theorist) and doesn't really get you anywherre in terms of how to use them and what they enable.
05:00:51 <koz_> ocamler: (a,b) is already a Bifunctor.
05:00:54 <Axman6> sounds like Bifunctor to me
05:00:55 <triteraflops> Let's try this again. Haskell uses monads to do IO. (You know what I mean. Save it.) Clean uses uniqueness types, and gets away with it. Is there some kind of catch?
05:00:58 <koz_> You don't need to do anything to make that a thing.
05:01:04 <triteraflops> A downside of using uniqueness types instead?
05:01:31 <Axman6> ocamler: what's the Maybe in there supposed to be for?
05:01:32 <dsal> haskell has the same problem git used to have back in the day. People focus on the weirdest things because they're the most interesting and then everyone thinks they have to understand it weirdest-first.
05:01:41 <koz_> ocamler: Are you trying to write a data type, or a function that's meant to operate across multiple kinds of data?
05:01:49 <Digit> s/uses/can use/ ... might help rubbing "pedants" the wrong way.
05:02:17 <dsal> triteraflops: "you know what I mean" is not a very constructive way to explain yourself.
05:02:18 <Axman6> triteraflops: I don't know enough about uniqueness types to be able to comment, I wonder if the work on linear types in Haskell might give us somethig similar though? (I would be surprised if it would replace our use of monadic IO or monads for requencing)
05:02:26 <dsal> There are multiple effect systems in haskell.
05:02:40 <koz_> Axman6: AFAIK, uniqueness types and linear types aren't the same thing, though they are similar.
05:02:42 <triteraflops> Axman6: yes, it would, actually.
05:02:44 × plutoniix quits (~q@ppp-27-55-83-62.revip3.asianet.co.th) (Ping timeout: 260 seconds)
05:02:47 <dsal> There's also that thing lexi-lambda is working on.
05:02:50 <koz_> However, I would be the first to admit that I dunno enough.
05:02:54 <Axman6> eff?
05:03:08 <dsal> Yeah, I forgot what the underlying theory was behind that.
05:03:09 <Axman6> koz_: yeah I figured as much
05:03:09 <ocamler> koz_ i just replaced that code with some functions that I wrote on my own, like `mapFirst :: (a -> b) -> (a, c) -> (b, c)`
05:03:10 × texasmynsted quits (~texasmyns@212.102.45.121) (Ping timeout: 246 seconds)
05:03:11 <dolio> Uniqueness types don't really make sense for IO.
05:03:13 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
05:03:30 <dsal> :t first
05:03:32 <lambdabot> Arrow a => a b c -> a (b, d) (c, d)
05:03:42 <dsal> @hoogle first
05:03:42 <lambdabot> Control.Arrow first :: Arrow a => a b c -> a (b, d) (c, d)
05:03:42 <lambdabot> Data.Bifunctor first :: Bifunctor p => (a -> b) -> p a c -> p b c
05:03:42 <lambdabot> Text.PrettyPrint.Annotated.HughesPJ first :: Doc a -> Doc a -> Doc a
05:03:43 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
05:03:44 <Axman6> @hoogle Bifunctor f => (a -> b) -> f a x -> f b x
05:03:45 <lambdabot> Data.Bifunctor first :: Bifunctor p => (a -> b) -> p a c -> p b c
05:03:45 <lambdabot> Data.Bifunctor.Apply first :: Bifunctor p => (a -> b) -> p a c -> p b c
05:03:45 <lambdabot> Protolude first :: Bifunctor p => (a -> b) -> p a c -> p b c
05:03:53 <dolio> At least, not for one of the purposes of IO in Haskell.
05:04:13 <triteraflops> dolio: that's what I thought, but like I said, Clean gets away with it. I'm still wrapping my head around it. I'm reading this: https://www.mbsd.cs.ru.nl/publications/papers/cleanbook/CleanBookI.pdf
05:04:18 <koz_> dsal: Delimited continuations IIRC?
05:04:24 <dsal> Yeah, that's the thing.
05:04:39 conal joins (~conal@64.71.133.70)
05:04:45 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds)
05:04:57 <dolio> triteraflops: Yeah. It's making the world-passing hack safer. But it makes the semantics worse.
05:05:01 <koz_> It's actually quite an old idea - that you can use delconts for effects.
05:05:12 <koz_> dolio: Wait... is that basically it?
05:05:16 <koz_> It's just RealWorld but safer?
05:05:22 <dolio> Yeah.
05:05:27 <koz_> Huh, TIL.
05:05:41 <Axman6> well that doesn't sound like an improvement at all
05:05:47 <triteraflops> dolio: makes the semantics worse?
05:05:48 <koz_> Is it some kind of linearity in the RealWorld value or something?
05:05:57 <dsal> koz_: Well, I meant new for haskell. She said it required a new primitive.
05:06:04 <koz_> dsal: For efficiency.
05:06:05 <triteraflops> dolio: like a usability and code cleanliness thing?
05:06:14 × TooDifficult quits (~vg@139.59.59.230) (Quit: TooDifficult)
05:06:24 spatchkaa joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net)
05:06:24 <koz_> Because for many effects you don't need full continuation capture, but with the situation as it currently stands, you have to do it every time.
05:06:28 <koz_> Which makes effect systems slow.
05:06:32 TooDifficult joins (~vg@139.59.59.230)
05:06:46 × TooDifficult quits (~vg@139.59.59.230) (Remote host closed the connection)
05:07:02 TooDifficult joins (~vg@139.59.59.230)
05:07:10 <koz_> triteraflops: Are you familiar with the RealWorld trick?
05:07:17 × TooDifficult quits (~vg@139.59.59.230) (Remote host closed the connection)
05:07:17 <koz_> (aka how IO actually works under the covers?)
05:07:31 TooDifficult joins (~vg@139.59.59.230)
05:07:38 × TooDifficult quits (~vg@139.59.59.230) (Remote host closed the connection)
05:07:53 TooDifficult joins (~vg@139.59.59.230)
05:08:02 <dolio> triteraflops: If you really think about it, it doesn't make sense to explain effects by passing around a 'world', because that can't explain the difference between an infinite loop that prints things and one that doesn't. They both have the same result value (bottom). So you actually need to add I/O to the semantics of all functions, even though only the ones that pass around a 'world' actually have effects.
05:08:07 <triteraflops> koz_: I had just assumed IO was inherently unsafe and implementation-dependent under the covers, and did not dig deeper.
05:08:53 <dolio> So it is a failure for partitioning things into a pure semantics and a separate IO semantics.
05:09:50 <koz_> triteraflops: Basically, I would suggest reading Lazy Functional State Threads (the paper). You'll likely see parallels _very_ quickly, and it's eminently readable.
05:10:04 SanchayanMaity joins (~Sanchayan@171.76.82.54)
05:10:22 <dolio> If you're just implementing what IO does in a compiler, though, that doesn't matter.
05:10:35 sord937 joins (~sord937@gateway/tor-sasl/sord937)
05:10:58 <koz_> dolio: That's actually one of Edward's critiques from that thing he wrote where he came up with the Churched free monad.
05:11:00 <triteraflops> Ah yes, I'm pretty sure clean will let me make a function with no return value that internally prints a thing, yeah.
05:11:08 <triteraflops> That's a major sownside.
05:11:11 <triteraflops> *downside
05:12:02 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
05:12:50 <triteraflops> If the file handle only exists inside that function, it can be unique and still have unmanaged side effects.
05:13:03 conal joins (~conal@64.71.133.70)
05:13:09 × conal quits (~conal@64.71.133.70) (Client Quit)
05:13:14 × TooDifficult quits (~vg@139.59.59.230) (Quit: TooDifficult)
05:13:18 <triteraflops> unless somehow, a world object has to be passed into every file handle creation...
05:13:47 <dolio> Arrays are a better use case, because they don't have this problem.
05:14:00 TooDifficult joins (~vg@139.59.59.230)
05:14:09 <triteraflops> I had hoped somebody just knew the answer. There was a decent chance.
05:14:11 <dolio> If you make an infinite loop that does stuff with an array, it doesn't really matter that it's modifying memory forever.
05:14:15 <triteraflops> I'll just keep reading
05:15:30 hackage advent-of-code-ocr 0.1.0.0 - Parse Advent of Code ASCII art letters https://hackage.haskell.org/package/advent-of-code-ocr-0.1.0.0 (jle)
05:15:46 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 246 seconds)
05:16:02 <ocamler> how do you guys/girls deal with function arguments being in the wrong order, for example I want to map over a list [k] with this function: `findWithDefault :: Ord k => a -> k -> Map k a -> a` however the last argument wrong, is there a better way than writing a helper function for each one of these?
05:16:14 <dibblego> @type flip
05:16:15 <lambdabot> (a -> b -> c) -> b -> a -> c
05:16:30 plutoniix joins (~q@175.176.222.7)
05:16:31 <dsal> Or a section
05:16:34 <dibblego> > flip (-) 7 9
05:16:36 <lambdabot> 2
05:17:24 <ocamler> but in this case wouldn't i need a type of `(a -> b -> c -> d) -> (a -> b -> d -> c)`
05:18:54 <triteraflops> flip (findWithDefault some_a) some_map k should work
05:19:00 <glguy> ocamler, either with a locally defined function or a lambda expression
05:19:05 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
05:19:06 <triteraflops> if you curry the a argument first
05:19:43 <glguy> [findWithDefault a k m | k <- ks] -- or even a list comprehension can work nicely
05:19:44 <ocamler> ohhh that makes sense, thanks
05:19:46 shatriff joins (~vitaliish@176.52.219.10)
05:20:54 <jle`> ocamler: i'd often use a lambda too
05:21:09 <jle`> map (\k -> findWithDefault a k m) ks
05:23:36 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
05:24:06 <triteraflops> Ah, my guess was right. You /do/ have to pass a world into the file handle open function.
05:24:15 <triteraflops> and world is unique.
05:24:19 <Axman6> almost always a lambda is more obvious than combinations of composition and flips
05:24:42 <triteraflops> You can't do any further IO unless you extract the world from the io-performing function after it returns.
05:25:01 <triteraflops> In this way, you can tell apart functions that do IO and functions that do not.
05:25:14 Sarma joins (~Amras@unaffiliated/amras0000)
05:25:17 <triteraflops> world or a file handle must be passed into a function that does IO!
05:25:19 <Axman6> or at least, functions which may do IO?
05:25:21 <triteraflops> very interesting
05:25:27 <triteraflops> well, yes
05:25:42 <triteraflops> you could pass world in and output world again, and not actually use it
05:25:49 <triteraflops> though the same is true of the monad approach
05:26:01 hackage skylighting-core 0.10.1 - syntax highlighting library https://hackage.haskell.org/package/skylighting-core-0.10.1 (JohnMacFarlane)
05:26:01 <Axman6> I'm just being a pedant :)
05:26:05 <triteraflops> lol
05:26:22 <koz_> triteraflops: That's why I suggested the Lazy Functional State Threads paper.
05:26:33 <koz_> The idea sounds _very_ similar to what it does, but safer.
05:27:01 hackage skylighting 0.10.1 - syntax highlighting library https://hackage.haskell.org/package/skylighting-0.10.1 (JohnMacFarlane)
05:27:05 <triteraflops> You know I still don't see a downside to the Clean approach.
05:27:17 <triteraflops> Still waiting for the other shoe to drop lol
05:29:18 subttle joins (~anonymous@unaffiliated/subttle)
05:29:44 <Axman6> "No one uses clean, therefore it can't be very good" <- usually said about Haskell
05:30:27 <ocamler> uh this is a weird compile error, `Couldn't match expected type ‘[Char] -> [String]’ with actual type ‘[[Char]]’`
05:30:33 <ocamler> oh nvm
05:30:34 <ocamler> sorry
05:30:43 <Axman6> you got this, I believe in you
05:31:11 <ocamler> lol thank you :)
05:32:07 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
05:32:54 × Jeanne-Kamikaze quits (~Jeanne-Ka@66.115.189.187) (Quit: Leaving)
05:33:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:34:45 <triteraflops> Axman6: well, yeah, exactly, right?
05:36:47 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 272 seconds)
05:40:37 × spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Ping timeout: 246 seconds)
05:41:02 × borne quits (~fritjof@200116b864eb5c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
05:42:54 borne joins (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de)
05:43:29 × TooDifficult quits (~vg@139.59.59.230) (Quit: TooDifficult)
05:54:22 mwalter joins (473b8f3e@c-71-59-143-62.hsd1.or.comcast.net)
05:58:08 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
05:59:54 × lemmih_ quits (~lemmih@2406:3003:2072:44:e4e6:2edc:c18b:f5e1) (Remote host closed the connection)
06:00:00 adm_ joins (~adm@43.229.88.197)
06:00:16 lemmih_ joins (~lemmih@2406:3003:2072:44:741a:bd6a:3c25:3ad0)
06:05:22 spatchkaa joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net)
06:07:11 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
06:07:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
06:08:08 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
06:11:44 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
06:12:05 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
06:12:17 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:15:00 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
06:15:05 <ocamler> hey quick question, I feel like this is simple idk why it doesn't work
06:15:11 <ocamler> ```next :: Int -> [Int]
06:15:26 <ocamler> next :: Int -> [Int]next = undefinedminimum :: Int -> Int -> Intminimum k x | k < 0 = inf | k == 0 = 0 | k > 0 = min $ next x
06:15:28 <ocamler> oops
06:15:36 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
06:15:38 <ocamler> next :: Int -> [Int]next = undefinedminimum :: Int -> Int -> Intminimum k x | k < 0 = inf | k == 0 = 0 | k > 0 = min $ next x
06:15:41 <ocamler> sorry
06:15:47 <ocamler> `next :: Int -> [Int]next = undefinedminimum :: Int -> Int -> Intminimum k x | k < 0 = inf | k == 0 = 0 | k > 0 = min $ next x`
06:16:16 <ocamler> https://pastebin.com/BdHKv9y9
06:16:25 <ocamler> I'm wondering why this isn't compiling
06:17:46 <ocamler> this is the error message https://pastebin.com/wP3YGaLN
06:19:15 <ocamler> nvm I solved it, sorry about the noise lol
06:19:18 <xerox_> :t (min,minimum)
06:19:20 <lambdabot> (Foldable t, Ord a1, Ord a2) => (a1 -> a1 -> a1, t a2 -> a2)
06:19:46 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
06:20:36 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 272 seconds)
06:22:59 × spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Quit: Leaving)
06:23:25 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
06:24:55 × alp quits (~alp@2a01:e0a:58b:4920:ed97:230b:9822:a509) (Ping timeout: 272 seconds)
06:25:14 × borne quits (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 264 seconds)
06:28:06 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
06:28:06 Ariakenom joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
06:32:16 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 240 seconds)
06:32:29 <ocamler> Is there an easy way of memoizing an Int -> Int -> Int -> Int function
06:33:04 adm_ joins (~adm@43.229.88.197)
06:35:39 argent0 joins (~argent0@168.227.98.84)
06:36:14 × argent0 quits (~argent0@168.227.98.84) (Remote host closed the connection)
06:36:25 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:36:37 alp joins (~alp@2a01:e0a:58b:4920:5c8d:e2ed:21ef:b40c)
06:37:37 × jedws quits (~jedws@101.184.150.93) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:38:36 supercoven joins (~Supercove@dsl-hkibng31-54fabf-192.dhcp.inet.fi)
06:40:05 × ocamler quits (3263cbdb@50.99.203.219) (Remote host closed the connection)
06:40:25 × darjeeling_ quits (~darjeelin@112.16.171.8) (Ping timeout: 264 seconds)
06:41:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
06:43:37 × Sarma quits (~Amras@unaffiliated/amras0000) (Changing host)
06:43:37 Sarma joins (~Amras@unaffiliated/amras)
06:43:50 × ericsagnes quits (~ericsagne@2405:6580:0:5100:4889:2fb8:f3c5:4ca) (Ping timeout: 264 seconds)
06:46:50 × gioyik quits (~gioyik@186.118.238.251) (Quit: WeeChat 3.0)
06:47:02 × lukelau quits (~lukelau@46.101.13.214) (Quit: Bye)
06:47:18 lukelau joins (~lukelau@2a03:b0c0:1:d0::1bc:b001)
06:51:12 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
06:51:18 jedws joins (~jedws@101.184.150.93)
06:54:58 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
06:55:42 ericsagnes joins (~ericsagne@2405:6580:0:5100:a607:ad37:544:fcd4)
06:59:52 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
07:05:23 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Quit: WeeChat 2.9)
07:05:45 × Feuermagier quits (~Feuermagi@213.178.26.41) (Read error: Connection reset by peer)
07:05:57 Feuermagier joins (~Feuermagi@213.178.26.41)
07:06:24 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
07:07:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:08:19 chaosmasttter joins (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de)
07:10:26 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
07:10:41 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:e1ff:d578:a4d8:f807) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:10:46 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 256 seconds)
07:10:55 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
07:20:34 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
07:21:39 thc202 joins (~thc202@unaffiliated/thc202)
07:22:20 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
07:22:48 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:e1ff:d578:a4d8:f807)
07:23:45 × jrqc quits (~rofl@96.78.87.197) (Ping timeout: 240 seconds)
07:24:55 jrqc joins (~rofl@96.78.87.197)
07:28:01 hackage conduit 1.3.4 - Streaming data processing library. https://hackage.haskell.org/package/conduit-1.3.4 (MichaelSnoyman)
07:28:24 × sfvm quits (~sfvm@37.228.215.148) (Remote host closed the connection)
07:28:52 × howdoi quits (uid224@gateway/web/irccloud.com/x-prctgemuwlhbjxof) (Quit: Connection closed for inactivity)
07:33:33 guest112` joins (~user@49.5.6.87)
07:34:35 × xff0x quits (~fox@2001:1a81:52a6:7b00:9da5:3842:e762:e94b) (Ping timeout: 272 seconds)
07:35:01 xff0x joins (~fox@port-92-193-220-65.dynamic.as20676.net)
07:35:12 <guest112`> Axman6: yes, I think I can solve the time naming file issue
07:36:02 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 264 seconds)
07:36:51 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
07:38:01 × guest1125 quits (~user@49.5.6.87) (Ping timeout: 264 seconds)
07:40:26 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:e1ff:d578:a4d8:f807) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:41:24 czwartyeon joins (~czwartyeo@77-45-55-99.sta.asta-net.com.pl)
07:41:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
07:41:50 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
07:43:50 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 264 seconds)
07:48:36 × jedws quits (~jedws@101.184.150.93) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:50:48 kritzefitz joins (~kritzefit@fw-front.credativ.com)
07:51:56 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
07:54:51 × alp quits (~alp@2a01:e0a:58b:4920:5c8d:e2ed:21ef:b40c) (Ping timeout: 272 seconds)
07:56:39 da39a3ee5e6b4b0d joins (~da39a3ee5@67.23.55.162)
07:58:58 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
07:59:13 hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de)
08:00:31 Varis joins (~Tadas@unaffiliated/varis)
08:00:59 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
08:01:32 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
08:03:15 jamm_ joins (~jamm@unaffiliated/jamm)
08:03:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:04:15 × cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 256 seconds)
08:05:24 jedws joins (~jedws@101.184.150.93)
08:06:01 × jedws quits (~jedws@101.184.150.93) (Client Quit)
08:06:46 cfricke joins (~cfricke@unaffiliated/cfricke)
08:08:07 wonko7 joins (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52)
08:11:27 cyphase joins (~cyphase@unaffiliated/cyphase)
08:11:53 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
08:12:37 adm_ joins (~adm@43.229.88.197)
08:12:54 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
08:14:15 adm_ joins (~adm@43.229.88.197)
08:15:21 Yumasi joins (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr)
08:15:41 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
08:16:20 adm_ joins (~adm@43.229.88.197)
08:19:18 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
08:19:40 adm_ joins (~adm@43.229.88.197)
08:22:04 chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
08:23:12 × Sarma quits (~Amras@unaffiliated/amras) (Remote host closed the connection)
08:23:31 raichoo joins (~raichoo@dslb-178-001-144-016.178.001.pools.vodafone-ip.de)
08:24:34 gproto23 joins (~gproto23@unaffiliated/gproto23)
08:25:25 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Ping timeout: 240 seconds)
08:25:34 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Client Quit)
08:25:55 gproto23 joins (~gproto23@unaffiliated/gproto23)
08:27:31 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
08:27:36 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Remote host closed the connection)
08:28:04 gproto23 joins (~gproto23@unaffiliated/gproto23)
08:28:29 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
08:28:50 jedws joins (~jedws@101.184.150.93)
08:29:49 n0042 joins (d055ed89@208.85.237.137)
08:29:53 × jedws quits (~jedws@101.184.150.93) (Client Quit)
08:30:14 × Yumasi quits (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr) (Read error: Connection reset by peer)
08:30:19 × sqrt2_ quits (~ben@unaffiliated/sqrt2) (Ping timeout: 272 seconds)
08:31:03 sqrt2 joins (~ben@unaffiliated/sqrt2)
08:31:25 Amras joins (~Amras@unaffiliated/amras)
08:32:35 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
08:34:18 hidedagger joins (~nate@unaffiliated/hidedagger)
08:35:42 Yumasi joins (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr)
08:36:39 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 272 seconds)
08:37:10 kuribas joins (~user@ptr-25vy0iacghmhtu8v1sd.18120a2.ip6.access.telenet.be)
08:37:57 m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de)
08:38:28 × aoei quits (~aoei@li2174-104.members.linode.com) (Quit: ZNC 1.7.5 - https://znc.in)
08:38:32 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
08:39:08 gproto023 joins (~gproto23@unaffiliated/gproto23)
08:39:11 borne joins (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de)
08:40:05 aoei joins (~aoei@li2174-104.members.linode.com)
08:40:34 × cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 272 seconds)
08:40:36 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds)
08:45:05 cyphase joins (~cyphase@unaffiliated/cyphase)
08:46:11 gproto023 is now known as gproto23
08:46:53 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
08:49:33 jedws joins (~jedws@101.184.150.93)
08:50:46 × jedws quits (~jedws@101.184.150.93) (Client Quit)
08:51:38 × Yumasi quits (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr) (Read error: Connection reset by peer)
08:51:40 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
08:56:56 aredirect joins (~aredirect@197.52.231.124)
08:57:04 Yumasi joins (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr)
08:57:34 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
08:58:17 × SanchayanMaity quits (~Sanchayan@171.76.82.54) (Quit: SanchayanMaity)
08:58:44 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Remote host closed the connection)
08:59:04 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
08:59:29 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:59:50 SanchayanMaity joins (~Sanchayan@171.76.82.54)
09:00:06 × betrion[m] quits (betrionmat@gateway/shell/matrix.org/x-lhecpqwtjkkiglwb) (Quit: Idle for 30+ days)
09:00:26 <tdammers> does anyone know how I can convince postgresql-simple to consume postgres values of type 'interval'?
09:00:35 f-a joins (~f-a@151.36.219.202)
09:02:44 × cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 272 seconds)
09:05:27 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
09:07:52 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Read error: Connection reset by peer)
09:09:01 benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-lrpyjjkwyhqzgysi)
09:09:29 star_cloud joins (~star_clou@106.206.23.122)
09:09:47 × star_cloud quits (~star_clou@106.206.23.122) (Read error: Connection reset by peer)
09:09:52 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 260 seconds)
09:11:54 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
09:13:00 × Yumasi quits (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr) (Read error: Connection reset by peer)
09:13:03 adm_ joins (~adm@43.229.88.197)
09:13:12 Er45 joins (5fa448e7@95.164.72.231)
09:13:19 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
09:13:35 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
09:18:23 Yumasi joins (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr)
09:19:16 × adm_ quits (~adm@43.229.88.197) (Ping timeout: 240 seconds)
09:19:28 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 256 seconds)
09:20:25 michalz joins (~user@185.246.204.47)
09:23:21 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
09:23:50 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-ysnvsqftovuddatt) (Quit: Connection closed for inactivity)
09:24:25 × Yumasi quits (~guillaume@pop.92-184-106-211.mobile.abo.orange.fr) (Ping timeout: 240 seconds)
09:24:38 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
09:24:50 Yumasi joins (~guillaume@40.72.95.92.rev.sfr.net)
09:26:22 <dminuoso> define "consume"
09:26:45 <tdammers> map to Haskell values
09:27:05 <tdammers> I have a table with 'interval' values in it, and I want to read those with postgresql-simple
09:27:18 × Chousuke quits (oranenj@coffee.modeemi.fi) (Remote host closed the connection)
09:27:35 Chousuke joins (oranenj@coffee.modeemi.fi)
09:28:05 adm joins (~adm@43.229.88.197)
09:28:09 mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com)
09:28:23 <dminuoso> tdammers: I didn't map interval yet, but roughly https://hackage.haskell.org/package/postgresql-simple-0.6.3/docs/src/Database.PostgreSQL.Simple.FromField.html#FromField shows how
09:28:54 <dminuoso> in particular, look at `attoFieldParser`, `doFromField` and `okXXX` primitives like `okBinary`
09:29:09 <tdammers> right. upon further thought, it turns out that interval is actually the wrong data type, so that means I won't have to write my own parser for it
09:29:23 DavidEichmann joins (~david@62.110.198.146.dyn.plus.net)
09:29:24 <dminuoso> To figure out the underlying oids, use something like
09:29:26 <dminuoso> elect 'interval'::regtype::oid;
09:29:50 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds)
09:31:25 darjeeling_ joins (~darjeelin@122.245.219.209)
09:34:59 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
09:35:38 trcc joins (~trcc@users-1190.st.net.au.dk)
09:37:20 <trcc> I am aware that this is not the right channel to ask the question, but I do not know where to ask :) Anyone familiar with a channel related to model checking?
09:37:35 <trcc> Usually there is a lot of knowledge contained in here
09:39:59 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 272 seconds)
09:44:11 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
09:46:03 × datajerk quits (~datajerk@sense.net) (Ping timeout: 260 seconds)
09:46:43 adm_ joins (~adm@43.229.88.197)
09:49:59 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
09:52:36 datajerk joins (~datajerk@sense.net)
09:53:57 × Er45 quits (5fa448e7@95.164.72.231) (Remote host closed the connection)
09:55:03 pokid joins (~pokid@unaffiliated/pokid)
09:55:06 christo joins (~chris@81.96.113.213)
09:55:16 <[exa]> trcc: that sounds a bit too specialized even for #haskell, esp. in the morning :]
09:55:26 <trcc> hehe
09:55:42 <[exa]> do you seek papers, software, advice, or anything specific?
09:56:31 hackage ukrainian-phonetics-basic 0.3.0.0 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.0.0 (OleksandrZhabenko)
09:59:16 × christo quits (~chris@81.96.113.213) (Ping timeout: 246 seconds)
09:59:37 ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
10:00:26 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
10:00:35 TommyC7 joins (~TommyC@unaffiliated/sepulchralbloom)
10:00:48 × TommyC quits (~TommyC@unaffiliated/sepulchralbloom) (Disconnected by services)
10:01:11 TommyC7 is now known as TommyC
10:01:47 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
10:04:08 × aredirect quits (~aredirect@197.52.231.124) (Ping timeout: 260 seconds)
10:04:57 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
10:05:24 ER joins (5fa448e7@95.164.72.231)
10:05:43 <ER> @hoogle displayShow
10:05:44 <lambdabot> RIO displayShow :: Show a => a -> Utf8Builder
10:05:44 <lambdabot> Stack.Prelude displayShow :: Show a => a -> Utf8Builder
10:05:44 <lambdabot> Tonalude displayShow :: Show a => a -> Utf8Builder
10:05:56 <ER> @hoogle Utf8Builder
10:05:57 <lambdabot> RIO newtype Utf8Builder
10:05:57 <lambdabot> RIO Utf8Builder :: Builder -> Utf8Builder
10:05:57 <lambdabot> Text.Printer newtype Utf8Builder
10:06:23 f-a parts (~f-a@151.36.219.202) ()
10:06:56 × rprije quits (~rprije@123-243-139-165.tpgi.com.au) (Quit: Leaving)
10:08:09 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
10:08:35 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
10:09:50 × n0042 quits (d055ed89@208.85.237.137) (Remote host closed the connection)
10:11:05 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Quit: WeeChat 2.9)
10:12:25 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
10:15:39 × guest112` quits (~user@49.5.6.87) (Quit: ERC (IRC client for Emacs 27.1))
10:15:45 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
10:16:05 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
10:16:18 shatriff joins (~vitaliish@176.52.219.10)
10:18:25 × czwartyeon quits (~czwartyeo@77-45-55-99.sta.asta-net.com.pl) (Ping timeout: 240 seconds)
10:20:26 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 264 seconds)
10:21:10 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
10:25:10 czwartyeon joins (~czwartyeo@77-45-55-99.sta.asta-net.com.pl)
10:25:13 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Remote host closed the connection)
10:25:36 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
10:25:54 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
10:27:07 robotadam1 joins (~robotadam@s91904426.blix.com)
10:29:55 adm joins (~adm@43.229.88.197)
10:31:22 alp joins (~alp@2a01:e0a:58b:4920:c9e7:a101:608d:5391)
10:39:53 <trcc> [exa]: I have a program (c-like, but with objects) Y that uses an object X. X has a certain api. I want to verify that the given program Y does not violate the API of X. And I was hoping to code-generate the program to a model checker and have the model checker verify this.
10:41:31 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
10:41:58 × andos quits (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 246 seconds)
10:42:12 <johnnyboy[m]> sounds interesting!
10:42:48 <johnnyboy[m]> I wrote an LTL theory generator for my model checking project in Haskell and it was fun!
10:42:59 × mwalter quits (473b8f3e@c-71-59-143-62.hsd1.or.comcast.net) (Remote host closed the connection)
10:44:08 <johnnyboy[m]> haskell seems to be a great tool for parsing and generating code
10:44:59 CMCDragonkai1 joins (~Thunderbi@124.19.3.250)
10:49:00 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 256 seconds)
10:49:39 pjb joins (~t@2a01cb04063ec500710c4d3951adc2aa.ipv6.abo.wanadoo.fr)
10:54:41 × CMCDragonkai1 quits (~Thunderbi@124.19.3.250) (Remote host closed the connection)
10:55:14 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
10:57:10 hidedagger joins (~nate@unaffiliated/hidedagger)
10:57:53 adm joins (~adm@43.229.88.197)
10:58:26 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
10:58:34 Digit table flips attempting to install Euterpea (cabal v1-install --allow-newer Euterpea # didnt work either) ... goes afk to calm down, and to dispell angry defeatist thoughts he'll never get coding his music in functional programming.
10:59:42 adm joins (~adm@43.229.88.197)
11:00:09 <tomsmeding> Digit: with what ghc version did you try that?
11:00:35 <tomsmeding> I found this issue, which you probably also found (https://github.com/Euterpea/Euterpea2/issues/35), that suggests using ghc 8.6.5
11:01:03 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
11:01:09 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:02:14 <Uniaika> hi tomsmeding :)
11:02:46 tomsmeding wonders if you know me from somewhere outside #haskell
11:02:59 <[exa]> trcc: I'm usually going the other direction, write a DSL where breaking the model is non-representable and then generate the C program from that...
11:03:30 <Uniaika> tomsmeding: nope, not at all! :D
11:03:41 <tomsmeding> also hi, then :)
11:04:13 × adm quits (~adm@43.229.88.197) (Ping timeout: 260 seconds)
11:05:53 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
11:09:37 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 246 seconds)
11:11:58 caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net)
11:19:03 <ski> triteraflops : Clean also has some monadic operations, because they're useful at times (avoiding tedious boilerplate code), even with uniqueness
11:19:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
11:20:25 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
11:20:47 carlomagno1 joins (~cararell@148.87.23.6)
11:20:56 <ski> the Clean approach to I/O requires tracking uniqueness statically. (Mercury also uses the same approach, although it doesn't put the uniqueness in the types, but in separate mode declarations of functions and predicates). since Haskell doesn't have uniqueness, it has to use a different approach
11:22:45 × carlomagno quits (~cararell@148.87.23.7) (Ping timeout: 240 seconds)
11:22:51 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
11:23:50 <ski> in the past (before monadic I/O), Haskell has used two other approaches to (side-effect free) I/O, modelling I/O declaratively. first, you can model a program as a function from program inputs (standard input) to program outputs (standard output), both being `String's. the standard Haskell function `interact :: (String -> String) -> IO ()' can be used to convert from that input-string-to-output-string model
11:23:56 <ski> to the current monadic I/O model, so that you can write programs in this style
11:24:46 whald joins (~trem@2a02:810a:8100:11a6:7427:ad4:8a1e:146d)
11:25:01 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
11:25:38 <ski> however, this doesn't scale to doing other operations that transforming a single standard input character stream to a single standard output character stream. e.g. you might also want to emit some output on the standard error stream. or you might want to open named files, to read from them, or write to them. or do other effectful operations, like communicating over a network
11:26:08 × ER quits (5fa448e7@95.164.72.231) (Remote host closed the connection)
11:27:29 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
11:27:46 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 272 seconds)
11:27:48 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit)
11:31:04 <ski> so, instead of mapping lists/streams of input characters to lists/streams of output characters, we could generalize to mapping lists of OS responses to lists of OS requests (yes, in that order, not in the opposite order). you can imagine `data Request = HPutChar Handle Char | HGetChar Handle | OpenFile FilePath IOMode | HClose Handle ...' and `data Response = HCharPut | HCharGot Char | FileOpened Handle |
11:31:10 <ski> Closed | Error IOError | ...'
11:31:35 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
11:32:26 <ski> and then a program doing I/O would be modelled as a function of type `[Response] -> [Request]'. the idea is that the function starts by producing a `Request' in the output stream, and only after that does it look at the corresponding `Response' in the input stream, which will contain the reply from the OS to the given request
11:33:02 <ski> you could define a function for outputting a `String' as follows
11:33:21 <ski> hPutStr :: String -> [Response] -> [Request]
11:33:52 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
11:34:41 <ski> hPutStr [ ] resps0 = []
11:35:11 <ski> hPutStr (c:s) resps0 = HPutChar h c
11:35:21 <Digit> thanks tomsmeding. that was helpful. i have a 8.8.4 which i've been getting "further" with than my 8.6.5 which chokes straight away, offering "cabal: failed to parse output of 'ghc-pkg dump'". with my 8.8.4 i at least get to the https://dpaste.com/78CNMNNAU (& attempting to get alsa's -dev where i have the 8.6.5 errors out too). ~ am currently working through the errors i got, getting the parts, on a fresh start with another 8.6.5 (i
11:35:21 <Digit> hope).
11:35:31 <ski> : case resps0 of
11:35:48 <dminuoso> I do wonder how error prone pre-monadic IO really was. Forget to pop a response, pop twice..
11:35:55 <trcc> [exa]: yes, I have thought of that. Unfortunately it is not really a possibility here...
11:36:08 <ski> HCharPut:resps -> hPutStr h c resps
11:36:11 <dminuoso> The interface seems incredibly awkward
11:36:33 <ski> (oh, there should of course also be a `Handle' argument to `hPutStr')
11:37:20 <ski> it's awkward yes to have to do local `case' in order to only check the corresponding response after the request has been given. one can use an irrefutable/lazy pattern, in order to make this a little nicer
11:37:43 <ski> hPutStr (c:s) ~(HCharPut:resps) = HPutChar h c : hPutStr h c resps
11:37:54 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
11:38:00 <dminuoso> Did that mechanism support things like forkIO?
11:38:23 <dminuoso> Though..
11:38:43 <dminuoso> I guess that'd just be `forkIO :: ([Request] -> [Response]) -> [Request] -> [Response]`
11:38:52 <dminuoso> The rest is just an implementation
11:38:53 <ski> also, `hPutStr', as written above, is not composable. if one wants to output one `String' after another (and not by first concatenating them), one can't do it directly with `hPutStr'. we need to generalize it to take an additional parameter, a continuation, for what to do after the output of the given `String' :
11:39:03 × chaosmasttter quits (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
11:39:10 <ski> hPutStr :: Handle -> String -> ([Response] -> [Request]) -> [Response] -> [Request]
11:39:13 <ski> or, using
11:39:21 <ski> type Answer = [Response] -> [Request]
11:39:24 <ski> it becomes
11:39:33 <ski> hPutStr :: Handle -> String -> Answer -> Answer
11:39:39 <ski> and then one'd also do
11:39:53 <ski> hGetLine :: Handle -> (String -> Answer) -> Answer
11:40:12 <ski> (another name for `Answer' that's been used is `Dialogue', for "dialogue-based I/O")
11:40:35 <ski> this is actually writing the program in continuation-passing style, and so one could express these using `Cont' :
11:40:46 <ski> hPutStr :: Handle -> String -> Cont Answer ()
11:40:47 solonarv joins (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr)
11:40:57 <ski> hGetLine :: Handle -> Cont Answer String
11:41:49 <ski> and then we could define `IO' as `Cont Answer', and define monadic combinators on `IO' (like `returnIO',`bindIO'), or the overloaded ones that we have today, that applies to any monad
11:42:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
11:43:00 <dminuoso> ski: But this is also more error prone in a subtle way. Response is not parametrized over the type of result it yields.
11:43:10 <ski> (it's also possible to have `Answer' as an abstract data type, and base I/O directly on it, instead of defining `Answer' in terms of the dialogue-based I/O. Andrew Appel's "Modern Compiler Implementation in SML/C/Java" does that, in a chapter about a purely functional language)
11:43:27 <ski> dminuoso : it isn't intended to
11:43:45 <dminuoso> So you could pass the `Response` to something not compatible with what it produces
11:44:02 <ski> you can use the CPS `(a -> Answer) -> Answer' to express a computed answer `a', and the ability to continue with further I/O dialogue after that
11:45:50 <ski> "Did that mechanism support things like forkIO?" -- not really. the dialogue models a synchronized, fully linear, interleaving of requests and responses. the more or less arbitrary interleaving of multiple such dialogues couldn't really be expressed nicely here, that i can see
11:45:53 × subttle quits (~anonymous@unaffiliated/subttle) (Quit: leaving)
11:46:16 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 240 seconds)
11:46:40 <ski> also, it's awkward to have to change `Request' and `Response', to add new primitive types of operations. it's better to have `Answer', or `IO', be an abstract type, and have ways of importing foreign operations dealing with them
11:46:43 <dminuoso> ski: well, I just thought that you could just dupliate another dialog machine on forkIO
11:47:09 chaosmasttter joins (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de)
11:47:15 <dminuoso> in the sense of forking the entire process
11:47:37 <ski> i guess something like `([Response] -> [Request]) -> ([Response] -> [Request]) -> ([Response] -> [Request])' could perhaps work, hmm
11:48:08 <ski> (btw, note that you got the `Response' vs. `Request' ordering wrong for `forkIO'. the `Requests' are the outputs, and the `Response' are the inputs)
11:48:26 <ski> hmm
11:49:34 <ski> well, i suppose you could have a request `ForkIO ([Response] -> [Request])', and defer to the OS how the interleaving of I/O operations should happen
11:49:57 <ski> (i was thinking about possibly describing, in-language, the interleaving)
11:52:35 <ski> triteraflops : in any case, uniqueness and monads are not directly comparable. they are at "different levels". it's more fair to compare uniqueness to `IO' and `ST'. the latter two can be thought of as abstract datatypes which conceptually makes use of uniqueness internally (even though the language doesn't allow expressing uniqueness). them being abstract protects the use of the "state-passing" to ensure
11:52:41 <ski> uniqueness inside, so that "update-in-place" can be used. however, as noticed by someone else, for some notions of I/O, the "world-passing" isn't really a good fit
11:54:23 <tomsmeding> Digit: are you switching ghc's using ghcup? Not sure if I've seen that ghc-pkg error before, perhaps a version mismatch?
11:54:46 hekkaidekapus_ is now known as hekkaidekapus
11:55:25 × Codaraxis quits (~Codaraxis@91.193.4.10) (Ping timeout: 240 seconds)
11:55:44 <ski> triteraflops : anyway, there are operations `return :: a -> St s a',`(`bind`) :: (St s a) -> (a -> St s b) -> St s b',`seqList :: [St s a] -> St s [a]' in Clean, `St s a' being defined as `s -> (a,s)'. these can be applied to passing unique values (the `World', or `File's or arrays) around, threading them through a computation. `seqList' corresponds in Haskell to `sequence', for the `State s' monad
11:56:12 Codaraxis joins (~Codaraxis@91.193.4.10)
11:57:56 <ski> triteraflops : one advantage of the uniqueness approach is that not all I/O operations, or array operations, need to be explicitly sequenced, wrt each other. if you open two `File's, or operate on two arrays, then these would be two different "unique state threads", can be evaluated independently of each other. this improves laziness, as compared to Haskell's monadic `IO' and `ST', which insists on
11:58:02 <ski> sequentializing all the I/O or state operations, wrt each other
11:58:23 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
11:59:12 Tario joins (~Tario@201.192.165.173)
11:59:19 × Yumasi quits (~guillaume@40.72.95.92.rev.sfr.net) (Ping timeout: 246 seconds)
11:59:47 <ski> (unless you're using `forkIO' to spawn a new thread doing I/O, or using `unsafeInterleaveST' to spawn a new "state thread" (not actually using preemptive or cooperative threads in the conventional sense), which is intended to operate on state that's disjoint from the rest of the state (hence the `unsafe' in the name))
12:00:40 × plutoniix quits (~q@175.176.222.7) (Quit: Leaving)
12:01:15 <hekkaidekapus> tomsmeding, Digit: Building with v. ≥8.8 requires patching usages of `Control.Monad.fail` (see <https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/8.8#base-41300>). v. ≤8.6.5 will be fine modulo some tweaks in the cabal file.
12:01:15 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
12:01:58 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
12:02:36 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
12:03:00 × Codaraxis quits (~Codaraxis@91.193.4.10) (Remote host closed the connection)
12:03:20 Codaraxis joins (~Codaraxis@91.193.4.10)
12:06:16 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:06:55 × Codaraxis quits (~Codaraxis@91.193.4.10) (Remote host closed the connection)
12:08:29 × da39a3ee5e6b4b0d quits (~da39a3ee5@67.23.55.162) (Ping timeout: 256 seconds)
12:09:14 Codaraxis joins (~Codaraxis@91.193.4.10)
12:10:23 Entertainment joins (~entertain@104.246.132.210)
12:10:33 × Codaraxis quits (~Codaraxis@91.193.4.10) (Remote host closed the connection)
12:16:40 gproto23 joins (~gproto23@unaffiliated/gproto23)
12:20:31 hackage phonetic-languages-simplified-common 0.3.0.0 - A simplified version of the phonetic-languages-functionality https://hackage.haskell.org/package/phonetic-languages-simplified-common-0.3.0.0 (OleksandrZhabenko)
12:21:32 watt877 joins (~watt877@124.123.105.4)
12:22:30 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
12:23:57 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Read error: Connection reset by peer)
12:26:01 × watt877 quits (~watt877@124.123.105.4) (Ping timeout: 264 seconds)
12:28:15 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
12:31:44 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving)
12:38:01 hackage servant-exceptions 0.2.1 - Extensible exceptions for servant APIs https://hackage.haskell.org/package/servant-exceptions-0.2.1 (ch1bo)
12:39:01 hackage servant-exceptions-server 0.2.1 - Extensible exceptions for servant API servers https://hackage.haskell.org/package/servant-exceptions-server-0.2.1 (ch1bo)
12:39:15 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
12:40:31 hackage phonetic-languages-simplified-properties-lists 0.1.0.0 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.0.0 (OleksandrZhabenko)
12:41:31 invaser joins (~Thunderbi@31.148.23.125)
12:45:23 Nahra joins (~Nahra@unaffiliated/nahra)
12:48:17 mpereira joins (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55)
12:48:50 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
12:49:46 psamim joins (samimpmatr@gateway/shell/matrix.org/x-tqcirtqddpnlomkh)
12:50:21 n0042 joins (d055ed89@208.85.237.137)
12:51:59 <n0042> Hello folks. I have been experimenting with Data.Vector and I have noticed that it uses a lot of the same function names as the list class, which leads to complaints from ghc. How do you guys typically handle that? Should I call each function explicitly like `Data.Vector.length` or is there a one-liner to overwrite the normal commands in a program
12:52:00 <n0042> that will be using Vectors for everything?
12:52:23 <dminuoso> n0042: The common style is to use qualified imports
12:52:30 <dminuoso> import qualified Data.Vector as V
12:52:38 <dminuoso> Alternatively you can also hide imports from Prelude
12:52:50 <n0042> Excellent. Thank you very mcuh dminuoso
12:53:03 <n0042> *much
12:53:07 <[exa]> like, it is pretty common that if anyone writes V.length you just assume that's the vector length
12:53:23 <[exa]> same for other containers, M as Data.Map, S as Data.Set, etc
12:53:25 dminuoso usually imports Data.ByteString as V and Data.Vector as BS.
12:53:33 dminuoso then invites [exa] to fix his code
12:53:38 <[exa]> please no why
12:53:44 <n0042> ll
12:53:47 <n0042> *lol
12:54:00 <dminuoso> [exa]: Recall the tree parsing problem btw?
12:54:04 <n0042> Thank you both. I'll use those approaches.
12:54:09 × olligobber quits (~olligobbe@unaffiliated/olligobber) (Ping timeout: 265 seconds)
12:54:21 <[exa]> dminuoso: yeah, how did that end up?
12:54:25 <dminuoso> [exa]: Strangely I had another similar problem shortly after, and now I have the *real* solution. Rather than a whacky stupid stateful parser...
12:54:27 <dminuoso> you know...
12:54:29 <dminuoso> build a trie.
12:54:34 <dminuoso> done :>
12:54:54 <[exa]> hell yeah tries
12:55:10 <[exa]> cool
12:55:43 <[exa]> btw I saw some Trie packages like 2 days ago, great there are good data structures for that now
12:55:59 <[exa]> s/data structures/container implementations/ ..so
12:56:32 <dminuoso> Well, Im just finding out that general trie implementations dont make much sense
12:56:42 <dminuoso> Something like `list-tries` for example is just containers with a trie implementation behind
12:57:10 <n0042> Got me looking up what a `trie` is on Wikipedia. Neat stuff. Thanks guys
13:00:12 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.161.165)
13:00:49 <[exa]> dminuoso: it's good that there's the concept of tries. Cf. C++ STL doesn't have tries and people end up making stuff like map<list_of_path_elems, whatever>
13:01:16 <merijn> [exa]: Metric trees are even cooler!
13:02:02 <dminuoso> [exa]: to be fair, the map *could* be trie backed
13:02:05 <dminuoso> That's sort of what we have in haskell
13:02:36 <dminuoso> (well containers uses balanced binary tries)
13:02:51 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
13:02:53 texasmynsted joins (~texasmyns@212.102.45.112)
13:03:00 <merijn> dminuoso: C++'s std::map is a balanced binary tree
13:03:33 <merijn> dminuoso: There's no such thing as a "binary trie" (well, I suppose if you have like, lists of boolean as input? >.>)
13:03:38 × gentauro quits (~gentauro@unaffiliated/gentauro) (Quit: leaving)
13:03:56 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds)
13:04:05 <dminuoso> oh that was a typo sorry
13:04:17 <merijn> Anyhoo, speaking of trees
13:05:14 × texasmynsted quits (~texasmyns@212.102.45.112) (Read error: Connection reset by peer)
13:05:26 texasmynsted joins (~texasmyns@212.102.45.112)
13:05:50 <merijn> Suppose I have one a represenation of a tree that's efficient, but inconvenient to program against and wanna expose it as a regular ADT (which is easy to program with), anyone every do something like that? I feel like pattern synonyms should work, but not entirely sure how >.>
13:07:18 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
13:07:55 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:08:44 Guest_10 joins (1f028586@31.2.133.134)
13:09:37 <Guest_10> hi
13:10:04 × Guest_10 quits (1f028586@31.2.133.134) (Remote host closed the connection)
13:10:50 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
13:11:06 <dminuoso> merijn: write the iso by hand?
13:11:11 <dminuoso> two functions, done
13:11:26 <dminuoso> (you'd want one for testing anyway)
13:11:28 <merijn> dminuoso: I don't wanna reify the ADT
13:12:05 <ski> (you want some kind of slices ?)
13:12:10 <merijn> I just wanna program against the ADT representation like I've directly snorted a Ryan Newton talk :p
13:12:44 knupfer joins (~Thunderbi@200116b82ca96500a0407cfffebb5266.dip.versatel-1u1.de)
13:13:23 × knupfer quits (~Thunderbi@200116b82ca96500a0407cfffebb5266.dip.versatel-1u1.de) (Remote host closed the connection)
13:13:36 knupfer joins (~Thunderbi@200116b82ca965000d9a6def15a910ad.dip.versatel-1u1.de)
13:14:20 <tomsmeding> first write projection functions (for use in view patterns) and smart constructors, incrementally rewrite your program using them, developing the correct vocabulary along the way, and finally distill the result in some pattern synonyms?
13:14:31 <merijn> See 1 hour and 7 minutes into this talk: https://www.youtube.com/watch?v=lC5UWG5N8oY
13:14:55 ski . o O ( <https://downloads.haskell.org/~ghc/latest/docs/html/libraries/ghc-compact-0.1.0.0/GHC-Compact.html> )
13:15:32 <merijn> ski: That's somewhat related, yes and in fact part of the talk I linked ;)
13:17:04 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
13:18:11 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
13:18:36 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 272 seconds)
13:18:41 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:19:01 kindaro joins (5cf52cdd@h92-245-44-221.dyn.bashtel.ru)
13:19:08 son0p joins (~son0p@181.136.122.143)
13:20:12 <kindaro> When I run `cabal build` and then `cabal install --installdir=./deployment --install-method=copy --overwrite-policy=always`, it appears that the same build work is performed twice. How can I only build once and copy the executable to the designated place?
13:20:24 FreeBirdLjj joins (~freebirdl@101.228.42.108)
13:21:05 × Bergle_2 quits (~Bergle_4@101.165.90.119) (Remote host closed the connection)
13:21:25 <kindaro> Currently, `cabal install …` is taking the amount of time very near to that of `cabal build`, and also looking at `ps -o command` shows that `ghc` is being invoked.
13:21:25 Bergle_2 joins (~Bergle_4@101.165.90.119)
13:21:28 Er joins (5fa448e7@95.164.72.231)
13:22:07 gentauro joins (~gentauro@unaffiliated/gentauro)
13:23:31 <merijn> Currently the way you can only build once and copy is to, well, skip running cabal build first? :p
13:23:43 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
13:24:09 <kindaro> It is not acceptable because I need to acquire the exit status of `cabal build` and `cabal test` before I deploy.
13:24:24 <merijn> There are a bunch of obscure reasons why install rebuilds everything from a clean slate. Some practical, and some due to lack of engineering effort to reduce this
13:25:08 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Client Quit)
13:25:16 <kindaro> Unfortunate! Can I find out where `cabal build` stores the executable so I may copy it by hand?
13:25:54 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
13:26:08 <merijn> Latest alpha release of cabal-install has list-bins, if you use an older version there's
13:26:12 <merijn> @hackage cabal-plan
13:26:12 <lambdabot> https://hackage.haskell.org/package/cabal-plan
13:26:14 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
13:26:15 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
13:26:36 <merijn> kindaro: Note that copying by hand can get you in trouble if you use, e.g., data-files
13:26:43 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
13:27:07 Tario joins (~Tario@201.192.165.173)
13:27:09 × Er quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
13:28:15 × kindaro quits (5cf52cdd@h92-245-44-221.dyn.bashtel.ru) (Remote host closed the connection)
13:28:33 Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk)
13:30:23 <dminuoso> merijn: What's the protocol for that?
13:30:48 <dminuoso> Is there some release command planned, that would give me a tarball with build artifacts in the correct directory structure?
13:31:00 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 256 seconds)
13:31:12 <dminuoso> Or.. can you override getDataFileName?
13:31:35 <dminuoso> Guess I could just write my own Paths_foo module
13:32:07 <merijn> dminuoso: When you run install you can control where they get put via flags, which will set getDataFileName, etc. as needed
13:32:18 kindaro joins (5cf52cdd@h92-245-44-221.dyn.bashtel.ru)
13:32:23 adm joins (~adm@43.229.88.197)
13:32:25 <dminuoso> mmm j
13:32:27 <merijn> dminuoso: I wanna work on proper prefix-independence
13:32:36 × supercoven quits (~Supercove@dsl-hkibng31-54fabf-192.dhcp.inet.fi) (Ping timeout: 240 seconds)
13:32:41 <merijn> at some unspecified moment where I have time, energy, and motivation
13:32:48 <merijn> So...probably somewhere in the next 3 years :p
13:33:03 <kindaro> merijn, thank you for explanations. Is there a ticket somewhere tracking those obscure reasons?
13:33:03 hseg joins (~gesh@IGLD-84-228-238-117.inter.net.il)
13:33:11 <hseg> where did mtimes vanish to?
13:33:40 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
13:34:04 <dminuoso> % :t stimes
13:34:04 <yahb> dminuoso: forall {a} {b}. (Semigroup a, Integral b) => b -> a -> a
13:34:06 <dminuoso> This?
13:34:10 <hseg> or has it been deprecated in favour of stimes?
13:34:13 <hseg> :t mtimes
13:34:15 <lambdabot> error: Variable not in scope: mtimes
13:34:24 <Uniaika> there's Data.Semigroup mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
13:34:30 <hseg> mtimes :: (Monoid a, Integral b) => b -> a -> a
13:35:31 <merijn> kindaro: basically, I think install *always* builds from "first do sdist, then build from there" to ensure the package description is sane, I couldn't quickly find a ticket
13:35:35 <hseg> right. and stimesMonoid :: (Integral b, Monoid a) => b -> a -> a is even better, using exponent halving
13:35:47 <dminuoso> hseg: I dont see a way mtimes and stimes could differ, it would lead to incoherence.
13:35:54 brisbin joins (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net)
13:36:02 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
13:36:04 <dminuoso> The mtimes bit is odd, did it ever exist?
13:36:09 adm joins (~adm@43.229.88.197)
13:36:45 <dminuoso> https://www.google.com/search?client=firefox-b-d&q=haskell+ghc+mtimes&nfpr=1&sa=X&ved=2ahUKEwiKrtWd6J3tAhWu1VkKHc94DHEQvgUoAXoECAcQMA&biw=618&bih=638 this suggests it only ever occured in proposals
13:36:46 <hseg> only difference in whether 0 input should error
13:36:55 <hseg> https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid
13:37:01 <ezzieyguywuf> hrm, "[a] -> [b] -> Map a b", seems like a common enough need, i.e. "zip to Map", but I don't see anything like this in hoogle.
13:37:06 <dminuoso> And I cant find it in the git history of GHC
13:37:07 <ezzieyguywuf> is there a good reason why it doesn't exist?
13:37:13 <hseg> ah. have been reading too many propsals then
13:37:17 <dminuoso> % :t zip
13:37:17 <yahb> dminuoso: ; <interactive>:1:1: error:; Ambiguous occurrence `zip'; It could refer to; either `Data.List.NonEmpty.zip', imported from `Data.List.NonEmpty'; or `Prelude.zip', imported from `Prelude' (and originally defined in `GHC.List')
13:37:20 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
13:37:22 <tomsmeding> ezzieyguywuf: (Map.fromList .) . zip
13:37:25 <dminuoso> % :t Prelude.zip
13:37:26 <yahb> dminuoso: forall {a} {b}. [a] -> [b] -> [(a, b)]
13:37:27 <hseg> ^
13:37:30 <ezzieyguywuf> tomsmeding: nice.
13:38:14 zaquest joins (~notzaques@5.128.210.178)
13:39:00 <dminuoso> Anyway. Is there an alternative to haskell-src-exts for generating entire haskell modules? In particular I want quasiquoters and ideally support for comments and a pretty printer..
13:39:10 <ezzieyguywuf> tomsmeding: why are the parentheses needed in that expresion?
13:39:19 <ezzieyguywuf> how is it different from Map.fromList . zip?
13:39:27 <hseg> :t Map.fromList . zip
13:39:27 <dminuoso> ezzieyguywuf: take a look at the number of arugments to zip
13:39:28 <lambdabot> error:
13:39:28 <lambdabot> Not in scope: ‘Map.fromList’
13:39:28 <lambdabot> Perhaps you meant one of these:
13:39:32 <hseg> :t Data.Map.fromList . zip
13:39:34 <lambdabot> error:
13:39:34 <lambdabot> • Couldn't match type ‘[b0] -> [(a, b0)]’ with ‘[(k, a1)]’
13:39:34 <lambdabot> Expected type: [a] -> [(k, a1)]
13:39:34 <kindaro> merijn: so, why does `cabal build` skip `sdist` then?
13:39:36 sh9 joins (~sh9@softbank060116136158.bbtec.net)
13:40:02 <dminuoso> ezzieyguywuf: `(f .) . g` is just very dense for composing `f` after the second argument of `g`
13:40:46 <ezzieyguywuf> dminuoso: what would be a non-dense way of writing it? i see that zip takes two arguments but I guess I didn't realize that `(.)` was limited to one-operator stuff
13:40:55 <dminuoso> % :t let (.:) = (.) . (.) in Data.Map.Strict.fromList .: Prelude.zip
13:40:56 <yahb> dminuoso: forall {k} {a}. Ord k => [k] -> [a] -> M.Map k a
13:40:58 <dminuoso> This is a slightly more readable way
13:41:15 <dminuoso> Or you just use lambdas, parens
13:41:18 <dminuoso> extra binding
13:42:41 <maerwald> is there a way in hspec to mark a test as flaky and still have it run, but when it fails just print a warning and not error?
13:43:37 fendor_ joins (~fendor@178.165.131.166.wireless.dyn.drei.com)
13:44:37 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 264 seconds)
13:46:28 × fendor quits (~fendor@178.165.130.67.wireless.dyn.drei.com) (Ping timeout: 272 seconds)
13:46:40 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
13:46:50 <ezzieyguywuf> maerwald: I've used pending before, but haven't tried having a potentially failing test run but keep going.
13:47:01 <ezzieyguywuf> maerwald: I guess you could add a check to the end of your test, and flip to True if needed?
13:47:38 <maerwald> Well, that doesn't give me a warning
13:48:37 <maerwald> https://github.com/hspec/hspec/issues/372
13:49:26 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
13:49:52 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:50:47 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
13:50:55 <tomsmeding> ezzieyguywuf: (.) :: (b -> c) -> (a -> b) -> (a -> c); it's composition of single-argument functions
13:52:10 FreeBirdLjj joins (~freebirdl@101.228.42.108)
13:52:18 <tomsmeding> ((f .) . g) a b = (\x -> (f .) (g x)) a b = ((f .) (g a)) b = (f . g a) b = (\x -> f (g a x)) b = f (g a b)
13:52:30 hackage hspec-hashable 0.1.0.1 - Initial project template from stack https://hackage.haskell.org/package/hspec-hashable-0.1.0.1 (mchaver)
13:52:32 <tomsmeding> you can work it out by hand :)
13:52:51 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
13:53:32 × robotadam1 quits (~robotadam@s91904426.blix.com) (Remote host closed the connection)
13:53:58 f-a joins (~f-a@151.68.213.48)
13:54:44 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
13:55:28 urodna joins (~urodna@unaffiliated/urodna)
13:56:51 <tomsmeding> ezzieyguywuf: another way to see the same thing: for (.) we have the property that (f . g) x = f (g x), so that means that ((f .) . g) a b = (((f .) . g) a) b = ... you can work it out :)
13:56:56 × kindaro quits (5cf52cdd@h92-245-44-221.dyn.bashtel.ru) (Remote host closed the connection)
13:58:16 <ezzieyguywuf> tomsmeding: lol, thank you.
13:58:17 <dminuoso> To me, it's just an idiom that I know what it does without knowing why
13:58:25 <dminuoso> I know I can do what tomsmeding did by hand too, just never bothered to
13:58:39 <tomsmeding> at this point it's also an idiom I know :p
13:58:52 <tomsmeding> I worked it out the first time I saw it though, because I was seriously confused back then
13:58:58 <dminuoso> Heh. I prefer f .: g over (f .) . g though
13:58:59 <ezzieyguywuf> if `test = [["abc", "def"], ["123", "456"]]` why does `[ header : body ] = test` result in a non-exhaustive pattern error?
13:59:13 <tomsmeding> (header : body) = test
13:59:38 <hseg> wait, Monad can no longer be defined in terms of join?
13:59:48 <dminuoso> correct
13:59:57 <hseg> :(
14:00:02 <dminuoso> it caused segfaults left and right because of GeneralizedNewtypeDeriving
14:00:08 f-a parts (~f-a@151.68.213.48) ()
14:00:13 <dminuoso> well okay only on the left side of things
14:00:16 <ezzieyguywuf> hrm,I think this is a function in Data.List actually...
14:00:37 <dminuoso> hseg: https://ryanglscott.github.io/2018/03/04/how-quantifiedconstraints-can-let-us-put-join-back-in-monad/
14:01:02 <dminuoso> It's a pretty wild story, at first it seemed so unlikely how join in Monad could cause segfaults with GeneralizedNewtypeDeriving
14:01:23 honigkuchen joins (~honigkuch@ip5b42981b.dynamic.kabel-deutschland.de)
14:01:36 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
14:01:38 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz)
14:01:43 <hseg> ok, thanks
14:01:57 <honigkuchen> are there particular broader tasks in that functional programming languages or paradigms are better?
14:02:23 <honigkuchen> instead of answering a link can also help
14:02:57 <tdammers> bit of a vague question - to begin with, there isn't really a narrow definition of "functional programming" that enjoys a wide consensus
14:03:29 <honigkuchen> tdammers, is that an answer to me?
14:03:32 <tdammers> yes
14:03:53 <honigkuchen> tdammers, I do not care about an exact definination what functional programming is
14:04:23 <tdammers> OK, but if you look at languages that are sometimes labelled as "functional", there is quite some difference in where they shine
14:04:25 <Digit> tomsmeding: no ghcup. am using different bedrocklinux strata for different ghc versions.
14:04:31 hackage ukrainian-phonetics-basic 0.3.1.0 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.1.0 (OleksandrZhabenko)
14:05:28 <tdammers> for example, scheme makes for a great scripting language, but lacks the type discipline you want in situations where you need a high degree of certainty about the code's properties, which in turn is something Haskell is good at
14:06:01 <honigkuchen> tdammers, lets forget all these others and only take haskell
14:06:30 coot_ joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
14:06:38 <maerwald> no :p
14:06:45 <Digit> honigkuchen: wouldnt that be nice. :) lisps linger long though. n_n
14:07:00 hackage vulkan-utils 0.3 - Utils for the vulkan package https://hackage.haskell.org/package/vulkan-utils-0.3 (jophish)
14:07:03 <honigkuchen> may it be that certain tasks are better for imperative languages and others are better for haskell
14:07:25 × Kaivo quits (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) (Ping timeout: 240 seconds)
14:07:41 <tdammers> haskell *is* an imperative language /me runs away
14:07:41 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
14:07:43 <maerwald> at this point, I barely care about language paradigms anymore. The problem is that ADTs are still not a standard for all languages
14:07:54 × lassulus quits (~lassulus@NixOS/user/lassulus) (Ping timeout: 256 seconds)
14:08:00 <tdammers> anyway, if you want to know what haskell is good at, look at where it's used
14:08:01 hackage vulkan 3.7, VulkanMemoryAllocator 0.3.10 (jophish): https://qbin.io/feof-nathan-jj0i
14:08:09 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
14:08:16 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds)
14:08:16 coot_ is now known as coot
14:08:21 <maerwald> I'd pick any language that has a reasonable ecosystem and ADTs
14:08:25 <maerwald> the rest is details
14:09:15 <honigkuchen> abstract data type?
14:09:19 <maerwald> algebraic
14:09:22 <honigkuchen> ah
14:09:35 <tdammers> fintech, insurance, military, intelligence, economics, spam filtering, compiler research... generally, problem domains with a high degree of intrinsic complexity and a strong desire for static reasoning
14:10:11 <maerwald> fintech is more like high-speed anarchy, where haskell shines, because it's harder to constantly break your codebase
14:10:12 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
14:10:37 <tdammers> I think HFT is a domain where C++ still rules
14:10:42 <honigkuchen> what is intrinsic complexity
14:10:45 <n0042> Haskell has been kind of a learning curve coming from a mostly C background, but it's quickly become one of my favorite languages to use.
14:10:48 <maerwald> if there's something worse than agile, it's fintech :p
14:11:08 <tdammers> intrinsic complexity is complexity that is inherent to the problem itself, rather than being introduced by the mechanics of the tools you use to solve it
14:11:22 <maerwald> as opposed to accidential complexity
14:11:26 <tdammers> yes
14:11:32 <maerwald> there's papers and blog posts about this distinction
14:11:49 <honigkuchen> agile is a way of leading your team and fintech is a industry branch? how to compare those?
14:12:35 <ski> @quote is.the.world's.best
14:12:35 <lambdabot> SPJ says: Haskell is the world's best imperative language.
14:12:39 <honigkuchen> so a calculator has intrinsic complexity
14:12:41 <maerwald> honigkuchen: I'm just talking about my PTSD
14:12:57 lassulus joins (~lassulus@NixOS/user/lassulus)
14:13:05 <honigkuchen> but an editor maybe not
14:13:05 <ski> maerwald : "The problem is that ADTs are still not a standard for all languages" -- it seems some other more mainstream languages are slowly gaining them
14:13:41 <honigkuchen> https://en.wikipedia.org/wiki/PTSD_(disambiguation)
14:13:45 <yushyin> e.g. java
14:13:47 <tdammers> like, suppose you're writing a scheduling application for a logistics company. the routing and scheduling algorithms are fairly complex; no matter which language or tools you use, the problem will remain a complex one. that's the intrinsic complexity of the problem domain. now you build a frontend for that application, but the framework you pick doesn't quite get you the design you want, so you add all sorts
14:13:50 <tdammers> of quirks and workarounds to make it look like you want, and then more kludges to cover the edge cases that arise from that. that's accidental complexity.
14:14:12 <honigkuchen> ADTs seem to be cool and interesting, but what practical about them
14:14:26 <tdammers> in fact, centering things on a screen in HTML/CSS is a textbook example of accidental complexity
14:14:41 <n0042> Yay geometry
14:15:08 <tdammers> top = (screen.h - element.h) / 2
14:15:13 <tdammers> that's all the complexity there is
14:15:37 <tdammers> but if you want to do it with CSS, it becomes A LOT more complex. that's all accidental complexity
14:15:38 × pjb quits (~t@2a01cb04063ec500710c4d3951adc2aa.ipv6.abo.wanadoo.fr) (Ping timeout: 264 seconds)
14:15:40 <maerwald> Depending on the problem, the Haskell itself can also be accidential complexity.
14:15:49 <tdammers> oh yes, very much
14:16:26 <tdammers> for example, when you need deterministic memory allocations - Haskell makes that really difficult, even though the problem itself is not intrinsically complex (call malloc() to get a chunk of memory, and free() to release it)
14:16:50 <maerwald> StrictData and pray the leaks go away
14:17:40 <tdammers> StrictData doesn't guarantee deterministic deallocation
14:17:59 <maerwald> yeah
14:18:01 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
14:18:07 <maerwald> so you pray
14:18:09 <maerwald> :D
14:18:16 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
14:18:54 <n0042> I have been having a heck of a time coming around to the way Haskell does I/O, but the rest of the language is so nice that it's made it worth the effort. It's complex but I get why it's complex.
14:18:58 × hseg quits (~gesh@IGLD-84-228-238-117.inter.net.il) (Ping timeout: 246 seconds)
14:19:10 <honigkuchen> is there one great example of a very special particular task, in that haskell code is hugely much faster written, than an imperative code
14:20:00 adm joins (~adm@43.229.88.197)
14:20:10 <maerwald> honigkuchen: yeah, quicksort, except it doesn't have the same properties :P
14:20:22 <honigkuchen> great
14:20:31 <n0042> Most of the benefits are about safety rather than speed, right?
14:20:43 <merijn> honigkuchen: My summary is: Getting started writing a simple project in Haskell is probably about 1.5-2x harder the same in Python. Writing a complex project in Haskell is about 10-100x easier than in Python :)
14:20:56 <maerwald> that's about right
14:21:12 <merijn> n0042: tbh, "just putting IO everywhere" is still nicer than many other languages :p
14:21:20 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
14:21:24 <maerwald> if you don't intend to maintain your code much, picking haskell is a weird choice
14:21:40 <maerwald> that's where it becomes useful
14:21:48 <merijn> n0042: Haskell is also much faster than Python/Ruby/PHP, tbh
14:22:14 <merijn> n0042: JS might be comparable, but only because google has thrown tens of thousands of man-years at V8 :p
14:22:26 <merijn> And even then only if you write careful JS
14:22:28 <honigkuchen> has haskell also an interpreter
14:22:32 <honigkuchen> or only an compiler
14:22:40 <maerwald> but these days ppl have different approaches with dealing with complexity... they see the language is too dumb to handle large codebases, so they think: let's split the code and do microservices
14:22:44 <n0042> It has an interpreter
14:22:52 <n0042> GHCi
14:22:53 <maerwald> I haven't really seen microservices in haskell, because what's the point
14:22:58 <honigkuchen> so it is both?
14:23:09 <merijn> honigkuchen: GHC comes with ghci which is a interpreter. It's not really great for writing code in, but you can quickly load and play with small code examples
14:23:36 <merijn> n0042: What difficulties have you been having with IO, btw?
14:23:49 × da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.161.165) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:23:56 <honigkuchen> there are not much programs that its languages comes with both, interpreter and compiler, right?
14:24:17 <merijn> Well, someone wrote a C and C++ interpreter too, so... :p
14:24:45 <n0042> honigkuchen: Many languages are not so black and white. Python is an interpreted language but it keeps compiled versions of what you write so that ti can be run faster next time (.pyc files)
14:25:13 <maerwald> writing fast python code is definitely possible, but requires crazy knowledge of the internals
14:25:30 <maerwald> And the code afterwards isn't really intuitive stuff
14:25:38 <n0042> Similarly, GHCi seems to pre-compile files that you load with `:l` even though it interprets what you write into the REPL
14:26:05 hseg joins (~gesh@IGLD-84-228-238-117.inter.net.il)
14:26:10 <merijn> n0042: It compiles to bytecode, not full compilation
14:26:21 <merijn> n0042: (which it also does for what you write in the REPL)
14:26:26 <n0042> That makes sense
14:26:28 c0c0 joins (~coco@212-51-146-87.fiber7.init7.net)
14:26:37 <honigkuchen> you all always compare haskell always with python, but I never told that I use python most, and I do
14:27:05 <merijn> honigkuchen: It's one of the most common languages (together with JS), but I don't know JS :p
14:27:06 <maerwald> https://github.com/pkgcore/pkgcore is an example of a non-trivial optimised python application
14:27:25 <maerwald> so yes, you can do large projects in python too
14:27:56 <maerwald> but requires much more discipline
14:28:01 <tdammers> something being possible at all in a language is hardly an interesting metric, because pretty much anything can be done in any general-purpose language if you're thick-headed enough
14:28:05 f-a joins (~f-a@151.68.209.164)
14:28:05 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
14:28:15 <maerwald> tdammers: aren't we? =)
14:28:28 <honigkuchen> is there a reason that specifically fits to quicksort, why haskell is here "better" or whatsoever
14:28:42 <tdammers> haskell isn't better at implementing quicksort
14:28:50 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
14:28:51 <maerwald> honigkuchen: https://augustss.blogspot.com/2007/08/quicksort-in-haskell-quicksort-is.html
14:29:07 <tdammers> the famous "quicksort but not quite actually" example is used to demonstrate the elegance of the language
14:29:16 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
14:29:22 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
14:30:05 supercoven joins (~Supercove@196.244.192.58)
14:30:06 × supercoven quits (~Supercove@196.244.192.58) (Max SendQ exceeded)
14:30:20 <n0042> merijn: The I/O difficulties I've been having are mostly just getting the hang of the syntax. I've been doing some assignments in Haskell that require using arrays, and the difference in syntax between ones that have to be treated like Monad-like objects and ones that don't is kind of a learning curve.
14:30:20 supercoven joins (~Supercove@196.244.192.58)
14:30:21 × supercoven quits (~Supercove@196.244.192.58) (Max SendQ exceeded)
14:30:35 supercoven joins (~Supercove@196.244.192.58)
14:30:36 × supercoven quits (~Supercove@196.244.192.58) (Max SendQ exceeded)
14:30:50 supercoven joins (~Supercove@196.244.192.58)
14:30:51 × supercoven quits (~Supercove@196.244.192.58) (Max SendQ exceeded)
14:30:52 <n0042> I've been messing with immutable arrays, mutable arrays, and vectors to make my stuff meet the speed requirements (which are contrived and strict)
14:31:05 supercoven joins (~Supercove@196.244.192.58)
14:31:06 × supercoven quits (~Supercove@196.244.192.58) (Max SendQ exceeded)
14:31:08 <merijn> n0042: ah, yeah, that can be a bit tricky
14:31:11 <n0042> And it has been pretty fun. Haskell is a really fun language. Glad I took the plunge
14:31:52 <honigkuchen> can it make sense to combine python and haskell in one program ?
14:32:03 f-a parts (~f-a@151.68.209.164) ()
14:32:32 <maerwald> python is used in GHC for the tests :p
14:32:35 <maerwald> does that count?
14:32:36 <n0042> Python is a great "glue" language (I use it for stuff instead of Bash all the time). So I could see myself writing a program in Haskell and then calling it from within a Python script.
14:32:52 <merijn> n0042: tbh, I now consider Haskell a much better glue language :p
14:33:05 <LKoen> honigkuchen: https://github.com/jacquev6/Polyglot
14:33:09 <merijn> n0042: It's incredibly easy to call C code from Haskell
14:33:35 <tdammers> merijn: until that C code isn't reentrant, or takes callbacks, or involves variadic arguments
14:33:45 <LKoen> I once run into someone's code who used a makefile written in R, with code in C, C++, R and python
14:33:46 <merijn> tdammers: Yeah, but that's difficult in C too :p
14:33:48 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
14:33:58 <merijn> tdammers: tbh, even the callback one is easy
14:34:06 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-tripsbcbodayyxwv) (Quit: Connection closed for inactivity)
14:34:25 <merijn> Lack of reentrancy is hard, but also problematic in C and variadic arguments can't be used portably anyway, even within C :)
14:34:59 <merijn> tdammers: So at worst it's "no harder than using C from C" :p
14:35:09 <merijn> (which can, admittedly, be pretty hard)
14:35:45 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds)
14:35:47 <n0042> I love the way `readFile` works in Haskell. That's got to be the easiest way to do that ever.
14:35:48 <honigkuchen> lol
14:35:52 <merijn> tdammers: Anyway, I was mostly comparing to, say, the insanity of the FFI of python, Java, etc. which are much more convoluted and painful to use
14:36:01 <tdammers> no argument there :D
14:36:09 <merijn> n0042: Using the one from Prelude that returns String?
14:36:15 <n0042> Yeah
14:36:38 ski . o O ( "Modelling Large Datasets Using Algebraic Datatypes: A Case Study of the CONFMAN Database" by Markus Mottl in 2002-05-15 at <http://www.ofai.at/cgi-bin/get-tr?paper=oefai-tr-2002-27.pdf> )
14:37:01 <merijn> n0042: Might wanna use Text for reading textual data: https://hackage.haskell.org/package/text-1.2.4.0/docs/Data-Text-IO.html#v:readFile
14:37:04 <gentauro> geekosaur: do you have a multiscreen setup with XMonad?
14:37:12 <merijn> (since you said performance matters)
14:37:19 <gentauro> more specifically, daisy chaining?
14:37:49 ski . o O ( "Using Algebraic Datatypes as Uniform Representation for Structured Data" by Markus Mottl in 2003-03-07 at <http://www.ofai.at/cgi-bin/get-tr?paper=oefai-tr-2003-07.pdf>,<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.5712> )
14:37:50 <n0042> merijn: Thank you very much
14:38:10 <tdammers> also, there's the caveat that readFile does lazy I/O, and that means the actual reading may happen at surprising times
14:39:07 <tdammers> e.g.: do { str <- readFile "foo"; unlink "foo"; putStrLn str } -- this may crash due to trying to read from a deleted file
14:39:09 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
14:39:13 × darjeeling_ quits (~darjeelin@122.245.219.209) (Ping timeout: 256 seconds)
14:39:21 <Boomerang_> I hear Data.Text.IO is not good if you care about locales
14:39:26 <Boomerang_> https://www.snoyman.com/series/haskell-bad-parts
14:42:27 <gentauro> tdammers: where do you delete the file? `unlink`?
14:42:32 <tdammers> yeah
14:42:53 <tdammers> although I believe on a typical (Linux) filesystem, you have to actually truncate it for that to crash
14:43:46 × chrpape quits (~user@2a01:4f9:c010:632d::1) (Quit: ERC (IRC client for Emacs 25.2.2))
14:43:56 × Nahra quits (~Nahra@unaffiliated/nahra) (Ping timeout: 240 seconds)
14:44:09 <n0042> Thanks Boomerang. Lots of information in that article.
14:44:32 <n0042> I wasn't aware of some of the pitfalls of `readFile`
14:44:59 <gentauro> tdammers: I recall me doing this -> `readFileStrict f = LBS.readFile f >>= \bs -> LBS.length bs `seq` pure bs` :'(
14:45:20 <gentauro> a strict version cos Linux complained about having to many files open
14:46:03 <merijn> tdammers: Text one doesn't do lazy IO
14:46:05 <gentauro> tdammers: how do you write `seq` in do-nation?
14:46:09 <tdammers> gentauro: why not just LBS.fromStrict <$> BS.readFile f
14:46:21 <tdammers> tdammers: lazy text one does I think
14:46:44 <merijn> Boomerang_: eh, that's wrong
14:46:51 chrpape joins (~user@2a01:4f9:c010:632d::1)
14:46:55 <merijn> Boomerang_: readFile works fine if your locale isn't broken
14:47:23 <merijn> Boomerang_: readFileUtf8, etc. are dumb hacks that are broken on machines that are setup correctly
14:47:31 <tdammers> readFile does the correct thing: decode raw bytes into Unicode as per the current locale
14:47:42 <gentauro> tdammers: I don't think I have a `strict` ByteString
14:47:46 <gentauro> LBS is `lazy`
14:47:50 <merijn> Boomerang_: They're basically "ignore the local specified encoding and always use utf8", which is bad and anyone doing that should feel bad >.>
14:48:00 <tdammers> gentauro: yes, but you can read a strict bytestring and convert it to lazy
14:48:02 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 264 seconds)
14:48:04 <gentauro> «fromStrict :: ByteString -> ByteStringO(1) Convert a strict ByteString into a lazy ByteString.»
14:48:09 <merijn> n0042: ^^ see above :)
14:48:21 <gentauro> tdammers: oh, got it
14:48:32 <merijn> gentauro: lazy bytestring is, effectively, just [Strict.ByteString] :p
14:49:01 <merijn> (i.e. a lazy list of strict chunks)
14:49:06 <tdammers> it's slightly more clever than [ByteString], but yeah, essentially that
14:49:13 <gentauro> merijn: yeah, I got that
14:49:23 <n0042> Luckily I'm only using it to read predictable input right now, so it works pretty well.
14:49:50 <tdammers> anyway, the problem with readFile and locales is when people assume that any file they might possibly want to read from is encoded according to the current locale
14:50:05 <tdammers> which is of course often wrong, but just assuming UTF8 isn't any better
14:50:11 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
14:50:30 hackage haskell-xmpp 2.0.0 - Haskell XMPP (eXtensible Message Passing Protocol, a.k.a. Jabber) library https://hackage.haskell.org/package/haskell-xmpp-2.0.0 (Jappie)
14:50:33 <gentauro> tdammers: the only way to be 100% is to read the hole file
14:50:35 <merijn> tdammers: Also, people who have badly configured machines with broken locales complaining that they're broken and "fixing" it by breaking it for everyone who *does* have a properly configured locale >.>
14:51:01 <Boomerang_> merijn: I guess it depends on the use case but I think more often I would rather it reported an error if it's not UTF-8 than do something weird instead
14:51:18 <merijn> Boomerang_: It doesn't do anything weird, though
14:51:36 <merijn> Boomerang_: It literallys asks the environment "what is the environment encoding?" and then uses that
14:52:03 <merijn> Boomerang_: If you want explicit control over decoding you can either 1) override the encoding for a handle or 2) read a ByteString and explicitly decode it
14:52:19 darjeeling_ joins (~darjeelin@122.245.217.23)
14:52:20 <tdammers> indeed
14:53:24 <tdammers> readFileUtf8 is the correct thing to use when you know that the input is UTF8 even when the locale is not
14:53:36 <tdammers> but otherwise, readFile does exactly the right thing
14:55:24 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
14:55:53 <hseg> trying to work through the unifications behind (.) (.) (.)'s type. iirc there was an interactive tool that showed unifications
14:55:59 <hseg> can't find it though
14:56:24 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
14:56:34 <merijn> isn't that tool just called Cale and/or ski ;)
14:56:41 <hseg> :)
14:56:56 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 240 seconds)
14:57:26 ski grins
14:58:11 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
15:00:13 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
15:01:20 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz)
15:03:30 pjb joins (~t@2a01cb04063ec50095ae1a5ec1ef6a7a.ipv6.abo.wanadoo.fr)
15:04:22 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
15:05:17 <hseg> nm -- this case is most easily understood as fmap.fmap
15:07:39 <ski> it's easy to derive the `(.) . (.)' formulation
15:07:55 <merijn> hmm, suppose I have mapping from Foo to Bar that requires "Foo -> IO Bar" to lookup, is there some convenient way to memoize that into a Map so repeated lookups only run the IO once?
15:08:57 <ski> hm, something like `Ord k => (k -> IO v) -> IO (k -> IO v)' ?
15:09:26 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
15:11:16 <merijn> ski: Something along those lines
15:13:57 <ski> @wiki Top level mutable state#Proposal 4: Shared on-demand IO actions .28oneShots.29
15:13:57 <lambdabot> https://wiki.haskell.org/Top_level_mutable_state#Proposal_4:_Shared_on-demand_IO_actions_.28oneShots.29
15:14:00 <ski> @wiki Global keys
15:14:00 <lambdabot> https://wiki.haskell.org/Global_keys
15:14:02 × knupfer quits (~Thunderbi@200116b82ca965000d9a6def15a910ad.dip.versatel-1u1.de) (Remote host closed the connection)
15:14:18 knupfer joins (~Thunderbi@200116b82ca9650045472097ac301af6.dip.versatel-1u1.de)
15:15:36 <merijn> Those are more ideas than implementation, afaict?
15:16:16 × trcc quits (~trcc@users-1190.st.net.au.dk) (Ping timeout: 240 seconds)
15:16:16 <ski> yes
15:16:24 <xe4> I don't see a difference in these toJSON instances: https://gist.github.com/xe-4/27c685e6d22e05251c1a653fec791926 will someone talk to when you might one over the other?
15:16:44 <xe4> I meant to say "when you might want one over the other"
15:18:10 <siraben> How can I check if something is a substring of a lazy bytestring?
15:18:19 <siraben> There's no `isInfixOf` for Data.ByteString.Lazy
15:19:15 <kuribas> merijn: put the Map in an IORef?
15:19:28 <merijn> kuribas: But I don't have a Map
15:19:39 <kuribas> merijn: put an empty Map in the IORef?
15:19:42 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
15:20:17 <merijn> I can wrap an IORef with a Map, but I was hoping someone would've already done the work for me of writing that logic :p
15:20:48 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
15:20:49 <kuribas> or better, use lazy IO and implement: Ord k => (k -> IO v) -> IO (k -> v)
15:21:14 <kuribas> as long as you know the v is determined by k
15:22:43 st8less joins (~st8less@2603:a060:11fd:0:e465:6770:e76d:da2a)
15:22:56 <kuribas> merijn: I don't know if it exists, but at least it doesn't sound hard to implement.
15:23:07 Aquazi joins (uid312403@gateway/web/irccloud.com/x-zpyuyhhkgrlryaog)
15:23:19 <siraben> isInfixOf is even commented out in the lazy bytestring source code
15:23:20 <siraben> hmm
15:23:32 <siraben> Is there no way to do it except convert it to strict then run isInfixOf?
15:24:14 <geekosaur> not easily. consider what happens when it crosses chunks. then what happens when it crosses multiple chunks
15:24:47 <geekosaur> you basically end up making it strict anyway just to avoid all the corner cases
15:25:35 <siraben> Ah, right.
15:26:15 <honigkuchen> one of my ex professors was always very enthustiastic about haskell but in a further lecture he proposes that there is a new star at the functional programming languages heaven
15:26:23 <honigkuchen> what might he had proposed
15:26:44 <honigkuchen> it is already around 6 years past
15:27:12 PacoV joins (~pcoves@16.194.31.93.rev.sfr.net)
15:27:17 <PacoV> o/
15:29:01 derek_gorczyn joins (~derek_gor@96-81-221-14-static.hfc.comcastbusiness.net)
15:29:27 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz)
15:29:49 <honigkuchen> something similar neat complex like haskell to can be entusiastic about
15:29:55 × czwartyeon quits (~czwartyeo@77-45-55-99.sta.asta-net.com.pl) (Quit: WeeChat 3.0)
15:30:06 <honigkuchen> I can not remember
15:30:08 <Ferdirand> honigkuchen: Idris maybe ?
15:30:31 <honigkuchen> that could it be
15:30:47 <honigkuchen> very difficult for me to remember
15:30:56 <honigkuchen> he only named it
15:31:03 <Ferdirand> or Agda ?
15:31:09 <geekosaur> there are a number of languages that can be considered inspired by haskell, each going its own direction with some concept or group of concepts
15:31:39 × kuribas quits (~user@ptr-25vy0iacghmhtu8v1sd.18120a2.ip6.access.telenet.be) (Read error: Connection reset by peer)
15:31:51 <PacoV> Hey, I've a coupe of questions if you have the time. I've this package https://gitlab.com/pcoves/hakyll-contrib-i18n that build just fine with stack but fail miserably with cabal telling it can't find dependencies suchs as pandoc-types. What's up with that? Also, how does one push documentation to hackage?
15:32:30 hackage haskell-xmpp 2.0.1 - Haskell XMPP (eXtensible Message Passing Protocol, a.k.a. Jabber) library https://hackage.haskell.org/package/haskell-xmpp-2.0.1 (Jappie)
15:32:35 <merijn> PacoV: Can you pastebin the exact error?
15:33:27 <honigkuchen> what is cool or better or interesting about Agda or Idris
15:33:39 <honigkuchen> and when is haskell better
15:33:53 <hekkaidekapus> @hackage stack2cabal -- PacoV
15:33:53 <lambdabot> https://hackage.haskell.org/package/stack2cabal -- PacoV
15:34:08 adm joins (~adm@43.229.88.197)
15:35:10 <geekosaur> honigkuchen, they're both dependently typed. which means they can handle more things than haskell, but you have to carry more proofs around in your programs
15:35:23 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
15:35:40 <honigkuchen> what is dependently typing
15:36:19 <PacoV> merijn: http://ix.io/2Frk
15:36:43 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
15:36:43 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Client Quit)
15:36:50 adm joins (~adm@43.229.88.197)
15:36:58 <merijn> PacoV: What version of cabal-install?
15:37:26 __monty__ joins (~toonn@unaffiliated/toonn)
15:37:37 <PacoV> merijn: 3.2.0.0-108
15:37:53 × toorevitimirp quits (~tooreviti@117.182.183.18) (Remote host closed the connection)
15:38:03 <PacoV> hekkaidekapus: I'll have a look, thanks!
15:38:05 <merijn> hmm, weird
15:38:16 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
15:39:04 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
15:39:07 <merijn> PacoV: Basically, for some reason it seems to think it *has* to use pandoc-types version (1.22), but another dependency (pandoc-include-code) doesn't support that version
15:39:08 <geekosaur> honigkuchen, where a type depends on a value. but now you have to carry around a proof that a value conforms to the type it's being used at
15:39:29 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
15:39:41 <maerwald> honigkuchen: F* wasn't around back then I think
15:39:41 <geekosaur> (consider a subset type, for example integers less than 20, for a simple example)
15:39:56 <maerwald> that's the only one I can think of with enough focus and purpose to take off
15:40:04 <maerwald> in... 10 yeahs
15:40:14 <honigkuchen> does anyone know a good page that explains that broader? or I just google for it
15:40:25 <hekkaidekapus> PacoV: `cd yourProjectTopDir; cabal install stack2cabal; stack2cabal; cabal build`
15:40:37 <PacoV> merijn: if pandoc-include-code depends on pandoc-types
15:40:49 <PacoV> I can remove the later as an explicit dependency.
15:41:37 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
15:41:43 <merijn> PacoV: Yes, but pandoc-include-code depends on pandoc-types>=1.20 && <=1.20)
15:41:46 <merijn> (see the error)
15:41:59 adm joins (~adm@43.229.88.197)
15:42:04 <merijn> And for some reason it forces the use of the installed pandoc-types which is 1.22
15:42:05 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
15:42:38 adm joins (~adm@43.229.88.197)
15:42:57 <PacoV> Well, I can't even `cabal install` anything.
15:43:07 <PacoV> But it works with `stack install`.
15:43:19 <PacoV> Guess I f*cked up somehow.
15:44:19 <merijn> PacoV: oh...
15:44:28 <merijn> did you run "cabal install pandoc-types"?
15:44:29 <hekkaidekapus> maerwald: Without me looking far, would know what is this about? `user error (expected ResolverRef instead of tag:yaml.org,2002:map tagged mapping)`
15:44:38 <PacoV> Nop.
15:44:42 <PacoV> Will do.
15:44:48 <merijn> PacoV: No, don't :p
15:45:12 <merijn> That's what I was gonna try and fix, but if you didn't then I dunno where it's getting pandoc-types from
15:45:56 <maerwald> hekkaidekapus: what fails, stack2cabal?
15:46:22 <PacoV> stack2cabal: user error (expected ResolverRef instead of tag:yaml.org,2002:map tagged mapping)
15:46:25 <maerwald> where's the stack,yaml?
15:46:25 <PacoV> Hum.
15:46:49 × n0042 quits (d055ed89@208.85.237.137) (Remote host closed the connection)
15:46:51 <maerwald> the pantry syntax is excessive, so it's hard to cover everything
15:46:55 <PacoV> https://gitlab.com/pcoves/hakyll-contrib-i18n/-/blob/master/stack.yaml
15:47:02 <hekkaidekapus> Yeah, see above the chain of commands I suggested to PacoV. The project is at <https://gitlab.com/pcoves/hakyll-contrib-i18n>
15:47:13 <PacoV> hekkaidekapus: I've the same error.
15:47:36 <hekkaidekapus> I know, I was using your project. ;)
15:47:52 <hekkaidekapus> And maerwald is the maintainer of stack2cabal.
15:47:56 <maerwald> yep, I can reproduce
15:47:59 <hyperisco> if I have two prisms, how can I turn those into a traversal?
15:48:14 <PacoV> Ho, ok, sorry.
15:48:20 <maerwald> resolver: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml
15:48:21 <glguy> hyperisco: with .
15:48:22 <maerwald> this fixed it
15:48:33 <maerwald> but there's another error
15:48:40 <siraben> Is there a variant of `simpleHttp` that automatically retries? I'm sending web requests concurrently but don't want the whole thing to stop because a single thread failed
15:48:53 <hyperisco> glguy, I don't want one prism after the other, I want both in parallel
15:49:33 <hyperisco> if I have a prism for the 1st value and 2nd value, I want a traversal over the 1st and 2nd values
15:49:43 <hyperisco> I don't want a prism from the 1st value into the 2nd value of the 1st value
15:49:56 <maerwald> hekkaidekapus: https://github.com/hasufell/stack2cabal/issues/26
15:50:07 <maerwald> I think it needs some adjustments to support that snapshot file
15:50:12 <hyperisco> or I want something other than a traversal that does this sort of thing
15:50:34 <maerwald> hekkaidekapus: the parser is here https://github.com/hasufell/stack2cabal/blob/master/lib/StackageToHackage/Stackage/YAML.hs
15:50:47 <glguy> hyperisco: you just want to traverse the structure twice then?
15:50:55 <hyperisco> no
15:51:03 <hyperisco> I have two prisms
15:51:10 <hyperisco> both are from X to Y
15:51:43 <hyperisco> okay lets put it this way… I have some lens to get deep into the structure
15:51:47 <maerwald> hekkaidekapus: shouldn't be hard
15:51:48 <PacoV> I made a clean install (deleted the ~/.cabal dir also) of cabal-install.
15:51:55 <hyperisco> now I have two prisms, there are two ways to go, I want to traverse over both ways
15:52:00 <hyperisco> I don't want to get deep into the structure twice
15:52:11 <PacoV> I can `cabal update` but can't `cabal install stack2cabal` either.
15:52:16 <glguy> Prisms degrade to traversals, so we can just forget that they are prisms
15:52:41 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
15:52:44 <glguy> You can combine them in any way other than to run one after the other
15:52:51 <hyperisco> that isn't what I want oO
15:52:55 <glguy> Can't*
15:53:27 <merijn> PacoV: Which os/distro?
15:53:37 <glguy> If 'failing' does what you want you can use it
15:53:40 <merijn> PacoV: What does "ghc-pkg list" show?
15:53:41 <PacoV> Arch.
15:53:45 <merijn> oof
15:53:54 <PacoV> It gives me a shit tonne of warnings!
15:53:56 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 240 seconds)
15:54:03 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
15:54:06 <merijn> PacoV: Did you, by any chance install any packages via Arch's package manager?
15:54:07 <hyperisco> I think we're talking past each other because I am using profunctor lenses
15:54:13 <PacoV> Yep.
15:54:17 <merijn> PacoV: RIP
15:54:35 <PacoV> Ho, no big deal, I'll remove them.
15:54:42 <glguy> hyperisco: the issues would be the same except they don't degrade automatically
15:54:45 <merijn> PacoV: The Arch wiki should have a page on how to "unfuck" things :)
15:54:46 <PacoV> Mainly pandoc.
15:55:01 <PacoV> Haha, we all need this because of reasons.
15:55:08 <hyperisco> if you compose two prisms you absolutely do not get what I am describing
15:55:08 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
15:55:10 <hyperisco> I point back to my example
15:55:13 <PacoV> I'll give i a try.
15:55:21 <merijn> PacoV: Arch's Haskell packages have a...tendency to render your Haskell install unusable (if you ever get it working to begin with)
15:55:22 <glguy> hyperisco: yeah I know,
15:55:30 <hekkaidekapus> maerwald: Noted, thanks.
15:55:40 conal joins (~conal@64.71.133.70)
15:55:44 <merijn> PacoV: I believe there's several Arch wiki pages on the topic
15:56:10 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
15:56:14 × conal quits (~conal@64.71.133.70) (Client Quit)
15:56:15 <maerwald> hekkaidekapus: https://github.com/hasufell/stack2cabal/blob/e6fae40d913ed67363671fb7238e74afedd78ffc/lib/StackageToHackage/Stackage/YAML.hs#L87 needs another alternative for the syntax from the 20.yaml
15:56:16 <glguy> Hyper for the parallel behavior look at whatever failing got turned into in this other library
15:56:18 <merijn> PacoV: So, I believe the problem you have is the following: Arch's package manager is installing pandoc-types-1.22 into a global database forcing cabal-install to use it
15:56:37 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
15:56:44 <maerwald> hekkaidekapus: it's quite unfortunate how conflated packages and deps in stack.yaml is
15:56:48 <merijn> PacoV: But your other dependencies don't support pandoc-types-1.22 yet, so cabal-install is going "well, I can't find compatible versions of your dependencies!" (hence the error)
15:56:48 <glguy> Failing assumes the two are disjoint
15:57:18 <hyperisco> oh now this is feeling like I asked this 1-2 years ago
15:57:34 <merijn> PacoV: If the systemwide pandoc-types install is gone cabal-install should simply pick an older (supported) pandoc-types
15:57:44 <PacoV> I removed every bit of (easy to find) haskell packages and removed both ~/.cabal and ~/.stack.
15:57:53 <hyperisco> and I think then I just decided it was too complicated to bother and went back to explicit recursion lol
15:58:23 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
15:58:39 invaser joins (~Thunderbi@31.148.23.125)
15:58:45 conal joins (~conal@64.71.133.70)
15:59:01 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 264 seconds)
15:59:02 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
15:59:56 <PacoV> http://ix.io/2Frq
15:59:59 <PacoV> Fail.
16:00:13 bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net)
16:00:13 <PacoV> On `cabal install stack2cabal`.
16:01:03 <geekosaur> now that looks like arch doing its thing
16:01:30 <maerwald> PacoV: there sre static binaries: https://github.com/hasufell/stack2cabal/releases/tag/v1.0.12
16:01:33 <geekosaur> tbh you should just jettison all haskell related pakages including ghc, then use ghcup to install a working ghc
16:01:41 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
16:02:01 hackage reflex-monad-auth 0.1.0.0 - Utilities to split reflex app to authorized and not authorized contexts https://hackage.haskell.org/package/reflex-monad-auth-0.1.0.0 (NCrashed)
16:02:44 <maerwald> PacoV: I'm not a fan of distributing binaries via hackage, but the original mainainer put it up there. The repo itself uses a freeze file.
16:02:48 aenesidemus joins (~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net)
16:03:01 hackage reflex-monad-auth 0.1.0.1 - Utilities to split reflex app to authorized and not authorized contexts https://hackage.haskell.org/package/reflex-monad-auth-0.1.0.1 (NCrashed)
16:04:16 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
16:04:26 <honigkuchen> are the "new" c++ concepts that enhance templating or whatsoever a form of dependently typing?
16:05:14 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
16:05:22 <siraben> http://ix.io/2Frs If any of the requests fail then `mapConcurrently` will fail, what should I do instead?
16:05:25 <siraben> I'm using `simpleHttp` to get the contents
16:05:55 <merijn> siraben: Well what do you wanna do on failure?
16:06:06 <siraben> merijn: Retry
16:06:15 <siraben> So I'd have to catch an IO exception?
16:06:35 <merijn> siraben: https://hackage.haskell.org/package/broadcast-chan-0.2.1.1/docs/BroadcastChan.html#v:parMapM_ :p
16:06:56 × adm quits (~adm@43.229.88.197) (Ping timeout: 240 seconds)
16:08:22 <PacoV> Looks like I need a better packages purge.
16:08:26 <PacoV> BRB
16:09:25 <geekosaur> either that or install ghc-static so at least the base package and relatives aren't broken but better is t just get a working ghc and core libraries from somewhere other than the arch repo
16:09:40 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
16:09:56 <siraben> merijn: should I not use simpleHttp then, since it returns IO ByteString.Lazy?
16:10:18 <merijn> siraben: That's easily solved with toStrict + evaluate ;)
16:11:02 <merijn> siraben: There's a conduit wrapper to stream request into too, btw
16:11:10 <honigkuchen> how is it that a dependently typed language can handle more than a not dependently typed one
16:13:06 <PacoV> WTF Could not find module ‘Prelude’ ?
16:13:30 adm joins (~adm@43.229.88.197)
16:13:40 <merijn> PacoV: That's usual if your GHC is installed via Arch packages
16:13:49 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
16:14:03 fg joins (5fa448e7@95.164.72.231)
16:14:26 <merijn> Because the Arch package installs a GHC with a broken default config...on purpose...yay
16:14:27 fg is now known as Guest22285
16:14:54 <PacoV> I listed every single package installed on my system (haskell ones are prefixed with `haskell-` on arch), filtered them and remove all the `haskell-*` then installed `cabal-install`.
16:15:11 <maerwald> merijn: arch is starting to be more annoying than the macOS PATH issues :p
16:15:14 <PacoV> Ho, ok, you're telling me not to install cabal-install using pacman.
16:15:39 <PacoV> I'll give ghcup a try.
16:15:54 <merijn> maerwald: I mean, the macOS PATH issue is at least defensible, since those are indeed not standard PATH locations
16:16:33 <merijn> If Arch insists on shipping a dynamic GHC, could they not at least set it to link dynamic by default? >.>
16:17:18 × aenesidemus quits (~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Quit: Leaving)
16:18:48 × hseg quits (~gesh@IGLD-84-228-238-117.inter.net.il) (Ping timeout: 256 seconds)
16:23:27 Stanley00 joins (~stanley00@unaffiliated/stanley00)
16:23:35 <PacoV> Looks like ghcup is doing the trick.
16:23:41 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
16:24:08 jollygood2 joins (~bc8165ab@217.29.117.252)
16:24:19 <ski> @type let memoIO :: Ord k => (k -> IO v) -> IO (k -> IO v); memoIO f = do ref <- Data.IORef.newIORef M.empty; return (\k -> do map <- Data.IORef.readIORef ref; case M.lookup k map of Just v -> return v; Nothing -> do v <- f k; Data.IORef.writeIORef ref (M.insert k v map); return v) in memoIO
16:24:21 <lambdabot> Ord k => (k -> IO v) -> IO (k -> IO v)
16:24:30 ClaudiusMaximus joins (~claude@198.123.199.146.dyn.plus.net)
16:24:34 <ski> @type let memoIO :: Ord k => (k -> IO v) -> IO (k -> IO v); memoIO f = do ref <- Data.IORef.newIORef M.empty; return (\k -> mfix (\v -> maybe (f k) return =<< Data.IORef.atomicModifyIORef ref (\map -> case M.lookup k map of Just v -> (map,Just v); Nothing -> (M.insert k v map,Nothing)))) in memoIO
16:24:36 <lambdabot> Ord k => (k -> IO v) -> IO (k -> IO v)
16:24:38 × ClaudiusMaximus quits (~claude@198.123.199.146.dyn.plus.net) (Changing host)
16:24:38 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
16:24:46 <ski> @type let memoIO :: Ord k => (k -> IO v) -> IO (k -> IO v); memoIO f = do ref <- Data.IORef.newIORef M.empty; return (\k -> mfix (\v -> maybe (f k) return =<< Data.IORef.atomicModifyIORef ref (swap . M.insertLookupWithKey (\_ _ v -> v) k v))) in memoIO
16:24:48 <lambdabot> Ord k => (k -> IO v) -> IO (k -> IO v)
16:24:54 <ski> @type let memoIO :: Ord k => (k -> IO v) -> IO (k -> IO v); memoIO f = do ref <- Data.IORef.newIORef M.empty; return (\k -> do v <- System.IO.Unsafe.unsafeInterleaveIO (f k); Data.IORef.atomicModifyIORef ref (\map -> case M.lookup k map of Just v -> (map,v); Nothing -> (M.insert k v map,v))) in memoIO
16:24:56 <lambdabot> Ord k => (k -> IO v) -> IO (k -> IO v)
16:25:00 gproto23 joins (~gproto23@unaffiliated/gproto23)
16:25:04 <ski> @type let memoIO :: Ord k => (k -> IO v) -> IO (k -> IO v); memoIO f = do ref <- Data.IORef.newIORef M.empty; return (\k -> do v <- System.IO.Unsafe.unsafeInterleaveIO (f k); fromMaybe v <$> Data.IORef.atomicModifyIORef ref (swap . M.insertLookupWithKey (\_ _ v -> v) k v)) in memoIO
16:25:05 <lambdabot> Ord k => (k -> IO v) -> IO (k -> IO v)
16:25:10 <jollygood2> hi. I asked the other day, but I didn't keep logs. I need to make a simple personal website, and I want to explore FRP. what library do you recommend?
16:25:27 <PacoV> jollygood2: Hakyll?
16:26:12 <ski> merijn,kuribas : i don't really see how to do `Ord k => (k -> IO v) -> IO (k -> v)' (e.g. with `unsafeInterleaveIO'), without also passing a collection of valid `k's
16:27:18 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
16:27:26 <PacoV> ghcup actually allowed me to install stack2cabal.
16:27:39 <jollygood2> PacoV thanks, I'll take a look
16:27:45 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
16:27:46 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 246 seconds)
16:27:55 <PacoV> But the later failed to process my package as we expected.
16:28:09 <maerwald> PacoV: yes, I posted above what needs to be adjusted
16:28:13 × thc202 quits (~thc202@unaffiliated/thc202) (Quit: thc202)
16:28:55 <PacoV> jollygood2: And if you plan on writting on multiple languages, I published https://hackage.haskell.org/package/hakyll-contrib-i18n yesterday :-)
16:29:03 <maerwald> PacoV: https://github.com/hasufell/stack2cabal/blob/master/lib/StackageToHackage/Stackage/YAML.hs both the packages and the resolver parser need another alternative
16:29:26 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
16:30:12 <PacoV> maerwald: I guess I'm too new to understand the meaning of this :-/
16:30:22 <maerwald> it's just a yaml parser
16:30:30 <PacoV> But cabal actually builds my package right now.
16:30:39 <PacoV> So I might not need anything else.
16:30:44 × alp quits (~alp@2a01:e0a:58b:4920:c9e7:a101:608d:5391) (Ping timeout: 240 seconds)
16:30:51 <maerwald> stack.yaml follows some weird "pantry" thing, which has so many ways to express the same thing that I can't keep up
16:31:00 thc202 joins (~thc202@unaffiliated/thc202)
16:31:18 <PacoV> It's okay. I mean, I'd gladly get rid of the stack part if possible.
16:31:25 <maerwald> the line between package and dependency is also completely blurred
16:31:43 <ski> @hoogle (a -> IO b) -> IO (a -> b)
16:31:44 <lambdabot> No results found
16:32:18 <PacoV> Well, it'll take time. I'll walk the dog in the mean time.
16:32:25 × sdx23 quits (~sdx23@unaffiliated/sdx23) (Ping timeout: 240 seconds)
16:33:59 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
16:35:10 × Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 256 seconds)
16:35:12 <ski> @type let unsafeInterleaveIOResult :: (a -> IO b) -> IO (a -> b); unsafeInterleaveIOResult f = return (System.IO.Unsafe.unsafePerformIO . f) in unsafeInterleaveIOResult -- perhaps something like this could be used, assuming `NOINLINE',&c. precautions
16:35:14 <lambdabot> (a -> IO b) -> IO (a -> b)
16:35:32 Lycurgus joins (~niemand@98.4.114.74)
16:35:44 × son0p quits (~son0p@181.136.122.143) (Ping timeout: 256 seconds)
16:37:13 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
16:37:14 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
16:38:19 Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk)
16:38:39 andos joins (~dan@69-165-210-185.cable.teksavvy.com)
16:40:17 <maerwald> what's a safe way to convert Integer to Word64
16:40:59 × derek_gorczyn quits (~derek_gor@96-81-221-14-static.hfc.comcastbusiness.net) (Quit: Leaving)
16:41:10 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
16:41:19 × Guest22285 quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
16:41:42 vicfred joins (~vicfred@unaffiliated/vicfred)
16:41:54 jamm_ joins (~jamm@unaffiliated/jamm)
16:42:09 Sheilong joins (uid293653@gateway/web/irccloud.com/x-bojsghgzllzoprwv)
16:42:12 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
16:43:25 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 264 seconds)
16:43:51 × knupfer quits (~Thunderbi@200116b82ca9650045472097ac301af6.dip.versatel-1u1.de) (Remote host closed the connection)
16:43:59 knupfer1 joins (~Thunderbi@200116b82ca96500dc7bf53810219cf9.dip.versatel-1u1.de)
16:44:41 jonatanb_ joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
16:45:11 kritzefitz joins (~kritzefit@212.86.56.80)
16:45:54 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
16:46:16 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
16:46:22 knupfer1 is now known as knupfer
16:46:37 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
16:46:41 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
16:47:07 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
16:47:23 jamm_ joins (~jamm@unaffiliated/jamm)
16:51:49 × Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 264 seconds)
16:51:56 × jonatanb_ quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
16:52:06 <ProofTechnique> @maerwald `fromIntegral`?
16:52:06 <lambdabot> Unknown command, try @list
16:52:43 <tdammers> define "safe"
16:53:14 <maerwald> 1. memory safe 2. doesn't truncate randomly or do other crap when the Integer is out of range
16:53:23 <maerwald> so a Maybe is ok too
16:54:00 × tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) ()
16:54:53 × Lycurgus quits (~niemand@98.4.114.74) (Quit: Exeunt)
16:58:46 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
16:59:04 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
17:00:21 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
17:00:25 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
17:02:20 conal joins (~conal@64.71.133.70)
17:02:31 <PacoV> \o/ Yeah, cabal build succeeded.
17:04:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
17:04:49 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
17:06:49 irc_user joins (uid423822@gateway/web/irccloud.com/x-gwxffkrhmbtyeyhx)
17:07:58 <xsperry> maerwald toIntegralSized
17:08:47 [exa] smashes bookmark button
17:09:02 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
17:10:18 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
17:11:37 × chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
17:12:03 kish` joins (~oracle@unaffiliated/oracle)
17:12:06 <[exa]> xsperry: hmmm.. isn't the check in the toIntegralSized docs example wrong? here https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-Bits.html#v:toIntegralSized
17:12:16 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
17:13:00 × ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
17:13:38 <[exa]> (the comparison there does basically `toInteger x == toInteger x` does that make sense? I would understand if there would be `x == fromInteger y` instead)
17:14:02 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
17:15:41 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
17:16:36 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-sigyjgyywexrisfj)
17:17:37 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 264 seconds)
17:18:28 <ProofTechnique> I expect the second `toInteger` to be at a different specialized type. The real implementation is _a read_, though
17:18:45 <ProofTechnique> Otherwise yeah, maybe just a typo
17:19:32 invaser joins (~Thunderbi@31.148.23.125)
17:20:02 <ProofTechnique> Oh, yeah, the actual implementation says `y = fromIntegral x`, so maybe that's a typo in the docs
17:22:35 conal joins (~conal@64.71.133.70)
17:24:02 × pmikkelsen quits (~pmikkelse@vps1.pmikkelsen.com) (Read error: Connection reset by peer)
17:25:29 × mpereira quits (~mpereira@2a02:810d:f40:d96:f587:a442:5e3:1e55) (Ping timeout: 272 seconds)
17:26:45 f-a joins (~f-a@151.34.188.246)
17:27:07 × SanchayanMaity quits (~Sanchayan@171.76.82.54) (Quit: SanchayanMaity)
17:27:28 <[exa]> oh my, I'd report it but ghc gitlab is giving me http500 on auth
17:28:30 × mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Quit: Leaving)
17:28:59 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
17:30:11 cyphase joins (~cyphase@unaffiliated/cyphase)
17:31:44 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
17:31:54 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:32:28 matta joins (~user@24-113-169-116.wavecable.com)
17:33:03 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
17:34:10 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
17:36:24 <erisco> is there anything to be said for Profunctor & Category because I think liftA2 (.) is how I want to compose optics
17:36:55 <ezzieyguywuf> what do y'all use for regular expressions in haskell?
17:37:15 <[exa]> erisco: you saw prolens package right?
17:37:24 <erisco> maybe
17:37:37 <geekosaur> parsing instead of regular expressions, generally
17:38:35 <[exa]> erisco: not sure about liftA2 (.) but I guess it will give easier than Control.Lens
17:39:04 <erisco> I am using profunctor lenses
17:39:09 <[exa]> ah ok
17:39:16 f-a parts (~f-a@151.34.188.246) ()
17:39:27 <ezzieyguywuf> geekosaur: I knew someone would say that.
17:39:49 <erisco> But I keep wanting to do things it seems Profunctor and friends cannot
17:40:38 <[exa]> anyway what would be the semantics of the lifted (.) ?
17:41:04 <erisco> basically, once you're at a point in a structure, you want to split and do two things, then bring the results back together
17:41:46 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
17:41:46 <erisco> (.) isn't precisely that but it suffices
17:42:52 <matta> Newbie question! I am setting up Haskell on macOS. haskell.org/platform recommends I use ghcup to install ghc and cabal, then use haskellstack.org to install stack. But it looks like stack then installs yet another ghc (but not another cabal, which it largely duplicates?). I don't relish this apparent duplication of fucnctionality, especially the possible screwups I could get myself into with two compiler installations. As a newbie who
17:42:52 <matta> wants to keep things as simple for myself as possible, should I just wipe everything and only install stack?
17:43:07 <[exa]> erisco: so, say "process all items from a list but take `lens1` from the first and `lens2` from the second" ?
17:43:13 <[exa]> s/second/tail
17:43:47 alp joins (~alp@2a01:e0a:58b:4920:1ce3:597b:e8f0:d72c)
17:43:50 <erisco> say I have a prism for element 1 and other for element 2
17:43:56 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
17:44:01 hackage hakyll-contrib-i18n 0.1.1.0 - A Hakyll library for internationalization. https://hackage.haskell.org/package/hakyll-contrib-i18n-0.1.1.0 (pcoves)
17:44:02 <[exa]> matta: I'd advise for going without stack first, it's a brutal tool
17:44:30 <[exa]> matta: unless you need it to support an IDE that requires stack ofc
17:44:39 <erisco> I mean lens for 1 and 2... then I should be able to have both 1 and 2
17:44:40 <sm[m]> oh come on
17:45:04 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
17:46:04 <erisco> So I'm suggesting liftA2 (.) which does 1 then 2 in sequence
17:47:05 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
17:47:25 <matta> [exa]: great, so long as vanilla ghc/cabal won't be teaching me things that are widely deprecated I'm happy to start with them.
17:47:49 <erisco> but I don't know if there is a better formulation... is Profunctor & Category really a thing?
17:48:16 <koz_> Category implies Profunctor.
17:48:29 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds)
17:48:30 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
17:48:31 <koz_> (you can implement dimap using Category's first and second)
17:48:48 Er joins (5fa448e7@95.164.72.231)
17:48:59 <erisco> Category doesn't have first and second
17:49:36 <koz_> Sorry, I was confusing Arrow.
17:49:41 <[exa]> matta: certainly not, stack is not "more advanced", it's just for more complicated&problematic setups. I'm using just normal ghc+cabal
17:49:47 <koz_> Basically, Profunctor + Category = Arrow, more or less.
17:49:50 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:49:52 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
17:50:00 <erisco> if the conclusion is "that's just Arrow" then I dunno
17:50:03 <koz_> (I should not reply so soon after waking lol)
17:50:22 <koz_> Well, Arrow is _a_ solution sure.
17:50:29 <merijn> matta: https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07
17:50:52 <erisco> I am not any expert on the aesthetics/objectives of optics
17:50:56 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 272 seconds)
17:51:15 <[exa]> matta: also, for simple beginner-level programs it's usually sufficient to have ghci working, then load a file with :l, reload with :r, and test stuff by hand
17:51:26 × whald quits (~trem@2a02:810a:8100:11a6:7427:ad4:8a1e:146d) (Remote host closed the connection)
17:51:29 <erisco> so I don't know if I am just throwing a wrench in
17:51:41 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
17:52:09 <[exa]> erisco: can you show an example of how would you like to use that? I'm still thinking it's just some kind of (reverse) traversal
17:52:29 gxt joins (~gxt@gateway/tor-sasl/gxt)
17:52:48 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
17:53:58 devalot parts (~ident@mail.pmade.com) ("ERC (IRC client for Emacs 27.1)")
17:54:12 <erisco> say I want to increment the first two numbers in a list, then if I can prism the first and prism the second ther ought to be an optic that does them both
17:54:23 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
17:54:40 Tario joins (~Tario@200.119.185.161)
17:54:49 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:56:03 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
17:56:46 <matta> merijn: great gist, thanks.
17:57:35 erisco_ joins (~erisco@208.98.222.65)
17:57:50 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: Ping timeout (120 seconds))
17:58:36 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
17:59:01 <monochrom> Heh stack goes way beyond the batteries-included principle.
17:59:17 × matta quits (~user@24-113-169-116.wavecable.com) (Remote host closed the connection)
17:59:24 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
18:00:07 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
18:00:36 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Ping timeout: 240 seconds)
18:00:39 <koz_> monochrom: Yeah, because it's 'undocumented nuclear batteries included, with mind-changing reserved for us'.
18:01:11 matta joins (~user@24-113-169-116.wavecable.com)
18:01:33 geekosaur would have put it as "power plant included and rebuilt according to our whim on the fly"
18:02:36 <monochrom> Well, I was going for a "walled garden" wording.
18:04:30 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
18:04:49 <matta> I guess since I'm just typing oneliners into ghci at the moment, stack is overkill. ;-)
18:05:57 <monochrom> I think people have accepted "real devs have 64-core 1TB-RAM 1Gbps-internet", they won't notice or mind frequent rebuilds and redownloads.
18:06:42 <monochrom> But devs are still divided on walled garden vs liberal wilderness.
18:07:24 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 272 seconds)
18:07:39 <dolio> The stuff that comes with GHC is probably sufficient for lots of learning. You don't need any package management.
18:07:51 <dolio> At least, it was when I was learning. Package managers didn't exist.
18:08:25 <monochrom> Yeah, I was there when cabal didn't exist, too.
18:08:25 × Tario quits (~Tario@200.119.185.161) (Read error: Connection reset by peer)
18:08:38 <monochrom> Even after cabal existed, for a while I ran Setup.hs by hand.
18:08:44 × caecilius quits (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) (Quit: leaving)
18:08:57 caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net)
18:09:02 <maerwald> monochrom: if I clone my work project and try to build it with stack, I have to wait 30 minutes just for the git repos to be fetched :)m
18:09:05 × caecilius quits (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) (Client Quit)
18:09:22 caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net)
18:09:38 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
18:09:50 <maerwald> https://github.com/commercialhaskell/stack/issues/5411
18:10:08 <maerwald> so yes, devs don't consider ram or my old cable under the house
18:10:18 <monochrom> I think people simply take advantage of https://xkcd.com/303/
18:11:04 <maerwald> either that or I'm waiting between 1-2 hours for CI to fail
18:11:07 <monochrom> oh haha, that one is a bit extreme though, "clone as many times as there are subdirs"
18:11:12 <maerwald> yep
18:11:21 <maerwald> nix does the same
18:11:26 <maerwald> only cabal doesn't
18:12:20 <monochrom> This is why devs should be confined to 10-inch netbooks, and unplugged. (Still remember "netbooks"?)
18:12:20 × erisco_ quits (~erisco@208.98.222.65) (Read error: Connection reset by peer)
18:12:35 geekosaur is using one, tyvm
18:12:38 × cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 256 seconds)
18:12:52 <geekosaur> (and waiting for it to run out of swap space…)
18:12:53 Tario joins (~Tario@200.119.185.161)
18:12:54 <monochrom> (and on 802.11b wifi)
18:13:18 <hyperisco> [exa], did that make any sense?
18:13:28 <maerwald> or we could establish programmer licenses... I mean, doctors also have those and they also can lose them
18:13:30 <maerwald> right?
18:13:32 Jeanne-Kamikaze joins (~Jeanne-Ka@66.115.189.157)
18:13:45 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
18:13:49 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
18:14:02 cyphase joins (~cyphase@unaffiliated/cyphase)
18:14:03 erisco joins (~erisco@d192-186-117-226.static.comm.cgocable.net)
18:14:43 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
18:15:01 <monochrom> Confine devs to the one-laptop-per-child laptop, and its intended usage environment: slow or non-existent internet access, and electricity comes from a solar panel. This will teach devs to respect accessibility and the value of all those "analyze the running time of these algorithms" courses.
18:15:03 coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
18:15:10 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
18:15:37 n0042 joins (d055ed89@208.85.237.137)
18:16:51 avdb joins (~avdb@ip-81-11-215-86.dsl.scarlet.be)
18:16:55 christo joins (~chris@81.96.113.213)
18:17:03 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
18:17:25 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
18:17:26 <maerwald> I think bugs aren't embarrassing these days anymore, because everything is rolling release and agile. If you messed up multiple releaes in a row in the earlier tarball-ftp days, ppl would raise an eyebrow.
18:17:45 <monochrom> like I said last week: perpetual beta
18:19:22 <PacoV> Thanks all!
18:19:24 × PacoV quits (~pcoves@16.194.31.93.rev.sfr.net) (Quit: leaving)
18:19:34 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
18:20:47 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds)
18:20:54 <[exa]> hyperisco: yeah I had to afk... So basically we want something that combines 2 prisms into a traversal? (or another prism-traversal?)
18:21:00 <hyperisco> > let (^>) = liftA2 (.) in (_1 ^> _2 .~ 3) ("hello","sailor!")
18:21:02 <lambdabot> error:
18:21:03 <lambdabot> • Couldn't match type ‘[Char]’ with ‘([Char], b)’
18:21:03 <lambdabot> arising from a functional dependency between:
18:21:30 <hyperisco> well I don't know how things work with this sort of optics
18:21:51 × alp quits (~alp@2a01:e0a:58b:4920:1ce3:597b:e8f0:d72c) (Ping timeout: 272 seconds)
18:22:28 <hyperisco> I question whether it makes sense as a traversal, I don't see how
18:22:34 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Quit: WeeChat 2.8)
18:22:59 <hyperisco> but anyways, the result of that was (3, 3)
18:23:25 <monochrom> Do you have to use lenses and prisms?
18:23:57 <hyperisco> why wouldn't I
18:24:08 <monochrom> just checking
18:24:26 <hyperisco> I could choose not to use optics at all but I am trying to get some benefit from them
18:24:45 <dolio> I didn't read super closely, but it seemed to me that the problem with your example is that it relied on very specific knowledge of what your optics do that does not apply to all optics of the same type.
18:24:47 <solonarv> > ("hello", "sailor") & (_1 <> _2) .~ 3
18:24:49 <lambdabot> error:
18:24:49 <lambdabot> • No instance for (Num [Char]) arising from the literal ‘3’
18:24:49 <lambdabot> • In the second argument of ‘(.~)’, namely ‘3’
18:25:06 <solonarv> huh, that got closer then I expected
18:25:14 <solonarv> > ("hello", "sailor") & (_1 <> _2) .~ "huh"
18:25:17 <lambdabot> ("huhhello","sailorhuh")
18:25:37 <solonarv> well that's definitely not right.
18:25:53 <dolio> So, like, just because the example would make sense doesn't mean that there must be a function to combine two optics in this way in general.
18:26:39 <hyperisco> not sure what you mean by "must"… I mean "ought" in that it seems obvious from a pragmatic point of view
18:26:47 Neuromancer is now known as BugzOOO
18:28:03 <dolio> The examples that don't make sense might prevent there from being such a function, unless you can narrow the types involved down to only the ones that do make sense.
18:28:41 <hyperisco> I haven't checked against the laws
18:29:06 <hyperisco> they seem rather immaterial to me
18:29:38 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
18:30:10 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
18:30:45 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
18:30:59 <solonarv> it's definitely going to be unsound because it'll produce nonsense when you give it overlapping optics
18:31:16 <solonarv> but that doesn't mean such a function can't exist, of course
18:32:09 × Er quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
18:33:07 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Read error: Connection reset by peer)
18:33:25 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
18:33:56 <hyperisco> I would guess it probably is lawful
18:34:20 <hyperisco> but I am uncomfortable talking about laws on type synonyms
18:34:23 × Iceland_jack quits (~user@31.124.48.169) (Ping timeout: 256 seconds)
18:35:36 slack1256 joins (~slack1256@190.162.160.23)
18:35:39 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
18:36:12 francesco_ joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
18:36:15 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Read error: Connection reset by peer)
18:37:24 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
18:37:46 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
18:37:50 adm joins (~adm@43.229.88.197)
18:38:53 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:38:58 <slack1256> Apart from shell scripting, what is the way to determine which package exports certain module?
18:39:08 francesco_ is now known as Franciman
18:39:17 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:39:29 <dminuoso> slack1256: hoogle?
18:39:49 <dminuoso> It's not ideal because hoogle by default only looks at some stackage resolver
18:39:56 <dminuoso> And it varies between package versions
18:40:11 <jle`> stackage maybe (stoogle), if it's on stackage
18:40:11 <slack1256> dminuoso: You're golden, thanks.
18:40:20 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
18:41:09 × grumble quits (~Thunderbi@freenode/staff/grumble) (Quit: CHANGE MY MIND: Excel is a functional programming language)
18:41:56 × adm quits (~adm@43.229.88.197) (Ping timeout: 240 seconds)
18:42:06 <koz_> stoogle?
18:42:07 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
18:42:14 <solonarv> suppose I have 'jt = thatFunction _Just _Just' and I run 'toListOf jt (Just 3 & jt %~ succ)', I'll get [5,5]; this isn't the same as 'succ <$> (toListOf jt (Just 3'))', which is [4,4]
18:42:24 <jle`> stoogle is what i call stackage hoogle :)
18:42:52 <solonarv> the lens laws aren't formulated in terms of toListOf but still this should clearly show that 'jt' isn't a well-behaved (i.e. lawful) optic
18:43:28 grumble joins (~Thunderbi@freenode/staff/grumble)
18:43:42 <jle`> what is thatFunction ?
18:44:01 × chaosmasttter quits (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
18:44:05 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
18:44:22 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
18:45:08 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
18:45:37 <monochrom> slack1256: "ghc-pkg find-module" can do it for what you have installed.
18:45:47 p0a joins (~user@unaffiliated/p0a)
18:46:12 <p0a> Hello given a list of numbers such as [1,2] I'd like to generate [[1,2], [-1,2], [1,-2], [-1,-2]], all possible sign permutations
18:46:51 <p0a> I had some sort of zipWith idea in mind, and I vaguelly recall that the monadic implementation of [] is not unique, and I need the other one, not the standard one
18:46:59 <slack1256> monochrom: Magic.
18:47:03 <slack1256> Thanks monochrom.
18:47:04 <monochrom> If you add --package-db=$HOME/.cabal/store/ghc-<version>/package.db , it looks there.
18:47:13 bergey` joins (~user@107.181.19.30)
18:47:24 <jle`> > mapM (\x -> [x,-x]) [1,2]
18:47:26 <lambdabot> [[1,2],[1,-2],[-1,2],[-1,-2]]
18:47:38 <jle`> not sure if that's helpful though :)
18:47:55 <p0a> nice! thank youl jle` that will do
18:48:12 <jle`> fwiw the Monad instance of List is unique-ish, but the Applicative is where you have other options
18:48:25 <jle`> > traverse (\x -> [x,-x]) [1,2]
18:48:27 <lambdabot> [[1,2],[1,-2],[-1,2],[-1,-2]]
18:48:27 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
18:48:31 <jle`> > traverse (\x -> ZipList [x,-x]) [1,2]
18:48:34 <lambdabot> ZipList {getZipList = [[1,2],[-1,-2]]}
18:48:43 <p0a> ah thank you.I think ZipList is the one I had on mind
18:48:55 Iceland_jack joins (~user@31.124.48.169)
18:48:55 × Tario quits (~Tario@200.119.185.161) (Read error: Connection reset by peer)
18:50:02 × bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
18:50:15 <jle`> trying to think of a more readable way to do it but i'm drawing a blank
18:50:56 <p0a> jle`: Well, what's the pointfree version of your lambda? :P
18:50:59 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
18:51:03 <p0a> That will make it more readable... :)
18:51:28 <jle`> heh, maybe a step in the opposite direction :P
18:52:37 × borne quits (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
18:53:22 alp joins (~alp@2a01:e0a:58b:4920:1429:542f:b729:d210)
18:55:09 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:55:53 × avdb quits (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Quit: avdb)
18:56:52 <hyperisco> solonarv, I think the formulation is necessary to consider in its exact form
18:57:04 pavonia joins (~user@unaffiliated/siracusa)
18:57:11 <hyperisco> it may be that combining Setters in that way doesn't give you another Setter or something, I don't know
18:57:16 <hyperisco> there are different types of optics
18:57:29 Tario joins (~Tario@200.119.185.161)
18:58:01 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
18:58:26 × p0a quits (~user@unaffiliated/p0a) (Quit: bye)
18:58:41 <solonarv> hyperisco: if you don't want to use the result as a setter then you can just use the Semigroup instance to combine them
18:58:58 sondr3 joins (~sondr3@cm-84.211.56.132.getinternet.no)
18:58:59 <hyperisco> I am using a semigroupoid
18:59:10 <hyperisco> I think your example shows the semigroup is not quite right
18:59:20 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
18:59:23 <solonarv> no, I literally mean: ("hello", "sailor") ^.. (_1 <> _2)
18:59:37 <solonarv> my example shows that you don't get a sensible Setter by combining with <>
18:59:40 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
18:59:44 <solonarv> but the resulting Fold does work properly
18:59:53 × n0042 quits (d055ed89@208.85.237.137) (Remote host closed the connection)
19:00:02 <hyperisco> I don't know about folds
19:00:10 <hyperisco> my example was replacing both fst and snd with a value
19:00:18 <solonarv> yeah, that's a Setter
19:00:28 <hyperisco> sounds like you disagree though
19:00:43 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
19:01:17 <hyperisco> and I am guessing it does violate specifically Setter laws
19:01:38 Ariakenom_ joins (~Ariakenom@h-158-174-186-195.NA.cust.bahnhof.se)
19:02:51 borne joins (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de)
19:03:34 berberman_ joins (~berberman@unaffiliated/berberman)
19:03:58 <hyperisco> seems this all falls apart because the machinery for working with optics doesn't have semigroupoid/category instances
19:04:14 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds)
19:04:58 × Tario quits (~Tario@200.119.185.161) (Read error: Connection reset by peer)
19:05:04 × Ariakenom quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
19:05:29 <hyperisco> I dunno it just seems weird that it sounds like the purpose is to do stuff with deep data structures, yet every time I try and use it it ends up seemingly very inefficient
19:05:41 <hyperisco> I don't get it yet
19:05:45 × DTZUZU quits (~DTZUZU@207.81.171.116) (Read error: Connection reset by peer)
19:06:01 coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
19:08:02 chaosmasttter joins (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de)
19:10:36 × Rudd0 quits (~Rudd0@185.189.115.98) (Ping timeout: 240 seconds)
19:10:40 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
19:10:59 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit)
19:11:18 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
19:11:59 × dequbed quits (~dequbed@yanduxian.paranoidlabs.org) (Quit: Bye o/)
19:14:57 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
19:15:17 dequbed joins (~dequbed@yanduxian.paranoidlabs.org)
19:15:40 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
19:16:25 DTZUZU joins (~DTZUZU@207.81.171.116)
19:16:31 × irc_user quits (uid423822@gateway/web/irccloud.com/x-gwxffkrhmbtyeyhx) (Quit: Connection closed for inactivity)
19:18:35 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 256 seconds)
19:19:14 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
19:21:38 frdg joins (~nick@pool-71-184-143-249.bstnma.fios.verizon.net)
19:23:26 <ezzieyguywuf> if I have `char 'L'; digitChar; digitChar; digitChar` as part of a megaparsec parser, how can I make the error message say something like "Expecting Lnnn" for a failure on any of the four checks, rather than "Expecting an 'L'", "Expecting a digit" etc. for each?
19:24:12 <jle`> ezzieyguywuf: does it work if you wrap it and use (...) <?> "Expecting Lnnn" ?
19:25:09 <ezzieyguywuf> jle`: yes, thanks! though just "<?> "Lnn"" gets it done, megaparsec adds the "Expecting"
19:25:15 <jle`> nice :O
19:25:25 <jle`> good ol megaparsec
19:25:35 <sondr3> I'm back with yet another parsing question, I want to parse a line that can either end with a newline or EOF, but `takeWhileP Nothing notNewline <> eol <|> T.pack <$> someTill anySingle eof` always fail if the input doesn't contain a newline
19:25:45 × matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 240 seconds)
19:25:51 <ezzieyguywuf> good ol that guy
19:26:12 × revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 260 seconds)
19:26:15 <sondr3> I would've expected it to try the second parser when the first failed since it wants to end with `<> eol`
19:26:49 revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net)
19:27:25 <monochrom> I would think you would have (eol <|> eof) grouped together?
19:27:30 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 256 seconds)
19:28:00 <jle`> yeah, i definitely do not know how that is supposed to be parsed
19:28:19 <jle`> the haskell syntax i mean, not the parser it denotes
19:28:23 <xerox_> that was in Parsec too
19:29:45 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
19:29:56 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
19:30:02 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:30:13 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
19:30:33 <sondr3> monochrom: eof returns `m ()`, and I want to include the newline but only if it exists. I feel like I'm just missing something obvious
19:30:47 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
19:30:50 <sondr3> So that both `text` and `text\n` are valid
19:31:02 <jle`> sondr3: where are you expecting the parentheses to be in that?
19:31:03 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 256 seconds)
19:31:16 <jle`> (takeWhileP Nothing notNewline) <> (eol <|> T.pack <$> someTill anySingle eof) ?
19:31:28 Er joins (5fa448e7@95.164.72.231)
19:31:53 <jle`> or (takeWhileP Nothing notNewline <> eol) <|> (T.pack <$> someTill anySingle eof)
19:32:00 <monochrom> ((eol *> pure ()) <|> eof)
19:32:15 <jle`> aka void eol
19:34:05 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds)
19:34:27 <sondr3> But I don't want void eol, I want void eof but include eol :p
19:34:32 <monochrom> ((eol *> pure "\n") <|> eof *> pure "") for the opposite expectation.
19:34:59 <monochrom> err, ((eol *> pure "\n") <|> (eof *> pure ""))
19:35:51 avdb joins (~avdb@ip-81-11-215-86.dsl.scarlet.be)
19:36:44 <sondr3> monochrom: thanks, the final one was exactly what I wanted
19:36:47 <monochrom> I hope you have learned a lesson there. That you can always edit and manufacture return values, you are never stuck with what someone returns to you.
19:37:29 <sondr3> I was about to comment on exactly that, very obvious in hindsight but I've been to focused on only what I can parse
19:37:46 <sondr3> thanks jle` too :)
19:38:35 Nahra joins (~Nahra@unaffiliated/nahra)
19:39:08 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Quit: cosimone)
19:40:13 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
19:40:14 skiold joins (~skiold@ns378912.ip-5-196-69.eu)
19:42:38 <dminuoso> solonarv: So I'm not really sure what the semantics of (<>) on the various optics even are.
19:43:12 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
19:43:21 <dminuoso> I usually tend to look at optics since its far more constrained and principled, and there you have
19:43:26 <dminuoso> failing :: (Is k A_Fold, Is l A_Fold) => Optic' k is s a -> Optic' l js s a -> Fold s a
19:43:36 howdoi joins (uid224@gateway/web/irccloud.com/x-koaluaessvhmdatb)
19:43:54 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:43:54 <dminuoso> This little fact suggests that mappending traversals together can be wonky
19:44:41 <dminuoso> or wait.. failing is not the right one
19:44:48 <dminuoso> summing :: (Is k A_Fold, Is l A_Fold) => Optic' k is s a -> Optic' l js s a -> Fold s a
19:44:50 <dminuoso> That's the one
19:45:21 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
19:46:02 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
19:46:34 <dminuoso> solonarv: At the very least for the documentation of `failing` on lens its suggested that its only lawful on disjoint traversals, Im guessing the same holds true for (<>)
19:47:12 <ezzieyguywuf> hrm, another megaparsec question: is there a more concise way of doing `a <- digitChar; char ':'; b <- digitChar; pure (pack [a, ':', b'])`?
19:48:28 <dminuoso> pack <$> traverse [digitChar, char ':', digitChar]
19:48:30 <merijn> ezzieyguywuf: "a <- digitChar <* char ':'; b <- digitChar" is one way
19:48:32 <dminuoso> err
19:48:37 <dminuoso> pack <$> sequence [digitChar, char ':', digitChar]
19:48:46 <merijn> ah, that's better
19:49:06 christo joins (~chris@81.96.113.213)
19:49:10 <ezzieyguywuf> ooooh, nice use of sequence there
19:49:19 × skiold quits (~skiold@ns378912.ip-5-196-69.eu) (Quit: WeeChat 2.3)
19:49:38 × raichoo quits (~raichoo@dslb-178-001-144-016.178.001.pools.vodafone-ip.de) (Quit: Lost terminal)
19:49:52 × avdb quits (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Quit: avdb)
19:50:11 avdb joins (~avdb@ip-81-11-215-86.dsl.scarlet.be)
19:50:20 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
19:52:00 <koz_> :t sequence
19:52:02 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
19:52:06 <koz_> Ah, so sequenceA.
19:52:18 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
19:52:40 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
19:53:43 × christo quits (~chris@81.96.113.213) (Ping timeout: 256 seconds)
19:53:54 <frdg> I purchased a vps service but I do not have enough ram on the VPS to compile my program with stack. The problem with making binaries is that my OS is openSUSE but the VPS is centos. What are my options?
19:54:08 skiold joins (~skiold@ns378912.ip-5-196-69.eu)
19:54:09 <dminuoso> frdg: Building inside a docker container
19:54:21 <sm[m]> frdg: temporarily increase the size of your vps
19:54:23 <merijn> frdg: Download VirtualBox, install centos in VM, build there, copy binary to VPS
19:54:27 <ezzieyguywuf> hrm, "Couldn't match type 'Char' with [Char]"
19:54:50 <frdg> ok many options
19:54:53 <dminuoso> frdg: If you build inside alpine, you can statically link it and then extract the build artifact out of the container
19:55:05 <dminuoso> that decouples you from any particular system
19:55:11 <sm[m]> frdg: try to configure stack/cabal/ghc to build in less ram
19:55:14 <dminuoso> haha
19:55:17 <dminuoso> that's a good one
19:55:20 <merijn> sm[m]: Pointless
19:55:20 <sm[m]> frdg: configure enough swap on your vps, and let it run overnight
19:55:34 <merijn> sm[m]: GHC just doesn't really work with less than 1-2GB
19:55:44 <merijn> A super cheap VPS will have 256-512 MB or something
19:55:45 <sm[m]> you can influence it
19:56:02 <frdg> ok I think I am going to start with building from a VM.
19:56:05 <sm[m]> we don't know how much frdg has, they might be close to success. And they asked for options
19:56:07 <dminuoso> sm[m]: its a fairly lost cause
19:56:09 <merijn> Yeah, but why bother? No reason to have GHC on the machine just because you plan to run it there
19:56:16 <dminuoso> you add one wrong line of code, and things blow up
19:56:20 <dminuoso> just because megaparsec
19:56:38 <sm[m]> you're assuming a lot. Sometimes the nearby fix is the cheapest and best
19:56:47 <dminuoso> sm[m]: No Im talking from experience
19:56:47 <sm[m]> I've said my piece
19:56:54 christo joins (~chris@81.96.113.213)
19:57:10 <dminuoso> I have a 70 LoC parser that takes about 30 seconds for a single module and memory goes to crazy
19:57:23 <dminuoso> for no reason other than megaparsec having inline on almost everything
19:57:39 <dminuoso> best part of it is
19:57:51 <merijn> It doesn't help performance? :p
19:57:52 <dminuoso> I have this `asum [ ... ]` and if I slightly modify that list, it gets exponentially worse
19:57:56 <int-e> dminuoso: But... how big is that single module?
19:58:00 <dminuoso> int-e: 70 LoC.
19:58:07 × alp quits (~alp@2a01:e0a:58b:4920:1429:542f:b729:d210) (Ping timeout: 272 seconds)
19:58:14 <int-e> ...
19:58:26 <dminuoso> oh
19:58:28 <int-e> dminuoso: You mean the compiler takes 30 seconds to compile the module?
19:58:31 <dminuoso> Yes
19:58:49 <int-e> Fun.
19:59:14 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
19:59:15 <dminuoso> It's fairly simple, nothing fancy. Just rudimentary megaparsec usage
19:59:25 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771)
19:59:28 <dminuoso> I debugged ghc a bit, filed a bug report. But it's just their overuse of inline
19:59:46 <merijn> dminuoso: But INLINE makes things fast!
19:59:51 <int-e> Right, overuse of inlining would've been my first guess.
19:59:55 conal joins (~conal@64.71.133.70)
19:59:58 <int-e> Then, exploding types.
20:00:14 <merijn> I love when people make annotations for "performance" without benchmarks
20:00:30 hackage migrant-core 0.1.0.0 - Semi-automatic database schema migrations https://hackage.haskell.org/package/migrant-core-0.1.0.0 (TobiasDammers)
20:00:58 × skiold quits (~skiold@ns378912.ip-5-196-69.eu) (Quit: WeeChat 2.3)
20:01:07 <int-e> compilation is a one time cost, right?
20:01:10 int-e runs.
20:01:14 <dminuoso> Result size of Simplifier iteration=1 = {terms: 4,972,599,types: 7,677,397,coercions: 516,358,joins: 146,810/146,811}
20:01:22 <maerwald> int-e: hahaha
20:01:23 <dminuoso> That's straight out of a minimalistic testcase
20:01:24 <merijn> int-e: In my case I had someone mark all of my foreign imports as unsafe
20:01:30 hackage migrant-sqlite-simple 0.1.0.0, migrant-postgresql-simple 0.1.0.0, migrant-hdbc 0.1.0.0 (TobiasDammers)
20:01:41 <merijn> int-e: Because "unsafe foreign imports are faster, so you should use those by default"
20:01:43 <monochrom> https://xkcd.com/303/ applies again. Today is "compiling" day.
20:01:57 <koz_> dminuoso: Wat.
20:01:59 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
20:02:00 <int-e> merijn: I think I was there for a previous discussion of that incident
20:02:11 <dminuoso> koz_: https://gitlab.haskell.org/ghc/ghc/-/issues/17370
20:02:13 <dminuoso> :>
20:02:14 <merijn> int-e: On foreign calls that were all outside of the critical path and were mostly syscalls >.>
20:02:25 skiold joins (~skiold@ns378912.ip-5-196-69.eu)
20:02:29 × fendor_ quits (~fendor@178.165.131.166.wireless.dyn.drei.com) (Remote host closed the connection)
20:02:31 <merijn> int-e: Could be, I get sad every time I'm reminded :p
20:02:40 × skiold quits (~skiold@ns378912.ip-5-196-69.eu) (Client Quit)
20:02:46 <int-e> fortunately, system calls never block
20:03:09 <dminuoso> until they do
20:03:18 <monochrom> Let's up the game. System calls are faster if the caller is in ring 0, too.
20:03:19 <int-e> it's true for gettimeofday, and I'm generalizing from there
20:03:31 <dminuoso> I know of at least one syscall that blocks
20:03:33 skiold joins (~skiold@ns378912.ip-5-196-69.eu)
20:03:47 × skiold quits (~skiold@ns378912.ip-5-196-69.eu) (Client Quit)
20:03:49 <int-e> dminuoso: sleep?
20:03:53 <dminuoso> ioctl
20:03:59 skiold joins (~skiold@ns378912.ip-5-196-69.eu)
20:04:10 <int-e> (which is probably implemented using select I guess)
20:04:29 <dminuoso> (well ioctl *can* block, depending on which ioctl you invoke)
20:04:35 <int-e> I think the list will be shorter if we list system calls that don't block
20:04:38 × skiold quits (~skiold@ns378912.ip-5-196-69.eu) (Client Quit)
20:05:31 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
20:06:03 <frdg> when you initially compile a program from scratch will stack use more ram then it would when you later make small changes to the application?
20:06:33 <dminuoso> yes. no. perhaps
20:06:46 <int-e> frdg: I don't know. ghc tends to use less RAM when it (re-)compiles fewer modules
20:06:51 <monochrom> Most likely yes. Because the first time it builds aeson, the second time it doesn't, for example.
20:06:51 <dminuoso> frdg: It doesnt really matter at the end. GHC has no parallel module compilatoin
20:07:19 <ezzieyguywuf> is there a generalized "concat", i.e. something that would do `foldl (<>) "" ["A", "B", "C"]`
20:07:22 <frdg> ok thanks
20:07:43 <int-e> dminuoso: Yes it does, because everybody uses ghc --make and GHC has internal caches that are not flushed between module compilations.
20:07:54 <int-e> (everybody except ghc's own build system, incidentally)
20:08:11 skiold joins (~skiold@gateway/tor-sasl/skiold)
20:08:12 <dminuoso> oh
20:08:18 <geekosaur> mconcat?
20:08:36 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 240 seconds)
20:08:51 <geekosaur> or sconcat if it's a Semigroup
20:09:18 <dminuoso> int-e: well, recently Ive been annoyed by all the caching. There's subtle bugs in either cabal or ghc, I almost weekly have an issue where I have to nuke dist-newstyle before compilation can succeed
20:10:03 <merijn> dminuoso: You must be doing *something* I haven't encountered that in years
20:10:05 × avdb quits (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Quit: avdb)
20:10:07 <int-e> Hmm. I'm still on v1 sandboxes... but I tend to nuke those a lot too.
20:10:09 × wonko7 quits (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52) (Ping timeout: 272 seconds)
20:10:18 <merijn> int-e: ... why? o.O
20:10:21 <monochrom> "Please wash your hands and run 'cabal clean' often." >:)
20:10:24 <dminuoso> merijn: I think its either this particular cabal or ghc version
20:10:28 <dminuoso> or combination
20:10:30 <ezzieyguywuf> geekosaur: I think one of those may be what I'm looking for thanks.
20:10:33 <int-e> merijn: why not?
20:11:03 <monochrom> Heh, I don't push everyone to go v2, I was a bit reluctant too.
20:11:08 <int-e> They work, they have a neat cleanup story, and I'm used to them.
20:11:17 <merijn> because v2-build is so much more robust and reliable >.> It already was years ago >.>
20:11:18 <sclv> i've certainly noticed that when i use nix to swap out entire package envs then the cached stuff goes stale on v1
20:11:25 <int-e> Well I'll be forced to switch eventually.
20:11:28 f-a joins (~f-a@151.34.188.246)
20:11:44 <sclv> because the hashing relies on version numbers and the like, so if i'm swapping between different local versions of deps it gets confused
20:11:46 <int-e> But this channel should understand the desire to not do so eagerly :P
20:12:15 Tario joins (~Tario@200.119.185.214)
20:12:18 <int-e> If you want a rational reason: The later I switch the more well-rounded the v2 commands will be.
20:12:33 f-a parts (~f-a@151.34.188.246) ()
20:12:48 <sclv> this is for $WORK$ which is pervasively nixified so i stick to v1
20:13:02 <sclv> for personal dev i use v2 and its pretty damn seamless at this point
20:13:07 <merijn> I switched to v2-build in 2016 or something, breaking all my editor tooling (like hdevtools in the progress) because it was less painful than fighting v1 >.>
20:13:10 <sclv> given that i sort of know what stuff doesn't work
20:13:38 treotmnor joins (~treotmnor@8.210.183.149)
20:13:55 <int-e> merijn: that's the thing though... ever since I switched to using sandboxes I never had to fight
20:14:26 <merijn> int-e: I had to reinit sandboxes *a lot*, though
20:14:31 <merijn> Because that's what I used before
20:14:36 <int-e> sure.
20:14:37 alp joins (~alp@2a01:e0a:58b:4920:3dd7:733:8dcb:bbbc)
20:14:44 <int-e> I have a shell script for that
20:14:53 Ariakenom__ joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
20:14:53 <merijn> If dependencies are in flux nuking and rebuilding the world every time is a *massive* time sync
20:15:06 <geekosaur> "sink"
20:15:08 <int-e> sink
20:15:29 <merijn> I got stuff to do that doesn't involve waiting for the kmettiverse to compile for the 15th time
20:15:43 <int-e> merijn: also, honestly, I don't really have big projects
20:15:53 <merijn> geekosaur: Fixing my brain to no output a random homophone when I type is a lost cause :p
20:15:56 <monochrom> If dependencies are in flux, v2 rebuilds enough of the world to be a time sink, too.
20:16:07 <merijn> monochrom: Depends of how much
20:16:16 <int-e> make all the dependencies that are in flux source dependencies :P
20:16:21 <merijn> monochrom: Like, adding 1 or 2 packages won't rebuild the entire kmettiverse :p
20:16:41 <koz_> merijn: Lol@'kmettiverse'. The Kmett Extended Universe.
20:16:52 <merijn> Actually
20:17:10 <monochrom> Well I should get out of this debate.
20:17:12 <merijn> Maybe we should start calling it the KCU Kmett Cinematic Universe or something :p
20:17:21 <koz_> I'm down for KCU.
20:17:31 <koz_> Avengers: Rise of the Profunctor.
20:17:56 <monochrom> I was going to say, the disease of the lot of you is debating until other people do things your way. This is already the second time within an hour, even half an hour.
20:18:05 <monochrom> Today is compiling day and bikeshedding day.
20:18:20 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Ping timeout: 260 seconds)
20:18:34 <merijn> monochrom: It *is* compiling day, that's why I have nothing better to do :p
20:18:36 <monochrom> Kmett Categorical Universe
20:18:43 <merijn> monochrom: Rats
20:18:48 <monochrom> Oh haha good cause
20:18:48 × Ariakenom_ quits (~Ariakenom@h-158-174-186-195.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
20:19:03 <merijn> monochrom: I spent 5 minutes pondering better a better word for C and somehow completely missed Category...
20:19:33 geekosaur resembles that too (although now the compiling is mostly done but my poor little netbook is still recovering from it)
20:19:50 <koz_> Instead of GHC2021, we should have 'KCU' as a language option. :P
20:19:51 <merijn> monochrom: I'm messing with the database schema of my code, which is waaaaaaaay at the bottom of my module hierarchy, so it triggers nearly full rebuild that takes like 10 minutes each time >.>
20:20:03 <monochrom> You are in front of the guy who thought up how to expand "tl;dr" to "type-level instance diversification and resolution", "sicp" to "structure and identification of cabalized packages". You really stand no chance. :)
20:20:08 <merijn> monochrom: So lots of time to spread the gospel :p
20:20:26 <koz_> monochrom: Wordplay is how you flex in #haskell (and the ecosystem).
20:20:31 Fractalis joins (~Fractalis@c-174-54-165-158.hsd1.pa.comcast.net)
20:20:50 kritzefitz joins (~kritzefit@212.86.56.80)
20:21:16 <tomjaguarpaw> Yes, we've already maxed out on pointfree flexing
20:21:24 <monochrom> Hey, Kmett Compiling Universe is appropriate, too.
20:21:47 <koz_> Lol.
20:22:17 <koz_> Steps to putting a package on Hackage: 1. Write it; 2. Agonize for hours over suitable worlplay-ey name.
20:22:18 × kelsey quits (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771) (Quit: WeeChat 2.8)
20:22:39 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771)
20:22:49 pokid parts (~pokid@unaffiliated/pokid) ()
20:22:59 <merijn> koz_: 3. generalize functionality so that name is now overly specific >.>
20:23:06 <koz_> merijn: Rofl this.
20:23:12 Deide joins (~Deide@217.155.19.23)
20:23:25 <koz_> Because if you don't have five type variables and ten constraints, what are you even doing?
20:23:36 <koz_> (four of which must be higher-order)
20:23:39 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
20:23:55 <merijn> koz_: Oh, more like "I named it broadcast-chan and now it's unclear that there's a bunch of super useful parallelisation things in there" :p
20:24:25 <koz_> merijn: I _cannot_ read '-chan' without imagining animu schoolgirls.
20:25:18 × kelsey quits (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771) (Client Quit)
20:25:36 <monochrom> And the following is true of both complex analysis and lumber work: To take logs, you must cut branches.
20:25:41 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771)
20:25:49 <tomjaguarpaw> Or "I named it product-profunctors and now I realise that sum profunctors are useful too"
20:25:49 fendor joins (~fendor@178.165.131.166.wireless.dyn.drei.com)
20:26:01 kuribas joins (~user@ptr-25vy0iacghmhtu8v1sd.18120a2.ip6.access.telenet.be)
20:26:41 <merijn> tbh, broadcast-chan-conduit is some of the most massively useful code I've written and now it's under a cryptic name like that :p
20:26:56 wonko7 joins (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net)
20:27:06 <tomjaguarpaw> What does it do?
20:27:08 <koz_> merijn: Needs more wordplay.
20:27:15 <koz_> Quick, summon monochrom!
20:27:32 gproto023 joins (~gproto23@unaffiliated/gproto23)
20:28:03 <merijn> tomjaguarpaw: Suppose you have a stream of items you wanna map an IO function over. You use Conduit.mapM. Except your IO is slow and blocking (like an HTTP request), why not parallelise that part of your conduit pipeline!
20:28:52 <tomjaguarpaw> Ah cool
20:29:10 <tomjaguarpaw> So you have a queue of items in progress whilst you wait for the first to finish?
20:29:59 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds)
20:30:06 <merijn> tomjaguarpaw: You can have N parallel running copies of you "a -> IO b" (or really anything MonadUnliftIO) and just process them in whatever order they finish
20:30:13 × kelsey quits (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771) (Client Quit)
20:30:18 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
20:30:38 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771)
20:32:43 × kelsey quits (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771) (Client Quit)
20:32:45 f-a joins (~f-a@151.34.188.246)
20:33:04 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771)
20:33:14 × Iceland_jack quits (~user@31.124.48.169) (Read error: Connection reset by peer)
20:33:22 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
20:33:32 Iceland_jack joins (~user@31.124.48.169)
20:33:47 × kuribas quits (~user@ptr-25vy0iacghmhtu8v1sd.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
20:34:51 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
20:36:02 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
20:36:58 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
20:40:12 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:40:28 × kelsey quits (~keteskyl@2600:6c64:7b7f:fa42:e18f:e78b:7854:f771) (Quit: WeeChat 2.8)
20:40:29 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
20:41:50 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Quit: WeeChat 2.9)
20:42:11 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
20:42:46 hidedagger joins (~nate@unaffiliated/hidedagger)
20:43:21 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Remote host closed the connection)
20:44:01 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 264 seconds)
20:44:28 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:880b:e2d1:945a:df75)
20:44:57 × AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving)
20:45:14 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
20:45:54 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Client Quit)
20:45:58 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
20:46:18 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
20:49:52 × knupfer quits (~Thunderbi@200116b82ca96500dc7bf53810219cf9.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
20:50:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
20:51:15 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
20:53:44 knupfer joins (~Thunderbi@200116b82ca9650038f2d3fffee42921.dip.versatel-1u1.de)
20:53:44 × knupfer quits (~Thunderbi@200116b82ca9650038f2d3fffee42921.dip.versatel-1u1.de) (Client Quit)
20:54:00 knupfer joins (~Thunderbi@i5E86B492.versanet.de)
20:54:07 × bergey` quits (~user@107.181.19.30) (Ping timeout: 246 seconds)
20:54:57 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
20:56:17 × knupfer quits (~Thunderbi@i5E86B492.versanet.de) (Client Quit)
20:56:24 knupfer joins (~Thunderbi@200116b82ca9650071867c643babc6d8.dip.versatel-1u1.de)
20:56:28 × gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds)
20:58:19 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds)
20:58:37 dwt joins (~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
21:02:38 <dminuoso> merijn: Why not just mapM with forkIO?
21:02:49 <dminuoso> Oh wait
21:02:55 <dminuoso> This feeds the results back into the conduit?
21:02:56 × f-a quits (~f-a@151.34.188.246) (Ping timeout: 240 seconds)
21:04:01 Varis joins (~Tadas@unaffiliated/varis)
21:05:02 <merijn> dminuoso: Yes
21:05:12 f-a joins (~f-a@151.38.94.168)
21:05:17 <merijn> dminuoso: Also it handles retrying on exception or other exception mechanisms
21:05:31 conal joins (~conal@64.71.133.70)
21:05:33 <merijn> dminuoso: Also the parallelism is bounded, unlike mapConcurrently
21:05:50 <merijn> Which is important, if you're gonna, say, push a few million entries through :)
21:06:25 <merijn> dminuoso: Also, the complexity of handling multiple parallel forkIOs is insane
21:06:45 f-a parts (~f-a@151.38.94.168) ()
21:06:49 <merijn> dminuoso: Because I implemented it like that in like 3 different projects and figured I might as well do it properly *once* and be done with it
21:07:14 <merijn> Because Async doesn't quite fit my wants/needs
21:10:02 jonn joins (~sweater@206.81.18.26)
21:10:04 <merijn> dminuoso: That's also why I made sure to keep the dependency footprint superlow (3 transitive dependencies: base, transformers, and unliftio-core), so I can easily slap it in/on things :p
21:10:14 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:13:16 × ystael quits (~ystael@209.6.50.55) (Read error: Connection reset by peer)
21:13:27 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Quit: leaving)
21:15:04 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:15:40 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:16:19 × Er quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
21:16:30 ystael joins (~ystael@209.6.50.55)
21:17:41 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Remote host closed the connection)
21:17:57 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:20:30 matta joins (~user@24-113-169-116.wavecable.com)
21:20:35 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Client Quit)
21:21:34 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
21:23:16 × caecilius quits (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) (Remote host closed the connection)
21:26:44 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
21:26:57 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:27:45 × jollygood2 quits (~bc8165ab@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
21:29:13 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
21:29:39 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
21:32:19 banner joins (~banner@116-255-17-165.ip4.superloop.com)
21:32:22 × banner quits (~banner@116-255-17-165.ip4.superloop.com) (Client Quit)
21:32:38 vollenweider joins (~vollenwei@4e69b241.skybroadband.com)
21:32:48 param joins (~user@c-73-8-150-140.hsd1.il.comcast.net)
21:34:21 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->)
21:34:48 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
21:35:05 <dminuoso> Huh wow, here's a class I've never seen
21:35:07 <dminuoso> https://hackage.haskell.org/package/base-4.14.0.0/docs/Control-Monad-Zip.html#t:MonadZip
21:35:16 <dminuoso> % :t mzip
21:35:16 <yahb> dminuoso: ; <interactive>:1:1: error:; * Variable not in scope: mzip; * Perhaps you meant one of these: `zip' (imported from Data.List.NonEmpty), `BSLC.zip' (imported from Data.ByteString.Lazy.Char8), `BSC.zip' (imported from Data.ByteString.Char8)
21:35:27 <dminuoso> Oh well. Strange I have never seen this
21:35:43 s00pcan joins (~chris@075-133-056-178.res.spectrum.com)
21:35:54 <dminuoso> liftM (f *** g) (mzip ma mb) = mzip (liftM f ma) (liftM g mb)
21:38:18 × jvsg quits (~root@165.227.89.139) (Ping timeout: 272 seconds)
21:38:36 × vollenweider quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 240 seconds)
21:38:43 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 240 seconds)
21:38:46 gehmehgeh_ joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
21:40:52 <shapr> dminuoso: write a monad comprehension now? :-D
21:41:59 × Amras quits (~Amras@unaffiliated/amras) (Ping timeout: 272 seconds)
21:42:49 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
21:43:46 hexfive joins (~hexfive@50-47-142-195.evrt.wa.frontiernet.net)
21:44:01 × alx741 quits (~alx741@181.196.69.178) (Ping timeout: 264 seconds)
21:44:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:44:23 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
21:44:54 <dolio> That lets you use zip comprehensions. [ E | x <- l | y <- r ]
21:45:38 × borne quits (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 264 seconds)
21:46:06 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov)
21:50:24 conal joins (~conal@64.71.133.70)
21:50:40 borne joins (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de)
21:50:53 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
21:52:59 param parts (~user@c-73-8-150-140.hsd1.il.comcast.net) ("ERC (IRC client for Emacs 26.3)")
21:54:08 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 272 seconds)
21:56:29 alx741 joins (~alx741@181.196.68.166)
21:57:00 × chaosmasttter quits (~chaosmast@p200300c4a7107e01f51a90bd3c8201d7.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
21:57:24 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
21:57:33 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
21:58:06 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:02:00 hackage mutable-lens 0.4.1.0 - Interoperate mutable references with regular lens https://hackage.haskell.org/package/mutable-lens-0.4.1.0 (infinity0)
22:03:18 <koz_> Wait, I remember someone talking about mutable lens stuffs.
22:03:41 <koz_> infinity0: Was it you who inquired about them recently?
22:04:34 Rudd0 joins (~Rudd0@185.189.115.103)
22:04:38 <infinity0> koz_: no but i had a conversation with jle` about it a while ago, here https://github.com/mstksg/mutable/issues/2
22:05:01 <koz_> infinity0: Ah, OK. I remember someone in here asking about this very thing not too long ago.
22:05:12 <koz_> Nice thing you've got there - I wonder if there's an optics version too?
22:05:41 <infinity0> i doubt it, i made this not too long ago, don't think anyone picked up heavily on the idea yet
22:06:04 <infinity0> probably could do with a bit of low-level optimisation but it performs reasonably ok
22:06:05 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 240 seconds)
22:06:20 <koz_> Did you try benching it? Where's the part that makes it choke?
22:07:00 <infinity0> i have a benchmark showing ~13% slowdown, probably due to the boxing and unboxing
22:07:09 <infinity0> in ghc/haskell you can't mix the two in a polymorphic way
22:07:40 <infinity0> so in primitive monads the state is unboxed, in my mutable lens wrapper it has to be boxed to interoperate with regular lens, optics, etc
22:07:55 <infinity0> would be great if someone figured out a solution
22:08:19 <koz_> Ah, yeah, that's... a tricky prospect.
22:08:22 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:08:37 × knupfer quits (~Thunderbi@200116b82ca9650071867c643babc6d8.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
22:08:42 × darjeeling_ quits (~darjeelin@122.245.217.23) (Ping timeout: 272 seconds)
22:09:16 <infinity0> i also haven't tried running it on non-linear functors like [] to see if that would actually result in unsoundness, perhaps that's worth doing too...
22:09:52 <infinity0> actually on second thoughts it's probably fine, assuming the content of the reference is itself a pure immutable object and doesn't contain inner references
22:10:18 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
22:10:28 hseg joins (~gesh@IGLD-84-228-238-117.inter.net.il)
22:11:02 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
22:11:20 reallymemorable joins (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net)
22:11:50 caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net)
22:12:01 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
22:15:04 tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net)
22:15:34 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:16:35 <koz_> But yeah, cool little thing you have there.
22:17:05 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds)
22:18:07 <infinity0> thanks!
22:18:29 <infinity0> to be clear the benchmark i quoted above does nothing except read/write to the reference/lens, so in a "real" program it won't be that much slower
22:18:36 <infinity0> so feel free to use it in your pet projects :)
22:19:16 × matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 240 seconds)
22:19:20 <koz_> It'd be nice to have the various indexed stuff, since that'd be very useful for mutable arrays.
22:19:54 dyamon joins (~dyamon@cpc69058-oxfd26-2-0-cust662.4-3.cable.virginm.net)
22:20:36 × michalz quits (~user@185.246.204.47) (Remote host closed the connection)
22:20:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
22:20:43 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
22:20:45 hidedagger joins (~nate@unaffiliated/hidedagger)
22:22:22 darjeeling_ joins (~darjeelin@122.245.217.23)
22:23:53 × hseg quits (~gesh@IGLD-84-228-238-117.inter.net.il) (Ping timeout: 256 seconds)
22:25:10 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
22:25:39 kupi joins (uid212005@gateway/web/irccloud.com/x-wpurhmmpfcznlitw)
22:26:02 <infinity0> koz_: what works currently is various indexed lens (or anything really) composed with a mutable-lens, so you could use a MutVar (Map k v) or something like that
22:26:09 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds)
22:26:13 <infinity0> but yeah, i didn't think too hard about mutable arrays etc yet
22:26:14 <koz_> Oh, that's nice.
22:26:24 <koz_> It'd be very useful to have that baked in, though.
22:26:41 <kupi> does Data.ByteString.Lazy.Char8.uncons copy the first chuck?
22:27:06 <kupi> *chunk
22:27:14 × neiluj quits (~jco@unaffiliated/neiluj) (Quit: Lost terminal)
22:27:24 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Read error: Connection reset by peer)
22:27:48 Rudd0^ joins (~Rudd0@185.189.115.98)
22:28:06 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
22:28:38 <infinity0> koz_: i'm not sure how well mutable arrays fit into this lens-are-references paradigm, but there is a similar+different framework by jle` that is the "mutable" package https://hackage.haskell.org/package/mutable that covers mutable arrays
22:29:05 <koz_> infinity0: Noted.
22:29:24 <koz_> I might write an optics version for lols.
22:29:30 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
22:29:45 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
22:29:47 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
22:29:49 <infinity0> i wrote mutable-lens because i had a direct concrete need to abstract over mutable references and pure state monads in the same piece of code without repeating myself, mutable-arrays didn't appear to be part of that need
22:29:52 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
22:30:19 <infinity0> cool, yeah i'd be happy to look at it. you can likely re-use some of my types
22:31:25 × Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 264 seconds)
22:32:48 <frdg> I dug up another of the same usb and get an entirely different issue. Do not buy `NXT USB 2.0`'s. Ill get a new usb tomorrow.
22:33:17 × revprez_stg quits (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net) (Quit: Lost terminal)
22:35:15 <sondr3> question about API design in Haskell, coming from Rust I'm not sure how to create a Haskelly API for my library. Does something similar to https://rust-lang.github.io/api-guidelines/ exist for Haskell?
22:37:12 son0p joins (~son0p@181.136.122.143)
22:37:25 revprez_stg joins (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net)
22:37:57 <infinity0> i don't know of a document, your best bet would be to read the standard library and other common libraries and figure out the convention by osmosis
22:39:05 <koz_> It also depends very much on what you're trying to write.
22:39:06 hidedagger joins (~nate@unaffiliated/hidedagger)
22:39:07 × Tario quits (~Tario@200.119.185.214) (Ping timeout: 246 seconds)
22:39:15 Tario joins (~Tario@201.192.165.173)
22:39:50 <sondr3> A library for https://github.com/google/hrx to learn Haskell
22:39:51 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
22:40:07 × borne quits (~fritjof@200116b864509c00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
22:40:29 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
22:41:05 hidedagger joins (~nate@unaffiliated/hidedagger)
22:41:06 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
22:42:22 <infinity0> sondr3: have a look at https://hackage.haskell.org/package/zip-archive-0.4.1/docs/Codec-Archive-Zip.html and other archive-format libraries and spot some naming patterns
22:44:30 <sondr3> infinity0: awesome, that looks like a great way to learn by osmosis
22:44:43 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
22:45:08 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:45:10 <infinity0> welcome!
22:47:15 conal_ joins (~conal@64.71.133.70)
22:50:01 × treotmnor quits (~treotmnor@8.210.183.149) (Remote host closed the connection)
22:50:03 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
22:50:20 treotmnor joins (~treotmnor@218.73.97.199)
22:53:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:55:31 matta joins (~user@24-113-169-116.wavecable.com)
22:56:58 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
22:57:37 hidedagger joins (~nate@unaffiliated/hidedagger)
22:58:22 dizzy_g joins (~dizzy_g@188.170.200.125)
23:00:08 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
23:01:56 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
23:02:24 hidedagger joins (~nate@unaffiliated/hidedagger)
23:02:31 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
23:03:16 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
23:03:16 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
23:04:25 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving)
23:04:34 hidedagger joins (~nate@unaffiliated/hidedagger)
23:04:46 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
23:05:52 × mceier quits (~mceier@89-68-132-187.dynamic.chello.pl) (Ping timeout: 260 seconds)
23:06:16 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds)
23:08:53 × dizzy_g quits (~dizzy_g@188.170.200.125) ()
23:08:57 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
23:09:04 × solonarv quits (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr) (Ping timeout: 256 seconds)
23:10:36 hidedagger joins (~nate@unaffiliated/hidedagger)
23:12:53 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:13:16 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
23:13:19 <kupi> i have found out it does not copy because uses plusForeignPtr
23:13:53 <ski> kupi : it slices, i'd imagine
23:13:59 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
23:14:10 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 256 seconds)
23:15:56 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
23:16:10 × fendor quits (~fendor@178.165.131.166.wireless.dyn.drei.com) (Remote host closed the connection)
23:16:37 × shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:94f:cb60:6301:cfa8) (Ping timeout: 260 seconds)
23:17:16 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
23:18:42 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
23:19:16 hidedagger joins (~nate@unaffiliated/hidedagger)
23:19:43 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection)
23:20:17 × Aquazi quits (uid312403@gateway/web/irccloud.com/x-zpyuyhhkgrlryaog) (Quit: Connection closed for inactivity)
23:20:24 × jneira quits (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) (Ping timeout: 256 seconds)
23:23:23 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:7167:dae3:3033:6c61)
23:24:47 × son0p quits (~son0p@181.136.122.143) (Remote host closed the connection)
23:26:59 × dyamon quits (~dyamon@cpc69058-oxfd26-2-0-cust662.4-3.cable.virginm.net) (Quit: WeeChat 2.9)
23:27:42 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
23:29:17 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
23:29:42 hidedagger joins (~nate@unaffiliated/hidedagger)
23:33:48 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 260 seconds)
23:35:16 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
23:35:32 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Remote host closed the connection)
23:35:56 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
23:38:23 <koz_> Lazy ByteStrings are like, arrays of chunks right?
23:39:37 <hpc> linked list of chunks
23:40:24 <koz_> hpc: So like [Chunk]?
23:40:33 <koz_> And chunks are... strict ByteStrings?
23:41:48 <hpc> more or less
23:41:49 <hpc> https://hackage.haskell.org/package/bytestring-0.11.0.0/docs/src/Data.ByteString.Lazy.Internal.html#ByteString
23:42:15 <koz_> Ah, they roll their own list.
23:42:22 <koz_> Is there a reason for this?
23:43:31 <koz_> Ah, strictness.
23:44:47 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
23:45:07 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
23:45:17 gioyik joins (~gioyik@186.118.238.251)
23:46:43 × hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
23:48:16 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
23:49:06 × zaquest quits (~notzaques@5.128.210.178) (Read error: Connection reset by peer)
23:50:04 zaquest joins (~notzaques@5.128.210.178)
23:50:12 × wonko7 quits (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) (Ping timeout: 260 seconds)
23:51:37 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
23:51:56 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:51:58 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
23:52:05 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
23:54:07 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Remote host closed the connection)
23:54:51 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
23:55:30 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
23:57:08 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
23:58:03 <int-e> koz_: unpacking saves an indirection
23:58:16 <koz_> int-e: Yeah, that too.
23:58:47 × alp quits (~alp@2a01:e0a:58b:4920:3dd7:733:8dcb:bbbc) (Ping timeout: 272 seconds)

All times are in UTC on 2020-11-25.