2023/02/08

2023-02-08 00:00:14 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 00:01:38 +0100 <c_wraith> danso: I think that can only happen for specific Monad instances - but it *is* possible to write mapM such that it can take advantage of that for Monads where it happens.
2023-02-08 00:01:52 +0100 <c_wraith> (and not write traverse to take advantage of the same)
2023-02-08 00:02:03 +0100thegeekinside(~thegeekin@189.180.83.186) (Ping timeout: 248 seconds)
2023-02-08 00:03:10 +0100thegeekinside(~thegeekin@189.180.83.186)
2023-02-08 00:03:44 +0100 <monochrom> Yeah you're basically looking at whether >>= can be more efficient than <*> for a certain type.
2023-02-08 00:04:27 +0100seriously_(~seriously@2001:1c06:2715:c200:5f25:ec6a:93bd:f6c6)
2023-02-08 00:04:43 +0100slack1256(~slack1256@186.11.100.232)
2023-02-08 00:06:47 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-02-08 00:07:53 +0100king_gs(~Thunderbi@187.201.41.239)
2023-02-08 00:07:59 +0100 <seriously_> Hey everyone; on the last problem of Yorgeys cis 194!! Im stuck though. I'm expecting replicateM to "do" n amount of invades and collect the invidual results. But currently it seems to simply just replicate the same result n times. https://paste.tomsmeding.com/uNi10W1J
2023-02-08 00:09:18 +0100 <c_wraith> seriously_: it's hard to get too far without the definition of battle. It's missing and the most likely culprit
2023-02-08 00:10:02 +0100 <c_wraith> seriously_: though your Monad instance for Rand is also potentially suspect
2023-02-08 00:10:35 +0100 <seriously_> Apologies, of course: https://paste.tomsmeding.com/vdX2VLVD
2023-02-08 00:10:51 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
2023-02-08 00:11:17 +0100 <c_wraith> ah, yep. that's the problem
2023-02-08 00:11:36 +0100 <seriously_> really?!
2023-02-08 00:11:37 +0100 <c_wraith> You're returning the same value of g that you got initially
2023-02-08 00:12:04 +0100 <c_wraith> so every call uses the same RNG state
2023-02-08 00:12:19 +0100 <seriously_> right?? my understanding for a generator is its just a formula (function) that you use for calculating that random number
2023-02-08 00:12:31 +0100 <c_wraith> also, aRolls and dRolls are sharing the same generator, so they're going to be correlated
2023-02-08 00:12:56 +0100 <c_wraith> the generator is the whole RNG state, packaged up in an immutable summary
2023-02-08 00:13:35 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 00:13:58 +0100 <seriously_> Ok thanks for pointing that out; let me go and study the concept of the generator a little more
2023-02-08 00:14:24 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Read error: Connection reset by peer)
2023-02-08 00:14:25 +0100 <c_wraith> I think you're getting tripped up, though. You should not be calling evalRand in there at all
2023-02-08 00:14:35 +0100 <c_wraith> You should be using the Monad instance for Rand
2023-02-08 00:14:51 +0100 <c_wraith> It should be the only thing responsible for threading generator state around
2023-02-08 00:14:53 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2023-02-08 00:16:32 +0100 <c_wraith> well, ok. `die' needs to ensure it's threading the state properly. But `battle' shouldn't ever need to care about the details. It should leave them up to Rand
2023-02-08 00:16:32 +0100 <seriously_> ok so every call of (>>=) is creating a new generator state
2023-02-08 00:17:03 +0100 <seriously_> ok
2023-02-08 00:17:26 +0100 <c_wraith> Well... No. things like `die' create the new generator state. (>>=) just makes sure it's threaded through correctly without you needing to think about it
2023-02-08 00:19:31 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-02-08 00:19:49 +0100mei(~mei@user/mei) (Remote host closed the connection)
2023-02-08 00:21:46 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 00:23:23 +0100dtman34(~dtman34@2601:447:d000:93c9:b289:3f01:2da:f4d2) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2023-02-08 00:23:44 +0100dtman34(~dtman34@76.156.89.180)
2023-02-08 00:26:11 +0100 <seriously_> It seems like I approached it incorrectly from the start then... From what you said, it sounds like I should be working of sequences of die and threading those results... so https://paste.tomsmeding.com/5YPVWvnM
2023-02-08 00:26:25 +0100 <seriously_> on*
2023-02-08 00:26:59 +0100 <c_wraith> yeah, though if you use do-notation you can keep almost the same structure as your existing code
2023-02-08 00:27:35 +0100mei(~mei@user/mei)
2023-02-08 00:27:41 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-02-08 00:28:55 +0100 <seriously_> *thumbsup*
2023-02-08 00:29:04 +0100kurbus(~kurbus@user/kurbus)
2023-02-08 00:30:39 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2023-02-08 00:32:59 +0100seriously_(~seriously@2001:1c06:2715:c200:5f25:ec6a:93bd:f6c6) (Quit: Client closed)
2023-02-08 00:34:03 +0100mechap(~mechap@user/mechap) (Ping timeout: 248 seconds)
2023-02-08 00:35:52 +0100mechap(~mechap@user/mechap)
2023-02-08 00:39:41 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 00:44:11 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 00:47:55 +0100tessier(~treed@ip72-197-145-89.sd.sd.cox.net) (Ping timeout: 248 seconds)
2023-02-08 00:48:02 +0100king_gs(~Thunderbi@187.201.41.239) (Read error: Connection reset by peer)
2023-02-08 00:48:20 +0100king_gs(~Thunderbi@2806:103e:29:1779:4ae6:8f92:8c1c:44cd)
2023-02-08 00:52:45 +0100king_gs(~Thunderbi@2806:103e:29:1779:4ae6:8f92:8c1c:44cd) (Ping timeout: 255 seconds)
2023-02-08 00:56:53 +0100 <lechner> Hi, is it true that Cabal depends on GHC in the sense that they somehow have to be upgraded in lockstep?
2023-02-08 00:57:50 +0100 <geekosaur> ghc often has a minimum required cabal version of late, but that has more to do with toolchain changes on Windows
2023-02-08 00:58:23 +0100 <geekosaur> in particular you need a cabal recent enough that it knows about ghc now using the clang toolchain instead of mingw
2023-02-08 00:58:45 +0100 <geekosaur> but a newer cabal can be used with an older ghc with no problems
2023-02-08 00:58:58 +0100opticblast(~Thunderbi@172.58.85.230) (Ping timeout: 252 seconds)
2023-02-08 00:59:03 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 00:59:04 +0100 <geekosaur> ("of late" meaning 9.4 and the upcoming 9.6)
2023-02-08 00:59:11 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-02-08 01:00:19 +0100 <geekosaur> I generally recommend using the latest released cabal due to bugs in older versions (I have in particular seen problems with cabal 3.4 and `setup-type: configure`)
2023-02-08 01:00:38 +0100opticblast(~Thunderbi@172.58.82.191)
2023-02-08 01:00:43 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Ping timeout: 248 seconds)
2023-02-08 01:01:07 +0100 <lechner> geekosaur / i'm trying. is this remark specific to Guix, then? https://github.com/guix-mirror/guix/blob/master/gnu/packages/haskell-apps.scm#L94-L95
2023-02-08 01:02:13 +0100 <geekosaur> technically it's false as long as they have compatibility. practically I think cabal-install may reject it just because it doesn't know they retain backward compatibility?
2023-02-08 01:02:37 +0100 <lechner> Guix may also have bootstrapping issues, btw
2023-02-08 01:02:39 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 268 seconds)
2023-02-08 01:03:14 +0100 <geekosaur> and they avoid trying to hardcode too much "magical" knowledge into it, so there's not much between "freely upradeable" and "bound to ghc"
2023-02-08 01:04:16 +0100ddellacosta(~ddellacos@146.70.165.170)
2023-02-08 01:04:27 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds)
2023-02-08 01:05:21 +0100 <geekosaur> hm, okay, that might actually be a guix requirement because it can't keep track of two versions of Cabal at the same time
2023-02-08 01:05:30 +0100czy(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net)
2023-02-08 01:06:23 +0100 <geekosaur> cabal-install has no trouble with it; I've definitely used much newer versions of cabal with older ghcs, and cabal(-install) drags along a newer Cabal
2023-02-08 01:07:08 +0100 <lechner> i see. what's in Cabal, please, and why does it also ship with GHC?
2023-02-08 01:07:20 +0100 <geekosaur> if this weren't the case I couldn't be using cabal 3.10 prerelease with ghc 9.2.5
2023-02-08 01:07:28 +0100 <geekosaur> Cabal is the package manager library
2023-02-08 01:07:58 +0100 <geekosaur> so ghc needs it to use package dbs
2023-02-08 01:08:28 +0100 <geekosaur> it is not what determines build plans and the like; that lives in cabal-install
2023-02-08 01:08:46 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2023-02-08 01:08:49 +0100 <lechner> how does the ordinary Cabal ecosystem know how to find the right one?
2023-02-08 01:09:31 +0100 <geekosaur> ghc always uses the one that comes with it. the rest of the ecosystem can use that or a different version; backward compatibility is very well established and maintained
2023-02-08 01:10:03 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-02-08 01:10:22 +0100 <geekosaur> as I mentioned earlier, cabal-install uses the corresponding Cabal library to maintain package dbs; ghc can access those without requiring the same Cabal version
2023-02-08 01:11:03 +0100 <lechner> well, my question was a little bit more technical in the sense that i have to figure out if i can somehow replicate that in Guix. Do you know if it would work in Nix?
2023-02-08 01:14:10 +0100 <geekosaur> that I don't. but I think that's part of why cabal-install has a nix mode, instead of the other way around?
2023-02-08 01:14:22 +0100 <geekosaur> probably have to ask sclv
2023-02-08 01:14:33 +0100 <geekosaur> (sorry for ping)
2023-02-08 01:16:05 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 01:19:23 +0100czy(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Quit: ERC 5.4.1 (IRC client for GNU Emacs 30.0.50))
2023-02-08 01:20:02 +0100czy(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net)
2023-02-08 01:21:23 +0100king_gs(~Thunderbi@187.201.41.239)
2023-02-08 01:24:48 +0100tdwdiod^(~tdwdiod@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection)
2023-02-08 01:25:12 +0100czy`(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net)
2023-02-08 01:25:33 +0100 <sclv> i don’t understand the question
2023-02-08 01:29:49 +0100patrl(~patrl@user/patrl) (Quit: WeeChat 3.8)
2023-02-08 01:31:40 +0100bhall(~brunohall@195.147.207.136) (Ping timeout: 260 seconds)
2023-02-08 01:32:32 +0100 <lechner> sclv / Hi, I'd like to update Cabal in Guix but found this remark https://github.com/guix-mirror/guix/blob/ccf742f120452acf587d16e40adea570d15169c4/gnu/packages/has…
2023-02-08 01:33:40 +0100 <sclv> i think guix like nix probably has the requirement that there is Only One Version of a package at any given time.
2023-02-08 01:34:08 +0100 <sclv> since Cabal-the-library ships with ghc, and since a new cabal-the-app requires being against a new cabal-the-library, then this would be the roadblock, sadly
2023-02-08 01:34:50 +0100 <sclv> i think the nix folks have some way to "jailbreak" out of that problem, but idk what it might be
2023-02-08 01:34:58 +0100 <jackdk> out of interest, what is the guix word for "nixpkgs"? By which I mean, the giant collection of .scm files
2023-02-08 01:36:17 +0100 <lechner> jackdk / i think it's all part of the Guix repo https://github.com/guix-mirror/guix/tree/master/gnu/packages
2023-02-08 01:36:36 +0100 <jackdk> sclv: jailbreaking a cabal package means removing its bounds, used when a package compiles against newer (or older, I guess) versions of its deps and a metadata revision or new release has not trickled down to the hackage snapshot yet. I can't see it helping much here if guix is also doing the Only One Version Of A Package thing
2023-02-08 01:36:54 +0100 <sclv> yeah, i thought nix might have another hack on top of that, but idk.
2023-02-08 01:37:18 +0100 <jackdk> (This is the big advantage of IOG's "haskell.nix" project, but that's a very heavy piece of machinery which I use only when I need cross compiling, static linking, or I _must_ use the output of the cabal solver to select deps.)
2023-02-08 01:39:40 +0100aisa(~aisa@user/aisa) (Ping timeout: 252 seconds)
2023-02-08 01:39:57 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376)
2023-02-08 01:48:05 +0100 <lechner> what are the mechanism and the reason for which and by which Guix does the Only One Version thing. What is different to an ordinary setup, please?
2023-02-08 01:48:53 +0100 <geekosaur> the main reason would be avoiding the diamond dependency problem
2023-02-08 01:49:03 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376) (Ping timeout: 248 seconds)
2023-02-08 01:49:22 +0100 <geekosaur> (library A uses version 1, library B uses version 2, you try to depend on both library A and library B -> disaster)
2023-02-08 01:50:10 +0100 <geekosaur> s/version ./& of library C/g
2023-02-08 01:52:02 +0100tabemann(~tabemann@2600:1700:7990:24e0:ef07:7078:7b84:e5fd)
2023-02-08 01:54:40 +0100 <geekosaur> note that this can happen even with Cabal because the linker is being asked to link two different versions of the same library, their symbols will conflict. the linker has no clue that it can safely ignore the older version and link everything against the newer one; this is not at all common
2023-02-08 01:56:22 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-02-08 01:56:22 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-02-08 01:56:22 +0100wroathe(~wroathe@user/wroathe)
2023-02-08 01:56:23 +0100 <geekosaur> so to keep a consistent package store, guix (or nix, or debian, or etc.) has to pick one "golden" version of each library
2023-02-08 02:00:22 +0100 <geekosaur> cabal handles this differently: you can have multiple versions, but it has to build multiple versions of dependencies against them as needed to satisfy your dependencies.
2023-02-08 02:00:54 +0100 <geekosaur> this takes a lot of space, which is why you'll often see people complaining about cabal (or stack, which does the same thing) package stores getting huge
2023-02-08 02:01:20 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 02:05:37 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-02-08 02:11:44 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-02-08 02:13:49 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 02:14:30 +0100dsrt^(~dsrt@c-24-30-76-89.hsd1.ga.comcast.net)
2023-02-08 02:18:10 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
2023-02-08 02:20:25 +0100king_gs(~Thunderbi@187.201.41.239) (Read error: Connection reset by peer)
2023-02-08 02:20:30 +0100king_gs1(~Thunderbi@2806:103e:29:1779:904b:7f43:decf:5c51)
2023-02-08 02:20:49 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376)
2023-02-08 02:22:47 +0100king_gs1king_gs
2023-02-08 02:24:36 +0100cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2023-02-08 02:24:45 +0100troydm(~troydm@user/troydm) (Ping timeout: 260 seconds)
2023-02-08 02:24:59 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376) (Ping timeout: 248 seconds)
2023-02-08 02:25:21 +0100cheater(~Username@user/cheater)
2023-02-08 02:26:23 +0100ddellacosta(~ddellacos@146.70.165.170) (Ping timeout: 248 seconds)
2023-02-08 02:27:03 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2023-02-08 02:27:46 +0100stiell_(~stiell@gateway/tor-sasl/stiell)
2023-02-08 02:30:40 +0100bhall(~brunohall@195.147.207.136)
2023-02-08 02:33:31 +0100Henson(~kvirc@207.136.101.195) (No boundaries on the net!)
2023-02-08 02:34:53 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 246 seconds)
2023-02-08 02:39:23 +0100xff0x(~xff0x@ai081074.d.east.v6connect.net) (Ping timeout: 248 seconds)
2023-02-08 02:45:01 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
2023-02-08 02:47:45 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 02:49:26 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
2023-02-08 02:52:11 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 02:52:55 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-02-08 02:52:58 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376)
2023-02-08 02:52:59 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds)
2023-02-08 02:55:11 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-02-08 02:55:16 +0100ghostbuster(~admin@user/ghostbuster)
2023-02-08 02:56:00 +0100 <ghostbuster> is haskell a good first functional language for an experience C/C++ programmer?
2023-02-08 02:56:41 +0100 <slack1256> Good as any.
2023-02-08 02:57:05 +0100 <slack1256> I don't think much will carry over from C/C++ though. That is probably for the best.
2023-02-08 02:58:07 +0100notzmv(~zmv@user/notzmv)
2023-02-08 02:58:21 +0100 <aljer> in my opinion it's a better choice than a Lisp dialect because of static typing
2023-02-08 02:58:59 +0100 <dsal> It's a bit easier without C or C++ experience, IMO.
2023-02-08 02:59:27 +0100 <ghostbuster> dsal: too late for that unfortunately
2023-02-08 02:59:35 +0100 <davean> I think a *medium* amount of C/C++ is the worst
2023-02-08 02:59:51 +0100 <davean> if you have a lot of C/C++ experience you probably just invent functional programming yourself.
2023-02-08 03:00:18 +0100 <aljer> agreed with dsal - FP is easier without any OOP experience
2023-02-08 03:00:33 +0100 <davean> (Thats how the community I came over with got here)
2023-02-08 03:00:54 +0100 <ghostbuster> when i said C/C++ i really meant mostly C - not so much OOP
2023-02-08 03:00:56 +0100slack1256came here cause the cute drawing on LYAH
2023-02-08 03:00:57 +0100 <dsal> It's not just OOP. A lot of it is trying to address concerns in what you're used to.
2023-02-08 03:01:54 +0100 <dsal> e.g., if all you know is C, you may be predisposed to worry about the wrong things.
2023-02-08 03:02:07 +0100 <aljer> ah, good point
2023-02-08 03:02:30 +0100 <ghostbuster> i know lots of imperative languages, from assembly to python to go\
2023-02-08 03:03:07 +0100 <ghostbuster> is there any overlap between functional languages and abstract algebra?
2023-02-08 03:03:23 +0100mechap(~mechap@user/mechap) (Ping timeout: 248 seconds)
2023-02-08 03:03:25 +0100 <dsal> That question's pretty abstract. :)
2023-02-08 03:03:34 +0100 <davean> ghostbuster: absolutely but I'm not sure the overlap is helpful to you
2023-02-08 03:04:46 +0100 <ghostbuster> the usual way i'd learn a language is by reading a bit of an intro, common pitfalls for newbies, and then try to build a project in it
2023-02-08 03:05:13 +0100mechap(~mechap@user/mechap)
2023-02-08 03:06:57 +0100ddellacosta(~ddellacos@146.70.166.234)
2023-02-08 03:07:19 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 03:07:33 +0100 <aljer> FP borrows a lot of concepts from category theory, if you are interested in the mathematical overlap. not necessary to be well versed in it, but it will help when you get to monads
2023-02-08 03:07:58 +0100 <dsal> ghostbuster: That works if you're expressing the same solution in different languages. Haskell lets you do a bit better, but you have to learn to think about problems a bit differently to do that.
2023-02-08 03:11:03 +0100 <ghostbuster> would it be good to by solving relatively "abstract" math problems like stuff from project euler? i think i read that fibonacci is a good "hello world"
2023-02-08 03:11:25 +0100 <dsal> Yeah. I get bored by euler fast because I'm not a mather.
2023-02-08 03:11:40 +0100 <dsal> exercism has some good stuff, but also AoC.
2023-02-08 03:11:57 +0100 <dsal> And probably countless other things.
2023-02-08 03:12:08 +0100 <aljer> AoC is great for learning Haskell!
2023-02-08 03:12:18 +0100 <lechner> ghostbuster / you definitely want to get used to recursion
2023-02-08 03:12:20 +0100 <ghostbuster> what does making a syscall look like in a purely functional language?
2023-02-08 03:12:31 +0100 <dsal> It looks like any other effect.
2023-02-08 03:12:45 +0100 <ghostbuster> i thought effects are not allowed :)
2023-02-08 03:12:46 +0100 <jean-paul[m]> readLine :: IO String
2023-02-08 03:12:52 +0100 <dsal> effects are isolated.
2023-02-08 03:13:56 +0100 <lechner> in monads
2023-02-08 03:14:35 +0100 <lechner> which is more or less to say that we enforce an ordering in time on them
2023-02-08 03:21:55 +0100 <ghostbuster> what is everyone's favourite beginner intro site / book?
2023-02-08 03:22:11 +0100 <dsal> I liked haskellbook, but that's not everyone's favorite.
2023-02-08 03:22:16 +0100 <lechner> LYAH
2023-02-08 03:22:26 +0100 <aljer> Learn You a Haskell ^
2023-02-08 03:23:12 +0100 <dsal> Like, you ask here
2023-02-08 03:23:48 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2023-02-08 03:23:53 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds)
2023-02-08 03:24:13 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2023-02-08 03:24:26 +0100 <lechner> ghostbuster / one more thing. you will read a lot about monads, and people like to get complicated. they are basically just a sequential execution where the previous result is used as input for the next, and a conditional can abort in between. no need to get scared (and i am not afraid of any flames)
2023-02-08 03:25:04 +0100Lord_of_Life_Lord_of_Life
2023-02-08 03:25:15 +0100 <ghostbuster> lechner: thanks i may lose interest / get distracted but i won't get discouraged :)
2023-02-08 03:25:26 +0100 <dsal> Yeah, and also don't try really hard to learn monads. You can use them without having a deep understanding and trying to understand something without the fundamentals is just hard.
2023-02-08 03:25:53 +0100 <ghostbuster> cool
2023-02-08 03:26:00 +0100 <dsal> ghostbuster: Haskell has been my go-to language for years now. It's weird at first, but it's the easiest thing to work in, IMO.
2023-02-08 03:26:06 +0100 <aljer> 100% --> there's a kind of joke around how "hard to grasp" monads are
2023-02-08 03:26:23 +0100 <aljer> and if you try to understand them from the category theory perspective, maybe that's true at first
2023-02-08 03:26:45 +0100 <aljer> but from the practical, programming perspective not so much
2023-02-08 03:27:27 +0100 <dsal> Mostly, you just need to know types. Types tell the story.
2023-02-08 03:27:43 +0100 <ghostbuster> the reason i came here is i want to learn about compiler theory and code analysis, from a security standpoint
2023-02-08 03:28:04 +0100 <dsal> Writing parsers in haskell is so easy it's nearly boring.
2023-02-08 03:28:09 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 03:28:10 +0100 <ghostbuster> but if i learned some category theory that would be cool too
2023-02-08 03:28:20 +0100 <dsal> At least with parser combinators. The hardest part is trying to not build a new language for every project.
2023-02-08 03:28:21 +0100 <lechner> we call them domain-specific languages, or DSL
2023-02-08 03:28:23 +0100 <dsal> I don't do too well with that.
2023-02-08 03:29:12 +0100 <ghostbuster> would it be valuable to write a very basic program, compile it, and look at the generated assembly?
2023-02-08 03:29:22 +0100 <lechner> ghostbuster / for monads, it helps to think first about "continuation-passing style". i wish i could find that Javascript video (or was it Rust?)
2023-02-08 03:29:22 +0100 <dsal> There are multiple layers down to asm.
2023-02-08 03:29:38 +0100 <dsal> ghostbuster: https://play-haskell.tomsmeding.com is a tool that will do that stuff for you.
2023-02-08 03:30:39 +0100 <dsal> ghc compiles to "core" which is a smaller language.
2023-02-08 03:31:12 +0100 <ghostbuster> interesting
2023-02-08 03:31:56 +0100 <dsal> If you're trying to learn haskell by looking at asm, that's probably not going to be very… efficient.
2023-02-08 03:32:34 +0100 <ghostbuster> ok fair enough, that's just the C programmer in me talking
2023-02-08 03:32:55 +0100 <dsal> Learn how to use the language idiomatically first, then learn how/when to figure out how to make programs more efficient which might involve looking at core. By the time you're looking at some processor's assembler output, you're in a weird place.
2023-02-08 03:33:04 +0100 <dsal> Yeah, this is where C will hurt your ability to learn.
2023-02-08 03:33:17 +0100 <yushyin> most of haskell i learned by reading along here
2023-02-08 03:33:19 +0100 <yushyin>
2023-02-08 03:33:21 +0100 <dsal> The goal isn't necessarily to write the fastest program theoretically possible. It's about making a clear an correct expression of your problem.
2023-02-08 03:34:02 +0100 <dsal> Efficiency can be achieved at a much higher level.
2023-02-08 03:34:31 +0100 <dsal> But also, you've got stuff like STM. Technically possible in many languages, but very difficult to use correctly in pretty much anything but Haskell.
2023-02-08 03:35:09 +0100 <ghostbuster> STM appears to be some sort of concurrency primitive?
2023-02-08 03:36:08 +0100 <davean> Yes, it is, there are many others.
2023-02-08 03:37:42 +0100 <davean> ghostbuster: You can basicly map STM to a transaction system in an MVCC system over memory
2023-02-08 03:38:32 +0100 <dsal> We do have mutexes and semaphores and stuff. STM feels like magic, though. Imagine trying to compose two functions that use mutexes.
2023-02-08 03:39:08 +0100 <ghostbuster> yeah that sounds messy
2023-02-08 03:39:16 +0100 <davean> dsal: I'm weirded out by your claim looking at ASM for Haskell is a weird place though. I think it makes a ton of sense in library design specificly, particularly for datastructures.
2023-02-08 03:39:56 +0100 <ghostbuster> well, thanks everyone for living up to the reputation of being newbie-friendly
2023-02-08 03:40:03 +0100 <dsal> You *can*, but I've never seen anyone suggesting looking at the code generated by idiomatic haskell as a good way to learn the language.
2023-02-08 03:40:26 +0100 <davean> Not for learning the language no, but for programming in it
2023-02-08 03:41:39 +0100 <ghostbuster> i wouldn't suggest reading assembly to learn C, but I would say it's good to know what assembly your C produces
2023-02-08 03:41:45 +0100 <dsal> Are you suggesting it's common for haskell programmers to look at generated machine code?
2023-02-08 03:42:12 +0100daveanlooks at everyone he codes with
2023-02-08 03:42:17 +0100 <davean> In some circles, absolutely normal
2023-02-08 03:42:21 +0100 <dsal> ghostbuster: I do that for microcontrollers, but I don't even know the instruction set of the machine I'm on.
2023-02-08 03:42:50 +0100 <davean> I was just over having a discussion about GHC's ASM actually that I was interleaving this with
2023-02-08 03:43:24 +0100 <dsal> "weird" implies not universally common. I don't mean to suggest that nobody doest it. But on your first day with the language, you're in a weird place if you're looking at that sort of thing.
2023-02-08 03:43:52 +0100 <davean> Not your first day though, but basicly all the haskell programmers I know do it at least occasionally, some of them quite often
2023-02-08 03:44:23 +0100 <davean> I think I've worked with exactly one Haskeller who hasn't done it somewhat regularly.
2023-02-08 03:44:42 +0100 <dsal> Neat. Still sounds like a pretty weird place. Doesn't come up that much at work.
2023-02-08 03:44:48 +0100 <ghostbuster> i have questions about this 'succ' function..
2023-02-08 03:44:56 +0100 <dsal> @src succ
2023-02-08 03:44:56 +0100 <lambdabot> Source not found. Sorry about this, I know it's a bit silly.
2023-02-08 03:44:59 +0100 <dsal> lame
2023-02-08 03:44:59 +0100 <davean> ghostbuster: what about it?
2023-02-08 03:45:33 +0100 <ghostbuster> i'm not sure how to ask it.. i realized i don't know what a type *is*
2023-02-08 03:45:47 +0100 <davean> ghostbuster: well start speaking
2023-02-08 03:45:55 +0100 <davean> just state confusions
2023-02-08 03:45:59 +0100 <ghostbuster> how does the language know that 8 < 9
2023-02-08 03:46:06 +0100 <dsal> Well, first it has to know what `8` is
2023-02-08 03:46:09 +0100 <davean> in *haskell* it doesn't
2023-02-08 03:46:23 +0100 <ghostbuster> i guess a type has to specify all valid values
2023-02-08 03:46:27 +0100 <davean> though there might be an "8" with a definition "8 < 9"
2023-02-08 03:46:35 +0100 <davean> ghostbuster: can you show some code?
2023-02-08 03:46:45 +0100 <ghostbuster> davean: it's on this page http://learnyouahaskell.com/starting-out
2023-02-08 03:46:54 +0100 <ghostbuster> ghci> succ 8
2023-02-08 03:46:57 +0100 <ghostbuster> 9
2023-02-08 03:47:03 +0100 <davean> so it does NOT know that 8 is < 9
2023-02-08 03:47:05 +0100 <davean> in that case
2023-02-08 03:47:21 +0100 <davean> class Enum a where
2023-02-08 03:47:23 +0100 <davean> succ :: a -> a
2023-02-08 03:47:38 +0100 <ghostbuster> is it okay to paste 2 lines into chan btw
2023-02-08 03:48:09 +0100 <davean> What we know is that "succ" is a definition, which knows how to produce a value that has the "Enum" characturistic, with some relation to a given value of the same "a" type
2023-02-08 03:48:09 +0100 <ghostbuster> ghci> 8 < 9
2023-02-08 03:48:12 +0100 <ghostbuster> True
2023-02-08 03:48:14 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-02-08 03:48:35 +0100 <davean> Now, the laws are how we end up with an 8 < (succ 8) relationship
2023-02-08 03:48:37 +0100 <dsal> ghostbuster: That's slightly confusing defaulting behavior in ghci. It's picking a type for 8. `:t 8` might help.
2023-02-08 03:48:58 +0100 <davean> https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-Enum.html#t:Enum
2023-02-08 03:49:35 +0100 <dsal> I don't see anything about laws here… Is there a law that `x < succ x` ?
2023-02-08 03:49:39 +0100 <davean> And yah, we actually lack technical confidence in "8 < (succ 8)"
2023-02-08 03:49:47 +0100 <davean> in fact, its sorta not generally true
2023-02-08 03:49:53 +0100 <Clinton[m]> Is there a function somewhere like:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/bde3899c12cd7a587e46720905d45dd7ea76…>)
2023-02-08 03:50:08 +0100tessier(~treed@ec2-184-72-149-67.compute-1.amazonaws.com)
2023-02-08 03:50:09 +0100 <davean> We HAPPEN to be on Int here, ebcause you'
2023-02-08 03:50:12 +0100 <davean> re in ghci
2023-02-08 03:50:21 +0100 <dsal> > succ (128::Int8)
2023-02-08 03:50:23 +0100 <lambdabot> -127
2023-02-08 03:50:39 +0100 <davean> dsal: ok, for that one its violating the Enum laws :(
2023-02-08 03:51:01 +0100 <aljer> it works for Enum because Enum can be incremented, right?
2023-02-08 03:51:05 +0100 <ghostbuster> are all types ordered?
2023-02-08 03:51:09 +0100 <davean> ghostbuster: no
2023-02-08 03:51:20 +0100 <davean> ghostbuster: Some are partial ordered, some are unordered
2023-02-08 03:51:30 +0100 <davean> ghostbuster: only types with the "Ord" property are ordered
2023-02-08 03:51:56 +0100 <davean> and the Enum, Num, and Ord properties have relationships between them
2023-02-08 03:52:14 +0100 <lechner> it helps to like math
2023-02-08 03:52:32 +0100 <ghostbuster> i do like math
2023-02-08 03:52:35 +0100waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 246 seconds)
2023-02-08 03:52:49 +0100 <davean> ghostbuster: https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Ord.html#t:Ord here is our definition of the Ord property
2023-02-08 03:52:55 +0100 <ghostbuster> arguing is fun haha
2023-02-08 03:53:04 +0100 <dsal> ghostbuster: ghci defaulting behavior is a bit weird. In practice, `8` just means something with a `Num` instance. You can make up your own.
2023-02-08 03:53:18 +0100 <davean> ghostbuster: you'll see it has a list of types with said property (though it only lists those in 'base')
2023-02-08 03:53:41 +0100 <ghostbuster> so types can have properties?
2023-02-08 03:53:45 +0100 <davean> yah, for example "Down Int" would not be "8 < (succ 8)"
2023-02-08 03:54:14 +0100 <ghostbuster> sorry what is Down?
2023-02-08 03:54:15 +0100 <davean> Down is a type that takes another type and *reverses its notion of ordering*
2023-02-08 03:54:30 +0100 <dsal> ghostbuster: A class is not a type. Classes constraint types. But types, in general, have value constructors.
2023-02-08 03:54:35 +0100 <davean> so, Down Int is like Int, except with a reversed idea or order
2023-02-08 03:55:00 +0100 <dsal> There are a couple of convenience ones like numeric literals and string literals that have some language support making it easy to enter values into your program for types you're using.
2023-02-08 03:55:08 +0100 <davean> dsal: your specific Int8 example violates "The calls succ maxBound and pred minBound should result in a runtime error."
2023-02-08 03:55:29 +0100 <dsal> davean: Ohh... Yes. I was slightly confused as to what law you were referring to. That does make sense.
2023-02-08 03:55:48 +0100 <dsal> > succ maxBound :: Int8
2023-02-08 03:55:50 +0100 <lambdabot> *Exception: Enum.succ{Int8}: tried to take `succ' of maxBound
2023-02-08 03:55:54 +0100 <lechner> are you two brothers?
2023-02-08 03:55:56 +0100 <dsal> well that's annoying.
2023-02-08 03:56:10 +0100gmg(~user@user/gehmehgeh)
2023-02-08 03:56:33 +0100 <aljer> lechner: plot twist - they are the same person
2023-02-08 03:56:42 +0100 <davean> dsal: you got confused because Int8 is asymetric ranged
2023-02-08 03:56:51 +0100 <dsal> Oh. That's even weirder.
2023-02-08 03:56:55 +0100 <lechner> aljer / i knew it!
2023-02-08 03:57:10 +0100 <davean> dsal: No! This is the nature of two's compliment arithmetic!
2023-02-08 03:57:26 +0100 <davean> You get 1 more range in the negative space than the possitive
2023-02-08 03:57:35 +0100 <davean> so the range is -128 to 127
2023-02-08 03:57:47 +0100opticblast(~Thunderbi@172.58.82.191) (Ping timeout: 248 seconds)
2023-02-08 03:57:51 +0100 <dsal> Right. I put the extra on the wrong side.
2023-02-08 03:57:54 +0100 <davean> since the encoding puts the zero into the possitive range
2023-02-08 03:58:17 +0100 <davean> ghostbuster: now that we've confused you ...
2023-02-08 03:58:28 +0100 <dsal> > 128::Int8 -- is the bad behavior
2023-02-08 03:58:29 +0100 <lambdabot> -128
2023-02-08 03:59:08 +0100gehmehgeh(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 03:59:23 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 248 seconds)
2023-02-08 04:00:24 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:f849:6b89:c0b7:d8b5)
2023-02-08 04:03:16 +0100 <ghostbuster> sorry was afk lol
2023-02-08 04:03:56 +0100 <davean> ghostbuster: It was a bit of a digression
2023-02-08 04:04:08 +0100 <davean> ghostbuster: so you mentioned abstract algebra before
2023-02-08 04:04:16 +0100 <davean> ghostbuster: is it something you are actually familiar with?
2023-02-08 04:04:18 +0100 <int-e> @check \(x :: Int8) -> abs x >= 0
2023-02-08 04:04:18 +0100 <lambdabot> <unknown>.hs:1:14:ScopedTypeVariables language extension is not enabled. Ple...
2023-02-08 04:04:32 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-02-08 04:04:34 +0100 <int-e> @check \x -> (abs x :: Int8) >= 0
2023-02-08 04:04:36 +0100 <lambdabot> *** Failed! Falsifiable (after 52 tests):
2023-02-08 04:04:36 +0100 <lambdabot> -128
2023-02-08 04:04:44 +0100 <dsal> One of my favorite bugs.
2023-02-08 04:05:48 +0100dtman34(~dtman34@76.156.89.180) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2023-02-08 04:05:55 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-02-08 04:05:56 +0100 <ghostbuster> davean: not really, a few years ago i had a class on calculus with a taste of algebra and i've thought it would be fun to learn it properly
2023-02-08 04:06:09 +0100 <int-e> it's a surprise; I don't think of it as a bug.
2023-02-08 04:06:10 +0100 <davean> ah, ok
2023-02-08 04:06:38 +0100dtman34(~dtman34@2601:447:d000:93c9:4f13:e7d1:81fd:2aa6)
2023-02-08 04:06:38 +0100 <davean> ghostbuster: well, uh, so this doesn't actually map to normal things in Haskell, but perhaps you've seen like "Integer" vs. "Natural" numbers?
2023-02-08 04:06:46 +0100 <dsal> int-e: it's specified, but I'm surely not the only person who's written a production bug due to `abs x` returning a negative number unexpectedly.
2023-02-08 04:06:53 +0100 <ghostbuster> yeah i'm familiar with the meaning of that distinction in math
2023-02-08 04:07:09 +0100 <ghostbuster> i think anyway.. integer includes zero?
2023-02-08 04:07:22 +0100 <davean> ghostbuster: right, so each is pretty relatable to a type, and they both have "Addable" but only one has "Negatable"
2023-02-08 04:07:45 +0100 <ghostbuster> makes sense
2023-02-08 04:07:45 +0100 <davean> ghostbuster: Integer has the negatives
2023-02-08 04:07:48 +0100 <ghostbuster> ah ok
2023-02-08 04:08:04 +0100 <davean> Natural containing zero or not is actually a point of confusion
2023-02-08 04:08:04 +0100 <ghostbuster> i am not a mathematician heh
2023-02-08 04:08:32 +0100 <davean> I thought the "has the idea of negation" or not would be a sensible enough mapping for you to start thinking abouit it either way
2023-02-08 04:08:55 +0100 <ghostbuster> yeah the idea of sets that support certain operations
2023-02-08 04:08:56 +0100 <int-e> Yeah mathematicians themselves can't agree on whether 0 is a natural number, it's hilarious.
2023-02-08 04:09:04 +0100 <davean> so the "type" represents the set of *actual values* and the type classes represent the things we can do with them and the behaviors they have when we do said with them
2023-02-08 04:09:28 +0100 <davean> Not QUITE this clean in Haskell but pretty close
2023-02-08 04:09:52 +0100 <davean> so "
2023-02-08 04:10:05 +0100 <davean> "data Natural = Zero | One | Two | ..."
2023-02-08 04:10:51 +0100 <davean> and "data Integer = Possitive Natural | Negative Natural" say (yah that encoding has two versions of Zero, sue me)
2023-02-08 04:11:24 +0100 <davean> I can easily impliment addition for both (Mind you this is NOT how you'd actually encode the types)
2023-02-08 04:11:34 +0100 <davean> (my point is that every type has a specific set of values inside it)
2023-02-08 04:11:59 +0100 <ghostbuster> btw "the asymmetric range of two's complement arithmetic" is exactly the kind of edge case that security researchers like
2023-02-08 04:12:20 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376) (Quit: WeeChat 3.8)
2023-02-08 04:12:24 +0100 <davean> ghostbuster: we could have a SaturatingInt8!
2023-02-08 04:12:36 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376)
2023-02-08 04:12:37 +0100 <davean> it would have the same set of values as Int8 but different *behavior*
2023-02-08 04:12:49 +0100 <davean> specificly, it would hit 127 and stop, instead of roll over.
2023-02-08 04:12:49 +0100 <ghostbuster> that was going to be my next questio.. can we mix/match types and type classes
2023-02-08 04:12:55 +0100aljer(~jonathon@2601:5c1:4503:8da0:7130:73a8:a627:b376) (Client Quit)
2023-02-08 04:13:09 +0100 <davean> well a type has a NUMBER of type classes it impliments
2023-02-08 04:13:23 +0100 <davean> so we can talk about "anything that impliments"
2023-02-08 04:13:33 +0100 <davean> like say we have "Negate" and "Order"
2023-02-08 04:13:34 +0100 <ghostbuster> almost sounds like an interface in some imperative languages
2023-02-08 04:13:37 +0100 <davean> with the right rules, we can say
2023-02-08 04:13:44 +0100 <davean> it is related to interfaces
2023-02-08 04:14:02 +0100 <davean> interfaces are a specific subset of this
2023-02-08 04:14:27 +0100 <davean> so lets say we have Negate and Order, and we want to impliment abs
2023-02-08 04:14:46 +0100 <davean> abs :: forall a. (Negate a, Ord a) => a -> a
2023-02-08 04:15:19 +0100 <davean> so *if* we can order values in a, and *if* we can negate them, we can give you the absolute value, for any type a that supports both of those things
2023-02-08 04:15:37 +0100 <int-e> > negate (-128 :: Int8)
2023-02-08 04:15:38 +0100 <davean> abs a = if a < 0 then negate a else a
2023-02-08 04:15:39 +0100 <lambdabot> -128
2023-02-08 04:16:00 +0100 <davean> again, you'd need to the right laws on Ord and Negate to prove that was *actually* abs
2023-02-08 04:16:20 +0100ghostbusteris processing
2023-02-08 04:16:20 +0100 <int-e> You won't escape this one unless you make that negation error (it's an overflow).
2023-02-08 04:16:24 +0100 <davean> now I should probably explain some ways type classes are more than interfaces
2023-02-08 04:16:46 +0100 <davean> int-e: I'm trying to talk about the ideas - I'm acknowleging its not quite right code
2023-02-08 04:16:54 +0100 <ghostbuster> this is fascinating, even if I don't learn haskell i'm going to hang out in this channel more often
2023-02-08 04:17:08 +0100 <int-e> evil version: abs a = if a < 0 then abs (negate a) else a
2023-02-08 04:17:28 +0100 <ghostbuster> i'm not familiar enough with the syntax yet - is your definition of abs not quite right there?
2023-02-08 04:17:35 +0100 <int-e> (non-termination is the least helpful bottom)
2023-02-08 04:17:38 +0100 <davean> ghostbuster: so you're ok with the idea of parameter and return possitions in a fucnction definition?
2023-02-08 04:17:48 +0100 <int-e> ghostbuster: no, I modified it slightly
2023-02-08 04:17:57 +0100 <davean> ghostbuster: Its not quite right in that we don't have the laws and know which direction ordering is in
2023-02-08 04:18:00 +0100 <int-e> davean's version that is.
2023-02-08 04:18:09 +0100 <ghostbuster> not familiar with return position
2023-02-08 04:18:17 +0100 <davean> ghostbuster: for example it fails with "Down Int"
2023-02-08 04:18:27 +0100 <davean> "int f(char)"
2023-02-08 04:18:34 +0100 <davean> we're calling with char and returning int
2023-02-08 04:18:45 +0100 <ghostbuster> yeah i'm fine with that
2023-02-08 04:19:01 +0100 <ghostbuster> i guess golang allows multiple return values
2023-02-08 04:19:01 +0100 <davean> ok, so interfaces in most languages can only be choosen by the paramters, not what you return
2023-02-08 04:19:27 +0100 <davean> for example "fromIntegral :: (Integral a, Num b) => a -> b "
2023-02-08 04:19:37 +0100 <davean> given anythng that is an Integral, I can produce anything that is a Num that you want
2023-02-08 04:19:54 +0100 <davean> we decide what function that is on BOTH types
2023-02-08 04:20:39 +0100 <davean> MOST language can't do that sort of thing with an interface (at least not directly)
2023-02-08 04:20:57 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 04:21:20 +0100 <davean> (The directly part is actually important, which I'm not sure you're ready to get into ATM)
2023-02-08 04:21:44 +0100 <ghostbuster> sorry afk again (keep going though, i'll need to read it a few times anyway)
2023-02-08 04:22:16 +0100 <ghostbuster> is the syntax there funName :: (inputType inputName, outputType outputName) => ...
2023-02-08 04:22:22 +0100 <ghostbuster> why do we specify a -> b?
2023-02-08 04:22:24 +0100 <davean> well we're somewhat to the limits of what I think you might be ready to absorb ATM, I just didn't want to leave asside completely that there is a touch more going on than interfaces give you
2023-02-08 04:22:29 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in)
2023-02-08 04:22:31 +0100 <dsal> :t succ . minBound
2023-02-08 04:22:32 +0100 <lambdabot> (Enum c, Bounded (a -> c)) => a -> c
2023-02-08 04:22:52 +0100 <ghostbuster> davean: i think i am near my limit :)
2023-02-08 04:22:52 +0100 <dsal> Oops. Walking my dog. Heh
2023-02-08 04:23:04 +0100 <dsal> :t succ minBound
2023-02-08 04:23:05 +0100 <lambdabot> (Enum a, Bounded a) => a
2023-02-08 04:23:09 +0100 <davean> ghostbuster: to read it off as english "The function "fromIntegral" can take any type 'a' with Integral defined for it, and give you any type 'b' with Number defined for it"
2023-02-08 04:23:18 +0100 <ghostbuster> ahh
2023-02-08 04:23:22 +0100 <ghostbuster> gotcha
2023-02-08 04:23:42 +0100 <davean> ghostbuster: to be clear, these next two things *are the same*
2023-02-08 04:23:49 +0100 <davean> "fromIntegral :: (Integral a, Num b) => a -> b"
2023-02-08 04:23:58 +0100 <davean> "fromIntegral :: (Num b, Integral a) => a -> b "
2023-02-08 04:24:14 +0100 <ghostbuster> hmm ok because they seem to invert each other
2023-02-08 04:24:20 +0100 <lechner> too much for one day, i think
2023-02-08 04:24:22 +0100 <ghostbuster> btw should i keep going with LYAH and/or are there any other sites you recommend
2023-02-08 04:24:50 +0100 <davean> Honestly they're all fine. LYAH isn't good or bad, your first one will probably surprise you enough you won't realize you're being surprised
2023-02-08 04:25:11 +0100 <davean> it'll probably be the second one you work through that you'll "Get it" on
2023-02-08 04:25:41 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br)
2023-02-08 04:25:57 +0100 <davean> there is going to be a level of expsure required to internalize it all
2023-02-08 04:26:52 +0100 <davean> two pieces of advice A) don't assume the book is completely right, and B) don't assume your understanding of it is completely right
2023-02-08 04:26:58 +0100 <davean> probably in the reverse order
2023-02-08 04:27:43 +0100 <davean> Most of the "approachable" Haskell books round off some of the rough corners and give you a slightly simplified version of it, and second you're almost definately going to miss read something the first time through
2023-02-08 04:29:57 +0100 <ghostbuster> cool
2023-02-08 04:31:38 +0100tjnhxmzhmqgytuwtGuest809
2023-02-08 04:31:44 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds)
2023-02-08 04:31:49 +0100king_gs(~Thunderbi@2806:103e:29:1779:904b:7f43:decf:5c51) (Ping timeout: 252 seconds)
2023-02-08 04:34:45 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-02-08 04:34:45 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-02-08 04:34:45 +0100finn_elijaFinnElija
2023-02-08 04:41:11 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat)
2023-02-08 04:42:13 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:4e8c::)
2023-02-08 04:42:49 +0100king_gs(~Thunderbi@187.201.41.239)
2023-02-08 04:48:58 +0100johnw(~johnw@2600:1700:cf00:db0:6c1f:968f:ea89:5c51) (Quit: ZNC - http://znc.in)
2023-02-08 04:50:03 +0100czy`(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Remote host closed the connection)
2023-02-08 04:50:03 +0100czy(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Remote host closed the connection)
2023-02-08 04:52:09 +0100jero98772(~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb) (Remote host closed the connection)
2023-02-08 04:56:25 +0100 <EvanR> ghostbuster, Integral and Num aren't types but type classes
2023-02-08 04:56:47 +0100 <EvanR> confusing at first since Char and Int are types and have caps
2023-02-08 05:00:23 +0100 <davean> I thought I disabused them of that notion, but maybe not directly enough
2023-02-08 05:01:28 +0100 <EvanR> turning the disabuse up to 11
2023-02-08 05:01:54 +0100td_(~td@i5387092C.versanet.de) (Ping timeout: 260 seconds)
2023-02-08 05:03:38 +0100td_(~td@i53870902.versanet.de)
2023-02-08 05:03:53 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2023-02-08 05:04:40 +0100Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2023-02-08 05:04:52 +0100ddellaco1(~ddellacos@146.70.165.234)
2023-02-08 05:06:07 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2023-02-08 05:06:20 +0100ddellacosta(~ddellacos@146.70.166.234) (Ping timeout: 260 seconds)
2023-02-08 05:07:57 +0100falafel(~falafel@2607:fb91:143f:e47f:40a:c679:74d:6469)
2023-02-08 05:09:17 +0100Flow(~none@gentoo/developer/flow) (Ping timeout: 246 seconds)
2023-02-08 05:10:33 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-02-08 05:12:51 +0100kee(~~kee@user/wizzwizz4) (Ping timeout: 252 seconds)
2023-02-08 05:12:51 +0100king_gs(~Thunderbi@187.201.41.239) (Read error: Connection reset by peer)
2023-02-08 05:13:19 +0100king_gs(~Thunderbi@2806:103e:29:1779:9d49:6db4:ea03:1907)
2023-02-08 05:17:58 +0100 <jle`> hi :) can I specify somewhere on the local filesystem with source-repository-package in cabal.project?
2023-02-08 05:18:15 +0100 <jle`> if i put in a relative filepath then it says repository <local> doesn't exist
2023-02-08 05:19:18 +0100 <jle`> hm just found the docs, it looks like no
2023-02-08 05:23:09 +0100Flow(~none@gentoo/developer/flow)
2023-02-08 05:25:09 +0100 <jackdk> jle`: have you tried `packages: . ../../path/to/your/other/package`?
2023-02-08 05:25:29 +0100 <jackdk> that might work, I do not remember. Note that `.` is still there for the package you're hacking on.
2023-02-08 05:26:16 +0100king_gs(~Thunderbi@2806:103e:29:1779:9d49:6db4:ea03:1907) (Ping timeout: 252 seconds)
2023-02-08 05:37:47 +0100slack1256(~slack1256@186.11.100.232) (Ping timeout: 252 seconds)
2023-02-08 05:40:57 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 05:41:30 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Client Quit)
2023-02-08 05:43:11 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 05:44:48 +0100troydm(~troydm@user/troydm)
2023-02-08 05:52:38 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 05:52:39 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 05:53:03 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) ()
2023-02-08 05:56:09 +0100Vajb(~Vajb@2001:999:404:9516:d621:6cbe:c71e:5686) (Read error: Connection reset by peer)
2023-02-08 05:56:22 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2023-02-08 06:04:52 +0100andrewboltachev(~andrey@178.141.147.162)
2023-02-08 06:05:50 +0100echoreply(~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d) (Ping timeout: 260 seconds)
2023-02-08 06:09:02 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2023-02-08 06:09:34 +0100Vajb(~Vajb@2001:999:404:9516:d621:6cbe:c71e:5686)
2023-02-08 06:10:56 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 248 seconds)
2023-02-08 06:15:23 +0100ddellaco1(~ddellacos@146.70.165.234) (Ping timeout: 248 seconds)
2023-02-08 06:18:49 +0100echoreply(~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d)
2023-02-08 06:30:35 +0100king_gs(~Thunderbi@187.201.41.239)
2023-02-08 06:33:11 +0100lbseale(~quassel@user/ep1ctetus) (Ping timeout: 264 seconds)
2023-02-08 06:34:37 +0100thegeekinside(~thegeekin@189.180.83.186) (Ping timeout: 252 seconds)
2023-02-08 06:46:43 +0100[Leary](~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
2023-02-08 06:48:09 +0100[Leary](~Leary]@user/Leary/x-0910699)
2023-02-08 06:48:30 +0100michalz(~michalz@185.246.204.125)
2023-02-08 06:50:51 +0100king_gs1(~Thunderbi@2806:103e:29:1779:d49d:8027:303:6836)
2023-02-08 06:51:29 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-02-08 06:51:39 +0100king_gs(~Thunderbi@187.201.41.239) (Ping timeout: 248 seconds)
2023-02-08 06:51:39 +0100king_gs1king_gs
2023-02-08 06:51:55 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 260 seconds)
2023-02-08 06:52:35 +0100 <jle`> ooh
2023-02-08 06:53:42 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2023-02-08 06:53:42 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2023-02-08 06:53:42 +0100gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2023-02-08 06:54:07 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-02-08 06:54:11 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-02-08 06:54:25 +0100 <jle`> that works, i think! thanks! :D
2023-02-08 06:55:00 +0100gmg(~user@user/gehmehgeh)
2023-02-08 06:55:09 +0100stiell_(~stiell@gateway/tor-sasl/stiell)
2023-02-08 06:58:58 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2023-02-08 06:59:08 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-02-08 06:59:09 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-02-08 07:01:47 +0100johnw(~johnw@2600:1700:cf00:db0:49b4:fe12:640e:f573)
2023-02-08 07:02:01 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-02-08 07:13:43 +0100motherfsck(~motherfsc@user/motherfsck)
2023-02-08 07:14:26 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-02-08 07:15:41 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-02-08 07:22:47 +0100king_gs(~Thunderbi@2806:103e:29:1779:d49d:8027:303:6836) (Quit: king_gs)
2023-02-08 07:23:02 +0100king_gs(~Thunderbi@187.201.41.239)
2023-02-08 07:32:53 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2023-02-08 07:36:42 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
2023-02-08 07:38:12 +0100opticblast(~Thunderbi@172.58.80.43)
2023-02-08 07:38:56 +0100falafel(~falafel@2607:fb91:143f:e47f:40a:c679:74d:6469) (Ping timeout: 248 seconds)
2023-02-08 07:44:47 +0100opticblast(~Thunderbi@172.58.80.43) (Ping timeout: 248 seconds)
2023-02-08 07:49:16 +0100akegalj(~akegalj@93-138-121-55.adsl.net.t-com.hr)
2023-02-08 07:53:14 +0100king_gs1(~Thunderbi@2806:103e:29:1779:2e75:83f4:fb45:6a17)
2023-02-08 07:53:14 +0100king_gs(~Thunderbi@187.201.41.239) (Read error: Connection reset by peer)
2023-02-08 07:53:14 +0100king_gs1king_gs
2023-02-08 07:57:04 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 248 seconds)
2023-02-08 07:59:44 +0100king_gs(~Thunderbi@2806:103e:29:1779:2e75:83f4:fb45:6a17) (Ping timeout: 248 seconds)
2023-02-08 08:02:09 +0100kenran(~user@user/kenran)
2023-02-08 08:17:49 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2023-02-08 08:18:01 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
2023-02-08 08:18:21 +0100irrgit__(~irrgit@146.70.27.242)
2023-02-08 08:18:37 +0100freeside(~mengwong@122.11.214.168)
2023-02-08 08:19:30 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-02-08 08:21:19 +0100irrgit_(~irrgit@146.70.27.242) (Ping timeout: 252 seconds)
2023-02-08 08:23:45 +0100trev(~trev@user/trev)
2023-02-08 08:29:40 +0100ksqsf(~user@2001:da8:d800:600:55ca:77b6:4886:7934)
2023-02-08 08:30:04 +0100ksqsf`(~user@2001:da8:d800:600:55ca:77b6:4886:7934)
2023-02-08 08:36:29 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2023-02-08 08:38:34 +0100razetime(~Thunderbi@117.193.0.210)
2023-02-08 08:39:27 +0100motherfsck(~motherfsc@user/motherfsck)
2023-02-08 08:41:32 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-02-08 08:43:22 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-02-08 08:45:06 +0100charukiewicz(~charukiew@c-71-239-23-125.hsd1.il.comcast.net)
2023-02-08 08:48:05 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2023-02-08 08:48:07 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2023-02-08 08:48:48 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2023-02-08 08:49:52 +0100stiell_(~stiell@gateway/tor-sasl/stiell)
2023-02-08 08:49:59 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2023-02-08 08:50:51 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2023-02-08 08:52:06 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-02-08 08:55:07 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com)
2023-02-08 08:57:55 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:a8f5:3359:54ee:1396)
2023-02-08 08:58:51 +0100freeside(~mengwong@122.11.214.168) (Read error: Connection reset by peer)
2023-02-08 09:01:35 +0100chele(~chele@user/chele)
2023-02-08 09:02:45 +0100razetime(~Thunderbi@117.193.0.210) (Ping timeout: 252 seconds)
2023-02-08 09:03:36 +0100turlando(~turlando@user/turlando)
2023-02-08 09:10:38 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-02-08 09:12:44 +0100zeenk(~zeenk@2a02:2f04:a214:1e00::7fe)
2023-02-08 09:16:45 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-02-08 09:20:54 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-02-08 09:21:23 +0100charukiewicz(~charukiew@c-71-239-23-125.hsd1.il.comcast.net) (Quit: Client closed)
2023-02-08 09:21:33 +0100amano(~amano@45.8.223.209)
2023-02-08 09:21:41 +0100razetime(~Thunderbi@117.193.0.210)
2023-02-08 09:22:29 +0100freeside(~mengwong@129.126.62.10)
2023-02-08 09:22:35 +0100 <amano> After researching which license to use for a haskell library, I chose 0BSD which is essentialy public domain.
2023-02-08 09:24:18 +0100amano(~amano@45.8.223.209) (Client Quit)
2023-02-08 09:25:38 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2023-02-08 09:33:45 +0100_leo___(~emmanuelu@user/emmanuelux)
2023-02-08 09:34:05 +0100merijn(~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl)
2023-02-08 09:34:39 +0100xacktm(~xacktm@user/xacktm) (Ping timeout: 260 seconds)
2023-02-08 09:34:56 +0100lieven(~mal@ns2.wyrd.be) (Ping timeout: 246 seconds)
2023-02-08 09:35:05 +0100nullsh(nullsh@user/nullsh) (Ping timeout: 252 seconds)
2023-02-08 09:36:52 +0100nullsh(nullsh@user/nexeq)
2023-02-08 09:36:59 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Ping timeout: 248 seconds)
2023-02-08 09:37:00 +0100lieven(~mal@ns2.wyrd.be)
2023-02-08 09:38:14 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
2023-02-08 09:38:33 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2023-02-08 09:39:49 +0100nschoe(~q@141.101.51.197)
2023-02-08 09:40:07 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:f849:6b89:c0b7:d8b5) (Remote host closed the connection)
2023-02-08 09:40:25 +0100cheater_(~Username@user/cheater)
2023-02-08 09:41:03 +0100xacktm(~xacktm@user/xacktm)
2023-02-08 09:42:40 +0100cheater(~Username@user/cheater) (Ping timeout: 248 seconds)
2023-02-08 09:42:49 +0100cheater_cheater
2023-02-08 09:49:33 +0100cfricke(~cfricke@user/cfricke)
2023-02-08 09:50:08 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-02-08 09:50:52 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2023-02-08 09:50:52 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Client Quit)
2023-02-08 09:51:47 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 09:53:16 +0100Alex_test(~al_test@178.34.160.79) (Quit: ;-)
2023-02-08 09:54:11 +0100AlexZenon(~alzenon@178.34.160.79) (Quit: ;-)
2023-02-08 09:54:24 +0100AlexNoo(~AlexNoo@178.34.160.79) (Quit: Leaving)
2023-02-08 09:55:35 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2023-02-08 09:56:11 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 248 seconds)
2023-02-08 09:56:31 +0100ft(~ft@p508dbcc4.dip0.t-ipconnect.de) (Quit: leaving)
2023-02-08 09:57:10 +0100MajorBiscuit(~MajorBisc@145.94.153.3)
2023-02-08 09:59:29 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32)
2023-02-08 10:00:21 +0100vaibhavsagar[m](~vaibhavsa@2001:470:69fc:105::ffe) (Quit: You have been kicked for being idle)
2023-02-08 10:00:24 +0100Magnus[m](~magthetch@2001:470:69fc:105::d1a7) (Quit: You have been kicked for being idle)
2023-02-08 10:02:35 +0100freeside(~mengwong@129.126.62.10) (Ping timeout: 248 seconds)
2023-02-08 10:09:22 +0100CiaoSen(~Jura@p200300c957184d002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-02-08 10:11:11 +0100 <stefan-_> I stumbled upon an issue with automatic deriving of a Monad instance for a transformer stack: https://github.com/wkoszek/book-real-world-haskell/issues/2
2023-02-08 10:11:21 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
2023-02-08 10:11:31 +0100 <stefan-_> why is it that in previous GHC versions this did compile and in the current version not?
2023-02-08 10:12:21 +0100sshine_sshine
2023-02-08 10:14:24 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-02-08 10:15:53 +0100 <[Leary]> stefan-_: http://wiki.haskell.org/Functor-Applicative-Monad_Proposal
2023-02-08 10:21:57 +0100 <stefan-_> [Leary], thanks
2023-02-08 10:24:43 +0100AlexNoo(~AlexNoo@178.34.160.79)
2023-02-08 10:25:16 +0100Alex_test(~al_test@178.34.160.79)
2023-02-08 10:28:16 +0100AlexZenon(~alzenon@178.34.160.79)
2023-02-08 10:38:40 +0100irrgit_(~irrgit@89.47.234.74)
2023-02-08 10:40:37 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:f849:6b89:c0b7:d8b5)
2023-02-08 10:41:47 +0100irrgit__(~irrgit@146.70.27.242) (Ping timeout: 255 seconds)
2023-02-08 10:44:56 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:f849:6b89:c0b7:d8b5) (Ping timeout: 246 seconds)
2023-02-08 10:49:31 +0100bhall(~brunohall@195.147.207.136) (Ping timeout: 248 seconds)
2023-02-08 10:50:47 +0100rburkholder(~blurb@96.45.2.121) (Remote host closed the connection)
2023-02-08 10:55:29 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 10:56:10 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-02-08 10:58:40 +0100jludwig(~justin@li657-110.members.linode.com) (Read error: Connection reset by peer)
2023-02-08 10:59:36 +0100ubert(~Thunderbi@2a02:8109:abc0:6434:f835:7cff:6e4a:8bfb)
2023-02-08 11:01:12 +0100jludwig(~justin@li657-110.members.linode.com)
2023-02-08 11:01:26 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
2023-02-08 11:02:10 +0100theproffesor(~theproffe@user/theproffesor) (Ping timeout: 260 seconds)
2023-02-08 11:05:25 +0100CiaoSen(~Jura@p200300c957184d002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
2023-02-08 11:07:39 +0100johnw(~johnw@2600:1700:cf00:db0:49b4:fe12:640e:f573) (Ping timeout: 248 seconds)
2023-02-08 11:08:11 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 248 seconds)
2023-02-08 11:10:13 +0100gtdg(~gtdg@nat-inria-interne-72-gw-01-lne.lille.inria.fr)
2023-02-08 11:10:28 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2023-02-08 11:10:35 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 11:10:53 +0100jludwig(~justin@li657-110.members.linode.com) (Quit: ZNC - https://znc.in)
2023-02-08 11:11:12 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds)
2023-02-08 11:11:16 +0100gtdg(~gtdg@nat-inria-interne-72-gw-01-lne.lille.inria.fr) (Changing host)
2023-02-08 11:11:16 +0100gtdg(~gtdg@user/gtdg)
2023-02-08 11:11:55 +0100jludwig(~justin@li657-110.members.linode.com)
2023-02-08 11:11:56 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-02-08 11:13:21 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2023-02-08 11:13:23 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2023-02-08 11:15:07 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 11:15:16 +0100jludwig(~justin@li657-110.members.linode.com) (Client Quit)
2023-02-08 11:18:19 +0100ksqsf(~user@2001:da8:d800:600:55ca:77b6:4886:7934) (Ping timeout: 248 seconds)
2023-02-08 11:18:30 +0100ksqsf`(~user@2001:da8:d800:600:55ca:77b6:4886:7934) (Ping timeout: 260 seconds)
2023-02-08 11:18:58 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1))
2023-02-08 11:19:12 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-02-08 11:21:22 +0100phma(phma@2001:5b0:212a:e3d8:88c0:402f:ec64:11e8) (Read error: Connection reset by peer)
2023-02-08 11:22:22 +0100johnw(~johnw@2600:1700:cf00:db0:49b4:fe12:640e:f573)
2023-02-08 11:22:41 +0100CiaoSen(~Jura@p200300c957184d002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-02-08 11:22:53 +0100jwiegley(~jwiegley@2600:1700:cf00:db0:49b4:fe12:640e:f573)
2023-02-08 11:23:28 +0100mc47(~mc47@xmonad/TheMC47)
2023-02-08 11:23:29 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-02-08 11:23:48 +0100themc47(~mc47@xmonad/TheMC47)
2023-02-08 11:23:59 +0100themc47(~mc47@xmonad/TheMC47) (Client Quit)
2023-02-08 11:24:55 +0100phma(~phma@host-67-44-208-154.hnremote.net)
2023-02-08 11:28:34 +0100troydm(~troydm@user/troydm) (Ping timeout: 268 seconds)
2023-02-08 11:32:01 +0100 <turlando> Would you suggest checking algebraic effect systems in Haskell or is it another layer of indirection that will eventually backfire at the worst moment?
2023-02-08 11:32:17 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 11:34:23 +0100gmg(~user@user/gehmehgeh)
2023-02-08 11:36:46 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2023-02-08 11:38:33 +0100 <merijn> turlando: tbh, I'm not so convinced by them
2023-02-08 11:38:56 +0100 <merijn> But, as in all things "It Depends (TM)"
2023-02-08 11:38:58 +0100gehmehgeh(~user@user/gehmehgeh)
2023-02-08 11:39:34 +0100 <turlando> I was not expecting a binary answer indeed :)
2023-02-08 11:39:50 +0100 <merijn> turlando: Personally I'm a big believer in the fact that "just" IO heavy imperative Haskell will get you quite far
2023-02-08 11:39:55 +0100enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
2023-02-08 11:39:56 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 11:40:37 +0100 <merijn> So unless there's specific things/ideas/designs that require algebraic effects, I wouldn't invest too heavily until it's needed
2023-02-08 11:41:44 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:7c30:9144:ce25:cdcc)
2023-02-08 11:42:02 +0100 <turlando> From what I see the primary advantages are: 1. no complex stacks of nested monads; 2. dynamic dispatch of effects when needed (+ decoupling). Not sure if there's more
2023-02-08 11:44:00 +0100 <merijn> tbh, I think (visible) monad stacks are also an anti-pattern. Aggressively newtyping to hide those is the most robust way to go in my experience. And while I dislike the actual mtl classes (they are too generic, combined with instance uniqueness that's a PITA), mtl-style classes for high level operations work quite well
2023-02-08 11:45:55 +0100CiaoSen(~Jura@p200300c957184d002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2023-02-08 11:46:29 +0100 <stefan-_> merijn, isnt pure IO harder to test?
2023-02-08 11:47:03 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:7c30:9144:ce25:cdcc) (Ping timeout: 255 seconds)
2023-02-08 11:47:31 +0100 <merijn> stefan-_: compared to?
2023-02-08 11:48:01 +0100 <stefan-_> for example compared to providing a custom type class with different implementations for production and testing
2023-02-08 11:48:44 +0100michalz(~michalz@185.246.204.125) (Read error: Connection reset by peer)
2023-02-08 11:48:53 +0100 <merijn> I don't see much value in "a different implementation for testing", what's the value of tests if they're running wildly different code then production?
2023-02-08 11:49:02 +0100michalz(~michalz@185.246.204.101)
2023-02-08 11:49:32 +0100 <turlando> Isn't that kind of an antipattern? Can't you just pass different implementations to your functions at that point? If code complexity doesn't explode. Not sure if I got the question right actually
2023-02-08 11:50:12 +0100gmg(~user@user/gehmehgeh)
2023-02-08 11:50:32 +0100 <merijn> I consider upwards of 90% of mocking and similar things an antipattern :p
2023-02-08 11:51:11 +0100gehmehgeh(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 11:51:51 +0100bhall(~brunohall@195.147.207.136)
2023-02-08 11:52:37 +0100 <turlando> Also talking about antipatterns is an antipattern
2023-02-08 11:53:08 +0100__monty__(~toonn@user/toonn)
2023-02-08 11:58:45 +0100 <stefan-_> merijn, it allows you to test units in isolation
2023-02-08 11:59:33 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 12:00:22 +0100 <merijn> Except you're not testing in isolation, you're still *also* exercising the surrounding code (and potentially triggering bugs in that), except instead of exercising your surrounding production code (good!), you are exercising the entirely useless test code
2023-02-08 12:00:45 +0100 <kuribas> This, and in python it's 99.9% of mocking
2023-02-08 12:01:14 +0100 <kuribas> You can mock if you don't have a choice, and then you need to be careful that the mocking code actually matches the thing you mock closely.
2023-02-08 12:01:21 +0100 <kuribas> But no reason to mock database calls.
2023-02-08 12:04:14 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 260 seconds)
2023-02-08 12:04:43 +0100nschoe(~q@141.101.51.197) (Ping timeout: 248 seconds)
2023-02-08 12:05:03 +0100 <kuribas> It also makes sense to take out business logic into pure code.
2023-02-08 12:05:07 +0100 <kuribas> That can be tested.
2023-02-08 12:05:30 +0100 <kuribas> But often you just have light wrapper code, in that case it's just better to test with the thing you wrap.
2023-02-08 12:05:47 +0100razetime(~Thunderbi@117.193.0.210) (Ping timeout: 248 seconds)
2023-02-08 12:10:20 +0100xff0x(~xff0x@2405:6580:b080:900:876a:aa31:e2c4:b726)
2023-02-08 12:12:31 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 12:14:52 +0100Feuermagier(~Feuermagi@user/feuermagier)
2023-02-08 12:15:31 +0100 <tomsmeding> disclaimer, I have worked very little with actually large production codebases
2023-02-08 12:15:54 +0100 <tomsmeding> is excessive use of mocking a sign that setting up a production environment for the application is too difficult?
2023-02-08 12:16:16 +0100 <dminuoso> Indeed, whatever the reason may be.
2023-02-08 12:16:20 +0100jludwig(~justin@li657-110.members.linode.com)
2023-02-08 12:16:26 +0100 <tomsmeding> when kuribas says "no reason to mock database calls", I say "there is, I hate having to set up a postgres instance on my machine just to test this bloody piece of code"
2023-02-08 12:16:41 +0100 <tomsmeding> but that can be reinterpreted into what I said above
2023-02-08 12:17:03 +0100 <dminuoso> I've started to love nix even further because nixos-lib tests are so amazing.
2023-02-08 12:17:07 +0100 <tomsmeding> I don't test ircbrowse locally because I don't want to set up postgres locally
2023-02-08 12:17:25 +0100 <dminuoso> You can very easily wire up postgresql, multiple VMs, do wireguard between them, and what not
2023-02-08 12:17:25 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 260 seconds)
2023-02-08 12:17:26 +0100 <kuribas> tomsmeding: you just let the infra guys set this up :)
2023-02-08 12:17:27 +0100 <tomsmeding> (now ircbrowse gets like 2 commits per year so it's not like that's a critical problem, but eh)
2023-02-08 12:17:27 +0100 <dminuoso> and then do your tests.
2023-02-08 12:17:40 +0100 <dminuoso> tomsmeding: You should use nix then! :p
2023-02-08 12:17:47 +0100 <tomsmeding> dminuoso: I can also set up a docker container and do tests in that, I know how that works to an extent
2023-02-08 12:17:56 +0100 <kuribas> tomsmeding: then you run the code on the CI/CD to see if it checks :)
2023-02-08 12:18:05 +0100 <tomsmeding> I... could
2023-02-08 12:18:07 +0100 <dminuoso> tomsmeding: the nasty thing about docker is you dont have a coherent language on how to configure the postgresql inside.
2023-02-08 12:18:18 +0100 <dminuoso> tomsmeding: you get that mess of a large bunch of dockerfiles, that you must somehow construct.
2023-02-08 12:18:38 +0100 <kuribas> tomsmeding: but if your code depends on queries which are non-trivial, you will want to test them anyway.
2023-02-08 12:18:39 +0100 <tomsmeding> dminuoso: nothing has a coherent language to configure postgresql and haskell and ircbrowse
2023-02-08 12:18:52 +0100 <tomsmeding> kuribas: I'm not disputing that
2023-02-08 12:18:53 +0100 <dminuoso> tomsmeding: nix does :o
2023-02-08 12:19:00 +0100 <tomsmeding> I'm not saying that "not testing" is a good thing :p
2023-02-08 12:19:02 +0100 <dminuoso> well nixos rather.
2023-02-08 12:19:07 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Quit: use-value)
2023-02-08 12:19:12 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-02-08 12:19:23 +0100 <tomsmeding> dminuoso: _configuring_ postgresql? Including setting up users and databases?
2023-02-08 12:19:28 +0100 <dminuoso> tomsmeding: Yes.
2023-02-08 12:19:33 +0100tomsmedingimpressed
2023-02-08 12:19:50 +0100 <tomsmeding> this, by the way, is why pastebin and playground use sqlite
2023-02-08 12:19:56 +0100 <tomsmeding> you know how I set up a local sqlite database?
2023-02-08 12:19:58 +0100 <tomsmeding> I don't
2023-02-08 12:19:59 +0100 <kuribas> tomsmeding: not implying you did :) But if you are testing this already, the mocks seems superfluous.
2023-02-08 12:20:02 +0100 <tomsmeding> it gets created automaticallu
2023-02-08 12:20:18 +0100 <tomsmeding> kuribas: if you're testing what already?
2023-02-08 12:20:29 +0100 <kuribas> queries, integration...
2023-02-08 12:20:33 +0100 <tomsmeding> true
2023-02-08 12:20:52 +0100 <tomsmeding> if you're testing your queries against the real database, you have a real database to test against, so you shouldn't go mocking your real database
2023-02-08 12:21:17 +0100 <tomsmeding> which I guess is what you're saying
2023-02-08 12:21:35 +0100 <kuribas> indeed
2023-02-08 12:22:09 +0100 <tomsmeding> if running against the real thing was as easy as running against a mock, then you can save effort by not writing the mock
2023-02-08 12:22:14 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 12:22:20 +0100 <tomsmeding> hence my claim, mocks are a sign that running a production environment is too hard
2023-02-08 12:22:50 +0100 <tomsmeding> which, granted, might be because it's actually almost impossible due to needing to interface with licensed external services or other crap
2023-02-08 12:22:54 +0100 <tomsmeding> which I guess occurs in companies
2023-02-08 12:23:02 +0100 <dminuoso> tomsmeding: Let me conjure up a simple example
2023-02-08 12:23:06 +0100 <tomsmeding> but then you want CI
2023-02-08 12:23:10 +0100 <tomsmeding> which _can_
2023-02-08 12:23:19 +0100 <tomsmeding> dminuoso: don't spend time on it :p
2023-02-08 12:23:31 +0100 <tomsmeding> dminuoso: I won't be using it for ircbrowse because I'm too lazy there anyway
2023-02-08 12:23:39 +0100 <tomsmeding> I mean, I'm curious, but you know
2023-02-08 12:26:38 +0100gtdg(~gtdg@user/gtdg) (Ping timeout: 260 seconds)
2023-02-08 12:29:09 +0100 <dminuoso> tomsmeding: https://gist.github.com/dminuoso/4b23c4c5636b3232b55b79a10d279110
2023-02-08 12:29:34 +0100 <dminuoso> And of course, if you go all in with nixos anyway, you can just use whatever nixos config you push to your server directly
2023-02-08 12:29:58 +0100 <dminuoso> You can set up multiple VMs, coordinate tests between them, wait on conditions between the servers
2023-02-08 12:29:59 +0100gmg(~user@user/gehmehgeh)
2023-02-08 12:30:00 +0100 <dminuoso> and all
2023-02-08 12:30:13 +0100irrgit__(~irrgit@176.113.74.130)
2023-02-08 12:30:15 +0100 <kuribas> tomsmeding: btw, I had like 20 queries, and a batching query system which "just worked", except for 1 faulty query.
2023-02-08 12:30:47 +0100 <kuribas> tomsmeding: I didn't have tests, it was just tested in production (it's a tool internally used by OPS).
2023-02-08 12:30:58 +0100 <tomsmeding> dminuoso: that's cool
2023-02-08 12:31:03 +0100 <tomsmeding> what language is testScript written in?
2023-02-08 12:31:08 +0100 <dminuoso> Python
2023-02-08 12:31:12 +0100 <tomsmeding> (I get that's the least important point of the snippet)
2023-02-08 12:31:19 +0100 <dminuoso> You can get a repl from that context too for neat debugging
2023-02-08 12:31:23 +0100 <tomsmeding> nice
2023-02-08 12:31:47 +0100 <tomsmeding> kuribas: it was an internal tool?
2023-02-08 12:31:50 +0100 <dminuoso> It runs directly on qemu and it happens all inside nix.
2023-02-08 12:31:55 +0100razetime(~Thunderbi@117.193.0.210)
2023-02-08 12:32:01 +0100 <tomsmeding> dminuoso: QEMU? that was... unexpected
2023-02-08 12:32:02 +0100 <dminuoso> So all you have to do is `nix-build test.nix` and it will do all the things
2023-02-08 12:32:04 +0100 <kuribas> tomsmeding: yes
2023-02-08 12:32:16 +0100 <tomsmeding> dminuoso: why does this start up a VM
2023-02-08 12:32:18 +0100 <kuribas> tomsmeding: except now it's being rewritten in clojure :(
2023-02-08 12:32:22 +0100 <tomsmeding> kuribas: F
2023-02-08 12:32:31 +0100 <tomsmeding> how did you find out about the faulty query
2023-02-08 12:32:38 +0100 <dminuoso> tomsmeding: well because its a multi machine test. You can set up multiple servers, and it will do networking between them.
2023-02-08 12:32:49 +0100 <kuribas> tomsmeding: it was OPS :-P
2023-02-08 12:33:07 +0100 <dminuoso> so for example if your reality already is "separate database" and "separate web server", this lets you not just "mimic it", but construct it as if it were reality
2023-02-08 12:33:14 +0100 <dminuoso> it will then push the nixos closure *as you want it* to those VMs
2023-02-08 12:33:17 +0100 <tomsmeding> /define OPS
2023-02-08 12:33:18 +0100 <dminuoso> so you can test entire server setups
2023-02-08 12:33:21 +0100 <kuribas> tomsmeding: the query itself was valid, but looking for a wrong datapath that didn't exist, so not returning those values.
2023-02-08 12:33:21 +0100 <dminuoso> not just singular software.
2023-02-08 12:33:24 +0100irrgit_(~irrgit@89.47.234.74) (Ping timeout: 260 seconds)
2023-02-08 12:33:33 +0100 <dminuoso> tomsmeding: so think of it as a wholemeal server configuration test framework.
2023-02-08 12:33:38 +0100 <tomsmeding> dminuoso: oooooh
2023-02-08 12:33:52 +0100 <dminuoso> for nixos servers.
2023-02-08 12:33:53 +0100 <tomsmeding> kuribas: ah
2023-02-08 12:34:08 +0100 <tomsmeding> dminuoso: sneaky postscript
2023-02-08 12:34:09 +0100 <dminuoso> you can of course use this for non-nixos situations, where you just use nixos to quickly get a database up and running
2023-02-08 12:34:12 +0100irrgit_(~irrgit@176.113.74.130)
2023-02-08 12:34:25 +0100 <tomsmeding> right, that makes sense
2023-02-08 12:35:03 +0100 <dminuoso> much of nixos modules (the things that define what options are available, and what they do) are in fact tested with the same machinery
2023-02-08 12:35:05 +0100 <kuribas> tomsmeding: but the effort required for testing all those queries, including the batching, would be way more than the time it took for OPS to find it and for me to fix it/
2023-02-08 12:35:10 +0100 <dminuoso> which is something you dont have much in other distributions
2023-02-08 12:35:12 +0100irrgit__(~irrgit@176.113.74.130) (Ping timeout: 255 seconds)
2023-02-08 12:35:20 +0100 <tomsmeding> kuribas: :)
2023-02-08 12:36:10 +0100 <dminuoso> What i found amazing, is when I forgot to enable hardware virtualization support in my CPU, that for one of our projects the qemu-based test suite still finished in about 40ish seconds.
2023-02-08 12:36:21 +0100 <tomsmeding> heh because qemu is cool
2023-02-08 12:36:27 +0100 <dminuoso> With kvm working, it was sped up to about 4-5s (that's including setup, running, and teardown)
2023-02-08 12:36:32 +0100 <dminuoso> but 40ish seconds is still amazing fast.
2023-02-08 12:36:35 +0100 <tomsmeding> yeah
2023-02-08 12:36:35 +0100 <dminuoso> for full blown cpu emulation
2023-02-08 12:36:45 +0100 <tomsmeding> so factor 10 slowdown, roundabout?
2023-02-08 12:36:47 +0100 <tomsmeding> that's nice
2023-02-08 12:36:48 +0100 <dminuoso> yeah
2023-02-08 12:37:05 +0100tomsmedingwonders if QEMU does JIT
2023-02-08 12:37:15 +0100 <dminuoso> It does
2023-02-08 12:37:17 +0100 <tomsmeding> then that could be even faster perhaps
2023-02-08 12:37:32 +0100 <tomsmeding> though it's a hard language to jit I guess
2023-02-08 12:38:02 +0100 <dminuoso> There's TCG
2023-02-08 12:38:17 +0100 <tomsmeding> nice name
2023-02-08 12:38:27 +0100 <dminuoso> Its quite possible, that if the target architecture is the same as the native hardware, then performance hits arent too bad
2023-02-08 12:38:39 +0100 <dminuoso> because mostly qemu just has to emulate sysenter and memory
2023-02-08 12:38:56 +0100 <tomsmeding> well memory emulation is a thing :p
2023-02-08 12:39:08 +0100 <tomsmeding> significant proportion of instructions do something with memory
2023-02-08 12:39:11 +0100 <dminuoso> sure, but Im saying that much of the cpu instructions can be translated 1:1
2023-02-08 12:39:16 +0100 <tomsmeding> hardly
2023-02-08 12:39:31 +0100 <dminuoso> Mmm
2023-02-08 12:39:34 +0100 <tomsmeding> a large percentage of instructions in a production app are memory-using instructions
2023-02-08 12:39:51 +0100 <tomsmeding> if you're doing significant numerical calculations you may have chunks of code that use registers only
2023-02-08 12:39:58 +0100 <tomsmeding> but that's not really what crud apps do
2023-02-08 12:40:31 +0100 <tomsmeding> but cool stuff, I wasn't aware of all this
2023-02-08 12:40:35 +0100 <dminuoso> I would have expected a much much steeper slowdown
2023-02-08 12:40:42 +0100 <dminuoso> Something factor 100 or so
2023-02-08 12:40:45 +0100 <tomsmeding> without JIT yes for sure
2023-02-08 12:41:00 +0100 <tomsmeding> with JIT I might have expected it to be a little faster than 10x actually
2023-02-08 12:41:03 +0100 <tomsmeding> but not much per se
2023-02-08 12:41:17 +0100 <tomsmeding> because the language you're JITting is too low level
2023-02-08 12:42:43 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-02-08 12:43:10 +0100 <dminuoso> Also in related nix news, with haskell.nix to build a fully statically linked binary, all I had to do is replace `pkgs` with `pkgs.pkgsCross.musl64`, and by pure magic a statically linked haskell executable fell out.
2023-02-08 12:43:51 +0100 <dminuoso> For reasons that are somewhat beyond me, its also only 10MiB in size compared to 40ish MiB when built inside an alpine container with `cabal-install`
2023-02-08 12:44:09 +0100 <dminuoso> despite latter having been `stripped` and the former not.
2023-02-08 12:44:12 +0100 <tomsmeding> dminuoso: what do you get if you `nm` the resulting executable
2023-02-08 12:44:13 +0100 <tomsmeding> oh
2023-02-08 12:44:17 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 12:44:21 +0100 <tomsmeding> what if you don't strip :p
2023-02-08 12:44:29 +0100 <dminuoso> then the alpine thing gets even larger?
2023-02-08 12:44:30 +0100gmg(~user@user/gehmehgeh)
2023-02-08 12:44:37 +0100 <dminuoso> But it may also be just the GHC version
2023-02-08 12:44:44 +0100 <tomsmeding> yeah but I wonder if there are more functions in there, hence more names
2023-02-08 12:44:46 +0100 <dminuoso> since in nix Im using 9.2 now
2023-02-08 12:44:48 +0100 <tomsmeding> ah
2023-02-08 12:44:55 +0100 <dminuoso> and on alpine it was 8.10 I think
2023-02-08 12:45:01 +0100 <tomsmeding> that's definitely a possibly large confounding factor
2023-02-08 12:55:50 +0100underlap(~underlap@229.171.115.87.dyn.plus.net)
2023-02-08 12:57:42 +0100CiaoSen(~Jura@p200300c957184d002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-02-08 13:00:56 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 13:03:25 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 13:08:28 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
2023-02-08 13:12:59 +0100 <underlap> I have been successfully using stack on macOS, but I am trying it now on linux and am consistently getting connection failures (error: [S-775]). Any clues for how to debug this please?
2023-02-08 13:13:05 +0100 <underlap> Error: [S-775]
2023-02-08 13:13:05 +0100 <underlap> Exception while reading snapshot from https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/9.yaml (c11fcbeb1aa12761044755b1109d16952ede2cb6147ebde777dd5cb38f784501,649333):
2023-02-08 13:13:05 +0100 <underlap> HttpExceptionRequest Request {
2023-02-08 13:13:05 +0100 <underlap> host = "raw.githubusercontent.com"
2023-02-08 13:13:05 +0100 <underlap> port = 443
2023-02-08 13:13:06 +0100 <underlap> secure = True
2023-02-08 13:13:08 +0100 <underlap> requestHeaders = [("User-Agent","Haskell pantry package")]
2023-02-08 13:13:10 +0100 <underlap> path = "/commercialhaskell/stackage-snapshots/master/lts/20/9.yaml"
2023-02-08 13:13:12 +0100 <underlap> queryString = ""
2023-02-08 13:13:14 +0100 <underlap> method = "GET"
2023-02-08 13:13:16 +0100 <underlap> proxy = Nothing
2023-02-08 13:13:18 +0100 <underlap> rawBody = False
2023-02-08 13:13:20 +0100 <underlap> redirectCount = 10
2023-02-08 13:13:22 +0100 <underlap> responseTimeout = ResponseTimeoutDefault
2023-02-08 13:13:26 +0100 <underlap> requestVersion = HTTP/1.1
2023-02-08 13:13:28 +0100 <underlap> proxySecureMode = ProxySecureWithConnect
2023-02-08 13:13:30 +0100 <underlap> }
2023-02-08 13:13:32 +0100 <underlap> (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just "raw.githubusercontent.com", service name: Just "443"): does not exist (Try again))
2023-02-08 13:13:36 +0100jludwig(~justin@li657-110.members.linode.com) (Quit: ZNC - https://znc.in)
2023-02-08 13:14:21 +0100 <maerwald> underlap: please don't paste more than 3 lines into the channel
2023-02-08 13:14:24 +0100 <underlap> If I open the link in a browser, I can see the YAML contents ok.
2023-02-08 13:14:31 +0100 <maerwald> @where paste
2023-02-08 13:14:31 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2023-02-08 13:14:39 +0100 <underlap> maerwald: oops sorry
2023-02-08 13:15:28 +0100 <underlap> Here's the output: https://paste.tomsmeding.com/DpvUkIXo
2023-02-08 13:18:36 +0100gmg(~user@user/gehmehgeh)
2023-02-08 13:21:20 +0100akegalj(~akegalj@93-138-121-55.adsl.net.t-com.hr) (Quit: leaving)
2023-02-08 13:22:17 +0100 <underlap> In case the above was garbled, I am issuing `stack test` on linux against a project which works fine on macOS and I get the connection failure error shown here: https://paste.tomsmeding.com/DpvUkIXo Any clue for debugging this please?
2023-02-08 13:24:31 +0100 <mauke> that sounds like it couldn't resolve the raw.githubusercontent.com hostname
2023-02-08 13:24:37 +0100 <mauke> network issue?
2023-02-08 13:25:39 +0100 <underlap> Probably. Just found a useful clue...
2023-02-08 13:26:50 +0100mmhat(~mmh@p200300f1c7069003ee086bfffe095315.dip0.t-ipconnect.de)
2023-02-08 13:27:26 +0100 <underlap> Ah, turns out it was a known issue with arch linux: https://github.com/commercialhaskell/stack/issues/5634
2023-02-08 13:27:46 +0100 <underlap> Sorry for troubling you (and for flooding the chat earlier!)
2023-02-08 13:28:50 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 13:29:42 +0100nschoe(~q@141.101.51.197)
2023-02-08 13:30:33 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: leaving)
2023-02-08 13:31:37 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:33:38 +0100gmg(~user@user/gehmehgeh)
2023-02-08 13:33:48 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
2023-02-08 13:34:01 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2023-02-08 13:34:30 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:38:17 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 13:39:05 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
2023-02-08 13:39:26 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:41:19 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
2023-02-08 13:41:40 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:41:50 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
2023-02-08 13:42:07 +0100gmg(~user@user/gehmehgeh)
2023-02-08 13:42:55 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:44:17 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
2023-02-08 13:44:36 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0)
2023-02-08 13:44:40 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:44:40 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
2023-02-08 13:45:04 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-02-08 13:46:20 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 13:46:50 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 13:48:08 +0100gmg(~user@user/gehmehgeh)
2023-02-08 13:49:07 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0) (Ping timeout: 252 seconds)
2023-02-08 13:51:01 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
2023-02-08 13:52:58 +0100jludwig(~justin@li657-110.members.linode.com)
2023-02-08 13:55:45 +0100underlap(~underlap@229.171.115.87.dyn.plus.net) (Quit: Leaving)
2023-02-08 13:57:12 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-02-08 13:57:38 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2023-02-08 14:07:21 +0100Kaizer(~kaizer@user/Kaizer)
2023-02-08 14:09:19 +0100pernzs(~pernzs@101.175.168.100)
2023-02-08 14:14:42 +0100razetime(~Thunderbi@117.193.0.210) (Remote host closed the connection)
2023-02-08 14:20:45 +0100dgpratt[m](~dgprattma@2001:470:69fc:105::1:dcdd)
2023-02-08 14:21:43 +0100Kaizer(~kaizer@user/Kaizer) (Remote host closed the connection)
2023-02-08 14:27:58 +0100notzmv(~zmv@user/notzmv) (Remote host closed the connection)
2023-02-08 14:29:15 +0100mmhat(~mmh@p200300f1c7069003ee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-02-08 14:31:06 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 14:31:56 +0100dsrt^(~dsrt@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection)
2023-02-08 14:36:27 +0100andrewboltachev(~andrey@178.141.147.162) (Quit: Leaving.)
2023-02-08 14:41:08 +0100akegalj(~akegalj@37-128.dsl.iskon.hr)
2023-02-08 14:44:47 +0100mmhat(~mmh@p200300f1c716b0c2ee086bfffe095315.dip0.t-ipconnect.de)
2023-02-08 14:44:47 +0100gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2023-02-08 14:47:16 +0100cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2023-02-08 14:50:13 +0100gentauro(~gentauro@user/gentauro)
2023-02-08 14:53:20 +0100buggy(~buggy@14.139.82.6)
2023-02-08 14:53:34 +0100buggy(~buggy@14.139.82.6) (Client Quit)
2023-02-08 14:54:41 +0100enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Remote host closed the connection)
2023-02-08 14:56:00 +0100enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
2023-02-08 14:59:12 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-02-08 15:05:18 +0100tristanC_(~tristanC@user/tristanc) (Remote host closed the connection)
2023-02-08 15:07:15 +0100troydm(~troydm@user/troydm)
2023-02-08 15:11:21 +0100ddellacosta(~ddellacos@143.244.47.81)
2023-02-08 15:12:27 +0100bhall(~brunohall@195.147.207.136) (Ping timeout: 248 seconds)
2023-02-08 15:18:19 +0100thegeekinside(~thegeekin@189.180.83.186)
2023-02-08 15:19:23 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 15:21:30 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 15:22:38 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) ()
2023-02-08 15:23:27 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 15:24:03 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 15:29:04 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 252 seconds)
2023-02-08 15:30:59 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-02-08 15:34:42 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) (Quit: leaving)
2023-02-08 15:35:24 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 15:36:08 +0100 <rettahcay> whois rettahcay
2023-02-08 15:36:44 +0100 <Hecate> no idea
2023-02-08 15:37:16 +0100Midjak(~Midjak@82.66.147.146)
2023-02-08 15:37:46 +0100 <rettahcay> never mind! sorry :-)
2023-02-08 15:38:38 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) (Client Quit)
2023-02-08 15:41:47 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 15:42:03 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 15:44:08 +0100 <jean-paul[m]> with megaparsec, is the definition of a Parser a, is there a way to compose with a Parser b but require that it match exactly some number of tokens? (eg, to implement parsing of the values inside netstrings)
2023-02-08 15:44:38 +0100 <rettahcay> hello folks. I'm a haskell beginner. looking for a good resource to learn Monads. Any suggestions? Thanks
2023-02-08 15:44:43 +0100 <jean-paul[m]> I wrote a thing where I just call parse again inside the Parser a and do a bunch of work to convert the error type of parse back to the internal error type of Parser ... it's so gross
2023-02-08 15:45:57 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-02-08 15:46:22 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 15:48:23 +0100 <merijn> rettahcay: How beginner are we talking? :)
2023-02-08 15:48:29 +0100 <ddellacosta> rettahcay: I think Graham Hutton's explanation in Programming in Haskell is very good http://www.cs.nott.ac.uk/~pszgmh/pih.html Roughly the same as what you can find here I believe, so you don't have to buy the book to see http://www.cs.nott.ac.uk/~pszgmh/bib.html#pearl I'm making some assumptions about what you're comfortable with--but honestly, there are plenty of great resources for this and
2023-02-08 15:48:31 +0100 <ddellacosta> it will probably take banging your head against it for a while until it clicks. Don't give up and keep asking questions.
2023-02-08 15:51:18 +0100 <geekosaur> @where iotut
2023-02-08 15:51:18 +0100 <lambdabot> https://www.vex.net/~trebla/haskell/IO.xhtml
2023-02-08 15:52:04 +0100 <geekosaur> there's not actually a lot to understand about monads as such. there's a lot to understand about IO, but IO is special because it's IO, not because it's a monad
2023-02-08 15:54:12 +0100kurbus(~kurbus@user/kurbus)
2023-02-08 15:55:03 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2023-02-08 15:58:16 +0100kurbus(~kurbus@user/kurbus) (Client Quit)
2023-02-08 15:58:22 +0100kurbus31(~kurbus@user/kurbus)
2023-02-08 15:58:35 +0100kurbus31kurbus
2023-02-08 16:02:43 +0100jero98772(~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb)
2023-02-08 16:03:43 +0100Guest3769(~Guest37@ip1f13ab93.dynamic.kabel-deutschland.de)
2023-02-08 16:06:15 +0100pernzs(~pernzs@101.175.168.100) (Quit: Client closed)
2023-02-08 16:07:34 +0100Luj(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Quit: The Lounge - https://thelounge.chat)
2023-02-08 16:08:27 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-02-08 16:08:40 +0100Luj(~Luj@2a01:e0a:5f9:9681:e45d:27d5:311f:767e)
2023-02-08 16:11:29 +0100hounded(~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com)
2023-02-08 16:11:49 +0100hounded_woodstoc(~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com)
2023-02-08 16:13:04 +0100mei(~mei@user/mei) (Ping timeout: 252 seconds)
2023-02-08 16:17:31 +0100mechap(~mechap@user/mechap) (Ping timeout: 248 seconds)
2023-02-08 16:17:36 +0100Guest31(~Guest31@45.247.234.245)
2023-02-08 16:19:43 +0100mechap(~mechap@user/mechap)
2023-02-08 16:22:19 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-02-08 16:23:08 +0100cheater(~Username@user/cheater)
2023-02-08 16:31:55 +0100marinelli(~marinelli@gateway/tor-sasl/marinelli)
2023-02-08 16:34:18 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) (Quit: leaving)
2023-02-08 16:36:18 +0100varoo(~varoo@2a09:bac1:3680:5f70::ca:84)
2023-02-08 16:36:45 +0100Guest3769(~Guest37@ip1f13ab93.dynamic.kabel-deutschland.de) (Quit: Client closed)
2023-02-08 16:36:49 +0100Sgeo(~Sgeo@user/sgeo)
2023-02-08 16:38:16 +0100ddellacosta(~ddellacos@143.244.47.81) (Quit: WeeChat 3.7.1)
2023-02-08 16:38:19 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 16:38:31 +0100ddellacosta(~ddellacos@143.244.47.81)
2023-02-08 16:39:21 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:a8f5:3359:54ee:1396) (Quit: WeeChat 2.8)
2023-02-08 16:40:02 +0100varoo(~varoo@2a09:bac1:3680:5f70::ca:84) (Client Quit)
2023-02-08 16:42:22 +0100 <kuribas> geekosaur: interestingly, IO was modelled after monads.
2023-02-08 16:42:33 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 16:44:38 +0100marinelli(~marinelli@gateway/tor-sasl/marinelli) (Quit: marinelli)
2023-02-08 16:44:45 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 16:45:35 +0100Guest33(~Guest33@187.22.78.128)
2023-02-08 16:46:26 +0100waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-02-08 16:47:31 +0100 <c_wraith> kuribas: I'm not sure that's the phrasing I'd use. I'd probably say something like "the IO type was constructed to be a monad". You can imagine an alternate construction that is based more on something like the Arrow hierarchy
2023-02-08 16:47:45 +0100 <c_wraith> And probably several others
2023-02-08 16:47:54 +0100 <kuribas> gotta restart emacs...
2023-02-08 16:47:57 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1))
2023-02-08 16:48:31 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-02-08 16:49:13 +0100codaraxis(~codaraxis@user/codaraxis)
2023-02-08 16:50:04 +0100codaraxis(~codaraxis@user/codaraxis) (Remote host closed the connection)
2023-02-08 16:50:04 +0100 <monochrom> Instead of who is modelled after whom, it is "the unreasonable effectiveness of math" again.
2023-02-08 16:50:09 +0100mei(~mei@user/mei)
2023-02-08 16:50:29 +0100codaraxis(~codaraxis@user/codaraxis)
2023-02-08 16:51:42 +0100codaraxis(~codaraxis@user/codaraxis) (Max SendQ exceeded)
2023-02-08 16:52:10 +0100codaraxis(~codaraxis@user/codaraxis)
2023-02-08 16:52:15 +0100 <monochrom> Sound waves are not modelled after Fourier series, nor Fourier series modelled after sound waves. Instead, someone noticed that they are a good match.
2023-02-08 16:52:36 +0100 <kuribas> for sure. I am just surprised nobody came up with this pattern before monads.
2023-02-08 16:52:44 +0100 <kuribas> In hindsight it looks obvious.
2023-02-08 16:52:49 +0100nattiestnate(~nate@202.138.250.11) (Ping timeout: 252 seconds)
2023-02-08 16:52:54 +0100 <monochrom> And to be sure Fourier series is not the only good fit. There are wavelet transforms too.
2023-02-08 16:53:54 +0100nattiestnate(~nate@202.138.250.13)
2023-02-08 16:55:24 +0100 <monochrom> Sufficiently old Haskell did not use monads. I/O was [Respond]->[Request] and someone noticed it could be given a CPS interface.
2023-02-08 16:55:55 +0100CiaoSen(~Jura@p200300c957184d002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-02-08 16:57:28 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in)
2023-02-08 16:57:36 +0100 <kuribas> forall a. ([Request -> a]) -> [Respond] -> a ?
2023-02-08 16:57:47 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 16:57:55 +0100 <merijn> No
2023-02-08 16:58:28 +0100 <c_wraith> that old version was frighteningly fragile
2023-02-08 16:58:41 +0100 <merijn> Just "main :: [Response] -> [Request]" where the input is a lazy list of responses to the (lazy list of) requests produced
2023-02-08 16:59:07 +0100 <merijn> If you look up old versions of the Haskell Report you can read up on the details
2023-02-08 16:59:10 +0100 <kuribas> that's not CPS.
2023-02-08 16:59:51 +0100 <merijn> kuribas: Pretty sure monochrom meant that IO is hiding that CPS interface
2023-02-08 17:00:24 +0100 <merijn> kuribas: I mean, Clean uses neither monads nor the lazy list approach for IO
2023-02-08 17:00:57 +0100 <monochrom> No I meant what I wrote, in particular this was before Haskell got monads.
2023-02-08 17:01:08 +0100 <kuribas> merijn: so it already had bind?
2023-02-08 17:02:05 +0100 <merijn> monochrom: I don't recall seeing CPS based IO in any of the old reports?
2023-02-08 17:02:12 +0100 <merijn> kuribas: What did?
2023-02-08 17:03:03 +0100 <kuribas> old haskell
2023-02-08 17:03:14 +0100 <merijn> Mu
2023-02-08 17:03:27 +0100 <mauke> monads first appeared in 1.3
2023-02-08 17:03:32 +0100 <mauke> let me check 1.2 ...
2023-02-08 17:03:52 +0100 <merijn> mauke: I thought monadic IO was 1.4? But I might be wrong, could be 1.3
2023-02-08 17:04:34 +0100 <merijn> kuribas: "Haskell already had bind" is a real "define 'already', 'had', and 'bind'" kinda question
2023-02-08 17:04:52 +0100 <monochrom> You will need a postscript viewer, but it's https://www.haskell.org/definition/from12to13.html section 7.5
2023-02-08 17:05:22 +0100 <mauke> yep, just found it
2023-02-08 17:06:07 +0100 <merijn> Monadic IO is just so obviously better when you look at the old stuff :)
2023-02-08 17:06:59 +0100 <monochrom> Alternatively find Andrew Gordon's thesis Functional Programming and Input/Output for many more options. :)
2023-02-08 17:07:07 +0100kee(~~kee@user/wizzwizz4)
2023-02-08 17:07:37 +0100razetime(~Thunderbi@117.193.0.210)
2023-02-08 17:08:02 +0100 <mauke> readFile :: String -> FailCont -> StrCont -> [Response] -> [Request]
2023-02-08 17:08:03 +0100 <mauke> not fun
2023-02-08 17:08:30 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
2023-02-08 17:08:53 +0100 <mauke> type FailCont = IOError -> [Response] -> [Request]; type StrCont = String -> [Response] -> [Request]
2023-02-08 17:09:03 +0100 <monochrom> But it solved the "I hate exceptions, what should I do instead?" problem. >:)
2023-02-08 17:10:12 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:458d:a070:c030:aa2)
2023-02-08 17:10:12 +0100 <mauke> amazingly no one seems to have considered `type IOCont a = a -> [Response] -> [Request]`
2023-02-08 17:10:28 +0100 <monochrom> Yeah, I just noticed. :)
2023-02-08 17:10:50 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 17:11:06 +0100lbseale(~quassel@user/ep1ctetus)
2023-02-08 17:11:52 +0100 <c_wraith> That representation makes it so easy to introduce causality issues.
2023-02-08 17:12:12 +0100use-value1(~Thunderbi@2a00:23c6:8a03:2f01:c5c6:bf70:ccc5:fecd)
2023-02-08 17:12:32 +0100 <c_wraith> It's so easy to look for a response to a request you haven't actually made yet.
2023-02-08 17:13:17 +0100kee(~~kee@user/wizzwizz4) (Ping timeout: 268 seconds)
2023-02-08 17:14:27 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:458d:a070:c030:aa2) (Ping timeout: 252 seconds)
2023-02-08 17:14:27 +0100use-value1use-value
2023-02-08 17:15:06 +0100steve[m]1(~stevetrou@2001:470:69fc:105::e0b)
2023-02-08 17:18:44 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-02-08 17:20:09 +0100mmhat(~mmh@p200300f1c716b0c2ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8)
2023-02-08 17:20:26 +0100kee(~~kee@user/wizzwizz4)
2023-02-08 17:21:55 +0100[_](~itchyjunk@user/itchyjunk/x-7353470)
2023-02-08 17:22:10 +0100nschoe(~q@141.101.51.197) (Quit: Switching off)
2023-02-08 17:23:01 +0100andrewboltachev(~andrey@178.141.147.162)
2023-02-08 17:24:33 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 255 seconds)
2023-02-08 17:25:05 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
2023-02-08 17:25:42 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-02-08 17:30:37 +0100merijn(~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
2023-02-08 17:33:35 +0100dcoutts_(~duncan@host86-155-218-146.range86-155.btcentralplus.com)
2023-02-08 17:35:34 +0100dcoutts(~duncan@host86-176-29-74.range86-176.btcentralplus.com) (Ping timeout: 252 seconds)
2023-02-08 17:37:08 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 255 seconds)
2023-02-08 17:37:52 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 17:38:57 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2023-02-08 17:39:24 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-02-08 17:39:28 +0100[_][itchyjunk]
2023-02-08 17:39:56 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-02-08 17:40:24 +0100dcoutts(~duncan@host86-155-218-146.range86-155.btcentralplus.com)
2023-02-08 17:41:30 +0100rburkholder(~blurb@96.45.2.121)
2023-02-08 17:41:51 +0100motherfsck(~motherfsc@user/motherfsck)
2023-02-08 17:42:19 +0100dcoutts_(~duncan@host86-155-218-146.range86-155.btcentralplus.com) (Ping timeout: 252 seconds)
2023-02-08 17:46:41 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-02-08 17:47:07 +0100cheater_(~Username@user/cheater)
2023-02-08 17:47:08 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
2023-02-08 17:47:54 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-02-08 17:49:29 +0100gmg(~user@user/gehmehgeh)
2023-02-08 17:49:47 +0100cheater(~Username@user/cheater) (Ping timeout: 248 seconds)
2023-02-08 17:49:51 +0100cheater_cheater
2023-02-08 17:52:04 +0100cheater_(~Username@user/cheater)
2023-02-08 17:53:00 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2023-02-08 17:54:46 +0100waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 252 seconds)
2023-02-08 17:55:27 +0100Guest33(~Guest33@187.22.78.128) (Quit: Client closed)
2023-02-08 17:55:45 +0100cheater(~Username@user/cheater) (Ping timeout: 260 seconds)
2023-02-08 17:55:48 +0100cheater_cheater
2023-02-08 17:55:54 +0100kurbus(~kurbus@user/kurbus)
2023-02-08 17:55:59 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 17:56:57 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 17:59:28 +0100merijn(~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl)
2023-02-08 18:00:03 +0100notzmv(~zmv@user/notzmv)
2023-02-08 18:00:47 +0100kurbus27(~kurbus@user/kurbus)
2023-02-08 18:01:08 +0100kurbusGuest2389
2023-02-08 18:01:08 +0100kurbus27kurbus
2023-02-08 18:01:42 +0100Guest2389(~kurbus@user/kurbus) (Quit: Client closed)
2023-02-08 18:02:02 +0100patrl(~patrl@user/patrl)
2023-02-08 18:02:07 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
2023-02-08 18:03:10 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 18:05:44 +0100califax(~califax@user/califx)
2023-02-08 18:05:47 +0100 <lechner> Hi, is there a separate channel for Cabal?
2023-02-08 18:06:16 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-02-08 18:07:39 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 260 seconds)
2023-02-08 18:07:44 +0100kurbus(~kurbus@user/kurbus)
2023-02-08 18:08:15 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-02-08 18:11:12 +0100razetime(~Thunderbi@117.193.0.210) (Remote host closed the connection)
2023-02-08 18:11:18 +0100kurbus(~kurbus@user/kurbus) (Client Quit)
2023-02-08 18:15:00 +0100Guest31(~Guest31@45.247.234.245) (Quit: Client closed)
2023-02-08 18:15:43 +0100mechap(~mechap@user/mechap) (Read error: Connection reset by peer)
2023-02-08 18:17:12 +0100 <mauke> I don't know, but if so, it'll be called #haskell-cabal or #cabal, probably
2023-02-08 18:19:29 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-02-08 18:19:33 +0100 <sclv> lechner: the channel is named #hackage
2023-02-08 18:19:39 +0100merijn(~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2023-02-08 18:20:16 +0100 <lechner> sclv / thanks!
2023-02-08 18:21:05 +0100mechap(~mechap@user/mechap)
2023-02-08 18:24:23 +0100 <mauke> Dang
2023-02-08 18:24:45 +0100 <geekosaur> yeh, it's confusing
2023-02-08 18:25:06 +0100 <geekosaur> also for hackage issues you go somewhere other than #hackage 🙂
2023-02-08 18:26:19 +0100MajorBiscuit(~MajorBisc@145.94.153.3) (Ping timeout: 260 seconds)
2023-02-08 18:27:21 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 18:29:57 +0100califax(~califax@user/califx)
2023-02-08 18:30:05 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1))
2023-02-08 18:30:54 +0100 <lechner> where is that? #haskell-infrastructure?
2023-02-08 18:31:17 +0100fut(~futar@129.234.0.191)
2023-02-08 18:32:06 +0100 <geekosaur> yep
2023-02-08 18:33:11 +0100 <lechner> it keeps all the riff-raff away
2023-02-08 18:33:12 +0100 <geekosaur> basically, #hackage is hackage development including cabal/Cabal, operational stuff is #haskell-infrastructure
2023-02-08 18:33:41 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 18:34:24 +0100 <lechner> i checked #cabal, which seemed taken, and #haskell-cabal before asking
2023-02-08 18:34:45 +0100fut(~futar@129.234.0.191) (Client Quit)
2023-02-08 18:36:07 +0100cheater_(~Username@user/cheater)
2023-02-08 18:36:41 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0)
2023-02-08 18:38:55 +0100cheater(~Username@user/cheater) (Ping timeout: 260 seconds)
2023-02-08 18:39:02 +0100cheater_cheater
2023-02-08 18:40:23 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.8)
2023-02-08 18:42:23 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 18:46:27 +0100chele(~chele@user/chele) (Remote host closed the connection)
2023-02-08 18:48:10 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-02-08 18:49:11 +0100slack1256(~slack1256@186.11.102.104)
2023-02-08 18:50:26 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2023-02-08 18:56:15 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 18:56:48 +0100asscrackbandit(~user@eth-west-pareq2-46-193-2-167.wb.wifirst.net) (Ping timeout: 248 seconds)
2023-02-08 18:58:22 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection)
2023-02-08 18:58:24 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 260 seconds)
2023-02-08 18:58:57 +0100califax(~califax@user/califx)
2023-02-08 18:59:01 +0100lyle(~lyle@104.246.145.85)
2023-02-08 19:01:26 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 19:02:01 +0100patrl(~patrl@user/patrl) (Quit: WeeChat 3.8)
2023-02-08 19:02:26 +0100mechap(~mechap@user/mechap) (Read error: Connection reset by peer)
2023-02-08 19:03:13 +0100califax(~califax@user/califx)
2023-02-08 19:04:10 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 19:04:27 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 248 seconds)
2023-02-08 19:05:34 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 19:06:24 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 19:06:51 +0100califax(~califax@user/califx)
2023-02-08 19:08:24 +0100mechap(~mechap@user/mechap)
2023-02-08 19:09:14 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) (Quit: leaving)
2023-02-08 19:09:33 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 19:10:52 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) (Client Quit)
2023-02-08 19:12:00 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
2023-02-08 19:12:59 +0100rettahcay(~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) ()
2023-02-08 19:14:03 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 19:15:42 +0100califax(~califax@user/califx)
2023-02-08 19:15:44 +0100 <lyle> I'm trying to find a library to parse http requests and responses. Here's my attempt at using a library called hweblib: https://paste.tomsmeding.com/CB3bFz3n but it doesn't let me access the fields since no accessor functions are exported. Do I just have a fundamental misunderstanding of how to use this library, or is there another library I should be using?
2023-02-08 19:17:02 +0100econo(uid147250@user/econo)
2023-02-08 19:23:27 +0100 <ddellacosta> lyle: did you try including the Response data constructor from Network.Types? I think you may just be missing that import
2023-02-08 19:24:05 +0100 <ddellacosta> https://hackage.haskell.org/package/hweblib-0.6.3/docs/Network-Types.html#t:Response
2023-02-08 19:25:47 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-02-08 19:27:06 +0100 <jil> hello
2023-02-08 19:27:13 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 19:27:25 +0100 <jil> what's the meaning of .\/ as in https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week02/src/Week02/Gift.hs…
2023-02-08 19:30:14 +0100 <geekosaur> it is presumably defined by Plutus, since I don't see it on hackage
2023-02-08 19:30:14 +0100Vajb(~Vajb@2001:999:404:9516:d621:6cbe:c71e:5686) (Read error: Connection reset by peer)
2023-02-08 19:30:25 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2023-02-08 19:30:39 +0100 <lyle> ddellacosta: thanks! That was it. I never would have thought to do that since network-types is not listed as a dependency for hweblib.
2023-02-08 19:31:39 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 19:32:14 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
2023-02-08 19:32:19 +0100thongpv(~thongpv87@123.28.243.28)
2023-02-08 19:33:23 +0100cheater_(~Username@user/cheater)
2023-02-08 19:33:34 +0100 <lyle> but I suppose it was right in the error in the paste so I guess lesson learned--I actually need to read the error!
2023-02-08 19:34:53 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 19:35:33 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 19:35:55 +0100cheater(~Username@user/cheater) (Ping timeout: 248 seconds)
2023-02-08 19:35:58 +0100cheater_cheater
2023-02-08 19:37:39 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:c5c6:bf70:ccc5:fecd) (Quit: use-value)
2023-02-08 19:37:51 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 19:38:06 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 19:38:17 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 19:38:41 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 19:38:53 +0100enoq(~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
2023-02-08 19:39:27 +0100thongpv(~thongpv87@123.28.243.28) (Ping timeout: 248 seconds)
2023-02-08 19:46:06 +0100 <ddellacosta> lyle: awesome, glad it helped!
2023-02-08 19:47:07 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 19:47:20 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 19:47:59 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 260 seconds)
2023-02-08 19:48:08 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 19:48:23 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 19:51:55 +0100Mahi(~Mahi@91-159-147-164.elisa-laajakaista.fi)
2023-02-08 19:52:48 +0100 <tomsmeding> lyle: note that Network.Types is a _module_ within the _package_ hweblib
2023-02-08 19:53:03 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 19:53:12 +0100 <tomsmeding> there is no _package_ named network-types involved here
2023-02-08 19:53:18 +0100 <Mahi> Hi, I'm trying to implement a phonebook using binary tree, but the automatic testers at the university are not passing. I've included my code and the difference in outputs here: https://paste.tomsmeding.com/obSjuwK3
2023-02-08 19:53:42 +0100 <Mahi> Any ideas what's wrong with my code? Nobody else is complaining with issues with the tester
2023-02-08 19:54:50 +0100ft(~ft@p508dbcc4.dip0.t-ipconnect.de)
2023-02-08 19:55:22 +0100 <Mahi> The `Phone_type2` is provided by teachers and the function `readPhone` converts strings to a `Phone` object
2023-02-08 19:56:00 +0100 <Mahi> Also the `data Phonebook` is provided by teachers
2023-02-08 19:56:20 +0100 <Mahi> I don't understand how my code is adding some phone numbers twice with different types :/
2023-02-08 19:56:35 +0100 <tomsmeding> Mahi: is the - version your output or the + version?
2023-02-08 19:56:49 +0100 <Mahi> Mine is the `-` and the expected is the `+`
2023-02-08 19:57:32 +0100 <Mahi> The task explicitly mentions "In data Phonebook statement there is a list of phones for a name - so when adding an entry with an existing name it should be added to the list rather than creating a new node."
2023-02-08 19:57:55 +0100dcoutts_(~duncan@host86-155-218-146.range86-155.btcentralplus.com)
2023-02-08 19:58:27 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 19:58:53 +0100 <tomsmeding> Mahi: those "+358 123456789 (PrivateMobile)" things are strings?
2023-02-08 19:59:01 +0100ddellacosta(~ddellacos@143.244.47.81) (Quit: WeeChat 3.7.1)
2023-02-08 19:59:02 +0100 <tomsmeding> oh no Phone is a datatype
2023-02-08 19:59:07 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-02-08 19:59:20 +0100ddellacosta(~ddellacos@143.244.47.81)
2023-02-08 19:59:22 +0100 <davean> Mahi: Are you just missing something to see if you've already added it?
2023-02-08 19:59:28 +0100 <tomsmeding> are you sure that you shouldn't deduplicate on the actual numbers? i.e. add new numbers, but if the number is already there, replace the existing entry
2023-02-08 19:59:51 +0100 <Mahi> now that you ask it like that, no I'm not sure :D
2023-02-08 20:00:33 +0100dcoutts(~duncan@host86-155-218-146.range86-155.btcentralplus.com) (Ping timeout: 252 seconds)
2023-02-08 20:00:36 +0100 <Mahi> but we haven't learned how to replace an element in a list yet so I'm not sure if that's the issue
2023-02-08 20:01:59 +0100 <Mahi> I'll try to see if I can do it :D
2023-02-08 20:03:30 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2023-02-08 20:03:40 +0100dcoutts(~duncan@host86-155-218-146.range86-155.btcentralplus.com)
2023-02-08 20:03:49 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-02-08 20:03:59 +0100dcoutts_(~duncan@host86-155-218-146.range86-155.btcentralplus.com) (Ping timeout: 248 seconds)
2023-02-08 20:04:01 +0100Vajb(~Vajb@2001:999:404:9516:d621:6cbe:c71e:5686)
2023-02-08 20:10:51 +0100 <jean-paul[m]> > jean-paul.: Not sure if it exactly fits your use case, but parser-combinators has Control.Monad.Permutation for parsing any permutation of a fixed number of fields
2023-02-08 20:10:51 +0100 <jean-paul[m]> merijn Thanks, this worked very nicely and cut a hundred lines off my parser.
2023-02-08 20:10:52 +0100 <lambdabot> <hint>:1:54: error: parse error on input ‘,’
2023-02-08 20:11:02 +0100 <Mahi> Oh wow it passed now, thanks guys! tomsmeding davean
2023-02-08 20:11:24 +0100 <Mahi> They didn't even expect me to replace the existing number, they expected me to not do anything if a number already exists... but it's not mentioned anywhere in the task lol
2023-02-08 20:11:43 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2023-02-08 20:12:11 +0100 <jean-paul[m]> fwiw https://gitlab.com/exarkun/chk.hs/-/blob/parse-uriextension/src/Tahoe/CHK/URIExtension.hs#L121-135
2023-02-08 20:12:37 +0100 <tomsmeding> Mahi: "not mentioned anywhere" that sounds like a polite email to the lecturer is in order, suggesting either you've missed something or a sentence is missing from the assignment spec :)
2023-02-08 20:12:46 +0100 <tomsmeding> but nice
2023-02-08 20:12:57 +0100 <Mahi> Yes you're right, I'll do that :) Thank you very much!
2023-02-08 20:13:01 +0100Mahi(~Mahi@91-159-147-164.elisa-laajakaista.fi) (Quit: Client closed)
2023-02-08 20:13:08 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 20:13:23 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 20:20:07 +0100kurbus(~kurbus@user/kurbus)
2023-02-08 20:24:28 +0100rekahsoft(~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca)
2023-02-08 20:24:35 +0100rekahsoft(~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca) (Remote host closed the connection)
2023-02-08 20:28:56 +0100so-offish(~so-offish@2610:148:610:b66:21d9:e18a:fd7a:ab8)
2023-02-08 20:29:11 +0100rekahsoft(~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca)
2023-02-08 20:30:21 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-02-08 20:32:04 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-02-08 20:32:37 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0) (Remote host closed the connection)
2023-02-08 20:33:31 +0100rekahsoft(~rekahsoft@bras-base-orllon1122w-grc-05-174-88-194-86.dsl.bell.ca) (Ping timeout: 248 seconds)
2023-02-08 20:37:06 +0100kayvan(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 20:37:47 +0100trev(~trev@user/trev) (Remote host closed the connection)
2023-02-08 20:38:45 +0100 <kayvan> 11:37 *** NAMES @ChanServ [_________] [exa] [itchyjunk] [Leary] [Ristovski] ___ _________ __monty__ _leo___ _xor aaRabbit[m] aaronm04 aaronv abrar absence acarrico acertain acidsys acro adamCS Adeon adium Adran aforemny agander_m AkechiShiro akegalj aku_ alanz albet70 Aleksejs Alex_test alexfmpe[m] AlexNoo AlexZenon alinab alloca alp ames AmyMalik analoq anatta anderson andjjj23 andreas303 AndreasK andrewboltachev A
2023-02-08 20:38:45 +0100 <kayvan> ngelz Ankhers anpad anthezium apache2 APic arcadewise ario aristid arkeet Arsen Artem[m] asm astra Athas auri avpx_ aweinstock AWizzArd Axman6 azimut azure_vermilion b0o b20n bah barrucadu bastelfreak Batzy bbhoss bcoppens beaky Benzi-Junior berberman beteigeuze bgamari bgamari[m] bgs biberu bigtestaccount[m bjobjo bjs Boarders___ bob bollu bonz060 bookshelfdave bradparker bsima bsima1 buhman Buliarous burakcan- bw
2023-02-08 20:38:45 +0100 <kayvan> bwe byorgey ByronJohnson c_wraith caasih Cale califax carbolymer carter CAT_S catern caubert cawfee cbarrett cdsmith chaitlatte0 cheater Cheery chessai chexum chreekat christiaanb christiansen[m] Christoph[m] chymera cjay Clint Clinton[m] cln codaraxis codedmart cods conjunctive coot cpli crns cross cstm[m] cyphase dagi41990 danso darkling davean davetapley davl dcoutts ddb ddellacosta defanor degraafk Deide dequbed
2023-02-08 20:38:45 +0100 <kayvan> dextaa dexter1 df dfg dfordivam1 dgb8 dgpratt[m] dibblego DigitalKiwi disco-dave[m] dispater dminuoso dmj` dolio Dominik[m]12 dragestil drdo drewolson drlkf dsal dtman34 dumptruckman dunj3 dy dykai[m] Dykam dyniec earthy ec_ echoreply econo edm edmundnoble edwardk edwtjo Ekho eL_Bart0 eldritch eldritchcookie[4 elevenkb[m] ell elvishjerricco emergence energizer ericjmorey[m] ericson2314 erisco EsoAlgo8 esph EvanR ev
2023-02-08 20:38:45 +0100 <kayvan> anrelf ezzieyguywuf famubu[m] Fangs farn_ feliix42_ fendor[m] Feuermagier fgaz fiddlerwoaroof_ filwisher FinnElija finsternis Firedancer Flow fluffyballoon flukiluke fluxit forell_ foul_owl fr33domlover Franciman freeside ft FurudeRika[m] fvr gabiruh gawen gaze___ gdd geekosaur geekosaur[m] gentauro ggb ghostbuster glguy glider glowcoil gmc_ gmg gnyeki GoldsteinQ gonz_______ goober Goodbye_Vincent gqplox[m] grfn Gue
2023-02-08 20:38:45 +0100 <kayvan> st3728 Guest585 Guest7839 Guest809 Guillaum[m] h2t haasn` Hafydd hamishmack hammond_ hank_ haritz haskl haveo_ hays heartburn heath Hecate hendi henrytill hexagoxel hexeme_ hexology hgolden hiredman hltk hnOsmium0001 Hobbyboy hololeap hongminhee hook54321 hounded hounded_woodstoc hpc hrberg hueso hugo hussam idnar Igloo ikervagyok[m] img immae incertia infinity0 Inst_ int-e integral intelligent_boat inversed iphy ir
2023-02-08 20:38:46 +0100 <kayvan> cbrowse_tom irrgit_ iteratee ix jackdk jackhill jakalx jakesyl____ jakzale jao jbalint jean-paul[m] JensPetersen[m] jero98772 jespada jil jimki jinsl- jinsun jjhoo_ jkoshy jle` jleightcap jludwig jmcantrell jmct jmdaemon jneira[m] jocke-l JoelMcCracken joeyh johnjaye johnw Jon JonathanWatson[m jonathanx Jonno_FTW jonrh jpds jrm JSharp jtmar juri_ justache jwiegley kadobanana Kamuela kaol_ kaskal Katarushisu kawen ka
2023-02-08 20:38:46 +0100 <kayvan> wzeg_ kayvan kee kimiamania kitzman kmein koala_man koolazer kosmikus kosmikus[m] koz kraftwerk28 kristjansson_ kritzefitz krjst kronicma1 L29Ah lagash_ lally laman1 lambdabot LambdaDuck lambdap237 landonf Las[m] lawt lbseale leah2 leahclarm lechner leeb lexi-lambda lieven lightandlight liskin lisq litharge Logio loonycyborg Lord_of_Life lottaquestions_ Luj lukec lyle lyxia m1dnight m5zs7k machinedgod madnight Maeda
2023-02-08 20:38:46 +0100 <kayvan> maerwald maerwald[m] malte MangoIV[m] ManofLetters[m] manwithluck maralorn marienz markasoftware MasseR46 masterbuilder matijja matthews Matthew|m mauke Maxdamantus maxfan8_ mc47 mcfrdy mcglk Me-me mechap meejah megaTherion megeve mei meinside melonai meooow merijn mesaoptimizer mhatta mht-wtf Miao[m] michalz micro Midjak mikko mimi1vx[m] mimmy mira MironZ mixphix mjs2600 mmaruseacph2 mniip Momentum mon_aaraj monoc
2023-02-08 20:38:47 +0100 <kayvan> hrom MonsoonSecrecy motherfsck Moyst mrmonday mrvdb mtjm mustafa mxs myme n1essa Natch natechan nattiestnate natto17 ncf nckx nek0 NemesisD nerdypepper nicm[m] nicole NiKaN niko nisstyre noctuks noctux Noinia nomagno nonzen noteness notzmv nrr____ nshepperd nshepperd2 nullsh nurupo oats Oden[m] ongy[m] opqdonut Orbstheorem orcus ormaaj ouroboros ozkutuk[m] p3n paddymahoney parseval Patternmaster peddie Pent pepeibor
2023-02-08 20:38:48 +0100 <kayvan> ra perrierjouet peutri phileasfogg Philonous phma PHO` pie_ pieguy128_ piele pierrot pja pjlsergeant__ poljar polux PotatoGim probie ProofTechnique psydroid Putonlalla q0r qhong_ Qudit quintasan_ Raito_Bezarius ralu1 Ram-Z Ranhir raoul raym rburkholder red-snail1 Rembane rembo10 remedan remexre rendar riatre_ ridcully_ ringo__ RMSBach robbert-vdh robertm rodental romes[m] rubin55 rune russruss S11001001 s4msung sa s
2023-02-08 20:38:48 +0100 <kayvan> a1 sajith samhh sammelweis SanchayanMaity santiagopim saolsen Sauvin sayola scav Sciencentistguy sclv SeanKing[m] sefidel segfaultfizzbuzz SethTisue sgarcia Sgeo shachaf shailangsa shawwwn shinjipf shreyasminocha shriekingnoise simpleauthority ski slack1256 sm sm2n sm[i] smichel17[m] smol-hors snek so-offish SoF son0p sphynx srid[m] srk SrPx sshine statusbot stefan-_ steve[m]1 stiell stilgart sudden superbil supersv
2023-02-08 20:38:55 +0100ChanServ+o geekosaur
2023-02-08 20:38:55 +0100kayvan(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection)
2023-02-08 20:39:01 +0100geekosaur+b kayvan!*@*
2023-02-08 20:39:13 +0100 <johnjaye> oh. i thought someone actually wanted to establish genuine human connection with me
2023-02-08 20:39:23 +0100 <cheater> same. sadge :(
2023-02-08 20:39:27 +0100 <scav> rookie mistake
2023-02-08 20:39:30 +0100geekosaur-o geekosaur
2023-02-08 20:39:30 +0100bookshelfdave(sid28102@2a03:5180:f:3::6dc6) ()
2023-02-08 20:39:33 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 20:39:37 +0100 <jean-paul[m]> I will talk to you johnjaye
2023-02-08 20:39:38 +0100 <jean-paul[m]> Do you like haskell
2023-02-08 20:39:38 +0100 <anatta> this *is* the most genuine human connection I've had this week
2023-02-08 20:39:41 +0100 <geekosaur> of course they stopped and left as soon as I opped
2023-02-08 20:39:42 +0100 <cheater> geekosaur: what if it was a call for help
2023-02-08 20:39:53 +0100 <johnjaye> i like haskell. but i haven't really done a compiler in haskell.
2023-02-08 20:40:01 +0100 <johnjaye> i feel like to *really* get a language you have to make a compiler in it
2023-02-08 20:40:07 +0100 <opqdonut> ah, copypasting the channel member list
2023-02-08 20:40:10 +0100 <opqdonut> that takes me back
2023-02-08 20:40:10 +0100 <cheater> geekosaur: he stopped long before. he got throttled by the server. it's probably just someone who mis-pasted
2023-02-08 20:40:19 +0100 <nomagno> This MF can't even write me a whole custom sentence
2023-02-08 20:40:45 +0100 <johnjaye> i mean we're all doomed due to chatGPT anyway. there will be no way to determine who is and isn't a human
2023-02-08 20:41:01 +0100 <anatta> johnjaye: I don't know - I've made a compiler in Haskell, but I still don't understand anything
2023-02-08 20:41:05 +0100 <kee> johnjaye: Disregard that. Talk about lawnmowers.
2023-02-08 20:41:06 +0100 <scav> unless you bring up a subject from after 2021 :)
2023-02-08 20:41:09 +0100 <hussam> What? Who dares disturb my slumber?
2023-02-08 20:41:42 +0100 <sayola> gonna exchange private keys before ai takes over and hope we never lose them or we lose human credibility lol
2023-02-08 20:41:47 +0100 <nomagno> I don't even know why I'm on here, I barely understood Learn You a Haskell and promptly forgot to practice further
2023-02-08 20:41:53 +0100 <anatta> But then it was just for an extremely basic language and not anything serious
2023-02-08 20:42:13 +0100 <defanor> Exchanging private keys sounds like something ChatGPT would say!
2023-02-08 20:42:27 +0100 <johnjaye> oh yeah i forgot about public/private keys. that might be a potential avenue for proving your humanity
2023-02-08 20:42:42 +0100king_gs(~Thunderbi@187.201.41.239)
2023-02-08 20:42:46 +0100 <johnjaye> but i guess ultimately it has to be outside IRC because inside irc is only text, in which chatGPT reigns supreme.
2023-02-08 20:42:53 +0100 <so-offish> I didn't like Learn You a Haskell. Hopefully there are better recommendations in here...
2023-02-08 20:43:32 +0100 <sayola> i dunno. LYaH worked for me back then. it was somewhat overly wordy perhaps.
2023-02-08 20:43:33 +0100 <johnjaye> there's like 2 or 3 haskell tutorials. learn x in y minutes was one. i forgot the 3rd one
2023-02-08 20:43:33 +0100 <anatta> I hate lyah
2023-02-08 20:43:38 +0100 <nomagno> I just learned Scheme instead, helped me get to grips with FP better. I'm probably way more ready for Haskell now
2023-02-08 20:43:42 +0100 <anatta> I like haskell from first principle
2023-02-08 20:43:45 +0100 <anatta> or whatever it's called
2023-02-08 20:43:59 +0100 <sayola> i think it helps to know from what background you coming
2023-02-08 20:43:59 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-02-08 20:44:07 +0100 <anatta> but I think it's personal what style resonates the most with you
2023-02-08 20:44:40 +0100 <anatta> for me Lyah felt like a list of functions being thrown in my face, no exercises, etc.
2023-02-08 20:44:43 +0100 <L29Ah> johnjaye: just ask it what weighs more, a kilogram of feathers or a kilogram of steel
2023-02-08 20:44:47 +0100so-offish(~so-offish@2610:148:610:b66:21d9:e18a:fd7a:ab8) (Quit: Leaving)
2023-02-08 20:45:03 +0100 <anatta> I managed to mess chatGPT up today by asking about NFA:s and regular expressions
2023-02-08 20:45:19 +0100 <Hecate> hohai
2023-02-08 20:45:27 +0100 <[exa]> o/
2023-02-08 20:45:31 +0100 <Hecate> too bad the bot didn't want to hear about my latest projects :( :(
2023-02-08 20:45:31 +0100 <anatta> I asked it to make an NFA out of a regex, and it gave me something competely wrong - I told it that it was wrong, and it gave me something else that was wrong
2023-02-08 20:45:36 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 20:45:36 +0100 <nomagno> anatta: oh hey, I need help with that!
2023-02-08 20:45:41 +0100 <nomagno> ... Now I know not to ask chatGPT
2023-02-08 20:45:55 +0100 <[exa]> anatta: I found that encoding any problem to a wording that's not common kinda causes it to lose much memory
2023-02-08 20:46:02 +0100 <anatta> then I asked it to show the path through the NFA with a certain string
2023-02-08 20:46:07 +0100 <anatta> it gave me a path to an accepting state
2023-02-08 20:46:13 +0100 <anatta> using transitions that weren't in the NFA
2023-02-08 20:46:15 +0100 <[exa]> nomagno: feel free in #-offtopic btw
2023-02-08 20:46:30 +0100 <[exa]> oh cool :D
2023-02-08 20:47:23 +0100 <AndreasK> ChatGPT seems to be like a student who memorized all the materials but understood none of it
2023-02-08 20:47:23 +0100 <anatta> yeah, it felt really weird, like it kept arguing it had correct answers despite the answers being obviously wrong
2023-02-08 20:48:06 +0100 <darkling> AndreasK: That's *exactly* how I read it most of the time.
2023-02-08 20:48:16 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1))
2023-02-08 20:48:19 +0100 <anatta> it wasn't like... slightly wrong in some obscure way, what it was giving me just straight up didn't make any sense
2023-02-08 20:48:35 +0100 <AndreasK> That's my experience with that sort of stundent too at time :D
2023-02-08 20:48:43 +0100 <byorgey> AndreasK: as a teacher, I can confirm that is exactly what it is like =)
2023-02-08 20:48:51 +0100kayvank(~user@52-119-115-185.public.monkeybrains.net)
2023-02-08 20:48:54 +0100 <geekosaur> was goona say, sounds like it's about average for regex 🙂
2023-02-08 20:49:09 +0100 <[exa]> someone should ask it about a maze-style problem or so
2023-02-08 20:49:17 +0100 <AndreasK> I think the bot is back
2023-02-08 20:49:19 +0100ChanServ+o litharge
2023-02-08 20:49:19 +0100litharge-bo kayvan!*@* litharge
2023-02-08 20:49:44 +0100 <Hecate> blanket k-line on monkeybrains.net ?
2023-02-08 20:49:46 +0100 <Hecate> :p
2023-02-08 20:49:52 +0100 <tomsmeding> I love how I actually see a bunch of nicks talking now that I've never seen before in the channel
2023-02-08 20:49:56 +0100 <mikko> hello kayvank i believe you had something you wanted to say to me?
2023-02-08 20:50:01 +0100 <tomsmeding> "ping the world" actually did something nice
2023-02-08 20:50:10 +0100 <AndreasK> :)
2023-02-08 20:50:18 +0100werneta(~werneta@137.79.219.74)
2023-02-08 20:50:26 +0100 <[exa]> tomsmeding: an absolute highlight of the evening
2023-02-08 20:51:15 +0100 <AndreasK> I'm sure in a few years people at the edge will figure out to loop tyoecheckers etc. into things like chatGTP and then it likely becomes a really good tool for churning out boring code
2023-02-08 20:51:20 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-02-08 20:52:20 +0100 <Hecate> good evening tomsmeding
2023-02-08 20:52:29 +0100 <Hecate> so, how's your playground holding with all that Mastodon trafic? :p
2023-02-08 20:52:43 +0100 <anatta> AndreasK: It's also possible that knowing what it's good at and what it's bad at will become a useful skill in itself
2023-02-08 20:53:07 +0100 <tomsmeding> Hecate: honestly it's idling lol
2023-02-08 20:53:13 +0100 <tomsmeding> Hecate: https://play-haskell.tomsmeding.com/srv_static/usage_graph.png
2023-02-08 20:53:33 +0100 <tomsmeding> iirc every green pixel is a compile request, every red pixel is one second of worker cpu time
2023-02-08 20:53:34 +0100kayvank(~user@52-119-115-185.public.monkeybrains.net) (Client Quit)
2023-02-08 20:53:45 +0100 <tomsmeding> green covers red because I was too lazy to make a proper graph
2023-02-08 20:54:36 +0100 <mauke> what chatGPT is good at is generating plausible looking bullshit and presenting it with confidence
2023-02-08 20:54:52 +0100 <tomsmeding> which is actually useful for certain purposes
2023-02-08 20:54:55 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 20:54:58 +0100 <tomsmeding> the "looking plausible" bit
2023-02-08 20:55:20 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Client Quit)
2023-02-08 20:55:26 +0100 <mauke> yeah, but it's pretty much the opposite of what you want for software development
2023-02-08 20:55:32 +0100 <tomsmeding> yes
2023-02-08 20:55:46 +0100 <johnjaye> mauke: sounds like those top 10 articles you see in browsers are pretty much covered then
2023-02-08 20:55:49 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 20:56:26 +0100 <johnjaye> you'll never be able to get a good recipe for a pina colada again because all you'll get is something 'plausible'
2023-02-08 20:58:27 +0100 <mikko> mauke: but it's really great for when you only have a vague human language description of the thing you're looking for, and you just want some example so you can start looking at the actual docs
2023-02-08 20:58:35 +0100Feuermagier_(~Feuermagi@user/feuermagier)
2023-02-08 20:58:52 +0100 <mikko> as long as you are aware of what NOT to use chatGPT for it's a really useful tool
2023-02-08 21:00:30 +0100 <Hecate> tomsmeding: hehe, nice
2023-02-08 21:00:55 +0100pernzs(~pernzs@101.175.168.100)
2023-02-08 21:01:08 +0100 <jil> geekosaur
2023-02-08 21:01:15 +0100Feuermagier(~Feuermagi@user/feuermagier) (Ping timeout: 248 seconds)
2023-02-08 21:01:42 +0100 <jil> geekosaur thank you for you message.
2023-02-08 21:02:21 +0100 <tomsmeding> Hecate: I lied, number of compile requests is foreground red, server-to-worker request time (~ worker cpu time) in seconds is background green
2023-02-08 21:02:28 +0100 <anatta> I'm just happy it's easily confused: https://i.imgur.com/K9qoVqB.png
2023-02-08 21:02:30 +0100 <tomsmeding> no
2023-02-08 21:02:40 +0100 <tomsmeding> _background_ red, _foreground_ green
2023-02-08 21:02:45 +0100 <tomsmeding> aah I'm tired I'm going to bed bye
2023-02-08 21:02:53 +0100 <anatta> So when the inevitable robot uprising occurs, and terminators come knocking at my door, I can just tell them I'm not at home, and they'll happily go away
2023-02-08 21:03:27 +0100 <darkling> anatta: Don't forget to wear the t-shirt reading "fridge". Just in case.
2023-02-08 21:04:47 +0100ajf___[m](~ajfmatrix@2001:470:69fc:105::2:5be3)
2023-02-08 21:04:54 +0100 <anatta> many have said I could easily be confused for a fridge
2023-02-08 21:05:31 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 21:06:23 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds)
2023-02-08 21:07:24 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-02-08 21:08:23 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0)
2023-02-08 21:08:31 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 21:09:23 +0100califax(~califax@user/califx)
2023-02-08 21:12:59 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 21:16:06 +0100 <[exa]> there were the convolution-killing t-shirts somewhere on the internet, about time to buy some I guess
2023-02-08 21:16:52 +0100 <hammond_> lol
2023-02-08 21:16:55 +0100 <hammond_> omg
2023-02-08 21:18:31 +0100 <[exa]> ah here https://arxiv.org/pdf/1910.11099.pdf
2023-02-08 21:19:08 +0100 <mauke> https://www.lesswrong.com/posts/aPeJE8bSo6rAFoLqg/solidgoldmagikarp-plus-prompt-generation
2023-02-08 21:19:28 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-02-08 21:19:32 +0100pernzs(~pernzs@101.175.168.100) (Quit: Client closed)
2023-02-08 21:19:37 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 21:19:58 +0100 <akegalj> Hi, in this article https://simonmar.github.io/posts/2018-06-20-Finding-fixing-space-leaks.html simon is saying "To avoid this leak, we could pattern-match on pls eagerly rather than doing the lazy record selection". There is a broken link unfortunatelly so can't se the source. How to pattern match eagerly on a record? Would `case pls of LM {closure_env} -> ...` work in this case?
2023-02-08 21:20:33 +0100 <[exa]> mauke: ok wow
2023-02-08 21:22:41 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0) (Remote host closed the connection)
2023-02-08 21:23:30 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-02-08 21:24:16 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 268 seconds)
2023-02-08 21:24:59 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 21:25:26 +0100 <AndreasK> akegalj: The commit in question is https://github.com/ghc/ghc/commit/71f6b18ba365da9ee4795f6cbce6ec9f1bfe95e8 if that helps
2023-02-08 21:25:27 +0100pernzs(~pernzs@101.175.168.100)
2023-02-08 21:27:08 +0100 <AndreasK> I think your pattern match should work too
2023-02-08 21:27:23 +0100king_gs(~Thunderbi@187.201.41.239) (Ping timeout: 248 seconds)
2023-02-08 21:28:51 +0100biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2023-02-08 21:29:36 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-02-08 21:34:01 +0100codaraxis__(~codaraxis@user/codaraxis)
2023-02-08 21:34:10 +0100 <akegalj> AndreasK: thanks
2023-02-08 21:34:42 +0100biberu(~biberu@user/biberu)
2023-02-08 21:38:03 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 21:38:03 +0100codaraxis(~codaraxis@user/codaraxis) (Ping timeout: 248 seconds)
2023-02-08 21:38:47 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 21:40:55 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2023-02-08 21:42:19 +0100waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-02-08 21:42:51 +0100 <carter> That solid gold magikarp bit is nuts
2023-02-08 21:43:08 +0100 <ongy[m]> :( I thought someone wanted to talk to me
2023-02-08 21:49:57 +0100kurbus(~kurbus@user/kurbus)
2023-02-08 21:50:36 +0100 <akegalj> AndreasK: In the fix you linked above, if L174 was defined as `let new_ce = extendClosureEnv (closure_env pls) new_bindings` would it still leak? (if he didn't pattern match on L173)
2023-02-08 21:53:17 +0100 <akegalj> also, would just doing `let !new_ce = extendClosureEnv (closure_env pls) new_bindings` resolve the leak (without forcing at the end with `return $! ...`)
2023-02-08 21:57:35 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-02-08 22:00:51 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 255 seconds)
2023-02-08 22:05:07 +0100 <AndreasK> If `let !new_ce = extendClosureEnv (closure_env pls) new_binding` leaks should depend on the implementation of extendClosureEnv
2023-02-08 22:05:34 +0100 <AndreasK> If extendClosureEnv forces the first argument that should be fine
2023-02-08 22:11:27 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 22:11:38 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 255 seconds)
2023-02-08 22:17:33 +0100pernzs(~pernzs@101.175.168.100) (Ping timeout: 260 seconds)
2023-02-08 22:19:46 +0100 <ddellacosta> is there a way to pass test-options to cabal in a nix flake? I'm trying to pass a filter to tasty
2023-02-08 22:20:24 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 22:20:31 +0100pernzs(~pernzs@101.175.168.100)
2023-02-08 22:21:28 +0100 <akegalj> ok, that makes sense. Although, I am not yet clear how `return $! pls {...}` is necessary as it will be forced only to its whnf, so it won't force any of record fields... Aha, I guess $! will force record update and release `pls` binding from record update (`pls {...}`). I wonder if the same would work if we used different syntax `return $! ConstructorName { field1 = fielf1 pls, field2 = field2 pls, ...}
2023-02-08 22:21:34 +0100 <akegalj> . My intuition was that $! would force only to whnf so it wouldn't force constructor/record fields
2023-02-08 22:22:26 +0100pavonia(~user@user/siracusa)
2023-02-08 22:23:44 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 22:27:39 +0100zeenk(~zeenk@2a02:2f04:a214:1e00::7fe) (Quit: Konversation terminated!)
2023-02-08 22:28:17 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 255 seconds)
2023-02-08 22:29:00 +0100zer0bitz(~zer0bitz@2001:2003:f443:d600:d5e7:46b7:b251:b47a) (Read error: Connection reset by peer)
2023-02-08 22:31:06 +0100lyle(~lyle@104.246.145.85) (Quit: WeeChat 3.8)
2023-02-08 22:31:22 +0100zer0bitz(~zer0bitz@2001:2003:f443:d600:59df:db32:bf45:bad2)
2023-02-08 22:32:26 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-02-08 22:33:15 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 22:34:24 +0100zer0bitz(~zer0bitz@2001:2003:f443:d600:59df:db32:bf45:bad2) (Read error: Connection reset by peer)
2023-02-08 22:36:33 +0100dsrt^(~dsrt@c-24-30-76-89.hsd1.ga.comcast.net)
2023-02-08 22:39:10 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 22:41:33 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-02-08 22:41:39 +0100zer0bitz(~zer0bitz@2001:2003:f443:d600:7cbf:c51:a17d:df99)
2023-02-08 22:42:48 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection)
2023-02-08 22:43:24 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 22:45:21 +0100eruditass(uid248673@id-248673.uxbridge.irccloud.com)
2023-02-08 22:45:54 +0100freeside(~mengwong@103.252.202.170)
2023-02-08 22:46:27 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-02-08 22:47:29 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
2023-02-08 22:48:13 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-02-08 22:48:44 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2023-02-08 22:50:53 +0100zer0bitz(~zer0bitz@2001:2003:f443:d600:7cbf:c51:a17d:df99) (Read error: Connection reset by peer)
2023-02-08 22:51:49 +0100_leo___(~emmanuelu@user/emmanuelux) (Ping timeout: 252 seconds)
2023-02-08 22:52:07 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1))
2023-02-08 22:52:38 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 22:53:12 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection)
2023-02-08 22:53:29 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-02-08 22:53:37 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2023-02-08 23:00:08 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 23:00:27 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-02-08 23:02:28 +0100pernzs(~pernzs@101.175.168.100) (Ping timeout: 260 seconds)
2023-02-08 23:03:43 +0100notzmv(~zmv@user/notzmv) (Remote host closed the connection)
2023-02-08 23:04:49 +0100leahclarm(~leahclarm@91.110.109.171) (Remote host closed the connection)
2023-02-08 23:05:04 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-02-08 23:06:10 +0100leahclarm(~leahclarm@91.110.109.171)
2023-02-08 23:06:19 +0100leahclarm(~leahclarm@91.110.109.171) (Client Quit)
2023-02-08 23:07:33 +0100chexum_(~quassel@gateway/tor-sasl/chexum)
2023-02-08 23:08:26 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
2023-02-08 23:09:06 +0100thegeekinside(~thegeekin@189.180.83.186) (Ping timeout: 268 seconds)
2023-02-08 23:09:45 +0100 <AndreasK> akegalj: I had assumed it's a strict field but doesn't seem to be so it's a bit tricker
2023-02-08 23:10:30 +0100michalz(~michalz@185.246.204.101) (Remote host closed the connection)
2023-02-08 23:11:50 +0100 <AndreasK> Per the report foo { bar = baz} get's desugared to `case foo of Con fld1 ... fldn -> Con { fld1 = fld1, ... , bar = bar,... fldn = fldn }
2023-02-08 23:12:34 +0100 <AndreasK> So that means we fore the deconstruction of old ps, allowing us to gc the old value of the closure_env value immediately.
2023-02-08 23:16:00 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53) (Ping timeout: 248 seconds)
2023-02-08 23:20:55 +0100 <AndreasK> They key take away is that record updates are desugared to one case projecting out all the fields and reconstructing the constructor(s) in the alternative. Rather then being desugared to a constructor allocation and a lot of field selector applications. In the later case the bang wouldn't do anything.
2023-02-08 23:20:58 +0100waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 252 seconds)
2023-02-08 23:22:56 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-02-08 23:23:02 +0100 <akegalj> ok that makes now. If record update is desugared as case split, then I think $! in his case isn't necessary as case will eagarly evaluate. So I think `return (pls {..})` should work the same. `return $! pls {..}` looks nicer, but here we are using extra `seq` on already evaluated form (case expression) ... and that might be unnecessary (and maybe slower?)
2023-02-08 23:24:25 +0100 <akegalj> in anyway, thanks for guidance - my mind is in peace now
2023-02-08 23:26:54 +0100thegeekinside(~thegeekin@189.180.83.186)
2023-02-08 23:28:58 +0100Batzy(~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2023-02-08 23:30:12 +0100Batzy(~quassel@user/batzy)
2023-02-08 23:32:22 +0100Guest|4(~Guest|4@ip-86-49-241-234.bb.vodafone.cz)
2023-02-08 23:32:49 +0100Guest|4(~Guest|4@ip-86-49-241-234.bb.vodafone.cz) (Client Quit)
2023-02-08 23:35:19 +0100mcglk(~mcglk@131.191.49.120) (Read error: Connection reset by peer)
2023-02-08 23:36:27 +0100johnjaye(~pi@173.209.64.74) (Ping timeout: 248 seconds)
2023-02-08 23:36:51 +0100notzmv(~zmv@user/notzmv)
2023-02-08 23:38:26 +0100johnjaye(~pi@173.209.64.74)
2023-02-08 23:38:36 +0100 <mauke> return doesn't force its argument, so why would $! be redundant?
2023-02-08 23:39:35 +0100 <AndreasK> Whaut mauke said + case expressions are not evaluated forms.
2023-02-08 23:40:01 +0100 <AndreasK> Well I guess technically it depends on the exact case, but ususally they aren't
2023-02-08 23:40:43 +0100 <akegalj> right, so pls might be a thunk and it is evaluated with $!
2023-02-08 23:43:29 +0100segfaultfizzbuzz(~segfaultf@108.211.201.53)
2023-02-08 23:44:48 +0100mcglk(~mcglk@131.191.49.120)
2023-02-08 23:50:48 +0100opticblast(~Thunderbi@172.58.82.191)
2023-02-08 23:51:55 +0100mechap(~mechap@user/mechap) (Ping timeout: 248 seconds)
2023-02-08 23:53:09 +0100waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-02-08 23:53:48 +0100mechap(~mechap@user/mechap)
2023-02-08 23:54:00 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0)
2023-02-08 23:54:35 +0100freeside(~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
2023-02-08 23:58:17 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9525:b972:bf3b:9db0) (Ping timeout: 255 seconds)