2022/11/10

2022-11-10 00:00:29 +0100davetapley_davetapley
2022-11-10 00:00:51 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-11-10 00:01:26 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-11-10 00:01:29 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-11-10 00:01:49 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 00:01:57 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-11-10 00:03:06 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-11-10 00:03:37 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-11-10 00:05:24 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds)
2022-11-10 00:07:34 +0100king_gs(~Thunderbi@187.201.139.206)
2022-11-10 00:09:12 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-11-10 00:09:49 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 00:12:53 +0100caryhartline(~caryhartl@2603-8080-6a0e-8d88-f17d-11d4-8563-7e31.res6.spectrum.com) (Quit: caryhartline)
2022-11-10 00:15:09 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Write error: Connection reset by peer)
2022-11-10 00:15:09 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-11-10 00:15:09 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-11-10 00:15:09 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Write error: Connection reset by peer)
2022-11-10 00:15:09 +0100jpds1(~jpds@gateway/tor-sasl/jpds) (Read error: Connection reset by peer)
2022-11-10 00:15:40 +0100jpds1(~jpds@gateway/tor-sasl/jpds)
2022-11-10 00:15:46 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 00:16:12 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-11-10 00:16:24 +0100Topsi(~Topsi@ipb218f772.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2022-11-10 00:16:54 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
2022-11-10 00:17:46 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 00:18:54 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-11-10 00:19:59 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 00:24:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 00:25:02 +0100libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz)
2022-11-10 00:27:32 +0100acidjnk_new3(~acidjnk@p200300d6e7137a22cc0b0087e9762ec4.dip0.t-ipconnect.de) (Remote host closed the connection)
2022-11-10 00:27:56 +0100acidjnk_new3(~acidjnk@p200300d6e7137a22148497ca67644ae3.dip0.t-ipconnect.de)
2022-11-10 00:33:43 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 00:36:03 +0100king_gs1(~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
2022-11-10 00:36:35 +0100king_gs(~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
2022-11-10 00:36:35 +0100king_gs1king_gs
2022-11-10 00:38:30 +0100chele(~chele@user/chele) (Remote host closed the connection)
2022-11-10 00:41:10 +0100king_gs(~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 260 seconds)
2022-11-10 00:41:20 +0100king_gs1(~Thunderbi@187.201.139.206)
2022-11-10 00:43:37 +0100king_gs1king_gs
2022-11-10 00:44:56 +0100polo_(~polo@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-11-10 00:49:48 +0100kaskal-(~kaskal@089144200035.atnat0009.highway.a1.net)
2022-11-10 00:50:33 +0100kaskal(~kaskal@2001:4bb8:2dc:7b0e:55ee:692c:e44d:a4b0) (Ping timeout: 246 seconds)
2022-11-10 00:53:03 +0100polo_(~polo@pool-100-11-18-203.phlapa.fios.verizon.net) (Changing host)
2022-11-10 00:53:03 +0100polo_(~polo@user/polo)
2022-11-10 01:00:50 +0100king_gs(~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
2022-11-10 01:01:06 +0100king_gs(~Thunderbi@187.201.139.206)
2022-11-10 01:01:24 +0100shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-11-10 01:01:26 +0100polo_(~polo@user/polo) (Ping timeout: 276 seconds)
2022-11-10 01:02:11 +0100justsomeguy(~justsomeg@user/justsomeguy)
2022-11-10 01:04:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 01:10:28 +0100cdoltb^(~cdoltb@76.145.185.103)
2022-11-10 01:12:41 +0100gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2022-11-10 01:15:26 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
2022-11-10 01:15:44 +0100justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
2022-11-10 01:17:37 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-11-10 01:18:24 +0100gentauro(~gentauro@user/gentauro)
2022-11-10 01:20:04 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 252 seconds)
2022-11-10 01:35:01 +0100Tuplanolla(~Tuplanoll@91-159-69-11.elisa-laajakaista.fi) (Quit: Leaving.)
2022-11-10 01:36:18 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-11-10 01:38:05 +0100thegeekinside(~thegeekin@189.180.56.84) (Ping timeout: 246 seconds)
2022-11-10 01:38:22 +0100titibandit(~titibandi@xdsl-87-78-8-6.nc.de) (Remote host closed the connection)
2022-11-10 01:38:27 +0100thegeekinside(~thegeekin@187.145.44.76)
2022-11-10 01:39:30 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 01:43:47 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-11-10 01:44:09 +0100talismanick(~talismani@76.133.152.122)
2022-11-10 01:46:28 +0100Xeroine(~Xeroine@user/xeroine)
2022-11-10 01:52:38 +0100titibandit(~titibandi@xdsl-87-78-8-6.nc.de)
2022-11-10 01:53:05 +0100titibandit(~titibandi@xdsl-87-78-8-6.nc.de) (Remote host closed the connection)
2022-11-10 01:56:10 +0100iqubic(~iqubic@2601:602:9502:c70:512:a30e:b15a:1a46)
2022-11-10 01:57:34 +0100 <iqubic> Does anyone know why the Read instance of Data.Time.LocalTime's TimeZone only accepts abbreviations for a limited number of time zones?
2022-11-10 01:57:41 +0100mmhat(~mmh@p200300f1c70f4134ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1)
2022-11-10 01:58:00 +0100king_gs(~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
2022-11-10 01:58:13 +0100king_gs(~Thunderbi@187.201.139.206)
2022-11-10 01:58:25 +0100 <geekosaur> because abbreviations aren't reliable (quick, what's IST?) and can change
2022-11-10 01:58:44 +0100 <geekosaur> so only the most common and most likely to be unique and fixed are provided
2022-11-10 01:58:50 +0100 <iqubic> I think IST is India Standard Time.
2022-11-10 01:58:58 +0100 <geekosaur> or Iceland or Israel
2022-11-10 01:59:01 +0100 <dsal> How about EST?
2022-11-10 01:59:21 +0100 <iqubic> EST is definitely Eastern Standard Time
2022-11-10 01:59:49 +0100 <dsal> Yeah, Australians agree.
2022-11-10 02:00:01 +0100 <iqubic> I see... That makes sense.
2022-11-10 02:02:08 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 02:10:44 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
2022-11-10 02:11:58 +0100 <EvanR> the TimeZone in Data.Time is just a shift and some letters
2022-11-10 02:12:31 +0100 <EvanR> nothing official, unlike timezone-series + timezone-olsen
2022-11-10 02:13:22 +0100 <EvanR> if the meaning of the letters isn't that imporant TimeZone is fine
2022-11-10 02:13:33 +0100 <iqubic> What are timezone-series and timezone-olsen?
2022-11-10 02:14:06 +0100 <EvanR> TimeZoneSeries is a historical progression of what a timezone meant through history
2022-11-10 02:14:22 +0100 <EvanR> timezone-olsen gives you access to read the database files to load the series
2022-11-10 02:14:52 +0100 <EvanR> e.g. Central Time (US & Canada) is more complex than a single shift
2022-11-10 02:15:02 +0100 <iqubic> I'm not sure when those would ever be used over just the standard time library.
2022-11-10 02:15:13 +0100 <EvanR> though now I'm skeptical US and Canada always agreed on Central time at all points in time
2022-11-10 02:15:13 +0100 <geekosaur> when you want accurate timezone information
2022-11-10 02:15:39 +0100 <geekosaur> the olsen databases are regularly updated as timezone information changes
2022-11-10 02:16:20 +0100 <geekosaur> and retains historical information so you can accuratelky reconstruct timezones (to the extent it's possible) for past times as well
2022-11-10 02:16:37 +0100 <iqubic> Are there Haskell library for those?
2022-11-10 02:16:46 +0100 <EvanR> that's what I was talking about, those are on hackage
2022-11-10 02:16:46 +0100 <geekosaur> those are the haskell library names
2022-11-10 02:16:56 +0100 <iqubic> Oh. I see.
2022-11-10 02:17:01 +0100 <geekosaur> your OS already uses the olsen database
2022-11-10 02:18:10 +0100 <geekosaur> (or equivalent e.g. on windows)
2022-11-10 02:18:44 +0100Feuermagier(~Feuermagi@user/feuermagier)
2022-11-10 02:18:44 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 248 seconds)
2022-11-10 02:18:58 +0100 <iqubic> You don't know what OS I'm on. But yeah, I assume NixOS uses the olsen db
2022-11-10 02:19:36 +0100xff0x(~xff0x@2405:6580:b080:900:8031:9588:bb65:20be) (Ping timeout: 252 seconds)
2022-11-10 02:19:40 +0100 <EvanR> since the order I read words in messages is undefined, you don't know if I don't know that xD
2022-11-10 02:20:10 +0100 <iqubic> Haha....
2022-11-10 02:20:51 +0100 <dsal> hasql th's fold thing introduces a local called `init` which causes a shadow warning. I guess that sort of makes sense.
2022-11-10 02:21:03 +0100 <geekosaur> right, but everyone except windows uses olsen. microsoft has an equivalent in their own proprietary format
2022-11-10 02:21:29 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-11-10 02:21:56 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-11-10 02:21:56 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-11-10 02:22:00 +0100 <iqubic> MS always has an equivalent in their own proprietary format. Doesn't matter what it is we're talking about, but MS has their own version
2022-11-10 02:22:33 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 02:22:37 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-11-10 02:24:08 +0100acidjnk_new3(~acidjnk@p200300d6e7137a22148497ca67644ae3.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2022-11-10 02:25:34 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-11-10 02:27:52 +0100 <iqubic> What's the canonical way to pronounce "hasql"?
2022-11-10 02:29:55 +0100 <dsal> Many things are best left unsaid.
2022-11-10 02:30:14 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
2022-11-10 02:30:30 +0100causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d)
2022-11-10 02:30:49 +0100 <dsal> I did get this working under postgresql-simple, but along the way I learned that it's terrible and will never improve.
2022-11-10 02:31:05 +0100 <sm> haskwl, of course
2022-11-10 02:34:18 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 02:36:50 +0100causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d) (Ping timeout: 252 seconds)
2022-11-10 02:41:24 +0100chromoblob(~user@37.113.164.122)
2022-11-10 02:46:22 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-11-10 02:48:46 +0100 <iqubic> How does Servant convert a text based QueryParam into a piece of usable data?
2022-11-10 02:49:03 +0100nate4(~nate@98.45.169.16)
2022-11-10 02:49:41 +0100 <iqubic> Like, how does Servant handle something of type: QueryParam "value" Integer
2022-11-10 02:50:57 +0100causal(~user@50.35.83.177)
2022-11-10 02:52:30 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-11-10 02:54:07 +0100nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-11-10 02:57:19 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 260 seconds)
2022-11-10 03:02:36 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-11-10 03:04:04 +0100thegeekinside(~thegeekin@187.145.44.76) (Ping timeout: 248 seconds)
2022-11-10 03:05:10 +0100thegeekinside(~thegeekin@189.180.42.11)
2022-11-10 03:10:50 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
2022-11-10 03:11:57 +0100 <Axman6> iqubic: look at the instances for https://hackage.haskell.org/package/servant-0.19.1/docs/Servant-API.html#t::-62- - you'll see: (KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type)
2022-11-10 03:12:17 +0100 <Axman6> https://hackage.haskell.org/package/servant-0.19.1/docs/Servant-API.html#t:ToHttpApiData is what takes care of the convertion
2022-11-10 03:12:22 +0100 <Axman6> conversion*
2022-11-10 03:15:16 +0100libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Ping timeout: 248 seconds)
2022-11-10 03:15:16 +0100king_gs(~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
2022-11-10 03:15:57 +0100king_gs(~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
2022-11-10 03:22:32 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 03:25:31 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-11-10 03:25:56 +0100 <iqubic> Axman6: You sure it's not instead? https://www.servant.dev/servant/Servant-Common-Text.html#t:FromText
2022-11-10 03:26:12 +0100 <iqubic> s/not/not this/
2022-11-10 03:26:35 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 246 seconds)
2022-11-10 03:29:37 +0100notzmv(~zmv@user/notzmv)
2022-11-10 03:31:31 +0100frost12(~frost@user/frost)
2022-11-10 03:31:47 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-11-10 03:32:22 +0100frost12(~frost@user/frost) (Client Quit)
2022-11-10 03:32:27 +0100libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz)
2022-11-10 03:32:43 +0100frost52(~frost@103.164.81.123)
2022-11-10 03:34:09 +0100beka(~beka@104.193.170.240) (Ping timeout: 252 seconds)
2022-11-10 03:40:05 +0100frostsdasd(~frostsdas@103.164.81.123)
2022-11-10 03:41:16 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-11-10 03:42:06 +0100razetime(~quassel@117.193.3.56)
2022-11-10 03:43:17 +0100frostsdasd(~frostsdas@103.164.81.123) (Client Quit)
2022-11-10 03:43:38 +0100frost48(~frost@user/frost)
2022-11-10 03:43:39 +0100frost52(~frost@103.164.81.123) (Quit: Client closed)
2022-11-10 03:43:53 +0100frost48(~frost@user/frost) (Client Quit)
2022-11-10 03:44:00 +0100frost56(~frost@user/frost)
2022-11-10 03:44:46 +0100frost56(~frost@user/frost) (Client Quit)
2022-11-10 03:52:41 +0100iqubic(~iqubic@2601:602:9502:c70:512:a30e:b15a:1a46) (Quit: Client closed)
2022-11-10 04:05:45 +0100iqubic(~iqubic@2601:602:9502:c70:512:a30e:b15a:1a46)
2022-11-10 04:06:04 +0100 <iqubic> Axman6: Did I miss your response? My irc client disconnected me for some reason
2022-11-10 04:06:31 +0100 <Axman6> uh, yeah actually that's the wrong instance, I missed that that was the HasLink instance
2022-11-10 04:07:04 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-11-10 04:07:11 +0100 <Axman6> It would be this lovely instance: (KnownSymbol sym, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (QueryParam' mods sym a :> api :: Type) context
2022-11-10 04:07:17 +0100 <Axman6> https://hackage.haskell.org/package/servant-server-0.19.2/docs/Servant-Server.html#t:HasServer
2022-11-10 04:07:35 +0100 <Axman6> which requires FromHttpApiData
2022-11-10 04:08:46 +0100 <iqubic> That sounds complex
2022-11-10 04:08:52 +0100 <Axman6> it's not
2022-11-10 04:09:13 +0100 <iqubic> Parsing a QueryParam into anything other than the predefined things sounds hard.
2022-11-10 04:09:26 +0100 <Axman6> "the predefined things"?
2022-11-10 04:09:59 +0100 <Axman6> you just need to implement the FromHttpApiData class, which is usually pretty easy: https://hackage.haskell.org/package/http-api-data-0.5/docs/Web-Internal-HttpApiData.html#t:FromHtt…
2022-11-10 04:10:06 +0100 <iqubic> Predefined as in something like QueryParam "value" Integer
2022-11-10 04:10:31 +0100 <iqubic> Because Parsing something into an Integer is easy
2022-11-10 04:11:03 +0100 <Axman6> it's pretty rare that you'd want something much more complex than a number, string, data or ID in a query param
2022-11-10 04:11:34 +0100 <iqubic> What are data and ID there?
2022-11-10 04:12:23 +0100 <iqubic> Also, I know that you can have Servant Parse out Filter and Sort options using a predefined syntax. I don't know much about how that works though.
2022-11-10 04:12:26 +0100 <Axman6> uh, data = date
2022-11-10 04:12:40 +0100 <Axman6> ID I mean a number, or UUID generally
2022-11-10 04:13:01 +0100 <iqubic> Oh? What does Date mean in this context?
2022-11-10 04:14:43 +0100beka(~beka@104-244-24-117.PUBLIC.monkeybrains.net)
2022-11-10 04:14:53 +0100 <Axman6> ... a date?
2022-11-10 04:15:42 +0100 <iqubic> Yeah, but what's the datatype associated with dates? How do I tell Servant that a given QueryParam should be parsed as a date?
2022-11-10 04:15:55 +0100 <Axman6> Day
2022-11-10 04:16:08 +0100 <Axman6> >>> toGregorian <$> parseUrlPiece "2016-12-01"
2022-11-10 04:16:09 +0100 <Axman6> Right (2016,12,1)
2022-11-10 04:16:14 +0100 <Axman6> from the docs I linked to
2022-11-10 04:16:35 +0100 <iqubic> I se.
2022-11-10 04:17:05 +0100 <iqubic> Is that using Day from Data.Time?
2022-11-10 04:17:41 +0100 <Axman6> how about you tell me by going to the link I already provided you and not being so lazy? I thought you stopped doing this months ago
2022-11-10 04:17:43 +0100td_(~td@83.135.9.26) (Ping timeout: 252 seconds)
2022-11-10 04:17:52 +0100 <dibblego> lol nah
2022-11-10 04:18:07 +0100 <iqubic> Yeah. Sorry about that. I should really get better at reading the docs
2022-11-10 04:18:18 +0100 <iqubic> I'll stop wasting everyone's time.
2022-11-10 04:19:19 +0100td_(~td@83.135.9.55)
2022-11-10 04:19:53 +0100 <Axman6> you're welcome to ask questions, but when you've been given the answer, you should probably read it before asking more
2022-11-10 04:20:03 +0100 <iqubic> I agree
2022-11-10 04:20:08 +0100 <iqubic> I'll do that from now on.
2022-11-10 04:20:28 +0100 <dibblego> good job
2022-11-10 04:21:04 +0100 <monochrom> If you are licensed to drive a car, and your region has a thing called "stop sign", you probably have heard of "rolling stop", meaning at the stop sign you don't stop as legally required, you merely don't step on the throttle pedal (nor the brake pedal though) and just let the car slowly go past.
2022-11-10 04:21:05 +0100king_gs(~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 260 seconds)
2022-11-10 04:21:29 +0100 <monochrom> Well, some of my students' idea of "reading" my slides is equivalent to rolling stop.
2022-11-10 04:21:34 +0100 <dibblego> (not in Australia)
2022-11-10 04:21:48 +0100 <iqubic> What does that mean monochrom_?
2022-11-10 04:22:04 +0100 <iqubic> Does that mean your students just  skim your slides?
2022-11-10 04:22:35 +0100 <monochrom> Well, my student asks my a question. The answer is already on my slides. So I say "find it in my lecture 5 slides". The student scrolls quickly and reports "not found".
2022-11-10 04:22:57 +0100 <iqubic> I'm sorry you have to deal with that.
2022-11-10 04:24:07 +0100 <dibblego> when a licenced pilot asks you a question that is answered directly in the legal document... it's because their instructor did not hurt them enough about during initial training
2022-11-10 04:24:49 +0100thegeekinside(~thegeekin@189.180.42.11) (Ping timeout: 260 seconds)
2022-11-10 04:27:04 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-11-10 04:27:41 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 04:27:41 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-11-10 04:27:41 +0100finn_elijaFinnElija
2022-11-10 04:31:47 +0100nate4(~nate@98.45.169.16)
2022-11-10 04:34:24 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-11-10 04:36:07 +0100chromoblob(~user@37.113.164.122)
2022-11-10 04:40:34 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-11-10 04:42:41 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-11-10 04:43:39 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-11-10 04:47:30 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 04:53:47 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 248 seconds)
2022-11-10 05:00:44 +0100jpds1(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-11-10 05:00:45 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-11-10 05:01:41 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-11-10 05:02:17 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 05:08:11 +0100razetime(~quassel@117.193.3.56) (Ping timeout: 248 seconds)
2022-11-10 05:10:24 +0100king_gs(~Thunderbi@187.201.139.206)
2022-11-10 05:11:04 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 252 seconds)
2022-11-10 05:11:43 +0100mbuf(~Shakthi@49.204.118.65)
2022-11-10 05:21:06 +0100chromoblob(~user@37.113.164.122)
2022-11-10 05:21:17 +0100Neuromancer(~Neuromanc@user/neuromancer)
2022-11-10 05:29:24 +0100johnw(~johnw@2600:1700:cf00:db0:8ded:5d2b:1bf3:1aca)
2022-11-10 05:31:58 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-11-10 05:34:19 +0100nate4(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-11-10 05:36:36 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 248 seconds)
2022-11-10 05:49:37 +0100 <dsal> It doesn't look like hasql provides an abstraction for running a SQL query and reflectively processing the results. Am I missing something?
2022-11-10 05:52:19 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 05:53:55 +0100EsoAlgo8(~EsoAlgo@129.146.136.145)
2022-11-10 05:54:37 +0100EsoAlgo(~EsoAlgo@129.146.136.145) (Read error: Connection reset by peer)
2022-11-10 05:54:37 +0100EsoAlgo8EsoAlgo
2022-11-10 05:55:48 +0100beka(~beka@104-244-24-117.PUBLIC.monkeybrains.net) (Ping timeout: 248 seconds)
2022-11-10 05:59:33 +0100 <iqubic> I have a Time package question. If I have a TimeZone value, is it possible to get the current UTC Time (in an IO function) and convert it via said TimeZone
2022-11-10 06:03:35 +0100 <dsal> https://hackage.haskell.org/package/time-1.12.2/docs/Data-Time-LocalTime.html#v:utcToLocalTime
2022-11-10 06:03:57 +0100 <dsal> @hoogle
2022-11-10 06:03:58 +0100 <lambdabot> package base
2022-11-10 06:03:58 +0100 <lambdabot> package bytestring
2022-11-10 06:03:58 +0100 <lambdabot> package containers
2022-11-10 06:04:22 +0100 <iqubic> Thank you
2022-11-10 06:04:27 +0100 <dsal> @hoogle (TimeZone -> UTCTime -> LocalTime) -- oops, accidentally hit enter
2022-11-10 06:04:28 +0100 <lambdabot> Data.Time.LocalTime utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
2022-11-10 06:04:28 +0100 <lambdabot> RIO.Time utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
2022-11-10 06:04:28 +0100 <lambdabot> Data.Thyme.Time.Core utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
2022-11-10 06:04:42 +0100 <dsal> You'd expect timezone first because the curry is tastier.
2022-11-10 06:05:25 +0100 <iqubic> @hoogle IO UTCTime
2022-11-10 06:05:26 +0100 <lambdabot> Util getModificationUTCTime :: FilePath -> IO UTCTime
2022-11-10 06:05:43 +0100 <iqubic> Really? There's no way to just get the current UTCTime?
2022-11-10 06:06:30 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-11-10 06:08:14 +0100Xeroine(~Xeroine@user/xeroine)
2022-11-10 06:10:25 +0100 <dsal> @hoogle (IO UTCTime)
2022-11-10 06:10:26 +0100 <lambdabot> Data.Time.Clock getCurrentTime :: IO UTCTime
2022-11-10 06:10:26 +0100 <lambdabot> Data.Time.Clock.POSIX getCurrentTime :: IO UTCTime
2022-11-10 06:10:26 +0100 <lambdabot> ClassyPrelude getCurrentTime :: IO UTCTime
2022-11-10 06:10:43 +0100 <iqubic> Oh? Do the parens change things?
2022-11-10 06:10:45 +0100 <iqubic> Weird
2022-11-10 06:14:03 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 06:18:44 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds)
2022-11-10 06:19:44 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
2022-11-10 06:19:50 +0100razetime(~quassel@117.193.3.56)
2022-11-10 06:25:52 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
2022-11-10 06:26:58 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-11-10 06:28:26 +0100polo_(~polo@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-11-10 06:29:42 +0100polo_(~polo@pool-100-11-18-203.phlapa.fios.verizon.net) (Changing host)
2022-11-10 06:29:42 +0100polo_(~polo@user/polo)
2022-11-10 06:29:53 +0100chromoblob(~user@37.113.164.122)
2022-11-10 06:30:00 +0100moneyGuest1504
2022-11-10 06:30:00 +0100polo_money
2022-11-10 06:32:10 +0100money(~polo@user/polo) (Client Quit)
2022-11-10 06:32:52 +0100Guest1504money
2022-11-10 06:34:36 +0100 <sm> is there a map of the time types like
2022-11-10 06:34:37 +0100 <sm> @where numbers ?
2022-11-10 06:34:37 +0100 <lambdabot> https://blog.plover.com/prog/haskell/numbers.html A map of Haskell's numeric types
2022-11-10 06:35:46 +0100 <sm> hmm, yes: https://wiki.haskell.org/Time
2022-11-10 06:37:25 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-11-10 06:38:19 +0100monochrom(trebla@216.138.220.146) (Quit: NO CARRIER)
2022-11-10 06:43:07 +0100monochrom(trebla@216.138.220.146)
2022-11-10 06:46:33 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 06:46:43 +0100jargon(~jargon@184.101.188.35) (Remote host closed the connection)
2022-11-10 06:46:58 +0100jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-11-10 06:47:18 +0100skinoted that numbers link doesn't list `Bounded'
2022-11-10 06:47:23 +0100 <ski> (nor `Ix')
2022-11-10 06:47:56 +0100jinsun(~jinsun@user/jinsun)
2022-11-10 06:53:09 +0100 <fvr> those who use nixpkgs infra to build haskell projects, do you use nixpkgs-unstable in prod?
2022-11-10 06:54:07 +0100 <iqubic> Yes, I use nixpkgs-unstable in prod. I don't notice any major issues.
2022-11-10 06:55:07 +0100 <fvr> ah okay, just realised today that unstable has openssl pinned to openssl_3 which HsOpenSSL is depending on. So need to upgrade I guess
2022-11-10 06:56:36 +0100king_gs(~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
2022-11-10 06:57:26 +0100king_gs(~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
2022-11-10 06:57:35 +0100king_gs(~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Client Quit)
2022-11-10 06:59:24 +0100talismanick(~talismani@76.133.152.122) (Ping timeout: 260 seconds)
2022-11-10 07:05:22 +0100shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-11-10 07:07:16 +0100mikoto-chan(~mikoto-ch@164.5.249.78)
2022-11-10 07:11:31 +0100cdoltb^(~cdoltb@76.145.185.103) (Remote host closed the connection)
2022-11-10 07:12:04 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-11-10 07:16:01 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2022-11-10 07:17:34 +0100talismanick(~talismani@76.133.152.122)
2022-11-10 07:18:13 +0100jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2022-11-10 07:23:01 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-11-10 07:23:34 +0100mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 252 seconds)
2022-11-10 07:26:32 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-11-10 07:29:40 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 252 seconds)
2022-11-10 07:30:11 +0100hsw(~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net)
2022-11-10 07:37:44 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-11-10 07:39:03 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-11-10 07:39:35 +0100jakalx(~jakalx@base.jakalx.net)
2022-11-10 07:40:22 +0100vglfr(~vglfr@145.224.100.100) (Remote host closed the connection)
2022-11-10 07:41:07 +0100vglfr(~vglfr@145.224.100.100)
2022-11-10 07:42:15 +0100mikoto-chan(~mikoto-ch@164.5.249.78)
2022-11-10 07:44:41 +0100odnes(~odnes@5-203-198-172.pat.nym.cosmote.net)
2022-11-10 07:44:53 +0100odnes(~odnes@5-203-198-172.pat.nym.cosmote.net) (Remote host closed the connection)
2022-11-10 07:46:10 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-11-10 07:57:15 +0100razetime(~quassel@117.193.3.56) (Ping timeout: 248 seconds)
2022-11-10 08:05:28 +0100mmhat(~mmh@p200300f1c70f4134ee086bfffe095315.dip0.t-ipconnect.de)
2022-11-10 08:07:04 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-11-10 08:08:59 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 248 seconds)
2022-11-10 08:10:41 +0100Feuermagier(~Feuermagi@user/feuermagier) (Remote host closed the connection)
2022-11-10 08:11:05 +0100Feuermagier(~Feuermagi@user/feuermagier)
2022-11-10 08:11:41 +0100Feuermagier(~Feuermagi@user/feuermagier) (Max SendQ exceeded)
2022-11-10 08:11:59 +0100jinsun(~jinsun@user/jinsun)
2022-11-10 08:12:57 +0100Feuermagier(~Feuermagi@user/feuermagier)
2022-11-10 08:13:06 +0100Feuermagier(~Feuermagi@user/feuermagier) (Remote host closed the connection)
2022-11-10 08:15:14 +0100mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 260 seconds)
2022-11-10 08:23:00 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-11-10 08:27:46 +0100 <chreekat> yeah i wouldn't touch unstable with a 10 foot pole, but ymmv
2022-11-10 08:28:03 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-11-10 08:31:15 +0100mncheck(~mncheck@193.224.205.254)
2022-11-10 08:33:46 +0100mmhat(~mmh@p200300f1c70f4134ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1)
2022-11-10 08:39:46 +0100 <fvr> what issues would one be facing?
2022-11-10 08:40:02 +0100 <fvr> I have been using it close to a year now
2022-11-10 08:48:01 +0100 <chreekat> I previously worked in a team where most of us used NixOS for our work machines. On nixos-stable, I had 0 problems ever. My colleagues using nixos-unstable would occasionally have packages break or stop working for a little while
2022-11-10 08:48:56 +0100 <chreekat> Plus, a backward-incompatible change could come at any time
2022-11-10 08:49:16 +0100 <chreekat> it wasn't frequent, so maybe it's worth it, but I liked to not have to think about it ever
2022-11-10 08:51:45 +0100kenran(~user@user/kenran)
2022-11-10 08:54:35 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 09:00:00 +0100mikoto-chan(~mikoto-ch@nat4.panoulu.net)
2022-11-10 09:00:06 +0100Yumemi(~Yumemi@chamoin.net) (*.net *.split)
2022-11-10 09:00:06 +0100pie_(~pie_bnc@user/pie/x-2818909) (*.net *.split)
2022-11-10 09:00:06 +0100vgtw_(~vgtw@user/vgtw) (*.net *.split)
2022-11-10 09:00:06 +0100dtman34(~dtman34@c-75-73-141-79.hsd1.mn.comcast.net) (*.net *.split)
2022-11-10 09:00:06 +0100jludwig(~justin@li657-110.members.linode.com) (*.net *.split)
2022-11-10 09:00:06 +0100_xor(~xor@74.215.182.83) (*.net *.split)
2022-11-10 09:00:06 +0100SoF(~skius@user/skius) (*.net *.split)
2022-11-10 09:00:06 +0100chronon(~chronon@user/chronon) (*.net *.split)
2022-11-10 09:00:06 +0100hexeme(~hexeme@user/hexeme) (*.net *.split)
2022-11-10 09:00:06 +0100xsarnik(xsarnik@lounge.fi.muni.cz) (*.net *.split)
2022-11-10 09:00:06 +0100lbseale(~quassel@user/ep1ctetus) (*.net *.split)
2022-11-10 09:00:06 +0100koala_man(~vidar@157.146.251.23.bc.googleusercontent.com) (*.net *.split)
2022-11-10 09:00:06 +0100detuneattune(~detuneatt@user/detuneattune) (*.net *.split)
2022-11-10 09:00:06 +0100koolazer(~koo@user/koolazer) (*.net *.split)
2022-11-10 09:00:06 +0100sm[i](~user@plaintextaccounting/sm) (*.net *.split)
2022-11-10 09:00:06 +0100natto(~natto@140.238.225.67) (*.net *.split)
2022-11-10 09:00:06 +0100Ekho(~Ekho@user/ekho) (*.net *.split)
2022-11-10 09:00:06 +0100reda(~reda@user/reda) (*.net *.split)
2022-11-10 09:00:06 +0100aforemny(~aforemny@static.248.158.34.188.clients.your-server.de) (*.net *.split)
2022-11-10 09:00:06 +0100stefan-_(~cri@42dots.de) (*.net *.split)
2022-11-10 09:00:06 +0100dminuoso(~dminuoso@user/dminuoso) (*.net *.split)
2022-11-10 09:00:06 +0100GoldsteinQ(~goldstein@goldstein.rs) (*.net *.split)
2022-11-10 09:00:06 +0100drlkf(~drlkf@chat.drlkf.net) (*.net *.split)
2022-11-10 09:00:06 +0100coldtom(~coldtom@coldrick.cc) (*.net *.split)
2022-11-10 09:00:06 +0100Clint(~Clint@user/clint) (*.net *.split)
2022-11-10 09:00:06 +0100hpc(~juzz@ip98-169-32-242.dc.dc.cox.net) (*.net *.split)
2022-11-10 09:00:06 +0100echoreply(~echoreply@45.32.163.16) (*.net *.split)
2022-11-10 09:00:06 +0100mzan(~quassel@mail.asterisell.com) (*.net *.split)
2022-11-10 09:00:06 +0100LambdaDuck(~anka@ksit.fixme.fi) (*.net *.split)
2022-11-10 09:00:06 +0100kraftwerk28(~kraftwerk@178.62.210.83) (*.net *.split)
2022-11-10 09:00:06 +0100mcfrdy(~mcfrdy@user/mcfrdy) (*.net *.split)
2022-11-10 09:00:06 +0100dextaa(~DV@user/dextaa) (*.net *.split)
2022-11-10 09:00:06 +0100bcoppens(~bartcopp@vpn2.bartcoppens.be) (*.net *.split)
2022-11-10 09:00:06 +0100Zemyla(~ec2-user@ec2-54-80-174-150.compute-1.amazonaws.com) (*.net *.split)
2022-11-10 09:00:06 +0100shane(~shane@ana.rch.ist) (*.net *.split)
2022-11-10 09:00:06 +0100alp(~alp@user/alp) (*.net *.split)
2022-11-10 09:00:06 +0100hippoid(~idris@user/hippoid) (*.net *.split)
2022-11-10 09:00:06 +0100dfordivam1(~dfordivam@tk2-219-19469.vs.sakura.ne.jp) (*.net *.split)
2022-11-10 09:00:06 +0100Hecate(~mariposa@user/hecate) (*.net *.split)
2022-11-10 09:00:06 +0100polux(~polux@51-15-169-172.rev.poneytelecom.eu) (*.net *.split)
2022-11-10 09:00:06 +0100WzC(~Frank@77-162-168-71.fixed.kpn.net) (*.net *.split)
2022-11-10 09:00:06 +0100andreas303(andreas303@ip227.orange.bnc4free.com) (*.net *.split)
2022-11-10 09:00:06 +0100gnyeki(~gnyeki@user/gnyeki) (*.net *.split)
2022-11-10 09:00:06 +0100zachel(~zachel@user/zachel) (*.net *.split)
2022-11-10 09:00:06 +0100asm(~alexander@user/asm) (*.net *.split)
2022-11-10 09:00:06 +0100haskl(~haskl@user/haskl) (*.net *.split)
2022-11-10 09:00:06 +0100laman1(~laman@rego.ai) (*.net *.split)
2022-11-10 09:00:06 +0100mht-wtf(~mht@mht.wtf) (*.net *.split)
2022-11-10 09:00:06 +0100tomjaguarpaw(~tom@li367-225.members.linode.com) (*.net *.split)
2022-11-10 09:00:06 +0100acro(~acro@user/acro) (*.net *.split)
2022-11-10 09:00:06 +0100davl(~davl@207.154.228.18) (*.net *.split)
2022-11-10 09:00:12 +0100tomjagua1paw(~tom@li367-225.members.linode.com)
2022-11-10 09:00:12 +0100gnyeki_(~gnyeki@li578-216.members.linode.com)
2022-11-10 09:00:14 +0100shane(~shane@ana.rch.ist)
2022-11-10 09:00:15 +0100LambdaDuck(~anka@ksit.fixme.fi)
2022-11-10 09:00:19 +0100WarzoneCommand(~Frank@77-162-168-71.fixed.kpn.net)
2022-11-10 09:00:20 +0100Clint(~Clint@thumb.scru.org)
2022-11-10 09:00:20 +0100hpc(~juzz@ip98-169-32-242.dc.dc.cox.net)
2022-11-10 09:00:21 +0100bcoppens(~bartcopp@vpn2.bartcoppens.be)
2022-11-10 09:00:22 +0100gnyeki_(~gnyeki@li578-216.members.linode.com) (Changing host)
2022-11-10 09:00:22 +0100gnyeki_(~gnyeki@user/gnyeki)
2022-11-10 09:00:24 +0100chronon(~chronon@user/chronon)
2022-11-10 09:00:27 +0100Clint(~Clint@thumb.scru.org) (Changing host)
2022-11-10 09:00:27 +0100Clint(~Clint@user/clint)
2022-11-10 09:00:42 +0100_xor(~xor@74.215.182.83)
2022-11-10 09:00:43 +0100echoreply(~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d)
2022-11-10 09:00:43 +0100laman1(~laman@rego.ai)
2022-11-10 09:00:49 +0100zachel(~zachel@user/zachel)
2022-11-10 09:00:56 +0100aforemny(~aforemny@static.248.158.34.188.clients.your-server.de)
2022-11-10 09:01:07 +0100xsarnik(xsarnik@lounge.fi.muni.cz)
2022-11-10 09:01:18 +0100asm(~alexander@burner.asm89.io)
2022-11-10 09:01:36 +0100dfordivam1(~dfordivam@tk2-219-19469.vs.sakura.ne.jp)
2022-11-10 09:01:43 +0100Yumemi(~Yumemi@chamoin.net)
2022-11-10 09:01:48 +0100andreas303(andreas303@ip227.orange.bnc4free.com)
2022-11-10 09:01:55 +0100davl(~davl@207.154.228.18)
2022-11-10 09:01:55 +0100kraftwerk28(~kraftwerk@178.62.210.83)
2022-11-10 09:01:59 +0100jludwig(~justin@li657-110.members.linode.com)
2022-11-10 09:02:15 +0100dtman34(~dtman34@2601:447:d080:83c8:a3db:9010:bf80:cdf5)
2022-11-10 09:02:15 +0100vgtw(~vgtw@user/vgtw)
2022-11-10 09:02:17 +0100mht-wtf(~mht@mht.wtf)
2022-11-10 09:02:19 +0100pie_(~pie_bnc@user/pie/x-2818909)
2022-11-10 09:02:22 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:fd7d:bd88:d842:b1bb)
2022-11-10 09:02:22 +0100mzan(~quassel@mail.asterisell.com)
2022-11-10 09:02:26 +0100lbseale(~quassel@user/ep1ctetus)
2022-11-10 09:02:33 +0100asm(~alexander@burner.asm89.io) (Changing host)
2022-11-10 09:02:33 +0100asm(~alexander@user/asm)
2022-11-10 09:02:45 +0100natto(~natto@140.238.225.67)
2022-11-10 09:02:46 +0100acro(~acro@user/acro)
2022-11-10 09:02:47 +0100GoldsteinQ(~goldstein@goldstein.rs)
2022-11-10 09:02:48 +0100mcfrdy(~mcfrdy@user/mcfrdy)
2022-11-10 09:02:51 +0100dminuoso(~dminuoso@user/dminuoso)
2022-11-10 09:02:52 +0100haskl(~haskl@user/haskl)
2022-11-10 09:02:52 +0100stefan-_(~cri@42dots.de)
2022-11-10 09:03:00 +0100alp(~alp@user/alp)
2022-11-10 09:03:11 +0100SoF(~skius@user/skius)
2022-11-10 09:03:52 +0100hippoid(~idris@user/hippoid)
2022-11-10 09:03:53 +0100drlkf(~drlkf@chat.drlkf.net)
2022-11-10 09:04:12 +0100cfricke(~cfricke@user/cfricke)
2022-11-10 09:04:23 +0100hexeme(~hexeme@user/hexeme)
2022-11-10 09:04:43 +0100chomwitt(~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
2022-11-10 09:05:15 +0100koala_man(~vidar@157.146.251.23.bc.googleusercontent.com)
2022-11-10 09:05:17 +0100Hecate(~mariposa@user/hecate)
2022-11-10 09:05:35 +0100koolazer(~koo@user/koolazer)
2022-11-10 09:05:39 +0100reda(~reda@user/reda)
2022-11-10 09:06:39 +0100defanor_defanor
2022-11-10 09:06:40 +0100Ekho(~Ekho@user/ekho)
2022-11-10 09:07:48 +0100sm[i](~user@plaintextaccounting/sm)
2022-11-10 09:07:59 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-11-10 09:10:21 +0100Zemyla(~ec2-user@ec2-54-80-174-150.compute-1.amazonaws.com)
2022-11-10 09:11:05 +0100chomwitt(~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1)
2022-11-10 09:15:15 +0100chromoblob(~user@37.113.164.122)
2022-11-10 09:20:30 +0100MajorBiscuit(~MajorBisc@c-001-030-015.client.tudelft.eduvpn.nl)
2022-11-10 09:21:05 +0100razetime(~quassel@117.193.3.56)
2022-11-10 09:22:23 +0100ft(~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving)
2022-11-10 09:22:57 +0100acidjnk(~acidjnk@p200300d6e7137a22458dfbf66917fb17.dip0.t-ipconnect.de)
2022-11-10 09:24:19 +0100FragByte(~christian@user/fragbyte) (Quit: Quit)
2022-11-10 09:26:19 +0100FragByte(~christian@user/fragbyte)
2022-11-10 09:26:34 +0100MajorBiscuit(~MajorBisc@c-001-030-015.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.6)
2022-11-10 09:31:11 +0100nate4(~nate@98.45.169.16)
2022-11-10 09:35:36 +0100MajorBiscuit(~MajorBisc@c-001-030-015.client.tudelft.eduvpn.nl)
2022-11-10 09:36:05 +0100nate4(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-11-10 09:39:27 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-11-10 09:40:02 +0100vpan(~0@212.117.1.172)
2022-11-10 09:40:36 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-11-10 09:40:56 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-11-10 09:42:18 +0100polux(~polux@51-15-169-172.rev.poneytelecom.eu)
2022-11-10 09:44:07 +0100machinedgod(~machinedg@clnet-p10-126.ikbnet.co.at)
2022-11-10 09:49:48 +0100jrm(~jrm@user/jrm) (Quit: ciao)
2022-11-10 09:50:29 +0100Guest75(~Guest75@178.141.177.81)
2022-11-10 09:51:19 +0100jrm(~jrm@user/jrm)
2022-11-10 09:51:34 +0100kuribas(~user@ptr-17d51enh7x68c2qjbwe.18120a2.ip6.access.telenet.be)
2022-11-10 10:05:08 +0100ubert1(~Thunderbi@178.165.161.121.wireless.dyn.drei.com)
2022-11-10 10:07:13 +0100`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net)
2022-11-10 10:07:58 +0100jmorris(uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-11-10 10:10:22 +0100zer0bitz(~zer0bitz@196.244.192.57) (Read error: Connection reset by peer)
2022-11-10 10:10:37 +0100zer0bitz(~zer0bitz@196.244.192.61)
2022-11-10 10:20:04 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 260 seconds)
2022-11-10 10:20:43 +0100[_________](~oos95GWG@user/oos95GWG) (Ping timeout: 255 seconds)
2022-11-10 10:20:59 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2022-11-10 10:21:38 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-11-10 10:22:21 +0100[_________](~oos95GWG@user/oos95GWG)
2022-11-10 10:23:58 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2022-11-10 10:24:20 +0100Flow(~none@gentoo/developer/flow) (Ping timeout: 252 seconds)
2022-11-10 10:24:57 +0100ub(~Thunderbi@178.165.160.24.wireless.dyn.drei.com)
2022-11-10 10:24:59 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
2022-11-10 10:26:14 +0100ubert1(~Thunderbi@178.165.161.121.wireless.dyn.drei.com) (Ping timeout: 246 seconds)
2022-11-10 10:26:26 +0100chele(~chele@user/chele)
2022-11-10 10:26:29 +0100ubert(~Thunderbi@178.165.161.121.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2022-11-10 10:26:29 +0100ububert
2022-11-10 10:27:52 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 252 seconds)
2022-11-10 10:29:41 +0100 <probie> Is there a pragma to indicate that providing an implementation of a class method is deprecated?
2022-11-10 10:31:03 +0100chromoblob(~user@37.113.164.122)
2022-11-10 10:32:20 +0100 <ski> "You can only attach to entities declared at top level in the module being compiled" <https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/pragmas.html#warning-and-deprecated…>
2022-11-10 10:34:09 +0100 <ski> "Warnings and deprecations are not reported for [..] defining a method in a class instance"
2022-11-10 10:35:45 +0100Inst(~Liam@c-98-208-218-119.hsd1.fl.comcast.net)
2022-11-10 10:35:53 +0100 <Inst> is it valid to think of monads as generics of generics?
2022-11-10 10:36:02 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-11-10 10:36:15 +0100 <ski> what do you mean by "generic" ?
2022-11-10 10:36:45 +0100 <Inst> mainstream programming generics, not haskell generics
2022-11-10 10:36:56 +0100 <c_wraith> parametric polymorphism?
2022-11-10 10:37:00 +0100Flow(~none@gentoo/developer/flow)
2022-11-10 10:37:12 +0100 <ski> like in Java, C#, C++, Ada ?
2022-11-10 10:38:14 +0100akegalj(~akegalj@93-136-80-143.adsl.net.t-com.hr)
2022-11-10 10:38:56 +0100 <lortabac> Inst: do you mean that monads require higher-order kinds?
2022-11-10 10:39:00 +0100 <lortabac> :k Monad
2022-11-10 10:39:01 +0100 <lambdabot> (* -> *) -> Constraint
2022-11-10 10:39:35 +0100 <Inst> i've developed a nasty hobby of trying to develop better monad tutorials
2022-11-10 10:39:57 +0100 <lortabac> maybe that's what you mean by "generics of generics"
2022-11-10 10:40:16 +0100 <Inst> strangely enough, i'm sort of veering toward the category theory definition
2022-11-10 10:41:14 +0100 <Inst> monads are just monoids in the category of endofunctors seems to me to be increasingly obvious as the easiest way to explain monads
2022-11-10 10:41:26 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61)
2022-11-10 10:41:37 +0100 <dminuoso> Not really.
2022-11-10 10:41:38 +0100 <Inst> by generics of generics, i mean that you have a common interface toward certain generics
2022-11-10 10:41:49 +0100 <dminuoso> That phrase is by no means a vehicle for explaining them
2022-11-10 10:42:00 +0100 <c_wraith> note that this is not what monads "are"
2022-11-10 10:42:09 +0100 <Inst> define monad, then
2022-11-10 10:42:11 +0100 <ski> @where burrito
2022-11-10 10:42:12 +0100 <lambdabot> http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/
2022-11-10 10:42:13 +0100thyriaen(~thyriaen@2a01:aea0:dd4:470d:4c78:c477:402b:896a)
2022-11-10 10:42:16 +0100 <ski> obligatory ^
2022-11-10 10:42:24 +0100 <c_wraith> a monoid in the category of endofunctors.
2022-11-10 10:42:26 +0100 <dminuoso> Inst: A monad is just an an abstract interface.
2022-11-10 10:42:26 +0100 <Inst> iirc some people bashed it because analogy is how people learn
2022-11-10 10:42:37 +0100 <Inst> dminuoso: an abstract interface bound by certain laws
2022-11-10 10:42:46 +0100 <Inst> kind * -> * (or reduceable to such)
2022-11-10 10:42:55 +0100 <Inst> map, mu, and eta operations
2022-11-10 10:42:59 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-11-10 10:43:03 +0100 <Inst> a specific relationship between mu and eta
2022-11-10 10:43:09 +0100 <ski> the monad interface is similar to the priority queue interface
2022-11-10 10:43:38 +0100[exa]makes a priority queue for the burritos here
2022-11-10 10:43:43 +0100 <ski> both provide a couple of operations for manipulating the data structure described by the interface
2022-11-10 10:44:27 +0100 <dminuoso> Inst: Do take a read at Byorgey's blog post, it captures it really well.
2022-11-10 10:44:29 +0100 <Inst> and i agree re dminuoso that the best explanation is just an interface
2022-11-10 10:44:41 +0100 <Inst> i disagree with monad tutorial fallacy
2022-11-10 10:44:54 +0100 <c_wraith> I don't think you can "disagree" with a non-opinion
2022-11-10 10:44:58 +0100 <Inst> i.e, i think we should develop better monad tutorials so you can teach the monad concept toward the start of a semester
2022-11-10 10:45:02 +0100 <ski> both are interfaces of "generics" : a priority queue type is (or at least can be) parameterized by its element type, a monad is parameterized by its "monadic result type"
2022-11-10 10:45:25 +0100 <Inst> monadic result type?
2022-11-10 10:45:29 +0100 <dminuoso> Inst: We dont need tutorials for them. Learning them is easy. Just study each individual instance, let the intuition develop on its own.
2022-11-10 10:45:31 +0100 <dminuoso> Done.
2022-11-10 10:45:34 +0100 <ski> @type getLine
2022-11-10 10:45:35 +0100 <lambdabot> IO String
2022-11-10 10:45:39 +0100 <ski> the `String' there ^
2022-11-10 10:45:43 +0100 <dminuoso> What is in the way, is pretending that "monads are a thing needing to learn"
2022-11-10 10:46:02 +0100 <dminuoso> Rather than just focusing on the instances themselves, which each take just a few minutes to fully teach, learn and absorb.
2022-11-10 10:46:05 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61) (Ping timeout: 260 seconds)
2022-11-10 10:46:27 +0100 <Inst> ehhh, learn monads as a typeclass, then learn each individual monads as their need / utility pops up
2022-11-10 10:46:40 +0100 <dminuoso> Sort of like "teaching monoid" is pointless until the student has learned addition and multiplication. Its only when you're equipped with enough tools to recognize the common theme.
2022-11-10 10:46:44 +0100 <c_wraith> that isn't how humans actually learn
2022-11-10 10:46:51 +0100 <c_wraith> humans learn concrete -> abstract
2022-11-10 10:46:56 +0100 <Inst> man it'd be totally cool to learn monoids before addition / multiplication
2022-11-10 10:46:59 +0100 <merijn> Lemme find a relevant quote from a math journal
2022-11-10 10:47:18 +0100 <dminuoso> Inst: Go try and teach monoid in elementary before addition. Good luck.
2022-11-10 10:47:26 +0100 <merijn> Suppose that you want to teach the 'cat' concept to a very young child. Do you explain that a cat is a relatively small, primarily carnivorous mammal with retractible claws, a distinctive sonic output, etc.? I'll bet not. You probably show the kid a lot of different cats, saying 'kitty' each time, until it gets the idea. To put it more generally, generalizations are best made by abstraction from
2022-11-10 10:47:27 +0100 <[exa]> you guys didn't play with train models?
2022-11-10 10:47:32 +0100 <merijn> experience.
2022-11-10 10:47:33 +0100 <[exa]> I mean, transportation monoids
2022-11-10 10:47:35 +0100 <merijn> - R. P. Boas (Can we make mathematics intelligible?, American Mathematical Monthly 88 (1981), pp. 727-731)
2022-11-10 10:47:46 +0100 <ski> Inst : there are (a few) better ones. they tend to focus on the practical affordances (which type of boiler-plate code the particular monad captures, and abstracts away, what relevant extra operations that monad supports) .. or else do a proper abstract mathematical introduction (without all the fluffy analogical handwaving)
2022-11-10 10:47:49 +0100 <dminuoso> [exa]: well yes, and again the children would practice on actual *examples* first.
2022-11-10 10:48:22 +0100 <merijn> tbh, I wanna watch Inst teach monoids to kids
2022-11-10 10:48:27 +0100 <merijn> That sounds very entertaining
2022-11-10 10:48:34 +0100 <merijn> (for me, not for Inst or the kids)
2022-11-10 10:49:02 +0100 <[exa]> also the modeling clay aka color monoid
2022-11-10 10:49:16 +0100 <merijn> [exa]: What's the identity element?
2022-11-10 10:49:23 +0100 <merijn> Pretty sure that's a semigroup
2022-11-10 10:49:23 +0100 <dminuoso> transparent clay? I want that!
2022-11-10 10:49:34 +0100bjourne(~bjourne@2001:6b0:1:1140:42bf:ff4:f8fa:50e5)
2022-11-10 10:49:37 +0100 <[exa]> merijn: no clay is ok
2022-11-10 10:49:45 +0100 <dminuoso> and I would bet transparent clay would still change the color
2022-11-10 10:49:52 +0100 <dminuoso> because it diffuses
2022-11-10 10:50:15 +0100InstX1(~Liam@2600:1006:b012:4ba6:915c:623e:d292:5624)
2022-11-10 10:50:19 +0100 <InstX1> hi
2022-11-10 10:50:42 +0100 <InstX1> got a bad storm, my internet cut out
2022-11-10 10:50:43 +0100 <InstX1> <merijn> Lemme find a relevant quote from a math journal
2022-11-10 10:50:45 +0100 <InstX1> cut out over here
2022-11-10 10:50:53 +0100 <InstX1> tbh, this just came up to me
2022-11-10 10:50:53 +0100 <dminuoso> InstX1: check the topic, we have a chatlog.
2022-11-10 10:51:06 +0100 <InstX1> thanks
2022-11-10 10:51:07 +0100Inst(~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 248 seconds)
2022-11-10 10:51:09 +0100 <InstX1> but tbh, got a small question
2022-11-10 10:51:28 +0100 <InstX1> we have a bit of a problem because monads strictly refer to the interface and the category theory concept
2022-11-10 10:52:23 +0100 <InstX1> the idea of using maybe, etc, to inject a null value, or using state to propagate an accumulating parameter
2022-11-10 10:52:45 +0100bloomndoom(~user@115.240.194.54)
2022-11-10 10:52:45 +0100 <InstX1> what is it called when you have complex parameterized types
2022-11-10 10:52:58 +0100 <InstX1> and you use them to do cool things?
2022-11-10 10:52:59 +0100 <dminuoso> what does "complex" mean here?
2022-11-10 10:53:00 +0100 <ski> Inst : unlike priority queues (where most relevant operations are in the abstract interface), most of the relevant operations on a particular monad are *not* in the monad interface. even, if you only have the interface operations available, you can't do too much (basically describe ways to sequence parameter actions, traverse data structures) .. and you can't use those usefully, without some particular
2022-11-10 10:53:06 +0100 <ski> monadic actions not constructible by the abstract operations
2022-11-10 10:53:32 +0100 <InstX1> well, the standard monads seem to be more a function of the haskell type system, gadts
2022-11-10 10:53:45 +0100 <InstX1> i recall uncle bob having a video (which I paid for) that claimed to explain monads
2022-11-10 10:53:52 +0100 <InstX1> he was actually explaining the monadic pattern, not monads themselves
2022-11-10 10:54:05 +0100 <dminuoso> ski: I stand by the opinion, that `Monad` is really only captured well in code that is polymorphic over some arbitrary Monad. e.g. `mapM`
2022-11-10 10:54:18 +0100 <dminuoso> Outside of those combinators, you dont observe the real Monad interface well enough
2022-11-10 10:54:27 +0100 <dminuoso> pretty much because of what you just said
2022-11-10 10:54:38 +0100 <InstX1> w/e, sorry, getting late, going to sleep
2022-11-10 10:54:45 +0100 <InstX1> i just got up to 2 kyu in Haskell on codewars :D
2022-11-10 10:54:55 +0100 <InstX1> in only 1.5 months
2022-11-10 10:55:10 +0100 <dminuoso> But it turns out, writing code that is polymorphic over Monad is not something most programmers do often, which makes it more difficult for beginners to understand what the point of it is
2022-11-10 10:55:24 +0100 <kuribas> dminuoso: traverse?
2022-11-10 10:55:38 +0100 <bloomndoom> im trying to install juicypixels and i get this error "cannot satisfy -package-id primitive-0.7.4.0-8hFPeuOq4VcHQCYtOnPDT3", what does it mean?
2022-11-10 10:55:47 +0100 <dminuoso> kuribas: Yes, but I intentionally used `mapM` to avoid some nitpicking about how traverse only requires `Applicative`.
2022-11-10 10:56:06 +0100 <ski> dminuoso : yea, otherwise you're talking about particular monad "implementations", not about the monad interface itself. you could compare with a module which only uses the abstract operations on priority queues (perhaps using Backpack to be able to swap out concrete implementations implementing the same module interface, or else perhaps using a typeclass)
2022-11-10 10:56:27 +0100 <kuribas> most language have "do syntax" in the form of list comprehension.
2022-11-10 10:56:56 +0100FragByte(~christian@user/fragbyte) (Quit: Quit)
2022-11-10 10:58:43 +0100 <ski> "Escaping Hell with Monads" by Philip Nillson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/> is a nice short (non-tutorial) teaser of monads
2022-11-10 10:58:57 +0100 <Franciman> ski: what do you think about moggi's original article about monads?
2022-11-10 10:59:11 +0100 <Franciman> is it intelligible for the not quite experienced user?
2022-11-10 10:59:36 +0100 <bloomndoom> ive tried doing `cabal install --dependencies-only` and install `ghc-static` on arch but i'm still getting that error
2022-11-10 10:59:57 +0100teo(~teo@user/teo)
2022-11-10 11:00:02 +0100 <kuribas> The problem is that the term Monad scares people away. If you would just tell them, hey, you can overload list comprehension syntax so it works for different usecases, nobody would object.
2022-11-10 11:00:43 +0100thyriaen(~thyriaen@2a01:aea0:dd4:470d:4c78:c477:402b:896a) (Remote host closed the connection)
2022-11-10 11:00:51 +0100FragByte(~christian@user/fragbyte)
2022-11-10 11:03:00 +0100 <ski> i also quite like the (rather short, to the point) "What the hell are Monads?" by Noel Winstanley in 1999-02 at <https://www-users.mat.umk.pl/~fly/materialy/fp/haskell-doc/Monads.html>, which is possibly the first (non-paper) general monad tutorial
2022-11-10 11:04:10 +0100InstX1_(~Liam@2601:6c4:4081:54f0:481:19c9:5bb6:fc21)
2022-11-10 11:04:14 +0100 <ski> then there's "You Could Have Invented Monads! (And Maybe You Already Have.)" by dpiponi in 2006-08-07 at <http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html>
2022-11-10 11:05:01 +0100Lycurgus(~juan@user/Lycurgus)
2022-11-10 11:05:50 +0100 <ski> Franciman : you should probably have some experience with reading about programming language semantics, from what i (vaguely) recall
2022-11-10 11:05:53 +0100InstX1(~Liam@2600:1006:b012:4ba6:915c:623e:d292:5624) (Ping timeout: 252 seconds)
2022-11-10 11:05:57 +0100InstX1_Inst
2022-11-10 11:06:06 +0100 <ski> otoh, the Wadler papers are good for (relative) beginners
2022-11-10 11:06:24 +0100 <Inst> ski: tbh, I'm trying to argue that monads aren't monads
2022-11-10 11:06:29 +0100 <bloomndoom> does anyone know what the error `cannot satisfy -package-id primitive-0.7.4.0-8hFPeuOq4VcHQCYtOnPDT3` means?
2022-11-10 11:06:44 +0100 <ski> then there's
2022-11-10 11:06:45 +0100 <Inst> we're referring to the monadic pattern as equivalent to monads
2022-11-10 11:06:58 +0100 <ski> @where Typeclassopedia
2022-11-10 11:06:58 +0100 <lambdabot> http://www.haskell.org/haskellwiki/Typeclassopedia
2022-11-10 11:07:16 +0100cfricke(~cfricke@user/cfricke) (Ping timeout: 248 seconds)
2022-11-10 11:07:23 +0100 <ski> (which also introduces `Functor',`Applicative', and also a bunch of other somewhat related type classes)
2022-11-10 11:07:26 +0100 <ski> and
2022-11-10 11:07:27 +0100 <ski> @where AAM
2022-11-10 11:07:27 +0100 <lambdabot> http://www.haskell.org/haskellwiki/All_About_Monads
2022-11-10 11:07:28 +0100 <merijn> bloomndoom: Something has gone Very Wrong (TM)
2022-11-10 11:07:43 +0100 <merijn> What are you trying to do?
2022-11-10 11:08:04 +0100 <Franciman> ty
2022-11-10 11:08:18 +0100 <Franciman> Inst: monads aren't monads? What dost thou mean?
2022-11-10 11:08:36 +0100 <bloomndoom> merijn: im trying to install juicypixels
2022-11-10 11:08:59 +0100 <Inst> that there should be a more specific term used for creating types with an interface in order to handle certain common programming tasks
2022-11-10 11:09:11 +0100 <dminuoso> bloomndoom: Do you use stack or cabal?
2022-11-10 11:09:12 +0100 <bloomndoom> ive mentioned it in my .cabal file and then tried cabal run
2022-11-10 11:09:15 +0100 <bloomndoom> cabal
2022-11-10 11:09:22 +0100 <dminuoso> bloomndoom: try nuking your dist-newstyle directory.
2022-11-10 11:09:40 +0100 <bloomndoom> alright
2022-11-10 11:09:41 +0100 <bloomndoom> done
2022-11-10 11:09:53 +0100libertyprime(~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Quit: leaving)
2022-11-10 11:09:55 +0100 <dminuoso> Will it run now?
2022-11-10 11:10:01 +0100 <bloomndoom> still no luck
2022-11-10 11:10:15 +0100 <bloomndoom> <command line>: cannot satisfy -package-id primitive-0.7.4.0-8hFPeuOq4VcHQCYtOnPDT3
2022-11-10 11:10:34 +0100 <Franciman> Inst: sounds orthogonal to «monads are not monads»
2022-11-10 11:10:46 +0100 <dminuoso> bloomndoom: can you run with -v3 and share the output on https://paste.tomsmeding.com/
2022-11-10 11:10:49 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
2022-11-10 11:11:27 +0100 <merijn> bloomndoom: Which version of cabal-install? which ghc?
2022-11-10 11:11:28 +0100 <ski> as for Philip Wadler's papers, see <https://homepages.inf.ed.ac.uk/wadler/topics/monads.html> (start from oldest. perhaps skip the composable continuations one, at least to begin with, as well as the idiom one, the constraint one, and the arrow one)
2022-11-10 11:11:46 +0100 <Franciman> i kinda liked arrows
2022-11-10 11:11:54 +0100 <Franciman> a bit sad they aren't used much these days
2022-11-10 11:11:57 +0100 <ski> anyway, (barring any one i may've forgot) these are more or less the only ones i suggest to beginners
2022-11-10 11:12:18 +0100 <Inst> supposedly proc notation is utter garbage
2022-11-10 11:12:26 +0100 <Inst> not sure if someone fixed it, but proc desugars into extremely inefficient code
2022-11-10 11:12:26 +0100 <ski> (perhaps there were also a couple of other early papers, by other authors, i don't recall atm)
2022-11-10 11:12:57 +0100 <merijn> Franciman: why?
2022-11-10 11:13:08 +0100 <merijn> Franciman: They're just an extremely "meh" abstraction
2022-11-10 11:13:11 +0100 <bloomndoom> dminuoso: i sent it
2022-11-10 11:13:22 +0100 <Franciman> i liked how they were used for parser combinators
2022-11-10 11:13:30 +0100 <Franciman> to obtain offline analysis of the grammar
2022-11-10 11:13:30 +0100 <dminuoso> bloomndoom: Share the link please.
2022-11-10 11:13:35 +0100 <ski> Inst : what do you mean by "we're referring to the monadic pattern as equivalent to monads" ?
2022-11-10 11:13:39 +0100 <Franciman> i think swiestra et al. did it
2022-11-10 11:14:00 +0100 <ski> Swiersta & Duponcheel, yes
2022-11-10 11:14:12 +0100 <ski> main practical problem with `Arrow' is `arr'
2022-11-10 11:14:20 +0100 <bloomndoom> merijn: ghc version is 9.0.2, cabal is 3.4.1.0
2022-11-10 11:14:40 +0100 <Inst> bleh, forget it, i'm full of it
2022-11-10 11:15:31 +0100 <ski> perhaps there should be a flag that translates `proc' notation into the `Category' hierarchy classes (possibly adding a few more, e.g. for the "product" not being a proper bifunctor, or categorical product)
2022-11-10 11:15:43 +0100 <ski> s/flag/extension/
2022-11-10 11:16:22 +0100 <ski> hmm .. i wonder if Lava ever used arrows
2022-11-10 11:16:29 +0100 <ski> (hardware description language)
2022-11-10 11:18:26 +0100vglfr(~vglfr@145.224.100.100) (Remote host closed the connection)
2022-11-10 11:19:03 +0100vglfr(~vglfr@145.224.100.100)
2022-11-10 11:19:17 +0100 <ski> Inst : "tbh, I'm trying to argue that monads aren't monads" -- huh ?
2022-11-10 11:20:54 +0100thyriaen(~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1)
2022-11-10 11:21:53 +0100cfricke(~cfricke@user/cfricke)
2022-11-10 11:21:54 +0100bloomndoom(~user@115.240.194.54) (Ping timeout: 252 seconds)
2022-11-10 11:28:10 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-11-10 11:33:36 +0100iqubic(~iqubic@2601:602:9502:c70:512:a30e:b15a:1a46) (Quit: Client closed)
2022-11-10 11:34:52 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
2022-11-10 11:36:05 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-11-10 11:37:34 +0100thyriaen_(~thyriaen@2a01:aea0:dd4:470d:4c78:c477:402b:896a)
2022-11-10 11:38:09 +0100thyriaen_(~thyriaen@2a01:aea0:dd4:470d:4c78:c477:402b:896a) (Client Quit)
2022-11-10 11:39:40 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-11-10 11:40:29 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 11:41:01 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 11:41:22 +0100 <ski> @where MTSS
2022-11-10 11:41:22 +0100 <lambdabot> "Monad Transformers Step by Step" by Martin Grabmüller in 2006-10-16 (draft) at <https://web.archive.org/web/20201108001845/https://page.mi.fu-berlin.de/scravy/realworldhaskell/ma…
2022-11-10 11:41:22 +0100 <lambdabot> transformers-step-by-step.pdf>
2022-11-10 11:43:32 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
2022-11-10 11:43:54 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-11-10 11:45:37 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 11:50:24 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2022-11-10 11:51:25 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2022-11-10 11:51:32 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-11-10 11:52:45 +0100nilradical(~nilradica@user/naso)
2022-11-10 11:54:05 +0100 <ski> @where escaping-hell
2022-11-10 11:54:05 +0100 <lambdabot> I know nothing about escaping-hell.
2022-11-10 11:54:21 +0100 <ski> @where+ escaping-hell (non-tutorial teaser) "Escaping Hell with Monads" by Philip Nillson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/>
2022-11-10 11:54:21 +0100 <lambdabot> It is forever etched in my memory.
2022-11-10 11:54:31 +0100 <ski> @where hell-monads
2022-11-10 11:54:31 +0100 <lambdabot> I know nothing about hell-monads.
2022-11-10 11:54:56 +0100 <ski> @where+ hell-monads "What the hell are Monads?" by Noel Winstanley in 1999-02 at <https://www-users.mat.umk.pl/~fly/materialy/fp/haskell-doc/Monads.html>. Possibly the first (non-paper) general monad tutorial
2022-11-10 11:54:56 +0100 <lambdabot> Okay.
2022-11-10 11:55:09 +0100 <ski> @where invented-monads
2022-11-10 11:55:10 +0100 <lambdabot> I know nothing about invented-monads.
2022-11-10 11:55:20 +0100 <ski> @where+ invented-monads "You Could Have Invented Monads! (And Maybe You Already Have.)" by dpiponi in 2006-08-07 at <http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html>
2022-11-10 11:55:20 +0100 <lambdabot> Done.
2022-11-10 11:55:32 +0100 <ski> @where wadler-monads
2022-11-10 11:55:32 +0100 <lambdabot> I know nothing about wadler-monads.
2022-11-10 11:55:50 +0100 <ski> @where+ wadler-monads Monad(ic (, idiomatic/applicative and arrow) effects) introduction papers by Philip Wadler in 1992-01 - 2010 at <https://homepages.inf.ed.ac.uk/wadler/topics/monads.html>. Start from oldest. Perhaps skip the ones touching upon composable continuations, idioms, constraints, arrows, on a first read
2022-11-10 11:55:50 +0100 <lambdabot> It is forever etched in my memory.
2022-11-10 11:58:43 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-11-10 11:58:53 +0100Guest75(~Guest75@178.141.177.81) (Ping timeout: 260 seconds)
2022-11-10 11:59:17 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 12:01:46 +0100__monty__(~toonn@user/toonn)
2022-11-10 12:01:59 +0100 <nilradical> what is a good and simple option for a server that will just read and write json files for someone with no experience doing servers
2022-11-10 12:03:53 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 246 seconds)
2022-11-10 12:06:00 +0100 <dminuoso> "json files" from the disk?
2022-11-10 12:06:07 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2022-11-10 12:06:19 +0100 <dminuoso> Do you mean a kind of daemon that reads files from the filesystem?
2022-11-10 12:06:35 +0100 <dminuoso> Or do you intend to receive/send json data over a network?
2022-11-10 12:07:13 +0100zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-11-10 12:07:39 +0100 <nilradical> dminuoso: yes on disk, i guess daemon on the filesystem is what i mean
2022-11-10 12:08:04 +0100 <dminuoso> Okay, what pieces of the puzzle are you missing?
2022-11-10 12:08:45 +0100 <dminuoso> And is performance relevant at all?
2022-11-10 12:09:58 +0100 <nilradical> i am basically trying to do a simulation of what will eventually be a network program where there is a client and a host communicating. i thought it may be easy to do this with just hte two programs running on the same disk reading and writing from .json files, but perhaps i'm wrong about that
2022-11-10 12:10:21 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-11-10 12:11:22 +0100 <nilradical> right now i have the two programs reading a file and writing to it using Aeson and readFile/writeFile
2022-11-10 12:11:53 +0100 <nilradical> i guess there could be some problem with one tryign to read while the other is trying to write as well
2022-11-10 12:12:01 +0100 <nilradical> maybe the network way would be better?
2022-11-10 12:12:11 +0100xff0x(~xff0x@2405:6580:b080:900:6c11:61e0:a694:e7f1)
2022-11-10 12:12:21 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-11-10 12:12:24 +0100 <nilradical> performance is not really relevant
2022-11-10 12:22:08 +0100Inst(~Liam@2601:6c4:4081:54f0:481:19c9:5bb6:fc21) (Ping timeout: 255 seconds)
2022-11-10 12:24:33 +0100CiaoSen(~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-11-10 12:29:29 +0100chromoblob(~user@37.113.164.122)
2022-11-10 12:35:18 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-11-10 12:35:56 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 12:39:09 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 12:43:17 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61)
2022-11-10 12:45:22 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
2022-11-10 12:47:46 +0100 <chreekat> nilradical: For the server i'd use any of the webserver tools . https://hackage.haskell.org/package/wai has basic ideas. Then you can use some of the fancier systems that layer on top it (e.g. most haskell web frameworks... servant, yesod, IHP) if things get complicated. For the client, http-client is maybe the easiest to recommend.
2022-11-10 12:47:47 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61) (Ping timeout: 255 seconds)
2022-11-10 12:47:49 +0100 <chreekat> and yeah I think setting up actual network apps is probably easiest
2022-11-10 12:48:31 +0100 <nilradical> chreekat: thanks very much, i'll give it a go
2022-11-10 12:49:24 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
2022-11-10 12:49:50 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-11-10 12:49:59 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 13:06:31 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-11-10 13:08:25 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 13:15:19 +0100xff0x(~xff0x@2405:6580:b080:900:6c11:61e0:a694:e7f1) (Ping timeout: 252 seconds)
2022-11-10 13:16:17 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 13:16:17 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-11-10 13:16:17 +0100finn_elijaFinnElija
2022-11-10 13:18:48 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 13:20:32 +0100mestre(~mestre@191.177.185.178)
2022-11-10 13:21:07 +0100xff0x(~xff0x@2405:6580:b080:900:6c11:61e0:a694:e7f1)
2022-11-10 13:21:14 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-11-10 13:23:23 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-11-10 13:24:02 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 13:24:35 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 13:24:47 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-11-10 13:29:15 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-11-10 13:32:41 +0100nate4(~nate@98.45.169.16)
2022-11-10 13:35:20 +0100bloomndoom(~user@115.240.194.54)
2022-11-10 13:36:10 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 13:36:26 +0100jakalx(~jakalx@base.jakalx.net)
2022-11-10 13:37:19 +0100nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-11-10 13:43:44 +0100 <bloomndoom> im getting this error when installing JuicyPixels `<command line>: cannot satisfy -package-id primitive-0.7.4.0-8hFPeuOq4VcHQCYtOnPDT3`, my ghc version is 9.0.2 and cabal version is 3.4.1.0 , on arch
2022-11-10 13:44:27 +0100mikoto-chan(~mikoto-ch@nat4.panoulu.net) (Ping timeout: 248 seconds)
2022-11-10 13:44:48 +0100 <maerwald[m]> bloomndoom: remove all arch GHCs
2022-11-10 13:44:52 +0100 <maerwald[m]> And start over
2022-11-10 13:45:24 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 13:45:28 +0100 <maerwald[m]> https://www.haskell.org/ghcup/
2022-11-10 13:45:37 +0100 <bloomndoom> maerwald: install through ghcup?
2022-11-10 13:51:10 +0100 <maerwald[m]> bloomndoom: can
2022-11-10 13:52:24 +0100 <merijn> bloomndoom: oh, you're on arch?
2022-11-10 13:52:30 +0100 <bloomndoom> fyeah
2022-11-10 13:52:32 +0100 <merijn> RIP
2022-11-10 13:52:39 +0100 <bloomndoom> huh?
2022-11-10 13:52:40 +0100 <merijn> nuke all system packages and start over
2022-11-10 13:52:48 +0100 <bloomndoom> wdym system packages?
2022-11-10 13:52:58 +0100 <merijn> as in, haskell package installed via arch
2022-11-10 13:53:03 +0100 <bloomndoom> like all haskell stuff?
2022-11-10 13:53:22 +0100 <merijn> bloomndoom: The compiler shipped by arch is (intentionally) broken in the default configuration
2022-11-10 13:53:45 +0100 <merijn> There's a bunch of stuff on the Arch wiki too on how you can workaround that, but the easiest method is just "don't use arch packages"
2022-11-10 13:53:54 +0100 <bloomndoom> ah damn
2022-11-10 13:54:05 +0100 <bloomndoom> so all haskell packages installed through pacman?
2022-11-10 13:54:16 +0100 <dminuoso> Yes.
2022-11-10 13:54:34 +0100 <merijn> It's been awhile since the great flood of arch users, or I woulda asked that first with errors like these
2022-11-10 13:54:35 +0100 <dminuoso> The GHC maintainer on Arch has some.. peculiar opinions.
2022-11-10 13:54:52 +0100 <merijn> dminuoso: Pretty sure it's all of Arch maintainers
2022-11-10 13:55:01 +0100 <bloomndoom> wow lol
2022-11-10 13:55:09 +0100 <merijn> bloomndoom: Essentially Arch belives "dynamic linking is The One True Way"
2022-11-10 13:55:13 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 13:55:15 +0100 <bloomndoom> i actually wanted to use nix but seemed to buggy
2022-11-10 13:55:18 +0100 <merijn> bloomndoom: So they only install dynamic versions of haskell libraries
2022-11-10 13:55:28 +0100 <bloomndoom> so just `pacman -Qeq | grep haskell | sudo pacman -Rsn -` ?
2022-11-10 13:55:45 +0100 <merijn> bloomndoom: Except, GHC (in its default configuration) links statically by default, and they can't be arsed to fix/patch GHC to default to dynamic on arch
2022-11-10 13:55:47 +0100 <tomsmeding> '^haskell-' to be safer
2022-11-10 13:56:08 +0100 <tomsmeding> bloomndoom: actually it's probably easier to `pacman -Rsc ghc`
2022-11-10 13:56:08 +0100 <bloomndoom> merijn: ah that sucks
2022-11-10 13:56:24 +0100 <merijn> So by default GHC will try to statically link, encounter all these packages that are installed (according to the database) but don't have static versions, so it's only conclusion is "package must be broken"
2022-11-10 13:56:30 +0100 <bloomndoom> tomsmeding: yeah that makes sense lol
2022-11-10 13:56:32 +0100 <tomsmeding> and then see if you have any *ghc* or *haskell* packages left and look more carefully at those
2022-11-10 13:56:43 +0100 <dminuoso> merijn: to be absolutely blunt, GHC could have better diagnostics.
2022-11-10 13:56:52 +0100 <dminuoso> It could tell you "missing static version of XYZ"
2022-11-10 13:57:07 +0100 <dminuoso> Just saying "cannot satisfy" is about the poorest thing to tell.
2022-11-10 13:57:08 +0100 <merijn> dminuoso: Sure, it did at one point, I think?
2022-11-10 13:57:49 +0100 <bloomndoom> tomsmeding: ran it, have hls, ghc and a few related packages left
2022-11-10 13:58:03 +0100 <dminuoso> merijn: Anyway. What is kind of funny about the whole arch haskell business, is that one of the primary reasons for breaking things the way they are, is because the maintainer has slow internet speed.
2022-11-10 13:58:10 +0100 <tomsmeding> bloomndoom: if you did -Rsc ghc then you cannot have ghc left :p
2022-11-10 13:58:24 +0100 <dminuoso> Not judging, but it is really the driving reason why arch haskell is all dynamically built.
2022-11-10 13:58:50 +0100 <bloomndoom> tomsmeding: wait nvm, it isnt there, it was just showing up on autocomplete for a sec lol
2022-11-10 13:59:18 +0100 <dminuoso> Well and the fact, that it seems that the Arch Haskell packages were built on his personal PC...
2022-11-10 13:59:26 +0100 <dminuoso> Which meant compiling things locally was slow, and uploading even slower...
2022-11-10 13:59:29 +0100 <dminuoso> It's kind of absurd.
2022-11-10 13:59:56 +0100 <bloomndoom> wait
2022-11-10 14:00:09 +0100 <maerwald[m]> dminuoso: it's an amateur distro
2022-11-10 14:01:17 +0100 <maerwald[m]> There has always been Synergy of packagers taking ideas from each others build recipes. E.g. gentoos have usually high quality or fedora. But no one looks at arch PKGBUILDs. They're generally trash.
2022-11-10 14:02:13 +0100 <bloomndoom> tomsmeding: could running -Rsc break my system? some applications arent closing rn
2022-11-10 14:02:24 +0100 <bloomndoom> it isnt a big deal cuz this is a vm but yeah
2022-11-10 14:02:58 +0100 <tomsmeding> bloomndoom: what did it remove :p
2022-11-10 14:03:04 +0100 <bloomndoom> not sure lol
2022-11-10 14:03:06 +0100 <tomsmeding> lol
2022-11-10 14:03:11 +0100 <maerwald[m]> There's good news though: there are better distros than arch
2022-11-10 14:03:18 +0100 <bloomndoom> but i cant seem to close windows anymore tho
2022-11-10 14:03:19 +0100 <tomsmeding> if I told you to `rm -rf --no-preserve-root /`, would you do it too?
2022-11-10 14:03:23 +0100 <dminuoso> maerwald[m]: Im not even talking about PKGBUILD itself, but the mere fact that there's a maintainer just punching in commands on their local computer, and hitting some upload button - and the artifacts are what are in pacman.
2022-11-10 14:03:32 +0100 <dminuoso> There's something deeply flawed about it.
2022-11-10 14:03:32 +0100 <tomsmeding> always check what commands do before you run them
2022-11-10 14:03:34 +0100 <bloomndoom> tomsmeding: nah i know what that does lmao
2022-11-10 14:03:59 +0100 <dminuoso> You'd think they have some kind of CI infrastructure to do this, running on dedicated computing hardware
2022-11-10 14:04:00 +0100 <tomsmeding> bloomndoom: it should have removed all packages that depend on ghc, as well as everything that was not explicitly installed and has become redundant after removing all the other stuff
2022-11-10 14:04:14 +0100 <tomsmeding> perhaps you actually needed some of the dependencies?
2022-11-10 14:04:16 +0100 <maerwald[m]> Legit, lol
2022-11-10 14:04:36 +0100 <bloomndoom> tomsmeding: yeah true, i had a vague idea of what it did but wasnt exactly sure
2022-11-10 14:04:38 +0100 <tomsmeding> bloomndoom: check /var/log/pacman.log, it shows a log of all the things it did
2022-11-10 14:05:55 +0100 <bloomndoom> maerwald[m]: what distros do you recommend over arch?
2022-11-10 14:06:05 +0100dminuososmells gentoo coming
2022-11-10 14:06:21 +0100tomsmedingsmells fedora coming actually
2022-11-10 14:06:24 +0100 <maerwald[m]> dminuoso: no god no
2022-11-10 14:06:56 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-11-10 14:07:05 +0100 <dminuoso> Either way, its particularly the Haskell side that is broken on Arch. Whether you are fine with the rest of it is up to you *shrugs*
2022-11-10 14:07:21 +0100 <dminuoso> I dont have any strong feelings to tell people not to use a particular distribution
2022-11-10 14:07:37 +0100 <maerwald[m]> bloomndoom: Fedora or opensuse is a good compromise, although Fedors packagers sometimes break shit too carelessly
2022-11-10 14:07:38 +0100 <maerwald[m]> I consider debian trash too
2022-11-10 14:08:04 +0100jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-11-10 14:08:17 +0100 <bloomndoom> tomsmeding: it removed the haskell packages , doesnt looklike it should break anything
2022-11-10 14:08:40 +0100 <tomsmeding> bloomndoom: try turning it off and on again?
2022-11-10 14:09:00 +0100 <bloomndoom> yeah i'll do that
2022-11-10 14:09:07 +0100 <maerwald[m]> dminuoso: GHC build on debian and executed on most non debian distros spams stderr with trash
2022-11-10 14:09:23 +0100bloomndoom(~user@115.240.194.54) (Remote host closed the connection)
2022-11-10 14:09:31 +0100 <maerwald[m]> Because they manage to build libraries in ways no one else does
2022-11-10 14:10:08 +0100 <dminuoso> Perhaps the thing that is really broken is not operating systems, but lack of cohesive tooling or good build systems.
2022-11-10 14:10:24 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-11-10 14:10:38 +0100bloomndoom(~user@115.240.194.54)
2022-11-10 14:10:55 +0100 <bloomndoom> okay yeah restarting seemed to fix it
2022-11-10 14:11:01 +0100 <dminuoso> Linux distributions areparticularly problematic due to the organic nature, you have a gigantic mixture of pieces software that are glued together randomly, built with very adhoc build systems making so many assumptions..
2022-11-10 14:11:29 +0100 <maerwald[m]> dminuoso: with arch you could argue it's lack of knowledge. But with Debian it's outright stupidity, because they know what they are doing and do it anyway
2022-11-10 14:11:50 +0100 <bloomndoom> what about void?
2022-11-10 14:12:06 +0100 <maerwald[m]> This is not a technical problem
2022-11-10 14:12:39 +0100 <maerwald[m]> Cannot be solved by tech
2022-11-10 14:13:02 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 246 seconds)
2022-11-10 14:13:35 +0100 <bloomndoom> do i need both cabal and stack?
2022-11-10 14:13:39 +0100akegalj(~akegalj@93-136-80-143.adsl.net.t-com.hr) (Quit: leaving)
2022-11-10 14:13:44 +0100 <maerwald[m]> bloomndoom: I wanted to try it, but afair I got alienated by how to build packages
2022-11-10 14:13:45 +0100 <maerwald[m]> You need either docker or some other isolated layer afair
2022-11-10 14:13:45 +0100 <maerwald[m]> Felt kinds clunky go hack on build recipes
2022-11-10 14:13:56 +0100 <maerwald[m]> bloomndoom: no, cabal is enough
2022-11-10 14:15:50 +0100bloomndo`(~user@223.187.114.68)
2022-11-10 14:16:02 +0100 <ski> @where cabal-stack-disambiguation
2022-11-10 14:16:02 +0100 <lambdabot> "The Cabal/Stack Disambiguation Guide" at <https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07> by Merijn
2022-11-10 14:17:50 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 260 seconds)
2022-11-10 14:17:53 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 14:18:02 +0100mbuf(~Shakthi@49.204.118.65) (Quit: Leaving)
2022-11-10 14:20:06 +0100bloomndoom(~user@115.240.194.54) (Ping timeout: 268 seconds)
2022-11-10 14:21:11 +0100 <dminuoso> maerwald[m]: Honestly, I think if I could restart my life, I would just pick FreeBSD.
2022-11-10 14:21:22 +0100 <dminuoso> In so many ways its actually sane and cohesive.
2022-11-10 14:21:27 +0100 <dminuoso> And it comes with a great manual too.
2022-11-10 14:21:55 +0100 <maerwald[m]> dminuoso: but it's so messy
2022-11-10 14:22:06 +0100 <dminuoso> There is not a single non-messy operating system.
2022-11-10 14:22:31 +0100 <dminuoso> With great complexity, there comes great responsiblity to use a vacuum cleaner.
2022-11-10 14:22:57 +0100 <maerwald[m]> FreeBSD broke cabal with an upgrade from 13.0 to 13.1 i think. It just installs the broken version and doesn't care
2022-11-10 14:23:11 +0100 <maerwald[m]> Then there is this issue with having two copies of ncurses
2022-11-10 14:23:31 +0100 <maerwald[m]> And they sometimes break major things
2022-11-10 14:24:17 +0100 <maerwald[m]> There was this filesystem? change a fer years ago or so that impacted haskell too
2022-11-10 14:24:26 +0100 <maerwald[m]> Maintaining FreeBSD CI is a plague
2022-11-10 14:27:23 +0100 <maerwald[m]> I think was the 64bit inode change
2022-11-10 14:27:58 +0100 <maerwald[m]> https://github.com/commercialhaskell/stack/issues/3515
2022-11-10 14:28:00 +0100 <maerwald[m]> gg
2022-11-10 14:28:28 +0100 <maerwald[m]> I got no love for this :p
2022-11-10 14:30:35 +0100azimut_(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-11-10 14:31:03 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 14:31:49 +0100bloomndo`(~user@223.187.114.68) (Ping timeout: 268 seconds)
2022-11-10 14:37:11 +0100mikoto-chan(~mikoto-ch@164.5.249.78)
2022-11-10 14:44:02 +0100 <bjourne> suppose i have a class like this:
2022-11-10 14:44:04 +0100 <bjourne> class Pretty a where
2022-11-10 14:44:05 +0100 <bjourne> pretty :: a -> String
2022-11-10 14:44:49 +0100 <bjourne> how can i make lists instances of this class?
2022-11-10 14:45:41 +0100 <dminuoso> You can use OVERLAPPABLE over OVERLAPPING
2022-11-10 14:45:55 +0100 <dminuoso> https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/instances.html#instance-overlap
2022-11-10 14:46:03 +0100 <dminuoso> Aside from that, consider not using a typeclass for this.
2022-11-10 14:46:27 +0100 <bjourne> show me an example
2022-11-10 14:46:40 +0100 <dminuoso> Using OVERLAPPING/OVERLAPPABLE, or without a typeclass?
2022-11-10 14:47:23 +0100 <bjourne> its deprecated so its moot
2022-11-10 14:47:41 +0100 <dminuoso> No using them as language pragmas is deprecated
2022-11-10 14:47:48 +0100 <dminuoso> You can use them as pragmas directly inside an instance
2022-11-10 14:48:11 +0100 <dminuoso> `instance {-# OVERLAPPING #-} Pretty [a] where ...`
2022-11-10 14:48:29 +0100 <dminuoso> But honestly, I would recommend you do not use a typeclass to begin with for this, but rather just `ppr*` functions. It tends to be better long time
2022-11-10 14:49:21 +0100 <bjourne> i don't want to write {-# OVERLAPPING #-} in my code
2022-11-10 14:49:55 +0100 <dminuoso> Do not use a typeclass instance, then. There's no good reason you should anyway
2022-11-10 14:50:03 +0100 <dminuoso> `pprList = ...` and then use that function.
2022-11-10 14:50:42 +0100 <dminuoso> I've recently written an SO answer about a very similar topic, most of which applies to Pretty as well: https://stackoverflow.com/a/74380240/6636995
2022-11-10 14:51:06 +0100alphabeta(~kilolympu@213.144.144.24) (Read error: Connection reset by peer)
2022-11-10 14:52:47 +0100 <bjourne> yes i can work around it, but having one function prettifying every element in the dom is nice
2022-11-10 14:53:35 +0100 <bjourne> pprList = ..., pprLeaf = ..., pprId = ..., very ugly
2022-11-10 14:54:42 +0100alphabeta(~kilolympu@213.144.144.24)
2022-11-10 14:57:03 +0100 <dminuoso> Why is that ugly?
2022-11-10 14:57:07 +0100 <dminuoso> You are writing each such line anyway.
2022-11-10 14:57:16 +0100 <dminuoso> `pretty = ...`, `pretty = ....`, `pretty = ...`
2022-11-10 14:57:54 +0100irrgit_(~irrgit@146.70.27.250)
2022-11-10 14:58:11 +0100 <kuribas> dminuoso: I think you need Pretty a => Instance Pretty [a]
2022-11-10 14:58:23 +0100 <bjourne> cause i also have to swrite pprList, pprLeaf, etc on each callsite
2022-11-10 14:58:23 +0100 <kuribas> dminuoso: why is the OVERLAPPING needed?
2022-11-10 14:58:30 +0100 <dminuoso> kuribas: Perhaps. Im not making any assumptions about what they intend to do.
2022-11-10 14:58:40 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2022-11-10 14:58:48 +0100 <dminuoso> kuribas: Im making the implicit assumption they already have an `instance Pretty String` :P
2022-11-10 14:58:50 +0100 <kuribas> bjourne: also consider using a pretty printing library.
2022-11-10 14:59:19 +0100 <dminuoso> bjourne: I do not consider that to be a problem. Actually, I see the opposite as an actual problem.
2022-11-10 14:59:23 +0100 <dminuoso> Outlined in the SO answer.
2022-11-10 14:59:28 +0100 <dminuoso> It hides what code does.
2022-11-10 14:59:33 +0100 <kuribas> dminuoso: but he wants [a], not String
2022-11-10 14:59:47 +0100 <dminuoso> You have to a) know the types involved and b) do instance resolution in your head, just to figure out what `pretty x` actually ends up doing.
2022-11-10 14:59:57 +0100 <dminuoso> And if types change, suddenly their representation change too
2022-11-10 15:00:12 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-11-10 15:00:56 +0100 <bjourne> it's a problem because if i change the dom i have to replace lots of pprWhatever with pprWhateverNew
2022-11-10 15:01:46 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-11-10 15:01:51 +0100 <dminuoso> It can be a simple `sed` or editor command to do this for you, if you demand so.
2022-11-10 15:02:06 +0100 <dminuoso> I think of this as a benefit, since I get control over if I want that to happen
2022-11-10 15:04:07 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-11-10 15:04:50 +0100Xeroine(~Xeroine@user/xeroine)
2022-11-10 15:07:16 +0100Guest75(~Guest75@178.141.177.81)
2022-11-10 15:09:30 +0100nilradical(~nilradica@user/naso) (Remote host closed the connection)
2022-11-10 15:10:05 +0100nilradical(~nilradica@user/naso)
2022-11-10 15:10:59 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 15:14:39 +0100nilradical(~nilradica@user/naso) (Ping timeout: 260 seconds)
2022-11-10 15:18:27 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-11-10 15:18:43 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-11-10 15:18:50 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-11-10 15:25:46 +0100 <tomsmeding> bjourne: do you want both `Pretty [a]` and `Pretty String`, and have the second do something different than the [a] instance?
2022-11-10 15:39:18 +0100 <int-e> :t showList
2022-11-10 15:39:19 +0100 <lambdabot> Show a => [a] -> ShowS
2022-11-10 15:40:56 +0100 <int-e> (Do we know who came up with that trick?)
2022-11-10 15:42:57 +0100coldtom(~coldtom@coldrick.cc)
2022-11-10 15:42:59 +0100nilradical(~nilradica@user/naso)
2022-11-10 15:43:20 +0100 <int-e> (The trick being to delegate the implementation of Show for [a] to the Show instance for a... so [Char] can have a different Show implementation than other lists)
2022-11-10 15:44:33 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Ping timeout: 252 seconds)
2022-11-10 15:45:43 +0100Sgeo(~Sgeo@user/sgeo)
2022-11-10 15:46:46 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 15:52:41 +0100 <geekosaur> sadly, that doesn't scale very well. I can't mod Show to have a different mechanism for Show (Set Char) at this point, for example
2022-11-10 15:56:21 +0100o-90(~o-90@gateway/tor-sasl/o-90)
2022-11-10 15:57:09 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 15:57:37 +0100Tuplanolla(~Tuplanoll@91-159-68-194.elisa-laajakaista.fi)
2022-11-10 16:00:31 +0100fserucas(~fserucas@2001:8a0:6d00:2500:4717:7619:c4e9:3aa2)
2022-11-10 16:02:27 +0100o-90(~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection)
2022-11-10 16:14:20 +0100nilradical(~nilradica@user/naso) (Ping timeout: 255 seconds)
2022-11-10 16:17:03 +0100enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
2022-11-10 16:17:07 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-11-10 16:28:09 +0100ec_(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-11-10 16:28:58 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-11-10 16:30:54 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-11-10 16:31:25 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2022-11-10 16:32:24 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-11-10 16:32:33 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-11-10 16:32:35 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-11-10 16:32:42 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-11-10 16:32:52 +0100Xeroine(~Xeroine@user/xeroine)
2022-11-10 16:33:17 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 16:33:25 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-11-10 16:38:11 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 255 seconds)
2022-11-10 16:42:48 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2022-11-10 16:45:02 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-11-10 16:46:03 +0100 <bjourne> tomsmeding: i dont want "Pretty String"
2022-11-10 16:46:18 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 16:46:40 +0100 <tomsmeding> bjourne: in that case, what is the problem with `instance Pretty a => Pretty [a] where`
2022-11-10 16:46:54 +0100 <tomsmeding> the whole OVERLAPPING discussion was assuming that you wanted String and [a] to have different instances
2022-11-10 16:47:02 +0100 <tomsmeding> dminuoso: you assumed :p
2022-11-10 16:47:59 +0100crns(~netcrns@p4ff5e3ac.dip0.t-ipconnect.de)
2022-11-10 16:47:59 +0100crns(~netcrns@p4ff5e3ac.dip0.t-ipconnect.de) (Changing host)
2022-11-10 16:47:59 +0100crns(~netcrns@user/crns)
2022-11-10 16:50:22 +0100jinsun(~jinsun@user/jinsun)
2022-11-10 16:50:33 +0100acidjnk(~acidjnk@p200300d6e7137a22458dfbf66917fb17.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-11-10 16:55:01 +0100 <bjourne> tomsmeding: the problem was that i didn't know the syntax
2022-11-10 16:55:08 +0100 <tomsmeding> ah :)
2022-11-10 16:55:15 +0100 <tomsmeding> ignore the whole discussion above then
2022-11-10 16:55:23 +0100Guest75(~Guest75@178.141.177.81) (Quit: Client closed)
2022-11-10 16:55:38 +0100 <tomsmeding> well, I guess dminuoso's opinion that he doesn't like to use a type class for this still stands
2022-11-10 16:56:12 +0100 <tomsmeding> one of the motivations being that _if_ you end up wanting `Pretty String` to do something different than the generic lists instance, you need hacks
2022-11-10 16:58:20 +0100 <bjourne> ic, i dont know much about haskell's warts and limitations
2022-11-10 16:58:43 +0100 <tomsmeding> bjourne: the thing is that String = [Char]
2022-11-10 16:58:55 +0100 <kuribas> bjourne: they their for reasons.
2022-11-10 16:58:58 +0100 <tomsmeding> so if you now want to pretty-print a String, it ends up getting treated as a list of characters
2022-11-10 16:59:42 +0100 <kuribas> bjourne: they are there for reasons. Some good, and some historical. In general, you don't want type classes to overlap.
2022-11-10 17:00:41 +0100 <tomsmeding> overlapping instances being the "hacks" I mentioned
2022-11-10 17:01:32 +0100 <bjourne> ic, very bad design i suppose
2022-11-10 17:02:34 +0100 <dminuoso> I think at the very least String should have been newtyped.
2022-11-10 17:02:37 +0100 <kuribas> bjourne: type class instances are open, so they can come from any place. That's why normally they shouldn't overlap, since then you get ambiguity.
2022-11-10 17:02:55 +0100 <kuribas> bjourne: however, sometimes you do want it, and then the OVERLAP pragma can be helpful.
2022-11-10 17:05:03 +0100 <kuribas> bjourne: it's not "bad design", you just need to know when it is appropriate.
2022-11-10 17:05:48 +0100 <kuribas> And in applications overlapping instances aren't a problem, because then all the instances are known. Only in libraries type are.
2022-11-10 17:06:14 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2022-11-10 17:06:30 +0100elevenkb(~elevenkb@105.184.125.168)
2022-11-10 17:08:20 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds)
2022-11-10 17:08:44 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:fd7d:bd88:d842:b1bb) (Ping timeout: 246 seconds)
2022-11-10 17:11:51 +0100sadmax(~user@209.205.174.253)
2022-11-10 17:17:01 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-11-10 17:19:51 +0100vn36(~vn36@123.63.203.210)
2022-11-10 17:20:25 +0100blomberg(~default_u@89-39-107-192.hosted-by-worldstream.net)
2022-11-10 17:20:27 +0100 <blomberg> hi
2022-11-10 17:20:44 +0100 <vn36> elo
2022-11-10 17:21:12 +0100 <blomberg> i=3;while cond;... i=2*i^3+4 ; can fodl do this
2022-11-10 17:22:14 +0100 <tomsmeding> blomberg: what have you tried?
2022-11-10 17:22:44 +0100 <blomberg> haskell no loops simulation problem
2022-11-10 17:22:58 +0100 <kuribas> :t iterate (\i -> 2 * i*i*i + 4)
2022-11-10 17:22:59 +0100 <lambdabot> Num a => a -> [a]
2022-11-10 17:23:18 +0100 <tomsmeding> :t iterate (\i -> 2 * i^3 + 4)
2022-11-10 17:23:19 +0100 <lambdabot> Num a => a -> [a]
2022-11-10 17:24:14 +0100 <blomberg> where is the iterate function mentioned in learn you a haskell book
2022-11-10 17:24:28 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61)
2022-11-10 17:25:34 +0100 <blomberg> are there other functools like map filter fold
2022-11-10 17:25:59 +0100 <tomsmeding> https://hackage.haskell.org/package/base-4.14.0.0/docs/Prelude.html
2022-11-10 17:27:11 +0100 <blomberg> btw that line iterate needs i=3 initialization
2022-11-10 17:27:44 +0100 <kuribas> :t iterate (\i -> 2 * i^3 + 4) 3
2022-11-10 17:27:45 +0100 <lambdabot> Num a => [a]
2022-11-10 17:28:38 +0100 <kuribas> > fix (\f i -> if i > 30 then i else f (2 * i^3 + 4)) 3
2022-11-10 17:28:39 +0100 <lambdabot> 58
2022-11-10 17:29:03 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-11-10 17:29:06 +0100 <tomsmeding> > iterate (\i -> 2 * i^3 + 4) 3
2022-11-10 17:29:07 +0100 <lambdabot> [3,58,390228,118846194466264708,33572666422292922482173017929660337310850854...
2022-11-10 17:29:19 +0100 <int-e> > takeWhile (< 10^9) (iterate (\i -> 2*i^3 + 4) 3)
2022-11-10 17:29:21 +0100 <lambdabot> [3,58,390228]
2022-11-10 17:29:41 +0100 <kuribas> > find (< 10^9) (iterate (\i -> 2*i^3 + 4) 3)
2022-11-10 17:29:43 +0100 <lambdabot> Just 3
2022-11-10 17:30:36 +0100 <int-e> AFAICS LYAH doesn't use `iterate` much but it is mentioned when it describes Data.List
2022-11-10 17:30:38 +0100 <kuribas> > find (> 10^9) (iterate (\i -> 2*i^3 + 4) 3)
2022-11-10 17:30:40 +0100 <lambdabot> Just 118846194466264708
2022-11-10 17:30:45 +0100 <int-e> explicit recursion is always an option
2022-11-10 17:31:14 +0100causal(~user@50.35.83.177) (Quit: WeeChat 3.7.1)
2022-11-10 17:31:29 +0100 <int-e> kuribas: head . dropWhile (<= 10^9) is safe when the input is an infinite list
2022-11-10 17:31:31 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-11-10 17:31:42 +0100 <int-e> (the `find` will never return Nothing anyway)
2022-11-10 17:31:57 +0100 <kuribas> int-e: well, it's a "no loop challenge".
2022-11-10 17:32:27 +0100enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
2022-11-10 17:32:34 +0100 <kuribas> int-e: not on an infinite list
2022-11-10 17:32:40 +0100Xeroine(~Xeroine@user/xeroine)
2022-11-10 17:32:40 +0100 <blomberg> but haskell has no loops?
2022-11-10 17:32:42 +0100 <int-e> kuribas: I've seen that, but I'm being pragmatic here... and defending LYAH for not going into depth on `iterate`
2022-11-10 17:32:57 +0100 <int-e> or its friend `unfoldr`
2022-11-10 17:33:07 +0100 <kuribas> blomberg: I thought you meant no recursion by "no loops".
2022-11-10 17:34:00 +0100 <blomberg> iterate is also missing the condition say i<900
2022-11-10 17:34:05 +0100 <int-e> > let loop i | i >= 10^9 = [] | otherwise = i : loop (2*i^3 + 4) in loop 3
2022-11-10 17:34:07 +0100 <lambdabot> [3,58,390228]
2022-11-10 17:34:11 +0100nate4(~nate@98.45.169.16)
2022-11-10 17:34:25 +0100acidjnk(~acidjnk@p200300d6e7137a38458dfbf66917fb17.dip0.t-ipconnect.de)
2022-11-10 17:34:41 +0100 <dminuoso> blomberg: Well, we have no *structured* loops in the sense that we have syntactical constructs of them. But recursion is really the same, and in fact after code generation, you generally get comparable code as a loop in most structured programming languages.
2022-11-10 17:34:58 +0100 <int-e> blomberg: you can tack the check on later, see the `takeWhile` things above
2022-11-10 17:34:59 +0100 <dminuoso> blomberg: So dont think of it as simulation, we just encode loops differently.
2022-11-10 17:35:37 +0100 <int-e> the joy of being lazy
2022-11-10 17:35:46 +0100 <kuribas> you can think of loops as simulating recursion :)
2022-11-10 17:36:10 +0100 <blomberg> dminuoso:i meant a function for loops, like iterate
2022-11-10 17:36:37 +0100 <int-e> :t unfoldr
2022-11-10 17:36:38 +0100 <lambdabot> (b -> Maybe (a, b)) -> b -> [a]
2022-11-10 17:36:43 +0100 <dminuoso> blomberg: Okay, whats wrong with iterate?
2022-11-10 17:36:53 +0100vpan(~0@212.117.1.172) (Quit: Leaving.)
2022-11-10 17:37:14 +0100azimut_(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-11-10 17:37:47 +0100 <kuribas> blomberg: it's more typical in haskell to combine different functions that do a single thing, rather than having functions that include everything (as in common lisp).
2022-11-10 17:37:49 +0100 <blomberg> iterate (\i -> 2 * i^3 + 4) 3 ; i<900 condition is misssing
2022-11-10 17:38:00 +0100 <int-e> (FWIW, I hardly ever use unfoldr. I *do* use the takeWhile/iterate thing quite often.)
2022-11-10 17:38:15 +0100 <dminuoso> blomberg: I would just write explicit recursion.
2022-11-10 17:38:24 +0100 <kuribas> blomberg: iterate returns an infinite list
2022-11-10 17:38:34 +0100 <blomberg> takeWhile (< 10^9) (iterate (\i -> 2*i^3 + 4) 3) is that i<10^9?
2022-11-10 17:39:02 +0100 <int-e> (< 10^9) is the same as (\i -> i < 10^9)
2022-11-10 17:39:04 +0100nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-11-10 17:39:11 +0100 <kuribas> (< 10^9) == (\i -> i < 10^9)
2022-11-10 17:39:40 +0100 <dminuoso> % f = go 0 where go i | i < 900 = go (2 * i^3 + 4); go i = i
2022-11-10 17:39:40 +0100 <yahb2> <no output>
2022-11-10 17:39:48 +0100 <dminuoso> blomberg: Is how I would write it I guess?
2022-11-10 17:40:08 +0100 <int-e> % f
2022-11-10 17:40:08 +0100 <yahb2> 4599940
2022-11-10 17:40:26 +0100 <dminuoso> Oh, it should start at 3, sorry
2022-11-10 17:40:28 +0100 <dminuoso> % f = go 3 where go i | i < 900 = go (2 * i^3 + 4); go i = i
2022-11-10 17:40:28 +0100 <yahb2> <no output>
2022-11-10 17:40:31 +0100 <dminuoso> f
2022-11-10 17:40:32 +0100 <dminuoso> % f
2022-11-10 17:40:32 +0100 <yahb2> 390228
2022-11-10 17:41:16 +0100 <dminuoso> blomberg: With a slight bit of squinting, it looks the same as: i=3; while (i < 900) { i=2*i^3+4 }
2022-11-10 17:41:42 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Ping timeout: 255 seconds)
2022-11-10 17:41:46 +0100 <blomberg> takeWhile (< 10^9) (iterate (restofLOOPCODE + \i -> 2*i^3 + 4) 3) can resofLOOPCODE be a function; i see it's much more complex functionally
2022-11-10 17:42:26 +0100 <kuribas> blomberg: you cannot add to a function
2022-11-10 17:42:55 +0100 <blomberg> i know
2022-11-10 17:43:17 +0100 <kuribas> blomberg: then what is that supposed to do?
2022-11-10 17:43:48 +0100 <blomberg> so overall we need three functions takeWhile , iterate and loopCODE content
2022-11-10 17:43:55 +0100 <kuribas> :t \x -> x + \y -> y*3
2022-11-10 17:43:56 +0100 <lambdabot> (Num a, Num (a -> a)) => (a -> a) -> a -> a
2022-11-10 17:44:17 +0100 <int-e> kuribas: nice, it looks like a Church numeral now...
2022-11-10 17:44:32 +0100 <kuribas> ok, you CAN add to a function :)
2022-11-10 17:44:33 +0100 <int-e> numbers all around
2022-11-10 17:45:06 +0100 <int-e> lambdabot even used to have a Num instance for functions by default
2022-11-10 17:45:15 +0100 <blomberg> takeWhile (< 10^9) (iterate (restofLOOPCODE) 3) is it valid
2022-11-10 17:45:28 +0100 <blomberg> if the loop is like 5 lines big or more
2022-11-10 17:45:34 +0100 <int-e> (using pointwise evaluation, f + g = \x -> f x + g x)
2022-11-10 17:47:55 +0100 <blomberg> so haskell avoids for loops using fold which is relatively easier than while but this line is way too much takeWhile (< 10^9) (iterate (\i -> 2*i^3 + 4) 3)
2022-11-10 17:48:12 +0100 <kuribas> > let while i t f | t i = i | otherwise = while (f i) t f in while 3 (< 10^9) (\i -> 2*i^3 + 4)
2022-11-10 17:48:14 +0100 <lambdabot> 3
2022-11-10 17:48:30 +0100 <kuribas> > let while i t f | t i = i | otherwise = while (f i) t f in while 3 (> 10^9) (\i -> 2*i^3 + 4)
2022-11-10 17:48:32 +0100 <lambdabot> 118846194466264708
2022-11-10 17:48:39 +0100 <kuribas> blomberg: here is your while loop :)
2022-11-10 17:48:41 +0100 <int-e> boolean blindness :)
2022-11-10 17:48:50 +0100 <int-e> it's really "until" now
2022-11-10 17:49:20 +0100 <kuribas> true
2022-11-10 17:49:24 +0100 <int-e> IIRC there's a hackage package provding stuff like that
2022-11-10 17:49:35 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 17:49:35 +0100 <EvanR> jeez, it seems like there's a simple piece of code struggling to get out. But it might not fit on a line, which is honestly fine
2022-11-10 17:50:14 +0100 <blomberg> using recursion is much simpler
2022-11-10 17:50:32 +0100 <EvanR> the higher order functions are great only if they do exactly what you want and don't need any shoehorning
2022-11-10 17:51:06 +0100 <kuribas> EvanR: that's why you combine them?
2022-11-10 17:52:00 +0100 <kuribas> but yeah, sometimes a custom recursive function is easier
2022-11-10 17:53:03 +0100 <int-e> @hoogle while
2022-11-10 17:53:03 +0100 <lambdabot> Sound.Tidal.UI while :: Pattern Bool -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
2022-11-10 17:53:03 +0100 <lambdabot> Development.NSIS while :: Exp Bool -> Action () -> Action ()
2022-11-10 17:53:03 +0100 <lambdabot> Language.C.Syntax While :: Exp -> Stm -> SrcLoc -> Stm
2022-11-10 17:53:13 +0100 <int-e> nah
2022-11-10 17:53:46 +0100 <int-e> (but yes to explicit recursion often being the clearest way to write code)
2022-11-10 17:54:14 +0100 <blomberg> if haskell doesn't care about simple computations then how will we even use it but surprisingly it has list comprehenstions which are iterations
2022-11-10 17:54:15 +0100 <EvanR> so you want to write a while loop. First let me introduce you to some category theory xD
2022-11-10 17:54:26 +0100 <blomberg> EvanR:NO
2022-11-10 17:54:35 +0100 <EvanR> this has been a meme
2022-11-10 17:54:59 +0100 <int-e> http://pages.cpsc.ucalgary.ca/~robin/class/449/Evolution.htm
2022-11-10 17:55:32 +0100 <blomberg> so in reality how would you even use haskell to do real stuff
2022-11-10 17:55:39 +0100 <int-e> (hmm is there a version of this with properly declared encoding...)
2022-11-10 17:56:05 +0100 <dolio> I don't understand the problem here. If you can do what you want with recursion, then you can do it in Haskell.
2022-11-10 17:56:20 +0100 <int-e> ah, this one seems to work: http://www.willamette.edu/~fruehr/haskell/evolution.html
2022-11-10 17:56:25 +0100 <int-e> @where evolution
2022-11-10 17:56:25 +0100 <lambdabot> http://www.willamette.edu/~fruehr/haskell/evolution.html
2022-11-10 17:56:39 +0100 <int-e> ...why did I think of that last
2022-11-10 17:57:25 +0100 <int-e> @botsnack
2022-11-10 17:57:25 +0100 <lambdabot> :)
2022-11-10 17:57:33 +0100 <dolio> The iterate version doesn't really look that bad to me either, though.
2022-11-10 17:57:39 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2022-11-10 17:58:18 +0100 <EvanR> blomberg, if you define real stuff to mean "imperative programming" well we have that too. do notation. But you still need to understand recursion to get iteration
2022-11-10 17:58:37 +0100 <int-e> it's nicely compositional, it often matches how I think of what I want to do: "generate elements by iterating a function... until a certain criterion matches"
2022-11-10 17:58:50 +0100 <EvanR> that being said it's nice when real world doesn't require imperative programming
2022-11-10 17:59:08 +0100 <int-e> so "iterate" does the generation part and "takeWhile" or "dropWhile" checks the criterion.
2022-11-10 17:59:44 +0100 <dolio> I pretty much never find myself wanting functions like `while` above, if that's what's meant, because they just aren't significantly better than writing recursion.
2022-11-10 17:59:57 +0100 <EvanR> it's enlightening to go back and think about all your real world problems and consider where imperative was the best way
2022-11-10 18:00:16 +0100 <EvanR> or if it was just the only way you knew about at the time
2022-11-10 18:00:21 +0100 <dolio> And usually I want to do stuff like pattern guards in my custom function, which are really awkward to use in a function like `while`.
2022-11-10 18:00:52 +0100 <int-e> EvanR: ...array manipulation.
2022-11-10 18:00:56 +0100 <dolio> Or, you wouldn't use them. You'd do something really awkward instead.
2022-11-10 18:01:05 +0100 <EvanR> probably
2022-11-10 18:01:09 +0100 <kuribas> I actually find my haskell code more "real", as in, it focusses on the solution, rather that on the low level implementation.
2022-11-10 18:02:48 +0100sadmax(~user@209.205.174.253) (Remote host closed the connection)
2022-11-10 18:04:02 +0100 <dolio> `while x (isJust . f) (g . fromJust . f)` or whatever.
2022-11-10 18:04:22 +0100machinedgod(~machinedg@clnet-p10-126.ikbnet.co.at) (Ping timeout: 252 seconds)
2022-11-10 18:04:23 +0100 <dsal> I tried doing `real` work in haskell last night, but then found that `real` was actually a postgres alias to float4 and I was using a `Double` which encoded differently in hasql and my tests were failing. So now I'm doing `float8` work instead.
2022-11-10 18:04:58 +0100 <EvanR> 🥁
2022-11-10 18:06:27 +0100 <dsal> Oh, this codebase does have a `whileM_` in it.
2022-11-10 18:06:42 +0100 <kuribas> dsal: that's why database libraries should have strict conversion for types.
2022-11-10 18:06:58 +0100 <kuribas> dsal: my hasqlator library has it.
2022-11-10 18:07:38 +0100 <dsal> I wrote a ton of code in go for a while. The only loop it's got is `for` so you do that for everything and have to spend a while trying to figure out what the person is trying to accomplish. Haskell simultaneously has no loops and a large number of loops (nearly infinite loops), but what you're doing is always clear.
2022-11-10 18:08:25 +0100 <dsal> kuribas: It was a new and exciting kind of failure for me. My first attempt at hasql, but I at least had good tests. Surprisingly bad failure modes, though. And yeah, would be nice if that weren't possible.
2022-11-10 18:08:44 +0100 <dsal> As a hasql user, would you happen to know how to run a query and dynamically interpret the results?
2022-11-10 18:08:56 +0100 <blomberg> what is hasql just writee haskell or hs
2022-11-10 18:09:05 +0100 <dsal> It's a library for talking to postgres
2022-11-10 18:09:09 +0100 <EvanR> blomberg, I think a good starting paradigm shift is to think about your real task as computing data from some other data. What data do you have, and what data to you need to output. Then use higher level transformations to bridge the gap. Many times you won't need explicit loops for this
2022-11-10 18:09:51 +0100 <EvanR> even in more common languages like ruby, python
2022-11-10 18:10:16 +0100 <dsal> ^ yeah. many of the for loops I read were either fmap or a fold, but they couldn't express that, so they'd do a bunch of junk in the middle of a for loop.
2022-11-10 18:10:40 +0100 <kuribas> dsal: I don't know hasql
2022-11-10 18:11:03 +0100 <dsal> It's nice saying "I know how to make an `a` into a `b`" and then realizing that means you can also make an IO action that maybe produces an `a` into maybe a `b` by using the same thing you've already tested.
2022-11-10 18:11:21 +0100mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 268 seconds)
2022-11-10 18:11:31 +0100 <dsal> kuribas: Oh, I see. I thought that was related to hasql.
2022-11-10 18:11:57 +0100ec_(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-11-10 18:11:59 +0100vn36(~vn36@123.63.203.210) (Ping timeout: 260 seconds)
2022-11-10 18:12:17 +0100 <EvanR> at least those languages do have map and foldl (reduce)
2022-11-10 18:12:49 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-11-10 18:13:02 +0100 <kuribas> EvanR: but reduce is discouraged in python
2022-11-10 18:13:03 +0100 <dsal> I thought python really wanted to get rid of that stuff.
2022-11-10 18:13:08 +0100 <EvanR> unsurprised
2022-11-10 18:13:25 +0100 <kuribas> because "there should be only one way to do things"
2022-11-10 18:13:52 +0100ph88(~ph88@ip5f5af71f.dynamic.kabel-deutschland.de)
2022-11-10 18:14:28 +0100ph88(~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Client Quit)
2022-11-10 18:14:43 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-11-10 18:14:44 +0100kuribas(~user@ptr-17d51enh7x68c2qjbwe.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1))
2022-11-10 18:15:22 +0100 <EvanR> "that you (the tioowtdi police) know of!"
2022-11-10 18:15:55 +0100nilradical(~nilradica@user/naso)
2022-11-10 18:16:07 +0100nilradical(~nilradica@user/naso) (Remote host closed the connection)
2022-11-10 18:16:50 +0100 <EvanR> I have noticed when recently going back to web tech languages there is a big push for uniformity of style in the code, like alarms go off if you do something considered unidiomatic
2022-11-10 18:17:01 +0100 <EvanR> does haskell have that
2022-11-10 18:18:11 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-11-10 18:18:48 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 18:18:54 +0100 <dsal> I've worked in a codebase that really tried to push some bizarre concepts in a similar way. That worked quite poorly.
2022-11-10 18:19:00 +0100 <EvanR> maybe a zillion dollar signs in a row is discouraged in haskell xD
2022-11-10 18:19:29 +0100 <dsal> I now work in a pretty large codebase that tries to push you in a direction, but won't get too upset if you go the other way (particularly if you don't force others to do your thing by making it part of your API).
2022-11-10 18:19:46 +0100 <dsal> Personally, I like naming my functions a number of dollar signs. So much easier than naming.
2022-11-10 18:20:21 +0100 <darkling> No, it's cat emojis all the way here.
2022-11-10 18:21:37 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 18:21:58 +0100 <dsal> The new hotness in haskell is to use `.` for everything. It's very versatile and since it's so tiny, it hardly takes up any space.
2022-11-10 18:22:11 +0100 <EvanR> when the OS on atari ST crashed it displayed a number of bombs instead of a textual error message, brilliant. The number of bombs was the indicator
2022-11-10 18:22:11 +0100 <darkling> Saves on RAM. :)
2022-11-10 18:23:25 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 18:24:50 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 18:25:03 +0100 <EvanR> by . do you mean function composition, fmap, or Category
2022-11-10 18:25:15 +0100 <dsal> OverloadedRecordDot
2022-11-10 18:25:32 +0100 <EvanR> is that seriously the new hotness?
2022-11-10 18:25:43 +0100 <dsal> Which is kind of like lens composition, but less useful and differently magical.
2022-11-10 18:25:47 +0100 <dsal> People at work seem to like it a lot.
2022-11-10 18:27:12 +0100 <dsal> It helps a lot, specifically, with some of the giant names generated by persistent table mapping stuff. It's kind of like OverloadedLabels, but with half a lens. And it uses `.`
2022-11-10 18:29:10 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-11-10 18:29:43 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-11-10 18:29:48 +0100 <dsal> (but I still think it's gross and would rather just use lens)
2022-11-10 18:31:39 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-11-10 18:36:01 +0100elevenkb(~elevenkb@105.184.125.168) (Ping timeout: 268 seconds)
2022-11-10 18:37:14 +0100jakalx(~jakalx@base.jakalx.net)
2022-11-10 18:37:29 +0100razetime(~quassel@117.193.3.56) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-11-10 18:40:22 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-11-10 18:41:17 +0100teo(~teo@user/teo) (Ping timeout: 252 seconds)
2022-11-10 18:41:22 +0100 <blomberg> dsal: why you think python is getting rid of reduce(foldl)
2022-11-10 18:43:04 +0100 <dsal> I've not really followed python much. It's not something I look at for examples of good decision making in general, though.
2022-11-10 18:43:29 +0100 <blomberg> `while x (isJust . f) (g . fromJust . f)` wat is this saying
2022-11-10 18:44:11 +0100 <c_wraith> it's saying that loop really should have been written differently
2022-11-10 18:44:56 +0100 <dsal> "while" is particularly confusing when everything's immutable because when is `x` changing?
2022-11-10 18:45:09 +0100 <c_wraith> also, note that `while' isn't a standard library thing, so figure out where it's coming from first
2022-11-10 18:45:43 +0100 <blomberg> c_wraith: differently?
2022-11-10 18:46:17 +0100 <EvanR> while is a function someone defined somewhere
2022-11-10 18:46:24 +0100 <EvanR> presumably
2022-11-10 18:46:42 +0100 <dsal> It's unclear what "while" means in a general sense. What are you trying to accomplish? Is the concept of "while" the best way?
2022-11-10 18:46:48 +0100 <c_wraith> blomberg: it applies f twice each pass through, and it exhibits a case of boolean blindness by depending on a predicate passing before using an unsafe function
2022-11-10 18:47:11 +0100 <c_wraith> dsal: that's not a helpful discussion when exactly what that function does is pretty clear from context
2022-11-10 18:47:22 +0100 <ski> @let let while init test step | test init = init | otherwise = while (step init) test step -- definition given by kuribas above
2022-11-10 18:47:22 +0100 <lambdabot> Parse failed: Parse error: EOF
2022-11-10 18:47:29 +0100 <ski> @let while init test step | test init = init | otherwise = while (step init) test step -- definition given by kuribas above
2022-11-10 18:47:31 +0100 <lambdabot> Defined.
2022-11-10 18:48:04 +0100 <yushyin> blomberg: guido really really dislikes functional programming apis. it had come up again and again in the past that he would want to remove it from python if he had the chance.
2022-11-10 18:48:51 +0100 <ski> blomberg : so, first argument, `x' is initial value of the state that it's iterating over. `isJust . f' is checking when to terminate, and `g . fromJust . f' tells how to update the state, otherwise (and then loop back again to testing)
2022-11-10 18:48:57 +0100 <EvanR> https://paste.tomsmeding.com/PYwPiyTy that while function on 3 lines for readability
2022-11-10 18:50:00 +0100 <int-e> :t init
2022-11-10 18:50:01 +0100 <lambdabot> [a] -> [a]
2022-11-10 18:50:08 +0100 <ski> in `while 3 (> 10^9) (\i -> 2*i^3 + 4)', it starts at `3', has `(> 10^9)' as termination condition, and updates with `\i -> 2*i^3 + 4'
2022-11-10 18:50:26 +0100 <dsal> c_wraith: I didn't see the definition above, but I still think it's a valid question. If you want to use something called "while" because that's how you'd write a particular bit of code in C, then that's a different answer from "I wish to interact with an API repeatedly until the response meets some criteria."
2022-11-10 18:50:34 +0100 <ski> @type until
2022-11-10 18:50:36 +0100 <lambdabot> (a -> Bool) -> (a -> a) -> a -> a
2022-11-10 18:50:38 +0100 <ski> @src until
2022-11-10 18:50:38 +0100 <lambdabot> until p f x | p x = x
2022-11-10 18:50:38 +0100 <lambdabot> | otherwise = until p f (f x)
2022-11-10 18:50:56 +0100CiaoSen(~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2022-11-10 18:51:24 +0100 <ski> is a standard looping function, of a similar ilk. using a slightly different argument ordering
2022-11-10 18:51:27 +0100 <c_wraith> dsal: but it's a totally natural thing to name such a function if you ignore the meaning of while loops in other languages
2022-11-10 18:51:46 +0100 <EvanR> ah, until is a Prelude function and does the same thing
2022-11-10 18:51:55 +0100MajorBiscuit(~MajorBisc@c-001-030-015.client.tudelft.eduvpn.nl) (Ping timeout: 252 seconds)
2022-11-10 18:51:58 +0100 <blomberg> @src while
2022-11-10 18:51:58 +0100 <lambdabot> Source not found. I've seen penguins that can type better than that.
2022-11-10 18:52:07 +0100 <EvanR> oh harsh
2022-11-10 18:52:15 +0100 <ski> `while' was defined by kuribas above, on the fly
2022-11-10 18:52:44 +0100 <dolio> The predefined one (which I think people rarely use) is until.
2022-11-10 18:52:50 +0100 <ski> yes
2022-11-10 18:53:06 +0100 <c_wraith> that is a weird definition. It returns the first succeeding element?
2022-11-10 18:53:27 +0100 <EvanR> of an iteration
2022-11-10 18:53:31 +0100 <dsal> c_wraith: I don't know if "natural" is the right word. I don't think I would've considered it, but I have mental contamination.
2022-11-10 18:54:31 +0100 <c_wraith> returning the first succeeding doesn't line up with the quoted use. The quoted use only makes sense if you return the last succeeding element
2022-11-10 18:54:36 +0100econo(uid147250@user/econo)
2022-11-10 18:54:37 +0100 <EvanR> jokerOnTop shuffle standardDeck
2022-11-10 18:54:49 +0100 <c_wraith> Or rather, the element before the first failing element
2022-11-10 18:54:50 +0100 <EvanR> er
2022-11-10 18:54:54 +0100 <EvanR> until jokerOnTop shuffle standardDeck
2022-11-10 18:55:20 +0100 <EvanR> what's "last" ?
2022-11-10 18:55:30 +0100 <c_wraith> see the correction
2022-11-10 18:55:49 +0100 <EvanR> oh
2022-11-10 18:55:58 +0100 <EvanR> also would be interesting to have
2022-11-10 18:56:46 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2022-11-10 18:58:10 +0100 <dsal> So both are just uses of `iterate` where `until` returns the first iteration that meets the predicate. What does while return? `Maybe a` for the last one before it stopped satisfying the predicate?
2022-11-10 18:59:42 +0100 <ski> blomberg : as for the `isJust' and `fromJust' stuff .. apparently in `while x (isJust . f) (g . fromJust . f)', `f' is an operation on the state which can fail (in the sense of possibly giving `Nothing' as result). state update/step extracts the non-`Nothing' result (with `fromJust'), and then uses `g' to further transform to the next iteration state. however, if `f' gave nothing, we instead (presumably)
2022-11-10 18:59:42 +0100 <dsal> > until (== 5) succ 0
2022-11-10 18:59:44 +0100 <lambdabot> 5
2022-11-10 18:59:48 +0100 <ski> want to terminate with that state (since we cant' move further). however, this means that, with the above definition of `while', there should be an extra negation in the termination test (alternatively it should be using `isNothing')
2022-11-10 18:59:49 +0100 <dsal> > while 0 (== 5) succ
2022-11-10 18:59:51 +0100 <lambdabot> 5
2022-11-10 19:00:45 +0100 <ski> anyway, `while x (isNothing . f) (g . fromJust . f)' is somewhat annoying, because you're recomputing `f' each time .. so it'd be better to write a looping abstraction directly for such a loop with a "middle of the loop exit condition"
2022-11-10 19:01:42 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-11-10 19:02:18 +0100 <blomberg> i=1;i=i+2 in hs will throw error , so if hs has a loop it for while it should give error?
2022-11-10 19:02:50 +0100 <ski> (arguably kuribas' `while' from above ought to have negated its termination test anyway, since it sounds like it'll continue loop while the test gives `True', but actually it was defined to do the opposite .. which explains why the above `while' example was out of whack ..)
2022-11-10 19:03:26 +0100 <ski> @type \f g x -> while x (isNothing . f) (g . fromJust . f) -- the type of this alternative looping abstraction
2022-11-10 19:03:27 +0100 <lambdabot> (a -> Maybe b) -> (b -> a) -> a -> a
2022-11-10 19:04:55 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 19:05:10 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 19:05:11 +0100 <EvanR> > i=1;i=i+2
2022-11-10 19:05:12 +0100 <lambdabot> <hint>:1:2: error: parse error on input ‘=’
2022-11-10 19:05:24 +0100 <EvanR> error confirmed
2022-11-10 19:05:47 +0100 <dsal> blomberg: It doesn't have C's for loop. `i` cannot equal both a number and that number plus 2. Whatever you're trying to accomplish can't be done exactly that way.
2022-11-10 19:05:51 +0100 <EvanR> it doesn't look like valid haskell
2022-11-10 19:06:01 +0100 <ski> @let whileDo test step init = case test init of Nothing -> init ; Just mid -> whileDo test step (step mid)
2022-11-10 19:06:02 +0100 <lambdabot> Defined.
2022-11-10 19:06:07 +0100 <ski> @type whileDo
2022-11-10 19:06:07 +0100 <lambdabot> (t1 -> Maybe t2) -> (t2 -> t1) -> t1 -> t1
2022-11-10 19:06:45 +0100 <ski> (or maybe it could be called `whileJust')
2022-11-10 19:06:51 +0100 <EvanR> dsal, i = ⊥ solves the equations right xD
2022-11-10 19:07:02 +0100 <dolio> Yeah.
2022-11-10 19:07:09 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2022-11-10 19:07:18 +0100 <ski> @hoogle whileJust
2022-11-10 19:07:18 +0100 <lambdabot> Control.Monad.Loops whileJust :: Monad m => m (Maybe a) -> (a -> m b) -> m [b]
2022-11-10 19:07:18 +0100 <lambdabot> Util whileJust :: (Alternative f, Monad m) => m (Maybe a) -> (a -> m b) -> m (f b)
2022-11-10 19:07:18 +0100 <lambdabot> Control.Monad.Extra whileJustM :: (Monad m, Monoid a) => m (Maybe a) -> m a
2022-11-10 19:07:29 +0100 <ski> hm, those look like something else
2022-11-10 19:09:13 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-11-10 19:09:26 +0100 <blomberg> ok stop not more of this
2022-11-10 19:10:03 +0100 <ski> `i = i+2' already is a loop (an infinite loop)
2022-11-10 19:10:06 +0100 <dsal> blomberg: What are you actually trying to do? The names are causing a lot of confusion, IMO.
2022-11-10 19:10:06 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 19:10:14 +0100 <ski> > let i = i + 2 in i
2022-11-10 19:10:16 +0100 <lambdabot> *Exception: <<loop>>
2022-11-10 19:10:25 +0100 <blomberg> i can't stand haskell code just learnt haskell yesterday
2022-11-10 19:10:26 +0100 <dsal> loops are the exception to that rule
2022-11-10 19:10:51 +0100 <ski> it'll probably grow on you, if you give it time
2022-11-10 19:10:59 +0100 <dsal> I've been learning haskell for years. :)
2022-11-10 19:11:24 +0100 <blomberg> dsal:really? exception?
2022-11-10 19:12:14 +0100 <dsal> blomberg: In that example, ski was trying to define `i` as `i + 2` which means that in order to know what `i` equals, you have to evaluate `i` which is whatever `i` is plus 2. It infinitely recurses (which the runtime recognizes and complains about)
2022-11-10 19:12:14 +0100 <EvanR> haskell is very different. But my previous language was PHP4 so it was simple by comparison xD
2022-11-10 19:12:49 +0100 <dsal> Haskell seems pretty simple relative to other languages I've used. It's got a few parts that are a little complicated like… exceptions.
2022-11-10 19:13:28 +0100 <ski> `=' works like in mathematics, not like in Fortran or C. `i = i + 2' doesn't here mean "update `i' to henceforth refer to two more than what it previously referred to". it means `i' already *is* two more than itself .. so `i' is kinda infinite already
2022-11-10 19:14:11 +0100 <dsal> Sometimes, that's actually what you want. Like in cycle.
2022-11-10 19:14:20 +0100 <ski> > let ones = 1 : ones in ones -- an infinite list of ones
2022-11-10 19:14:22 +0100 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
2022-11-10 19:15:26 +0100 <blomberg> ok so i = i+2 is like func x = .... thx i didn't knew assignments were functions!
2022-11-10 19:15:28 +0100 <ski> > let primes = sieve [2 ..] where sieve (p:ns) = p : sieve [n | n <- ns,n `mod` p /= 0] in primes -- an infinite list of all (positive) prime numbers
2022-11-10 19:15:30 +0100 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
2022-11-10 19:15:44 +0100 <dsal> blomberg: Assignments aren't functions, they're just definitions.
2022-11-10 19:16:07 +0100 <dsal> You're defining i to be a number plus 2. What number? i. What's i? a number plus two…
2022-11-10 19:16:18 +0100 <ski> `=' is not assignment (as in "update to new value"), in Haskell. it is definition (you could say "single assignment" or "initialization", if you want to. there is no change/update of variables, they are immutable)
2022-11-10 19:16:24 +0100 <blomberg> dsal: f x =... that's a function definition just like f = ... without args
2022-11-10 19:17:01 +0100 <blomberg> fact n = n*fact n-1
2022-11-10 19:17:12 +0100 <EvanR> it's not even an assignment. It's a defining equation
2022-11-10 19:17:12 +0100EvanR(~EvanR@user/evanr) (Remote host closed the connection)
2022-11-10 19:17:22 +0100 <sm> is there anything for calling rust from haskell or vice versa, newer than https://www.reddit.com/r/rust/comments/3ms7gm/combining_rust_and_haskell ?
2022-11-10 19:17:23 +0100 <dsal> Yes, that's calling a function. Just like `i = i + 2` is calling a function in its definition.
2022-11-10 19:17:26 +0100 <blomberg> it's a function assignments are functions in haskell
2022-11-10 19:17:31 +0100EvanR(~EvanR@user/evanr)
2022-11-10 19:17:39 +0100 <ski> > let fibonaccis = 0 : 1 : [m + n | m <- fibonaccis | n <- tail fibonaccis] in fibonaccis -- the infinite list of all fibonacci numbers (starting from `0')
2022-11-10 19:17:40 +0100 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
2022-11-10 19:17:44 +0100 <dsal> Functions all have one argument and one result. `i` doesn't have an argument.
2022-11-10 19:17:54 +0100 <blomberg> because the compiler won't know which syntax is function and which is an assignment
2022-11-10 19:18:29 +0100 <dsal> Not everything you name is a function. That's a weird way of thinking about things.
2022-11-10 19:18:42 +0100 <EvanR> what makes you think there's a function involved there
2022-11-10 19:18:44 +0100 <blomberg> dsal: in haskell we can have a constant function that just returns some other variable
2022-11-10 19:19:06 +0100 <dsal> In haskell, every function takes one argument and returns one value.
2022-11-10 19:19:14 +0100 <EvanR> a constant function: \_ -> 3
2022-11-10 19:19:20 +0100 <dsal> If you're getting a value out without providing an argument, that's not a function.
2022-11-10 19:19:51 +0100 <ski> `ones' and `fibonaccis' are examples where (slightly more complicated) "cyclic" definitions akin to `i = i + 2' actually work. `primes' uses the function `sieve', which is also recursive (cyclic) .. but that kind of cyclicness shouldn't be quite as novel (although it does generate its infinite result incrementally (just as `ones',`fibonaccis' does), somewhat akin to "generators"/"iterators" in other
2022-11-10 19:19:57 +0100 <ski> languages)
2022-11-10 19:20:17 +0100 <dsal> You're confusing "that calls a function" with "That is a function." You can call functions while naming things, but that doesn't make those things you named functions.
2022-11-10 19:20:36 +0100 <dsal> `i = 1 + 2` calls a function while naming `i` but it doesn't make `i` a function.
2022-11-10 19:20:36 +0100 <ski> (well, `ones = 1 : ones' isn't really much more complicated than `i = i + 2' .. the difference is that `ones' (and `fibonacci's) *work*, while `i = i + 2' doesn't)
2022-11-10 19:21:18 +0100dsalis being sloppy with "call" here
2022-11-10 19:21:51 +0100chele(~chele@user/chele) (Quit: Leaving)
2022-11-10 19:22:13 +0100 <ski> (`+' is a function, written as an infix operator)
2022-11-10 19:22:27 +0100 <ski> > (+) 2 3 -- calling it prefix, like any other function
2022-11-10 19:22:28 +0100 <lambdabot> 5
2022-11-10 19:22:55 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds)
2022-11-10 19:23:39 +0100 <ski> > cycle [0,1,3]
2022-11-10 19:23:42 +0100 <lambdabot> [0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1...
2022-11-10 19:23:46 +0100 <ski> cycle xs = ys
2022-11-10 19:23:51 +0100 <ski> where
2022-11-10 19:23:52 +0100 <ski> ys = xs ++ ys
2022-11-10 19:24:26 +0100 <ski> (defines a cyclic (infinite) list that loops around the elements of the input list, repeatedly)
2022-11-10 19:24:37 +0100 <blomberg> map (<2) list ; (<2) is a strange argument as it's not a data type, don't write too much code though not more of hs code please i can't stand it
2022-11-10 19:24:59 +0100 <ski> `(< 2)' is just the "is less than two ?" function
2022-11-10 19:25:26 +0100 <ski> > map (< 2) [0,1,2,3,4,5,6,7]
2022-11-10 19:25:28 +0100 <lambdabot> [True,True,False,False,False,False,False,False]
2022-11-10 19:25:42 +0100 <blomberg> ok but if it's anonymouse function \_-> (< 2)
2022-11-10 19:25:52 +0100 <EvanR> \x -> x < 2
2022-11-10 19:25:56 +0100 <c_wraith> it's already an anonymous function
2022-11-10 19:26:04 +0100 <ski> it's the same as what EvanR just said, yea
2022-11-10 19:26:05 +0100AlexNoo_(~AlexNoo@178.34.160.122)
2022-11-10 19:26:19 +0100 <c_wraith> you don't need to eta expand everything
2022-11-10 19:27:34 +0100 <ski> (if you don't want to see more Haskell code for the moment, then perhaps you could take a break. go fetch a coffee, or your choice of brewery .. or take a walk, read a book, or whatever you fancy)
2022-11-10 19:27:36 +0100 <c_wraith> also, mapping (< 2) over a list is a weird thing in and of itself. Whatever code base you're looking at *loves* boolean blindness
2022-11-10 19:27:37 +0100 <blomberg> what i mean is lamda syntax is the only thing i have know for nameless function this is new to me
2022-11-10 19:28:01 +0100 <ski> (if you stay and discuss in #haskell, chances are it's likely you'll see some more Haskell code)
2022-11-10 19:28:15 +0100 <dsal> I guess any partially applied function might be considered lambdas.
2022-11-10 19:28:31 +0100Alex_test(~al_test@178.34.163.65) (Ping timeout: 252 seconds)
2022-11-10 19:28:31 +0100AlexZenon(~alzenon@178.34.163.65) (Ping timeout: 252 seconds)
2022-11-10 19:28:37 +0100 <blomberg> < 2 can't be function is this unique syntax to haskell i guess
2022-11-10 19:28:51 +0100 <blomberg> i have never seen this type of syntax before
2022-11-10 19:28:52 +0100 <c_wraith> No, (< 2) is a function
2022-11-10 19:28:57 +0100 <c_wraith> the parentheses are required
2022-11-10 19:29:03 +0100 <dsal> :t (< 2)
2022-11-10 19:29:04 +0100 <lambdabot> (Ord a, Num a) => a -> Bool
2022-11-10 19:29:05 +0100 <c_wraith> It's called a "section"
2022-11-10 19:29:05 +0100 <ski> yea, lambda abstractions are "anonymous functions". but you can have an "anonymous function", witbout writing a lambda abstraction, e.g. if you call a function which gives another function as result .. which is actually what the `(< 2)' example did
2022-11-10 19:29:38 +0100 <ski> @let makeAdder x = \y -> x + y
2022-11-10 19:29:40 +0100 <lambdabot> Defined.
2022-11-10 19:29:55 +0100AlexNoo(~AlexNoo@178.34.163.65) (Ping timeout: 260 seconds)
2022-11-10 19:29:59 +0100 <ski> here `makeAdder 2' is an "anonymous function" (equivalent to `\y -> 2 + y')
2022-11-10 19:30:16 +0100 <ski> but `makeAdder 2' itself is not a lambda abstraction (it's just defined to be equal to one)
2022-11-10 19:30:32 +0100 <ski> > map (makeAdder 2) [2,3,5,7]
2022-11-10 19:30:34 +0100 <lambdabot> [4,5,7,9]
2022-11-10 19:31:31 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
2022-11-10 19:31:44 +0100 <ski> if we wanted to, we could name the anonymous function `makeAdder 2', but calling it e.g. `addTwo' (so then that's not anonymous anymore, it has a (direct) name
2022-11-10 19:31:51 +0100 <ski> @let addTwo = makeAdder 2
2022-11-10 19:31:52 +0100 <lambdabot> Defined.
2022-11-10 19:31:58 +0100 <ski> > map addTwo [2,3,5,7]
2022-11-10 19:32:00 +0100 <lambdabot> [4,5,7,9]
2022-11-10 19:32:07 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2022-11-10 19:33:57 +0100 <ski> a "section" is when you supply an infix operator, like `<' or `+' or whatever, with one operand, but not the other. it will give you back a function that expects the other one as input (and then computes the original operator used with those two operands)
2022-11-10 19:34:02 +0100 <EvanR> blomberg, other examples of sections (+ 2), (>> getChar), (:[2,3,4]), (1.0 /)
2022-11-10 19:34:06 +0100Volt_(~Volt_@c-73-167-118-200.hsd1.ma.comcast.net) (Quit: )
2022-11-10 19:34:29 +0100 <dsal> > map (^2) [1..5]
2022-11-10 19:34:31 +0100 <lambdabot> [1,4,9,16,25]
2022-11-10 19:34:32 +0100 <dsal> > map (2^) [1..5]
2022-11-10 19:34:34 +0100 <lambdabot> [2,4,8,16,32]
2022-11-10 19:34:43 +0100 <ski> so `(< 2)' is `\x -> x < 2' the "less than two ?" function, while `(2 <)' is `\y -> 2 < y', the "greater than two ?" function
2022-11-10 19:34:53 +0100 <dsal> You can pick which end of the operator is missing.
2022-11-10 19:35:13 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-11-10 19:35:14 +0100 <ski> `(^2)' is the squaring function. `(2^)' is the "power of two" function
2022-11-10 19:35:22 +0100 <EvanR> > map (1.0 /) [1..]
2022-11-10 19:35:24 +0100 <lambdabot> [1.0,0.5,0.3333333333333333,0.25,0.2,0.16666666666666666,0.14285714285714285...
2022-11-10 19:35:26 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 19:35:45 +0100fserucas(~fserucas@2001:8a0:6d00:2500:4717:7619:c4e9:3aa2) (Quit: Leaving)
2022-11-10 19:35:51 +0100 <ski> `(1.0 /)' is the "one divided by" function. also called `recip' (short for "reciprocal")
2022-11-10 19:36:34 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds)
2022-11-10 19:36:47 +0100nate4(~nate@98.45.169.16)
2022-11-10 19:36:51 +0100 <ski> (`map' calls a given argument function (callback) on each of the elements of the input list, giving back as output a list of all the individual results)
2022-11-10 19:37:34 +0100 <dsal> Naming things is hard. "square" and "cube" and "fourthify" are more painful to read than (^2) and (^3) and (^4)
2022-11-10 19:38:04 +0100 <ski> > [n ^ 2 | n <- [1 .. 5]] -- another way to write that list of squares, using "list comprehension" syntax instead of calling the `map' (higher-order) function. read as : "the list of all `n ^ 2's, where `n' is drawn from the list `[1 .. 5]'
2022-11-10 19:38:05 +0100 <lambdabot> [1,4,9,16,25]
2022-11-10 19:39:06 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-11-10 19:40:38 +0100Alex_test(~al_test@178.34.160.122)
2022-11-10 19:41:48 +0100AlexZenon(~alzenon@178.34.160.122)
2022-11-10 19:42:00 +0100nate4(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-11-10 19:42:16 +0100 <ski> (.. possibly "bisquare" ? "biquadratic" is sometimes used for degree four polynomials, equations, and forms, in math. also "quartic" is used)
2022-11-10 19:44:50 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-11-10 19:44:57 +0100 <EvanR> and sometimes 8th power is called Zenzizenzizenzic
2022-11-10 19:45:13 +0100 <EvanR> just kidding
2022-11-10 19:45:28 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 19:45:30 +0100 <ski> blomberg : anyway, if you just want to quickly pass a simple function as an argument, often naming the input to that argument is basically just syntactic noise (and perhaps also a minor headache to come up with an appripriate name for the intermediate value passed to it). there, "anonymous functions" can nicely help side-step the issue, by passing an operator section, or a partially applied function (a
2022-11-10 19:45:36 +0100 <ski> function which has another function as result, when called. such a function is said to use "currying" or be "curried"), rather than explicitly passing a lambda abstraction ..
2022-11-10 19:46:00 +0100 <ski> .. or worse, (also) naming the function that' you're passing (in addition to naming its argument)
2022-11-10 19:46:16 +0100 <ski> > let square x = x ^ 2 in map square [0 .. 9]
2022-11-10 19:46:17 +0100 <lambdabot> [0,1,4,9,16,25,36,49,64,81]
2022-11-10 19:46:22 +0100 <ski> > let square = \x -> x ^ 2 in map square [0 .. 9]
2022-11-10 19:46:24 +0100 <lambdabot> [0,1,4,9,16,25,36,49,64,81]
2022-11-10 19:46:31 +0100ft(~ft@p508dbd59.dip0.t-ipconnect.de)
2022-11-10 19:46:36 +0100 <ski> > map (\x -> x ^ 2) [0 .. 9]
2022-11-10 19:46:37 +0100 <lambdabot> [0,1,4,9,16,25,36,49,64,81]
2022-11-10 19:46:40 +0100 <ski> > map (^ 2) [0 .. 9]
2022-11-10 19:46:41 +0100 <lambdabot> [0,1,4,9,16,25,36,49,64,81]
2022-11-10 19:47:03 +0100 <ski> these are all equivalent pieces of code .. but readability and style differs
2022-11-10 19:47:34 +0100 <ski> *sometimes* you do want to name the input argument, and possibly the function itself (it helps document the code). but sometimes, it's just a nuisance
2022-11-10 19:49:47 +0100 <ski> (people don't put naming labels on all their loops, in languages like e.g. Java which allow you to label your (`for',`while',`do'-`while') loops (to be able to `break' out from and `continue' with the non-innermost loop) .. similarly, in Haskell, people don't name their loop bodies (being functions) all the time)
2022-11-10 19:51:11 +0100 <ski> > map (map (^ 2)) [[],[0],[1,2],[3,4,5],[6,7,8,9]] -- partial application of a function (`map'), defined in curried style, in action
2022-11-10 19:51:13 +0100 <lambdabot> [[],[0],[1,4],[9,16,25],[36,49,64,81]]
2022-11-10 19:51:43 +0100 <ski> > map (\xs -> map (^ 2) xs) [[],[0],[1,2],[3,4,5],[6,7,8,9]] -- non-partial ("full") application of `map'
2022-11-10 19:51:44 +0100 <lambdabot> [[],[0],[1,4],[9,16,25],[36,49,64,81]]
2022-11-10 19:51:54 +0100 <ski> which of these two would you prefer to read ?
2022-11-10 19:52:14 +0100 <EvanR> so many numbers, maybe some string oriented examples are in order
2022-11-10 19:52:33 +0100 <ski> after a while, with some familiarity with the language, people commonly (not always, though), prefer the former way, not naming each individual list `xs'
2022-11-10 19:53:10 +0100 <ski> > (unwords . map reverse . words) "You wanted words?"
2022-11-10 19:53:12 +0100 <lambdabot> "uoY detnaw ?sdrow"
2022-11-10 19:55:47 +0100 <ski> `.' is function composition. input comes in from the right, passes through each function in the composition chain, on to the next one, final result pops out at the left. this is like Unix pipes (like `sort | uniq | rev | head -n 10'), except using reverse ordering
2022-11-10 19:57:10 +0100 <ski> (that Unix example would correspond more or less to `take 10 . map reverse . nub . sort' .. possibly with `unlines . ' added at the front, and `. lines' added at the end, if you wanted the overall composition to transform a stream of characters to a stream of characters, rather than a stream of lines to a stream of lines)
2022-11-10 19:58:35 +0100 <blomberg> kk
2022-11-10 19:58:36 +0100 <ski> (`(f . g . h) x' does the same as `f (g (h x)))')
2022-11-10 19:59:23 +0100 <ski> anything else you're wondering about, are concerned about, worry about, or annoyed about, blomberg ?
2022-11-10 19:59:36 +0100 <blomberg> kk
2022-11-10 19:59:56 +0100 <ski> > words "Split this string into words, please"
2022-11-10 19:59:58 +0100 <lambdabot> ["Split","this","string","into","words,","please"]
2022-11-10 20:00:15 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-11-10 20:00:28 +0100thyriaen(~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Quit: Leaving)
2022-11-10 20:00:31 +0100 <blomberg> no i am interested in haskell
2022-11-10 20:00:50 +0100 <blomberg> i came here for recursion only
2022-11-10 20:00:56 +0100 <ski> > lines "Or\ninto\nlines\n"
2022-11-10 20:00:58 +0100 <lambdabot> ["Or","into","lines"]
2022-11-10 20:00:58 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-11-10 20:01:22 +0100 <ski> > (map words . lines) "Or both\ninto\nwords and lines\n"
2022-11-10 20:01:24 +0100 <lambdabot> [["Or","both"],["into"],["words","and","lines"]]
2022-11-10 20:02:51 +0100 <ski> > sortBy (comparing length <> length) (words "The quick brown fox jumps over the lazy dog") -- sort the words in a list, primarily on word length, secondarily (within each group of words of the same length) using the usual (lexicographic) ordering
2022-11-10 20:02:52 +0100 <lambdabot> error:
2022-11-10 20:02:52 +0100 <lambdabot> • Couldn't match type ‘Int’ with ‘[Char] -> Ordering’
2022-11-10 20:02:52 +0100 <lambdabot> Expected type: [Char] -> [Char] -> Ordering
2022-11-10 20:02:58 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61) (Remote host closed the connection)
2022-11-10 20:03:00 +0100 <ski> er
2022-11-10 20:03:04 +0100 <ski> > sortBy (comparing length <> compare) (words "The quick brown fox jumps over the lazy dog") -- sort the words in a list, primarily on word length, secondarily (within each group of words of the same length) using the usual (lexicographic) ordering
2022-11-10 20:03:06 +0100 <lambdabot> ["The","dog","fox","the","lazy","over","brown","jumps","quick"]
2022-11-10 20:03:08 +0100 <ski> (sorry)
2022-11-10 20:03:16 +0100 <blomberg> hey stop this scrolling of crap
2022-11-10 20:03:48 +0100 <blomberg> use a /query lambdabot like me, this a chat channel
2022-11-10 20:04:22 +0100 <ski> hey sure, i could stop. i just wanted to show *you* (and perhaps other interested lurkers) a few examples of the concepts that came up into the conversation
2022-11-10 20:04:45 +0100 <blomberg> there is no one here except me
2022-11-10 20:04:53 +0100 <EvanR> nobody here but us chickens
2022-11-10 20:04:54 +0100 <ski> there are often lurkers in here
2022-11-10 20:04:55 +0100 <blomberg> i doubt entire day anyone was here at all
2022-11-10 20:04:57 +0100 <chreekat> 👀
2022-11-10 20:05:08 +0100mikoto-chan(~mikoto-ch@85-76-19-119-nat.elisa-mobile.fi)
2022-11-10 20:05:09 +0100 <blomberg> i am not talking about shadows ski
2022-11-10 20:05:36 +0100 <EvanR> you said you were interested in haskell
2022-11-10 20:05:43 +0100 <EvanR> ski loves that stuff
2022-11-10 20:05:45 +0100 <blomberg> i never said that
2022-11-10 20:05:53 +0100 <EvanR> you did, 6 minutes ago
2022-11-10 20:05:55 +0100rodental(~rodental@38.146.5.222)
2022-11-10 20:05:58 +0100 <ski> i've often seen people say they've learned a lot by lurking and listening in here, seeing what's going on, and if it's something which they can understand at the time (in case it's something they're interested in)
2022-11-10 20:07:06 +0100 <blomberg> do you understand julia and it's crazy array syntax i think julia is crappy given it's complexity
2022-11-10 20:07:21 +0100 <EvanR> I like julia
2022-11-10 20:07:48 +0100 <blomberg> there are 3 ways to declare an array and it's docs too are unclear on how it all works i can't imagine multidimensional arrays and it's docs doesn't say a shit
2022-11-10 20:08:06 +0100 <ski> EvanR : well, it's true, i do :)
2022-11-10 20:08:10 +0100 <blomberg> EvanR: do you know it's complex indexing system
2022-11-10 20:08:18 +0100 <EvanR> yes
2022-11-10 20:08:31 +0100 <EvanR> maybe you should look at haskell Vector instead xD
2022-11-10 20:09:36 +0100 <blomberg> a[2,3,4,2] how to visual multidimensionality using lists python it's very clear
2022-11-10 20:09:47 +0100nate4(~nate@98.45.169.16)
2022-11-10 20:10:46 +0100 <blomberg> even there docs are terrible
2022-11-10 20:10:52 +0100 <EvanR> a good reason to define higher order operations on matrices and don't worry about the indexes xD
2022-11-10 20:11:10 +0100 <blomberg> https://docs.julialang.org/en/v1/manual/arrays/
2022-11-10 20:11:22 +0100 <EvanR> er higher level
2022-11-10 20:11:29 +0100mikoto-chan(~mikoto-ch@85-76-19-119-nat.elisa-mobile.fi) (Quit: WeeChat 3.6)
2022-11-10 20:11:30 +0100 <EvanR> matrix multiplication, transpose
2022-11-10 20:11:31 +0100 <geekosaur> not sure Haskell Array is much better; Vector exists for a reason
2022-11-10 20:11:53 +0100 <blomberg> no i am talking about nested listed it's easier to visual not matrices
2022-11-10 20:12:15 +0100 <EvanR> a matrix is simply a list of rows (or a list of columns depending on your mood)
2022-11-10 20:12:18 +0100 <blomberg> a[2,3,4,2] is a general list not a matrix you don't understand arrays then
2022-11-10 20:12:32 +0100 <geekosaur> visualize for what? some operations really want a matrix
2022-11-10 20:13:21 +0100 <blomberg> non-homogenous non-same row / column like in pythonic lists first can be [1] then [1,2] no row vs column crap
2022-11-10 20:13:30 +0100 <EvanR> not understanding arrays makes me think there is some "what are arrays really" quote somewhere
2022-11-10 20:14:14 +0100 <EvanR> @quote arrays
2022-11-10 20:14:14 +0100 <lambdabot> gwern says: Haskell has the best arrays around; problem is, we don't know which module it is.
2022-11-10 20:14:50 +0100nate4(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-11-10 20:15:01 +0100 <blomberg> i am talking about non-homegenous lists and that too [ [a], [b,c], [d,e,f] ] so there is no row or column at all but a general list
2022-11-10 20:15:39 +0100 <EvanR> a list of lists can work
2022-11-10 20:15:52 +0100chromoblob(~user@37.113.164.122)
2022-11-10 20:15:58 +0100 <blomberg> problem is julia is very murky in it's docs and doesn't say what's the syntax to access let's say d
2022-11-10 20:16:18 +0100 <geekosaur> apparently engineers and scientists don't exist
2022-11-10 20:16:34 +0100mikoto-chan(~mikoto-ch@85-76-19-119-nat.elisa-mobile.fi)
2022-11-10 20:16:44 +0100 <blomberg> but with space or , or ; [a b c] vs [a,c,b] there are two main syntaxes
2022-11-10 20:17:24 +0100 <blomberg> in terms of accessing those elements the docs are just terrible read it if you dont believe me https://docs.julialang.org/en/v1/manual/arrays/
2022-11-10 20:17:36 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-11-10 20:17:44 +0100 <blomberg> it's just talking about matrices or homogenous arrays not lists
2022-11-10 20:17:48 +0100 <EvanR> you can comprehend that "jagged" list of lists as a form of matrix if you wanted, to be clear
2022-11-10 20:17:53 +0100 <dsal> What's the link to Haskell WRT Julia arrays?
2022-11-10 20:18:06 +0100dsalhas never used julia
2022-11-10 20:18:28 +0100 <dolio> Yeah, what does this all have to do with Haskell?
2022-11-10 20:19:22 +0100 <dsal> I like Haskell arrays, but they're a little weird.
2022-11-10 20:20:40 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 260 seconds)
2022-11-10 20:22:05 +0100ph88(~ph88@ip5f5af71f.dynamic.kabel-deutschland.de)
2022-11-10 20:22:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 20:22:24 +0100 <blomberg> The ordinary way to index into an N-dimensional array is to use exactly N indices; each index selects the position(s) in its particular dimension. For example, in the three-dimensional array A = rand(4, 3, 2), A[2, 3, 1] will select the number in the second row of the third column in the first "page" of the array. This is often referred to as cartesian indexing.
2022-11-10 20:22:53 +0100 <blomberg> now i mean a= ...what... to get that dimensionality and comma or space syntax
2022-11-10 20:23:02 +0100 <EvanR> haha, nice. Pages
2022-11-10 20:23:06 +0100 <blomberg> so that i can visualize it
2022-11-10 20:23:34 +0100 <EvanR> the 4th number would go deeper into the 4th dimension like a hypercube
2022-11-10 20:24:15 +0100 <dsal> In haskell, we have an abstraction that allows you to use arbitrary types for indexing your arrays. They can be an arbitrary range of numbers (want two-based indexes? have at it) or just a collection of things (e.g., the Blue row of column 9 (the first column).
2022-11-10 20:24:17 +0100 <dsal> )
2022-11-10 20:24:24 +0100 <blomberg> no no i mean list= [ [2,3], [a,b,c], [d,e,f] ] like in python
2022-11-10 20:24:47 +0100AlexNoo_AlexNoo
2022-11-10 20:24:54 +0100 <blomberg> code visualisation not space visualization
2022-11-10 20:24:55 +0100 <EvanR> you'll need to ask in another channel for julia help probably
2022-11-10 20:25:04 +0100mikoto-chan(~mikoto-ch@85-76-19-119-nat.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-11-10 20:25:11 +0100 <dsal> A list isn't an array, but you can do something like that with lists. Arrays don't have variable cardinality, though.
2022-11-10 20:25:12 +0100 <blomberg> i asked there channel is empty i will try slack tommoroww
2022-11-10 20:25:22 +0100 <blomberg> but this shows how crappy julia is
2022-11-10 20:25:24 +0100 <dsal> I heard this channel is also empty.
2022-11-10 20:25:40 +0100 <blomberg> 46 vs 678
2022-11-10 20:25:47 +0100 <ski> clearly there are no lurkers here, dsal
2022-11-10 20:26:13 +0100 <EvanR> even (especially?) at the late era patience is key to getting questions answered on IRC
2022-11-10 20:26:29 +0100 <blomberg> on the reception side it's empty not on the answerer side
2022-11-10 20:26:41 +0100 <blomberg> i am the ONLY one here
2022-11-10 20:27:05 +0100 <dsal> If you ask a Haskell question I might be able to help. I don't know any Julia. Doesn't sound like something I should pay attention to.
2022-11-10 20:27:31 +0100 <dsal> I don't think I've used arrays in any Real Code™ (just AoC stuff).
2022-11-10 20:27:35 +0100skiwould suggest waiting at least half an hour (preferably more), after asking a question (or making some relevant comment), in a technical channel, especially slow ones (sometimes you can get a reply after a couple of days, even)
2022-11-10 20:28:17 +0100 <dolio> Also, get a better attitude.
2022-11-10 20:28:41 +0100 <geekosaur> "<blomberg> i am the ONLY one here " that's awfully insulting to ~675 people
2022-11-10 20:29:06 +0100 <geekosaur> especially the ones who've been talking to you
2022-11-10 20:29:20 +0100dsalgot distracted working on Haskell code at work
2022-11-10 20:30:03 +0100 <yushyin> blomberg: https://julialang.org/community/ try the slack, zulip or discord chats?
2022-11-10 20:30:47 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-11-10 20:30:56 +0100mikoto-chan(~mikoto-ch@85-76-19-119-nat.elisa-mobile.fi)
2022-11-10 20:31:43 +0100 <blomberg> i nailed it on my own guys a=[1,2,[3,4],5,[6,[1,2]]];a[5][2][2] just eerror and trial and your inspiration
2022-11-10 20:31:52 +0100 <blomberg> positivity can do a lot
2022-11-10 20:32:18 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-11-10 20:32:34 +0100`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2022-11-10 20:32:51 +0100 <dsal> That doesn't look like valid haskell. What type is `a`?
2022-11-10 20:33:12 +0100 <ski> presumably it's Julia ?
2022-11-10 20:33:14 +0100 <dsal> You I guess you could make a num type that's also a list.
2022-11-10 20:33:16 +0100 <EvanR> I think blomberg has been writing julia in here for the last few hours
2022-11-10 20:33:24 +0100 <blomberg> a[5] is [6,[1,2]] a[5][2] is [1,2] and a[5][2][2] is 2 but i can't a[5,2,2] which is called cartesian indexing
2022-11-10 20:33:35 +0100 <blomberg> few seconds...
2022-11-10 20:33:42 +0100 <EvanR> i=1;i=i+1
2022-11-10 20:34:32 +0100 <ski> "<blomberg> i=3;while cond;... i=2*i^3+4 ; can fodl do this" -- presumably `foldl' was meant ?
2022-11-10 20:35:16 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 20:35:27 +0100 <ski> (from that, blomberg was not only talking about Julia, but also asking about Haskell, at least a bit)
2022-11-10 20:36:02 +0100 <EvanR> good eye
2022-11-10 20:36:41 +0100 <blomberg> this proves julia is wrong it gives wrong result look a=[1,2,[3,4],5,[6,[7,8]]];a[1,1,1,1,1,1,1,1,1,1,1,1] =>1 what the hell
2022-11-10 20:36:44 +0100 <ski> (that's from a little bit over three hours ago, in case you'd like to check the conversation at that point)
2022-11-10 20:37:30 +0100mikoto-chan(~mikoto-ch@85-76-19-119-nat.elisa-mobile.fi) (Ping timeout: 268 seconds)
2022-11-10 20:37:44 +0100 <ski> it seems Julia treats a "scalar value" (a non-array) as an array of length one, blomberg ?
2022-11-10 20:37:46 +0100 <blomberg> it doesn't give Error when it should
2022-11-10 20:38:10 +0100 <ski> (iirc, Matlab & Octave also does this)
2022-11-10 20:38:36 +0100 <blomberg> but i crossed dimensionality bound so that's error
2022-11-10 20:38:37 +0100 <ski> apparently Julia designers thought this was a good idea
2022-11-10 20:39:01 +0100 <geekosaur> perl does the same with lists
2022-11-10 20:39:11 +0100 <ski> (not commenting on whether it is or not, just noting that this is presumably by design)
2022-11-10 20:39:40 +0100 <blomberg> i talked to them and complained about the lack of elegance and quantity of bullshit
2022-11-10 20:40:02 +0100AlexNoo(~AlexNoo@178.34.160.122) (Read error: Connection reset by peer)
2022-11-10 20:40:02 +0100Alex_test(~al_test@178.34.160.122) (Read error: Connection reset by peer)
2022-11-10 20:40:02 +0100AlexZenon(~alzenon@178.34.160.122) (Read error: Connection reset by peer)
2022-11-10 20:40:23 +0100 <EvanR> julia strives to be like a dynamic language, introducing autoconversions for convenience. But it omits a lot of dynamic typing checks thanks to static types
2022-11-10 20:40:25 +0100AlexNoo(~AlexNoo@178.34.160.122)
2022-11-10 20:40:27 +0100 <blomberg> it would be better if it was more pythonic but they enjoy it
2022-11-10 20:40:40 +0100jakalx(~jakalx@base.jakalx.net)
2022-11-10 20:40:41 +0100 <EvanR> so it's a weird hybrid and good example of how dynamic languages don't need to be slow
2022-11-10 20:41:16 +0100 <ski> hm .. now i'm wondering what Julia does, if you add a vector to a matrix .. or one matrix to another one, having a different width (or height)
2022-11-10 20:41:16 +0100 <geekosaur> seems like complaining about julia in a haskell channel is not ideal. there is #haskell-offtopic for things like that
2022-11-10 20:42:06 +0100 <blomberg> no they enjoy excess baggage for ex: function... end if... elseif end... what is that end; nothing instead of nil; mutable struct..end ; i get tired of writing over and over the same thing
2022-11-10 20:42:43 +0100 <geekosaur> also, unpopular opinion: if you're working with arrays you should be using APL
2022-11-10 20:42:56 +0100phma(phma@2001:5b0:215d:9f08:82a6:5ea7:d17:d96d) (Read error: Connection reset by peer)
2022-11-10 20:42:58 +0100 <EvanR> shots fired
2022-11-10 20:43:19 +0100 <blomberg> EvanR: who fired the shots geekosaur or me?
2022-11-10 20:43:29 +0100 <EvanR> no one just kidding
2022-11-10 20:43:40 +0100phma(~phma@host-67-44-208-167.hnremote.net)
2022-11-10 20:43:59 +0100Luj3(~Luj@2a01:e0a:5f9:9681:82ee:b48:2fc3:8107) (Quit: Ping timeout (120 seconds))
2022-11-10 20:44:01 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-11-10 20:44:01 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Read error: Connection reset by peer)
2022-11-10 20:44:01 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Read error: Connection reset by peer)
2022-11-10 20:44:13 +0100 <blomberg> apparently it's growing more and more popular i asked one of the inventors the growth rate and it will be like python by 2030
2022-11-10 20:44:20 +0100Luj3(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
2022-11-10 20:44:38 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-11-10 20:44:48 +0100 <blomberg> 100k pkges by 2020
2022-11-10 20:44:53 +0100 <blomberg> 2030*
2022-11-10 20:44:56 +0100 <ski> (if a vector is just a matrix with size in one dimension being one, then should adding two matrices of different sizes have `zipWith'-like behaviour (then matrix-vector addition would truncate, for consistency). or perhaps it should use the product (or least common multiple) of the (respective) sizes of the two matrices ? that does seem not too commonly useful, in the general case)
2022-11-10 20:45:09 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 20:45:09 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 20:45:11 +0100Alex_test(~al_test@178.34.160.122)
2022-11-10 20:45:29 +0100werneta(~werneta@137.78.30.207)
2022-11-10 20:46:08 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
2022-11-10 20:46:30 +0100 <EvanR> addition only works when they have the same shape
2022-11-10 20:46:34 +0100Inst(~Liam@c-98-208-218-119.hsd1.fl.comcast.net)
2022-11-10 20:46:51 +0100 <ski> there's no scalar-vector or scalar-matrix addition ?
2022-11-10 20:47:11 +0100 <ski> (how about multiplication ?)
2022-11-10 20:47:30 +0100 <EvanR> I did get scalar to work by doing .+
2022-11-10 20:48:37 +0100Alex_test(~al_test@178.34.160.122) (Remote host closed the connection)
2022-11-10 20:49:02 +0100 <EvanR> usually it's DimensionMismatch though
2022-11-10 20:49:24 +0100 <EvanR> whatever * sqrt(2) is fine though
2022-11-10 20:50:56 +0100 <blomberg> EvanR:i have used julia more than you, and i know it has multiple ways of doing similar things unlike python
2022-11-10 20:51:14 +0100 <blomberg> i have seen that excess "baggage" it's not a light weight language
2022-11-10 20:51:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-11-10 20:51:47 +0100 <blomberg> and also the trailing end line... looks so weird like html code
2022-11-10 20:51:49 +0100titibandit(~titibandi@xdsl-87-78-8-6.nc.de)
2022-11-10 20:52:00 +0100Alex_test(~al_test@178.34.160.122)
2022-11-10 20:52:21 +0100 <blomberg> they could've removed it but all four founders lost their minds
2022-11-10 20:56:44 +0100AlexZenon(~alzenon@178.34.160.122)
2022-11-10 20:57:43 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 21:00:53 +0100 <ski> "it has multiple ways of doing similar things unlike python" -- sounds like a good thing (if done tastefully, as orthogonally as reasonably), to me
2022-11-10 21:02:05 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 21:05:44 +0100 <blomberg> ok
2022-11-10 21:06:24 +0100werneta(~werneta@137.78.30.207) (Ping timeout: 260 seconds)
2022-11-10 21:09:40 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2022-11-10 21:09:47 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-11-10 21:10:44 +0100ski. o O ( <https://wiki.haskell.org/GHC/Data_Parallel_Haskell> )
2022-11-10 21:15:30 +0100_xor(~xor@74.215.182.83) (Quit: WeeChat 3.7)
2022-11-10 21:15:58 +0100_xor(~xor@74.215.182.83)
2022-11-10 21:16:15 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 21:17:20 +0100stackdroid18(14094@user/stackdroid)
2022-11-10 21:18:32 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-11-10 21:19:51 +0100ph88^(~ph88@2a02:8109:9e00:71d0:a90d:e7d5:fe91:a32a)
2022-11-10 21:19:55 +0100mestre(~mestre@191.177.185.178) (Quit: Lost terminal)
2022-11-10 21:21:43 +0100vn36(~vn36@123.63.203.210)
2022-11-10 21:22:00 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-11-10 21:22:28 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-11-10 21:23:28 +0100ph88(~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
2022-11-10 21:26:32 +0100chromoblob(~user@37.113.164.122)
2022-11-10 21:28:11 +0100son0p(~ff@181.136.122.143)
2022-11-10 21:30:16 +0100elevenkb(~elevenkb@105.184.125.168)
2022-11-10 21:36:42 +0100chromoblob(~user@37.113.164.122) (Ping timeout: 268 seconds)
2022-11-10 21:37:31 +0100 <blomberg> ski: it's very complex i nailed it A = [2 6; 4 7; 3 "li"] is not a matrix but works A[5] => 7 linearindexing and cartesian works A[2,2]=>7 ;
2022-11-10 21:38:23 +0100 <blomberg> a=[1, 2, [3, 4], 5, [6, [7, 8]]] only cartesianIndexing works + python indexing not Linear
2022-11-10 21:40:01 +0100 <EvanR> riddle me this: if someone says the maximum length of a URL (here, now) shall be 2048. And you couldn't get further clarification. 2048 what, bytes?
2022-11-10 21:40:27 +0100 <blomberg> a=[1 2 [3 4] 5 [6 [7 8]]] not pythonINdexing works but Linear
2022-11-10 21:41:29 +0100 <blomberg> would you like such several nasty ways of doing the same thing, and the docss don't say either i just figured it out by error and trial, even worse i couldn't find a name for pythonIndexing!!
2022-11-10 21:42:18 +0100 <EvanR> "python indexing" does seem like a good name for python's indexing
2022-11-10 21:46:15 +0100vglfr(~vglfr@145.224.100.100) (Remote host closed the connection)
2022-11-10 21:46:44 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-11-10 21:47:09 +0100vglfr(~vglfr@145.224.100.100)
2022-11-10 21:47:10 +0100 <blomberg> it's much worse than i thought not only the name is absent the syntax too is absent in the OFFICIAL documentation a[5][2] type of syntax is not official a part of the language
2022-11-10 21:47:47 +0100 <blomberg> I just DISCOVERED it by error and trial... if now you don't believe me how crappy this language is, i don't know
2022-11-10 21:48:03 +0100 <dsal> I guess I'll stick with haskell, then.
2022-11-10 21:48:12 +0100 <blomberg> https://docs.julialang.org/en/v1/manual/arrays/ I challenge you to find that syntax in the docs here
2022-11-10 21:48:29 +0100 <blomberg> I look the whole docs it's not there
2022-11-10 21:48:38 +0100pavonia(~user@user/siracusa)
2022-11-10 21:49:19 +0100 <EvanR> if you think documentation missing is bad, try electrician work
2022-11-10 21:49:25 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-11-10 21:49:48 +0100 <money> your either a mechanic or not
2022-11-10 21:50:37 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-11-10 21:50:46 +0100 <blomberg> https://docs.julialang.org/en/v1/manual/arrays/#Typed-array-literals it talks about concatenation but not var[2][3]
2022-11-10 21:50:52 +0100 <EvanR> unless you're a quantum mechanic
2022-11-10 21:50:52 +0100stackdroid18(14094@user/stackdroid) (Quit: hasta la vista... tchau!)
2022-11-10 21:53:03 +0100 <dsal> I need a button to express my appreciation for that joke.
2022-11-10 21:53:27 +0100 <money> quantum mechanic <- still mechanic
2022-11-10 21:53:43 +0100elevenkb(~elevenkb@105.184.125.168) (Ping timeout: 252 seconds)
2022-11-10 21:54:11 +0100ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-11-10 21:55:01 +0100 <EvanR> the accuracy of the pun was limited by uncertainty principle
2022-11-10 21:55:16 +0100 <dsal> I don't know where you are, but I saw where you were going with that.
2022-11-10 21:55:45 +0100 <blomberg> EvanR:have you had contact with electricians they go and repair like a car mechanic and you expect them to READ that alone is too much let alone docs
2022-11-10 21:56:20 +0100 <EvanR> I resemble that remark
2022-11-10 21:56:23 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-11-10 21:58:25 +0100 <blomberg> a[5][2] ->Right; a[5] [2] syntax: space before "[" not allowed in "a[5] [" at In[287]:2 so i ctrl+f that page and searched ][ as spaces are not allowed and that is the only pattern null search result. PROVING that docs are crazy.
2022-11-10 21:59:09 +0100 <blomberg> this is not a minor syntax ; this is pythonIndexing syntax that works for the compiler but not in the docs!!
2022-11-10 21:59:21 +0100`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net)
2022-11-10 22:00:01 +0100 <blomberg> i told you their founders are nutty and you didn't believe me, or atleast the language
2022-11-10 22:00:04 +0100 <dsal> I don't even know what you're trying to do, but I also don't care about julia at all. It's not clear why you're ranting about it here. Is it in any way related to Haskell?
2022-11-10 22:00:22 +0100 <blomberg> dsal: sorry for the rant
2022-11-10 22:00:27 +0100 <EvanR> because monochrom is asleep or busy probably
2022-11-10 22:00:29 +0100 <dsal> Like, I think elm's canonical formatting is awful, but I only rant about it here when it's relevant.
2022-11-10 22:00:44 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Quit: pillow time)
2022-11-10 22:00:49 +0100 <blomberg> EvanR: what will he do monochrom
2022-11-10 22:00:57 +0100 <geekosaur> I'm thinking this has been going on for long enough and any continuation should be in offtopic
2022-11-10 22:00:59 +0100 <EvanR> use harsh language
2022-11-10 22:01:07 +0100 <dsal> like julia
2022-11-10 22:01:33 +0100 <blomberg> join me on offtopic channel then. which name #haskell-offtopic?
2022-11-10 22:01:39 +0100 <geekosaur> yes
2022-11-10 22:01:58 +0100 <geekosaur> people rant about lots of languages in there 🙂
2022-11-10 22:04:04 +0100 <ski> blomberg : oh (itym `A[4]', not `A[5]'). i dunno what "python indexing" means, in this context. "would you like such several nasty ways of doing the same thing" -- nah, that just seems like non-orthogonal ways of achieving the same thing, with only minor variations
2022-11-10 22:04:47 +0100skigoes thither
2022-11-10 22:15:22 +0100Guest2922(~Guest29@pool-108-54-69-191.nycmny.fios.verizon.net)
2022-11-10 22:17:26 +0100 <Guest2922> can any explain why I get a Non-exhaustive patterns error with this?
2022-11-10 22:17:36 +0100 <Guest2922> prettyPrint :: Size -> [Coord] -> String
2022-11-10 22:17:36 +0100 <Guest2922> prettyPrint size coord = prettyPrint' (size,size) coord where
2022-11-10 22:17:37 +0100 <Guest2922>   prettyPrint' (x,y) ((row,col):coords) = case y /= 0 of
2022-11-10 22:17:37 +0100 <Guest2922>     True -> case x /= 0 of
2022-11-10 22:17:38 +0100 <Guest2922>       True -> case x == row && y == col of
2022-11-10 22:17:39 +0100 <Guest2922>         True -> 'Q' : prettyPrint' (x-1,y) coords
2022-11-10 22:17:39 +0100 <Guest2922>         False -> '.' : prettyPrint' (x-1,y) coords
2022-11-10 22:17:39 +0100 <Guest2922>       False -> '\n' : prettyPrint' (size,y-1) coord
2022-11-10 22:17:40 +0100 <Guest2922>     False -> []
2022-11-10 22:18:01 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
2022-11-10 22:18:17 +0100 <geekosaur> because prettyprint' doesn't handle [] as second parameter
2022-11-10 22:18:35 +0100 <geekosaur> er, prettyPrint'
2022-11-10 22:18:37 +0100werneta(~werneta@137.79.201.248)
2022-11-10 22:19:03 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61)
2022-11-10 22:19:04 +0100mrianbloom(uid350277@id-350277.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
2022-11-10 22:19:20 +0100 <byorgey> Guest2922: FYI, in the future, if you have some code to share you can use something like https://paste.tomsmeding.com/ rather than pasting it into IRC
2022-11-10 22:20:34 +0100 <Guest2922> hmm not getting the result I anticipated
2022-11-10 22:20:46 +0100 <Guest2922> prettyPrint 3 [(1,1),(2,3),(3,2)] ==> "Q..\n..Q\n.Q.\n"
2022-11-10 22:20:53 +0100 <Guest2922> supposed to get something like that
2022-11-10 22:21:21 +0100 <Guest2922> *Set9b> prettyPrint 3 [(1,1),(2,3),(3,2)]
2022-11-10 22:21:21 +0100 <Guest2922> ".Q."
2022-11-10 22:21:34 +0100 <Guest2922> looks backwards and doesn't go through all the columns
2022-11-10 22:23:20 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a09f:2a20:ea37:7e61) (Ping timeout: 255 seconds)
2022-11-10 22:26:33 +0100 <EvanR> did you mix up the variable coord and coords?
2022-11-10 22:26:56 +0100 <EvanR> which have the same type and almost the same spelling
2022-11-10 22:27:31 +0100 <Guest2922> I was trying to have it iterate multiple times through the same list
2022-11-10 22:27:39 +0100 <Guest2922> and had a counter in place
2022-11-10 22:27:55 +0100 <Guest2922> I think the counter should accumulate rather than subtract
2022-11-10 22:28:38 +0100nate4(~nate@98.45.169.16)
2022-11-10 22:29:06 +0100 <EvanR> application notes for the atmega microcontroller suggests running loop counters from top to bottom since checking the Z flag is free/cheap compared to doing an extra comparison each loop </probablyirrelevant>
2022-11-10 22:29:55 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 22:30:35 +0100zeenk(~zeenk@2a02:2f04:a105:5d00:c862:f190:2ea:d494)
2022-11-10 22:33:03 +0100 <EvanR> you seem to have a list of coords which acts as the "set of ON cells", and then using a nested 2D loop, attempting a query to see if you should output a Q or a .
2022-11-10 22:33:24 +0100 <EvanR> it seems to me using an actual Set Coord would make that task more straightforward
2022-11-10 22:33:54 +0100nate4(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-11-10 22:34:09 +0100 <Guest2922> -- Ex 2: Implement the function prettyPrint that, given the size of
2022-11-10 22:34:10 +0100 <Guest2922> -- the chessboard and a list of distinct coordinates of queens (that
2022-11-10 22:34:10 +0100 <Guest2922> -- is, a list of (row,col) pairs), prints the chessboard with the
2022-11-10 22:34:11 +0100 <Guest2922> -- queens on it. Empty squares must be printed as '.'s and queens as
2022-11-10 22:34:11 +0100 <Guest2922> -- 'Q's. The special line break character '\n' must be appended to the
2022-11-10 22:34:12 +0100 <Guest2922> -- end of each row.
2022-11-10 22:34:12 +0100 <Guest2922> --
2022-11-10 22:34:13 +0100 <Guest2922> -- Examples:
2022-11-10 22:34:13 +0100 <Guest2922> --   prettyPrint 3 [(1,1),(2,3),(3,2)] ==> "Q..\n..Q\n.Q.\n"
2022-11-10 22:34:14 +0100 <Guest2922> --   prettyPrint 3 [(2,3),(1,1),(3,2)] ==> "Q..\n..Q\n.Q.\n"
2022-11-10 22:34:14 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
2022-11-10 22:34:14 +0100 <Guest2922> --   prettyPrint 3 [(1,3),(2,1),(3,2)] ==> "..Q\nQ..\n.Q.\n"
2022-11-10 22:34:15 +0100 <Guest2922> that's the task
2022-11-10 22:34:23 +0100 <EvanR> as it stands I have a hard time trusting your list is in the right order for whatever you're doing to always work
2022-11-10 22:35:47 +0100 <EvanR> they key thing test x == row && y == col
2022-11-10 22:37:03 +0100 <EvanR> the loop iteration might not coincide with the first element being the one you're querying
2022-11-10 22:37:24 +0100 <Guest2922> https://paste.tomsmeding.com/IWvazAfA
2022-11-10 22:37:38 +0100 <Guest2922> that only gets me "Q.."
2022-11-10 22:37:54 +0100 <Guest2922> because of the terminating condition with the empty list
2022-11-10 22:38:17 +0100ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-11-10 22:38:26 +0100 <EvanR> you ran out of coordinates before the board indexes were traversed
2022-11-10 22:38:59 +0100 <EvanR> you'll probably have less queen coordinates in the set than squares on the board
2022-11-10 22:39:24 +0100 <Guest2922> yeah but I also have a y counter
2022-11-10 22:39:35 +0100 <Guest2922> so it should reset if that reaches size+1
2022-11-10 22:39:44 +0100 <Guest2922>       False -> '\n' : prettyPrint' (1,y+1) coord
2022-11-10 22:40:01 +0100 <Guest2922> never reaches this and it doesn't seem to work correctly that way
2022-11-10 22:40:31 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-11-10 22:41:37 +0100 <EvanR> what if resetting is too late
2022-11-10 22:43:18 +0100 <Guest2922> not sure I follow
2022-11-10 22:46:26 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-11-10 22:46:45 +0100 <ski> Guest2922 : generally, i'd put short (especially non-nested) `case' branches before long ones .. although, you're doing `case' on `Bool', so you could instead be (chaining) `if'-`then'-`else's .. or better, in this case, simply use guards
2022-11-10 22:48:23 +0100 <Guest2922> yeah probably would look cleaner with guards
2022-11-10 22:54:32 +0100irrgit_(~irrgit@146.70.27.250) (Quit: Leaving)
2022-11-10 22:54:54 +0100blomberg(~default_u@89-39-107-192.hosted-by-worldstream.net) (Ping timeout: 260 seconds)
2022-11-10 22:56:44 +0100blomberg(~default_u@89-39-107-192.hosted-by-worldstream.net)
2022-11-10 22:56:54 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-11-10 23:03:11 +0100jakalx(~jakalx@base.jakalx.net)
2022-11-10 23:04:49 +0100werneta(~werneta@137.79.201.248) (Ping timeout: 260 seconds)
2022-11-10 23:06:52 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-11-10 23:08:15 +0100beteigeuze(~Thunderbi@a79-169-109-107.cpe.netcabo.pt)
2022-11-10 23:11:46 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-11-10 23:11:47 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-11-10 23:19:01 +0100vglfr(~vglfr@145.224.100.100) (Remote host closed the connection)
2022-11-10 23:19:08 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-11-10 23:20:14 +0100vglfr(~vglfr@145.224.100.100)
2022-11-10 23:20:16 +0100vglfr(~vglfr@145.224.100.100) (Remote host closed the connection)
2022-11-10 23:20:57 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-11-10 23:22:09 +0100vglfr(~vglfr@145.224.100.100)
2022-11-10 23:24:25 +0100`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2022-11-10 23:24:29 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-11-10 23:25:44 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-11-10 23:28:46 +0100 <Inst> my point that monad /= monad
2022-11-10 23:28:52 +0100 <Inst> represents that monad is an overloaded term
2022-11-10 23:29:04 +0100 <Inst> defining monad as a typeclass / cat theory abstraction is valid, so's a dozen other definitions
2022-11-10 23:29:32 +0100 <Inst> it makes sense to speak of monads as a typeclass / cat theory, but also refer to monad pattern programming
2022-11-10 23:29:44 +0100werneta(~werneta@137.79.216.58)
2022-11-10 23:32:32 +0100Guest2922(~Guest29@pool-108-54-69-191.nycmny.fios.verizon.net) (Quit: Client closed)
2022-11-10 23:33:14 +0100 <EvanR> wait wait, I've never heard more than essentially 1 definition of monad, unless you're talking about leibniz or maybe marvel cosmology
2022-11-10 23:34:02 +0100jmd_(~jmdaemon@user/jmdaemon)
2022-11-10 23:34:12 +0100 <EvanR> or botched identifications such as "jquery is a monad"
2022-11-10 23:34:26 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds)
2022-11-10 23:34:45 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 23:34:53 +0100 <monochrom> Such idle and smug philosophy. One can simply clarify with "monad as in Haskell's type class" or "monad as in category theory" or ... and save everyone a lot of trouble.
2022-11-10 23:39:05 +0100 <Inst> what is actually being asked when someone asks "What's a monad (in the context of programming)?"
2022-11-10 23:39:51 +0100 <monochrom> Well that depends on the asker and the context of the conversation, doesn't it?
2022-11-10 23:40:25 +0100 <monochrom> Generally true of all questions really, no?
2022-11-10 23:40:44 +0100 <monochrom> It's a dead horse.
2022-11-10 23:40:48 +0100 <hpc> it's a bit like asking "what's v in this equation?"
2022-11-10 23:41:11 +0100 <Inst> it's an overloaded question, they want to know what a monadic type is, what monad pattern programming is, what Haskell monad typeclass is, and perhaps what a category theory monad is
2022-11-10 23:41:56 +0100 <EvanR> actually what. No, someone who has no idea might be asking literally what is a monad and not know how many alternatives there would be
2022-11-10 23:42:04 +0100 <EvanR> how could they
2022-11-10 23:42:05 +0100 <int-e> hpc: That sounded properly contextualized, akin to "how is Maybe a monad?"
2022-11-10 23:42:24 +0100mrianbloom(uid350277@id-350277.ilkley.irccloud.com)
2022-11-10 23:42:50 +0100 <Inst> or rather, EvanR, they're not familiar with the overloading
2022-11-10 23:42:51 +0100 <EvanR> usually when this happens, in non-monads, there is a canned response which ignores all nuance. I guess for monads this is "like a burrito"
2022-11-10 23:42:57 +0100 <int-e> ask "what's v in mathematics" and you get a million possible answer
2022-11-10 23:43:00 +0100 <int-e> +s
2022-11-10 23:43:06 +0100 <mrianbloom> Is there a way to read the code that template haskell is generating?
2022-11-10 23:43:17 +0100 <geekosaur> -ddump-splices
2022-11-10 23:43:26 +0100 <hpc> sure, up until someone says "it's https://en.wikipedia.org/wiki/V_number" and now you need a deeper explanation
2022-11-10 23:43:38 +0100 <mrianbloom> geekosaur thanks
2022-11-10 23:43:55 +0100 <mrianbloom> There's no ide support for that is there?
2022-11-10 23:44:04 +0100 <geekosaur> not that I'm aware of
2022-11-10 23:44:38 +0100 <hpc> generally you're asking about monads in the implicit context of that you were already talking about something that got you to that point
2022-11-10 23:44:57 +0100 <geekosaur> except you may not have let us in on that
2022-11-10 23:44:59 +0100 <Inst> but the context often still has overloading
2022-11-10 23:45:00 +0100califax(~califax@user/califx) (Remote host closed the connection)
2022-11-10 23:45:26 +0100 <Inst> on Discord and on ##programming, I'm practicing explaining monads
2022-11-10 23:45:29 +0100califax(~califax@user/califx)
2022-11-10 23:45:36 +0100 <hpc> i guess it's more like asking "what's v?"
2022-11-10 23:45:42 +0100 <geekosaur> imo that's usually a mistake
2022-11-10 23:45:48 +0100 <hpc> sometimes you're talking to a networking person, sometimes you're talking to a physicist
2022-11-10 23:45:55 +0100 <hpc> or a movie buff
2022-11-10 23:46:00 +0100 <EvanR> calling out that the question makes no sense or isn't specific enough doesn't seem to be helping
2022-11-10 23:46:03 +0100 <Inst> so the context is more like, dealing with a total beginner to monadic programming etc
2022-11-10 23:46:20 +0100 <EvanR> I found a canned response that seems kind of relevant
2022-11-10 23:46:30 +0100 <geekosaur> @where ychim
2022-11-10 23:46:30 +0100 <lambdabot> http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html
2022-11-10 23:47:02 +0100 <EvanR> sure there you go
2022-11-10 23:47:41 +0100 <EvanR> but again, I have to insist they first consider Functor and functorial programming and demand their languages steals that from haskell
2022-11-10 23:47:50 +0100 <geekosaur> I like that one. shows 3 different programming situations and how you'd solve them, then shows that they have a framework in common and we call that "monad"
2022-11-10 23:48:49 +0100 <monochrom> You know what, speaking of overloading, Haskell's solution to overloading is type classing, eh? :)
2022-11-10 23:49:09 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
2022-11-10 23:49:28 +0100 <geekosaur> what happens when you overload overloading?
2022-11-10 23:49:31 +0100 <hpc> especially if you consider the more precise name for overloading
2022-11-10 23:49:35 +0100 <hpc> type-directed name resolution
2022-11-10 23:49:36 +0100 <monochrom> P.S. Now I have one more reason to continue avoiding Discord.
2022-11-10 23:49:48 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-11-10 23:49:58 +0100 <monochrom> I prefer type-directed type resolution :)
2022-11-10 23:50:13 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 23:50:25 +0100 <monochrom> BTW dependent typing is value-directed type resolution, isn't it? :)
2022-11-10 23:52:10 +0100 <hpc> eh, sort of
2022-11-10 23:52:33 +0100 <hpc> there's not really any "resolution" at that point, since you are already thinking about your types as types and not as a symbol table of some sort
2022-11-10 23:52:54 +0100 <hpc> name resolution is "i typed print(something), what function definition is that?"
2022-11-10 23:53:07 +0100 <monochrom> I just like the "___-directed ___ resolution" template. :)
2022-11-10 23:53:35 +0100 <hpc> and annoyingly also distracts people from the fact that each different print(args) is a completely different function
2022-11-10 23:53:42 +0100 <hpc> that all happen to overlap in the symbol table
2022-11-10 23:53:43 +0100 <monochrom> I may also like to s/name/value/ . I like puns and symmetries and dualities.
2022-11-10 23:53:57 +0100 <hpc> even shakespeare knew the name isn't the thing
2022-11-10 23:54:58 +0100 <Inst> i guess we're not really understanding each other
2022-11-10 23:55:20 +0100 <Inst> i know the literature, i.e, stop making monad tutorials, and grokking monads is essentially a Chan / Zen process
2022-11-10 23:55:24 +0100 <Inst> gotta "feel da monad"
2022-11-10 23:56:04 +0100 <Inst> that just seems like a dumb process to me
2022-11-10 23:56:10 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-11-10 23:56:12 +0100 <davean> I'd say its more "you have to give up your assumptions" most people only do that via exposure. You can also learn the skill.
2022-11-10 23:56:22 +0100 <davean> Most people aren't exposed to enough new ideas to practice it though.
2022-11-10 23:56:25 +0100 <Inst> i have a friend who's demanding to be spoonfed, and forcing her to "feel da monad" is probably sexual harassment
2022-11-10 23:56:44 +0100 <hpc> the monad tutorial said forget everything you know about monads
2022-11-10 23:56:45 +0100 <hpc> so i did
2022-11-10 23:56:46 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-11-10 23:56:53 +0100 <hpc> then it started talking about monads, but i didn't know what the hell they were!
2022-11-10 23:57:09 +0100 <monochrom> hpc: Wait, which monad tutorial?
2022-11-10 23:57:21 +0100 <monochrom> Oh haha OK
2022-11-10 23:57:21 +0100 <Inst> i'm thinking, monadic pattern programming -> monad types -> monads as a typeclass / cat theory monads
2022-11-10 23:57:33 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-11-10 23:57:42 +0100 <hpc> https://www.youtube.com/watch?v=QJ3kCxsOjLc
2022-11-10 23:58:10 +0100 <monochrom> heh
2022-11-10 23:59:31 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-11-10 23:59:59 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)