Home liberachat/#haskell: Logs Calendar

Logs on 2023-10-24 (liberachat/#haskell)

00:04:39 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 258 seconds)
00:05:43 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
00:07:56 × bliminse quits (~bliminse@user/bliminse) (Ping timeout: 260 seconds)
00:13:18 × arahael quits (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 260 seconds)
00:14:56 × Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 255 seconds)
00:15:23 × Luj quits (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 258 seconds)
00:20:13 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
00:20:38 Luj joins (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
00:24:14 notzmv joins (~zmv@user/notzmv)
00:24:42 bliminse joins (~bliminse@user/bliminse)
00:27:47 × dudek quits (~dudek@185.150.236.168) (Read error: Connection reset by peer)
00:28:02 × ddellacosta quits (~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 258 seconds)
00:31:22 × bliminse quits (~bliminse@user/bliminse) (Ping timeout: 255 seconds)
00:31:40 <Inst> here's a more amusing question EvanR
00:32:01 <Inst> do you consider [IO ()] pure or impure? :)
00:32:24 <Inst> in this case, it's actually [[IO ()]]
00:33:07 bliminse joins (~bliminse@user/bliminse)
00:33:51 <geekosaur> pure until `sequenceA`d
00:34:09 <Inst> https://inventwithpython.com/bigbookpython/project77.html
00:34:10 <Inst> trying this
00:34:21 <Inst> sequenceA_, in this case
00:34:38 <Inst> the hard part is figuring out how to draw the displays
00:34:58 <Inst> especially since, to spice up the plain-jane Py, I'm adding ansi-terminal for color
00:35:13 <EvanR> Inst, I've been disagreeing with all your uses of impure
00:35:21 <EvanR> you're considering IO impure
00:35:51 <Inst> technically Haskell IO is pure because it's only evaluated via main IO action combination or unsafePerformIO
00:36:04 <Inst> afaik only unsafePerformIO is strictly impure, no?
00:36:15 <geekosaur> more precisely, it's pure instructions to an impure mutating runtime
00:36:34 <Inst> but is [[IO ()]] in IO? :)
00:37:44 <exarkun> no
00:38:47 <Inst> the problem is that since I'm using ansi-terminal to imbue colors, I can't have the data directly... oh, I can build a recipe and store it in a list of lists
00:39:16 <exarkun> yes. and that's presumably what those IO ()s are. but you could have a more legible recipe.
00:40:30 <monochrom> I do not have a context-free notion of "pure" vs "impure".
00:41:04 <monochrom> In some contexts, it is helpful to say that Int is pure, IO Int is impure.
00:41:07 <EvanR> pure data, pure code, apparently it has grown legs
00:41:14 <monochrom> This doesn't work in other contexts.
00:41:20 <EvanR> from the idea of pure and impure function
00:41:27 <Inst> hmmm, this is actually arguing for interpreters
00:41:44 <geekosaur> next you'll be using free monads
00:41:46 <monochrom> False dichotomies are what people invent when they want to procrastinate getting things done.
00:42:02 <Inst> i discovered sequenceA and sequenceA_ last year
00:42:13 <Inst> I've always wanted to be able to do IO or IO equivalents through a list
00:42:40 <monochrom> What always works is you look at the real problem and you choose a theory that works best for that problem.
00:42:43 <Inst> with the implication that the list would be manipulatable and combinable as though it were lisp
00:43:05 <geekosaur> yep, you're well on the way
00:43:12 <monochrom> As opposed to going to twitter and having pointless arguments over what counts as referentially transparent.
00:43:24 <monochrom> (Hint: It comes down to what counts as equality.)
00:43:58 <Inst> it'd be awfully satirical if this weren't an FP / Dijkstran CS community
00:44:05 <Inst> "it depends on what the meaning of is, is"
00:44:22 <geekosaur> I'm glad I wasn't the only one who flashed to that 🙂
00:45:16 <Inst> https://slate.com/news-and-politics/1998/09/bill-clinton-and-the-meaning-of-is.html <-- origin, hope it's old enough not to be political
00:46:57 <geekosaur> some of us are old enough to remember when that happened
00:47:36 <Inst> iirc Dijkstra tried to replace inference with equivalence, no?
00:48:20 <monochrom> s/iirc/iiuc/ and not really.
00:49:42 <Inst> What branch of mathematics is discussing the meaning of the term equality / equivalence?
00:49:53 <Inst> I recall seeing on CCC a joke based around that concept
00:50:08 <Inst> implication, not inference
00:50:12 <Inst> https://inference-review.com/article/the-man-who-carried-computer-science-on-his-shoulders
00:51:22 pavonia joins (~user@user/siracusa)
01:01:00 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
01:01:22 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
01:01:27 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
01:02:25 Lord_of_Life_ is now known as Lord_of_Life
01:02:52 <Inst> https://www.quantamagazine.org/with-category-theory-mathematics-escapes-from-equality-20191010/
01:04:51 × _xor quits (~xor@72.49.199.93) (Read error: Connection reset by peer)
01:07:01 _xor joins (~xor@72.49.199.93)
01:07:31 × otto_s quits (~user@p5b044a8c.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
01:08:44 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
01:09:00 otto_s joins (~user@p4ff279af.dip0.t-ipconnect.de)
01:10:56 × CiaoSen quits (~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 260 seconds)
01:13:48 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 248 seconds)
01:22:47 <yin> monochrom: did someone go on twitter and started a discussion on what counts as referentially transparent?
01:23:02 <yin> and did i have something to do with it?
01:23:06 <monochrom> I don't know. Hypothetical. :)
01:23:15 <yin> aw
01:23:32 <monochrom> No, you didn't have anything to do with it.
01:24:06 <monochrom> I saw that kind of discussion though a long time ago on haskell-cafe and maybe newsgroups.
01:24:23 <yin> i was thinking on my `zero = num_ 0` example earlier
01:24:42 <monochrom> Very disappointed because the gist was everyone clearly had a different definition of equality but no one realized it.
01:25:06 <yin> equality is not as simple as it seems
01:25:11 <monochrom> Right.
01:25:36 <monochrom> After you know, you also know it is not worth arguing. Just use the right defn for the right problem.
01:26:19 <monochrom> But this is why we have fun politics with left vs right, right?
01:26:35 <yin> that would solve almost all arguments i have with people in real life
01:26:37 <monochrom> Both sides wonder "why does the other side hate freedom?"
01:26:49 <monochrom> @quote monochrom polymorphic
01:26:49 <lambdabot> monochrom says: All pointless debates can be settled by going polymorphic.
01:27:36 <Inst> What does polymorphic mean in that context? And what's the pun on pointless?
01:29:09 <yin> monochrom: there's a joke waiting to be made about pointless debates and no arguments there
01:29:22 <monochrom> hahahaha
01:30:07 <monochrom> No argument can win a pointless debate? :)
01:30:48 <jackdk> The debates about point-free code certainly go on forever
01:31:39 <yin> the system is fixed
01:32:52 <geekosaur> > fix system
01:32:53 <lambdabot> error: Variable not in scope: system :: a -> a
01:34:02 <Inst> what would the semantics be if Haskell had first-class modules?
01:34:13 <Inst> > fix System.IO
01:34:15 <lambdabot> error:
01:34:15 <lambdabot> Not in scope: data constructor ‘System.IO’
01:34:15 <lambdabot> No module named ‘System’ is imported.
01:34:59 cece joins (~Thunderbi@103.28.91.210)
01:35:31 <geekosaur> probably similar to those of SML/NJ?
01:35:50 <Inst> I mean if you were able to fix a first class module on itself?
01:36:10 <geekosaur> sounds like an infinite type to me
01:40:39 <probie> What's the distinction between a module and a record?
01:41:20 <geekosaur> types can't be values in Haskell (at least, not yet)
01:41:22 <probie> I guess in Haskell quite a lot, since one can't make new types anywhere but at the top level
01:41:33 <geekosaur> > fix system
01:41:35 <lambdabot> "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex...
01:44:54 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
01:48:26 <yin> you rascal
01:56:38 <EvanR> it's been a while since I've seen anyone bring up referential transparent, used right or used wrong
01:57:37 <EvanR> probie, in idris, nothing
01:58:00 <EvanR> er, wait, no they are distinct in idris
02:00:12 <Inst> > fix error
02:00:13 <lambdabot> "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex...
02:03:42 <geekosaur> ideally I'd have defined my own instead of reusing `error` 😛
02:05:26 <geekosaur> > fix (\e -> "Error: " ++ e)
02:05:28 <lambdabot> "Error: Error: Error: Error: Error: Error: Error: Error: Error: Error: Error...
02:08:05 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:08:05 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:08:05 finn_elija is now known as FinnElija
02:11:08 × xff0x quits (~xff0x@ai101218.d.east.v6connect.net) (Ping timeout: 255 seconds)
02:12:22 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds)
02:20:05 ddellacosta joins (~ddellacos@ool-44c738de.dyn.optonline.net)
02:23:29 Katarushisu16 joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
02:24:38 × Inst quits (~Inst@120.244.192.250) (Ping timeout: 255 seconds)
02:25:03 × Katarushisu1 quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 240 seconds)
02:25:03 Katarushisu16 is now known as Katarushisu1
02:26:58 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
02:27:14 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
02:29:45 megaTherion_ joins (~therion@unix.io)
02:29:48 × megaTherion quits (~therion@unix.io) (Ping timeout: 240 seconds)
02:29:52 megaTherion_ is now known as megaTherion
02:36:04 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 256 seconds)
02:37:53 ec joins (~ec@gateway/tor-sasl/ec)
02:43:39 <jackdk> > fix ('A':)
02:43:41 <lambdabot> "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
02:44:35 × waleee quits (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds)
02:46:42 Pseudonym joins (~IceChat95@203.214.86.172)
02:49:06 × td_ quits (~td@i5387090D.versanet.de) (Ping timeout: 258 seconds)
02:50:54 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
02:51:02 td_ joins (~td@i53870916.versanet.de)
02:56:47 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
03:11:36 × isekaijin quits (~user@user/isekaijin) (Quit: brb)
03:12:14 isekaijin joins (~user@user/isekaijin)
03:12:28 aforemny joins (~aforemny@2001:9e8:6cc2:e900:a0d4:78f3:5fb4:bb3c)
03:13:38 × aforemny_ quits (~aforemny@2001:9e8:6cdc:d800:4073:3320:51a8:3861) (Ping timeout: 258 seconds)
03:14:07 × qqq quits (~qqq@92.43.167.61) (Remote host closed the connection)
03:24:55 × cece quits (~Thunderbi@103.28.91.210) (Remote host closed the connection)
03:25:10 cece joins (~Thunderbi@103.28.91.210)
03:33:01 dnb^ joins (~cd@76.145.193.217)
03:50:18 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
03:50:38 <albet70> mtl or transformers which should I use?
03:52:43 rosco joins (~rosco@yp-150-69.tm.net.my)
03:53:30 <jackdk> mtl is a set of convenience typeclasses built atop transformers.
03:54:00 <albet70> why 2 :: IO Int not work?
03:54:31 <jackdk> There is no instance `Num (IO Int)`
03:55:54 <albet70> how to construct IO type since there's no IO constructor
03:56:01 <c_wraith> huh. I just realized that's sort of related to why GHC 9 introduced the Code type for typed template haskell.
03:57:33 <albet70> oh, return
04:00:39 <jackdk> `pure` is the modern name for `return`, though I'm not sure if the monad-of-no-return proposal will ever happen.
04:05:28 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
04:11:43 <probie> I'm sure the monad-of-no-return proposal will happen shortly after we end with a `Pointed` typeclass so we can continue having two names for the same thing
04:12:25 <probie> s/end with ... typeclass/end up with/
04:23:23 <jackdk> and then we can tidy up arrows/profunctors
04:28:27 <EvanR> :t pure 2
04:28:28 <lambdabot> (Applicative f, Num a) => f a
04:28:49 <EvanR> f a I say. f a!
04:29:19 <EvanR> (may specialize to IO Int)
04:31:13 <EvanR> monad of no return won't delete return from existence right
04:31:24 <EvanR> doesn't help with that
04:32:23 <monochrom> I think it just moves return out of the class, make it a top-level function "return = pure". I haven't really checked.
04:32:25 <EvanR> we won't be able to shake our cane at novice haskellers who know only pure and yell back in my day it was called return! And it was mildly acceptable!
04:32:48 <monochrom> Heh but I don't miss the name "return".
04:33:22 <monochrom> Meanwhile, meaningful names that are misleading are human nature, there won't be any shortage of new ones in the future.
04:33:57 <monochrom> Consider "test pollution".
04:34:25 <monochrom> Even "RAII".
04:36:45 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
04:38:47 billchenchina joins (~billchenc@103.152.35.21)
04:39:38 juri__ joins (~juri@79.140.115.166)
04:40:04 × rosco quits (~rosco@yp-150-69.tm.net.my) (Quit: Lost terminal)
04:40:21 × juri_ quits (~juri@84-19-175-187.pool.ovpn.com) (Ping timeout: 260 seconds)
04:44:09 × lambdap2371 quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap2371)
04:44:55 lambdap2371 joins (~lambdap@static.167.190.119.168.clients.your-server.de)
04:58:22 takuan joins (~takuan@178-116-218-225.access.telenet.be)
04:58:51 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
04:59:34 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:01:45 × cece quits (~Thunderbi@103.28.91.210) (Remote host closed the connection)
05:10:16 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
05:14:44 × td_ quits (~td@i53870916.versanet.de) (Ping timeout: 255 seconds)
05:15:00 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
05:15:30 <albet70> eitherResult :: Either String () <- xxx why Type signatures are only allowed in patterns with ScopedTypeVariables
05:16:32 td_ joins (~td@i53870938.versanet.de)
05:17:31 <albet70> how to declare a type in left of <- in do notation?
05:18:04 <albet70> 2 :: Int <- return 2 :: IO Int
05:21:58 <mauke> (2 :: Int) <- ..., but needs a language extension
05:25:16 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Ping timeout: 260 seconds)
05:27:05 michalz joins (~michalz@185.246.207.221)
05:29:19 chomwitt joins (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1)
05:32:09 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
05:37:21 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
05:39:46 cece joins (~Thunderbi@e2e-32-47.ssdcloudindia.net)
05:43:45 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
05:44:15 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
05:44:43 azimut joins (~azimut@gateway/tor-sasl/azimut)
05:45:28 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
05:49:40 raym joins (~ray@user/raym)
05:55:47 × rgw quits (~R@2605:a601:a0df:5600:f816:aa41:2408:8443) (Read error: Connection reset by peer)
05:56:29 × billchenchina quits (~billchenc@103.152.35.21) (Remote host closed the connection)
06:00:31 × Pseudonym quits (~IceChat95@203.214.86.172) (Quit: When the chips are down, the buffalo is empty)
06:08:42 × yaroot quits (~yaroot@p3477236-ipngn9802souka.saitama.ocn.ne.jp) (Remote host closed the connection)
06:09:19 yaroot joins (~yaroot@p3477236-ipngn9802souka.saitama.ocn.ne.jp)
06:30:17 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
06:31:21 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
06:34:06 fendor joins (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021)
06:35:36 chele joins (~chele@user/chele)
06:35:52 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
06:37:15 elkcl_ joins (~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru)
06:38:47 × elkcl quits (~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru) (Ping timeout: 255 seconds)
06:38:48 elkcl_ is now known as elkcl
06:40:01 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:40:13 danza joins (~francesco@151.37.205.77)
06:41:54 acidjnk_new joins (~acidjnk@p200300d6e72b9364ac51bf6edb979c24.dip0.t-ipconnect.de)
06:42:07 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
06:52:41 Jackneill joins (~Jackneill@20014C4E1E0E6F00C66CC838C6CE2C28.dsl.pool.telekom.hu)
06:57:15 random-jellyfish joins (~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444)
06:57:15 × random-jellyfish quits (~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444) (Changing host)
06:57:15 random-jellyfish joins (~tiber@user/random-jellyfish)
06:59:06 <dminuoso> albet70: The motivating part is being able to write `(a :: t) <- ...; ` and being able to use `t` in subsequent do statements.
06:59:42 <dminuoso> So that's what this extension is for. The fact that you can use `(2 :: Int) <- ...` is an added benefit.
07:00:18 <dminuoso> In hindsight this is all terribly inconvenient. I feel like the behavior of ScopedTypeVariables should have been the default.
07:04:57 vglfr joins (~vglfr@88.155.140.136)
07:06:10 lortabac joins (~lortabac@2a01:e0a:541:b8f0:877:6f13:9fe8:2e06)
07:07:55 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
07:08:16 vglfr joins (vglfr@gateway/vpn/protonvpn/vglfr)
07:15:05 <lisbeths> pls tell the owner of lambdabot that #lambdacalculus is an officially registered server
07:15:36 <lisbeths> we would like to ask access to a bot designed to evaluate lambda expressions
07:20:12 × danza quits (~francesco@151.37.205.77) (Ping timeout: 240 seconds)
07:22:33 CiaoSen joins (~Jura@2a05:5800:2a5:2200:664b:f0ff:fe37:9ef)
07:33:24 × vglfr quits (vglfr@gateway/vpn/protonvpn/vglfr) (Ping timeout: 245 seconds)
07:33:49 vglfr joins (~vglfr@88.155.140.136)
07:34:30 Square3 joins (~Square4@user/square)
07:37:51 danse-nr3_ joins (~francesco@151.37.210.148)
07:39:03 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:42:05 rosco joins (~rosco@yp-150-69.tm.net.my)
07:45:36 gmg joins (~user@user/gehmehgeh)
07:51:41 × mrmr155 quits (~mrmr@user/mrmr) (Ping timeout: 255 seconds)
07:52:09 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
07:52:44 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
07:53:18 <int-e> ? ChanServ knows nothing about it.
07:53:29 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
07:53:50 vglfr joins (vglfr@gateway/vpn/protonvpn/vglfr)
07:54:02 <dminuoso> I have a feeling this is about matrix
07:57:18 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
07:57:40 <tomsmeding> dminuoso: they're asking from irc though
07:57:41 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
07:59:17 sm joins (~sm@plaintextaccounting/sm)
08:00:56 <dminuoso> tomsmeding: Who knows. Maybe they (somewhat correctly) assume that the lambdabot responsible person can be found here?
08:01:49 <tomsmeding> being explicit is good, then, I guess :p
08:02:05 <int-e> dminuoso: that would be me
08:03:45 <int-e> Well. Maybe not... is there a dedicated lambdabot on Matrix? That wouldn't be mine.
08:08:51 <probie> If it's on matrix, can't they bridge it with no involvement from anyone? Or do none of the bridges handle talking directly to users?
08:12:56 <haskellbridge> <s​m> why are y'all thinking matrix is involved
08:14:59 mrmr155 joins (~mrmr@user/mrmr)
08:15:02 <int-e> [needsinfo]
08:15:03 int-e shrugs
08:16:28 × vglfr quits (vglfr@gateway/vpn/protonvpn/vglfr) (Ping timeout: 258 seconds)
08:16:56 vglfr joins (~vglfr@88.155.140.136)
08:19:16 <int-e> Sorry, ChanServ does know about it. I can't type ("#lamdbacalculus" isn't known)
08:20:33 <int-e> (That doesn't even look wrong to me, somehow. :-/ )
08:20:50 <tomsmeding> int-e: try pronouncing it :p
08:21:22 <tomsmeding> assuming your mother tongue is English, that'll be a challenge
08:21:23 <int-e> tomsmeding: lam-da-cal-cu-lus
08:22:02 <tomsmeding> ah, the reasoning being "b is silent in lambda so it's also silent in lamdba"
08:22:06 <int-e> It's german and the b is silent there too.
08:22:42 <int-e> tomsmeding: I mean, you have a point. It does look wrong when I try to parse syllables.
08:22:46 <tomsmeding> :p
08:23:02 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:25:23 <int-e> lisbeths: Done now. Sorry for the confusion above.
08:26:28 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
08:27:00 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
08:32:57 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
08:38:30 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
08:39:03 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
08:39:57 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
08:54:04 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:55:01 × tzh quits (~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz)
09:04:45 × rosco quits (~rosco@yp-150-69.tm.net.my) (Quit: Lost terminal)
09:04:57 rosco joins (~rosco@yp-150-69.tm.net.my)
09:05:42 × yoyofreeman quits (~yoyofreem@176.97.76.178) (Read error: Connection reset by peer)
09:06:55 yoyofreeman joins (~yoyofreem@176.97.76.178)
09:11:47 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
09:16:06 fweht joins (uid404746@id-404746.lymington.irccloud.com)
09:16:31 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
09:22:45 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
09:25:12 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds)
09:25:52 ubert1 joins (~Thunderbi@91.141.40.172.wireless.dyn.drei.com)
09:26:44 × ubert quits (~Thunderbi@91.141.50.28.wireless.dyn.drei.com) (Ping timeout: 246 seconds)
09:26:45 ubert1 is now known as ubert
09:27:52 billchenchina joins (~billchenc@113.57.152.160)
09:28:33 × rosco quits (~rosco@yp-150-69.tm.net.my) (Quit: Lost terminal)
09:28:46 rosco joins (~rosco@yp-150-69.tm.net.my)
09:30:39 billchenchina- joins (~billchenc@2a0c:b641:7a2:230::10)
09:33:11 × billchenchina quits (~billchenc@113.57.152.160) (Ping timeout: 260 seconds)
09:40:43 arahael joins (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net)
09:47:18 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
09:48:11 <Unicorn_Princess> oh, regarding the quality if haskell tooling, don't worry about it too much guys. i come from the land of c++ and the horrors of cmake, and compared to that cabal is nirvana
09:48:19 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
09:48:38 sord937 joins (~sord937@gateway/tor-sasl/sord937)
09:48:47 <kuribas> \o/
09:49:16 <kuribas> I've been saying this before, haskell tooling sucks, but not more than other tooling.
09:49:27 <Hecate> \o/
09:49:38 <kuribas> And I might say the same about type system complexity. Man typescript has a complex type system.
09:50:01 pyooque joins (~puke@user/puke)
09:50:01 × puke quits (~puke@user/puke) (Killed (lithium.libera.chat (Nickname regained by services)))
09:50:01 pyooque is now known as puke
09:50:06 santiagopim joins (~user@90.167.66.131)
09:51:52 <Unicorn_Princess> and again c++ makes everything look good compared to templates
09:51:58 <Unicorn_Princess> everything else*
09:52:03 <kuribas> I hear many people (even haskellers) claim that dependent types are complicated, but in the end they only add two constructs to the type system (existential and universal quantification).
09:52:07 <Unicorn_Princess> except C's void* >_>
09:52:27 <kuribas> void* is just 'Any'
09:52:36 <kuribas> well, unsafe Any
09:52:43 <Unicorn_Princess> i.e. the worst possible type. for everything
09:53:05 <Unicorn_Princess> it is "simple" tho, there's that
09:53:23 <kuribas> Any isn't a type really.
09:53:30 <kuribas> It's just "turn off the type checker".
09:54:06 Inst joins (~Inst@120.244.192.250)
09:54:25 <kuribas> Or you could think of it as a dependent pair, together with an implicit check and a partial function.
09:55:24 × fendor quits (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Ping timeout: 240 seconds)
09:55:32 <Unicorn_Princess> i think of it as a CVE in its larval stage
09:56:39 <kuribas> However, in Python Any is not checked at the place where you convert it, it just propagates through until it crashes some primitive function.
09:57:22 <kuribas> In a properly designed language with "Any", I would expect it to do a check at the place where it is casted.
09:58:13 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
10:02:38 <tomsmeding> kuribas: I don't think saying "dependent types aren't complicated, they only add two constructs to the type system" is quite honest :p
10:02:43 × yoyofreeman quits (~yoyofreem@176.97.76.178) (Read error: Connection reset by peer)
10:03:23 yoyofreeman joins (~yoyofreem@176.97.76.178)
10:03:49 × ft quits (~ft@p4fc2a529.dip0.t-ipconnect.de) (Quit: leaving)
10:05:13 × yoyofreeman quits (~yoyofreem@176.97.76.178) (Remote host closed the connection)
10:08:38 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 272 seconds)
10:09:48 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
10:18:59 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:877:6f13:9fe8:2e06) (Quit: WeeChat 2.8)
10:19:49 __monty__ joins (~toonn@user/toonn)
10:29:53 × santiagopim quits (~user@90.167.66.131) (Remote host closed the connection)
10:30:50 santiagopim joins (~user@90.167.66.131)
10:31:59 × jjhoo quits (~jahakala@user/jjhoo) (Ping timeout: 255 seconds)
10:36:46 × CiaoSen quits (~Jura@2a05:5800:2a5:2200:664b:f0ff:fe37:9ef) (Ping timeout: 258 seconds)
10:38:50 × billchenchina- quits (~billchenc@2a0c:b641:7a2:230::10) (Remote host closed the connection)
10:47:54 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 272 seconds)
10:59:09 yoyofreeman joins (~yoyofreem@176.97.76.178)
11:07:19 xff0x joins (~xff0x@2405:6580:b080:900:ecc3:b543:f7a2:f485)
11:08:56 jjhoo joins (~jahakala@user/jjhoo)
11:25:46 CiaoSen joins (~Jura@2a05:5800:2a5:2200:664b:f0ff:fe37:9ef)
11:29:35 × CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Quit: ZNC 1.8.2 - https://znc.in)
11:31:44 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
11:39:06 danse-nr3__ joins (~francesco@151.35.159.184)
11:39:13 × danse-nr3_ quits (~francesco@151.37.210.148) (Read error: Connection reset by peer)
11:40:31 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
11:40:58 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
11:41:07 × xff0x quits (~xff0x@2405:6580:b080:900:ecc3:b543:f7a2:f485) (Ping timeout: 264 seconds)
11:41:41 hololeap joins (~quassel@user/hololeap)
11:42:36 xff0x joins (~xff0x@ai101218.d.east.v6connect.net)
11:43:06 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:43:24 × danse-nr3__ quits (~francesco@151.35.159.184) (Ping timeout: 240 seconds)
11:43:34 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
11:44:18 × chomwitt quits (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
11:45:36 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
11:46:00 Lycurgus joins (~georg@user/Lycurgus)
11:46:57 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
11:46:57 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
11:51:40 enoq joins (~enoq@2a05:1141:1e6:3b00:c958:a45e:c4e0:3650)
11:53:17 <enoq> regarding Monads & Co: it feels like having strongly typed I/O or error checking sort of infects almost everything in your code, similar to how async in JS or checked Exceptions in Java (escape hatch via unchecked exceptions) make you build APIs that throw errors/are async by default
11:54:20 <enoq> I know that there are trade offs with regards to unchecked exceptions vs Result types/checked exceptions, but how much of a benefit has each been in your experience?
11:55:03 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
11:55:35 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
11:56:05 <enoq> as in: how much of an impact does having Monads + the Monad Transformer pain been in comparison to languages that don't have I/O or Result types baked in
11:56:39 hololeap joins (~quassel@user/hololeap)
11:58:00 czy joins (~user@180.116.80.17)
11:58:06 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:58:35 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
12:02:38 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
12:02:40 × czy quits (~user@180.116.80.17) (Quit: ERC 5.6-git (IRC client for GNU Emacs 30.0.50))
12:06:52 fendor joins (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021)
12:09:39 sm joins (~sm@plaintextaccounting/sm)
12:11:17 <jackdk> Working with Either(Result) is significantly easier than it initially appears, because Functor and Applicative provide such a good toolkit for lifting pure functions across Eithers (as well as many many other data types)
12:12:16 <jackdk> I definitely had the "oh dear this is gonna infect everything" reaction when I started playing with IO or Either or whatever but it's a much better story than it first appears (when the only tool I had was `do`-notation)
12:19:49 × califax quits (~califax@user/califx) (Remote host closed the connection)
12:20:12 califax joins (~califax@user/califx)
12:20:35 × cece quits (~Thunderbi@e2e-32-47.ssdcloudindia.net) (Ping timeout: 240 seconds)
12:21:20 cece joins (~Thunderbi@e2e-32-47.ssdcloudindia.net)
12:21:21 <arahael> jackdk: It certainly makes you wonder how other developers deal with null all the time.
12:22:31 <Unicorn_Princess> they just formally verify the absence of null with a proof assistance, surely
12:22:37 <Unicorn_Princess> assistant*
12:23:03 <arahael> Quite often they reject such tools. :(
12:23:24 <fendor> exception driven development
12:23:26 <arahael> Because dealing with all the warnings or errors is such a "nuisance".
12:23:31 <arahael> fendor: Literally.
12:23:41 czy joins (~user@180.116.80.17)
12:28:08 × aljazmc_ quits (~aljazmc@user/aljazmc) (Remote host closed the connection)
12:29:29 <kuribas> tomsmeding: well, relatively speaking. I think learning dependent types from scratch is easier than learning haskell with all it ad-hoc extensions...
12:31:55 <tomsmeding> kuribas: perhaps, although the difference is that with haskell there are some intermediate steps, before having learned the entire thing, where you already know enough to do something useful
12:32:07 <tomsmeding> the conceptual leap from zero to dependent types is not to be underestimated
12:32:24 <kuribas> tomsmeding: true, but you could learn idris without the dependently typed part, no?
12:32:27 aljazmc joins (~aljazmc@user/aljazmc)
12:32:33 <tomsmeding> true, but would you be able to do anything useful
12:32:42 <tomsmeding> surely the standard library uses dependency all over the place
12:33:07 <kuribas> yeah, tail is total in idris.
12:33:13 chomwitt joins (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1)
12:33:15 <tomsmeding> at least in haskell you can write a lot of programs in what is essentially Haskell98 if you were so inclined
12:33:21 <kuribas> not sure if you could understand tail "intuitively"...
12:34:15 <tomsmeding> kuribas: is there any rendered stdlib docs for idris?
12:34:54 <tomsmeding> right I found 'tail' in the source tree, it takes an extrinsic non-emptiness proof
12:35:12 <kuribas> tomsmeding: https://idris2docs.sinyax.net/
12:35:18 <tomsmeding> as a beginner to FP you don't want to deal with proofs just yet
12:35:58 <tomsmeding> searching for "tail" gives me the function I want like on the second page -- that search result ranking algorithm could have some work :p
12:36:04 <tomsmeding> but thanks, that's what I was looking for
12:37:18 <kuribas> well, in practice DT aren't that easy ... But neither is advance typescript, or Python...
12:37:33 <tomsmeding> neither is _advanced_ typescript, or python
12:37:40 <kuribas> yeah
12:37:43 <tomsmeding> my point is that there also is _basic_ TS / Py / Hs
12:37:47 <tomsmeding> there is no "basic DT" :p
12:37:53 <tomsmeding> that's why DT is considered difficult, I think
12:38:16 <tomsmeding> the number of typing rules you need to add to STLC is irrelevant to conceptual difficulty of working with the system
12:38:24 <tomsmeding> in practice
12:38:29 <arahael> I think just being different, is bad enough.
12:38:41 <tomsmeding> it is, but it's more than that
12:38:56 danse-nr3 joins (~francesco@151.35.159.184)
12:39:07 <kuribas> tomsmeding: I was considering creating a language with light dependent types. That is without partial evaluation, normalisation, and requiring proofs.
12:39:22 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
12:39:49 <kuribas> tomsmeding: so you can apply functions to types at type level (in phantom types), but not prove correctness.
12:40:11 × cece quits (~Thunderbi@e2e-32-47.ssdcloudindia.net) (Remote host closed the connection)
12:40:24 cece joins (~Thunderbi@e2e-32-47.ssdcloudindia.net)
12:40:54 <tomsmeding> so syntactically, functions are defined at simultaneously the value level and at the type level, but you don't have Pi (i.e. later types in a function signature cannot depend on earlier arguments)?
12:41:09 × AlexZenon quits (~alzenon@178.34.162.116) (Quit: ;-)
12:41:37 <tomsmeding> I'm not sure you can call that "dependent types", more like a strong and possibly convenient type-level computation syntax
12:41:39 <kuribas> my idea was to allow passing type level values to value level, but not the other way.
12:41:46 <tomsmeding> ah
12:41:47 <kuribas> So you cannot depend on a value directly.
12:41:52 <tomsmeding> isn't that already System F
12:41:58 <kuribas> yeah, could be.
12:42:19 <kuribas> But I'd allow global values in the type level.
12:42:27 × AlexNoo quits (~AlexNoo@178.34.162.116) (Quit: Leaving)
12:42:45 <kuribas> As long as they are known at typecheck time.
12:42:53 <tomsmeding> kuribas: https://en.wikipedia.org/wiki/Lambda_cube
12:43:35 × Inst quits (~Inst@120.244.192.250) (Read error: Connection reset by peer)
12:52:46 Inst joins (~Inst@120.244.192.250)
12:54:08 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
12:54:45 Inst_ joins (~Inst@120.244.192.250)
12:56:50 azimut joins (~azimut@gateway/tor-sasl/azimut)
12:57:05 × Inst quits (~Inst@120.244.192.250) (Ping timeout: 246 seconds)
12:57:59 <enoq> jackdk, thanks, great to hear!
13:02:23 × enoq quits (~enoq@2a05:1141:1e6:3b00:c958:a45e:c4e0:3650) (Remote host closed the connection)
13:03:18 × arahael quits (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 260 seconds)
13:03:34 <kuribas> tomsmeding: I think the biggest problem with trying to use idris for practical programming is that is a very rough, not that it has dependent types.
13:04:21 <kuribas> tomsmeding: if tail gives you problems, you can use tail' : List a -> Maybe (List a)
13:04:33 <tomsmeding> ah right
13:04:58 <Inst_> kuribas: this is why, while I'm a noob and in the simple haskell camp much of the time, I still want ergonomic dependent types for its simplifying power
13:05:50 <kuribas> yeah, just try adding type level functionality to servant.
13:05:58 <kuribas> It's very complex.
13:07:05 Inst_ is now known as Inst
13:12:56 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1))
13:13:00 AlexNoo joins (~AlexNoo@178.34.162.116)
13:13:19 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
13:18:02 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
13:19:19 CO2 joins (CO2@gateway/vpn/protonvpn/co2)
13:23:26 × vglfr quits (~vglfr@88.155.140.136) (Ping timeout: 255 seconds)
13:27:38 AlexZenon joins (~alzenon@178.34.162.116)
13:36:54 helge_ joins (~textual@h-158-174-186-9.NA.cust.bahnhof.se)
13:37:01 × CiaoSen quits (~Jura@2a05:5800:2a5:2200:664b:f0ff:fe37:9ef) (Ping timeout: 260 seconds)
13:41:06 <Inst> lol, I'm doing all these Python projects from Al Sweigart's book in Haskell, and it's degenerating into me thinking "hmmm, this UI sucks, or the parser is too lenient, gotta stuff on 40 different Haskelly improvements"
13:44:53 × CO2 quits (CO2@gateway/vpn/protonvpn/co2) (Quit: WeeChat 4.1.0)
13:47:14 <danse-nr3> i think most devs do not realise that functional design is deeply different from object-oriented design
13:47:15 <Unicorn_Princess> like the leaf cannot return to its branch after falling, so can a person not return to python after seeing haskell
13:48:08 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:48:10 <danse-nr3> nor to any other language to that extent. Haskell is a trap for devs!
13:48:28 × ubert quits (~Thunderbi@91.141.40.172.wireless.dyn.drei.com) (Ping timeout: 255 seconds)
13:52:16 <haskellbridge> <m​auke> I'm still fine with Perl 🤷
13:52:37 <haskellbridge> <m​auke> It's just an entirely different way of thinking
13:53:22 × cece quits (~Thunderbi@e2e-32-47.ssdcloudindia.net) (Quit: cece)
13:53:26 <haskellbridge> <m​auke> But at least I still have all the weird symbols like <$> and %~
13:59:17 ubert joins (~Thunderbi@91.141.40.172.wireless.dyn.drei.com)
14:01:28 vglfr joins (~vglfr@88.155.140.136)
14:03:00 × xff0x quits (~xff0x@ai101218.d.east.v6connect.net) (Ping timeout: 258 seconds)
14:05:03 xff0x joins (~xff0x@178.255.149.135)
14:06:14 × yoyofreeman quits (~yoyofreem@176.97.76.178) (Remote host closed the connection)
14:07:47 <Inst> also, first time i've used IO semigroup instance
14:08:49 <Inst> also a bit tempted to make an IO instance of IsString :)
14:09:22 <geekosaur> IsString instances that can fail are no bueno
14:10:51 <Inst> instance IsString (IO String) where fromString = pure
14:11:01 <Inst> okay, orphan isntance time :)
14:13:32 gehmehgeh joins (~user@user/gehmehgeh)
14:13:37 <int-e> . o O ( Just don't come to use for help when you get lost in the ensuing type errors. )
14:13:48 <int-e> meh, use -> us
14:14:31 × xff0x quits (~xff0x@178.255.149.135) (Ping timeout: 252 seconds)
14:15:12 <Inst> i'm using System.Random, which is why I'm using it
14:15:24 <Inst> unless there's a better way to set up an array of headlines with randoms?
14:16:17 xff0x joins (~xff0x@2405:6580:b080:900:ecc3:b543:f7a2:f485)
14:16:48 <yin> am i the only one who passes an infinite random list around as state?
14:17:02 <yin> and calls it a day?
14:17:03 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds)
14:17:09 <int-e> There are worse things than replicateM 42 (randomRIO (1,23))
14:17:26 <int-e> yin: You're not the only one :)
14:19:04 <yin> initStdGen and randomRs is all i need
14:19:58 <int-e> Of course ideally I don't have random numbers at all :-P
14:20:10 <Unicorn_Princess> hm. what is the _intention_ behind `cabal repl`? note i'm not asking how it works, but how it's intended to be used. like, when should i prefer calling `cabal repl`, and when just `ghci`?
14:20:31 <geekosaur> ghci can't see things in the cabal store
14:20:32 <Unicorn_Princess> (assuming either can technically accomplish the given task)
14:20:43 <geekosaur> (unloess yo uuse --lib, but that causes other problems)
14:20:59 <Unicorn_Princess> cabal store as in hackage?
14:21:07 <Unicorn_Princess> and local equivalents?
14:21:21 <geekosaur> cabal store as in where cabal installs libraries
14:21:56 <int-e> `cabal repl` should also set the right source path if you have several haskell-source-dirs (which is sometimes useful for platform-dependent stuff)
14:21:59 <geekosaur> it does *not* install libraries in an exposed place; that's what cabal v1 got wrong and led to "cabal hell" when more than one version of a library was exposed
14:22:44 <Unicorn_Princess> i'm confused. 'cabal store' sounds uh... "exposed"? if, as you say, `cabal repl` can "see" stuff in it
14:23:19 <geekosaur> cabal repl sees only what is exposed via the cabal file and the resulting build plan, which is consistent
14:23:22 <int-e> "exposed" is a status of packages in ghc's package database... packages that are visible to ghc(i) by default
14:23:57 <geekosaur> (cabal will refuse to solve inconsistent build plans, such as one that simultaneously depends on two different versions of a package)
14:23:59 <int-e> neo-cabal leaves all packages hidden (not exposed).
14:24:47 <Unicorn_Princess> hmmm... thanks, i think things are starting to clear up
14:25:06 <Inst> https://inventwithpython.com/bigbookpython/project11.html
14:25:09 <Inst> here's the original code
14:26:16 <Inst> the headline listing is ugly
14:26:21 <Inst> and global variables can be considered ugly
14:29:02 <int-e> lines 38..55 could be another random.choice()
14:29:03 int-e shrugs
14:29:14 <int-e> I think that's as much as I care.
14:29:23 × helge_ quits (~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: Textual IRC Client: www.textualapp.com)
14:29:25 <Inst> if I'm doing junk isntancing, might as well instance IsString b => Either a b into IsString
14:30:22 <danse-nr3> basically `cabal repl` is the shortcut to import libraries from your cabal project Unicorn_Princess, how else would you do? Run `ghci` and then load individual files?
14:31:43 <danse-nr3> a cabal project can also be in a sandbox and have different visibility from system packages
14:32:12 × santiagopim quits (~user@90.167.66.131) (Remote host closed the connection)
14:33:47 nyc joins (~nyc@user/nyc)
14:34:41 <Unicorn_Princess> ah see, i'm not using it to load a haskell project, but as a shell for ad-hoc scripting, to avoid bash. so i can `ghci -i/path/to/my/helper/library`, or i can `cabal repl` and tell it in the cabal.project file which packages to require and where they are (my current plan, that i'm working on atm). since the latter lets me use any package from the cabal store, which i understand means roughly the same way of getting packages
14:34:41 <Unicorn_Princess> as in a project, and seems hygienic, that's what i'm going with, even if it's a bit more config files littered around
14:35:08 sm joins (~sm@plaintextaccounting/sm)
14:35:24 <nyc> I've been googling a bit. Is there a convenient way to figure out if system data types e.g. Data.Set, Data.Map et al are tripping over degenerate cases & behaviour?
14:37:16 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
14:40:59 <tomsmeding> nyc: what do you mean with "degenerate" here?
14:42:45 <tomsmeding> Inst: what's wrong with wrapping 'pure' around stuff :p
14:43:04 <nyc> tomsmeding: Something like a balanced binary tree ending up leaning pretty close to a linked list or similar.
14:43:15 CO2 joins (~CO2@modemcable048.127-56-74.mc.videotron.ca)
14:43:24 <tomsmeding> nyc: don't the operations have their worst-case complexity indicated?
14:43:28 <tomsmeding> I thought 'containers' was pretty consistent in that
14:43:31 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 264 seconds)
14:43:44 <tomsmeding> in the haddocks
14:43:57 <Unicorn_Princess> i guess there's value i knowing how close to their worst-case your actual data brings them
14:44:10 <Inst> tomsmeding: well, it's a joke, toy project
14:44:17 <tomsmeding> Unicorn_Princess: it's stuff like O(log(n)) for Map.insert
14:44:19 <Inst> I want to abuse the hell out of overloaded strings, I guess
14:44:25 <Inst> I'm thinking about abusing num instances in the future
14:44:25 <tomsmeding> you aren't going to be _better_ than that either
14:44:38 <tomsmeding> @hackage acme-php
14:44:38 <lambdabot> https://hackage.haskell.org/package/acme-php
14:44:49 <Inst> everytime you mention Map, I think HashMap?
14:44:55 <Inst> from unordered-containers?
14:44:59 Maxdamantus joins (~Maxdamant@user/maxdamantus)
14:45:00 <tomsmeding> no, Data.Map
14:45:08 thyriaen joins (~thyriaen@2a01:aea0:dd4:7550:6245:cbff:fe9f:48b1)
14:45:08 <nyc> tomsmeding: Just any sort of visibility into what's happening with the structure. How big it is, how close to the worst case etc. would be good here.
14:45:16 <Inst> I mean that shouldn't HashMap have better complexitiy for insert?
14:45:31 <[Leary]> nyc: There are debugging helpers: https://hackage.haskell.org/package/containers-0.7/docs/Data-Map-Lazy.html#g:30
14:45:45 <tomsmeding> nyc: for Data.Map and Data.Set, the structure is a balanced binary tree -- those things are pretty stable, the worst case is pretty close to the best case
14:45:53 <tomsmeding> Inst: this is a pure language
14:46:11 <tomsmeding> if you have mutation, hash maps can be significantly better than tree maps
14:46:47 <tomsmeding> without mutation, hash maps can still be better but only if comparison is expensive enough that it's worth hashing once and building the tree with that
14:46:53 <nyc> tomsmeding: It could be that repetitive operations and cache and TLB effects are significant.
14:46:59 <tomsmeding> nyc: this is a pure language
14:47:02 <tomsmeding> :p
14:47:05 <tomsmeding> data structures are persistent
14:47:22 <tomsmeding> a hash map is _not_ going to be a long vector with stuff like quadratic indexing
14:47:31 <tomsmeding> then insert would be O(n), to copy the vector
14:47:56 <tomsmeding> Data.HashMap.Strict.insert is O(log n)
14:48:05 <tomsmeding> does that fit your intuitive idea of a hash map?
14:48:17 <Inst> iirc there are some benchmarks that show Data.HashMap.Strict murders Data.Map.Strict...
14:48:26 <tomsmeding> depends on your comparison function
14:48:51 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:48:55 <tomsmeding> and whether you can sensibly hash in the first place, sometimes
14:49:17 <nyc> tomsmeding: Even before purity, just automatic memory management makes visibility into what's happening with the cache and TLB somewhat awkward. I'm all ears for tools to help diagnose where the issues could be, though.
14:49:23 <tomsmeding> unordered-containers can use intmaps internally, so that helps, but still
14:49:28 <Inst> huh
14:49:29 <Inst> https://github.com/haskell-perf/dictionaries
14:49:45 <Inst> IntMap is the big winner, ironically
14:49:48 <tomsmeding> nyc: do you have performance issues that you're investigating?
14:49:54 <tomsmeding> Inst: IntMap can only handle integers as keys
14:50:07 <tomsmeding> if you have a map with integers as keys, obviously the dedicated implementation for integer keys wins :p
14:50:25 <int-e> Int, specifically.
14:50:33 <tomsmeding> right, Int even
14:51:22 <Inst> It's more surprising because IntMap is just a TreeMap / Map with Int keys, no? It's implying that Haskell hashmaps are ridiculously unperformant.
14:51:57 <tomsmeding> isn't IntMap a PATRICIA tree or what was it
14:52:18 <tomsmeding> and isn't HashMap basically IntMap + hashing beforehand
14:52:19 × czy quits (~user@180.116.80.17) (Remote host closed the connection)
14:52:22 <int-e> pretty much (a trie)
14:52:29 <tomsmeding> I can hardly imagine there to be a faster implementation
14:52:35 <int-e> Not sure about HashMap
14:52:50 <tomsmeding> like, if HashMap is faster than that, why is IntMap not HashMap minus the hashing
14:53:31 <dolio> I think they've diverged on the details.
14:53:34 <int-e> There's a chance that flattening the tree a bit (having nodes with a higher branching factor than just 2) would be helpful to reduce cache pressure. Impossible to predict though.
14:53:52 <tomsmeding> for sure. But that would apply to IntMap and HashMap equally
14:54:11 <int-e> Right
14:55:31 <Unicorn_Princess> i find only 3 indirect references to sandboxes on https://cabal.readthedocs.io/ - are they deprecated? (i have no idea what they are)
14:56:01 <dolio> Yes.
14:56:11 <Unicorn_Princess> so i can safely ignore them, great, thanks
14:56:52 <danse-nr3> i think they are deprecated because cabal v2 always sandboxes?
14:57:11 tzh joins (~tzh@c-71-193-181-0.hsd1.or.comcast.net)
14:59:25 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
15:00:05 <geekosaur> sandboxes were removed in 3.0. cabal v2 always sandboxes
15:00:56 <dolio> Well, the new way doesn't require that only a single version of each package can be installed in the 'store' at any time. So you don't need sandboxes to have per directory/project stores.
15:01:40 <dolio> Now the store just keeps track of many versions of packages built against many other versions of their dependencies, potentially.
15:02:23 × xff0x quits (~xff0x@2405:6580:b080:900:ecc3:b543:f7a2:f485) (Ping timeout: 246 seconds)
15:03:35 <Inst> hmmm, you know, the entire py program design is stupid
15:03:53 <Inst> i can just get a select function that selects what i need
15:04:37 xff0x joins (~xff0x@ai101218.d.east.v6connect.net)
15:10:44 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:21:07 santiagopim joins (~user@90.167.66.131)
15:25:04 <EvanR> Inst, IntMap is more efficient than Map Int
15:26:44 <Inst> the reason it's an IntMap instead of a Map a is because there's some properties that can only be guaranteed by Int, and thus render the real representation of IntMap as ungeneralizable?
15:27:47 × chomwitt quits (~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
15:27:58 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
15:29:17 emmanuelux joins (~emmanuelu@user/emmanuelux)
15:29:34 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds)
15:30:21 <EvanR> it's two different data structures, and the one IntMap uses can exploit the packing of 64 Bools into an Int for great justice
15:30:38 <EvanR> there are tries for other situations on hackage, like bytestring-trie
15:32:31 azimut joins (~azimut@gateway/tor-sasl/azimut)
15:32:33 gmg joins (~user@user/gehmehgeh)
15:32:37 × danse-nr3 quits (~francesco@151.35.159.184) (Ping timeout: 252 seconds)
15:33:32 × gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 256 seconds)
15:33:47 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
15:34:07 vglfr joins (vglfr@gateway/vpn/protonvpn/vglfr)
15:40:58 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
15:43:40 × thyriaen quits (~thyriaen@2a01:aea0:dd4:7550:6245:cbff:fe9f:48b1) (Remote host closed the connection)
15:44:29 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
15:44:49 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:484c:e1ac:4235:81cd)
15:45:31 danse-nr3 joins (~francesco@151.35.215.38)
15:47:40 waleee joins (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c)
15:48:58 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
15:49:57 × vglfr quits (vglfr@gateway/vpn/protonvpn/vglfr) (Ping timeout: 258 seconds)
15:50:29 vglfr joins (~vglfr@88.155.140.136)
15:55:37 <John_Ivan> is anyone else's "cabal install simplehttp" failing?
15:57:55 <Inst> why is it failing?
15:58:37 <c_wraith> well, there doesn't seem to be a package with that name on hackage
15:58:57 <Inst> if you want the simpleHTTP function, that's in network-conduit
15:59:14 <Inst> http-conduit, excuse me
15:59:24 <c_wraith> but "cabal install" is never the command you want to install libraries
15:59:31 <Inst> would be in Network.HTTP.Conduit, although it's advised that you screw around with Network.HTTP.Simple instead
16:00:05 <c_wraith> In fact, you shouldn't think of installing libraries as a concept at all. Instead you should think of declaring what libraries you need, and letting cabal handle the details.
16:00:14 <John_Ivan> seems http-conduit was the right package. thank you.
16:00:30 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:00:33 <John_Ivan> c_wraith, right. I have a cabal file declaring them.
16:00:37 <John_Ivan> it just wasn't found
16:00:39 <c_wraith> ah, ok.
16:00:51 <John_Ivan> thanks
16:04:54 <Inst> randomRIO btw is actually discouraged at least according to System.Random docs
16:05:44 <Inst> oh ffs, this interface is a pain
16:06:28 <monochrom> It is not too bad. :)
16:07:25 <monochrom> Between having to append the "g" in "x <- uniform (0,1) g" and incurring one more dependency, I choose the former.
16:08:15 × waleee quits (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds)
16:08:59 <int-e> Hmm I don't see any actual reason for this discouragement.
16:09:07 <Inst> iirc, that doesn't actually work
16:09:10 <Inst> https://hackage.haskell.org/package/random-1.2.1.1/docs/System-Random.html#v:uniform
16:09:28 <geekosaur> my recollection is all the things that use a hidden generator in IO are discouraged
16:09:40 <Inst> uniform :: (RandomGen g, Uniform a) => g -> (a, g)
16:09:53 <geekosaur> you should seed and use your own generator instead
16:09:54 <Inst> you mean uniformR, right?
16:09:55 <monochrom> OK uniformRM (0,1) g
16:10:12 <int-e> geekosaur: So "uniformRM (2020, 2100) globalStdGen :: IO Int" is preferred because it mentions globalStdGen explicitly?
16:10:54 <geekosaur> it's better because you're explicit about it, but it's still iirc less performant than using a local Random state monad
16:11:10 <geekosaur> because it's having to indirect through an IORef
16:11:35 <int-e> Sure. I can see that, but when I just want a dozen random numbers I don't care about that.
16:12:12 <Inst> randomRIO is a relatively good interface
16:12:26 <EvanR> I use randomRIO all the time
16:12:29 <int-e> And it's fine to have preferences. But that doesn't make randomRIO a *bad* interface.
16:12:42 <int-e> In my book at elast.
16:13:06 <monochrom> Perhaps I am dense and facetious and don't see the difference, but this is why I put "randomRIO is discouraged" and "cabal install --lib is discouraged" in the same bin, along with all of "best practices" and "code smells", the lot of them.
16:13:20 <c_wraith> I do think it's weird that the new System.Random.Stateful interface uses *both* polymorphism over a monadic interface and passing some kind of gen value.
16:13:36 <monochrom> I am an extreme it-depends-ist. :)
16:13:51 <Unicorn_Princess> fence-sitter!
16:14:07 <int-e> monochrom: I can think of circumstances where I'm on board with that point of view.
16:14:10 int-e runs
16:14:36 <c_wraith> Like... Why are you polytypic over the monad type *and* passing some kind of generator token? Is this solely to handle some kind of nested use case?
16:14:45 <Unicorn_Princess> i prefer extremist dogmatism. hence haskell >_>
16:14:48 <monochrom> I can admit that in reality I only choose "--lib" 10% of the time and be careful about it, etc. But it is not going to be 0.
16:15:03 Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
16:16:10 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
16:16:53 <segfaultfizzbuzz> can i get some color on the phenomenon of what it means to read a paper? for example i came across this paper from the internets today: https://www.cs.ox.ac.uk/people/daniel.james/iso/iso.pdf
16:17:11 _xor5 joins (~xor@72.49.199.93)
16:17:11 <monochrom> Yes the interface is weird. It is an attempt at unifying IO (which needs you to say g) and State (which doesn't). So insist on saying g, but make it a phatom unit type for State.
16:17:39 <monochrom> Some years ago, I disliked it. Now, I tolerate it.
16:18:01 <c_wraith> Honestly, 10% sounds *really high* for --lib
16:18:08 × _xor5 quits (~xor@72.49.199.93) (Read error: Connection reset by peer)
16:18:11 <dolio> Yeah.
16:18:21 <monochrom> That's my use case.
16:18:30 <danse-nr3> here is my color segfaultfizzbuzz ... i will add it to the pile of stuff to study that monotonically increases. Stressed dev's color
16:18:48 <monochrom> I am not a dev. I am a teacher and a self-learn student and a hobbyist.
16:18:50 × _xor quits (~xor@72.49.199.93) (Ping timeout: 255 seconds)
16:18:54 <segfaultfizzbuzz> my questions are what it would mean to have "read" the paper
16:19:10 <[exa]> segfaultfizzbuzz: you may or may not understand what the author wanted to convey
16:19:49 <segfaultfizzbuzz> quite often the general topic area is interesting but the actual content tends to be too detailed
16:19:55 _xor joins (~xor@72.49.199.93)
16:20:06 <segfaultfizzbuzz> do you retain the detailed content of the paper when you read?
16:20:19 <[exa]> not really
16:20:44 <c_wraith> monochrom: but what are you doing where cabal repl or cabal run with appropriate -b arguments doesn't work?
16:21:01 <monochrom> Does it matter?
16:21:01 <segfaultfizzbuzz> for example, we might ask for this paper, do you remember the next day, a week later, a year later the definition of a "representable set-valued functor" from (19) ?
16:21:13 <danse-nr3> papers come from a scientifical background. Science is heavily siloed. They tend to be meaningful for who is advanced in an area
16:21:24 <c_wraith> In the sense that cabal should be fixed to handle those use cases, yes
16:21:29 <[exa]> segfaultfizzbuzz: for most papers I get some intuition about the result, some tech about how they did the proof or so, maybe some extras (like stupid jokes, if present) but that's it. The rest is for machines
16:22:02 <segfaultfizzbuzz> by machines you mean people implementing the paper...?
16:22:27 <[exa]> ah yes and then the poor people who decide to implement the thing. :D
16:22:27 × _xor quits (~xor@72.49.199.93) (Read error: Connection reset by peer)
16:22:31 <ncf> segfaultfizzbuzz: you eventually remember it after having seen it enough times (representable functors are very important in category theory, so they come up often)
16:22:37 <segfaultfizzbuzz> i feel like if i was to actually attempt to read and understand every line of this paper might might take several months
16:22:37 <[exa]> but there you usually go with the paper in hand for the reference
16:22:45 <John_Ivan> Hmm. I seem to get the following linking errors after pulling in http-conduit and bytestring. I guess there's nothing that can be done? https://i.imgur.com/zdPV9RP.png
16:22:51 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
16:22:58 <[exa]> segfaultfizzbuzz: yeah that may be the case sometimes
16:23:14 vglfr joins (~vglfr@138.199.53.249)
16:23:15 <John_Ivan> seems like some dependency of those 2, deep down, is failing.
16:23:17 <segfaultfizzbuzz> i do like the general idea of emphasizing type isomorphism over type equality
16:23:46 <danse-nr3> John_Ivan, try to install the dependencies by themselves for better troubleshooting. Look up the errors
16:24:14 _xor joins (~xor@72.49.199.93)
16:24:15 <dolio> Representable set-valued functors are one of the ways of presenting almost everything in category theory.
16:24:22 <[exa]> segfaultfizzbuzz: esp. for folks new to the topics, interrupting and referring to textbooks or other papers is common. normally if you switch scientific topic it is expected that you'll spend a few months just chewing through papers to catch up on what the stuff is about
16:24:34 <John_Ivan> I will but I suspect I won't have much luck. Better change the network library.
16:24:50 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 258 seconds)
16:25:00 <Inst> okay, idiocy achieved
16:25:02 <Inst> [liamzy@liamachine 11.ClickbaitHeadLineGenerator]$ cabal run ClickbaitGen.hs
16:25:03 <Inst> Without This Robot, Robots Could Kill You This Year
16:25:23 <segfaultfizzbuzz> lol clickbait headline generator? lol lol
16:25:24 <monochrom> I don't like the prospect that nondetermistically something decides to download things. I prefer to deterministically pre-download and I choose when to download.
16:25:37 <EvanR> I can't even click on this clickbait
16:25:41 <dolio> I will say, though, there are a lot of people who say they've "read" a paper, but I'd disagree. :þ
16:25:46 <dolio> Including academics, I think.
16:26:31 <Inst> does Haskell have a chatGPT interface yet?
16:26:41 <monochrom> "cabal freeze" exists but I don't always need a "project".
16:27:02 <segfaultfizzbuzz> Inst: lol lol lol
16:27:14 <[exa]> Inst: c'mon people are still busy scrolling through ghc error messages, we don't need another generator :D
16:27:45 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
16:28:00 <EvanR> chatGPT takes generating ghc error messages to the next level
16:28:08 <Inst> i actually have a big flaw insofar as i think the damn thing is caching and there's insufficient randomness
16:28:08 <Inst> :(
16:28:09 × _xor quits (~xor@72.49.199.93) (Read error: Connection reset by peer)
16:28:28 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
16:28:31 <monochrom> There are other personal preferences such as having a one-shot inclination and despising the fake-project idea of cabal run.
16:28:46 <monochrom> or cabal script
16:28:48 <EvanR> every time you run the program, it reseeds the generator, which can mess up the randomness especially with the StdGen I used a while back
16:29:04 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 256 seconds)
16:29:08 notzmv joins (~zmv@user/notzmv)
16:29:16 <monochrom> There will be no point fixing cabal to suit my use case and preference. It is not the point of cabal.
16:29:32 ChaiTRex joins (~ChaiTRex@user/chaitrex)
16:30:56 <Inst> "Are Millenials Killing the Avocado Industry?"
16:31:36 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
16:31:53 _xor joins (~xor@72.49.199.93)
16:32:08 <segfaultfizzbuzz> lol Inst is a genius... is Inst a bot?
16:32:23 <Inst> I'll show code in a bit
16:32:49 <Inst> it's a port of this: https://inventwithpython.com/bigbookpython/project11.html
16:33:02 <Inst> I still have undefineds somewhere, because I need to clone some of the headline functionality
16:34:12 rgw joins (~R@2605:a601:a0df:5600:15e8:6c08:c6f6:7379)
16:34:51 <monochrom> There is also no point wiping out the name "ghci" from the surface of the Earth.
16:35:06 <segfaultfizzbuzz> Inst: can you guide it to make haskell clickbait?
16:35:55 <EvanR> who is wiping out ghci
16:36:08 <Inst> stack repl and cabal repl -b
16:36:12 <monochrom> Everyone who promotes "always use cabal repl"?
16:36:34 <Inst> it'd be better to upgrade ghci to be more useful, but I somehow get the feeling all the tooling ideas people have will suck up 2-3 years of the entire Haskell community's time
16:37:04 <segfaultfizzbuzz> Make your program COMPOSABLE with these 8 HOT MONAD TUTORIALS
16:37:37 <int-e> segfaultfizzbuzz: Top 10 reasons why you are a terrible person.
16:37:46 <Inst> current version
16:37:47 <Inst> https://paste.tomsmeding.com/U0WIPjDz
16:38:10 <EvanR> upgrade ghci to be even more useful? sounds great
16:38:11 <geekosaur> and it's wrong anyway, "compiling to categories" would be that 😛
16:38:46 <Inst> monochrom: are you part of a edu-haskellers group? Not that I'd be qualified for one, not in the former industry, but it'd be interesting what you folks might want in terms of ecosystem / tooling improvements
16:38:53 <segfaultfizzbuzz> Your girlfriend won't believe you used ALL 80 of these TOP LANGUAGE EXTENSIONS with GHC
16:39:06 <monochrom> I don't think it would be wise to merge ghci and cabal. In Rust, Go, Lean, ... they all keep compiler and lib-chaser separate. There may be a good reason.
16:39:22 <monochrom> No I haven't heard of edu-haskellers.
16:39:24 × juri__ quits (~juri@79.140.115.166) (Ping timeout: 258 seconds)
16:39:46 <EvanR> I feel like many languages have a 20% programming language 80% "tooling" brain burden, and haskell is kind of there. Why do we need more
16:39:58 <monochrom> What improvement? I think the current state is fine.
16:40:11 <Inst> well, it was an indefinite article, but it'd be nice if someone would try to get such a program back up, like, you could try to pick up the folks at Chennai, the folks at UChicago, the folks at Chalmers, Zhongshan, etc...
16:40:52 <sclv> the path forward imho is exposing increasingly more stable ghc-api to the point which people can easily write ghci-like things making use of it
16:41:02 juri_ joins (~juri@84-19-175-187.pool.ovpn.com)
16:41:07 <segfaultfizzbuzz> i asked a language model to do this and it came up with: "Haskell: The Secret Weapon Of The World's Top Tech Companies - And Now It Can Be Yours Too!" lol
16:41:10 <sclv> then we can have a lot of experimentation with augmented super-repls
16:41:11 <Inst> utop clone would be fun :)
16:41:34 <Inst> Meta + Google, who else? :)
16:42:10 CiaoSen joins (~Jura@2a05:5800:2a5:2200:664b:f0ff:fe37:9ef)
16:42:16 <segfaultfizzbuzz> haha, a language model: "Haskell: The language that's so pure, it's practically a religion!"
16:44:50 <Inst> hmmm, see, this is why porting stuff from Py is a bad idea. I'm somehow thinking this clickbait generator could be a library. :(
16:44:58 <monochrom> I feel like it is not funny because I don't know what prompt you entered. For all I know it is just parroting your prompt, so it was you not the computer who came up with that.
16:45:14 <segfaultfizzbuzz> i asked it to make dumb spammy haskell clickbait titles
16:45:30 <segfaultfizzbuzz> i cherrypicked these out of a few dozen
16:45:46 <monochrom> This is also related to how people just ask "I got an error, what should I do?" without thinking even for a second that maybe the source code and the error message cannot be telepathed.
16:46:08 <Inst> I mean I already have virtually an EDSL written up, just need to wrap IO to prevent the instance IsString (IO String) from contaminating everything else
16:46:48 <EvanR> I am anecdotally gathering that many people are aware that haskell is a purely functional programming language, but don't know that pure is specifically referring to purity of functions, and think it might be some kind of superlative with an idiosycratic meaning internal to haskell
16:47:18 <monochrom> A library would not come with a person that knows how to do quality control and cherrypick.
16:48:05 <monochrom> EvanR: Do you know how they interepret "purely"?
16:48:24 <EvanR> "purely" ? no
16:48:43 <monochrom> Perhaps they don't interpret it at all.
16:48:44 <EvanR> oh I said purely
16:48:50 <monochrom> Yeah :)
16:49:14 <EvanR> one possibility is that haskell is just a functional programming language and not so called Multi Paradigm Language like rust calls itself
16:49:38 <segfaultfizzbuzz> rust is purely multi paaradigm
16:49:40 <monochrom> That actually could be right. :)
16:50:02 × danse-nr3 quits (~francesco@151.35.215.38) (Remote host closed the connection)
16:50:12 <EvanR> I'm a hardcore multi-paradigm coder
16:50:20 <EvanR> I only do multi-paradigm
16:52:03 <Inst> tbh the purely functional programming language is deceptive marketing, but it's useful for Haskell; friends who get taught imperative Haskell first lose interest quickly
16:52:37 <monochrom> Well you always play to the tool's strength, and only do that.
16:52:39 Square joins (~Square@user/square)
16:52:41 <EvanR> functions in haskell are literally pure functions, so that's correct marketing
16:52:45 danse-nr3 joins (~francesco@151.35.215.38)
16:53:00 × maxfan8 quits (~max@2a01:4f8:192:5356::2) (Ping timeout: 240 seconds)
16:53:08 <monochrom> I have seen student try to write Python in Haskell style too. I criticiszed that and gave a low mark.
16:53:27 <Inst> awww, that's cute :(
16:54:32 <monochrom> As in: In Haskell you do ADT and pattern matching. So in Python the student used isinstanceof.
16:55:43 <tomsmeding> "OO languages also have ADTs, you use objects and inheritance" seems to be a persistent myth
16:55:52 × Square3 quits (~Square4@user/square) (Ping timeout: 272 seconds)
16:55:58 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
16:56:21 <monochrom> Well, it would be perfect if inheritance was actually used in this case. :)
16:56:52 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
16:56:52 <monochrom> or rather s/used/exploited/
16:56:56 <segfaultfizzbuzz> monochrom: yeah, can you tell that i write rust code? ;-)
16:57:35 <monochrom> If you use isinstanceof everywhere instead of overriding methods in a subclass, you are missing the point of the language.
16:59:04 <tomsmeding> true
16:59:31 <monochrom> The general underlying myth though is "if S1 and S2 both solve problem P, then S1 and S2 are similar, even the same".
16:59:32 <mauke> as Larry Wall once said: "Q. Why is this so clumsy? A. The trick is to use Perl's strengths rather than its weaknesses."
17:00:12 <monochrom> You can use a class hierarchy to solve a certain problem. You can also use ADT to solve the same problem. They are opposite approaches, literally. That is fine.
17:00:28 <monochrom> And it is actually true of a large class of problems.
17:00:47 <monochrom> But people just leap "same problem therefore same solution".
17:01:24 <monochrom> Just look at how people really want to say "Haskell type classes similar to Java interfaces".
17:01:30 <mauke> extrinsic equality
17:01:52 <monochrom> They address the same problem. But they came from oppposite angles.
17:06:01 × vglfr quits (~vglfr@138.199.53.249) (Ping timeout: 255 seconds)
17:07:23 vglfr joins (~vglfr@88.155.140.136)
17:08:33 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
17:10:06 <elevenkb> monochrom: Please explicate the way in which objects + inheritance and ADTs are opposite approaches... e.g. if there's a cool categorical duality there I'd love to know about it.
17:11:52 <tomsmeding> elevenkb: look up "the expression problem"
17:12:13 <monochrom> ADTs are closed, class hierarchies are open. ADTs are initial algebras, objects are final coalgebras.
17:12:25 <tomsmeding> (yes, despite the generic-sounding name, that will get you hits)
17:13:25 <EvanR> the expression problem needs a better name
17:13:27 <elevenkb> tomsmeding: doh! i'd heard of that name... thanks for reminding me about it.
17:13:38 <EvanR> I can think of many problems involving expressions
17:13:58 <danse-nr3> i agree
17:14:00 <tomsmeding> and also of many _other_ problems involving expression
17:14:10 <monochrom> I'm sure the expression problem covers them all. :)
17:14:11 <elevenkb> monochrom: doesn't laziness mean that Haskell's ADTs are better thought of as final coalgebras though?
17:14:15 <tomsmeding> (two levels of ambiguity there)
17:14:50 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
17:14:59 <EvanR> was the expression problem born from the late 80s OOP era because that would explain it
17:15:06 <EvanR> early 90s
17:15:15 <monochrom> Only if one can also justify that eagerness implies that objects are better thought of as initial algebras. >:D
17:16:11 <ncf> isn't Hask algebraically compact or something
17:16:29 <ncf> meaning initial algebras and final coalgebras coincide
17:17:19 <danse-nr3> something
17:17:51 <ncf> (by Hask i mean... idk, ωCpo?)
17:18:50 <ncf> seems like it
17:19:40 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 248 seconds)
17:19:41 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
17:20:33 sm joins (~sm@plaintextaccounting/sm)
17:21:09 <danse-nr3> sorry, the other day someone in #math said that category theory was the "trust me bro" of maths, i just wanted to follow the style :P
17:23:58 <Rembane> danse-nr3: You need the proper t-shirt for that to hold. :)
17:31:19 <dolio> Laziness doesn't really have anything to do with it.
17:31:25 <dolio> General recursion does.
17:33:01 <Unicorn_Princess> i made a local .tar.gz repository as per https://cabal.readthedocs.io/en/stable/config.html#local-no-index-repositories , but then i had trouble getting the cabal repl to load my package in that repository ("cannot satisfy package" and zero extra info, even with -v). then i tried to see if a normal project could load my local package, and indeed it could. then i tried it in the repl again, and this time it worked. i suspect
17:33:01 <Unicorn_Princess> there was maybe an implicitly called `cabal update` or something similar that i happened to run that made it work?
17:33:37 <elevenkb> discussion is reminding me of this paper: https://link.springer.com/content/pdf/10.1007/978-3-030-17184-1_5.pdf
17:36:45 × fweht quits (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity)
17:38:52 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:40:09 <Unicorn_Princess> i'm barely on page 2 and i'm already dizzy. how many degrees in what would i need to grok that?
17:41:21 × danse-nr3 quits (~francesco@151.35.215.38) (Remote host closed the connection)
17:41:24 × rosco quits (~rosco@yp-150-69.tm.net.my) (Quit: Lost terminal)
17:41:36 mmhat joins (~mmh@p200300f1c71907a1ee086bfffe095315.dip0.t-ipconnect.de)
17:41:45 danse-nr3 joins (~francesco@151.35.215.38)
17:43:56 <ncf> degrees do not confere understanding
17:44:14 <ncf> oops that's not a word
17:44:22 <geekosaur> "confer"
17:44:26 <ncf> thanks
17:44:29 <tomsmeding> degrees do sometimes give requisite background knowledge
17:44:42 <Rembane> Maybe the paper isn't very good at explaining the thing they want to explain.
17:44:45 Rembane hasn't opened it yet
17:45:01 Rembane has prejudices about papers
17:45:28 <tomsmeding> the introduction is a bit lofty and pulls together a number of related topics in mathematics, in order (I guess) to give a variety of readers a tidbit that they can relate to
17:45:44 <Unicorn_Princess> ah yes. #relatable
17:46:05 <tomsmeding> but because their selection of topics is biased to the abstract side, more... pedestrian programmers have trouble getting wtf is going on :)
17:46:18 <EvanR> I find it hard to follow and I think I get codata already xD
17:46:49 <tomsmeding> I did a very small amount of playing around with codata in agda and after a bit of tinkering it seemed understandable enough
17:46:56 <tomsmeding> I have no idea what they are on about with polarity
17:47:25 <tomsmeding> funny that SPJ is an author
17:47:37 <tomsmeding> I feel like he wouldn't have approved of that introduction, but maybe I'm wrong :p
17:48:22 wootehfoot joins (~wootehfoo@user/wootehfoot)
17:48:36 <tomsmeding> ooh there's fraktur (pdf page 20)
17:48:37 <Rembane> Maybe it was the mirror dimension SPJ that OKed it? coSPJ perhaps?
17:48:43 <tomsmeding> then it's surely a good paper
17:48:48 <tomsmeding> lol
17:49:16 <Rembane> Pretty!
17:49:23 <tomsmeding> ah they implemented stuff in a ghc fork
17:49:30 <tomsmeding> surely that's where Simon came in
17:49:43 <Unicorn_Princess> you know you're in scary territory when greek letters aren't arcane enough to convey meaning
17:51:46 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
17:52:19 <dolio> The introduction is kind of funny, because mathematicians say that computer scientists have a much better handle on codata, because it gets ignored in algebra and such.
17:52:30 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
17:53:59 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Client Quit)
17:54:32 <elevenkb> sorry to disrupt the discussion on the paper: is it on topic to ask for career advice in the Haskell industry here?
17:55:18 <ncf> i'm not sure the "church encodings are codata" bit makes sense to me
17:55:37 × mmhat quits (~mmh@p200300f1c71907a1ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 4.1.0)
17:55:54 <dolio> Yeah. I mean, if they are, it's kind of trivial because it isn't a recursive definition.
17:56:02 <ncf> ye
17:56:11 <geekosaur> elevenkb, it's on topic but I'm not sure how much help you'll get here. I'd try Reddit or the Discourse
17:56:26 <monochrom> Unicorn_Princess: My config has "repository my-local-repository\n url: file+noindex:///home/trebla/.cabal/my-local-repository". Then under /home/trebla/.cabal/my-local-repository/ I have my tarball.
17:56:34 <elevenkb> geekosaur: thanks.
17:57:18 <monochrom> I bet the directory can be anywhere (not necessarily under .cabal) as long as you have absolute paths.
17:59:02 <Unicorn_Princess> monochrom, pretty much equivalent here. as said, it -does- work, but at first it didn't. i suspect there was something similar to `cabal update` that made it work. that, or gnomes
17:59:04 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
17:59:05 qqq joins (~qqq@92.43.167.61)
18:00:27 <Inst> this is... insane
18:00:35 <tomsmeding> yes
18:00:45 <monochrom> Yeah I think a one-time "cabal update" is required.
18:00:52 <Inst> https://paste.tomsmeding.com/5dZqcv8r
18:03:33 <EvanR> what
18:03:44 <EvanR> why doesn't that have a function type
18:04:08 <EvanR> oh, it's an as pattern
18:04:12 <geekosaur> yeh
18:04:16 <geekosaur> looks weird to me
18:04:40 <monochrom> Oh, I see why it's insane. Turn on OverloadedList and then list patterns are OK for Vector...
18:05:12 <Inst> no, I mean, I never knew this would work
18:05:34 <monochrom> Well, I guess we are all saying none of us knew. :)
18:05:54 <EvanR> p@(x,y) = (y + 1, 9)
18:06:25 <monochrom> Who needs PatternSynonyms when we can have OverloadedAnythingThatHasPatterns instead.
18:06:50 <Inst> this is ironically way too close to OOP, no?
18:06:57 <EvanR> OverloadedOverloading
18:07:07 <Rembane> OverloadedAllTheThings!
18:07:11 <tomsmeding> Inst: it's not OOP as long as there are no methods and no inheritance
18:07:16 <monochrom> I don't know. OOP does not have a monopoly on overloading though.
18:07:33 <monochrom> Likewise FP does not have a monopoly on ADTs.
18:07:43 <tomsmeding> Overly Overloaded Programming
18:08:23 <monochrom> correlation vs causation, as usual
18:08:30 <EvanR> Inst, a similar "trick" to define a large record in terms of it's own fields is to do let self = MkRecord formula formula formula formula ... in, in each formula you can access self
18:08:43 <EvanR> its own fields*
18:08:46 <EvanR> itself
18:09:11 <EvanR> it's dangerously close to OOP
18:09:44 <tomsmeding> OOP without mutable fields?
18:09:55 <EvanR> well that was featured in Theory of Objects
18:09:58 <tomsmeding> bundle an IORef in there for state, _then_ you have OOP
18:10:04 <EvanR> objects which return an updated version of itself
18:10:10 <monochrom> Not very usable but it's legal. :)
18:10:36 <EvanR> you can encode a state machine for example
18:12:56 <EvanR> even if self is not recursively creating new versions of itself, maybe it saves spaces defining terms because you don't need an additional where clause
18:14:06 <Inst> https://github.com/liamzee/big-book-of-small-haskell-projects/blob/master/11.ClickbaitHeadLineGenerator/ClickbaitGen.hs
18:15:38 <EvanR> you could save a line and some space by using mapM_ instead of traverse_ there
18:16:02 <Inst> i just like traverse okay ;_;
18:16:30 <Inst> the only real need is to get rid of IO String :(
18:16:36 <EvanR> you're using OverloadedStrings but then everything is just String
18:17:19 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
18:17:21 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:484c:e1ac:4235:81cd) (Remote host closed the connection)
18:17:37 maxfan8 joins (~max@2a01:4f8:192:5356::2)
18:17:46 <EvanR> you're using IO to get randomness, which is probably the easiest way unless you want to totally restructure the program
18:18:32 Pickchea joins (~private@user/pickchea)
18:18:50 <Inst> the problem is the semigroup used to get the string prototypes
18:18:51 <EvanR> *oops, you're using OverloadedStrings so you can use string literals as IO actions without putting `pure'
18:18:55 <EvanR> bad, gross
18:19:19 <danse-nr3> elevenkb, there is no industry, there is no career, look for a different language :P
18:19:46 <elevenkb> danse-nr3: sad! that's what i get for "avoiding popularity at all costs."
18:19:53 <elevenkb> there's always clojure tbqh.
18:19:57 <elevenkb> also looking at rust.
18:20:16 <Inst> Serokell is hiring, but they probably want senior engineers, from what I undesrtand from Clojure-land, it's all senior engineer positions
18:20:23 <Inst> Serokell is a Haskell firm
18:20:33 <Inst> Mercury hires juniors, but they prefer to hire non-Haskellers afaik
18:20:40 <Inst> and train them
18:20:43 <[exa]> Inst: why vectors there when you're only picking out a single item on each run?
18:20:56 <Inst> I am? :(
18:21:09 <[exa]> (as far as I understood it)
18:21:13 <elevenkb> if I could finish the last year of undergrad (which in my country is a separate degree with separate funding).... then maybe Standard Chartered would hire me.
18:21:17 <[exa]> (maybe I'm reading it wrong)
18:21:19 ChaiTRex joins (~ChaiTRex@user/chaitrex)
18:21:27 <elevenkb> i have a math + physics degree but only did 3/4 years of each.
18:21:32 <Inst> there's a replicateM_ somewhere
18:21:46 <Inst> on the inputLoop
18:22:02 <monochrom> I am doubtful (without checking, heh) that Rust has more jobs than Haskell.
18:22:12 <elevenkb> Inst: thanks for the pointers.
18:22:26 <EvanR> even if you select 10 things from the vectors each run, the vectors probably aren't helping over list
18:22:39 <EvanR> with the size of those lists
18:22:58 <monochrom> Oh! Is this NeoHaskell? :)
18:23:02 <Inst> Rust should, afaik, it's picked up, lots of mainstream companies want Rustacaeans
18:23:06 <EvanR> oof
18:23:29 <monochrom> You know, "use vector instead of []"
18:23:43 <Inst> idgi, I have a V.! somewhere
18:23:59 <Inst> O(n) vs O(1) even for very small quantities
18:24:06 Chai-T-Rex joins (~ChaiTRex@user/chaitrex)
18:24:17 <Inst> you can, in theory, ask for 10k clickbait titles
18:24:18 <EvanR> uh
18:24:48 <Unicorn_Princess> O(sqrt n), due to speed of light and planar memory architecture
18:25:07 <monochrom> "we don't talk about that" :)
18:25:15 <EvanR> depends on how small the speed of light is
18:25:20 <EvanR> is it very small
18:25:27 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
18:25:36 <monochrom> Large enough so that:
18:25:42 <monochrom> @quote monochrom einstein
18:25:42 <lambdabot> monochrom says: einstein's theory implies that haskell cannot be faster than c
18:27:16 <Inst> so, wait, should I be using list instead of vector at this scale?
18:27:23 <Inst> because the O(n) operations will add up eventually
18:27:43 <Inst> then again, it's probably the randomness interface that's really causing the problem
18:27:53 <monochrom> To be honest, I haven't checked carefully enough to say. Was just tangentials.
18:28:18 <EvanR> looking up words from a list of 10 words probably isn't the bottleneck
18:28:22 <monochrom> However, in general, there is >70% chance the beginner makes the wrong choice.
18:29:06 <Inst> it's the print to screen that's the problem, nad for this to be actually useful, you'd want it to print to disk
18:29:48 <Inst> tbh, I should just convert everything to Text instead
18:30:14 <EvanR> before optimizing I would go over it with a style, understandability, idiomaticness pass
18:30:32 <EvanR> like IsString to do pure "foo" is silly
18:31:34 <EvanR> esp if it's "a book" that people will look at and try to convince me haskell sucks later because of xD
18:31:53 <Inst> well, it's just an adaptation of someone else's book
18:32:19 <Inst> what is really wrong with IsString, other than it's in IO?
18:32:21 <EvanR> accomplishing the same goal as the other book is one thing, doing it in a weird way without a disclaimer is another
18:32:26 <Inst> I mean, I was more thinking about wrapping IO in something else
18:32:42 <EvanR> IO goes at the outside the program not the deepest level
18:33:18 <Inst> I'm familiar with the general "Imperative Shell, Functional Core" model
18:33:42 <Inst> Let me go unhide my ... ummm, code of highly inferior quality, that is unreadable because of inept performance optimization
18:34:29 <EvanR> yeah "it has to be this way because performance" might be valid at some point but not this point
18:35:10 <Inst> https://github.com/liamzee/ThatsTornIt
18:35:23 <Inst> sloc 1750 lines, parallelized, albeit not well :(
18:35:37 <Inst> takes 4 hours, or is it 20, to run?
18:36:04 <Inst> if you're talking about a purity issue:
18:36:04 <Inst> https://github.com/liamzee/ThatsTornIt/blob/master/app/Main.hs
18:36:08 <Inst> that is all the IO it does
18:36:52 <Inst> so it should be like, what, 99% out of IO?
18:37:50 <[exa]> let's make a specialized monad for this problem!
18:37:54 <EvanR> on the multiple nested wheres full of functions, be on the look out for inner functions which don't close over anything and might be genuinely useful and so pulled out to the top level
18:38:16 <[exa]> (spoiler: only needs a specialized monoid)
18:39:12 <Inst> EvanR: that old project was where I developed the where abuse habit
18:39:34 <Unicorn_Princess> i've narrowed it down. to make a local package (as in https://cabal.readthedocs.io/en/stable/config.html#local-no-index-repositories) usable by `cabal repl`, one must 1) place the .tar.gz package into the repository, and 2) `cabal build` a project that depends on this package. what is it that `cabal build` does that makes packages usable from the repl?
18:39:39 <Inst> because I was chasing performance, and I built all the closures to avoid having to pass data via functions
18:40:22 <EvanR> if it doesn't close over anything it's likely you didn't build a closure at all
18:40:37 <EvanR> probably gets lifted out by ghc for you
18:40:47 <Inst> are we talking about ThatsTornIt or my current toy?
18:40:53 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:41:21 <Unicorn_Princess> (`cabal update` didn't help)
18:41:35 <EvanR> I saw 100 multi-nested wheres and then recalled your 2D maze runner
18:43:08 travgm joins (~travgm@2600:100e:a121:4094:f9fb:7cac:5660:4910)
18:43:09 × travgm quits (~travgm@2600:100e:a121:4094:f9fb:7cac:5660:4910) (Changing host)
18:43:09 travgm joins (~travgm@fsf/member/travgm)
18:43:24 <monochrom> Unicorn_Princess: Interesting. You're right. Darn.
18:43:47 <Inst> in the 2D maze runner, the closures are more used as a means of code organization
18:43:50 <Inst> i.e, "poor man's object"
18:44:19 <haskellbridge> <s​m> beware.. such things can make debugging hard
18:44:35 <Inst> the structure was, more, it takes 400 ms on an old Xeon workstation processor (v5 1505) to process the single data, but when it's computing splits in Blackjack
18:44:46 <EvanR> by default you should put such functions at the top level so at least you can test them in ghci
18:44:47 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:484c:e1ac:4235:81cd)
18:45:39 <Inst> yeah that was why I was looking for wherez (TH to drag out where clauses and convert terms there into arguments) for this kind of testing use, except that reify is still broken :(
18:46:01 <Inst> it takes about 25 ms per evaluation within the closure, though
18:47:00 <Inst> welp, that doesn't make sense, iirc, it should be evaluating about 100m base conditions, and the TTI is horrible code, as in, it takes up around 48 gb of ram to run :(
18:47:38 <EvanR> I wouldn't jump to conclusions about whether passing values normally or through a closure is faster. Unless you're using the closure as a sort of cache
18:47:51 <Inst> as a sort of cache?
18:48:15 <EvanR> saving an evaluated value to be used many times
18:49:12 <Inst> yup :)
18:49:28 <monochrom> Unicorn_Princess: Err no, -b works. I wonder if you just had a syntax error (I did). -bfoo-0.1 would be wrong syntax, -b'foo>=0.1' (for example) would be right.
18:49:46 <Inst> hmmm, easy way to fix the Maze is just to drag out State Stdgen, no?
18:50:28 <Unicorn_Princess> -b? -b where, to what? also no syntax error - i repeated the exact same text line in the repl to load it, by going back in history with up-arrow
18:51:12 <Unicorn_Princess> ah, `cabal repl -b'thenewpackage'`?
18:51:19 <monochrom> cabal repl -b'foo >= 0.1'
18:51:29 × AlexZenon quits (~alzenon@178.34.162.116) (Ping timeout: 255 seconds)
18:51:42 <Unicorn_Princess> yeah i did it via `:set -package foo` once inside the repl
18:51:54 <EvanR> Inst, what is wrong with the maze and why is StdGen involved
18:53:27 <monochrom> Oh derp! I just realized that I forgot the meaning of PVP. I had a version number 0.5.1 but it should be 0.5.0.1. :)
18:53:53 <Unicorn_Princess> so what does -b do? `cabal help b` says unrecognized command
18:54:13 <geekosaur> -b is not a command, it's an option. short for --build-depends
18:54:23 <monochrom> cabal repl --help
18:54:40 <Inst> erm, not Maze
18:54:46 <Inst> the Clickbait gen
18:55:02 <geekosaur> also yes, you can defeat sandboxing with -package. you get to keep alll the pieces if this gets you a diamond dependency or etc,
18:55:30 <EvanR> yeah the maze and the clickbait as it stands can probably be greatly deflated
18:55:30 <Unicorn_Princess> ah i see. the .tar.gz files in the repository contain only source
18:55:51 <geekosaur> ideally cabal will build it for you if you have the build depends right
18:55:53 <Inst> why do you think clickbait can be deflated?
18:55:57 <Inst> I already tried cleaning it up a few times
18:55:58 <Inst> :(
18:56:26 <Unicorn_Princess> geekosaur, also what do you mean 'yes'? are you under the illusion i knew what i was doing when i did :set -package foo?
18:56:34 <rgw> i'm curious, how did people in here get started with haskell?
18:57:12 <danse-nr3> rgw, how did you?
18:57:21 <monochrom> I was on comp.lang.functional and kept hearing about Haskell.
18:57:30 <rgw> programming in haskell by hutton (2nd ed)
18:57:31 <geekosaur> rgw, the Gentle Introduction back in late 2006
18:57:33 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:57:47 <geekosaur> after hearing about it as staff at Carnegie Mellon
18:57:53 <rgw> saw the youtube lessons first, went to the book halfway through
18:57:53 <monochrom> I liked SML so I went to comp.lang.functional
18:57:55 <geekosaur> then got sucked in by xmonad 🙂
18:58:11 AlexZenon joins (~alzenon@178.34.162.116)
18:58:15 <monochrom> I heard of SML from the theorem prover HOL4.
18:58:20 <danse-nr3> "the book"? Haskell has a bible now
18:58:31 <rgw> read through the latter parts of learn you a haskell
18:58:41 <monochrom> I needed HOL4 because I was doing formal methods, albeit for imperative programming.
18:59:12 <monochrom> But I liked Lisp a bit too, even before that.
18:59:33 <monochrom> Scheme is objectively better but I hadn't heard of it back then.
19:00:00 <yushyin> rgw: script from classes at university
19:00:04 <rgw> danse-nr3, i meant the book by hutton, he has a class on youtube as weell
19:00:11 <rgw> the book is more indepth
19:00:24 <monochrom> I joined formal methods because I was tired of off-by-1 errors etc.
19:00:38 <danse-nr3> i see thanks for the explanation
19:00:59 <rgw> i think it has its problems, but it was a nice introduction
19:01:31 <monochrom> Oh! You mean the first tutorials. OK Gentle for me too.
19:01:56 <rgw> did you just jump into programming with it right after?
19:02:24 <monochrom> No.
19:02:41 <monochrom> But I never jumped into programming right after, for any language.
19:02:54 <monochrom> Unless "20 lines" counts.
19:03:11 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
19:03:23 <monochrom> Not for BASIC. Not for C. Not for Pascal. Not for Perl.
19:03:24 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:484c:e1ac:4235:81cd) (Read error: Connection reset by peer)
19:03:36 <rgw> so what then?
19:03:56 <monochrom> Incubating myself until I can write real code?
19:04:15 <rgw> well, i mean what does that look like?
19:04:55 <monochrom> https://norvig.com/21-days.html
19:05:49 <monochrom> It looks like I can build small things but not quite big things.
19:05:56 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
19:05:59 <geekosaur> I jumped straight into C and Perl, went more slowly into other languages
19:06:02 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds)
19:06:04 <monochrom> But it grows every day. (Or I grow every day.)
19:06:11 × yaroot quits (~yaroot@p3477236-ipngn9802souka.saitama.ocn.ne.jp) (Read error: Connection reset by peer)
19:06:30 <rgw> well, i think haskell is different in that way
19:06:31 × dcoutts_ quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection)
19:06:35 <danse-nr3> makes sense for a single author to build small things. Teams build big things
19:06:35 yaroot joins (~yaroot@2400:4052:ac0:d900:1cf4:2aff:fe51:c04c)
19:06:38 <monochrom> I simply don't feel the rush to "I need to write 3kloc now. If I can't it's the fault of the tutorial."
19:06:41 <rgw> i don't think many people are 'forced' to learn haskell to use it *now*
19:06:48 <Inst> hmmm, this actually isn't so bad
19:06:52 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
19:06:52 dcoutts_ joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
19:07:10 azimut joins (~azimut@gateway/tor-sasl/azimut)
19:07:57 <Inst> i can relatively easily refactor all my code to use a state generator inside the state monadic type instead of using IO
19:07:58 <rgw> (also why i think javascript gets a really bad rep)
19:08:01 <Inst> \o/
19:08:04 <danse-nr3> when newcomers gets into an haskell projects, they might feel 'forced' to learn a lot *now*
19:08:51 <Unicorn_Princess> apologies for the wall of text. correct me if i'm wrong: because the .tar.gz repo contains only source, before the packages in it can be used they must be built. if a cabal package depends on them (as in lists them in its build-depends), it'll build them during its `cabal build` step, using whatever versions of transitive dependencies that work. to load those packages in the repl requires that they had already been built. so
19:08:51 <Unicorn_Princess> `:set -package mylocalpackage` in the repl tries to load built artefacts, and this only works if, by pure chance, those artifacts are compatible with whatever else the current repl is using. on the other hand, `cabal repl --build-depends'mylocalpackage'` will actually run cabal's resolver and build it if possible. so one must always use this method to guarantee the package can be used. did I get that right?
19:09:21 <monochrom> ghci ≠ cabal
19:09:47 <monochrom> :set belongs to ghci. It doesn't chase dependencies or auto-build.
19:10:18 <Unicorn_Princess> yes. i meant :set inside the ghci repl, launched via `cabal repl`
19:10:33 <monochrom> cabal repl is the one who makes sure the libraries are built, then ghci can just load them.
19:10:34 waleee joins (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c)
19:11:12 <EvanR> rgw, it's basically somewhat crippled and bizarrely behaving-at-times scheme with C syntax, what's not to like
19:11:20 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:11:39 <monochrom> But with cabal repl -b, you won't need :set -package
19:12:04 <EvanR> oh, without proper tail recursion
19:12:07 <monochrom> or rather, cabal repl -b already does that for you when it hands over to ghci
19:12:37 <Unicorn_Princess> it gives all the dependencies listed in -b over to ghci to include, right
19:12:51 <Unicorn_Princess> i.e. it doesn't just build them
19:13:34 <rgw> EvanR, that's what i mean, people see the c syntax and immediately assume they know what they're dealing with, instead of treating it like a new language
19:14:01 <monochrom> Add -v to see how many kloc of "-package foo" cabal repl gives to ghci :)
19:14:07 <rgw> i find having certain expectations can really ruin anything
19:14:32 <EvanR> a lot is said about the experience of complete noobs when trying to use technology X
19:14:46 × danse-nr3 quits (~francesco@151.35.215.38) (Ping timeout: 260 seconds)
19:15:02 <EvanR> if most of your user base in complete noobs I guess that makes sense, but then there are other problems
19:15:27 <Unicorn_Princess> what's the syntax for -b/--build-depends if I want to give multiple packages? comma-separated? i.e. -b'foo,bar,baz'? and exact same for the --build-depends alias?
19:15:28 <rgw> i don't think anybody treats learning haskell the same as javascript
19:15:31 <monochrom> When I learn, I start with a clean slate. Almost no assumptions. Even could be said I set up a VM in my head.
19:15:39 <EvanR> more should be said about the competent experienced person doing real work experience
19:15:42 <rgw> yeah, i try to do the same
19:15:45 <monochrom> But I'm inhuman. It is not how humans learn.
19:15:51 <monochrom> Well so down with humans.
19:16:10 <rgw> it's just pattern recognition gone wild i think
19:16:23 <monochrom> No.
19:16:34 <monochrom> Humans want to claim credits without doing the work.
19:16:38 <rgw> your brain thinks it's seen it already before, so doesn't want to learn it again
19:16:57 <EvanR> something about how C syntax is required for language success, regardless of semantics. If that's the case, your concerns aren't well founded? xD
19:17:34 <EvanR> somehow "pseudo code" looks nothing like C and is very persistent
19:17:43 <monochrom> So as a special case, it would be really nice if one assumes that the thing to learn is just the same as what they already know, therefore there is nothing new to learn, therefore can claim "I learned this!" without working.
19:18:07 <monochrom> Just look at average programmers' CVs.
19:18:30 <rgw> EvanR, who says C syntax is required for success?
19:18:47 <EvanR> it's a defacto law of programming languages, most corporate languages
19:19:09 <monochrom> Unicorn_Princess: Multiple -b's. :)
19:19:15 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 258 seconds)
19:19:30 <rgw> i thought you were referring to something i said
19:19:33 <EvanR> javascripts syntax was changed at the last minute, as the story goes
19:19:48 <monochrom> Hrm. I think I heard of that...
19:19:57 <Rembane> It was a scheme until then right?
19:20:30 <EvanR> if yes they also must had disabled proper tail recursion at the last minute xD
19:21:25 <monochrom> In general, to gain success in the usual sense, you exploit human flaws to your advantage, and recognize that technical objective merits are irrelevant.
19:21:56 <Rembane> EvanR: I would love JS with TCO.
19:22:35 <EvanR> I think that was one reason I got into haskell, JS couldn't do scheme-like recursion
19:23:00 <EvanR> didn't know how it applies in haskell yet, but I knew "it worked"
19:23:45 <Unicorn_Princess> monochrom, thanks
19:23:49 <rgw> if you're doing frontend things you kinda have to use js
19:24:26 <monochrom> Yeah, I think in the JS case, they had the monopoly in that domain, they could have used any syntax or even semantics they liked.
19:24:32 <EvanR> I would be ok with that, but now there's the latest framework of the week for typescript
19:25:12 <rgw> it all turns into javascript in the end
19:25:13 <monochrom> But the benefit of C syntax is reducing the chance of getting ridiculed as "not real programmers". Just look at Python and PHP.
19:25:13 <EvanR> so people are using whatever framework, and are vaguely aware of typescript, based on javascript
19:25:34 <EvanR> rgw, unless it's webasm
19:25:46 <rgw> yeah, if it ever gets traction
19:26:33 <rgw> and depends on how well chromium/firefox keep up with the implementation
19:26:52 <EvanR> yeah I can't wait to write the frontend in web asm
19:27:02 <EvanR> and the backend in rust
19:27:35 <rgw> i don't know how much i would actually want webasm to be successful
19:27:37 <EvanR> and the graphics in vulkan
19:27:44 <rgw> the average js code is already a mess
19:27:57 <rgw> and the potential exploits
19:28:44 <rgw> i'd honestly love it if pages could just go back to straight html if more functionality is not needed
19:30:50 <darkling> There's utterly ridiculous amounts of reinvention of the wheel going on in that ecosystem.
19:30:54 <Inst> that said EvanR
19:30:55 <Inst> https://github.com/liamzee/big-book-of-small-haskell-projects/blob/master/11.ClickbaitHeadLineGenerator/ClickbaitGen.hs
19:30:59 <Inst> I'm much happier with the IO out
19:31:15 <darkling> So many things that there's an entire pile of JS/TS badly reimplementing basic functionality.
19:32:03 <EvanR> Inst, you seem to want to implement IsString any time you apply a function to a String
19:32:10 <EvanR> instead of just applying a function
19:32:30 <rgw> the whole node ecosystem is ridiculous
19:32:42 <monochrom> Web devs are given quad-head 4K screens, 500TB RAM, 200PB NVMe. They only have to impress their bosses, whose computers are 10x beefier. Do they ever have any incentive to save resources on their designs?
19:33:04 <EvanR> I think the intention for IsString is so you can use string literals for types which are... in some sense a string. Not random number generators or MD5 sums or rot13
19:33:08 <Inst> Because the alternative is more verbose?
19:33:20 <EvanR> wrong place to eliminate the verbosity
19:33:37 <monochrom> Their bosses in turn are detached MBAs. Do they have incentives to care how it is like for the rest of us?
19:33:46 <Inst> the other idea I had was to set it up as Either a Text
19:34:13 <Inst> then have a function convert out the either a Foldable t => t (Either a Text)
19:34:56 <EvanR> you might be in a phase of "haskell has a thing, I should figure out a way to use it"
19:35:20 <EvanR> instead of taking the most direct route to the goal
19:35:45 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:484c:e1ac:4235:81cd)
19:36:01 <Inst> the problem is, when I thought up the py, with uncontrolled effects and dynamic typing, the obvious was to clean it up was to create more data structures for prompts and responses
19:36:17 <Inst> then just index them
19:36:41 <Inst> in the original code, each of the headlines was a function
19:37:36 <EvanR> uncontrolled effects = everything is an IO action. That would be simpler than what you're doing. Dynamic types = the Dynamic type, which would be unidiomatic but would express any given insanely written python. If the python used sane types, then use those types in haskell
19:38:13 <Inst> tbh at the scripting scale I don't really see the problem with "everything in IO"
19:38:27 <EvanR> but a book using haskell for this should probably rethink all of it
19:38:49 × phma quits (phma@2001:5b0:212a:ca38:321f:39d3:cfb3:6c89) (Read error: Connection reset by peer)
19:38:51 <Inst> it's less a book, and more an open project repository for people who want to translate or reimplement the Py versions
19:39:15 <EvanR> ideally less pythonically
19:39:16 × waleee quits (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 260 seconds)
19:39:32 × random-jellyfish quits (~tiber@user/random-jellyfish) (Ping timeout: 255 seconds)
19:39:32 × michalz quits (~michalz@185.246.207.221) (Remote host closed the connection)
19:39:37 <Inst> i think you'd take issue with rampant global variables, right?
19:39:42 phma joins (phma@2001:5b0:210f:1b08:8de9:836f:9645:4508)
19:39:46 <Inst> one thing I kept on thinking of was wrapping the globals as functions
19:40:14 <Inst> on the other hand, that kills the modularity
19:40:30 <monochrom> When in the context of teaching and learning, I take issue with doing things only one way.
19:41:05 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
19:41:10 danza joins (~francesco@151.35.215.38)
19:41:11 <monochrom> Learn doing it with global variables. Learn doing it without global variables. Learn the pros and cons. Now you have a larger toolbox.
19:41:36 <Inst> but what's the alternative to global variables?
19:41:46 <EvanR> I sometimes try to write a haskell program with global variables
19:41:50 <EvanR> it always ends up worse
19:42:04 <monochrom> Local variables. Passing parameters. Hell even objects.
19:42:09 <Inst> instinctively, what I'd want to do is to push the global variables into the closure
19:42:15 <Inst> of the headlines
19:42:31 <ddellacosta> I feel like I use ReaderT as basically a big bag of global variables
19:42:33 <darkling> Objects are just a slightly smaller scope to use global variables in. :)
19:43:36 <darkling> You still get the problems of shared but otherwise uncontrolled variable access between functions.
19:43:44 <monochrom> Recall that the OO people make a big fuss about "oriented" vs "based". You know what, "object-based" fits Haskell surprisingly well.
19:44:28 <monochrom> And OO people who are honest actually now have object-based tendencies instead, e.g., almost flat class hierarchy.
19:44:28 <Inst> readerT, heh
19:44:41 danza_ joins (~francesco@151.37.196.80)
19:44:44 <EvanR> makeObject x y z = self where self = MkObject ... ... ...
19:45:19 <darkling> One of these days, I'm going to learn Smalltalk and find out what proper OO is. :)
19:45:26 <monochrom> :)
19:46:00 <darkling> Although I've done a decent chunk of erlang, so maybe I've already got some of it.
19:46:24 <Inst> yes, because if we're honest about all of it, ADTs are just doubly immutable objects, unless you want them to be singly immutable :)
19:46:38 <darkling> (And my plan for this year's AoC is FORTH-79)
19:46:45 <Inst> well, values of an ADT :)
19:47:09 × danza quits (~francesco@151.35.215.38) (Ping timeout: 245 seconds)
19:48:22 <Inst> tbh immutable probably doesn't even mean anything in a Haskell context, no?
19:49:07 <EvanR> look in the Data.Array docs you'll find two kinds of array, mutable and immutable
19:49:24 <Inst> same with Vector
19:49:57 × Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Quit: Chai-T-Rex)
19:49:59 <Inst> my point is more that immutability is so pervasive in Haskell the concept loses meaning because it lacks an opposite to define itself by
19:50:37 ChaiTRex joins (~ChaiTRex@user/chaitrex)
19:50:54 <Inst> EvanR: but what would you suggest to put ClickbaitGen on a diet?
19:51:13 <Inst> all of the "let's do it right" or "use the correct abstractions" mechanisms bloat the code
19:52:57 <EvanR> use list, use String, use IO, use mapM_, use fmap isntead of <$>, remove the StateT, remove the Arrows, remove the Text,
19:53:06 <EvanR> instead of <&>
19:53:25 <EvanR> just if you want to reduce the size of code
19:53:25 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
19:54:03 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
19:54:15 <Inst> sigh :(
19:54:19 <EvanR> maybe in a separate "vanilla" file
19:54:25 × acidjnk_new quits (~acidjnk@p200300d6e72b9364ac51bf6edb979c24.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
19:55:02 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:55:04 <Inst> I didn't realize that mapM_ was more idiomatic than traverse_
19:55:11 <EvanR> IsString paraphenalia is taking up more space than it is saving, even if it wasn't also questionably using IsString
19:55:20 <Inst> the plus side is that it's exposed on prelude
19:55:23 <EvanR> it's just that mapM_ doesn't require an import
19:55:47 <int-e> mapM_ has also been around for way longer than traverse_
19:55:57 <Inst> it's restricted to monad, but tbh, the concept is nice, apparently in a lot of mainstream languages they don't use a map(f,literal) idiom to trigger effects
19:56:02 <Inst> it's usually literal.map(f)
19:56:46 <Inst> mapM_ is restricted to monad, though
19:56:54 <EvanR> which is where you are using it
19:56:57 <Inst> I got trained to use <> instead of ++
19:57:06 <EvanR> <> also works on list
19:57:11 <EvanR> and is in prelude
19:57:16 <Inst> I know, only case where it doesn't work
19:57:21 <Inst> is when <> has the wrong precedence
19:57:26 <Inst> ++ works well with :
19:57:43 <EvanR> > [1,2,3] <> repeat 4
19:57:44 <Inst> how else would you do the list / vector of headlines?
19:57:45 <lambdabot> [1,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4...
19:57:56 <EvanR> > ([1,2,3] <> repeat 4) <> repeat 5
19:57:57 <lambdabot> [1,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4...
19:58:00 <EvanR> hmm
19:58:03 <Inst> hmmm, you could write it as a list
19:58:07 <Inst> but then again, that's isString abuse
19:58:11 <Inst> write is as a list, fold
19:58:19 <EvanR> make a list of strings
20:01:35 <int-e> . o O ( a tangle )
20:02:37 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
20:03:48 × eL_Bart0 quits (eL_Bart0@dietunichtguten.org) (Ping timeout: 240 seconds)
20:04:03 eL_Bart0 joins (eL_Bart0@dietunichtguten.org)
20:04:21 × dcoutts_ quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 260 seconds)
20:04:48 <Inst> ugh, here's the interesting problem, i have do notation literals
20:04:53 <Inst> ffff, type accounting :(
20:05:03 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
20:05:33 <EvanR> what's a do notation literal
20:06:05 <Inst> i stuffed do notation into a list of strings
20:07:51 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:08:01 <Inst> i literally have if then else in lists in a conway program
20:08:20 <Inst> [ foo | True] <> ... might actually work better there
20:08:20 <EvanR> there is nothing wrong with that
20:08:39 <Inst> the problem is that it screws up the list's typing
20:09:30 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
20:10:35 <Inst> because part of the Vector is in [RndState a], other parts are in... oh wait, sequence :D
20:11:26 × _xor quits (~xor@72.49.199.93) (Read error: Connection reset by peer)
20:11:58 _xor joins (~xor@72.49.199.93)
20:12:09 × danza_ quits (~francesco@151.37.196.80) (Ping timeout: 258 seconds)
20:13:16 <EvanR> list and Vector both can only have 1 element type, uniform throughout, there's no part this part that
20:16:13 <Inst> i know, but i wrote the literals in a certain fashion
20:16:26 <Inst> i also know of others who prefer fold over a list of strings / text
20:21:10 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
20:25:02 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:37:55 <Unicorn_Princess> starting a repl with `cabal repl -bsomepackage` takes a few seconds to resolve dependencies and such. is there a way to speed it up?
20:38:05 yoyofreeman joins (~yoyofreem@176.97.76.178)
20:38:12 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:38:29 <Unicorn_Princess> (even without the -b it's not that fast compared to bare ghci)
20:38:39 <geekosaur> the main slowdown is parsing pkg-config output for use in the solver, there's work going on to cache that instead of redoing it every time
20:39:40 <geekosaur> https://github.com/haskell/cabal/pull/9360
20:39:55 <Unicorn_Princess> and if i didn't need the flexibility? like, compile my own variant of ghci that has the extra modules pre-loaded?
20:40:04 × mrmonday quits (~robert@what.i.hope.is.not.a.tabernaevagant.es) (Quit: .)
20:40:33 <geekosaur> one of us is not talking about the same thing…
20:40:51 <Unicorn_Princess> or both of us ;)
20:41:38 <geekosaur> the solver's still going to run since that's much of the point of cabal. and the solver still needs to know about pkg-config because C package availability and versions can affect solver plans
20:41:52 mrmonday joins (~robert@what.i.hope.is.not.a.tabernaevagant.es)
20:42:03 <geekosaur> building your own ghci will not help with this (and may not help at all since ghci is ghc --interactive)
20:42:09 <Unicorn_Princess> well my goal is to get ghci going with a few extra libraries loaded - libraries i know ahead of time. i could recompile the wholething if the libraries changed
20:42:31 <Unicorn_Princess> s/if/when
20:44:14 <Unicorn_Princess> well, i guess i can live with the slowdown
20:50:04 <Square> is there a way to specify what import should be done when starting a repl using cabal?
20:50:10 <Square> imports*
20:50:33 <Square> ...so you don't have to start every session importing things.
20:51:35 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:52:33 <geekosaur> .ghci file?
20:52:58 <geekosaur> https://downloads.haskell.org/ghc/9.8.1/docs/users_guide/ghci.html#the-ghci-files
20:53:37 <Square> oh nice. thanks
20:55:39 John_Ivan_ joins (~John_Ivan@user/john-ivan/x-1515935)
20:56:29 × CiaoSen quits (~Jura@2a05:5800:2a5:2200:664b:f0ff:fe37:9ef) (Ping timeout: 255 seconds)
20:56:59 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
20:57:20 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
20:58:43 danza_ joins (~francesco@151.37.194.27)
20:58:46 × John_Ivan quits (~John_Ivan@user/john-ivan/x-1515935) (Ping timeout: 252 seconds)
20:59:18 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
20:59:28 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
21:00:46 danse-nr3 joins (~francesco@151.37.194.27)
21:01:04 Guest5 joins (~Guest5@5-157-196-109.itvmedia.pl)
21:03:14 × travgm quits (~travgm@fsf/member/travgm) (Read error: Connection reset by peer)
21:03:20 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds)
21:04:40 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
21:09:10 × Guest5 quits (~Guest5@5-157-196-109.itvmedia.pl) (Quit: Client closed)
21:11:51 × Square quits (~Square@user/square) (Read error: Connection reset by peer)
21:12:29 Square3 joins (~Square4@user/square)
21:12:59 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:15:44 dcoutts_ joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
21:16:22 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
21:18:32 × danse-nr3 quits (~francesco@151.37.194.27) (Ping timeout: 255 seconds)
21:19:25 × fendor quits (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Remote host closed the connection)
21:21:20 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
21:22:18 × danza_ quits (~francesco@151.37.194.27) (Ping timeout: 258 seconds)
21:26:43 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
21:35:40 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:42:20 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
21:42:55 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
21:42:56 Guest74 joins (~Guest75@5-157-196-109.itvmedia.pl)
21:43:42 × vglfr quits (~vglfr@88.155.140.136) (Read error: Connection reset by peer)
21:44:06 <Guest74> hi. is there any way to search the logs (https://ircbrowse.tomsmeding.com/browse/lchaskell) for messages by specific nickname?
21:45:01 krit joins (~krit@072-238-128-073.res.spectrum.com)
21:46:23 <geekosaur> not currently, search functionality is disabled because it requires full-text indexing as currently implemented and nobody has cycles to rewrite it
21:47:12 × krit quits (~krit@072-238-128-073.res.spectrum.com) (Client Quit)
21:50:09 <Guest74> i see, i was just interested in messages by specific user, thanks
21:52:50 suntzu joins (~krit@072-238-128-073.res.spectrum.com)
21:53:17 × suntzu quits (~krit@072-238-128-073.res.spectrum.com) (Client Quit)
21:55:52 emmanuelux joins (~emmanuelu@user/emmanuelux)
22:01:23 × Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Ping timeout: 255 seconds)
22:02:12 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:06:04 × Guest74 quits (~Guest75@5-157-196-109.itvmedia.pl) (Quit: Client closed)
22:06:06 sansk joins (~sansk@072-238-128-073.res.spectrum.com)
22:07:56 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
22:08:03 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
22:08:24 × ubert quits (~Thunderbi@91.141.40.172.wireless.dyn.drei.com) (Ping timeout: 255 seconds)
22:09:38 <sansk> Has anyone here written an interpreter for a programming language in haskell? I am doing that and I'm not quite sure if I am structuring it right
22:11:24 <monochrom> Does Agda count?
22:12:47 <davean> monochrom: no they said programming language
22:13:10 <monochrom> haha ok
22:15:57 Sgeo joins (~Sgeo@user/sgeo)
22:16:54 <sansk> I just wanted to take a look at how you structure everything, right now I have everything in the language in one data type, but I feel like it should be split up
22:19:12 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
22:21:02 <monochrom> Then I guess my course notes count. But it's a very small toy language, so I never needed to split. https://www.cs.utoronto.ca/~trebla/CSCC24-2023-Summer/09-semantics-1.html
22:23:03 <sansk> Thank you!
22:24:03 <sansk> This seems similar to my interpreter, I guess it's kind of like Lisp where everything is an expression
22:27:43 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:29:23 <monochrom> Expression languages use the full expressivity of monads. Statement languages don't. :)
22:29:55 <monochrom> IOW I make expression languages because the alternative is too boring.
22:30:27 <monochrom> But! On assignments I give them statement languages if it's more natural.
22:32:21 <sansk> 👍 thanks for the help, i guess one data type will be fine (the language is not too big)
22:38:36 sansk parts (~sansk@072-238-128-073.res.spectrum.com) (WeeChat 4.0.4)
22:55:16 ft joins (~ft@p4fc2a529.dip0.t-ipconnect.de)
22:57:30 × CO2 quits (~CO2@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 4.1.0)
22:58:40 × santiagopim quits (~user@90.167.66.131) (Ping timeout: 252 seconds)
23:02:34 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
23:05:57 × dcoutts_ quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection)
23:06:12 × Katarushisu1 quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Quit: Ping timeout (120 seconds))
23:07:24 arahael joins (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net)
23:08:07 × jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 264 seconds)
23:08:27 dcoutts_ joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
23:08:48 Katarushisu1 joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
23:10:04 sansk joins (~sansk@072-238-128-073.res.spectrum.com)
23:10:14 sansk parts (~sansk@072-238-128-073.res.spectrum.com) ()
23:11:43 jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net)
23:13:01 Lycurgus joins (~georg@user/Lycurgus)
23:23:39 <EvanR> what is the link between expression language and monads
23:23:53 <EvanR> what is return what is join
23:27:33 aztex joins (~aztex@78-71-213-100-no2000.tbcn.telia.com)
23:28:06 <aztex> Hello is it possible to share an MVar between a Haskell and C heap?
23:28:46 <aztex> I think its possible to share plain values quite easily by `malloc`ing on the C heap
23:28:59 <EvanR> you could put hooks to call from C which access the MVar and marshall it into a form usable in C
23:29:17 <c_wraith> You can't assume it won't move
23:29:23 <c_wraith> .. I think.
23:29:47 <EvanR> malloced heap space won't move
23:29:54 <monochrom> Most of the time, Applicative suffices. E.g. "foo + bar" can have semantics liftA2 (+) (eval foo) (eval bar).
23:29:58 <c_wraith> I don't think you can malloc an MVar
23:29:59 <davean> I mean yo ucan ... oh god who would stable pointer MVar?
23:30:01 <EvanR> you can use Storable to access it from haskell, and access it normally from C
23:30:16 <aztex> now malloced ones wont move
23:30:19 <EvanR> yeah no, not MVar
23:31:02 vglfr joins (~vglfr@88.155.140.136)
23:31:05 <c_wraith> If you want the integration with Haskell threads that MVar implies, you need to integrate with Haskell stuff. And that means StablePtr and really slow access.
23:31:20 <monochrom> But if-then-else and short-circuiting operators begin to need at least Selective.
23:31:22 <c_wraith> If you just want a block of mutable memory, use Storable and allocate it on the C heap
23:31:35 <aztex> The scenario I have is a bit strange; I am FFI interfacing with a C server kind of program that responds to requests intermittently. I want the Haskell part of the program to wake up only when the C server answers some requests
23:31:41 <geekosaur> aren't we all kinda missing the elephant in the room, namely that you can't access MVar *semantics* from C
23:31:45 <monochrom> Usually the semantic model is nice enough to support all of Monad, so why not. :)
23:32:07 <c_wraith> geekosaur: well, I wasn't ignoring that StablePtr isn't usable from C!
23:32:14 <aztex> This is kind of hard; I have a naive model where I busy wait on the Haskell side; busy waiting on a value malloced on the C heap
23:32:16 <EvanR> unless you call into a haskell operation that accesses the MVar for you
23:32:21 <aztex> But I want to avoid the busy wait
23:32:32 <EvanR> but anyway they explained the XY problem so solve that instead
23:32:37 <monochrom> Actually I think by the time the language has function application, the semantic model needs all of >>=.
23:32:39 <c_wraith> Yeah, this sounds like a case of just call a pretty normal FFI function that writes to the MVar from Haskell
23:33:12 <geekosaur> or just invokes a Haskell callback and avoid the whole mess?
23:33:42 <aztex> geekosaur could you elaborate a bit on what you mean by the Haskell callback?
23:33:55 <c_wraith> aztex: look into "foreign export"
23:34:00 <aztex> I guess that the Haskell part of the programs becomes exported
23:34:19 <monochrom> C can call Haskell.
23:34:27 <geekosaur> yes, you can arrange for Haskell functions to be callable from C with "foreign export"
23:34:28 <aztex> aware of that
23:34:37 <monochrom> Turn the table around. Work backwards.
23:34:57 <EvanR> don't call us, we'll call you
23:34:57 <geekosaur> so instead of busyewaiting on the C heap you have C call into Haskell with the value you'd be putting into the heap
23:35:17 <monochrom> (A few years ago I finally accepted that debugging is best done by working backwards. Dijkstra told me so decades ago. Didn't listen. :) )
23:35:34 <EvanR> what does function application have to do with >>=
23:35:41 <aztex> was hoping didn't have to do the export stuff
23:35:51 <aztex> but probably thats the simplest way out
23:36:26 <EvanR> alternatively you can put the C routine that does whatever waiting into a thing that haskell can call, then haskell blocks waiting for that FFI call to return
23:36:37 <aztex> (reason being the C server part of the code is fixed and the Haskell functions change a lot from program to program)
23:36:48 <EvanR> but it sounds like the other way might be more straight forward if the core loop is in C
23:38:22 <aztex> thanks for the help
23:41:05 × aztex quits (~aztex@78-71-213-100-no2000.tbcn.telia.com) (Quit: Client closed)
23:42:16 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
23:44:18 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
23:44:37 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
23:44:50 <davean> Why are we talking about anything here other than the IO Manager?
23:45:16 <davean> You just make a selectable
23:47:44 × arahael quits (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds)
23:47:53 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
23:49:38 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 260 seconds)
23:57:45 Square joins (~Square@user/square)
23:58:30 <EvanR> is that a thing
23:59:07 <monochrom> I wonder if "IO Manager" and "selectable" are responses to two different threads.

All times are in UTC on 2023-10-24.