2021/02/17

2021-02-17 00:01:25 +0100Anthaas(~Anthaas@unaffiliated/anthaas) (Ping timeout: 240 seconds)
2021-02-17 00:01:58 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 00:02:29 +0100Anthaas(~Anthaas@unaffiliated/anthaas)
2021-02-17 00:03:23 +0100 <Axman6> edwardk: looks like some progress is being made on your old account, appears to have old tweets back?
2021-02-17 00:03:38 +0100 <Axman6> oh maybe not
2021-02-17 00:03:56 +0100 <edwardk> it has my tweets back, but they reinstalled them on vzlish. i don't have access to that account yet though
2021-02-17 00:04:10 +0100 <Axman6> hmmm
2021-02-17 00:04:34 +0100usr25_tm(~usr25@unaffiliated/usr25)
2021-02-17 00:07:19 +0100 <Axman6> seems like a good start though, none of the impersonator's tweets are there any more afaict
2021-02-17 00:08:05 +0100usr25(~usr25@unaffiliated/usr25) (Ping timeout: 240 seconds)
2021-02-17 00:09:57 +0100 <NieDzejkob> is it possible to somehow get a repl inside a state monad?
2021-02-17 00:10:22 +0100 <Axman6> edwardk: I was going to offer to buy you a Yubikey but it probably wouldn't have helped if things were compromised by phone, and I can't afford to buy you an iPhone :)
2021-02-17 00:11:16 +0100weikum(~weikum@90.218.153.39) (Ping timeout: 240 seconds)
2021-02-17 00:12:34 +0100remby(~rcg@bras-base-london1483w-grc-11-76-69-70-199.dsl.bell.ca) ("Konversation terminated!")
2021-02-17 00:13:32 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 00:14:07 +0100weikum(~weikum@90.218.153.39)
2021-02-17 00:14:14 +0100 <Rembane> NieDzejkob: Why do you want that?
2021-02-17 00:14:21 +0100cuz(~user@38.140.58.234) (Ping timeout: 264 seconds)
2021-02-17 00:14:57 +0100TMA(tma@twin.jikos.cz) (Ping timeout: 264 seconds)
2021-02-17 00:15:39 +0100TMA(tma@twin.jikos.cz)
2021-02-17 00:15:39 +0100jollygood2(~bc8134e3@217.29.117.252)
2021-02-17 00:15:50 +0100dcoutts(~duncan@85.186.125.91.dyn.plus.net) (Ping timeout: 265 seconds)
2021-02-17 00:16:04 +0100 <NieDzejkob> I have some operations that use the state monad and I want to experiment with them without passing the state manually
2021-02-17 00:17:01 +0100 <Rembane> NieDzejkob: Got it, you need to pass some state. But you can decide which state to pass. Have you taken a look at the eliminator functions lately?
2021-02-17 00:17:16 +0100pera(~pera@unaffiliated/pera) (Ping timeout: 240 seconds)
2021-02-17 00:17:32 +0100 <Rembane> NieDzejkob: https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-State-Lazy.html#v:runState <- runState et. al.
2021-02-17 00:18:33 +0100weikum(~weikum@90.218.153.39) (Ping timeout: 264 seconds)
2021-02-17 00:18:58 +0100 <monochrom> which is passing initial states manually :)
2021-02-17 00:19:02 +0100 <NieDzejkob> yeah. I want to specify the initial state, run some functions, see the result of each, and then perhaps exit the state monad and get the new state back
2021-02-17 00:19:48 +0100 <Rembane> NieDzejkob: Got it, you can run the trace functions insdie the state monad: https://hackage.haskell.org/package/base-4.14.1.0/docs/Debug-Trace.html
2021-02-17 00:19:50 +0100Tops22(~Tobias@dyndsl-091-249-083-069.ewe-ip-backbone.de) (Quit: Leaving.)
2021-02-17 00:20:08 +0100 <monochrom> I wonder if Debug.Trace solves your real problem better. http://www.vex.net/~trebla/haskell/tracing.html
2021-02-17 00:20:21 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
2021-02-17 00:21:12 +0100 <NieDzejkob> looks like I could get it to work: https://www.reddit.com/r/haskell/comments/87otrn/you_can_override_the_monad_that_ghci_uses/
2021-02-17 00:21:13 +0100geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
2021-02-17 00:22:25 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 00:22:51 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 00:23:07 +0100average(uid473595@gateway/web/irccloud.com/x-xnupshzcizbfldxu) (Quit: Connection closed for inactivity)
2021-02-17 00:23:08 +0100 <NieDzejkob> nah, it's probably closer to a REPL for an EDSL than debugging
2021-02-17 00:25:27 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 272 seconds)
2021-02-17 00:25:35 +0100 <monochrom> yikes
2021-02-17 00:26:36 +0100jedws(~jedws@101.184.202.248)
2021-02-17 00:26:38 +0100jalumar(uid392211@gateway/web/irccloud.com/x-fbybggmahjjwkaqm) (Quit: Connection closed for inactivity)
2021-02-17 00:27:31 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 00:27:36 +0100 <NieDzejkob> what?
2021-02-17 00:27:53 +0100 <monochrom> the trick of overring ghci's monad
2021-02-17 00:28:25 +0100 <monochrom> Actually on second thoughts it is not yikes-worthy, it's rather quaint actually.
2021-02-17 00:28:57 +0100 <monochrom> If you have to do "runReaderT" at every point you are not overriding anything, really.
2021-02-17 00:29:23 +0100 <NieDzejkob> with some overlapping typeclasses it will work quite nicely
2021-02-17 00:29:42 +0100 <monochrom> Well OK you're overriding the interactive printer, but runReaderT brings you back to IO, you are still not replacing IO.
2021-02-17 00:30:10 +0100 <monochrom> For example this trick doesn't replace IO by ST.
2021-02-17 00:30:29 +0100 <monochrom> For example this trick doesn't replace IO by Maybe.
2021-02-17 00:30:30 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 00:31:06 +0100 <NieDzejkob> well it works for RWS
2021-02-17 00:31:12 +0100 <monochrom> Conclusion: the title is a click bait.
2021-02-17 00:32:01 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving)
2021-02-17 00:32:14 +0100lawid(~quassel@dslb-002-202-157-179.002.202.pools.vodafone-ip.de) (Quit: lawid)
2021-02-17 00:34:25 +0100lawid(~quassel@dslb-002-202-157-179.002.202.pools.vodafone-ip.de)
2021-02-17 00:37:45 +0100gratadewey1(~gratadewe@tmo-114-105.customers.d1-online.com)
2021-02-17 00:37:56 +0100 <karasu1[m]> I am looking at some Haskell code, and it's using `Data.Map.Strict` instead of `Data.Map`. Why is this being done? I have never heard of `Data.Map.Strict` so I was hoping if someone could kindly explain the difference and why one would use one over the other. They both seem to be doing the exact same thing..
2021-02-17 00:38:06 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 00:38:26 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 00:39:15 +0100jedws(~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-02-17 00:39:20 +0100fionnan(~fionnan@80.111.86.154) (Remote host closed the connection)
2021-02-17 00:39:21 +0100gratadewey1(~gratadewe@tmo-114-105.customers.d1-online.com) (Client Quit)
2021-02-17 00:40:27 +0100 <Axman6> the sifference is... strictness :)
2021-02-17 00:40:32 +0100 <Axman6> difference*
2021-02-17 00:40:36 +0100 <ephemient> karasu1[m]: http://hackage.haskell.org/package/containers/docs/Data-Map.html and links explain
2021-02-17 00:40:40 +0100jess(jess@freenode/staff/jess) (Quit: brb)
2021-02-17 00:41:07 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905) (Remote host closed the connection)
2021-02-17 00:41:19 +0100 <ephemient> Data.Map = Data.Map.Lazy. Data.Map.Strict = same data structure, but "Each function in this module is careful to force values before installing them in a Map. This is usually more efficient when laziness is not necessary. When laziness is required, use the functions in Data.Map.Lazy."
2021-02-17 00:41:41 +0100jess(jess@freenode/staff/jess)
2021-02-17 00:41:45 +0100alx741(~alx741@186.178.109.49) (Ping timeout: 240 seconds)
2021-02-17 00:42:36 +0100 <Axman6> karasu1[m]: the difference is that for Data.Map(.Lazy), if you repeatedly applied a function to the values at a specific key, you'd just build up a alarge thunk. if you use Data.Map.Strict, it forces the result every time you modify the value
2021-02-17 00:42:57 +0100 <karasu1[m]> So all values in `Data.Map.Strict.Map` are going to be actual values, right (instead of a lazy string of functions applied to a value)?
2021-02-17 00:44:02 +0100 <Axman6> so if you ran iterate (modify someKey (+1)), in the lazy you you's end up with a map where someKey => 0+1+1+1+1+1+1+1+1+...
2021-02-17 00:44:15 +0100 <ephemient> it's actually the same Map, it's only the functions which are different
2021-02-17 00:44:16 +0100 <karasu1[m]> <ephemient "Data.Map = Data.Map.Lazy. Data.M"> Hmm, could you tell me where this passage is from?
2021-02-17 00:44:26 +0100 <dolio> The description in the docs seems kind of dubious.
2021-02-17 00:44:28 +0100 <ephemient> it's on the Data.Map.Strict doc
2021-02-17 00:44:35 +0100 <Axman6> "actual values" means evaluated (to weak head normal form), which means we know which constructor the value has
2021-02-17 00:45:32 +0100 <ephemient> not how it's implemented, but effectively, `Data.Map.Strict.insert k !a m = Data.Map.Lazy.insert k a m`
2021-02-17 00:45:58 +0100 <Axman6> in a strict map, we if we had Map Int (Maybe String), the functions in that module ensure that for all the Maybe Strings, it is known if it is a Nothing or Just, but it is not known yet what the String is
2021-02-17 00:46:02 +0100 <ephemient> same m, it's just that the Strict module's functions are strict in the map values
2021-02-17 00:46:29 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
2021-02-17 00:46:32 +0100 <karasu1[m]> I've never seen the ! symbol except for the list index (!!) before..
2021-02-17 00:46:36 +0100 <ephemient> well, WHNF of a String = [Char] also means we know if it is a (:) or a [] constructor, and not anything else
2021-02-17 00:46:40 +0100 <karasu1[m]> !a means strict?
2021-02-17 00:46:55 +0100 <karasu1[m]> !(+ 8) evaluates 8 immediately?
2021-02-17 00:47:03 +0100 <ephemient> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/strict.html
2021-02-17 00:47:48 +0100 <dolio> Unless you interpret "need laziness" as true when laziness avoids eagerly doing unnecessary work.
2021-02-17 00:47:50 +0100 <ephemient> f !a = x means f a = a `seq` x
2021-02-17 00:49:41 +0100 <karasu1[m]> never seen `seq` before, but yeah it sort of makes sense from the description on Hoogle: "The value of seq a b is bottom if a is bottom, and otherwise equal to b. In other words, it evaluates the first argument a to weak head normal form (WHNF). seq is usually introduced to improve performance by avoiding unneeded laziness."
2021-02-17 00:50:06 +0100 <karasu1[m]> don't know what bottom and weak head normal form mean but I will look it up : D
2021-02-17 00:51:37 +0100 <edwardk> > (let x = x in x)
2021-02-17 00:51:40 +0100 <lambdabot> *Exception: <<loop>>
2021-02-17 00:51:42 +0100 <ephemient> bottom (written ⟂ or sometimes _|_) is a "value" which cannot be computed. e.g. something which loops infinitely or throws an exception
2021-02-17 00:51:43 +0100 <edwardk> ^_ that is a bottom
2021-02-17 00:51:51 +0100 <edwardk> an infinite loop, or a throwing of an exception
2021-02-17 00:52:03 +0100 <edwardk> > const 12 (let x = x in x)
2021-02-17 00:52:05 +0100 <lambdabot> 12
2021-02-17 00:52:08 +0100 <karasu1[m]> bottom looks like the false symbol in boolean logic
2021-02-17 00:52:25 +0100 <edwardk> ^- in most languages if you go to call a function with an argument that is bottom you get bottom, because you never call the function!
2021-02-17 00:52:39 +0100 <edwardk> think of bottom as 'undefined' more than false.
2021-02-17 00:52:46 +0100 <edwardk> True and False are both more defined than a bottom
2021-02-17 00:53:01 +0100 <edwardk> its like the joke in PHP that booleans are true, false and FILE_NOT_FOUND
2021-02-17 00:53:14 +0100 <edwardk> in haskell you can't case to distinguish a bottom from another value.
2021-02-17 00:53:15 +0100 <ephemient> bottom is a member of every (lifted) type in Haskell
2021-02-17 00:53:35 +0100 <edwardk> in the const case i didn't case analyze the second argument. const a b = a
2021-02-17 00:53:39 +0100 <edwardk> it ignores the b
2021-02-17 00:53:42 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 00:53:54 +0100 <edwardk> so the fact that if you _were_ to evaluate b the compiler would spin forever doesn't come up
2021-02-17 00:54:00 +0100 <karasu1[m]> * looking up lifted types
2021-02-17 00:54:01 +0100 <edwardk> haskell happily hands back 12
2021-02-17 00:54:39 +0100 <edwardk> laziness is haskell's secret sauce. it is the 11 herbs and spices that it adds to the recipe of programming language design that makes it all hang together.
2021-02-17 00:54:48 +0100conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-02-17 00:55:00 +0100 <ephemient> ... knowing what unlifted types are in Haskell probably isn't going to be super helpful when you're first learning, maybe I shouldn't have mentioned that
2021-02-17 00:55:00 +0100 <edwardk> and laziness is about if a function that takes in a bottom necessarily returns one.
2021-02-17 00:55:08 +0100 <edwardk> notationally does f _|_ = _|_ ?
2021-02-17 00:55:19 +0100 <edwardk> well the const case above shows in haskell it isn't necessarily true
2021-02-17 00:55:44 +0100 <edwardk> > (\x -> "YOLO") (error "it'd be a damn shame if you evaluated this")
2021-02-17 00:55:46 +0100 <lambdabot> "YOLO"
2021-02-17 00:56:05 +0100mouseghost(~draco@wikipedia/desperek) (Quit: mew wew)
2021-02-17 00:56:48 +0100 <edwardk> now, languages like scheme add some #f type, c++ has null, most languages have some kind of default value you can put in for objects that point out to the heap. and in most languages you can case match to see if you have a null and would be dumb if you tried to ignore that case.
2021-02-17 00:56:54 +0100conal(~conal@64.71.133.70)
2021-02-17 00:57:36 +0100dhil(~dhil@80.208.56.181) (Ping timeout: 240 seconds)
2021-02-17 00:57:48 +0100 <edwardk> in haskell we don't' do anything until we're forced to. it is the act of inspecting a value that turns it from a 'promise that really i'll compute an Int when you force me to' into actually a machine int.
2021-02-17 00:57:53 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905)
2021-02-17 00:58:05 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
2021-02-17 00:58:27 +0100 <edwardk> but you need bottoms at least 'in your semantics' to describe the fact that sometimes trying to go from a 'promise that i will totes compute an int when you ask' to an actual int leads to you spinning forever
2021-02-17 00:58:30 +0100 <edwardk> in the above example
2021-02-17 00:58:34 +0100 <edwardk> > let x = x in x
2021-02-17 00:58:37 +0100 <lambdabot> *Exception: <<loop>>
2021-02-17 00:58:46 +0100 <edwardk> in order to compute x i have to compute x, but in order to compute x i have to ...
2021-02-17 00:59:12 +0100 <ephemient> error :: String -> a
2021-02-17 00:59:38 +0100 <edwardk> :t throw
2021-02-17 00:59:39 +0100 <lambdabot> Exception e => e -> a
2021-02-17 00:59:50 +0100 <ephemient> given that type, the return can only ever be bottom
2021-02-17 00:59:52 +0100 <edwardk> :t undefined
2021-02-17 00:59:53 +0100 <lambdabot> a
2021-02-17 01:00:37 +0100 <edwardk> each of those returns a bottom, just like my let x = x in x. there is _nothing_ you can do in pure code that allows you to distinguish between different exception types or that infinite looping case, so we just colloquially lump them all into 'bottom'.
2021-02-17 01:01:12 +0100ContessaFortuna(88385f6e@136.56.95.110) (Quit: Connection closed)
2021-02-17 01:02:01 +0100 <karasu1[m]> I've worked with Scheme before, but I thought #f just meant false (like False in Haskell). But in Scheme, everything that's not #f is actually considered "True"
2021-02-17 01:02:15 +0100 <edwardk> its the act of case/pattern matching that takes your 'lifted type' and figures out what to do next. a "lifted type" is a type that can contain bottoms, (e.g. every type in haskell except some stuff in GHC.Prim you almost never see)
2021-02-17 01:02:17 +0100 <karasu1[m]> And '() is also false
2021-02-17 01:02:22 +0100 <karasu1[m]> in scheme
2021-02-17 01:02:28 +0100 <edwardk> in karasu1[m] have you ever used letrec in scheme?
2021-02-17 01:02:31 +0100 <dolio> Scheme just lets anything happen anywhere, so it's kind of a harder analogy to draw.
2021-02-17 01:02:44 +0100 <karasu1[m]> letrec is used for mutual recursion, and yes I have used it
2021-02-17 01:02:55 +0100 <karasu1[m]> not sure about the actual implementation underneath though
2021-02-17 01:03:49 +0100 <karasu1[m]> But I do often get worried that things won't terminate in Mutual recursion, so I'm always extra careful when using it
2021-02-17 01:03:53 +0100 <edwardk> when you go to write a letrec definition and you to to define just the equivalent of x = cons 1 x how does the compiler build the cons cell? it has to put something in for x temporarily. in scheme it'll put an #f in there as a placeholder then patch it up
2021-02-17 01:04:12 +0100 <edwardk> this is the way you do it in strict languages
2021-02-17 01:04:29 +0100 <edwardk> in a lazy language you can
2021-02-17 01:04:31 +0100 <edwardk> > let ones = 1 : ones in ones
2021-02-17 01:04:33 +0100 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
2021-02-17 01:04:37 +0100 <ephemient> (e.g. every let is a letrec in Haskell)
2021-02-17 01:04:58 +0100 <edwardk> and it makes a 'thunk' that evaluates to the result of 1 consed onto itself when forced.
2021-02-17 01:04:59 +0100ski. o O ( `call-with-current-continuation' can distinguish a Y-based `letrec' from a mutation-based one )
2021-02-17 01:05:09 +0100 <edwardk> we never slip a #f or null into that slot.
2021-02-17 01:05:26 +0100 <edwardk> the damning part about letrec in the scheme case is that you can find cases where it becomes visible to user code.
2021-02-17 01:05:38 +0100 <edwardk> so when you go to think about typed scheme letrec becomes hairy
2021-02-17 01:05:52 +0100 <dolio> call/cc can implement Y. :þ
2021-02-17 01:06:00 +0100 <edwardk> in ml dialects you get the same probem. this is one reason why they tend to be so ref-happy.
2021-02-17 01:06:00 +0100 <ski> that too :)
2021-02-17 01:06:00 +0100 <dolio> I think.
2021-02-17 01:06:09 +0100 <monochrom> Yikes, I need to show that to my students!
2021-02-17 01:06:54 +0100 <ski> ((call/cc call/cc) (call/cc call/cc)) ; try this ?
2021-02-17 01:07:12 +0100 <edwardk> ski: my eyes
2021-02-17 01:07:42 +0100 <monochrom> That breaks my mind but I'll try it one day. Hey it doesn't look too far off from (delta delta)
2021-02-17 01:07:47 +0100 <dolio> http://okmij.org/ftp/continuations/undelimited.html#fix-callcc
2021-02-17 01:08:25 +0100 <ski> thought it was Oleg, yes
2021-02-17 01:08:44 +0100LKoen(~LKoen@96.252.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2021-02-17 01:08:49 +0100 <karasu1[m]> <edwardk "when you go to write a letrec de"> hmmm, in a sense this sucks, since this is actually modifying the list from #f to the value it's patched up to (meaning it's not purely functional)
2021-02-17 01:09:09 +0100 <edwardk> exactly
2021-02-17 01:09:28 +0100usr25_tm(~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-02-17 01:09:41 +0100 <edwardk> 'tying the knot' in a strict language over a linked list you want to make circular fundamentally involves putting a null in somewhere, then apologizing and cleaning up your mess.
2021-02-17 01:10:32 +0100 <edwardk> in a lazy language 'tying the knot' involves putting in a thunk, a promise to compute a value with the right type when forced, and then evaluating that thunk when forced, which can now refer to itself as a "better" undistinguishable null
2021-02-17 01:11:02 +0100 <edwardk> the downside is bottoms clutter up your semantics and bob harper gets mad at you for not using all his work on ml
2021-02-17 01:11:42 +0100Lowl3v3l(~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de) (Quit: Leaving.)
2021-02-17 01:11:42 +0100 <karasu1[m]> what is a thunk? I thought this word just referred to a lambda function with no arguments?
2021-02-17 01:11:55 +0100 <dolio> Well, he'll get mad even if you use Haskell.
2021-02-17 01:11:56 +0100 <karasu1[m]> But not sure if this makes sense anymroe
2021-02-17 01:11:56 +0100 <edwardk> yes bob, the sml module system is a work of art, now where was i...
2021-02-17 01:12:05 +0100 <karasu1[m]> * But not sure if this makes sense anymore
2021-02-17 01:12:21 +0100 <edwardk> well, its not exactly that. it also replaces itself with its answer when run
2021-02-17 01:13:04 +0100 <edwardk> in ml you'd usually use a function from () as a poor man's thunk, some way to defer a calculation you aren't ready to do yet. but the 'and it replaces itself with its answer' is a big part of the haskell story.
2021-02-17 01:13:52 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 01:14:00 +0100 <edwardk> call-by-name is one way to implement a lazy language, call-by-need is another. the former feels like what you're thinking. 'a function with no arguments', but it lacks the fact that if you ask for the value of the same thunk twice in haskell you get the answer the second time with no work
2021-02-17 01:14:23 +0100 <ephemient> thunk = to-be-evaluated. in a strict language, it can only be implemented as a lambda. but that's (basically) every expression in Haskell. we don't have no-arg lambdas
2021-02-17 01:14:47 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 01:14:53 +0100 <ephemient> if you have threads then ... it depends on blackholing I guess
2021-02-17 01:15:36 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 01:15:36 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
2021-02-17 01:16:37 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2021-02-17 01:17:15 +0100carif(~mcarifio@cpe-67-246-227-118.rochester.res.rr.com) (Quit: leaving)
2021-02-17 01:18:35 +0100 <karasu1[m]> You can't make a no argument lambda in Haskell?
2021-02-17 01:18:38 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 260 seconds)
2021-02-17 01:18:51 +0100 <karasu1[m]> In Scheme it would look something like (lambda () (do something))
2021-02-17 01:19:14 +0100 <edwardk> in scheme you can make + take n-many arguments as well. we don't have that syntactic marker in haskell
2021-02-17 01:19:18 +0100 <edwardk> so we use an explicit fold
2021-02-17 01:19:24 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2021-02-17 01:19:29 +0100 <edwardk> (f) = f
2021-02-17 01:20:21 +0100 <edwardk> you can make a function in haskell that takes an object of type (), but it still takes an argument
2021-02-17 01:20:41 +0100 <edwardk> > let f :: () -> Int; f () = 12 in f
2021-02-17 01:20:43 +0100 <lambdabot> <() -> Int>
2021-02-17 01:20:45 +0100 <edwardk> > let f :: () -> Int; f () = 12 in f ()
2021-02-17 01:20:46 +0100 <lambdabot> 12
2021-02-17 01:20:59 +0100 <edwardk> so to write the 'zero argument' version you just say f = 12
2021-02-17 01:21:01 +0100 <ephemient> and then it might be strict or lazy in its argument...
2021-02-17 01:21:08 +0100 <ski> all functions in Haskell take exactly one argument
2021-02-17 01:21:22 +0100 <Axman6> karasu1[m]: a thunk is basically an expression which hasn't had its value demanded:
2021-02-17 01:21:24 +0100 <karasu1[m]> Wow
2021-02-17 01:21:26 +0100 <karasu1[m]> ((+) 1 2 3)
2021-02-17 01:21:33 +0100 <karasu1[m]> I thought this would have worked in Haskell
2021-02-17 01:21:34 +0100 <ski> @let newCyclicIORef :: (IORef a -> a) -> IO (IORef a); newCyclicIORef f = mfix (newIORef . f)
2021-02-17 01:21:35 +0100 <lambdabot> Defined.
2021-02-17 01:21:36 +0100 <karasu1[m]> but it doesn't
2021-02-17 01:21:43 +0100 <ski> > sum [1,2,3] -- works
2021-02-17 01:21:45 +0100 <lambdabot> 6
2021-02-17 01:21:46 +0100 <Axman6> > let foo = ("hello",7^239498729832974598723) in show (fst foo)
2021-02-17 01:21:47 +0100 <lambdabot> "\"hello\""
2021-02-17 01:21:48 +0100 <edwardk> > foldr (+) 0 [1,2,3]
2021-02-17 01:21:49 +0100 <ephemient> > foldl' (+) [1, 2, 3]
2021-02-17 01:21:50 +0100 <lambdabot> 6
2021-02-17 01:21:51 +0100 <lambdabot> error:
2021-02-17 01:21:51 +0100 <lambdabot> • No instance for (Num [Integer]) arising from a use of ‘e_1123’
2021-02-17 01:21:51 +0100 <lambdabot> • In the expression: e_1123
2021-02-17 01:21:58 +0100 <ephemient> oops, forgot the initial value
2021-02-17 01:22:08 +0100 <edwardk> > foldl1 (+) [1,2,3]
2021-02-17 01:22:10 +0100 <lambdabot> 6
2021-02-17 01:22:42 +0100 <Axman6> 7^239498729832974598723 is an expression, which when some other code needs its value will run the exponentiation but since nothing asked for its value, it's just sitting around as (^) 7 239498729832974598723
2021-02-17 01:22:42 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 01:22:42 +0100 <edwardk> but 'do i mean for it to have left to right or right to left fold semantics matters. i mean when you to write (- 1 2 3 4 5) which you mean is pretty important!
2021-02-17 01:22:53 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 01:23:06 +0100 <Axman6> :t (+)
2021-02-17 01:23:07 +0100 <lambdabot> Num a => a -> a -> a
2021-02-17 01:23:36 +0100 <Axman6> karasu1[m]: clearly that type can only apply be applied to two arguments* - this isn't lisp
2021-02-17 01:23:42 +0100 <edwardk> ((((1 - 2) - 3) - 4) - 5) is quite differnt from (1 - (2 - (3 - (4 - 5))))
2021-02-17 01:23:51 +0100 <Axman6> (it's actually not necessarilly clear, if a is some function type, but we'll ignore that)
2021-02-17 01:24:05 +0100 <edwardk> so yeah, in scheme you get the ()'s to act as a marker. (p) isn't p in general.
2021-02-17 01:24:14 +0100 <edwardk> in haskell nope
2021-02-17 01:24:17 +0100 <ski> > foldr1 (-) [1,2,3,4,5] :: Expr
2021-02-17 01:24:18 +0100 <lambdabot> 1 - (2 - (3 - (4 - 5)))
2021-02-17 01:24:20 +0100 <ski> > foldl1 (-) [1,2,3,4,5] :: Expr
2021-02-17 01:24:22 +0100 <lambdabot> 1 - 2 - 3 - 4 - 5
2021-02-17 01:24:39 +0100 <ski> (the latter means `(((1 - 2) - 3) - 4) - 5')
2021-02-17 01:25:21 +0100 <edwardk> this is one reason why haskell doesn't _directly_ offer you a way to deal with named arguments like many other languages do
2021-02-17 01:25:42 +0100 <edwardk> (yeah you can emulate them by making a record, using field accessors and passing the record as an argument)
2021-02-17 01:25:45 +0100 <ski> (OCaml does have named arguments, though)
2021-02-17 01:26:36 +0100lep_(~lep@94.31.101.183)
2021-02-17 01:27:22 +0100lep-delete(~lep@94.31.81.183) (Ping timeout: 265 seconds)
2021-02-17 01:27:26 +0100astronavt(~astronavt@unaffiliated/astronavt)
2021-02-17 01:27:26 +0100 <edwardk> the sketch of a problem here is that if i tried to call f (x=12) (y=23) -- it isn't clear if i should stop and call the thing now damnit, or if i should wait for more arguments for currying purposes.
2021-02-17 01:28:21 +0100 <ski> well, depends on whether there's more arguments, no ?
2021-02-17 01:28:46 +0100 <edwardk> most of the systems that offer named arguments also offer default arguments
2021-02-17 01:28:52 +0100lep_lep-delete
2021-02-17 01:29:10 +0100 <ski> yea .. different syntax for those, in OCaml, iirc
2021-02-17 01:29:11 +0100 <dolio> Agda has named arguments, too. :)
2021-02-17 01:29:14 +0100 <edwardk> its the defaulting bit that trips you up
2021-02-17 01:29:15 +0100 <dolio> But not defaults.
2021-02-17 01:29:24 +0100 <ski> yep :(
2021-02-17 01:29:27 +0100 <Axman6> Agda is also martian language
2021-02-17 01:29:49 +0100 <edwardk> Martin would not approve of that label
2021-02-17 01:30:14 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2021-02-17 01:30:39 +0100ski. o O ( Martin, or Martian ? )
2021-02-17 01:30:45 +0100PaperGamma(~PaperGamm@124.160.154.40)
2021-02-17 01:30:56 +0100PaperGamma(~PaperGamm@124.160.154.40) (Remote host closed the connection)
2021-02-17 01:30:56 +0100 <karasu1[m]> <edwardk "this is one reason why haskell d"> wait what do you mean? I can define `f :: Int -> Int -> Int ; f x y = x + y`, so x and y are named right?
2021-02-17 01:31:20 +0100 <ski> karasu1[m] : those are local to the definition. the call site knows nothing of `x' and `y'
2021-02-17 01:31:46 +0100 <Axman6> you can't do something like f{y = 7} 5
2021-02-17 01:31:46 +0100 <karasu1[m]> yea, but isn't that the case in all languages?
2021-02-17 01:31:51 +0100 <Axman6> no
2021-02-17 01:31:51 +0100 <ski> no
2021-02-17 01:31:53 +0100 <karasu1[m]> unless we have global variables going on
2021-02-17 01:32:03 +0100 <ski> that's something else entirely
2021-02-17 01:32:04 +0100 <karasu1[m]> which is usually bad style
2021-02-17 01:32:16 +0100 <Axman6> mant languages let you say f(y = 6, x = 4) and the order no longer matters
2021-02-17 01:32:28 +0100 <edwardk> martin escardo once objected when someone on the agda mailing list wanted to call something from brazil a 'brazilian functor' (i think), he was like "but I'm from Brazil and I'd never use that...", so then the response was a proposal was to rename them 'martian functors', and his reply was 'but my name is martin!'
2021-02-17 01:32:36 +0100 <edwardk> i apologize for mangling the anecdote
2021-02-17 01:32:53 +0100 <ski> oh, Martín
2021-02-17 01:33:13 +0100 <edwardk> yeah, as an american i had my ability to type accent marks removed at birth.
2021-02-17 01:33:49 +0100 <Boarders> I am trying to use Alex but getting an error of the form: "templates/GenericTemplate.hs:54:1: error:
2021-02-17 01:33:49 +0100 <Boarders> parse error (possibly incorrect indentation or mismatched brackets)"
2021-02-17 01:34:27 +0100 <Axman6> ads and/or delete random brackets until the error disappears!
2021-02-17 01:34:30 +0100 <Axman6> add*
2021-02-17 01:34:30 +0100 <Boarders> What does that mean?
2021-02-17 01:34:40 +0100sz0(uid110435@gateway/web/irccloud.com/x-weszrhezblvvfxue) (Quit: Connection closed for inactivity)
2021-02-17 01:34:47 +0100 <ephemient> karasu1[m]: Python as an example, def f(x, y): pass; f(y = 2, x = 1)
2021-02-17 01:34:51 +0100 <ski> perhaps it means the indentation is wrong ?
2021-02-17 01:34:54 +0100 <Axman6> it means the haskell isn't syntactically valid, you're probably missing a bracket somewhere
2021-02-17 01:34:58 +0100 <Boarders> my problem is it is talking about templates which is not part of my code
2021-02-17 01:34:59 +0100 <ski> is that generated code ? did you edit it ?
2021-02-17 01:35:08 +0100 <Boarders> I didn't edit it
2021-02-17 01:35:14 +0100lmw(1f1d2079@gateway/web/thelounge/ip.31.29.32.121)
2021-02-17 01:35:32 +0100 <Axman6> wihtout more information we're even more clusless than you
2021-02-17 01:35:34 +0100lmwhugs ski
2021-02-17 01:35:38 +0100 <edwardk> Boarders: alex doesn't give very good error messages. it generally means something is wrong with your code that it spliced into the template
2021-02-17 01:36:00 +0100 <edwardk> look very closely at the file you are feeding alex
2021-02-17 01:36:02 +0100 <karasu1[m]> <ephemient "karasu1: Python as an example, d"> I see.. So the reason this isn't allowed in Haskell is because it would mess up folding?
2021-02-17 01:36:05 +0100 <Boarders> thanks ekwardk! I just wanted to know if the problem is on my end or somethig weirder
2021-02-17 01:36:20 +0100 <edwardk> karasu1[m]: no, it messes up the fact that in haskell 'everything is a function of one argument'
2021-02-17 01:36:20 +0100 <Boarders> *
2021-02-17 01:36:26 +0100 <edwardk> :t (+)
2021-02-17 01:36:27 +0100 <lambdabot> Num a => a -> a -> a
2021-02-17 01:36:33 +0100 <edwardk> note that says a -> a -> a
2021-02-17 01:36:37 +0100 <edwardk> a -> (a -> a)
2021-02-17 01:36:48 +0100 <edwardk> it is a function that takes one argument and returns a function that takes another argument
2021-02-17 01:36:53 +0100 <Axman6> first thiwe teach when teaching Haskell is: _all_ functions take exactly one argument, there are no exceptions
2021-02-17 01:37:03 +0100 <Axman6> thing we*
2021-02-17 01:37:08 +0100 <edwardk> > let f = (+) 1 in f 2
2021-02-17 01:37:09 +0100 <lambdabot> 3
2021-02-17 01:37:14 +0100 <edwardk> > let f = (+) 1 in (f 2, f 4)
2021-02-17 01:37:16 +0100 <lambdabot> (3,5)
2021-02-17 01:37:30 +0100 <karasu1[m]> OK makes sense
2021-02-17 01:37:51 +0100 <karasu1[m]> I thought Scheme was curried
2021-02-17 01:37:54 +0100 <karasu1[m]> But I guess not
2021-02-17 01:37:57 +0100 <edwardk> in a scheme like language (+ 1) -- would just give back 1, and its not going to build a function that sticks around waiting for another
2021-02-17 01:38:04 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 01:38:06 +0100 <ephemient> :t (+ 1)
2021-02-17 01:38:07 +0100 <lambdabot> Num a => a -> a
2021-02-17 01:38:08 +0100 <edwardk> you can make a macro in scheme that gives you currying
2021-02-17 01:38:09 +0100 <Axman6> in many ways, Haskell is much _less_ magic than most languages. It is actually an extremely simple language, but can be used to make quite complex abstractions
2021-02-17 01:38:19 +0100 <lmw> :?
2021-02-17 01:38:21 +0100 <edwardk> e.g. http://comonad.com/reader/2009/curried-scheme/
2021-02-17 01:38:25 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 01:39:37 +0100 <Boarders> scheme functions have an 'arity kind' (including polymorphic arity) which prohibits any nice currying story
2021-02-17 01:39:46 +0100 <Boarders> Python has the same feature
2021-02-17 01:40:16 +0100m0rphism1(~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 240 seconds)
2021-02-17 01:40:19 +0100quinn(~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in)
2021-02-17 01:40:22 +0100 <ephemient> Haskell has a lot of syntactic sugar (relative to ML siblings, anyhow), which I think can get perceived as magic, but once you know what they desugar to it's all pretty mechanical
2021-02-17 01:41:40 +0100 <Axman6> yeah, the main magical things are numbers, list syntax, strings and possibly do notation, they seem to be the things which trip up newcomers the most very early on
2021-02-17 01:41:48 +0100 <karasu1[m]> Today I learned Haskell is a sibling of Machine Learning (this is a joke..)
2021-02-17 01:42:21 +0100skihugs lmw back
2021-02-17 01:43:05 +0100 <karasu1[m]> thanks for the help everyone.
2021-02-17 01:43:15 +0100vqrs(~vqrs@learnprogramming/regular/vqrs) (Ping timeout: 272 seconds)
2021-02-17 01:43:44 +0100 <ski> karasu1[m] : "I thought Scheme was curried" -- neither Scheme nor Haskell "are curried" .. nor are they "not curried". currying is not a property of a language, it's a programmer convention, it's all in your head
2021-02-17 01:44:50 +0100 <karasu1[m]> ? But it's the way Haskell works though right? There can't be any other programming convention in Haskell, since every function will only ever take one argument right
2021-02-17 01:44:51 +0100Tesseraction(~Tesseract@unaffiliated/tesseraction) (Read error: Connection reset by peer)
2021-02-17 01:45:04 +0100 <ski> no, that's a misconception
2021-02-17 01:45:16 +0100 <ski> it's not "the way Haskell works"
2021-02-17 01:45:22 +0100Tesseraction(~Tesseract@unaffiliated/tesseraction)
2021-02-17 01:46:03 +0100 <ski> currying is a particular way in which you can represent/encode "multiparameter functions" .. e.g. in a language (like Haskell), which lacks the latter
2021-02-17 01:46:13 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 01:46:57 +0100 <karasu1[m]> But this convention is enforced in Haskell, since it can't have "multiparameter functions", is that correct?
2021-02-17 01:47:03 +0100 <ski> or, rather, "curried style" is that particular way. "currying" refers to converting to curried style (e.g. from "tupled style", which is *another* way to represent multiparameter functions)
2021-02-17 01:47:07 +0100 <ski> no, it's not enforced
2021-02-17 01:47:08 +0100 <karasu1[m]> Since it "lacks" them, as you said
2021-02-17 01:47:11 +0100 <karasu1[m]> ??
2021-02-17 01:47:13 +0100 <ski> you can write
2021-02-17 01:47:25 +0100 <ski> sumOfSquares (x,y) = x^2 + y^2
2021-02-17 01:47:27 +0100 <ski> if you want to
2021-02-17 01:47:35 +0100kw(d4662d5d@212.102.45.93)
2021-02-17 01:47:40 +0100 <ski> it's just that it's more idiomatic, more according to community conventions, to instead write
2021-02-17 01:47:44 +0100 <ski> sumOfSquares x y = x^2 + y^2
2021-02-17 01:47:46 +0100 <monochrom> No, all conventions are enforced by community not language. Including the currying convention.
2021-02-17 01:48:10 +0100quinn(~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
2021-02-17 01:48:13 +0100 <lmw> I have first read muhroom instead of monochrom ...
2021-02-17 01:48:17 +0100 <monochrom> Since Haskell has a generous supply of tuple types, nothing stops you from "f :: (Int, Int, Int) -> Double". Only peer pressure does.
2021-02-17 01:48:18 +0100 <ski> (the language does make it syntactically easier to use curried style, though)
2021-02-17 01:49:17 +0100 <liyang> We used to have SyntaxPolice here but not anymore it seems, so you can write whatever the f you like now. \^_^/
2021-02-17 01:49:18 +0100 <ski> `sumOfSquares (x,y) = x^2 + y^2' would be "tupled style", while `sumOfSquares x y = x^2 + y^2' would be "curried style". both are ways to encode multiparameter functions
2021-02-17 01:49:34 +0100skiidly recalls SyntaxNinja
2021-02-17 01:49:37 +0100 <Axman6> most languages which require all arguments to be passed at the same time have an optimisation which means they don't need to pass in a tuple though :)
2021-02-17 01:49:45 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-02-17 01:49:49 +0100 <monochrom> And even if you raise the doesn't-matter-really technical point that (Int,Int,Int)->Foo is less efficient than currying, GHC has a generous supply of (# Int, Int, Int #) to restore efficiency. Problem solved.
2021-02-17 01:50:13 +0100 <lmw> Reminds of guys who say "ip classes doesnt exist anymore, use cidr!"
2021-02-17 01:50:16 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
2021-02-17 01:50:17 +0100 <liyang> Wrong kind. Needs more MagicHash.
2021-02-17 01:50:21 +0100vqrs(~vqrs@learnprogramming/regular/vqrs)
2021-02-17 01:50:42 +0100conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-02-17 01:50:50 +0100 <dolio> It's not going to be less efficient unless you write something pretty weird.
2021-02-17 01:51:02 +0100 <ephemient> (# Int#, Int#, Int# #) {- enough MagicHash now? -}
2021-02-17 01:51:04 +0100 <monochrom> Wait really? Can't I have an unboxed tuple of pointers?
2021-02-17 01:51:07 +0100 <ski> Axman6 : in most such languages, either there's no way, or no easy and nice way, to pass, and receive, such a tuple (or "argument list" as it's also called) as a first-class object
2021-02-17 01:51:48 +0100conal(~conal@64.71.133.70)
2021-02-17 01:52:00 +0100 <dolio> (# Int, Int, Int #) is fine.
2021-02-17 01:52:03 +0100 <ephemient> but yeah, I thought unboxed tuples of heap values were allowed...
2021-02-17 01:52:10 +0100 <karasu1[m]> In python I think that would work, (x, y) would just be a tuple as well
2021-02-17 01:52:21 +0100 <karasu1[m]> C++ would be a different story
2021-02-17 01:52:35 +0100 <karasu1[m]> Something like make_pair(x, y) would be needed
2021-02-17 01:52:52 +0100 <liyang> Oh, I thought you could only have unboxed tuples of unboxed things. Shows you how often I write _that_ kind of code.
2021-02-17 01:52:58 +0100 <ski> % :type (# Just EQ , False #)
2021-02-17 01:52:58 +0100 <yahb> ski: (# Maybe Ordering, Bool #)
2021-02-17 01:53:07 +0100 <monochrom> Anyway Scheme is very different from Haskell and vice versa. Please lower your expectation. Hell please assume nothing.
2021-02-17 01:53:09 +0100 <ephemient> Python: () is a tuple, (x, y) is a tuple, (x) is not. because reasons
2021-02-17 01:53:13 +0100 <karasu1[m]> wait what are those hashtags at the ends?
2021-02-17 01:53:34 +0100 <monochrom> On many aspects Scheme is the antipodal antithetical opposite of Haskell.
2021-02-17 01:53:47 +0100 <ephemient> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/magic_hash.html
2021-02-17 01:54:07 +0100 <ephemient> also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/primitives.html#unboxed-tuples
2021-02-17 01:54:13 +0100 <ephemient> but don't worry about those
2021-02-17 01:54:22 +0100 <monochrom> And if you say "but both are functional..." ...
2021-02-17 01:54:44 +0100 <Axman6> karasu1[m]: magic, literally :)
2021-02-17 01:54:46 +0100 <monochrom> Observe how left-wing people and right-wing people are at each other's throats but both count as politics.
2021-02-17 01:54:46 +0100 <ephemient> now {-# pragmas #-} are something you will want to know about
2021-02-17 01:55:00 +0100 <ephemient> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/pragmas.html
2021-02-17 01:55:53 +0100pengjiz(~user@cmu-secure-128-237-82-2.nat.cmu.net) (Quit: ERC (IRC client for Emacs 27.1))
2021-02-17 01:55:59 +0100 <ephemient> e.g. to turn on the MagicHash language extension, put {-# LANGUAGE MagicHash #-} at the top of the source file, etc.
2021-02-17 01:57:20 +0100 <ski> % :type (# (##) #) -- unboxed unituple (containing unboxed empty tuple)
2021-02-17 01:57:20 +0100 <yahb> ski: (# (# #) #)
2021-02-17 01:57:28 +0100 <monochrom> (# Int, Int, Int #) is syntax for low-level code. It means "don't create tuple on the heap, just scatter the fields over registers and/or stack local vars"
2021-02-17 01:58:15 +0100 <lmw> weird language..
2021-02-17 01:59:35 +0100 <ephemient> well that's how multiple arguments or return values work in most other languages that compile to machine code (with a notable exception of Go whose ABI calling convention always spills on the stack. although I think they're changing it...)
2021-02-17 02:00:39 +0100pagnol(~user@n112120223083.netvigator.com)
2021-02-17 02:00:54 +0100 <ephemient> in GHC, the optimizer may do that anyway, (# #) just makes sure of it in specific cases where you can't leave it up to that
2021-02-17 02:01:02 +0100viluon(uid453725@gateway/web/irccloud.com/x-wptflvzisznxlukx) (Quit: Connection closed for inactivity)
2021-02-17 02:02:04 +0100 <monochrom> Yes.
2021-02-17 02:04:11 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.0)
2021-02-17 02:05:06 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-02-17 02:06:02 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 265 seconds)
2021-02-17 02:08:03 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
2021-02-17 02:11:42 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2021-02-17 02:12:11 +0100aliuser(~aliuser@161.8.19.35)
2021-02-17 02:12:14 +0100 <aliuser> Don't miss Energy Lab!
2021-02-17 02:12:14 +0100 <aliuser> Play to get items for only US $0.01!
2021-02-17 02:12:14 +0100 <aliuser> https://a.aliexpress.com/_mMrefHt
2021-02-17 02:12:25 +0100aliuser(~aliuser@161.8.19.35) (K-Lined)
2021-02-17 02:12:38 +0100 <karasu1[m]> So the normal `Map` seems to be part of `Data.Map.Internal`, which seems to be separate from both `Data.Map.Lazy` and `Data.Map.Strict`. I think it was said that the default `Map` that you get from `Data.Map` is the same as `Data.Map.Lazy`, but is there somewhere in the documentation where this is stated?
2021-02-17 02:12:51 +0100 <karasu1[m]> https://hackage.haskell.org/package/containers-0.6.4.1/docs/Data-Map-Internal.html#t:Map
2021-02-17 02:13:00 +0100 <karasu1[m]> This doesn't mention that the values are lazily evaluated
2021-02-17 02:14:18 +0100 <hololeap> Data.Map shows that it imports from Data.Map.Lazy
2021-02-17 02:14:30 +0100 <hololeap> https://hackage.haskell.org/package/containers-0.6.4.1/docs/Data-Map.html
2021-02-17 02:14:35 +0100 <hololeap> "module Data.Map.Lazy"
2021-02-17 02:14:56 +0100 <ski> "The functions in \"Data.Map.Strict\" are careful to force values before installing them in a 'Map'. This is usually more efficient in cases where laziness is not essential. The functions in this module do not do so."
2021-02-17 02:15:02 +0100 <ski> from <https://hackage.haskell.org/package/containers-0.6.4.1/docs/src/Data.Map.Lazy.html>
2021-02-17 02:15:02 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 02:15:10 +0100 <monochrom> There is only one Map type. The difference introduced by Data.Map.Strict is function behaviour, not a different type.
2021-02-17 02:15:41 +0100 <hololeap> i don't think i've ever come across a situation where the laziness was essential
2021-02-17 02:15:45 +0100 <ski> (at the bottom, it says `import Data.Map.Internal')
2021-02-17 02:17:27 +0100 <karasu1[m]> What is the meaning of `import Data.Map.Internal` at the bottom? Does it use parts of `Data.Map.Internal`?
2021-02-17 02:17:44 +0100 <karasu1[m]> Usually imports are at the top, right?
2021-02-17 02:18:08 +0100 <monochrom> doc order does not have to preserve code order, right? RIGHT?
2021-02-17 02:18:08 +0100 <karasu1[m]> oh wait I have no idea what's going on
2021-02-17 02:18:27 +0100 <monochrom> especially s/doc/generated html/
2021-02-17 02:18:37 +0100 <ski> karasu1[m] : it reexports operations (and types) that it imports from `Data.Map.Internal'
2021-02-17 02:18:53 +0100Matthias1(~matthias@li890-22.members.linode.com)
2021-02-17 02:19:00 +0100 <ski> (among them, the `Map' type)
2021-02-17 02:19:01 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2021-02-17 02:19:52 +0100 <ski> karasu1[m] : "Usually imports are at the top, right?" -- they come after the `module' declaration (if any). then comes the definitions in the module. in this case, there are no definitions in the module, though
2021-02-17 02:20:17 +0100 <karasu1[m]> right, I realized after
2021-02-17 02:20:21 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
2021-02-17 02:20:27 +0100 <ski> (technically, both imports and definitions are part of the module declaration)
2021-02-17 02:20:30 +0100 <karasu1[m]> So what's happening is that all the definitions are actually in Data.Map.Internal
2021-02-17 02:20:34 +0100 <ski> yes
2021-02-17 02:20:55 +0100 <karasu1[m]> And then Data.Map.Lazy just imports those things, and exports them again..
2021-02-17 02:20:59 +0100 <karasu1[m]> OK
2021-02-17 02:22:32 +0100karasu1[m]uploaded an image: image.png (328KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/tqCXmlZoXFbPmIZiiAVEHvzz/image.png >
2021-02-17 02:22:41 +0100 <karasu1[m]> What does `module Data.Map.Lazy` mean at the bottom?
2021-02-17 02:22:50 +0100 <karasu1[m]> Just that they are "module synonyms"?
2021-02-17 02:23:24 +0100 <ephemient> Data.Map documents what it exports. part of what it exports (in fact, pretty much the only export) is the Data.Map.Lazy module
2021-02-17 02:23:27 +0100 <Axman6> man I wish Matrix wasn't so annoying
2021-02-17 02:23:51 +0100 <ephemient> Matrix isn't terrible, but it gives no indication about how terrible its IRC interop is
2021-02-17 02:24:15 +0100 <Axman6> essentially Data.Map is an alias for Data.Map.Lazy - it imports Data.Map.Lazy, and then reexoports the whole module, and nothing more
2021-02-17 02:24:24 +0100 <Axman6> yeah
2021-02-17 02:24:25 +0100 <ski> karasu1[m] : it means that `Data.Map' reexports everything that it imports from `Data.Map.Lazy' (see the export list at <https://hackage.haskell.org/package/containers-0.6.4.1/docs/src/Data.Map.html>, it mentions `module Data.Map.Lazy')
2021-02-17 02:25:04 +0100 <ephemient> the source looks like this: ```module Data.Map (module Data.Map.Lazy) where { import Data.Map.Lazy }```
2021-02-17 02:25:05 +0100 <Axman6> I like the idea of matrix, but am also happy just using IRC. I would love if glirc supported matrix though *cough*glguy*cough*
2021-02-17 02:25:51 +0100 <karasu1[m]> Is viewing images difficult in Freenode? Sorry about that
2021-02-17 02:26:12 +0100 <glguy> I dislike matrix too much to try and support anything about it
2021-02-17 02:26:45 +0100 <karasu1[m]> I'm very new to all this but someone said matrix preserved chat history so I've been using it ever since..
2021-02-17 02:26:45 +0100 <Axman6> basically any feature of matrix that isn't sending a text mmessage is a pain in the bum for IRC users. replying to messages looks super weird, and editing messages is amazingly annoying
2021-02-17 02:27:16 +0100 <ephemient> don't multiline or extra-long messages, don't attachments, don't edit
2021-02-17 02:27:28 +0100skilikes the feature of IRC clients of (generally) not displaying images inline ..
2021-02-17 02:27:33 +0100 <ephemient> (and especially not in combination)
2021-02-17 02:27:55 +0100 <Axman6> we get things like: "11:36 karasu1[m]: <ephemient "karasu1: Python as an example, d"> I see.. So the reason this isn't allowed in Haskell because it would mess up folding? "
2021-02-17 02:27:57 +0100 <ephemient> also quote-reply doesn't really work, but that's more tolerable
2021-02-17 02:28:29 +0100 <Axman6> all these new hipster features of chat clients
2021-02-17 02:29:41 +0100 <karasu1[m]> I can also react emojis to messages apparently
2021-02-17 02:29:55 +0100Deide(~Deide@217.155.19.23) (Quit: Seeee yaaaa)
2021-02-17 02:30:10 +0100 <Axman6> If you just tried it, I saw nothing
2021-02-17 02:30:33 +0100 <ski> (please refrain from doing so)
2021-02-17 02:30:47 +0100 <karasu1[m]> (I would send you a picture of what it looks like for me but that would entail attaching things...)
2021-02-17 02:31:01 +0100 <karasu1[m]> OK, I will refrain from matrix things
2021-02-17 02:31:11 +0100 <hololeap> irc is like a 40-year-old protocol, isn' it? trying to shove all these new features into that is going to be ugly
2021-02-17 02:31:15 +0100 <Axman6> images are probably the least annoying thing, since it just sends a message with a link to the image
2021-02-17 02:31:39 +0100 <ski> yea, it would be more annoying if it displayed the image
2021-02-17 02:31:43 +0100 <Axman6> 12:22 * karasu1[m] uploaded an image: image.png (328KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/tqCXmlZoXFbPmIZiiAVEHvzz/image.png >
2021-02-17 02:32:02 +0100 <Axman6> if I were using iTerm it would be possible to display the image inline...
2021-02-17 02:32:21 +0100 <hololeap> i guess it's 30 years old
2021-02-17 02:32:42 +0100 <Axman6> I can't imagine how much that would mess up glirc's display if it tried to do it though... (glguy please don't do this)
2021-02-17 02:33:01 +0100 <karasu1[m]> Are images ok then?
2021-02-17 02:33:04 +0100 <ski> karasu1[m] : anyway, it's mostly a minor annoyance,
2021-02-17 02:33:12 +0100 <karasu1[m]> okie
2021-02-17 02:33:14 +0100 <ski> if it'
2021-02-17 02:33:40 +0100 <ski> if it's just text, it's more polite to link to a paste with the text, rather than to a screenshot image of the text
2021-02-17 02:34:00 +0100 <ski> (e.g. we can't copy code out of an image to try it ourselves)
2021-02-17 02:34:03 +0100rajivr(uid269651@gateway/web/irccloud.com/x-rpaywpmedacdhsxn)
2021-02-17 02:34:39 +0100 <ski> (in your case, you were asking about how a particular web page looked to you, though)
2021-02-17 02:35:08 +0100 <karasu1[m]> yeah, makes sense. i will try to be a better denizen of the free software world
2021-02-17 02:35:10 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 02:35:50 +0100alx741(~alx741@186.178.109.49)
2021-02-17 02:38:41 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
2021-02-17 02:38:50 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 02:38:54 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 260 seconds)
2021-02-17 02:43:25 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 02:45:51 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
2021-02-17 02:46:30 +0100mizu_no_oto(~textual@cpe-66-66-222-11.rochester.res.rr.com)
2021-02-17 02:46:56 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905) (Remote host closed the connection)
2021-02-17 02:53:38 +0100kum0(~kumo@139.180.144.166)
2021-02-17 02:54:05 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
2021-02-17 02:55:05 +0100 <Axman6> karasu1[m]: do you have a better understanding of the difference between Data.Map.(Lazy|Strict) now?
2021-02-17 02:55:46 +0100 <karasu1[m]> Axman6: yes, I think so
2021-02-17 02:56:00 +0100 <Axman6> laziness is a tricky topic, so make sure you ask more questions
2021-02-17 02:56:25 +0100 <karasu1[m]> I am familiar with laziness, I do it everyday
2021-02-17 02:56:40 +0100 <karasu1[m]> But yes I will ask more questions lol, thanks!
2021-02-17 02:56:57 +0100 <Axman6> but what about guiltfree laziness?
2021-02-17 02:58:58 +0100 <karasu1[m]> That is something I will try to do everyday from now on
2021-02-17 03:00:15 +0100mirrorbird(~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f) (Quit: Leaving)
2021-02-17 03:01:28 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905)
2021-02-17 03:02:35 +0100elliott_(~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 265 seconds)
2021-02-17 03:05:43 +0100 <Axman6> random thoughts on TDD and Haskell; if using TDD wehen writing Haskell, you aim should be to a) when a bug is found, write s test which shows the presence of the bug then b) to fix the code in a way that writing that bug becomes impossible and to delete the test, not to keep the test around so demonstrate the absence of the bug
2021-02-17 03:05:58 +0100elliott_(~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 03:07:16 +0100lmw(1f1d2079@gateway/web/thelounge/ip.31.29.32.121) (Quit: The Lounge - https://thelounge.chat)
2021-02-17 03:09:26 +0100thc202(~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-02-17 03:09:34 +0100 <Axman6> I've always felt uneasy about TDD, it seems to lead to a false sense of security and tends to make code reach a point where refactoring becomes difficult sooner, because the tests also need substantial refactoring at the same time
2021-02-17 03:10:10 +0100lep_(~lep@94.31.86.183)
2021-02-17 03:10:19 +0100 <glguy> I think in the languages where it's the most popular refactoring is already impossible, so that's not a big loss
2021-02-17 03:10:30 +0100 <Axman6> this is true
2021-02-17 03:11:16 +0100 <Axman6> I went to an uncle Bob talk a few years ago, where he was trying to push some developer pledge or something which included always using TDD. my first thought was "But what about types?"
2021-02-17 03:12:02 +0100lep-delete(~lep@94.31.101.183) (Ping timeout: 272 seconds)
2021-02-17 03:12:28 +0100lep_lep-delete
2021-02-17 03:15:09 +0100cocytus(~cocytus@cpe-76-95-48-109.socal.res.rr.com) (Ping timeout: 265 seconds)
2021-02-17 03:15:38 +0100xff0x(~xff0x@2001:1a81:5376:4800:e291:4b9:510e:7433) (Ping timeout: 264 seconds)
2021-02-17 03:16:09 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-02-17 03:17:00 +0100jlamothe_(~jlamothe@198.251.55.207) (Ping timeout: 246 seconds)
2021-02-17 03:17:07 +0100xff0x(~xff0x@2001:1a81:53b4:e300:4f5:8344:c7ce:bd4a)
2021-02-17 03:17:37 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2021-02-17 03:17:39 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 03:22:51 +0100slack1256(~slack1256@45.4.2.52)
2021-02-17 03:24:37 +0100kw(d4662d5d@212.102.45.93) (Quit: Connection closed)
2021-02-17 03:25:44 +0100refusenick(~user@2601:644:8502:d700::eeeb)
2021-02-17 03:26:57 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 264 seconds)
2021-02-17 03:28:42 +0100cocytus(~cocytus@cpe-76-95-48-109.socal.res.rr.com)
2021-02-17 03:29:45 +0100 <refusenick> What would be an example of a language whose type system forms a lattice where the infimum is not Bottom?
2021-02-17 03:32:09 +0100Lord_of_Life_(~Lord@unaffiliated/lord-of-life/x-0885362)
2021-02-17 03:32:17 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-02-17 03:32:42 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 03:32:58 +0100travisb_tabemann
2021-02-17 03:33:50 +0100Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds)
2021-02-17 03:33:51 +0100Lord_of_Life_Lord_of_Life
2021-02-17 03:34:08 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 03:34:10 +0100 <ski> what do you mean by `Bottom' ?
2021-02-17 03:34:48 +0100 <refusenick> like in Haskell
2021-02-17 03:35:02 +0100 <refusenick> (the type which can't have any values)
2021-02-17 03:35:04 +0100 <Axman6> (_|_)
2021-02-17 03:35:09 +0100 <refusenick> yeah
2021-02-17 03:35:18 +0100 <ski> the type, or the value ?
2021-02-17 03:35:27 +0100 <refusenick> the type, I think
2021-02-17 03:35:31 +0100 <ski> `_|_' usually refers to a value
2021-02-17 03:35:37 +0100 <ski> an empty type ?
2021-02-17 03:35:41 +0100 <refusenick> yeah
2021-02-17 03:35:50 +0100 <shapr> Where would I read up on making Control.Parallel code go faster?
2021-02-17 03:35:52 +0100 <Axman6> (That was the first result for "bottom emoticon" on google btw, thought it was incredibly apt)
2021-02-17 03:35:52 +0100 <refusenick> a type which subtypes all other types
2021-02-17 03:36:25 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19) (Ping timeout: 265 seconds)
2021-02-17 03:36:28 +0100 <ski> i guess if you have a language with subtyping, in which all types share some value (`null' ?)
2021-02-17 03:36:31 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 03:36:45 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 03:37:31 +0100 <refusenick> I think I read that anything in Haskell can evaluate to _|_, as a kind of escape hatch to make the logic work out?
2021-02-17 03:37:59 +0100 <refusenick> I'm not sure I totally understand, but I've seen it be said "don't (ab)use that" (paraphrasing, obv)
2021-02-17 03:38:04 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 03:38:25 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 03:38:54 +0100airspace_(~airspace@90.218.153.39)
2021-02-17 03:38:57 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 264 seconds)
2021-02-17 03:39:08 +0100 <Axman6> :t error "I am EVERYTHING"
2021-02-17 03:39:09 +0100 <lambdabot> a
2021-02-17 03:39:54 +0100cig_in_mouth(cig_in_mou@gateway/vpn/mullvad/ciginmouth/x-85815230) (Quit: Textual IRC Client: www.textualapp.com)
2021-02-17 03:40:11 +0100 <swarmcollective> IMHO, TDD can be useful in cases where you plan to write the code to some specification, then only touch it to fix bugs. If a major change comes along, you kind of have to start over with a new version. Microservices can be handled this way; new version for any breaking change (where versions run in parallel for a period of time). Open only for extension, not modification.
2021-02-17 03:41:03 +0100cig_in_mouth(cig_in_mou@gateway/vpn/mullvad/ciginmouth/x-85815230)
2021-02-17 03:41:11 +0100 <swarmcollective> I've not found TDD to be helpful when writing Haskell. DocTests, on the other hand, have been useful for providing examples in the documentation. The fact that they can be validated helps to keep them up-to-date?!
2021-02-17 03:41:39 +0100 <Axman6> yeah, I should use more doctests
2021-02-17 03:42:06 +0100 <shapr> On this channel, I can never tell if TDD is "test driven development" or "TYPE driven development".
2021-02-17 03:42:16 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 03:42:38 +0100 <swarmcollective> Ah, well, yes, Type Driven Development = Helpful! :)
2021-02-17 03:43:09 +0100 <Axman6> I'm all for type defiven development
2021-02-17 03:43:18 +0100 <Axman6> driven*
2021-02-17 03:43:41 +0100 <Axman6> Pushing as much code into types so the compiler can write the actual code for me is a lot of fun
2021-02-17 03:44:54 +0100 <swarmcollective> TBH, I'm not quite there yet, but I do appreciate that the compiler will tell me "Nope, you are trying to do something stupid." and I have to fix it before I can move forward.
2021-02-17 03:45:26 +0100 <Axman6> I was playing with something at work the other day where we're dealing with types which are isomorphic to certain XML dopcuments, and we often need both lenses into nested fields in those documents, and the XML path to those same fields, so I came up with something which could describe the path and types and have the compiler generate the code for both for me
2021-02-17 03:46:13 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 03:46:29 +0100 <shapr> Lemme guess, the smart way to tune my Control.Parallel code is to break out threadscope like the book says?
2021-02-17 03:46:43 +0100 <Axman6> Ideally it would look like: Path '["Document","Header","DateTime"] SomeRequest LocalTime, and give me both a Lens' SomeRequest LocalTime and a Text with "/Document/Header/DateTime"
2021-02-17 03:46:56 +0100cig_in_mouth(cig_in_mou@gateway/vpn/mullvad/ciginmouth/x-85815230) (Quit: WeeChat 3.0.1)
2021-02-17 03:47:05 +0100cig_in_mouth(cig_in_mou@gateway/vpn/mullvad/ciginmouth/x-85815230)
2021-02-17 03:47:23 +0100cig_in_mouth(cig_in_mou@gateway/vpn/mullvad/ciginmouth/x-85815230) (Client Quit)
2021-02-17 03:48:28 +0100 <Axman6> making use of HasField "document" SomeRequest Header means all the types can be inferred, makig error messages really nice
2021-02-17 03:49:14 +0100borne(~fritjof@200116b864444400d8bba186ea6b909e.dip.versatel-1u1.de) (Ping timeout: 264 seconds)
2021-02-17 03:52:05 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 03:53:03 +0100yahb(xsbot@haskell/bot/yahb) (Ping timeout: 256 seconds)
2021-02-17 03:53:15 +0100urodna(~urodna@unaffiliated/urodna) (Quit: urodna)
2021-02-17 03:54:20 +0100mizu_no_oto(~textual@cpe-66-66-222-11.rochester.res.rr.com) (Quit: Computer has gone to sleep.)
2021-02-17 03:54:47 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 265 seconds)
2021-02-17 03:56:42 +0100 <pagnol> Does anyone here happen to be familiar with the xstate NPM package? It's a library with associated tooling around defining state machines. I'm curious what something like this would look like in the context of a pure functional language.
2021-02-17 03:58:14 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19)
2021-02-17 03:58:41 +0100yahb(xsbot@haskell/bot/yahb)
2021-02-17 04:03:22 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 04:04:32 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 04:06:53 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 04:10:46 +0100 <karasu1[m]> I'm having trouble figuring out the best way to "append" two tuples. I have a function `h` that calls 2 functions, f and g. f returns a tuple of type (String, Int). g returns an Integer. I want the return value of `h` to be append results of f and g so I end up getting `(String, Int, Integer)` as my end result..
2021-02-17 04:10:51 +0100 <karasu1[m]> How would one do this?
2021-02-17 04:11:04 +0100[itchyjunk](~itchyjunk@unaffiliated/itchyjunk/x-1640057) ("Leaving")
2021-02-17 04:11:37 +0100 <koz_> karasu1[m]: The best thing you can do is write a function like 'foo :: (a, b) -> c -> (a, b, c)' and use that.
2021-02-17 04:11:57 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
2021-02-17 04:12:02 +0100 <koz_> Or just do the equivalent inline with whatever else you were doing.
2021-02-17 04:12:08 +0100 <koz_> pagnol: I don't see how it would be different?
2021-02-17 04:12:12 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19) (Ping timeout: 272 seconds)
2021-02-17 04:12:22 +0100 <koz_> Like, you just have an eDSL to spell out your FSM then some kind of 'compile and run this' thing.
2021-02-17 04:14:34 +0100jdwidari(~jdwidari@173.38.117.75) (Ping timeout: 260 seconds)
2021-02-17 04:16:08 +0100alx741(~alx741@186.178.109.49) (Quit: alx741)
2021-02-17 04:16:30 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 04:20:05 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-02-17 04:20:40 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 04:20:58 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 04:21:03 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 04:21:39 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19)
2021-02-17 04:21:57 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 04:22:18 +0100jlamothe(~jlamothe@198.251.55.207)
2021-02-17 04:23:29 +0100loller_(uid358106@gateway/web/irccloud.com/x-thbrxkemfqgbwuky)
2021-02-17 04:23:48 +0100Sheilong(uid293653@gateway/web/irccloud.com/x-wsxjljkamhkjndqg) ()
2021-02-17 04:25:29 +0100giogiogio(5e89ad7c@94.137.173.124)
2021-02-17 04:26:36 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 04:27:12 +0100FinnElija(~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-02-17 04:27:12 +0100finn_elijaGuest89560
2021-02-17 04:27:12 +0100FinnElijafinn_elija
2021-02-17 04:30:59 +0100Guest89560(~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds)
2021-02-17 04:34:12 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 04:34:42 +0100shailangsa(~shailangs@host86-185-58-207.range86-185.btcentralplus.com) (Ping timeout: 246 seconds)
2021-02-17 04:38:05 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 04:38:15 +0100Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-02-17 04:38:27 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 04:38:29 +0100Tario(~Tario@201.192.165.173)
2021-02-17 04:38:38 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 04:39:15 +0100DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2021-02-17 04:40:03 +0100Saukk(~Saukk@83-148-239-3.dynamic.lounea.fi)
2021-02-17 04:40:18 +0100Jd007(~Jd007@162.156.11.151) (Quit: Jd007)
2021-02-17 04:42:55 +0100theDon(~td@94.134.91.14) (Ping timeout: 256 seconds)
2021-02-17 04:43:36 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 04:44:28 +0100theDon(~td@94.134.91.226)
2021-02-17 04:54:19 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 04:55:25 +0100 <shapr> I made a fun thing this evening! https://github.com/shapr/takedouble
2021-02-17 04:55:43 +0100 <shapr> I grabbed an existing duplicate file finder off the internet and slapped Control.Parallel on top
2021-02-17 04:58:28 +0100 <giogiogio> shapr: hi
2021-02-17 04:59:39 +0100thunderrd(~thunderrd@183.182.113.172) (Remote host closed the connection)
2021-02-17 05:01:54 +0100thunderrd(~thunderrd@183.182.113.172)
2021-02-17 05:02:34 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-02-17 05:02:58 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-02-17 05:03:14 +0100Shailangsa_(~shailangs@host86-186-191-40.range86-186.btcentralplus.com)
2021-02-17 05:04:31 +0100 <karasu1[m]> Thanks koz_
2021-02-17 05:05:09 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 05:06:17 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 05:06:35 +0100jollygood2(~bc8134e3@217.29.117.252) (Quit: http://www.okay.uz/ (EOF))
2021-02-17 05:07:07 +0100ubert(~Thunderbi@p200300ecdf25d974e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-02-17 05:07:38 +0100ubert(~Thunderbi@p200300ecdf25d969e6b318fffe838f33.dip0.t-ipconnect.de)
2021-02-17 05:08:09 +0100 <karasu1[m]> For Haskell, what is the best way to debug a function in a module? I have a function in module.hs, and inside a `where` for that function, I have defined a value called `x` that is computed by calling another function.
2021-02-17 05:08:16 +0100 <karasu1[m]> But, I am not sure if the function is producing the correct `x` value. Normally I would just print out what the value of `x` is at the point that it is computed to see for myself, but I would have to define a main in Haskell to do that right?
2021-02-17 05:08:36 +0100 <karasu1[m]> But should I put a `main` in the module just for now and delete it later?
2021-02-17 05:09:54 +0100 <glguy> karasu1[m], rather than making a new main for quickly testing something in a module it can be nice to open the module in ghci to experiment with it
2021-02-17 05:10:39 +0100 <Axman6> yeah ghci is definitely the first step
2021-02-17 05:10:58 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 05:11:02 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 05:12:24 +0100 <karasu1[m]> Hmm, load up ghci and then doing `:l Module.hs`?
2021-02-17 05:12:32 +0100 <Axman6> yeah
2021-02-17 05:12:34 +0100 <glguy> cabal repl
2021-02-17 05:12:36 +0100 <karasu1[m]> and then calling that function so that the return value is printed right?
2021-02-17 05:12:36 +0100 <glguy> to open your project
2021-02-17 05:12:37 +0100 <karasu1[m]> I see
2021-02-17 05:12:37 +0100 <Axman6> or just ghci Module.hs
2021-02-17 05:12:39 +0100 <glguy> and then you can :m Module
2021-02-17 05:13:50 +0100 <karasu1[m]> What does the `:m` do?
2021-02-17 05:14:45 +0100 <glguy> Tells GHCi to switch which modules are currently in scope
2021-02-17 05:14:48 +0100 <Axman6> loads a module, can be used to load modules from libraries or your project
2021-02-17 05:15:01 +0100 <glguy> :load goes a step further and actually loads files from disk
2021-02-17 05:15:24 +0100boxscape(4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
2021-02-17 05:16:50 +0100 <giogiogio> Axman6: hi
2021-02-17 05:17:00 +0100 <Axman6> Helo giogiogio
2021-02-17 05:17:04 +0100 <Axman6> Hello too
2021-02-17 05:17:13 +0100 <giogiogio> may I pm for a second?
2021-02-17 05:17:59 +0100 <Axman6> IS there a good reason why you can't ask your question here? is it Haskell related?
2021-02-17 05:18:10 +0100 <giogiogio> somehow...
2021-02-17 05:18:20 +0100 <giogiogio> it is not related to haskell
2021-02-17 05:18:39 +0100rdivyanshu(uid322626@gateway/web/irccloud.com/x-nffqoepzevgmqfup)
2021-02-17 05:18:46 +0100 <Axman6> what's it about?
2021-02-17 05:18:58 +0100 <giogiogio> i can tell in pm... if possible
2021-02-17 05:19:08 +0100 <Axman6> ok, go ahead
2021-02-17 05:20:13 +0100 <giogiogio> seems, I am unable to send pm
2021-02-17 05:20:25 +0100 <giogiogio> getting error message
2021-02-17 05:21:06 +0100 <Axman6> is your nick registered?
2021-02-17 05:21:08 +0100 <giogiogio> it asks to register nick
2021-02-17 05:21:11 +0100 <giogiogio> no
2021-02-17 05:21:26 +0100 <Axman6> you should register your nick, try /msg nickserv help
2021-02-17 05:21:51 +0100 <giogiogio>  /msg nickserv register
2021-02-17 05:22:04 +0100 <giogiogio>  /nickserv register
2021-02-17 05:22:06 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 05:22:16 +0100 <Axman6> stop putting spaces at the beginning :)
2021-02-17 05:22:19 +0100 <giogiogio> :)
2021-02-17 05:23:45 +0100 <giogiogio>  /msg NickServ VERIFY REGISTER giogiogio uonabzyeijam
2021-02-17 05:23:50 +0100 <Axman6> -_-
2021-02-17 05:23:53 +0100 <giogiogio>  /NickServ VERIFY REGISTER giogiogio uonabzyeijam
2021-02-17 05:24:01 +0100 <Axman6> I hope you don't use that password for anything
2021-02-17 05:24:03 +0100 <giogiogio> uh
2021-02-17 05:24:12 +0100 <giogiogio> sorry....
2021-02-17 05:24:17 +0100 <glguy> that's not the password, it's the verification code
2021-02-17 05:24:30 +0100 <Axman6> ah right, well that's good
2021-02-17 05:24:32 +0100 <glguy> giogiogio, since you aren't that good at avoiding leading spaces you really should switch out of the channel window to send these commands
2021-02-17 05:24:33 +0100 <giogiogio> :)
2021-02-17 05:24:47 +0100plutoniix(~q@ppp-223-24-189-173.revip6.asianet.co.th)
2021-02-17 05:25:07 +0100 <Axman6> it's been a _very_ long time since I needed to register a nick
2021-02-17 05:25:46 +0100 <Axman6> We have made contact, wish us luck
2021-02-17 05:27:42 +0100Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-02-17 05:28:14 +0100Tario(~Tario@201.192.165.173)
2021-02-17 05:29:49 +0100Shailangsa_(~shailangs@host86-186-191-40.range86-186.btcentralplus.com) ()
2021-02-17 05:33:06 +0100average(uid473595@gateway/web/irccloud.com/x-gyibtnnaloxfprfu)
2021-02-17 05:35:23 +0100 <karasu1[m]> For my debugging question earlier, I know I was recommended GHCI, but I think it
2021-02-17 05:35:47 +0100 <karasu1[m]> might be non-trivial to call the function with the arguments that are in the actual program
2021-02-17 05:36:45 +0100hiroaki(~hiroaki@ip4d166d67.dynamic.kabel-deutschland.de)
2021-02-17 05:36:51 +0100 <karasu1[m]> IDK if that makes sense
2021-02-17 05:37:27 +0100 <karasu1[m]> Is there something more like printf in other programming languages, so it can be printed when it is encountered?
2021-02-17 05:38:04 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 05:38:26 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 05:39:40 +0100 <karasu1[m]> Or a debugger maybe? hmmm
2021-02-17 05:39:53 +0100Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-02-17 05:41:36 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 05:41:47 +0100 <Axman6> we have both, but we're usually reluctant to recommend them to new users of the language because using them discourages cleaner software design
2021-02-17 05:42:16 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Ping timeout: 240 seconds)
2021-02-17 05:43:36 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19) (Ping timeout: 256 seconds)
2021-02-17 05:44:51 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in)
2021-02-17 05:45:53 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br)
2021-02-17 05:47:31 +0100 <xsperry> > printf "Hello %d" 10 :: String
2021-02-17 05:47:33 +0100 <lambdabot> "Hello 10"
2021-02-17 05:47:36 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 240 seconds)
2021-02-17 05:48:49 +0100 <koz_> > printf "Hello %d" :: String
2021-02-17 05:48:51 +0100 <lambdabot> "Hello *Exception: printf: argument list ended prematurely
2021-02-17 05:49:33 +0100 <Axman6> karasu1[m]: the Debug.Trace module is often qquite helpful. if you have some function foo : a -> b -> c which you need to know its arguments, you can add: foo a b | traceShow ("foo",a,b) False = undefined to the top of foo to print out all the arguments it's passed
2021-02-17 05:49:33 +0100 <koz_> > printf "Hello %s" 0x567 :: String
2021-02-17 05:49:35 +0100 <lambdabot> "Hello *Exception: printf: bad formatting char 's'
2021-02-17 05:50:07 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 05:50:53 +0100 <xsperry> koz_, yeah, we got your point. I still use it, both in haskell and C (where result will be far uglier than getting an exception)
2021-02-17 05:51:22 +0100 <koz_> xsperry: You do you.
2021-02-17 05:51:46 +0100shailangsa(~shailangs@host86-186-191-40.range86-186.btcentralplus.com)
2021-02-17 05:52:11 +0100 <Axman6> C compilers have hidden type level strings though
2021-02-17 05:52:19 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 05:52:30 +0100 <Axman6> just so that you can use printf safely
2021-02-17 05:52:59 +0100 <koz_> Axman6: Explain?
2021-02-17 05:53:00 +0100 <karasu1[m]> I probably couldn't explain it will, but the reason simple GHCI function calling would be cumbersome in my case is because the arguments to this function are the result of a bunch of complicated things like reading in files, pattern matching on other functions, etc, so it would be hard to just do it on GHCi
2021-02-17 05:53:02 +0100 <karasu1[m]> *well
2021-02-17 05:53:42 +0100 <xsperry> some C compiler inspect printf string and argument types. this is not part of C, though, not required, and no reason why ghc couldn't do it as well (if they cared enough, which they probably don't)
2021-02-17 05:53:46 +0100 <xsperry> compilers*
2021-02-17 05:53:59 +0100 <xsperry> and give a warning if specifiers don't match the types
2021-02-17 05:54:22 +0100jollygood2(~bc8134e3@217.29.117.252)
2021-02-17 05:55:28 +0100Tario(~Tario@201.192.165.173)
2021-02-17 05:56:04 +0100 <jollygood2> hi. what is the difference between (<>) in Data.Monoid and Data.Semigroup? what should I use? they both seem to work with optparse-applicative
2021-02-17 05:56:23 +0100 <koz_> jollygood2: Nowadays, none.
2021-02-17 05:56:35 +0100Cthalupa(~cthulhu@47.186.47.75) (Ping timeout: 256 seconds)
2021-02-17 05:56:36 +0100 <koz_> And you can use whichever if your GHC is reasonably modern.
2021-02-17 05:56:52 +0100 <jollygood2> why none?
2021-02-17 05:57:05 +0100 <jollygood2> optparse-applicative uses <> in their examples. what's the alternative?
2021-02-17 05:57:16 +0100 <koz_> jollygood2: None was in response to your first question.
2021-02-17 05:57:19 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
2021-02-17 05:57:22 +0100 <jollygood2> oh
2021-02-17 05:57:24 +0100 <koz_> Your question was 'What is the difference ... ?'.
2021-02-17 05:57:33 +0100 <koz_> Response 'None'. In the sense of 'there isn't one'.
2021-02-17 05:58:16 +0100slack1256(~slack1256@45.4.2.52) (Ping timeout: 240 seconds)
2021-02-17 05:58:22 +0100 <jollygood2> :t (<>)
2021-02-17 05:58:23 +0100 <lambdabot> Semigroup a => a -> a -> a
2021-02-17 05:58:39 +0100 <Axman6> koz_: most C compilers will type check your usage of printf format strings, if you write printf("Hello %s", 1); you'll get compile errors/warnings
2021-02-17 05:58:52 +0100 <koz_> Ah, that's what you meant, OK.
2021-02-17 05:59:19 +0100 <jollygood2> I've only seen gcc doing that
2021-02-17 05:59:36 +0100Tario(~Tario@201.192.165.173) (Ping timeout: 240 seconds)
2021-02-17 05:59:38 +0100 <Axman6> so implicitly, C in many compilers is dependantly typed or has type level strings
2021-02-17 05:59:42 +0100 <koz_> Clang can likely do it too.
2021-02-17 05:59:48 +0100 <Axman6> yeah Clang does it
2021-02-17 06:00:18 +0100 <dolio> I think a special case for printf is kind of a stretch to call dependent types or type level strings.
2021-02-17 06:00:50 +0100 <Axman6> the inferred type of printf is dependant on the value of the string passed to it
2021-02-17 06:01:17 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 06:01:47 +0100 <dolio> So what's it do if the string isn't statically known?
2021-02-17 06:02:20 +0100 <monochrom> Then it behaves as untyped languages.
2021-02-17 06:02:22 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 06:02:23 +0100 <Axman6> tell you to read up on well known security vulnerabilities in C programs
2021-02-17 06:02:27 +0100 <monochrom> @quote monochrom poor
2021-02-17 06:02:27 +0100 <lambdabot> monochrom says: dynamic type is poor man's dependent type, they are so poor they can't buy a theorem prover.
2021-02-17 06:02:44 +0100rajivr(uid269651@gateway/web/irccloud.com/x-rpaywpmedacdhsxn) (Quit: Connection closed for inactivity)
2021-02-17 06:02:50 +0100 <monochrom> which is poor people's dependent typing. So it's still dependent typing >:)
2021-02-17 06:02:58 +0100 <Axman6> yeah
2021-02-17 06:03:00 +0100 <koz_> monochrom sounds like PLT_borat there.
2021-02-17 06:03:02 +0100 <dolio> My point is that a single opportunistic static check isn't, "dependent types".
2021-02-17 06:03:30 +0100 <Axman6> it is, it just defaults to saying the program is ok if it can't prove it isn't :)
2021-02-17 06:03:31 +0100 <Squarism> I often find myself in the situation i want to create a class for many types i create just to group functions / dependencies for them. Anyone else doing this? When doing so I struggle with finding a non moronic name for them.
2021-02-17 06:03:44 +0100 <Axman6> "Hmm, I can't figure this out, I'm sure the author knows what they're doing"
2021-02-17 06:05:00 +0100 <hololeap> Squarism: wouldn't this be a better job for namespaces than typeclasses?
2021-02-17 06:05:04 +0100 <monochrom> To be fair, real dependent typing takes the stance "I can't figure this out, I'm sure the author doesn't know what they're doing, let me delete this code".
2021-02-17 06:05:12 +0100 <monochrom> OK just kidding on the deletion part.
2021-02-17 06:06:15 +0100 <Squarism> hololeap, in my current project i have tons of types spread over like 10 files. Giving each a namespace would be tons of extra files. Cause you cannot have multiple modules per file?
2021-02-17 06:06:34 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
2021-02-17 06:06:53 +0100 <monochrom> Perhaps the other extreme to what hololeap said is associated type family so you have a class plus a type family.
2021-02-17 06:07:13 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 06:07:30 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 06:10:46 +0100jdwidari(~jdwidari@173.38.117.75)
2021-02-17 06:10:49 +0100 <hololeap> i'm not sure i understand the problem. similar types (in the same "scope" of the problem you're trying to solve) are placed in the same module. this module may import other modules, creating a dependency structure
2021-02-17 06:11:45 +0100MarcelineVQ(~anja@198.254.199.42) (Ping timeout: 240 seconds)
2021-02-17 06:11:54 +0100nek0(~nek0@mail.nek0.eu) (Remote host closed the connection)
2021-02-17 06:12:15 +0100Wuzzy(~Wuzzy@p5b0df671.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-02-17 06:12:22 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 06:13:02 +0100Cthalupa(~cthulhu@47.186.47.75)
2021-02-17 06:13:18 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 06:13:50 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 06:14:06 +0100MarcelineVQ(~anja@198.254.199.42)
2021-02-17 06:14:56 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 06:15:04 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 06:15:53 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 06:16:41 +0100nek0(~nek0@mail.nek0.eu)
2021-02-17 06:16:51 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 06:17:19 +0100 <hololeap> Squarism: what's an example of a typeclass you've made like this?
2021-02-17 06:17:25 +0100Cthalupa(~cthulhu@47.186.47.75) (Ping timeout: 240 seconds)
2021-02-17 06:17:51 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 265 seconds)
2021-02-17 06:19:09 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
2021-02-17 06:19:25 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 06:19:30 +0100Cthalupa(~cthulhu@47.186.47.75)
2021-02-17 06:20:19 +0100 <edwardk> i feel dumb. i spent like an hour writing code for a Ref# a that followed the general semantics of linear-base's Array# .. and was like hrmm, maybe i can make this polymorphic in the multiplicity right? so Ref# m a was born. then, i realized Ref# 'One a = a, ... and Ref# 'Many a = Ur a. Derp.
2021-02-17 06:20:56 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 06:21:18 +0100 <Squarism> hololeap, So maybe i create "ProcessStep a b" type. Then my old OO brains wants to group functions associated to that type. Maybe add some constraints etc. Sure i know i can just create a bunch of top level functions for it but the old OO brain wants to group them.
2021-02-17 06:22:16 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 240 seconds)
2021-02-17 06:22:43 +0100 <hololeap> Squarism: if ProcessStep has a bunch of associated functions, then it would make sense to put it in its own module. bam. it's been grouped.
2021-02-17 06:23:07 +0100ChaiTRex(~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
2021-02-17 06:23:07 +0100 <ephemient> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#:~:text=format%20(archetype%2C%20string%2Dindex%2C%20first%2Dto%2Dcheck) in GCC, it isn't specific to printf, but is something that can apply to any printf-like function
2021-02-17 06:23:17 +0100 <ephemient> (still not dependent typing, but just clarifying)
2021-02-17 06:23:22 +0100 <hololeap> *it and its related functions in its own module
2021-02-17 06:23:31 +0100ChaiTRex(~ChaiTRex@gateway/tor-sasl/chaitrex)
2021-02-17 06:25:06 +0100 <hololeap> and you can always use qualified imports to help keep your namespace from getting cluttered: ProcessStep.someFunc
2021-02-17 06:25:13 +0100 <MarcelineVQ> edwardk: I bet you feel awful silly
2021-02-17 06:25:20 +0100conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-02-17 06:25:21 +0100 <edwardk> yep
2021-02-17 06:25:33 +0100 <MarcelineVQ> Let this be a lesson to all of you
2021-02-17 06:25:38 +0100 <Squarism> Sure. Call it nonsensical, but I dig not creating a file per type.
2021-02-17 06:26:31 +0100 <edwardk> i was all excited by realizing when i wrote to one i could change its type... wow. ;)
2021-02-17 06:26:32 +0100 <hololeap> Squarism: it depends on the context of course. for instance Data.IntMap is all about IntMap, but it also has Key thrown in there
2021-02-17 06:26:44 +0100 <hololeap> because it's directly related
2021-02-17 06:26:46 +0100Unhammer(~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
2021-02-17 06:27:16 +0100 <hololeap> but there's this fun thing you can do called a directory heirarchy to keep your files organized... ;)
2021-02-17 06:27:24 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 06:27:27 +0100Unhammer(~Unhammer@gateway/tor-sasl/unhammer)
2021-02-17 06:27:36 +0100 <Squarism> =D
2021-02-17 06:28:51 +0100 <hololeap> i've also been spending a lot of time with Elm lately, which basically forces you to use a bajillion modules... since, no typeclasses
2021-02-17 06:29:14 +0100conal(~conal@64.71.133.70)
2021-02-17 06:29:50 +0100 <hololeap> but sometimes it's good to separate oneself from the hammer so you can remember there are other tools
2021-02-17 06:30:27 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 06:30:47 +0100Orbstheorem(~roosember@hellendaal.orbstheorem.ch) (Ping timeout: 272 seconds)
2021-02-17 06:31:41 +0100vgtw(~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection)
2021-02-17 06:31:45 +0100hekkaidekapus[(~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
2021-02-17 06:31:55 +0100vgtw(~vgtw@gateway/tor-sasl/vgtw)
2021-02-17 06:32:13 +0100hekkaidekapus[(~tchouri@gateway/tor-sasl/hekkaidekapus)
2021-02-17 06:32:47 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2021-02-17 06:32:52 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 06:35:19 +0100conal_(~conal@66.115.157.88)
2021-02-17 06:35:30 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 06:36:13 +0100conal(~conal@64.71.133.70) (Ping timeout: 265 seconds)
2021-02-17 06:39:18 +0100rajivr(uid269651@gateway/web/irccloud.com/x-gtdozbconwgnsaqd)
2021-02-17 06:40:35 +0100Orbstheorem(~roosember@hellendaal.orbstheorem.ch)
2021-02-17 06:42:02 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
2021-02-17 06:44:57 +0100Cthalupa(~cthulhu@47.186.47.75) (Ping timeout: 264 seconds)
2021-02-17 06:46:01 +0100ChaiTRex(~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
2021-02-17 06:46:22 +0100ChaiTRex(~ChaiTRex@gateway/tor-sasl/chaitrex)
2021-02-17 06:46:33 +0100Cthalupa(~cthulhu@47.186.47.75)
2021-02-17 06:47:02 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 06:47:50 +0100desophos(~desophos@2601:249:1680:a570:64c9:1587:dfd:89ba)
2021-02-17 06:49:41 +0100hexo(~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection)
2021-02-17 06:49:41 +0100srk(~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection)
2021-02-17 06:49:58 +0100hexo(~hexo@gateway/tor-sasl/hexo)
2021-02-17 06:50:00 +0100srk(~sorki@gateway/tor-sasl/sorki)
2021-02-17 06:50:57 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-02-17 06:51:50 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 06:52:56 +0100DataComputist(~lumeng@50.43.26.251) (Ping timeout: 240 seconds)
2021-02-17 06:54:34 +0100 <desophos> hi, i just discovered the formatting tool brittany and i'm curious about why it inserts whitespace inside the brackets in the pattern `[x]`: https://paste.tomsmeding.com/GCPSUQDE should i not be using this pattern? is this an oversight in brittany?
2021-02-17 06:54:45 +0100DataComputist(~lumeng@50.43.26.251)
2021-02-17 06:55:14 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 06:56:13 +0100 <desophos> (the function is made up for the example, but i do match on these patterns in my own functions)
2021-02-17 06:58:45 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 06:59:08 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 06:59:28 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 07:00:56 +0100howdoi(uid224@gateway/web/irccloud.com/x-xlbatpgsylnmdmym) (Quit: Connection closed for inactivity)
2021-02-17 07:01:17 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 272 seconds)
2021-02-17 07:02:31 +0100pagnol(~user@n112120223083.netvigator.com) (Remote host closed the connection)
2021-02-17 07:02:57 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
2021-02-17 07:03:06 +0100Saukk(~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection)
2021-02-17 07:03:46 +0100cocytus(~cocytus@cpe-76-95-48-109.socal.res.rr.com) (Ping timeout: 265 seconds)
2021-02-17 07:04:27 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
2021-02-17 07:05:06 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 07:05:15 +0100 <karasu1[m]> Could someone help me use https://hackage.haskell.org/package/prettyprinter-1.7.0?
2021-02-17 07:05:31 +0100 <karasu1[m]> I just discovered pretty printers, but I have no idea how to use them or a tutorial on it
2021-02-17 07:05:59 +0100 <karasu1[m]> I want GHCI to print a record data type that derives `Show`, but not all on one line
2021-02-17 07:06:25 +0100 <karasu1[m]> If it's all on one line, it's too many lines (wrapped) and unreadable, so I had to format it manually in my text editor
2021-02-17 07:06:44 +0100contiver(~contiver@84-115-64-131.wifi.dynamic.surfer.at)
2021-02-17 07:07:47 +0100forgottenone(~forgotten@176.42.30.133)
2021-02-17 07:07:49 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 07:09:12 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-02-17 07:09:41 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-02-17 07:09:42 +0100 <hololeap> desophos: i think some consider that kind of indentation and spacing pretty
2021-02-17 07:10:03 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds)
2021-02-17 07:10:14 +0100 <hololeap> karasu1[m]: you're looking for pretty-simple
2021-02-17 07:10:52 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-02-17 07:11:02 +0100 <desophos> well, i expected it to insert whitespace after the brackets, resulting in `[x] =` rather than `[x ] =`
2021-02-17 07:11:14 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-02-17 07:12:27 +0100 <desophos> i suppose it's a matter of taste; after all, the brackets on both lines are aligned
2021-02-17 07:14:50 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 07:15:52 +0100sveit(~sveit@2001:19f0:ac01:247:5400:ff:fe5c:689f) (Read error: Connection reset by peer)
2021-02-17 07:15:52 +0100simplegauss(~simplegau@2001:19f0:ac01:247:5400:ff:fe5c:689f) (Read error: Connection reset by peer)
2021-02-17 07:19:01 +0100contiver(~contiver@84-115-64-131.wifi.dynamic.surfer.at) (Ping timeout: 272 seconds)
2021-02-17 07:23:21 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2021-02-17 07:27:22 +0100Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-02-17 07:27:26 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 07:29:09 +0100carlomagno(~cararell@148.87.23.13) (Remote host closed the connection)
2021-02-17 07:30:37 +0100carlomagno(~cararell@148.87.23.13)
2021-02-17 07:32:17 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 07:32:51 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905) (Read error: Connection reset by peer)
2021-02-17 07:33:20 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905)
2021-02-17 07:34:06 +0100brettgilio_(~brettgili@brettgilio.com)
2021-02-17 07:34:56 +0100brettgilio(~brettgili@brettgilio.com) (Ping timeout: 240 seconds)
2021-02-17 07:35:17 +0100plutoniix(~q@ppp-223-24-189-173.revip6.asianet.co.th) (Read error: Connection reset by peer)
2021-02-17 07:35:46 +0100rj(~x@gateway/tor-sasl/rj) (Remote host closed the connection)
2021-02-17 07:36:17 +0100rj(~x@gateway/tor-sasl/rj)
2021-02-17 07:39:02 +0100desophos(~desophos@2601:249:1680:a570:64c9:1587:dfd:89ba) (Ping timeout: 264 seconds)
2021-02-17 07:40:43 +0100desophos(~desophos@c-24-14-63-128.hsd1.il.comcast.net)
2021-02-17 07:41:01 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2021-02-17 07:43:19 +0100 <Axman6> pretty-simple is definitely the answer
2021-02-17 07:45:02 +0100jedws(~jedws@101.184.202.248)
2021-02-17 07:45:02 +0100jedws(~jedws@101.184.202.248) (Client Quit)
2021-02-17 07:45:08 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 07:46:03 +0100cole(~user@098-148-021-111.res.spectrum.com)
2021-02-17 07:48:26 +0100saitamaplus(uid272474@gateway/web/irccloud.com/x-pufhyrnsdboiuaos) (Ping timeout: 240 seconds)
2021-02-17 07:48:49 +0100plutoniix(~q@184.82.194.171)
2021-02-17 07:49:09 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 07:49:25 +0100saitamaplus(uid272474@gateway/web/irccloud.com/x-smrbtdsrshobzxqj)
2021-02-17 07:50:10 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 07:50:38 +0100cole(~user@098-148-021-111.res.spectrum.com) (Ping timeout: 260 seconds)
2021-02-17 07:52:09 +0100cheater(~user@unaffiliated/cheater) (Ping timeout: 264 seconds)
2021-02-17 07:52:11 +0100hexfive(~hexfive@50.35.83.177) (Quit: i must go. my people need me.)
2021-02-17 07:54:16 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 240 seconds)
2021-02-17 07:58:19 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-02-17 07:59:08 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 08:02:23 +0100Lowl3v3l(~Lowl3v3l@dslb-002-203-233-121.002.203.pools.vodafone-ip.de)
2021-02-17 08:02:48 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 08:03:25 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
2021-02-17 08:03:41 +0100DataComputist(~lumeng@50.43.26.251) (Quit: Leaving...)
2021-02-17 08:04:31 +0100cheater(~user@unaffiliated/cheater)
2021-02-17 08:06:18 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 08:06:59 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer)
2021-02-17 08:07:54 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 08:08:45 +0100bitmapper(uid464869@gateway/web/irccloud.com/x-emuwabyciomfikoa) (Quit: Connection closed for inactivity)
2021-02-17 08:09:03 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 08:10:14 +0100benschza_(~quassel@2604:1380:2000:cf00::1) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2021-02-17 08:10:21 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 08:11:45 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2021-02-17 08:12:13 +0100 <dminuoso> monochrom, ski: Mmm, perhaps smart constructors is an option here.
2021-02-17 08:12:35 +0100 <dminuoso> And regarding `data Tree a = Tip | Node a (Tree a) (Tree a) where height :: Tree a -> Int; height Tip = 0; height (Node _ l r) = 1 + max (height l) (height r)' - that is exactly what I'd want.
2021-02-17 08:13:05 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
2021-02-17 08:13:50 +0100coeus(~coeus@p200300d0272d1700ee0909afd2db7a9e.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2021-02-17 08:15:54 +0100michalz(~user@185.246.204.79)
2021-02-17 08:16:02 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2021-02-17 08:16:39 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 272 seconds)
2021-02-17 08:16:55 +0100 <karasu1[m]> What is prettyprinter used for then btw?
2021-02-17 08:18:18 +0100 <karasu1[m]> I've heard prettyprinter was better maybe?
2021-02-17 08:18:20 +0100 <karasu1[m]> https://www.reddit.com/r/haskell/comments/8ilw75/there_are_too_many_prettyprinting_libraries/
2021-02-17 08:18:24 +0100 <karasu1[m]> From the above reddit thread ^
2021-02-17 08:18:46 +0100toorevitimirp(~tooreviti@117.182.183.159)
2021-02-17 08:20:05 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 08:20:13 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 08:21:16 +0100 <dminuoso> karasu1[m]: One example use case is generating warnings/error messages like GHC itself.
2021-02-17 08:22:20 +0100 <karasu1[m]> OK, so more for making stack traces, rather than caveman printing debugging purposes then?
2021-02-17 08:22:39 +0100 <dminuoso> Well, that's one single use case, but yeah its not really for "ad-hoc debugging"
2021-02-17 08:22:53 +0100mouseghost(~draco@87-206-9-185.dynamic.chello.pl)
2021-02-17 08:22:53 +0100mouseghost(~draco@87-206-9-185.dynamic.chello.pl) (Changing host)
2021-02-17 08:22:53 +0100mouseghost(~draco@wikipedia/desperek)
2021-02-17 08:23:21 +0100 <dminuoso> The core idea of `prettyprinter` is that you can create some sort of "document" that can be layouted several ways, and then perhaps rendered several ways
2021-02-17 08:23:51 +0100 <karasu1[m]> Like pandoc maybe?
2021-02-17 08:24:11 +0100 <karasu1[m]> I see..
2021-02-17 08:24:30 +0100 <dminuoso> pandoc is a bit of a different breed, as that's a conversion tool
2021-02-17 08:25:27 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 08:25:53 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 08:25:54 +0100idhugo(~idhugo@80-62-117-97-mobile.dk.customer.tdc.net)
2021-02-17 08:25:56 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 265 seconds)
2021-02-17 08:25:57 +0100 <dminuoso> Any time you want to provide structured output, where you want to sort of control how things are layouted (in a way that the content reacts appropriately the width of the display), control indention, and have things like soft linebreaks
2021-02-17 08:26:15 +0100 <dminuoso> (i.e. a soft linebreak is one that the layouter is *permitted* to turn into an actual linebreak or not, depending on available space)
2021-02-17 08:27:02 +0100 <dminuoso> Or maybe you have reactive/conditional layouting, where your output changes depending on indention or available space
2021-02-17 08:27:39 +0100 <dminuoso> It's still useful for debugging, mind you, since you can provide well structured output with this, that extends far beyond just "show this data"
2021-02-17 08:29:20 +0100 <dminuoso> prettyprinter is then powerful enough to not just output text data, but you could also render it into say markdown or even HTML, but in a way that this happens behind the scenes
2021-02-17 08:29:30 +0100 <dminuoso> if that's what you wanted
2021-02-17 08:30:08 +0100 <dminuoso> `pretty-show` otoh, confusingly also having the prefix "pretty", just takes deriving generated Show output, and adds linebreaks/indention to make it look nicer.
2021-02-17 08:30:16 +0100 <dminuoso> It's not a prettyprinter, it's just a prettier show.
2021-02-17 08:30:46 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 08:31:50 +0100coeus(~coeus@p200300d02716f600092ef689065f6814.dip0.t-ipconnect.de)
2021-02-17 08:34:21 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 08:34:32 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
2021-02-17 08:34:37 +0100 <karasu1[m]> prettyprinter is for general purpose documents, and pretty-simple/pretty-show is for Haskell debugging, is chiefly correct right?
2021-02-17 08:34:39 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 08:34:50 +0100 <karasu1[m]> since you mentioned markdown or HTML for prettyprinter
2021-02-17 08:35:16 +0100 <karasu1[m]> oh but it can also give well structured output, just like pretty-simple/pretty-show?
2021-02-17 08:36:31 +0100 <dminuoso> Sure, it's just that you have to do this yourself.
2021-02-17 08:37:08 +0100 <dminuoso> karasu1[m]: And regarding "general purpose documents", Id say prettyprinter has no specific usecase. It's for when you manually want to control the output.
2021-02-17 08:37:09 +0100 <karasu1[m]> But it makes it easy to do it yourself, I see..
2021-02-17 08:37:26 +0100 <dminuoso> Id rather compare `prettyprinter` to something better than a templating language.
2021-02-17 08:37:38 +0100 <karasu1[m]> Do people write webpages with prettyprinter? Like blogs and so on?
2021-02-17 08:37:53 +0100 <dminuoso> Not that I'm aware of, but you certainly could.
2021-02-17 08:38:36 +0100sord937(~sord937@gateway/tor-sasl/sord937)
2021-02-17 08:38:56 +0100Varis(~Tadas@unaffiliated/varis)
2021-02-17 08:39:27 +0100 <karasu1[m]> It still seems mysterious to me.. What task would a seasoned Haskell programmer think is a "great fit" for the prettyprinter library?
2021-02-17 08:39:48 +0100 <dminuoso> karasu1[m]: Generating error messages exactly like GHC does is the first thing that comes to mind. That's what I use it for anyway.
2021-02-17 08:40:06 +0100 <dminuoso> Or perhaps to output human readable structured logging/program output in general
2021-02-17 08:40:21 +0100 <karasu1[m]> OK, makes sense
2021-02-17 08:40:24 +0100iam(511495c8@200-149-20-81.sta.estpak.ee)
2021-02-17 08:40:41 +0100 <dminuoso> You could also use `prettyprinter` as a poor mans code generator tool.
2021-02-17 08:40:56 +0100 <karasu1[m]> Code generator? Like an assembler?
2021-02-17 08:40:57 +0100 <dminuoso> Say you have some abstract representation of a program, and want to turn it into pretty code.
2021-02-17 08:41:17 +0100 <karasu1[m]> Like an AST?
2021-02-17 08:41:23 +0100 <dminuoso> Right. Think along the lines of haskell-stylish
2021-02-17 08:41:42 +0100 <dminuoso> Or its called stylish-haskell I believe
2021-02-17 08:41:45 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 08:42:12 +0100 <dminuoso> (Say a code formatter)
2021-02-17 08:42:17 +0100 <karasu1[m]> oh yeah, the automatic haskell code prettifier. It would need to deal with the AST I believe (never made one myself)
2021-02-17 08:42:46 +0100 <iam> Hello! Do you know any libraries which can provide DSL for writing shell scripts with benefits of Haskell types and classes? Ideally I want it to compile haskell DSL directly to shell text files which can be run at almost any machine. Something like JS compilations with GHCJS but in smaller scale.
2021-02-17 08:42:56 +0100 <karasu1[m]> automatic linter may be a more correct term? IDK
2021-02-17 08:43:14 +0100poscat(~poscat@2408:8207:482a:5640::1) (Ping timeout: 264 seconds)
2021-02-17 08:43:29 +0100 <dminuoso> karasu1[m]: No, linting is about checking the structure, Im talking about taking an AST and turning it back into code in a pretty, perhaps tractable/configurable, way.
2021-02-17 08:43:43 +0100 <dminuoso> say
2021-02-17 08:44:06 +0100 <dminuoso> https://hackage.haskell.org/package/haskell-src-exts-1.23.1/docs/Language-Haskell-Exts-Pretty.html
2021-02-17 08:44:13 +0100 <dminuoso> This could have been implemented using `prettyprinter`
2021-02-17 08:44:38 +0100 <dminuoso> (In fact, this library uses `pretty`, which is a sort of predecessor to `prettyprinter`)
2021-02-17 08:44:51 +0100 <dminuoso> So we can pretend this library used `prettyprinter` for the purpose of this discussion.
2021-02-17 08:45:54 +0100 <karasu1[m]> This library uses `Pretty`?
2021-02-17 08:45:59 +0100 <karasu1[m]> Seems like its exporting it?
2021-02-17 08:46:16 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 08:46:19 +0100 <karasu1[m]> `module Language.Haskell.Exts.Pretty ( ....... Pretty, ....)`
2021-02-17 08:46:34 +0100 <dminuoso> The underlying library is called `pretty`, which is very similar to `prettyprinter`
2021-02-17 08:46:36 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 240 seconds)
2021-02-17 08:47:11 +0100 <karasu1[m]> `import qualified Text.PrettyPrint as P` ah this one maybe?
2021-02-17 08:47:13 +0100 <karasu1[m]> https://hackage.haskell.org/package/haskell-src-exts-1.23.1/docs/src/Language.Haskell.Exts.Pretty.…
2021-02-17 08:47:19 +0100 <dminuoso> Right
2021-02-17 08:47:29 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 08:47:39 +0100 <dminuoso> karasu1[m]: To get a better idea, let's look at one of the most useful and commonly used primitives in `prettyprinter`: https://hackage.haskell.org/package/prettyprinter-1.7.0/docs/Prettyprinter.html#v:hang
2021-02-17 08:47:46 +0100cur8or(~cur8or@72canterbury.cybersmart.co.za)
2021-02-17 08:48:02 +0100 <dminuoso> Or perhaps https://hackage.haskell.org/package/prettyprinter-1.7.0/docs/Prettyprinter-Util.html#v:reflow
2021-02-17 08:49:37 +0100 <karasu1[m]> Hmm, makes sense
2021-02-17 08:50:13 +0100 <karasu1[m]> Seems very general purpose, but presumably there's more Haskell specific things too
2021-02-17 08:50:20 +0100 <karasu1[m]> And GHC specific I assume
2021-02-17 08:50:28 +0100giogiogio(5e89ad7c@94.137.173.124) (Quit: Connection closed)
2021-02-17 08:52:01 +0100 <desophos> is there an idiom for applying multiple functions to *the same* input and potentially combining the results? kind of like a reverse map. this is what i came up with but i was wondering if there's a standard way to do this: https://paste.tomsmeding.com/DH01oSBD
2021-02-17 08:53:25 +0100Sgeo(~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2021-02-17 08:53:36 +0100chele(~chele@ip5b40237d.dynamic.kabel-deutschland.de)
2021-02-17 08:56:09 +0100cur8or(~cur8or@72canterbury.cybersmart.co.za) (Ping timeout: 246 seconds)
2021-02-17 08:56:49 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 08:59:13 +0100 <dminuoso> desophos: Apart from the head/tail (use pattern matching), that looks fine to me.
2021-02-17 08:59:48 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 08:59:48 +0100 <dminuoso> Any other trick I can see is a lot more verbose than what you have written
2021-02-17 09:00:02 +0100 <desophos> ah, thanks for catching that
2021-02-17 09:01:12 +0100 <desophos> hmm, i think this is better: `foldl' combine (map ($ x) fs)`
2021-02-17 09:01:20 +0100 <dminuoso> desophos: The only related trick is considering whether `b` could be monoid
2021-02-17 09:01:53 +0100contiver(~contiver@84-115-65-6.wifi.dynamic.surfer.at)
2021-02-17 09:02:10 +0100cur8or(~cur8or@72canterbury.cybersmart.co.za)
2021-02-17 09:02:27 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 09:02:37 +0100 <desophos> my theory isn't great, what does that enable?
2021-02-17 09:03:21 +0100 <dminuoso> Im thinking of
2021-02-17 09:03:23 +0100 <dminuoso> % :t foldMapM
2021-02-17 09:03:23 +0100 <yahb> dminuoso: forall {t1 :: * -> *} {m :: * -> *} {a} {t2}. (Foldable t1, Monad m, Monoid a) => (t2 -> m a) -> t1 t2 -> m a
2021-02-17 09:03:29 +0100 <dminuoso> Note, this does not exist in prelude.
2021-02-17 09:04:37 +0100ralu(~ralu@static.211.245.203.116.clients.your-server.de) (Quit: Ping timeout (120 seconds))
2021-02-17 09:04:43 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 09:04:53 +0100ralu(~ralu@static.211.245.203.116.clients.your-server.de)
2021-02-17 09:04:58 +0100 <c_wraith> :t \f xs -> foldMap f . sequenceA xs
2021-02-17 09:05:00 +0100 <lambdabot> (Monoid c, Traversable t) => (a1 -> c) -> t (a2 -> a1) -> a2 -> c
2021-02-17 09:05:18 +0100 <dminuoso> Or perhaps a sort of `foldMon :: (Foldable t, Monad m, Monoid n) -> t (m n) -> m n`
2021-02-17 09:05:24 +0100 <c_wraith> once again, if you're willing to defer to a Monoid instance
2021-02-17 09:05:26 +0100 <dminuoso> And then you'd use the Reader effect
2021-02-17 09:06:21 +0100 <desophos> hmm, interesting. i'm just using this for Bool at the moment, but it's good to know that Monoid provides this sort of functionality
2021-02-17 09:06:23 +0100 <c_wraith> Hmm, that's redundant
2021-02-17 09:06:40 +0100 <dminuoso> desophos: Well the monoid just encompasses the "combing" function (plus an identity)
2021-02-17 09:06:49 +0100 <dminuoso> If you dont have an identity, then we'd need a semigroup version
2021-02-17 09:07:02 +0100 <dminuoso> c_wraith: Ah I guess we're both on the same tree here
2021-02-17 09:07:10 +0100 <dminuoso> I was thinking of
2021-02-17 09:07:16 +0100 <c_wraith> :t \xs -> fold . sequence xs
2021-02-17 09:07:17 +0100 <lambdabot> (Monoid c, Traversable t) => t (a -> c) -> a -> c
2021-02-17 09:07:20 +0100 <dminuoso> Right
2021-02-17 09:07:25 +0100 <dminuoso> Was just about to type that.
2021-02-17 09:07:39 +0100 <c_wraith> You might want the foldMap variant sometimes.
2021-02-17 09:07:51 +0100 <c_wraith> if you need one of the many newtype wrappers
2021-02-17 09:08:04 +0100 <dminuoso> Either way, Id go for the version you have, it's way more clearer waht happens.
2021-02-17 09:08:17 +0100 <dminuoso> `fold . sequence xs` is being clever at the expense of the reader
2021-02-17 09:08:40 +0100 <desophos> and also requires a Monoid instance
2021-02-17 09:09:04 +0100 <c_wraith> clearly the solution is reflection :P
2021-02-17 09:09:10 +0100 <c_wraith> (this is not the solution, please don't)
2021-02-17 09:09:12 +0100 <dminuoso> desophos: Well, we can use NonEmpty + semigroup too!
2021-02-17 09:09:15 +0100 <desophos> but it seems like i need to go back to the typeclassopedia
2021-02-17 09:09:25 +0100cfricke(~cfricke@unaffiliated/cfricke)
2021-02-17 09:09:25 +0100 <dminuoso> desophos: But as you might have noticed, we've digressed into code golfing for fun.
2021-02-17 09:09:29 +0100Miroboru(~myrvoll@46.249.230.40)
2021-02-17 09:09:54 +0100 <desophos> haha, well i appreciate the info
2021-02-17 09:10:36 +0100 <dminuoso> c_wraith: Yeah, I think the `fold . sequence` is cute. My version had an explicit Reader, I forgot that we have that instance on ((->) a) as well.
2021-02-17 09:10:51 +0100 <c_wraith> fwiw, I don't think sequenceA on a list of functions is especially weird. It's just swapping the (a ->) and the [ around
2021-02-17 09:10:54 +0100 <dminuoso> (or `fold .: sequence` rather)
2021-02-17 09:11:22 +0100 <dminuoso> In that case..
2021-02-17 09:11:24 +0100 <dminuoso> how about
2021-02-17 09:11:57 +0100 <dminuoso> % \h f xs -> foldl' f h . sequence xs
2021-02-17 09:11:58 +0100 <yahb> dminuoso: ; <interactive>:230:1: error:; * No instance for (Typeable c0) arising from a use of `print'; * In a stmt of an interactive GHCi command: print it
2021-02-17 09:12:00 +0100 <dminuoso> % :t \h f xs -> foldl' f h . sequence xs
2021-02-17 09:12:01 +0100 <yahb> dminuoso: forall {t :: * -> *} {c} {a1} {a2}. Traversable t => c -> (c -> a1 -> c) -> t (a2 -> a1) -> a2 -> c
2021-02-17 09:12:13 +0100 <dminuoso> desophos: No monoid here
2021-02-17 09:12:20 +0100eruditass(uid248673@gateway/web/irccloud.com/x-hyzngzzwawmxanqs)
2021-02-17 09:12:56 +0100 <dminuoso> And, if you catch [] by pattern matching
2021-02-17 09:12:58 +0100 <dminuoso> you could improve that
2021-02-17 09:13:05 +0100 <dminuoso> % :t \f xs -> foldl1' f . sequence xs
2021-02-17 09:13:06 +0100 <yahb> dminuoso: forall {c} {a}. (c -> c -> c) -> [a -> c] -> a -> c
2021-02-17 09:13:11 +0100 <c_wraith> actually, huh. reflection actually has... this.
2021-02-17 09:13:13 +0100 <c_wraith> foldMapBy :: Foldable t => (r -> r -> r) -> r -> (a -> r) -> t a -> r
2021-02-17 09:13:15 +0100 <desophos> hmm that looks good, i was looking at `sequence` but didn't quite figure it out
2021-02-17 09:13:34 +0100 <dminuoso> % :t sequence
2021-02-17 09:13:35 +0100 <yahb> dminuoso: forall {t :: * -> *} {m :: * -> *} {a}. (Traversable t, Monad m) => t (m a) -> m (t a)
2021-02-17 09:13:55 +0100 <dminuoso> Set t ~ []
2021-02-17 09:13:57 +0100 <desophos> doesn't sequence only work on Monads?
2021-02-17 09:13:57 +0100 <dminuoso> Then you get
2021-02-17 09:14:03 +0100dhouthoo(~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
2021-02-17 09:14:13 +0100 <dminuoso> desophos: ah that's a historical wart. sequence should be sequenceA
2021-02-17 09:14:33 +0100 <desophos> oh nice, i see! i didn't know that existed
2021-02-17 09:14:40 +0100 <koz_> desophos: It's one of those things.
2021-02-17 09:14:45 +0100 <koz_> We have a few of those, sadly.
2021-02-17 09:15:10 +0100mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com)
2021-02-17 09:15:11 +0100 <desophos> that's hard to avoid with a language as venerable as Haskell
2021-02-17 09:15:25 +0100 <koz_> Yeah, this.
2021-02-17 09:15:27 +0100 <dminuoso> desophos: Either way. set t ~ [], then you have `sequenceA :: Applicative f => [f a] -> f [a]`
2021-02-17 09:15:32 +0100koz_looks at String and sighs.
2021-02-17 09:15:46 +0100 <c_wraith> Ok, this is really actually funny. reflection has basically the function you want, except it is total.
2021-02-17 09:16:05 +0100 <c_wraith> (you pass in a default value instead of calling error)
2021-02-17 09:16:20 +0100 <desophos> wow, interesting
2021-02-17 09:16:21 +0100 <dminuoso> desophos: And it turns out, we have an Applicative instance for `((->) b)`, so it then becomes `sequenceA :: [b -> a] -> b -> [a]`
2021-02-17 09:16:50 +0100 <desophos> nice!
2021-02-17 09:17:11 +0100 <koz_> OK that is actually magical.
2021-02-17 09:17:20 +0100 <koz_> I shouldn't be surprised at this point in my Haskell life, but it's still magical.
2021-02-17 09:17:25 +0100 <c_wraith> but reflection is so ridiculously overpowered to do this. And probably not actually efficient.
2021-02-17 09:17:53 +0100 <desophos> why does reflection even have that?
2021-02-17 09:17:55 +0100 <dminuoso> foldMapBy f z g = reifyMonoid f z (foldMap (ReflectedMonoid #. g))
2021-02-17 09:18:08 +0100cur8or(~cur8or@72canterbury.cybersmart.co.za) (Ping timeout: 265 seconds)
2021-02-17 09:18:08 +0100 <dminuoso> reify a k = unsafeCoerce (Magic k :: Magic a r) (const a) Proxy
2021-02-17 09:18:10 +0100 <dminuoso> What a lovely library
2021-02-17 09:18:17 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 09:18:26 +0100 <desophos> lol "Magic"
2021-02-17 09:18:39 +0100 <dminuoso> newtype Magic a r = Magic (forall (s :: *). Reifies s a => Proxy s -> r)
2021-02-17 09:18:41 +0100 <dminuoso> Good lord
2021-02-17 09:19:03 +0100 <c_wraith> The funny thing is that reflection was initially based on a clever trick for avoiding anything unsafe
2021-02-17 09:19:13 +0100 <c_wraith> but that was ridiculously slow
2021-02-17 09:19:20 +0100 <c_wraith> And unsafeCoerce is *fast*
2021-02-17 09:19:34 +0100 <dminuoso> By fast you mean it has no penalty? :>
2021-02-17 09:19:43 +0100 <c_wraith> yep!
2021-02-17 09:19:51 +0100 <c_wraith> the only cost is sanity points
2021-02-17 09:20:16 +0100 <dminuoso> I still have this project where Im tempted to use unsafeCoerce to implement a HMap with..
2021-02-17 09:21:05 +0100contiver(~contiver@84-115-65-6.wifi.dynamic.surfer.at) (Ping timeout: 240 seconds)
2021-02-17 09:21:32 +0100 <dminuoso> Using type system proofs to know what kind of underlying type I have
2021-02-17 09:21:46 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-02-17 09:22:25 +0100whald(~trem@2a02:810a:8100:11a6:228c:3d0f:ba3a:4e06)
2021-02-17 09:23:03 +0100teej(uid154177@gateway/web/irccloud.com/x-zgnlyygkuwdxcyja) (Ping timeout: 272 seconds)
2021-02-17 09:23:10 +0100totoro2023(~t@unaffiliated/totoro2021) (Read error: Connection reset by peer)
2021-02-17 09:23:28 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 09:23:52 +0100cur8or(~cur8or@72canterbury.cybersmart.co.za)
2021-02-17 09:24:29 +0100totoro2023(~t@unaffiliated/totoro2021)
2021-02-17 09:24:46 +0100teej(uid154177@gateway/web/irccloud.com/x-dmrpztuemewvoove)
2021-02-17 09:24:59 +0100AWizzArd(~code@unaffiliated/awizzard) (Remote host closed the connection)
2021-02-17 09:25:06 +0100AWizzArd(~code@gehrels.uberspace.de)
2021-02-17 09:25:14 +0100 <desophos> for the record, this is what i went with. i think it's nice and straightforward: `combineWith combine fs x = foldl' combine y ys where (y : ys) = map ($ x) fs`
2021-02-17 09:25:58 +0100 <dminuoso> desophos: You can use foldl1' to avoid the pattern match here
2021-02-17 09:26:07 +0100 <dminuoso> Presumably you have a previous definition of combineWith that guards against an empty list
2021-02-17 09:26:39 +0100 <desophos> yes i do
2021-02-17 09:26:59 +0100 <desophos> i see, thanks for the tip
2021-02-17 09:27:36 +0100sim590(~sim590@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 240 seconds)
2021-02-17 09:27:50 +0100 <desophos> ah, beautiful :D
2021-02-17 09:29:35 +0100kenran(~kenran@i577BCDBF.versanet.de)
2021-02-17 09:31:13 +0100m0rphism1(~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
2021-02-17 09:32:59 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 09:34:48 +0100toorevitimirp(~tooreviti@117.182.183.159) (Ping timeout: 256 seconds)
2021-02-17 09:34:53 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 09:37:20 +0100Yumasi(~guillaume@2a01:e0a:5cb:4430:a218:d301:729d:d5b3)
2021-02-17 09:38:05 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 240 seconds)
2021-02-17 09:39:16 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 09:41:55 +0100 <whataday> I know the effects fmap and bind work on Cont r a, but I don't understand callCC's effects
2021-02-17 09:42:34 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 09:42:44 +0100anuur(~anuur@129.205.124.188)
2021-02-17 09:42:57 +0100 <whataday> fmap (+2) $ cont (\k -> k 3) == cont (\k -> k 5)
2021-02-17 09:44:04 +0100kritzefitz(~kritzefit@p548c9398.dip0.t-ipconnect.de)
2021-02-17 09:44:08 +0100 <anuur> Hey
2021-02-17 09:44:19 +0100 <whataday> fmap :: (a->b) -> Cont (a->r)->r -> Cont (b->r)->r
2021-02-17 09:44:43 +0100 <whataday> but callCC's type is too confused
2021-02-17 09:45:01 +0100 <whataday> :t callCC
2021-02-17 09:45:04 +0100 <lambdabot> MonadCont m => ((a -> m b) -> m a) -> m a
2021-02-17 09:46:13 +0100 <dminuoso> whataday: Cont confuses everybody. :>
2021-02-17 09:46:44 +0100 <whataday> callCC confuses me
2021-02-17 09:47:01 +0100 <koz_> whataday: Do you have an urgent and undying need to use callCC in your codebase?
2021-02-17 09:47:13 +0100 <dminuoso> whataday: think of callCC as giving you goto capabilities in Haskell.
2021-02-17 09:47:14 +0100 <koz_> Or perhaps a longing for an understanding of it that won't let you sleep at night?
2021-02-17 09:47:34 +0100 <whataday> koz_ not yet, but it confused me a long time
2021-02-17 09:47:41 +0100heatsink(~heatsink@2600:1700:bef1:5e10:2ddb:1faf:7144:5905) (Remote host closed the connection)
2021-02-17 09:48:02 +0100 <whataday> koz_ , aha it's right!
2021-02-17 09:48:30 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2021-02-17 09:48:36 +0100 <whataday> the day before yesterday, it made me insomnia
2021-02-17 09:48:39 +0100 <koz_> whataday: I can safely say that you can fill it in as 'doing magic by magical means' and live in ignorance of how it works, and lose nothing.
2021-02-17 09:48:54 +0100 <koz_> You won't be any less a Haskell programmer if you never understand or use it.
2021-02-17 09:48:58 +0100 <dminuoso> whataday: https://wiki.haskell.org/MonadCont_under_the_hood
2021-02-17 09:49:04 +0100 <dminuoso> Has some explanations and examples
2021-02-17 09:49:28 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net)
2021-02-17 09:50:09 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 09:51:08 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 09:52:02 +0100shrimpfogstoneco(~shrimpfog@121-200-6-98.79c806.syd.nbn.aussiebb.net)
2021-02-17 09:52:05 +0100 <dminuoso> whataday: `callCC $ \abort -> ...` so here abort has type `a -> m b` (so it's a function that you can apply to a value, and then it will give you `m b` back), and in fact in the body you have to provide some `m b`. The idea is, that you can pass `abort` along, and anyone can use that as its continuation, essentially providing a short-circuit/escape hatch
2021-02-17 09:52:21 +0100pera(~pera@unaffiliated/pera)
2021-02-17 09:52:51 +0100giogiogio(5e89ad7c@94.137.173.124)
2021-02-17 09:53:11 +0100 <dminuoso> So `callCC` is sort of like setjmp, and calling `abort` in the above is the equivalent of `longjmp`
2021-02-17 09:53:14 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 09:53:20 +0100hekkaidekapus](~tchouri@gateway/tor-sasl/hekkaidekapus)
2021-02-17 09:53:59 +0100 <dminuoso> That means something like `callCC $ \_ -> f` is the same as just `f`
2021-02-17 09:54:37 +0100 <whataday> looks at callCC type, why it return m a twice?
2021-02-17 09:54:57 +0100 <dminuoso> It doesn't
2021-02-17 09:55:06 +0100 <dminuoso> whataday: how many arguments does callCC take?
2021-02-17 09:55:21 +0100 <whataday> one?
2021-02-17 09:55:25 +0100shrimpfogstoneco(~shrimpfog@121-200-6-98.79c806.syd.nbn.aussiebb.net) (Client Quit)
2021-02-17 09:55:29 +0100 <whataday> :t callCC
2021-02-17 09:55:30 +0100 <lambdabot> MonadCont m => ((a -> m b) -> m a) -> m a
2021-02-17 09:55:40 +0100 <dminuoso> Alright. That one argument is a function, of type `((a -> m b) -> m a)`
2021-02-17 09:55:42 +0100 <dminuoso> Right?
2021-02-17 09:55:45 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 264 seconds)
2021-02-17 09:55:49 +0100 <whataday> yes
2021-02-17 09:55:58 +0100hekkaidekapus[(~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds)
2021-02-17 09:56:01 +0100 <dminuoso> So `callCC f` where `f :: (a -> m b) -> m a`
2021-02-17 09:56:06 +0100 <dminuoso> That means:
2021-02-17 09:56:10 +0100 <dminuoso> callCC f :: m a
2021-02-17 09:56:12 +0100 <dminuoso> Right?
2021-02-17 09:56:13 +0100 <whataday> but that would let callCC f = f ?
2021-02-17 09:56:28 +0100 <dminuoso> I didn't say that!
2021-02-17 09:56:28 +0100 <whataday> yes callCC f:: m a
2021-02-17 09:56:36 +0100 <dminuoso> Let's just resume and we visit that statement later
2021-02-17 09:56:39 +0100 <whataday> callCC f = f x
2021-02-17 09:56:49 +0100 <dminuoso> I did not say that either
2021-02-17 09:56:52 +0100 <whataday> if x :: a->m b
2021-02-17 09:57:07 +0100 <dminuoso> 09:56:01 dminuoso | So `callCC f` where `f :: (a -> m b) -> m a`
2021-02-17 09:57:12 +0100 <dminuoso> Since f is a function, we can write it out as a lambda
2021-02-17 09:57:15 +0100 <dminuoso> So we have:
2021-02-17 09:57:49 +0100 <dminuoso> `callCC $ \e -> r` as a possible invocation, where `e :: a -> m b` and `r :: m a`
2021-02-17 09:57:51 +0100 <dminuoso> So far so good?
2021-02-17 09:58:29 +0100 <iqubic> I've never really understood callCC, so I'm going to follow this too.
2021-02-17 09:58:37 +0100 <iqubic> I know more than enough haskell to keep up.
2021-02-17 09:58:42 +0100 <whataday> shouldn't e be :: (a->m b)-> m a?
2021-02-17 09:58:49 +0100 <dminuoso> 09:57:07 dminuoso | 09:56:01 dminuoso | So `callCC f` where `f :: (a -> m b) -> m a`
2021-02-17 09:58:49 +0100rj(~x@gateway/tor-sasl/rj) (Remote host closed the connection)
2021-02-17 09:58:51 +0100 <dminuoso> Look here
2021-02-17 09:59:02 +0100 <whataday> aha, rigt
2021-02-17 09:59:03 +0100 <whataday> right
2021-02-17 09:59:07 +0100 <dminuoso> We said that the argument to callCC itself is of type `(a -> m b) -> M a`
2021-02-17 09:59:11 +0100rj(~x@gateway/tor-sasl/rj)
2021-02-17 09:59:21 +0100 <whataday> yes
2021-02-17 09:59:33 +0100 <dminuoso> Since we turned it into a lambda, that lambdas argument is of type `a -> m b`, and the body is of type `m b`
2021-02-17 09:59:41 +0100 <dminuoso> Err, the body is of type `m a`
2021-02-17 09:59:44 +0100 <dminuoso> (Important distinction here)
2021-02-17 09:59:57 +0100 <dminuoso> Compare this with something like
2021-02-17 10:00:02 +0100meckse[m](mecksematr@gateway/shell/matrix.org/x-zgyuvedomofcoisp) (Quit: Idle for 30+ days)
2021-02-17 10:00:10 +0100 <dminuoso> withFile :: (Handle -> IO a) -> IO a
2021-02-17 10:00:10 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 10:00:30 +0100 <dminuoso> Except, in case of callCC the argument of the inner lambda itself is a function too.
2021-02-17 10:01:18 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 10:01:43 +0100 <whataday> e :: a -> m b; ok, what's the next magic?
2021-02-17 10:01:46 +0100borne(~fritjof@200116b864893b0095eb740676c27273.dip.versatel-1u1.de)
2021-02-17 10:01:51 +0100 <dminuoso> whataday: So assume to invoke callCC always in the style of `callCC $ \e -> r`. This differs from a plain `r` in just one way
2021-02-17 10:02:04 +0100 <dminuoso> You inside that lambda you have access to a special e
2021-02-17 10:02:14 +0100 <dminuoso> So all that callCC does, is provide you with that `e`, nothing else!
2021-02-17 10:02:28 +0100 <dminuoso> Just like `withFile` provides you with a `Handle`, nothing else
2021-02-17 10:02:36 +0100 <dminuoso> (It has some internal logic, but we need not worry about that for now)
2021-02-17 10:02:52 +0100 <whataday> wait a sec, e :: a-> m b, but why it return m a?
2021-02-17 10:03:36 +0100conal_(~conal@66.115.157.88) (Ping timeout: 240 seconds)
2021-02-17 10:03:58 +0100Graf_Blutwurst(~grafblutw@2001:171b:226e:adc0:d552:313d:8cb3:7b48)
2021-02-17 10:04:06 +0100kritzefitz(~kritzefit@p548c9398.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-02-17 10:04:32 +0100kenran(~kenran@i577BCDBF.versanet.de) (Read error: Connection reset by peer)
2021-02-17 10:04:56 +0100 <whataday> the whole callCC f :: m a; let us say g = callCC f, runCont g k, then what's the relationship between k and e?
2021-02-17 10:05:10 +0100 <whataday> k :: a-> r
2021-02-17 10:05:49 +0100 <whataday> callCC $\e -> ... e::a -> m b
2021-02-17 10:05:59 +0100 <dminuoso> whataday: Well, consider what this does in the first place:
2021-02-17 10:06:19 +0100 <dminuoso> Then we can arrive at a good intution
2021-02-17 10:08:30 +0100 <dminuoso> What is a value `f :: Cont r Int` exactly?
2021-02-17 10:08:33 +0100 <whataday> wait a sec , withFile :: (Handle -> IO a) -> IO a, but f :: (a->m b) -> m a
2021-02-17 10:08:39 +0100boxscape(4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
2021-02-17 10:08:43 +0100conal(~conal@66.115.157.88)
2021-02-17 10:08:52 +0100_ht(~quassel@82-169-194-8.biz.kpn.net)
2021-02-17 10:08:54 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 10:09:00 +0100pavonia(~user@unaffiliated/siracusa) (Quit: Bye!)
2021-02-17 10:09:03 +0100 <iqubic> That is an important distiction between things like runCont and callCC.
2021-02-17 10:09:28 +0100 <iqubic> callCC lets those two types be different.
2021-02-17 10:09:30 +0100 <dminuoso> whataday: Here `f` is a continuation with final result r, and a sort of "intermediate" result `Int`, Right?
2021-02-17 10:09:38 +0100 <dminuoso> Oh
2021-02-17 10:09:43 +0100 <dminuoso> Let me rename the variables here to avoid confusion
2021-02-17 10:09:52 +0100 <dminuoso> Consider `x :: Cont r Int`
2021-02-17 10:09:56 +0100 <whataday> f :: Cont r Int = cont (\ar -> ar (x:: Int))
2021-02-17 10:10:18 +0100 <whataday> and that x is identified constant value
2021-02-17 10:10:42 +0100kenran(~kenran@i577BCDBF.versanet.de)
2021-02-17 10:11:00 +0100 <whataday> f = cont (\k -> k 3) :: Cont r Int
2021-02-17 10:11:12 +0100 <whataday> k :: Int -> r
2021-02-17 10:11:13 +0100 <dminuoso> Right, so that means we sort of "locally resume with an Int" to, eventually, produce something of type `r`
2021-02-17 10:11:15 +0100 <dminuoso> Right?
2021-02-17 10:11:23 +0100 <whataday> yes
2021-02-17 10:12:22 +0100shad0w_(~shad0w@160.202.36.86)
2021-02-17 10:12:55 +0100 <whataday> runCont is just unwrapped function from data type, no magic here
2021-02-17 10:13:10 +0100 <whataday> like cont lift function into data tyt
2021-02-17 10:13:12 +0100 <whataday> type
2021-02-17 10:13:51 +0100 <dminuoso> Okay
2021-02-17 10:14:48 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 10:15:29 +0100 <whataday> g = callCC (\e -> ...) :: m a; runCont g k; what's the relationship between k with e?
2021-02-17 10:15:38 +0100whald(~trem@2a02:810a:8100:11a6:228c:3d0f:ba3a:4e06) (Remote host closed the connection)
2021-02-17 10:16:19 +0100Boomerang(~Boomerang@2a05:f6c7:2179:0:815d:8deb:faba:89c5)
2021-02-17 10:16:31 +0100 <whataday> k :: a->r ; e :: a-> m b
2021-02-17 10:16:42 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 260 seconds)
2021-02-17 10:17:12 +0100kritzefitz(~kritzefit@2003:5b:203b:200::10:49)
2021-02-17 10:17:52 +0100 <iqubic> What's the type of g there? I don't think g can be passed in as an argument to runCont.
2021-02-17 10:18:32 +0100 <whataday> callCC (\e ->...) :: m a, right?
2021-02-17 10:18:34 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 10:18:41 +0100 <whataday> :t callCC
2021-02-17 10:18:42 +0100 <lambdabot> MonadCont m => ((a -> m b) -> m a) -> m a
2021-02-17 10:19:13 +0100 <whataday> so we can runCont on it, right?
2021-02-17 10:19:44 +0100 <iqubic> Yes we can. But only if m is Cont.
2021-02-17 10:20:04 +0100cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0.1)
2021-02-17 10:20:25 +0100 <whataday> yes, so let g = callCC (...) , ok?
2021-02-17 10:20:33 +0100 <whataday> then g :: Cont r a
2021-02-17 10:20:54 +0100 <whataday> context is ( -> r)->r here
2021-02-17 10:21:32 +0100 <whataday> runCont g :: (a->r)->r
2021-02-17 10:21:38 +0100 <whataday> k :: a->r
2021-02-17 10:21:45 +0100 <whataday> runCont g k :: r
2021-02-17 10:22:02 +0100 <dminuoso> whataday: Sorry, was on a call
2021-02-17 10:22:06 +0100 <iqubic> dminuoso: Can you help out here. I don't actually know the right answers here.
2021-02-17 10:22:28 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it)
2021-02-17 10:23:17 +0100cfricke(~cfricke@unaffiliated/cfricke)
2021-02-17 10:24:00 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-02-17 10:24:16 +0100 <whataday> what's confused me is g = callCC (\e -> ...) :: m a; runCont g k; what's the relationship between k with e?
2021-02-17 10:24:18 +0100 <dminuoso> Given `callCC $ \e -> r`, `e` itself is a sort of exception/escape hatch/goto, it aborts the *rest* of the computation
2021-02-17 10:24:32 +0100 <dminuoso> You can call it *anywhere* inside r, even if that's a deeply nested block
2021-02-17 10:24:55 +0100jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-02-17 10:24:55 +0100 <dminuoso> It doesn't matter where, which is why it has type `a -> m b`, in the sense that you can *use* it in any place, `b` is completely free
2021-02-17 10:25:02 +0100 <dminuoso> Say
2021-02-17 10:25:47 +0100 <dminuoso> callCC $ \e -> do { <someCode>; when condition (e 42); <more code> }
2021-02-17 10:26:19 +0100 <iqubic> So, if the condition is true, then the result of this is 42, right?
2021-02-17 10:26:20 +0100 <dminuoso> Consider for starters something like:
2021-02-17 10:26:42 +0100 <whataday> wait a sec, does callCC always need a continuation?
2021-02-17 10:26:47 +0100 <iqubic> And if the condition is true, the more code section should never be evaluated.
2021-02-17 10:26:54 +0100 <iqubic> :t callCC
2021-02-17 10:26:55 +0100 <lambdabot> MonadCont m => ((a -> m b) -> m a) -> m a
2021-02-17 10:26:57 +0100 <dminuoso> iqubic: Well, not the result, but you immediately abort and create the new suspended computation
2021-02-17 10:27:11 +0100 <dminuoso> Note that the entire return type of callCC is still `m a` here
2021-02-17 10:27:15 +0100 <dminuoso> And also note
2021-02-17 10:27:20 +0100 <dminuoso> That this function is of type `a -> m b`
2021-02-17 10:27:25 +0100xelxebar(~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds)
2021-02-17 10:27:28 +0100 <whataday> callCC's result is m a, so it won't produce a constant value, right?
2021-02-17 10:27:30 +0100 <dminuoso> the value you stuff in there, is what is being turned into a suspeded computation at the end
2021-02-17 10:27:34 +0100 <shad0w_> hi all. i think i am still about functional dependencies after encountering them in MonadReader and MonadWriter ?
2021-02-17 10:27:52 +0100xelxebar_(~xelxebar@gateway/tor-sasl/xelxebar)
2021-02-17 10:27:54 +0100 <dminuoso> The point of the `m b` is that you can use it in any place
2021-02-17 10:27:55 +0100 <shad0w_> anywhere i can go to get more intuition about them ?
2021-02-17 10:28:13 +0100 <dminuoso> But the function still demands an `a`, because that's what the entire `callCC <stuff>` produces as an "intermediate result"
2021-02-17 10:28:17 +0100 <shad0w_> still confused*
2021-02-17 10:28:20 +0100 <dminuoso> whataday: Does that make sense?
2021-02-17 10:28:34 +0100 <whataday> dminuoso, (e 42) will produce what as callCC result?
2021-02-17 10:29:05 +0100 <dminuoso> whataday: `e 42` will abort the entire rest of the continuations *inside* the callCC, and transfer control back to the point where callCC was applied.
2021-02-17 10:29:08 +0100 <dminuoso> And then resume with 42.
2021-02-17 10:29:33 +0100 <dminuoso> If you like, you can think of `callCC` as a sort of `catch`, and `e` as a throw.
2021-02-17 10:29:36 +0100 <whataday> dminuoso, but 42 is not :: m a!
2021-02-17 10:29:40 +0100 <whataday> 42::Int
2021-02-17 10:29:46 +0100 <dminuoso> Set `a ~ Int~
2021-02-17 10:29:48 +0100 <dminuoso> Set `a ~ Int`
2021-02-17 10:29:50 +0100 <dminuoso> So we have
2021-02-17 10:30:04 +0100 <dminuoso> `callCC :: ((Int -> M b) -> m Int) -> m Int`
2021-02-17 10:30:07 +0100 <dminuoso> err
2021-02-17 10:30:10 +0100 <dminuoso> `callCC :: ((Int -> m b) -> m Int) -> m Int`
2021-02-17 10:30:20 +0100 <dminuoso> Note the `m b` means, that you're free to write something like:
2021-02-17 10:30:45 +0100 <whataday> 42 isn't m Int
2021-02-17 10:30:50 +0100 <dminuoso> Yes, hold on
2021-02-17 10:31:01 +0100 <dminuoso> callCC $ \e -> do { a <- someThing; when a (e 42); pure 16 }
2021-02-17 10:31:04 +0100 <dminuoso> Note here
2021-02-17 10:31:06 +0100 <dminuoso> % :t when
2021-02-17 10:31:07 +0100 <yahb> dminuoso: forall {f :: * -> *}. Applicative f => Bool -> f () -> f ()
2021-02-17 10:31:10 +0100 <whataday> cont $ \k -> k 42 :: m Int
2021-02-17 10:31:18 +0100 <dminuoso> When *requires* (!) the argument to be of type `m ()` here
2021-02-17 10:32:05 +0100 <dminuoso> whataday: this `m b` is just to satisfy the type system, it sort of says "you can use it anywhere, *regardless* of what the continuation in that spot demands as a result
2021-02-17 10:32:19 +0100 <dminuoso> But the value you stuff in there is specified in the argument, i.e. in the `a` of `a -> m b`
2021-02-17 10:32:24 +0100 <dminuoso> not the return type
2021-02-17 10:32:36 +0100 <dminuoso> the return type just says where you are allowed to use the `e` applied to 42.
2021-02-17 10:32:52 +0100gremax(znc@torba.club) ("Textual IRC Client: www.textualapp.com")
2021-02-17 10:33:03 +0100 <dminuoso> and since `b` is completely polymorphic, it means you can use it *anywhere*. the reason you can use it anywhere, is because it instantly shortcircuits and never resumes there anyway
2021-02-17 10:33:18 +0100 <dminuoso> that is `e 42 :: m ()` is fine
2021-02-17 10:33:28 +0100 <dminuoso> it will never resume at that point anyway
2021-02-17 10:33:45 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 10:33:48 +0100 <dminuoso> it doesnt produce any intermediate result
2021-02-17 10:33:56 +0100 <whataday> but could it be normal? e k :: m b?
2021-02-17 10:33:58 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 10:34:10 +0100 <dminuoso> whataday: You could, perhaps, think of callCC as having the simpler type:
2021-02-17 10:34:23 +0100DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2021-02-17 10:34:24 +0100 <dminuoso> callCC :: MonadCont m => ((a -> m ()) -> m a) -> m a
2021-02-17 10:34:30 +0100 <whataday> not return 42 as callCC result, but return a Cont as its type
2021-02-17 10:34:33 +0100 <dminuoso> This would be equivalent, just more annoying to use.
2021-02-17 10:34:49 +0100 <dminuoso> It's just way more comfortable to allow the return type of that `e` to be arbitrary
2021-02-17 10:34:56 +0100 <dminuoso> It's sort of the same reason why:
2021-02-17 10:34:58 +0100 <dminuoso> % :t throw
2021-02-17 10:34:59 +0100 <yahb> dminuoso: forall {e} {a}. Exception e => e -> a
2021-02-17 10:35:02 +0100 <dminuoso> Or
2021-02-17 10:35:05 +0100 <dminuoso> % :t throwIO
2021-02-17 10:35:06 +0100 <yahb> dminuoso: forall {e} {a}. Exception e => e -> IO a
2021-02-17 10:35:25 +0100 <dminuoso> Note how throwIO applied to an exception is of type `IO a`. You can use this as `IO Int` if you like
2021-02-17 10:35:30 +0100 <dminuoso> Its fine, this will not produce an Int anyway!
2021-02-17 10:35:36 +0100 <dminuoso> It's exactly the same reason here
2021-02-17 10:36:35 +0100 <whataday> 42 :: m () is ok in the type system?
2021-02-17 10:36:45 +0100 <iqubic> No.
2021-02-17 10:36:52 +0100 <iqubic> But that's not the type we have.
2021-02-17 10:36:59 +0100acidjnk_new(~acidjnk@p200300d0c739095955c97cbff9b24e5c.dip0.t-ipconnect.de)
2021-02-17 10:37:02 +0100 <dminuoso> whataday: Consider my example with throwIO perhaps
2021-02-17 10:37:05 +0100 <iqubic> We have "e 42 :: m ()" which is totally fine.
2021-02-17 10:37:08 +0100 <dminuoso> it's less complex and perhaps easier to grasp
2021-02-17 10:37:24 +0100 <whataday> look at callCC type, it always return m a
2021-02-17 10:37:28 +0100 <dminuoso> c_wraith: Yes!
2021-02-17 10:37:30 +0100 <dminuoso> err whataday
2021-02-17 10:37:34 +0100whald(~trem@2a02:810a:8100:11a6:6784:33d1:3a6b:a448)
2021-02-17 10:37:34 +0100 <dminuoso> whataday: Also note, that e *takes* an `a`
2021-02-17 10:37:55 +0100 <iqubic> e :: a -> m b
2021-02-17 10:37:58 +0100 <whataday> if 42 as result to callCC, then 42 has to be m a
2021-02-17 10:38:03 +0100 <dminuoso> So applying `e` to some value of type `a` instantly aborts the inner of callCC and resumes the entirety
2021-02-17 10:38:14 +0100 <iqubic> whataday: But 42 isn't the resutl
2021-02-17 10:38:21 +0100 <iqubic> *result
2021-02-17 10:38:22 +0100 <dminuoso> whataday: Let's switch to throwIO, because I think this is easier.
2021-02-17 10:38:26 +0100 <dminuoso> % :t throwIO
2021-02-17 10:38:27 +0100 <yahb> dminuoso: forall {e} {a}. Exception e => e -> IO a
2021-02-17 10:38:27 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2021-02-17 10:38:35 +0100 <dminuoso> whataday: Do you see how throwIO is completely polymorphic in `a`?
2021-02-17 10:38:55 +0100 <whataday> sorry, I have no experience on throwIO...
2021-02-17 10:39:05 +0100 <dminuoso> whataday: It just throws a plain exception in IO
2021-02-17 10:40:05 +0100 <whataday> ok
2021-02-17 10:40:15 +0100 <dminuoso> The point is, if you write `throwIO someException :: IO Int`, then that's completely fine. This IO action will not actually produce an `Int`, because well an exception is thrown anyway
2021-02-17 10:40:21 +0100 <dminuoso> The value of being able to do this is as follows:
2021-02-17 10:41:16 +0100 <dminuoso> You can write `getInt = do { x <- getLine; case readMaybe x of Just int -> pure int; Nothing -> throwIO (userError "not a number") }
2021-02-17 10:41:29 +0100 <dminuoso> Note, that because of the case expression *both* branches must be of type `IO Int`
2021-02-17 10:41:35 +0100 <whataday> dminuoso, e 42 in callCC would return (\k -> k 42)?
2021-02-17 10:42:09 +0100 <dminuoso> whataday: Right, it'd sort of replace the *entirety* of `callCC $ \e -> ...` with a suspended computation, resuming with 42.
2021-02-17 10:42:21 +0100 <whataday> aha
2021-02-17 10:42:37 +0100 <dminuoso> whataday: The return type of `e` is completely free, because it just says it can be used *locally* anywhere, for the same reason that throwIO is polymorphic in a.
2021-02-17 10:42:43 +0100 <dminuoso> So if we said:
2021-02-17 10:43:44 +0100jonathanx(~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2021-02-17 10:43:46 +0100 <dminuoso> callCC $ \e -> do { x <- someNumber; when (even e) (e 42); pure 16
2021-02-17 10:43:59 +0100 <dminuoso> Note that `when` *demands* its second argument to have a return type of ()
2021-02-17 10:44:01 +0100 <dminuoso> % :t when
2021-02-17 10:44:01 +0100 <yahb> dminuoso: forall {f :: * -> *}. Applicative f => Bool -> f () -> f ()
2021-02-17 10:44:05 +0100 <dminuoso> whataday: Do you see this?
2021-02-17 10:44:32 +0100 <dminuoso> Also we could have:
2021-02-17 10:45:12 +0100 <dminuoso> callCC $ \e -> do { x <- someNumber; str <- if (even e) then (e 42) else getString; ... }
2021-02-17 10:45:19 +0100 <dminuoso> Where getString is of some `m String`
2021-02-17 10:45:29 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 10:45:32 +0100 <dminuoso> Which would mean `e 42 :: m String` too (because of how if-then-else works)
2021-02-17 10:45:41 +0100 <dminuoso> Which is fine, because e 42 will never produce an intermediate result
2021-02-17 10:45:45 +0100 <dminuoso> It aborts the local computation
2021-02-17 10:45:57 +0100 <dminuoso> It's essentially an exception inside cont
2021-02-17 10:46:33 +0100jonathanx(~jonathan@h-176-109.A357.priv.bahnhof.se)
2021-02-17 10:46:49 +0100__monty__(~toonn@unaffiliated/toonn)
2021-02-17 10:47:48 +0100 <dminuoso> In fact, we could write something like callCC in IO too (it'd be highly brittle and error prone)
2021-02-17 10:48:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c97:1fb5:a86c:10a1)
2021-02-17 10:48:38 +0100 <whataday> e :: a -> m b, but where a come from?
2021-02-17 10:48:51 +0100 <dminuoso> whataday: That's your business
2021-02-17 10:49:05 +0100 <dminuoso> whataday: Note how the entirety of `callCC` returns an `m a` right?
2021-02-17 10:49:20 +0100 <dminuoso> That means, the entirety is some suspended computation of intermediate type a
2021-02-17 10:49:22 +0100 <whataday> yes
2021-02-17 10:49:26 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 10:49:35 +0100 <dminuoso> Inside the nested body of `callCC` its your job to come up with some `a`
2021-02-17 10:49:38 +0100borne(~fritjof@200116b864893b0095eb740676c27273.dip.versatel-1u1.de) (Quit: WeeChat 3.0)
2021-02-17 10:49:46 +0100borne(~fritjof@200116b864893b0095eb740676c27273.dip.versatel-1u1.de)
2021-02-17 10:49:50 +0100 <whataday> alright
2021-02-17 10:49:51 +0100 <dminuoso> `e` lets you abort the rest and say "this is that value of type `a`"
2021-02-17 10:50:03 +0100iam(511495c8@200-149-20-81.sta.estpak.ee) (Quit: Connection closed)
2021-02-17 10:50:13 +0100 <dminuoso> Like "stop here. dont go any further. dont proceed. here is the result"
2021-02-17 10:50:23 +0100 <whataday> Cont r a, a must be an identical constant value
2021-02-17 10:50:27 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 10:50:31 +0100 <dminuoso> "identical"?
2021-02-17 10:50:42 +0100 <whataday> identified?
2021-02-17 10:50:50 +0100 <dminuoso> what do you mean by "constant"?
2021-02-17 10:51:04 +0100 <whataday> 3 is constant
2021-02-17 10:51:06 +0100 <whataday> x isn't
2021-02-17 10:51:14 +0100 <dminuoso> Im not sure what you're getting at
2021-02-17 10:51:46 +0100 <whataday> cont (\k -> k 3) :: Cont r a is ok
2021-02-17 10:51:51 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck)
2021-02-17 10:51:57 +0100 <whataday> cont (\k -> k x) isn't
2021-02-17 10:52:05 +0100 <iqubic> Actually, that's fine too.
2021-02-17 10:52:19 +0100 <iqubic> cont (\k -> k x) is totally fine.
2021-02-17 10:52:35 +0100 <dminuoso> shad0w_: The functional dependency on `class Monad m => MonadReader r m | m -> r ` says `r` is uniquely identified by `m`
2021-02-17 10:52:50 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 10:52:55 +0100 <whataday> iqubic then where x is from?
2021-02-17 10:53:02 +0100ubert(~Thunderbi@p200300ecdf25d969e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-02-17 10:53:03 +0100 <whataday> x is undefined
2021-02-17 10:53:19 +0100 <dminuoso> shad0w_: The impact of this is, you cannot write `instance MonadWriter M Int; instance MonadWriter M Float`
2021-02-17 10:53:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c97:1fb5:a86c:10a1) (Ping timeout: 264 seconds)
2021-02-17 10:53:39 +0100 <iqubic> "let f k x = cont (\k -> k x)" is a totally fine and valid function to write.
2021-02-17 10:54:16 +0100 <dminuoso> shad0w_: Or in other words, a given type T with an `instance MonadWriter T E` has precisely one environment type E, and the compiler can infer `E` automatically from knowing T.
2021-02-17 10:54:36 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 240 seconds)
2021-02-17 10:54:47 +0100 <whataday> but x need to be concreted to be an instance of Cont r a
2021-02-17 10:55:20 +0100 <iqubic> whataday: I don't think so.
2021-02-17 10:55:26 +0100 <iqubic> % :t cont
2021-02-17 10:55:26 +0100 <yahb> iqubic: forall {a} {r}. ((a -> r) -> r) -> Cont r a
2021-02-17 10:55:38 +0100 <iqubic> % let f k x = cont (\k -> k x)
2021-02-17 10:55:39 +0100 <yahb> iqubic:
2021-02-17 10:55:44 +0100 <iqubic> % :t f
2021-02-17 10:55:45 +0100 <yahb> iqubic: forall {p} {a} {r}. p -> a -> Cont r a
2021-02-17 10:55:53 +0100 <iqubic> See, that's a totally valid function.
2021-02-17 10:57:01 +0100 <dminuoso> shad0w_: Oh, and I mistakingly flipped the arguments of MonadWriter there, that was my bad
2021-02-17 10:57:24 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 10:57:37 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 10:58:48 +0100 <whataday> I don't know how to describe
2021-02-17 10:59:12 +0100 <idnar> "View patterns are not supported in th-desugar. Use pattern guards instead."
2021-02-17 10:59:21 +0100 <whataday> cont (\k -> k 42) :: Cont r Int
2021-02-17 10:59:37 +0100jollygood2(~bc8134e3@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
2021-02-17 10:59:39 +0100 <whataday> cont (\k -> k x) :: ?
2021-02-17 10:59:53 +0100 <whataday> x is undefined
2021-02-17 10:59:56 +0100 <idnar> case leverage b q of
2021-02-17 10:59:56 +0100 <idnar> [] -> Nothing
2021-02-17 10:59:56 +0100 <idnar> ls@(_:_) -> Just (maximum ls)
2021-02-17 10:59:56 +0100 <idnar> where is the view pattern?
2021-02-17 11:00:05 +0100 <iqubic> whataday: cont (\k -> k x) :: Cont r a, where x :: a
2021-02-17 11:00:23 +0100 <whataday> yes, you can use a function to return Cont r a
2021-02-17 11:00:46 +0100 <whataday> but only when you call that function, and it then return a Cont r a value
2021-02-17 11:00:53 +0100 <iqubic> Yes. Correct.
2021-02-17 11:01:09 +0100deviantfero(~deviantfe@190.150.27.58) (Ping timeout: 264 seconds)
2021-02-17 11:01:21 +0100 <whataday> but a Cont r a value, a is already defined in that value
2021-02-17 11:01:45 +0100 <whataday> concreted like constant 3
2021-02-17 11:02:08 +0100 <iqubic> Where does the 'a' value for 'cont (\k -> k 3)' get defined?
2021-02-17 11:03:00 +0100 <iqubic> % let f x = cont (\k -> k x)
2021-02-17 11:03:00 +0100 <yahb> iqubic:
2021-02-17 11:03:01 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 11:03:25 +0100 <lemmih> % :t cont (\k -> k undefined)
2021-02-17 11:03:26 +0100 <yahb> lemmih: forall {r} {a}. Cont r a
2021-02-17 11:03:28 +0100 <whataday> class C(val x: Int); val t1 = C(3); val t2=C(5); that t1.x isn't t2.x
2021-02-17 11:03:35 +0100anuur(~anuur@129.205.124.188) (Quit: afk)
2021-02-17 11:03:41 +0100 <iqubic> Haskell doesn't have classes.
2021-02-17 11:03:49 +0100 <whataday> your function is like that class C
2021-02-17 11:04:06 +0100 <whataday> a Cont r a value like that instances of C
2021-02-17 11:04:40 +0100 <iqubic> I don't think you can compare haskell functions and C classes like that. They ware way too different.
2021-02-17 11:04:51 +0100 <whataday> haskell has class IIRC
2021-02-17 11:05:01 +0100 <whataday> even I never use it
2021-02-17 11:05:21 +0100airspace_(~airspace@90.218.153.39) (Ping timeout: 264 seconds)
2021-02-17 11:05:27 +0100 <iqubic> type classes in Haskell are quite different from classes in other programming languages. You just cannot compare the two.
2021-02-17 11:05:28 +0100 <whataday> data type could trans to class
2021-02-17 11:05:30 +0100 <lemmih> whataday: Classes in Haskell are a completely different concept from classes in most object-oriented languages.
2021-02-17 11:06:01 +0100Neuromancer(~Neuromanc@unaffiliated/neuromancer) (Read error: Connection reset by peer)
2021-02-17 11:06:36 +0100 <whataday> I don't know hwo to describe
2021-02-17 11:07:08 +0100 <whataday> return 3 :: Cont r Int is ok
2021-02-17 11:07:25 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 11:07:28 +0100 <whataday> return x , ghci will ask where x is defined, right?
2021-02-17 11:08:02 +0100 <lemmih> With you so far.
2021-02-17 11:08:24 +0100 <iqubic> If x isn't currently defined, then it will fail. But that's the same as asking ghci to compute the value of "x + y"
2021-02-17 11:08:44 +0100 <lemmih> whataday: That has nothing to do with 'Cont', though.
2021-02-17 11:09:03 +0100 <iqubic> % x + y
2021-02-17 11:09:03 +0100 <yahb> iqubic: ; <interactive>:251:1: error:; * No instance for (Num (Maybe Int)) arising from a use of `+'; * In the expression: x + y; In an equation for `it': it = x + y
2021-02-17 11:09:20 +0100 <iqubic> > num1 + num2
2021-02-17 11:09:22 +0100 <lambdabot> error: Variable not in scope: num1error: Variable not in scope: num2
2021-02-17 11:09:42 +0100 <iqubic> Right. So, GHCI has no idea what num1 and num2 should be, so it fails.
2021-02-17 11:09:48 +0100 <whataday> what I tried to say is a concreted value k:: Cont r a; then a is already concreted in k
2021-02-17 11:10:08 +0100Neuromancer(~Neuromanc@unaffiliated/neuromancer)
2021-02-17 11:10:31 +0100 <lemmih> whataday: Could you explain what you mean by 'concrete'? What's the different between a concrete value and a non-concrete value?
2021-02-17 11:10:52 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 11:11:03 +0100 <iqubic> @define add x y = x + y
2021-02-17 11:11:04 +0100 <lambdabot> Defined.
2021-02-17 11:11:13 +0100 <iqubic> Are x and y concrete there or not?
2021-02-17 11:11:49 +0100viluon(uid453725@gateway/web/irccloud.com/x-lltmwurqyylsxzbx)
2021-02-17 11:12:50 +0100 <whataday> not
2021-02-17 11:12:59 +0100fendor(~fendor@178.165.131.69.wireless.dyn.drei.com)
2021-02-17 11:13:00 +0100 <whataday> I just mean defined or identified
2021-02-17 11:13:03 +0100 <whataday> constant
2021-02-17 11:13:36 +0100dhil(~dhil@80.208.56.181)
2021-02-17 11:13:49 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 11:14:09 +0100 <iqubic> lemmih: I think they're using concrete to mean "integer or string literal that has been hard coded into the program"
2021-02-17 11:15:07 +0100 <lemmih> whataday: So 'x' is not concrete in this example: f x = cont (\k -> k x) ?
2021-02-17 11:16:51 +0100 <whataday> f is a defined value , f 3 is a defined value, f x isn't
2021-02-17 11:16:56 +0100 <whataday> x isn't defined
2021-02-17 11:16:56 +0100pera(~pera@unaffiliated/pera) (Quit: leaving)
2021-02-17 11:17:11 +0100kenran(~kenran@i577BCDBF.versanet.de) (Quit: leaving)
2021-02-17 11:17:20 +0100 <lemmih> Can't we define it to be the first argument of the function 'f'?
2021-02-17 11:18:53 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 11:19:29 +0100thc202(~thc202@unaffiliated/thc202)
2021-02-17 11:19:40 +0100 <merijn> What does "concrete value" even mean?
2021-02-17 11:19:49 +0100 <merijn> That seems like made up terminology
2021-02-17 11:20:17 +0100 <whataday> if x isn't defined, what you expect k will work on?
2021-02-17 11:20:30 +0100 <whataday> k is defined by passing parameter when call
2021-02-17 11:20:30 +0100 <lemmih> whataday: Okay, let's forget about 'x'. How about this code: cont (\k -> k undefined) ? Here 'undefined' does not have a value but it's still valid Haskell code.
2021-02-17 11:20:47 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-02-17 11:21:06 +0100 <whataday> sorry I should use defined value
2021-02-17 11:21:11 +0100 <lemmih> whataday: But 'k' is called in the function 'f' so 'x' will always have a value.
2021-02-17 11:21:33 +0100 <Uniaika> merijn: some people will use "concrete value" to mean "something that is not in a container". Like 3 would be a concrete value but [3] wouldn't be
2021-02-17 11:23:16 +0100 <whataday> f x = cont (\k -> k x); is f x a value?
2021-02-17 11:23:30 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 11:23:43 +0100 <whataday> f is a value, f 3 is a value, f "a" is a value
2021-02-17 11:23:50 +0100 <whataday> f x is a value?
2021-02-17 11:24:05 +0100 <iqubic> If x is defined in the current context, then yes.
2021-02-17 11:24:06 +0100 <whataday> x isn't defined, how f x is a value?
2021-02-17 11:24:14 +0100 <lemmih> whataday: 'f x' is a continuation. It's both a value and a function.
2021-02-17 11:24:26 +0100 <whataday> so u see, if x is defined
2021-02-17 11:24:51 +0100 <whataday> so Cont r a, if a is defined
2021-02-17 11:25:17 +0100 <iqubic> Cont r a is a type, and not a value.
2021-02-17 11:25:36 +0100 <lemmih> whataday: If 'x' wasn't defined then code wouldn't even be valid Haskell.
2021-02-17 11:25:54 +0100 <merijn> Uniaika: The problem with making up terms and not defining them is that nobody but you knows wtf you mean :)
2021-02-17 11:25:55 +0100 <whataday> cont $ \k -> k x is a value only if x is defined!
2021-02-17 11:26:12 +0100 <merijn> whataday: What do you mean by "is defined"?
2021-02-17 11:26:29 +0100 <whataday> x = 42, x is defined
2021-02-17 11:26:48 +0100giogiogio(5e89ad7c@94.137.173.124) (Quit: Connection closed)
2021-02-17 11:26:56 +0100 <whataday> yes, sorry for the term I made ip
2021-02-17 11:26:58 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2021-02-17 11:27:14 +0100 <iqubic> But when I write "f x = cont (\k -> k x)" then x will have a set value. 'x' take on whatever the first value passed to 'f' by the caller is.
2021-02-17 11:27:16 +0100 <merijn> whataday: I mean, if there is not variable named 'x' in scope then you example is s a compile error?
2021-02-17 11:27:19 +0100 <lemmih> whataday: I guess that is true but that has nothing to do with 'Cont'. In all Haskell code, you cannot reference anything that has not been defined.
2021-02-17 11:28:17 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 11:28:25 +0100 <whataday> just like I'd call Just Int as type notation for myself, Just 3 is a value has Maybe Int type, but Just Int made me know what its value look like
2021-02-17 11:29:07 +0100 <merijn> whataday: "Just Int" is also a compiler error?
2021-02-17 11:29:43 +0100 <iqubic> whataday: "Just Int" isn't a type. The type of "Just 3" is "Maybe Int"
2021-02-17 11:29:54 +0100 <lemmih> % Just @Int 3 -- Type variables to the rescue!
2021-02-17 11:29:55 +0100 <yahb> lemmih: Just 3
2021-02-17 11:30:10 +0100 <iqubic> % Nothing @(Maybe Int)
2021-02-17 11:30:11 +0100 <yahb> iqubic: Nothing
2021-02-17 11:30:29 +0100 <iqubic> That's another valid value of the type Maybe Int.
2021-02-17 11:30:30 +0100 <whataday> yes like I said it just help me know its value look like
2021-02-17 11:30:33 +0100 <merijn> lemmih: I mean, that's definitely not helping lessen any confusion
2021-02-17 11:30:58 +0100 <whataday> I never said Just Int is valid
2021-02-17 11:31:14 +0100 <whataday> it isn't a value neither a type
2021-02-17 11:31:41 +0100 <iqubic> You literally said "just like I'd call Just Int as type notation..."
2021-02-17 11:32:05 +0100 <whataday> did u see I said term I made up before
2021-02-17 11:32:07 +0100 <lemmih> whataday: Coming up with new concepts and notations can sometimes be helpful but it does make it nearly impossible to communicate with other people. Richard Feynman gave up on his custom notation for trigonometry because no-one else could understand what he wrote.
2021-02-17 11:32:35 +0100 <whataday> there's no term type notation right?
2021-02-17 11:32:46 +0100 <whataday> I just made it up
2021-02-17 11:32:49 +0100 <iqubic> What is term type notation?
2021-02-17 11:32:53 +0100 <iqubic> What do you mean by that?
2021-02-17 11:32:54 +0100 <whataday> for myself
2021-02-17 11:33:14 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 11:33:52 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
2021-02-17 11:34:34 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
2021-02-17 11:35:40 +0100 <iqubic> If you make up term and then try to use it conversation is going to confuse everyone, including yourself.
2021-02-17 11:36:03 +0100 <iqubic> *it is going to
2021-02-17 11:36:57 +0100 <lemmih> whataday: When you say 'type notation', my mind goes to how types are written in Haskell. If it has a different meaning to you then I'll probably be confused.
2021-02-17 11:39:28 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 11:40:53 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
2021-02-17 11:42:24 +0100 <iqubic> whataday: In the function "add x y = x + y" then "add :: Int -> Int -> Int" and "x :: Int" and "y :: Int". Both x and y are defined here. If they weren't defined, then Haskell would reject this function.
2021-02-17 11:43:10 +0100hnOsmium0001(uid453710@gateway/web/irccloud.com/x-lcvdymuwotphajrf) (Quit: Connection closed for inactivity)
2021-02-17 11:44:03 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 11:48:25 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 11:52:55 +0100jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-02-17 11:53:41 +0100xelxebar_(~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection)
2021-02-17 11:54:01 +0100xelxebar(~xelxebar@gateway/tor-sasl/xelxebar)
2021-02-17 11:54:27 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 11:57:12 +0100neiluj(~jco@91-167-203-101.subs.proxad.net)
2021-02-17 11:57:12 +0100neiluj(~jco@91-167-203-101.subs.proxad.net) (Changing host)
2021-02-17 11:57:12 +0100neiluj(~jco@unaffiliated/neiluj)
2021-02-17 11:58:00 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1)
2021-02-17 12:00:14 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2021-02-17 12:01:18 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 12:06:22 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 12:09:00 +0100mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 246 seconds)
2021-02-17 12:09:15 +0100 <edwardk> linear haskell is a nice head trip when it works
2021-02-17 12:13:48 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
2021-02-17 12:13:55 +0100idhugo_(~idhugo@80-62-117-86-mobile.dk.customer.tdc.net)
2021-02-17 12:15:31 +0100 <siraben> edwardk: what sort of things are you doing with linear types?
2021-02-17 12:16:06 +0100 <edwardk> right now just getting linear array types for the things in prim. then going through and re-rolling a form of structs on top of it, then playing around a bit with transients
2021-02-17 12:16:29 +0100idhugo(~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 265 seconds)
2021-02-17 12:16:42 +0100 <edwardk> maybe seeing how to improve ST s interop, since you can sort of locally borrow those arrays with a fresh 's' region
2021-02-17 12:17:09 +0100 <siraben> nice. I wonder how linear types interacts with C FFI, might be nice to have some typesafe resource handles
2021-02-17 12:17:15 +0100 <edwardk> using the muscle memory gathering exercise of supporting all the types in primitive as a starting point
2021-02-17 12:17:25 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 12:17:41 +0100 <edwardk> i was kicking around using it for managing external ffi resources for things like fontconfig/freetype/harfbuzz
2021-02-17 12:17:45 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-02-17 12:17:58 +0100 <edwardk> but t.b.h. foreignptr works pretty well for most of those
2021-02-17 12:18:27 +0100 <edwardk> there's also something fundamentally bugging me about the only real array primitives it offers having to hold non-linear values
2021-02-17 12:18:33 +0100 <edwardk> that can be fixed by rolling my own
2021-02-17 12:18:59 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 12:19:03 +0100 <edwardk> but when i go play with the idea there's something that has me trying to find a way to _not_ pass a whole array back in the return type. but then tokens for access feels a lot like ST s in the first place
2021-02-17 12:19:25 +0100 <edwardk> on the other other hand, passing around explicit State# s %1 -> ...'s everywhere might just work
2021-02-17 12:19:45 +0100 <edwardk> where each array gets its own 'access token' using an existential
2021-02-17 12:19:50 +0100 <edwardk> and so i ca bury it in a structure
2021-02-17 12:20:08 +0100 <edwardk> but only pass around the 0-width access tokens
2021-02-17 12:20:44 +0100 <edwardk> this is all 'hey i haven't given LinearTypes in haskell a serious tire kick in a long time, let's see how it goes'
2021-02-17 12:20:57 +0100dunj3(~dunj3@p200300f61714a6925c87873f9ac9c753.dip0.t-ipconnect.de)
2021-02-17 12:21:03 +0100 <edwardk> not yet to the level of any serious inquiry
2021-02-17 12:21:31 +0100Boomerang(~Boomerang@2a05:f6c7:2179:0:815d:8deb:faba:89c5) (Ping timeout: 265 seconds)
2021-02-17 12:21:37 +0100 <edwardk> limitations like lack of pattern synonyms have bit me already. if 9.2 can get unlifted data types i get more usecases.
2021-02-17 12:21:56 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 12:22:49 +0100 <iqubic> What ascii compatible syntax has the community decided on for Linear Types. I know there were a few options floating around, and I'm unsure of what the final consensus was.
2021-02-17 12:22:55 +0100 <iqubic> *?
2021-02-17 12:24:03 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-02-17 12:24:11 +0100 <edwardk> %1
2021-02-17 12:24:35 +0100 <edwardk> x %1 -> y -- is an arrow that consumes one 'x' to consume one 'y'
2021-02-17 12:24:38 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 12:24:42 +0100 <edwardk> er rather
2021-02-17 12:25:06 +0100 <edwardk> if you want to consume the value that is the result of the arrow (y) you need to consume one input to the arrow
2021-02-17 12:25:23 +0100lestrrat(~lestrrat@139.28.218.148) (Ping timeout: 265 seconds)
2021-02-17 12:25:30 +0100 <edwardk> and 1 there can be swapped out for type a type variable with kind Multiplicity. (i think that part is still wonky)
2021-02-17 12:25:57 +0100 <iqubic> Oh, multiplicity is going to be a thing? Cool...
2021-02-17 12:26:13 +0100 <edwardk> multiplicity = 'One or 'Many right now
2021-02-17 12:26:20 +0100desophos(~desophos@c-24-14-63-128.hsd1.il.comcast.net) (Quit: Leaving)
2021-02-17 12:27:06 +0100 <iqubic> Will we be able to specify things like "this function will consume this parameter exactly twice?"
2021-02-17 12:27:09 +0100 <edwardk> i can't go all graded modal type theory and make a fixed size buffer of size 60 and give you a 'write pass' with 60 uses on your punch card
2021-02-17 12:27:14 +0100 <edwardk> no
2021-02-17 12:27:30 +0100 <edwardk> its linear or normal. but sometimes its worth quantifying over that
2021-02-17 12:28:46 +0100 <iqubic> It seems rather redundant when to write "%1" when it seems like a simple "%" would work to tag a given arrow as linear.
2021-02-17 12:29:02 +0100 <edwardk> you can put a variable over there to quantify though.
2021-02-17 12:29:10 +0100 <iqubic> How so?
2021-02-17 12:29:11 +0100cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0.1)
2021-02-17 12:29:33 +0100cfricke(~cfricke@unaffiliated/cfricke)
2021-02-17 12:29:39 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-02-17 12:29:47 +0100 <boxscape> the idea is also to possibly use the % syntax for more modifiers in the future, unrelated to multiplicity
2021-02-17 12:30:17 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 12:30:17 +0100 <edwardk> well, when playing around with references earlier, i wound up writing a reference type that looked like Ref m a which was a reference with multiplicity m. Ref 'One a would hold a linear resource and could only be swapped. and Ref 'Many a would hold a normal data type, and so you could get/set it
2021-02-17 12:30:25 +0100 <boxscape> (see https://github.com/ghc-proposals/ghc-proposals/pull/370)
2021-02-17 12:30:37 +0100 <iqubic> Sorry if these are simple questions. I haven't really read the GHC user's guide to learn about these changes. I know what linear types are, but I have zero idea how they are implemented in GHC.
2021-02-17 12:30:49 +0100 <edwardk> now in this case it turned out to be dumb, because Ref 'One a ~ a
2021-02-17 12:30:55 +0100 <edwardk> and Ref 'Many a ~ Ur a
2021-02-17 12:31:12 +0100 <edwardk> iqubic: no worries, i started seriously playing with this a few hours ago
2021-02-17 12:31:13 +0100 <iqubic> Right. That makes sense.
2021-02-17 12:31:41 +0100 <edwardk> but you can envision that Ref m a % m -> a -- is a thing
2021-02-17 12:31:54 +0100Cthalupa(~cthulhu@47.186.47.75) (Ping timeout: 272 seconds)
2021-02-17 12:32:04 +0100 <edwardk> Ref 'Many a -> a -- gets a normal value your using a normal arrow because x %'Many -> y is x -> y
2021-02-17 12:32:20 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 12:32:24 +0100 <edwardk> Ref 'One a %'One -> a -- is a linear arrow
2021-02-17 12:32:38 +0100Cthalupa(~cthulhu@47.186.47.75)
2021-02-17 12:32:51 +0100 <boxscape> iqubic btw AFAIK you can also still use a ⊸ b if unicode syntax is enabled
2021-02-17 12:33:03 +0100 <boxscape> for linear arrows
2021-02-17 12:33:04 +0100 <edwardk> my dawning realization that 'of course they are the same' came when i lookat it and realized i could pass 'a' everywhere i was passing Ref 'One a
2021-02-17 12:33:05 +0100kuribas(~user@ptr-25vy0i859tq5jdi8x32.18120a2.ip6.access.telenet.be)
2021-02-17 12:33:22 +0100 <iqubic> boxscape: I don't have a good way to type that, so I'll stick with the '%' syntax.
2021-02-17 12:33:29 +0100 <boxscape> that's fair
2021-02-17 12:33:58 +0100 <edwardk> boxscape: i always feel so conflicted about typing ⊸ because editors are so bad at formatting it in fixed sized fonts
2021-02-17 12:34:09 +0100 <boxscape> yeah that makes sense
2021-02-17 12:34:41 +0100 <edwardk> also i keep waffling between grouping the %1-> with the arrow, or with the data type on the left in my head
2021-02-17 12:35:01 +0100 <edwardk> i'm slowly moving away from thinking of it as part of the arrow and just as a sort of annotation you put on argument things
2021-02-17 12:35:13 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 12:35:35 +0100 <iqubic> FWIW, I've got emacs set up to use a monospace font, so all glyphs are the same width for me, including that unicode one.
2021-02-17 12:35:57 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-02-17 12:35:58 +0100 <edwardk> my problem is in the font i use, its one char wide but overflows and looks ugly
2021-02-17 12:36:15 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 12:36:18 +0100raym(~ray@45.64.220.98) (Ping timeout: 265 seconds)
2021-02-17 12:36:22 +0100 <boxscape> the proposal about modifiers I linked above suggests `Int %Matchable %Many -> Bool` as possible future syntax - matchability is I think more clearly associated with the arrow
2021-02-17 12:37:28 +0100 <iqubic> I don't even know which font font that glyph is coming from, as I have a number of fallback fonts that emacs searches through to find the correct glyph.
2021-02-17 12:37:31 +0100 <edwardk> yeah
2021-02-17 12:37:49 +0100kam1(~kam1@83.123.64.17)
2021-02-17 12:37:57 +0100 <edwardk> i still want %1 => linear constraints
2021-02-17 12:38:14 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 265 seconds)
2021-02-17 12:38:29 +0100 <iqubic> What semantics would that imply? I don't even know how to interpert that.
2021-02-17 12:38:43 +0100 <edwardk> it is a constraint you must use once
2021-02-17 12:39:19 +0100 <edwardk> consider something like (?foo :: Int) which i can get the compiler to plumb around like a poor man's Reader Int argument
2021-02-17 12:39:37 +0100 <edwardk> but when I move from Int to Int %1-> i lose the equivalent in =>
2021-02-17 12:39:51 +0100 <iqubic> Right. That makes sense.
2021-02-17 12:40:04 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 12:40:10 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2021-02-17 12:40:29 +0100 <boxscape> edwardk did you play with the linear implicit parameters ghc had from 5.04 to 6.4? (I didn't)
2021-02-17 12:40:39 +0100 <edwardk> yes they sucked
2021-02-17 12:40:43 +0100 <boxscape> I see :)
2021-02-17 12:40:43 +0100hc_hc
2021-02-17 12:40:52 +0100 <edwardk> broke eta-reduction =)
2021-02-17 12:40:57 +0100 <boxscape> sounds interesting
2021-02-17 12:41:21 +0100 <edwardk> i had one semi legitimate use iirc
2021-02-17 12:41:29 +0100 <iqubic> How do you break eta-reduction?
2021-02-17 12:42:01 +0100 <edwardk> sorry, it was beta
2021-02-17 12:42:08 +0100 <iqubic> converting "\x -> abs x" into "abs" shouldn't be too hard... right?
2021-02-17 12:42:35 +0100mananamenos(~mananamen@37.red-88-27-26.staticip.rima-tde.net)
2021-02-17 12:42:48 +0100 <edwardk> consider (f x) -- i have to split and pass my linear implicit parameter to both branch, but if i do the reduction and f is id, i wouldn't split
2021-02-17 12:43:02 +0100 <iqubic> Are you sure you mean beta? https://wiki.haskell.org/Beta_reduction
2021-02-17 12:43:11 +0100 <edwardk> because the beta reduced form would be x
2021-02-17 12:43:22 +0100 <edwardk> id x = (\y -> y) x = x
2021-02-17 12:43:29 +0100 <iqubic> Right. I agree.
2021-02-17 12:44:07 +0100 <edwardk> but with linear implicit params the former would get you to split the linear implicit parameter and feed one to f, and the other to x in the former case, while the other would just get your unsplit parameter
2021-02-17 12:44:29 +0100 <iqubic> Does Haskell have implicit params?
2021-02-17 12:44:42 +0100 <edwardk> haskell has implicit params, it used to have 'linear implicit params'
2021-02-17 12:45:02 +0100 <edwardk> which could be used to say sneak a RNG seed around in your source code so that every use site got a distinct one
2021-02-17 12:45:12 +0100 <edwardk> by splitting at every fork where both the left and right wanted it
2021-02-17 12:46:00 +0100 <iqubic> Yeah that makes sense.
2021-02-17 12:46:02 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-02-17 12:47:06 +0100 <iqubic> So, linear types exist in Haskell now. Does this mean we need to rewrite large chunks of the Prelude to make a Linear-Prelude?
2021-02-17 12:47:07 +0100 <edwardk> my recollection is that as i joined the community in 2006 or so this was that a portion of the community was being paid buy the guy who built shop.com to work on happs a web front end in haskell and they refactored it like crazy to use that feature... and happstack was forked off to salvage the former design when someone got disgusted and quit. (i apologize for any gross mischaracterization of lemmih's, shapr's, etc.'s positions)
2021-02-17 12:47:10 +0100raym(~ray@182.66.189.165)
2021-02-17 12:47:22 +0100 <edwardk> there is a linear-base package that shipped from tweag with 9.0
2021-02-17 12:47:42 +0100 <edwardk> basically you have to really work to use linearity right now
2021-02-17 12:47:47 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 12:47:56 +0100raym(~ray@182.66.189.165) (Read error: Connection reset by peer)
2021-02-17 12:48:11 +0100 <boxscape> % let ?foo = 5 in (?foo + 6 :: (?foo :: Int) => Int) -- a simple example of the (non-linear) implicit parameters ghc still has
2021-02-17 12:48:12 +0100 <yahb> boxscape: 11
2021-02-17 12:48:26 +0100 <edwardk> yeah
2021-02-17 12:48:43 +0100 <edwardk> i use them quite a bit more seriously than that
2021-02-17 12:49:19 +0100danvet_(~danvet@212-51-149-181.fiber7.init7.net)
2021-02-17 12:49:37 +0100 <iqubic> Ah. Right. I recall reading about that on OCharles's 24 Days of Haskell Extentsions series a while ago: https://ocharles.org.uk/blog/posts/2014-12-11-implicit-params.html
2021-02-17 12:49:41 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c97:1fb5:a86c:10a1)
2021-02-17 12:50:01 +0100 <edwardk> e.g. when working on a little toy rendering pipeline, i started with using a little bit of this to make it easier to plumb in some runtime settings without reader clutter. https://github.com/ekmett/codex/blob/master/engine/src/Engine/Shader/Include.hs#L69
2021-02-17 12:50:17 +0100 <edwardk> then it grew to pass caches around https://github.com/ekmett/codex/blob/master/engine/src/Engine/Shader/Include.hs#L140
2021-02-17 12:50:34 +0100 <edwardk> tools for watching directories for changes https://github.com/ekmett/codex/blob/master/engine/src/Engine/Shader/Include.hs#L152
2021-02-17 12:50:45 +0100 <iqubic> What is this supposed to render? Is it just a generic set of OpenGL bindings or what?
2021-02-17 12:51:10 +0100 <edwardk> and finally to make an outer loop https://github.com/ekmett/codex/blob/master/engine/src/Engine.hs#L48
2021-02-17 12:51:17 +0100 <edwardk> well, lets look at that top level call
2021-02-17 12:51:29 +0100 <edwardk> type GivenSetupInfo = (GivenShaderDir, GivenIncludeCache, GivenWindow); type GivenFrameInfo = (GivenInput, GivenEvents)
2021-02-17 12:51:38 +0100 <edwardk> withEngine :: MonadUnliftIO m => (GivenSetupInfo => ((GivenFrameInfo => m a) -> m ()) -> m ()) -> m ()
2021-02-17 12:51:41 +0100 <edwardk> is a bit of a mouthful
2021-02-17 12:51:53 +0100 <edwardk> but swap m out for IO
2021-02-17 12:51:58 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 12:52:00 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 12:52:14 +0100 <edwardk> and we get (GivenSetupInfo => ((GivenFrameInfo => IO a) -> IO ()) -> IO ()) -> IO () -- which is like two trips through Cont
2021-02-17 12:52:19 +0100 <edwardk> still nuts to read
2021-02-17 12:52:24 +0100 <edwardk> but lets see it used
2021-02-17 12:52:41 +0100 <iqubic> Yeah, that's crazy.
2021-02-17 12:52:41 +0100 <edwardk> https://github.com/ekmett/codex/blob/master/engine/example.hs
2021-02-17 12:52:51 +0100 <edwardk> you start in IO. i don't take you out of your monad.
2021-02-17 12:53:04 +0100raym(~ray@45.64.220.142)
2021-02-17 12:53:39 +0100 <iqubic> That's a surprisingly simple invocation for such a complicated looking function
2021-02-17 12:53:42 +0100 <edwardk> in the function you pass me, you have full access to the OpenGL window, knowledge of where shaders are located and a fancy include cache, so i can make shaders automatically recompile behind your back
2021-02-17 12:54:03 +0100 <edwardk> and i give YOU a function you call back after you set up all your fonts, textures, etc. and other resources
2021-02-17 12:54:25 +0100 <edwardk> and i'll call your function with 'what has changed'. you get the input keystrokes, etc. also as implicit parameters
2021-02-17 12:54:36 +0100 <edwardk> and any functions you call? they don't pay for what they don't use
2021-02-17 12:54:38 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c97:1fb5:a86c:10a1) (Ping timeout: 264 seconds)
2021-02-17 12:54:59 +0100 <iqubic> So basically, once the user has set up all the fonts, textures, and other stuff, they can call drive?
2021-02-17 12:55:01 +0100 <merijn> edwardk: Do you have a blogpost/whatever explaining this stuff?
2021-02-17 12:55:02 +0100 <edwardk> if they don't need the shader directory ? the opengl window? the include cache? the current keystroke data? it doesn't get passed there!
2021-02-17 12:55:07 +0100 <merijn> Sounds neat
2021-02-17 12:55:09 +0100 <iqubic> That's really really cool.
2021-02-17 12:55:10 +0100 <edwardk> merijn: nah, just a couple rants in here
2021-02-17 12:55:16 +0100 <edwardk> yeah
2021-02-17 12:55:20 +0100 <edwardk> and after drive they clean up
2021-02-17 12:55:28 +0100 <merijn> edwardk: Copy paste them from the logs to a blog so I can read them? ;)
2021-02-17 12:55:30 +0100 <edwardk> drive handles the window interactions, etc.
2021-02-17 12:55:39 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 12:55:43 +0100 <edwardk> you have a scrollback buffer ;)
2021-02-17 12:55:43 +0100 <iqubic> Right. I love this concept.
2021-02-17 12:56:03 +0100 <edwardk> iqubic: this works for basically anything you could write as ReaderT e IO
2021-02-17 12:56:18 +0100 <edwardk> the 'readert' pattern that snoyman and bitonic pushed on the community a while back
2021-02-17 12:56:36 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 12:56:47 +0100 <edwardk> if you have IO at the bottom of your stack, that covers ReaderT e obviously, but ReaderT (IORef s) IO -- is just a more efficient StateT s IO
2021-02-17 12:56:59 +0100 <edwardk> and here the 'state' parameter isn't passed to any code that isn't using it
2021-02-17 12:57:05 +0100 <bitonic> i didn't do much pushing, but i do like it :)
2021-02-17 12:57:07 +0100 <iqubic> Yeah. But I assume using a Reader instead of implicit params makes the code harder to read.
2021-02-17 12:57:07 +0100 <edwardk> no putting it into tuples and taking it right out
2021-02-17 12:57:29 +0100 <bitonic> the main reason why i like it is that i use a function from `async` every other line
2021-02-17 12:57:34 +0100 <iqubic> Also, using implicit params makes sure that only the parts you are actually using get passed along.
2021-02-17 12:57:36 +0100 <edwardk> well, the key here is the semantics are subtly off if you ever would use 'local'
2021-02-17 12:57:42 +0100 <edwardk> lets see why
2021-02-17 12:57:55 +0100 <iqubic> I think I can see where this is going, but I'll let you explain.
2021-02-17 12:58:00 +0100 <edwardk> because say you have a constraint like GivenFoo = (?foo:: Foo)
2021-02-17 12:58:23 +0100 <iqubic> Isn't that just a type synonym, and not a constraint?
2021-02-17 12:58:25 +0100 <edwardk> Foo -> (Foo -> a) is different than GivenFoo => GivenFoo => a
2021-02-17 12:58:44 +0100 <dminuoso> edwardk: I guess one major benefit is that this is very compositional in the environment. With ReaderT you're essentially tied to one humongous environment (or you have to explicitly `local`, but that's very annoying if you need a part of a product type here, and another part of a product type there.
2021-02-17 12:58:45 +0100 <edwardk> the former i can readily pass two different Foos
2021-02-17 12:59:03 +0100 <boxscape> iqubic the kind of (?foo :: Foo) is Constraint
2021-02-17 12:59:13 +0100 <iqubic> I see that now.
2021-02-17 12:59:37 +0100 <edwardk> dminuoso: yeah, using the megalithic reader pattern folks use, you have to pattern match to get out your parts by hand, or pass too much down into any individual function. so to get it to optimize relies fundamentally on case-of-case analysis
2021-02-17 12:59:45 +0100 <edwardk> that can sometimes work when you aren't terribly polymorphic
2021-02-17 12:59:50 +0100 <edwardk> but if you fall into the lens like pattern of using
2021-02-17 13:00:08 +0100 <edwardk> (MonadReader e m, HasFoo e, HasBar e, HasBaz e) => ...
2021-02-17 13:00:17 +0100 <iqubic> lenses and implicit params don't seem like they'd go well together.
2021-02-17 13:00:22 +0100 <edwardk> then it just isn't going to happen most of the time in anything polymorphic
2021-02-17 13:00:38 +0100 <edwardk> i mention this because its how we teach folks to use the mtl.
2021-02-17 13:00:55 +0100 <edwardk> write all your code on (MonadReader e m, MonadState s m, HasFoo e, HasBar s) =>
2021-02-17 13:01:01 +0100 <edwardk> and build up constraints rather than locking in a monad
2021-02-17 13:01:07 +0100 <iqubic> mtl is good. But mtl is also hard to use.
2021-02-17 13:01:09 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 246 seconds)
2021-02-17 13:01:11 +0100 <edwardk> but basically that becomes a poor performing interpreter
2021-02-17 13:01:49 +0100 <boxscape> Since we were talking about linear constraints, is there a reasonable interpretation of something like `Applicative f %1 => ...`?
2021-02-17 13:01:50 +0100 <iqubic> Yeah, the tagless final approach of mtl certainly has its drawbacks.
2021-02-17 13:02:27 +0100 <dminuoso> edwardk: The thing with `(MonadReader e m, HasFoo e, HasBar e, HasBaz e) => ...` though is that you can't prevent a user from using `ask', and suddenly they use stuff not mention in the classy lens constraints.
2021-02-17 13:02:29 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2021-02-17 13:02:31 +0100 <edwardk> the implicit param story above gives the expressiveness of reader/writer/state + IO a needed (by using IORef for the values you can emulate state, and you can emulate writer with state)
2021-02-17 13:03:29 +0100 <edwardk> dminuoso: they can always ask, and then use local to restore it later, or worse, in a state monad they can 'get' and then 'set' later destroying your carefully managed environment you stuffed into a map thats tracking active file handles...
2021-02-17 13:03:55 +0100 <boxscape> it seems like you might get some of that compositionality if we had row types you could use with Reader
2021-02-17 13:04:10 +0100 <edwardk> you've discovered the effect system game
2021-02-17 13:04:20 +0100 <iqubic> I'd love proper row types in Haskell.
2021-02-17 13:04:30 +0100Sheilong(uid293653@gateway/web/irccloud.com/x-zrcmjtwsmmlqlmrj)
2021-02-17 13:05:04 +0100 <edwardk> anyhow i like that pattern, its quirky, nobody seems to use it but me. i've talked to like 2 other people who have something based on it
2021-02-17 13:05:14 +0100 <lortabac> I would like to see an implicit-parameters extension that only allows overriding parameters through some equivalent of 'local'
2021-02-17 13:05:31 +0100 <edwardk> and it directly correlates to 'how i make code run fast in scala' which is embarrassing to me.
2021-02-17 13:05:36 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 13:05:43 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Remote host closed the connection)
2021-02-17 13:06:06 +0100 <iqubic> You use Scala too? Is that for work?
2021-02-17 13:06:10 +0100 <edwardk> iqubic: anyways consider a parser. you might think you could use the implicit param trick above, but it doesn't work
2021-02-17 13:06:25 +0100codedmart(~codedmart@149.28.9.205) (Ping timeout: 240 seconds)
2021-02-17 13:06:28 +0100 <edwardk> because what if your parser is passing aroun the string its parsing in the implicit param and you call another parser?
2021-02-17 13:06:36 +0100 <edwardk> you get cross contamination between the constraints
2021-02-17 13:06:40 +0100 <iqubic> Parsers are a great domain here.
2021-02-17 13:06:43 +0100 <edwardk> so to fix THAT i use reflection.
2021-02-17 13:06:59 +0100 <edwardk> https://github.com/ekmett/codex/tree/master/parsnip is my fastest parsing library
2021-02-17 13:07:06 +0100danvet_(~danvet@212-51-149-181.fiber7.init7.net) (Ping timeout: 246 seconds)
2021-02-17 13:07:14 +0100 <edwardk> and it uses reflection to pass around the input data
2021-02-17 13:07:19 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net) (Remote host closed the connection)
2021-02-17 13:07:19 +0100plutoniix(~q@184.82.194.171) (Quit: Leaving)
2021-02-17 13:07:28 +0100 <edwardk> rather, it uses a single Addr# as the state of the parser
2021-02-17 13:07:45 +0100 <edwardk> by comparison zeptoparsec seems positively bloated ;)
2021-02-17 13:08:16 +0100 <edwardk> https://github.com/ekmett/codex/blob/master/parsnip/src/Text/Parsnip/Internal/Parser.hs#L115
2021-02-17 13:08:21 +0100 <iqubic> I think you mean "megaparsec". But yes, I understand your point.
2021-02-17 13:08:40 +0100 <edwardk> no zeptoparsec is a smaller than attoparsec parser inside attoparsec used for parsing short bytestrings
2021-02-17 13:09:08 +0100 <edwardk> and prior to parsnip it was the simplest parser i knew
2021-02-17 13:09:31 +0100 <edwardk> in parsnip i take your bytestring, copy it to a null terminated c string, and just use an Addr# indexing into that c string
2021-02-17 13:09:47 +0100davros(~davros@host86-185-99-39.range86-185.btcentralplus.com) (Remote host closed the connection)
2021-02-17 13:09:54 +0100 <iqubic> What do the "#" mean in the Addr and State type names? I know those are allowed by the MagicHash extension, but I don't know what they actually do.
2021-02-17 13:10:05 +0100danza(~francesco@151.74.103.107)
2021-02-17 13:10:19 +0100 <edwardk> MagicHash just makes # a legal part of an identifier
2021-02-17 13:10:21 +0100 <edwardk> it does nothing
2021-02-17 13:10:32 +0100 <iqubic> Ah. I see.
2021-02-17 13:10:33 +0100 <edwardk> now we tend to name identifiers with # that we don't want users touching
2021-02-17 13:10:47 +0100 <iqubic> Thank you for telling me.
2021-02-17 13:10:52 +0100 <edwardk> because they have to explicitly turn on the dangerous looking 'here be dragons' MagicHash extension
2021-02-17 13:11:05 +0100 <liyang> “i take your bytestring,” ← good basis for a “There Will be Blood” reference.
2021-02-17 13:11:32 +0100 <edwardk> Now, haskell has types that aren't 'lifted'. e.g there is Int# which is an honest to goodness integer not a promise to compute one when forced.
2021-02-17 13:11:41 +0100 <edwardk> and internally the data constructor for Int looks like
2021-02-17 13:11:46 +0100 <boxscape> interestingly MagicHash only allows # at the end of identifiers, which I guess is so that you can still use it in operators, as well
2021-02-17 13:11:47 +0100 <edwardk> data Int = I# Int#
2021-02-17 13:12:08 +0100 <edwardk> its a constructor named I# (here be dragons!) holding a value that is a real machine int.
2021-02-17 13:12:19 +0100Graf_Blutwurst(~grafblutw@2001:171b:226e:adc0:d552:313d:8cb3:7b48) (Ping timeout: 272 seconds)
2021-02-17 13:12:38 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net)
2021-02-17 13:12:39 +0100 <edwardk> and GHC.Prim exports operations like +# that take Int#'s and return Int#'s
2021-02-17 13:12:57 +0100 <iqubic> I wouldn't touch that with a ten foot pole. I'm still new to this world of low level computations
2021-02-17 13:12:57 +0100 <edwardk> then the implementation of + for Int looks like
2021-02-17 13:12:59 +0100codedmart(~codedmart@149.28.9.205)
2021-02-17 13:13:09 +0100 <edwardk> I# i + I# j = I# (i +# j)
2021-02-17 13:13:34 +0100 <iqubic> That scares me.
2021-02-17 13:13:51 +0100 <edwardk> the I# wrapper takes things from the world of unlifted things to the parts of haskell you know and love where _|_ works like normal, everything is lazy, etc.
2021-02-17 13:14:04 +0100Graf_Blutwurst(~grafblutw@adsl-178-38-234-220.adslplus.ch)
2021-02-17 13:14:12 +0100 <edwardk> data IORef a = IORef (MutVar# RealWorld a)
2021-02-17 13:14:24 +0100 <edwardk> MutVar# is an object that lives on the heap that holds a pointer to another object on the heap
2021-02-17 13:14:34 +0100 <iqubic> Makes sense.
2021-02-17 13:15:08 +0100 <edwardk> that way unpacking an IORef in a constructor using ! gives you a pointer to the shared heap objet that knows where the target is.
2021-02-17 13:16:53 +0100 <edwardk> then if you had a data type like data Foo = Foo !(IORef Foo) !(IORef Foo) -- it works like you'd expect. even if you unpack there, you just get the pointers to the shared heap object. if i pass you two copies o the same ioref they don't get inlined as separate pointers into some constructor and play badly with your surface langage, instead you get two pointers to the same heap obejct, and modifying the ioref affects what each would see,
2021-02-17 13:16:53 +0100 <edwardk> exactly like you'd expect in haskell, but surprising a c++ programmer!
2021-02-17 13:17:00 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 13:17:53 +0100 <edwardk> MutVar# s a, lives behind STRef and IORef, MVar# lives behind MVar, Array# is used behind Array, Vector, Data.Primitive.Array, etc...
2021-02-17 13:18:33 +0100davros(~davros@host86-185-99-39.range86-185.btcentralplus.com)
2021-02-17 13:18:34 +0100 <edwardk> ByteArray# holds binary data in a slab of memory on the heap and is used behind a bunch of the unboxed vector types.
2021-02-17 13:18:48 +0100 <edwardk> there are lots of these kinds of types
2021-02-17 13:19:13 +0100 <edwardk> the documentation for GHC.Prim is a tour through a nightmarish landscape of 'wtf is this undocumented crap' until you get used to it
2021-02-17 13:19:46 +0100 <iqubic> I might go looking through GHC.Prim's documentation somday.
2021-02-17 13:19:51 +0100 <iqubic> *someday
2021-02-17 13:19:57 +0100 <iqubic> *some day
2021-02-17 13:20:08 +0100 <liyang> *any day
2021-02-17 13:20:18 +0100 <liyang> *today
2021-02-17 13:20:20 +0100 <iqubic> Typing is hard.
2021-02-17 13:20:45 +0100 <edwardk> anyways the parsnip code above uses reflection to package up the original bytestring and information about the cstring copy in a space efficient way, giving you efficient access to how many bytes along you are, the original bytestring if you want to slice it up to quickly return an interval in O(1), etc.
2021-02-17 13:20:48 +0100 <boxscape> that's why we have type theory
2021-02-17 13:21:06 +0100 <edwardk> and the region parameter from reflection fixes the implicit param problem i mentioned
2021-02-17 13:21:16 +0100 <edwardk> because a parser in a parser will have a different type parameter
2021-02-17 13:21:22 +0100 <edwardk> and it can't confuse those two strings
2021-02-17 13:21:25 +0100 <edwardk> problem solved
2021-02-17 13:21:33 +0100jedws(~jedws@101.184.202.248)
2021-02-17 13:21:44 +0100berberman_(~berberman@unaffiliated/berberman)
2021-02-17 13:21:47 +0100berberman(~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
2021-02-17 13:21:59 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 13:22:03 +0100 <iqubic> Yeah. I'm looking at the code, and it's a really elegant solution to a problem I only just learned about 30ish minutes ago.
2021-02-17 13:22:05 +0100 <edwardk> internally it is as fast as Addr# -> State# s -> (# State# s, Addr#, (# a | (##) #) #)
2021-02-17 13:22:26 +0100conal(~conal@66.115.157.88) (Ping timeout: 260 seconds)
2021-02-17 13:22:40 +0100berberman_(~berberman@unaffiliated/berberman) (Max SendQ exceeded)
2021-02-17 13:22:54 +0100 <iqubic> Parsing is always hard.
2021-02-17 13:23:13 +0100berberman(~berberman@unaffiliated/berberman)
2021-02-17 13:23:52 +0100 <edwardk> which is 'the function is given a naked c pointer, and an imaginary token that doesn't have any representation whatsoever that is used for sequencing effects. and gives back a new magic tag, the address it parsed to, and either an answer or the fact that it failed, which looks a lot like a maybe but is secretly represented by a machine tag thatis just a number and an 'a' that is either real or a pointer a placeholder object
2021-02-17 13:24:11 +0100 <edwardk> ptr -> (ptr, int, a) -- fully unboxed
2021-02-17 13:24:57 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 246 seconds)
2021-02-17 13:25:08 +0100 <edwardk> the int tells me if i failed, if i succeed i pick up from here with a, if i fail i revert to the ptr that was the arg and try the alternative, etc.
2021-02-17 13:25:30 +0100 <edwardk> none of the code in the monad, applicative, etc. ever dereferences the ptr
2021-02-17 13:25:48 +0100 <edwardk> its just the little combinator that goes to check to see what the current character is that needs to know the cstring is safe
2021-02-17 13:25:58 +0100conal(~conal@66.115.157.88)
2021-02-17 13:26:07 +0100 <iqubic> I once tried making my own parser, and was all of the following: A) really buggy, B) hard to use and C) A mess of spaghetti code.
2021-02-17 13:26:22 +0100 <edwardk> https://github.com/ekmett/codex/blob/master/parsnip/src/Text/Parsnip/Char8.hs#L51
2021-02-17 13:26:25 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 13:28:04 +0100 <iqubic> Is line 52 just checking for a Null Terminator?
2021-02-17 13:28:30 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 260 seconds)
2021-02-17 13:28:41 +0100 <edwardk> 52 is checking if you asked if the next char is '\0', which will always fail to parse
2021-02-17 13:28:50 +0100 <edwardk> because this is a parser that has to work over a null terminated string
2021-02-17 13:28:54 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 13:28:56 +0100 <edwardk> 'inside' that string there will be no nulls
2021-02-17 13:29:00 +0100 <edwardk> a null is eof
2021-02-17 13:29:20 +0100 <iqubic> Ah. Of course.
2021-02-17 13:29:22 +0100 <edwardk> e.g. i'm using this to parse shaders. if you see a null in the middle of your shader file you're hurting
2021-02-17 13:30:12 +0100 <edwardk> actually to be clear, i'm not fully parsing shaders with this
2021-02-17 13:30:23 +0100 <edwardk> i'm 'approximately' parsing them, just enough to find #include directives
2021-02-17 13:30:31 +0100 <edwardk> so i can learn what includes you use, what what those use
2021-02-17 13:30:44 +0100 <edwardk> that way when any of those files change i can invalidate the shader
2021-02-17 13:31:46 +0100 <edwardk> the opengl standard doesn't actually give me that ability to reflect on which includes you used. just the ability to populate a funny little cache that you can use. it'd be like saying you should load every header you might consider using and then i'll pick and choose, but not tell you what i used...
2021-02-17 13:31:51 +0100 <edwardk> dumb !@(#*ing spec
2021-02-17 13:32:22 +0100 <edwardk> so i wrote a little parser that looks for includes, and stuffs the data into a map to help me track what includes what transitively
2021-02-17 13:32:33 +0100 <edwardk> that is that include cache i talked about earlier
2021-02-17 13:32:38 +0100 <edwardk> so i can share work across shaders
2021-02-17 13:33:21 +0100 <edwardk> then if you are compiling on a remotely modern gpu i can populate just the headers you need and use the "real" opengl shader compiler that can support headers
2021-02-17 13:33:38 +0100 <edwardk> and if not? i'll fake it well enough to get the code i had to compile
2021-02-17 13:33:55 +0100 <edwardk> that was my application at the time
2021-02-17 13:34:32 +0100 <iqubic> OpenGL's specs are such a wild thing to look at.
2021-02-17 13:34:34 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 260 seconds)
2021-02-17 13:34:56 +0100 <edwardk> what i liked about the parser was how few parts actually needed access to the original bytestring
2021-02-17 13:34:57 +0100 <edwardk> https://github.com/ekmett/codex/blob/master/engine/src/Engine/Shader/Include.hs#L180
2021-02-17 13:35:29 +0100 <edwardk> just the stuff that has a KnownBase s => .. constraint
2021-02-17 13:35:45 +0100 <edwardk> which is only a few functions at a high level are being passed the bytestring-like argument
2021-02-17 13:35:59 +0100 <edwardk> everyone else is just in that super-tight rep i mentioned above
2021-02-17 13:36:04 +0100 <edwardk> doing exactly what they need to and no more
2021-02-17 13:36:25 +0100 <edwardk> i'd like to go back and revisit this approach using the stuff the nick wu presented at icfp last year
2021-02-17 13:36:32 +0100oish(~charlie@228.25.169.217.in-addr.arpa)
2021-02-17 13:36:32 +0100oish(~charlie@228.25.169.217.in-addr.arpa) (Client Quit)
2021-02-17 13:36:50 +0100 <iqubic> Sorry, but I have to go now.
2021-02-17 13:36:53 +0100 <iqubic> I'm sorry.
2021-02-17 13:36:58 +0100 <edwardk> nick showed how to use typed template haskell as code gen for a nice parser library that analyzed everything it could, THEN compiled
2021-02-17 13:37:01 +0100 <edwardk> no worries
2021-02-17 13:37:05 +0100 <edwardk> nice chatting iqubic
2021-02-17 13:37:17 +0100 <edwardk> been using this as a distraction from writing code in another window
2021-02-17 13:37:24 +0100 <hc> heh
2021-02-17 13:37:29 +0100 <hc> what are you currently writing?
2021-02-17 13:37:44 +0100 <edwardk> https://github.com/ekmett/linear-primitive
2021-02-17 13:38:17 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 13:38:26 +0100cfricke(~cfricke@unaffiliated/cfricke) (Ping timeout: 264 seconds)
2021-02-17 13:38:58 +0100 <edwardk> and i keep trying to figure out a 'token' passing version of a bunch of arrays using linear haskell that doesn't pass around as much stuff, but sadly winds up feeling a bit more like ST s
2021-02-17 13:39:34 +0100p-core(~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
2021-02-17 13:40:08 +0100 <iqubic> edwardk: Are you going to be contributing to GHC any time soon?
2021-02-17 13:40:28 +0100 <edwardk> i generally try to take ghc as 'god given' and see what libraries can be written using it
2021-02-17 13:40:35 +0100 <hc> =)
2021-02-17 13:40:37 +0100 <edwardk> it provides a division of labor that has helped me keep my sanity
2021-02-17 13:40:48 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 13:40:52 +0100 <hc> edwardk: thanks for the link by the way. Have to read up on linear types, I'm a bit rusty
2021-02-17 13:40:59 +0100 <iqubic> And with that last question, I will be going on my way.
2021-02-17 13:41:11 +0100 <edwardk> hc they just became borderline usable in 9.0.
2021-02-17 13:41:20 +0100 <edwardk> they'll probably be fully usable in 9.2
2021-02-17 13:41:28 +0100 <edwardk> that is my hope anyways
2021-02-17 13:42:01 +0100 <edwardk> if 9.2 includes those and strict data types? (not strictdata, but things in the equivalent of today's TYPE 'UnliftedRep i'll be super happy
2021-02-17 13:42:21 +0100 <edwardk> because we just got properly sized small Int16# primitives, allowing us to get densely packed data structures
2021-02-17 13:42:46 +0100 <hc> Nice. I last used haskell when ghc 7.something was stable. I miss these days when I wrote haskell code...
2021-02-17 13:42:47 +0100 <edwardk> so haskell has been rapidly morphing into much of what i _want_ in coda, faster than i've been getting my own compiler done
2021-02-17 13:43:00 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 13:43:04 +0100 <edwardk> which is a super happy problem for me, tbh
2021-02-17 13:43:10 +0100 <hc> hehe
2021-02-17 13:45:26 +0100 <davros> edwardk you're making a language?
2021-02-17 13:46:00 +0100 <dminuoso> % askFor :: MonadReader r m => ((?ask :: r) => a) -> m a; askFor a = do r <- ask; let ?ask = r in return a
2021-02-17 13:46:00 +0100 <edwardk> its been a slow-burn research project, mostly forking off side-projects that become useful libraries for some time
2021-02-17 13:46:00 +0100 <yahb> dminuoso:
2021-02-17 13:46:03 +0100 <dminuoso> We should ship this in mtl.
2021-02-17 13:46:18 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net) (Read error: Connection reset by peer)
2021-02-17 13:46:22 +0100 <davros> ok i see it on github
2021-02-17 13:46:23 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 265 seconds)
2021-02-17 13:46:55 +0100 <edwardk> the talk i gave on cadenza covers a bit of one of the more recent compilation tricks i tried
2021-02-17 13:47:10 +0100 <hc> got a link?
2021-02-17 13:47:32 +0100 <davros> "ways t apply SPMD-on-SIMD evaluation" .. fancy parallel code gen?
2021-02-17 13:47:33 +0100 <edwardk> the monadic warsaw workshop on guanxi covers a large part the surrounding motivations before diving in deep on logic programing
2021-02-17 13:47:57 +0100 <edwardk> https://www.youtube.com/watch?v=25RmUl88jSw
2021-02-17 13:48:00 +0100 <edwardk> is the cadenza talk
2021-02-17 13:48:04 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net)
2021-02-17 13:48:04 +0100 <hc> thanks!
2021-02-17 13:48:17 +0100jedws(~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-02-17 13:48:31 +0100da39a3ee5e6b4b0d(~da39a3ee5@2403:6200:8876:b666:c4b7:6001:ca20:56eb)
2021-02-17 13:48:36 +0100daytone(~daytona@90.200.185.163)
2021-02-17 13:48:50 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 13:49:09 +0100 <edwardk> https://www.youtube.com/watch?v=D7rlJWc3474&list=PLcAu_kKy-krxDD1WwRX_9rc0knAFK3nHs&index=41 is the 4 series on guanxi
2021-02-17 13:49:12 +0100 <edwardk> er 4 part
2021-02-17 13:49:20 +0100 <davros> "speed * cores * width" .. reminds me all the way back to the xbox 360, it was cores X SIMD X loop-unrolls (pipeline depth)
2021-02-17 13:49:27 +0100jedws(~jedws@101.184.202.248)
2021-02-17 13:49:39 +0100 <edwardk> the first talk in the series has slides, the other 3 parts get progressively more esoteric diving into my way of thinking about logic programming
2021-02-17 13:49:58 +0100 <edwardk> davros: yeah
2021-02-17 13:50:29 +0100idhugo_(~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) (Remote host closed the connection)
2021-02-17 13:50:41 +0100Tene(~tene@poipu/supporter/slacker/tene) (Ping timeout: 246 seconds)
2021-02-17 13:50:53 +0100idhugo_(~idhugo@80-62-117-86-mobile.dk.customer.tdc.net)
2021-02-17 13:50:55 +0100pja(~phil@2a02:8010:6098:0:f2de:f1ff:fe2c:3d9) (Quit: WeeChat 2.8)
2021-02-17 13:50:59 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c97:1fb5:a86c:10a1)
2021-02-17 13:51:00 +0100 <edwardk> the intel spmd program compiler is basically a shader compiler for a cpu, it is pretty influential on my thinking there
2021-02-17 13:51:09 +0100Boomerang(~Boomerang@2a05:f6c7:2179:0:815d:8deb:faba:89c5)
2021-02-17 13:51:39 +0100 <edwardk> https://www.reddit.com/r/haskell/comments/6kw3sj/yow_lambdajam_2017_edward_kmett_transients_spmd/ is a talk where i was going to give a talk about transients but changed topics at the last minute to talk about spmd eval.
2021-02-17 13:52:16 +0100 <davros> i haven't actually touched haskell in a long time.. this being #haskell i should ask: How far is (or isn't) haskell getting these days with this? (the fact you're doing this experiment suggests to me maybe not as far as it could)
2021-02-17 13:52:38 +0100 <edwardk> with 'this' being what part of that?
2021-02-17 13:52:40 +0100ByronJohnson(~bairyn@unaffiliated/bob0) (Ping timeout: 258 seconds)
2021-02-17 13:52:44 +0100cur8or(~cur8or@72canterbury.cybersmart.co.za) (Quit: Textual IRC Client: www.textualapp.com)
2021-02-17 13:52:48 +0100 <davros> leveraging multicore & SIMD
2021-02-17 13:53:04 +0100 <davros> writing parallel code easily.
2021-02-17 13:53:06 +0100 <edwardk> there was an intel haskell research compiler that used SIMD heavily.
2021-02-17 13:53:27 +0100 <edwardk> we have primops for working with things like Int32x8#'s
2021-02-17 13:53:28 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 13:53:38 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds)
2021-02-17 13:53:40 +0100 <merijn> davros: ghc-prim has a bunch of SIMD primitives, but those are only for the LLVM backend I think?
2021-02-17 13:53:44 +0100 <edwardk> and can turn that into _much_ of what is needed for vectorization
2021-02-17 13:53:54 +0100 <merijn> davros: That was carter's baby for a while
2021-02-17 13:53:55 +0100 <edwardk> if, like, merijn said, you limit yourself to llvm
2021-02-17 13:54:05 +0100 <merijn> davros: See also #numerical-haskell :)
2021-02-17 13:54:14 +0100 <edwardk> the problem is there's some technical wibbles about how to support shuffles correctly
2021-02-17 13:54:26 +0100 <merijn> I see "a bunch" I think it has everything :p
2021-02-17 13:54:28 +0100 <edwardk> and everyone who cared about the project kinda left
2021-02-17 13:54:31 +0100 <merijn> s/see/say
2021-02-17 13:54:49 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 13:55:08 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca)
2021-02-17 13:55:17 +0100 <carter> I may have more head space this year. New job is gonna be good for my head space
2021-02-17 13:55:50 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c97:1fb5:a86c:10a1) (Ping timeout: 264 seconds)
2021-02-17 13:55:59 +0100 <davros> could you make a haskell to Graphcore compiler ..
2021-02-17 13:56:10 +0100 <merijn> carter: Man, now you've got me thinking about that tweet from years ago again...
2021-02-17 13:56:11 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 13:56:12 +0100 <carter> There’s some subtle issues around how to actually give shuffles type safe interface
2021-02-17 13:56:22 +0100 <edwardk> anyhow, the reason i was playing witha whole compiler for it, was i didn't (and still don't) know how to compile the _kind_ of simd i want without intrusive annotations on the surface language.
2021-02-17 13:56:23 +0100 <carter> merijn: which tweet ?
2021-02-17 13:56:25 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 240 seconds)
2021-02-17 13:56:39 +0100 <edwardk> (and i don't really know how to do it even with those, but it gets me closer.)
2021-02-17 13:57:03 +0100 <edwardk> davros: so im still chasing shadows on that front
2021-02-17 13:57:57 +0100jedws(~jedws@101.184.202.248) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-02-17 13:57:58 +0100 <davros> i seem to remember 'lambdacube' doing quite well at mixing 'main program' with 'bits of shader code' (if i'm remembering it right), i guess that could go across to compute-shaderes (which in turn could be done on a cpu if you really wanted)
2021-02-17 13:58:15 +0100 <edwardk> that isn't the kind of use of simd i want
2021-02-17 13:58:28 +0100 <edwardk> nor is futhark, nor accelerate, nor...
2021-02-17 13:58:33 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 272 seconds)
2021-02-17 14:00:06 +0100 <edwardk> ok, i'm sabotaging myself by staying up this late. the hf board meeting is in 3 hours and i'll be lucky to be conscious then, and then i'm working with someone all afternoon, so i'm not sure when i'm supposed to sleep
2021-02-17 14:00:14 +0100 <edwardk> i'm going to try to get some sleep
2021-02-17 14:00:18 +0100 <edwardk> later folks
2021-02-17 14:00:33 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 14:00:39 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 14:02:09 +0100 <edwardk> davros: i think the question i'm interested in is how would you run a _lazy_ code efficiently on a gpu, or on a wide simd unit, not just some random stream processing edsl or edsl for describing c badly in haskell.
2021-02-17 14:02:31 +0100Tario(~Tario@201.192.165.173)
2021-02-17 14:02:35 +0100Tene(~tene@poipu/supporter/slacker/tene)
2021-02-17 14:02:37 +0100 <edwardk> efficiently is key. i can do it badly
2021-02-17 14:02:54 +0100 <edwardk> i can come up with ways that work pretty well for an ml-like language even
2021-02-17 14:03:33 +0100 <edwardk> ok, enough michigan goodbytes, really g'night this time =)
2021-02-17 14:03:39 +0100ByronJohnson(~bairyn@unaffiliated/bob0)
2021-02-17 14:03:39 +0100 <edwardk> er goodbyes
2021-02-17 14:04:53 +0100raym(~ray@45.64.220.142) (Quit: leaving)
2021-02-17 14:06:16 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2021-02-17 14:07:37 +0100urodna(~urodna@unaffiliated/urodna)
2021-02-17 14:08:06 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 14:09:19 +0100geekosaur(82650c7a@130.101.12.122)
2021-02-17 14:09:39 +0100cur8or(~cur8or@2c0f:fbe1:3:17:162:fc74:7149:2542)
2021-02-17 14:10:46 +0100Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 256 seconds)
2021-02-17 14:11:01 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 14:13:36 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 14:13:56 +0100thc202(~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-02-17 14:14:29 +0100 <carter> davros: one technical challenge for good simd apis is you need a way to enforce certain args are known at compile time. In a way that is kinda like c++ const expr
2021-02-17 14:15:53 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 14:16:24 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
2021-02-17 14:16:45 +0100 <dminuoso> carter: Amusing side note, c++ const expr has compile time mutability (that is a given const expr might evaluate differently in two spots) if you want it badly enough.
2021-02-17 14:16:59 +0100 <dminuoso> standard conforming.
2021-02-17 14:17:00 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 14:17:00 +0100 <carter> Wattttt
2021-02-17 14:17:28 +0100jrm(~jrm@freebsd/developer/jrm)
2021-02-17 14:17:30 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 14:17:53 +0100 <dminuoso> https://b.atch.se/posts/non-constant-constant-expressions/
2021-02-17 14:18:04 +0100 <carter> I also suspect the right approach would be handy for macros/ meta programming
2021-02-17 14:20:01 +0100thc202(~thc202@unaffiliated/thc202)
2021-02-17 14:20:14 +0100 <carter> dminuoso: I mean a compile time time counter sounds useful :)
2021-02-17 14:21:41 +0100 <dminuoso> carter: Heh. If I understand the stack of tricks correctly, you can only cause f() to evaluate differently on the first invocation. More research into whether a counter can be implemented is needed.
2021-02-17 14:22:05 +0100 <carter> Heh.
2021-02-17 14:22:20 +0100Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-02-17 14:22:22 +0100 <carter> Also good morning
2021-02-17 14:23:03 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 246 seconds)
2021-02-17 14:24:27 +0100Tario(~Tario@201.192.165.173)
2021-02-17 14:28:36 +0100carlomagno1(~cararell@148.87.23.8)
2021-02-17 14:28:53 +0100lambdah-sadvipra(~user@189.6.240.228)
2021-02-17 14:28:54 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 14:31:45 +0100carlomagno(~cararell@148.87.23.13) (Ping timeout: 240 seconds)
2021-02-17 14:33:10 +0100dcoutts(~duncan@85.186.125.91.dyn.plus.net)
2021-02-17 14:33:22 +0100geekosaur(82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-02-17 14:33:36 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 14:38:07 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 14:38:27 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 14:40:59 +0100dunj4(~dunj3@p200300f61714a66854ef98154aeab501.dip0.t-ipconnect.de)
2021-02-17 14:41:30 +0100geekosaur(82650c7a@130.101.12.122)
2021-02-17 14:41:49 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 14:42:30 +0100tsrt^(tsrt@ip98-184-89-2.mc.at.cox.net)
2021-02-17 14:43:11 +0100cur8or(~cur8or@2c0f:fbe1:3:17:162:fc74:7149:2542) (Ping timeout: 268 seconds)
2021-02-17 14:43:27 +0100dunj3(~dunj3@p200300f61714a6925c87873f9ac9c753.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-02-17 14:44:57 +0100new_haskeller(ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com)
2021-02-17 14:45:33 +0100dunj4dunj3
2021-02-17 14:46:33 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 14:47:09 +0100tensorpudding(~michael@unaffiliated/tensorpudding) (Remote host closed the connection)
2021-02-17 14:48:23 +0100 <new_haskeller> So I have this simple program in VS Code IDE with "an" extension enabled (not sure which): ```compress lst = c' lst
2021-02-17 14:48:24 +0100 <new_haskeller>   where
2021-02-17 14:48:24 +0100 <new_haskeller>     c' (x:xs@(y:ys))
2021-02-17 14:48:25 +0100 <new_haskeller>       | x==y = c' XS
2021-02-17 14:48:25 +0100 <new_haskeller>       | otherwise = x : c' XS
2021-02-17 14:48:26 +0100 <new_haskeller>     c' xs = XS```
2021-02-17 14:48:35 +0100bitmapper(uid464869@gateway/web/irccloud.com/x-wcndcgrnyuvjynus)
2021-02-17 14:48:58 +0100alx741(~alx741@186.178.109.49)
2021-02-17 14:49:42 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 260 seconds)
2021-02-17 14:50:37 +0100 <new_haskeller> the debug window show ```Eta reduce
2021-02-17 14:50:38 +0100 <new_haskeller> Found:
2021-02-17 14:50:38 +0100 <new_haskeller>   compress lst = c' lst
2021-02-17 14:50:39 +0100 <new_haskeller> Why not:
2021-02-17 14:50:39 +0100 <new_haskeller>   compress = c'
2021-02-17 14:50:40 +0100 <new_haskeller> ``` however when I remove "let" I get an error message ```Parse error: module header, import declaration
2021-02-17 14:50:40 +0100 <new_haskeller> or top-level declaration expected.```
2021-02-17 14:51:19 +0100maroloccio(~marolocci@pousada3ja.mma.com.br)
2021-02-17 14:51:27 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 14:51:34 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 14:52:53 +0100 <tomsmeding> new_haskeller: in the future you might want to use a paste site for larger code fragments :)
2021-02-17 14:53:01 +0100 <lyxia> @where paste
2021-02-17 14:53:01 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
2021-02-17 14:53:36 +0100 <lyxia> new_haskeller: can you paste your file there ^
2021-02-17 14:53:38 +0100 <tomsmeding> new_haskeller: what exactly are you trying to change that gives that error?
2021-02-17 14:54:04 +0100 <tomsmeding> if you apply the exact change that hlint suggests (that suggestion comes from hlint, FYI), it should work fine
2021-02-17 14:54:12 +0100 <lyxia> (the one that is reported to have an error)
2021-02-17 14:54:19 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 14:55:56 +0100 <tomsmeding> @where+ paste Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2021-02-17 14:55:56 +0100 <lambdabot> It is forever etched in my memory.
2021-02-17 14:56:06 +0100tomsmedingdislikes shortening 'e.g.' to 'eg' :p
2021-02-17 14:56:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Ping timeout: 264 seconds)
2021-02-17 14:56:58 +0100geekosaur22(82650c7a@130.101.12.122)
2021-02-17 14:57:19 +0100 <dminuoso> GHC shortens nota bene to NB.
2021-02-17 14:57:26 +0100 <dminuoso> Does that frustrate you?
2021-02-17 14:57:53 +0100 <geekosaur22> that's stolen from some other programming language
2021-02-17 14:58:00 +0100 <geekosaur22> I forget which now
2021-02-17 14:58:08 +0100 <Franciman> it's called italian
2021-02-17 14:58:28 +0100 <tomsmeding> not Latin?
2021-02-17 14:58:44 +0100 <Franciman> no i think that is italian
2021-02-17 14:58:46 +0100 <geekosaur22> I know the original version, thanks. I mean some programming language uses "NB." as its comment indicator
2021-02-17 14:58:47 +0100 <tomsmeding> dminuoso: less, for some reason
2021-02-17 14:59:54 +0100 <tomsmeding> J, apparently: https://en.wikipedia.org/wiki/J_(programming_language)#Examples
2021-02-17 15:00:22 +0100 <geekosaur22> that would make sense
2021-02-17 15:00:22 +0100new_haskeller(ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds)
2021-02-17 15:00:22 +0100geekosaur(82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-02-17 15:00:24 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 15:00:25 +0100 <Franciman> tomsmeding, you were right
2021-02-17 15:00:28 +0100 <Franciman> it is latin
2021-02-17 15:00:29 +0100 <Franciman> sad
2021-02-17 15:00:33 +0100geekosaur22geekosaur
2021-02-17 15:01:34 +0100 <tomsmeding> dminuoso: nota bene has precedent for being abbreviated as NB: https://en.wikipedia.org/wiki/Nota_bene
2021-02-17 15:02:13 +0100new_haskeller(ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com)
2021-02-17 15:02:43 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19)
2021-02-17 15:02:53 +0100 <Franciman> unfortunately barbarians exist
2021-02-17 15:02:59 +0100 <Franciman> and we need to accept their lack of culture
2021-02-17 15:03:15 +0100 <tomsmeding> for more fun: look at the "see also:" line at the top of https://en.wiktionary.org/wiki/NB
2021-02-17 15:04:16 +0100 <Franciman> do you pronounce it nota bini?
2021-02-17 15:04:26 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-02-17 15:04:33 +0100 <Franciman> some pronounce it nebraska
2021-02-17 15:04:49 +0100leat(~leat@128-71-254-160.broadband.corbina.ru) (Quit: WeeChat 3.0)
2021-02-17 15:05:05 +0100 <Franciman> maybe GHC does not short nota bene, but nebraska
2021-02-17 15:05:36 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 240 seconds)
2021-02-17 15:05:37 +0100 <tomsmeding> me being Dutch I say 'nota baynay' modulo vowel lengths
2021-02-17 15:06:09 +0100 <Franciman> neat
2021-02-17 15:06:28 +0100 <tomsmeding> wel I guess the last 'ay' is reduced to a schwa
2021-02-17 15:07:03 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
2021-02-17 15:07:14 +0100ubert(~Thunderbi@2a02:8109:9880:303c:e6b3:18ff:fe83:8f33)
2021-02-17 15:07:16 +0100motherfsck(~motherfsc@unaffiliated/motherfsck) (Ping timeout: 240 seconds)
2021-02-17 15:09:49 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 15:11:35 +0100viluon(uid453725@gateway/web/irccloud.com/x-lltmwurqyylsxzbx) (Quit: Connection closed for inactivity)
2021-02-17 15:12:24 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 15:12:28 +0100maroloccio(~marolocci@pousada3ja.mma.com.br) (Quit: WeeChat 2.3)
2021-02-17 15:13:28 +0100 <new_haskeller> sorry ... here it is https://paste.tomsmeding.com/iaXzsGjy
2021-02-17 15:14:32 +0100 <tomsmeding> new_haskeller: right, that does indeed give an error; it's a different error than you posted though
2021-02-17 15:15:38 +0100 <tomsmeding> new_haskeller: the error I get is 'Ambiguous type variable ...'; do you get that too, or something else?
2021-02-17 15:15:55 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2021-02-17 15:16:19 +0100motherfsck(~motherfsc@unaffiliated/motherfsck)
2021-02-17 15:17:10 +0100 <tomsmeding> new_haskeller: in case you're wondering why hlint would suggest a change that results in non-compiling code: hlint is a linter, and does not fully type-check your code; it just does some pattern-matching on your code to find patterns that it thinks can be done differently. The compiler, on the other hand, does a full, in-depth analysis of your code and sees lots of things that hlint doesn't.
2021-02-17 15:17:49 +0100 <tomsmeding> if you also get that 'Ambiguous type variable ...' error, the reason is the Monomorphism Restriction :D
2021-02-17 15:17:54 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2021-02-17 15:18:40 +0100 <tomsmeding> that error goes away if you add a type signature to 'compress', like 'compress :: Eq a => [a] -> [a]'
2021-02-17 15:19:13 +0100 <tomsmeding> in general it's a good idea (though in a number of cases not strictly required) to put type signatures on top-level definitions
2021-02-17 15:19:38 +0100cocytus(~cocytus@cpe-76-95-48-109.socal.res.rr.com)
2021-02-17 15:20:19 +0100 <new_haskeller> thanks!
2021-02-17 15:20:36 +0100loller_(uid358106@gateway/web/irccloud.com/x-thbrxkemfqgbwuky) (Quit: Connection closed for inactivity)
2021-02-17 15:21:00 +0100hololeap(~hololeap@unaffiliated/hololeap) (Ping timeout: 272 seconds)
2021-02-17 15:21:24 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 15:26:13 +0100poscat(~poscat@123.116.67.131)
2021-02-17 15:28:02 +0100new_haskeller(ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds)
2021-02-17 15:29:32 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 15:29:59 +0100da39a3ee5e6b4b0d(~da39a3ee5@2403:6200:8876:b666:c4b7:6001:ca20:56eb) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-02-17 15:36:54 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 15:36:57 +0100kaletaa(~kaletaa@188.34.177.83)
2021-02-17 15:38:06 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 15:38:29 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 15:38:51 +0100kam1(~kam1@83.123.64.17) (Read error: Connection reset by peer)
2021-02-17 15:39:09 +0100kam1(~kam1@83.123.64.17)
2021-02-17 15:42:32 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2021-02-17 15:44:31 +0100xelxebar(~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection)
2021-02-17 15:44:55 +0100xelxebar(~xelxebar@gateway/tor-sasl/xelxebar)
2021-02-17 15:46:37 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 15:47:46 +0100pie_(~pie_bnc]@unaffiliated/pie-/x-0787662)
2021-02-17 15:47:47 +0100vancz_(~vancz@unaffiliated/vancz)
2021-02-17 15:49:18 +0100da39a3ee5e6b4b0d(~da39a3ee5@2403:6200:8876:b666:c4b7:6001:ca20:56eb)
2021-02-17 15:52:41 +0100geekosaur(82650c7a@130.101.12.122) (Quit: Connection closed)
2021-02-17 15:52:49 +0100pavonia(~user@unaffiliated/siracusa)
2021-02-17 15:53:25 +0100ubert(~Thunderbi@2a02:8109:9880:303c:e6b3:18ff:fe83:8f33) (Remote host closed the connection)
2021-02-17 15:53:26 +0100thc202(~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-02-17 15:53:34 +0100mananamenos(~mananamen@37.red-88-27-26.staticip.rima-tde.net) (Read error: Connection reset by peer)
2021-02-17 15:53:36 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
2021-02-17 15:53:51 +0100thc202(~thc202@unaffiliated/thc202)
2021-02-17 15:54:16 +0100viluon(uid453725@gateway/web/irccloud.com/x-lpdtucvssqtteyqr)
2021-02-17 15:54:25 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 15:55:21 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 15:58:08 +0100alx741(~alx741@186.178.109.49) (Quit: alx741)
2021-02-17 15:59:18 +0100astronavt(~astronavt@unaffiliated/astronavt) (Quit: ...)
2021-02-17 16:00:42 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 16:05:57 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 16:06:36 +0100Tops2(~Tobias@dyndsl-095-033-018-103.ewe-ip-backbone.de)
2021-02-17 16:06:47 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 16:08:45 +0100idhugo_(~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) (Ping timeout: 246 seconds)
2021-02-17 16:09:29 +0100Sgeo(~Sgeo@ool-18b98aa4.dyn.optonline.net)
2021-02-17 16:10:25 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 265 seconds)
2021-02-17 16:10:46 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-02-17 16:12:49 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 16:12:50 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds)
2021-02-17 16:14:12 +0100new_haskeller(ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com)
2021-02-17 16:16:04 +0100deviantfero(~deviantfe@190.150.27.58)
2021-02-17 16:17:18 +0100 <ezzieyguywuf> is leksah "done" or "dead (but trying to be revived)"?
2021-02-17 16:17:23 +0100 <ezzieyguywuf> i see some recent activity on github
2021-02-17 16:17:44 +0100 <ezzieyguywuf> but, e.g. one of it's dependencies, binary-shared, hasn't been touched in a long time
2021-02-17 16:17:44 +0100 <merijn> ezzieyguywuf: "yes" :p
2021-02-17 16:17:54 +0100 <ezzieyguywuf> merijn: lol.
2021-02-17 16:18:06 +0100 <merijn> I'm not sure leksah was ever alive (in terms of actually being used), tbh
2021-02-17 16:18:13 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 256 seconds)
2021-02-17 16:19:02 +0100mouseghost(~draco@wikipedia/desperek) (Quit: mew wew)
2021-02-17 16:19:41 +0100 <ezzieyguywuf> well, we don't have a leksah package in gentoo
2021-02-17 16:19:46 +0100 <ezzieyguywuf> but we DO have the old binary-shared
2021-02-17 16:19:51 +0100 <ezzieyguywuf> trying to decide whether to get rid of binary-shared
2021-02-17 16:20:01 +0100 <ezzieyguywuf> (or we removed leksah but I just don't know where it used to be)
2021-02-17 16:20:53 +0100 <ezzieyguywuf> nvm we used to have it
2021-02-17 16:20:54 +0100 <ezzieyguywuf> and dropped it
2021-02-17 16:22:19 +0100new_hask_(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 16:22:54 +0100andreas303(~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
2021-02-17 16:23:24 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck)
2021-02-17 16:23:30 +0100andreas303(~andreas@gateway/tor-sasl/andreas303)
2021-02-17 16:26:07 +0100mizu_no_oto(~textual@cpe-66-66-222-11.rochester.res.rr.com)
2021-02-17 16:26:49 +0100 <ezzieyguywuf> binary-search: here's an example of one that just seems "done"
2021-02-17 16:27:05 +0100 <ezzieyguywuf> last release 2016, but xlsx (which seems actively developed) still uses it
2021-02-17 16:28:10 +0100kuribas(~user@ptr-25vy0i859tq5jdi8x32.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2021-02-17 16:29:37 +0100da39a3ee5e6b4b0d(~da39a3ee5@2403:6200:8876:b666:c4b7:6001:ca20:56eb) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-02-17 16:30:21 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-02-17 16:30:23 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 16:30:37 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2021-02-17 16:30:43 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 16:31:56 +0100dhil(~dhil@80.208.56.181) (Read error: Connection reset by peer)
2021-02-17 16:31:57 +0100agrajag`1(~agrajag`@178.239.168.171)
2021-02-17 16:32:32 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2021-02-17 16:32:34 +0100kuribas(~user@ptr-25vy0i859tq5jdi8x32.18120a2.ip6.access.telenet.be)
2021-02-17 16:32:43 +0100ubert1(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
2021-02-17 16:33:07 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Ping timeout: 260 seconds)
2021-02-17 16:33:07 +0100ubert1ubert
2021-02-17 16:33:19 +0100Jd007(~Jd007@162.156.11.151)
2021-02-17 16:34:15 +0100shad0w_(~shad0w@160.202.36.86) (Quit: Leaving)
2021-02-17 16:35:57 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 264 seconds)
2021-02-17 16:37:26 +0100acidjnk_new(~acidjnk@p200300d0c739095955c97cbff9b24e5c.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2021-02-17 16:38:05 +0100mizu_no_oto(~textual@cpe-66-66-222-11.rochester.res.rr.com) (Quit: Computer has gone to sleep.)
2021-02-17 16:38:07 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 16:38:28 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 16:43:25 +0100fissureman_(~quassel@c-73-163-84-25.hsd1.dc.comcast.net) (Ping timeout: 240 seconds)
2021-02-17 16:44:18 +0100kam1(~kam1@83.123.64.17) (Remote host closed the connection)
2021-02-17 16:44:53 +0100kam1(~kam1@83.123.64.17)
2021-02-17 16:46:50 +0100rayyan(~rayyan@180.248.201.145)
2021-02-17 16:47:03 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2021-02-17 16:50:54 +0100rayyan(~rayyan@180.248.201.145) (Client Quit)
2021-02-17 16:53:08 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 16:55:25 +0100clog(~nef@bespin.org) (Ping timeout: 240 seconds)
2021-02-17 16:55:54 +0100mizu_no_oto(~textual@cpe-66-66-222-11.rochester.res.rr.com)
2021-02-17 16:56:01 +0100mizu_no_oto(~textual@cpe-66-66-222-11.rochester.res.rr.com) (Remote host closed the connection)
2021-02-17 16:58:11 +0100VeeBoi(8077ca99@natp-128-119-202-153.wireless.umass.edu)
2021-02-17 16:58:12 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Ping timeout: 260 seconds)
2021-02-17 16:59:40 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 17:00:04 +0100Hanma[m](hanmamatri@gateway/shell/matrix.org/x-dungldpayxckhnuj) (Quit: Idle for 30+ days)
2021-02-17 17:00:51 +0100VeeBoi(8077ca99@natp-128-119-202-153.wireless.umass.edu) (Quit: Connection closed)
2021-02-17 17:01:26 +0100VeeBoi(8077ca99@natp-128-119-202-153.wireless.umass.edu)
2021-02-17 17:01:51 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 17:02:02 +0100kritzefitz(~kritzefit@2003:5b:203b:200::10:49) (Remote host closed the connection)
2021-02-17 17:04:12 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 17:04:29 +0100VeeBoi(8077ca99@natp-128-119-202-153.wireless.umass.edu) (Client Quit)
2021-02-17 17:05:02 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 260 seconds)
2021-02-17 17:05:46 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 17:06:05 +0100jdwidari(~jdwidari@173.38.117.75) (Quit: WeeChat 3.0.1)
2021-02-17 17:06:33 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 264 seconds)
2021-02-17 17:09:17 +0100xff0x(~xff0x@2001:1a81:53b4:e300:4f5:8344:c7ce:bd4a) (Ping timeout: 260 seconds)
2021-02-17 17:09:58 +0100xff0x(~xff0x@2001:1a81:53b4:e300:6089:d7b1:637f:ab27)
2021-02-17 17:12:40 +0100Rudd0(~Rudd0@185.189.115.108)
2021-02-17 17:13:11 +0100vicfred(~vicfred@unaffiliated/vicfred)
2021-02-17 17:15:48 +0100new_haskeller(ae72a197@cpe00fc8d386d93-cm00fc8d386d90.cpe.net.cable.rogers.com) (Quit: Ping timeout (120 seconds))
2021-02-17 17:17:13 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-02-17 17:17:34 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 17:18:17 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2021-02-17 17:19:13 +0100ezrakilty(~ezrakilty@97-113-55-149.tukw.qwest.net)
2021-02-17 17:20:11 +0100o1lo01ol1o(~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
2021-02-17 17:21:49 +0100benjamingr__(uid23465@gateway/web/irccloud.com/x-xgcckaxpiczvgpzv) (Quit: Connection closed for inactivity)
2021-02-17 17:22:15 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2021-02-17 17:23:32 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net) (Remote host closed the connection)
2021-02-17 17:23:53 +0100mouseghost(~draco@wikipedia/desperek)
2021-02-17 17:25:31 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 17:26:13 +0100tzlil(~tzlil@unaffiliated/tzlil)
2021-02-17 17:30:44 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 17:31:45 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 264 seconds)
2021-02-17 17:31:58 +0100idhugo_(~idhugo@80-62-117-97-mobile.dk.customer.tdc.net)
2021-02-17 17:32:50 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 17:35:09 +0100alx741(~alx741@186.178.109.49)
2021-02-17 17:35:24 +0100Graf_Blutwurst(~grafblutw@adsl-178-38-234-220.adslplus.ch) (Quit: WeeChat 3.0)
2021-02-17 17:36:15 +0100dunj3(~dunj3@p200300f61714a66854ef98154aeab501.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-02-17 17:38:06 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 17:38:15 +0100p-core(~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
2021-02-17 17:38:28 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 17:38:56 +0100kam1(~kam1@83.123.64.17) (Read error: Connection reset by peer)
2021-02-17 17:39:13 +0100kam1(~kam1@83.123.64.17)
2021-02-17 17:39:24 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-02-17 17:39:59 +0100LKoen(~LKoen@136.169.9.109.rev.sfr.net)
2021-02-17 17:42:16 +0100whald(~trem@2a02:810a:8100:11a6:6784:33d1:3a6b:a448) (Remote host closed the connection)
2021-02-17 17:44:01 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 268 seconds)
2021-02-17 17:45:43 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-02-17 17:47:35 +0100nomeata(~jojo@dslb-002-203-232-155.002.203.pools.vodafone-ip.de)
2021-02-17 17:48:27 +0100fendor(~fendor@178.165.131.69.wireless.dyn.drei.com) (Remote host closed the connection)
2021-02-17 17:49:49 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Remote host closed the connection)
2021-02-17 17:50:25 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 240 seconds)
2021-02-17 17:52:50 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 17:53:07 +0100deviantfero(~deviantfe@190.150.27.58) (Ping timeout: 260 seconds)
2021-02-17 17:53:55 +0100deviantfero(~deviantfe@190.150.27.58)
2021-02-17 17:54:33 +0100nomeata(~jojo@dslb-002-203-232-155.002.203.pools.vodafone-ip.de) (Quit: Client exiting)
2021-02-17 17:55:36 +0100tachylyte(~tachylyte@host86-132-250-227.range86-132.btcentralplus.com) (Ping timeout: 240 seconds)
2021-02-17 17:56:10 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 17:57:21 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 17:57:26 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2021-02-17 17:57:43 +0100tachylyte(~tachylyte@host86-142-90-26.range86-142.btcentralplus.com)
2021-02-17 17:59:09 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
2021-02-17 18:00:03 +0100srk(~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection)
2021-02-17 18:00:03 +0100hexo(~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection)
2021-02-17 18:00:21 +0100srk(~sorki@gateway/tor-sasl/sorki)
2021-02-17 18:00:27 +0100hexo(~hexo@gateway/tor-sasl/hexo)
2021-02-17 18:00:40 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-02-17 18:00:47 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 18:01:14 +0100mirrorbird(~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f)
2021-02-17 18:01:47 +0100Yumasi(~guillaume@2a01:e0a:5cb:4430:a218:d301:729d:d5b3) (Ping timeout: 265 seconds)
2021-02-17 18:01:48 +0100Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-02-17 18:02:29 +0100Tario(~Tario@201.192.165.173)
2021-02-17 18:03:46 +0100ixaxaar(~ixaxaar@49.207.197.94)
2021-02-17 18:06:49 +0100ezrakilty(~ezrakilty@97-113-55-149.tukw.qwest.net) (Remote host closed the connection)
2021-02-17 18:09:06 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 18:09:50 +0100slack1256(~slack1256@45.4.2.52)
2021-02-17 18:09:55 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2021-02-17 18:13:29 +0100geekosaur(82650c7a@130.101.12.122)
2021-02-17 18:13:49 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 18:16:42 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 268 seconds)
2021-02-17 18:16:50 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 18:19:03 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-02-17 18:20:55 +0100slack1256(~slack1256@45.4.2.52) (Ping timeout: 265 seconds)
2021-02-17 18:20:56 +0100jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-02-17 18:21:28 +0100ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
2021-02-17 18:21:39 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 18:22:01 +0100dyeplexer(~lol@unaffiliated/terpin)
2021-02-17 18:23:03 +0100cur8or(~cur8or@196.41.98.130)
2021-02-17 18:25:47 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 260 seconds)
2021-02-17 18:26:25 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 268 seconds)
2021-02-17 18:26:35 +0100ephemera_(~E@122.34.1.187) (Quit: ephemera_)
2021-02-17 18:28:26 +0100borne(~fritjof@200116b864893b0095eb740676c27273.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
2021-02-17 18:28:42 +0100ephemera_(~E@122.34.1.187)
2021-02-17 18:29:03 +0100lambdah-`(~user@200.175.79.29.static.gvt.net.br)
2021-02-17 18:30:23 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 18:30:27 +0100lambdah-sadvipra(~user@189.6.240.228) (Ping timeout: 260 seconds)
2021-02-17 18:30:55 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 18:32:19 +0100Wuzzy(~Wuzzy@p5b0df671.dip0.t-ipconnect.de)
2021-02-17 18:32:25 +0100sim590(~sim590@modemcable090.207-203-24.mc.videotron.ca)
2021-02-17 18:33:06 +0100danza(~francesco@151.74.103.107) (Quit: Leaving)
2021-02-17 18:33:26 +0100 <maerwald> merijn: I tried once
2021-02-17 18:34:37 +0100 <maerwald> the only interesting thing was the yi support
2021-02-17 18:34:45 +0100idhugo_(~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds)
2021-02-17 18:34:48 +0100boxscape(4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Ping timeout: 272 seconds)
2021-02-17 18:34:57 +0100 <maerwald> but it didn't build
2021-02-17 18:35:27 +0100 <maerwald> could have been something
2021-02-17 18:35:33 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 18:35:57 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
2021-02-17 18:37:10 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1)
2021-02-17 18:37:19 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2021-02-17 18:38:03 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 18:38:07 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 18:38:28 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 18:39:25 +0100pgib(~textual@lmms/pgib)
2021-02-17 18:39:52 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Client Quit)
2021-02-17 18:40:05 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2021-02-17 18:42:45 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 246 seconds)
2021-02-17 18:43:27 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 18:44:07 +0100dyeplexer(~lol@unaffiliated/terpin) (Ping timeout: 265 seconds)
2021-02-17 18:44:56 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 18:47:15 +0100Ailrkailrk
2021-02-17 18:50:06 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 18:50:11 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Remote host closed the connection)
2021-02-17 18:51:38 +0100epicte7us(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-02-17 18:52:19 +0100iqubic`(~user@c-67-171-38-72.hsd1.wa.comcast.net)
2021-02-17 18:52:44 +0100rajivr(uid269651@gateway/web/irccloud.com/x-gtdozbconwgnsaqd) (Quit: Connection closed for inactivity)
2021-02-17 18:54:02 +0100iqubic(~user@2601:602:9500:4870:4339:c0b6:b79f:872d) (Ping timeout: 264 seconds)
2021-02-17 18:55:09 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 264 seconds)
2021-02-17 18:55:21 +0100deviantfero(~deviantfe@190.150.27.58) (Read error: Connection reset by peer)
2021-02-17 18:55:54 +0100new_hask_(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Remote host closed the connection)
2021-02-17 18:56:10 +0100fendor(~fendor@178.165.131.69.wireless.dyn.drei.com)
2021-02-17 18:56:15 +0100deviantfero(~deviantfe@190.150.27.58)
2021-02-17 18:56:30 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 18:56:31 +0100hnOsmium0001(uid453710@gateway/web/irccloud.com/x-ycsqvqpavvannwrp)
2021-02-17 18:58:01 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-02-17 19:01:17 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Ping timeout: 260 seconds)
2021-02-17 19:02:01 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-02-17 19:02:48 +0100nhs(~nhs@c-24-20-87-79.hsd1.or.comcast.net)
2021-02-17 19:05:05 +0100pgib(~textual@lmms/pgib) (Ping timeout: 240 seconds)
2021-02-17 19:07:15 +0100ephemera_(~E@122.34.1.187) (Quit: ephemera_)
2021-02-17 19:09:23 +0100conal(~conal@66.115.157.88) (Quit: Computer has gone to sleep.)
2021-02-17 19:09:55 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-02-17 19:10:18 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 19:11:04 +0100conal(~conal@66.115.157.88)
2021-02-17 19:11:43 +0100seneca(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-02-17 19:11:45 +0100ephemera_(~E@122.34.1.187)
2021-02-17 19:13:38 +0100boxscape(4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243)
2021-02-17 19:14:36 +0100epicte7us(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 246 seconds)
2021-02-17 19:16:01 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-02-17 19:16:08 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 19:16:50 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 19:17:55 +0100kam1(~kam1@83.123.64.17) (Remote host closed the connection)
2021-02-17 19:18:44 +0100kam1(~kam1@83.123.64.17)
2021-02-17 19:19:49 +0100forell(~forell@unaffiliated/forell) (Quit: ZNC - https://znc.in)
2021-02-17 19:20:24 +0100forell(~forell@unaffiliated/forell)
2021-02-17 19:21:42 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2021-02-17 19:23:27 +0100jess(jess@freenode/staff/jess) (Quit: updates)
2021-02-17 19:24:06 +0100pgib(~textual@lmms/pgib)
2021-02-17 19:24:10 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 19:24:18 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 19:24:20 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 19:25:21 +0100ADG1089__(~aditya@122.163.133.103)
2021-02-17 19:25:41 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 265 seconds)
2021-02-17 19:26:37 +0100smerdyakov9(~dan@5.146.194.90)
2021-02-17 19:26:38 +0100smerdyakov(~dan@5.146.194.90) (Read error: Connection reset by peer)
2021-02-17 19:27:08 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 19:27:15 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
2021-02-17 19:27:51 +0100cur8or(~cur8or@196.41.98.130) (Ping timeout: 260 seconds)
2021-02-17 19:27:56 +0100ephemera_(~E@122.34.1.187) (Quit: ephemera_)
2021-02-17 19:28:12 +0100rdivyanshu(uid322626@gateway/web/irccloud.com/x-nffqoepzevgmqfup) (Quit: Connection closed for inactivity)
2021-02-17 19:30:08 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0)
2021-02-17 19:30:14 +0100ephemera_(~E@122.34.1.187)
2021-02-17 19:31:50 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Ping timeout: 264 seconds)
2021-02-17 19:32:49 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-02-17 19:33:41 +0100kam1(~kam1@83.123.64.17) (Remote host closed the connection)
2021-02-17 19:34:00 +0100kam1(~kam1@83.123.64.17)
2021-02-17 19:34:38 +0100kam1(~kam1@83.123.64.17) (Remote host closed the connection)
2021-02-17 19:34:54 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 19:35:33 +0100kuribas(~user@ptr-25vy0i859tq5jdi8x32.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2021-02-17 19:36:50 +0100kam1(~kam1@83.123.64.17)
2021-02-17 19:37:08 +0100slack1256(~slack1256@45.4.2.52)
2021-02-17 19:40:02 +0100darjeeling_(~darjeelin@122.245.120.7) (Ping timeout: 272 seconds)
2021-02-17 19:40:09 +0100elliott_(~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
2021-02-17 19:40:47 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 19:44:45 +0100son0p(~son0p@181.136.122.143)
2021-02-17 19:45:18 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 19:45:59 +0100oish(~charlie@228.25.169.217.in-addr.arpa)
2021-02-17 19:47:05 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-02-17 19:49:50 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Ping timeout: 264 seconds)
2021-02-17 19:52:08 +0100boxscape(4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
2021-02-17 19:52:30 +0100darjeeling_(~darjeelin@122.245.216.187)
2021-02-17 19:55:32 +0100ephemera_(~E@122.34.1.187) (Quit: ephemera_)
2021-02-17 19:56:47 +0100oish(~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds)
2021-02-17 19:57:37 +0100ephemera_(~E@122.34.1.187)
2021-02-17 19:58:46 +0100hololeap(~hololeap@unaffiliated/hololeap)
2021-02-17 19:58:56 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 20:00:03 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 260 seconds)
2021-02-17 20:00:18 +0100CrazyPython(~crazypyth@2600:1700:722:1a30:60fb:c52f:5d96:c857)
2021-02-17 20:01:36 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
2021-02-17 20:03:15 +0100ADG1089__(~aditya@122.163.133.103) (Quit: Konversation terminated!)
2021-02-17 20:03:28 +0100tremon(~aschuring@217-63-61-89.cable.dynamic.v4.ziggo.nl)
2021-02-17 20:03:39 +0100Tordek(tordek@gateway/shell/blinkenshell.org/x-pjwrhjxtnnhxkhtb)
2021-02-17 20:03:41 +0100berberman_(~berberman@unaffiliated/berberman)
2021-02-17 20:03:43 +0100 <Tordek> hi
2021-02-17 20:03:49 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
2021-02-17 20:03:54 +0100 <juri_> hio.
2021-02-17 20:04:14 +0100berberman(~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds)
2021-02-17 20:05:42 +0100geekosaur(82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-02-17 20:06:48 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-02-17 20:07:12 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-02-17 20:07:54 +0100mananamenos(~mananamen@37.red-88-27-26.staticip.rima-tde.net)
2021-02-17 20:08:21 +0100jonathanx(~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2021-02-17 20:09:06 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2021-02-17 20:09:42 +0100jonathanx(~jonathan@h-176-109.A357.priv.bahnhof.se)
2021-02-17 20:12:38 +0100frozenErebus(~frozenEre@94.128.219.166)
2021-02-17 20:14:51 +0100son0p(~son0p@181.136.122.143) (Ping timeout: 272 seconds)
2021-02-17 20:15:14 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 20:15:27 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
2021-02-17 20:15:59 +0100sveit(~sveit@45.77.0.246)
2021-02-17 20:16:09 +0100slack1256(~slack1256@45.4.2.52) (Ping timeout: 264 seconds)
2021-02-17 20:16:29 +0100simplegauss(~simplegau@45.77.0.246)
2021-02-17 20:18:24 +0100 <Tordek> I want to build an emulator; I have an idea in mind but I don't know if it makes sense as I'm envisioning it... basically, I'd like to write this-ish: https://dpaste.org/0mFw
2021-02-17 20:21:08 +0100 <Tordek> that is, I'd have a "bus" which communicates several devices (a processor and ram, for example) by performing a `tick`, where a `tick` is what drives the execution: the processor puts some value on the address lines, then calls tick, and the other devices listen to ticks and put their results on the bus...
2021-02-17 20:25:25 +0100kam1(~kam1@83.123.64.17) (Remote host closed the connection)
2021-02-17 20:25:35 +0100CrazyPython(~crazypyth@2600:1700:722:1a30:60fb:c52f:5d96:c857) (Remote host closed the connection)
2021-02-17 20:25:41 +0100geekosaur(82650c7a@130.101.12.122)
2021-02-17 20:26:00 +0100kam1(~kam1@83.123.64.17)
2021-02-17 20:28:22 +0100 <swarmcollective> Tordek, do you expect these devices to execute on their own threads?
2021-02-17 20:29:45 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-02-17 20:30:03 +0100ixaxaar(~ixaxaar@49.207.197.94) (Ping timeout: 272 seconds)
2021-02-17 20:30:06 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 20:31:40 +0100 <Tordek> swarmcollective: not threads; whenever you call tick on the bus each device should "move forward" as it were
2021-02-17 20:31:56 +0100xff0x(~xff0x@2001:1a81:53b4:e300:6089:d7b1:637f:ab27) (Ping timeout: 240 seconds)
2021-02-17 20:32:22 +0100 <swarmcollective> That certainly simplifies things.
2021-02-17 20:32:31 +0100 <Tordek> so, mentally my model is just a list of states that all might be read by/written to each device
2021-02-17 20:32:48 +0100 <swarmcollective> Consider having each device work off the same function signature, then you can build a list of them.
2021-02-17 20:32:55 +0100bergbrunnen(~ocean@ip4d152808.dynamic.kabel-deutschland.de)
2021-02-17 20:32:56 +0100 <swarmcollective> Map over the list.
2021-02-17 20:34:14 +0100xff0x(xff0x@gateway/vpn/mullvad/xff0x)
2021-02-17 20:34:45 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2021-02-17 20:34:57 +0100bergbrunnen(~ocean@ip4d152808.dynamic.kabel-deutschland.de) (Quit: leaving)
2021-02-17 20:35:04 +0100 <Tordek> swarmcollective: but each device can read from and write to the list on each tick
2021-02-17 20:35:23 +0100 <Tordek> (and, yes, bus collision where two devices attempt to write at once is a possibility)
2021-02-17 20:36:40 +0100 <Tordek> (also some operations take multiple ticks)
2021-02-17 20:38:06 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 20:38:16 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Remote host closed the connection)
2021-02-17 20:38:28 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 20:39:46 +0100sh9(~sh9@softbank060116136158.bbtec.net)
2021-02-17 20:41:25 +0100xff0x(xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 240 seconds)
2021-02-17 20:42:10 +0100 <swarmcollective> Tordek, have you defined your state types (bus, ram, processor, etc..)?
2021-02-17 20:42:39 +0100 <Tordek> I think it could work as an implicit state function, like... ram be a function that takes ramstate+"current bus tick" and returns ramstate+busAction; such that each tick applies each device to the current state then performs some flattening with currentState + [stateActions]
2021-02-17 20:43:26 +0100xff0x(~xff0x@2001:1a81:53b4:e300:9b30:953c:3e9a:9639)
2021-02-17 20:43:46 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-02-17 20:45:18 +0100 <Tordek> i.e., the type'd be something like InfiniteFunction = busState -> busAction, InfiniteFunction
2021-02-17 20:45:54 +0100 <Tordek> well, Device = busState -> (busAction, Device)
2021-02-17 20:46:22 +0100sh9(~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
2021-02-17 20:48:58 +0100mananamenos_(~mananamen@37.red-88-27-26.staticip.rima-tde.net)
2021-02-17 20:49:28 +0100 <swarmcollective> If I were approaching this, I would define each device with their own state, then a function `doRamTick :: busState -> busState` and `doUsbTick :: busState -> busState` and then I can define `machine :: [(BusState -> BusState)]`
2021-02-17 20:49:31 +0100 <swarmcollective> Something like that.
2021-02-17 20:49:36 +0100mananamenos(~mananamen@37.red-88-27-26.staticip.rima-tde.net) (Ping timeout: 240 seconds)
2021-02-17 20:49:48 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 20:49:58 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 20:50:26 +0100 <Tordek> https://dpaste.org/57bF pseudocode of my interpretation
2021-02-17 20:51:14 +0100mananamenos__(~mananamen@37.red-88-27-26.staticip.rima-tde.net)
2021-02-17 20:52:04 +0100 <Tordek> I'm thinking busAction rather than busState because what I'm trying to model is specifically the possibility of collision (e.g., two devices might attempt to write at the same time)
2021-02-17 20:52:26 +0100ADG1089__(~aditya@122.163.133.103)
2021-02-17 20:53:36 +0100mananamenos_(~mananamen@37.red-88-27-26.staticip.rima-tde.net) (Ping timeout: 240 seconds)
2021-02-17 20:55:58 +0100 <swarmcollective> If they are not running concurrently, then you'd need to simulate concurrency, in order to simulate collision, or am I missing something?
2021-02-17 20:56:02 +0100Ishutin(~ishutin@178-164-208-197.pool.digikabel.hu) (Ping timeout: 272 seconds)
2021-02-17 20:56:14 +0100Ishutin(~ishutin@178-164-208-197.pool.digikabel.hu)
2021-02-17 20:56:28 +0100 <Tordek> right, a machine is a collection of devices connected to a bus
2021-02-17 20:56:52 +0100 <geekosaur> concurrency here is multiple actions on the same tick, as I understand it
2021-02-17 20:57:05 +0100 <Tordek> on each tick, you'd send every device the current state, gather a list of busactions, apply that list on the state
2021-02-17 20:57:16 +0100 <Tordek> and that's the state of the new tick
2021-02-17 20:57:39 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2021-02-17 20:57:39 +0100hekkaidekapus](~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds)
2021-02-17 20:57:39 +0100jpds_(~jpds@gateway/tor-sasl/jpds)
2021-02-17 20:57:51 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 20:57:53 +0100 <swarmcollective> So, collision resolution would happen based on device priority.
2021-02-17 20:58:01 +0100m4lvin(~m4lvin@w4eg.de) (Quit: m4lvin)
2021-02-17 20:58:23 +0100m4lvin(~m4lvin@w4eg.de)
2021-02-17 20:59:14 +0100 <Tordek> that's the fun part; since this is meant to model real life electronics.... weird stuff happens
2021-02-17 21:00:05 +0100 <Tordek> so, the collision might result in a weird state, like "if you pressed a button at the same time as RAM was being written, you write trash to ram"
2021-02-17 21:00:07 +0100 <geekosaur> modeling real electronics also leads to fun like, you mentioned things that take multiple ticks. what happens when an address or datum on the bus changes in the meantime?
2021-02-17 21:01:23 +0100 <swarmcollective> Is your goal to create an unstable "machine" so that others can try strategies to resolve the issues?
2021-02-17 21:01:29 +0100 <Tordek> geekosaur: ticks are my boundaries, so if the value changes after I read it I don't mind
2021-02-17 21:01:52 +0100 <geekosaur> that doesn't model real electronics :)
2021-02-17 21:01:54 +0100hekkaidekapus](~tchouri@gateway/tor-sasl/hekkaidekapus)
2021-02-17 21:02:15 +0100 <geekosaur> Bad Things Happen if you change an asserted address on tick 2 of a 3-tick activity
2021-02-17 21:02:16 +0100 <Tordek> geekosaur: that's what clock cycles are for
2021-02-17 21:02:26 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
2021-02-17 21:02:32 +0100 <Tordek> ah, well... yes
2021-02-17 21:02:39 +0100 <Tordek> but it's a risk I'm willing to take :P
2021-02-17 21:03:17 +0100 <Tordek> swarmcollective: I just want to model a cycle-accurate emulator because I need hobbies
2021-02-17 21:05:13 +0100oish(~charlie@228.25.169.217.in-addr.arpa)
2021-02-17 21:05:15 +0100petersen(~petersen@redhat/juhp) (Ping timeout: 265 seconds)
2021-02-17 21:05:25 +0100minoru_shiraeesh(~shiraeesh@109.166.59.19) (Ping timeout: 240 seconds)
2021-02-17 21:05:35 +0100minoru_shiraeesh(~shiraeesh@109.166.59.203)
2021-02-17 21:06:22 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 21:06:29 +0100 <swarmcollective> hobbies = good
2021-02-17 21:07:13 +0100petersen(~petersen@redhat/juhp)
2021-02-17 21:08:21 +0100lambdah-`(~user@200.175.79.29.static.gvt.net.br) (Ping timeout: 246 seconds)
2021-02-17 21:08:58 +0100Ishutin(~ishutin@178-164-208-197.pool.digikabel.hu) (Ping timeout: 256 seconds)
2021-02-17 21:08:58 +0100kam1(~kam1@83.123.64.17) (Ping timeout: 256 seconds)
2021-02-17 21:08:59 +0100lambdah-`(~user@189.6.240.228)
2021-02-17 21:09:42 +0100Ishutin(~ishutin@178-164-208-197.pool.digikabel.hu)
2021-02-17 21:10:30 +0100 <Tordek> in fact, what I wanted really was a sort of "Bus monad" I guess
2021-02-17 21:11:07 +0100 <Tordek> so I can do, like... `busState <- tick; read; busState <- tick`
2021-02-17 21:11:21 +0100 <Tordek> so a function that takes several ticks just... specifies them
2021-02-17 21:12:55 +0100 <swarmcollective> I'd like to see something like that multi-threaded. :D An IORef for the bus and a Chan for the tick? (IDK, just spit-balling)
2021-02-17 21:13:50 +0100 <swarmcollective> Each thread operating at its own "frequency" based on the hypothetical speed of the device.
2021-02-17 21:15:18 +0100acidjnk_new(~acidjnk@p200300d0c7390959695ee7c38f7fb1b4.dip0.t-ipconnect.de)
2021-02-17 21:16:36 +0100isovector(~isovector@172.103.216.166.cable.tpia.cipherkey.com)
2021-02-17 21:18:47 +0100 <Tordek> https://dpaste.org/fGP6 this is more what I'm thinking, if it makes sense
2021-02-17 21:19:29 +0100mananamenos__(~mananamen@37.red-88-27-26.staticip.rima-tde.net) (Quit: Leaving)
2021-02-17 21:19:55 +0100sz0(uid110435@gateway/web/irccloud.com/x-ihvnvkqpmcfzhlan)
2021-02-17 21:23:36 +0100fendor(~fendor@178.165.131.69.wireless.dyn.drei.com) (Remote host closed the connection)
2021-02-17 21:24:22 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
2021-02-17 21:24:39 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Remote host closed the connection)
2021-02-17 21:26:09 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 21:27:09 +0100ADG1089__(~aditya@122.163.133.103) (Quit: Konversation terminated!)
2021-02-17 21:28:19 +0100 <isovector> ocharles: do you still like using GDP for authorization? would you recommend it in 2021?
2021-02-17 21:28:39 +0100fendor(~fendor@178.165.131.69.wireless.dyn.drei.com)
2021-02-17 21:29:00 +0100frozenErebus(~frozenEre@94.128.219.166) (Ping timeout: 246 seconds)
2021-02-17 21:38:06 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 21:38:28 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr)
2021-02-17 21:43:36 +0100 <Tordek> does my example up there make sense? how could I implement it properly?
2021-02-17 21:45:08 +0100 <isovector> is there any way to give arguments to pattern synonyms?
2021-02-17 21:45:23 +0100 <isovector> in order to parameterize the arguments to a view pattern that they call?
2021-02-17 21:45:49 +0100 <dolio> Don't think so.
2021-02-17 21:46:06 +0100 <dolio> It'd be an interesting feature, though.
2021-02-17 21:46:21 +0100geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2021-02-17 21:47:31 +0100 <dolio> It could easily get pretty complicated to specify, depending on how much of the possible desugarings you wanted to support.
2021-02-17 21:47:57 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal)
2021-02-17 21:48:13 +0100 <isovector> dang
2021-02-17 21:48:16 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2021-02-17 21:48:55 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-02-17 21:49:10 +0100 <dolio> It would be nice to even be able to do something simple like `Is x <- ((x ==) -> True)`, though.
2021-02-17 21:50:43 +0100 <isovector> yeah, that's almost exactly what i want
2021-02-17 21:51:19 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 21:51:42 +0100 <isovector> guess i could write a TH splice if i cared strongly enough
2021-02-17 21:51:44 +0100 <isovector> which i don't
2021-02-17 21:55:40 +0100borne(~fritjof@200116b864893b0095eb740676c27273.dip.versatel-1u1.de)
2021-02-17 21:57:20 +0100elliott_(~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
2021-02-17 21:58:16 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2021-02-17 22:01:19 +0100_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-02-17 22:01:49 +0100dhouthoo(~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 3.0)
2021-02-17 22:03:11 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-02-17 22:03:32 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 22:04:21 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-02-17 22:04:41 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
2021-02-17 22:06:02 +0100geekosaur(82650c7a@130.101.12.122) (Quit: Connection closed)
2021-02-17 22:06:19 +0100geekosaur(82650c7a@130.101.12.122)
2021-02-17 22:08:23 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
2021-02-17 22:08:45 +0100ericsagn1(~ericsagne@2405:6580:0:5100:f37e:89b0:6afc:b223) (Ping timeout: 272 seconds)
2021-02-17 22:10:47 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2021-02-17 22:16:09 +0100ddellacosta(ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-02-17 22:17:25 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 22:17:34 +0100 <ddellacosta> how does one interface with apple core libraries, in particular Core Audio?
2021-02-17 22:19:15 +0100newtoeverything(4174230f@65-116-35-15.dia.static.qwest.net)
2021-02-17 22:19:53 +0100jamm_(~jamm@unaffiliated/jamm)
2021-02-17 22:20:01 +0100 <ddellacosta> this looks pretty dead https://hackage.haskell.org/package/macos-corelibs
2021-02-17 22:20:39 +0100ericsagn1(~ericsagne@2405:6580:0:5100:39c8:7a81:4ef5:3dca)
2021-02-17 22:20:56 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Remote host closed the connection)
2021-02-17 22:21:36 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 22:22:16 +0100tsaka__(~torstein@athedsl-258913.home.otenet.gr) (Ping timeout: 240 seconds)
2021-02-17 22:22:33 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-02-17 22:23:55 +0100inkbottle(~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr)
2021-02-17 22:24:17 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2021-02-17 22:24:36 +0100zebrag(~inkbottle@aaubervilliers-654-1-98-217.w86-212.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2021-02-17 22:24:36 +0100andreas303(~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 268 seconds)
2021-02-17 22:25:03 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 22:25:31 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
2021-02-17 22:25:56 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Ping timeout: 240 seconds)
2021-02-17 22:26:41 +0100andreas303(~andreas@gateway/tor-sasl/andreas303)
2021-02-17 22:28:15 +0100newtoeverything(4174230f@65-116-35-15.dia.static.qwest.net) (Quit: Connection closed)
2021-02-17 22:28:28 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3) (Remote host closed the connection)
2021-02-17 22:28:37 +0100heatsink(~heatsink@2600:1700:bef1:5e10:140a:f0bd:8004:4ab3)
2021-02-17 22:29:01 +0100danso(~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 272 seconds)
2021-02-17 22:30:02 +0100Boomerang(~Boomerang@2a05:f6c7:2179:0:815d:8deb:faba:89c5) (Ping timeout: 265 seconds)
2021-02-17 22:30:05 +0100mouseghost(~draco@wikipedia/desperek) (Quit: mew wew)
2021-02-17 22:30:23 +0100bitmagie(~Thunderbi@200116b80635570028f424ad0dac631a.dip.versatel-1u1.de)
2021-02-17 22:30:39 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2021-02-17 22:31:03 +0100forgottenone(~forgotten@176.42.30.133) (Quit: Konversation terminated!)
2021-02-17 22:32:14 +0100 <ddellacosta> looks like I may be able to do what I need with hmid http://hackage.haskell.org/package/hmidi
2021-02-17 22:32:19 +0100 <ddellacosta> *hmidi
2021-02-17 22:35:25 +0100isovector(~isovector@172.103.216.166.cable.tpia.cipherkey.com) ("WeeChat 2.9")
2021-02-17 22:36:23 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
2021-02-17 22:36:32 +0100jathan(~jathan@69.61.93.38) (Quit: WeeChat 2.3)
2021-02-17 22:38:08 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving)
2021-02-17 22:38:53 +0100__monty__(~toonn@unaffiliated/toonn) (Quit: leaving)
2021-02-17 22:40:49 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-02-17 22:41:35 +0100 <absence> anyone know if haskell-language-server 0.9.0 will get builds for ghc 8.10.4, or is that for a future version?
2021-02-17 22:42:45 +0100lambdah-`(~user@189.6.240.228) (Ping timeout: 240 seconds)
2021-02-17 22:42:53 +0100danso(~dan@d67-193-121-2.home3.cgocable.net)
2021-02-17 22:43:02 +0100whitten(c75a9d0b@199.90.157.11) (Quit: Connection closed)
2021-02-17 22:43:32 +0100lambdah-`(~user@200.175.79.29.static.gvt.net.br)
2021-02-17 22:45:11 +0100deviantfero(~deviantfe@190.150.27.58) (Remote host closed the connection)
2021-02-17 22:45:15 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 260 seconds)
2021-02-17 22:45:35 +0100deviantfero(~deviantfe@190.150.27.58)
2021-02-17 22:52:04 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 22:53:19 +0100ddellacosta(ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection)
2021-02-17 22:55:30 +0100geekosaur(82650c7a@130.101.12.122) (Quit: Connection closed)
2021-02-17 22:57:02 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957) (Ping timeout: 264 seconds)
2021-02-17 22:57:43 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-02-17 23:00:22 +0100ddellacosta(ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-02-17 23:02:36 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-02-17 23:04:48 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-02-17 23:05:32 +0100jess(jess@freenode/staff/jess)
2021-02-17 23:07:41 +0100hendursaga(~weechat@gateway/tor-sasl/hendursaga)
2021-02-17 23:10:19 +0100ddellacosta(ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection)
2021-02-17 23:11:46 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 23:12:23 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 23:12:42 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 23:13:18 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-02-17 23:15:49 +0100shatriff(~vitaliish@176-52-216-242.irishtelecom.com)
2021-02-17 23:16:27 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 23:17:05 +0100usr25(~usr25@unaffiliated/usr25)
2021-02-17 23:18:10 +0100juri_(~juri@178.63.35.222) (Ping timeout: 256 seconds)
2021-02-17 23:18:24 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 23:18:33 +0100shatriff_(~vitaliish@176-52-216-242.irishtelecom.com) (Ping timeout: 264 seconds)
2021-02-17 23:20:30 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
2021-02-17 23:20:40 +0100Narinas(~Narinas@189.223.179.61.dsl.dyn.telnor.net)
2021-02-17 23:20:45 +0100tremon(~aschuring@217-63-61-89.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
2021-02-17 23:20:50 +0100slack1256(~slack1256@45.4.2.52)
2021-02-17 23:21:59 +0100jneira(501ca940@gateway/web/cgi-irc/kiwiirc.com/ip.80.28.169.64) (Quit: Ping timeout (120 seconds))
2021-02-17 23:27:02 +0100acidjnk_new(~acidjnk@p200300d0c7390959695ee7c38f7fb1b4.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2021-02-17 23:27:09 +0100fendor(~fendor@178.165.131.69.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2021-02-17 23:28:01 +0100mirrorbird(~psutcliff@2a00:801:44d:603d:d116:d5a1:4a2f:a08f) (Quit: Leaving)
2021-02-17 23:28:45 +0100deviantfero(~deviantfe@190.150.27.58) (Ping timeout: 240 seconds)
2021-02-17 23:28:52 +0100 <slack1256> Is there a package that implements the "Levenshtein Distance" for `text`? I only find such packages for String.
2021-02-17 23:31:23 +0100new_haskeller(~new_haske@2607:fea8:be1f:ddc0:c8eb:6c3:dd7a:7957)
2021-02-17 23:31:59 +0100bitmagie(~Thunderbi@200116b80635570028f424ad0dac631a.dip.versatel-1u1.de) (Quit: bitmagie)
2021-02-17 23:32:53 +0100ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-02-17 23:33:27 +0100inkbottle(~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 23:33:47 +0100inkbottle(~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr)
2021-02-17 23:34:14 +0100ukari(~ukari@unaffiliated/ukari)
2021-02-17 23:36:02 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Remote host closed the connection)
2021-02-17 23:36:34 +0100hololeap_(~hololeap@unaffiliated/hololeap)
2021-02-17 23:37:30 +0100alx741(~alx741@186.178.109.49) (Quit: alx741)
2021-02-17 23:38:16 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
2021-02-17 23:38:51 +0100hololeap(~hololeap@unaffiliated/hololeap) (Ping timeout: 246 seconds)
2021-02-17 23:39:45 +0100inkbottle(~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-02-17 23:40:08 +0100inkbottle(~inkbottle@aaubervilliers-654-1-4-36.w83-200.abo.wanadoo.fr)
2021-02-17 23:40:18 +0100neiluj(~jco@unaffiliated/neiluj) (Quit: leaving)
2021-02-17 23:40:53 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 265 seconds)
2021-02-17 23:41:21 +0100oish(~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 264 seconds)
2021-02-17 23:44:44 +0100michalz(~user@185.246.204.79) (Remote host closed the connection)
2021-02-17 23:44:56 +0100hololeap_hololeap
2021-02-17 23:44:59 +0100juri_(~juri@178.63.35.222)
2021-02-17 23:46:45 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2021-02-17 23:50:11 +0100st8less(~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Ping timeout: 272 seconds)
2021-02-17 23:51:55 +0100jneira(501ca940@gateway/web/cgi-irc/kiwiirc.com/ip.80.28.169.64)
2021-02-17 23:52:36 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-02-17 23:55:45 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-02-17 23:56:06 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-02-17 23:57:24 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2021-02-17 23:58:13 +0100jamm_(~jamm@unaffiliated/jamm)