Home liberachat/#haskell: Logs Calendar

Logs on 2022-04-05 (liberachat/#haskell)

00:00:14 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
00:00:28 ChaiTRex joins (~ChaiTRex@user/chaitrex)
00:00:54 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
00:01:53 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
00:03:32 <InstX1> question about the dependent types debate
00:03:39 <InstX1> why not just syntax a type to indicate it's a dependent type?
00:03:43 <InstX1> i.e, data {...
00:03:48 <InstX1> unless that's used for something already
00:03:50 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
00:04:01 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
00:04:50 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
00:05:59 statusbot2 joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com)
00:07:33 MironZ5 joins (~MironZ@nat-infra.ehlab.uk)
00:07:41 SoF9 joins (~skius@user/skius)
00:07:46 Dorkside64 joins (~dorkside@208.190.197.222)
00:07:48 ralu1 joins (~ralu@static.211.245.203.116.clients.your-server.de)
00:07:49 Noinia joins (~Frank@77-162-168-71.fixed.kpn.net)
00:07:58 × shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection)
00:08:10 Dorkside64 is now known as Dorkside6
00:08:14 × dminuoso quits (~dminuoso@user/dminuoso) (Quit: ZNC 1.7.5 - https://znc.in)
00:08:16 × vgtw quits (~vgtw@user/vgtw) (Remote host closed the connection)
00:08:18 shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net)
00:08:18 × red-snail1 quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
00:08:34 vgtw joins (~vgtw@user/vgtw)
00:08:37 × Kaiepi quits (~Kaiepi@156.34.47.253) (Read error: Connection reset by peer)
00:08:41 × WhateverRabbit quits (~rabbit@206.81.18.26) (Ping timeout: 256 seconds)
00:08:41 × omantere quits (~pi@85-156-109-34.elisa-laajakaista.fi) (Ping timeout: 256 seconds)
00:08:42 Kaipi joins (~Kaiepi@156.34.47.253)
00:08:42 × spacenautx quits (~spacenaut@user/spacenautx) (Quit: WeeChat 3.4.1)
00:08:54 × SoF quits (~skius@user/skius) (Read error: Connection reset by peer)
00:08:54 SoF9 is now known as SoF
00:08:59 WhateverRabbit joins (~rabbit@206.81.18.26)
00:09:04 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
00:09:07 × wolfshappen quits (~waff@irc.furworks.de) (Read error: Connection reset by peer)
00:09:15 × sweater quits (~sweater@206.81.18.26) (Ping timeout: 256 seconds)
00:09:15 × ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 256 seconds)
00:09:15 ralu1 is now known as ralu
00:09:30 dminuoso joins (~dminuoso@static.88-198-218-68.clients.your-server.de)
00:09:38 omantere joins (~pi@85-156-109-34.elisa-laajakaista.fi)
00:09:39 sweater joins (~sweater@206.81.18.26)
00:09:49 × statusbot quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Ping timeout: 256 seconds)
00:09:49 × exarkun quits (~exarkun@user/exarkun) (Ping timeout: 256 seconds)
00:09:49 × MironZ quits (~MironZ@nat-infra.ehlab.uk) (Ping timeout: 256 seconds)
00:09:49 × kawen quits (~quassel@static.208.191.216.95.clients.your-server.de) (Ping timeout: 256 seconds)
00:09:49 × WzC quits (~Frank@77-162-168-71.fixed.kpn.net) (Ping timeout: 256 seconds)
00:09:49 MironZ5 is now known as MironZ
00:09:52 <jackdk> This is my first time seeing the prophecy
00:09:57 exarkun_ joins (~exarkun@user/exarkun)
00:09:58 kawen joins (~quassel@static.208.191.216.95.clients.your-server.de)
00:10:03 wolfshappen joins (~waff@irc.furworks.de)
00:10:15 <hpc> http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html
00:10:34 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
00:10:34 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
00:10:34 wroathe joins (~wroathe@user/wroathe)
00:11:55 <geekosaur> InstX1, the real problem is once they go in people will start using them and then people who don't know or care will suddenly have to turn on -XDependentHaskell or whatever and possibly deal with weird syntax and/or errors
00:12:39 × derelict quits (~derelict@user/derelict) (Ping timeout: 256 seconds)
00:12:39 × zzz quits (~z@user/zero) (Ping timeout: 256 seconds)
00:12:56 Unode_ joins (~Unode@194.94.44.220)
00:12:59 bgamari_ joins (~bgamari@70.16.102.89)
00:13:00 zero joins (~z@user/zero)
00:13:13 × absence quits (torgeihe@hildring.pvv.ntnu.no) (Ping timeout: 256 seconds)
00:13:13 × noctuks quits (9wxBRvrIcP@user/noctux) (Ping timeout: 256 seconds)
00:13:13 × wrengr quits (~wrengr@249.189.233.35.bc.googleusercontent.com) (Ping timeout: 256 seconds)
00:13:13 × statusfailed quits (~statusfai@statusfailed.com) (Ping timeout: 256 seconds)
00:13:47 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 256 seconds)
00:13:47 × martin02_ quits (~silas@141.84.69.76) (Ping timeout: 256 seconds)
00:13:47 × sshine quits (~simon@exocortex.online) (Ping timeout: 256 seconds)
00:13:47 × tomku quits (~tomku@user/tomku) (Ping timeout: 256 seconds)
00:13:47 × Profpatsch quits (~Profpatsc@static.88-198-193-255.clients.your-server.de) (Ping timeout: 256 seconds)
00:13:47 × dixie quits (~dixie@real.wilbury.sk) (Ping timeout: 256 seconds)
00:13:47 × meejah quits (~meejah@rutas.meejah.ca) (Ping timeout: 256 seconds)
00:13:47 × icebreaker quits (~icebreake@user/icebreaker) (Ping timeout: 256 seconds)
00:13:47 × cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 256 seconds)
00:13:47 × wz1000 quits (~zubin@static.11.113.47.78.clients.your-server.de) (Ping timeout: 256 seconds)
00:13:47 × bgamari quits (~bgamari@70.16.102.89) (Ping timeout: 256 seconds)
00:13:47 × Unode quits (~Unode@194.94.44.220) (Ping timeout: 256 seconds)
00:13:47 × Ekho quits (~Ekho@user/ekho) (Ping timeout: 256 seconds)
00:13:47 Unode_ is now known as Unode
00:13:57 derelict joins (~derelict@user/derelict)
00:14:21 × APic quits (apic@apic.name) (Ping timeout: 256 seconds)
00:14:21 × fjmorazan quits (~quassel@user/fjmorazan) (Ping timeout: 256 seconds)
00:14:21 × [exa] quits (exa@user/exa/x-3587197) (Ping timeout: 256 seconds)
00:14:21 × haveo quits (~haveo@sl35.iuwt.fr) (Ping timeout: 256 seconds)
00:14:21 × hltk quits (~hltk@hltk.fi) (Ping timeout: 256 seconds)
00:14:29 fjmorazan_ joins (~quassel@user/fjmorazan)
00:14:58 statusfailed joins (~statusfai@statusfailed.com)
00:14:59 dixie joins (~dixie@real.wilbury.sk)
00:14:59 absence joins (torgeihe@hildring.pvv.ntnu.no)
00:15:00 × Tuplanolla quits (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
00:15:02 wrengr joins (~wrengr@249.189.233.35.bc.googleusercontent.com)
00:15:09 noctuks joins (mk6gDPckYi@user/noctux)
00:15:11 meejah joins (~meejah@rutas.meejah.ca)
00:15:15 sshine joins (~simon@exocortex.online)
00:15:22 cods joins (~fred@82-65-232-44.subs.proxad.net)
00:15:27 icebreaker joins (~icebreake@user/icebreaker)
00:15:29 tomku joins (~tomku@user/tomku)
00:15:29 Maxdamantus joins (~Maxdamant@user/maxdamantus)
00:15:42 haveo joins (~haveo@sl35.iuwt.fr)
00:15:46 [exa] joins (exa@srv3.blesmrt.net)
00:15:54 hltk joins (~hltk@hltk.fi)
00:23:01 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
00:23:22 × cjb quits (~cjb@user/cjb) (Quit: rcirc on GNU Emacs 29.0.50)
00:25:24 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
00:26:12 APic joins (~apic@apic.name)
00:26:27 wz1000 joins (~zubin@static.11.113.47.78.clients.your-server.de)
00:26:42 Profpatsch joins (~Profpatsc@static.88-198-193-255.clients.your-server.de)
00:26:45 martin02_ joins (~silas@141.84.69.76)
00:27:07 Ekho joins (~Ekho@user/ekho)
00:27:42 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
00:33:35 × alp_ quits (~alp@user/alp) (Ping timeout: 260 seconds)
00:34:33 × gurkenglas quits (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 248 seconds)
00:35:41 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
00:37:54 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
00:42:04 × Topsi quits (~Tobias@dyndsl-037-138-064-193.ewe-ip-backbone.de) (Quit: Leaving.)
00:43:17 deadmarshal_ joins (~deadmarsh@95.38.113.9)
00:46:45 × InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 268 seconds)
00:47:53 × deadmarshal_ quits (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds)
00:48:34 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
00:55:21 × xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Ping timeout: 248 seconds)
00:57:53 Inst[m] joins (~instrmatr@2001:470:69fc:105::1:903e)
01:00:58 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
01:01:19 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
01:01:59 InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net)
01:02:04 <InstX1> axman6
01:02:12 jbox joins (~jbox@user/jbox)
01:02:13 <InstX1> if you were making an educational lib collection for Haskell, what would you include?
01:02:22 <InstX1> I'd def add an interface for NativeFileDialog or TinyFileDialogs
01:02:29 × redb quits (~nmh@user/redb) (Ping timeout: 246 seconds)
01:02:49 <Axman6> import Prelude; -- done
01:03:01 <InstX1> actually, i'd also consider a custom Prelude
01:03:20 <InstX1> so learners could end up reimplementing basic Haskell functions
01:03:24 redb joins (~nmh@136.49.49.211)
01:04:09 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
01:04:14 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds)
01:05:57 vysn joins (~vysn@user/vysn)
01:06:13 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 260 seconds)
01:07:44 × redb quits (~nmh@136.49.49.211) (Ping timeout: 246 seconds)
01:08:07 Guest27 joins (~Guest27@2601:281:d47f:1590::6b90)
01:09:29 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
01:10:02 mbuf joins (~Shakthi@122.173.67.210)
01:10:39 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:15:07 <dsal> I've written a lot of haskell code, but I've not written anything that sounds like "file dialog"
01:16:06 <Axman6> yeah me either, sounds like something I have never wanted
01:16:46 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:17:00 neurocyte861449 joins (~neurocyte@IP-045093110082.dynamic.medianet-world.de)
01:17:00 × neurocyte861449 quits (~neurocyte@IP-045093110082.dynamic.medianet-world.de) (Changing host)
01:17:00 neurocyte861449 joins (~neurocyte@user/neurocyte)
01:17:07 <Axman6> I'm pretty happy writing BS.readFile filePath
01:17:13 redb joins (~nmh@136.49.49.211)
01:18:42 <dsal> I do have some file selection stuff in my gopro uploader which is `/some/path/*` (globbed by the shell) -> list of ordered parts of files by filename patterns. That's a little fancy. Similar thing with given a directory, find files that seem like they'd be related to media (which is really a depth traversal through a tree and a map of filename to the path where I found it, I think). Otherwise, argv does me pretty well.
01:18:52 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
01:19:26 <InstX1> your former students probably wanted it, though, Axman6
01:19:26 × neurocyte86144 quits (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds)
01:19:26 neurocyte861449 is now known as neurocyte86144
01:19:32 <InstX1> oh hi romesrf, thanks for everything
01:20:12 <Axman6> We never did anything with files
01:20:19 <dsal> InstX1: What does one use a file dialog for?
01:20:30 <InstX1> dsal: to get a filepath
01:20:36 <InstX1> through a GUI
01:20:54 <InstX1> basically, the notion is that people are less likely to hurt themselves if they have to do it through the GUI
01:21:05 <jackdk> That notion is completely false.
01:21:16 <dsal> Oh, you're making GUIs, too? That seems unnecessarily difficult.
01:21:45 <InstX1> i mean, not really, but just calling the native OS file selectors
01:21:54 × redb quits (~nmh@136.49.49.211) (Ping timeout: 268 seconds)
01:22:22 <dsal> I've always seen file dialogs as a compromise for having an application that has a GUI. They're sometimes not in the way, but often are extremely limiting.
01:22:44 <InstX1> i mean i'm closer to noob / poweruser levels, as opposed to developer
01:22:58 <InstX1> specifying a filepath within the app instead of through args from command line feels safer
01:23:13 <dsal> Most of the GUI stuff I work with are photo or video editing which have their own file picker concepts because filesystem paths don't fit the paradigm in any useful way.
01:23:23 <InstX1> i see
01:23:37 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 248 seconds)
01:24:00 <dsal> How is it safer? On a mac, you can always drag a file from Finder into terminal safely. But I don't know that I do that too often.
01:24:18 <dsal> I think I've also done that on Linux, but I don't do it often enough to know. heh
01:24:31 <exarkun_> What does "safer" even mean? I've never once cut myself while typing a filename into a shell. Is that a thing that happens to people?
01:24:54 <dsal> shells can be sharp
01:24:58 <jackdk> I cut my feet on a shell once, you gotta be careful when wandering around rock pools
01:25:24 <Axman6> hope it wasn't a cone shell
01:25:25 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
01:25:26 <InstX1> hum, windows doesn't have io.sys anymore
01:25:35 <InstX1> i sort of worry about accidentally selecting io.sys and causing the system to stop booting
01:25:40 <jackdk> `what_year_is_it.jpg`
01:25:48 <InstX1> not 1995
01:25:55 <jackdk> `IO.SYS` is an MS-DOS thing
01:26:03 <InstX1> but seriously, some people are just not comfortable with shell / command line
01:26:09 <exarkun_> Why are you going to accidentally type "io.sys" but you're not going to accidentally click on "io.sys"?
01:26:11 <InstX1> it's a convenience factor
01:26:17 <jackdk> (and so Win[9x..ME])
01:26:19 <dsal> And you think people are not comfortable with a shell are going to write GUI programs effectively?
01:26:30 <InstX1> it's not true GUI
01:26:38 <InstX1> just a command prompt program that can call native fileloaders
01:26:38 <exarkun_> InstX1: Okay. "I'm more comfortable with a GUI file picker" is fine. It just has nothing to do with safety, I think.
01:26:40 <monochrom> Does GHC even run on Win9x?
01:26:50 redb joins (~nmh@136.49.49.211)
01:27:28 <dsal> So is the idea to have something like `popUpAWindowToAskAUserForAFile >>= doStuffToFile` ?
01:28:21 <monochrom> I once "cut" myself with command line shell things when I mistakenly wrote "cmd infile outfile" when it should be "cmd outfile infile".
01:28:43 <Axman6> yeah positional arguments suck
01:29:11 <monochrom> <sarcasm>"Clearly", this could have been avoided by popping up one dialog for infile, and another one for outfile</sarcasm>
01:29:15 <dsal> The interface feels weird, but in the topic of education, I don't think teaching people to build a strange UX just to avoid argv is good. I'd be pretty sad if I typed `cp` and it popped up two windows.
01:29:31 <exarkun_> dsal: maaaybe
01:29:48 <exarkun_> dsal: what if it popped up two windows for passing files to cp in a capability-secure manner
01:29:50 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
01:29:53 <exarkun_> dsal: and also your whole os worked like that
01:29:59 <dsal> Let's call it scp
01:30:33 <monochrom> Axman6: Lest you really think it's only position, I wrote "gcc -o foo.c foo", too. >:)
01:30:35 <Axman6> for slow copy
01:30:47 <Axman6> monochrom: ha, oof
01:30:59 <Axman6> shells need typesd
01:31:02 <Axman6> types*
01:31:10 <dsal> It just seems frustrating to use. The two programs I use that have file popups occasionally get into a weird state with them and have to be restarted, which is not a great experience. heh
01:31:28 <InstX1> dsal: just saying it's what I, and presumably a bucnh of other people, would be accustomed to
01:31:30 <InstX1> also iirc visual basic
01:31:34 <dsal> monochrom: That looks like you were trying to write that one famous GHC bug.
01:31:41 <InstX1> devs don't need to know command line, can do GUI programming
01:32:15 <exarkun_> true
01:32:26 <exarkun_> but /good/ devs need to know command line
01:32:28 × redb quits (~nmh@136.49.49.211) (Ping timeout: 260 seconds)
01:32:34 <dsal> I don't know anything about visual basic. I've written smalltalk and some objective C GUI stuff in the past. But that's and environment built around those GUI toolkits.
01:32:51 <InstX1> what else would you stuff into a newbie lib?
01:32:57 <InstX1> newbie lib collection?
01:33:02 abastro joins (~abab9579@143.248.229.217)
01:33:11 <InstX1> I'd like to put in edMonad or something like that, i.e, demo programs that can be torn apart
01:33:12 <dsal> I think it's totally possible to be born into smalltalk and never see a CLI.
01:33:42 <exarkun_> dsal: I don't think you'd get very far
01:33:59 <exarkun_> dsal: you'd have almost no one to learn from
01:33:59 <InstX1> i'm supposed to be coding something
01:34:02 <dsal> I'm imagining an alternate universe where smalltalk is more widely used. :)
01:34:04 <InstX1> that's going to take a 56,000 wordlist
01:34:06 <exarkun_> ah, well, yes
01:34:11 <monochrom> I was born into the handheld calculator era and was spared of the abascus except for historical interest. (I was in Hong Kong.)
01:34:15 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 260 seconds)
01:34:17 <InstX1> then reprocess it into a 46656 word list with numbers
01:34:19 <dons> i think its possible to be born into react/js + vs code and never/rarely see a CI
01:34:20 <exarkun_> I was thinking that maybe in another 50 years we'd have developed enough stuff that you could do reasonably well with no cli
01:34:26 <exarkun_> but not in 2022 in this timeline
01:34:28 <InstX1> monochrom: my aunt was born into the slide rule era
01:34:35 <dons> there'a a lot of custom tooling to do UI development without ever knowing your on a unix
01:34:42 <InstX1> i hear that you can do mental math with slide rules
01:35:02 <exarkun_> dons: still waiting to meet a good programmer who only writes react/js
01:35:17 <monochrom> Looking at 40 years of history, I realize that no old technology can stay "must learn" forever.
01:35:21 <exarkun_> in fact, if you know any I might hire them
01:35:25 <InstX1> monochrom: pencils
01:35:30 <dsal> Oh no. I just realized I had a slide rule in my car last night, and I just put my car on a boat. It's supposed to be empty. I don't know where my slide rule is.
01:35:42 <InstX1> like, are we going to do everything via touchcreen in the future?
01:35:58 <InstX1> trash cans, also
01:36:05 <InstX1> toilets transform very quickly, though
01:36:24 <dsal> Ugh. Well, that may suck. Finding a new slide rule might be hard.
01:36:43 <InstX1> https://www.google.com/search?q=slide+rule&source=lnms&tbm=shop&sa=X&ved=2ahUKEwi47Imz5Pv2AhWvRjABHWM4ARcQ_AUoAnoECAEQBA&biw=1592&bih=1359&dpr=1
01:36:45 <exarkun_> dsal: https://www.instructables.com/Making-Your-Own-Slide-Rule/
01:36:50 <dsal> I used to write a lot of scheme on PalmOS and that was pretty nice.
01:36:57 <dsal> exarkun_: I used to do that in elementary school. heh
01:37:37 <dsal> Just used a regular ruler and a log table.
01:37:46 <dsal> Then I learned the commandline.
01:38:32 redb joins (~nmh@136.49.49.211)
01:38:55 × abastro quits (~abab9579@143.248.229.217) (Ping timeout: 260 seconds)
01:38:56 <dsal> Actually, I wrote a ton of RPL and Saturn assembler in high school. Not quite what I'd call a CLI there. I used a stack more than dialogs, thoug.
01:42:58 × kaph quits (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Ping timeout: 260 seconds)
01:43:37 × martin02_ quits (~silas@141.84.69.76) (Read error: Connection reset by peer)
01:44:02 martin02_ joins (~silas@141.84.69.76)
01:44:58 xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
01:45:25 <Axman6> my intro to programming was Logo. fun times
01:47:12 seydar joins (~seydar@pool-108-31-245-5.washdc.fios.verizon.net)
01:48:18 <seydar> I wrote three styles of an echo server (sequential, forking, process pool): https://paste.tomsmeding.com/aZFwOVUf. I'd love some feedback if anyone is feeling hateful
01:48:58 <monochrom> <grumpy>I hate echo servers.</grumpy>
01:49:31 <Axman6> @hoogle bracketOnError
01:49:31 <lambdabot> Control.Exception bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
01:49:31 <lambdabot> Control.Exception.Base bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
01:49:31 <lambdabot> Control.Monad.Catch bracketOnError :: MonadMask m => m a -> (a -> m c) -> (a -> m b) -> m b
01:49:36 <monochrom> Uh what's in Common?
01:49:45 <jackdk> it's at the bottom of the paste
01:49:55 <monochrom> :(
01:49:59 <Axman6> I feel like returjning the socket is unnecessary, it's neber used
01:50:10 <Axman6> never*
01:50:17 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 248 seconds)
01:50:17 <Axman6> fark, learn to type Axman
01:53:07 <seydar> Axman6: I have to return the socket in Pool.hs because I need to match the type
01:53:39 <seydar> actually I could prolly just change the type signature to match what `concurrently` returns
01:54:54 <seydar> monochrom: i'm looking for more practice, do you have a better/more fun server that I should write?
01:54:55 <Axman6> you're also redundantly returning the socket everywhere. your code looks like return socket >> return socket >> return socket >> ... if you unrol the recursion
01:55:02 <dons> wish i could edit little snippets like that and suggest changes/generate colorized unified diff via web
01:55:11 <dons> would be easy to mentor async , very cheaply
01:55:24 <dons> we sort of used to do that in hpaste , is there an equiv now?
01:55:32 <Axman6> if you need it to return the socket, do something like (\sock -> recursiveHandler socker >> pure socket)
01:56:57 <Axman6> seydar: you will create an infinite number of thereads in your forking version. change it to: accept server >>= forkIO . handleClient
01:57:42 <Axman6> what you have now is creating as many threads as possible, as quickly as possible, each trying to accept on the socket instead of accepting and then forking
01:57:45 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
01:59:48 × Guest27 quits (~Guest27@2601:281:d47f:1590::6b90) (Ping timeout: 250 seconds)
02:00:01 mc47 joins (~mc47@xmonad/TheMC47)
02:00:35 abastro joins (~abab9579@143.248.229.217)
02:01:18 <dons> didn't review for semantics, but just stylisticalyl. https://gist.github.com/donsbot/106a83b8d7485bef312917cc714cb913
02:01:41 <dons> you might want to install an LSP (at least, I find it very handy to use the Haskell LSP to help infer types/module imports/lints)
02:01:50 <jackdk> Does anyone have a link describing the magic cabal comment you can use to make a single .hs fil depend on hackage packages? My search-fu is failing me
02:02:03 <dons> one thing to do is not pass constant arguments around a loop, instead, bind them and share with an inner loop (`go` here)
02:02:30 <Axman6> jackdk: it's cabal v2-run
02:02:45 <Axman6> comment looks like {- cabal: buildDepends: ... -} IIRC
02:02:55 <Axman6> https://cabal.readthedocs.io/en/3.6/cabal-commands.html?highlight=run#cabal-v2-run
02:03:05 <Axman6> I actually happened to have the link still open, heh
02:03:50 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
02:04:58 <seydar> Axman6: oooooooooooooh that is a very good point
02:05:08 × abastro quits (~abab9579@143.248.229.217) (Ping timeout: 260 seconds)
02:05:10 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
02:05:15 <abastro[m]> <hpc> "http://blog.sigfpe.com/2006/08/..." <- Well to be fair, the blog states that you might have invented monads while not using haskell, but goes on with haskell examples
02:05:16 <seydar> dons: thank you! greatly appreciate the style help
02:05:40 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
02:05:55 <abastro[m]> Like they could easily go "But this is so easy in X language.."
02:06:11 <abastro[m]> "Why would I ever have to do that"
02:06:40 <dons> can be useful to install hlint, too, to get a few style fixes (the Haskell LSP will pick that up in vs code if you use it)
02:07:23 <Axman6> abastro[m]: the answer is "I thought you liked DRY? when you recognise the many shapes Monads come in, you'll see that _a lot_ of code you write can be abstracted to work for all monads"
02:08:00 <dolio> The audience is people learning monads in Haskell.
02:08:07 <abastro[m]> Only async programming is the one where they could recognize monads, and as that is the only place, they just go with built-in async-await
02:08:16 nun57 joins (~nun@61.140.176.155)
02:08:27 <nun57> hey gay
02:09:06 dextaa_54 joins (~dextaa@user/dextaa)
02:09:10 <seydar> dons: can you explain why you made `n` eagerly evaluated in gi your paste? (https://gist.github.com/donsbot/106a83b8d7485bef312917cc714cb913)
02:09:15 <Axman6> seydar: ... doesn't your `open` code close the socket before it returns it?
02:09:19 <abastro[m]> So ppl who are already quite devoted to learn haskell and trying to understand how haskell monads are used? I see.
02:09:22 res0nat0r0844 joins (~Fletch@dia.whatbox.ca)
02:09:23 × haritz quits (~hrtz@user/haritz) (Ping timeout: 256 seconds)
02:09:23 × simpleauthority quits (~simpleaut@user/simpleauthority) (Ping timeout: 256 seconds)
02:09:23 × fiddlerwoaroof quits (~fiddlerwo@user/fiddlerwoaroof) (Ping timeout: 256 seconds)
02:09:29 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 248 seconds)
02:09:35 Goodbye_Vincent1 joins (cyvahl@freakshells.net)
02:09:40 × res0nat0r084 quits (~Fletch@dia.whatbox.ca) (Read error: Connection reset by peer)
02:09:49 <abastro[m]> Yep I somehow read it as an introduction of monads for everyone
02:09:56 <dons> seydar: probably just habit at this point, since there was a match against 0 , the strictness can be inferred
02:09:57 × a1paca quits (~a1paca@user/a1paca) (Ping timeout: 256 seconds)
02:10:07 haritz joins (~hrtz@62.3.70.206)
02:10:07 × haritz quits (~hrtz@62.3.70.206) (Changing host)
02:10:07 haritz joins (~hrtz@user/haritz)
02:10:11 dysfigured joins (~dfg@dfg.rocks)
02:10:12 simpleauthority joins (~simpleaut@user/simpleauthority)
02:10:13 <seydar> Axman6: it 100% looks like that. i swear the code works! i stole it from the example on the Network.Socket page
02:10:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
02:10:20 <seydar> dons: why does the strictness matter?
02:10:28 <dons> generally, if I see a tail call passing an unevaluated arithmetic expression, i'll want to put a ! on it to make sure it compiles without a lazy thunk building in the arg
02:10:31 × dfg quits (~dfg@user/dfg) (Ping timeout: 256 seconds)
02:10:31 fiddlerwoaroof joins (~fiddlerwo@user/fiddlerwoaroof)
02:10:56 <Axman6> I'm very surprised that code works, I guess I don't know what the semantics of bracketOnError are
02:10:57 <dons> go n = .. something ..; go (n-1) -- is lazy in `n` unless there's something that's going to force the value
02:11:05 × dextaa_5 quits (~dextaa@user/dextaa) (Ping timeout: 256 seconds)
02:11:05 × noctux quits (~noctux@user/noctux) (Ping timeout: 256 seconds)
02:11:05 × Goodbye_Vincent quits (cyvahl@freakshells.net) (Ping timeout: 256 seconds)
02:11:05 × Cheery quits (~cheery@7-239-179-185.static.tentacle.fi) (Ping timeout: 256 seconds)
02:11:05 × janus quits (janus@anubis.0x90.dk) (Ping timeout: 256 seconds)
02:11:05 × ario quits (~ario@159.65.220.102) (Ping timeout: 256 seconds)
02:11:05 dextaa_54 is now known as dextaa_5
02:11:05 Goodbye_Vincent1 is now known as Goodbye_Vincent
02:11:35 <dons> very common source of unexpected thunks is forgetting to ! an accumulating parameter in a loop. in your case, you have a match against 0 and it counts down from 2, so nothing to worry about
02:12:00 <dons> still, i think its good style to be explicit about strictness where it matters (just like writing the type signature)
02:12:08 a1paca joins (~a1paca@user/a1paca)
02:12:39 janus joins (janus@anubis.0x90.dk)
02:12:55 ario joins (~ario@159.65.220.102)
02:12:58 Cheery joins (~cheery@7-239-179-185.static.tentacle.fi)
02:13:22 noctux joins (~noctux@user/noctux)
02:14:23 dysfigured is now known as dfg
02:14:32 × dfg quits (~dfg@dfg.rocks) (Changing host)
02:14:32 dfg joins (~dfg@user/dfg)
02:14:36 <abastro[m]> I finally come to realize that why ppl complain about monad tutorials
02:15:24 <nun57> monad tutorials?
02:15:25 <abastro[m]> It's because haskell is too hard for them, but many ppl started saying about monads, so they try to skim through it to know what it is
02:15:57 <abastro[m]> And then frustrated because most monad tutorials are written for haskell programmers.
02:16:08 <abastro[m]> Haskell beginners*
02:16:23 <monochrom> That's only the beginner side.
02:16:33 <abastro[m]> So they are extremely frustrated because now they have to learn this exotic difficult language to learn the concept of monad
02:16:56 <monochrom> The those-in-the-know side complain for a different reason, probbably the opposite reason.
02:17:03 <Axman6> that's why I send them this: https://tomstu.art/refactoring-ruby-with-monads
02:17:06 <monochrom> Those monad tutorials are sacrilegeous.
02:17:17 <abastro[m]> When they just want to know what monad broadly is
02:17:28 <abastro[m]> Oh, I was talking about the perspective from outside. Yes.
02:18:00 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
02:18:14 <Axman6> For anyone who's familliar with <GENERIC OOP LANGUAGE>, the above link is a good introduction to how several things which feel unrelated actually follow the same patterns all the time
02:18:21 × xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Quit: xff0x)
02:18:34 <abastro[m]> Haskellers have other reasons to dislike monad tutorials
02:19:04 <dolio> Yeah, usually they're written by people who don't understand monads.
02:19:13 <Axman6> > concat . transpose $ ["ABC","123","wxyz","89"]
02:19:15 <lambdabot> "A1w8B2x9C3yz"
02:19:27 <dons> cute
02:19:40 xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
02:20:16 <Axman6> just had a though about an alternative monad implementation for lists which interleves instead of concat
02:20:55 <abastro[m]> And because the vocal minority does not understand monads and write tutorials, ppl say that monad is not well-researched concepts
02:21:13 <abastro[m]> Since they think it should be something that could be explained in a few lines.
02:21:58 <Axman6> I've never heard anyone say it's not a well researched concept
02:22:18 <monochrom> Find out what's wrong with the example in this monad tutorial: https://betterprogramming.pub/monads-are-just-fancy-semicolons-ffe38401fd0e
02:22:25 <abastro[m]> There is a StackOverflow comment on this
02:22:31 <Axman6> it literally is something that can be explained in a few lines, the monad concept is _incredibly simple_, but the impleication of such a simple abstraction are massive
02:24:17 <Axman6> implications*
02:24:21 <monochrom> Ugh I thought people's impression on monad was "academic" so "way too well researched" >:)
02:24:39 <abastro[m]> Hm how would you explain monad in a few lines btw
02:25:02 <monochrom> I might write the laws. Or I might just decline.
02:25:09 <Axman6> return :: a -> m a; (>>=) :: m a -> (a -> m b) -> m b
02:25:19 <Axman6> + laws
02:25:27 AlexNoo_ joins (~AlexNoo@178.34.163.99)
02:25:31 <monochrom> How would you explain computer programming in a few lines?
02:26:24 <Axman6> write words, computer do things
02:26:47 <abastro[m]> I will just say wrong things which will still potentially click for them
02:27:14 <InstX1> monads are parameterized data types that allow you to access them only through functions designed for them
02:27:15 <monochrom> That's a different kind of "explain". It works for people who won't go into computer programming.
02:27:29 <InstX1> or through fmap, which calls a method designed for the specific monad
02:27:55 × AlexZenon quits (~alzenon@178.34.161.168) (Ping timeout: 260 seconds)
02:27:56 <InstX1> the do syntax / bind also causes sequencing by default, whereas with applicatives sequencing requires more specific functions for that to happen
02:28:17 <InstX1> sacrilegious?
02:28:26 <seydar> dons: i'm learning about unexpected thunks here: https://well-typed.com/blog/2020/09/nothunks/. it sounds like it's saying that they're memory bloat during runtime?
02:28:53 <seydar> Axman6: i'm gonna play with the code and see if i can write code that not only works but also makes sense
02:28:57 <InstX1> the methods are part of where the magic happens with a monadic type; i.e, you can program logic into the accessor methods
02:29:02 abastro joins (~abab9579@143.248.229.217)
02:29:07 <abastro> Hmm
02:29:18 <monochrom> Whereas "explain monad"'s "explain" is a taller order in this context because this time the target audience will need to write Haskell code successfully. Not a pedestrian wanting just a popsci fix.
02:29:18 × AlexNoo quits (~AlexNoo@178.34.161.168) (Ping timeout: 272 seconds)
02:29:18 <InstX1> am i doing it wrong?
02:29:19 × Alex_test quits (~al_test@178.34.161.168) (Ping timeout: 260 seconds)
02:29:45 <abastro> No, I mean, they first wanted to know what is monads
02:29:50 <abastro> Yet they did not understood
02:29:54 <abastro> in the stackoverflow
02:29:57 <InstX1> monads are a meme
02:29:58 <abastro> Hm let me dig it up
02:30:35 <InstX1> oh, by the way, i finally understood what a category is
02:30:41 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
02:30:53 <InstX1> a set of objects with morphisms (arrows) between them that create 1-1 relations
02:30:59 <abastro> Congrats (if you did for real)
02:31:08 <abastro> This stackoverflow btw: https://stackoverflow.com/questions/44965/what-is-a-monad
02:31:33 <abastro> In the first answer, you can see Breton's comments
02:31:53 <InstX1> and iirc a binary operation defined on the morphisms
02:32:35 <InstX1> morphisms are associative, there's an identity morphism, and commutative
02:32:37 <abastro> https://paste.tomsmeding.com/n5dWSJNU
02:32:39 <abastro> The comment part
02:32:55 <InstX1> well, not commutative
02:33:16 Alex_test joins (~al_test@178.34.163.99)
02:33:20 <abastro> Their impression seems to be: "Because the authors of haskell are sadomasochists and decided that you should do something stupidly complex to accomplish simple things, so you HAVE to learn monads to use haskell, not because they're in any way useful in themselves"
02:33:21 <InstX1> ((a->b) apply b-> c) -> (a->c)
02:33:25 AlexZenon joins (~alzenon@178.34.163.99)
02:33:58 <InstX1> monads are just (primarily) a way to force you to use the accessor methods, which have embedded logic into them
02:34:28 <abastro> monochrom: How do you think of the comment - which seem to explain the general sentiment
02:34:47 <monochrom> Soon you will find me badmouthing all of stackoverflow altogether, not just blogs and monad tutorials.
02:34:50 <InstX1> abastro: monads are getting into other languages
02:34:59 <abastro> Hm are they
02:35:02 <InstX1> and monad tutorials in other languages are better than haskell monad tutorials
02:35:02 <monochrom> Sorry I don't bother to read stackoverflow.
02:35:09 <InstX1> javascript has monads now
02:35:22 <abastro> Well, monochrom, my point is that 1. stackoverflow is the go-to site for programmers to solve problems
02:35:35 <abastro> 2. The comment is heavily upvoted, which means that there are many sympathizers
02:36:11 × xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Quit: xff0x)
02:36:16 <monochrom> I know. I still don't care. Let them have cake.
02:36:17 <abastro> 3. Just ignoring them as badmouthing could be seen as an elitist attitude for outsiders
02:36:24 <InstX1> "because the Haskell community are elitists and refuse to teach monads properly"
02:36:29 <InstX1> that's the correct line
02:36:37 <monochrom> No, I will be the one badmouthing them.
02:36:41 <InstX1> people have concluded monads are gatekeeping in the Haskell community
02:37:02 <abastro> InstX1: Yeah, somewhat
02:37:08 × seydar quits (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
02:37:57 <abastro> Anyway, tbh I think this is the aspect ppl call out haskell community for being elitist.
02:37:58 <monochrom> So I was teaching a C-and-Unix course. I put this question on an exam. Using stdio.h how do you check that stdin has hit end-of-file.
02:38:21 <monochrom> A few students answered "fseek then ftell".
02:38:59 <monochrom> My marking TA discovered that they probably got this approach from stackoverflow, since stackoverflow had this question and this solution.
02:39:11 <InstX1> if i post a "this is what a monad is and haskell community should feel bad for gatekeeping" onto stackoverflow, will I be misinterpreting monads?
02:39:35 <monochrom> I am elitist and I think stackoverflow is the blind leading the blind and here is my anecdote.
02:39:36 <dolio> Probably.
02:39:46 <abastro> Well, InstX1, tbh it kind of would be.
02:41:22 <abastro> monochrom: Do you also think knowledge base should be distributed by the ppl who know more & better?
02:41:57 <monochrom> I do my share of distribution at my http://www.vex.net/~trebla/haskell/
02:42:17 <abastro> Oh wait, is it yours
02:42:28 <monochrom> But stackoverflow has all the wrong mechanics and incentives.
02:42:49 <abastro> Hmm, could you elaborate?
02:42:54 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
02:43:00 <monochrom> On that point, it's not just me, there are former stackoverflow answerers who blogged on why they quit.
02:43:11 <abastro> !
02:43:16 <d34df00d> As I got slightly older (but in no way wiser, sadly) I figured trying to change somebody else's attitude is both pointless and futile.
02:43:29 <d34df00d> So nowi I just use my wannabe-knowledge of certain things to flex.
02:43:34 <InstX1> the 1226 is actually good
02:43:50 <monochrom> My personal impression though is that upvoting is correlated to length rather than correctness.
02:43:59 <abastro> Sorry that my attitude is a bit intimidating and is hard to change...
02:44:07 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
02:44:16 <d34df00d> abastro: nope that's good, intimidating attitudes are best attitutdes.
02:44:19 <d34df00d> I'd buy two.
02:44:20 <abastro> Oh, now I see. So they implemented the mechanics in wrong way
02:44:25 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
02:44:28 <abastro> d34df00d: Wait wha
02:45:13 <abastro> Basically you mean, SO messed up in being a credible crowd-sourced document site, right?
02:45:29 <abastro> (Eh, or Q&A site)
02:46:16 <abastro> In that they did not set up the facilities around UX correctly towards the unbiased info sharing
02:46:34 <abastro> monochrom: Or did I get you wrong?
02:47:53 <monochrom> Ugh unbiasedness is the culprit here. Everyone who don't know can cast their upvote.
02:48:29 <monochrom> Even Wikipedia knows that they need privileged moderators.
02:48:45 xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
02:48:48 <abastro> I thought stackoverflow also had privileged moderators
02:49:00 <monochrom> You need a bias and need that bias to favour experts.
02:49:02 × ellie quits (~ellie@user/ellie) (Remote host closed the connection)
02:49:15 <abastro> Well, I mean, *public bias* is a thing
02:49:49 <abastro> In my experience, collection of experts more likely know better to try being less biased
02:50:02 <dolio> The moderators on stack overflow aren't in charge of judging which things are accurate.
02:50:03 <monochrom> I think SO moderators only lock and delete questions?
02:50:13 <abastro> That's all they do?
02:50:29 <monochrom> I would be on board if SO moderators started deleting wrong answers despite upvotes.
02:50:30 <dolio> They, like, tell people not to post too many comments.
02:50:31 <abastro> Just able to bluntly lock?
02:50:43 <abastro> Oh god
02:51:05 <monochrom> Right? Wikipedia moderators delete stuff.
02:51:12 <abastro> Now sounds like democracy implemented wrong
02:52:49 <abastro> Internet truly became ocean of information... which is mostly trash smh
02:55:59 <abastro> For that matter, is Wikipedia better than StackOverflow
02:59:02 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
03:00:03 <abastro> Anyway, thanks for TILs. Did not know SO was this problematic
03:00:34 × InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 268 seconds)
03:01:00 InstX1 joins (~Liam@2600:1006:b001:e27:388d:a695:9e26:c146)
03:04:05 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
03:05:28 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
03:07:09 × xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Quit: xff0x)
03:07:50 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
03:08:27 xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
03:09:18 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
03:13:50 InstX1_ joins (~Liam@2601:6c4:4080:3f80:715c:6e2e:e135:d0fa)
03:15:59 × InstX1 quits (~Liam@2600:1006:b001:e27:388d:a695:9e26:c146) (Ping timeout: 268 seconds)
03:18:41 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 245 seconds)
03:18:49 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 248 seconds)
03:20:45 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
03:20:59 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
03:21:08 × euandreh quits (~euandreh@2804:14c:33:9fe5:f37c:486d:e6c4:36d4) (Ping timeout: 260 seconds)
03:21:42 euandreh joins (~euandreh@2804:14c:33:9fe5:7b2e:dcb2:6878:c267)
03:33:00 × chenqisu12 quits (~chenqisu1@183.217.202.44) (Quit: Leaving)
03:34:39 InstX1_ is now known as InstX1
03:39:44 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
03:40:41 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
03:43:24 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Ping timeout: 240 seconds)
03:43:44 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
03:46:42 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:52:46 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
03:53:06 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
03:55:19 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
03:57:45 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 248 seconds)
03:59:04 × littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Quit: leaving)
03:59:29 littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
04:06:06 × littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Quit: leaving)
04:06:18 littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
04:08:23 × melonai quits (~mel@rnrd.eu) (Ping timeout: 256 seconds)
04:08:35 melonai joins (~mel@rnrd.eu)
04:08:51 sayola1 joins (~vekto@dslb-088-078-152-238.088.078.pools.vodafone-ip.de)
04:08:57 × mcglk quits (~mcglk@131.191.49.120) (Ping timeout: 256 seconds)
04:08:57 × sabx quits (~sabbas@user/sabbas) (Ping timeout: 256 seconds)
04:10:05 × sayola quits (~vekto@dslb-088-078-152-238.088.078.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
04:10:36 sabx joins (~sabbas@user/sabbas)
04:10:39 × simeon quits (~pi@dslb-090-186-003-168.090.186.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
04:11:52 mcglk joins (~mcglk@131.191.49.120)
04:12:00 simeon joins (~pi@dslb-090-186-003-168.090.186.pools.vodafone-ip.de)
04:13:30 cdman joins (~dcm@user/dmc/x-4369397)
04:14:17 bahamas joins (~lucian@84.232.140.158)
04:17:23 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
04:20:15 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
04:20:47 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
04:24:46 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
04:26:01 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 248 seconds)
04:26:05 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
04:27:35 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
04:30:46 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
04:40:53 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
04:43:13 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds)
04:43:49 × abastro quits (~abab9579@143.248.229.217) (Ping timeout: 240 seconds)
04:47:35 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
04:51:49 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 240 seconds)
04:59:50 Guest27 joins (~Guest27@2601:281:d47f:1590::6b90)
05:01:53 deadmarshal_ joins (~deadmarsh@95.38.113.9)
05:02:57 KaitoDaumoto joins (Frat@user/kaitodaumoto)
05:05:07 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
05:06:14 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
05:15:25 × Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
05:15:48 × zebrag quits (~chris@user/zebrag) (Read error: Connection reset by peer)
05:18:55 × jbox quits (~jbox@user/jbox) (Read error: Connection reset by peer)
05:18:55 abastro joins (~abab9579@143.248.229.217)
05:23:44 chomwitt joins (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32)
05:24:17 × zmt00 quits (~zmt00@user/zmt00) (Quit: Leaving)
05:25:28 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
05:26:17 zmt00 joins (~zmt00@user/zmt00)
05:28:55 × hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds)
05:30:09 hololeap_ joins (~hololeap@user/hololeap)
05:37:28 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
05:49:54 × joo-_ quits (~joo-_@fsf/member/joo--) (Quit: Lost terminal)
05:54:39 × Guest27 quits (~Guest27@2601:281:d47f:1590::6b90) (Quit: Client closed)
05:56:21 jakalx parts (~jakalx@base.jakalx.net) ()
05:56:32 × [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
05:56:56 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
05:57:08 jakalx joins (~jakalx@base.jakalx.net)
06:01:39 × [exa] quits (exa@srv3.blesmrt.net) (Changing host)
06:01:39 [exa] joins (exa@user/exa/x-3587197)
06:03:37 × deadmarshal_ quits (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds)
06:05:41 × defanor quits (~defanor@tart.uberspace.net) (Ping timeout: 256 seconds)
06:05:56 defanor joins (~defanor@tart.uberspace.net)
06:06:19 caubert_ joins (~caubert@136.244.111.235)
06:06:45 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:07:23 × sudden quits (~cat@user/sudden) (Ping timeout: 256 seconds)
06:07:23 × andjjj23_ quits (~irc@107.170.228.47) (Ping timeout: 256 seconds)
06:07:57 × caubert quits (~caubert@136.244.111.235) (Ping timeout: 256 seconds)
06:08:00 <Axman6> vaibhavsagar[m]: Hey man, you around?
06:08:56 <vaibhavsagar[m]> Yup, how can I help?
06:09:12 sudden joins (~cat@user/sudden)
06:09:26 <Axman6> I just came across an old tab (yeah I'm one of those people) with https://vaibhavsagar.com/blog/2018/07/29/hamts-from-scratch/, and I wanted to say it's great, really well done man
06:09:41 <vaibhavsagar[m]> oh, thank you very much
06:10:00 <vaibhavsagar[m]> I actually have been exploring an alternative explanation that starts with binary hash trees and builds from there
06:10:08 DNH joins (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76)
06:10:22 <Axman6> HAMT with branching factor of 2?
06:10:29 <vaibhavsagar[m]> https://github.com/vaibhavsagar/notebooks/blob/master/hamt/HashArrayMappedTrieProgression.ipynb
06:10:30 <vaibhavsagar[m]> yeah
06:11:07 <vaibhavsagar[m]> I think what it needs is diagrams but I have to write a bunch of tedious boilerplate to get graphviz to do what I want so I've been procrastinating on that for a few months now
06:11:09 <Axman6> nice - yeah not a bad way to start
06:11:37 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
06:11:49 <Axman6> use the diagrams package - I think I gave a talk once on fingertrees where I generated the diagrams from the actual structure of the tree
06:12:15 <vaibhavsagar[m]> I've gotten that advice before but I think graphviz is nicer
06:12:27 <vaibhavsagar[m]> (for this specifically)
06:12:42 <Axman6> fair enough - IIRC it did have some code specifically for drawing trees
06:12:43 <vaibhavsagar[m]> e.g. https://github.com/vaibhavsagar/notebooks/blob/master/hamt/HAMTVisualisation.ipynb
06:12:52 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
06:12:58 <vaibhavsagar[m]> maybe I need to take another look at it
06:13:26 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
06:13:27 <vaibhavsagar[m]> when I tried it last I ended up fussing with the line spacing and it looked kinda jank
06:13:41 <vaibhavsagar[m]> but graphviz doesn't let you configure any of that so it's less trouble that way
06:13:56 <vaibhavsagar[m]> you basically just take what you get with graphviz
06:14:52 <Axman6> diagrams is worth learning anyway, takes a bit of getting used to, but it's pretty crazy once you get it
06:15:08 <Axman6> yeah nice with graphviz is you separate out the graph and its styling
06:16:45 <vaibhavsagar[m]> maybe you've already seen https://plume-quokka.glitch.me/, where I put my graphviz HAMT visualisation online
06:17:24 <vaibhavsagar[m]> hmm, seems broken now
06:18:55 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
06:19:06 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
06:20:01 × DNH quits (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:20:15 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
06:21:04 andjjj23_ joins (~irc@107.170.228.47)
06:24:15 acidjnk joins (~acidjnk@p200300d0c7049f07f8ca2b00dd6818e1.dip0.t-ipconnect.de)
06:24:16 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 272 seconds)
06:28:08 DNH joins (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76)
06:28:32 bahamas joins (~lucian@84.232.140.158)
06:29:22 InstX1_ joins (~Liam@2601:6c4:4080:3f80:99cb:ce04:4b4a:7252)
06:29:37 × InstX1 quits (~Liam@2601:6c4:4080:3f80:715c:6e2e:e135:d0fa) (Ping timeout: 268 seconds)
06:32:28 seydar joins (~seydar@pool-108-31-245-5.washdc.fios.verizon.net)
06:33:28 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 260 seconds)
06:33:49 lortabac joins (~lortabac@2a01:e0a:541:b8f0:5d73:ba4b:5267:e012)
06:35:03 odnes joins (~odnes@5-203-209-2.pat.nym.cosmote.net)
06:35:30 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
06:35:37 cfricke joins (~cfricke@user/cfricke)
06:36:44 × seydar quits (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
06:39:36 × DNH quits (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:40:25 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 250 seconds)
06:41:35 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
06:42:03 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
06:46:08 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
06:46:22 coot joins (~coot@213.134.190.95)
06:46:38 michalz joins (~michalz@185.246.204.37)
06:49:00 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
06:49:05 × shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit)
06:50:01 × raym quits (~raym@user/raym) (Ping timeout: 248 seconds)
06:51:00 raym joins (~raym@user/raym)
06:53:06 zeenk joins (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94)
06:55:19 kaph joins (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it)
06:55:43 mixfix41 joins (~sdenynine@user/mixfix41)
06:57:52 abastro joins (~abab9579@143.248.229.217)
06:58:39 deadmarshal_ joins (~deadmarsh@95.38.113.9)
06:59:05 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
07:04:45 abastro joins (~abab9579@143.248.229.217)
07:06:01 × nun57 quits (~nun@61.140.176.155) (Ping timeout: 248 seconds)
07:06:49 random-jellyfish joins (~random-je@user/random-jellyfish)
07:08:59 gurkenglas joins (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de)
07:09:05 alp_ joins (~alp@user/alp)
07:10:15 <random-jellyfish> every time I learn something new, e.g. haskell and functional programming, I get very excited about it but in the end I fail to create anything meaningful with the new thing I've just learned, the only "achievements" consist of reproducing some tutorials, reading and understanding some articles ans solving very simple problems
07:10:51 CiaoSen joins (~Jura@p200300c957311e002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
07:10:58 <Axman6> The curse of curiosity without imagination or a problem to solve
07:11:18 <random-jellyfish> could this mean I'm not smart or creative enough to leverage the latest technologies in developing myself and the world?
07:12:08 <siers> not "not smart enough". indeed, go try to solve a new problem with the language. this is how it always goes with learning new languages
07:12:21 <opqdonut> writing an actual program, with a team, that solves an actual problem, in just plain haskell is cool enough
07:12:39 <opqdonut> you probably won't need any fancy techniques or libraries
07:12:58 <Axman6> The question "I've learnt X, now what should I make?" is a pretty common one, and not one which had a useful answer because it depends more on you. IMO it's ok to use this point as a time to learn more; I often find that's when I'll come across something cool that I do want to build - go on lobste.rs and find some cool algorithm or project and build it in Haskell, that's often what motivates me
07:12:59 <opqdonut> after you've written 5 programs or so, you might start seeing the need for fancy stuff, but even then, it might be better for the team to stick to basics
07:13:35 <jackdk> ^ this. most of the haskell I write for work is not that galaxybrained. Some small parts are galactic, but nothing intergalactic
07:13:37 <opqdonut> advent of code is a nice source of programming exercises if you can't think of anything real
07:14:06 <opqdonut> I know I can't think of anything real, that's why I'm a consultant so people come to me with their real problems
07:14:14 <Axman6> I find myself often reading some article about someone else's project and thinking "Hmm, I wonder how I'd write that in Haskell"
07:14:36 <Axman6> (jackdk will know what that I ACTUALLY think is "I wonder if I can write that in Haskell and make it faster than theirs")
07:16:59 kuribas joins (~user@ptr-25vy0i7lyxwuflpbsmc.18120a2.ip6.access.telenet.be)
07:18:11 <random-jellyfish> thanks, very interesting answers
07:18:38 <Axman6> I definitely sympathise with the feeling, I've been there many times, and I'm not organised enough to take on a large project of my own
07:18:58 × Psybur quits (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Ping timeout: 260 seconds)
07:19:08 <[exa]> random-jellyfish: .........honestly, what's wrong on just learning stuff? :D
07:19:37 <tdammers> indeed, people need to stop obsessing about "usefulness" and "goals" and "purpose" and all that
07:19:45 chenqisu1 joins (~chenqisu1@183.217.202.44)
07:19:50 <Axman6> Amen
07:20:05 <Axman6> the way the world's going, it ain't gonna matter soon enough =)
07:20:06 <siers> Axman6, I made something faster than haskell than anyone else in my company (maze solver, just for fun). by a huge margin, but also because I had better algorithms :D
07:20:24 Neuromancer joins (~Neuromanc@user/neuromancer)
07:20:25 <siers> it is my most serious, longest haskell program ever
07:20:29 × abastro quits (~abab9579@143.248.229.217) (Ping timeout: 246 seconds)
07:20:57 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 248 seconds)
07:21:00 abastro joins (~abab9579@143.248.229.217)
07:21:02 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
07:21:15 <Axman6> As much as a hate it, algorithms trump optimisations nearly anyday, but I love optimisations
07:21:49 <siers> I did pack bits and mirror them for easier rot8, so there's that!
07:22:23 <Axman6> learning how to write C in Haskell is very fun :P
07:22:24 <siers> and I'm pretty sure I had numbers to back up the speed improvements
07:22:25 <[exa]> random-jellyfish: anyway, people seem obsessed with results and achievements but you need actual problems to start with, otherwise the results are superfluous. If you can't find a problem then you're happy right? :D
07:22:29 abastro joins (~abab9579@143.248.229.217)
07:22:35 <siers> Axman6, yes :D
07:22:49 <[exa]> Axman6: GPU crowd disagrees, throw array bruteforce at stuff!!
07:23:01 × acidjnk quits (~acidjnk@p200300d0c7049f07f8ca2b00dd6818e1.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
07:23:17 <siers> programming is all problems. if you have no problems, congratulations, you may finally go outside and see the sunshine
07:24:15 <Axman6> > let isProblem = const True in any isProblem []
07:24:17 <lambdabot> False
07:24:34 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
07:24:34 <siers> I wrote a solver that solves mazes like these: http://raitis.veinbahs.lv/maze/content/lvl5-2021-06-15-14-32-04-c744.mp4 (also generated the pics for the video with haskell)
07:24:39 <kuribas> [exa]: for most problems, moving stuff to the GPU already takes longer than calculating on the CPU.
07:25:06 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
07:25:12 <tdammers> that's quite the generalization there
07:25:34 <Axman6> unless you're on an M1 mac
07:25:39 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
07:25:41 <abastro> Throw array brutefoce works well for multithreading at least
07:25:47 <Axman6> or... the many other cases where that is also not true :P
07:26:18 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
07:27:20 <kuribas> tdammers: well, depending how you count "most" :) For a game engine programmers, it's probably not true, but most programmers are not game engine programmers.
07:27:32 <abastro> How are you guys already awake, it is illegal
07:27:43 <siers> it's 10:27 here
07:27:55 <kuribas> 9:27 :)
07:27:55 <Axman6> it's 17:27 here
07:28:14 <Axman6> asn't it like 14:27 where you are abastro?
07:28:27 <kuribas> People who claim FP is slow because of immutability are completely clueless IMO.
07:28:36 MajorBiscuit joins (~MajorBisc@c-001-028-054.client.tudelft.eduvpn.nl)
07:28:59 <siers> Well, it can be true...
07:29:08 <siers> that was supposed to be italics
07:29:41 <kuribas> siers: I mean in general, not some specific problem where it "might" be slow.
07:29:54 <tdammers> kuribas: so are people who just hand-waive the practical difficulties of compiling functional code into efficient machine code for Von Neumann machines
07:30:17 <kuribas> tdammers: perhaps, but that's the job of the compiler, no?
07:30:27 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
07:31:49 <kuribas> But in reality "performance" is mostly not a function of the programming language.
07:32:08 <tdammers> it is, and it isn't
07:32:30 <tdammers> the semantics of a given language may make it impossible to implement it efficiently
07:32:32 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:32:49 <kuribas> I mean, people claim FP is slow, but you don't hear that about Python or Javascript, which are an order of magnitude slower.
07:33:18 <tdammers> Python is actually pretty famous for being slow
07:33:19 bahamas joins (~lucian@84.232.140.158)
07:33:34 <kuribas> still it's more popular than ever.
07:33:57 <tdammers> correct; because for the things that people use it for, the speed of the Python interpreter doesn't actually matter
07:35:10 <kuribas> Yes, and for that realson, the penalty of immutability doesn't matter either.
07:35:21 <tdammers> 90% of Python applications are probably one of 1) ad-hoc scripting; 2) scientific stuff; 3) web dev. For #1, speed doesn't matter *at all*; for #2, the grunt work is offloaded to efficient numeric libraries written in C or Fortran or whatever; and for #3, the majority of time is spent waiting for the network and the database, and what remains can usually be solved with caching and horizontal
07:35:23 <tdammers> scaling.
07:35:45 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
07:36:08 timCF joins (~timCF@200-149-20-81.sta.estpak.ee)
07:36:22 <tdammers> The problem with "FP slowness" is that if you implement the compiler naively, it can easily turn quadratic or exponential; unlike Python's slowness, which is largely just a constant factor across the board, "FP slowness" is of the nasty big-O kind
07:36:37 × MajorBiscuit quits (~MajorBisc@c-001-028-054.client.tudelft.eduvpn.nl) (Ping timeout: 240 seconds)
07:37:23 <kuribas> tdammers: that is not an argument against using a FP language.
07:37:27 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
07:37:49 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 240 seconds)
07:37:51 <kuribas> at best, it's an argument against rolling your own FP language, or compiler.
07:38:04 <siers> was there some limit how much sharing can functional data structures do at most or something? or is this something that I just dreamt?
07:38:09 <siers> I saw something like that a long time ago
07:38:12 <kuribas> But there are projects, like GRIN, which can do this step efficiently.
07:39:16 <tdammers> kuribas: it used to be an argument, until people figured out how to compile FP languages in such a way that the algorithmic explosion can be avoided.
07:39:23 <kuribas> siers: well, there's a log(n) factor which needs to be updated for immutable updates.
07:39:40 jgeerds joins (~jgeerds@d5364b87.access.ecotel.net)
07:39:47 <kuribas> siers: for most immutable datastructures.
07:40:33 × michalz quits (~michalz@185.246.204.37) (Ping timeout: 260 seconds)
07:40:41 <abastro> Axman6: It is indeed about 16:40 now
07:40:43 <maerwald[m]> tdammers: absolutely. IME, naive FP implementations do much worse than naive C/java/whatever
07:40:58 <abastro> So it is morning for east european folks :)
07:41:12 × dextaa_5 quits (~dextaa@user/dextaa) (Remote host closed the connection)
07:41:42 <abastro> Is Scala one of the naive FP implementations?
07:41:58 <abastro> Idk if it is actually slow in industrial practice
07:42:55 × Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
07:43:13 <siers> I couldn't answer that because I haven't consluted any benchmarks, but it is fast enough for us at work, haha
07:44:23 <siers> pretty much a non-answer, but I wanted to chime in purely because I write scala every day :D
07:44:40 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:45:37 <kuribas> clojure is pretty slow, but somehow enthousiast keep claiming how fast it is.
07:45:50 machinedgod joins (~machinedg@24.105.81.50)
07:45:56 <kuribas> On the back of a famous clojure book it literally says that clojure is "really, really fast".
07:46:11 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
07:46:17 <kuribas> Yet, any evidence I found for the performance of clojure shows it fares pretty bad compared to other languages.
07:46:36 <tdammers> I'm pretty sure Scala is not a naive implementation. There is some overhead due to having to run on the JVM, which wasn't designed for this kind of thing, but that's in the same category as what makes Python slow, not in the "accidentally quadratic" category of a naive FP implementation.
07:46:43 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
07:46:44 <kuribas> IMO an order of magnitude slower than GHC.
07:47:31 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
07:47:43 <kuribas> IMO clojure is slow because it doesn't attempt to tear down abstractions, like GHC does.
07:47:59 <kuribas> But the clojure crowd must be the most uncritical ever.
07:48:30 <lortabac> I benchmarked both Scala and Clojure recently because I had to choose a JVM language for a specific task
07:48:34 <tdammers> It doesn't attempt it, because it can't, due to the whole homoiconic live coding stuff. If you want to be able to manipulate code as data at runtime, then you have to keep the abstractions around, otherwise you can't fiddle with them anymore.
07:48:43 <opqdonut> yeah the clojure implementation is naive for sure, all the allocs and calls you see in the code actually happen
07:48:54 <lortabac> Clojure segfaulted, Scala was much better
07:49:06 <tdammers> Then again, Clojure isn't actually a functional language in any meaningful sense of the word
07:49:15 <opqdonut> relying on hotspot inlining works out ~ok~
07:49:26 <kuribas> lortabac: how can the jvm segfault?
07:49:44 <opqdonut> tdammers: TBH most clojure code I see is fairly functional, preferring pure functions operating on persistent data
07:49:46 <abastro> Oh, scala is fast enough in practive, I see
07:50:00 <abastro> s/practive/practice
07:50:23 <tdammers> opqdonut: you can't even make sure that a clojure "function" is pure to begin with - the whole thing is so dynamic that whether a "function" is pure or not depends on the arguments you pass
07:50:25 <kuribas> opqdonut: but referential transparency also doesn't mean much in clojure, since it's fairly impossible to understand a function without context.
07:50:39 <abastro> It is strange how Scala reports v slow speed in competitive sites now
07:50:43 <kuribas> opqdonut: due to the "everything is a hashmap" approach.
07:50:54 <lortabac> kuribas: no idea, you can try the benchmark yourself, it was the right-associative (non tail-recursive) sum of all the naturals from 0 to 1000000
07:51:10 <abastro> Like, Scala is reported as 10 times slower than other languages in most algorithm problems
07:51:18 <opqdonut> kuribas: that depends on how you write your code, it's possible to write clear clojure code, and to document your huge hashmaps with libraries like schema or malli
07:51:22 <tdammers> so judging whether a function is pure or not requires that you take its entire implementation into account, and the entire context in which it is called, which is pretty much the same as in Python, C, or literally any other language without built-in FP support
07:51:41 <opqdonut> kuribas: tdammers: but for sure, clojure merely enables functional programming, it doesn't really enforce it
07:51:54 <tdammers> opqdonut: it "enables" it about as much as Python does
07:51:56 MajorBiscuit joins (~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e)
07:51:59 <opqdonut> I think FP is a bit more than "your language tags functions as pure/impure"
07:52:10 <abastro> Haskell merely enables functional programming, it doesn't enforce it if you use IO liberally
07:52:15 <opqdonut> tdammers: accidental mutation is all over the place in python, never a problem in clojure
07:52:20 <abastro> Wait what I said doesn't work meh
07:52:46 <tdammers> opqdonut: "never a problem"? my experience was different, in horrible horrible ways
07:52:48 <kuribas> opqdonut: yeah, but it is typically only used at boundaries, like database, or REST API. So in order to know which type is being passed to a function you need to trace it back in the code.
07:52:53 <maerwald[m]> abastro: whether you use IO or not has nothing to do with "functional"
07:53:10 <kuribas> opqdonut: until eventually you arrive at a REST API call, where it has a malli schema.
07:53:13 <opqdonut> tdammers: fair enough. it's definitely possible to write horrible code in any language
07:53:25 <tdammers> granted, clojure makes it easier to be diligent, but you still depend 100% on manual diligence
07:53:48 <opqdonut> kuribas: naming, docs, giving malli schemas to functions all help
07:53:54 <opqdonut> but it is dynamic programming in the end
07:54:05 <abastro> maerwald[m]: Yep, I momentarily failed to see that
07:54:21 <abastro> Well what if you use unsafeInterleaveIO liberally tho
07:54:22 <opqdonut> and it's fine to have a problem with dynamic programming, I don't love it either, but saying "Clojure isn't actually a functional language in any meaningful sense of the word" is just bull
07:54:23 <kuribas> opqdonut: but then, don't you get a huge performance penalty, because all those functions need to check the type at runtime?
07:55:01 <abastro> I think clojure counts as FP since Lisp is FP
07:55:02 <opqdonut> a) the penalty might not matter b) you can switch off the validations in production (at least for plumatic schema, probably for malli as well)
07:55:16 <tdammers> what FP means to me is "programming with functions", and in order to qualify as a "functional language", it needs to have "functions" as a language feature. clojure does not; it only has "procedures", and if you are diligent enough, you can use them to implement functions, but the compiler doesn't care about the difference, and doesn't help you with it in any way
07:55:20 <kuribas> abastro: lisp is multi paradigm. But not particularly functional.
07:55:47 <kuribas> tdammers: but following your definition, neither ML, ocaml, or scala is functional.
07:55:52 <opqdonut> tdammers: see, if you would've said "Clojure isn't actually a functional language in _my_ sense of the word" I would've agreed
07:56:00 <opqdonut> but you said "any meaningful sense"
07:56:14 <abastro> Lisp is multi paradigm but many places do consider lisp as FP
07:56:27 <kuribas> opqdonut: I find referential transparency one of the most important features of FP, and clojure just isn't referentially transparent.
07:56:28 <tdammers> well, OK, but what's a definition of "functional programming language", then, that distinguishes Clojure from, say, JavaScript, or C, or Python?
07:56:40 <siers> there's nothing more fulfilling than a debate about semantics early in the morning
07:56:50 <abastro> kuribas: So only haskell is FP then?
07:57:02 <abastro> Wait, you said "one of the most important features"
07:57:20 <opqdonut> tdammers: to me, functionality is a feature of the code, and a language is functional if the idiomatic way of programming is functional, and that's certainly true for clojure
07:57:23 <abastro> How I understand it is that, it is not strictly necessary for FP
07:57:36 <opqdonut> kuribas: referential transparency is a spectrum, GHC Haskell isn't referentially transparent either
07:57:41 <kuribas> abastro: I'd say more precicely, lisp allows you to program in a FP style. But most common lisp programs are pretty imperative.
07:58:03 <abastro> Welp true, but many ppl just say "code web server in lisp" when I talk about FP
07:58:04 <tdammers> opqdonut: a lot of clojure code I've come across, including a lot of code that is considered perfectly "idiomatic", isn't functional at all
07:58:09 <opqdonut> it's nice to program in an architecture where things (apart from well known exceptions) are referentially transparent _enough for the use case_
07:58:30 <abastro> "Code an actual web server then talk about it, otherwise we'll just regard it as toy"
07:58:36 <tdammers> IME, idiomatic clojure puts a lot of emphasis on "immutable data structures", but completely ignores all other effects
07:58:50 <abastro> I mean "Actual web server in common lisp"
07:58:55 <opqdonut> tdammers: for sure
07:59:03 <tdammers> abastro: people have done that just fine, what's the problem?
07:59:07 <opqdonut> still more functional than your typical python code
07:59:26 <tdammers> opqdonut: oh yes; python is outright hostile towards FP
07:59:40 <abastro> Many ppl say to "me" that I need to be able to code in common lisp to talk about FP
07:59:43 <tdammers> I think Guido did it on purpose
08:00:03 <abastro> I know, it is just dumb comment. Yet it shows that many ppl think Lisp is quite close to FP
08:00:05 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
08:00:20 <abastro> (Lots of languages are multi-paradigm anyway. Even OCaml has objects)
08:00:41 <tdammers> Lisp is definitely worth learning, but the mind-blowing thing about it is not FP, but the whole "homoiconicity" thing
08:00:45 <kuribas> opqdonut: clojure simply isn't referentially transparent at all.
08:01:14 <kuribas> opqdonut: like, on the spectrum, it's more "not transparent" than transparent.
08:01:17 <tdammers> What Lisp, and especially Scheme, beautifully demonstrates is how you can build a full-blown general purpose language on top of a ridiculously small core
08:01:25 <abastro> How I understand it is that homoiconicity allows FP-esque programming
08:01:32 <tdammers> no, not at all
08:01:45 <abastro> Other things allow FP programming as well
08:01:49 <tdammers> homoiconicity allows the "meta" level to collapse
08:01:51 <abastro> But homoiconicity does, too
08:02:07 <tdammers> nope. you can program functionally in a Lisp without macros just fine
08:02:11 <abastro> s/allow/enables
08:02:38 <abastro> Though doesn't standard FP idioms implemented in macros
08:02:47 <abastro> Actually I thought nearly everything in lisp was macros
08:03:18 ccntrq joins (~Thunderbi@2a01:e34:eccb:b060:de80:e6ed:5bb7:2742)
08:03:29 <tdammers> in practice, yes, a lot of things in lisp are implemented as macros
08:03:34 <timCF> Hello! I have a strange problem with leaking memory in my program. It definitely leaks somewhere in http2-client-grpc code, and I can reproduce it with simple program which polls gRPC endpoint without timeout, and I see memory growth like 2Mb/Sec in task manager. But at the same time, I've tried to profile program memory with all kinds of flags, and output diagram shows very normal constant memory usage by
08:03:35 <opqdonut> kuribas: I find the level of referential transparency in _my codebases_ is still very useful compared to python/js
08:03:37 <tdammers> but that's not what enables FP
08:03:40 <timCF> functions and proccesses. Any ideas why memory leak is not shown in profiler output, and how I can find the leak then?
08:03:45 <timCF> Hello! I have a strange problem with leaking memory in my program. It definitely leaks somewhere in http2-client-grpc code, and I can reproduce it with simple program which polls gRPC endpoint without timeout, and I see memory growth like 2Mb/Sec in task manager. But at the same time, I've tried to profile program memory with all kinds of flags, and output diagram shows very normal constant memory usage by
08:03:51 <timCF> functions and proccesses. Any ideas why memory leak is not shown in profiler output, and how I can find the leak then?
08:04:03 <opqdonut> kuribas: but it's hard to separate experiences with languages from experiences with codebases
08:04:07 × BlackboardN_ quits (~Blackboar@user/BlackboardN) (Ping timeout: 256 seconds)
08:04:58 <timCF> sorry, accidentaly sent message twice
08:05:07 <kuribas> opqdonut: the culture of clojure is not, "let's write this function so I can understand it", but "let's write this function so I can mess around with it in the REPL".
08:05:34 <abastro> tdammers: Well, I think it would be harder to implement those concepts in lisp without FP.
08:05:42 BlackboardN joins (~Blackboar@user/BlackboardN)
08:05:48 <opqdonut> kuribas: I won't contest that
08:05:51 <abastro> All this wordings and classifications are quite tiring tbh
08:05:58 Codaraxis joins (~Codaraxis@user/codaraxis)
08:07:39 dextaa_54 joins (~dextaa@user/dextaa)
08:07:51 <kuribas> opqdonut: it's not wrong in itself, it just doesn't feel like it follows the FP ideal of making abstractions on top of abstractions.
08:10:45 <abastro> Hm, is Clojure still closer to FP than Common Lisp
08:11:03 <abastro> (Btw why some FP servers have common lisp channels)
08:11:23 <kuribas> abastro: well, yes :)
08:12:00 bahamas joins (~lucian@86.120.77.115)
08:13:37 mattil joins (~mattil@helsinki.portalify.com)
08:13:46 <tdammers> Well, Lisp was originally conceived as a didactic vehicle, a thought experiment designed to illustrate how Lambda Calculus is enough, in theory, to make for a Turing-complete programming language. The first implementation was famously made by a student, based on the professor's comment that all it would take to make a Lisp interpreter would be to implement the `eval` function, which the student
08:13:48 <tdammers> mistook for a homework assignment.
08:14:15 <merijn> tdammers: naah
08:14:23 <tdammers> well, that's how the legend goes
08:14:32 <merijn> tdammers: The first implementation was made by a grad student of McCarthy
08:15:01 <abastro> "Mistook for a HW assignment" LMAO
08:15:03 <merijn> not by accident, but because he was collaborating on the research of McCarthy and was like "man, I bet I can implement this"
08:15:05 <abastro> What a legend
08:15:17 <abastro> So that is HW assignment then
08:15:17 <merijn> abastro: That did actually happen in statistics once
08:15:46 <abastro> Perhaps they might actually have considered it as an assignment for practicing their field
08:16:08 <abastro> Why is lisp quite far from lambda calculus now tho?
08:16:30 × napping quits (~brandon@65.128.49.110) (Quit: leaving)
08:16:38 × lawt quits (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9) (Ping timeout: 260 seconds)
08:16:38 <tdammers> is it?
08:16:46 <merijn> tdammers: Perhaps you're mixing up your lisp origin story with Dantzig? :p
08:16:51 gehmehgeh joins (~user@user/gehmehgeh)
08:17:13 <tdammers> merijn: ah yes, that might be it
08:17:39 <merijn> because Dantzig did mistake two open statistics problems for homework and solve them as a student, and that story is well documented :p
08:18:03 <merijn> because he overslept and was late for a lecture xD
08:18:42 <abastro> Wow, how could one mistook problems for HW and solve it
08:19:00 <abastro> Like I cannot comprehend that level of genius
08:20:06 Psybur joins (~Psybur@c-76-123-45-25.hsd1.va.comcast.net)
08:20:40 <tdammers> lesson learned: sleep is more important than punctuality
08:21:07 <abastro> Being genius is the most important but anyway
08:23:08 <kuribas> abastro: I also think current functional language wouldn't be efficient on hardware of 50 years ago.
08:23:25 ubert1 joins (~Thunderbi@p200300ecdf1588eb09611d41de6fd446.dip0.t-ipconnect.de)
08:23:25 <abastro> Hmm.
08:23:31 <kuribas> abastro: lisps imperativeness may have been necessary in that day.
08:23:52 <abastro> Perhaps imperative programming was an unfortunate path due to performance limitation
08:24:16 <abastro> I heard that initially, the memory used to be the bottleneck. Even.
08:24:34 <abastro> I cannot imagine such world..
08:24:56 __monty__ joins (~toonn@user/toonn)
08:26:41 <kuribas> abastro: never programmed an arduino? :)
08:27:19 <kuribas> bottleneck as in speed bottleneck?
08:27:35 <kuribas> memory is still a bottleneck.
08:27:49 <kuribas> A cache miss can cost hunderds of cycles.
08:28:14 × cosimone quits (~user@93-47-228-79.ip115.fastwebnet.it) (Remote host closed the connection)
08:28:23 merijn mumbles something about roofline analysis
08:28:54 lawt joins (~lawt@2601:200:8200:6870:dea6:32ff:fea1:adf9)
08:29:06 <kuribas> and hundreds of cycles still aren't much compared to network or disk latency.
08:30:00 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
08:31:00 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:31:42 zaquest joins (~notzaques@5.130.79.72)
08:33:22 <abastro> Bottleneck as in, size bottleneck
08:33:46 <abastro> Memory access speed is problematic, indeed, but that is less unfavorable to FP
08:34:01 <abastro> Hard limit on memory usage, that's a stopper
08:34:19 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
08:34:55 <kuribas> http://www.ulisp.com/
08:37:27 cosimone joins (~user@93-47-228-79.ip115.fastwebnet.it)
08:40:53 × cdman quits (~dcm@user/dmc/x-4369397) (Remote host closed the connection)
08:41:26 cdman joins (~dcm@27.2.216.95)
08:41:27 × cdman quits (~dcm@27.2.216.95) (Changing host)
08:41:27 cdman joins (~dcm@user/dmc/x-4369397)
08:42:10 × kuribas quits (~user@ptr-25vy0i7lyxwuflpbsmc.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
08:47:38 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 260 seconds)
08:49:36 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 268 seconds)
08:55:06 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
08:55:39 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
09:02:55 <vaibhavsagar[m]> Axman6: I fixed my HAMT visualiser https://plume-quokka.glitch.me/
09:03:55 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
09:05:23 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
09:05:50 × kaph quits (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Ping timeout: 246 seconds)
09:06:26 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
09:06:30 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
09:07:15 × littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
09:14:41 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
09:15:22 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
09:22:17 × bahamas quits (~lucian@86.120.77.115) (Ping timeout: 268 seconds)
09:29:20 michalz joins (~michalz@185.246.204.104)
09:31:31 littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
09:31:49 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
09:32:11 littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
09:32:28 × littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Client Quit)
09:32:39 × asthasr quits (~asthasr@208.80.78.154) (Quit: asthasr)
09:36:17 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
09:37:47 <abastro[m]> Is there good monad tutorial written in JS? I might want to see how near complete beginners act to it
09:39:14 <merijn> abastro[m]: Doubtful
09:39:38 <abastro[m]> Oh no :(
09:39:38 <merijn> It's like trying to write one in python. You're gonna be missing 90% of the things that make the abstraction useful and nice
09:40:18 <abastro[m]> I think in this channel, I heard of monads being used in other languages
09:40:46 <merijn> You really need some form of typesystem and (ideally) something like typeclasses to get real value from
09:41:06 <abastro[m]> And I was given with https://tomstu.art/refactoring-ruby-with-monads as well
09:41:09 <merijn> So you're gonna mostly see it used in language that are a lot like Haskell
09:41:34 <abastro[m]> Then how is the tutorial written in ruby?
09:41:51 <abastro[m]> Someone here recommended it iirc
09:42:01 <merijn> abastro[m]: The problem is that you can only write code using a *specific* "and_then"
09:42:10 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
09:42:14 × belphegor666 quits (~satan@user/belphegor666) (Quit: WeeChat 3.4)
09:42:23 <merijn> abastro[m]: Much of the usefulness of the Monad class is that you can write generic code that works for any instance of Monad, not just one
09:43:37 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
09:43:57 <abastro[m]> I know, but still, someone made use of it in other languages
09:44:16 <abastro[m]> Like, `and_then` even exists in many other langs as well
09:44:28 belphegor666 joins (~satan@ip-046-223-003-068.um13.pools.vodafone-ip.de)
09:45:03 <kritzefitz> merijn: Do you really need typeclasses for Monads to be useful as an abstraction? I'd imagine that duck typing would be sufficient for the job in languages like Python.
09:45:04 × belphegor666 quits (~satan@ip-046-223-003-068.um13.pools.vodafone-ip.de) (Changing host)
09:45:04 belphegor666 joins (~satan@user/belphegor666)
09:45:06 × chomwitt quits (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32) (Read error: Connection reset by peer)
09:45:19 chomwitt joins (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32)
09:46:13 <merijn> kritzefitz: Yeah, but then reasoning about stuff like lawfulness becomes a PITA
09:46:17 <abastro[m]> Right, you could have verbal contract on that
09:46:42 <abastro[m]> In haskell we still have verbal contract about laws without enforcement
09:48:11 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
09:51:32 <[exa]> kritzefitz: without type inference it's actually pretty hard to avoid having to explicitly carry the type duck to each "leaf" expression
09:53:14 <kritzefitz> [exa]: I'm not sure what you by “type duck”.
09:54:13 <[exa]> the type of the monad that should be executed. If you'd type >>= somewhere in a completely abstract python function (say `traverse`), how does it know whether it should do Maybe or State?
09:55:11 × Raito_Bezarius quits (~Raito@2a01:e0a:5f9:9681:a0a0:bb76:611f:9da7) (Ping timeout: 252 seconds)
09:55:27 <kritzefitz> merijn: Fair.
09:56:08 <abastro[m]> Maybe calculate type explicitly?
09:56:08 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
09:56:15 <[exa]> (with >>= it could technically take the type from the left argument, but what do you do with `return` ? :D )
09:56:17 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
09:56:58 <kritzefitz> Ah, yes. return is a problem. I see what you mean now.
09:57:15 <abastro[m]> Handle Polymorphic type in runtime
09:58:03 <[exa]> anyway I'd certainly love to have some reasonable encoding of the monads into other languages but languages without inference just becomes insanely clumsy
09:58:07 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
09:58:25 <[exa]> last time I tried was in Julia, they have this "workaround" even implemented in Monads.jl and I didn't like it
09:59:34 <[exa]> as in, "chances to run parsec: 0"
10:00:36 <abastro[m]> I mean, still non-full-fledged monads could be useful
10:01:48 <[exa]> they have an ad-hoc specified implicitly defined implementation of half of IO, does that qualify? :]
10:02:33 × swistak quits (~swistak@185.21.216.141) (Ping timeout: 256 seconds)
10:05:03 abastro joins (~abab9579@143.248.229.217)
10:05:29 <abastro> Half of IO?
10:05:59 <abastro> Wait how is IO ever practical outside of haskell
10:07:19 <merijn> abastro: In any other purely functional language with a strong type system? :p
10:07:20 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
10:07:28 <[exa]> abastro: it's not, it was an iMpEraTiVE rEfEreNCe
10:07:30 <merijn> It's not too hard to imagine something like Ocaml with IO
10:09:21 <abastro> Haha imperative reference of IO
10:09:30 swistak joins (~swistak@185.21.216.141)
10:09:54 <abastro> Hm actually yeah it might make sense in langs with very strong FP culture with strong type system
10:11:30 <abastro> Anyway, so which mainstream language would be suitable to introduce monads for junior devs
10:13:10 <merijn> "haskell"
10:13:11 × CiaoSen quits (~Jura@p200300c957311e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
10:13:44 <abastro> > Me: Mainstream Programming Language
10:13:46 <lambdabot> error:
10:13:46 <lambdabot> • Data constructor not in scope: Me
10:13:46 <lambdabot> • Perhaps you meant one of these:
10:13:49 <abastro> > You: "haskell"
10:13:50 × random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed)
10:13:50 <lambdabot> error:
10:13:50 <lambdabot> Data constructor not in scope: You :: Char
10:14:10 acidjnk joins (~acidjnk@p200300d0c7049f07a51ab7ce4c98e594.dip0.t-ipconnect.de)
10:14:17 × deadmarshal_ quits (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds)
10:14:55 <[exa]> abastro: lambdabot thinks you err with that evaluation. :]
10:15:08 mc47 joins (~mc47@xmonad/TheMC47)
10:15:10 <abastro> Welp anyway
10:15:27 <tdammers> a monad abstraction in an untyped language is about as useful as classes in Python or PHP
10:15:40 <abastro> I usually don't say sth is mainstream programming language unless it is on the top 10~20
10:16:05 <abastro> I've seen ppl using classes daily in Python
10:16:23 dyeplexer joins (~dyeplexer@user/dyeplexer)
10:16:35 <tdammers> yes, I know. I don't mean "don't use classes in Python", I mean "Python would be better if it had an OOP system that doesn't depend on classes"
10:16:47 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
10:16:59 <abastro> So you mean, still quite useful
10:17:13 <tdammers> from an ergonomics perspective, classes in an OOP language are useful because they allow for static checks; but Python doesn't do static checks anyway
10:17:36 <abastro> Prototype OOP exists though.
10:17:40 <abastro> Oh wait
10:17:45 <merijn> abastro: I mean, my girlfriend's first language was Haskell. It's fine for beginners :)
10:17:48 <abastro> You said classes
10:18:00 <tdammers> so when I say foo.save() in Python, then the class of foo is completely irrelevant, all I care about, and all the interpreter checks for me, is whether foo has a .save() method, and that check happens at runtime, just before the call is made
10:18:06 akegalj joins (~akegalj@93-138-67-213.adsl.net.t-com.hr)
10:18:19 <abastro> <del>You have a girlfriend? Wat</del> I mean, it's not good for every beginners at least
10:18:23 <siers> merijn, it's way easier, if you don't have to think about mutation :)
10:18:31 <[exa]> btw the last time I checked TIOBe popularity index, VisualBasic was in top 10 and MATLAB in top 20
10:18:45 <abastro> Yep, VB is somewhat fine
10:18:45 <tdammers> and in fact, this kind of "duck typing" is considered idiomatic; so why bother with classes and class inheritance? it just complicates matters, and it doesn't really buy you anything
10:18:52 <merijn> [exa]: TIOBE metrics are so wrong it's laughable
10:18:58 <abastro> Tho in this case, I need something within top 5
10:19:03 <merijn> [exa]: It's like "search engine folume" levels of accurate
10:19:09 <merijn> s/folume/volume
10:19:15 <siers> I taught my girlfriend scala though, because syntax has more carry over to other languages, but maybe that's not much of a biggie
10:19:17 <tdammers> (it's just that JavaScript's version of prototype-based OOP has scarred generations of programmers...)
10:19:32 <tdammers> merijn: found the Dutch guy!
10:19:45 <siers> it's obvious by the ij already anyway :)
10:20:07 <siers> (and he's mentioned it a number of times here, but never mind that :P)
10:20:10 <abastro> i.e. one of Java, JS, Python, Go
10:20:28 <[exa]> merijn: omg, I never checked how they do it but this is really laughable. :D
10:20:55 <tdammers> fwiw, there is no way one can measure "programming language popularity" in a meaningful way
10:21:01 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
10:21:16 <abastro> Well, still, like there are most common 5~10 languages
10:21:23 <abastro> where Java, JS, Python, Go would always be in
10:21:37 <abastro> (Maybe there is one more I forgot but anyway)
10:22:09 <tdammers> I'm pretty sure there is still vastly more C code running in production than Go code
10:22:22 <abastro> I forgot C. Yes.
10:22:23 <abastro> Apparently
10:22:24 <abastro> Lmao
10:22:42 <abastro> Java, JS, C, Python, C++, then Go
10:22:53 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
10:22:55 <tdammers> but really, the whole thing already breaks down when you attempt to quantify "use of a programming language"
10:22:58 <abastro> (and I thought I quite like C..)
10:23:04 <[exa]> abastro: there's likely more PHP code than Go code
10:23:14 <[exa]> (also rust code)
10:23:22 <abastro> Oh, one good thing is that I do not need to see PHP code in my neighborhood
10:23:29 <abastro> It was abolished in my country
10:23:37 <abastro> So that's an accomplishment
10:23:38 <[exa]> splendid!
10:23:46 <tdammers> e.g., PHP has massive usage on the public internet, but 90% of it is wordpress, joomla, and drupal, i.o.w., millions of copies of the same codebases
10:23:48 <abastro> Well, instead we have more Java tho
10:23:55 <abastro> Still, might be better
10:24:05 <abastro> betteer than PHP, I mean
10:24:17 × KaitoDaumoto quits (Frat@user/kaitodaumoto) (Remote host closed the connection)
10:24:50 <tdammers> that's not a high bar to clear
10:24:58 <abastro> XD
10:25:29 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 248 seconds)
10:25:39 <abastro> Anyway, the junior devs I know would only accept Java, JS, C, Python, Go
10:25:56 <tdammers> "junior dev" kind of implies that what you "accept" is irrelevant
10:26:04 <abastro> They are not so fond of cognitive overhead by learning complex languages
10:26:10 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:26:12 <tdammers> the "junior dev" deal is usually "here's what we use, learn it"
10:26:28 <abastro> Yep, but I mean, I am not a senior dev teaching junior devs
10:26:35 <abastro> It's just that I know of a few junior devs
10:26:46 <abastro> And just want to see the reaction towards the concept of monads
10:27:02 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 246 seconds)
10:27:17 <abastro> If I were paying them, ofc they would learn I guess XD
10:27:18 <tdammers> also: Python is very complex, and among the most difficult programming languages I have worked with (though PHP easily beats it out of the water)
10:27:27 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
10:28:02 <tdammers> "Monad" is actually a very simple concept. It is not complexity that baffles people when they encounter it; the problem is that 1) it is very abstract, and 2) it is usually taught completely wrong.
10:28:03 <abastro> This kind of junior devs will only learn what would help them get a job
10:28:08 × alp_ quits (~alp@user/alp) (Ping timeout: 260 seconds)
10:28:21 <abastro> You know, ppl do not have quite a leeway in life
10:28:27 × timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving)
10:28:42 <abastro> Yea, so that's why I am trying to avoid giving wrong impression
10:28:51 <abastro> I just want to see in what way they would dislike the concept
10:29:01 <tomsmeding> tdammers: Python is a simple language compared to Haskell. However, using it for complex software is harder if you are used to being helped by a type system.
10:29:29 × xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 246 seconds)
10:30:08 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
10:30:30 <tomsmeding> a common pattern among people in general is that they like most what they already know; then if someone is willing to do a bit of learning, of course they are going to prefer something for which it is easy to learn the rules
10:30:32 geekosaur joins (~geekosaur@xmonad/geekosaur)
10:30:53 <abastro> Yeah
10:30:54 <tomsmeding> see also: most people using VSCode instead of vim/emacs
10:31:13 <abastro> I use VSCode because of UI tho
10:31:13 <tomsmeding> though that does have some confounding factors like MS support
10:31:20 <tomsmeding> and UI I guess?
10:31:24 <abastro> Yes, UI
10:31:40 <abastro> I just cannot get rid of this like towards UI
10:31:44 <tdammers> I don't think Python is simpler than Haskell from a user perspective. Sure, *implementing* it is a lot simpler, because you don't need a type checker or anything, but in order to *use* Python, you need to understand more concepts than to use Haskell. Or at least that's my personal impression, I haven't actually done any rigid research on the subject.
10:32:03 <tdammers> And yes, "simple" and "easy" are different things.
10:32:04 <abastro> I mean, ppl learn python much easier
10:32:06 <tomsmeding> tdammers: what more concepts do you need to understand to use python than to use haskell?
10:32:15 <tomsmeding> (roughly, example-wise)
10:32:52 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:32:54 seydar joins (~seydar@pool-108-31-245-5.washdc.fios.verizon.net)
10:33:34 <tomsmeding> the rules of Go are easier to learn than the rules of Agricola, however arguably it's harder to really understand Go than to really understand Agricola
10:33:42 <tomsmeding> Python is Go; Haskell is Agricola
10:33:49 <tdammers> well, there's a bit more magic in Python - magic functions like __init__ and all that, generators, annotations, various string formatters, ...
10:33:57 <tomsmeding> okay the relative ratios are a bit skewed, but that idea
10:34:21 <tdammers> Python is probably subjectively easier though
10:34:27 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
10:34:30 <abastro> For ppl, it is easier to learn handful of general rules and loads of exceptions
10:34:44 <abastro> Like, they could memorize `__init__` as one of the exceptions
10:34:52 <abastro> Many ppl do better with concrete cases
10:34:53 <tomsmeding> good point about generators and annotations; string formatters don't count as that's just instances of "a library"
10:35:14 <tomsmeding> the magic functions are also all instances of "an automatic method call"
10:35:19 <siers> annotations are so ad-hoc
10:35:21 <tomsmeding> or operator overloading, I guess
10:35:42 <abastro> Annotations are poor man's declarative programming
10:35:49 <abastro> At least that is the impression I got in Java
10:36:01 <tomsmeding> annotations are nice syntax but ultimately so dumb
10:36:21 <tomsmeding> @f(xyz) def g(abc): ... ==== g = f(xyz)(lambda g(abc): ...)
10:36:21 <lambdabot> Unknown command, try @list
10:36:27 <tomsmeding> @botsnack
10:36:27 <lambdabot> :)
10:36:33 <siers> "@annotation; def f()... = ..." are "f = annotate $ rest of the fucking function"
10:36:40 <tomsmeding> that
10:36:48 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
10:36:49 <siers> and for that they had to invent a whole another syntax
10:37:00 <tomsmeding> because python doesn't have multi-line lambdas!
10:37:09 <tomsmeding> otherwise my rewrite rule would be generally applicable
10:37:18 × seydar quits (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
10:37:31 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
10:37:34 <siers> python the language makes my python sad :( 💩
10:37:51 <tomsmeding> even though it was named after an actual python
10:37:58 <tdammers> and let's please not talk about Python's scoping rules
10:38:02 <tomsmeding> lol
10:38:05 <abastro> You have a python?(snake?)
10:38:10 <siers> (and I'm trying to stay hard out here)
10:38:15 <tomsmeding> abastro: Guido has (had?) a python
10:38:17 <tdammers> wasn't Python (the language) named after Monty Python?
10:38:27 <abastro> Oh
10:39:09 <tomsmeding> hm then I misremember
10:40:09 <siers> .
10:42:33 <abastro> Well anyway, so which language among "Java, JS, C, Python, Go"
10:42:40 <abastro> To introduce monad concept
10:43:19 <siers> haskell 😅
10:43:51 <siers> ooh, ooh! scala
10:44:49 <abastro> I mean, that's not an option
10:44:56 <siers> for what it's worth, what others said about the necessity for a type system that can express the concept rings true to me
10:45:09 <abastro> They just shooked head when seeing any Scala code
10:45:20 <abastro> "How could anyone ever understand this"
10:45:28 <siers> do you really need to teach someone "monads"? if they're not in the language, you won't benefit from knowing them much
10:45:30 <tdammers> Monad doesn't buy you enough as an abstraction in any of these languages to pull its weight
10:45:38 <siers> well then you didn't break it down well enough
10:45:57 <abastro> Well, I just wanted to see their reactions
10:46:12 <tdammers> also: in order to properly understand the Monad abstraction, you first need to understand typeclasses and such
10:46:29 <siers> you can always shock someone by throwing gory, new syntax at anyone, that's not really an achievement
10:46:33 <abastro> I guess I shouldn't explain, then.
10:46:49 <abastro> I mean, I don't want shock
10:46:56 <opqdonut> the bind "design pattern" can be taught in e.g. JS and Java (promise.then / flatmap / whatever)
10:47:09 <opqdonut> but languages other than Haskell aren't really capable of expressing the Monad abstraction/library
10:47:10 <abastro> I want to see the distaste from its great complexity
10:47:20 <tdammers> what complexity
10:47:25 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
10:47:34 <siers> abastro, aha! you do want to shock them!
10:47:43 <abastro> No.
10:47:49 <tdammers> Monad really is just bind, return, and the Monad Laws. None of that is more complex than elementary school algebra.
10:48:03 <abastro> Elementary school algebra is quite complex to many.
10:48:07 <abastro> That is the point.
10:48:18 <siers> ok, well, what do you mean by wanting "to see the distaste" then?
10:48:35 <abastro> I mean, I just want to test, that was my expectation
10:48:52 <tdammers> Well, but if you find Monad "distastefully complex", then you must really hate multiplication.
10:48:58 <abastro> I expect them to show distaste from its complexity, as they are only used to anything so simple
10:49:22 <tdammers> class inheritance in Java is a lot more complex than the Monad abstraction, really
10:49:25 <abastro> Multiplication is not as complex as monad tho, like in most ways
10:49:32 <siers> that's not how you teach anything – by trying to connect with someone's distaste of complexity
10:49:43 <abastro> Good point, in fact, they dislike Java because they cannot wrap head around class inheritance
10:49:53 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
10:50:01 <abastro> No, I was not trying to teach them, because that is unrealistic goal
10:50:08 <abastro> Ofc if I could, it would be great
10:50:19 <siers> 👀
10:50:20 <abastro> Tho it is too unrealistic for that.
10:50:26 <tdammers> Again, Monad isn't complex at all. What makes it tricky to intuit is that, despite its utter simplicity, it is a very abstract and general concept, so it's hard to come up with a tangible intuition for it.
10:51:00 <abastro> I mean, yea, if you show sth like `a * b = b * a`, they will cower at its difficulty
10:51:01 <tdammers> Multiplication is easier that way: you can picture three piles of four marbles each, and visualize that as "3 x 4", and then you count the mental marbles and arrive at "12"
10:51:11 <abastro> Yep, exactly
10:51:34 <tdammers> And you can then rearrange those 12 marbles into four piles of 3, and thus intuit "a x b == b x a"
10:51:35 <abastro> I guess I conflated complexity with difficulty
10:52:12 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
10:52:16 <abastro> They just intuit `a*b = b*a`, but when they see the equation, they cannot stand the abstraction
10:52:19 <siers> tdammers, I'm no expert in the corresponding theory, but I've also landed at that — the bind type makes sense and is intuitive for all the concrete types, but I wouldn't try to claim I can give a good intuition about the general case :)
10:52:41 <tdammers> siers: exactly. (also see Diehl's "Eightfold Path To Monad Satori")
10:53:06 <siers> abastro, so what are you trying to do, if not teach?
10:53:20 <abastro> Just trying to give them a taste of monad
10:53:44 <[exa]> that's a very abstract taste
10:53:45 [exa] dodges
10:53:46 crazazy joins (~user@130.89.171.62)
10:54:00 <abastro> And see if they would really have difficulty at it.
10:54:02 <siers> yeah, it'll be an abstract case unless you teach them where they're powerful — in haskell or scala
10:54:16 <[exa]> abastro: anyway, throwing examples is best for building trust&intuition
10:54:18 <abastro> I see, so it would never be possible then.
10:54:29 <siers> well, maybe it would be
10:54:44 <siers> but if the type system didn't support it, would they be quite the same?
10:54:53 <abastro> They have hard time in front of folding function
10:55:19 <tdammers> there's also this thing called "problem-solution-ordering"
10:55:24 <[exa]> abastro: for monads the common explanatory topic is the burritos analogy, as in "my precious stuff is wrapped in some complexity and I want to write a program that sanely manages the complexity itself, leaving me with my simply looking code"
10:55:30 <tdammers> for effective teaching, you have to present the problem before the solution
10:55:46 <abastro> Well at least I am aware that burritos are not useful analogy :)
10:55:50 <tdammers> the Monad abstraction is a solution; in order to understand it, you have to first experience the problem it solves
10:56:02 <abastro> Ofc I am going to present the problem
10:56:05 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
10:56:09 <siers> tdammers, kind of obvious, but it's nice to see it put into words
10:56:13 <abastro> Wait.. they would not understand that it is problem :(
10:56:23 <tdammers> see, and that's why you won't be able to teach it
10:56:35 <abastro> They will forever think e.g. null check is simple enough
10:56:36 <abastro> Meh.
10:56:38 <tdammers> siers: not my words, unfortunately :D
10:56:52 <siers> I'll believe that, but that is not important :)
10:56:54 <[exa]> abastro: for that you can perfectly demonstrate Maybe/Either as "erroring complexity", lists as "multiple results complexity", IO as "ordering the stuff right complexity", HTML builders as "who carries the result out complexity" (blaze is cool!), parsecs as "who tracks what we are actually parsing complexity", and at that point it usually clicks
10:57:05 <tdammers> abastro: well, the Monad instance of Maybe is, if you squint a little, nothing more than a null checking framework
10:57:15 <abastro> Indeed
10:57:18 <tdammers> so there's a good start for a problem definition
10:57:25 <siers> re: Eightfold Path to Monad Satori
10:57:27 <siers> nice
10:57:28 <abastro> Tho they won't have hard time with null check themselves
10:57:36 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
10:57:38 <maerwald> the problems aren't so much monads, but what we did with them
10:57:54 <[exa]> maerwald: +1
10:57:55 <abastro> At least that is my impression when they love Go
10:57:57 <tdammers> null checks are fine, it's just that having to spell them out every time gets old quick
10:58:20 <tdammers> so we would like a framework that somehow makes null checking automatic, and warns us when we forgot a null check
10:58:29 <abastro> I can already expect their answer: "Explicit null check is great for readability"
10:58:42 <tdammers> is it, though?
10:59:01 <tdammers> it's great for readability when you have to rely on someone reading the code to make sure you have all the null checks in place
10:59:02 <abastro> It isn't, but for them, readability is what they can read :P
10:59:19 <tdammers> but what if you could outsource that work to the compiler?
10:59:21 <siers> "great for readability" is such a circlejerk, I am immediately reminded about all the pointless arguing over this. I have been traumatized
10:59:39 <[exa]> abastro: you need to sink the null checks into several layers of functions and loops before it becomes obvious that manual isn't the way
10:59:44 <abastro> Outsourcing the work makes it implicit
10:59:53 <abastro> So, they'd argue it hinders readability
10:59:55 <[exa]> abastro: craft your examples well! :]
10:59:59 <abastro> They want to see when it is actually done
11:00:22 <abastro> Well they would be fine with it I guess
11:00:23 <maerwald> https://paul.bone.id.au/pub/pbone-2016-haskell-sucks.pdf :p
11:00:35 <tdammers> "readability" means that the things you need to know in order to understand the code are explicit, and the things you can safely take for granted are not
11:00:41 <maerwald> although it goes only very shortly into the monad problem
11:00:50 <tdammers> in Java, you cannot take non-nullability for granted, so explicit null checks are a good thing
11:00:51 <abastro> Yep, I mean they don't understand true readability
11:01:11 <geekosaur> readability is in the eye of the reader
11:01:11 <maerwald> but: 1. monads don't compose and 2. transformers are a kludge for the lack of composability of monads
11:01:21 <abastro> Yep, readability is in the eye of the reader
11:01:30 <tdammers> but in Haskell, we can encode nullability in the type, and that makes null checks something we can take for granted - if a required check is missing, then the code will simply not compile
11:01:33 <abastro> Well, tho they say that Go code is usually readable by everyone
11:01:43 <abastro> Thus, Go is great for readability :tm:
11:01:56 <maerwald> abastro: depends
11:02:03 <[exa]> abastro: that's a cobol argument
11:02:04 <maerwald> slices can be very hard
11:02:12 <abastro> I am saying what they would be saying
11:02:16 <tdammers> also: there are some relatively objective metrics wrt readability, but most people focus too much on "familiarity"
11:02:21 <maerwald> every Go interview has something about slices
11:02:33 <abastro> Familiarity, yeah
11:02:37 <maerwald> because many Go devs don't understand them (thorougly)
11:02:41 <abastro> Go is centered towards familiar stuffs
11:03:18 <tdammers> Python syntax, for example, has some features that are objectively horrible for readability, such as making all sorts of different constructs (classes, procedures, conditionals) look similar
11:03:19 <abastro> Anyway, I'd say, Go is good for junior's readability
11:03:31 <maerwald> error handling in Go is extremely verbose
11:03:32 <abastro> That is, not so much to learn until being able to read
11:03:39 <tdammers> but people think of Python as "very readable", because it looks familiar to someone who doesn't have a lot of programming experience
11:03:58 <maerwald> also funny: https://www.innoq.com/en/blog/golang-errors-monads/
11:04:00 <abastro> I think Go would be similar case
11:04:06 <tdammers> Perl is much better in that regard - it makes maximal use of the available character set, and makes different things look maximally different
11:04:12 <abastro> Go is now taking that place of python at least
11:04:28 <tdammers> but Perl is considered hard to read by many, because it looks so unfamiliar
11:05:04 <maerwald> the only good thing about go is that their maintainers are *extremely* thorough and conservative about considering new features to the language and their impact
11:05:16 <maerwald> something that most don't have
11:06:24 <maerwald> but that also means they're still discussing whether ADTs are sensible
11:06:35 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
11:06:50 <abastro> Well I think ADT would not be sensible in their OOP-oriented eyes
11:07:01 <maerwald> OOP?
11:07:11 <maerwald> go is a procedural language
11:07:23 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
11:07:26 <abastro> I heard Go has this `interface` thing
11:07:34 <maerwald> that hardly makes it OOP
11:07:37 <tdammers> "interface" isn't object-oriented
11:08:13 <tdammers> IMO, "OOP" requires the ability to have open-recursion inheritance
11:08:41 <abastro> Oh
11:08:52 <tdammers> that is, when an object calls a method of itself, even from within an inherited method, the method call is resolved dynamically, based on the actual runtime object, not the lexical type by which it is accessed
11:09:46 <abastro> I see.
11:10:02 <tdammers> without open recursion, an "object" is really just a record of procedures
11:10:13 <tdammers> or a record, where some fields may be procedures
11:10:43 <abastro> Hmm
11:10:53 <tdammers> which is of course a very useful thing to have, but it's not a new paradigm, people do this in procedural and functional code all the time
11:11:03 <abastro> Then I guess they would put ADT at similar level of OOP
11:11:13 <abastro> I do think they would be more eager to accept OOP than ADT
11:11:38 × jgeerds quits (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 252 seconds)
11:11:42 <maerwald> Go devs are concerned about the simplicity of their compiler implementation. Something we don't have in Haskell :p
11:11:46 DNH joins (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898)
11:12:12 <maerwald> so when they discuss features, it's also a discussion about whether that can even be implemented without significant increase in implementation complexity
11:13:03 <maerwald> It's a controversial stance... because I'd rather have complexity in the compiler than in my program. But yeah, someone has to maintain the compiler too.
11:13:46 <abastro> Yeah
11:13:55 boxscape_ joins (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de)
11:14:07 <abastro> Also increasing complexity budget does not lead to great consequences
11:14:36 <maerwald> I think it would be fascinating to marry some of the principles of the Haskell language with the pragmatism of the Go community. I don't think there is any such language/community, yet.
11:14:55 <tdammers> maerwald: I've been thinking about this a bit myself
11:15:14 <abastro> Wish it were possible
11:16:25 <abastro> Btw, back to monads.. So I should not let them know about monads right?
11:17:23 <abastro> Maybe, I should avoid trying to get them touch some concepts of FP
11:17:28 <abastro> as that would also be difficult for them
11:17:39 <maerwald> tdammers: I think the only way I can see this work is with a *set* of languages, that are even more interoperable than C#/F#/F*. So you can have some really fancy DT based stuff that's used by the maintainers of e.g. tls, but compiles to a more boring API.
11:19:26 <abastro> <del>Compiles to JVM?</del>
11:21:21 <boxscape_> I'm using mtl, and my main monad is just State at the moment. But I'm also using MonadWriter locally. Now I'd like to add another writer to the main monad, but of course I can't do that because of the functional constraint on MonadWriter. I was thinking maybe I'll just add it to the state, is there a better way?
11:21:35 <maerwald> abastro: no, F* compiles to actualy F# code (or OCaml code)
11:22:34 <maerwald> but now you're maintaining two (or three) compilers :D
11:22:38 <maerwald> so it isn't for free
11:22:42 <abastro[m]> I mean, more interpperable than C# etc -> use JVM
11:23:56 <maerwald> The problem in Haskell is, you cannot opt out of API complexity. If someone thought it's probably cool to express all of this stuff with type families, you're going to deal with it too.
11:25:17 <maerwald> So the ergonomics and image of the language is often dictated by the upper 10% of features. Because they will be used somewhere.
11:26:13 <abastro[m]> True
11:26:14 × abastro quits (~abab9579@143.248.229.217) (Ping timeout: 268 seconds)
11:26:17 <maerwald> transpiling is one solution to this
11:26:54 <abastro[m]> How about transpiling to JVM
11:27:16 <geekosaur> JVM still has some weaknesses when it comes to Haskell-like code
11:27:47 <abastro[m]> Oh, bigger weakness than .NET?
11:28:00 <geekosaur> I think it'sonly just getting tail calls?
11:28:06 <boxscape_> there's both frege and eta as Haskell for the JVM, though I think neither are being actively developed
11:28:14 <geekosaur> which are used heavily by STG
11:28:23 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
11:28:38 <geekosaur> CLR is indeed a lot friendlier
11:29:31 <maerwald> I mean, typescript is such a success story, partly because it's opt-in imo. You can still have your insane js spaghetti if you like.
11:29:57 <tdammers> but opt-in also means that the benefits you get from types are marginal
11:30:02 <abastro[m]> Hmm, CLR
11:30:18 <boxscape_> at least typescript has the --strict flag
11:30:20 <abastro[m]> Then maybe, gradual typing is the future
11:30:23 <maerwald> tdammers: well, you can use the types too, but then you gotta write typescript
11:30:57 <tdammers> maerwald: but if you're using an untyped library that you don't control, then the type guarantees pretty much end at the API boundary
11:31:00 <abastro[m]> Wait, haskell does not mesh well with any imperative code though
11:31:14 <tdammers> abastro[m]: it actually meshes surprisingly well
11:31:14 <abastro[m]> So it would be hard to have the middleman language
11:31:26 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:31:35 <tdammers> FFI-ing C code into Haskell is, IME, easier than into most OOP languages
11:31:35 <abastro[m]> I mean, you frequently need IO to connect to those
11:31:40 <merijn> abastro[m]: What makes you say that?
11:31:40 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:31:42 <merijn> abastro[m]: So?
11:31:45 <maerwald> tdammers: I'm more thinking about the F* vs F# difference. Both have strong types, but only one has refinement/dependent types.
11:31:47 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:31:59 <maerwald> It's your choice at which complexity level you want to work.
11:32:02 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:32:02 <tdammers> maerwald: I must admit I am not familiar with either of them to any meaningful degree
11:32:10 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:32:14 <merijn> abastro[m]: I fail to see how "you need to use IO" and "does not mesh well" are related
11:32:19 <abastro[m]> The strong typing is going to have struggle with the system
11:32:23 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:32:31 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:32:35 <abastro[m]> I mean, this means littering IO in the codebase
11:32:43 <abastro[m]> Which fairly many ppl dislike
11:32:44 <maerwald> tdammers: so let's say you write a superset language of Haskell with dependent types that compiles back to haskell. So you can provide two APIs.
11:32:46 <merijn> "litter" implies something bad
11:32:47 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:32:47 <AndreasK> If the C FFI function can be treated as a pure mapping from input to output one doesn't even need IO
11:32:53 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:33:07 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:33:11 <tdammers> abastro[m]: it's just making the littering of effects explicit
11:33:15 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:33:15 <boxscape_> abastro[m] the usual idea is to only use IO where it needs to be, but that also means using IO where you do need it is fine
11:33:23 <tdammers> abastro[m]: which, according to how you described the target audience, should be seen as a good thing
11:33:28 ChanServ sets mode +o litharge
11:33:29 litharge sets mode +b *!*@98.38.249.169
11:33:29 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:33:32 <merijn> abastro[m]: Over focussing on avoiding IO and acting like IO is bad is a rather common thing many beginners do. In practice I fail to see the problem. Some things just involve a lot of IO
11:33:37 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:33:39 litharge sets mode -o litharge
11:33:52 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:33:54 <geekosaur> hm
11:33:58 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:34:01 <abastro[m]> Yea, I thought ppl does not make extreme use of FFI because of the purity barrier
11:34:12 <tdammers> that is not true
11:34:12 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
11:34:16 <tdammers> there is no "purity barrier"
11:34:20 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
11:34:23 ChanServ sets mode +o litharge
11:34:23 <abastro[m]> I mean ofc, IO is common in codd
11:34:23 litharge sets mode +b *!*@c-174-63-118-52.hsd1.ma.comcast.net
11:34:33 litharge sets mode -o litharge
11:34:46 <tdammers> it's just that when you FFI C procedures into Haskell, it is up to you to decide whether they should be declared in IO on the Haskell side, and if not, to make sure that that is safe
11:34:57 <abastro[m]> But then, why are many libraries not thin facade over C codes?
11:35:10 <tdammers> because it's often not necessary to resort to C
11:35:16 <abastro[m]> I heard langs like python have really thin facades
11:35:21 <merijn> abastro[m]: I call BS
11:35:25 <hpc> in python it's because the language is hella slow
11:35:29 <maerwald> abastro[m]: yaml is
11:35:30 <geekosaur> many haskell libs *are* such thin wrappers
11:35:33 <merijn> abastro[m]: Haskell's FFI to C is *much* less painful to use
11:35:35 <hpc> you're not getting numpy performance in native python
11:35:38 <merijn> (than python's)
11:35:52 <geekosaur> and then there's higher level interfaces which allow you to work with them in native idiom
11:35:58 <abastro[m]> Are many haskell libs thin wrappers?
11:35:58 <merijn> And even numpy needs meta libraries to make it fast
11:36:09 <abastro[m]> Then why are there still not enough libraries
11:36:12 <merijn> abastro[m]: Some, depends on the library. How easy the model fits, etc.
11:36:21 <hpc> abastro[m]: look through hackage for anything that's the name of a c lib
11:36:25 <hpc> like sdl and such
11:36:25 <merijn> abastro[m]: At what point are there "enough" libraries?
11:36:35 × dextaa_54 quits (~dextaa@user/dextaa) (Read error: Connection reset by peer)
11:36:39 <boxscape_> abastro[m] a lot of graphics-related haskell libraries are such wrappers
11:36:53 <abastro[m]> When ppl can find library for some obscure thing as well
11:36:56 <hpc> there's a lot out there, but haskell doesn't abdicate its role as a programming language for something like vector math
11:36:57 <merijn> abastro[m]: If you know C reasonably well, using GHC's FFI is very trivial
11:37:20 <geekosaur> "enough libraries": because someone needs to do the work. even in python it's not just run a script over a C lib to generate the python wrapper
11:37:57 <abastro[m]> Like, I recall someone saying that there is no binding to Microsoft SQL Server
11:38:17 <abastro[m]> And Oracle DB
11:38:35 <abastro[m]> Saw it from a link describing maturity of haskell on domains
11:38:43 <hpc> there's absolutely database drivers for those
11:38:46 dextaa_54 joins (~dextaa@user/dextaa)
11:39:15 <abastro[m]> Hmmm, what does the link mean then
11:39:28 <hpc> no clue, you didn't link it :P
11:42:44 <maerwald> I tried to use mongodb once in Haskell
11:43:01 abastro joins (~abab9579@143.248.229.217)
11:43:07 <hpc> that's a mistake in any language :D
11:43:09 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection)
11:43:10 <merijn> I would consider a lack of mongodb bindings a feature in any language :D
11:43:10 <abastro[m]> Let me search it up
11:43:13 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 260 seconds)
11:43:19 <hpc> merijn: *highfive*
11:43:45 × wolfshappen quits (~waff@irc.furworks.de) (Quit: later)
11:43:56 <abastro> lmao
11:44:10 wolfshappen joins (~waff@irc.furworks.de)
11:44:53 <abastro> https://github.com/Gabriel439/post-rfc/blob/main/sotu.md
11:45:05 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
11:45:16 <maerwald> merijn: yeah, there's a library for mongodb schemas... but that doesn't exist in haskell
11:45:22 <maerwald> that's the only sane way to use this beast
11:45:44 <merijn> I don't think there is a sane way to use mongodb unless you literally don't care about your data :p
11:45:51 × califax quits (~califax@user/califx) (Remote host closed the connection)
11:46:06 califax joins (~califax@user/califx)
11:46:27 <maerwald> it's just money transactions, so why would you
11:46:29 <maerwald> :D
11:46:47 <abastro> Then what are all the folks praising MongoDB
11:46:51 <abastro> And refusing to use other DBs
11:47:03 <tdammers> because it's what they know
11:47:17 <hpc> if you can call it "knowing"
11:47:54 <abastro> I mean, they learned SQL
11:48:02 <abastro> And still went to use MongoDB
11:48:24 <tdammers> "knowing" as in "feeling familiar"
11:48:26 <abastro> https://github.com/Gabriel439/post-rfc/blob/main/sotu.md#databases-and-data-stores
11:48:41 <tdammers> they may not have learned SQL properly
11:48:43 <abastro> ^ Describes that there is no bindingto MS SQL Server and Oracle
11:48:46 <merijn> abastro: So, I don't know how to break this to you. But on the whole, most people don't know what they're talking about :D
11:48:54 <abastro> Yep, I mean perhaps learning SQL properly would have been hard to them
11:48:54 <merijn> *Especially* on the internet
11:48:56 <hpc> being able to write insert, select, update, delete statements does not count as learning sql
11:49:18 <abastro> merijn: Indeed, in this case it was more personal engagement tho
11:49:37 <abastro> hpc: You forgot "joining" there
11:50:08 <abastro> Is there really binding towards Oracle? Is that article outdated?
11:50:09 <hpc> not many people actually know joining
11:50:17 <abastro> Welp
11:50:28 <abastro> I do know that they learned joining quite a bit. Still prefers MongoDB
11:50:43 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 260 seconds)
11:50:46 × mixfix41 quits (~sdenynine@user/mixfix41) (Quit: and the winter is outta here...)
11:50:54 <abastro> What can I say tho, as they love to use ORM as well
11:51:05 <abastro> loved to use ORMs when using SQL*
11:51:27 <merijn> abastro: Many people believed the claims MongoDB was making ("fast", "distributed", "safe"), and not the actual testing that shows mongodb (at least in the beginning) dropped data on the floor *all the time*
11:51:28 <tdammers> so basically, compensating for lack of understanding with superficially easy APIs
11:51:54 <tdammers> textbook anti-intellectualism
11:51:57 <tdammers> "don't make me think"
11:52:02 <abastro> merijn: Well that's true, yes.
11:52:16 <merijn> Dammit, I forgot the name of the guy who did those in-depth ACID compliance tests for databases
11:52:16 <abastro> tdammers: Yea, it is common everywhere nowadays
11:52:25 <abastro> We have to deal with it now
11:52:35 <tdammers> also, quasi-mandatory reading in this context: http://www.paulgraham.com/avg.html
11:53:06 <merijn> tdammers: Isn't Paul Graham the post child of weird anti-intellectualism when it comes to software dev? :p
11:53:13 <maerwald> well, if I had to choose between ultra-correct event sourcing and mongodb... I might actually go with the latter :p But most likely I'd just quit the job on the spot.
11:53:43 <tdammers> merijn: Paul Graham is a typical lisper in many regards - principled when it serves him, but then resorting to "pragmatism" in weird places
11:53:47 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
11:54:04 abastro joins (~abab9579@143.248.229.217)
11:54:10 <abastro> Meh accidentally logged out
11:54:14 <tdammers> anyway, I think the Blub Paradox he describes is pretty spot-on, if you ignore the fact that he uses Lisp as an example
11:54:31 <merijn> tdammers: He just thinks it doesn't apply to him xD
11:54:43 <tdammers> merijn: ah yes, the blub paradox paradox
11:55:01 <hpc> that's the nice thing about haskell - it's immune to the blub paradox
11:55:09 <hpc> it may be the best language ever, but idris is even better :P
11:55:15 <merijn> Ah!
11:55:18 <merijn> Jepsen!
11:55:20 <merijn> That's the guy
11:55:55 <abastro> Well though, it is fair to say that many ppl just cannot stand the difficulty of abstractions and such
11:56:23 <abastro> Not just anti-intellectualism, it's that they are trying to do more than what they can
11:56:40 <maerwald> well, there's also "elitism"
11:56:53 <maerwald> that is ignorance towards intellectual complexity
11:56:59 <maerwald> and its impact on engineering
11:57:48 <abastro> Elitism was ignorance towards intellectual complexity?
11:57:51 <abastro> Wow.
11:59:52 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
12:00:12 chexum joins (~quassel@gateway/tor-sasl/chexum)
12:00:38 <tdammers> "elitism" in the sense of taking the ability to understand and deal with a certain type of complexity for granted, and refusing to admit that this complexity is detrimental to adoption of the language and its libraries, and that it is a significant problem in production use
12:01:02 <maerwald> yes, ecosystem effects
12:01:11 × gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection)
12:01:11 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Read error: Connection reset by peer)
12:01:25 chexum joins (~quassel@gateway/tor-sasl/chexum)
12:01:26 <tdammers> in other words, people have been making horribly complex APIs, and just insisting that if you find them too complex, then the problem is your inability to casually understand them, not that they are simply too complex
12:01:51 <abastro> So, haskell?
12:01:55 <maerwald> and: just because we understand a concept doesn't mean we understand its *design space* in the practical sense. And most of the latter, that design space is what's going to come back at us
12:02:02 kaph joins (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it)
12:02:06 <tdammers> yeah
12:02:08 <merijn> abastro: Depends on your corner of the Haskell ecosystem
12:02:28 × Psybur quits (~Psybur@c-76-123-45-25.hsd1.va.comcast.net) (Ping timeout: 260 seconds)
12:02:31 <abastro> I wonder which corner of haskell ecosystem
12:02:36 <abastro> I guess Servant
12:03:00 <maerwald> servant is a rather good citizen though and has good justification for the approach
12:03:06 <abastro> Hmmm.
12:03:10 <tdammers> like, it's great that you have discovered how Van Laarhoven lenses magically fit into this self-contained ecosystem of all sorts of functors and traversals and whatnot, and it all beautifully works out; but the reality of it is that you often end up with completely useless error messages that aren't helpful at all
12:03:13 <abastro> Which libraries do you mean?
12:03:29 ChanServ sets mode +o litharge
12:03:30 litharge sets mode -bo *!*@98.38.249.169 litharge
12:03:37 <maerwald> tdammers: heh, are you marketing optics? :p
12:03:55 <abastro> optics aren't particularly immune to the criticism as well tho
12:04:00 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:04:00 <tdammers> maerwald: given my professional affiliation, I can see why you would think that XD
12:04:22 <abastro> I guess I should distance myself from optics, but.. I just cannot. :(
12:04:23 ChanServ sets mode +o litharge
12:04:23 × agrosant quits (~agrosant@79.103.182.92.dsl.dyn.forthnet.gr) (Read error: Connection reset by peer)
12:04:23 litharge sets mode -bo *!*@c-174-63-118-52.hsd1.ma.comcast.net litharge
12:04:30 gehmehgeh joins (~user@user/gehmehgeh)
12:04:49 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
12:04:57 agrosant joins (~agrosant@79.103.182.92.dsl.dyn.forthnet.gr)
12:04:57 Psybur joins (~Psybur@2600:1003:b138:112:6968:67e7:2717:bba0)
12:05:19 AlexNoo_ is now known as AlexNoo
12:05:31 abastro joins (~abab9579@143.248.229.217)
12:06:42 <abastro> Is `lens` somewhat bad concept then?
12:06:59 <merijn> Please define "bad" and "concept" :D
12:07:00 <maerwald> no, it's just that there's little difference between internals and API
12:07:06 <maerwald> it's all the same
12:07:08 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds)
12:07:18 <tdammers> the concept is solid and useful
12:07:29 <tdammers> and it's actually shared between the lens and optics libraries
12:07:33 <abastro> Oh, I thought you mean `lens` itself is quite tangled and byzantine invention
12:07:37 <tdammers> the difference is how they are im[plemented
12:08:01 <abastro> As how ppl outside haskell community says about `lens`
12:08:06 <tdammers> the optics library takes a relatively "down to earth" approach, expressing lenses as what they conceptually are - a getter/setter pair.
12:08:12 briandaed joins (~root@109.95.142.93.r.toneticgroup.pl)
12:08:13 <abastro> Btw who is this guy nicked `lens`
12:08:34 <abastro> Yep I prefer optics library as well
12:08:51 <tdammers> the lens library, by contrast, uses a trick known as "van Laarhoven lenses", which allows embedding both getter and setter into a single function, parametrized over a functor type variable
12:09:09 <tdammers> by selecting an appropriate functor, one can use the same function as a getter or as a setter
12:09:40 <abastro> Hm actually, this is a question I got often and I myself also had as well:
12:09:48 <maerwald> https://hackage.haskell.org/package/optics-core-0.4.1/docs/Optics-Optic.html#t:JoinKinds <- pretty self explanatory and these are internals
12:09:56 <abastro> What is the benefit of Van Laarhoven implementation?
12:10:01 <tdammers> and, by virtue of a happy little coincidence, composing these van Laarhoven lens functions is equivalent to composing the lenses themselves (but with composition order flipped), so the lens library doesn't have to define a dedicated lens composition operator, you can just use (.) to compose lenses
12:10:25 <tdammers> and by extension, you get a bunch of other things for free as well, which is what the lens library extensively exploits
12:10:29 <siers> so cool
12:10:40 <abastro> I think I saw van laarhoven encoding in optics library as well
12:10:41 <abastro> Why is that?
12:11:29 <boxscape_> edward has a few paragraphs about the benifits/drawbacks of profunctor optics vs van laarhoven here, abastro https://www.reddit.com/r/haskell/comments/73tlhs/dont_fear_the_profunctor_optics/dnt3bx7/
12:12:01 <abastro> Oh, I meant to say profunctor optics implementation, duh
12:12:15 <abastro> It is still quite complex
12:12:31 <tdammers> the concept itself isn't complex at all
12:14:17 <abastro> Welp I meant to say, difficult
12:14:49 × DNH quits (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:15:21 DNH joins (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898)
12:15:47 <abastro> Anyway btw, it is still illusive which libraries you mean by being overly complex
12:15:56 <abastro> Other than lens, that is
12:16:07 <merijn> That one SQL one :p
12:16:25 <merijn> I forget the name
12:16:32 <tdammers> esqueleto?
12:16:36 <maerwald> beam
12:16:39 <abastro> Oh. Beam
12:16:42 <abastro> I def recall that one
12:17:07 <tdammers> something like beam would generally be about my 4th choice
12:17:09 <abastro> Looked through documentation, thought, "No, that's nope, I am not learning this"
12:17:15 <merijn> oh, right beam
12:17:34 <abastro> Is Opaleye also near the limit?
12:17:35 <tdammers> but if you have to take that approach, then beam is about as good as it gets
12:17:47 <merijn> tdammers: I dislike esqueleto, because overall it just seems less effort to, ya know, just write SQL :p
12:17:59 <maerwald> I switched my code to hasql
12:18:01 <maerwald> it's ok
12:18:01 <tdammers> merijn: yes, indeed; "just write SQL" is approach #1 for me
12:18:21 <maerwald> the encoders/decoders approach is a bit confusing at first
12:18:24 <merijn> beam is just...madness
12:18:28 <maerwald> but in general I appreciate less typeclass foo
12:18:29 <abastro> (Well I legit thought of making an SQL library using typed list, glad that I scraped that one)
12:18:49 <tdammers> approach #2 is "whip up my own domain-specific SQL query construction automation"
12:18:56 cfricke joins (~cfricke@user/cfricke)
12:19:06 <maerwald> and hasql is designed nicely as a library *set*
12:19:07 <merijn> tdammers: I'm doing a mix off 1, 2, and persistent
12:19:08 <abastro> *Monomer typeclasses are in extreme fear*
12:19:27 <merijn> tdammers: Although persistent only for legacy reasons :p
12:19:35 <merijn> And once you have it, might as well use it
12:19:38 <tdammers> the advantage of making it application-specific is that you can aggressively exploit application-specific conventions, such as "all primary keys will be UUID's"
12:19:52 <abastro> Now that is quite useful convention
12:20:19 <abastro> Next time I am making DB for my own usage, I will use UUID Primary key
12:20:23 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
12:20:37 <tdammers> just an example - but as long as you have those conventions, and consistently apply them, the complexity of your database abstraction layer melts down a lot, because you can ditch a whole lot of generalizations
12:20:46 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
12:21:33 abastro joins (~abab9579@143.248.229.217)
12:22:14 <abastro> Is "too many typeclasses" bad?
12:22:21 <abastro> When used for name overloading
12:22:42 <merijn> name overloading in general is a bad idea, imo
12:22:43 <abastro> Not using clever\ tricks
12:22:50 <merijn> So "yes"
12:22:51 <abastro> monomer is a bad idea then hmm
12:22:54 mikoto-chan joins (~mikoto-ch@213.177.151.239)
12:23:12 <abastro> Good UI library in haskell when
12:26:59 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 252 seconds)
12:27:07 × acidjnk quits (~acidjnk@p200300d0c7049f07a51ab7ce4c98e594.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
12:28:09 <abastro> Btw are common set of libraries of haskell fine? Like, vector, transformers, containers, unordered-containers, text, bytestring, etc
12:29:42 seydar joins (~seydar@154-27-113-252.starry-inc.net)
12:31:11 alp_ joins (~alp@user/alp)
12:31:59 × akegalj quits (~akegalj@93-138-67-213.adsl.net.t-com.hr) (Quit: leaving)
12:35:47 <maerwald> Is there a solution for jsonifying a result set from a postgres library at the client side (without knowing the number of columns or even their types)?
12:38:36 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
12:39:09 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
12:39:59 × xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x)
12:40:23 romesrf joins (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3)
12:43:25 × romesrf quits (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Client Quit)
12:43:37 × fryguybob quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Quit: leaving)
12:44:12 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds)
12:46:06 jgeerds joins (~jgeerds@d5364b87.access.ecotel.net)
12:46:37 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
12:47:14 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
12:50:01 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
12:51:51 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds)
12:52:30 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 272 seconds)
12:56:46 razetime joins (~quassel@117.254.35.74)
13:00:40 seydar joins (~seydar@154-27-113-252.starry-inc.net)
13:00:44 × mattil quits (~mattil@helsinki.portalify.com) (Remote host closed the connection)
13:03:01 × chenqisu1 quits (~chenqisu1@183.217.202.44) (Ping timeout: 240 seconds)
13:03:57 deadmarshal_ joins (~deadmarsh@95.38.113.9)
13:05:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:05:13 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 250 seconds)
13:08:09 × deadmarshal_ quits (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds)
13:14:40 × abastro quits (~abab9579@143.248.229.217) (Remote host closed the connection)
13:15:31 xff0x_ joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
13:15:33 abastro joins (~abab9579@143.248.229.217)
13:17:41 sondre joins (~sondre@2001:700:200:f112::2a03)
13:18:02 sondre is now known as sondr3
13:19:05 <sondr3> anyone have any experience with reading lots of files in parallel? I have an embarrasingly parallel problem where I want to read and parse a few thousand files
13:19:55 <sondr3> I tried using the async package, but it spawns as many threads as files I want to parse, which was... a bit too much, haha
13:20:13 × califax quits (~califax@user/califx) (Remote host closed the connection)
13:20:25 califax joins (~califax@user/califx)
13:20:47 tito joins (tito@tilde.team)
13:21:21 fask joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
13:21:29 <sondr3> Something like a concurrent mapM that's bound by the available threads would be ideal, sort of like how `par_iter` from `rayon` in Rust
13:21:34 seydar joins (~seydar@154-27-113-252.starry-inc.net)
13:22:06 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
13:22:07 off^ joins (~off@c-24-99-107-170.hsd1.ga.comcast.net)
13:22:23 <abastro[m]> IIRC there was a package which is similar to Async but also limits thread number
13:23:24 <abastro[m]> https://hackage.haskell.org/package/async-pool-0.9.1/docs/Control-Concurrent-Async-Pool.html
13:24:01 × abastro quits (~abab9579@143.248.229.217) (Ping timeout: 268 seconds)
13:24:01 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 268 seconds)
13:24:32 <sondr3> abastro[m]: thanks, I'll try it out
13:24:50 × ystael quits (~ystael@user/ystael) (Quit: Lost terminal)
13:25:43 abastro joins (~abab9579@192.249.26.113)
13:25:49 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds)
13:26:51 ystael joins (~ystael@user/ystael)
13:27:12 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
13:27:44 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
13:30:02 × fask quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
13:30:19 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
13:30:35 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
13:31:23 <merijn> I also wrote my own package with bounded concurrency for that sorta thing
13:31:29 <merijn> @hackage broadcast-chan
13:31:29 <lambdabot> https://hackage.haskell.org/package/broadcast-chan
13:32:21 <merijn> sondr3: I specifically wrote that because the lack of bound on mapConcurrently was a problem for my own trivially parallel IO :p
13:32:53 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 246 seconds)
13:33:30 <merijn> The current implementation isn't super fast, so don't expect great scaling for trivial work, but should be fine for stuff like IO
13:34:52 mikoto-chan joins (~mikoto-ch@213.177.151.239)
13:35:12 <sondr3> merijn: nice, I'll try that too and see what works best
13:35:58 <merijn> (trivial as in less than 1 millisecond or so)
13:36:36 <merijn> sondr3: I have a wrapper for conduit to so you can stream data into a conduit that processes N elements in parallel :)
13:36:44 <merijn> (if that helps your usecase :p)
13:37:47 × kaph quits (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Ping timeout: 246 seconds)
13:38:01 <sondr3> I've never used conduit so unless it is very straight forward I'm not sure its worth trying it :p
13:38:32 × marquis_andras quits (~marquis_a@14-201-230-116.tpgi.com.au) (Remote host closed the connection)
13:39:37 × BlackboardN quits (~Blackboar@user/BlackboardN) (Ping timeout: 248 seconds)
13:40:53 <merijn> it's quite nice for stream processing.
13:41:40 BlackboardN joins (~Blackboar@user/BlackboardN)
13:42:25 seydar joins (~seydar@154-27-113-252.starry-inc.net)
13:42:36 deadmarshal_ joins (~deadmarsh@95.38.113.9)
13:43:50 <sondr3> Never touched streaming in Haskell, this is basically me running a megaparsec parser on a bunch of small files that right now is somewhat slow
13:45:40 <maerwald> streamly has parsers
13:46:03 <maerwald> https://hackage.haskell.org/package/streamly-0.8.2/docs/Streamly-Internal-Data-Parser.html
13:47:16 <sondr3> The problem isn't really that the parser itself is very slow, it's that it's slow to run the parser sequentially on >10k files all the time, hehe
13:47:36 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 272 seconds)
13:47:47 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
13:47:47 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
13:47:47 wroathe joins (~wroathe@user/wroathe)
13:48:07 kaph joins (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it)
13:51:09 <tdammers> so... pump the filenames into a Chan, spawn a number of worker threads, have each one pull a filename from the Chan, process it, rinse and repeat
13:51:15 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
13:51:50 <merijn> tdammers: Except the library I linked already does that :p
13:51:56 <tdammers> merijn: sure
13:52:06 <merijn> tdammers: Because I kept having to do it and managing all the edge cases correctly *sucks*
13:52:20 <merijn> So I figured I'd just do it correctly once and reuse it :p
13:52:21 <tdammers> haha, yeah, I'd expect that
13:52:24 × xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x)
13:53:13 <merijn> Bonus of using conduit is that I apply backwards propagation and block the filename writer if you produce to many :)
13:53:26 <maerwald> boring, streamly already has async support
13:53:35 × sprout_ quits (~quassel@2a02:a467:ccd6:1:70be:3437:d6be:b5ae) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
13:54:03 sprout joins (~quassel@2a02:a467:ccd6:1:70be:3437:d6be:b5ae)
13:54:07 doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
13:54:07 <merijn> maerwald: My dependency footprint is a fraction of streamly's, so there's that :)
13:54:35 <maerwald> if you want few dependencies, Haskell isn't the right language
13:54:35 × Katarushisu quits (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Ping timeout: 246 seconds)
13:54:52 <merijn> base, transformers, and unliftio-core
13:56:13 × alp_ quits (~alp@user/alp) (Ping timeout: 260 seconds)
13:56:42 × Psybur quits (~Psybur@2600:1003:b138:112:6968:67e7:2717:bba0) (Ping timeout: 268 seconds)
13:56:43 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
13:56:46 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
13:57:39 Psybur joins (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba)
13:58:52 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Quit: mikoto-chan)
13:59:09 mikoto-chan joins (~mikoto-ch@213.177.151.239)
14:00:00 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Quit: WeeChat 3.4.1)
14:00:09 <abastro> What if I want less than 100GB dependencies
14:01:01 <geekosaur> 100GB does sound a bit exscessive; sounds more like you need to gc stack/cabal
14:01:19 <geekosaur> (or nix)
14:02:07 jpds joins (~jpds@gateway/tor-sasl/jpds)
14:03:15 seydar joins (~seydar@154-27-113-252.starry-inc.net)
14:04:11 shriekingnoise joins (~shrieking@201.231.16.156)
14:05:53 bahamas joins (~lucian@84.232.140.158)
14:06:08 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds)
14:06:29 <maerwald> I use cabal-cache with an S3 bucket and just regularly delete all local stuff
14:07:11 dyeplexer joins (~dyeplexer@user/dyeplexer)
14:07:53 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 248 seconds)
14:09:08 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
14:12:22 <abastro> Yep, I mean I could gc but
14:12:26 <abastro> It is hard to do
14:12:32 <merijn> Not really
14:12:41 <merijn> "rm -rf ~/.cabal/store"
14:13:18 <merijn> Or only the subdir for a specific GHC if you want to be a bit more targeted
14:13:22 <geekosaur> monochrom has a more selective way but just nuking the store and starting over is usually decent
14:14:16 <geekosaur> https://github.com/treblacy/cabalgc
14:14:49 <janus> we need a bigger store, such that it can survive nuking... like walmart, but planet-sized
14:15:43 acidjnk joins (~acidjnk@p200300d0c7049f074d48d16d808cf7eb.dip0.t-ipconnect.de)
14:16:34 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
14:19:46 <razetime> hello. Is this the correct place to talk about Google Summer of Code for Haskell?
14:20:09 <janus> razetime: i think so, which project are you looking at?
14:20:26 <razetime> Control headless Chrome/Chromium
14:20:33 <razetime> I'm interested in this one
14:20:39 <razetime> https://summer.haskell.org/ideas.html#chrome-devtools-protocol
14:21:09 <janus> oh, that's mentored by Albert Krewinkel and Jasper Van der Jeugt. I know you can reach Jasper on the Discourse, I am not sure he is on IRC
14:21:33 <razetime> i see. Will check out the discourse, then.
14:21:38 <janus> well, wait a bit
14:21:45 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
14:21:53 <janus> maybe Albert Krewinkel is in here, i just don't know his nick name
14:22:04 <razetime> I will stay online here. thanks.
14:22:22 <janus> generally you have to wait a few hours on IRC because people are not all hyper obsessive about reading it all the time :P
14:22:28 <janus> (like me :O)
14:22:59 <razetime> good habits. I agree
14:23:02 × sondr3 quits (~sondre@2001:700:200:f112::2a03) (Quit: sondr3)
14:24:07 seydar joins (~seydar@154-27-113-252.starry-inc.net)
14:24:14 × xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x)
14:24:16 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
14:24:25 Sgeo joins (~Sgeo@user/sgeo)
14:27:01 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
14:27:08 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
14:28:41 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 248 seconds)
14:29:29 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
14:30:27 Akiva joins (~Akiva@user/Akiva)
14:30:27 <abastro> merijn: Well, there is a problem:
14:30:35 <abastro> I hate how long it takes to compile
14:34:11 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
14:35:31 zaquest joins (~notzaques@5.130.79.72)
14:35:37 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 248 seconds)
14:37:45 × chomwitt quits (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32) (Ping timeout: 248 seconds)
14:39:36 seydar joins (~seydar@154-27-113-252.starry-inc.net)
14:41:16 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
14:41:33 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
14:41:48 Chai-T-Rex joins (~ChaiTRex@user/chaitrex)
14:42:55 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds)
14:45:25 × abastro quits (~abab9579@192.249.26.113) (Ping timeout: 240 seconds)
14:47:36 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
14:47:52 <merijn> abastro: I just nuke it once or twice a year
14:47:58 fax joins (~fax@94.6.139.91)
14:49:38 × fax quits (~fax@94.6.139.91) (Remote host closed the connection)
14:49:44 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 268 seconds)
14:49:56 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
14:50:57 <maerwald> I wonder when cabal hooks finally land. Then I'll add a post-build hook that uploads the artifacts to S3
14:51:03 <abastro[m]> I see.. perhaps mine just grew fast this time.
14:51:36 <abastro[m]> Every time I run cabal update, things rebuilf
14:51:39 <abastro[m]> Rebuild*
14:52:16 <merijn> abastro[m]: That's because by default the cabal build plan uses the newest allowed version, so everytime you update the buildplan changes
14:52:23 <merijn> It's not rebuilding things at all
14:52:28 <merijn> It's building new things
14:52:39 <merijn> If you don't want that, freeze the buildplan
14:52:56 <maerwald> would be interesting to have a solver setting that prefers installed versions
14:53:09 <merijn> maerwald: That's what v1- cabal had
14:53:12 <merijn> And it fucking sucked
14:53:17 seydar joins (~seydar@154-27-113-252.starry-inc.net)
14:53:25 <merijn> because build plans were super unpredictable and would randomly break on random machines
14:53:58 <merijn> The switch to the new deterministic approach was to avoid those issues and make testing with more recent versions easier
14:55:36 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
14:55:53 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
14:57:16 <abastro[m]> Yep, building new things
14:57:19 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
14:58:03 jakalx joins (~jakalx@base.jakalx.net)
14:58:07 <abastro[m]> While it is normally great, with absence of great gc tools, it easily grows the file size
14:58:21 <maerwald> you can cabal update but still pin index-state
14:58:28 <maerwald> for a certain project
14:58:42 exarkun_ is now known as exarkun
14:58:42 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
14:58:43 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
14:59:04 geekosaur joins (~geekosaur@xmonad/geekosaur)
14:59:13 <abastro[m]> I indeed like the 10 instances of xmonads /s
14:59:49 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
15:01:54 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
15:02:11 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
15:03:55 danso joins (~danso@danso.ca)
15:05:49 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
15:05:55 chomwitt joins (~chomwitt@athedsl-31881.home.otenet.gr)
15:06:06 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
15:06:20 Katarushisu joins (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net)
15:09:42 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
15:09:59 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
15:15:46 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
15:16:04 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
15:17:23 × razetime quits (~quassel@117.254.35.74) (Ping timeout: 250 seconds)
15:17:58 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:5d73:ba4b:5267:e012) (Quit: WeeChat 2.8)
15:19:25 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds)
15:19:33 × dextaa_54 quits (~dextaa@user/dextaa) (Read error: Connection reset by peer)
15:20:13 × Psybur quits (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Ping timeout: 260 seconds)
15:20:20 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 246 seconds)
15:20:54 Psybur joins (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a)
15:21:18 seydar joins (~seydar@154-27-113-252.starry-inc.net)
15:21:44 dextaa_54 joins (~dextaa@user/dextaa)
15:24:00 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
15:24:04 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
15:24:23 fax joins (~fax@94.6.139.91)
15:25:24 × seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds)
15:26:21 <tomsmeding> abastro[m]: `cabal freeze` in your project
15:26:32 <tomsmeding> creates a cabal.project.freeze file that fixes dep versions
15:27:18 razetime joins (~quassel@117.254.35.210)
15:29:20 <abastro[m]> Yep, I should not forget about that.
15:29:28 <abastro[m]> <del>Cabal as package manager when</del>
15:29:47 <maerwald> freeze can be annoying if you experimenting with different flag configurations
15:29:48 joo-_ joins (~joo-_@80-62-116-70-mobile.dk.customer.tdc.net)
15:29:48 × joo-_ quits (~joo-_@80-62-116-70-mobile.dk.customer.tdc.net) (Changing host)
15:29:48 joo-_ joins (~joo-_@fsf/member/joo--)
15:29:58 <maerwald> that's why for dev-ing index-state is more appropriate
15:30:25 <tomsmeding> maybe even doing `cabal freeze` then removing everything but 'xmonad' itself from the freeze file would do the trick
15:30:54 <tomsmeding> or more generally, only pin the unimportant but large stuff
15:31:18 × acidjnk quits (~acidjnk@p200300d0c7049f074d48d16d808cf7eb.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
15:32:02 <abastro[m]> I mean, I don't see xmonad update that often
15:32:13 <abastro[m]> Wait
15:32:27 <abastro[m]> I guess it is xmonad-contrib being updated
15:32:30 <abastro[m]> So I can fix that
15:32:44 <abastro[m]> (Btw other packages are also being duplicated it seems)
15:33:41 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:33:55 <tomsmeding> abastro[m]: yeah replace 'xmonad' in my message with whatever package you want to be pinned :p
15:34:33 <tomsmeding> though if you use freeze, you should remember that you have a freeze file if at somepoint you're wondering why you're not getting updates from upstream :p
15:34:43 <abastro[m]> Makes sense.
15:35:00 <abastro[m]> "Not getting updates" heh
15:35:55 <abastro[m]> Btw I find it a bit annoying that whenever something is built, its dependencies, even the same version ones, are built in new builds
15:36:03 × cdman quits (~dcm@user/dmc/x-4369397) (Quit: Leaving)
15:36:03 <abastro[m]> Which duplicates stuff further
15:36:11 <abastro[m]> Why does this happen?
15:36:42 bahamas joins (~lucian@84.232.140.158)
15:36:53 <geekosaur> it shouldn't do that unless something else is changing (compile options, cabal flags, etc.)
15:37:00 <tomsmeding> you mean that if you have a dep on package A which itself depends on package B, and A updates to a new version but B does not, but nevertheless B is rebuilt?
15:37:08 <tomsmeding> precisely what geekosaur says
15:37:29 <tomsmeding> look in the file created by `cabal freeze`, it lists cabal flags for each package
15:37:38 <tomsmeding> if those change, a package needs to be rebuilt
15:37:50 zebrag joins (~chris@user/zebrag)
15:37:56 <tomsmeding> also, if A depends on B which depends on C, and A and C change, then B needs to be rebuilt as well
15:37:59 <abastro[m]> Cabal flags change, hmm
15:38:13 tomsmeding is not sure if you can have two different versions of the same package in a build plan
15:38:13 <abastro[m]> Oh
15:38:29 <abastro[m]> I guess it happens since both A and C changes
15:38:35 <abastro[m]> And I get the illusion
15:38:57 <tomsmeding> probably C is a tiny package that you're skipping in your analysis of the issue because it's small and "hence" irrelevant :p
15:39:05 <abastro[m]> Well ye, never seen two different versions of same package in single build plan
15:39:27 <abastro[m]> I mean there are too many packages
15:39:30 <geekosaur> pretty sure cabal does not handle that although there are cases where it's technically safe
15:39:34 <abastro[m]> So I cannot check every package
15:40:00 <geekosaur> ftr I have 4.1G in my local store and I update xmonad and xmonad-contrib from git once a week
15:40:23 <geekosaur> and this is unusually large because my config depends on dbus which sucks in lens and acouple of other big-footprint packages
15:41:59 <abastro[m]> 4G? Sounds quite small
15:42:42 <geekosaur> for xmonad being the primary pressure on it, it's big :)
15:43:00 <abastro[m]> Aha
15:43:16 <abastro[m]> Wait, `dbus` depends on lens?
15:43:26 tomsmeding just removed 14G of cabal store because I don't work with agda anymore
15:43:32 <geekosaur> one of its dependencies does, for some reason
15:43:40 <abastro[m]> Btw my dependency footprint is greatly exploded by taffybar
15:43:52 <geekosaur> I haven't tried to work out the full dep tree
15:47:53 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
15:48:29 <danso> when would somebody want to save the .hi and .o files for their Main module?
15:48:47 <danso> it seems to me that those have to be rebuilt any time the source for Main changes, or anything it depends on
15:49:11 Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net)
15:49:38 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
15:49:40 <tomsmeding> danso: the .o is the compiled form of the module, necessary to produce the final executable; the .hi is a by-product of compilation that I guess would be redundant for Main
15:49:44 <danso> i guess the point of storing .hi and .o files in general is to avoid recompiling things that don't need it
15:50:09 <geekosaur> in this case I think it's more thatnotkeeping them would require special-casing handling of maoin modules
15:50:12 <geekosaur> *main
15:50:16 <abastro[m]> Well doesn't other modules require those caching schemes?
15:50:25 <tomsmeding> but in general .hi files of other modules are used by ghc and are necessary, they store haskell type info, inlining info, etc. of the modules
15:50:35 <abastro[m]> Yep, I also think it is just avoiding special-casing
15:50:44 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
15:50:50 <tomsmeding> also not storing them wouldn't really give much of a speedup for that one module
15:51:16 <geekosaur> it'd be a very slight slowdown as it wouldneed to remove them after; it needs them to link it all together
15:51:20 <abastro[m]> Oh, that gave me an idea
15:51:31 <abastro[m]> .hsig for file with type declarations
15:51:49 <tomsmeding> isn't that .hs-boot
15:51:58 <danso> okay, thanks all for the input. the actual reason i don't want to store them is because i have two Main modules for two different binaries, and sometimes they get confused when Main.hi and Main.o exist
15:52:21 <tomsmeding> danso: how are you compiling your binaries?
15:52:25 <geekosaur> I think .hsig is taken by backpack
15:52:32 <geekosaur> but fat .hi files are coming
15:52:48 <danso> take a look at the demo i created here: https://gitlab.com/danso/ghc-demo/-/tree/main
15:53:24 <geekosaur> storing more information for use by haddock, HIE/HLS, etc.
15:54:14 <tomsmeding> danso: usually the answer would be different -hidir and -odir for the two binaries, but now you're sharing a module so that doesn't work
15:54:31 <abastro[m]> I mean .hsig to be supplied by user
15:54:47 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
15:54:52 <abastro[m]> Supply your types in separate header!
15:55:09 <abastro[m]> And its implementation in the correlated source file
15:55:18 <tomsmeding> danso: hack: compile Common.hs with -hidir and -odir set to cache/common/, then symlink/copy those files in the makefile to cache/hello/ and cache/greetings/, then compile the two executables
15:55:22 <geekosaur> that sounds like a maintenance nightmare
15:55:30 <tomsmeding> abastro[m]: are you trying to revert back to C
15:55:38 <geekosaur> (abastro[m])
15:55:38 <tomsmeding> there is a reason that most languages did _not_ copy that style
15:57:13 × boxscape_ quits (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
15:57:40 <danso> tomsmeding, the hack i've been using in my actual projects is to run `rm cache/Main.hi cache/Main.o` in the makefile after GHC finishes
15:58:41 × caubert_ quits (~caubert@136.244.111.235) (Quit: WeeChat 3.4)
15:58:48 <abastro[m]> tomsmeding: Exactly!
15:59:01 caubert joins (~caubert@136.244.111.235)
15:59:20 <abastro[m]> C++ copied C at least :^)
16:00:06 <danso> is it a bug that Main.o and Main.hi are created even tho the source files have the -no-keep-*-files specified in pragmas?
16:01:58 <tomsmeding> hm, users guide doesn't say much about where the options are allowed https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/separate_compilation.html#keeping-intermediate-files
16:02:45 <danso> this page says they are dynamic that have been reported in GHC but not yet fixed: see the
16:02:49 <danso> that have been reported in GHC but not yet fixed: see the
16:02:54 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
16:03:00 <danso> oops, sorry. wrong paste twice >_>
16:03:04 <danso> https://ghc.gitlab.haskell.org/ghc/doc/users_guide/flags.html#keeping-intermediate-files
16:03:21 <danso> "dynamic" flags are ones that can be invoked by pragmas in source files
16:04:17 lbseale joins (~ep1ctetus@user/ep1ctetus)
16:05:08 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 260 seconds)
16:05:09 <tomsmeding> danso: given that "keep-o-files" and "keep-hi-files" give 0 hits in the ghc issue tracker, it might be worth opening an issue about this (https://gitlab.haskell.org/ghc/ghc/-/issues); even if it's intended, perhaps the documentation should be clarified
16:10:01 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
16:16:00 × fax quits (~fax@94.6.139.91) (Remote host closed the connection)
16:16:17 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
16:16:19 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:16:25 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
16:17:19 × Psybur quits (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a) (Read error: Connection reset by peer)
16:17:38 Psybur joins (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a)
16:18:02 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection)
16:20:18 × jgeerds quits (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 260 seconds)
16:21:06 yauhsien joins (~yauhsien@61-231-37-33.dynamic-ip.hinet.net)
16:22:39 × ubert quits (~Thunderbi@p548c8d44.dip0.t-ipconnect.de) (Quit: ubert)
16:22:39 ubert1 is now known as ubert
16:24:19 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
16:24:36 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
16:25:54 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
16:28:43 × mbuf quits (~Shakthi@122.173.67.210) (Quit: Leaving)
16:31:19 zer0bitz joins (~zer0bitz@2001:2003:f750:a200:5019:823:a50e:5ee6)
16:33:39 ph88 joins (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de)
16:34:58 × wolfshappen quits (~waff@irc.furworks.de) (Read error: Connection reset by peer)
16:37:13 × doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 260 seconds)
16:40:32 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
16:41:07 <danso> thanks tomsmeding, it is done https://gitlab.haskell.org/ghc/ghc/-/issues/21349
16:42:04 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Ping timeout: 250 seconds)
16:42:50 <geekosaur> I expect that to be more of a labeling issue (they should not be considered dynamic): they need to stick around for the linking step, after which it's too late for a source pragma to fire
16:43:42 <danso> i'm fine with that. a bug in the docs is still a bug ;^)
16:46:54 × MajorBiscuit quits (~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) (Ping timeout: 268 seconds)
16:51:56 xkuru joins (~xkuru@user/xkuru)
16:56:09 × redb quits (~nmh@136.49.49.211) (Ping timeout: 268 seconds)
16:59:15 napping joins (~brandon@65.128.49.110)
17:00:40 bahamas joins (~lucian@84.232.140.158)
17:01:55 liz joins (~liz@host109-151-125-217.range109-151.btcentralplus.com)
17:02:17 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 248 seconds)
17:06:23 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 260 seconds)
17:06:36 × razetime quits (~quassel@117.254.35.210) (Ping timeout: 240 seconds)
17:06:42 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
17:06:49 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
17:08:12 econo joins (uid147250@user/econo)
17:08:22 geekosaur joins (~geekosaur@xmonad/geekosaur)
17:15:10 redb joins (~nmh@136.49.49.211)
17:22:20 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
17:23:02 cheater joins (~Username@user/cheater)
17:27:00 × dextaa_54 quits (~dextaa@user/dextaa) (Read error: Connection reset by peer)
17:29:02 dextaa_54 joins (~dextaa@user/dextaa)
17:29:55 × hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds)
17:30:23 hololeap_ joins (~hololeap@user/hololeap)
17:37:28 × redb quits (~nmh@136.49.49.211) (Ping timeout: 268 seconds)
17:41:51 × zeenk quits (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) (Quit: Konversation terminated!)
17:44:31 alp_ joins (~alp@user/alp)
17:48:13 bahamas joins (~lucian@84.232.140.158)
17:51:03 Tuplanolla joins (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi)
17:52:53 × chomwitt quits (~chomwitt@athedsl-31881.home.otenet.gr) (Ping timeout: 268 seconds)
17:54:33 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
17:54:48 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
17:58:15 chomwitt joins (~chomwitt@athedsl-20549.home.otenet.gr)
17:58:59 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
17:59:39 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
18:00:17 × deadmarshal_ quits (~deadmarsh@95.38.113.9) (Ping timeout: 252 seconds)
18:01:44 × TonyStone quits (~TonyStone@2603-7080-8607-c36a-e4f8-bd3f-9136-d580.res6.spectrum.com) (Ping timeout: 260 seconds)
18:04:59 redb joins (~nmh@136.49.49.211)
18:05:46 Xplorator joins (~Xplorator@176.166.206.65)
18:05:50 × vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds)
18:06:55 Macbethwin joins (~chargen@8.31.163.87)
18:07:50 Macbethwin is now known as Chargen
18:10:44 × Psybur quits (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a) (Ping timeout: 252 seconds)
18:10:59 Psybur joins (~Psybur@75.145.205.201)
18:12:09 × redb quits (~nmh@136.49.49.211) (Ping timeout: 248 seconds)
18:13:55 redb joins (~nmh@136.49.49.211)
18:14:21 TonyStone joins (~TonyStone@2603-7080-8607-c36a-f1ec-d7f3-37e1-032c.res6.spectrum.com)
18:15:13 vicfred joins (~vicfred@user/vicfred)
18:15:31 × cosimone quits (~user@93-47-228-79.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
18:16:16 jakalx parts (~jakalx@base.jakalx.net) ()
18:17:49 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
18:17:56 cosimone joins (~user@93-47-228-79.ip115.fastwebnet.it)
18:18:26 × redb quits (~nmh@136.49.49.211) (Ping timeout: 252 seconds)
18:20:11 redb joins (~nmh@136.49.49.211)
18:20:34 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
18:24:26 × redb quits (~nmh@136.49.49.211) (Ping timeout: 246 seconds)
18:24:32 jakalx joins (~jakalx@base.jakalx.net)
18:27:21 mvr_ joins (uid36976@id-36976.tinside.irccloud.com)
18:28:24 <odnes> tdammers
18:28:42 wolfshappen joins (~waff@irc.furworks.de)
18:29:22 × michalz quits (~michalz@185.246.204.104) (Remote host closed the connection)
18:29:25 <odnes> tdammers: sry, mistakenly pinged. amazing read, this whole discussion though
18:31:21 <SrPx> give me ideas of non-recursive, non-polymorphic types to teach FP newcomers, that are related to some intuitive real-world concept, and that have some cool functions to implement. example: Rock | Paper | Scizor, with functions like "equals : RPS -> RPS -> Bool" and "beats : RPS -> RPS -> Bool". what else?
18:34:07 tfeb joins (~tfb@88.98.95.237)
18:36:25 <geekosaur> notes, with things like major and minor thirds and fifths leading to chords?
18:36:57 <SrPx> that's great, thanks geekosaur
18:37:01 <geekosaur> (optionally including patsyns to support C# and Db being the same note)
18:37:06 <SrPx> nice
18:42:21 × coot quits (~coot@213.134.190.95) (Quit: coot)
18:43:37 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 248 seconds)
18:44:38 × odnes quits (~odnes@5-203-209-2.pat.nym.cosmote.net) (Quit: Leaving)
18:45:07 × Chargen quits (~chargen@8.31.163.87) (Remote host closed the connection)
18:45:11 <tomsmeding> (scissor, btw, in english)
18:45:11 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
18:45:13 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
18:45:27 <tomsmeding> (not that the spelling necessarily makes much sense)
18:45:45 doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
18:45:51 Chargen joins (~chargen@8.31.163.87)
18:46:04 × chomwitt quits (~chomwitt@athedsl-20549.home.otenet.gr) (Ping timeout: 260 seconds)
18:46:53 × Chargen quits (~chargen@8.31.163.87) (Remote host closed the connection)
18:47:08 <geekosaur> it's usually plural even in that context: one scissor blade does not reliably cut paper…
18:47:18 Chargen joins (~chargen@8.31.163.87)
18:47:22 chomwitt joins (~chomwitt@athedsl-369869.home.otenet.gr)
18:47:36 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
18:47:36 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
18:47:36 wroathe joins (~wroathe@user/wroathe)
18:47:48 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
18:48:30 × Chargen quits (~chargen@8.31.163.87) (Remote host closed the connection)
18:49:05 Chargen joins (~chargen@8.31.163.87)
18:50:17 simendsjo joins (~user@84.211.91.241)
18:51:44 stef204 joins (~stef204@user/stef204)
18:52:22 × Chargen quits (~chargen@8.31.163.87) (Remote host closed the connection)
18:53:51 redb joins (~nmh@136.49.49.211)
18:55:13 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
18:57:14 zincy joins (~zincy@2a00:23c8:970c:4801:9dee:240c:5988:ddb8)
18:58:23 × redb quits (~nmh@136.49.49.211) (Ping timeout: 260 seconds)
19:00:51 <tdammers> geekosaur: C# and Db are not the same note, and you shouldn't treat them as being the same
19:01:18 <geekosaur> this all becomes much harder if you're not using a tempered chromatic scale…
19:01:45 <tdammers> even with equal temperament, the difference usually matters enough
19:01:54 <tdammers> unless you're into 12-tone serialism or sth like that
19:01:58 <tomsmeding> right, not sure it's helpful to go full music theory if the point of the exercise is to find some interesting ADTs :)
19:02:14 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 246 seconds)
19:02:27 × tfeb quits (~tfb@88.98.95.237) (Quit: died)
19:02:51 geekosaur is quite aware of music theory, but what tomsmeding said
19:02:54 <tdammers> anyway, how about making a toy JSON parser
19:03:22 redb joins (~nmh@136.49.49.211)
19:04:13 × toulene quits (~toulene@user/toulene) (Ping timeout: 260 seconds)
19:05:24 × Psybur quits (~Psybur@75.145.205.201) (Remote host closed the connection)
19:05:37 Psybur joins (~Psybur@75.145.205.201)
19:06:47 × ccntrq quits (~Thunderbi@2a01:e34:eccb:b060:de80:e6ed:5bb7:2742) (Remote host closed the connection)
19:06:58 jgeerds joins (~jgeerds@d5364b87.access.ecotel.net)
19:08:57 mikoto-c1 joins (~mikoto-ch@213.177.151.239)
19:09:28 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 260 seconds)
19:10:25 coot joins (~coot@213.134.190.95)
19:14:46 euandreh_ joins (~euandreh@2804:14c:33:9fe5:8f6:b4e8:3c37:fe15)
19:14:55 <maerwald> can you have infix pattern synonyms?
19:15:06 neurocyte861449 joins (~neurocyte@IP-045093110082.dynamic.medianet-world.de)
19:15:06 × neurocyte861449 quits (~neurocyte@IP-045093110082.dynamic.medianet-world.de) (Changing host)
19:15:06 neurocyte861449 joins (~neurocyte@user/neurocyte)
19:15:31 <maerwald> wondering if (:) could be made a type-class based pattern synonym
19:15:51 <tomsmeding> this works fine for me: data A = A Int Int ; pattern (:*) :: Int -> Int -> A ; pattern n :* m = A n m
19:15:52 <maerwald> for matching on text-like things
19:15:53 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
19:16:08 × neurocyte86144 quits (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds)
19:16:27 <tomsmeding> however (:) leads to "Illegal binding of built-in syntax: :"
19:16:47 <maerwald> excellent... will propose this to libraries ML and endure 3 decades of bikeshedding :D
19:16:52 <geekosaur> right, : itself is too magic
19:17:13 × euandreh quits (~euandreh@2804:14c:33:9fe5:7b2e:dcb2:6878:c267) (Ping timeout: 248 seconds)
19:19:58 × euandreh_ quits (~euandreh@2804:14c:33:9fe5:8f6:b4e8:3c37:fe15) (Ping timeout: 260 seconds)
19:20:27 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 268 seconds)
19:23:26 euandreh joins (~euandreh@2804:14c:33:9fe5:f0c2:a39b:5024:51c6)
19:23:33 Nahra joins (~user@static.161.95.99.88.clients.your-server.de)
19:26:44 lortabac joins (~lortabac@2a01:e0a:541:b8f0:631:4f7a:e035:2184)
19:27:48 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:29:39 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
19:31:19 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
19:31:36 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
19:31:44 jackhill is now known as KM4MBG
19:32:23 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
19:32:43 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
19:33:00 KM4MBG is now known as jackhill
19:33:33 Pickchea joins (~private@user/pickchea)
19:34:04 × benin quits (~benin@183.82.204.110) (Quit: The Lounge - https://thelounge.chat)
19:35:21 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
19:35:40 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
19:36:29 × dextaa_54 quits (~dextaa@user/dextaa) (Remote host closed the connection)
19:36:45 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
19:37:04 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
19:37:34 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
19:41:36 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
19:43:53 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
19:44:13 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
19:46:43 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
19:47:12 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
19:47:37 × doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 248 seconds)
19:50:04 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
19:50:21 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
19:50:36 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
19:50:56 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
19:51:15 × mud quits (~mud@user/kadoban) (Quit: quit)
19:51:51 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 260 seconds)
19:56:08 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
19:56:22 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
19:56:30 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
19:56:52 acidjnk joins (~acidjnk@p200300d0c7049f07dcc64cf45a5e1d49.dip0.t-ipconnect.de)
19:58:01 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
19:58:19 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
19:59:53 × alp_ quits (~alp@user/alp) (Ping timeout: 248 seconds)
20:01:01 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
20:01:21 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
20:03:06 × DNH quits (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:03:24 DNH joins (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898)
20:05:59 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
20:07:15 × gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 240 seconds)
20:07:50 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:09:08 MajorBiscuit joins (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48)
20:09:58 gehmehgeh joins (~user@user/gehmehgeh)
20:11:24 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
20:12:26 × zer0bitz quits (~zer0bitz@2001:2003:f750:a200:5019:823:a50e:5ee6) (Ping timeout: 245 seconds)
20:14:13 × simendsjo quits (~user@84.211.91.241) (Ping timeout: 260 seconds)
20:14:34 × HotblackDesiato_ quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection)
20:16:54 × briandaed quits (~root@109.95.142.93.r.toneticgroup.pl) (Remote host closed the connection)
20:17:39 × yauhsien quits (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
20:18:11 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
20:18:53 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
20:20:38 yauhsien joins (~yauhsien@61-231-21-149.dynamic-ip.hinet.net)
20:20:54 Lord_of_Life_ is now known as Lord_of_Life
20:22:35 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
20:22:49 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:22:53 fax joins (~fax@94.6.139.91)
20:24:33 × fax quits (~fax@94.6.139.91) (Remote host closed the connection)
20:24:51 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
20:25:12 × redb quits (~nmh@136.49.49.211) (Ping timeout: 268 seconds)
20:25:56 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
20:26:42 jil joins (~user@host-105-235-71-134.afnet.net)
20:26:57 <jil> hi
20:27:22 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:631:4f7a:e035:2184) (Quit: WeeChat 2.8)
20:27:59 <jil> I don't understand types in Haskell and the ghci message arising from `sqrt (length "abcd")`
20:28:16 <Rembane> > sqrt (length "abcd")
20:28:18 <lambdabot> error:
20:28:18 <lambdabot> • No instance for (Floating Int) arising from a use of ‘sqrt’
20:28:18 <lambdabot> • In the expression: sqrt (length "abcd")
20:28:32 <geekosaur> :t sqrt
20:28:34 <lambdabot> Floating a => a -> a
20:29:18 <jil> ok, but in ghci sqrt 4 will work fine. is 4 parsed as Floating ?
20:29:20 <jil> :t 4
20:29:21 <lambdabot> Num p => p
20:29:29 redb joins (~nmh@136.49.49.211)
20:29:31 × Psybur quits (~Psybur@75.145.205.201) (Read error: Connection reset by peer)
20:29:46 <geekosaur> sqrt requires a type which is an instance of Floating (that is, Float or Double or Complex Float or Complex Double)
20:29:52 <geekosaur> :t 4
20:29:53 <lambdabot> Num p => p
20:30:11 <geekosaur> numeric literals (only) can take any numeric type
20:30:17 <jil> :doc Num
20:30:34 <geekosaur> % :doc Num
20:30:34 <yahb> geekosaur: Basic numeric class.; The Haskell Report defines no laws for 'Num'. However, @('+')@ and @('*')@ are; customarily expected to define a ring and have the following properties:; [__Associativity of @('+')@__]: @(x + y) + z@ = @x + (y + z)@; [__Commutativity of @('+')@__]: @x + y@ = @y + x@; [__@'fromInteger' 0@ is the additive identity__]: @x + fromInteger 0@ = @x@; [__'negate' gives the additive
20:30:42 × ph88 quits (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Quit: Leaving)
20:30:48 <geekosaur> %% :doc Num
20:30:48 <yahb> geekosaur: http://qp.mniip.com/y/50
20:31:20 Psybur joins (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340)
20:31:32 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
20:31:42 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
20:32:23 <janus> oh cool , i didn't know you could give it two percentage signs
20:33:53 <jil> Can I coerce an Int to a Float ?
20:34:01 × Psybur quits (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340) (Read error: Connection reset by peer)
20:34:21 Psybur joins (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340)
20:34:22 ec joins (~ec@gateway/tor-sasl/ec)
20:34:32 <jil> I feel that coercing is not haskelish
20:35:02 <geekosaur> > fromIntegral (4 :: Int) :: Float
20:35:05 <lambdabot> 4.0
20:35:14 <geekosaur> you just have to be explicit about it
20:35:23 <geekosaur> (note that fromIntegral has shortcomings though)
20:36:08 pavonia joins (~user@user/siracusa)
20:36:13 × mvr_ quits (uid36976@id-36976.tinside.irccloud.com) (Quit: Connection closed for inactivity)
20:37:08 <jil> so coercion is not banded from Haskell world. Thank you.
20:37:30 <janus> is it safer to use realToFrac than using fromIntegral?
20:37:33 <janus> % realToFrac (5 :: Int) :: Float
20:37:33 <yahb> janus: 5.0
20:38:43 <danso> jil, it's helpful to not think of fromIntegral as a "coercion" or a "cast". it's a function that maps integer-ish things to numerical-ish things
20:39:03 <geekosaur> > realToFrac (9223372036854775808 :: Integer) :: Float
20:39:04 <lambdabot> 9.223372e18
20:39:23 <geekosaur> hm, need to format that better
20:39:37 × zincy quits (~zincy@2a00:23c8:970c:4801:9dee:240c:5988:ddb8) (Remote host closed the connection)
20:39:46 mud joins (~mud@user/kadoban)
20:40:20 <geekosaur> > Numeric.showFFloat (Just 18) (realToFrac (9223372036854775808 :: Integer) :: Float) ""
20:40:22 <lambdabot> "9223372000000000000.000000000000000000"
20:40:29 <jil> hum mapping between infinit set... Cantor is in the corner...
20:40:36 <geekosaur> whoops, overshot that mark
20:40:47 <geekosaur> also, Float can't handle the full precision, need Double
20:41:05 <geekosaur> > Numeric.showFFloat (Just 1) (realToFrac (9223372036854775808 :: Integer) :: Double) ""
20:41:07 <lambdabot> "9223372036854776000.0"
20:41:29 × motherfsck quits (~motherfsc@user/motherfsck) (Quit: bye)
20:41:51 <geekosaur> this is a limitation of the type, though, not of realToFrac
20:42:02 <geekosaur> wonder if we have a 128 bit floating type around
20:43:23 × MajorBiscuit quits (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) (Ping timeout: 260 seconds)
20:46:23 <janus> I guess it is slightly worse since it is too complicated for this use case. But not less safe because it loses precision just the same
20:47:05 <geekosaur> well, the key point is it's not truncating at 4GB
20:49:29 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 248 seconds)
20:50:47 <janus> Oh, so it is actually preferrable to use realToFrac when able, because you rule out a certain class of precision loss?
20:51:53 <janus> Like, it seems I can't go from Int64 -> Int32 with realToFrac, but I can with fromInteger. And that is a weird operation where you e.g. put in maxBound and you get -1 out
20:52:04 <janus> % fromIntegral (maxBound :: Int64) :: Int32
20:52:04 <yahb> janus: -1
20:52:55 hololeap joins (~hololeap@user/hololeap)
20:53:35 × hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds)
20:54:30 <jil> sorry I still do get how to use realToFrac say
20:54:35 <jil> perfect_sqrt :: [Char] -> Int
20:54:42 <jil> perfect_sqrt xs = sqrt ((realToFrac (length xs) :: Int) :: Float)
20:55:34 <monochrom> I was hoping that Foreign.C.Type would have CLongDouble heh. (But no, boo...)
20:56:53 <monochrom> readToFrac clearly targets Fractional codomains; Intwhatever clearly is not an instance.
20:57:38 × crazazy quits (~user@130.89.171.62) (Ping timeout: 272 seconds)
20:57:52 <monochrom> For Int* -> Double though, I don't expect that it matters which one you use. Toss a coin.
20:58:32 MajorBiscuit joins (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48)
20:59:20 <telser> jil: Note that sqrt is 'Floating a => a -> a' so you cannot return an 'Int' like your type signature says. That is to say it gives back a type matching the input (as you have written it, Float). and that type must have an instance of the 'Floating' class (some options were mentioned above).
21:00:00 × jushur quits (~human@user/jushur) (Quit: ¯\_(ツ)_/¯)
21:00:04 <jil> sqrt (realToFrac ((length "abcd") :: Int) :: Float)
21:00:31 <geekosaur> :t sqrt (realToFrac ((length "abcd") :: Int) :: Float)
21:00:33 <lambdabot> Float
21:00:39 <geekosaur> not Int
21:01:07 <jil> yes
21:01:15 <monochrom> You can omit ":: Float" and you'll get Double by default, which is actually better most of the time.
21:01:35 <jil> ok
21:02:42 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds)
21:02:49 <jil> I'm starting to get it. Thank you
21:04:34 <jil> What is that * for in Int* and why is it similar to Double ?
21:05:02 <monochrom> My notation for covering all of Int8, Int16, Int32, Int64, Int, Integer.
21:05:51 <monochrom> But where did I say it's similar to Double?
21:07:21 <jil> I'm not sure. What did you mean then by "I don't expect that it matters which one you use. Toss a coin"
21:08:01 <monochrom> For Int -> Double you can use fromIntegral or you can use realToFrac and at the end of the day it doesn't matter.
21:08:17 <jil> ok
21:08:18 × Psybur quits (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340) (Read error: Connection reset by peer)
21:08:26 <monochrom> For some other conversions, one of them is a type error so it's an easy choice: use the other.
21:08:37 Psybur joins (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba)
21:10:10 <jil> Thank you again.
21:10:15 jil parts (~user@host-105-235-71-134.afnet.net) (ERC (IRC client for Emacs 27.2))
21:11:03 × kaph quits (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Read error: Connection reset by peer)
21:14:08 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
21:14:26 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
21:15:29 × Tuplanolla quits (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Remote host closed the connection)
21:15:42 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
21:16:01 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
21:16:41 × MajorBiscuit quits (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) (Ping timeout: 248 seconds)
21:17:40 vysn joins (~vysn@user/vysn)
21:17:48 <geekosaur> well, there's also https://github.com/haskell-crypto/cryptonite/issues/330
21:17:57 <geekosaur> which has fromIntegral truncating
21:18:04 <geekosaur> so some care is needed
21:19:31 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
21:19:43 <monochrom> But I suspect that most programmers from other languages expect, even rely on, truncations already.
21:19:57 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.5)
21:24:32 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
21:24:48 × euandreh quits (~euandreh@2804:14c:33:9fe5:f0c2:a39b:5024:51c6) (Ping timeout: 260 seconds)
21:24:50 fax joins (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b)
21:28:26 × fax quits (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection)
21:29:44 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
21:31:16 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:37:47 × acidjnk quits (~acidjnk@p200300d0c7049f07dcc64cf45a5e1d49.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
21:37:58 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
21:39:07 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
21:42:55 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds)
21:43:47 ss- joins (~ss-@187.83.249.216.dyn.smithville.net)
21:44:44 kaph joins (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it)
21:45:06 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
21:47:21 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
21:49:11 × Xplorator quits (~Xplorator@176.166.206.65) (Quit: Leaving)
21:49:33 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:50:29 MajorBiscuit joins (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48)
21:56:12 × Psybur quits (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Ping timeout: 240 seconds)
21:59:33 × p3n_ quits (~p3n@217.198.124.246) (Ping timeout: 268 seconds)
22:00:08 Psybur joins (~Psybur@2600:1003:b1ac:150e:71e7:cd72:569e:9a95)
22:00:15 p3n joins (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1)
22:03:02 euandreh joins (~euandreh@2804:14c:33:9fe5:3dd7:b2a5:f63f:5163)
22:04:03 × tired quits (~tired@user/tired) (Read error: Connection reset by peer)
22:04:15 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds)
22:04:28 tired joins (~tired@user/tired)
22:04:50 hololeap joins (~hololeap@user/hololeap)
22:07:25 × MajorBiscuit quits (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) (Quit: WeeChat 3.4)
22:07:39 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
22:09:18 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
22:09:37 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
22:12:13 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds)
22:15:53 × vysn quits (~vysn@user/vysn) (Ping timeout: 248 seconds)
22:16:40 × tiferrei2000 quits (~tiferrei@user/tiferrei) (Remote host closed the connection)
22:16:48 × jgeerds quits (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 272 seconds)
22:20:07 × kaph quits (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Remote host closed the connection)
22:20:11 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:20:27 kaph joins (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it)
22:20:59 × cosimone quits (~user@93-47-228-79.ip115.fastwebnet.it) (Ping timeout: 252 seconds)
22:25:39 × tired quits (~tired@user/tired) (Quit: /)
22:27:09 tired joins (~tired@user/tired)
22:28:33 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:32:33 × mikoto-c1 quits (~mikoto-ch@213.177.151.239) (Quit: mikoto-c1)
22:32:47 mikoto-chan joins (~mikoto-ch@213.177.151.239)
22:41:28 <redb> Hey could I get some help with Record syntax? https://paste.tomsmeding.com/6v1HrUEg
22:41:48 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
22:42:16 × coot quits (~coot@213.134.190.95) (Quit: coot)
22:42:25 <redb> Hey could I get some help with Record syntax? https://paste.tomsmeding.com/6v1HrUEg Basically I want to add elements to a record and change the type while I do so
22:42:48 <redb> Yikes sorry about that my IRC client was delayed
22:43:37 × chomwitt quits (~chomwitt@athedsl-369869.home.otenet.gr) (Ping timeout: 248 seconds)
22:44:30 <d34df00d> You can't do it this way.
22:45:02 <redb> Dang, do I have to unpack the values and make another record?
22:45:20 <d34df00d> I'd probably go with -XRecordWildcards and do smth like superToDerive SuperType{ .. } c = DeriveType{ .. }
22:45:47 <d34df00d> That _might_ work, but might also not work — I'm never able to remember the rules when the fields disambiguator actually works (and you'll need extensions for that).
22:45:58 <abastro[m]> Ye haskell does not permit record polymorphism
22:46:50 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
22:48:48 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
22:49:54 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4.1)
22:51:09 <abastro[m]> s/record polymorphism/row type polymorphism
22:54:26 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
22:55:48 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:56:37 × jtmar quits (~james@jtmar.me) (Ping timeout: 256 seconds)
22:56:46 jamestmartin joins (~james@jtmar.me)
23:00:28 × Psybur quits (~Psybur@2600:1003:b1ac:150e:71e7:cd72:569e:9a95) (Ping timeout: 260 seconds)
23:02:09 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
23:02:13 Psybur joins (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba)
23:04:27 hololeap_ joins (~hololeap@user/hololeap)
23:04:54 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection)
23:04:55 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds)
23:06:10 Macbethwin joins (~chargen@D964062A.static.ziggozakelijk.nl)
23:06:29 deadmarshal_ joins (~deadmarsh@95.38.116.176)
23:09:53 Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com)
23:10:27 × DNH quits (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:10:44 × deadmarshal_ quits (~deadmarsh@95.38.116.176) (Ping timeout: 246 seconds)
23:11:26 × BlackboardN quits (~Blackboar@user/BlackboardN) (Ping timeout: 246 seconds)
23:11:31 BlackboardN_ joins (~Blackboar@user/BlackboardN)
23:14:01 <Henson> say I have a function (f :: a -> b a) and I want to adjust it so that I can bundle some extra data of type c along with the a into a type of (a,c) or something like that. Is there a way I can make a function (g :: (a,c) -> b (a,c)) that is able to make use of f and pass this "bundled" data through without having to rewrite f?
23:14:24 <Henson> not necessarily needing to use tuples in this, just using tuples as an example of one way of bundling the a and c data together.
23:14:29 × off^ quits (~off@c-24-99-107-170.hsd1.ga.comcast.net) (Ping timeout: 250 seconds)
23:14:35 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
23:14:55 off^ joins (~off@c-24-99-107-170.hsd1.ga.comcast.net)
23:15:24 <Henson> normally I would just rewrite the f function to carry the bundled data through, but perhaps there's some abstraction of which I am unaware that would make this easy and make rewriting unnecessary or simpler.
23:15:49 <geekosaur> anything y7ou might attempt that way would change the type of f
23:18:16 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
23:18:47 × Macbethwin quits (~chargen@D964062A.static.ziggozakelijk.nl) (Ping timeout: 246 seconds)
23:20:04 <jackdk> Henson: Data.Profunctor.Strong : https://hackage.haskell.org/package/profunctors-5.6.2/docs/Data-Profunctor-Strong.html#v:first-39-
23:20:19 <Henson> geekosaur: right, but if I've got f made already, and it's a complicated function, is there some way I can associate some extra data "c" with the "a" that is not used at all in f, but is carried through. So something like "k :: (a -> b a) -> ((a,c) -> b (a,c))" that take take in "f" and transform it to "g"
23:21:02 <jackdk> If `b` is a `Functor` in your `a -> b a` example, then you will want to use the `Star` newtype also: https://hackage.haskell.org/package/profunctors-5.6.2/docs/Data-Profunctor-Types.html#t:Star
23:21:35 machinedgod joins (~machinedg@24.105.81.50)
23:22:48 <Henson> jackdk: thank you for the references. I'll take a look at those.
23:24:58 theproffesor joins (~theproffe@2601:282:847f:7f00::87)
23:26:40 motherfsck joins (~motherfsc@user/motherfsck)
23:27:07 <jackdk> % :m + Data.Profunctor
23:27:07 <yahb> jackdk:
23:27:18 <jackdk> % :t runStar . first' . Star -- Henson
23:27:18 <yahb> jackdk: Functor f => (a -> f b) -> (a, c) -> f (b, c)
23:27:28 <jackdk> %: m - Data.Profunctor
23:27:37 <jackdk> % :m - Data.Profunctor
23:27:37 <yahb> jackdk:
23:29:32 cosimone joins (~user@93-47-228-79.ip115.fastwebnet.it)
23:30:37 × liz quits (~liz@host109-151-125-217.range109-151.btcentralplus.com) (Quit: leaving)
23:30:59 <Henson> jackdk: so "runStar . first' . Star" would essentially be the "k" function, provided that b is a functor, which in my case I think it can be made a functor.
23:31:52 <jackdk> Yeah, and whatever you do you'll probably need `b` to be a `Functor` anyway
23:32:31 <Henson> jackdk: yep. Ok, that's totally awesome, and should save me a bunch of work. I'll test that tomorrow.
23:33:31 <dons> moin moin
23:33:44 <geekosaur> o/
23:33:46 <jackdk> sup dons
23:34:51 <dons> going to be a great day. i have a program that reads graphs , currently uses about 10G of ram to process 1G of input data. (does some graph flattening stuff). /me cracks knuckles. time to optimize.
23:37:30 Henson chuckles
23:37:41 Guest27 joins (~Guest27@2601:281:d47f:1590::6b90)
23:37:53 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
23:41:41 <Guest27> Wondering if there's a "temporary" version of withStateT that doesn't keep the modified state. Something like
23:41:42 <Guest27> ```
23:41:42 <Guest27> withTempStateT f m = StateT $ \s -> do
23:41:43 <Guest27>   a <- evalStateT (f s) m
23:41:43 <Guest27>   return (a, s)
23:41:44 <Guest27> ```
23:42:13 <dons> ReaderT ? sounds like `local`
23:42:34 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:42:37 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:42:47 <dons> its not uncommon for State things to really be scoped/local things that can run in Reader, https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-Reader.html ?
23:42:48 <Guest27> Ah you're right, that makes more sense for something read-only
23:44:00 × Psybur quits (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Remote host closed the connection)
23:44:13 <Guest27> Still trying to think more functionally than imperative ;)
23:44:40 × [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Client Quit)
23:45:54 Psybur joins (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba)
23:46:05 × xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x)
23:46:47 mvk joins (~mvk@2607:fea8:5ce3:8500::9d5a)
23:50:29 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
23:54:55 × tired quits (~tired@user/tired) (Quit: /)
23:55:34 Codaraxis_ joins (~Codaraxis@user/codaraxis)
23:55:39 tired joins (~tired@user/tired)
23:59:11 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 268 seconds)

All times are in UTC on 2022-04-05.