Home liberachat/#haskell: Logs Calendar

Logs on 2021-12-03 (liberachat/#haskell)

00:01:40 <EvanR> you have a weekly meeting about haskell? jelly :(
00:04:42 <shapr> several!
00:04:56 <shapr> one for recurse center, two for work (SimSpace)
00:05:25 <shapr> EvanR: we could have one for here
00:11:15 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
00:11:34 <geekosaur> "recurse center"
00:12:04 <EvanR> a weekly meeting, on IRC?
00:12:45 <monochrom> Actually I'm curious too. Does it mean https://www.recurse.com/ ?
00:13:24 <monochrom> "Never graduate" haha do you know how nightmarish that sounds to grad school survivors >:)
00:16:33 <dsal> shapr: Ah, that's you? I've got a tab open. heh
00:16:41 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
00:19:42 anyone joins (~filler@a4.inai.de)
00:20:08 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
00:21:28 <shapr> dsal: have you attended recurse center?
00:21:30 <shapr> it's good stuff
00:21:46 <dsal> I've never heard of recurse center.
00:21:48 <shapr> EvanR: sure, we could organize a weekly video chat
00:22:12 <shapr> dsal: it's in my top two favorite communities
00:22:28 <dsal> That looks like a thing I'd like, though.
00:25:56 <shapr> I liked it enough to spend six months there.
00:26:09 <shapr> wrote some blog posts: https://shapr.github.io/
00:26:20 <shapr> learned about SMT solvers and all kinda things
00:26:41 machinedgod joins (~machinedg@24.105.81.50)
00:27:34 anyone parts (~filler@a4.inai.de) ()
00:33:03 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
00:35:14 <boxscape> is there any package that allows you to generate TH expressions for quickcheck?
00:36:13 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
00:36:46 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
00:37:40 <boxscape> in other words
00:37:54 <boxscape> a package that provides an instance `Arbitrary Language.Haskell.TH.Exp`
00:40:59 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
00:44:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:44:47 × curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 256 seconds)
00:46:29 × vysn quits (~vysn@user/vysn) (Ping timeout: 252 seconds)
00:46:46 renzhi joins (~xp@2607:fa49:6500:b100::5cef)
00:49:39 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
00:52:19 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
00:54:29 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds)
01:09:54 boxscape_73 joins (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de)
01:10:08 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
01:12:31 × boxscape_ quits (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
01:12:43 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
01:15:05 × acidjnk_new quits (~acidjnk@p200300d0c7271e85247d18c27da64632.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
01:16:11 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
01:17:43 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
01:18:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
01:19:16 × notzmv quits (~zmv@user/notzmv) (Read error: Connection reset by peer)
01:23:45 notzmv joins (~zmv@user/notzmv)
01:30:13 × DNH quits (~DNH@2a02:8108:1100:16d8:a968:658b:9652:428a) (Quit: Textual IRC Client: www.textualapp.com)
01:44:32 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Quit: Leaving)
01:46:28 <Axman6> that sounds horrible D:
01:46:41 <Axman6> you're gonna make AI monsters man
01:47:40 <boxscape> that's the plan
01:48:36 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
01:57:33 × mmhat quits (~mmh@55d45251.access.ecotel.net) (Quit: WeeChat 3.3)
01:59:51 jakalx joins (~jakalx@base.jakalx.net)
02:02:06 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
02:02:25 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
02:02:26 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
02:06:57 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
02:07:29 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
02:08:38 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
02:08:53 yauhsien joins (~yauhsien@2402:7500:4e5:d897:6d8a:b7a6:6ceb:da56)
02:10:21 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds)
02:12:01 × sprout quits (~quassel@2a02:a467:ccd6:1:54db:f79f:90dc:3ee5) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
02:12:26 sprout joins (~quassel@2a02:a467:ccd6:1:54db:f79f:90dc:3ee5)
02:15:00 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
02:16:40 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
02:17:53 justsomeguy joins (~justsomeg@user/justsomeguy)
02:21:09 × abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection)
02:22:27 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
02:23:48 neurocyte0132889 joins (~neurocyte@IP-185189141046.dynamic.medianet-world.de)
02:23:48 × neurocyte0132889 quits (~neurocyte@IP-185189141046.dynamic.medianet-world.de) (Changing host)
02:23:48 neurocyte0132889 joins (~neurocyte@user/neurocyte)
02:27:27 fef joins (~thedawn@user/thedawn)
02:28:17 <boxscape> is there a nicer way to write (escape @Exp . escape @Type . escape @Dec . escape @Pat)?
02:30:58 × xff0x quits (~xff0x@2001:1a81:5351:7200:c8d5:d64b:ba01:92ce) (Ping timeout: 268 seconds)
02:31:00 lavaman joins (~lavaman@98.38.249.169)
02:32:25 xff0x joins (~xff0x@2001:1a81:5394:4100:b17b:62d7:7f1e:4d8a)
02:34:01 × unyu quits (~pyon@user/pyon) (Quit: WeeChat 3.3)
02:35:03 × TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8)
02:35:21 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
02:35:49 <boxscape> maybe in the glorious future of DH I'll be able to write `alaf foldMap Endo escape [Exp, Type, Dec, Pat]`
02:36:29 × arahael quits (~arahael@27-32-144-20.tpgi.com.au) (Ping timeout: 252 seconds)
02:38:04 arahael joins (~arahael@27-32-144-20.tpgi.com.au)
02:39:37 <Axman6> feels like a nice haskell challenge
02:40:54 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
02:41:02 unyu joins (~pyon@user/pyon)
02:41:26 burnsidesLlama joins (~burnsides@client-8-73.eduroam.oxuni.org.uk)
02:46:03 × burnsidesLlama quits (~burnsides@client-8-73.eduroam.oxuni.org.uk) (Ping timeout: 256 seconds)
02:47:35 Stotteren joins (~Stotteren@pool-108-20-79-41.bstnma.fios.verizon.net)
02:47:39 Gestotterd joins (~Stotteren@pool-108-20-79-41.bstnma.fios.verizon.net)
02:48:40 Gestotterd parts (~Stotteren@pool-108-20-79-41.bstnma.fios.verizon.net) ()
02:49:09 namkeleser joins (~namkelese@101.175.102.188)
02:50:16 Kiori joins (~Kiori@179.235.95.59)
02:52:33 × ubert quits (~Thunderbi@p200300ecdf0ba2909868c7bbf0c5b488.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
02:52:44 ub joins (~Thunderbi@p200300ecdf0ba299f01739553a033620.dip0.t-ipconnect.de)
02:53:21 × yauhsien quits (~yauhsien@2402:7500:4e5:d897:6d8a:b7a6:6ceb:da56) (Ping timeout: 252 seconds)
02:53:29 <Kiori> hey guys, what is the current state of haskell on Android(and mobile generally)? I've had a hard time finding information on compiling and general development for these arm based platforms.
02:54:45 cheater joins (~Username@user/cheater)
02:55:03 ub is now known as ubert
02:56:15 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
02:58:03 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:00:02 × sander quits (~sander@user/sander) (Quit: So long! :))
03:01:30 sander joins (~sander@user/sander)
03:03:26 <sm> difficult
03:05:07 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
03:05:45 <sm> some company sells a toolkit for it (keera studios ?)
03:08:02 Xnuk joins (~Xnuk@14.33.159.252)
03:08:58 <Xnuk> @pl \x -> x
03:08:58 <lambdabot> id
03:13:25 × Kiori quits (~Kiori@179.235.95.59) (Quit: Leaving)
03:13:57 <davean> heres also a nix expression out there that just does it? I forget where
03:14:11 <davean> and Obsidian Systems also dealt with it I think?
03:15:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:15:36 × waleee quits (~waleee@h-82-196-111-63.NA.cust.bahnhof.se) (Quit: WeeChat 3.3)
03:18:58 × Xnuk quits (~Xnuk@14.33.159.252) (Quit: Client closed)
03:24:19 pfurla joins (~pfurla@201.17.118.230)
03:28:55 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving)
03:29:32 <boxscape> The composition I asked about above was actually wrong, it now looks like this https://paste.tomsmeding.com/CUEbLR49
03:29:36 <boxscape> still kind of verbose
03:29:42 <boxscape> not sure if there's a better way
03:30:53 <boxscape> hmm I might be able to split that pattern out into a function call actually
03:36:29 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 256 seconds)
03:37:03 × td_ quits (~td@muedsl-82-207-238-002.citykom.de) (Ping timeout: 256 seconds)
03:38:45 td_ joins (~td@94.134.91.231)
03:38:54 <boxscape> indeed I can https://paste.tomsmeding.com/x7GghwV1
03:42:47 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 256 seconds)
03:44:42 jle` joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
03:44:59 <boxscape> (admittedly actually less readable than before)
03:49:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
03:52:30 × johnw quits (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) (Quit: ZNC - http://znc.in)
03:53:29 × namkeleser quits (~namkelese@101.175.102.188) (Quit: Client closed)
03:54:20 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:54:20 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:54:20 finn_elija is now known as FinnElija
03:58:32 Lycurgus joins (~juan@98.4.112.204)
03:59:31 <boxscape> (final version - https://paste.tomsmeding.com/yUd2TelK - going to bed, good night)
04:00:17 yauhsien joins (~yauhsien@2402:7500:4e5:d897:5d9d:1dde:33ff:788f)
04:02:01 × yauhsien quits (~yauhsien@2402:7500:4e5:d897:5d9d:1dde:33ff:788f) (Remote host closed the connection)
04:04:44 <EvanR> is there something like juicy pixels but for sound files
04:04:50 <EvanR> juicy samples
04:12:52 <Lycurgus> bindings to things
04:14:56 × boxscape_73 quits (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
04:17:35 <Axman6> libsndfile?
04:19:40 <Axman6> http://www.mega-nerd.com/libsndfile/ is writtne be Erik de Castro Lopo, who is definitelyt an active haskeller... trying to see if he has haskell bindings
04:20:50 <EvanR> there's simply bindings to C libs, and there's the juicy pixels secret sauce that's like file -> thing of pixels and tells you the format too without any real configuration
04:20:59 <EvanR> in one api call
04:22:15 <EvanR> I see libsndfile doesn't want to touch MP3
04:24:24 <Axman6> does anyone?
04:27:50 Sgeo joins (~Sgeo@user/sgeo)
04:27:51 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
04:30:52 × pfurla quits (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…)
04:32:21 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
04:38:13 × renzhi quits (~xp@2607:fa49:6500:b100::5cef) (Ping timeout: 252 seconds)
04:41:39 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
04:42:15 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
04:45:21 deadmarshal joins (~deadmarsh@95.38.116.117)
04:48:04 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
04:49:45 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
04:57:24 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
05:16:20 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
05:17:38 Sgeo_ joins (~Sgeo@user/sgeo)
05:20:01 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 252 seconds)
05:25:55 nautical joins (~nautical@2601:602:900:1630::396f)
05:37:26 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
05:39:27 × monochrom quits (trebla@216.138.220.146) (Ping timeout: 252 seconds)
05:42:23 <opqdonut> roast my advent of code day 3: https://gist.github.com/opqdonut/eedde3377492334ba7074130e9e52653
05:42:31 monochrom joins (trebla@216.138.220.146)
05:45:47 <int-e> :t foldl' (\a b -> 2*a + b) 0
05:45:48 <lambdabot> (Foldable t, Num a) => t a -> a
05:45:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:47:11 <int-e> opqdonut: are you running this in ghci? (no main)
05:48:01 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
05:49:05 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
05:52:13 <opqdonut> int-e: yeah
05:53:07 <opqdonut> I just wrote out `bin` in anger when I realised the version of base I happened to be on didn't have Numeric.readBin :)
05:53:24 <opqdonut> but yeah now that I look at it it's an obvious foldl'
05:56:05 <int-e> bin xs | [(v, s)] <- readInt 2 (`elem` "01") digitToInt xs = v -- ouch
05:57:49 <int-e> `readBin`, oh that's new in ghc-9.2... hmm. Not enough of a reason to switch :P
05:58:26 <int-e> (base-4.16 but it's tied to ghc anyway)
05:58:42 johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0)
05:59:07 <xerox> it was for me xD
06:07:19 × mvk quits (~mvk@2607:fea8:5cc1:fa00::4702) (Ping timeout: 252 seconds)
06:09:26 lavaman joins (~lavaman@98.38.249.169)
06:11:15 n8ess163 joins (~b@pool-72-80-171-162.nycmny.fios.verizon.net)
06:13:53 deadmarshal joins (~deadmarsh@95.38.116.117)
06:13:55 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
06:14:07 <dmj`> hard keeping up with the big dogs on day 3
06:17:51 <c_wraith> I spent a lot of time solving the wrong problem in part 2 because I didn't read the example. Then I read the example, threw out all my code, and spent a lot less time solving the right problem.
06:20:09 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
06:26:56 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 252 seconds)
06:28:04 chomwitt joins (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374)
06:28:06 <EvanR> I feel so dumb taking an hour on part 2
06:28:10 <EvanR> stupid bugs
06:28:49 curiousgay joins (~curiousga@77-120-141-90.kha.volia.net)
06:29:56 <EvanR> on part 1, i momentarily checked if there was some algebraic jibber jabber that could solve x times not x without a computer xD
06:30:06 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
06:31:43 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
06:33:24 <dmj`> c_wraith: did the same exact thing yesterday
06:34:53 <dmj`> Part 2 you had to select the right column in the transpose, and then use that to filter out the rows from initial, and iterate until a single element.
06:36:05 deadmarshal joins (~deadmarsh@95.38.116.117)
06:36:15 <EvanR> no point in transposing if your transpose is invalidated at each step xD
06:43:59 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
06:47:05 <EvanR> opqdonut, after the first day, I got a 2 terminal setup where I had a source file where I could put functions, and ghci in the other that I :reload to test or just run the damn thing by typing main
06:47:33 <int-e> :r works
06:48:39 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
06:49:04 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
06:49:09 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
06:49:27 <EvanR> good call
06:49:41 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:49:44 <EvanR> was hoping for a control + something combo xD
06:52:16 <dmj`> EvanR: true, guess I only transpose on part 1
06:53:14 <int-e> EvanR: I guess you could play with https://github.com/judah/haskeline/wiki/KeyBindings
06:53:37 <int-e> (I've never done that though, not sure how well that works.)
06:53:53 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds)
06:54:18 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:54:21 <int-e> https://github.com/judah/haskeline/wiki/KeyBindings is a better link
06:54:51 <xerox> EvanR: if you're looking for compilation errors check out ghcid, it's beautiful
06:55:05 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
06:56:21 <iqubic> HLS is also great too.
07:08:00 <int-e> EvanR: hmm, this doesn't look so bad, though I do wonder why it doesn't recognize f5 out of the box for me: http://paste.debian.net/1221780/
07:08:30 × EvanR quits (~evan@user/evanr) (Remote host closed the connection)
07:08:47 EvanR joins (~evan@2600:1700:ba69:10:87af:d76a:1197:e8dd)
07:08:50 gehmehgeh joins (~user@user/gehmehgeh)
07:09:03 <int-e> there's also a blog post doing something similar, https://blog.rcook.org/blog/2018/ghci-custom-key-bindings/
07:12:35 <dmj`> EvanR: despite it being invalidated, the transpose offers a convenient way to get a column, however inefficient.
07:14:59 chele joins (~chele@user/chele)
07:15:30 dschrempf joins (~dominik@mobiledyn-62-240-134-39.mrsn.at)
07:16:12 imdoor joins (~imdoor@balticom-142-78-50.balticom.lv)
07:27:17 × m5zs7k quits (aquares@web10.mydevil.net) (Write error: Connection reset by peer)
07:27:34 m5zs7k joins (aquares@web10.mydevil.net)
07:28:50 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:30:31 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:30:49 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:32:29 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:32:47 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:34:26 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:34:43 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:35:20 michalz joins (~michalz@185.246.204.43)
07:37:38 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
07:39:34 max22- joins (~maxime@2a01cb088335980065dae87f91b73dea.ipv6.abo.wanadoo.fr)
07:41:14 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:41:31 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:41:51 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
07:42:35 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:42:47 sprout_ joins (~quassel@2a02:a467:ccd6:1:acfd:d7bd:8c5c:5aef)
07:42:52 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:44:58 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:45:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:46:42 × sprout quits (~quassel@2a02:a467:ccd6:1:54db:f79f:90dc:3ee5) (Ping timeout: 268 seconds)
07:46:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:47:05 notzmv joins (~zmv@user/notzmv)
07:47:17 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:49:07 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:51:05 × curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 252 seconds)
07:51:46 deadmarshal joins (~deadmarsh@95.38.116.117)
07:52:24 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:54:53 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:55:10 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:56:06 × n8ess163 quits (~b@pool-72-80-171-162.nycmny.fios.verizon.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:58:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:59:06 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:02:53 jakalx parts (~jakalx@base.jakalx.net) ()
08:03:01 lortabac joins (~lortabac@2a01:e0a:541:b8f0:2293:2037:bf6e:4ea5)
08:04:01 <siers> how can I write Endo (a, a) for (a -> a, a -> a)? I found uncurry bimap. But how do I do that for an 3-tuple or 4-tuple? Do I need something like scrap your boilerplate
08:06:33 <siers> if I could turn tuples into lists with generic programming, then it's just a map (uncurry ($)) (zip funcTuple dataTuple)
08:06:41 <dminuoso> Just do the pattern matching by hand?
08:06:46 <siers> yes, that's an option
08:06:53 <siers> just curious about how to do it generically
08:07:02 <siers> I already wrote the version by hand :)
08:07:07 <dminuoso> There's no elegant, expressive, idiomatic way to do it.
08:07:18 jakalx joins (~jakalx@base.jakalx.net)
08:07:51 <dminuoso> You can use any of: a) typeclass-based generic uncurry, b) Generic-based generic uncurry or c) TH-based uncurry
08:08:25 <dminuoso> Though, you can use `lens` or `optics` if you want.
08:08:34 <dminuoso> If you have these as dependencies already.
08:08:54 <dminuoso> Both come with an Each typeclass that gives you that expressivity
08:09:04 <dminuoso> For up to ~10 tuples I think
08:10:05 <siers> wouldn't each be like map f list instead of map uncurry (zip a b)?
08:10:46 <dminuoso> Functor does not work because of the kindness of the types
08:10:59 <dminuoso> Also, you'd have to line up those tuples, you cant uniformly apply `f`
08:11:10 <dminuoso> i.e. you want to compose component-wise
08:11:32 <siers> right, that's why I'm saying Each shouldn't work
08:12:17 <dminuoso> Sorry, with Ixed you could
08:12:55 <dminuoso> Let me try and cook it up
08:13:38 <dminuoso> Ah no, we'd need something like IEach
08:14:01 <siers> I don't know so much about lens, but enough to make me suspect I couldn't do it with lens
08:14:53 almight joins (~almight@103.142.31.135)
08:15:37 <almight> Iam trying to run my haskell servant server in a docker container.
08:15:38 <almight> FROM ubuntu
08:15:38 <almight> WORKDIR /app
08:15:39 <almight> RUN apt-get update
08:15:39 <almight> RUN apt-get install libpq-dev -y
08:15:40 <almight> RUN apt-get install ca-certificates -y
08:15:40 <almight> #Copy the binary generated during build
08:15:41 <almight> COPY --from=build /app/build_output .
08:15:41 <almight> # Expose a port to run our application
08:15:42 <almight> EXPOSE 8080
08:15:42 <almight> # Run the executable
08:15:43 <almight> CMD ./my-app-exe
08:15:48 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:15:49 <almight> this here is stage 2 of my docker build
08:16:04 <almight> the app works fine but none of the logs get printed
08:16:09 <siers> 🤦🏼
08:18:39 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:18:57 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:19:45 <dminuoso> siers: Okay I think we can do this.
08:23:06 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:23:23 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:24:16 × almight quits (~almight@103.142.31.135) (Quit: Client closed)
08:24:54 vpan joins (~0@212.117.1.172)
08:27:09 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:27:28 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:29:08 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:29:15 × MasseR quits (~MasseR@51.15.143.128) (Quit: The Lounge - https://thelounge.chat)
08:29:26 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:30:00 MasseR joins (~MasseR@51.15.143.128)
08:31:40 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:31:57 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:32:00 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
08:32:59 × mud quits (~mud@user/kadoban) (Remote host closed the connection)
08:38:08 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:38:26 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:38:34 <arahael> I'm looking for a `String -> Int -> Int` where the function converts the string as a number at a specified base to an int.
08:38:56 vysn joins (~vysn@user/vysn)
08:39:02 <arahael> Eg, `toInt "12341234" 4` should result in whatever is the correct value for that number in base 4.
08:39:32 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
08:40:16 <iqubic> arahael: I assume this is for AoC? Is that right?
08:40:24 <arahael> iqubic: Good guess. :)
08:40:41 <xerox> :t readInt
08:40:42 <lambdabot> Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
08:41:11 <dminuoso> % let x = ((+1), (+2)); y = ((+10), (+20)); (a, b) = x & indexing each %@~ (\i f -> fromJust (y ^? ix i)); in (a 0, b 0)
08:41:11 <yahb> dminuoso: (10,20)
08:41:12 <xerox> a build-your-own version
08:41:20 <dminuoso> siers: ^- this is just a first version, notoriously unsafe with the fromJust
08:41:22 <int-e> :t digitToInt
08:41:23 <lambdabot> Char -> Int
08:41:25 <arahael> xerox: That works nicely.
08:41:30 <siers> dminuoso, is that with lens?
08:41:33 <dminuoso> siers: Yes.
08:41:53 <siers> ah, I think I know what it means
08:41:59 <dminuoso> siers: this will work over two arbitrary Ixed even. Be sure to match arity, or you will get either a crash or mishbehave.
08:42:07 <siers> right
08:42:16 <dminuoso> The crash you can fix of course, the misbehaving not.
08:42:46 <dminuoso> And I didnt compose, but that's just a small thing to fix.
08:43:07 <dminuoso> % let x = ((+1), (+2)); y = ((+10), (+20)); (a, b) = x & indexing each %@~ (\i f -> f . fromJust (y ^? ix i)); in (a 0, b 0)
08:43:08 <yahb> dminuoso: (11,22)
08:43:20 <siers> kind of simple in hindsight, but that's because it's not safe :D
08:43:35 <siers> cool
08:43:45 <dminuoso> Well, you can cook up your own traversal that behaves safe if you want.
08:43:54 sprout joins (~quassel@2a02:a467:ccd6:1:8149:2184:782c:2882)
08:44:00 <dminuoso> It's not too much extra work
08:44:24 <dminuoso> siers: The cool thing here is that you can even do this across two incompatible types. Say compose a tuple of functions with a tree of functions.
08:44:33 <dminuoso> As long as their arity matches, of course.
08:44:49 <siers> haha, that is really whack
08:45:35 <siers> what do you mean, a safe traversal? I don't understand at all what you might be hinting at
08:45:49 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
08:46:46 × acowley quits (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) (Read error: Connection reset by peer)
08:46:49 × sprout_ quits (~quassel@2a02:a467:ccd6:1:acfd:d7bd:8c5c:5aef) (Ping timeout: 252 seconds)
08:48:04 <dminuoso> Well so consider this:
08:48:07 <dminuoso> % let x = ((+1), (+2)); y = ((+10), (+20)); crazyCompose x y = x & indexing each %@~ (\i f -> f . fromJust (y ^? ix i)); in (0 &) <$> crazyCompose [(+1), (+2)] ((+10), (+20))
08:48:09 <dminuoso> % let x = ((+1), (+2)); y = ((+10), (+20)); crazyCompose x y = x & indexing each %@~ (\i f -> f . fromJust (y ^? ix i)); in (0 &) <$> crazyCompose [(+1), (+2)] ((+10), (+20))
08:48:09 <yahb> dminuoso: [11,22]
08:48:23 <dminuoso> So this works fine, even composing a tuple of functions with a list of functions
08:48:29 <dminuoso> But what if we mismatch arity?
08:48:33 <dminuoso> % let x = ((+1), (+2)); y = ((+10), (+20)); crazyCompose x y = x & indexing each %@~ (\i f -> f . fromJust (y ^? ix i)); in (0 &) <$> crazyCompose [(+1), (+2), (+3)] ((+10), (+20))
08:48:33 <yahb> dminuoso: [11,22,*** Exception: Maybe.fromJust: Nothing; CallStack (from HasCallStack):; error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe; fromJust, called at <interactive>:143:97 in interactive:Ghci48
08:48:40 <dminuoso> % let x = ((+1), (+2)); y = ((+10), (+20)); crazyCompose x y = x & indexing each %@~ (\i f -> f . fromJust (y ^? ix i)); in (0 &) <$> crazyCompose [(+1), (+2)] ((+10), (+20), (+30))
08:48:41 <yahb> dminuoso: [11,22]
08:48:50 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 252 seconds)
08:49:27 <dminuoso> So you could do something as naive as:
08:49:29 <siers> ah, one that would bubble the Option to the top, you mean
08:50:07 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
08:50:23 <dminuoso> well we can fix it like this for example
08:50:26 <dminuoso> % crazyCompose x y = x & indexing each %@~ (\i f -> maybe f (f .) (y ^? ix i))
08:50:27 <yahb> dminuoso:
08:50:35 <dminuoso> %
08:50:35 <yahb> dminuoso:
08:50:39 <dminuoso> % (0 &) <$> crazyCompose [(+1), (+2), (+3)] ((+10), (+20)
08:50:39 <yahb> dminuoso: ; <interactive>:148:56: error: parse error (possibly incorrect indentation or mismatched brackets)
08:50:45 <dminuoso> % (0 &) <$> crazyCompose [(+1), (+2), (+3)] ((+10), (+20))
08:50:45 <yahb> dminuoso: [11,22,3]
08:50:57 ehamberg_ is now known as ehamberg
08:51:00 Erutuon joins (~Erutuon@user/erutuon)
08:51:30 <dminuoso> Note that this type of "you have to make sure yourself" you have frequently in various lens combinators
08:52:05 <dminuoso> For example:
08:52:08 × chele quits (~chele@user/chele) (Ping timeout: 252 seconds)
08:52:14 <dminuoso> % "Sony Playstation" & partsOf (traverse . filtered isUpper) %~ reverse
08:52:14 <yahb> dminuoso: "Pony Slaystation"
08:52:22 <dminuoso> This is a pretty old and cool example.
08:52:46 std_mutex[m] joins (~stdmutexm@2001:470:69fc:105::1:4534)
08:52:53 <dminuoso> But what if we used set and mismatched arity?
08:53:16 <dminuoso> % ('a', 'b', 'c') & partsOf each .~ ['A','B','C','D']
08:53:16 <yahb> dminuoso: ('A','B','C')
08:53:23 <dminuoso> % ('a', 'b', 'c') & partsOf each .~ ['A','B']
08:53:23 <yahb> dminuoso: ('A','B','c')
08:53:46 <dminuoso> siers: Note that this behaves similarly to crazyCompose, in fact.
08:54:12 acowley joins (~acowley@c-68-83-22-43.hsd1.nj.comcast.net)
08:54:18 <dminuoso> We probably could implement crazyCompose in terms of partsOf too
08:54:45 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:54:51 <dminuoso> Heck, this could even be more expressible
08:56:31 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:56:49 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:56:56 Escanor joins (~Escanor@103.142.31.135)
08:57:00 machinedgod joins (~machinedg@24.105.81.50)
08:57:17 × Escanor quits (~Escanor@103.142.31.135) (Client Quit)
08:57:39 <dminuoso> Oh yes!
08:57:44 <dminuoso> % crazyCompose' x y = x & partsOf each %~ zipWith (.) (toListOf each y)
08:57:44 <yahb> dminuoso:
08:57:47 <dminuoso> siers: ^- this is it.
08:58:06 <dminuoso> % :t crazyCompose'
08:58:06 <yahb> dminuoso: (Each a1 b1 (a2 -> b2) (a2 -> b2), Each s s (b2 -> b2) (b2 -> b2)) => a1 -> s -> b1
08:58:15 <dminuoso> % (0 &) <$> crazyCompose [(+1), (+2), (+3)] ((+10), (+20))
08:58:16 <yahb> dminuoso: [11,22,3]
08:58:20 <dminuoso> Beautiful. :)
08:58:24 acidjnk_new joins (~acidjnk@p200300d0c7271e85247d18c27da64632.dip0.t-ipconnect.de)
09:00:44 chele joins (~chele@user/chele)
09:02:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:03:09 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:04:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:05:06 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:07:00 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:07:17 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:08:35 jstolarek joins (~jstolarek@137.220.120.162)
09:11:21 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:11:39 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:15:19 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:15:36 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:17:11 dignissimus joins (~dignissim@88-104-68-62.dynamic.dsl.as9105.com)
09:17:22 <dignissimus> I haven't used IRC in ages!
09:17:27 <siers> not any more
09:17:36 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
09:17:36 allbery_b joins (~geekosaur@xmonad/geekosaur)
09:17:39 allbery_b is now known as geekosaur
09:18:47 <dignissimus> I'm having trouble with today's advent of Code, the issue is monads. I'm just about to paste it somewhere, hopefully I can get some help
09:19:41 <arahael> dignissimus: Have you considered doing it without monads? :)
09:19:48 × Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:19:56 <merijn> I...may have overengineered my solution to part 1 >.>
09:20:19 <arahael> merijn: So did I. I had a really really clever implementation. :(
09:20:29 <siers> I foldMaped into Endo's to do yesterday's :)
09:20:38 <merijn> Mine is really unclever :p
09:20:46 <arahael> merijn: In retrospect, so's mine. :D
09:20:48 <siers> (apostrophe wasn't necessary)
09:21:12 <xerox> arahael: do you put those online somewhere?
09:21:16 <siers> did you two get all stars?
09:21:38 <arahael> xerox: I haven't done mine yet. Actually still doing it, but it's slow - had to cook pizza, I was starving, and I'm sooo sleepy.
09:22:19 <merijn> The description of part 2 seems to apply I can't just blindly collapse all predicate into one filter, because "stop at one" probably means if you apply all predicates your set will be empty
09:23:31 <arahael> merijn: Yeah, I had to read it several times.
09:24:29 <dignissimus> arahael: I'm too much of a beginenr to know if I don't have to XD
09:24:40 <dignissimus> https://paste.tomsmeding.com/TTGkZhpo
09:24:47 <dignissimus> This doesn't compile because of typing
09:25:03 <dignissimus> The `map (\x -> ())` is me being very desperate
09:25:26 <merijn> dignissimus: eh...have you considered no trying to have everything on a single line with no type annotations? xD
09:25:32 <dignissimus> hmmmmmm
09:25:38 <dignissimus> No XD
09:25:54 <merijn> No wonder your errors are unhelpful :p
09:26:02 <arahael> dignissimus: And also specify types - I'm not lookign at any possible solutions yet until I've submitted mine, but another tip is always to add types.
09:27:48 <dignissimus> I think I can state my question as I have something of type IO String and I'd like to print it out
09:28:13 <dignissimus> Also would the better way to write all that to create many functions?
09:28:35 <dignissimus> Or is there syntax sugar I should probably use
09:29:37 <merijn> Eh, just write out functions? in either where or just top level?
09:33:55 <arahael> Ok, done mine. Taking my contacts out, drinking port, and oh man, what a day.
09:33:58 arahael clicks on dignissimus's paste.
09:34:37 <arahael> Oh, yeah. Write a whole bunch of helper functions instead for that. :)
09:35:29 <dminuoso> If you have to employ a horizontal scrollbar, its too much.
09:36:27 <merijn> my Day2 solution is, like, 3 times that size :p
09:37:04 <arahael> Mine is... 30 times merijn's size. :D
09:37:17 <dminuoso> By merijn's size, do you mean in terms of characters of his name?
09:37:29 <dminuoso> Or in terms of his physical height?
09:37:40 dminuoso is unsure
09:37:57 <arahael> dminuoso: That's a strike against my implementation, seeing as I did it in literate haskell. It should have been clear! :(
09:38:15 arahael burns it.
09:39:11 <arahael> merijn: I managed to not implement part of the specification, and I still got the correct answers. :/ I suspect I was "lucky".
09:39:20 <arahael> (For day3)
09:41:42 <merijn> oh, shite
09:41:47 <merijn> I misread the 2nd part >.>
09:44:30 [exa] writes an oneliner on a 600col line
09:44:35 <arahael> merijn: I ignored part of it and still got it right! So I still got my stars.
09:44:53 <merijn> arahael: Naah, I just did the entirely wrong thing :p
09:45:30 <arahael> merijn: Nice. :) I'm really bad at code tonight so I'm pretty chuffed I got it done. :) Only had one of my three coffees today. :(
09:45:34 <arahael> Day was too busy.
09:45:47 <arahael> (And if I disrupt my coffee intake, my tinnitus goes haywire)
09:45:50 × dschrempf quits (~dominik@mobiledyn-62-240-134-39.mrsn.at) (Quit: WeeChat 3.3)
09:50:55 <merijn> bleh...the inelegant way is easy, but I can't quite get the elegant solution to work >.>
09:51:52 <arahael> merijn: I do them all the inelegant way! Less thinking involved!
09:53:08 <arahael> Plus, the sooner I get AoC done, the sooner I can get into nethack again!
09:57:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:58:07 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:58:36 x_kuru joins (~xkuru@user/xkuru)
10:01:15 × xkuru quits (~xkuru@user/xkuru) (Ping timeout: 252 seconds)
10:01:21 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:01:26 <dignissimus> I've solved it!!
10:01:39 dschrempf joins (~dominik@mobiledyn-62-240-134-39.mrsn.at)
10:01:47 × dschrempf quits (~dominik@mobiledyn-62-240-134-39.mrsn.at) (Client Quit)
10:04:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:04:21 <siers> merijn, as always
10:04:21 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:05:15 zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi)
10:06:45 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
10:06:50 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:08:30 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:08:48 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:08:54 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:715b:47ca:3928:db8d) (Remote host closed the connection)
10:09:06 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:09:41 Lord_of_Life_ is now known as Lord_of_Life
10:10:45 <arahael> dignissimus: Congrats!
10:11:10 lavaman joins (~lavaman@98.38.249.169)
10:15:59 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
10:16:46 <merijn> Well, it works. But it sucks :p
10:20:10 <arahael> I'm still pleasedd that mine worked for me. :)
10:20:45 <arahael> The detail I ignored is the bias bit - ie, if you have equal 1's and 0's, you're supposed to pick one or the other.
10:20:54 <arahael> I just went with whatever was the default for my algorithm.
10:21:13 <arahael> Pretty sure I got the correct answer by luck.
10:23:53 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:24:10 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:27:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:28:05 <merijn> I'm sure mine could've been way simpler, but I'm too foggy for that :p
10:28:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:28:19 <merijn> arahael: https://github.com/merijn/AdventOfCode/blob/master/Day3.hs
10:28:48 <arahael> merijn: Woah. Let me show you mine.
10:29:05 <arahael> https://github.com/arafangion/super-eureka/blob/main/app/Day3.md
10:29:47 <arahael> merijn: As you can tell, I'm very very lazy today. On multiple counts. :)
10:30:14 <arahael> Nice use of megaparsec, though. I'm tempted to start using that, but blegh. Not tonight.
10:30:43 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
10:31:34 <merijn> Not sure if Vector was worth the effort in the end :p
10:31:47 <merijn> I was expecting a different twist in the 2nd part :p
10:33:11 <arahael> Yeah, that's the trouble - impossible to predict. :)
10:33:35 <arahael> I did mine the most lazy way I could think of. As soon as I got the valid answer, I stopped.
10:33:48 <arahael> Mine is particularly inefficient, I suspect.
10:39:14 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:39:32 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:40:15 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
10:41:26 <hololeap> did anyone else use the NonEmpty comonad for day 1?
10:42:47 wei2912 joins (~wei2912@116.88.103.128)
10:42:49 <xerox> hololeap: what does that look like?
10:43:09 <opqdonut> sooooo GHC 8.10 and windows, segfaults, anyone else bump into this? I just find the old bug that was fixed in 8.8.4
10:43:58 <hololeap> xerox: http://sprunge.us/G6o22G
10:44:04 mmhat joins (~mmh@55d45bca.access.ecotel.net)
10:46:17 <xerox> :t (=>=)
10:46:18 <lambdabot> error:
10:46:18 <lambdabot> • Variable not in scope: =>=
10:46:19 <lambdabot> • Perhaps you meant one of these:
10:47:07 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
10:47:08 <hololeap> % import Control.Comonad
10:47:08 <yahb> hololeap:
10:47:14 <hololeap> % :t (=>=)
10:47:14 <yahb> hololeap: Comonad w => (w a -> b) -> (w b -> c) -> w a -> c
10:47:20 <xerox> neat
10:47:43 <xerox> do they use w because it's kinda of an upside down m
10:47:49 <hololeap> yeah
10:47:52 <xerox> hilarious
10:48:30 <hololeap> % :t \f g -> extend (f =>= g)
10:48:31 <yahb> hololeap: Comonad w => (w a -> b1) -> (w b1 -> b2) -> w a -> w b2
10:48:38 <xerox> is there also pure :: a -> w a ?
10:48:47 <hololeap> it's called extract
10:48:52 <hololeap> % :t extract
10:48:52 <yahb> hololeap: Comonad w => w a -> a
10:48:53 <merijn> xerox: That's the wrong way around
10:49:01 <merijn> xerox: it's "w a -> a"
10:49:01 <hololeap> everything is reversed
10:49:06 <xerox> I was wondering how the 'b' became 'w b'
10:49:11 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
10:49:50 <merijn> tbh, my brain still doesn't grok comonad :p
10:50:05 <dignissimus> merijn: Your solution looks amazing
10:50:06 arahael hands merijn some more wine.
10:50:15 <hololeap> % :t duplicate
10:50:16 <yahb> hololeap: Comonad w => w a -> w (w a)
10:50:21 <dignissimus> arahael: I like your mostCommon implementation
10:50:23 <xerox> cool
10:50:40 <arahael> dignissimus: There's a bug in it.
10:50:43 <hololeap> % :t \f fmap f . duplicate
10:50:44 <yahb> hololeap: ; <interactive>:1:11: error: parse error on input `.'
10:50:44 <xerox> so you expand the universe instead
10:50:49 <hololeap> % :t \f -> fmap f . duplicate
10:50:50 <yahb> hololeap: Comonad f => (f a -> b) -> f a -> f b
10:51:07 <dignissimus> oh what's the bug?
10:51:15 <arahael> dignissimus: have you done part 2 yet?
10:51:23 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
10:51:30 <merijn> dignissimus: The goal is to keep them relatively simple for beginners :)
10:51:42 <dignissimus> No, just part 1
10:51:45 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
10:51:49 <arahael> dignissimus: There's no bug yet, then. :D
10:51:50 <merijn> (But also, no "skip handling errors" shortcuts!)
10:51:50 <dignissimus> I don't know if I want to do part 2 HAHAHAH
10:51:52 <arahael> dignissimus: Keep going!
10:52:10 <hololeap> whenever you read "sliding window", chances are comonads are a good fit
10:52:15 <hololeap> at least in theory...
10:52:24 <dignissimus> There's so much to read!
10:52:28 <dignissimus> I might do it later
10:52:51 <arahael> hololeap: What does Day2 look like using comonads, then? :)
10:53:54 <merijn> hololeap: Whenever I read sliding windows I read "zip + drop" :p
10:54:08 × fef quits (~thedawn@user/thedawn) (Quit: Leaving)
10:54:40 × chomwitt quits (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374) (Remote host closed the connection)
10:54:59 chomwitt joins (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374)
10:55:43 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds)
10:57:28 arahael considers a third glass of port.
10:59:08 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:59:25 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:03:34 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:03:51 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:05:31 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:05:49 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:06:29 <siers> merijn, but you needed to do it two times, I guess?
11:06:44 dschrempf joins (~dominik@mobiledyn-62-240-134-39.mrsn.at)
11:06:55 × dschrempf quits (~dominik@mobiledyn-62-240-134-39.mrsn.at) (Client Quit)
11:07:47 AlexNoo_ is now known as AlexNoo
11:09:19 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
11:12:01 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 252 seconds)
11:13:51 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Ping timeout: 252 seconds)
11:16:05 kuribas joins (~user@ptr-25vy0i9sci02rkc3ssb.18120a2.ip6.access.telenet.be)
11:18:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:18:54 namkeleser joins (~namkelese@101.175.102.188)
11:19:08 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:20:48 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:21:06 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:22:46 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:23:04 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:24:44 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:25:02 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:25:14 cosimone joins (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3)
11:26:53 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
11:31:00 <kuribas> I saw this book: https://www.manning.com/books/data-oriented-programming
11:31:08 <kuribas> I wonder if it is applicable to FP?
11:31:27 <kuribas> Or is it just another technique to make up for the lack of flexibility in OO.
11:33:35 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:33:53 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:35:33 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:35:51 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:38:41 <dminuoso> I have two versions of a datatype, one that has `[(K, V)]` in one particular field, and the other uses `Map K V`.
11:39:21 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
11:39:58 <dminuoso> I tried parametrizing this data type over type `LookupList k v = [(k, v]`, such that I'd have `type Validated = Skeleton Map` and `type Unvalidated = Skeleton LookupList`, but GHC wont accept that, it requires the type alias to be expanded
11:40:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:40:28 <dminuoso> What other options do I have without using DataKinds + TyFams?
11:40:59 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
11:41:06 <kuribas> dminuoso: newtypes?
11:41:27 <dminuoso> Oh. Mmm.
11:41:32 <dminuoso> Yeah I guess that works
11:41:52 <kuribas> and some liberal use of "coerce".
11:42:00 <kuribas> if needed.
11:42:27 × iqubic quits (~user@2601:602:9502:c70:7d14:3ce3:e8b8:8f59) (Ping timeout: 252 seconds)
11:44:21 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:44:39 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:44:40 × hrdl quits (~hrdl@mail.hrdl.eu) (Quit: Lost terminal)
11:45:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
11:46:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:46:22 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
11:48:11 hrdl joins (~hrdl@mail.hrdl.eu)
11:52:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:53:09 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:56:14 <dminuoso> % data Foo a = Foo { foo :: a }
11:56:15 <yahb> dminuoso:
11:56:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
11:56:24 <dminuoso> % x = Foo { foo = 'c' }
11:56:25 <yahb> dminuoso:
11:56:31 <dminuoso> % y = x{ foo = "bar" }
11:56:32 <yahb> dminuoso:
11:56:42 <dminuoso> Im quite amazed this is possible. :)
11:56:58 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:58:55 × acidjnk_new quits (~acidjnk@p200300d0c7271e85247d18c27da64632.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
11:59:06 <dminuoso> For some reason I did not expect this to work
11:59:31 × dignissimus quits (~dignissim@88-104-68-62.dynamic.dsl.as9105.com) (Quit: Bye!)
11:59:39 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds)
12:00:24 jpds joins (~jpds@gateway/tor-sasl/jpds)
12:00:35 <hololeap> arahael: couldn't find a use for comonads on that one https://gist.github.com/hololeap/7bafa6592902de52fb7b4e2e9bedc1b8
12:02:27 DNH joins (~DNH@2a02:8108:1100:16d8:bd44:40bf:fb3b:742a)
12:02:33 <arahael> hololeap: Oh, I must've been thinking of day1. :(
12:03:12 <arahael> hololeap: Interesting implementation - very production grade.
12:04:17 <kuribas> dminuoso: polymorphic record update?
12:05:42 × retroid_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
12:06:04 retroid_ joins (~retro@97e2ba2e.skybroadband.com)
12:07:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:08:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:08:19 pfurla joins (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab)
12:10:30 <kuribas> % data Foo a = Foo { foo :: a, bar :: a}
12:10:30 <yahb> kuribas:
12:10:47 <kuribas> % x = Foo { foo = 'c', bar = 'd' }
12:10:48 <yahb> kuribas:
12:10:59 <kuribas> % y = x { foo = "bar"}
12:10:59 <yahb> kuribas: ; <interactive>:171:15: error:; * Couldn't match type `[Char]' with `Char'; Expected: Char; Actual: String; * In the `foo' field of a record; In the expression: x {foo = "bar"}; In an equation for `y': y = x {foo = "bar"}
12:14:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:15:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:16:14 <kuribas> yahb: good boye
12:16:41 chisui joins (~chisui@2001:16b8:661d:7600:f248:3361:5fc2:82d9)
12:18:55 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:18:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:19:13 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:19:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:20:05 <kuribas> what's so bad about BlockArguments?
12:20:48 <geekosaur> many people seem to find them hard to read
12:21:10 <siers> they can read haskell and it's this that trips them up? D:
12:21:31 <hpc> they're just in it for the $
12:22:21 × vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds)
12:22:22 <hololeap> lol
12:22:56 <kuribas> siers: yeah, my thought also...
12:23:40 <hpc> also, i find ruby's block arguments perfectly readable
12:24:11 <hpc> so there's already an example of it not being an issue, once you go into it without preconceptions
12:24:15 <geekosaur> admittedly ruby's are somewhat limited
12:24:25 <hpc> sure, but they're structurally the same
12:24:31 <siers> ruby is somehwat limited
12:24:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:24:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:24:55 <hpc> function do block <=> function do block
12:25:08 <hpc> function \arg -> block <=> function do |arg| block
12:25:35 <hpc> function case expr of ... <=> function do lots of if-then-else block
12:25:48 <hpc> etc
12:26:03 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
12:27:27 × pfurla quits (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab) (Quit: gone to sleep. ZZZzzz…)
12:28:37 jakalx joins (~jakalx@base.jakalx.net)
12:28:42 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan)
12:28:52 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
12:28:53 pfurla joins (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab)
12:29:42 × pfurla quits (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab) (Client Quit)
12:29:54 deadmarshal joins (~deadmarsh@95.38.116.117)
12:30:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
12:30:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:32:17 aliosablack joins (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374)
12:32:48 × chomwitt quits (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374) (Read error: Connection reset by peer)
12:33:19 pfurla joins (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab)
12:34:31 shriekingnoise joins (~shrieking@186.137.144.80)
12:35:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
12:36:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:38:05 alzgh joins (~alzgh@user/alzgh)
12:38:49 <dminuoso> pure UserNonValidated{..}{_unvPerms = PermSet{ .. }}
12:39:11 <dminuoso> What a cute way to defeat faulty ApplicativeDo logic
12:39:38 <dminuoso> Sadly this still triggers an undefined fields warning.
12:41:18 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:41:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:41:51 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
12:42:16 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:43:12 Benzi-Junior joins (~BenziJuni@88-149-66-61.du.xdsl.is)
12:45:33 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:45:51 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:47:31 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:47:48 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:51:52 _bo joins (~bo@79.171.122.236)
12:53:32 × max22- quits (~maxime@2a01cb088335980065dae87f91b73dea.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
12:56:41 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:56:57 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:00:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:01:09 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:02:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:03:07 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:04:47 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:05:05 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:06:45 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:07:03 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:07:20 × aliosablack quits (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374) (Ping timeout: 252 seconds)
13:08:36 <aplainzetakind> Does hls provided by ghcup have brittany?
13:11:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:11:21 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:12:47 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
13:15:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:15:09 deadmarshal joins (~deadmarsh@95.38.116.117)
13:15:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:16:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:17:17 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:18:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:19:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:19:31 <jneira[m]> yeah, for all ghcs but 9.0.1
13:20:59 <jneira[m]> ghcup downloads hls from hls repo releases
13:22:19 chomwitt joins (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374)
13:27:02 <aplainzetakind> But that's just support and brittany itself needs to be installed right?
13:29:45 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:30:03 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:31:07 fabfianda joins (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it)
13:32:55 deadmarshal_ joins (~deadmarsh@68.235.32.241)
13:33:45 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
13:35:33 Lycurgus joins (~juan@98.4.112.204)
13:36:14 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
13:37:37 hololeap joins (~hololeap@user/hololeap)
13:40:41 max22- joins (~maxime@2a01cb0883359800d8b0a223a3eaa461.ipv6.abo.wanadoo.fr)
13:43:19 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:43:37 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:43:49 × deadmarshal_ quits (~deadmarsh@68.235.32.241) (Ping timeout: 252 seconds)
13:44:45 deadmarshal joins (~deadmarsh@95.38.116.117)
13:47:23 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:47:41 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:48:48 × pfurla quits (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab) (Quit: gone to sleep. ZZZzzz…)
13:51:17 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:51:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:53:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:53:33 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:54:09 × alx741 quits (~alx741@181.196.68.155) (Ping timeout: 256 seconds)
13:58:32 ph88 joins (~ph88@ip5f5af068.dynamic.kabel-deutschland.de)
14:00:12 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:00:30 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:02:26 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:02:44 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:03:58 × kritzefitz quits (~kritzefit@debian/kritzefitz) (Remote host closed the connection)
14:04:35 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
14:05:17 kritzefitz joins (~kritzefit@debian/kritzefitz)
14:05:39 aliosablack joins (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374)
14:06:07 × chomwitt quits (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374) (Read error: Connection reset by peer)
14:06:33 alx741 joins (~alx741@186.178.108.253)
14:08:56 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
14:09:58 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
14:13:02 lavaman joins (~lavaman@98.38.249.169)
14:15:29 ether_ joins (~a@p200300ef970235268185de4e61219232.dip0.t-ipconnect.de)
14:17:27 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
14:23:37 Guest17 joins (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
14:25:17 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:25:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:26:59 × imdoor quits (~imdoor@balticom-142-78-50.balticom.lv) (Quit: imdoor)
14:27:27 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
14:34:43 × ether_ quits (~a@p200300ef970235268185de4e61219232.dip0.t-ipconnect.de) (Quit: WeeChat 3.0.1)
14:35:01 × Techcable quits (~Techcable@168.235.93.147) (Ping timeout: 256 seconds)
14:35:19 × Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:b6fd:ec18:acf6:f1a8) (Quit: Leaving)
14:35:32 Feuermagier joins (~Feuermagi@user/feuermagier)
14:38:26 <zincy> Is it just me or is state machine testing with Hedgehog a pretty nasty experience
14:38:49 <zincy> Using Vars is tricky
14:40:35 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:40:52 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:42:32 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:42:50 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:43:51 zebrag joins (~chris@user/zebrag)
14:46:03 <[exa]> zincy: perhaps testing state machines with anything is a nasty experience in general
14:46:18 <zincy> Yeah it is hard
14:46:38 mud joins (~mud@user/kadoban)
14:51:50 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:52:08 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:53:18 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
14:55:13 alzgh joins (~alzgh@user/alzgh)
15:00:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:00:43 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:02:16 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
15:03:10 <kuribas> oh, "s" will popup a searchbox!
15:03:19 <kuribas> (in hackage)
15:06:39 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:06:56 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:07:25 × zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Ping timeout: 252 seconds)
15:07:38 zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi)
15:09:26 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
15:10:33 <maerwald> yeah... it's a bit rough though
15:11:22 alzgh joins (~alzgh@user/alzgh)
15:12:25 ether_ joins (~a@p200300ef970235b38185de4e61219232.dip0.t-ipconnect.de)
15:13:38 <kuribas> Better than nothing?
15:14:03 × chisui quits (~chisui@2001:16b8:661d:7600:f248:3361:5fc2:82d9) (Quit: Client closed)
15:17:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:17:43 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:19:23 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:19:41 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:20:13 pfurla joins (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab)
15:22:43 Itaru joins (~DaSH@ro2.flokinet.is)
15:24:11 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
15:24:16 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
15:24:22 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
15:24:46 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
15:25:12 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
15:25:19 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
15:25:26 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
15:25:56 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
15:26:17 cheater joins (~Username@user/cheater)
15:27:22 × vpan quits (~0@212.117.1.172) (Quit: Leaving.)
15:29:12 × EvanR quits (~evan@2600:1700:ba69:10:87af:d76a:1197:e8dd) (Quit: Leaving)
15:31:44 EvanR joins (~evan@user/evanr)
15:32:15 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
15:33:12 jakalx parts (~jakalx@base.jakalx.net) ()
15:35:30 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:35:48 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:38:39 <merijn> maerwald: Is there any language that has something better?
15:38:51 <ether_> I want to do a in place QuickSort. Do I need STM?
15:39:04 <merijn> ether_: Not necessarily
15:39:05 <maerwald> merijn: rust
15:39:10 jakalx joins (~jakalx@base.jakalx.net)
15:39:28 <merijn> ether_: But you do need some form of mutability (STM, IO, or ST)
15:40:01 <merijn> ether_: And probably want to use Vector (assuming you weren't already)
15:40:36 <ether_> merijn: Which is used normally? STM IO or ST?
15:41:25 <merijn> ether_: IO (if you're already in IO anyway) or ST
15:41:53 <merijn> ether_: ST is nice, because you can encapsulate it in pure code
15:41:59 <ether_> Is STM used if I try to parallelize quicksort?
15:42:39 <merijn> ether_: You could, but I don't think there's currently any STM vectors/arrays (or at least, I'm not aware of one)
15:42:43 <merijn> Could be a neat project
15:43:45 <ether_> Is parallel quicksort possible with ST (sorry, still a beginner)?
15:43:55 jgeerds joins (~jgeerds@55d45b75.access.ecotel.net)
15:44:06 × hiruji quits (~hiruji@user/hiruji) (Ping timeout: 245 seconds)
15:44:19 <merijn> ST is only single-threaded
15:44:32 <merijn> One of the reasons you can encapsulate it in pure code :p
15:44:51 Sgeo joins (~Sgeo@user/sgeo)
15:45:20 fizbin_ joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
15:45:33 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Read error: Connection reset by peer)
15:45:54 <ether_> Ok, so first project could be in sort quicksort with st. And parallel quicksort is not possible right now.
15:46:29 <merijn> ether_: Sort is actually a nice example of this. Consider: a function that has "list goes in" -> "sorted list goes out" is pure, even if you use mutability inside *IFF* you can guarantee no one can observe your mutability outside that function call
15:47:07 <merijn> Because, how could you even tell if it used mutability internally?
15:47:15 <ether_> So it's ok because the mutability is local.
15:47:24 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
15:47:46 <merijn> ether_: The ST monad allows mutable references inside it, but statically prevents any of the mutability leaking out of scope
15:48:32 <merijn> ether_: Which is why (unlike IO) there is a (safe!) "unST :: ST a -> a" function (type is a partial fib, because the type is slightly more complicated)
15:49:08 samhh joins (7569f027cf@2604:bf00:561:2000::e4)
15:49:45 <ether_> If nobody else knows about it and nobody else can use it then mutability is ok :-)
15:50:17 n8ess163 joins (~b@pool-72-80-171-162.nycmny.fios.verizon.net)
15:51:17 <merijn> For more details than you ever wanted to know about ST (and pure mutability), this is a good explanation of how it works: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.45.3718&rep=rep1&type=pdf
15:52:28 × xsperry quits (~xs@user/xsperry) ()
15:52:30 lbseale joins (~ep1ctetus@user/ep1ctetus)
15:52:45 <geekosaur> mutability is ok as long as nothing else can prove you did it :)
15:53:58 <merijn> @hackage vector
15:53:58 <lambdabot> https://hackage.haskell.org/package/vector
15:54:27 <merijn> ether_: The Vector package's Mutable modules support ST based reads/writes of vectors
15:54:47 <merijn> Actually...I think i used that for AoC in 2019, maybe I have an example :p
15:54:55 <ether_> How does Haskell solve parallel mutable array access if ST is single threaded and there is no STM vector?
15:55:18 <merijn> Ah, no, I did it using IO :)
15:55:56 <merijn> ether_: I mean, vector is just a library, there's nothing that prevents you from implementing an STM vector, I just don't think anyone has, because designing a good API is hard
15:55:59 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
15:56:08 hiruji joins (~hiruji@user/hiruji)
15:56:13 <merijn> ether_: IO based Vector can be used in a parallel setting, though
15:56:28 <merijn> ether_: There's also "sparks" which allow for pure parallelism too
15:56:48 <merijn> Simon Marlow's "Parallel & Concurrent Haskell" book explain those, iirc
15:57:49 <ether_> Is this the normal model with threads and locks?
15:57:51 <merijn> You could even make a regular vector of individual TVar's that you can then update individually
15:58:13 <merijn> ether_: The IO approach would just be the regular threads and locks kinda deal, yeah
15:59:46 <merijn> ether_: sparks are entirely different, in that they're basically "deterministic parallelism". Consider the example of "map (*2) someList", it is (obviously) safe to perform the multplications in parallel, because obviously no one can tell whether you did or not. But I don't think there is a lot of stuff written about how to use sparks effectively, though
16:00:08 <merijn> I think Athas was playing with them for a class a while back, but I dunno if he has any pointers
16:00:08 × xosdy[m] quits (~xosdyalet@2001:470:69fc:105::31f7) (Quit: You have been kicked for being idle)
16:00:21 xosdy[m] joins (~xosdyalet@2001:470:69fc:105::31f7)
16:00:22 xosdy[m] parts (~xosdyalet@2001:470:69fc:105::31f7) ()
16:00:46 <ether_> I don't know much about mutability and parallelism in Haskell. My idea was to make a parallel in place quicksort to learn real world Haskell better. But I think this is too advanced for me. I will try the in place ST quicksort though.
16:02:10 <EvanR> how about immutability and parallelism
16:02:49 <EvanR> https://hackage.haskell.org/package/parallel-3.2.2.0/docs/Control-Parallel.html
16:02:58 <merijn> ether_: Parallel & Concurrent Haskell is a very nice book for getting familiar with the basic parallelism/concurrency primitives in GHC
16:03:26 <merijn> ether_: But a single-threaded ST and/or IO based first implementation is probably an easier starting point
16:03:46 <merijn> Also, allow me my usual hot take: Why quick sort, the worst of all sorts? :p
16:04:27 <merijn> A pox upon whoever thought of that name, misleading generations of programmers into thinking it's a good sort >.>
16:08:27 × alzgh quits (~alzgh@user/alzgh) (Ping timeout: 256 seconds)
16:08:40 <ether_> I like merge sort better too. It's just an excuse for using parallel mutable arrays in haskell. an then i have an answer to the people who say haskell's quicksort is not a real quicksort. and it's only toy language
16:08:55 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:09:12 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:09:19 × nabaiste^ quits (~nabaiste@68.101.58.90) (Remote host closed the connection)
16:09:42 <merijn> You can do parallel merge sort too ;)
16:09:42 notzmv joins (~zmv@user/notzmv)
16:09:56 × n8ess163 quits (~b@pool-72-80-171-162.nycmny.fios.verizon.net) (Ping timeout: 252 seconds)
16:10:25 <merijn> Even in-place! (Well, with constant extra memory...)
16:10:46 <merijn> Although that implementation is a bit harder
16:11:35 × xff0x quits (~xff0x@2001:1a81:5394:4100:b17b:62d7:7f1e:4d8a) (Ping timeout: 252 seconds)
16:12:02 <merijn> ether_: tbh, a proper mutable quicksort should be easy enough. In IO you can probably do it right now, just looking at the Mutable vector API: https://hackage.haskell.org/package/vector-0.12.3.1/docs/Data-Vector-Mutable.html#g:10
16:12:20 slowButPresent joins (~slowButPr@user/slowbutpresent)
16:12:31 <merijn> (Just pretend 'PrimState m' says either 'IO' or 'ST')
16:12:41 xff0x joins (~xff0x@2001:1a81:5394:4100:724:71c4:c7ef:b5ba)
16:13:33 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
16:15:31 <ether_> merijn: thank you
16:19:39 × Guest17 quits (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
16:19:58 deadmarshal joins (~deadmarsh@95.38.116.117)
16:22:22 alzgh joins (alzgh@user/alzgh)
16:22:31 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:2293:2037:bf6e:4ea5) (Quit: WeeChat 2.8)
16:23:31 × Itaru quits (~DaSH@ro2.flokinet.is) (Quit: Leaving)
16:23:54 Itaru joins (~DaSH@ro2.flokinet.is)
16:27:50 son0p joins (~ff@181.136.122.143)
16:31:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:32:19 lavaman joins (~lavaman@98.38.249.169)
16:32:27 erts joins (~erts@user/erts)
16:32:58 × ubert quits (~Thunderbi@p200300ecdf0ba299f01739553a033620.dip0.t-ipconnect.de) (Remote host closed the connection)
16:32:59 × cosimone quits (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Remote host closed the connection)
16:33:15 Techcable joins (~Techcable@168.235.93.147)
16:33:26 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
16:33:35 fef joins (~thedawn@user/thedawn)
16:34:56 ubert joins (~Thunderbi@p200300ecdf0ba299e6b318fffe838f33.dip0.t-ipconnect.de)
16:35:39 × chele quits (~chele@user/chele) (Ping timeout: 256 seconds)
16:36:53 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
16:39:15 erts parts (~erts@user/erts) (.)
16:40:11 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
16:40:23 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:42:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:42:21 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:42:59 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
16:43:53 × namkeleser quits (~namkelese@101.175.102.188) (Quit: Client closed)
16:47:19 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
16:47:33 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
16:49:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
16:50:33 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
16:52:15 × Itaru quits (~DaSH@ro2.flokinet.is) (Quit: Leaving)
16:52:26 × wei2912 quits (~wei2912@116.88.103.128) (Quit: Lost terminal)
16:52:43 Itaru joins (~DaSH@ro2.flokinet.is)
16:53:09 × _bo quits (~bo@79.171.122.236) (Read error: Connection reset by peer)
16:55:39 × ubert quits (~Thunderbi@p200300ecdf0ba299e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
17:00:25 × hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Quit: Konversation terminated!)
17:02:54 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
17:03:39 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
17:04:22 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:05:07 × jgeerds quits (~jgeerds@55d45b75.access.ecotel.net) (Ping timeout: 256 seconds)
17:05:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:07:21 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
17:08:43 × Unhammer quits (~Unhammer@user/unhammer) (Ping timeout: 250 seconds)
17:10:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
17:12:19 × pfurla quits (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab) (Quit: gone to sleep. ZZZzzz…)
17:13:55 × ether_ quits (~a@p200300ef970235b38185de4e61219232.dip0.t-ipconnect.de) (Quit: WeeChat 3.0.1)
17:20:06 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
17:21:00 econo joins (uid147250@user/econo)
17:22:16 Unhammer joins (~Unhammer@user/unhammer)
17:23:56 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
17:29:46 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
17:30:53 zaquest joins (~notzaques@5.130.79.72)
17:32:37 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 252 seconds)
17:35:41 <EvanR> I rewrote my day3 part2 solution so it only goes through the original list once
17:35:57 <EvanR> and other lists once
17:36:27 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
17:37:45 × fabfianda quits (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it) (Ping timeout: 252 seconds)
17:38:56 fabfianda joins (~fabfianda@mob-5-90-243-109.net.vodafone.it)
17:41:48 × fabfianda quits (~fabfianda@mob-5-90-243-109.net.vodafone.it) (Read error: Connection reset by peer)
17:41:50 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
17:41:57 fabfianda joins (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it)
17:43:05 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
17:48:18 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
17:51:17 <EvanR> does my use of seq seem cromulent here https://paste.tomsmeding.com/TA5yfS2w
17:51:46 <dsal> EvanR: Maybe BangPatterns would be clearer?
17:51:53 <EvanR> would it?
17:52:34 <dsal> I find `seq` weird. Though you're keeping the part you're not working with a bit lazier. I can't tell if that's intentional or not.
17:53:06 <EvanR> if I don't add 1, there's nothing to seq...
17:53:41 <EvanR> basically I am thinking it gets evaluated the next time a + comes up
17:53:51 <dsal> If you did bang patterns, you'd declare both it for both z and o.
17:54:02 <EvanR> yes that's what I originally had
17:54:21 <EvanR> maybe that's better for the compiler
17:54:36 <dsal> I'd think you'd want them all evaluated by the end, so having thunks along the way probably isn't helping you.
17:55:32 <dsal> I don't know how this stuff optimizes, though. Conceptually, it doubles the `seq`s. For those kinds of things, I just let the a profiler or benchmark guide me.
17:56:10 <dsal> But the use of seq here looks like what I'd think seq would make sense for. I just almost never use it.
17:57:14 <EvanR> I guess it's less noisy https://paste.tomsmeding.com/NdDixLWt
17:57:51 <EvanR> so now the function is more strict? :thonk:
17:58:25 <EvanR> before the tuple can be scrutized, the sums are done
17:58:51 <EvanR> so infinite lists are out right xD
17:59:51 <dsal> I don't think this has any effect on infinite lists, does it? (other than the part where you don't terminate until you get to the end)
17:59:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:00:14 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
18:00:48 <EvanR> if you try to use part on an infinite list, now you can't possibly get the first item from either partition (or anything in the tuple at all, the tuple can't exist)
18:01:20 <boxscape> EvanR: personally I'd use LambdaCase here, as in https://paste.tomsmeding.com/XKupxSUx - just to avoid having to write all those arguments/bang patterns twice
18:01:58 <EvanR> that's real slick
18:04:01 deadmarshal joins (~deadmarsh@95.38.116.117)
18:04:35 <EvanR> sorry, the tuple can't exist anyway since there is no end
18:04:37 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
18:05:53 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
18:08:41 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
18:12:31 rkrishnan joins (~user@122.171.92.146)
18:12:57 × hiruji quits (~hiruji@user/hiruji) (Ping timeout: 252 seconds)
18:12:59 × rkrishnan quits (~user@122.171.92.146) (Remote host closed the connection)
18:16:39 Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
18:17:11 × deadmarshal quits (~deadmarsh@95.38.116.117) (Read error: Connection reset by peer)
18:18:24 hiruji joins (~hiruji@user/hiruji)
18:20:07 deadmarshal joins (~deadmarsh@68.235.38.176)
18:22:51 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Remote host closed the connection)
18:23:03 shiraeeshi[m] joins (~shiraeesh@2001:470:69fc:105::1:77)
18:24:03 × kuribas quits (~user@ptr-25vy0i9sci02rkc3ssb.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
18:30:46 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
18:31:33 × DNH quits (~DNH@2a02:8108:1100:16d8:bd44:40bf:fb3b:742a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:31:59 zincy_ joins (~zincy@2a00:23c8:970c:4801:f9b9:ddeb:6361:fc1a)
18:32:10 lavaman joins (~lavaman@98.38.249.169)
18:32:58 × res0nat0r8 quits (~Fletch@dia.whatbox.ca) (Ping timeout: 268 seconds)
18:34:17 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:34:58 DNH joins (~DNH@2a02:8108:1100:16d8:bd44:40bf:fb3b:742a)
18:35:13 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
18:39:27 × hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Quit: Konversation terminated!)
18:43:19 × deadmarshal quits (~deadmarsh@68.235.38.176) (Read error: Connection reset by peer)
18:45:22 lavaman joins (~lavaman@98.38.249.169)
18:53:23 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
18:55:49 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
18:56:44 × zincy_ quits (~zincy@2a00:23c8:970c:4801:f9b9:ddeb:6361:fc1a) (Remote host closed the connection)
18:57:57 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
19:00:17 × hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection)
19:03:13 × hololeap quits (~hololeap@user/hololeap) (Read error: Connection reset by peer)
19:04:02 × max22- quits (~maxime@2a01cb0883359800d8b0a223a3eaa461.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
19:04:32 hololeap joins (~hololeap@user/hololeap)
19:05:49 <boxscape> https://wiki.haskell.org/Idiom_brackets has some ugly typeclass hackery to approximate idiom brackets, but here's what I'm wondering: It introduces a mechanism to insert joins anywhere in an applicative sequence, e.g. `join (f <$> x <*> y) <*> z`. Is this commonly useful? I've never felt the need to use join in such a context
19:06:26 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:06:44 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:08:25 <EvanR> while applicativing you could possibly feel the urge to monad
19:09:09 × nautical quits (~nautical@2601:602:900:1630::396f) (Quit: WeeChat 3.3)
19:09:14 zincy_ joins (~zincy@2a00:23c8:970c:4801:f9b9:ddeb:6361:fc1a)
19:10:46 <awpr> that particular approach looks a bit inscrutable to me based on a short look, but as for the urge to introduce joins: if you have a monadic API where it's reasonable to think about expression trees of monadic actions rather than "imperative" sequences of actions, then joins show up at every level of nesting
19:11:55 <boxscape> hm, I see
19:13:03 <awpr> e.g. if you have a DSL where each operation is constructed by a monadic action: `add, mul :: p Int -> p Int -> DSL p (p Int)` and `lit :: Int -> DSL p (p Int)`, then imperative-style looks a bit unwieldy: `do { x <- lit 2; y <- lit 4; z <- lit 6; xy <- add x y; xyz <- mul xy z }`
19:14:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:15:09 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:15:17 <awpr> and expression style with only the stuff in `base` is unwieldy, too: `join (mul <$> (join (add <$> lit 2 <*> lit 4)) <*> lit 6)` (so unwieldy that I probably got it wrong, but it gets the idea across)
19:15:40 <boxscape> okay, yeah, that makes sense, thanks
19:17:15 <awpr> my preferred way to deal with that is an operator `=*< :: Monad m => m (a -> m b) -> m a -> m b` that does both the `<*>` and the `join` together, so: `mul <$> (add <$> lit 2 =*< lit 4) =*< lit 6`
19:18:00 sprout_ joins (~quassel@2a02:a467:ccd6:1:654a:7e1b:4ab5:b4bb)
19:18:27 tfeb joins (~tfb@88.98.95.237)
19:18:30 <boxscape> ah, neat
19:19:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
19:19:32 deadmarshal joins (~deadmarsh@95.38.116.117)
19:19:38 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
19:19:41 <awpr> there was some discussion of this operator a while ago, and I think ski preferred a different name for the same operator. I don't remember what that name was, though, something with multiple stars or extra angle brackets like `<***>` or `<<*>>` or something
19:20:40 <boxscape> okay
19:21:20 × sprout quits (~quassel@2a02:a467:ccd6:1:8149:2184:782c:2882) (Ping timeout: 252 seconds)
19:21:46 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
19:22:57 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
19:22:59 × fabfianda quits (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it) (Ping timeout: 252 seconds)
19:23:43 fabfianda joins (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it)
19:24:01 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 256 seconds)
19:26:15 <boxscape> I suppose in Idris you could write `mul !(add !(lit 2) !(lit 4)) !(lit 6)` (haven't done Idris in years though)
19:27:57 <awpr> hmm, I do remember Idris having that kind of notation, but I'm unsure whether it implicitly joins the subexpressions or whether it's only for applicative-style expressions
19:28:22 × tfeb quits (~tfb@88.98.95.237) (Quit: died)
19:28:56 <boxscape> the documentation is https://idris2.readthedocs.io/en/latest/tutorial/interfaces.html#notation
19:31:53 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:32:21 <awpr> so the exclamation point syntax was replaced with bracket notation in idris2? as far as I can tell that doesn't appear to handle the joins for you, only the applicative part
19:33:27 <boxscape> awpr: erm, not sure but I don't it was replaced? Since the link points to !-notation of idris 2
19:33:32 max22- joins (~maxime@2a01cb0883359800e7fc8fc683bf0760.ipv6.abo.wanadoo.fr)
19:33:32 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
19:33:48 <boxscape> (they've had idiom brackets in parallel)
19:34:06 <awpr> oh, I missed that. I was on the same docs page already and just assumed the link was to the section I was reading
19:34:10 <boxscape> s/don't/don't think
19:34:31 <boxscape> fair
19:34:38 puke joins (~puke@user/puke)
19:35:27 <awpr> ok yeah, that looks like it probably does behave how you'd want for this sort of nested joins
19:35:38 Erutuon joins (~Erutuon@user/erutuon)
19:35:38 <boxscape> right, okay
19:38:05 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:38:23 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:39:37 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Remote host closed the connection)
19:39:49 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
19:42:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:42:21 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:44:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:44:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:45:20 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:45:38 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:45:58 abrantesasf joins (~abrantesa@187.36.170.211)
19:46:59 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
19:49:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:49:43 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:51:30 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:53:03 nvmd joins (~nvmd@user/nvmd)
19:58:32 xsperry joins (~xs@user/xsperry)
20:02:14 <zincy_> Anyone know how to fix this type error? https://gist.github.com/therewillbecode/b181a9951f2b6309a64cc88c65fc0acc
20:05:03 <monochrom> Ugh, is this analogous to the beginner mistake of "x :: forall a. a; x = False"?
20:05:09 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 252 seconds)
20:05:14 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
20:06:52 curiousgay joins (~curiousga@77-120-141-90.kha.volia.net)
20:07:07 <zincy_> monochrom: Why is that a mistake?
20:07:28 <zincy_> oh because a isn't instantiated
20:07:39 <dmj`> ^ that and you're also saying v on GPlayers is the same as v on GToAct. One is a Maybe, the other a Vector.
20:07:44 <monochrom> "x :: forall a. a" means that user of x --- that's me --- chooses whichever type I want for "a".
20:08:03 simendsjo joins (~user@84.211.91.241)
20:08:04 juhp joins (~juhp@128.106.188.82)
20:08:05 <monochrom> So, what if I choose to use x in "x + 4"?
20:08:37 × DNH quits (~DNH@2a02:8108:1100:16d8:bd44:40bf:fb3b:742a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:08:44 <zincy_> dmj`: Hmm I thought v had to be the same here
20:09:10 <zincy_> Since v is just carrying info about whether we are at "runtime" or "execution" time
20:10:05 <zincy_> monochrom: then x :: Int
20:10:14 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
20:10:23 <monochrom> Yes.
20:10:23 <dmj`> zincy_: you're right, I read it as Vector v, and not Vector (Var a v)
20:10:36 <monochrom> I can have (x::Int) + length (x::String).
20:10:48 lavaman joins (~lavaman@98.38.249.169)
20:11:00 <monochrom> So whoever wrote "x = False" was not understanding "forall".
20:11:41 <zincy_> Is rankNTypes about "delaying" the choosing?
20:11:49 <monochrom> No.
20:12:21 <monochrom> RankNTypes is about allowing "forall" in more places, most notably more nesting.
20:12:49 <monochrom> For example "(forall a. a) -> Int" which is intuitively "exists a. a -> Int"
20:14:02 <monochrom> "foo :: exists a. a -> Int" means that the provider of foo chooses "a". Therefore the user doesn't choose.
20:14:12 <monochrom> The opposite of "forall a. a -> Int"
20:14:32 <monochrom> The same can be said of "foo2 :: (forall a. a) -> Int"
20:14:43 <zincy_> So the choice of parameter instantiation is inverted
20:14:44 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
20:15:01 <zincy_> Well who chooses producer/consumer
20:15:14 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
20:16:11 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
20:16:29 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
20:17:14 <boxscape> much like in `f :: (String -> Int) -> Int`, f gets to choose which String to use, but in `f :: String -> (Int -> Int)`, the caller of f gets to choose which String to use
20:17:20 <monochrom> Programming is the dialectic class struggle between the producer and the consumer.
20:18:40 <zincy_> haha
20:19:43 <zincy_> monochrom: Do you find CT fruitful for programming?
20:19:59 <monochrom> No.
20:20:09 <monochrom> Why CT?
20:20:28 <monochrom> I lied. Sometimes yes.
20:20:30 __monty__ joins (~toonn@user/toonn)
20:20:31 × zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Read error: Connection reset by peer)
20:20:59 <monochrom> https://link.springer.com/chapter/10.1007%2F978-3-662-54434-1_21 is an example I recently found.
20:21:11 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
20:21:31 DNH joins (~DNH@2a02:8108:1100:16d8:bd44:40bf:fb3b:742a)
20:21:38 <boxscape> I just recently watched Conal Elliott's talk about compiling to categories, which I think is another good example
20:21:42 <monochrom> A little bit of representable functor to explain why APL makes so much sense, and it doesn't have to be just arrays.
20:21:58 <zincy_> I hear type theory is more useful
20:22:58 <zincy_> boxscape: How is there a choice about which String to use are you talking about which value of type String?
20:23:10 <monochrom> Yes.
20:23:11 <boxscape> yes, which value of type String
20:23:21 <zincy_> Ah ok
20:27:26 iqubic joins (~user@2601:602:9502:c70:f6f0:c69f:f066:4465)
20:30:10 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
20:30:36 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
20:30:38 pavonia joins (~user@user/siracusa)
20:32:07 kennyd joins (~bc8165b6@cerf.good1.com)
20:34:42 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
20:36:02 deadmarshal joins (~deadmarsh@95.38.116.117)
20:37:06 <EvanR> afaict type theory is logic, and logic is good sometimes
20:37:36 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Read error: Connection reset by peer)
20:39:37 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
20:40:18 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
20:43:37 × deadmarshal quits (~deadmarsh@95.38.116.117) (Read error: Connection reset by peer)
20:43:39 <zincy_> EvanR: yeah
20:43:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
20:44:29 <zincy_> Algebra is next on my list
20:44:45 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Ping timeout: 252 seconds)
20:46:33 deadmarshal joins (~deadmarsh@95.38.116.117)
20:54:17 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
20:55:07 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
20:55:08 × zincy_ quits (~zincy@2a00:23c8:970c:4801:f9b9:ddeb:6361:fc1a) (Remote host closed the connection)
20:55:20 zincy_ joins (~zincy@2a00:23c8:970c:4801:f9b9:ddeb:6361:fc1a)
20:56:41 <shiraeeshi[m]> hello fellas
20:56:45 <boxscape> hey there
20:58:12 <shiraeeshi[m]> apparently I last read this chat in 30th of september, and today I opened my client and it showed me old messages
20:59:06 <shiraeeshi[m]> a funny performance by adjoint_cats, I had a good laugh
20:59:36 <shiraeeshi[m]> Functors! Huh! (Good God!) What are they good for? (Not much!)
20:59:39 <shiraeeshi[m]> DANCES
20:59:43 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
20:59:48 <shiraeeshi[m]> Functors is something I despise! For it means destruction of innocent types. And thousands of lines in Monad's cries. Our sons write functional pearls and give their lives!
20:59:49 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
20:59:56 <shiraeeshi[m]> Functors! Huh! (Good God!) What are they good for? (Not much!)
21:00:13 <shiraeeshi[m]> and then he got kicked out
21:00:20 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
21:02:04 <boxscape> nice rhymes
21:02:43 deadmarshal_ joins (~deadmarsh@68.235.38.176)
21:02:45 <shiraeeshi[m]> as to the actual question:
21:02:47 <janus> looks like it is to the melody of the vietnam song "War ( what is it good for?)" by Edwin Starr
21:03:06 <shiraeeshi[m]> hey, didn't know that
21:03:38 × deadmarshal quits (~deadmarsh@95.38.116.117) (Ping timeout: 252 seconds)
21:03:40 <shiraeeshi[m]> there was a post and a discussion on reddit
21:03:49 <shiraeeshi[m]> A survey for Haskell users in the industry: how do you handle effects?
21:03:53 <oats> so this is weird, the docs suggest there's a function in Numeric called readBin, but ghc says "Module 'Numeric' does not export 'readBin'"
21:03:59 <shiraeeshi[m]> https://www.reddit.com/r/haskell/comments/r4wxi6/a_survey_for_haskell_users_in_the_industry_how_do/
21:04:12 <int-e> oats: it's new in base-4.16
21:04:17 <oats> ohhh
21:04:19 <shiraeeshi[m]> did you people discuss it in this chat?
21:04:25 <boxscape> AoC eh
21:04:26 <oats> any way I can get stack to fetch that for me?
21:04:27 <int-e> oats: (which comes with ghc-9.2)
21:04:31 <oats> ah
21:04:35 <oats> rip stackage
21:04:35 <boxscape> I stumbled over readBin today, too
21:04:38 <oats> lol
21:04:41 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:04:44 <oats> ugh I don't wanna implement this
21:04:52 <int-e> (as I learned earlier today)
21:04:53 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
21:04:58 <boxscape> oats look for readInt
21:04:59 <boxscape> in base
21:05:23 <int-e> :t readInt (`elem` "01") digitToInt
21:05:24 <lambdabot> error:
21:05:24 <lambdabot> • Couldn't match type ‘Int’ with ‘Bool’
21:05:24 <lambdabot> Expected type: Char -> Bool
21:05:29 <int-e> :t readInt 2 (`elem` "01") digitToInt
21:05:31 <lambdabot> Num a => ReadS a
21:06:16 <boxscape> > readInt 2 (`elem` "01") digitToInt
21:06:18 <lambdabot> <[Char] -> [(Integer,[Char])]>
21:06:31 <oats> oh good
21:06:50 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
21:06:55 <boxscape> oats: if you happen to be using lens, there's also `binary`
21:07:03 <oats> hmm, I do have microlens
21:07:09 <janus> > readInt 2 (`elem` "01") digitToInt ""
21:07:10 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
21:07:10 <lambdabot> []
21:07:28 <boxscape> microlens doesn't have it :(
21:07:49 <oats> probably for the better, I chose microlens for a reason :P
21:08:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:08:21 <boxscape> I suppose it must earn the "micro" in its name somehow
21:08:53 vicfred joins (~vicfred@user/vicfred)
21:09:03 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
21:09:08 <janus> shiraeeshi[m]: what is there left to discuss, the thread is already containing many points
21:09:36 <oats> > readInt 2 (`elem` "01") digitToInt "110"
21:09:38 <lambdabot> [(6,"")]
21:10:00 Itaru parts (~DaSH@ro2.flokinet.is) (See Ya Later!)
21:10:32 <shiraeeshi[m]> janus: there was a comment that I wanted to ask your opinions about
21:10:59 <shiraeeshi[m]> so people were discussing various effect systems, and then one guy posts this answer:
21:11:19 <shiraeeshi[m]> > enobayram · 3d
21:11:19 <shiraeeshi[m]> > We use mtl when we need that sort of thing, but we don't tend to approach problems thinking about how to use effects to solve them. I.e. we try to keep most of the logic in ADTs and abstractions with deliberate purposes before we inject it all into the monadic goop and that goop is often just IO
21:11:21 <lambdabot> <hint>:1:35: error: parse error on input ‘of’
21:11:21 <lambdabot> error: Variable not in scope: enobayramerror:
21:11:21 <lambdabot> Variable not in scope: (·) :: t0 -> t1 -> t
21:11:28 <janus> > readInt 2 (`elem` "01") digitToInt "" (concat $ replicate 65 [1])
21:11:30 <lambdabot> error:
21:11:30 <lambdabot> • Couldn't match expected type ‘[a1] -> t’
21:11:30 <lambdabot> with actual type ‘[(a0, String)]’
21:11:38 <janus> > readInt 2 (`elem` "01") digitToInt (concat $ replicate 65 [1])
21:11:39 <lambdabot> error:
21:11:39 <lambdabot> • Could not deduce (Num Char) arising from the literal ‘1’
21:11:40 <lambdabot> from the context: Num a
21:11:41 <janus> ah
21:12:02 <janus> so tempting to try something in here without doing it in ghci first :O
21:12:07 <janus> lazy friday
21:12:51 <boxscape> janus: in case you don't know you can also private message lambdabot and yahb if you want to experiment in private without opening up ghci
21:13:07 <janus> yeah...
21:13:11 <oats> #haskell's only purpose is to provide ghci-as-a-service
21:13:19 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:14:04 <shiraeeshi[m]> so what do you guys think about his comment? especially the "we don't tend to approach problems thinking about how to use effects to solve them" part.
21:14:24 <janus> shiraeeshi[m]: it's a valid strategy no? thinking about the abstraction before the problem is solved could be premature
21:14:53 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
21:15:21 <shiraeeshi[m]> can we say that the architecture comes first, and the effect system comes second, or the opposite, or they come together and influence each other?
21:15:26 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
21:15:52 briandaed joins (~briandaed@185.234.208.208.r.toneticgroup.pl)
21:15:56 <shiraeeshi[m]> can you create an architecture that is independent of the effect system used?
21:18:50 <janus> > readInt 2 (`elem` "01") digitToInt (concat $ replicate 64 "1") :: [(Int,String)]
21:18:51 <lambdabot> [(-1,"")]
21:18:56 <janus> where does the -1 come from?
21:19:17 <int-e> > 2^64 :: Int
21:19:18 <lambdabot> 0
21:19:21 <int-e> integer overflow
21:19:35 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
21:19:49 <janus> but if signed, it should be a massive negative number then
21:20:00 <int-e> No, you have 2^64 - 1
21:20:07 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
21:20:32 <tomsmeding> > sum . zipWith (*) (iterate (*2) 1) . map (fromEnum . (== '1')) $ replicate 64 '1'
21:20:33 <lambdabot> -1
21:20:35 <int-e> > 2^63 :: Int -- that's your massive negative number
21:20:37 <lambdabot> -9223372036854775808
21:21:52 <shiraeeshi[m]> can someone explain this part: "we try to keep most of the logic in ADTs and abstractions with deliberate purposes before we inject it all into the monadic goop and that goop is often just IO"
21:21:55 <shiraeeshi[m]> what does it mean?
21:22:06 <janus> aaah right because of how all bits set would be the number just below zero
21:22:12 <shiraeeshi[m]> you create ADTs and functions in IO?
21:22:20 <boxscape> shiraeeshi: I imagine the best person to answer that would be the person who wrote the comment
21:22:47 <tomsmeding> janus: yes, in 2s complement, 'complement x' is the same as '-x - 1'
21:23:09 <shiraeeshi[m]> I'm more interested in what other people have to say about this, not necessarily that person
21:23:56 <tomsmeding> shiraeeshi[m]: sounds like a weird way to state the very general design principle in Haskell that most people, by and large, adhere to: functional (pure) core, imperative shell
21:24:07 <tomsmeding> s/imperative/imperative (IO)/
21:24:28 <int-e> "goop" is not standard slang
21:24:31 <tomsmeding> there are lots of ways to diverge from that pattern, with effect systems, or mtl-like monad abstractions
21:24:42 <tomsmeding> int-e: hence "weird way to state" :p
21:24:50 <janus> it's funny how it actually works 'correctly' even though the readInt docs say it works only for unsigned
21:24:55 <janus> i guess i shouldn't rely on this..
21:25:14 <int-e> janus: well, readInt won't parts "-1"
21:25:17 <int-e> ouch, parse.
21:25:30 <int-e> that doesn't even sound the same
21:25:36 <boxscape> that sentence was hard to parts until you corrected yourself
21:26:06 <int-e> where do you file warranty claims for brains?
21:26:07 <janus> why do the docs even say integral if the constraint is Num?
21:26:21 × simendsjo quits (~user@84.211.91.241) (Ping timeout: 256 seconds)
21:26:31 <int-e> janus: it won't parse "11.01" either
21:27:02 <int-e> the docs describe the input... what readInt parses... not the output.
21:27:07 <tomsmeding> and to parse simple unsigned integer-like values, you don't need anything else than (+) and (*), which Num is sufficient for
21:27:29 <boxscape> also the docs say `integral`, not `Integral`, which is an important difference
21:27:33 <shiraeeshi[m]> tomsmeding: if that was what he meant (functional core, imperative shell), then I think his answer is overly simplictic, like "hey, just code functions"
21:27:49 <janus> boxscape: it says capital Integral: https://hackage.haskell.org/package/base-4.16.0.0/docs/Numeric.html#v:readInt
21:28:01 <tomsmeding> shiraeeshi[m]: kind of given away by the use of the word 'goop' :p
21:28:13 <boxscape> janus: whoops I need to check my glasses
21:28:25 <shiraeeshi[m]> I thought that there is some deep meaning in there that I'm missing
21:28:34 <shiraeeshi[m]> or something like that
21:28:37 <boxscape> imo that's a (minor) documentation bug
21:28:47 <tomsmeding> boxscape: it would've made much more sense with your reading :p
21:29:24 <boxscape> (tbf I only read it in Hoogle where it's not a monospaced link)
21:33:10 Lycurgus joins (~juan@98.4.112.204)
21:34:44 × briandaed quits (~briandaed@185.234.208.208.r.toneticgroup.pl) (Quit: Lost terminal)
21:34:46 <janus> boxscape: https://gitlab.haskell.org/ghc/ghc/-/issues/20776
21:35:00 <tomsmeding> 🎉
21:35:02 <boxscape> nice
21:35:03 <janus> my first ghc bug, let's see if it was a mistake :P
21:36:03 <tomsmeding> my suggested fix would be boxscape's misreading, i.e. s/'Integral'/integral/
21:36:25 zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi)
21:37:00 <int-e> "Reads an integral value without sign in an arbitrary base."
21:37:11 acidjnk_new joins (~acidjnk@p200300d0c7271e92d1e9828b51aa3006.dip0.t-ipconnect.de)
21:37:29 <tomsmeding> better
21:38:08 <int-e> ... See also `readSigned` and `readFloat`.
21:38:13 <boxscape> I don't know if there are English language rules for this, but the show function is called showIntAtBase - so `at an arbitrary base`?
21:38:34 <int-e> (we don't have an arbitrary base function for floats though)
21:38:39 × jstolarek quits (~jstolarek@137.220.120.162) (Ping timeout: 252 seconds)
21:39:05 <janus> int-e: why not? readInt works for floats, no?
21:39:20 <janus> aah well ok, floats that don't have a decimal separator
21:39:39 <int-e> janus: I'm still talking about inputs.
21:39:54 <tomsmeding> boxscape: related, some common notation for existential packing/unpacking in PL theory: 'pack tau with ∃t. sigma' and 'open e1 as t with x in e2': quiz, what component of those expressions means what
21:39:56 <janus> right, i see
21:40:01 <tomsmeding> the prepositions are completely random
21:40:17 <tomsmeding> correction, 'pack tau with e as ∃t. sigma'
21:40:33 <int-e> There's no function or combination of functions in Numeric that allows you to parse "-1.23e10" as a base 5 number.
21:40:34 <boxscape> heh, okay
21:40:49 <int-e> /maybe/ that's sane, especially with the 'e' part.
21:40:57 <tomsmeding> like, if you stare long enough there is some logic to be found, true
21:41:12 <int-e> which btw would be confusing for hexadecimal notation (which is probably why that uses p instead)
21:41:34 <boxscape> not just confusing but impossible to parse uniquely
21:41:57 <boxscape> e.g. 1.2eee4
21:41:59 <int-e> boxscape: yes, the confusion arises from ambiguity
21:42:49 <int-e> (I guess it can be confusing in other ways too)
21:43:47 × zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Ping timeout: 252 seconds)
21:44:06 <boxscape> I think having a readFloat function that works on non-scientific notation would be fine though
21:44:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:46:06 × gdd quits (~gdd@129.199.146.230) (Read error: Connection reset by peer)
21:47:03 × michalz quits (~michalz@185.246.204.43) (Remote host closed the connection)
21:48:30 <janus> @package scientific can do it with its Read instance
21:48:30 <lambdabot> https://hackage.haskell.org/package/scientific can do it with its Read instance
21:49:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:49:51 <boxscape> right, but only for base 10
21:50:41 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
21:51:12 <maerwald> is there a usable parser in base?
21:51:56 <awpr> > let c = chr (ord 'e' - ord '9' + ord 'f') in "0x12fe" ++ c ++ "1e"
21:51:57 <lambdabot> error:
21:51:57 <lambdabot> • Couldn't match expected type ‘[Char]’ with actual type ‘Char’
21:51:57 <lambdabot> • In the first argument of ‘(++)’, namely ‘c’
21:52:07 <awpr> > let c = chr (ord 'e' - ord '9' + ord 'f') in "0x12fe" ++ [c] ++ "1e"
21:52:08 <lambdabot> "0x12fe\146\&1e"
21:53:10 <awpr> well that generalization doesn't give very nice syntax
21:53:38 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
21:54:23 <janus> maerwald: is it rhetorical or a genuine question ? :P
21:55:03 <maerwald> lol
21:55:15 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
21:55:23 × deadmarshal_ quits (~deadmarsh@68.235.38.176) (Read error: Connection reset by peer)
21:55:42 ec_ joins (~ec@gateway/tor-sasl/ec)
21:55:51 <maerwald> my code is too small to roll my own
21:55:56 <maerwald> but it's annoying without one
21:59:44 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
22:01:32 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:01:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:01:47 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:02:04 × alzgh quits (alzgh@user/alzgh) (Remote host closed the connection)
22:02:04 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:02:23 alzgh joins (alzgh@user/alzgh)
22:02:35 <monochrom> I think of Text.ParserCombinators.ReadP/ReadPrec as usable parser in base.
22:02:58 <maerwald> I SAID USABLE
22:03:12 maerwald leaves in anger
22:03:27 <monochrom> I have used it and I have found it usable for my purpose.
22:04:29 vysn joins (~vysn@user/vysn)
22:06:09 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:06:27 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:07:23 gdd joins (~gdd@129.199.146.230)
22:07:45 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
22:10:02 <boxscape> maerwald: I know it's not base but parsec is shipped with ghc, if that matters to you
22:11:47 × fizbin_ quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
22:11:58 <boxscape> (which means you should be able to import Text.Parsec if you run ghci outside of cabal/stack)
22:12:24 geekosaur joins (~geekosaur@xmonad/geekosaur)
22:13:05 <maerwald> I think I can only depend on base, not sure
22:13:05 bbear72 joins (~bbear@2a01:e34:ec2b:d430:e0dd:e718:df68:1877)
22:13:07 bbear72 parts (~bbear@2a01:e34:ec2b:d430:e0dd:e718:df68:1877) ()
22:13:48 bbear72 joins (~bbear@2a01:e34:ec2b:d430:e0dd:e718:df68:1877)
22:14:29 <bbear72> Hello!
22:14:35 <boxscape> hey
22:14:54 <bbear72> Who is doing advent of code out there :)
22:15:31 <monochrom> I think many. I am not following it, but the /topic has the leaderboard.
22:15:36 lavaman joins (~lavaman@98.38.249.169)
22:15:45 <bbear72> I wanted to share one of my solution and see if any of you would have suggestions for improvements.
22:15:50 <bbear72> Right now finishing day3
22:15:58 <boxscape> you might also be interested in #adventofcode-spoilers:libera.chat . Not haskell specific, but still lots of talk about haskell solutions.
22:16:08 <monochrom> But note that many are afk at this time of the day, or this day of the week, something.
22:17:02 <boxscape> bbear72: the channel I linked might be a good place for that
22:17:41 <bbear72> Right, I will try this, thankyou
22:18:49 × zincy_ quits (~zincy@2a00:23c8:970c:4801:f9b9:ddeb:6361:fc1a) (Remote host closed the connection)
22:18:54 pfurla joins (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab)
22:20:15 <EvanR> earlier I thought I improved the laziness of my day 3 part 2
22:20:25 <EvanR> I increased the size of my file and wow... wrong
22:20:30 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
22:20:38 <EvanR> space goes down the hole
22:22:18 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:22:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:23:59 <hpc> einstein predicted that :P
22:24:11 <monochrom> hahaha
22:25:14 <EvanR> a 20M file took 450M of memory according to heap profile
22:25:15 <monochrom> Strictly speaking I think Einstein didn't foresee it, but Schwarzchild worked it out.
22:25:29 gehmehgeh joins (~user@user/gehmehgeh)
22:25:46 <EvanR> I loaded all the data into an IntSet and it took 100k
22:26:09 <EvanR> good job libraries crew!
22:26:52 namkeleser joins (~namkelese@101.175.102.188)
22:28:50 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:29:07 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:29:12 boxscape_ joins (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de)
22:29:48 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:30:05 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:31:56 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:32:03 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
22:32:13 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:32:38 connrs joins (~connrs@user/connrs)
22:34:23 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Remote host closed the connection)
22:34:38 deadmarshal joins (~deadmarsh@95.38.116.22)
22:34:42 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds)
22:36:22 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:36:28 waleee joins (~waleee@h-82-196-111-63.NA.cust.bahnhof.se)
22:36:40 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:37:44 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
22:37:50 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
22:38:41 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dcf1:6c47:4df:1ed1)
22:39:09 × deadmarshal quits (~deadmarsh@95.38.116.22) (Ping timeout: 252 seconds)
22:42:10 jstolarek joins (~jstolarek@137.220.120.162)
22:42:31 <sm> dsal: how's your haskell setup going ? May I ask if you have macos Monterrey, and which ghc version(s) you have working ?
22:43:20 <dsal> I'm doing rosetta at the moment on my new machine.
22:43:37 <dsal> My old one was just plain nix with stack(+nix) and LTS and everything worked fine.
22:43:50 <dsal> Now the only thing that works is x86_64 nix.
22:44:22 <dsal> ghcup with 9.2 has some problems with clang and the older one I was using from nix crashes with some kind of obscure OS X error.
22:45:04 <maerwald> problems with clang?
22:45:13 <dsal> I think it doesn't work with clang 13.
22:45:21 <dsal> It's a part of the toolchain I don't know much about.
22:45:25 <maerwald> you mean ghc
22:45:39 <maerwald> you can install llvm12 via brew
22:45:56 <dsal> Oh, yeah, I mean the ghc I got from ghcup.
22:47:58 × x_kuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
22:48:21 Codaraxis joins (~Codaraxis@user/codaraxis)
22:49:10 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
22:51:53 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:52:03 <dsal> I'd kind of like to get llvm 12 without brew. They don't have it in their download pages.
22:52:11 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:54:09 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:54:27 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:55:32 <sm> dsal, thanks
22:55:36 <xerox> I use Homebrew clang version 13.0.0
22:55:39 <sm> do you have monterrey ?
22:55:45 <xerox> big sur
22:56:15 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:56:44 yauhsien joins (~yauhsien@61-231-22-20.dynamic-ip.hinet.net)
22:56:53 <dsal> I just got a new MacBook with all the newest things.
22:58:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:59:07 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
23:00:23 × pfurla quits (~pfurla@2804:14d:5c81:4104:5084:9b62:332c:deab) (Quit: gone to sleep. ZZZzzz…)
23:00:35 OscarZ joins (~oscarz@95.175.104.170)
23:01:17 <dmj`> Anyone have an example of a defunctionalization pass on lamda calculus
23:01:20 × yauhsien quits (~yauhsien@61-231-22-20.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
23:03:13 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
23:03:32 × aliosablack quits (~chomwitt@2a02:587:dc0d:6d00:12c3:7bff:fe6d:d374) (Ping timeout: 252 seconds)
23:05:32 <yin> > read "0xfff" :: Int
23:05:34 <lambdabot> 4095
23:05:37 <yin> > read "0bfff" :: Int
23:05:39 <lambdabot> *Exception: Prelude.read: no parse
23:05:44 <yin> :(
23:06:03 <monochrom> Uh what is 0bfff supposed to mean?
23:06:35 <yin> {-# LANGUAGE BinaryLiterals #-}
23:06:46 <yin> oops
23:06:49 <monochrom> What is fff doing there in base 2?
23:06:49 <yin> my mistake
23:06:56 <yin> > read "0b11010" :: Int
23:06:58 <lambdabot> *Exception: Prelude.read: no parse
23:07:19 <monochrom> That one is a fair complaint, yes.
23:07:39 <yin> what's the common solution, it there is one?
23:07:49 <yin> *if
23:07:51 <dsal> Need a more flexible read. f kind of looks like a 1, so it should be treated as such. 6 is zeroish.
23:07:53 <monochrom> But the Read Int instance was written decades ago and hasn't been updated to account for BinaryLiterals.
23:08:03 <yin> dsal: lol
23:08:05 dignissimus joins (~dignissim@88-104-68-62.dynamic.dsl.as9105.com)
23:08:22 <dsal> How did you end up with "0b11010" ?
23:08:46 <dsal> There are parsers that take base into account. You could use one of them. But I'm not as sure about the 0b part.
23:08:50 <monochrom> Look into Numeric for readInt and tell it to do base 2.
23:09:03 <dignissimus> Wondering if there's a better way to write `map (\x -> (fst x) * (snd x))`? [(2,3), (4, 5)] to [6, 20] for example
23:10:10 <monochrom> (\x -> fst x * snd x) = uncurry (*)
23:10:31 × alzgh quits (alzgh@user/alzgh) (Remote host closed the connection)
23:11:18 <dignissimus> monochrom: Thanks!
23:11:49 <dignissimus> Need to get the hang of priority too, I use too many brackets
23:12:07 <yin> @pl \x -> fst x * snd x
23:12:07 <lambdabot> uncurry (*)
23:12:12 <yin> nice!
23:12:14 <xsperry> I'd prefer uncurry as well, but without it, this would be an improvement over your original code:
23:12:18 <xsperry> > map (\(x, y) -> x * y) [(2,3), (4, 5)]
23:12:20 <lambdabot> [6,20]
23:12:36 <dignissimus> Oh course, pattern matching
23:12:38 <dignissimus> Thank you!
23:12:53 <dignissimus> What's the pl command?
23:13:13 <yin> "pointless" or pointfree
23:13:45 <yin> @pl f x = succ x
23:13:45 <lambdabot> f = succ
23:14:05 <dignissimus> @version
23:14:06 <lambdabot> lambdabot 5.3.0.1
23:14:06 <lambdabot> git clone https://github.com/lambdabot/lambdabot
23:15:28 <boxscape> "There are parsers that take base into account" can always use the ghc package as a parser :P
23:15:40 <boxscape> wait
23:15:49 <boxscape> I thought that was about the base pacakge
23:15:55 <boxscape> still works though I suppose
23:19:07 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
23:23:38 <yin> λ import Numeric ( readBin )
23:23:38 <yin> <interactive>:1:18: error:
23:23:38 <yin> Module ‘Numeric’ does not export ‘readBin’
23:23:51 <yin> ^ it doesn't?
23:24:29 <geekosaur> readInjt, wasn't it?
23:24:33 <geekosaur> readInt
23:24:38 <geekosaur> it takes a base parameter
23:24:41 <geekosaur> :t readInt
23:24:42 <lambdabot> Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
23:25:14 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:25:21 <int-e> > readInt (-2) (`elem` "01") digitToInt "11"
23:25:22 <lambdabot> [(-1,"")]
23:30:12 <boxscape> yin: readBin is new
23:30:46 <yin> boxscape: how new?
23:30:50 × max22- quits (~maxime@2a01cb0883359800e7fc8fc683bf0760.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
23:31:33 <yin> will cabal update get me readBin?
23:31:39 <geekosaur> huh, soo it is. where's the _since_?
23:31:56 <boxscape> yin: ghc 9.2.1 I think
23:31:58 <geekosaur> no, since it's part of base and base can only be updated with ghc
23:32:06 <yin> :(
23:33:18 <yin> oh well...
23:33:33 <yin> is there a way to tell haskell "only use pure functions"
23:34:00 <geekosaur> use signatues that don't involve IO?
23:34:13 <geekosaur> or ST or STM
23:34:20 <yin> oh sorry, not pure
23:34:26 <yin> i mean total
23:34:31 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 268 seconds)
23:34:56 × xff0x quits (~xff0x@2001:1a81:5394:4100:724:71c4:c7ef:b5ba) (Ping timeout: 245 seconds)
23:35:55 xff0x joins (~xff0x@2001:1a81:5394:4100:8386:5ae4:51fd:795)
23:36:15 <geekosaur> no, because type signatures don't include totality
23:37:12 <boxscape> Best you can do for functions you don't write yourself I think is using an alternative prelude that doesn't export the partial functions from base
23:37:13 <yin> and haskell doesn't have a totality checker, des it?
23:37:21 <geekosaur> nor are there other ways to annotate a function as partial
23:37:46 <geekosaur> doesn't and probably can't. (Haven't you asked this before?)
23:37:52 <iqubic> Haskell can certainly warn you when you have an incomplete pattern match.
23:38:05 <geekosaur> the answers haven't changed
23:38:05 <dsal> But that's only one way to have a partial function.
23:38:10 <yin> have i?
23:39:03 <dsal> You can divide by zero, or take the head of an empty list, or just throw an `error` or something in somewhere. But most of these things aren't that hard to avoid.
23:39:16 <boxscape_> I think liquid haskell has a totality checker? Haven't used it though
23:39:20 <yin> geekosaur: sorry if i did
23:39:23 <geekosaur> apparently oit was someone else
23:39:31 geekosaur just checked local logs
23:39:42 <EvanR> > 0b11011
23:39:43 <lambdabot> error: Variable not in scope: b11011
23:39:52 × abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection)
23:39:59 <geekosaur> % 0b11011
23:39:59 <yahb> geekosaur: ; <interactive>:173:2: error: Variable not in scope: b11011
23:40:08 <geekosaur> guess it's in 9.2
23:40:08 <int-e> % :set -XBinaryLiterals
23:40:09 <yahb> int-e:
23:40:10 <dsal> That error is confusing.
23:40:15 × vysn quits (~vysn@user/vysn) (Read error: Connection reset by peer)
23:40:15 <int-e> % 0b11011
23:40:15 <yahb> int-e: 27
23:40:21 <int-e> it's an extension
23:40:25 boxscape_ is wondering if a segfault counts as bottom
23:40:29 abrantesasf joins (~abrantesa@187.36.170.211)
23:40:31 <geekosaur> yes
23:40:33 <boxscape_> ok
23:40:37 <yin> why wouldnt it :D
23:40:47 <boxscape_> because it's not supposed to happen to begin with
23:40:54 <boxscape_> so it might not have a semantics assigned to it
23:41:05 <EvanR> my syntax highlighter is colored "number" when I type 0b110111. I want my money back xD
23:41:15 <yin> non-termination counts as bottm, desn't it?
23:41:22 <geekosaur> there are certainly ways to make ghc-generated code segfault
23:41:30 <dsal> I had an eiffel library that had a special case for a segfault because it was actually expected due to a library bug.
23:41:37 <geekosaur> unsafeCoerce can easily do it
23:41:51 <boxscape_> yes, but not in the theoretical world of type-safe haskell
23:42:10 <yin> > let a = a in a
23:42:12 <lambdabot> *Exception: <<loop>>
23:42:31 <boxscape_> oh
23:42:36 <boxscape_> lambdabot can do that in interpreted code?
23:42:38 <geekosaur> and there's a way to send signals in the unix library that could be used to send sigSEGV
23:42:40 <boxscape_> % let a = a in a
23:42:45 <yahb> boxscape_: [Timed out]
23:43:21 × DNH quits (~DNH@2a02:8108:1100:16d8:bd44:40bf:fb3b:742a) (Quit: Textual IRC Client: www.textualapp.com)
23:44:20 <EvanR> combination of haskell semantics and IO semantics (or lack thereof)
23:44:33 <EvanR> re segfaults due to signals or ffi
23:44:52 <EvanR> hmm... or unsafeCoerce
23:45:02 <EvanR> which can't even blame IO
23:45:18 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:46:10 <EvanR> also unsafe use of unsafe vector ops
23:46:14 <int-e> EvanR: well, you say "Haskell semantics"... but what are they?
23:46:49 <EvanR> stuff like [[f x]] = [[f]] [[x]]
23:46:51 <EvanR> xD
23:48:14 × abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection)
23:48:35 <int-e> (The Haskell report doesn't have any. GHC translates everything to Core, System F with extensions, and I don't think I've seen any version of this with *unsafe*Coerce.)
23:49:11 × jstolarek quits (~jstolarek@137.220.120.162) (Ping timeout: 252 seconds)
23:50:32 <EvanR> I can't imagine any sane semantics for unsafeCoerce
23:51:18 <EvanR> it's the magic eraser of type safety
23:53:21 <int-e> well you can track actual types and have reduction rules ala unsafeCoerce . unsafeCoerce = unsafeCoerce and unsafeCoerce :: (a -> a) = id
23:53:45 <boxscape_> int-e if you turn on -ddump-simpl in ghci, every expression you enter will be translated into something containing Unsafe.Coerce.unsafeEqualityProof, which is more or less unsafeCoerce
23:53:59 <int-e> which ends up being partial, which is a good match for how you use it sanely.
23:55:01 <int-e> boxscape_: sure but you won't find formal semantics for that
23:55:19 <int-e> (I think)
23:55:25 <boxscape_> yeah I imagine you're right
23:55:27 <EvanR> semantics for when you use it sanely, that's good
23:56:47 × dignissimus quits (~dignissim@88-104-68-62.dynamic.dsl.as9105.com) (Quit: Bye!)
23:58:21 × zebrag quits (~chris@user/zebrag) (Ping timeout: 252 seconds)

All times are in UTC on 2021-12-03.