Home liberachat/#haskell: Logs Calendar

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

00:00:02 <ChaiTRex> OK, thanks.
00:00:16 <monochrom> My dad has a hammering drill.
00:01:22 <hpc> ugh, this is just reminding me of how my nas upgrade went now
00:01:32 <hpc> tldr, https://monroeengineering.com/blog/how-jis-screws-differ-from-phillips-head-screws/ was VERY IMPORTANT and i almost found that out too late
00:01:44 Guest88 joins (~Guest88@c-67-183-222-152.hsd1.wa.comcast.net)
00:02:14 <monochrom> Ah right, yikes.
00:02:25 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
00:02:30 × Guest88 quits (~Guest88@c-67-183-222-152.hsd1.wa.comcast.net) (Client Quit)
00:02:59 <monochrom> A long history of: Japan domestic products differ trickily from US+Europe products.
00:03:11 <monochrom> For example, PCs back in the DOS days.
00:04:35 <rustisafungus> yeah like my japanese nintendo won't plug in to my harley davidson, what gives
00:05:16 × gqplox quits (~textual@2a02:c7c:941d:fd00:88ea:12e4:aa87:535d) (Quit: Textual IRC Client: www.textualapp.com)
00:05:24 <hpc> should have plugged your saturn into your saturn
00:05:34 <monochrom> So, did you use a hammering drill to force your screws? :)
00:05:36 xff0x joins (~xff0x@ai071162.d.east.v6connect.net)
00:06:43 aplainzetakind joins (~aplainzet@178.249.214.17)
00:07:13 <rustisafungus> ok so how many hours do i have to hang around #haskell before i know the language well
00:08:14 <dsal> My wife's native language isn't English and I've been hanging around her for years and other than knowing when I'm in trouble, I don't know her native language at all.
00:08:16 <hpc> well, #haskell was created somewhere around the year 2000, so let's say at least that long :D
00:09:15 <hpc> but really it depends more on how actively you pursue learning it and such
00:09:26 <monochrom> infinitely many hours.
00:09:32 pta2002 joins (~pta2002@2001:818:ea73:e00:7ca6:1dab:9d99:2202)
00:09:42 <hpc> it took me about a month to tear down all my java/python preconceptions and build them back up to where i could write an irc bot
00:10:02 <monochrom> "How many World Cup matches do I watch to get good at soccer?" Answer: Infinite.
00:10:13 <monochrom> This is not a spectator sport.
00:11:16 <monochrom> Solution: I hang around #haskell after I know the language well.
00:11:18 <hpc> #haskell is more a source of peer review and things to google
00:12:19 × td__ quits (~td@83.135.9.43) (Quit: waking up from the american dream ...)
00:12:28 <rustisafungus> 2000 years is a long time to spend on irc
00:14:36 <rustisafungus> buy defect process on steam and leave rave reviews praising the author for haskell-fu https://github.com/incoherentsoftware/defect-process
00:16:06 dsrt^ joins (~dsrt@76.145.185.103)
00:16:20 × king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 256 seconds)
00:17:06 × pta2002 quits (~pta2002@2001:818:ea73:e00:7ca6:1dab:9d99:2202) (Quit: pta2002)
00:17:42 dnlsur joins (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy)
00:20:07 × rustisafungus quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds)
00:20:58 × michalz quits (~michalz@185.246.204.65) (Remote host closed the connection)
00:25:03 × aplainzetakind quits (~aplainzet@178.249.214.17) (Ping timeout: 260 seconds)
00:25:48 × dnlsur quits (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:30:10 freeside joins (~mengwong@103.252.202.193)
00:30:45 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:31:19 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
00:34:30 Guest4960 joins (~money@pool-100-11-18-203.phlapa.fios.verizon.net)
00:35:02 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
00:36:20 freeside joins (~mengwong@103.252.202.193)
00:36:58 × Guest4960 quits (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit)
00:37:46 rustisafungus joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
00:43:25 Deide_ joins (~Deide@wire.desu.ga)
00:44:51 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
00:45:01 dnlsur joins (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy)
00:48:34 <sm> you can learn a lot hanging out here, but as said it's not enough
00:48:58 <rustisafungus> you're right i should join #agda too
00:51:57 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
00:52:55 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
01:02:48 × dnlsur quits (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:03:52 × natto quits (~natto@140.238.225.67) (Quit: a.)
01:04:25 × ian_ quits (~ian@matrix.chaos.earth.li) (Remote host closed the connection)
01:06:00 td_ joins (~td@83.135.9.43)
01:06:01 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
01:06:35 natto joins (~natto@140.238.225.67)
01:06:47 <monochrom> hahaha
01:07:07 <EvanR> monochrom, elaborate on these japanese dos differences
01:07:34 × natto quits (~natto@140.238.225.67) (Client Quit)
01:07:42 <monochrom> "How many FIFA World Cup matches do I need to watch?" "Infinite." "You're right, I need to also watch Rugby World Cup too."
01:08:02 <monochrom> I forgot the actual differences.
01:09:52 natto joins (~natto@140.238.225.67)
01:10:08 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:10:33 <geekosaur> which rugby?
01:10:38 <geekosaur> 😛
01:10:43 <monochrom> yikes
01:10:48 <rustisafungus> so basically haskell is the only language i can use to watch the world cup, you are saying
01:11:14 <geekosaur> (league and union are effectively two different sports. and you can see the origins of NFL in league)
01:12:43 <rustisafungus> is a sport a kind of monad
01:14:01 <sm> I have an actual haskell questino
01:14:06 <davean> I feel like rustisafungus is having a conversation with himself.
01:14:14 <davean> sm: yes, yes, that please.
01:14:21 × natto quits (~natto@140.238.225.67) (Client Quit)
01:14:55 <EvanR> monadball
01:15:03 <sm> it's been a while since I updated stackage's build-constraints, and I'm always flailing around a bit with git. Do you know a simple reliable efficient way ? If not involving web browser, all the better ?
01:15:08 natto joins (~natto@140.238.225.67)
01:15:52 <sm> I have the github cli gh installed. Typically I cd src/stackage, git pull, then commit my change (on master), then I try to gh pr create -f and it tells me I can't
01:16:15 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:16:27 <davean> Oh so you're talking about workflow stuff :( I'm useless
01:16:35 × natto quits (~natto@140.238.225.67) (Client Quit)
01:16:50 <sm> IIRC I need to create a branch first. What name ? does it matter to stackage ? do I have old stackage branches already on github ? There must be an easier way
01:17:19 <sm> my actual haskell is "actually getting things done with haskell" I guess, sorry
01:17:59 <sm> actually getting things done as a haskell developer... ? why does git suck ?
01:18:28 <EvanR> darcs it is
01:18:35 <sm> ok now I'm thinking the best thing is just use github web ui
01:19:04 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds)
01:19:20 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
01:19:47 natto joins (~natto@140.238.225.67)
01:19:57 <davean> sm: so I know nothing about stackage, but you can create a branch with git, and a merge request github style kinda needs a branch
01:19:58 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
01:20:01 × Deide_ quits (~Deide@wire.desu.ga) (Quit: Seeee yaaaa)
01:20:13 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
01:20:13 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
01:20:13 wroathe joins (~wroathe@user/wroathe)
01:20:24 <davean> This isn't even about git though, this is about how github tries to centralize a distributed system like git ... and how that interacts with stackage too I guess
01:21:14 causal joins (~user@50.35.83.177)
01:22:04 × rustisafungus quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds)
01:22:35 × natto quits (~natto@140.238.225.67) (Client Quit)
01:23:07 natto joins (~natto@140.238.225.67)
01:23:11 <sm> updating stackage/build-constraints.yaml is something lots of package maintainers do, or ought to do IMHO, and better if were drop dead easy
01:23:38 <sm> I was sort of hoping someone has figured out the minimal lazy method
01:24:22 <sm> github web ui is struggling to cope with the size of this file, sadly (9k lines)
01:24:51 <sm> so don't fat-finger it and have to redo, like me
01:24:59 × jludwig quits (~justin@li657-110.members.linode.com) (Quit: ZNC - https://znc.in)
01:25:11 <davean> sm: I expect the easy way is to just have your own clone, on github, and use that, pulling from upstream, and produce the merge off that
01:25:23 <davean> because you need to have a way to get the IDs into the github centralized system
01:25:58 jludwig joins (~justin@li657-110.members.linode.com)
01:26:08 <davean> But this is what is nice for example about email patches, they're the self contained change without the ID issue.
01:26:25 × xff0x quits (~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 260 seconds)
01:28:56 <sm> success. web ui was the simplest, and switching to a browser other than safari made it slightly less tedious
01:29:26 rustisafungus joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
01:29:29 <sm> better concrete workflows welcome, if someone has em
01:32:16 Igloo joins (~ian@matrix.chaos.earth.li)
01:32:21 Guest7862 joins (~money@pool-100-11-18-203.phlapa.fios.verizon.net)
01:32:56 × Guest7862 quits (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit)
01:38:49 <sm> ok fine it's coming back to me.. always half an hour of flailing grumble grumble
01:43:42 × iqubic quits (~user@2601:602:9502:c70:8e55:bd2f:72d2:8b70) (Remote host closed the connection)
01:47:00 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
01:49:22 <rustisafungus> does darcs have a self-hosted github like webapp?
01:49:26 <rustisafungus> github-like
01:50:01 <davean> ...
01:50:17 <davean> right, github the exemplar of self-hosted.
01:50:29 <davean> I think this converseation has jumped the shark.
01:50:54 <sm> why yes rustisafungus , I happen to "maintain" one
01:51:02 <rustisafungus> sm: link?
01:51:15 <rustisafungus> lol maintain in quotes is not very reassuring ;-)
01:51:23 × Guest75 quits (~Guest75@178.141.153.191) (Ping timeout: 260 seconds)
01:51:28 <rustisafungus> do you also "fix" bugs? lol
01:51:35 <sm> darcsden. darcs was once a flagship haskell app but I think it has reached old age
01:52:04 <sm> https://hub.darcs.net
01:52:06 × ubert quits (~Thunderbi@p200300ecdf264efbff642f477e75bc86.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
01:52:16 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
01:52:46 <sm> pijul is the likely darcs successor but I'm not sure it will ever become an adult
01:53:02 <rustisafungus> for whatever reason loading the main page takes many seconds for me, ... the others are rather fast
01:54:09 <rustisafungus> yeah there was another multi-second pageload, this time on viewing a source file
01:54:29 <sm> wow yes that has become rather slow, thanks for the report
01:54:47 <davean> sm: is it doing IO for all those listings instead of caching?
01:54:49 <sm> damnit now I have to maintain it
01:54:52 <rustisafungus> lol
01:54:56 freeside joins (~mengwong@103.252.202.193)
01:54:58 <sm> opened my mouth...
01:55:31 <sm> probably davean. it used to be much faster though
01:56:32 Feuermagier joins (~Feuermagi@user/feuermagier)
01:56:45 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 260 seconds)
01:58:50 <davean> I always felt its "must form a linear history" invalidated darcs from real use :(
01:59:19 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 252 seconds)
01:59:33 <rustisafungus> okay should i admit that i just copy my source files periodically
02:00:12 <davean> No, you should fix that
02:00:17 <geekosaur> that works until you actually need it and discover you didn't copy them recently enough
02:00:44 <geekosaur> \of course, using a VCS doesn't guarantee anything if you don't commit regularly
02:00:55 <davean> git rebase is also not a safe function to use.
02:01:04 <davean> geekosaur: well . . .
02:01:12 <davean> geekosaur: there are some older VCS systems ...
02:01:19 <geekosaur> indeed
02:01:26 <davean> not the ones we ended up using of course, but thats not entirely true.
02:01:26 <geekosaur> I remember using SCCS
02:01:49 <EvanR> sm, how is that page hosted?
02:02:07 <EvanR> is it a haskell web server. Maybe it hasn't been accessed in so long it had to collapse a years-long thunk xD
02:02:09 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
02:02:46 <monochrom> I'm tempted to be reactionary and go back to CVS and just say no to web apps.
02:03:09 <monochrom> Hell, 90% of the time I use git like I use CVS, no github.
02:03:28 <sm> EvanR: it's darcsden running on a small linode. Restarted hourly by cron since I don't have time to babysit it or debug mem leaks
02:03:31 money_ joins (~money@pool-100-11-18-203.phlapa.fios.verizon.net)
02:03:32 × money_ quits (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit)
02:04:03 antdurrant joins (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp)
02:04:32 <EvanR> if your app isn't also a webserver what is it even doing really
02:04:37 <sm> everything was working fine until rustisafungus started messing with it
02:04:45 <rustisafungus> lol
02:04:49 rustisafungus is hackerman
02:04:51 <EvanR> and all proper text editors read email
02:05:15 <rustisafungus> sm: restarted hourly? why
02:05:50 <rustisafungus> oh nvm missed that, mem leaks
02:06:08 <EvanR> sm set up the equivalent of the answering machine from IT crowd that just says have you tried turning it off and on again
02:06:16 × antdurrant quits (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp) (Client Quit)
02:06:28 antdurrant joins (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp)
02:06:43 <davean> sm: Those pesky users!
02:07:02 <rustisafungus> babysit,... but like isn't this haskell
02:07:09 <rustisafungus> shouldn't it just work because types or something?
02:08:04 <EvanR> we can dream
02:08:24 <davean> I am wondering how it can mem leak, but apparently lots of people have that issue. I've almost never experienced it. I think its a style thing.
02:08:38 <EvanR> haskell - program runs but might be wrong
02:08:50 <EvanR> agda - program is correct but doesn't run
02:09:08 <rustisafungus> coq - program is correct but *chuckles* penis
02:09:39 <monochrom> Are you done?
02:09:40 <sm> rustisafungus: yeesss.... it is mostly remarkably solid, after significant time spent on it... but, darcs is not an easy thing to base a web app on. It's a moving target, and not designed or tested for this use case. eg it's not thread safe
02:09:45 <geekosaur> I imagine Agda can have "runs but might be wrong" — how do you know you modeled the problem correctly? compiler can't help with that level
02:10:09 <rustisafungus> not thread safe (?!?)
02:10:27 <geekosaur> why would it need to be? it's intended for use from a command line
02:10:36 freeside joins (~mengwong@103.252.202.193)
02:10:38 <sm> it relies on environment variables or something
02:10:52 razetime joins (~quassel@49.207.211.219)
02:10:55 <davean> geekosaur: No, in that case the program is correct, what you asked for wasn't. ;)
02:11:05 <rustisafungus> are there languages which are thread safe? erlang?
02:11:09 <davean> sm: enviromental variables shouldn't affect thread safety
02:11:21 <geekosaur> that's what you think
02:11:43 <sm> I can dig up the issue
02:12:39 <EvanR> erlang implements processes so doesn't need to be thread safe xD
02:12:56 <EvanR> shared nothing
02:12:58 <davean> sm: Though come to think of it, darcs probably makes less issues for your use case above, since it depends on a lineralizability of history property that inherently centeralizes it?
02:13:00 <geekosaur> https://tomsmeding.com/blog/bugs/efault
02:13:31 <rustisafungus> and so haskell isn't thread safe...?
02:13:54 <geekosaur> no language is
02:14:06 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:14:10 <geekosaur> heck, POSIX is mostly thread-unsafe, regardless of language
02:14:26 <geekosaur> (see the URL I just pasted)
02:14:42 <rustisafungus> no language?
02:14:53 <geekosaur> thread safety is not something you can "build into a language"
02:15:06 <sm> ..no I can't.. it's in there somewhere : https://hub.darcs.net/simon/darcsden/issues
02:15:16 rustisafungus 's jaw drops in a threadsafe manner
02:15:20 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
02:15:48 <geekosaur> you can have languages that help you out with it (Haskell's STM helps a lot, you just don't expect you need to wrap setEnv calls with it…)
02:15:55 <sm> (browse that, anyone thinking haskell is a magic bullet!)
02:17:43 <sm> it was something like: libdarcs depends on mutating env vars, and that's not per thread with GHC RTS
02:17:48 <EvanR> you could design a paperlanguage which has some sort of concurrency guarantee built into the type system
02:17:56 <EvanR> and no one will use it for anything
02:18:15 <geekosaur> it's not per thread with any language. POSIX specifies envars as a process level facility
02:18:32 <sm> right
02:18:44 × antdurrant quits (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp) (Quit: Connection closed)
02:18:48 <sm> so darcs is dumb here
02:18:56 <geekosaur> for that matter, Windows has the same issue only more so, since they're stuffed into the registry or somewhere so they're not even process level
02:19:00 <rustisafungus> geekosaur: "The only situation in which posix_spawnp seems to always succeed, is when stdout of the process that worker's output is piped to, is block-buffered." lol wtf
02:19:16 <sm> bugs me that I can't find it now, it'll turn up
02:19:26 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
02:20:03 <davean> Yah a bunch of POSIX needs a process level lock, but that makes sense for process level things. A safe language for threads would provide said lock I guess.
02:20:05 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
02:20:12 <rustisafungus> EvanR: oh why would noone use a threadsafe paperlang?
02:20:44 <geekosaur> same reason nobody uses Agda for anything other than proofs
02:20:55 <geekosaur> it's not practically usable
02:21:06 <davean> "POSIX.1 does not require setenv() or unsetenv() to be reentrant." <-- So you know, it already needed something.
02:21:37 <rustisafungus> geekosaur: isn't a perfect notepad app with very few features worth a lot more than uh evernote or whatever
02:21:41 <davean> I actually think this might be a bit of a design issue in how we expose the APIs for non-low-level use
02:22:08 <EvanR> perfect notepad = notepad but understands '\n' ? xD
02:22:21 <rustisafungus> hehe
02:23:16 <monochrom> I would think that it's a trivial tautology that a paperlanguage is unusable.
02:23:45 <monochrom> As trivial as factoring primes.
02:23:50 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds)
02:24:37 × ajb quits (~ajb@mimas.whatbox.ca) (Quit: bye)
02:27:11 freeside joins (~mengwong@103.252.202.193)
02:33:42 ajb joins (~ajb@mimas.whatbox.ca)
02:36:21 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
02:36:46 × ajb quits (~ajb@mimas.whatbox.ca) (Quit: bye)
02:37:53 polo is now known as money
02:38:24 × razetime quits (~quassel@49.207.211.219) (Ping timeout: 260 seconds)
02:39:12 ajb joins (~ajb@mimas.whatbox.ca)
02:42:28 × ajb quits (~ajb@mimas.whatbox.ca) (Client Quit)
02:42:28 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
02:43:02 <rustisafungus> but immutable means threadsafe or something?
02:43:40 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:46:11 razetime joins (~quassel@49.207.211.219)
02:46:13 <sm> haskell programs have to manage state, like any other
02:46:31 <sm> stateful apps, I mean
02:46:55 <rustisafungus> seems like haskell would be very well positioned for thread safety by default/by design or opt-out only thread unsafety or somesuch
02:47:55 <sm> it is, I think ? just don't use env vars for thread-specific state
02:48:12 <rustisafungus> ok so copy them?
02:48:32 <rustisafungus> or just, dont use env vars at all
02:48:49 <sm> 👍🏻
02:48:54 <sm> afk, dinner o/
02:49:22 <rustisafungus> 💪
02:51:29 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
02:57:05 ajb joins (~ajb@mimas.whatbox.ca)
03:01:14 × rustisafungus quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds)
03:03:02 × ajb quits (~ajb@mimas.whatbox.ca) (Quit: bye)
03:04:57 × yuribarros quits (~yuribarro@2804:14c:65e4:865c::1000) (Ping timeout: 252 seconds)
03:05:40 thegeekinside joins (~thegeekin@189.217.82.244)
03:07:36 × thegeekinside quits (~thegeekin@189.217.82.244) (Remote host closed the connection)
03:08:21 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
03:09:33 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 256 seconds)
03:09:35 thegeekinside joins (~thegeekin@189.217.82.244)
03:09:40 dilaver joins (~DilaverCa@95.70.234.215)
03:10:17 × thegeekinside quits (~thegeekin@189.217.82.244) (Remote host closed the connection)
03:12:10 × dilaver quits (~DilaverCa@95.70.234.215) (Excess Flood)
03:18:38 × mixfix41 quits (~sdenynine@user/mixfix41) (Ping timeout: 246 seconds)
03:22:47 rustisafungus joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
03:23:49 nattiestnate joins (~nate@202.138.250.46)
03:24:23 son0p joins (~ff@2604:3d08:5b7f:5540::37af)
03:26:52 × califax quits (~califax@user/califx) (Remote host closed the connection)
03:27:10 × rustisafungus quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds)
03:27:52 rustisafungus joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
03:29:40 califax joins (~califax@user/califx)
03:30:08 × nattiestnate quits (~nate@202.138.250.46) (Quit: WeeChat 3.7.1)
03:31:50 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
03:32:39 × rustisafungus quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds)
03:32:40 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
03:38:15 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
03:38:40 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:39:35 × accord quits (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
03:42:17 × koolazer quits (~koo@user/koolazer) (Read error: Connection reset by peer)
03:44:09 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
03:45:29 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
03:45:31 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
03:46:34 nate4 joins (~nate@98.45.169.16)
03:48:25 freeside joins (~mengwong@103.252.202.193)
03:48:58 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:50:44 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
03:52:29 × td_ quits (~td@83.135.9.43) (Ping timeout: 260 seconds)
03:53:03 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:53:53 td_ joins (~td@83.135.9.0)
03:58:19 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
04:05:07 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
04:07:35 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
04:07:47 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
04:10:56 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
04:12:33 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection)
04:14:20 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
04:15:24 freeside joins (~mengwong@103.252.202.193)
04:18:57 mixfix41 joins (~sdenynine@user/mixfix41)
04:20:32 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
04:26:01 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
04:26:32 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
04:27:37 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
04:29:13 × jargon quits (~jargon@174-22-207-8.phnx.qwest.net) (Remote host closed the connection)
04:29:37 freeside joins (~mengwong@103.252.202.193)
04:29:43 stevenxl joins (~stevenxl@c-73-50-142-156.hsd1.il.comcast.net)
04:31:27 Sgeo joins (~Sgeo@user/sgeo)
04:33:28 mixfix41 is now known as genjitsu41
04:35:18 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
04:37:36 ec_ joins (~ec@gateway/tor-sasl/ec)
04:39:11 × zant quits (~zant@62.214.20.26) (Ping timeout: 246 seconds)
04:41:33 × [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
04:45:20 [Leary] joins (~Leary]@user/Leary/x-0910699)
04:45:44 stevenxl_ joins (~stevenxl@45.76.30.6)
04:48:43 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
04:48:54 × stevenxl quits (~stevenxl@c-73-50-142-156.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
04:48:57 ph88 joins (~ph88@2401:4900:45b3:a537:d6b5:7dd6:f89a:7276)
04:55:38 iqubic joins (~avi@2601:601:1100:edd0:d29b:dc2d:eab0:9e7d)
04:58:23 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
04:59:21 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
05:01:03 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
05:03:19 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
05:08:24 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
05:16:50 × ph88 quits (~ph88@2401:4900:45b3:a537:d6b5:7dd6:f89a:7276) (Ping timeout: 260 seconds)
05:20:06 ph88 joins (~ph88@2401:4900:45b3:a537:1798:48a2:33e9:6a48)
05:20:34 <EvanR> ah nice to be 13 on haskell leaderboard, at least for a minute until I get bumped down
05:23:07 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
05:24:35 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
05:37:00 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
05:41:09 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
05:41:19 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds)
05:42:25 Lord_of_Life_ is now known as Lord_of_Life
05:45:23 × ph88 quits (~ph88@2401:4900:45b3:a537:1798:48a2:33e9:6a48) (Ping timeout: 256 seconds)
05:46:36 jargon joins (~jargon@174-22-207-8.phnx.qwest.net)
05:55:16 × jargon quits (~jargon@174-22-207-8.phnx.qwest.net) (Remote host closed the connection)
06:11:38 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
06:22:46 × iqubic quits (~avi@2601:601:1100:edd0:d29b:dc2d:eab0:9e7d) (Remote host closed the connection)
06:23:33 iqubic joins (~avi@2601:601:1100:edd0:d29b:dc2d:eab0:9e7d)
06:28:09 thegeekinside joins (~thegeekin@189.217.82.244)
06:29:26 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
06:33:11 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:33:28 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
06:33:48 × echoreply quits (~echoreply@45.32.163.16) (Quit: WeeChat 2.8)
06:33:58 johnw joins (~johnw@2600:1700:cf00:db0:ccd8:6dba:13b3:7200)
06:35:10 echoreply joins (~echoreply@45.32.163.16)
06:36:43 king_gs joins (~Thunderbi@187.201.204.122)
06:42:22 oldsk00l joins (~znc@ec2-18-196-97-233.eu-central-1.compute.amazonaws.com)
06:46:29 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
06:46:40 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
06:51:47 × cafkafk quits (~cafkafk@fsf/member/cafkafk) (Ping timeout: 255 seconds)
06:53:35 cafkafk joins (~cafkafk@fsf/member/cafkafk)
06:55:15 jakalx parts (~jakalx@base.jakalx.net) ()
06:57:17 × king_gs quits (~Thunderbi@187.201.204.122) (Read error: Connection reset by peer)
06:57:25 jakalx joins (~jakalx@base.jakalx.net)
06:57:35 king_gs joins (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13)
07:08:18 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
07:12:56 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
07:30:48 <iqubic> @quote zzz
07:30:48 <lambdabot> jle` says: let sleep = pure "zzz" in getSum sleep
07:31:39 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:32:09 kenran joins (~user@user/kenran)
07:32:39 × kenran quits (~user@user/kenran) (Remote host closed the connection)
07:32:54 acidjnk_new joins (~acidjnk@p200300d6e7137a26a0c5c39a40faf46b.dip0.t-ipconnect.de)
07:33:14 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds)
07:36:08 nattiestnate joins (~nate@202.138.250.62)
07:37:00 × califax quits (~califax@user/califx) (Remote host closed the connection)
07:38:03 × nattiestnate quits (~nate@202.138.250.62) (Client Quit)
07:38:47 califax joins (~califax@user/califx)
07:41:57 × king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Quit: king_gs)
07:45:15 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
07:46:23 fockerize joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
07:50:00 jakalx joins (~jakalx@base.jakalx.net)
07:52:40 × oldsk00l quits (~znc@ec2-18-196-97-233.eu-central-1.compute.amazonaws.com) (Remote host closed the connection)
07:53:51 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
08:05:13 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
08:05:20 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
08:15:59 mncheck joins (~mncheck@193.224.205.254)
08:19:08 × fockerize quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds)
08:19:41 acidjnk_new3 joins (~acidjnk@p200300d6e7137a2610bc2c69f4fcc3e3.dip0.t-ipconnect.de)
08:21:43 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:23:07 × acidjnk_new quits (~acidjnk@p200300d6e7137a26a0c5c39a40faf46b.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
08:23:54 × ft quits (~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving)
08:25:27 ubert joins (~Thunderbi@p200300ecdf264efbee8671ffffe5ba55.dip0.t-ipconnect.de)
08:30:04 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
08:31:54 chexum joins (~quassel@gateway/tor-sasl/chexum)
08:32:51 lortabac joins (~lortabac@2a01:e0a:541:b8f0:d06:f4b:7f4f:76b1)
08:33:15 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
08:33:28 chexum joins (~quassel@gateway/tor-sasl/chexum)
08:38:54 × euandreh quits (~Thunderbi@179.214.113.107) (Ping timeout: 260 seconds)
08:38:55 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
08:38:58 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
08:42:17 <dminuoso> What makes Haskell so fun for thread safety, is STM.
08:42:42 <dminuoso> And the reason STM is so great in Haskell and virtually non-existent outside, is because we can with our type systems keep side effects out of transactions
08:44:19 <dminuoso> Thing is, even with LLVM IR you can reorder things manually
08:44:23 <dminuoso> Oh sorry wrong chat.
08:45:50 <mauke> STM++
08:46:11 nate4 joins (~nate@98.45.169.16)
08:47:00 <mauke> that reminds me: one time I needed a not-quite-trivial mutable data structure with concurrent access from multiple threads
08:47:19 <mauke> I couldn't figure out how to build it correctly, so I prototyped it in C
08:48:17 <mauke> single threaded C, that is. but it made it easy for me to figure out where the pointers needed to go
08:49:08 <mauke> I translated it back to Haskell (adding another level of Ref/Var wherever a C variable had its address taken), wrapped 'atomically' around the whole thing, and done
08:49:23 × potash quits (~foghorn@user/foghorn) (Ping timeout: 264 seconds)
08:50:51 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds)
08:51:12 avicenzi joins (~avicenzi@2a00:ca8:a1f:b004:a17d:97b8:494e:8b7b)
08:54:39 cfricke joins (~cfricke@user/cfricke)
08:54:54 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:55:07 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
08:55:18 <c_wraith> I worry about putting single mutable data structures in STM. If you aren't careful, that's a great way to get thundering herds
08:56:04 <mauke> is that an issue with a thread count < 6?
08:56:09 <c_wraith> oh yes.
08:56:50 <c_wraith> Err. I was thinking cores. If you have at max 5 waiting, the herd is pretty small.
08:57:35 <c_wraith> But you really need to be aware of the potential downsides to optimistic locking
08:58:19 × avicenzi quits (~avicenzi@2a00:ca8:a1f:b004:a17d:97b8:494e:8b7b) (Remote host closed the connection)
08:58:27 <c_wraith> And this is why most uses of STM try to stripe their data structures, so there's no single ref that becomes a chokepoint for every transaction.
08:58:47 avicenzi joins (~avicenzi@2a00:ca8:a1f:b004::c32)
08:58:49 michalz joins (~michalz@185.246.204.93)
08:59:03 gmg joins (~user@user/gehmehgeh)
09:02:09 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
09:05:24 <mauke> score [ord -> c1, ' ', ord -> c2] = (c2 - c1 + 2) `mod` 3 * 3 + c2 - ord 'W'
09:05:30 <mauke> does this look sensible?
09:08:35 <dminuoso> Im starting to think Servant would have better been written in TemplateHaskell. :(
09:08:57 <dminuoso> The quality of diagnostics and compilation time overhead for non-trivial usecases is tremendous
09:09:39 <dminuoso> At least I managed to get rid of all generic+aeson uses and replaced them all with TH, speeding up module compilation from ~3min per module to about 2s.
09:13:12 mastarija joins (~mastarija@2a05:4f46:e03:6000:6cf2:8564:eee7:713a)
09:16:11 mc47 joins (~mc47@xmonad/TheMC47)
09:16:55 CiaoSen joins (~Jura@p200300c95716a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
09:22:02 × ubert quits (~Thunderbi@p200300ecdf264efbee8671ffffe5ba55.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
09:24:28 <tomsmeding> :o
09:26:20 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection)
09:27:41 <maerwald[m]> dminuoso: the overlapping instances dance is what worries me more
09:28:07 <maerwald[m]> And it's not very composable
09:28:08 <dminuoso> maerwald[m]: From a maintainer perspective sure. As a user, Im mainly worried about my quality of life when I hit cabal build.
09:28:53 <dminuoso> It took me a long while to realize that Yesod did some things really well in comparison.
09:29:20 Guest75 joins (~Guest75@178.141.153.191)
09:30:04 <maerwald[m]> I mean all DLSs are not composable
09:30:27 <maerwald[m]> If something is missing, you'll reach deep down into the internals
09:30:32 <dminuoso> It depends on what you mean by composable, really.
09:30:45 <dminuoso> Servant has composable pieces to it.
09:31:17 ubert joins (~Thunderbi@p200300ecdf264efbf25dacad1803575e.dip0.t-ipconnect.de)
09:31:21 <dminuoso> Im just mainly annoyed at how incredibly slow compilation becomes when by means of type level tricks you start introducing literally millions of types to the simplifier
09:31:36 <maerwald[m]> Composable for expected use cases
09:31:46 <maerwald[m]> Not unix philosophy
09:31:51 <dminuoso> It's kind of like encoding a program in a turing machine implemented in BGP. Yes you can do it, no its not going to perform well.
09:32:14 <maerwald[m]> Go libraries are composable
09:32:24 <dminuoso> Well data is easily composable.
09:32:26 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:32:43 <dminuoso> Since go doesnt have type level tricks, people just do it on the value level instead.
09:33:30 <dminuoso> One thing that golang has that works really well is the backticks on structs.,
09:33:36 <dminuoso> I wish we had that too
09:34:00 <dminuoso> Maybe available in TH, then things like servant or aeson would have a really implementation style
09:34:16 <maerwald[m]> Yep true. That's a major downside of strong types
09:34:35 <maerwald[m]> That's why bytestring still rules the Haskell world
09:34:43 <maerwald[m]> It's the weakest possible type
09:36:08 <maerwald[m]> Especially lazy bytestring
09:36:32 <dminuoso> I have come to love bytestrings ever since I learned about flatparse
09:37:20 Kaiepi joins (~Kaiepi@108.175.84.104)
09:41:11 zant joins (~zant@62.214.20.26)
09:43:19 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
09:44:59 ChaiTRex joins (~ChaiTRex@user/chaitrex)
09:47:56 dilaver joins (~DilaverCa@95.70.234.215)
09:48:10 × dilaver quits (~DilaverCa@95.70.234.215) (Excess Flood)
09:48:11 × ubert quits (~Thunderbi@p200300ecdf264efbf25dacad1803575e.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
09:48:11 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
09:49:08 stiell joins (~stiell@gateway/tor-sasl/stiell)
09:54:09 × acidjnk_new3 quits (~acidjnk@p200300d6e7137a2610bc2c69f4fcc3e3.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
09:58:37 chele joins (~chele@user/chele)
10:05:48 ubert joins (~Thunderbi@2a02:8109:abc0:6434:8400:d733:83f7:3040)
10:05:48 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
10:06:25 stiell joins (~stiell@gateway/tor-sasl/stiell)
10:06:56 <tomsmeding> dminuoso: you can sortof tag fields with type-level data, but the issue is that you can't get around wrapping a newtype constructor then
10:07:15 <tomsmeding> Perhaps that gets less annoying when you use lenses religiously and define those lenses cleverly
10:08:19 <tomsmeding> or perhaps some deriving-via trick where the via datatype has some insane type-level list declaring lots of encoding info
10:08:28 <tomsmeding> but then you arrive in generics land again :p
10:09:14 potash joins (~foghorn@user/foghorn)
10:09:34 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
10:09:55 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
10:11:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
10:11:54 ec_ joins (~ec@gateway/tor-sasl/ec)
10:12:56 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
10:12:56 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
10:16:47 stiell joins (~stiell@gateway/tor-sasl/stiell)
10:16:54 × potash quits (~foghorn@user/foghorn) (Ping timeout: 255 seconds)
10:18:16 ChaiTRex joins (~ChaiTRex@user/chaitrex)
10:26:48 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
10:31:07 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 252 seconds)
10:32:17 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
10:33:38 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
10:35:37 ec_ joins (~ec@gateway/tor-sasl/ec)
10:37:32 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
10:38:05 potash joins (~foghorn@user/foghorn)
10:38:09 × mastarija quits (~mastarija@2a05:4f46:e03:6000:6cf2:8564:eee7:713a) (Quit: WeeChat 3.7.1)
10:39:29 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
10:42:34 mastarija joins (~mastarija@2a05:4f46:e03:6000:df44:bef1:e897:d142)
10:45:02 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
10:45:25 × mastarija quits (~mastarija@2a05:4f46:e03:6000:df44:bef1:e897:d142) (Client Quit)
10:45:43 ec_ joins (~ec@gateway/tor-sasl/ec)
10:45:50 × son0p quits (~ff@2604:3d08:5b7f:5540::37af) (Ping timeout: 260 seconds)
10:50:04 stiell joins (~stiell@gateway/tor-sasl/stiell)
10:52:12 × poscat quits (~poscat@2408:8206:4823:5a14:59fc:9fd:2bdc:2771) (Quit: Bye)
10:55:04 poscat joins (~poscat@2408:8206:4821:f702:d964:a961:eb17:d7fd)
10:59:45 × dextaa quits (~DV@user/dextaa) (Quit: Ping timeout (120 seconds))
11:00:06 dextaa joins (~DV@user/dextaa)
11:02:18 accord joins (uid568320@id-568320.hampstead.irccloud.com)
11:02:56 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:08:46 <albet70> there is a string "a\r\nb\r\nc", how to replace this character '\r' to a string "\r\n" in it?
11:10:55 × pyrex quits (~pyrex@user/pyrex) (Ping timeout: 260 seconds)
11:11:06 <tomsmeding> albet70: try to use concatMap
11:11:58 xff0x joins (~xff0x@ai071162.d.east.v6connect.net)
11:12:02 <albet70> tomsmeding , sorry I don't get it
11:12:30 pyrex joins (~pyrex@user/pyrex)
11:14:08 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
11:15:33 <albet70> I try use Data.ByteString.readFile to get a binary data, then use decodeUtf8With and unpack get a String, but this String contain line break, I put that string into html, it get errors "string literal contains an unescaped line break", after I remove '\r' and '\n' in that string, no error any more
11:16:21 <albet70> this character '\r' or '\n' inside a string, isn't string? I'm confused
11:17:04 <tomsmeding> albet70: you mean JS, not HTML, I guess?
11:17:12 <albet70> yes
11:17:23 <tomsmeding> in general you'll need to escape things then, for example when the string contains a "
11:17:24 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
11:17:35 <tomsmeding> if you don't escape that, JS will see "hello"etc"
11:17:38 <tomsmeding> which makes no sense
11:18:38 <albet70> so I should check that haskell string if it contain " at first?
11:18:50 <tomsmeding> yes, and newlines, and other characters that need to be escaped
11:19:04 <albet70> put a haskell string to js is really weird
11:19:16 <tomsmeding> you're generating code
11:19:22 <tomsmeding> generating code means that you need to escape things
11:20:53 <tomsmeding> this is not specific to haskell or JS
11:21:02 <tomsmeding> if you'd generate JS code from JS, you'd need to escape strings as well
11:21:09 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
11:21:12 <tomsmeding> bye
11:21:13 <tomsmeding> lol
11:27:16 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
11:28:16 × CiaoSen quits (~Jura@p200300c95716a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
11:29:22 <davean> Its a little specific to JS in that JS has the escapign scheme that matters here.
11:31:34 califax joins (~califax@user/califx)
11:33:15 <davean> If it was a length tracked string specification then we'd be prepending instead of escaping.
11:34:01 <tomsmeding> true -- though escaping is a general theme when generating code in another programming language
11:34:03 <albet70> "\r\n" in haskell are two characters, how to turn it to string
11:34:28 <albet70> fmap (<> "\r\n") $ lines aString, doesn't work
11:34:33 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
11:34:45 <tomsmeding> albet70: Be sure to remember the difference between _code_ and _data_.
11:35:20 <tomsmeding> The bytes "hi\"abc" are haskell code; this code gets parsed (by GHC) and evaluates to the following data in memory: hi"abc
11:35:22 <albet70> then how to transformer code and data
11:35:37 × thegeekinside quits (~thegeekin@189.217.82.244) (Read error: Connection reset by peer)
11:35:47 <tomsmeding> in JS these two happen to be the same, because JS and Haskell string escaping rules are similar (though not equal)
11:36:17 <tomsmeding> So if you have hi"abc in a haskell string, and you want to generate JS code that uses this string, you must generate JS _CODE_ that EVALUATES TO this string
11:36:36 <tomsmeding> thus, you must produce "hi\"abc" in your output
11:36:53 <tomsmeding> which you can accomplish in Haskell using, for example: putStrLn "\"hi\\\"abc\""
11:37:10 <tomsmeding> this is Haskell code that generates JS code that evaluates to the string hi"abc
11:37:13 <albet70> yes, I tried "\"" <> "hi\"abc" <> "\""
11:37:30 dnlsur joins (~textual@r186-50-121-2.dialup.adsl.anteldata.net.uy)
11:37:40 <tomsmeding> the Haskell notation "hi\"abc" represents the data hi"abc
11:37:58 <tomsmeding> so you're now printing this: "hi"abc"
11:38:00 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
11:38:01 <tomsmeding> that is not valid JS
11:38:04 <albet70> three backslash
11:38:18 <geekosaur> yes
11:38:31 <geekosaur> first \\ which becomes \, then \" which becomes "
11:38:46 stiell joins (~stiell@gateway/tor-sasl/stiell)
11:39:14 <albet70> those transform are too brainf**ked, is there a library or module to do it?
11:39:36 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 268 seconds)
11:39:54 <albet70> double quote, line break, and other special character need to transform like tab?
11:39:57 <davean> If you had it was Text, you probably want to use replace, like: replace "\\" "\\\\"
11:40:09 <davean> albet70: So, look at the JS spec
11:40:12 <albet70> it would be lot
11:40:14 <davean> it'll tell you what has to be escaped how
11:41:02 <davean> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences will do
11:41:33 <davean> 13 cases?
11:41:54 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
11:42:07 <mauke> if it's in HTML, you also have to think about </script and <!--
11:42:30 <albet70> tomsmeding, did your pastbin has this problem?
11:43:08 <albet70> 13 cases is a lot
11:44:15 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
11:44:31 <davean> If you say so
11:49:17 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
11:49:41 stiell joins (~stiell@gateway/tor-sasl/stiell)
11:52:16 <tomsmeding> albet70: my pastebin doesn't generate JS code, just HTML, so this suffices https://github.com/tomsmeding/pastebin-haskell/blob/master/Pages.hs#L83-L93
11:52:42 euandreh joins (~Thunderbi@179.214.113.107)
11:52:55 <tomsmeding> albet70: if you haven't done so yet, try looking (with your own eyes) at the JS code you're producing that you're getting the parse errors on
11:53:03 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
11:53:03 <tomsmeding> you should be able to see that you're generating nonsense JS
11:53:10 <tomsmeding> that should help you see what the core issue here is
11:53:26 stiell joins (~stiell@gateway/tor-sasl/stiell)
11:56:30 <davean> tomsmeding: hum, you scan the text twice for that. It seems you could single pass that ...
11:56:36 <tomsmeding> probably :)
11:56:59 <tomsmeding> Text.concatMap is probably also not the best way to do this, but it works (tm)
11:57:13 <davean> no, it wants to be a fold
11:57:32 <davean> so you can cut the text as you need and splice the parts together instead of rewriting it.
11:57:48 <tomsmeding> davean: oh, the two-pass thing is to prevent reallocation when unnecessary, I expected (without any kind of benchmarking) that that would be a very cheap check against a fairly expensive reallocate
11:57:52 <davean> er, not "rewriting" in the sense you probably read it, copying
11:58:08 <davean> tomsmeding: right, a fold version only reallocates the parts that change
11:58:15 <tomsmeding> but I did not put too much thought in this code :p
11:58:43 <davean> tomsmeding: The fold collects till it hits something in the set, breaks, escapes, appends, and then starts collecting again.
11:59:11 <davean> If you do it well, most of it can be references to the origional data using splices
11:59:20 <tomsmeding> well the source is a strict Text, I don't see how you can reallocate only "part" of a strict Text
11:59:30 <tomsmeding> I guess if the target is a lazy Text that could work
12:00:15 <davean> Right, and the lazy target references slices of the origional strict text
12:00:49 <davean> If it contains nothing to escape you get a single element lazy text
12:00:55 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
12:01:06 <davean> Or you can generate a builder
12:01:18 <davean> which most webservers can write well
12:01:19 <tomsmeding> yeah generating a lazy Text is probably the nicest way to do this
12:01:37 <tomsmeding> maybe lazy Text isn't even that much different from a Builder in this case
12:01:44 <davean> Its not in this case
12:02:32 <davean> A problem with this approach is its REALLY bad in the case where there are differences because you don't even have a good estimate plugged in of the destination size
12:02:57 <tomsmeding> true
12:03:12 <davean> Even making a strict output you're better going via the lazy in this case
12:03:22 <davean> (or equivilent builder)
12:04:37 <davean> Mind you, since you used concatMap it isn't as bad as it could be, because it builds the lazy list and then walks that to find the length
12:05:00 <davean> so you just produce a lot of small garbage and then do a 3rd pass over the data to gather the length, and a 4th to copy it
12:06:02 <davean> but if you directly folded to a lazy list it would be 1 pass to find out if there was anything to escape, and also escape it, one pass in something in the size of things that needed escaping (which is usually massively less than the length), and 1 pass to copy
12:06:27 <davean> effectively half the passes, and if you directly stream out the lazy, you already had to scan it that time so only 1
12:07:33 <davean> plus a massive reduction in garbage production
12:08:37 yuribarros joins (~yuribarro@2804:14c:65e4:865c::1000)
12:09:54 jakalx joins (~jakalx@base.jakalx.net)
12:12:07 <davean> Hum, do we not have an efficient Maybe remapping function for Text? We really should.
12:12:07 × yuribarros quits (~yuribarro@2804:14c:65e4:865c::1000) (Read error: Connection reset by peer)
12:12:16 × potash quits (~foghorn@user/foghorn) (Ping timeout: 252 seconds)
12:13:05 <davean> I'd think remap :: (Char -> Maybe Text) -> Text -> Text would be generally useful to have well implimented.
12:13:11 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
12:13:32 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
12:14:15 <tomsmeding> davean: what would be the advantage of that type over (Char -> Text) -> Text -> Text?
12:14:20 stiell joins (~stiell@gateway/tor-sasl/stiell)
12:14:20 <tomsmeding> surely Text.empty is cheap
12:15:16 <davean> tomsmeding: scanning over the ones you aren't changing.
12:15:33 <davean> depends on if the final text is strict or lazy
12:15:37 <tomsmeding> oh in that sense
12:16:06 <davean> but the Nothing case lets you scan forward so you copy in blocks, and don't have to resize buffers and such
12:16:25 <davean> Even with strict, it helps to know what is a block copy.
12:16:52 <davean> When you get a Maybe you bump a copy size counter so you don't have as many gathers to do.
12:17:11 <davean> er, when you get a Nothing.
12:17:23 <davean> You COULD do that with just Text, by doing an equality
12:20:40 <davean> well its a bit more than that too. Char is a complex type. Take a look at https://hackage.haskell.org/package/text-2.0.1/docs/src/Data.Text.html#filter for example.
12:21:21 <davean> So you really are best off with the Maybe encoding I think. It allows a number of optimizations.
12:21:45 <davean> tomsmeding: That make sense?
12:22:09 <gurkenglas> Hi, there's this folder of .hs files https://github.com/gwern/gwern.net/tree/master/build and I had vscode clone the repository and install haskell and a loooot of the modules used in those .hs files were missing, so i extracted the missing module names from the errors and asked a language model for packages containing those modules and ran parallel stack install ::: <what it replied>, but that didn't
12:22:15 <gurkenglas> seem to help vscode see em. Do I need to tell stack to make them globally available for naked .hs files?
12:22:40 aeroplane joins (~user@user/aeroplane)
12:24:59 <int-e> davean: But why can't you do the same optimizations on top of `concatMap`?
12:25:38 <gurkenglas> aka, can i tell the global stack.yaml to just fuck my shit up with all the installed packages, and then if there are namespace collisions let it throw errors?
12:26:05 <opqdonut> gurkenglas: btw looks like there are build instructions in https://github.com/gwern/gwern.net/blob/master/build/hakyll.hs
12:26:13 <opqdonut> but they use debian packages instead of stack/cabal
12:26:25 <gurkenglas> ooh, thanks. i happen to use debian too
12:26:42 <opqdonut> as for stack, why not just drop a stack.yaml into the directory
12:26:56 <opqdonut> and a whatever.cabal too of course
12:27:21 <gurkenglas> that sounds like what i can do if i ever want to have incompatible packages installed elsewhere on the same filesystem :3
12:27:38 <int-e> (The current implementation of concatMap in Data.Text is naive, since it goes via a list of all the Texts, but it doesn't have to be that way.)
12:27:51 <opqdonut> but I think if you `stack install` some stuff without a stack.yaml, they go into your global stack project, and should be available in `stack ghci` etc
12:27:54 wootehfoot joins (~wootehfoo@user/wootehfoot)
12:28:17 <gurkenglas> they didnt appear as entries in the global stack.yaml
12:28:27 <davean> int-e: for all the reasons I just discussed.
12:28:36 <opqdonut> gurkenglas: yeah they don't appear in the yaml file
12:28:52 <geekosaur> I think they don't go into a stack.yaml, they're just registered for use by other stack,.yaml files
12:29:30 <int-e> davean: I don't agree with any of those reasons. Yes, you can optimize stuff. But you don't actually need that Maybe to accomplish that.
12:29:47 <davean> int-e: this is specificly concatMap with a Maybe marker. Its a concatMap that is optimized for mostly non-changes
12:29:54 <davean> int-e: no you kinda can't. Look at filter.
12:30:11 <davean> int-e: concatMap has to build a Text, and then you've done all that writing.
12:30:16 <geekosaur> also there is no way for stack to use stuff installed via debian. this is not stack's fault; compiled Haskell has references to the exact ghc that compiled it and won;t work with a stack-installed ghc, only with `system-ghc: true`
12:30:20 <davean> concatMap *must* scrible all over memory
12:30:32 <int-e> davean: Wait. "Nothing" is supposed to mean that the character is reused directly? That makes more sense.
12:30:35 <davean> the type forces it
12:30:44 <int-e> Sorry, I probably should've read further back.
12:30:54 <davean> int-e: yes, Nothing means there is no remapping
12:31:03 <mauke> Nothing ~ T.singleton c
12:31:16 <davean> So you get to just bump pointer instead of scribble
12:31:18 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
12:31:24 <int-e> Okay. Yes, that makes sense.
12:31:55 <davean> This is the same trick filter uses
12:32:12 <gurkenglas> so, uh. vscode says it couldnt find Text.Pandoc, though I stack-installed pandoc. What am I missing?
12:33:12 <geekosaur> `stack install pandoc` is likely to install the pandoc executable and build and throw away the library instead of registering it
12:33:47 <geekosaur> I don't know offhand how you make it register pandoc-the-library without using a stack.yaml to declare a dependency on it
12:34:43 <davean> int-e: concatMap is actually really pathalogical, look at https://hackage.haskell.org/package/text-2.0.1/docs/src/Data.Text.html#concat
12:35:42 <davean> int-e: we have to walk the list of chars in the Text to get the length before we can start copying
12:35:54 <davean> which means we have an intermediate state where we store multiples of its size in memory!
12:36:01 <davean> and not even a small multiple
12:37:23 <davean> A data Array = ByteArray ByteArray# and 2 Ints.
12:39:03 acidjnk joins (~acidjnk@p200300d6e7137a26551ef8a97b851ff9.dip0.t-ipconnect.de)
12:39:05 <davean> Sadly we have to kinda use 2x space because we lack a way to partially deallocate as we go. But with the lazy/builder approach we just store a set of patches and serve via a gather which is super efficient.
12:39:17 <int-e> davean: I saw that, it could certainly be better.
12:39:23 <davean> and only uses 1x+patch memory
12:39:27 <int-e> davean: It's worse, it also allocates a full list.
12:39:36 <davean> int-e: yah, it does.
12:39:40 <davean> I meant to mention that.
12:39:42 <int-e> Since `concat` computes the total length first.
12:40:03 <int-e> I did mention that above though... and wrote that it *could* be better.
12:40:05 <davean> Basicly concatMap is like 10x the space of the text.
12:40:20 <davean> int-e: I'm not sure concatMap can be. There are other optimizations but I'm not sure they're better.
12:40:45 <davean> like you can do quadratic buffer segment resizings.
12:40:58 <davean> Thats only better in some ways. It involves more walks over memory.
12:41:01 <int-e> davean: Well, you can bite the buffer doubling bullet.
12:41:13 <int-e> (which isn't quadratic)
12:41:14 <davean> int-e: thats a lot worse from a memory bandwidth perspetive though
12:41:37 <davean> You're just choosing to optimize for memory usage over CPU performance.
12:41:43 <davean> Thats not "better" thats different.
12:41:47 <int-e> You should probably be using Data.Text.Lazy at that point anyway.
12:42:03 <int-e> Which is yet another trade-off of course.
12:42:08 <davean> yah, concatMap isn't a great function
12:42:27 <davean> hence a version optimized for minimal change :-p
12:42:39 <davean> it degrades to concatMap's current form in the worst case.
12:42:54 <int-e> (I have not checked what concatMap does there... I /hope/ it makes a stream and collects it into chunks. But I won't dig.)
12:43:19 <davean> no, its
12:43:20 <davean> concatMap f = concat . foldr ((:) . f) []
12:43:51 <int-e> that's okay for lazy consumption... okay I will have a look
12:44:22 <davean> int-e: but again, it can't be lazy because of concat.
12:44:41 <davean> concat needs to read the length to allocate the array size before any copying starts.
12:44:59 <davean> len = sumP "concat" $ L.map lengthWord8 ts'
12:44:59 <int-e> Ah, `concat` does not make any attempt to coalesce short chunks (except for omitting empty ones because those are forbidden)
12:45:25 <int-e> Okay. That's terrible for the recoding case (lots of very short fragments) too.
12:46:15 geekosaur wonders what this is doing to poor albet70…
12:47:27 __monty__ joins (~toonn@user/toonn)
12:47:28 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
12:47:33 <davean> int-e: "recode" might be a better name, or just "escape"
12:47:39 nate4 joins (~nate@98.45.169.16)
12:49:37 <mauke> data Replacement = Pass | Replace Text
12:49:57 <davean> mauke: thats a Maybe isomorphism :-p
12:50:36 <mauke> yes, but the semantics are clearer
12:50:44 <davean> Also I'd call that 'Replace', 'Replacement' to me is 'Char -> Replace'
12:51:07 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:51:19 <davean> or maybe more its 'Replacement :: (Char, Replace)'
12:52:07 <davean> I guess 'Char -> Replace' is 'Replacements'
12:52:17 <davean> It really doesn't need a singular
12:52:21 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
12:54:35 <int-e> davean: At least there are enough internals exposed that one can go via Data.Text.Internal.Lazy.Fusion.stream and unstream and do the concatenation on the stream level (using stuff from Data.Text.Internal.Fusion.Common.*)
12:54:56 vektor joins (~vektor@IP-185189141204.dynamic.medianet-world.de)
12:55:47 <davean> int-e: depending on what you want I don't think you'll get much of what you want - unless what you want is the doubling approach.
12:56:00 son0p joins (~ff@2604:3d08:5b7f:5540::ea0e)
12:56:33 <int-e> davean: This is for Data.Text.Lazy, so it would be a chunking approach (~16kb chunks by default) and only the final chunk will be resized in the end.
12:56:48 <davean> Ah, sure
12:57:13 <davean> for concatMap I guess?
12:57:21 <int-e> It's not great though, because there won't be any block copies.
12:57:42 <int-e> Then again the scenario was that the map function produces short fragments.
12:57:54 <davean> right map does, I was specificly avoiding that :-p
12:58:02 <int-e> Eh. It's all just theory, I don't have a pressing need for this right now.
12:58:34 <vektor> Is there a good way to constrain a type parameter? I have this data Expr x a = {...} type, and I know a priori that it only makes sense with certain types a. Can I move those constraints from the signature of *almost every function acting on Expr* to the definition of Expr? In my case it's Show and either RealFloat or Floating, not sure.
12:59:39 <davean> vektor: you're in Kinds and TypeFamilies territory, or perhaps you shoul go back and consider classes.
13:00:10 <davean> You REALLY DON'T want to move them though
13:00:13 <davean> They're where they SHOULD be
13:00:38 <davean> It changes semantics to move them.
13:00:56 <int-e> `text` is just surprisingly unsophisticated.
13:01:09 <c_wraith> it's also really nice when each type signature lists the things it actually needs.
13:01:10 <vektor> You think they should be there? I'm aware it changes semantics, but my type Expr with a non-Floating a makes *no* sense.
13:01:13 <davean> int-e: I mean there aren't any general solutions here.
13:01:29 <davean> vektor: no I mean it changes *what code gets run*
13:01:46 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
13:01:47 <davean> Where it goes changes the *code*
13:01:54 <davean> I know you think they're equivilent, they're not
13:01:59 <vektor> Oh yeah, I don't need to mess with that, that's fair.
13:02:07 <davean> you can use an existential to shove it into the datatype, but that shoves the dictionary in for example.
13:02:33 stiell joins (~stiell@gateway/tor-sasl/stiell)
13:02:37 <davean> and now the dictionary is carried in a different location
13:02:55 <mauke> what are the semantics of class constraints on data types again?
13:03:13 <davean> data Expr x a = forall x . Floating x => {...}
13:03:24 <davean> mauke: do you mean existentials?
13:03:27 <mauke> (not that one, that's a constructor constraint)
13:03:42 <vektor> Well, alright then, analogy by different but similar use case: How would physics engines handle "parametric" precision, where you can run the same basic code with f32 or f64 numbers, depending on your mood today?
13:03:54 <c_wraith> mauke: it puts the constraint on the constructor, but it doesn't do anything with the instance dictionary
13:03:59 <davean> mauke: then I don't know what you mean by class constraints on datatypes - every other constraint is on a function
13:04:23 <davean> vektor: PhysicsEngine precision
13:04:25 <mauke> c_wraith: ah
13:04:29 <mauke> that makes sense
13:04:47 <merijn> mauke: Constraints on datatypes were removed in Haskell2010
13:05:19 <c_wraith> well. removed by default. Last I checked you can still enable them (but you shouldn't)
13:05:26 <mauke> topdecl → data [context =>] simpletype [= constrs] [deriving]
13:05:37 <mauke> ^ that's from the 2010 report
13:05:37 <vektor> So same as Expr Float vs Expr Double? And literally every function that does anything with those has to specify if it wants to Show, Eq, Ord, whatever, those numbers?
13:06:08 <davean> vektor: For a VERY good reason, it changes *the calling convention of the function*
13:06:18 <tomsmeding> davean: yeah makes sense, sorry for the delay. Also saves allocation of lots of singleton Texts, which should help
13:06:25 <davean> What your'e imagining are not at all the same function calls.
13:06:26 <mauke> vektor: yes
13:06:46 <davean> vektor: you can make an alias for the shared constraints BTW
13:07:45 <davean> vektor: "f :: C c => c -> r" and "data D = forall c . C c => ..." "f :: D -> r" are DEEPLY different functions
13:07:55 <davean> vektor: you're thinking they're similar *they are not similar*
13:08:16 <davean> The case you showed was a little better
13:08:28 <davean> (Since you exposed it as 'D c')
13:08:33 <vektor> Ahh, the alias is a decent idea. So I'll just make my own typeclass FloatingWithBenefits that implies Floating and Show and whatever else I need. Then I just annotate everything with FloatingWithBenefits and have a lot less to worry about if I so much as print a value in a place I didn't think I'd have to. That'd help.
13:08:59 × zant quits (~zant@62.214.20.26) (Ping timeout: 260 seconds)
13:09:03 <davean> vektor: you can just do "type FloatingWithBenefits a = (Floating a, ...)"
13:09:10 <davean> thats a constraint type
13:09:20 <davean> so you can use type to make an alias for the constraints
13:09:22 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
13:09:24 <davean> no type class needed
13:09:57 <davean> vektor: so can you figure out why the example things above are completely different *semanticly*?
13:10:31 <mauke> merijn: https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-690004.2.1
13:10:50 <vektor> I'm not completely sure. I'd expect different internal behavior for type reasons. Dynamic dispatch or similar things, but nah, I don't know.
13:11:34 tremon joins (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl)
13:11:46 <mauke> yeah, pretty much
13:11:47 <davean> vektor: yes, the second is dynamically dispatched and has added a field holding a dictionary to D.
13:12:04 <mauke> that is, the second version packs an extra vtable into the data type
13:12:21 <mauke> so each value of that type can carry its own implementation of the class
13:12:30 <davean> The first version either passes the vtable as a parameter to the function, or eliminates it entirely.
13:12:43 <davean> the first version has a coherency property the second lacks.
13:13:07 <vektor> ohh, right, the second variant generates one function for a concrete D, but it doesn't know which flavor of C to use, so it has to solve that dynamically. The first variant can just generate one implementation for every C it comes in contact with.
13:13:10 <davean> mauke: of *every* class
13:13:18 <davean> vektor: yep
13:13:23 <vektor> Ewww
13:13:24 <mauke> davean: huh?
13:13:38 <davean> mauke: well, there could be multipel class constraints
13:13:49 <davean> vektor: this is why you don't move it!
13:14:27 <mauke> vektor: in practice, it probably doesn't generate different implementations for every instance of C
13:14:28 <vektor> Yeah, I see. I had hoped there was a construct that did what I wanted in a reasonable way.
13:14:36 <mauke> or does ghc aggressively specialize functions?
13:14:45 <davean> mauke: it agressively specializes usually.
13:14:58 <davean> mauke: usually, not universally, but usually.
13:15:21 <merijn> mauke: Statically known typeclasses are almost certainly inlined and specialised
13:15:23 <mauke> well, it can't be completely universally because you can create types at runtime :-)
13:15:53 <c_wraith> but if you know a function is likely to be called at only a couple instances, SPECIALIZE pragmas are nice
13:16:11 <vektor> I had hoped there was something like "Expr x a (Floating a, Show a) = [...] and it would just ensure that every a used in Expr x a ever had those type classes. Like moving the constraints, except without causing silliness in the process.
13:16:14 <davean> c_wraith: yah those are often redundent though.
13:16:36 <c_wraith> davean: I suspect they're most useful when doing cross-module stuff
13:16:40 <davean> vektor: so that can't be for a few reasons.
13:16:47 <davean> c_wraith: yah.
13:16:49 <mauke> vektor: unfortunately, every approach has some degree of silliness, only in different places
13:17:16 <davean> vektor: I could get into the details, but its litterly not possible to do that without semantic issues.
13:17:19 <vektor> mauke: Obviously haskell should've picked the one that moves all the silliness to places where I don't care about it, duh.
13:17:29 <davean> vektor: no, that can't exist.
13:17:36 <davean> thats litterly impossible.
13:17:46 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
13:17:55 <mauke> :-)
13:18:01 <davean> vektor: consider a varargs function.
13:18:12 <davean> vektor: you don't know if it'll be passed a D or not.
13:18:31 <davean> Your approach is vulnerable to a shell game.
13:18:48 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:18:52 <davean> We can derive a contradiction in any approach that tries to emulate what you want.
13:19:12 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
13:19:28 <vektor> davean: Obviously you eliminate varargs from the language then, because I've never used them ;)
13:19:59 <davean> vektor: They're not in the language
13:20:03 <mauke> Haskell is way ahead of you: there are no varargs
13:20:16 <davean> We can build them though.
13:20:44 <mauke> > [id (), id id (), id id id (), id id id id ()]
13:20:46 <lambdabot> [(),(),(),()]
13:20:55 <mauke> how many arguments does 'id' take?
13:20:59 <davean> mauke: 1
13:21:14 <davean> mauke: every function in Haskell takes 1 argument
13:21:25 <mauke> schöngefinkelt
13:21:51 × xilo quits (~yourname@user/xilo) (Quit: leaving)
13:22:04 <davean> so if you have "f :: a -> b -> c" that is actually short hand for "f :: a -> (b -> c)"
13:22:14 <davean> you give it one argument and get back a function that takes a b to produce a c
13:22:26 <int-e> > id id id id id id id id id id id id id id id id id id id id id id id id 1
13:22:32 <lambdabot> mueval-core: Time limit exceeded
13:22:37 <vektor> wat
13:22:37 <mauke> haha
13:22:52 <vektor> how?
13:23:01 <merijn> typechecking of that blows up
13:23:03 <int-e> vektor: it doesn't get to run, the type-checking takes too long when compiling
13:23:20 <davean> thats a LOT of type checking.
13:23:26 <mauke> :t id id id id id id id id id id id id id id id id id id id id id id id id 1
13:23:26 <lambdabot> Num a => a
13:23:32 <mauke> looks fine to me
13:23:49 <int-e> :t id `asArgOf` (\i -> i id id ())
13:23:50 <lambdabot> ((() -> ()) -> () -> ()) -> (() -> ()) -> () -> ()
13:23:54 <int-e> :t id `asArgOf` (\i -> i id id id ())
13:23:55 <lambdabot> (((() -> ()) -> () -> ()) -> (() -> ()) -> () -> ()) -> ((() -> ()) -> () -> ()) -> (() -> ()) -> () -> ()
13:24:01 <int-e> etc.
13:24:06 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds)
13:24:25 <vektor> :t id
13:24:26 <lambdabot> a -> a
13:24:31 <mauke> @src id
13:24:31 <lambdabot> id x = x
13:25:00 <int-e> in order to use `id id`, the first `id` has to be instantiated as (a -> a) -> (a -> a)
13:25:04 <davean> vektor: Welcome to the base mathematics. Here lies your problems.
13:25:23 <vektor> The base maths were supposed to solve my problems, not cause them!
13:25:25 <vektor> :D
13:25:47 <davean> vektor: yah, uh, thats what type aliases do in this case :-p
13:26:03 <vektor> int-e ahh yeah now that weird chain makes sense.
13:26:13 <davean> vektor: so there is another option
13:26:16 <davean> you can use a Kind
13:26:32 <davean> "PhysicsEngine (f :: Precision)"
13:26:45 <davean> "data Precision = P32 | P64"
13:27:16 <davean> type family PrecisionType P32 = Float
13:27:18 <davean> etc.
13:27:51 <vektor> davean: Yeah, I guess I could. But I'd have to read a few more chapters of the book to understand what I'm actually doing :D
13:27:54 xilo joins (~yourname@user/xilo)
13:28:14 <davean> vektor: Its actually not that bad.
13:28:27 <vektor> (Jokes aside, I should read on, but I'm being paid to read ML papers, not PL books)
13:28:40 <vektor> ML = machine learning
13:28:42 <davean> I basicly just wrote it for you (a little syntax needs to be fixed up)
13:28:49 <mauke> ML is a PL, technically
13:29:02 <vektor> mauke, but only the other ML, right?
13:29:09 <mauke> yeah :-)
13:29:20 zant joins (~zant@ip-109-40-242-105.web.vodafone.de)
13:29:21 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
13:29:21 <davean> vektor: We've just made a function of types and used a data type at the type level to act as an allowed set.
13:29:29 <vektor> TBF there's connections about PLs for ML, which is why I'm here.
13:29:40 <davean> Technically its not Haskell.
13:29:57 <davean> But lets ignore that because it works.
13:29:57 <merijn> Man...I wish GHC 8.10 was faster so this refactoring didn't take me forever >.>
13:29:57 freeside joins (~mengwong@103.252.202.193)
13:30:08 <davean> merijn: people still use GHC 8 series? :-p
13:30:28 <merijn> davean: Yes, because this shit needs to be refactored before I can move on to 9.x
13:30:33 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
13:30:38 <davean> merijn: ouch. Good luck!
13:30:45 ph88 joins (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4)
13:30:53 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
13:30:53 × ec_ quits (~ec@gateway/tor-sasl/ec) (Read error: Connection reset by peer)
13:30:59 <davean> to be fair 8.10 was a pretty good vintage.
13:31:08 <merijn> davean: old persistent doesn't support 9.x and new persistent broke, basically everything in my code
13:31:08 <davean> 9 had some rough bits.
13:31:27 <davean> Ah, I don't touch persistent.
13:31:36 <merijn> So I need to rework this code for new persistent before I can go to 9.2, but being big code + lots of TH == absolute shit compile times
13:31:41 <merijn> davean: Smart >.>
13:31:49 <davean> merijn: It was a well considered choice.
13:31:57 <davean> I read most libraries I consider using :-p
13:31:59 ph88^ joins (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4)
13:32:22 <merijn> davean: Well, writing a manual SQL schema was scary when I hadn't done SQL in ages
13:32:37 <merijn> but in hindsight woulda been the sane choice
13:32:38 ec_ joins (~ec@gateway/tor-sasl/ec)
13:32:56 <davean> merijn: Yah, persistent can't do a good job, theres no abstraction that can space the range.
13:33:07 <davean> And Haskell has some good SQL systems.
13:33:26 <davean> SQL is annoying though.
13:33:30 <merijn> persistent was nicer at first, the problem is that parts of it have grown into contradictory directions and now everything is kind of a mess
13:33:33 <davean> I'd avoid it if I could.
13:33:39 <merijn> davean: :O
13:33:41 <merijn> SQL = <3
13:33:56 <davean> Hey, its just the best option we have!
13:33:57 <merijn> My happiness is directly correlated too much of my stuff I managed to ram into SQLite
13:33:58 <davean> I can want better.
13:34:01 geekosaur wonders how much better the world would be if QUEL had won
13:34:29 <vektor> Man, SQL.... I need a haskell/rust kinda overhaul to that and latex.
13:34:43 <merijn> I mean, people keep trying to replace SQL with other stuff that's way, way worse
13:34:46 yuribarros joins (~yuribarro@2804:14c:65e4:865c::1000)
13:34:55 <vektor> I hate SQL, maybe a bit too much. Latex I love, but there's so much that could be done better by now.
13:34:59 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
13:35:23 ChaiTRex joins (~ChaiTRex@user/chaitrex)
13:35:35 × ph88 quits (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4) (Ping timeout: 260 seconds)
13:36:19 <tomsmeding> lol why does :t on id*50 give a result instantly whereas evaluating it takes forever
13:36:20 × cafkafk quits (~cafkafk@fsf/member/cafkafk) (Ping timeout: 255 seconds)
13:36:23 <davean> Well, have a nice night all, its been interesting! I hope you play with the different approachs vektor, I think you'll find some enlightenment in looking at what the two versions of the code that aren't existential crisises are like. When you're bored of ML papers.
13:36:40 <vektor> TBF, if haskellers had their way I'd reckon latex and sql would be DSLs within haskell.
13:36:44 Guest|84 joins (~Guest|84@p5dffbb7a.dip0.t-ipconnect.de)
13:36:56 <vektor> I might have a minute on the weekend to play around. Thanks davean
13:37:04 <davean> and tomsmeding you might have inspired me to contribute some of my regularly writen functions back to 'text'
13:37:05 <tomsmeding> vektor: latex needs to compile _faster_, not slower
13:37:14 × Guest|84 quits (~Guest|84@p5dffbb7a.dip0.t-ipconnect.de) (Client Quit)
13:37:19 <davean> vektor: SQL is a DSL inside Haskell
13:37:22 <merijn> tomsmeding: LaTeX needs better namespacing, modules, and errors
13:37:23 <davean> but I need to head out :)
13:37:27 <tomsmeding> merijn: true
13:37:57 <vektor> I'm not at all surprised that someone has rewritten SQL within haskell. Now take some substantial liberties and make it a sane user experience lol
13:38:26 <geekosaur> I suspect that absent row types it's not gonna be at all sane
13:38:46 <int-e> tomsmeding: yeah I don't know... speculation: type-checking works directly on the parsed Haskell code; running has to convert that to STG with explicit type applications and all that.
13:38:46 <davean> vektor: people might consider https://hackage.haskell.org/package/opaleye that for example, depending on your objective function.
13:38:52 <davean> but I've overstayed my time
13:39:22 <tomsmeding> int-e: oh, decent hypothesis, probably the Core is exponentially-sized whereas the types are only quadratic or something?
13:39:29 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
13:39:35 <vektor> not looking at the details, type safe and composable queries is the kinda stuff I'm thinking.
13:40:04 <davean> vektor: https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/Doc/Tutorial/TutorialAdvanced.lhs
13:40:06 <davean> > rangeOfChildrensAges :: Select (Field SqlText, Field SqlInt4)
13:40:08 <lambdabot> error:
13:40:08 <lambdabot> Not in scope: type constructor or class ‘Select’error:
13:40:08 <davean> > rangeOfChildrensAges = aggregate (p2 (A.groupBy, range)) (selectTable personTable)
13:40:08 <lambdabot> Not in scope: type constructor or class ‘Field’
13:40:10 <lambdabot> <hint>:1:22: error: parse error on input ‘=’
13:40:14 cafkafk joins (~cafkafk@fsf/member/cafkafk)
13:40:16 <davean> really though, I'm gone!
13:40:20 <int-e> tomsmeding: There's a lot of sharing inside those types for sure. I know too little about how ghc implements the underlying unification though.
13:40:27 <davean> (and don't advocate Opaleye)
13:41:02 <tomsmeding> int-e: wasn't the large-records work from well-typed also simply because the types in Core have no sharing whatsoever?
13:41:13 <merijn> davean: Can I advocate sqlite-simple and postgresql-simple? ;)
13:41:34 <int-e> tomsmeding: Actually... I guess there isn't much to unify. You only have direct equations a = b -> b to solve, nothing deeper. So at least naively there's nothing that would blow up there.
13:42:20 <tomsmeding> int-e: I guess the type checking itself doesn't necessarily blow up, just that the generated Core with full type annotations is ridiculously large
13:42:46 <tomsmeding> (which presumably gets instantly simplified down to nothing)
13:43:55 <int-e> tomsmeding: More precisely, I think type-checking does create the full types (albeit with sharing so it doesn't blow up yet), but they're never traversed. That only happens when translating to STG, and sharing is lost.
13:43:55 × razetime quits (~quassel@49.207.211.219) (Read error: Connection reset by peer)
13:44:14 <int-e> Or maybe it happens even later.
13:44:33 <tomsmeding> not already in generating Core? I'd be surprised if that only happens when going to STG
13:44:44 <tomsmeding> but anyway, sounds reasonable
13:44:52 <int-e> I don't know whether the type representation stays the same.
13:48:19 freeside joins (~mengwong@103.252.202.193)
13:49:33 stiell joins (~stiell@gateway/tor-sasl/stiell)
13:51:17 × zant quits (~zant@ip-109-40-242-105.web.vodafone.de) (Read error: Connection reset by peer)
14:00:25 irrgit_ joins (~irrgit@176.113.74.74)
14:02:11 cfricke joins (~cfricke@user/cfricke)
14:10:29 zant joins (~zant@62.96.232.178)
14:10:46 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:11:20 <int-e> tomsmeding: Oh. Sorry, yes, Core.
14:11:42 <int-e> Evidently I'm not fully here.
14:13:09 × dextaa quits (~DV@user/dextaa) (Ping timeout: 260 seconds)
14:16:20 × dnlsur quits (~textual@r186-50-121-2.dialup.adsl.anteldata.net.uy) (Ping timeout: 246 seconds)
14:19:31 titibandit joins (~titibandi@xdsl-78-35-173-119.nc.de)
14:20:31 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:21:10 potash joins (~foghorn@user/foghorn)
14:24:05 ft joins (~ft@p508dbd59.dip0.t-ipconnect.de)
14:28:35 × dsrt^ quits (~dsrt@76.145.185.103) (Ping timeout: 246 seconds)
14:30:15 × cafkafk quits (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection)
14:30:16 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
14:30:31 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
14:30:47 stiell joins (~stiell@gateway/tor-sasl/stiell)
14:30:51 cafkafk joins (~cafkafk@fsf/member/cafkafk)
14:32:18 × cafkafk quits (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection)
14:32:37 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
14:32:59 <tomsmeding> int-e: don't worry, it's irc :p
14:33:00 <merijn> bah
14:33:12 stiell joins (~stiell@gateway/tor-sasl/stiell)
14:33:18 <tomsmeding> hello dr merijn
14:33:26 <merijn> Changed 50 files to accommodate new persistent API and it's still not working as it should
14:33:54 <yin> i find myself using the pattern `uncurry h . (f &&& g)` which i found out it's called a fork in array based languages such as APL. is there a canonical way to do this in haskell?
14:34:22 <tomsmeding> :t \f g h -> uncurry h . (f &&& g)
14:34:23 <lambdabot> (a1 -> a2) -> (a1 -> b) -> (a2 -> b -> c) -> a1 -> c
14:34:46 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 252 seconds)
14:35:01 <tomsmeding> hm, if f = g it's h `on` f
14:35:06 <tomsmeding> Data.Function.on
14:35:39 <yin> yeah but the point is exaclty that f /= g
14:35:57 <yin> hence "fork"
14:35:57 <mauke> wait, which one was liftM2 again?
14:36:06 shriekingnoise joins (~shrieking@186.137.167.202)
14:36:32 <tomsmeding> liftM2 = liftA2 = \f x y -> f <$> x <*> y
14:36:43 <mauke> no, in terms of functions
14:36:46 <tomsmeding> @hoogle (a -> b) -> (a -> c) -> (b -> c -> d) -> a -> d
14:36:47 <lambdabot> No results found
14:36:49 <tomsmeding> sad
14:37:14 × ph88^ quits (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4) (Remote host closed the connection)
14:37:34 ph88^ joins (~ph88@2409:4055:69b:8d2b:683f:b539:7dcf:d718)
14:37:37 <mauke> :t \h f g x -> liftM2 h f g x
14:37:38 <lambdabot> (a1 -> a2 -> t1) -> (t2 -> a1) -> (t2 -> a2) -> t2 -> t1
14:37:42 cafkafk joins (~cafkafk@fsf/member/cafkafk)
14:37:58 <mauke> yeah, there we go
14:38:02 <tomsmeding> mauke++
14:38:06 <tomsmeding> neat
14:38:41 ss4 joins (~wootehfoo@user/wootehfoot)
14:38:42 <tomsmeding> https://hackage.haskell.org/package/data-aviary-0.4.0/docs/Data-Aviary-Birds.html#v:phoenix
14:39:14 <yin> great
14:39:57 <mauke> of course, the Applicative instance works too (and nicely decomposes)
14:40:06 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
14:40:39 <mauke> @pl \h f g x -> h (f x) (g x)
14:40:39 <lambdabot> liftM2
14:40:40 ChaiTRex joins (~ChaiTRex@user/chaitrex)
14:40:45 <tomsmeding> heh
14:40:50 <yin> nice!
14:40:50 <mauke> @pl \h f x -> h (f x) x
14:40:50 <lambdabot> flip flip id . liftM2
14:40:53 × foul_owl quits (~kerry@193.29.61.77) (Ping timeout: 256 seconds)
14:41:02 <mauke> @pl \h f x -> h x (f x)
14:41:02 <lambdabot> ap
14:41:26 <tomsmeding> exercise for the reader: query the types of flip, flip flip, flip flip flip, etc. and explain why this sequence converges
14:41:30 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds)
14:41:42 <mauke> there was a better one for h (f x) x
14:41:46 <mauke> I remember drawing it in paint
14:42:06 <mauke> @pl \x -> h x (f x)
14:42:06 <lambdabot> ap h f
14:42:13 <mauke> @pl \x -> h (f x) x
14:42:13 <lambdabot> h =<< f
14:42:19 <mauke> ah, there we go
14:43:33 <yin> tomsmeding: thanks... i *was* working
14:43:50 <tomsmeding> haha
14:45:13 × dtman34 quits (~dtman34@76.156.89.180) (Ping timeout: 268 seconds)
14:47:23 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:50:16 <tomsmeding> I'm not even sure there is a very satisfying explanation
14:51:20 dtman34 joins (~dtman34@2601:447:d000:93c9:9275:521b:dd0e:68f1)
14:51:39 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
14:52:00 <lortabac> a similar sequence is const, const const, const const const...
14:52:21 <tomsmeding> that one is easier to explain though :)
14:54:15 foul_owl joins (~kerry@193.29.61.77)
14:54:53 <yin> tomsmeding: that's the only kind of acceptable "exercises to the reader", the ones where there's no alternative to getting it on your own
14:55:29 × ph88^ quits (~ph88@2409:4055:69b:8d2b:683f:b539:7dcf:d718) (Read error: Connection reset by peer)
14:56:48 <tomsmeding> in any case simplifying the value-level definition gives more insight than looking at the types :p
14:58:06 <yin> in the const case yes, but in the flip case?
14:58:38 <yin> well
14:58:39 <tomsmeding> the crux is that apparently, (\x y -> x y flip) flip = \y -> flip y flip = \y u -> y u flip
14:58:51 <tomsmeding> but I'm not yet sure how to explain that one
14:59:01 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:59:12 freeside joins (~mengwong@103.252.202.193)
15:00:03 <yin> `flip flip flip flip === flip flip flip flip` is an insight, i guess...
15:03:24 <tomsmeding> did you mean to write `flip flip flip flip === flip flip flip`?
15:05:38 <yin> no!
15:05:58 <yin> i think i have an acceptable insight
15:06:07 <yin> @pl flip flip flip a
15:06:07 <lambdabot> flip a flip
15:06:11 <yin> @pl flip flip a flip
15:06:11 <lambdabot> flip flip a
15:06:48 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
15:07:03 × cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 260 seconds)
15:07:16 cods joins (~fred@82-65-232-44.subs.proxad.net)
15:07:51 <tomsmeding> nice
15:08:34 <tomsmeding> f f f f = f f1 f2 f3 = f1 f3 f2 = f f f
15:08:41 <tomsmeding> that makes lots of sense
15:09:16 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:09:24 <tomsmeding> :t flip flip flip
15:09:24 <lambdabot> (a1 -> ((a2 -> b -> c1) -> b -> a2 -> c1) -> c2) -> a1 -> c2
15:09:32 <tomsmeding> @djinn (a1 -> ((a2 -> b -> c1) -> b -> a2 -> c1) -> c2) -> a1 -> c2
15:09:32 <lambdabot> f a b = a b (\ c d e -> c e d)
15:09:50 <tomsmeding> i.e. \a b -> a b flip
15:12:12 <yin> i'm getting that feeling where a word loses its meaning when you keep repeating it
15:13:13 <yin> which is terribly appropriate! haha
15:13:17 <tomsmeding> yes :p
15:13:43 × Xeroine quits (~Xeroine@user/xeroine) (Read error: Connection reset by peer)
15:14:32 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
15:14:51 Xeroine joins (~Xeroine@user/xeroine)
15:15:34 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:d06:f4b:7f4f:76b1) (Quit: WeeChat 2.8)
15:16:31 jakalx joins (~jakalx@base.jakalx.net)
15:17:21 × ss4 quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
15:17:25 × stevenxl_ quits (~stevenxl@45.76.30.6) (Quit: leaving)
15:17:38 wootehfoot joins (~wootehfoo@user/wootehfoot)
15:17:54 × acidjnk quits (~acidjnk@p200300d6e7137a26551ef8a97b851ff9.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
15:22:20 money_ joins (~money@pool-100-11-18-203.phlapa.fios.verizon.net)
15:22:51 × money_ quits (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit)
15:27:14 dextaa joins (~DV@user/dextaa)
15:30:51 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
15:33:37 × TonyStone quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Remote host closed the connection)
15:34:59 azimut joins (~azimut@gateway/tor-sasl/azimut)
15:35:17 <albet70> I'm still don't know how to turn a character '\r' inside a String like "a\r\nb" to "a\\r\\nb", fmap can't do that
15:35:33 <mauke> no, but concatMap can
15:35:48 <albet70> @hoogle concatMap
15:35:48 <lambdabot> Prelude concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
15:35:48 <lambdabot> Data.List concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
15:35:48 <lambdabot> Data.Foldable concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
15:36:35 <mauke> > concatMap (\c -> if c == 'a' then "(@)" else [c]) "hallmark"
15:36:36 <lambdabot> "h(@)llm(@)rk"
15:36:51 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:38:03 <albet70> > concatMap (\x -> if x == '\r' then "\\r" else [x]) "a\r\nb"
15:38:05 <lambdabot> "a\\r\nb"
15:39:59 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:51:53 × vektor quits (~vektor@IP-185189141204.dynamic.medianet-world.de) (Quit: Client closed)
15:57:00 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
15:57:37 × Guest75 quits (~Guest75@178.141.153.191) (Quit: Client closed)
16:01:04 × tessier quits (~treed@98.171.210.130) (Ping timeout: 268 seconds)
16:01:48 Guest75 joins (~Guest75@178.141.153.191)
16:03:14 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
16:07:38 tessier joins (~treed@98.171.210.130)
16:09:35 vektor joins (~vektor@IP-185189141204.dynamic.medianet-world.de)
16:12:53 jakalx parts (~jakalx@base.jakalx.net) ()
16:14:12 irrgit__ joins (~irrgit@89.47.234.74)
16:14:30 <tomsmeding> Is there a sensible subset of Haskell (or any other generic FP language) for which it holds that if term1 reduces (with beta/alpha, perhaps also eta) to term2, then term1 and term2 have the same most-general type?
16:15:04 × irrgit_ quits (~irrgit@176.113.74.74) (Ping timeout: 260 seconds)
16:15:09 <tomsmeding> a priori it is already clear that there _exists_ a type T such that term1 :: T and term2 :: T are valid, but this is not necessary the most-general type of both terms
16:15:59 <tomsmeding> e.g. `\x -> if x == x then x else x` has a smaller type than `\x -> x`, so one of these terms would not be in this subset
16:16:11 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
16:16:48 <tomsmeding> motivation: flip flip flip flip = flip flip flip, and they happen to have the same types as well, but can I somehow conclude that type equality without having to do tedious unification
16:18:22 jakalx joins (~jakalx@base.jakalx.net)
16:20:14 × dtman34 quits (~dtman34@2601:447:d000:93c9:9275:521b:dd0e:68f1) (Ping timeout: 265 seconds)
16:21:11 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds)
16:21:36 × irrgit__ quits (~irrgit@89.47.234.74) (Ping timeout: 252 seconds)
16:21:51 thegeekinside joins (~thegeekin@fixed-187-188-105-74.totalplay.net)
16:22:00 irrgit__ joins (~irrgit@176.113.74.74)
16:22:54 <vektor> Anyone want to monad-golf with me? https://paste.tomsmeding.com/hskha3pp
16:25:04 <tomsmeding> smells like a continuation monad
16:25:38 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 252 seconds)
16:25:45 <tomsmeding> vektor: what's the 'a'? Is that relevant to the point here?
16:26:11 <vektor> Nah, sorry. Should've removed that. It's the precision of the underlying computations, if you recall my previous question
16:27:42 <tomsmeding> vektor: why does bindLocally take and return a string?
16:28:51 freeside_ joins (~mengwong@185.223.152.46)
16:29:03 dtman34 joins (~dtman34@76.156.89.180)
16:30:36 jlgw joins (~jw@46-162-74-53.cust.bredband2.com)
16:31:10 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
16:31:19 <vektor> Ohh, I'm kinda sloppy in my draft there. Basically, I want bindLocally to use the string argument and the Supply to generate a definitely-unique hopefully-useful name for the variable. The argument is the semantics, the Supply the uniqueness. The entire name should be returned, such that the variable can be called back up in the someOtherExpr.
16:31:51 <tomsmeding> Supply = State?
16:32:17 <vektor> Control.Monad.Supply
16:32:19 <vektor> but close enough
16:32:54 <vektor> I think supply is pretty much just a State (enum) with some added logic.
16:33:06 <tomsmeding> does it have a transformer variant
16:33:16 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds)
16:34:22 <mauke> SupplyTeacher
16:34:27 CiaoSen joins (~Jura@p200300c9572f60002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
16:34:29 <vektor> Not that I can see, but basically I think you can homebrew that easily.
16:36:32 <tomsmeding> vektor: just jotted a few things down, no idea if it works, but https://paste.tomsmeding.com/RkzEGFFF
16:36:54 <tomsmeding> Control.Monad.{State.Strict,Cont}
16:36:58 freeside joins (~mengwong@103.252.202.193)
16:37:48 <vektor> Thanks, I'll see if I can get it to work for me. :)
16:38:15 fockerize joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
16:38:36 × freeside_ quits (~mengwong@185.223.152.46) (Ping timeout: 265 seconds)
16:39:15 <tomsmeding> vektor: you may well be able to swap the transformers, i.e. ContT IRExpr (Supply Int)
16:39:27 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
16:39:36 <tomsmeding> then use ContT instead of cont, elide the 'lift', and insert some <$> in the body of ContT
16:40:08 <vektor> That choice depending on whether I want easier access to Cont or Supply, right?
16:40:18 <tomsmeding> there probably is a semantic difference :D
16:40:32 <tomsmeding> but not sure whether that difference is relevant if you don't callCC or shift/reset or anything
16:41:03 <tomsmeding> @unmtl ContT IRExpr (State Int)
16:41:04 <lambdabot> err: `ContT IRExpr (State Int)' is not applied to enough arguments, giving `/\A. (A -> Int -> (IRExpr, Int)) -> Int -> (IRExpr, Int)'
16:41:18 <tomsmeding> @unmtl ContT IRExpr (State Int) a
16:41:18 <lambdabot> (a -> Int -> (IRExpr, Int)) -> Int -> (IRExpr, Int)
16:41:27 <tomsmeding> @unmtl StateT Int (Cont IRExpr) a
16:41:27 <lambdabot> Int -> (a -> Int -> IRExpr) -> IRExpr
16:41:43 <tomsmeding> I guess the most intuitive is thinking about which of these you want
16:41:46 × freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
16:41:58 freeside joins (~mengwong@185.223.152.95)
16:42:00 <tomsmeding> as the type of runM
16:42:40 acidjnk joins (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de)
16:42:54 <mauke> the nice thing about abstractions is that we can remove them to make it easier to understand our code
16:44:35 × tessier quits (~treed@98.171.210.130) (Ping timeout: 264 seconds)
16:44:38 <aeroplane> I've created a little haskell guard snippet or emacs. http://ix.io/4hvN/elisp
16:44:48 <aeroplane> *for
16:46:00 tessier joins (~treed@98.171.210.130)
16:46:36 <tomsmeding> vektor: hm not sure it works
16:47:52 × ubert quits (~Thunderbi@2a02:8109:abc0:6434:8400:d733:83f7:3040) (Remote host closed the connection)
16:49:11 nate4 joins (~nate@98.45.169.16)
16:51:55 × CiaoSen quits (~Jura@p200300c9572f60002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
16:52:43 <tomsmeding> hm, seems to work!
16:53:21 <tomsmeding> vektor: https://paste.tomsmeding.com/7oL9fFCu
16:53:43 <tomsmeding> oh ignore the commented-out 'literal'
16:54:07 <vektor> I think I nerdsniped someone? :D
16:54:14 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds)
16:54:38 <tomsmeding> this is the second time in my life I've successfully used Cont
16:55:05 <tomsmeding> first time was https://github.com/tomsmeding/pastebin-haskell/blob/play/snap-server-utils/src/Snap/Server/Utils/ExitEarly.hs
16:55:29 <tomsmeding> (which should have been a newtype over ContT)
16:57:07 × money quits (Guest625@user/polo) ()
16:57:10 <tomsmeding> mauke: I mean, who ever understands monad transformer stacks intuitively, including differences in semantics due to ordering
16:57:12 <tomsmeding> without rote memorisation
16:57:38 × euandreh quits (~Thunderbi@179.214.113.107) (Ping timeout: 256 seconds)
17:00:07 <tomsmeding> vektor: I nerdsniped yin before with the flip^4 thing, so this was karma
17:00:16 <vektor> Heh
17:00:29 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
17:02:25 <vektor> So which stack ordering is more useful? My thinking is I only need the state to build local variable names, and then it's not too far from using the Cont to build up an expression piece by piece. Meanwhile, building up an expression piece by piece is not restricted to local variables.
17:03:09 tomsmeding is not quite sure what happens if you flip the stack
17:03:14 <tomsmeding> pun intended
17:05:22 <tomsmeding> ¯\_(ツ)_/¯
17:05:29 <tomsmeding> seems to work just as well with stack flipped
17:06:06 <tomsmeding> - runM m = runCont (evalStateT m 0) id
17:06:06 <tomsmeding> + runM m = evalState (runContT m return) 0
17:06:11 <tomsmeding> - lift $ cont (\f -> IRLetIn name rhs (f name))
17:06:12 <tomsmeding> + ContT (\f -> IRLetIn name rhs <$> f name)
17:06:23 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
17:06:58 <vektor> Oh, and by messing around with the cont in letin, I can even adapt it for situations where I want to Continue on a different branch of the syntax tree. Neat.
17:07:34 × tessier quits (~treed@98.171.210.130) (Ping timeout: 260 seconds)
17:07:57 <tomsmeding> vektor: if you start doing anything else than just returning with an updated value in the cont, i.e. if you actually start to use different control flow, you should start watching out for the transformer stack ordering
17:08:22 <tomsmeding> I _think_ it has to do with whether the Supply state gets preserved when you "jump back" or something
17:08:55 <vektor> F in chat for the guy/gal who just gets pinged whenever anyone puts a space into controlflow O.o
17:09:29 <tomsmeding> if you choose a name like that, it's your own fault
17:09:43 <vektor> yeah
17:10:26 <tomsmeding> there's also an 'n p' (without the space) in the channel, which is a common abbreviation too
17:10:45 <vektor> p versus that one person on this channel.
17:10:57 <tomsmeding> yes
17:11:25 <tomsmeding> I also get pinged whenever someone posts a pastebin link
17:11:30 × thegeekinside quits (~thegeekin@fixed-187-188-105-74.totalplay.net) (Remote host closed the connection)
17:11:40 <geekosaur> didn't I give you a filter for that?
17:11:51 <tomsmeding> you _may_ have
17:12:18 ubert joins (~Thunderbi@p200300ecdf264efbe3b3853aa4aea7d2.dip0.t-ipconnect.de)
17:12:38 <tomsmeding> heh back in 2021 there was a 'you' in the channel
17:12:59 <vektor> So basically if my Supply starts giving me duplicate names, I know to take a closer look at wtf I'm doing with my monad stack
17:13:17 <tomsmeding> yes, but I hope for your sanity you catch it earlier than that
17:13:20 <vektor> On this note I'm kinda happy I put the k in the username :D
17:13:52 <vektor> TBF, it's kinda simple to put a quickcheck invariant that all LetIns should have their own variable IDs
17:14:11 tessier joins (~treed@98.171.210.130)
17:14:23 Guest9072 joins (~Guest90@2401:4900:1f2d:8dc1:988a:4e1c:aabe:fec3)
17:14:31 × Guest9072 quits (~Guest90@2401:4900:1f2d:8dc1:988a:4e1c:aabe:fec3) (Client Quit)
17:17:17 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection)
17:20:45 sam joins (~sam@129.234.0.191)
17:20:51 sam is now known as dignissimus
17:21:25 × cafkafk quits (~cafkafk@fsf/member/cafkafk) (Quit: WeeChat 3.6)
17:21:30 × dignissimus quits (~sam@129.234.0.191) (Changing host)
17:21:30 dignissimus joins (~sam@user/dignissimus)
17:23:18 econo joins (uid147250@user/econo)
17:26:50 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
17:32:30 × avicenzi quits (~avicenzi@2a00:ca8:a1f:b004::c32) (Remote host closed the connection)
17:34:19 × Alex_test quits (~al_test@178.34.163.118) (Ping timeout: 252 seconds)
17:34:33 AlexNoo_ joins (~AlexNoo@178.34.150.202)
17:34:37 Alex_test joins (~al_test@178.34.150.202)
17:34:41 × AlexZenon quits (~alzenon@178.34.163.118) (Ping timeout: 252 seconds)
17:34:44 × AlexNoo quits (~AlexNoo@178.34.163.118) (Ping timeout: 248 seconds)
17:34:47 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
17:35:02 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 256 seconds)
17:36:30 AlexNoo_ is now known as AlexNoo
17:37:05 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
17:38:12 ub joins (~Thunderbi@p548c9ce5.dip0.t-ipconnect.de)
17:38:32 AlexZenon joins (~alex@178.34.150.202)
17:39:15 mastarija joins (~mastarija@2a05:4f46:e03:6000:ff3e:5e97:30a3:2fd6)
17:39:23 × ubert quits (~Thunderbi@p200300ecdf264efbe3b3853aa4aea7d2.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
17:39:23 ub is now known as ubert
17:40:30 stiell joins (~stiell@gateway/tor-sasl/stiell)
17:40:46 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
17:42:21 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:45:00 AlexZenon parts (~alex@178.34.150.202) ()
17:45:11 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
17:45:43 × Alex_test quits (~al_test@178.34.150.202) (Quit: ;-)
17:45:44 azimut joins (~azimut@gateway/tor-sasl/azimut)
17:45:47 × califax quits (~califax@user/califx) (Remote host closed the connection)
17:46:00 × AlexNoo quits (~AlexNoo@178.34.150.202) (Quit: Leaving)
17:46:38 califax joins (~califax@user/califx)
17:47:50 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c)
17:49:28 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
17:50:37 AlexZenon joins (~alzenon@178.34.150.202)
17:50:40 AlexNoo joins (~AlexNoo@178.34.150.202)
17:52:06 × dignissimus quits (~sam@user/dignissimus) (Quit: WeeChat 3.7.1)
17:52:28 Alex_test joins (~al_test@178.34.150.202)
17:57:45 × titibandit quits (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection)
17:59:54 <__monty__> Is there a widely used type class for cyclic orderings? A > B > C > A...
18:01:00 <iqubic> I'm not sure there is.
18:09:38 paulpaul1076 joins (~textual@95-29-5-111.broadband.corbina.ru)
18:15:14 × aeroplane quits (~user@user/aeroplane) (Ping timeout: 255 seconds)
18:16:34 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
18:20:02 × causal quits (~user@50.35.83.177) (Quit: WeeChat 3.7.1)
18:23:52 <dsal> That's pretty weird, because normally one would expect that if A > B and B > C then A > C. If you had four items, such that C > D then what would the relationship between A and C be?
18:25:39 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
18:26:40 <segfaultfizzbuzz> i've used ghcup to install stack, but when i try to run stack in my terminal, my ubuntu linux operating system can't find it,... i installed stack several reboots ago so this isn't a freshen up your paths thing i would expect,... what am i doing wrong?
18:27:56 <segfaultfizzbuzz> ghcup whereis stack reports ~/.ghcup/bin/stack-2.9.1
18:28:56 <geekosaur> sounds like you forgot to 'set' it?
18:29:09 euandreh joins (~Thunderbi@179.214.113.107)
18:30:25 <geekosaur> if you `ghcup tui`, how many checkmarks are next to `stack-2.9.1`?
18:30:49 <geekosaur> (1 means installed, 2 means set as current version)
18:30:54 <iqubic> dsal: We're modeling a game of Rock Paper Scissors.
18:31:19 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
18:31:38 dnlsur joins (~textual@r186-49-240-19.dialup.adsl.anteldata.net.uy)
18:32:29 × dnlsur quits (~textual@r186-49-240-19.dialup.adsl.anteldata.net.uy) (Client Quit)
18:32:49 <dsal> iqubic: Sure, I understand. But the question is whether there's a generalized way to do that, and I don't think it makes sense. It means you have to have a thing that's less than something that's greater than something than greater than it.
18:33:36 <dminuoso> tomsmeding: All these "solutions" are the reason why I want attaching data to fields in the first place/
18:33:39 <geekosaur> segfaultfizzbuzz, alternately you can just run `ghcup set stack 2.9.1` and then `hash -r`
18:34:15 <geekosaur> just installing something does not set it as current, since you may want to have multiple versions installed
18:34:31 <dminuoso> Yes you can sort of force them into Haskell system one way or another (be it HKDs or via Tagged), but it causes a lot of artifacts and annoyance.
18:34:55 <dminuoso> But I dont want type level sort-of reflection. Im fine with TH reflection.
18:35:14 <dsal> You can rotate the enum, zip it to itself and get pairwise comparisons, but the "cyclical orderings" thing gets hard to reason about if you have more than or less than three items. At which point hardcoding the rules is the easiest approach.
18:35:30 <dminuoso> After a bunch of Haskell years, I have settled on considering TH to be drastically superior to type level metaprogramming.
18:36:25 <dminuoso> The code is easy to write, read and maintain, you can conjure up simple and effective diagnostics, you get good compile-time performance. Type level tricks avoid *all* of these.
18:41:07 × zant quits (~zant@62.96.232.178) (Ping timeout: 260 seconds)
18:42:29 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
18:47:29 <tomsmeding> dminuoso: > easy to write, read and maintain
18:47:31 <tomsmeding> X doubt
18:47:56 <tomsmeding> though the flexibility is indeed nice; I don't know anything about TH performance so can't say anything about that (never benchmarked it)
18:48:09 <tomsmeding> but I agree that all the "solutions" I mentioned are kludges
18:48:10 ChaiTRex joins (~ChaiTRex@user/chaitrex)
18:48:49 <tomsmeding> what would you like as a design for this though, new syntax for attaching info to fields, and exposing that info via a TH api so that some TH deriving (as opposed to generic deriving) code can make use of that?
18:50:50 <tomsmeding> though I guess, re easy W/R/maintain, that a lot is better than ghc generics
19:01:30 <lyxia> __monty__: you can model rock paper scissors using the cyclic group Z/3Z, and as far as operations are concerned they are simply mempty and (<>)
19:01:59 × mastarija quits (~mastarija@2a05:4f46:e03:6000:ff3e:5e97:30a3:2fd6) (Ping timeout: 264 seconds)
19:02:08 <lyxia> and an inverse function
19:05:42 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
19:05:43 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
19:06:06 jakalx joins (~jakalx@base.jakalx.net)
19:11:11 × vektor quits (~vektor@IP-185189141204.dynamic.medianet-world.de) (Quit: Client closed)
19:16:42 anpad joins (~pandeyan@user/anpad)
19:19:00 <Boarders___> is there a way with cabal to build a haddock showing the documentation for all packages you depend on?
19:19:12 <Boarders___> is there a tool to do this?
19:22:33 <monochrom> I turn on "documentation: True" in my $HOME/.cabal/config. Then cabal already does that.
19:22:37 × euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh)
19:24:07 <Boarders___> by cabal already does that, what do you mean? Where does it generate the documentation?
19:24:14 <monochrom> cabal build
19:24:23 <Boarders___> where is it located
19:24:45 <monochrom> I don't bother to remember. But cabal build's output has it for some reason. I just use that.
19:25:05 <Boarders___> ok, I'll try that - thanks
19:25:30 <monochrom> Well, the output has the path of the doc of the package in the current directory. Then I follow links.
19:26:16 <monochrom> OK, if you really just want docs of the dependencies, try my shell script: https://github.com/treblacy/hasdoc
19:28:43 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds)
19:30:34 <Boarders___> Tried out this hasdoc tool, seems like it doesn't work at all
19:31:06 <monochrom> I turn on "documentation: True" in my $HOME/.cabal/config.
19:31:59 <monochrom> Then maybe you have to force rebuild a lot of packages.
19:32:33 <monochrom> Although, why am I answering? There was no question.
19:33:46 <Boarders___> I rebuilt the documentation and can find it in the store, thanks
19:34:06 <Boarders___> I would prefer if I could do like with old cabal where you could build a local haddock index of all deps, I don't know if that is possible
19:34:42 <monochrom> New cabal doesn't have that.
19:34:51 <monochrom> You could go back to old cabal.
19:35:57 <Boarders___> thanks for the suggestion, but I have no interest in using old cabal
19:36:09 <Boarders___> I was just wondering if anyone knew any tools that did this sort of thing or new-cabal commands
19:36:33 <monochrom> I bet no.
19:36:40 × adium quits (adium@user/adium) (Quit: Stable ZNC by #bnc4you)
19:37:06 <monochrom> You know what, I am lazy, I wouldn't write hasdoc if not for new cabal heh.
19:41:01 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
19:43:06 × Xeroine quits (~Xeroine@user/xeroine) (Read error: Connection reset by peer)
19:43:45 Xeroine joins (~Xeroine@user/xeroine)
19:44:55 jmdaemon joins (~jmdaemon@user/jmdaemon)
19:45:20 adium joins (adium@user/adium)
19:45:47 × acidjnk quits (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
19:46:51 jakalx joins (~jakalx@base.jakalx.net)
19:46:56 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
19:48:22 kurbus joins (~kurbus@user/kurbus)
19:51:25 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
19:54:16 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:54:57 acidjnk joins (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de)
19:57:08 × tired quits (~tired@user/tired) (Quit: /)
19:57:23 × adium quits (adium@user/adium) (Quit: Stable ZNC by #bnc4you)
19:58:08 money joins (money@id-532813.tinside.irccloud.com)
19:58:33 tired joins (~tired@user/tired)
20:00:59 <__monty__> lyxia: Yes but what type class does it fit in? You seem to be suggesting Monoid?
20:02:06 <tomsmeding> perhaps the monoid can be "maximum"?
20:02:09 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
20:02:13 <tomsmeding> as in, "the winner of these two"
20:02:32 <tomsmeding> surely that's associative, though 'mempty' is undefied
20:02:33 <monochrom> But it's rock-paper-scissor so not even a partial order.
20:02:34 <tomsmeding> so, Semigroup
20:02:45 <kurbus> oh is this advent of code talk?
20:02:49 tomsmeding has no clue
20:02:52 <monochrom> And group doesn't have a notion of successor.
20:03:17 <monochrom> OK cyclic group has a notion of successor but now it's two steps away from monoid.
20:03:20 <tomsmeding> okay scratch my use of the word "maximum"
20:03:39 <tomsmeding> oh scratch all what I say makes no sense
20:03:53 <tomsmeding> is not a semigroup, not associative
20:03:55 <monochrom> How many rock-paper-scissor types do you have anyway? I doubt you need a type class.
20:04:07 × money quits (money@id-532813.tinside.irccloud.com) (Changing host)
20:04:07 money joins (money@user/polo)
20:04:07 money is now known as polo
20:04:40 adium joins (adium@user/adium)
20:05:04 <monochrom> Bah, I run into the irony that to define a pattern synonym I want, I need view patterns. -_-
20:06:13 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
20:06:54 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
20:07:25 santa_kurbus joins (~santa_kur@168.9.25.41)
20:07:55 <tomsmeding> monochrom: why is that irony?
20:08:08 <tomsmeding> almost all nontrivial pattern synonyms need view patterns
20:08:25 × santa_kurbus quits (~santa_kur@168.9.25.41) (Client Quit)
20:08:25 <monochrom> Oh! haha OK I feel better.
20:08:35 lortabac joins (~lortabac@2a01:e0a:541:b8f0:ea96:a847:5069:64f8)
20:08:43 <monochrom> "This is state-of-art best practice." "This is fine."
20:08:44 <EvanR> the rps question involves a group right
20:08:50 kurbus joins (~kurbus@user/kurbus)
20:08:54 <tomsmeding> they end up looking strange, pattern Something a b c <- (f something -> (a,b,c))
20:08:57 kurbus is now known as holly_jolly_kurb
20:09:19 holly_jolly_kurb is now known as kurbus
20:09:34 <tomsmeding> and then you have these https://github.com/AccelerateHS/accelerate/blob/master/src/Data/Array/Accelerate/AST/Idx.hs#L79
20:10:02 <tomsmeding> EvanR: which one
20:10:28 <monochrom> I don't mind the syntax. I mind being analogous to "I wrote an Agda compiler that works by desugaring Agda to PHP" >:)
20:10:29 nihonium joins (~nihonium@109-252-9-82.nat.spd-mgts.ru)
20:10:41 <tomsmeding> lol it's not quite that bad, is it
20:11:03 <monochrom> heh I'm exaggerating, but it's Friday so "this is fine".
20:11:07 <tomsmeding> re syntax, look at the link; two -> in a row
20:11:28 <tomsmeding> that may or may not need some () to disambiguate for human readers
20:11:45 <monochrom> Yeah that one could use a pair of parentheses around the lambda.
20:12:05 kurbus is now known as festive_kurbus
20:13:09 <EvanR> tomsmeding, er nvm. Just that it requires you reverse the win lose computation
20:13:23 <EvanR> which isn't a group anymore because you leave the type
20:14:39 kenran joins (~user@user/kenran)
20:14:54 <EvanR> your arrows look weird but it could be worse, arrows used prefix or postfix
20:15:24 <tomsmeding> not sure you can use these anything but infix, they're the lambda -> arrow and the view-pattern -> arrow :p
20:15:45 <EvanR> amen
20:15:46 × kenran quits (~user@user/kenran) (Remote host closed the connection)
20:17:30 <EvanR> actual ruby syntax
20:17:32 <EvanR> succ = ->(x) {x + 1}
20:28:08 <tomsmeding> EvanR: that's not standard ruby syntax, right? I hope?
20:29:42 <c_wraith> it is
20:30:39 <c_wraith> ruby faceplanted on syntax in several ways. That's actually a bandaid they added later to cover up some of the damage
20:34:39 <monochrom> Oh! "I wrote an Agda compiler, it works by desugaring to Ruby!" >:)
20:37:42 × festive_kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
20:38:44 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:ea96:a847:5069:64f8) (Quit: WeeChat 2.8)
20:40:06 × barrucadu quits (~barrucadu@carcosa.barrucadu.co.uk) (Quit: brb)
20:42:16 ARJ0019 joins (~arj0019@162.218.254.7)
20:42:28 sajith_ is now known as sajith
20:42:59 × tessier quits (~treed@98.171.210.130) (Ping timeout: 256 seconds)
20:43:17 barrucadu joins (~barrucadu@carcosa.barrucadu.co.uk)
20:43:33 <mauke> wasn't there some kinf of {|params| ...} thing?
20:43:39 <mauke> *kind
20:44:09 <c_wraith> yes, that's a block. which is different from a function (Proc) object, because... bad choices
20:44:53 <monochrom> https://www.smbc-comics.com/comic/dualism applies. >:)
20:44:54 mniip joins (mniip@libera/staff/mniip)
20:45:22 pavonia joins (~user@user/siracusa)
20:45:26 jargon joins (~jargon@174-22-207-8.phnx.qwest.net)
20:46:41 <darkling> Bonus points for the use of "ontological".
20:47:11 kurbus joins (~kurbus@user/kurbus)
20:47:51 kurbus is now known as festive_kurbus
20:49:29 tessier joins (~treed@98.171.210.130)
20:50:40 nate4 joins (~nate@98.45.169.16)
20:50:59 × accord quits (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
20:52:26 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
20:52:26 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
20:52:26 wroathe joins (~wroathe@user/wroathe)
20:52:37 bravespear|2 is now known as Ranhir
20:53:58 × Ranhir quits (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
20:54:17 Ranhir joins (~Ranhir@157.97.53.139)
20:55:38 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds)
20:58:55 × mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 268 seconds)
21:00:10 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
21:01:35 × festive_kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
21:02:20 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
21:04:42 Sgeo joins (~Sgeo@user/sgeo)
21:08:04 gmg joins (~user@user/gehmehgeh)
21:12:27 ec_ is now known as ec
21:15:47 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 264 seconds)
21:19:13 × polo quits (money@user/polo) ()
21:20:31 polo joins (polo@id-532813.tinside.irccloud.com)
21:20:54 × polo quits (polo@id-532813.tinside.irccloud.com) (Changing host)
21:20:54 polo joins (polo@user/polo)
21:20:58 polo is now known as money
21:21:33 × money quits (polo@user/polo) (Client Quit)
21:22:05 money joins (money@user/polo)
21:22:58 VictorHugenay joins (~jh@user/VictorHugenay)
21:23:30 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
21:25:29 × VictorHugenay quits (~jh@user/VictorHugenay) (Quit: Konversation terminated!)
21:28:11 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
21:31:09 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
21:35:07 titibandit joins (~titibandi@xdsl-78-35-173-119.nc.de)
21:36:40 spoiledfieldbuck joins (~fieldbuck@mobile-access-5672d5-198.dhcp.inet.fi)
21:36:48 <spoiledfieldbuck> i am so angry
21:37:09 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
21:37:45 <spoiledfieldbuck> because functional programming elitist keep saying that every newbie should learn fp and 7 years ago they said that fp is only thing that will be done after 7 yars
21:38:05 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
21:38:06 <dsal> It's pretty much the only thing I do, so maybe they're onto something.
21:38:10 Erutuon joins (~Erutuon@user/erutuon)
21:39:12 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
21:39:31 <spoiledfieldbuck> 'but most of the fp community has been out of their mind!  i can see that uh there have been a lot of fp practices adopted into traditional programming but still
21:39:38 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
21:41:42 <geekosaur> that's more or less how it happens
21:42:04 <geekosaur> you get research languages that develop it and then it makes its way into mainstream languages
21:42:39 <geekosaur> nobody uses ALGOL any more but it has impacted every modern programming language
21:43:34 <spoiledfieldbuck> i am so so angry
21:44:01 oldsk00l joins (~znc@ec2-54-93-55-15.eu-central-1.compute.amazonaws.com)
21:44:22 <dsal> Why be angry?
21:45:21 <ARJ0019> "because functional programming elitist keep saying that every newbie should learn fp and 7 years ago they said that fp is only thing that will be done after 7 yars"
21:45:53 <mauke> traditional programming is functional programming
21:45:56 <dsal> People say all kinds of dumb things and do all kinds of dumb things.
21:46:00 <mauke> lambda calculus is older than assembler code
21:47:00 <ARJ0019> I get frustrated with "multi-paradigm" languages that claim to support FP and then just give a half assed lambda
21:47:22 <mauke> a "lam", if you will
21:48:02 × spoiledfieldbuck quits (~fieldbuck@mobile-access-5672d5-198.dhcp.inet.fi) (K-Lined)
21:49:26 <geekosaur> huh. must have been trolling other channels too
21:49:35 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
21:49:45 <geekosaur> also, are you saying they're on the lam? 🙂
21:50:07 ec joins (~ec@gateway/tor-sasl/ec)
21:50:27 <ARJ0019> Does anyone have experience with modeling equation domains effectively? Like for `a=b+c`, what is the correct way to model 'b=a-c' and 'c=a-b'. I am particularly concerned with managing conceptual complexity, ease of use. This is relevant to when I model mechanical engineering domains in software for analysis and design.
21:51:24 <dsal> I've done the simple thing when solving one of those "number" problems.
21:51:43 <dsal> I assume you're asking for something more complex than the parser examples have.
21:52:11 <jean-paul[m]> ARJ0019: If someone does have experience, what would you ask them?
21:52:19 <darkling> I've done trivial versions. Basically, build an AST of the equation and build functions to manipulate it.
21:53:18 <darkling> Implement operations like distributivity (both ways), associativity (both ways).
21:53:48 <darkling> The easy tricky bit in the general case is working out how to solve for a particular variable by simple rearrangements.
21:54:17 <darkling> The really hard tricky bit in the general case is solving for a particular variable in as many cases as possible. :)
21:54:38 <darkling> So it depends on what you're trying to achieve, really.
21:56:14 <darkling> There are symbolic computation tools out there which you could use for the heavy lifting end of things, but I suspect in many cases you can make it simpler than that.
21:56:22 <ARJ0019> My end goal is to have a library of engineering domains. Each domain has a set of equations that conceptually form relations between parameters. I do not have a good general approach for modeling the domains in an effective and clear way.
21:56:40 <ARJ0019> I have tried symbolic solvers before and it worked well, but it is slow.
21:57:28 <ARJ0019> @jean-paul I guess my question would just be how they achieved it
21:57:28 <lambdabot> Unknown command, try @list
21:58:34 <darkling> At that level of generality, my guess is that you're looking at either the symbolic solvers or a metric shedload of domain-specific results.
21:59:01 <monochrom> I would start with Mathematica and its C bindings.
21:59:29 <darkling> What's the open-source one? Octave?
21:59:34 <monochrom> Engineers already use Mathematica.
22:00:13 <geekosaur> octave is open source matlab, iirc. don't think there's a good open source alternative to mathematica yet
22:00:25 <ARJ0019> This is one of my attempts in Python: https://paste.tomsmeding.com/8E6OBcr5 . The downside is the equations only work one way.
22:00:42 <darkling> Aah, I thought Octave did more symbolic stuff than that. Not really my area.
22:00:57 <geekosaur> maybe it does these days
22:01:01 <monochrom> There is an old IBM one that's free since a decade ago or something. I forgot whether it's open-source.
22:02:57 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
22:03:45 <ARJ0019> One method that I am currently considering is using sets of constructors for each type; each constructor being a different equation that will provide the desired value. That could be converted to FP somewhat easily
22:05:53 × Guest75 quits (~Guest75@178.141.153.191) (Ping timeout: 260 seconds)
22:10:56 ChaiTRex joins (~ChaiTRex@user/chaitrex)
22:14:40 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
22:15:17 × ARJ0019 quits (~arj0019@162.218.254.7) (Quit: Leaving)
22:16:05 seydar joins (~seydar@154-27-113-252.starry-inc.net)
22:20:46 <loonycyborg> For symbolic stuff there's sympy
22:22:32 <seydar> How do I get cabal to build an executable for me in a normal location? Here's my source and cabal file: https://paste.tomsmeding.com/E3LyGn0E
22:24:11 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds)
22:24:23 <monochrom> cabal install --install-method=copy --installdir=<normal location> --overwrite-policy=always
22:24:33 <monochrom> For more information, cabal install --help
22:24:56 <monochrom> Some (all?) of those 3 parameters can also be set in $HOME/.cabal/config
22:25:00 <monochrom> (I think I did.)
22:26:35 <monochrom> There is another choice. cabal list-bin exe:<exe section name> can tell you the "not normal" path.
22:26:39 × fockerize quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds)
22:26:53 <monochrom> or rather the ephemeral in-place path.
22:28:34 × nihonium quits (~nihonium@109-252-9-82.nat.spd-mgts.ru) (Ping timeout: 256 seconds)
22:28:44 zant joins (~zant@62.214.20.26)
22:29:18 <seydar> i could've sworn cabal build was building an executable for me right in the directory
22:29:23 <seydar> but mayhaps i was an idiot
22:30:08 <geekosaur> nope, all build artifacts are in dist-newstyle
22:32:17 <sm> it was a dream
22:33:16 <sm> or a parallel universe, where subdirectories were never a thing
22:33:24 merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
22:33:35 <geekosaur> personally I switched to the XDG mode in cabal HEAD (which will be 3.10 in a few months); it installs to ~/.local/bin which is a "normal location" per XDG
22:33:51 <sm> oh.. nice
22:33:57 <geekosaur> you could also specify that in your cabal config
22:34:02 <sm> stack and cabal will overwrite each other's binaries but that's fine
22:34:19 <geekosaur> hopefully you're not making that mess
22:34:25 <sm> maybe cargo etc. should do the same
22:34:51 <sm> sick of fiddling with those extra language-specific bin dirs in PATH
22:35:09 <geekosaur> (also cabal will by default refuse to overwrite; see monochrom's options to disable that)
22:35:25 <sm> ack
22:35:28 <seydar> can I get cabal to *only* install the executable? I don't care about a license file
22:35:32 <sm> what happened with good old unix silent destruction
22:35:37 <seydar> maybe this is my fault for mentioning it in the cabal file
22:35:58 tomokojun joins (~tomokojun@37.19.221.160)
22:35:59 <geekosaur> went away with rm --no-preserve-root 🙂
22:36:26 sm learns an exciting new flag
22:36:38 × oldsk00l quits (~znc@ec2-54-93-55-15.eu-central-1.compute.amazonaws.com) (Remote host closed the connection)
22:36:45 <monochrom> cabal already installs only the executable.
22:37:00 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:38:19 × merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
22:38:49 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
22:38:54 <davean> Yah, preserving root with rm was a really annoying design inconsistency making one directory special.
22:39:00 ski__ joins (~slj@ext-1-443.eduroam.chalmers.se)
22:39:16 ski__ parts (~slj@ext-1-443.eduroam.chalmers.se) ()
22:39:41 ski__ joins (~slj@ext-1-443.eduroam.chalmers.se)
22:40:02 × money quits (money@user/polo) ()
22:41:34 <monochrom> root is already special in the first place: Even with no-preserve-root, you can have at most one root.
22:41:50 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:42:08 <monochrom> To really make it non-special, you need to allow multiple roots. This is also known as DOS. >:)
22:42:20 <davean> monochrom: not true, chroot makes lots of roots
22:42:36 <davean> Its only locally unique
22:43:50 <davean> Which is a good portion of why you need --no-preserve-root
22:44:12 geekosaur wonders if anyone remembers AFS. or WorkNet
22:44:17 fieldbuck_ joins (~fieldbuck@mobile-access-d51ce0-248.dhcp.inet.fi)
22:44:22 <davean> geekosaur: AndrewFS?
22:44:24 <seydar> monochrom: you're not gonna believe it -- i refused to believe the one-liner you gave me so i came up with my own, and i came up with EXACTLY what you said
22:44:27 <geekosaur> yep
22:44:28 <davean> geekosaur: Its still pretty commonly in use?
22:44:40 <davean> I assume people who use it every day remember it
22:44:43 <geekosaur> less so than it used to be but see https://openafs.org
22:45:07 jle`` joins (~jusle@user/jle/x-3894663)
22:45:25 <geekosaur> Altos WorkNet was a somewhat-similar-but-LAN thing. paths were @machine/...
22:45:32 <geekosaur> predated NFS
22:46:14 <fieldbuck_> so uh tell me how much $ does a decent software developer make in an year in us? i mean a software developer that is not google or anything similar but maybe a college graduate that a mediocre firm has hired?
22:46:15 <monochrom> Actually it is better to understand cabal install --help and use it to come up with your own, than to just look for recipes from randon strangers on the Internet without understanding.
22:46:18 geekosaur remembers emacs really not liking that, required some C hacking to stop it from prepending pwd (which started with @) to every WorkNet path
22:47:00 <davean> fieldbuck_: Thats not a useful question because things liek cost of living scale more than 2x across the US
22:47:14 <geekosaur> actually, not emacs. jove
22:47:49 <geekosaur> emacs wouldn't build much less run on machines that size
22:47:49 <davean> fieldbuck_: So you can get answers from 80k to 200k and have them really be the same answer.
22:49:50 <sclv> ah arj quit some time ago. for equations i was going to suggest the obvious normal form being always making the lhs zero
22:49:52 <fieldbuck_> hmm
22:50:43 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:50:59 <fieldbuck_> 6.6k$ that would be very very senior's salary in my country
22:51:11 money joins (money@user/polo)
22:51:20 <fieldbuck_> maybe more if you were really doing profit and a consultant and so on!
22:52:31 <fieldbuck_> but how about a nurse or a wallmart cashier?
22:52:41 <davean> fieldbuck_: Many countries are smaller than cities in the US, which is one reason why asking for a "US Salary" is silly.
22:52:48 <sm> fieldbuck_: varies very strongly by location and industry
22:53:14 <davean> fieldbuck_: and again, you MUST consider cost of living
22:53:32 <fieldbuck_> yes yes i consider
22:54:01 <fieldbuck_> but ia m just trying to understand the uh i mean the gap between a cashier and a junior software developer
22:54:06 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
22:54:06 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
22:54:06 wroathe joins (~wroathe@user/wroathe)
22:54:32 <davean> fieldbuck_: well the poverty line in the US is $33148/year
22:54:54 <davean> but again you're REALLY going to have to pick a *location* the US is not at all coherent
22:55:40 <fieldbuck_> hmm thats actually what maybe a junior software dev makes here maybe?
22:55:44 <davean> If you ask about Boston MA you're going to get massively different results than asking about Anchorage AK
22:56:04 <fieldbuck_> yes yes
22:56:29 <fieldbuck_> but lets say if you work in macdonalds how much do you make?
22:57:03 <davean> IT DEPENDS ON WHERE YOU AER
22:57:11 <davean> By orders of magnitude
22:57:17 <davean> You aren't taking what I'm saying seriously.
22:57:39 <sm> https://www.wolframalpha.com/input/?i=us+mcdonalds+salary
22:57:44 <fieldbuck_> WELL MAYBE IN A BIG CITY IN NEBRASKA AND THEN IN SAN FRANCISCO?
22:57:45 <sm> good enough ?
22:58:15 <fieldbuck_> fair enough
22:58:16 <davean> https://minimumwage.com/in-your-state/
22:58:37 <sm> ha, better: https://www.wolframalpha.com/input?i=us+macdonalds+salary
22:59:02 <davean> A place with a minimum wage of $7.25 is a lot different than one with a minimum wage of $$15.90
22:59:34 <geekosaur> and in any case fast food joints in the US mostly pay more than minimum wage these days because they can't get employees otherwise (some pay up to double)
22:59:52 <sm> hmm maybe I expect too much from wolfram alpha. All the AI demos lately made me expect magic
22:59:55 <fieldbuck_> 10$ min wage would still be only 1600 a month :(
22:59:59 <davean> geekosaur: Right, but I wanted a good easy comparison of base levels across areas.
23:00:13 <davean> To show that there was more than a 2x spread
23:00:14 <monochrom> Ugh wolfram alpha refuses to compute integrate x^2 dx from 0 to (us macdonalds salary)
23:00:45 <davean> fieldbuck_: From europe I'm taking it? :)
23:00:52 <fieldbuck_> yes!
23:01:01 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
23:01:30 <monochrom> ooooohhhhhh I see, "us macdonalds salary" is not referentially transparent! That's why.
23:02:01 <davean> fieldbuck_: well the EU fits in a corner of the US :-p
23:02:32 <monochrom> Ugh next you're saying "US is America, Canada is North America"...
23:02:53 <davean> monochrom: nah, but France is North America
23:03:00 <monochrom> haha
23:03:09 <davean> it is!
23:03:13 <davean> And south america!
23:03:32 <EvanR> I live in south america
23:03:35 <monochrom> rock-paper-scissor geography
23:03:37 <EvanR> i.e. louisiana
23:03:40 <davean> EvanR: Do you live in France?
23:03:52 <davean> Ah damn I didn't get it in fast enough
23:04:05 <fieldbuck_> i mean a nurse and a junior dev might earn somewhat same money here and if you are wery experienced and senior maybe you could earn 2x that much
23:04:09 <EvanR> like many other places used to be technically france
23:04:18 <fieldbuck_> but anything more than that you would have to be really special
23:05:02 <davean> fieldbuck_: I know US developers making between 80k and something like 1.5M personally.
23:05:19 <davean> At the higher end its a little harder to say how much they make exactly.
23:05:43 <davean> I've known US developers making 40k
23:06:01 <fieldbuck_> hmm but according to google nurse avg salary is about 80k so it would be 6.6k a month
23:06:15 × tomokojun quits (~tomokojun@37.19.221.160) (Read error: Connection reset by peer)
23:06:27 <davean> fieldbuck_: So why do you care? That might help more
23:06:42 <mauke> wait, why is fieldbuck_ back? weren't they k-lined?
23:06:43 tomokojun joins (~tomokojun@37.19.221.160)
23:07:02 <fieldbuck_> ? i mean i don't really care and i am not arguing anything but i am just curious
23:10:40 <davean> fieldbuck_: well you're asking a question and you keep acting like these salaries are fungible, you're asking for a reason but you are not at all looking at how much money a person actually gets or what the spending power is
23:11:17 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
23:13:26 <fieldbuck_> i know i know! but what i really wanted to know how much money does a junior software dev make than a mcd burger flipper or a walmart cashier!
23:13:45 <fieldbuck_> sry if im a bit unclear but i have drank quite few beers already
23:15:55 <davean> That entirely depends on location
23:16:11 <davean> Thats not a question for which there is anything like a consistent answer across the US
23:16:12 <rubin55> i was a burger-flipper in '93ish? I made 3.23 guilders an hour.. it was a great motivator to do better in life later on
23:16:14 Guest60 joins (~Guest60@101.98.118.246)
23:16:49 <rubin55> no idea what they do nowadays, but i'd imagine ~1000ish eur monthly net?
23:17:22 <fieldbuck_> after rent?
23:17:31 <rubin55> nurse is quite a bit higher at least over here
23:17:51 <rubin55> after rent..? no, net salary, after tax
23:19:07 × chele quits (~chele@user/chele) (Remote host closed the connection)
23:19:26 <rubin55> nurse here would be between about ~2000ish and ~3000ish net monthly
23:19:52 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Quit: leaving)
23:20:39 <rubin55> junior dev ~2500ish net i would say; senior dev depends on employment vs contracting
23:20:44 seydar joins (~seydar@154-27-113-252.starry-inc.net)
23:21:17 <seydar> here's my submission for day 2 of AoC -- I'd love some feedback, particularly on how to best organize the whole rock-beats-scissors part: https://paste.tomsmeding.com/rj3bob9U
23:21:20 × michalz quits (~michalz@185.246.204.93) (Remote host closed the connection)
23:21:22 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
23:21:59 <rubin55> and depends a lot on the field too, languages, backend/frontend, years of experience, contacts, how well one can present ones'self
23:23:09 <fieldbuck_> ok ok uh what well i mean what have been told to me is that even a junior google dev earns something like 400k/year
23:23:28 <fieldbuck_> but it might erroneous information
23:23:31 gqplox joins (~textual@2a02:c7c:941d:fd00:84dc:e5:8d89:ecd6)
23:23:46 <gqplox> yo yo what's up guys
23:23:51 <davean> fieldbuck_: I have known a Junior dev who made $350k at google, sure
23:24:03 <davean> location, expertise, etc matter.
23:24:16 <geekosaur> the big four (google amazon microsoft apple) are a different story entirely, yes
23:24:39 <davean> geekosaur: Nah, you can get equal salary a lot of places.
23:24:45 <geekosaur> it's also a great way to get burnout
23:24:46 <davean> They just are in the higher class
23:25:42 <monochrom> IMO the interesting question is how much money I could save per month by WFH in Cuba receiving Dubai-level income. >:)
23:26:42 <fieldbuck_> i make nothing because i am still a newbie!
23:27:28 <davean> monochrom: I care about my current quality of life at least a little. Need to deal with the time value of happiness since one might die at any point.
23:27:39 <monochrom> But I guess you'll say "but it still depends on whether you buy cigars"
23:27:43 × acidjnk quits (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
23:28:12 <davean> No, because thats optional :-p
23:28:22 <davean> taxes and base susistence sorta aren't
23:28:27 <fieldbuck_> i don't think that cuba would be the best choice but in some eastern european countries you would live like a king!
23:29:02 <rubin55> I always found it strange how much difference there is in income between contracting and regular employment in europe, and have also observed how that's a little different in the US
23:29:07 <gqplox> is ok it if i post my advent of code here for critique?
23:29:18 <monochrom> Yes.
23:29:22 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 252 seconds)
23:29:25 <gqplox> http://sprunge.us/x2vF74
23:29:35 <gqplox> spoiler ^
23:29:41 <gqplox> i did the opposite of code golf haha
23:29:42 Xeroine joins (~Xeroine@user/xeroine)
23:30:01 <seydar> gqplox: i'm looking for critique of mine as well https://paste.tomsmeding.com/rj3bob9U
23:30:21 <gqplox> oh cool
23:30:48 <gqplox> (mine is for part 1 btw)
23:30:53 <seydar> gqplox: oh boy. now I'm seeing how I should've done it
23:30:56 <gqplox> i see you have done both
23:31:23 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:32:10 <gqplox> oh cool i didn't know about the at sing
23:32:11 <seydar> gqplox: yeah, but your code is more haskellish
23:32:14 <gqplox> sign* for lists
23:32:31 <seydar> i didn't know there was automatic ordering for data
23:32:44 <geekosaur> it's not just for lists, it lets you capture any pattern while also matching subpatterns within
23:32:45 <davean> seydar: deriving is great!
23:33:06 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Remote host closed the connection)
23:33:39 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
23:33:56 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
23:34:00 <seydar> gqplox: ahhh you made it as succ with a special case! smart
23:34:22 Feuermagier joins (~Feuermagi@user/feuermagier)
23:35:09 × Feuermagier quits (~Feuermagi@user/feuermagier) (Max SendQ exceeded)
23:35:26 <gqplox> thank you :)
23:35:40 <gqplox> im waiting to see what some of the haskell pros here have lol
23:35:49 <gqplox> some map fold one liner or something crazy
23:36:37 <seydar> hm. no way to get around the 6 lines defining characters to shapes and their relationships though
23:37:39 <davean> seydar: I mean you can make a map
23:37:44 <gqplox> yeah Im not sure about that, I guess you could do some math tricks using ord perhaps?
23:37:44 <davean> or a key-value list
23:38:00 <davean> Don't need lines for a replacement mapping
23:40:06 <mauke> main = interact ((++ "\n") . show . sum . map score . lines); score [ord -> c1, ' ', ord -> c2] = (c2 - c1 + 2) `mod` 3 * 3 + c2 - ord 'W'
23:40:09 <mauke> ^ my solution
23:40:25 <mauke> only in reality it is on two lines and with more type signatures
23:40:43 <gqplox> hahaha, and there it is
23:41:18 × titibandit quits (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection)
23:41:43 fieldbuck_ parts (~fieldbuck@mobile-access-d51ce0-248.dhcp.inet.fi) ()
23:42:37 <mauke> part 2 has: score [ord -> c1, ' ', ord -> c2] = (c2 - ord 'X') * 3 + (c1 + c2 + 2) `mod` 3 + 1
23:43:56 × kadobanana quits (~mud@user/kadoban) (Ping timeout: 265 seconds)
23:44:17 <seydar> mauke: wait what's going on in score [ord -> c1...] as the function definition
23:44:27 <c_wraith> those are view patterns
23:44:30 <mauke> {-# LANGUAGE ViewPatterns #-}
23:44:35 <seydar> it looks like you're describing a function as an argument
23:45:00 <mauke> "bind c1 to the value, but first pipe it through ord"
23:45:03 <c_wraith> seydar: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/view_patterns.html
23:45:04 <seydar> view patterns, huh. sounds like some perl carryover
23:45:52 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
23:45:54 <c_wraith> in general, the ghc user guide is fantastic. Not to be missed for your questions about stuff GHC does.
23:46:25 <Guest60> Hi, I'm new to using arrows and wondering if they're a good tool for mapping Eithers?
23:46:29 <seydar> this is like the lovechild of APL and perl
23:46:30 Topsi joins (~Topsi@dyndsl-031-150-076-205.ewe-ip-backbone.de)
23:47:15 <seydar> oh wait now that i've read more than 2 sentences on the page, these seem pretty cool
23:47:19 <monochrom> Yes.
23:47:46 <c_wraith> Guest60: they work, but Bifunctor is probably an easier abstraction in general.
23:48:11 <c_wraith> and Data.Bifunctor has been in base for a while now
23:48:38 <c_wraith> Arrow has a lot of weird stuff.
23:49:16 <Guest60> In my particular case I have a sum type for success and error and I want to convert an either into the success or error. So you would use bifunctor for this?
23:49:34 <c_wraith> sure
23:49:36 <c_wraith> :t bimap
23:49:37 <lambdabot> Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
23:50:03 <c_wraith> so like... bimap mkError mkSuccess
23:50:10 × neightchan quits (~nate@98.45.169.16) (Ping timeout: 256 seconds)
23:50:10 <mauke> my first idea for doing the AoC exercise was to generate a score lookup table for all possible lines
23:50:37 <mauke> I kept spotting patterns I could use to generate the table more succinctly
23:51:01 <mauke> until I was down to a single calculation, which I then inlined and scrapped the table
23:51:05 <c_wraith> Guest60: oh, nevermind. actually, I'd just use either
23:51:11 <c_wraith> :t either -- Guest60
23:51:12 <lambdabot> (a -> c) -> (b -> c) -> Either a b -> c
23:51:26 <c_wraith> Becuase you want to *replace* the Either with your own type
23:51:57 <Guest60> ah yeah, I looked at that one. It's better because either maps to a c as opposed to a p of b d?
23:52:02 <c_wraith> exactly
23:52:10 <Guest60> Because b and d are summed to c, might as well use either
23:52:36 <mauke> :t either ?mkError ?mkSuccess
23:52:37 <lambdabot> (?mkError::a -> c, ?mkSuccess::b -> c) => Either a b -> c
23:53:26 kadobanana joins (~mud@user/kadoban)
23:59:58 <seydar> i took inspiration from gqplox and redid it to use shapes, but it's now longer and uglier than ever. am i missing something? https://paste.tomsmeding.com/NK1A9M7g

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