2022/12/05

2022-12-05 00:00:07 +0100 <dsal> > (foldMap Sum [1..10], foldMap Product [1..10])
2022-12-05 00:00:09 +0100 <lambdabot> (Sum {getSum = 55},Product {getProduct = 3628800})
2022-12-05 00:01:01 +0100 <gqplox[m]> idk why but if feels a bit strange the res function
2022-12-05 00:01:02 +0100 <dsal> The implementation of `sum` is `sum = getSum #. foldMap' Sum`
2022-12-05 00:01:10 +0100 <gqplox[m]> like it has two inputs but its written as res f
2022-12-05 00:01:17 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 00:01:27 +0100 <dsal> Every function has one input and one result.
2022-12-05 00:01:28 +0100 <gqplox[m]> feels fine when simplifying from 1 input to 0 but this looks weird haha
2022-12-05 00:01:37 +0100 <gqplox[m]> yeah I know
2022-12-05 00:01:50 +0100 <gqplox[m]> it just threw me off a bit
2022-12-05 00:02:21 +0100 <gqplox[m]> anyway i have to go early today so cya, thanks for the help simplify my solution
2022-12-05 00:02:36 +0100coot(~coot@213.134.171.3) (Quit: coot)
2022-12-05 00:02:38 +0100 <dsal> I'm trying to make it more complex…
2022-12-05 00:02:39 +0100oldsk00l(~znc@ec2-3-125-42-182.eu-central-1.compute.amazonaws.com) (Remote host closed the connection)
2022-12-05 00:03:04 +0100dsalisn't usually serious
2022-12-05 00:03:10 +0100 <gqplox[m]> so much stuff to do, might not be able to do advent of code this week :(
2022-12-05 00:03:17 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-12-05 00:03:19 +0100fockerize(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds)
2022-12-05 00:03:19 +0100zant(~zant@62.214.20.26) (Ping timeout: 268 seconds)
2022-12-05 00:03:22 +0100 <dsal> But monoids… They're pretty great.
2022-12-05 00:03:34 +0100 <dsal> Yeah, I didn't have a job last year during aoc
2022-12-05 00:03:42 +0100 <dsal> Was so much easier.
2022-12-05 00:04:23 +0100 <gqplox[m]> i want to find time to go through all the cool haskell stuff too
2022-12-05 00:04:26 +0100 <gqplox[m]> like that paper you linked
2022-12-05 00:04:55 +0100 <dsal> @hackage recursion-schemes
2022-12-05 00:04:55 +0100 <lambdabot> https://hackage.haskell.org/package/recursion-schemes
2022-12-05 00:04:59 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 264 seconds)
2022-12-05 00:05:00 +0100 <dsal> ^ implementation of that paper
2022-12-05 00:05:56 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 255 seconds)
2022-12-05 00:07:35 +0100huskle(~huskle@250.79-105-213.static.virginmediabusiness.co.uk)
2022-12-05 00:07:41 +0100 <huskle> HI!
2022-12-05 00:08:35 +0100 <huskle> i have downloaded ghcup
2022-12-05 00:08:56 +0100 <huskle> i want to use the option for getting it to install a specific version of ghc/ghci
2022-12-05 00:09:04 +0100 <huskle> which version do i choose!?
2022-12-05 00:09:13 +0100 <huskle> what features do the newer versions have?
2022-12-05 00:09:24 +0100 <dsal> Same as the previous ones but more.
2022-12-05 00:09:34 +0100 <dsal> Is there a particular feature you're looking for?
2022-12-05 00:10:03 +0100 <huskle> well im not sure, wasnt it something like odd numbers are "experimental" or something?
2022-12-05 00:10:17 +0100 <geekosaur> development versions
2022-12-05 00:10:34 +0100 <geekosaur> ghcup usually doesnt have those, you'd build ghc HEAD from gitlab for them
2022-12-05 00:11:11 +0100 <huskle> so if you google ghc, it has a shortcut to 9.2.4, but right at the top of the main page its 9.2.5
2022-12-05 00:11:34 +0100 <huskle> geekosaur: ahh, thats basically exactly the information i needed, thanks
2022-12-05 00:11:45 +0100 <huskle> but im still interested as to what all these new versions have
2022-12-05 00:11:48 +0100 <monochrom> 2 is an even number.
2022-12-05 00:11:49 +0100 <geekosaur> the odd versioning is in the second component
2022-12-05 00:11:54 +0100 <huskle> i think last i had was some 8.something version
2022-12-05 00:12:05 +0100 <geekosaur> so 9.3 is a devel version, but 9.2.5 is the latest point release
2022-12-05 00:12:19 +0100 <huskle> ooh, i thought the .5 was odd
2022-12-05 00:12:36 +0100 <geekosaur> as yet hls doesn't support it so it may not be recommended yet?
2022-12-05 00:12:41 +0100 <monochrom> Although, in reality, the latest even number is also experimental.
2022-12-05 00:12:50 +0100 <huskle> so i can get that on ghcup? ill try and see, one sec
2022-12-05 00:12:53 +0100 <dsal> This is all a series of experiments.
2022-12-05 00:13:23 +0100 <huskle> ah! says its already installed that version
2022-12-05 00:13:46 +0100 <huskle> okok, so what about new features of these recent releases
2022-12-05 00:13:59 +0100 <monochrom> Hrm, experiments are concurrent, you can't serialize it. :)
2022-12-05 00:14:03 +0100 <geekosaur> point releases are bugfixes.
2022-12-05 00:14:06 +0100 <monochrom> err, s/it/them/
2022-12-05 00:14:07 +0100 <huskle> basically i havnt heard much since linear types
2022-12-05 00:14:16 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-12-05 00:14:33 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-12-05 00:14:40 +0100 <huskle> nothing exciting like that?
2022-12-05 00:15:34 +0100 <geekosaur> not really. 9.2's big thing was native M1 support. 9.4 was mostly bugfixes. 9.6 should have wasm and js backends, but they haven't cut a release branch yet
2022-12-05 00:16:16 +0100 <huskle> wtf is web assembly!? sounds mad
2022-12-05 00:16:32 +0100kadobanana(~mud@user/kadoban) (Ping timeout: 256 seconds)
2022-12-05 00:16:43 +0100 <huskle> m1 is a mac thing by the sounds of it
2022-12-05 00:16:49 +0100 <geekosaur> oh, 9.2 also added LANGUAGE GHC2021 which defaults a number of extensions "on", since standardization is pretty much stuck
2022-12-05 00:17:00 +0100 <huskle> yes! finally
2022-12-05 00:17:06 +0100 <dsal> m1 is aarch64. I also build stuff native for my raspberry pi
2022-12-05 00:17:09 +0100 <huskle> do i specify that in the cabal file
2022-12-05 00:17:16 +0100 <geekosaur> yes, Apple came up with its own odd calling conventions for AArch64 MacOS
2022-12-05 00:17:41 +0100 <dsal> Oh. So it's similar, but different from my linux box?
2022-12-05 00:17:47 +0100 <dsal> I'm pretty high level these days.
2022-12-05 00:17:49 +0100 <geekosaur> it required some internal redesign that should mostly be invisible to the user
2022-12-05 00:17:54 +0100ballast(~ballast@rrcs-24-43-123-92.west.biz.rr.com) (Quit: Client closed)
2022-12-05 00:18:00 +0100 <huskle> oh wait what, its just arm64 - what did we have before!?
2022-12-05 00:18:21 +0100 <huskle> ok, thats actually pretty important then, well, glad to hear that, but i have an intel chip, so...
2022-12-05 00:18:25 +0100 <monochrom> raspberry pi and most ARMs are probably called arm64
2022-12-05 00:19:18 +0100 <dsal> ARM macs are a *huge* upgrade. ARM other things are… fine. I've been running Haskell code on arm32 and arm64 for years. It sometimes involved compiling compilers under qemu or something.
2022-12-05 00:19:27 +0100 <huskle> i was hoping for "the next TypeApplications" or something that would actually change how i write code
2022-12-05 00:19:39 +0100 <huskle> wasnt there anything to do with levity polymorphism or something?
2022-12-05 00:19:40 +0100kadobanana(~mud@user/kadoban)
2022-12-05 00:19:53 +0100zant(~zant@62.214.20.26)
2022-12-05 00:20:11 +0100 <geekosaur> levity polymorphism is I think 9.0 or 9.2, but means less than you think because there are still levity restrictions in other places
2022-12-05 00:20:11 +0100 <huskle> dsal: less crosscomplilation for you then! decent
2022-12-05 00:20:32 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 00:20:39 +0100 <huskle> its been ages since i can even remember what i was doing at all these levities
2022-12-05 00:20:46 +0100 <geekosaur> hm, I don't recall if `forall a ->` is 9.4 or 9.6
2022-12-05 00:20:55 +0100 <huskle> that might be new
2022-12-05 00:21:00 +0100 <huskle> (to me)
2022-12-05 00:21:04 +0100 <dsal> geekosaur: what's that?
2022-12-05 00:21:39 +0100 <huskle> some explicit quantification thingamagig
2022-12-05 00:22:06 +0100 <geekosaur> \cases went in in 9.4
2022-12-05 00:22:15 +0100 <huskle> ski kept on about "exists" a while back, not sure if they were getting at something in particular
2022-12-05 00:22:21 +0100 <dsal> We started using OverloadedRecordDot at work and I appreciate the benefits but really don't like it.
2022-12-05 00:22:30 +0100 <geekosaur> types that can be passed as parameters, which is one of the leadups to Dependent Haskell
2022-12-05 00:22:49 +0100 <huskle> something about impredictive types i guess is the breakthrough we are all waiting for
2022-12-05 00:22:56 +0100 <geekosaur> that was in 9.0
2022-12-05 00:23:18 +0100Guest20(~Guest20@2001:999:488:5cc:3116:f149:10de:6194)
2022-12-05 00:23:19 +0100 <geekosaur> they're not as big a change as you might think either, unless you regularly mess with rank-n types
2022-12-05 00:23:19 +0100 <dsal> Heh. s/through//
2022-12-05 00:23:20 +0100 <huskle> dsal: makes it like jave or something!
2022-12-05 00:23:24 +0100 <huskle> java*
2022-12-05 00:23:30 +0100 <Guest20> @pl map (groupBy ((==) `on` isNumber ) )
2022-12-05 00:23:30 +0100 <lambdabot> map (groupBy ((==) `on` isNumber))
2022-12-05 00:23:39 +0100 <huskle> like object component dereferenching
2022-12-05 00:24:16 +0100 <dsal> You can do a little bit of magic with it, but mostly it's just a small part of lens that makes syntax behave strangely.
2022-12-05 00:24:16 +0100 <huskle> "types that can be passed as parameters", what it is?
2022-12-05 00:24:22 +0100 <geekosaur> okay, the new forall usage didn't make 9.4 so maybe it's in 9.6
2022-12-05 00:24:31 +0100 <dsal> geekosaur: what's the new forall thing?
2022-12-05 00:24:50 +0100 <geekosaur> [04 23:22:30] <geekosaur> types that can be passed as parameters, which is one of the leadups to Dependent Haskell
2022-12-05 00:24:53 +0100 <dsal> ooh
2022-12-05 00:25:14 +0100 <geekosaur> you could say it's visible visible type application 🙂
2022-12-05 00:25:51 +0100 <huskle> so like if i had Functor f => f a, it would "capture" `a' or something, and allow type inference to weild it somehow?
2022-12-05 00:26:04 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
2022-12-05 00:26:05 +0100 <huskle> or am i completely missing the point?
2022-12-05 00:26:37 +0100 <huskle> thats just how i think i would understand "typees that can be passed *as* parameters"
2022-12-05 00:27:17 +0100 <huskle> maybe if i understood how it was part of "dependant" types, which i never understood
2022-12-05 00:27:18 +0100 <geekosaur> instead of writing `foo @Int` you could write `foo Int` for something using the new syntax
2022-12-05 00:27:43 +0100 <geekosaur> unfortunately my own understanding ends there; dependent types are mostly over my head still
2022-12-05 00:27:53 +0100 <huskle> ahhh.. ok so types appearing at value level
2022-12-05 00:28:04 +0100 <huskle> yeah, i guess thats how the levity collapse would end up
2022-12-05 00:28:18 +0100 <huskle> but that kind of messes with our "types have capitals" thing
2022-12-05 00:28:27 +0100 <huskle> i guess thats why thats not a feature of idris, iirc
2022-12-05 00:29:00 +0100 <huskle> id rather use the @ symbol tbh
2022-12-05 00:29:13 +0100 <huskle> but then idk what id do if i was wanting to write the same expression at type level!
2022-12-05 00:29:33 +0100 <huskle> "KindApplications" ?
2022-12-05 00:29:40 +0100 <geekosaur> types don't have capitals. type constructors have capitals, just as data constructors do. `a` can be either a type variable or a value variable depending on context
2022-12-05 00:29:49 +0100 <huskle> oh right yeah, sorry
2022-12-05 00:29:58 +0100 <geekosaur> that kinda went away with TypeInType
2022-12-05 00:30:17 +0100 <huskle> wait, whats a type constructor?
2022-12-05 00:30:30 +0100 <huskle> i thought we only had data constructors and all type statements were synonyms
2022-12-05 00:31:00 +0100 <geekosaur> `Int` (fully saturated), `Maybe` (kind `Type -> Type`, requires a type parameter), etc.
2022-12-05 00:31:30 +0100 <huskle> func :: forall a f. Functor f => f a -> f a; func = id "a
2022-12-05 00:31:44 +0100 <geekosaur> `data Foo a = Bar | Baz a` defines a type constructor `Foo` and data/value constructors `Bar` and `Baz`
2022-12-05 00:31:47 +0100 <huskle> func :: forall a f. Functor f => f a -> f a; func = id @a
2022-12-05 00:32:22 +0100 <huskle> (stupid linux keyboard swaps the at and quotemark round)
2022-12-05 00:33:08 +0100 <huskle> (but at least i finally got rid of that asus bloatware - a windows update made it so you couldnt kill it in taskmanager, and it took so much ram as taskmanager wouldnt even open, even if nothing else was running!)
2022-12-05 00:33:31 +0100 <huskle> (at some point i might ask how to set up emacs with haskell)
2022-12-05 00:34:04 +0100 <huskle> geekosaur: ok, i understand this termanology
2022-12-05 00:34:54 +0100 <huskle> anyway, id be supprised to see an un "type applicationed" type constructor at value level
2022-12-05 00:35:18 +0100 <huskle> foo Int
2022-12-05 00:35:29 +0100 <huskle> is there really an argument for this?
2022-12-05 00:35:58 +0100 <huskle> a fucntion taking as an argument, something like a proxy?
2022-12-05 00:36:12 +0100 <huskle> foo :: Proxy Int -> ...
2022-12-05 00:37:28 +0100 <geekosaur> I think at least at first it would let you specify where in an argument list you want the type, which at the moment is somewhat out of your control with VTA
2022-12-05 00:37:33 +0100 <huskle> normally it would be like foo :: forall a. SomeTypeSignature a, and you would use type applications
2022-12-05 00:38:26 +0100 <huskle> geekosaur: only if you let it do the forall implicity, and then its just order of appearence normally, but gets complicated if it has to infer those from other types
2022-12-05 00:38:26 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-12-05 00:38:27 +0100 <geekosaur> `mumble Int a Foo` instead of `mumble @Int @Foo` and hoping you got the order right or having to use `forall {a} {b}` or whatever to pin it
2022-12-05 00:39:30 +0100 <huskle> i mean, its good practice to write the foralls yourself and keep track of what order the arguments are in, just like how you would have to keep track of the order the functions arguments appear
2022-12-05 00:39:49 +0100 <huskle> i cant see why you would want to mix up these kind of proxies into the actual arguments in the type signature
2022-12-05 00:40:48 +0100 <geekosaur> I can't really either, since I mostly avoid that level of type hackery anyway. eisenberg has some reason for them but I have little hope of understanding it 🙂
2022-12-05 00:40:50 +0100 <huskle> foo :: forall a. Proxy a -> SomeTypeSignature a
2022-12-05 00:41:02 +0100 <huskle> i never use proxies like this
2022-12-05 00:41:41 +0100 <huskle> but then, i think im occasionally causght out where you would *have* too, but i cant figure out if thats just me getting bugridden
2022-12-05 00:42:26 +0100 <huskle> you shouldnt ever *have* too right? or is there some example of some place where the weakness of inference causes a bug where the user specify the proxy directly fixes the bug
2022-12-05 00:42:40 +0100 <huskle> (im kind of sure iv come accross such a situation, but i cant actually be sure..)
2022-12-05 00:43:21 +0100 <huskle> (i think it was when trying to write a simple kind of type level compiler - dont ask, i near went spare)
2022-12-05 00:44:07 +0100 <huskle> yeah, so actually, either, figuring out exactly where the typechecker struggles with inference and fixing that, with at least better indications to the user as to how to guide the typechecker with annotations
2022-12-05 00:44:14 +0100 <huskle> sorry i cant be more exact
2022-12-05 00:44:39 +0100 <huskle> because at the moment its just like "nope - denied"
2022-12-05 00:45:15 +0100 <huskle> and its very difficult to approach it with a coding methodology which allows this to be avoided
2022-12-05 00:45:50 +0100 <huskle> anywaay, i should get back to whatever it is i was doing...
2022-12-05 00:45:53 +0100geekosauris really the wrong one to be asking about this…
2022-12-05 00:46:06 +0100 <geekosaur> *to ask
2022-12-05 00:46:53 +0100 <huskle> whatever, maybe somehow the strange failings will guide the comunity like a lighthouse from jagged coral
2022-12-05 00:47:39 +0100 <huskle> type level graphs of function programs... not yet. basically
2022-12-05 00:48:20 +0100 <huskle> like, a dot list (list of functions to be dotted together) can be given hetrogenous style constructors
2022-12-05 00:48:32 +0100bjourne2(~bjorn@94.191.136.212.mobile.tre.se) (Read error: Connection reset by peer)
2022-12-05 00:48:33 +0100 <huskle> but when you start trying to elaborate on that your head could explode.
2022-12-05 00:50:25 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:dc47:5d05:725b:66f2) (Remote host closed the connection)
2022-12-05 00:50:41 +0100kadobanana(~mud@user/kadoban) (Remote host closed the connection)
2022-12-05 00:51:06 +0100kadobanana(~mud@user/kadoban)
2022-12-05 00:51:37 +0100Guest|43(~Guest|43@c-73-182-192-142.hsd1.ma.comcast.net)
2022-12-05 00:52:14 +0100 <Guest|43> Hi I'm facing an issue in downloading haskell on my mac
2022-12-05 00:53:26 +0100 <huskle> last type i got the compiler to return to me was this; https://paste.tomsmeding.com/uGyb8Z0d
2022-12-05 00:54:12 +0100 <huskle> :'-(
2022-12-05 00:54:16 +0100Guest20(~Guest20@2001:999:488:5cc:3116:f149:10de:6194) (Quit: Client closed)
2022-12-05 00:54:46 +0100 <huskle> i didnt think it could actually blow up the world, i thought that was just some joke edkmett would make
2022-12-05 00:56:06 +0100 <huskle> im afraid i may have spoiled the ol' "if it compiles ship it" addage
2022-12-05 00:56:42 +0100 <huskle> Guest|43 : go on! whats the issue?
2022-12-05 00:57:50 +0100acidjnk(~acidjnk@p200300d6e7137a4188c21b5678eecc17.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-12-05 00:58:28 +0100huskle(~huskle@250.79-105-213.static.virginmediabusiness.co.uk) (Quit: Connection closed)
2022-12-05 00:58:42 +0100iqubic(~avi@2601:601:1100:edd0:7a35:ede8:5354:af72) (Read error: Connection reset by peer)
2022-12-05 01:09:49 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:dc47:5d05:725b:66f2)
2022-12-05 01:11:02 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2022-12-05 01:11:10 +0100guest`(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net)
2022-12-05 01:17:15 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-05 01:17:15 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-05 01:17:15 +0100wroathe(~wroathe@user/wroathe)
2022-12-05 01:18:00 +0100guest`(~user@host-140-28.ilcub310.champaign.il.us.clients.pavlovmedia.net) (ERC (IRC client for Emacs 27.1))
2022-12-05 01:18:20 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-12-05 01:18:48 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 01:19:29 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex)
2022-12-05 01:19:53 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-12-05 01:20:13 +0100Guest|43(~Guest|43@c-73-182-192-142.hsd1.ma.comcast.net) (Quit: Connection closed)
2022-12-05 01:22:12 +0100zant(~zant@62.214.20.26) (Ping timeout: 248 seconds)
2022-12-05 01:23:29 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-12-05 01:23:58 +0100crazazy``(~user@130.89.171.62) (Ping timeout: 256 seconds)
2022-12-05 01:25:14 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-05 01:25:14 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-05 01:25:49 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 01:28:24 +0100chexum_(~quassel@gateway/tor-sasl/chexum)
2022-12-05 01:28:29 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-12-05 01:29:17 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-05 01:29:52 +0100jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
2022-12-05 01:31:13 +0100califax(~califax@user/califx)
2022-12-05 01:32:48 +0100bilegeek_(~bilegeek@33.sub-174-208-225.myvzw.com)
2022-12-05 01:33:03 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-05 01:34:02 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-05 01:35:23 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-05 01:35:29 +0100bilegeek(~bilegeek@2600:1008:b020:f89e:4697:1f09:bb25:aea6) (Ping timeout: 255 seconds)
2022-12-05 01:35:30 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 01:37:03 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2022-12-05 01:37:34 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
2022-12-05 01:39:11 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-05 01:40:08 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-12-05 01:40:35 +0100zant(~zant@62.214.20.26)
2022-12-05 01:43:45 +0100ballast(~ballast@rrcs-24-43-123-92.west.biz.rr.com)
2022-12-05 01:45:17 +0100 <ballast> How come there isn't an instance (Ord k, Monoid m) => Monoid (Map k (m a))
2022-12-05 01:45:30 +0100 <ballast> does this conflict with the other instance definition?
2022-12-05 01:45:56 +0100 <jackdk> yes
2022-12-05 01:46:08 +0100 <jackdk> https://hackage.haskell.org/package/monoidal-containers
2022-12-05 01:46:47 +0100 <ballast> Was there a reason why they didn't just make a newtype in containers?
2022-12-05 01:47:18 +0100 <jackdk> (caveats: foldMap-ing a bunch of singleton maps can be slow, foldMap-ing a bunch of singleton HashMaps can be O(n^2), it depends on `lens` because it wants to provide `At` and `AsEmpty` instances, etc.)
2022-12-05 01:47:36 +0100 <jackdk> probably because "go write a library" is easier than "go change a core library"
2022-12-05 01:48:00 +0100 <EvanR> Data.TotalMap has that Monoid instance
2022-12-05 01:48:19 +0100 <EvanR> among many other instances
2022-12-05 01:48:42 +0100 <ballast> Ah I didn't realize that it might have perf implications. Guess I'll just rewrite as a fold
2022-12-05 01:48:53 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-05 01:49:17 +0100 <ballast> i like foldMap because it means i don't have to remember the difference between left and right
2022-12-05 01:49:26 +0100 <EvanR> you could also do unionWith (<>)
2022-12-05 01:49:57 +0100 <ballast> yeah i think i'll just do insertWith (<>)
2022-12-05 01:50:27 +0100 <c_wraith> that instance looks like a kind error to me...
2022-12-05 01:50:53 +0100 <ballast> wouldn't be surprised, i always get confused with how you're supposed to write monoid
2022-12-05 01:51:06 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Quit: opticblast)
2022-12-05 01:51:07 +0100 <c_wraith> did you mean (Map k m) ?
2022-12-05 01:51:24 +0100 <jackdk> I literally only looked as far as `(Ord k, Monoid
2022-12-05 01:51:28 +0100 <ballast> probably, seems the intent got through though :)
2022-12-05 01:51:37 +0100 <jackdk> m) => Map` and guessed the rest
2022-12-05 01:51:54 +0100 <EvanR> communication prevailed in spite of language
2022-12-05 01:52:05 +0100 <c_wraith> Anyway, it seems like it would need intersection semantics. That would surprise a lot of people, I think
2022-12-05 01:52:23 +0100 <ballast> intersection semantics?
2022-12-05 01:52:28 +0100 <EvanR> unionWith results in intersection semantics? xD
2022-12-05 01:52:28 +0100 <c_wraith> Which would explain why a total-map data structure would have an instance - it could actually have union semantics in that case.
2022-12-05 01:52:52 +0100mvk(~mvk@2607:fea8:5ce3:8500::efb)
2022-12-05 01:53:24 +0100 <EvanR> fine I'll check the details
2022-12-05 01:53:36 +0100 <c_wraith> Hmm. I think I got myself circled around backwards on that one.
2022-12-05 01:53:42 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2022-12-05 01:53:45 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 01:54:00 +0100zant(~zant@62.214.20.26) (Ping timeout: 256 seconds)
2022-12-05 01:54:28 +0100 <EvanR> doing a unionWith seems to satisfy the monoid law
2022-12-05 01:54:30 +0100 <c_wraith> right. union with the empty set is a monoid, right.
2022-12-05 01:55:07 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 01:58:33 +0100 <EvanR> 1. I can't seem to use class as a field name, so I tried NoFieldSelectors
2022-12-05 01:58:54 +0100 <EvanR> 2. NoFieldSelectors doesn't seem to be a thing in ghc 8.10
2022-12-05 01:59:18 +0100 <c_wraith> I think it was added in 9.2
2022-12-05 01:59:23 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-05 01:59:33 +0100 <EvanR> think it'll let me use class as a field name? xD
2022-12-05 01:59:42 +0100 <c_wraith> no
2022-12-05 02:00:00 +0100 <c_wraith> I could be wrong, though!
2022-12-05 02:00:15 +0100califax(~califax@user/califx) (Remote host closed the connection)
2022-12-05 02:01:38 +0100califax(~califax@user/califx)
2022-12-05 02:01:56 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-12-05 02:02:14 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-05 02:05:53 +0100thyriaen(~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Quit: Leaving)
2022-12-05 02:06:39 +0100slntsa(~slntsa@2001:999:488:5cc:3116:f149:10de:6194)
2022-12-05 02:07:05 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-05 02:07:18 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 02:08:04 +0100ballast(~ballast@rrcs-24-43-123-92.west.biz.rr.com) (Quit: Client closed)
2022-12-05 02:10:14 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-12-05 02:11:25 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2022-12-05 02:11:34 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-05 02:14:17 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 02:14:39 +0100califax(~califax@user/califx)
2022-12-05 02:15:16 +0100 <EvanR> if think about singleton or empty maps, the default Monoid instance that uses union is a bit weird
2022-12-05 02:15:50 +0100 <EvanR> the implied base Monoid there always takes the left argument unless it's empty
2022-12-05 02:16:20 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-12-05 02:18:01 +0100razetime(~quassel@49.207.211.219)
2022-12-05 02:24:36 +0100xff0x(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 248 seconds)
2022-12-05 02:26:10 +0100 <dsal> The default monoid of maps has caused me bugs several times.
2022-12-05 02:26:14 +0100dsalisn't good at learning
2022-12-05 02:34:45 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2022-12-05 02:35:20 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
2022-12-05 02:38:29 +0100dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 255 seconds)
2022-12-05 02:38:43 +0100dibblego(~dibblego@122-199-1-30.ip4.superloop.com)
2022-12-05 02:38:43 +0100dibblego(~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
2022-12-05 02:38:43 +0100dibblego(~dibblego@haskell/developer/dibblego)
2022-12-05 02:39:30 +0100mvk(~mvk@2607:fea8:5ce3:8500::efb) (Quit: Going elsewhere)
2022-12-05 02:52:15 +0100slntsa(~slntsa@2001:999:488:5cc:3116:f149:10de:6194) (Quit: Client closed)
2022-12-05 02:55:12 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-12-05 02:57:51 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-05 03:07:38 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-05 03:10:43 +0100accord(uid568320@id-568320.hampstead.irccloud.com)
2022-12-05 03:12:11 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
2022-12-05 03:14:39 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds)
2022-12-05 03:24:25 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 03:26:01 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2022-12-05 03:29:14 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-12-05 03:32:05 +0100Erutuon(~Erutuon@user/erutuon)
2022-12-05 03:41:44 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 03:41:48 +0100brettgilio(~brettgili@x-irc.gq) (Quit: The Lounge - https://thelounge.chat)
2022-12-05 03:42:15 +0100brettgilio(~brettgili@x-irc.gq)
2022-12-05 03:46:12 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-12-05 03:47:20 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds)
2022-12-05 03:49:26 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 03:51:01 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 03:52:07 +0100ddb1ddb
2022-12-05 03:56:51 +0100 <probie> I'd go so far as to say the monoid instance for Map is wrong. It should be (Ord k, Semigroup v) => Monoid (Map k v) and have `(<>) = M.unionWith (<>)`. You can still emulate the current behaviour by just coercing to `Map k (Data.Semigroup.First v)`
2022-12-05 03:58:18 +0100 <dsal> There's more than one valid way to do it, so having anything is kind of wrong.
2022-12-05 03:59:02 +0100 <albet70> tomsmeding, I found a way to put raw html code inside textarea with js, reading html text file with Hasekll and put it into textarea with js is a wrong way, lots of escape characters, the right way is using js to fetch the content of that text file as plain text and put it into textarea
2022-12-05 04:03:11 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 04:04:28 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 04:04:36 +0100 <probie> dsal: Maybe? I'd still rather the wrong one which encompasses all the other "sane
2022-12-05 04:04:45 +0100 <probie> " implementations
2022-12-05 04:05:37 +0100 <dsal> Yeah. It's what I expected at least twice anyway.
2022-12-05 04:07:52 +0100iqubic(~avi@2601:602:9502:c70:5424:6247:46f4:3180)
2022-12-05 04:14:51 +0100segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 265 seconds)
2022-12-05 04:18:41 +0100 <monochrom> Unpopular opinion: All of them are right. :)
2022-12-05 04:18:59 +0100img(~img@user/img)
2022-12-05 04:20:14 +0100 <EvanR> is there a Monoid instance for Map which can't be implemented as a Monoid instance on the value type, plus unionWith (<>)
2022-12-05 04:23:55 +0100 <jackdk> intersection?
2022-12-05 04:24:03 +0100 <jackdk> Might only be a semigroup though
2022-12-05 04:24:10 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-12-05 04:26:56 +0100 <EvanR> yeah there's no mempty
2022-12-05 04:28:21 +0100jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
2022-12-05 04:28:34 +0100waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-12-05 04:30:19 +0100 <maerwald[m]> Combine it with Default and pick a random value
2022-12-05 04:30:32 +0100money_(~money@user/polo)
2022-12-05 04:31:32 +0100money_(~money@user/polo) (Client Quit)
2022-12-05 04:34:54 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-12-05 04:34:54 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-12-05 04:34:54 +0100finn_elijaFinnElija
2022-12-05 04:38:00 +0100img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-05 04:39:01 +0100gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2022-12-05 04:40:16 +0100 <jackdk> instance (Universe k, Universe v, Ord k) => Monoid (Intersection (Map k v))
2022-12-05 04:43:19 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-12-05 04:44:34 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 256 seconds)
2022-12-05 04:44:40 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-12-05 04:44:53 +0100gentauro(~gentauro@user/gentauro)
2022-12-05 04:45:01 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 04:45:25 +0100waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
2022-12-05 04:46:07 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 04:46:22 +0100Xeroine(~Xeroine@user/xeroine) (Ping timeout: 268 seconds)
2022-12-05 04:47:24 +0100td_(~td@83.135.9.35) (Ping timeout: 256 seconds)
2022-12-05 04:47:51 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-05 04:48:55 +0100Kaipei(~Kaiepi@108.175.84.104)
2022-12-05 04:49:14 +0100td_(~td@83.135.9.25)
2022-12-05 04:50:55 +0100 <EvanR> or instance (UnMonoidable v, Ord k) => Monoid (Map k v) with the usual union behavior xD
2022-12-05 04:54:16 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 252 seconds)
2022-12-05 04:57:14 +0100rburkholder(~blurb@96.45.2.121) (Remote host closed the connection)
2022-12-05 04:57:32 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 05:00:02 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-05 05:00:02 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-05 05:00:02 +0100wroathe(~wroathe@user/wroathe)
2022-12-05 05:06:06 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
2022-12-05 05:09:18 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 05:17:51 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 05:18:58 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 05:19:04 +0100 <probie> I don't think you want `Universe v`, but rather `Default v` (and hopefully `Semigroup v`)
2022-12-05 05:20:54 +0100 <probie> A Map is equivalent to a pair of a Set of keys, and a function from elements in that set to values. That function is happy being `const def`
2022-12-05 05:22:02 +0100 <jackdk> I see what you're saying, but I consider `Default` to be an evil class. May as well go `Monoid v` and then your map can use `intersectionWith (<>)`
2022-12-05 05:23:49 +0100 <jackdk> https://www.haskellforall.com/2022/06/defaultable-map-applicative-wrapper-for.html if you want a "default" then carry it around with a type like this
2022-12-05 05:24:42 +0100 <probie> Default bothers me too, because the only time I want a default (or alternatively, a "zero" or "identity"), it depends on another typeclass and as such, makes no sense on its own
2022-12-05 05:26:01 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 05:27:15 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 05:28:29 +0100mbuf(~Shakthi@49.204.138.176)
2022-12-05 05:30:17 +0100 <jackdk> One of these days I will write up my "did you mean monoid?" rant
2022-12-05 05:30:33 +0100 <jackdk> Until then, I will plug https://hackage.haskell.org/package/acme-default
2022-12-05 05:31:58 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-12-05 05:35:45 +0100rburkholder(~blurb@96.45.2.121)
2022-12-05 05:40:09 +0100img(~img@user/img)
2022-12-05 05:44:34 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2022-12-05 05:46:14 +0100aeroplane(~user@user/aeroplane)
2022-12-05 05:50:50 +0100 <EvanR> class Inhabited a where something :: a -- xD
2022-12-05 05:52:11 +0100stevenxl(uid133530@id-133530.uxbridge.irccloud.com)
2022-12-05 05:54:01 +0100 <probie> I'd be mostly ok with that. It doesn't imply any property about the inhabitant. But I don't see a "real" use for it in Haskell though
2022-12-05 05:54:11 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 05:55:27 +0100 <probie> In Coq, Lean or Agda I could see it being useful
2022-12-05 05:56:11 +0100fizbin(~fizbin@user/fizbin)
2022-12-05 05:56:17 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 06:13:06 +0100img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-05 06:17:59 +0100img(~img@user/img)
2022-12-05 06:20:20 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 06:42:12 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 252 seconds)
2022-12-05 06:44:27 +0100bobbingbob(~dfadsva@2604:3d09:207f:f650::7b3a)
2022-12-05 06:44:41 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de)
2022-12-05 06:46:24 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 256 seconds)
2022-12-05 06:49:14 +0100bobbingbob(~dfadsva@2604:3d09:207f:f650::7b3a) (Ping timeout: 246 seconds)
2022-12-05 06:49:37 +0100nibelungen(~asturias@2001:19f0:7001:638:5400:3ff:fef3:8725) (Ping timeout: 256 seconds)
2022-12-05 06:53:34 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
2022-12-05 07:00:48 +0100roboguy_(~roboguy_@cpe-69-76-235-109.kc.res.rr.com)
2022-12-05 07:02:23 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-12-05 07:10:16 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-05 07:11:11 +0100img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-05 07:12:04 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-12-05 07:13:08 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 248 seconds)
2022-12-05 07:14:07 +0100img(~img@user/img)
2022-12-05 07:14:49 +0100Kaipei(~Kaiepi@108.175.84.104) (Read error: Connection reset by peer)
2022-12-05 07:15:14 +0100Kaipei(~Kaiepi@108.175.84.104)
2022-12-05 07:24:12 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-05 07:26:28 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 248 seconds)
2022-12-05 07:28:24 +0100tomokojun(~tomokojun@37.19.210.31) (Quit: じゃあね〜。)
2022-12-05 07:38:58 +0100freeside(~mengwong@129.126.10.7)
2022-12-05 07:43:39 +0100freeside(~mengwong@129.126.10.7) (Ping timeout: 265 seconds)
2022-12-05 07:43:59 +0100freeside(~mengwong@122.11.214.68)
2022-12-05 07:47:09 +0100chexum_chexum
2022-12-05 07:50:48 +0100mncheckm(~mncheck@193.224.205.254)
2022-12-05 07:51:32 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 248 seconds)
2022-12-05 08:04:08 +0100roboguy_(~roboguy_@cpe-69-76-235-109.kc.res.rr.com) (Quit: Leaving...)
2022-12-05 08:08:23 +0100freeside(~mengwong@122.11.214.68) (Read error: Connection reset by peer)
2022-12-05 08:08:40 +0100Scraeling(~Scraeling@user/scraeling)
2022-12-05 08:11:16 +0100freeside(~mengwong@122.11.214.68)
2022-12-05 08:12:49 +0100pyrex_(~pyrex@2601:645:8781:1c90:a460:e23d:4864:da00) (Ping timeout: 252 seconds)
2022-12-05 08:14:05 +0100 <xilo> hi, concept check: foldr const 'a' [1..5] this evaluates to const 1 (foldr const 'a' [2,..]) I assume foldr will not be evaluated due to const, so it must be legal expression, but it is not, why?
2022-12-05 08:15:44 +0100 <int-e> :t foldr const
2022-12-05 08:15:45 +0100 <lambdabot> Foldable t => b -> t b -> b
2022-12-05 08:16:37 +0100 <int-e> xilo: it doesn't type-check because 'a' and the list elements do not have the same type
2022-12-05 08:17:47 +0100 <xilo> I have to start typecheking before I ask, thank you, very much!
2022-12-05 08:17:53 +0100 <int-e> And even your value-level reasoning in some untyped Haskell would reveal that: foldr const 'a' [] = 'a' can't have a different type from foldr const 'a' [1..5] = 1.
2022-12-05 08:17:53 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-05 08:18:36 +0100 <int-e> (That doesn't always work.)
2022-12-05 08:19:04 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-05 08:23:27 +0100kenran(~user@user/kenran)
2022-12-05 08:23:38 +0100bilegeek_(~bilegeek@33.sub-174-208-225.myvzw.com) (Quit: Leaving)
2022-12-05 08:29:40 +0100ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-12-05 08:30:06 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-12-05 08:35:43 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-05 08:38:04 +0100Guest|20(~Guest|20@n220246254153.netvigator.com)
2022-12-05 08:38:35 +0100Guest|20(~Guest|20@n220246254153.netvigator.com) (Client Quit)
2022-12-05 08:38:49 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-12-05 08:43:48 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-05 08:45:22 +0100shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-12-05 08:48:10 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-12-05 08:48:25 +0100zant(~zant@62.214.20.26)
2022-12-05 08:50:25 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 08:52:24 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer)
2022-12-05 08:52:51 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-12-05 08:55:55 +0100acidjnk(~acidjnk@p200300d6e7137a4188c21b5678eecc17.dip0.t-ipconnect.de)
2022-12-05 09:09:16 +0100accord(uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-05 09:12:17 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe)
2022-12-05 09:17:45 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:12d6:dac:7863:eaa5)
2022-12-05 09:18:48 +0100mjs22(~user@76.115.19.239)
2022-12-05 09:18:58 +0100mmhat(~mmh@p200300f1c73b5145ee086bfffe095315.dip0.t-ipconnect.de)
2022-12-05 09:22:05 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-05 09:22:06 +0100freeside(~mengwong@122.11.214.68) (Read error: Connection reset by peer)
2022-12-05 09:23:08 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-05 09:24:07 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-05 09:24:16 +0100 <dminuoso> xilo: Additionally it might be helpful to think of `foldr f z` as replacing `:` with `f` and `[]` with `z` in a list.
2022-12-05 09:25:17 +0100 <dminuoso> The type error would become apparent through that lens as well.
2022-12-05 09:25:40 +0100 <dminuoso> https://upload.wikimedia.org/wikipedia/commons/3/3e/Right-fold-transformation.png
2022-12-05 09:27:34 +0100 <mauke> not really, if you're not already thinking in terms of types
2022-12-05 09:27:57 +0100 <mauke> (or is that in types of terms?)
2022-12-05 09:28:17 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:12d6:dac:7863:eaa5) (Ping timeout: 256 seconds)
2022-12-05 09:28:28 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 256 seconds)
2022-12-05 09:34:03 +0100 <dminuoso> Well I guess it is with the understanding that `f` is not instantiated at multiple types, but all occurences must have the same type.\
2022-12-05 09:36:24 +0100acidjnk(~acidjnk@p200300d6e7137a4188c21b5678eecc17.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-05 09:40:59 +0100fserucas(~fserucas@212.157.222.2)
2022-12-05 09:43:26 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:f94e:37fa:6c10:51fa)
2022-12-05 09:44:40 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-05 09:47:03 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
2022-12-05 09:48:36 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:dc47:5d05:725b:66f2) (Remote host closed the connection)
2022-12-05 09:52:29 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-12-05 09:52:40 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-05 09:53:37 +0100cfricke(~cfricke@user/cfricke)
2022-12-05 09:54:13 +0100acidjnk(~acidjnk@p200300d6e7137a4179c4b3a1e8b4bdac.dip0.t-ipconnect.de)
2022-12-05 10:00:03 +0100JonathanWatson[m(~jjwmatrix@2001:470:69fc:105::2:a544) (Quit: You have been kicked for being idle)
2022-12-05 10:00:53 +0100freeside(~mengwong@122.11.214.68)
2022-12-05 10:03:56 +0100 <albet70> why take and drop don't use start with 0?
2022-12-05 10:04:23 +0100 <albet70> take 0 "abc" == "a", use position as paramter not number
2022-12-05 10:05:20 +0100 <albet70> in other language there is slice, like slice (3,5) "abcdef" == "de"
2022-12-05 10:05:58 +0100 <albet70> "abcdef"[3:5] == 'de'
2022-12-05 10:06:17 +0100 <mauke> > take (5 - 3) (drop 3 "abcdef")
2022-12-05 10:06:19 +0100 <lambdabot> "de"
2022-12-05 10:07:07 +0100 <mauke> > let slice a b = take (b - a) . drop a in slice 3 5 "abcdef
2022-12-05 10:07:09 +0100 <lambdabot> <hint>:1:59: error:
2022-12-05 10:07:09 +0100 <lambdabot> lexical error in string/character literal at end of input
2022-12-05 10:07:12 +0100 <mauke> > let slice a b = take (b - a) . drop a in slice 3 5 "abcdef"
2022-12-05 10:07:14 +0100 <lambdabot> "de"
2022-12-05 10:08:18 +0100 <dminuoso> albet70: Because the words `take` and `drop` fit nicely with the number of elements, rather than index.
2022-12-05 10:08:37 +0100 <dminuoso> I for one take the stance that all this 0-based indexing nonsense is one of the biggest mistakes done in computing. :(
2022-12-05 10:10:07 +0100 <mauke> 1 based indexing is weird and confusing
2022-12-05 10:10:16 +0100 <mauke> like American elevators
2022-12-05 10:10:56 +0100Heyting(~Heyting@193.198.16.217)
2022-12-05 10:11:09 +0100 <dminuoso> The sheer amount of off-by-one errors induced because we have 0 based indexing has probably created damages in the billions in the history of mankind.
2022-12-05 10:11:14 +0100MajorBiscuit(~MajorBisc@c-001-009-004.client.tudelft.eduvpn.nl)
2022-12-05 10:12:36 +0100 <dminuoso> One-based indexing conforms to how humans communicate and think. Given that code ideally communicates thought and intent to humans, that's an impedance mismatch.
2022-12-05 10:12:47 +0100 <dminuoso> *zero based indexing is an impedance mismatch
2022-12-05 10:13:07 +0100Heyting(~Heyting@193.198.16.217) (Remote host closed the connection)
2022-12-05 10:13:23 +0100 <mauke> the sheer amount of obesity caused by food is a clear sign that eating food is a mistake
2022-12-05 10:13:59 +0100freeside(~mengwong@122.11.214.68) (Ping timeout: 264 seconds)
2022-12-05 10:14:41 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-12-05 10:15:10 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d)
2022-12-05 10:15:17 +0100 <mauke> you're comparing 0-indexing against a hypothetical world without any indexing, not against 1-indexing
2022-12-05 10:15:45 +0100 <mauke> that is, you're not counting errors induced by 1-based indexing
2022-12-05 10:15:49 +0100 <dminuoso> Not sure where you inferred that from.
2022-12-05 10:16:50 +0100 <mauke> <dminuoso> I for one take the stance that all this 0-based indexing nonsense is one of the biggest mistakes done in computing. :( <dminuoso> The sheer amount of off-by-one errors induced because we have 0 based indexing has probably created damages in the billions in the history of mankind.
2022-12-05 10:17:15 +0100 <int-e> It's not like the off-by-one errors disappear with 1-based indexing. The fenceposts are still there.
2022-12-05 10:17:29 +0100 <mauke> by the same logic you could argue that eating food is one of humanity's biggest mistakes because it causes obesity
2022-12-05 10:17:37 +0100 <dminuoso> int-e: That's fair I suppose.
2022-12-05 10:17:54 +0100 <mauke> but you're not counting starvation, i.e. issues caused by not eating
2022-12-05 10:18:28 +0100kmein(~weechat@user/kmein) (Quit: ciao kakao)
2022-12-05 10:19:55 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-05 10:20:20 +0100kmein(~weechat@user/kmein)
2022-12-05 10:34:33 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
2022-12-05 10:36:28 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-05 10:39:08 +0100jargon_(~jargon@174-22-207-8.phnx.qwest.net)
2022-12-05 10:40:57 +0100jargon(~jargon@174-22-207-8.phnx.qwest.net) (Ping timeout: 268 seconds)
2022-12-05 10:43:18 +0100 <albet70> fmap f (a,b) == (a, f b), is there a function work on a?
2022-12-05 10:43:33 +0100cfricke(~cfricke@user/cfricke)
2022-12-05 10:43:37 +0100 <albet70> f' f(a,b) == (f a, b)
2022-12-05 10:43:41 +0100mjs22(~user@76.115.19.239) (Remote host closed the connection)
2022-12-05 10:43:56 +0100 <dminuoso> You can use `first` and `second` respectively
2022-12-05 10:44:27 +0100michalz(~michalz@185.246.204.75)
2022-12-05 10:44:50 +0100 <albet70> f [0,0,3,5,7] == [(0,0),(1,3),(4,5),(6,7)] I need this f function, but with that fmap would be very ugly
2022-12-05 10:45:11 +0100 <albet70> I need an elegant way
2022-12-05 10:46:16 +0100 <dminuoso> I would just handwrite that function.
2022-12-05 10:47:59 +0100 <xerox> > first (^10) (10,3)
2022-12-05 10:48:01 +0100 <lambdabot> (10000000000,3)
2022-12-05 10:48:25 +0100 <dminuoso> albet70: Also Im not sure what the behavior is supposed to be.
2022-12-05 10:49:04 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307)
2022-12-05 10:49:43 +0100 <albet70> findElementInList element alist = fmap fst $ filter ((== element) . snd) $ zip [0..(le ngth alist)] alist
2022-12-05 10:49:56 +0100 <albet70> findElementInList '/' "/ab/c/d" == [0,3,5]
2022-12-05 10:50:13 +0100 <albet70> slice (start, end) alist = drop start $ take end alist
2022-12-05 10:50:42 +0100 <albet70> [0,3,5] is '/' index of "/ab/c/d"
2022-12-05 10:50:50 +0100kuribas(~user@ptr-17d51en2loyitf0zupv.18120a2.ip6.access.telenet.be)
2022-12-05 10:51:06 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-12-05 10:51:08 +0100 <albet70> I tried to write splitOn with that index
2022-12-05 10:51:47 +0100 <albet70> let position = findElementInList '/' "/ab/c/d" in fmap (\x -> slice x url) $ zip <*> tail $ [0] <> position <> [length url] == ["","/ab","/c","/d"]
2022-12-05 10:52:10 +0100 <albet70> url is "/ab/c/d"
2022-12-05 10:52:37 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-05 10:52:45 +0100chele(~chele@user/chele)
2022-12-05 10:52:53 +0100 <albet70> so I need this f, f [0,0,3,5,7] == [(0,0),(1,3),(4,5),(6,7)] , then slice on it
2022-12-05 10:53:10 +0100 <dminuoso> Where do the first elements of each tuple come from?
2022-12-05 10:54:03 +0100 <albet70> the '/' index's next position
2022-12-05 10:54:40 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 260 seconds)
2022-12-05 10:54:48 +0100 <chymera> hi guys, any idea how I can filter a list of data objects? I'm basically readin in a yaml, and I want to find whichever object matches a code.. I'm basically coming from python where that would be a simple list comprehension [a for a in mylist if a["code"]=="smth"]
2022-12-05 10:55:04 +0100 <albet70> so [0,3,5] is '/' position, [(0,0), (1,3), (4,5), (5,7)]
2022-12-05 10:55:46 +0100 <albet70> the tuple's second element is from the next position, and the first is from the previous position plus 1
2022-12-05 10:56:10 +0100 <albet70> It's ugly I know, I have no idea now
2022-12-05 10:56:36 +0100 <albet70> (6,7)
2022-12-05 10:57:05 +0100 <mauke> albet70: https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Bifunctor.html#v:first
2022-12-05 10:57:25 +0100 <dminuoso> albet70: `zip [1..]` gets you most of the way.
2022-12-05 10:58:01 +0100 <dminuoso> Ah no hold on, you want something else
2022-12-05 10:59:49 +0100 <mauke> chymera: [a | a <- mylist, code a == "smth"]
2022-12-05 11:00:17 +0100 <dminuoso> % take 10 $ scanl (+) 0 [0..]
2022-12-05 11:00:18 +0100 <yahb2> [0,0,1,3,6,10,15,21,28,36]
2022-12-05 11:01:04 +0100 <dminuoso> % take 10 $ zip (scanl (+) 0 [0..]) ['a'..'z']
2022-12-05 11:01:04 +0100 <yahb2> [(0,'a'),(0,'b'),(1,'c'),(3,'d'),(6,'e'),(10,'f'),(15,'g'),(21,'h'),(28,'i'),(36,'j')]
2022-12-05 11:01:16 +0100 <dminuoso> albet70: This uses the description you gave, but produces different results.
2022-12-05 11:01:34 +0100 <dminuoso> % take 10 $ scanl (+) 0 [1..]
2022-12-05 11:01:34 +0100 <yahb2> [0,1,3,6,10,15,21,28,36,45]
2022-12-05 11:01:46 +0100 <dminuoso> In particular your `4` looks wronng.
2022-12-05 11:02:17 +0100 <dminuoso> albet70: Anyway, this has a large XY smell to it.
2022-12-05 11:03:42 +0100 <chymera> mauke: thank you 💛
2022-12-05 11:03:53 +0100 <mauke> why are we indexing into lists anyway? what's the overall goal?
2022-12-05 11:04:11 +0100 <chymera> to find the item in the list I want to operate on
2022-12-05 11:04:22 +0100 <mauke> heh, not you
2022-12-05 11:04:29 +0100 <chymera> ?
2022-12-05 11:04:31 +0100 <mauke> you're not using indices :-)
2022-12-05 11:04:49 +0100 <dminuoso> chymera: `filter (== "smth) mylist`
2022-12-05 11:04:52 +0100 <dminuoso> err
2022-12-05 11:05:08 +0100 <dminuoso> % filter (> 0) mylist [-1, 0, 1, 2]
2022-12-05 11:05:08 +0100 <yahb2> <interactive>:56:14: error: Variable not in scope: mylist :: [a1]
2022-12-05 11:05:12 +0100 <dminuoso> % filter (> 0) [-1, 0, 1, 2]
2022-12-05 11:05:12 +0100 <yahb2> [1,2]
2022-12-05 11:05:17 +0100 <mauke> more like: filter (\a -> code a == "smth") mylist
2022-12-05 11:05:58 +0100 <dminuoso> let p a = code a == "smth" in filter p mylist
2022-12-05 11:06:31 +0100 <chymera> well ok, I don't want to operate on it in the sense of changing it, it's fine if it's immutable. I just need to reference the other items from the object to pass them on to other functions.
2022-12-05 11:07:13 +0100 <mauke> chymera: my other comment was about albet70's code involving string slices
2022-12-05 11:07:30 +0100 <chymera> it was just my idea of a toy project, it's the sort of thing that would work very easy with dictionaries. Maybe I came up with an example that's easy in python but hard in haskell :DD
2022-12-05 11:07:31 +0100 <mauke> @undo [a | a <- mylist, code a == "smth"]
2022-12-05 11:07:31 +0100 <lambdabot> concatMap (\ a -> if code a == "smth" then [a] else []) mylist
2022-12-05 11:07:37 +0100 <mauke> @. pl undo [a | a <- mylist, code a == "smth"]
2022-12-05 11:07:37 +0100 <lambdabot> flip (ap (if' . ("smth" ==) . code) return) [] =<< mylist
2022-12-05 11:08:10 +0100 <mauke> @. unpl . pl undo [a | a <- mylist, code a == "smth"]
2022-12-05 11:08:10 +0100 <lambdabot> (mylist >>= \ y -> (return >>= \ x2 -> return (if' ("smth" == code y) x2)) y [])
2022-12-05 11:08:15 +0100 <mauke> perfect
2022-12-05 11:08:52 +0100sh1n(~sh1n@186.152.126.118)
2022-12-05 11:10:31 +0100 <albet70> mauke , need a split function for Data.List
2022-12-05 11:10:48 +0100 <albet70> tired of convert between Data.Text and Data.List
2022-12-05 11:10:54 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-12-05 11:11:25 +0100 <albet70> now find the index function is ok, slice is ok, need the last step for split
2022-12-05 11:11:46 +0100 <albet70> the index range
2022-12-05 11:12:12 +0100genjitsu41mixfix41
2022-12-05 11:12:15 +0100 <albet70> generate the index range from index list
2022-12-05 11:12:33 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 11:13:33 +0100 <mauke> albet70: no, what problem are you actually trying to solve?
2022-12-05 11:13:34 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2022-12-05 11:14:11 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-12-05 11:14:27 +0100 <albet70> "/ab/c/d".split("/") get ['', 'ab', 'c', 'd']
2022-12-05 11:14:38 +0100 <mauke> in terms of the XY problem, splitting and slicing and Data.Text and Data.List are all in X
2022-12-05 11:14:50 +0100 <mauke> why do you want to get that list? what is Y?
2022-12-05 11:14:52 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 252 seconds)
2022-12-05 11:15:26 +0100 <albet70> how you split a String in Haskell with specific character?
2022-12-05 11:15:39 +0100 <mauke> some function in Data.List.Split, probably
2022-12-05 11:15:47 +0100 <mauke> but why do you want to split a string on a character?
2022-12-05 11:16:03 +0100 <albet70> did Data.List.Split come with std?
2022-12-05 11:16:34 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-05 11:16:38 +0100 <albet70> standard libraries
2022-12-05 11:16:49 +0100 <mauke> depends on what you mean by standard libraries
2022-12-05 11:16:56 +0100 <mauke> it's in the split package
2022-12-05 11:17:05 +0100 <albet70> ok
2022-12-05 11:17:43 +0100 <chymera> what's the difference betwen = and <- ?
2022-12-05 11:17:51 +0100 <mauke> > splitOn "/" "/ab/c/d"
2022-12-05 11:17:52 +0100 <lambdabot> ["","ab","c","d"]
2022-12-05 11:18:00 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-05 11:19:05 +0100 <mauke> chymera: depends on context, but generally = is for binding (like size = 42) and <- is for extracting values from something
2022-12-05 11:20:00 +0100 <chymera> so I would be assigning the output of `concatMap (\ a -> if code a == "smth" then [a] else []) mylist` to a new variable via `=` and not via `let varname <-` right?
2022-12-05 11:20:37 +0100 <int-e> yes, let bindings use '='.
2022-12-05 11:20:38 +0100 <mauke> (except for pattern guards, which are weird)
2022-12-05 11:21:04 +0100ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-12-05 11:21:10 +0100 <mauke> 'let x <-' is a syntax error
2022-12-05 11:21:17 +0100 <int-e> But it's nice to have a non-recursive "let". :P
2022-12-05 11:21:23 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-12-05 11:22:02 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-05 11:23:28 +0100 <mauke> chymera: technically, you never have "=" or "<-" by themselves. they are always part of the syntax of some surrounding construct
2022-12-05 11:24:20 +0100 <chymera> hmmm... I keep getting `Couldn't match type ‘[MyFlag]’ with ‘MyFlag’` (I tried to remove most of the other things I'm doing at the same time https://bpa.st/VJNA ). As I understand it my flags variable is a list of objects, but the filtering function excpect it to just be an object? 🤔
2022-12-05 11:25:00 +0100 <mauke> why concatMap?
2022-12-05 11:25:09 +0100 <mauke> if you want to filter, then just use filter
2022-12-05 11:25:42 +0100 <mauke> flags is not a list there, it's a Maybe
2022-12-05 11:26:04 +0100 <chymera> ah, I thought a Maybe is just a modifiler, like it's a Maybe list :P
2022-12-05 11:26:32 +0100 <mauke> Maybe is a modifier like [] is a modifier
2022-12-05 11:26:53 +0100 <mauke> in fact, you can think of Maybe as a list of at most 1 element
2022-12-05 11:27:09 +0100 <chymera> hm, ok, that makes sense.
2022-12-05 11:28:25 +0100 <mauke> I would try something like: flags <- Data.Yaml.decodeThrow ymlData
2022-12-05 11:29:30 +0100 <chymera> can't I add something like an assert statement? so have it just fail at some point and not have me continue to operate on Maybe for the rest of the code? Or it could just fail on the decodeThrow line? I actually thought tha's what decodeThrow would be doing, just throw an exception if it can't decode
2022-12-05 11:29:50 +0100 <chymera> I only put the maybe in because otherwise it kept not running
2022-12-05 11:30:05 +0100Guest94(~Guest94@4.red-83-36-45.dynamicip.rima-tde.net)
2022-12-05 11:30:22 +0100 <mauke> with my code, that's what it should be doing (throw an exception)
2022-12-05 11:31:18 +0100 <mauke> also, I suspect the use of 'error' in line 21 should be 'fail' instead, but I haven't used FromJSON before
2022-12-05 11:33:20 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-05 11:33:34 +0100 <chymera> mauke: I think the code you proposed was what I was using initially, though I might have used let = instead of <- ... in any case it still fails: https://bpa.st/4ILA
2022-12-05 11:34:13 +0100 <mauke> ah, that's because you commented out the fflags line
2022-12-05 11:34:25 +0100 <mauke> now the compiler has no type information to deduce what flags should be
2022-12-05 11:34:37 +0100 <chymera> so I can't print the flags list after I decode it?
2022-12-05 11:34:46 +0100 <mauke> print (flags :: [MyFlag])
2022-12-05 11:34:54 +0100 <chymera> oh..
2022-12-05 11:35:02 +0100 <mauke> you just need some place in the code that nails down the type of flags
2022-12-05 11:35:10 +0100 <chymera> so print won't work unles I tell it the type?
2022-12-05 11:35:29 +0100 <mauke> either an explicit annotation like this, or (with the fflags line) the use of 'code' to access the elements
2022-12-05 11:35:37 +0100 <merijn> print needs to know the type, generally that can be inferred, but not always
2022-12-05 11:36:59 +0100 <chymera> ok, so print works the way you described, thanks :) though the code doesn't work after uncommenting the line for extracting the element I actually care about. LEt me check again for typos
2022-12-05 11:37:21 +0100 <chymera> ah no it works, but I still need the typed print line
2022-12-05 11:37:54 +0100 <mauke> :t concatMap
2022-12-05 11:37:55 +0100 <lambdabot> Foldable t => (a -> [b]) -> t a -> [b]
2022-12-05 11:38:10 +0100 <mauke> oh, it's grown polymorphic behind my back
2022-12-05 11:38:20 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-12-05 11:38:27 +0100 <chymera> it doesn't work with just the normal print statement, but that's ok now that I know hwo to print :D https://bpa.st/CDDQ
2022-12-05 11:38:43 +0100 <mauke> :t filter
2022-12-05 11:38:44 +0100 <lambdabot> (a -> Bool) -> [a] -> [a]
2022-12-05 11:39:04 +0100 <mauke> chymera: let fflags = filter (\a -> code a == "fr_1794") flags
2022-12-05 11:39:09 +0100 <mauke> that should work without type annotations
2022-12-05 11:40:10 +0100 <chymera> nice
2022-12-05 11:41:01 +0100 <mauke> the issue is that the compiler needs to be able to figure out what type 'flags' actually is
2022-12-05 11:41:22 +0100 <mauke> decodeThrow can return pretty much anything, as long as it is an instance of FromJSON
2022-12-05 11:41:33 +0100 <mauke> and print can take pretty much anything, as long as it is an instance of Show
2022-12-05 11:41:44 +0100 <mauke> that's the original ambiguity
2022-12-05 11:42:06 +0100cheater(~Username@user/cheater) (Quit: BitchX: do not expose to open flame or fire)
2022-12-05 11:42:09 +0100 <mauke> with the concatMap version, you can see (FromJSON (t0 MyFlag)) in the error message
2022-12-05 11:42:40 +0100 <mauke> it has figured out that MyFlag is involved because you used 'code' to access the elements, but the container type t0 is unresolved
2022-12-05 11:42:48 +0100 <mauke> because concatMap is generic over containers
2022-12-05 11:42:53 +0100cheater(~Username@user/cheater)
2022-12-05 11:43:23 +0100 <mauke> but filter only works on lists, so from filter it gets [] and from code it gets MyFlag
2022-12-05 11:44:54 +0100 <mauke> let fflags = concatMap (\ a -> if code a == "fr_1794" then [a] else []) (flags :: [MyFlag]) ... print fflags
2022-12-05 11:44:58 +0100 <mauke> ^ that also would've worked
2022-12-05 11:45:06 +0100 <chymera> mauke: It seems I can't prepend head to filter to make sure I just get the actual item and not a 1-length list. It also says it^s a typing error for some reason
2022-12-05 11:45:17 +0100 <mauke> the type annotation isn't directly related to 'print'; it just has to be *somewhere*
2022-12-05 11:45:35 +0100 <mauke> chymera: show me the code and error message
2022-12-05 11:46:44 +0100levinlevinlevin(~levin@213.206.188.232)
2022-12-05 11:47:01 +0100son0p(~ff@2604:3d08:5b7f:5540::37af) (Ping timeout: 252 seconds)
2022-12-05 11:47:19 +0100 <chymera> mauke: the next 2 lines after the print actually work, i.e. if I do the head part in the print call https://bpa.st/XOYQ
2022-12-05 11:47:39 +0100 <mauke> oh, missing parentheses
2022-12-05 11:47:46 +0100 <mauke> you're trying to call head with filter as an argument
2022-12-05 11:47:58 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-05 11:47:59 +0100 <mauke> head (filter (\a -> code a == "fr_1794") flags)
2022-12-05 11:48:04 +0100 <chymera> ok, yep, that works
2022-12-05 11:49:03 +0100 <mauke> alternatively, you could use find
2022-12-05 11:49:25 +0100 <mauke> case find (\a -> code a == "fr_1794") flags of { Nothing -> ...; Just fflag -> ... }
2022-12-05 11:49:46 +0100 <chymera> does that have any advantages?
2022-12-05 11:49:57 +0100 <mauke> it lets you handle the case when it finds nothing
2022-12-05 11:50:10 +0100 <mauke> head on an empty list simply aborts your program
2022-12-05 11:50:15 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2022-12-05 11:50:26 +0100 <mauke> > head []
2022-12-05 11:50:27 +0100 <lambdabot> *Exception: Prelude.head: empty list
2022-12-05 11:51:32 +0100 <int-e> <head explodes>
2022-12-05 11:52:34 +0100 <chymera> mauke: yeah, I think I'm happy with it just termination if it gets improper input.
2022-12-05 11:52:41 +0100 <chymera> *terminating
2022-12-05 11:52:49 +0100 <mauke> @src head
2022-12-05 11:52:49 +0100 <lambdabot> head (x:_) = x
2022-12-05 11:52:49 +0100 <lambdabot> head [] = error "Prelude.head: empty list"
2022-12-05 11:52:59 +0100 <mauke> @src find
2022-12-05 11:52:59 +0100 <lambdabot> find p = listToMaybe . filter p
2022-12-05 11:55:20 +0100 <levinlevinlevin> Does lambdabot just evaluate Haskell expressions?
2022-12-05 11:55:31 +0100 <merijn> levinlevinlevin: Define "just" :p
2022-12-05 11:55:36 +0100 <mauke> no
2022-12-05 11:55:40 +0100 <merijn> It does a bunch of other stuff too
2022-12-05 11:55:43 +0100 <mauke> it can also show source code
2022-12-05 11:55:53 +0100 <merijn> I mean, debatable :p
2022-12-05 11:56:09 +0100 <mauke> and perform pointless code transformations
2022-12-05 11:56:24 +0100 <levinlevinlevin> head [1,2,3]
2022-12-05 11:56:26 +0100 <merijn> @src isn't actually showing the real source, just doing a database lookup of keywords to stored source snippets which may or may not be the actual source :p
2022-12-05 11:56:26 +0100 <lambdabot> Source not found. My pet ferret can type better than you!
2022-12-05 11:56:50 +0100 <levinlevinlevin> > head [1,2,3]
2022-12-05 11:56:51 +0100 <int-e> @help src
2022-12-05 11:56:51 +0100 <lambdabot> src <id>. Display the implementation of a standard function
2022-12-05 11:56:51 +0100 <lambdabot> 1
2022-12-05 11:57:02 +0100 <int-e> ...ah. yeah, it doesn't.
2022-12-05 11:57:08 +0100 <chymera> ok, thanks for all your help, I can finally get to the attributes now :3
2022-12-05 11:57:10 +0100 <levinlevinlevin> That's cool
2022-12-05 11:57:14 +0100 <mauke> > last [0 ..]
2022-12-05 11:57:20 +0100 <lambdabot> mueval-core: Time limit exceeded
2022-12-05 11:57:27 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-12-05 11:57:47 +0100 <int-e> Though I think the definitions of the standard Prelude functions are from the Haskell report at least? Well, some older version, probably -98.
2022-12-05 11:58:39 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 11:58:57 +0100 <mauke> @quote
2022-12-05 11:58:57 +0100 <lambdabot> skew says: feels slightly silly using crazy GADTs to build a mostly-statically correct type checker for a partially dynamic type system
2022-12-05 11:59:39 +0100 <int-e> @src unsafePerformIO
2022-12-05 11:59:39 +0100 <lambdabot> Source not found. Sorry.
2022-12-05 11:59:57 +0100 <int-e> Phew. (I should do that in private chat.)
2022-12-05 12:00:44 +0100 <mauke> @quote mauke
2022-12-05 12:00:44 +0100 <lambdabot> mauke says: the first and foremost task of a haskell compiler is to break haskell programs
2022-12-05 12:01:31 +0100 <mauke> I don't remember saying it, but it's good wisdom :-)
2022-12-05 12:01:31 +0100wqpc3(~wqpc3@213.206.188.232)
2022-12-05 12:02:08 +0100 <merijn> Man...today's AoC input is a PITA to parse
2022-12-05 12:02:33 +0100maukelaughs in unpack '(@1a@4)*'
2022-12-05 12:02:57 +0100 <chymera> hm, ok no, actually not. So the filtering works fine on its own, but when I put the solution back together with the other stuff I was trying to figure out (argument parsing, which works on its onw), I now get a new error. It's not a namespace collision I think, I only use code in that one place ...https://bpa.st/VNIA
2022-12-05 12:03:04 +0100 <merijn> mauke: Sure, doing it ghetto is fairly easy
2022-12-05 12:03:08 +0100 <chymera> why is `code` a function now? or was it always a function?
2022-12-05 12:03:14 +0100 <merijn> mauke: Trying to write a "proper" one is not
2022-12-05 12:03:23 +0100 <chymera> sry
2022-12-05 12:03:25 +0100 <chymera> wrong code
2022-12-05 12:03:32 +0100 <mauke> chymera: record accessors are (mostly) functions
2022-12-05 12:03:48 +0100 <chymera> there we go https://bpa.st/NQCA
2022-12-05 12:04:29 +0100 <mauke> merijn: https://paste.tomsmeding.com/PyuxFW1C does that count?
2022-12-05 12:04:41 +0100 <dminuoso> Is there a deepseq TH helper package?
2022-12-05 12:05:16 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-12-05 12:05:16 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-12-05 12:05:16 +0100califax(~califax@user/califx) (Write error: Connection reset by peer)
2022-12-05 12:05:43 +0100 <chymera> ah
2022-12-05 12:05:46 +0100 <chymera> I think I have it
2022-12-05 12:05:52 +0100 <chymera> it's in the function parameters
2022-12-05 12:06:06 +0100 <chymera> yep
2022-12-05 12:06:08 +0100 <chymera> that was it
2022-12-05 12:06:10 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 12:06:27 +0100 <chymera> wow, I can find simple errors on my own now. This is cool :D
2022-12-05 12:06:41 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex)
2022-12-05 12:06:55 +0100 <mauke> heh
2022-12-05 12:07:00 +0100califax(~califax@user/califx)
2022-12-05 12:07:27 +0100wqpc3(~wqpc3@213.206.188.232) (Quit: leaving)
2022-12-05 12:09:07 +0100wqpc3(~wqpc3@213.206.188.232)
2022-12-05 12:09:14 +0100levinlevinlevin(~levin@213.206.188.232) ()
2022-12-05 12:09:37 +0100 <chymera> what's the difference between print and PutStrLn?
2022-12-05 12:10:03 +0100 <chymera> also, why does haskell sometimes use camelcase and sometimes normalcase? do these things mean different things?
2022-12-05 12:10:40 +0100 <mauke> @src print
2022-12-05 12:10:40 +0100 <lambdabot> print x = putStrLn (show x)
2022-12-05 12:10:56 +0100 <mauke> chymera: define "normal"
2022-12-05 12:10:56 +0100 <merijn> chymera: When does it use "normalcase"?
2022-12-05 12:11:09 +0100 <chymera> print says print, and not Print
2022-12-05 12:11:15 +0100 <mauke> ah
2022-12-05 12:11:25 +0100 <chymera> I think in camelcase you capitalize the first letter if it's just a word, no?
2022-12-05 12:11:26 +0100 <mauke> names that start with an uppercase letter are constants, not variables
2022-12-05 12:11:33 +0100 <wqpc3> I know my question is not haskell related but does anyone know why i can see the ip of @levinlevinlevin
2022-12-05 12:11:39 +0100 <chymera> and print is a variable? 0.o
2022-12-05 12:11:43 +0100 <mauke> for sufficiently convoluted definitions of "constants" and "variables"
2022-12-05 12:12:35 +0100 <mauke> wqpc3: no cloak (=> hostname not hidden), no reverse dns (=> can't show a name)
2022-12-05 12:13:22 +0100 <mauke> chymera: consider 'foo = 42'. here foo is a "variable" and 42 is a "constant"
2022-12-05 12:13:39 +0100 <mauke> I call it a variable because it's an arbitrary identifier bound to an expression
2022-12-05 12:14:00 +0100 <mauke> similarly, "print" is just some name bound to a function
2022-12-05 12:14:09 +0100 <mauke> and the function is the "real" constant
2022-12-05 12:14:22 +0100califax(~califax@user/califx) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-05 12:14:50 +0100 <chymera> hm, ok, I guess that can make sense.
2022-12-05 12:15:01 +0100califax(~califax@user/califx)
2022-12-05 12:15:06 +0100 <mauke> you'll have to squint a bit
2022-12-05 12:15:09 +0100maukehandwaves wildly
2022-12-05 12:15:32 +0100 <mauke> other example: data Bool = False | True
2022-12-05 12:15:57 +0100 <mauke> this definition introduces three new "constants": the type Bool, and the values False and True
2022-12-05 12:16:07 +0100 <chymera> also, if you look in the code above, apparently taking a variable, capitalizing the first letter and then prepending it with `maybe` does stuff to it? o.0 I never define `maybeAddon` but that already means something?
2022-12-05 12:16:27 +0100 <chymera> *prefixing
2022-12-05 12:16:33 +0100 <mauke> note that False is not an identifier you can rebind or anything (you can't say 'let False = ...')
2022-12-05 12:17:03 +0100 <chymera> so whenever I do let ... = whatever I name it should be all lowercase?
2022-12-05 12:17:07 +0100 <mauke> chymera: no magic here; maybeAddon is defined in line 36 of the paste
2022-12-05 12:17:08 +0100 <dminuoso> chymera: Whether or not camelcase capitalizes the first letter is not standardized.
2022-12-05 12:17:40 +0100 <mauke> chymera: it just has to start with a lowercase letter
2022-12-05 12:17:54 +0100 <mauke> > let tRUE = 42 in tRUE -- OK
2022-12-05 12:17:56 +0100 <lambdabot> 42
2022-12-05 12:18:08 +0100 <mauke> > let TRUE = 42 in TRUE -- OK
2022-12-05 12:18:10 +0100 <lambdabot> error: Not in scope: data constructor ‘TRUE’
2022-12-05 12:18:55 +0100xff0x(~xff0x@2405:6580:b080:900:3610:c321:ec1f:485b)
2022-12-05 12:19:02 +0100 <mauke> this is what defines maybeAddon: interpretArgs (MyArgs code flip maybeAddon) =
2022-12-05 12:19:13 +0100 <int-e> > let True = False in True
2022-12-05 12:19:15 +0100 <lambdabot> True
2022-12-05 12:19:26 +0100 <chymera> mauke: ah, ok
2022-12-05 12:19:34 +0100 <chymera> yeah, I can just rename it to addon
2022-12-05 12:19:39 +0100 <mauke> it's a local variable in the interpretArgs function, bound to the third value in MyArgs
2022-12-05 12:19:44 +0100 <dminuoso> chymera: At the term level the first letter carries special meaning in that it differentiates between whats called data constructors and variables. For alpha-numeric, if it starts with an alpha upper character, it is a data constructor by rules of scoping, and if it starts with a lower character it is a variable by rules of scoping.
2022-12-05 12:19:59 +0100wqpc3(~wqpc3@213.206.188.232) (Ping timeout: 256 seconds)
2022-12-05 12:20:13 +0100 <dminuoso> With operators if it starts ith a colon `:` it is a constructor, otherwise it is a variable too.
2022-12-05 12:20:52 +0100 <dminuoso> The first sentence holds true on the type level too (that is if a type starts with an upper character, it is a type constructor, otherwise it is a type variable)
2022-12-05 12:21:45 +0100 <mauke> :t filter
2022-12-05 12:21:46 +0100 <lambdabot> (a -> Bool) -> [a] -> [a]
2022-12-05 12:21:49 +0100 <mauke> ^ example of the latter
2022-12-05 12:22:01 +0100pflanze(~pflanze@159.100.249.232)
2022-12-05 12:22:12 +0100 <mauke> the list elements can be any type 'a', but the predicate has to return a concrete type (namely Bool)
2022-12-05 12:22:33 +0100 <dminuoso> The second sentence used to be true in GHC Haskell as well (with some exceptions like `[]`), nowadays if it starts with a special character in the type level, it is always a type constructor (equivalently you cant use symbols as type variables anymore)
2022-12-05 12:22:41 +0100mikoto-chan(~mikoto-ch@85-76-167-161-nat.elisa-mobile.fi)
2022-12-05 12:22:46 +0100 <dminuoso> With -XTypeOperators enabled, of cours.e
2022-12-05 12:22:54 +0100 <mauke> hmm ...
2022-12-05 12:22:58 +0100 <dminuoso> Oh and I guess -> was a special exception too.
2022-12-05 12:23:12 +0100 <mauke> :t filter :: (bool -> Bool) -> [bool] -> [bool]
2022-12-05 12:23:12 +0100 <lambdabot> (bool -> Bool) -> [bool] -> [bool]
2022-12-05 12:23:17 +0100dextaa9(~DV@user/dextaa)
2022-12-05 12:23:17 +0100 <mauke> confusing, but technically legal
2022-12-05 12:23:37 +0100 <mauke> "bool" is a type variable here (unrelated to "Bool")
2022-12-05 12:23:50 +0100 <dminuoso> deepMerge :: IsIPRange ip => [ip] -> [ip]
2022-12-05 12:23:59 +0100 <dminuoso> I sometimes like type variables with more than one character. :)
2022-12-05 12:25:05 +0100dextaa(~DV@user/dextaa) (Ping timeout: 256 seconds)
2022-12-05 12:25:05 +0100dextaa9dextaa
2022-12-05 12:25:56 +0100 <dminuoso> chymera: So convention says we always use camel case, but whether the first character is capitalized denotes whether it is data/type constructor or not.
2022-12-05 12:26:18 +0100dminuososometimes uses snake_case for internal bindings not exported in a module
2022-12-05 12:26:28 +0100 <dminuoso> Especially if they reside at the top level
2022-12-05 12:27:31 +0100 <chymera> so I should be using camelcase for my variables? :(
2022-12-05 12:27:53 +0100 <dminuoso> Up to you.
2022-12-05 12:28:36 +0100 <mauke> I've been doing the advent-of-code problems in snake_case to see how much it irritates me
2022-12-05 12:28:40 +0100 <dminuoso> If you adhere to camelcase you will have a lot more consistency if you start using pretty much anything outside your own code, be it from `base` or any other hackage library.
2022-12-05 12:28:55 +0100 <mauke> (so far: not very much, but the standard library uses camelCaseEverywhere)
2022-12-05 12:29:05 +0100 <dminuoso> But if you prefer your own style, it's up to you.
2022-12-05 12:29:18 +0100 <chymera> in any case, thanks for your help. I think I finally got this do do something and prob need a break from big brain haskell now XD If you're looking for a script which takes a string and returns a string, here you go https://github.com/TheChymera/hflagcreate
2022-12-05 12:29:42 +0100 <mauke> if you're hardcore, you can even go for names'like'this
2022-12-05 12:29:48 +0100 <mauke> (like Oleg)
2022-12-05 12:29:59 +0100 <dminuoso> chymera: I have a nice extension for you. RecordWildCards allows you to write that FromJSON instance much more safely.
2022-12-05 12:30:02 +0100 <chymera> I really like snek case. it's nice and legible
2022-12-05 12:30:33 +0100 <chymera> do you have an example?
2022-12-05 12:30:35 +0100 <mauke> sadly kebap-case is not supported
2022-12-05 12:31:14 +0100TonyStone(~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Ping timeout: 265 seconds)
2022-12-05 12:31:46 +0100 <chymera> kebab case?
2022-12-05 12:31:54 +0100 <dminuoso> chymera: https://gist.github.com/dminuoso/fa1d35ce709c98749b6bc82b75a9d05a
2022-12-05 12:31:54 +0100 <mauke> names-like-this-on-a-skewer
2022-12-05 12:32:11 +0100 <dminuoso> chymera: The advantage of using ApplicativeDo + RecordWildCards, is that it directly and visibly ties each parser to the correct field.
2022-12-05 12:32:13 +0100Heyting(~Heyting@193.198.16.217)
2022-12-05 12:32:27 +0100 <chymera> ah, never used that `-` is a character representing an operator
2022-12-05 12:32:33 +0100 <chymera> also in haskell, I hope
2022-12-05 12:32:41 +0100 <chymera> but now I am afraid XD
2022-12-05 12:32:44 +0100 <dminuoso> Otherwise if you reordered the fields in MyFlag (say name comes before code), your FromJSON instance would silently type check, do the wrong thing, and it would be very hard to spot why.
2022-12-05 12:32:46 +0100 <mauke> > a-b
2022-12-05 12:32:48 +0100 <lambdabot> a - b
2022-12-05 12:32:50 +0100 <mauke> (it's subtraction)
2022-12-05 12:32:58 +0100 <dminuoso> chymera: similarly for `sample`
2022-12-05 12:32:59 +0100 <chymera> phew, that was a close one
2022-12-05 12:33:17 +0100 <chymera> the - I mean. I'm also confused why I need ++ instead of +
2022-12-05 12:33:19 +0100 <dminuoso> And whether `-` denotes an operator is a more tricky question.
2022-12-05 12:33:21 +0100 <dminuoso> IT depends.
2022-12-05 12:33:23 +0100 <mauke> chymera: btw, isJust and fromJust are a code smell. they shouldn't be used
2022-12-05 12:33:34 +0100 <dminuoso> % a = -1
2022-12-05 12:33:34 +0100 <yahb2> <no output>
2022-12-05 12:33:43 +0100 <dminuoso> It can also be a modifier for literals.
2022-12-05 12:33:45 +0100 <chymera> a code smell?
2022-12-05 12:34:26 +0100 <mauke> in particular, 'if isJust addon then fromJust addon else "test.yml"' can be rewritten as 'case addon of Just x -> x; Nothing -> "test.yml"'
2022-12-05 12:34:45 +0100 <mauke> which is already predefined in a library: fromMaybe "test.yml" addon
2022-12-05 12:35:19 +0100 <mauke> https://en.wikipedia.org/wiki/Code_smell
2022-12-05 12:36:11 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
2022-12-05 12:36:46 +0100 <chymera> yeah, that thing actually broke my brain a bit, because I looked up “how to condidionally assign a variable in haskell” and I found some post telling me that I'm a pleb and conditionally assigning variables is a pleb thing to do. That was my attempt at writing something that makes sense to me and also runs :P
2022-12-05 12:36:56 +0100 <mauke> the problem is that isJust/fromJust split the time-of-check from the time-of-use
2022-12-05 12:37:28 +0100 <mauke> which doesn't introduce a race condition in this context, but it means the programmer has to manually ensure to only call fromJust on values that have been verified by isJust before
2022-12-05 12:37:50 +0100 <mauke> which is a bit fragile (especially since fromJust just crashes the program if you do it wrong)
2022-12-05 12:38:11 +0100 <mauke> pattern matching (in the form of case/of) makes sure you handle all the cases
2022-12-05 12:38:22 +0100 <mauke> well, assuming you enable compiler warnings with ghc -Wall or similar
2022-12-05 12:39:26 +0100 <chymera> where od I import frommaybe from?
2022-12-05 12:39:33 +0100Barfolomew(~Barfolome@2a0a-a546-54f2-1-2967-2ba9-e385-b22f.ipv6dyn.netcologne.de)
2022-12-05 12:39:53 +0100 <chymera> *fromMaybe?
2022-12-05 12:40:53 +0100 <chymera> ah
2022-12-05 12:40:55 +0100 <chymera> from data.maybe
2022-12-05 12:40:57 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-12-05 12:43:17 +0100TonyStone(~TonyStone@cpe-74-76-57-186.nycap.res.rr.com)
2022-12-05 12:44:20 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2022-12-05 12:48:04 +0100 <Barfolomew> Hi. Is there a official / semi-official way to set up building for Android (anything that gets me a SDL2 renderer and some touch input) with just cabal, without a huge hassle or using some containerized thing?
2022-12-05 12:48:04 +0100akegalj(~akegalj@93-137-174-226.adsl.net.t-com.hr)
2022-12-05 12:50:20 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-12-05 12:50:27 +0100razetime(~quassel@49.207.211.219) (Ping timeout: 268 seconds)
2022-12-05 12:51:43 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307)
2022-12-05 12:51:44 +0100 <Barfolomew> Hello, … I’m stuck… while building sdl2 with cabal, I get » cannot locate symbol "stg_ap_pp_info" referenced by "…/.cabal/…/base-orphans-0.8.7-…/libHSbase-orphans-0.8.7-…-ghc8.10.7.so «, even though cabal just successfully compiled base-orphans. I don’t even know how that’s possible… How do I proceed?
2022-12-05 12:52:02 +0100 <Barfolomew> (This was in a Termux enviornment running on Android btw. It compiled about two dozen other packages just fine right before that, so the build chain looks fine.)
2022-12-05 12:56:26 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 256 seconds)
2022-12-05 13:01:19 +0100 <dminuoso> Barfolomew: So Im just guessing that compiling the individual packages works, but linking them together does not.
2022-12-05 13:01:32 +0100 <dminuoso> So perhaps you shouldnt infer too much from "base-orphan compiling successfully"
2022-12-05 13:01:32 +0100califax(~califax@user/califx) (Remote host closed the connection)
2022-12-05 13:02:36 +0100 <ncf> [advent of code spoilers] can anyone think of a more lensy way to write this function? https://github.com/ncfavier/aoc/blob/7df7012/src/2022/Day05.hs#L34-L36
2022-12-05 13:03:11 +0100 <ncf> basically i have a vector of lists and i want to uncons n elements from the list at index i
2022-12-05 13:03:12 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-05 13:03:30 +0100 <int-e> stg_ap_pp_info comes from the RTS... which shouldn't be linked until you actually build an executable?
2022-12-05 13:04:29 +0100califax(~califax@user/califx)
2022-12-05 13:04:44 +0100 <int-e> Barfolomew: Can that ghc build executables?
2022-12-05 13:07:18 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-05 13:07:34 +0100 <Barfolomew> int-e: I’ll try, hold on.
2022-12-05 13:08:30 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de) (Quit: Leaving.)
2022-12-05 13:12:00 +0100 <Barfolomew> int-e: Yes, it can.
2022-12-05 13:14:48 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-05 13:15:33 +0100coot(~coot@213.134.171.3)
2022-12-05 13:17:54 +0100 <Barfolomew> int-e: Hello World builds and runs fine.
2022-12-05 13:18:26 +0100 <akegalj> yesterday friend and I tried to ask chatgpt to review and give comments about some solutions we got from assignments we gave to the students (we are teaching haskell introduction course in local university). It gave interesting interpretations and it was fun to interact with it. So I wonder if adding such bot to this irc channel could be usefull or interesting/fun
2022-12-05 13:18:37 +0100 <Barfolomew> int-e: A simple Cabal project, importing Data.Orphans and using one of its functions, builds and runs fine too… Weird…
2022-12-05 13:18:44 +0100 <int-e> Hmm. Maybe there's hope then.
2022-12-05 13:19:45 +0100 <int-e> Barfolomew: But yeah, also weird. I guess I'd identify the offending package, unpack it (so it can be built in place with `cabal build`) and try to get to the actual failing command (`cabal build` has a verbosity option; I forgot whether you need -v2 or whether plain -v is enough)
2022-12-05 13:20:32 +0100 <int-e> That is, if I felt like digging in an attempt to figure out why this fails. Which doesn't guarantee a solution.
2022-12-05 13:21:16 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2022-12-05 13:21:42 +0100 <int-e> (Also, I've never used ghc on anything but Linux on x86 and x86_64, so I'm hopeless for actual platform-specific ideas.)
2022-12-05 13:21:43 +0100 <Barfolomew> int-e: The thing with that sdl2 is, that it’s pulled in as a sub-project via “packages:\n*\naltered/sdl2-2.5.4.1", because I had to patch it to add texture scaling mode support, and I didn’t know a better way to do it. So I’ll see if regular sdl2 builds and try to go from there?
2022-12-05 13:22:41 +0100 <Barfolomew> int-e: And there’s a little shim in LLVM’s `opt`, to make it work with the cabal I have available in Termux.
2022-12-05 13:22:43 +0100Guest94(~Guest94@4.red-83-36-45.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2022-12-05 13:22:47 +0100 <int-e> Barfolomew: I suppose you could try building the altered version in place, too; it's already there, no need to unpack it
2022-12-05 13:23:26 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-05 13:25:06 +0100 <int-e> Barfolomew: the thing to look for is linking (or lack thereof) with libHSrts[_thr|possibly some other suffix depending on flags].a ...that's where stg_ap_pp_info should come from
2022-12-05 13:25:34 +0100 <Barfolomew> int-e: I just remembered that building sdl2 took literally over four hours on that phone, simply because for every line in two large .hsc files, it generated a C file, built it with LLVM and then used that. With 2% CPU load. There were over 16000 of those. I want to avoid building it on a whim unless I can make that go quicker. ;)
2022-12-05 13:26:40 +0100 <int-e> Barfolomew: If you build it in place, it *should* keep the build artifacts, I believe.
2022-12-05 13:27:01 +0100 <Barfolomew> int-e: Yes, I wish I could just step through the cabal build process, run the commands manually, and alter their parameters to see what’s going on.
2022-12-05 13:27:29 +0100califax(~califax@user/califx)
2022-12-05 13:28:26 +0100 <Barfolomew> int-e: My main project contains a dist-newstyle/ and the altered/sdl2… which also has its own dist-newstyle/, and apparently, when I build the main project, it puts the stuff of sdl2 in the main project’s dist-newstyle/ too. But I probably could copy it over, yeah.
2022-12-05 13:28:53 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-05 13:31:07 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-05 13:35:35 +0100jargon_(~jargon@174-22-207-8.phnx.qwest.net) (Read error: Connection reset by peer)
2022-12-05 13:38:11 +0100jargon(~jargon@184.101.177.18)
2022-12-05 13:40:20 +0100mikoto-chan(~mikoto-ch@85-76-167-161-nat.elisa-mobile.fi) (Ping timeout: 248 seconds)
2022-12-05 13:42:17 +0100mikoto-chan(~mikoto-ch@2001:999:680:9f4:6a82:d55c:feff:5f4)
2022-12-05 13:43:49 +0100mmhat(~mmh@p200300f1c73b5145ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1)
2022-12-05 13:47:18 +0100akegalj(~akegalj@93-137-174-226.adsl.net.t-com.hr) (Quit: leaving)
2022-12-05 13:51:57 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-12-05 13:55:22 +0100son0p(~ff@2604:3d08:5b7f:5540::37af)
2022-12-05 14:00:01 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-05 14:00:22 +0100fizbin(~fizbin@user/fizbin)
2022-12-05 14:04:23 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-05 14:05:41 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 268 seconds)
2022-12-05 14:06:19 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-05 14:07:42 +0100razetime(~quassel@49.207.203.213)
2022-12-05 14:08:03 +0100 <Barfolomew> OK, inside `cd altered/sdl2-*; cabal exec bash` I can’t get it to build unless I use the exact ghc command that cabal uses too, and then it gets me the exact same error. I’ve given up. … Maybe another day…
2022-12-05 14:09:47 +0100zant(~zant@62.214.20.26) (Ping timeout: 264 seconds)
2022-12-05 14:14:50 +0100 <int-e> Barfolomew: ghc has a -v flag too so you can see the linker command. But as said, even if that explains what goes wrong somehow, it'll probably not indicate an immediate solution.
2022-12-05 14:15:54 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-12-05 14:18:01 +0100acidjnk(~acidjnk@p200300d6e7137a4179c4b3a1e8b4bdac.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-12-05 14:18:10 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-05 14:23:52 +0100acidjnk(~acidjnk@p200300d6e7137a1979c4b3a1e8b4bdac.dip0.t-ipconnect.de)
2022-12-05 14:24:40 +0100mikoto-chan(~mikoto-ch@2001:999:680:9f4:6a82:d55c:feff:5f4) (Ping timeout: 260 seconds)
2022-12-05 14:25:42 +0100 <Barfolomew> int-e: Too late now. I deleted everything on the phone, including that 4h+-build stuff. To make sure I would not lose another day on nothing but that. ;)
2022-12-05 14:29:54 +0100mtmm(~mtmm@89-166-7-216.bb.dnainternet.fi)
2022-12-05 14:33:24 +0100heinz9(~trace@user/trace)
2022-12-05 14:33:26 +0100 <heinz9> what does a network consists of else than graph things, as states and connections, and the option that data can be transfered throug the connections, changing the states, and maybe protocols who manage all this
2022-12-05 14:34:26 +0100 <mauke> a fire that destroys part of your nodes halfway through
2022-12-05 14:35:47 +0100 <heinz9> ^^
2022-12-05 14:36:10 +0100 <heinz9> maybe the states can be container datastructures or any else math object idk
2022-12-05 14:36:24 +0100 <heinz9> and the connections could be streams
2022-12-05 14:37:10 +0100 <mauke> oh, also (temporary) network partitions where half of your nodes suddenly can't talk to the other half
2022-12-05 14:37:43 +0100 <heinz9> having partitions of parts of the network is an interesting point
2022-12-05 14:38:33 +0100 <Barfolomew> heinz9: Literally everything can be represented as a graph. At least if you allow fuzzy edge weights. At least everything that we humans are able to think. :)
2022-12-05 14:39:12 +0100 <Barfolomew> heinz9: Aka IRC netsplit.
2022-12-05 14:40:24 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2022-12-05 14:40:45 +0100 <int-e> Barfolomew: a sane choice
2022-12-05 14:40:50 +0100 <heinz9> Barfolomew, is there a theory behind, that everything can represented by that
2022-12-05 14:41:02 +0100 <heinz9> because I cannot imagine
2022-12-05 14:41:19 +0100 <heinz9> maybe there is a general approach, that I am not aware of, how to do so
2022-12-05 14:42:29 +0100 <Barfolomew> I always supported that instead of banning users, they could simply be separated to a different instance. And others could then opt which instance they want to be in. That way there could be no abuse of power, because the one banning somebody could just end up being left alone (just like open source projects that fork sometimes end up like that.),
2022-12-05 14:42:29 +0100 <Barfolomew> *and* nobody would be able to disrupt communities. The only problem is that it would lead to more filter bubbles / medevial small towns. ;)
2022-12-05 14:42:40 +0100 <Barfolomew> heinz9: Probably category theory? ;)
2022-12-05 14:43:34 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 260 seconds)
2022-12-05 14:43:56 +0100 <Barfolomew> heinz9: Probably one of my all-time favorite bits of education on the net: Category theory by Bartosz Milewski: https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_
2022-12-05 14:44:16 +0100 <Barfolomew> He gets quite philosophical in the first two videos, which is fun.
2022-12-05 14:44:47 +0100 <darkling> RDF gives you quite a lot of modelling power in a labelled-graph structure.
2022-12-05 14:44:57 +0100 <Barfolomew> heinz9: I am quite experienced in turning things into graphs. Maybe you give me examples, and I will tell you how that would look as a graph.
2022-12-05 14:45:01 +0100 <darkling> Doesn't give you an easy way to do weights on the edges, though.
2022-12-05 14:45:13 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-05 14:45:27 +0100 <Barfolomew> darkling: Yes, but I know too little about category theory yet. (No time.)
2022-12-05 14:45:45 +0100 <Barfolomew> darkling: if you have something countable, you can do weights though.
2022-12-05 14:46:39 +0100 <heinz9> Barfolomew, from where have you gotten those information, that everything can be represented as a network
2022-12-05 14:46:47 +0100 <heinz9> this is really important for me to know
2022-12-05 14:46:56 +0100 <Barfolomew> darkling: E.g. you could present the edge between two nodes as *itself* being a node. Then that node can have edges to *itself*, and the number of edges to itself is the weight.
2022-12-05 14:46:59 +0100 <darkling> You either have an explosion of predicates, or you increase the complexity by using some form of reification. Might be a bit easier with RDF*, but I haven't looked into that too much yet.
2022-12-05 14:47:12 +0100 <darkling> Exactly. :)
2022-12-05 14:47:17 +0100coot(~coot@213.134.171.3) (Quit: coot)
2022-12-05 14:47:22 +0100 <Barfolomew> darkling: Or course behind the scenes of an implementation, that would be optimized to a simple number.
2022-12-05 14:47:31 +0100 <int-e> heinz9: from the internet? (a network; scnr)
2022-12-05 14:47:32 +0100 <darkling> I've been doing RDF for about 20 years now... it's part of $day_job :)
2022-12-05 14:48:33 +0100 <heinz9> int-e, certainly this answer is not gonna help me
2022-12-05 14:49:32 +0100 <int-e> heinz9: It's all about making connections. I'll show myself out.
2022-12-05 14:49:53 +0100 <heinz9> certainly the abstraction syntax tree of any source code is a tree, and so a graph and so a network
2022-12-05 14:50:20 +0100 <heinz9> and you could connect things, so it becomes also a graph or network, but without beeing a tree, if someone wants so
2022-12-05 14:50:23 +0100 <Barfolomew> darkling: Resource Description Framework? Or Real Degree of Fermentation (for alcoholic beverages). Maybe Reichsbund Deutsche Familie (a organization of the nono-Germans ;).
2022-12-05 14:51:08 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 246 seconds)
2022-12-05 14:51:27 +0100 <Lycurgus> RDF is anti AI in the sense in which the latter is currently defined/hyped
2022-12-05 14:51:42 +0100 <Lycurgus> e.g. GPTwhosists
2022-12-05 14:52:02 +0100 <darkling> Barfolomew: The first of those.
2022-12-05 14:52:52 +0100 <Lycurgus> some ol thing musk et al aren't interested in
2022-12-05 14:53:09 +0100 <darkling> Lycurgus: Yes, it's an odd mash-up. You get the neats: mathematicians interested in logic and proofs and consistency; and the scruffies: web people who know how horrible the world out there is for accurate, consistent, structured data.
2022-12-05 14:53:13 +0100 <Lycurgus> or am I wrong?
2022-12-05 14:53:50 +0100 <Lycurgus> neats and scruffies is also outside the OpenAIs of the world
2022-12-05 14:53:54 +0100 <darkling> You're not wrong. There's definitely a strong thread of logic, proof & repeatability running through it.
2022-12-05 14:54:18 +0100 <Lycurgus> collides with hardcore
2022-12-05 14:54:27 +0100 <Lycurgus> hardcore for a boss that is
2022-12-05 14:55:07 +0100 <darkling> That said, there's also a lot of very precise fuzziness and carefully-controlled handwaving involved. :)
2022-12-05 14:55:14 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-05 14:55:15 +0100 <Lycurgus> the AI of today is a prime example of sartrean anti-labour
2022-12-05 14:56:00 +0100jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
2022-12-05 14:58:01 +0100 <Barfolomew> heinz9: A list is just a tree with no children. A table/matrix/tensor is just a list of lists (…). A map is just a table. A tree is just a graph with no circular paths. … A string/stream is just a list. A value is just a list of ()… A tuple is just a list with additional rules in the rules/schema/type. … XML and directories are just trees.
2022-12-05 14:58:02 +0100 <Barfolomew> databases are just lists of tables. … Basically, it’s just graphs with certain rules to limit them, presumably so they become useful for real-world things.: )) … Where it gets complicated is of course functions and the like (e.g. monads). But you can also just represent them as maps, even if inefficient. Ideally, you would compile the
2022-12-05 14:58:02 +0100 <Barfolomew> function's code itself into a graph. Aka a parse tree. That becomes serializable again.
2022-12-05 15:01:05 +0100 <Barfolomew> Lycurgus: I’m anti-“AI” too. … Actually, neural networks are fine, but “AI” nowadays just means “I was too lazy/stupid to actually put into words what precisely I want, and just threw a bunch of examples at an universal function based on tensor multiplication that has as much to do with a real neural net as a perfectly spherical *cow*
2022-12-05 15:01:05 +0100 <Barfolomew> on a sinusoidal trajectory has with a horse race” 😆
2022-12-05 15:01:06 +0100 <Barfolomew> So RDF is more on the “I actually know what I want” side. Its problem to me is that it’s too cumbersome.
2022-12-05 15:01:37 +0100zant(~zant@62.96.232.178)
2022-12-05 15:01:52 +0100 <Lycurgus> somehow i'd forgotten what rdf* was, troubling
2022-12-05 15:02:41 +0100 <Barfolomew> Lycurgus: Think basically (from,via,to) maps between things. where via can be seen as a property or type or whatever, I guess.
2022-12-05 15:02:50 +0100 <Lycurgus> no i remembered
2022-12-05 15:02:53 +0100 <Barfolomew> ok
2022-12-05 15:03:46 +0100 <Lycurgus> i purposely didn follow up on a occluding redirect of GOFAI at enwiki
2022-12-05 15:04:34 +0100razetime(~quassel@49.207.203.213) (Ping timeout: 260 seconds)
2022-12-05 15:04:39 +0100 <Lycurgus> it's amazing how stuff gets distorted after the fact when you have forced attrition, the perpetual juvenalization of the workforce
2022-12-05 15:05:00 +0100dsrt^(~dsrt@76.145.185.103) (Remote host closed the connection)
2022-12-05 15:05:23 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-12-05 15:05:45 +0100 <Lycurgus> the other day I as trying to remember a big db package of the 80s which was involved in the same work experience where I first used smalltalk
2022-12-05 15:05:51 +0100 <Lycurgus> FOCUS
2022-12-05 15:06:14 +0100mmhat(~mmh@p200300f1c73b5145ee086bfffe095315.dip0.t-ipconnect.de)
2022-12-05 15:06:17 +0100 <Barfolomew> Is anyone here currently generally in the loop about current software development business practices? Since I’m out I seem to have seen everybody move to containers and “cloud”s and putting literally all the things on top of HTTP and into browsers, and I don’t see why. It looks just like a severe case of the inner-platform effect. Case in
2022-12-05 15:06:18 +0100 <Barfolomew> point: Text editors that run inside a separate Chromium instance, take >1GB of RAM, and still aren’t as much of an OS as Emacs. ;)
2022-12-05 15:06:22 +0100 <Lycurgus> not only couldn't I find it by search, i did find a really distorted historical view of databases
2022-12-05 15:06:31 +0100 <heinz9> what are the advantages of having a graph, when you store in its states and connections: classes, objects and functions?
2022-12-05 15:06:36 +0100 <Lycurgus> as if dbase and the like were the origins
2022-12-05 15:06:47 +0100 <heinz9> one certain advantage would be, having all of it in a better order
2022-12-05 15:07:52 +0100 <heinz9> another is to see all the states better
2022-12-05 15:08:16 +0100 <heinz9> and a third would be to can evaluate the whole thing better
2022-12-05 15:08:28 +0100 <Barfolomew> Lycurgus: You can say that again. It’s cargo culting all the way. I figure in 20 years, kids will run things inside of containers inside VMs inside  wasmLinux, and think we’re weird and low-level for building our own web pages.
2022-12-05 15:08:34 +0100lbseale(~quassel@user/ep1ctetus) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-12-05 15:09:34 +0100 <Lycurgus> Barfolomew, kids, lawns, oh my!
2022-12-05 15:09:36 +0100 <mauke> networking is IP which is TCP/UDP which is HTTP
2022-12-05 15:09:41 +0100lbseale(~quassel@user/ep1ctetus)
2022-12-05 15:10:46 +0100 <heinz9> mauke, haha
2022-12-05 15:11:02 +0100lbseale(~quassel@user/ep1ctetus) (Client Quit)
2022-12-05 15:11:03 +0100 <mauke> if you're not that, you're an exotic edge case and might not even be supported by some devices
2022-12-05 15:11:08 +0100 <mauke> and so the stack fossilizes
2022-12-05 15:11:50 +0100 <Barfolomew> heinz9: I guess the advantage is that you have one universal interface, and don’t have to re-learn everything anew for each new thing. E.g. everything supports reflection by default. Everything supports serialization and parsing. All software can use all file formats and all protocols, and only needs simple mappings to support working with
2022-12-05 15:11:50 +0100 <Barfolomew> different interfaces that are structurally the same thing. (E.g. a file manager could be used to edit an XML file or a SQLite table)
2022-12-05 15:12:08 +0100lbseale(~quassel@user/ep1ctetus)
2022-12-05 15:12:43 +0100 <Barfolomew> mauke: lol, you forgot “… which is webSockets, which is webIP, which is webTCP, which in webHTTP, which is webwebSockets” XD
2022-12-05 15:13:25 +0100 <mauke> isn't HTTP/3 something like IP on top of UDP?
2022-12-05 15:14:21 +0100 <heinz9> Barfolomew, why does such a network based programming approach imply all those programs you named, file manager, and so on?
2022-12-05 15:15:06 +0100 <heinz9> and why is this a universal interface storing your program source in a network sourcecode structure
2022-12-05 15:15:09 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
2022-12-05 15:15:19 +0100trev(~trev@user/trev)
2022-12-05 15:15:34 +0100fockerize(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-05 15:16:16 +0100 <Barfolomew> mauke: I watched a video by a Google engineer, explaining it, recently. it used to be a special HTTP on top of UDP on top of IP. But now they merged HTTP and UDP into one, on top of IP, because it brings them an optimization. And the call it QUIC. Apparently they throw everything under the bus to get a stateful connection with even fewer back and
2022-12-05 15:16:17 +0100 <Barfolomew> forths of packets.
2022-12-05 15:17:14 +0100 <Barfolomew> mauke: HTTP/3 is, if I remember correctly, hence a very light layer on top of that, if anything at all. (I forgot.)
2022-12-05 15:18:59 +0100 <Barfolomew> heinz9: I don’t know what you refer to by “network-based programming” Maybe I missed the start of the discussion, but I never heard of that, nor think of graphs as that. … And hence I don’t know what you mean by “storing” here. …
2022-12-05 15:19:33 +0100 <merijn> If I want to update the value at a key in a map and return info of that modification I gotta use alterF, no?
2022-12-05 15:24:40 +0100fizbin(~fizbin@user/fizbin)
2022-12-05 15:27:59 +0100 <heinz9> Barfolomew, you invented it, by what you was saying
2022-12-05 15:28:46 +0100mastarija(~mastarija@2a05:4f46:e03:6000:2a89:666a:1e9:351e)
2022-12-05 15:34:03 +0100elevenkb(~elevenkb@105.184.125.168)
2022-12-05 15:34:36 +0100Sgeo(~Sgeo@user/sgeo)
2022-12-05 15:35:26 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-12-05 15:35:33 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 15:36:21 +0100slntsa(~slntsa@2001:999:488:5cc:3116:f149:10de:6194)
2022-12-05 15:39:06 +0100 <slntsa> Is there any style guide on when to use String over [Char] in type declarations?
2022-12-05 15:39:27 +0100king_gs(~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13)
2022-12-05 15:40:05 +0100 <merijn> Not really
2022-12-05 15:40:18 +0100 <merijn> Mostly "do you plan to use this as a list?"
2022-12-05 15:43:32 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 248 seconds)
2022-12-05 15:43:39 +0100Erutuon(~Erutuon@user/erutuon)
2022-12-05 15:50:45 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-12-05 15:54:36 +0100 <kuribas> Barfolomew: it's because JSON in REST is the lowest common denominator. It is also compatible with the object model for most dynamic languages (javascript, python, clojure, etc...)
2022-12-05 15:55:38 +0100 <kuribas> Barfolomew: the cloud is just jumping on the bandwagon, it's great if you have the need for instant scalability, most software projects don't have it.
2022-12-05 15:57:55 +0100 <kuribas> same with docker, it's great if you need to deploy projects with different dependencies quickly, but if you don't, it's just added complexity.
2022-12-05 15:58:04 +0100 <kuribas> You could just upload a jar file.
2022-12-05 15:58:16 +0100 <kuribas> or in haskell a static compiled binary.
2022-12-05 16:00:10 +0100wonko(~wjc@user/wonko)
2022-12-05 16:02:06 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-05 16:02:07 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-05 16:02:07 +0100wroathe(~wroathe@user/wroathe)
2022-12-05 16:05:29 +0100 <Barfolomew> kuribas: Hey, thanks for the reply! I actually did not know that. Nor would I ever have come up with the idea of calling JSON/REST anything with the word “low (level)” in in. ;)   … I would just have used binary markup to implement RPC interfaces over any socket (Unix or TCP/IP or whatever).
2022-12-05 16:07:13 +0100 <Barfolomew> kuribas: The cloud pricing models scare me though. They seem to be per CPU usage and bandwith. Meaning if your service suddenly becomes popular and you’re not making as much money off of it, it’s an insta-debt trap from hell.
2022-12-05 16:08:55 +0100 <merijn> Barfolomew: Correct
2022-12-05 16:09:06 +0100 <merijn> Even more fun, most of them don't let you hard limit spending :p
2022-12-05 16:09:07 +0100 <Barfolomew> kuribas: Yeah, I never thought about that: Why use shared libraries if you’re just putting them in a container anyway? … Btw,now I’m interested in putting other resources (like text, translations, pictures) into the static binary aswell… I wonder if GHC supports linking in blob sections in the binary. :D
2022-12-05 16:09:30 +0100 <merijn> Barfolomew: I think there was recent work to make linking blobs easier
2022-12-05 16:09:54 +0100 <merijn> Barfolomew: Although you could just manually create a blob object file using ld and ask GHC to link that object file
2022-12-05 16:10:12 +0100 <merijn> Barfolomew: As far as GHC's linker stage are concerned "symbols are symbols"
2022-12-05 16:10:57 +0100 <Barfolomew> merijn: Also, in the EU, there’s always the GDPR problem. Just putting stuff on an Amazon cloud might end one up in legal trouble. (E.g. my gf recently wanted a new web site for her job, where she has patients that are mostly children, and there are extremely private medical pictures that have to be shared.)
2022-12-05 16:11:52 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-05 16:12:28 +0100slntsa(~slntsa@2001:999:488:5cc:3116:f149:10de:6194) (Ping timeout: 260 seconds)
2022-12-05 16:13:03 +0100merijnupdates the "It has been X days since I had to run 'filter even [1..5]' to remember which way filter works"-sign back to 0 days
2022-12-05 16:13:06 +0100 <Barfolomew> merijn: So they would be symbols that you could use right away? Not requiring one to read the file and extract the binary data?
2022-12-05 16:13:29 +0100 <merijn> Barfolomew: how comfortable are you with linking and stuff in C?
2022-12-05 16:14:28 +0100 <Barfolomew> merijn: filter in nothing compared to “Which way around do foldr/foldl work? … Yeah, right and left, but *which* way right and left? … Yeah, from the left, and from the right, but *which* way from the left and from the right? …” ;)
2022-12-05 16:14:53 +0100 <mauke> foldr (\x z -> ...
2022-12-05 16:14:56 +0100 <mauke> the rest follows :-)
2022-12-05 16:15:21 +0100 <merijn> with foldr I just gotta look at the type :p
2022-12-05 16:15:57 +0100 <mauke> I know what internal linkage is, but I don't think C does much with linkers
2022-12-05 16:16:02 +0100 <Barfolomew> merijn: I think I would be comfortable, given that I have read about ELF file structures and loaded dynamic libraries *manually* in Haskell before. (As in: Plug-ins). Also, I used to use Gentoo (Stage 1) as my main OS. But I have never actually manually used `ld`.
2022-12-05 16:16:05 +0100wonko(~wjc@user/wonko) (Read error: Connection reset by peer)
2022-12-05 16:17:10 +0100 <Barfolomew> merijn: Yeah, but that’s the thing: I always have to look at the type again, when really I want to use it as naturally as I use a for or while loop in other languages. (So I just end up using recursion almost each time. ;)
2022-12-05 16:17:22 +0100 <merijn> mauke: C the spec, no. But in the real world of "using and linking stuff with C compilers" you either are familiar with the ABI and how pieces fit together or not
2022-12-05 16:17:38 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 246 seconds)
2022-12-05 16:17:45 +0100 <mauke> oh, the real world stuff is easy, you just do gcc *.o
2022-12-05 16:18:14 +0100 <merijn> Barfolomew: ld (at least the one on linux) has a flag to just take binary files and create an object file with symbols for the location and size of that file/data
2022-12-05 16:18:37 +0100 <merijn> Barfolomew: And GHC's FFI just expects "C ABI symbols" when it comes to linking
2022-12-05 16:18:47 +0100king_gs(~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 264 seconds)
2022-12-05 16:19:15 +0100 <merijn> Barfolomew: So using ld to create an object file with arbitrary payload is fairly easy and you can trivially access that via the FFI
2022-12-05 16:19:19 +0100razetime(~quassel@49.207.203.213)
2022-12-05 16:19:42 +0100 <mauke> this would be better if gnu.org weren't down
2022-12-05 16:20:01 +0100 <merijn> It's all gonna be "Ptr Word8"/"Ptr CChar", so you need some FFI boilerplate to get the data from that blob, but it's not particularly hard
2022-12-05 16:20:44 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-05 16:20:44 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-05 16:20:55 +0100 <Barfolomew> merijn: So `ld` is basically a special kind of `tar`… :)
2022-12-05 16:21:41 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-05 16:22:01 +0100 <mauke> I'm pretty sure static libraries are literally archive files
2022-12-05 16:22:10 +0100 <Barfolomew> merijn: How do I turn a .jpg into a .o file with a symbol for the .jpg data though.
2022-12-05 16:22:47 +0100 <Barfolomew> mauke: one day, I’m gonna write elffs and objfs in FUSE. :)
2022-12-05 16:23:18 +0100 <Barfolomew> mauke: With auto-mount, so I can `cd libsomething.so/` :D
2022-12-05 16:23:28 +0100 <merijn> Barfolomew: I don't remember of the top of my head, but I recall there was a ld flag/config to do that after some googling
2022-12-05 16:24:20 +0100nattiestnate(~nate@202.138.250.17)
2022-12-05 16:24:49 +0100 <geekosaur> Barfolomew, special kind of `ar` actually. which is why static archives use `ar`
2022-12-05 16:26:06 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Ping timeout: 256 seconds)
2022-12-05 16:26:14 +0100 <geekosaur> that said, back in the a.out days it was less so
2022-12-05 16:27:29 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-05 16:33:15 +0100 <Barfolomew> geekosaur: Aah, `ar`, presumably the precursor for `tar`!
2022-12-05 16:33:20 +0100 <mauke> Barfolomew: found https://csl.name/post/embedding-binary-data/
2022-12-05 16:33:34 +0100 <mauke> ar is the archiver. tar is the tape archiver (as in magnetic tapes)
2022-12-05 16:34:09 +0100 <Barfolomew> geekosaur: `ar q blah.ar wallpaper.jpg` just works. :) It is no .o though
2022-12-05 16:35:23 +0100 <Barfolomew> mauke: Nice! that worked!
2022-12-05 16:35:33 +0100 <geekosaur> true. .o got a lot more complex since the early days when we didn';t need to care about things like global constructors or shared object loading
2022-12-05 16:36:23 +0100Barfolomew(~Barfolome@2a0a-a546-54f2-1-2967-2ba9-e385-b22f.ipv6dyn.netcologne.de) (Quit: Client closed)
2022-12-05 16:37:16 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-05 16:37:21 +0100 <mauke> turns out this stuff is documented, just not very well
2022-12-05 16:37:29 +0100 <mauke> https://sourceware.org/binutils/docs-2.39/binutils/objcopy.html (scroll down to "-B")
2022-12-05 16:37:53 +0100 <mauke> (no direct link because GNU hasn't heard of embedded hyperlinks/anchors yet)
2022-12-05 16:42:20 +0100Barfolomew(~Barfolome@2a0a-a546-54f2-1-df2a-5756-e14a-c797.ipv6dyn.netcologne.de)
2022-12-05 16:42:48 +0100 <geekosaur> you just missed mauke finding how to do what you asked
2022-12-05 16:43:17 +0100 <kuribas> Barfolomew: you must make sure you charge your customer more than what they use :)
2022-12-05 16:43:28 +0100 <geekosaur> https://ircbrowse.tomsmeding.com/browse/lchaskell?id=800803#trid800803
2022-12-05 16:44:54 +0100 <Barfolomew> geekosaur: no I found it.
2022-12-05 16:44:57 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
2022-12-05 16:45:07 +0100 <Barfolomew> geekosaur: I meant: No I saw it.
2022-12-05 16:45:24 +0100fockerize(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
2022-12-05 16:46:10 +0100 <kuribas> Barfolomew: by limiting resource usage.
2022-12-05 16:46:27 +0100 <Barfolomew> Probably a sign in a battery factory: Batteries are like customers. If you charge them too much, they explode!
2022-12-05 16:47:20 +0100Barfolomew(~Barfolome@2a0a-a546-54f2-1-df2a-5756-e14a-c797.ipv6dyn.netcologne.de) (Quit: Damn, gotta gooo! Thanks everyone for the insightful chat!)
2022-12-05 16:48:54 +0100 <mastarija> Is there a way to use traceShowId in case where I have something like `Maybe n` down deep in the function hierarchy, and I don't really want to go back up multiple levels and add `Show n` contraint to all the functions that depend on one I'm interested in?
2022-12-05 16:49:24 +0100 <mastarija> Something dirty, like "yes, just try to print this somehow"
2022-12-05 16:50:46 +0100 <mauke> the problem is that the "somehow" is encoded in the Show n constraint
2022-12-05 16:51:07 +0100 <mauke> without it, the low-level code doesn't actually know what data it is dealing with
2022-12-05 16:51:52 +0100 <mauke> if you know what the actual type is, I guess you could unsafeCoerce it ...?
2022-12-05 16:52:34 +0100acidjnk(~acidjnk@p200300d6e7137a1979c4b3a1e8b4bdac.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-12-05 16:55:04 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307)
2022-12-05 16:55:17 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 16:55:23 +0100 <mastarija> mauke: hm... yes, unsafe coerce sounds good :)
2022-12-05 16:56:35 +0100 <geekosaur> there's something on hackage that can do it iirc
2022-12-05 16:58:44 +0100 <geekosaur> (uses TH I think, which means it cheats)
2022-12-05 16:59:48 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 255 seconds)
2022-12-05 17:04:17 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-05 17:04:19 +0100 <lortabac> @hackage ifcxt
2022-12-05 17:04:19 +0100 <lambdabot> https://hackage.haskell.org/package/ifcxt
2022-12-05 17:04:33 +0100 <lortabac> @hackage if-instance
2022-12-05 17:04:33 +0100 <lambdabot> https://hackage.haskell.org/package/if-instance
2022-12-05 17:04:38 +0100 <merijn> kuribas: You try and limit resource usage in AWS ;)
2022-12-05 17:04:58 +0100 <lortabac> there are other packages as well, but I don't remember their names
2022-12-05 17:06:14 +0100 <lortabac> @hackage constraints-emerge
2022-12-05 17:06:14 +0100 <lambdabot> https://hackage.haskell.org/package/constraints-emerge
2022-12-05 17:06:47 +0100 <lortabac> @hackage union-constraints
2022-12-05 17:06:47 +0100 <lambdabot> https://hackage.haskell.org/package/union-constraints
2022-12-05 17:07:28 +0100 <kuribas> merijn: you can use nginx to limit bandwith?
2022-12-05 17:07:29 +0100 <lortabac> I'm not sure I want to use this stuff for real though :D
2022-12-05 17:07:47 +0100freeside_(~mengwong@103.252.202.193)
2022-12-05 17:08:49 +0100fserucas(~fserucas@212.157.222.2) (Ping timeout: 260 seconds)
2022-12-05 17:13:49 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-05 17:14:16 +0100fizbin(~fizbin@user/fizbin)
2022-12-05 17:16:18 +0100elevenkb(~elevenkb@105.184.125.168) (Quit: Client closed)
2022-12-05 17:17:43 +0100elevenkb(~elevenkb@105.184.125.168)
2022-12-05 17:18:03 +0100ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-12-05 17:18:37 +0100Xeroine(~Xeroine@user/xeroine) (Read error: Connection reset by peer)
2022-12-05 17:18:47 +0100Xeroine_(~Xeroine@user/xeroine)
2022-12-05 17:18:50 +0100king_gs(~Thunderbi@187.201.204.122)
2022-12-05 17:19:01 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-05 17:19:17 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-05 17:26:08 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.7.1)
2022-12-05 17:31:46 +0100crazazy(~user@130.89.173.127)
2022-12-05 17:33:22 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5)
2022-12-05 17:38:36 +0100king_gs(~Thunderbi@187.201.204.122) (Read error: Connection reset by peer)
2022-12-05 17:38:44 +0100king_gs1(~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13)
2022-12-05 17:40:54 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2022-12-05 17:43:18 +0100king_gs1(~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 252 seconds)
2022-12-05 17:44:36 +0100nullptrexcptn(~xenon44@2a01:c22:c8e8:f400:4818:f4f9:f33e:569c)
2022-12-05 17:45:20 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-05 17:46:16 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307)
2022-12-05 17:47:32 +0100econo(uid147250@user/econo)
2022-12-05 17:49:28 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-05 17:54:42 +0100 <trev> just curious, does haskell have holes now like idris? i thought i saw something about holes in hls, but not sure what it means in this context
2022-12-05 17:54:43 +0100notzmv(~zmv@user/notzmv) (Read error: Connection reset by peer)
2022-12-05 17:55:58 +0100 <geekosaur> what do you mean by holes? I can think of a couple of candidates
2022-12-05 17:57:21 +0100 <merijn> trev: "a bit"
2022-12-05 17:57:27 +0100 <merijn> You can use _ for one
2022-12-05 17:57:46 +0100 <merijn> > map _ [True] :: [Int] -- not sure if lambdabot accepts it
2022-12-05 17:57:50 +0100 <lambdabot> error:
2022-12-05 17:57:51 +0100 <lambdabot> • Found hole: _ :: Bool -> Int
2022-12-05 17:57:51 +0100 <lambdabot> • In the first argument of ‘map’, namely ‘_’
2022-12-05 17:58:05 +0100 <trev> ah ha...thanks
2022-12-05 17:59:00 +0100 <geekosaur> there are also type level holes, where you can put _ in a type and ghc will tell you what type is required there
2022-12-05 18:00:46 +0100 <trev> yeah, i meant typed holes, i think
2022-12-05 18:01:01 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
2022-12-05 18:02:40 +0100 <trev> one more question: within the context of do notation, what is the most idiomatic way to match on an Either? i.e when i have `either <- returnsEither`
2022-12-05 18:02:45 +0100kuribas(~user@ptr-17d51en2loyitf0zupv.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1))
2022-12-05 18:05:09 +0100 <geekosaur> that sounds confused
2022-12-05 18:06:00 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-05 18:06:05 +0100 <geekosaur> if you have used `<-` with a `returnsEither` then the monad is `Either e` and either `either` is the `Right` or the monad has terminated with the `Left`
2022-12-05 18:07:26 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-05 18:10:20 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-05 18:10:29 +0100 <trev> geekosaur the monad is just `IO ()` (in main) and i want to just print Left (error) and return or get the Right result and continue
2022-12-05 18:11:05 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de)
2022-12-05 18:12:11 +0100 <geekosaur[m]> Then you can't use <-
2022-12-05 18:15:32 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-12-05 18:15:40 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
2022-12-05 18:16:00 +0100nullptrexcptn(~xenon44@2a01:c22:c8e8:f400:4818:f4f9:f33e:569c) (Quit: Leaving)
2022-12-05 18:16:17 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 18:16:36 +0100Heyting(~Heyting@193.198.16.217) (Remote host closed the connection)
2022-12-05 18:17:18 +0100elevenkb(~elevenkb@105.184.125.168) (Ping timeout: 260 seconds)
2022-12-05 18:20:30 +0100 <geekosaur> If `returnsEither` has a result type of `IO (Either …)` then you use `<-`. If it's just `Either …` then you use `let` instead of `<-`
2022-12-05 18:20:32 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-12-05 18:21:23 +0100 <geekosaur> At that point you can either use a `case` expression or the `either` function, and which depends on how complex your handling is (if it's pure and short then `either` is idiomatic, otherwise you want `case`)
2022-12-05 18:22:11 +0100mbuf(~Shakthi@49.204.138.176) (Quit: Leaving)
2022-12-05 18:23:49 +0100 <[Leary]> trev: I would write: `returnsEither >>= either print \result -> do ...`
2022-12-05 18:25:06 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-05 18:26:29 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-05 18:27:35 +0100elevenkb(~elevenkb@105.184.125.168)
2022-12-05 18:28:43 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection)
2022-12-05 18:28:59 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 264 seconds)
2022-12-05 18:29:49 +0100segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
2022-12-05 18:31:06 +0100elevenkb(~elevenkb@105.184.125.168) (Client Quit)
2022-12-05 18:31:20 +0100Inst_(~Inst@2601:6c4:4081:54f0:e862:ffc4:e60e:d92f) (Ping timeout: 256 seconds)
2022-12-05 18:31:26 +0100 <trev> geekosaur yes, found `either` on the haskell. i am trying it out now
2022-12-05 18:32:38 +0100AlexNoo_(~AlexNoo@178.34.151.8)
2022-12-05 18:33:26 +0100razetime(~quassel@49.207.203.213) (Remote host closed the connection)
2022-12-05 18:34:12 +0100Alex_test(~al_test@178.34.150.202) (Ping timeout: 248 seconds)
2022-12-05 18:34:36 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-12-05 18:34:37 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-05 18:35:10 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:f94e:37fa:6c10:51fa) (Quit: WeeChat 2.8)
2022-12-05 18:35:48 +0100AlexZenon(~alzenon@178.34.150.202) (Ping timeout: 248 seconds)
2022-12-05 18:36:06 +0100AlexNoo(~AlexNoo@178.34.150.202) (Ping timeout: 252 seconds)
2022-12-05 18:37:05 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-05 18:37:23 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-05 18:37:29 +0100nattiestnate(~nate@202.138.250.17) (Ping timeout: 260 seconds)
2022-12-05 18:37:54 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-05 18:38:05 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307)
2022-12-05 18:38:38 +0100nattiestnate(~nate@202.138.250.37)
2022-12-05 18:38:51 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 18:39:58 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 18:40:28 +0100AlexZenon(~alzenon@178.34.151.8)
2022-12-05 18:40:43 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2022-12-05 18:41:18 +0100Alex_test(~al_test@178.34.151.8)
2022-12-05 18:42:47 +0100MajorBiscuit(~MajorBisc@c-001-009-004.client.tudelft.eduvpn.nl) (Ping timeout: 264 seconds)
2022-12-05 18:45:31 +0100chele(~chele@user/chele) (Remote host closed the connection)
2022-12-05 18:45:32 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 18:48:21 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection)
2022-12-05 18:51:44 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de) (Ping timeout: 256 seconds)
2022-12-05 18:53:37 +0100causal(~user@50.35.85.7) (Quit: WeeChat 3.7.1)
2022-12-05 18:59:00 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-05 18:59:00 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-05 18:59:00 +0100wroathe(~wroathe@user/wroathe)
2022-12-05 19:02:19 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-05 19:02:32 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-05 19:04:21 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 19:04:30 +0100shailangsa(~shailangs@host217-39-45-196.range217-39.btcentralplus.com)
2022-12-05 19:05:30 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5) (Remote host closed the connection)
2022-12-05 19:05:38 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 19:06:07 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de)
2022-12-05 19:07:51 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-12-05 19:08:11 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-12-05 19:11:57 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-12-05 19:13:40 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-12-05 19:16:03 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-05 19:16:23 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds)
2022-12-05 19:23:54 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5)
2022-12-05 19:24:28 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-12-05 19:24:32 +0100pyrex(~pyrex@user/pyrex)
2022-12-05 19:28:44 +0100acidjnk(~acidjnk@p200300d6e7137a1979c4b3a1e8b4bdac.dip0.t-ipconnect.de)
2022-12-05 19:30:40 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
2022-12-05 19:35:49 +0100AlexNoo_AlexNoo
2022-12-05 19:38:31 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 19:40:47 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 19:41:47 +0100 <dsal> whatever <- either fail pure eitherStringWhatever
2022-12-05 19:48:51 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2022-12-05 19:49:04 +0100tomokojun(~tomokojun@37.19.210.31)
2022-12-05 19:51:38 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-12-05 19:52:08 +0100 <EvanR> I "hate to say it" but Data.Array cleanup up my code and make the program run super much faster
2022-12-05 19:52:19 +0100 <EvanR> without having to cabal script in vector
2022-12-05 19:52:50 +0100 <EvanR> indexes 1 to N for the win?
2022-12-05 19:53:11 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 246 seconds)
2022-12-05 19:53:19 +0100sh1n(~sh1n@186.152.126.118) (Quit: Lost terminal)
2022-12-05 19:53:56 +0100 <Rembane> Good stuff!
2022-12-05 19:53:58 +0100 <monochrom> Someone should still make a Data.Array-like interface over vector, so that you don't have to choose.
2022-12-05 19:53:59 +0100king_gs(~Thunderbi@187.201.204.122)
2022-12-05 19:54:23 +0100 <monochrom> Although, download-wise it would mean one more package to download haha
2022-12-05 19:54:51 +0100 <monochrom> or one more package to tie yourself to cabal script
2022-12-05 19:55:04 +0100 <dsal> EvanR: For all values of 1 even!
2022-12-05 19:55:11 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 19:55:23 +0100 <monochrom> But I have doubts that Data.Array is faster than vector.
2022-12-05 19:56:38 +0100ksu(~ksu@user/prtr) (End of Transmission Block)
2022-12-05 19:57:14 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 19:57:38 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-05 19:57:43 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 19:58:25 +0100king_gs(~Thunderbi@187.201.204.122) (Ping timeout: 268 seconds)
2022-12-05 19:59:20 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Ping timeout: 252 seconds)
2022-12-05 19:59:36 +0100thyriaen(~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1)
2022-12-05 19:59:44 +0100 <EvanR> if you don't want to set up a cabal project or figure out a cabal script, I'm surprised how much faster Array was... to type xD
2022-12-05 20:00:10 +0100 <EvanR> it was a performance win over list of list at least
2022-12-05 20:01:50 +0100freeside_(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-12-05 20:02:00 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
2022-12-05 20:02:21 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 20:03:05 +0100 <monochrom> OK right, you meant that.
2022-12-05 20:03:35 +0100 <monochrom> This is why sometimes I miss cabal-v1.
2022-12-05 20:03:47 +0100 <monochrom> alternatively Haskell Platform
2022-12-05 20:04:26 +0100 <monochrom> alternatively why sometimes I use "cabal install --lib" though it's getting rarer.
2022-12-05 20:05:44 +0100 <EvanR> what does --lib do
2022-12-05 20:06:37 +0100 <monochrom> So I think the reason why a lot of people do not mind the setup hassle of "everything is a project" is that they have an IDE that automates the setup hassle so they don't even know. Whereas those of us who're still with basic editors and direct contact with the file system are painfully aware.
2022-12-05 20:07:06 +0100zant(~zant@62.96.232.178) (Ping timeout: 260 seconds)
2022-12-05 20:07:06 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
2022-12-05 20:07:13 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 20:07:20 +0100 <dsal> I don't mind adding a line to package.yaml
2022-12-05 20:07:29 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 20:07:49 +0100 <monochrom> It registers packages in $HOME/.ghc/<something>/environment , and GHC honours it be default.
2022-12-05 20:07:53 +0100aeroplane(~user@user/aeroplane) (Ping timeout: 255 seconds)
2022-12-05 20:08:12 +0100 <EvanR> package.yaml?
2022-12-05 20:08:13 +0100 <monochrom> So it gives back something close to cabal-v1
2022-12-05 20:08:37 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-12-05 20:08:46 +0100 <monochrom> Well, sometimes I mind creating foo.cabal or package.yaml at all.
2022-12-05 20:09:05 +0100 <EvanR> is package.yaml a stack thing
2022-12-05 20:09:10 +0100 <monochrom> Yes.
2022-12-05 20:09:27 +0100 <dsal> package.yaml is hpack thing. We don't use stack at work, but we use package.yaml
2022-12-05 20:09:43 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-12-05 20:09:56 +0100 <dsal> It saves me from ever having to write a .cabal file.
2022-12-05 20:10:29 +0100 <EvanR> how does hpack enter into the workflow, is there a command
2022-12-05 20:10:34 +0100zant(~zant@62.96.232.178)
2022-12-05 20:10:36 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-05 20:10:45 +0100 <monochrom> hpack is a program. The command is "hpack" :)
2022-12-05 20:10:57 +0100 <EvanR> hpack run MyScript.hs? xD
2022-12-05 20:11:03 +0100 <monochrom> It converts package.yaml to foo.cabal. Then you can use cabal.
2022-12-05 20:11:09 +0100 <EvanR> is this a third contender for build system
2022-12-05 20:11:30 +0100 <EvanR> oh that's not bad
2022-12-05 20:11:32 +0100 <monochrom> The point being package.yaml is usually fewer things to write than foo.cabal
2022-12-05 20:11:43 +0100freeside_(~mengwong@103.252.202.193)
2022-12-05 20:12:01 +0100 <monochrom> Although, not very good at adding version bounds.
2022-12-05 20:12:22 +0100 <monochrom> Although, that doesn't matter much until you publish your stuff.
2022-12-05 20:12:25 +0100 <dsal> You can still do stuff like `- base >= 4.7 && < 5`
2022-12-05 20:13:03 +0100 <monochrom> OK that's good to know.
2022-12-05 20:13:39 +0100 <EvanR> that's a flag to the hpack command?
2022-12-05 20:13:44 +0100 <dsal> What I type: https://github.com/dustin/gopro-plus/blob/master/package.yaml -- what cabal sees: https://github.com/dustin/gopro-plus/blob/master/gopro-plus.cabal
2022-12-05 20:13:46 +0100 <monochrom> I got biased data points from stackage lovers who never add version bounds so their hpack-generated foo.cabals lack version bounds too and then they pollute hackage.
2022-12-05 20:13:59 +0100 <geekosaur> EvanR, it's an entry in the yaml file
2022-12-05 20:14:32 +0100 <dsal> I have mixed feelings about version bounds. I like them when they help, but I don't like them when they make things worse.
2022-12-05 20:15:07 +0100zant(~zant@62.96.232.178) (Ping timeout: 260 seconds)
2022-12-05 20:15:26 +0100 <monochrom> Me too. I just write "base < 5" or even "base < 10". At least until I know of an issue. :)
2022-12-05 20:15:37 +0100monochromlearned "base < 10" from some dons packages!
2022-12-05 20:16:04 +0100freeside_(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-12-05 20:16:04 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-12-05 20:16:09 +0100 <EvanR> if you're really lazy, base < 15
2022-12-05 20:16:10 +0100 <dsal> I've got `- amazonka-lambda >= 2.0` to prevent it from accidentally trying to build on the released amazonka.
2022-12-05 20:16:22 +0100 <monochrom> --allow-newer can be a temporarily relief though.
2022-12-05 20:16:24 +0100 <darkling> I'll put a minimum version of the one that I used initially to work with, and add a maximum once I find an incompatible version. :)
2022-12-05 20:16:47 +0100 <dsal> I read that as --allow-never and now I want that flag.
2022-12-05 20:17:13 +0100zant(~zant@62.96.232.178)
2022-12-05 20:17:45 +0100 <monochrom> And I depend on the specific package too. base I'm very lax as said, somehow in practice I only use the super stable part of base anyway. But other packages, e.g., random, I add pretty narrow bounds even for toy examples.
2022-12-05 20:18:38 +0100 <monochrom> haha --allow-never would be a great flag, yes.
2022-12-05 20:18:40 +0100 <dsal> I also have stack.yaml (which I believe is stack specific). I have both `- gopro-plus-0.6.6.3` and `- iconv-0.4.1.3@sha256:4f0b2f09bb8c33199e3c3fdfcd35e576d17cbf5188b18f404ffdfa68a8ccc40e,1192`
2022-12-05 20:19:53 +0100 <EvanR> --allow-everything-ever
2022-12-05 20:20:16 +0100 <darkling> --no--just-no--srsly
2022-12-05 20:20:51 +0100 <dsal> --nomeansno
2022-12-05 20:21:10 +0100 <monochrom> You can just use --dry-run, you know. :)
2022-12-05 20:21:20 +0100 <dsal> That just negates the --meansno flag.
2022-12-05 20:21:24 +0100zant(~zant@62.96.232.178) (Ping timeout: 248 seconds)
2022-12-05 20:21:25 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-05 20:21:31 +0100bobbingbob(~dfadsva@2604:3d09:207f:f650::7b3a)
2022-12-05 20:21:36 +0100moonsheep(~user@user/moonsheep)
2022-12-05 20:22:33 +0100 <moonsheep> how do I integrate ginger with scotty?
2022-12-05 20:22:43 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-05 20:22:55 +0100 <moonsheep> according to the docs, "the resolver would typically load a file from a template directory, but other monads might have access to some sort of cache, or expose template compiled into a program"
2022-12-05 20:23:04 +0100 <dsal> They seem kind of orthogonal.
2022-12-05 20:23:06 +0100 <moonsheep> is scotty one such example?
2022-12-05 20:23:17 +0100 <moonsheep> well my question is basically how do I load files with scotty
2022-12-05 20:23:27 +0100 <moonsheep> do I just do readFile directly?
2022-12-05 20:23:58 +0100 <dsal> ScottyT might be the answer in general. You can preload the templates or you can dynamically load them from a lift.
2022-12-05 20:24:12 +0100 <dsal> Though Scotty runs over IO in general, doesn't it?
2022-12-05 20:24:28 +0100 <moonsheep> yeah
2022-12-05 20:24:33 +0100 <moonsheep> how do you mean "preload the templates"?
2022-12-05 20:24:39 +0100 <moonsheep> so I still have to do it manually?
2022-12-05 20:24:43 +0100 <dsal> Load them all up before you launch scotty.
2022-12-05 20:24:48 +0100 <moonsheep> ah right
2022-12-05 20:24:50 +0100 <dsal> I've never seen ginger before you mentioned it here.
2022-12-05 20:25:19 +0100 <dsal> I use ScottyT in a slightly complex application (does stuff like basic access to my data and providing a websocket stream of my info log)
2022-12-05 20:25:58 +0100 <moonsheep> well scotty does have `file`, but it sends the file straight to warp, I can't intercept the data
2022-12-05 20:26:11 +0100 <moonsheep> I was wondering if maybe I could use that mechanism to do the heavy lifting of caching or whatever for me
2022-12-05 20:26:40 +0100 <dsal> Yeah, file is just file serving.
2022-12-05 20:26:52 +0100 <moonsheep> right, so I can't pass it to ginger
2022-12-05 20:26:54 +0100 <dsal> There may be a caching middleware, but caching is kind of hard.
2022-12-05 20:27:09 +0100 <moonsheep> so is there any way at all I could use that middleware with ginger?
2022-12-05 20:29:10 +0100 <dsal> I'd just do the simplest thing that works until I liked where my application was going.
2022-12-05 20:29:35 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-12-05 20:31:37 +0100 <moonsheep> hmm
2022-12-05 20:31:49 +0100 <moonsheep> I thought there was a "right way" to do things like this by default
2022-12-05 20:32:02 +0100 <moonsheep> if you end up hacking things together, why use a web framework in the first place?
2022-12-05 20:32:35 +0100 <EvanR> web frameworks vary in size, at least in haskell
2022-12-05 20:32:44 +0100 <EvanR> many don't do everything
2022-12-05 20:35:30 +0100 <monochrom> I don't think of scotty as a framework.
2022-12-05 20:35:46 +0100king_gs(~Thunderbi@187.201.204.122)
2022-12-05 20:36:08 +0100 <dsal> scotty is a pretty small framework.
2022-12-05 20:36:44 +0100 <dsal> There may be a right way to do things, but I like doing things the wrong way (whichever thing is obvious and easy at the time) to make progress when I get stuck.
2022-12-05 20:36:56 +0100 <dsal> Often the most right thing doesn't even make sense to me when I'm learning something new.
2022-12-05 20:37:25 +0100 <moonsheep> I mean, sure, but honestly, having an easy way to load files without having to worry about paths, caching, all that good stuff, is one of the most basic things a web framework should do
2022-12-05 20:37:38 +0100 <moonsheep> monochrom: it does market itself as one
2022-12-05 20:37:40 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 20:37:41 +0100freeside_(~mengwong@103.252.202.193)
2022-12-05 20:38:46 +0100 <moonsheep> hmm, ginger seems to give this example function in its docs
2022-12-05 20:38:54 +0100 <dsal> I've never used scotty that way, but there probably is an easy way that will be obvious when you find it. I'm just suggesting not getting stuck before you even get started.
2022-12-05 20:38:56 +0100 <moonsheep> yet htmlSource doesn't seem to exist
2022-12-05 20:39:01 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-05 20:39:01 +0100 <monochrom> What does ginger do?
2022-12-05 20:39:12 +0100 <moonsheep> it's a templating engine
2022-12-05 20:39:17 +0100 <moonsheep> a reimplementation of jinja2
2022-12-05 20:39:22 +0100 <moonsheep> I really like jinja
2022-12-05 20:39:43 +0100 <dsal> I just don't bother generating html on the server side at all anymore.
2022-12-05 20:39:52 +0100 <moonsheep> how do I do dynamic stuff then?
2022-12-05 20:39:58 +0100king_gs(~Thunderbi@187.201.204.122) (Ping timeout: 256 seconds)
2022-12-05 20:40:40 +0100 <dsal> I do all the dynamic stuff on the client side that has all the dynamic bits.
2022-12-05 20:40:57 +0100 <moonsheep> surely you jest
2022-12-05 20:41:09 +0100 <EvanR> could work!
2022-12-05 20:41:11 +0100 <dsal> Have you used a web site lately?
2022-12-05 20:41:18 +0100 <moonsheep> dsal: unfortunately, yes
2022-12-05 20:41:39 +0100 <dsal> I write the application for the web browser that makes API calls to the backend application in scotty.
2022-12-05 20:41:50 +0100 <dsal> Occasionally scotty will also do stuff like generate a kmz for me or something.
2022-12-05 20:42:10 +0100 <moonsheep> plain javascript?
2022-12-05 20:42:37 +0100 <dsal> Never touch the stuff when I can avoid it.
2022-12-05 20:42:39 +0100 <mauke> I strongly dislike having web page generation outsourced to me
2022-12-05 20:42:47 +0100freeside_(~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
2022-12-05 20:42:47 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
2022-12-05 20:42:49 +0100 <dsal> For the thing I'm looking at, I wrote it in elm.
2022-12-05 20:42:53 +0100trev(~trev@user/trev) (Remote host closed the connection)
2022-12-05 20:42:54 +0100 <moonsheep> ah alright
2022-12-05 20:43:17 +0100 <EvanR> just a web page, vs a fully blown web application, vs some vaguely uncategorizable hybrid...
2022-12-05 20:43:26 +0100 <dsal> I'm managing all my video assets. It's silly fast to do all the filtering and stuff.
2022-12-05 20:43:32 +0100 <moonsheep> I'd still take server-side generation over client-side tomfuckery any day now
2022-12-05 20:43:39 +0100 <darkling> Elm is about the first thing for me that made writing client-side web stuff not actively painful.
2022-12-05 20:43:43 +0100 <moonsheep> what if I want to access the site in lynx?
2022-12-05 20:44:16 +0100 <EvanR> see we're talking about two different applications of web tech, just pages vs "this is in a browser instead of GTK"
2022-12-05 20:44:17 +0100 <moonsheep> (something I often do while booted from live linux images for example)
2022-12-05 20:44:21 +0100monochromprefers elinks to lynx :)
2022-12-05 20:44:26 +0100 <moonsheep> that was an example
2022-12-05 20:44:29 +0100 <moonsheep> but yeah
2022-12-05 20:44:44 +0100 <mauke> about 99% of the latter should be just pages
2022-12-05 20:45:26 +0100 <EvanR> well continually pulling in full pages (that have to be fixed up client side anyway) is getting kind of silly
2022-12-05 20:46:04 +0100 <moonsheep> EvanR: that's the secret, you don't pull them continually
2022-12-05 20:46:12 +0100 <moonsheep> if you want live updates, web is the wrong way to go about it imho
2022-12-05 20:46:20 +0100 <moonsheep> of course I'm not gonna change the mind of an entire industry
2022-12-05 20:46:22 +0100 <moonsheep> oh well
2022-12-05 20:46:48 +0100 <moonsheep> I should've just stuck with gemini...
2022-12-05 20:47:08 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-05 20:47:09 +0100 <EvanR> well that's not what I was getting at, but all roads lead to the woods like this xD
2022-12-05 20:47:23 +0100 <EvanR> eventually
2022-12-05 20:47:29 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de) (Ping timeout: 246 seconds)
2022-12-05 20:47:38 +0100 <moonsheep> anyway, why are the ginger docs telling me to use a function that doesn't exist?
2022-12-05 20:48:16 +0100 <moonsheep> oh sorry didn't post the page
2022-12-05 20:48:17 +0100 <moonsheep> https://hackage.haskell.org/package/ginger-0.10.4.0/docs/Text-Ginger-Run.html
2022-12-05 20:48:36 +0100 <moonsheep> I can't for the live of me find where htmlSource is supposed to be
2022-12-05 20:48:49 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 20:48:57 +0100 <EvanR> I found it over here https://hackage.haskell.org/package/ginger-0.10.4.0/docs/Text-Ginger-Html.html
2022-12-05 20:49:22 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307)
2022-12-05 20:49:29 +0100 <moonsheep> oh nevermind I found it just when you posted it
2022-12-05 20:49:34 +0100 <moonsheep> wait why doesn't it show up in hoogle?
2022-12-05 20:49:44 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-12-05 20:49:48 +0100 <moonsheep> (local hoogle)
2022-12-05 20:50:11 +0100 <moonsheep> ???
2022-12-05 20:50:23 +0100 <moonsheep> after restarting hoogle it now finds it jut fine
2022-12-05 20:50:27 +0100 <moonsheep> s/jut/just
2022-12-05 20:50:44 +0100 <moonsheep> what the hell
2022-12-05 20:51:17 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2022-12-05 20:51:50 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:a0ae:ac9b:c278:adb2)
2022-12-05 20:52:08 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-05 20:54:36 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 20:55:50 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 256 seconds)
2022-12-05 20:55:56 +0100 <EvanR> what the hell, it's working! where did my problems go?!
2022-12-05 20:56:12 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-05 20:56:20 +0100 <EvanR> if some tech in this room doesn't break in the next 5 minutes I swear to god
2022-12-05 20:56:24 +0100rburkholder(~blurb@96.45.2.121) (Ping timeout: 256 seconds)
2022-12-05 20:57:01 +0100 <monochrom> IRC itself is unlikely to break in the next 5 minutes. :)
2022-12-05 20:57:55 +0100 <monochrom> "pure ()" is also extremely unlikely to break, although maybe you argue "that's not tech, that's math".
2022-12-05 20:58:03 +0100 <darkling> * EvanR has quit (timed out: 240s)
2022-12-05 20:58:13 +0100 <monochrom> heh
2022-12-05 20:58:17 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-05 20:59:14 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
2022-12-05 21:00:18 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 21:01:25 +0100 <EvanR> yeah math doesn't break, people break. Or something
2022-12-05 21:02:20 +0100 <darkling> People's implementations of the maths in the real world, on the other hand...
2022-12-05 21:02:31 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de)
2022-12-05 21:02:47 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 21:02:56 +0100 <darkling> Spot of ignorance, spot of entropy, and pretty soon you're looking at some *real* failure.
2022-12-05 21:04:23 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 21:04:50 +0100zant(~zant@62.214.20.26)
2022-12-05 21:05:17 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 256 seconds)
2022-12-05 21:05:20 +0100 <Lycurgus> well it does sorta break, or shows feets of clay as in sabine hossenfelders book
2022-12-05 21:05:47 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2022-12-05 21:06:18 +0100 <Lycurgus> or you need to ask ur dr if it's right for u or smth
2022-12-05 21:07:26 +0100 <EvanR> try mathrivia today, may cause death disease general horror and despair
2022-12-05 21:08:55 +0100 <darkling> I've been on matinib since I got my PhD in 2002. :)
2022-12-05 21:10:23 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 256 seconds)
2022-12-05 21:11:18 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2022-12-05 21:12:27 +0100 <darkling> (It's at this point I discover that matinib is a real medication for impotence or furry toenails something)
2022-12-05 21:14:06 +0100zq(~zq@xorshift.org)
2022-12-05 21:14:39 +0100 <zq> do where-bindings desugar to let?
2022-12-05 21:15:12 +0100 <geekosaur> yes
2022-12-05 21:15:12 +0100 <c_wraith> I'm not sure "desugar" is quite the right term, but they are compiled to core's let construct
2022-12-05 21:15:20 +0100 <geekosaur> well, that
2022-12-05 21:15:38 +0100 <monochrom> where and let both desugared to a common form.
2022-12-05 21:15:57 +0100 <monochrom> or rather, s/desugared/compiled/
2022-12-05 21:15:58 +0100 <geekosaur> it's somewhat complicated though as where scopes over guards, but guards desugar to cases
2022-12-05 21:16:45 +0100 <monochrom> And yeah where and let have differences, desugaring is an inadequate mental model.
2022-12-05 21:16:55 +0100 <zq> geekosaur: thanks
2022-12-05 21:17:15 +0100 <zq> i was curious to know evaluation order of where-clauses under -XStrict
2022-12-05 21:17:26 +0100 <geekosaur> you probably want to play with various small test programs and -ddump-ds to see what's going on
2022-12-05 21:17:37 +0100 <monochrom> You could have asked directly that.
2022-12-05 21:17:42 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 21:19:04 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2022-12-05 21:20:47 +0100 <EvanR> -XStrict acts like ! is in front each variable by default, in the pattern bindings
2022-12-05 21:21:03 +0100haveo(~haveo@sl35.iuwt.fr) (Remote host closed the connection)
2022-12-05 21:21:04 +0100 <dsal> If it's just going to bang all the things, they should've called it -XXX
2022-12-05 21:21:11 +0100 <EvanR> lol
2022-12-05 21:21:31 +0100 <c_wraith> Well. It doesn't put a ! in front of nested pattern matches
2022-12-05 21:21:59 +0100 <c_wraith> just for extra fun
2022-12-05 21:22:21 +0100 <EvanR> what's an example of that
2022-12-05 21:22:37 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de) (Ping timeout: 252 seconds)
2022-12-05 21:22:47 +0100 <c_wraith> something like let (x, y) = foo in bar x y
2022-12-05 21:22:49 +0100 <monochrom> -ddump-ds is helpful in this case.
2022-12-05 21:23:06 +0100 <c_wraith> it won't force evaluation of x or y
2022-12-05 21:23:09 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-12-05 21:23:15 +0100 <EvanR> rather let !(x,y) = foo just wouldn't have any effect?
2022-12-05 21:23:31 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-12-05 21:23:32 +0100 <c_wraith> it would evaluate the result of foo
2022-12-05 21:23:36 +0100 <c_wraith> but not x or y
2022-12-05 21:23:49 +0100king_gs(~Thunderbi@187.201.204.122)
2022-12-05 21:23:56 +0100 <EvanR> ok... but the ! is there right
2022-12-05 21:24:00 +0100 <monochrom> Evaluate foo until you see the (,) data constructor but that's still one step away from evaluating the two fields.
2022-12-05 21:24:16 +0100 <EvanR> it sounds like you said because it's nested, it just won't put ! anywhere xD
2022-12-05 21:24:22 +0100 <monochrom> So, difference between "foo = undefined" and "foo = (undefined, undefined)".
2022-12-05 21:26:50 +0100king_gs(~Thunderbi@187.201.204.122) (Client Quit)
2022-12-05 21:27:06 +0100king_gs(~Thunderbi@187.201.204.122)
2022-12-05 21:27:38 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-05 21:30:18 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 21:31:51 +0100Scraeling(~Scraeling@user/scraeling) (Quit: Scraeling)
2022-12-05 21:33:23 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
2022-12-05 21:34:36 +0100 <monochrom> g ~(_, _) = (); main = print (g undefined)
2022-12-05 21:34:55 +0100 <zq> i was hoping for an answer more formal than checking the simpl output but unfortunately the wiki doesn't say much about where desugaring
2022-12-05 21:35:14 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:a0ae:ac9b:c278:adb2) (Quit: WeeChat 2.8)
2022-12-05 21:35:15 +0100 <monochrom> Also print (g (undefined, undefined))
2022-12-05 21:35:31 +0100 <monochrom> Those will show what Strict does and doesn't.
2022-12-05 21:35:54 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-05 21:36:05 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection)
2022-12-05 21:36:10 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 21:36:32 +0100 <EvanR> zq, the key is understanding what bangs in patterns do
2022-12-05 21:36:36 +0100 <c_wraith> Strict is so weirdly narrow that I can't imagine wanting to use it in any case except the exact one it was designed for: a large module full of numeric algorithms on concrete types
2022-12-05 21:37:02 +0100freeside_(~mengwong@103.252.202.193)
2022-12-05 21:37:25 +0100 <monochrom> Well that still has the "where is the formal spec" question.
2022-12-05 21:37:25 +0100 <EvanR> a minor second thing is where Strict puts the bangs but, there will be a lot of them
2022-12-05 21:37:34 +0100 <dolio> Is that what it was designed for?
2022-12-05 21:37:58 +0100 <monochrom> GHC user's gude has a formal spec that's incomplete because the rest is in the Haskell Report.
2022-12-05 21:38:29 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de)
2022-12-05 21:40:49 +0100 <monochrom> At which point the question and the answer are orthogonal to desugaring. Unless you just define "desugar = compile".
2022-12-05 21:41:05 +0100 <monochrom> Gives a whole new meaning to "XY problem".
2022-12-05 21:41:26 +0100 <monochrom> "You have a question along the X axis. You ask a question along the Y axis."
2022-12-05 21:42:41 +0100 <monochrom> As said, in reality, where and let are not desugared into each other, they are compiled to a common intermediate form. Corollary: There will not be a wiki on desugaring where to anyway, because it is simply not done.
2022-12-05 21:42:49 +0100 <monochrom> s/anyway/anything/
2022-12-05 21:42:53 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-12-05 21:42:54 +0100califax(~califax@user/califx) (Remote host closed the connection)
2022-12-05 21:43:45 +0100califax(~califax@user/califx)
2022-12-05 21:46:35 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 260 seconds)
2022-12-05 21:46:55 +0100chomwitt(~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1)
2022-12-05 21:50:21 +0100tomokojun(~tomokojun@37.19.210.31) (Remote host closed the connection)
2022-12-05 21:50:41 +0100tomokojun(~tomokojun@37.19.210.31)
2022-12-05 21:51:39 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Read error: Connection reset by peer)
2022-12-05 21:51:59 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2022-12-05 21:53:32 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2022-12-05 21:57:03 +0100bjourne2(~bjorn@94.191.136.138.mobile.tre.se)
2022-12-05 21:59:14 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
2022-12-05 21:59:30 +0100pavonia(~user@user/siracusa)
2022-12-05 21:59:36 +0100gmg(~user@user/gehmehgeh)
2022-12-05 21:59:52 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-05 22:01:12 +0100fserucas(~fserucas@laubervilliers-657-1-66-228.w90-63.abo.wanadoo.fr)
2022-12-05 22:03:59 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-12-05 22:04:21 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-05 22:06:41 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 268 seconds)
2022-12-05 22:06:41 +0100king_gs(~Thunderbi@187.201.204.122) (Read error: Connection reset by peer)
2022-12-05 22:07:29 +0100king_gs(~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13)
2022-12-05 22:19:23 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-12-05 22:20:07 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-05 22:22:28 +0100haveo(~haveo@sl35.iuwt.fr)
2022-12-05 22:25:23 +0100mmhat(~mmh@p200300f1c73b5145ee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-12-05 22:25:45 +0100mmhat(~mmh@p200300f1c73b51cbee086bfffe095315.dip0.t-ipconnect.de)
2022-12-05 22:26:35 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-12-05 22:27:07 +0100dudek(~dudek@185.150.236.173)
2022-12-05 22:31:40 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-12-05 22:35:36 +0100 <EvanR> the burning question becomes, do guards desugar to case analysis
2022-12-05 22:35:46 +0100 <EvanR> or compile to case analysis xD
2022-12-05 22:35:50 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-05 22:36:34 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-12-05 22:40:37 +0100 <gnyeki> EvanR: try compiling with ghc -ddump-ds to see if they desugar to the same code?
2022-12-05 22:41:35 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2022-12-05 22:42:29 +0100freeside_(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-12-05 22:42:29 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-12-05 22:44:26 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-05 22:49:35 +0100fserucas(~fserucas@laubervilliers-657-1-66-228.w90-63.abo.wanadoo.fr) (Ping timeout: 246 seconds)
2022-12-05 22:52:07 +0100fizbin(~fizbin@user/fizbin)
2022-12-05 22:53:56 +0100 <monochrom> I am not convinced that -ddump-ds outputs Haskell.
2022-12-05 22:54:58 +0100 <geekosaur> I don't think there's a way to get Haskell as such out of desugaring, yes. it produces Core, which is similar to Haskell but differs in a number of ways (see for example `case`)
2022-12-05 22:55:33 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-12-05 22:56:20 +0100 <monochrom> Usually "desugar" means staying within the same language, just trying to use fewer features of that language.
2022-12-05 22:56:42 +0100 <geekosaur> but thsat's not how ghc uses it, sadly
2022-12-05 22:57:35 +0100freeside(~mengwong@103.252.202.193)
2022-12-05 22:57:57 +0100titibandit(~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection)
2022-12-05 22:58:07 +0100 <monochrom> Right, so here is a dilemma between bending the meaning of "desugar" not slightly at all, or downright assert that GHC desugars all of Haskell.
2022-12-05 22:59:14 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-05 23:00:20 +0100TonyStone(~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Ping timeout: 260 seconds)
2022-12-05 23:00:27 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-05 23:00:58 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-12-05 23:01:22 +0100 <monochrom> OK I concede. I know of a very good Brown University course that desugars one language to another. GHC is doing that.
2022-12-05 23:01:33 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-05 23:01:48 +0100 <EvanR> the Glorious Glasgow Haskell Desugarer
2022-12-05 23:01:56 +0100 <monochrom> (Specifically it shows desugaring OOP to closures, for example.)
2022-12-05 23:02:02 +0100bjourne2(~bjorn@94.191.136.138.mobile.tre.se) (Read error: Connection reset by peer)
2022-12-05 23:02:32 +0100 <EvanR> if it desugarerers "one language to another" it's actually transugaring
2022-12-05 23:02:38 +0100freeside_(~mengwong@103.252.202.193)
2022-12-05 23:02:46 +0100 <monochrom> (Later on it also shows desugaring a language that has call/cc to a language that doesn't, but the output is in CPS.)
2022-12-05 23:03:27 +0100 <monochrom> Yeah that's my thought, but I guess other people differ, and some of those other people I greatly admire and respect.
2022-12-05 23:04:26 +0100 <monochrom> Great we had trans-fat, now we also have trans-sugar, this is going to taste great but horrible to health...
2022-12-05 23:05:22 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2022-12-05 23:10:51 +0100dudek(~dudek@185.150.236.173) (Quit: Leaving)
2022-12-05 23:12:58 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 256 seconds)
2022-12-05 23:13:16 +0100TonyStone(~TonyStone@cpe-74-76-57-186.nycap.res.rr.com)
2022-12-05 23:14:02 +0100notzmv(~zmv@user/notzmv)
2022-12-05 23:16:38 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl)
2022-12-05 23:18:00 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-05 23:20:00 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-05 23:24:52 +0100tomokojun_(~tomokojun@143.244.47.69)
2022-12-05 23:25:24 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-05 23:26:45 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-05 23:27:42 +0100tomokojun(~tomokojun@37.19.210.31) (Ping timeout: 256 seconds)
2022-12-05 23:28:27 +0100tomokojun_(~tomokojun@143.244.47.69) (Client Quit)
2022-12-05 23:29:10 +0100fizbin(~fizbin@user/fizbin)
2022-12-05 23:31:04 +0100seydar(~seydar@154-27-113-252.starry-inc.net)
2022-12-05 23:31:32 +0100 <seydar> I'm solving day 5 of AoC using a stack. But it... doesn't feel very haskellish. Is there a better way to approach this problem in haskell?
2022-12-05 23:33:00 +0100 <EvanR> the haskell list type is basically a stack
2022-12-05 23:33:14 +0100 <EvanR> if a stack would work, you're in luck
2022-12-05 23:33:32 +0100dsrt^(~dsrt@76.145.185.103)
2022-12-05 23:34:16 +0100 <seydar> I used a stack in Ruby, but... i dunno, it just feels... inefficient? because every change requires producing a whole new stack?
2022-12-05 23:34:27 +0100 <EvanR> in ruby, yeah xD
2022-12-05 23:34:40 +0100 <seydar> in ruby it's fine!!! ruby is perfect!!!
2022-12-05 23:34:43 +0100 <EvanR> not in haskell, the tail of any give list will be shared
2022-12-05 23:34:44 +0100 <seydar> but i worry for my haskell
2022-12-05 23:34:57 +0100 <seydar> oh whew that's good news
2022-12-05 23:35:35 +0100 <EvanR> continually inspecting and replacing the first item in a list is cheap
2022-12-05 23:37:43 +0100 <mauke> it occurs to me that running transpose on the header would probably make it easier to parse
2022-12-05 23:38:37 +0100 <EvanR> transpose the file before reading it? xD
2022-12-05 23:38:58 +0100 <EvanR> why doesn't unix have this
2022-12-05 23:39:13 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-05 23:39:34 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 252 seconds)
2022-12-05 23:40:26 +0100 <mauke> not the whole file, just the first paragraph
2022-12-05 23:41:16 +0100 <dsal> Yeah, that would simplify things tremendously.
2022-12-05 23:41:53 +0100 <EvanR> linear algebra wins again
2022-12-05 23:42:18 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-05 23:43:35 +0100 <monochrom> Next time you have to do fast-fourier-transform to the header and then it's super-easy to parse. >:)
2022-12-05 23:43:57 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 256 seconds)
2022-12-05 23:44:02 +0100king_gs(~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 265 seconds)
2022-12-05 23:45:24 +0100king_gs(~Thunderbi@187.201.204.122)
2022-12-05 23:45:36 +0100 <seydar> mauke: do you post your solutions after you solve them?
2022-12-05 23:45:52 +0100 <mauke> seydar: sometimes, in an ad-hoc fashion
2022-12-05 23:46:39 +0100 <mauke> e.g. here's day 5 part 1: http://sprunge.us/yCdDCw
2022-12-05 23:46:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-05 23:47:50 +0100 <EvanR> a mutable array... damn
2022-12-05 23:48:29 +0100 <EvanR> :t interact
2022-12-05 23:48:30 +0100 <lambdabot> (String -> String) -> IO ()
2022-12-05 23:49:37 +0100 <mauke> @src interact
2022-12-05 23:49:37 +0100 <lambdabot> interact f = do s <- getContents; putStr (f s)
2022-12-05 23:51:19 +0100merijn(~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-12-05 23:53:52 +0100seydar(~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 252 seconds)
2022-12-05 23:54:47 +0100raym(~ray@user/raym) (Ping timeout: 264 seconds)
2022-12-05 23:55:16 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2022-12-05 23:55:17 +0100michalz(~michalz@185.246.204.75) (Remote host closed the connection)
2022-12-05 23:58:18 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-12-05 23:58:28 +0100freeside_(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-12-05 23:59:37 +0100elevenkb(~elevenkb@105.184.125.168)