2022/12/09

2022-12-09 00:03:36 +0100thyriaen(~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Remote host closed the connection)
2022-12-09 00:07:03 +0100 <EvanR> The NOINLINE pragma does exactly what you'd expect: it stops the named function from being inlined by the compiler. You shouldn't ever need to do this, unless you're very cautious about code size.
2022-12-09 00:07:43 +0100 <c_wraith> You shouldn't need to do it.. which is why you shouldn't unsafePerformIO at the top level.
2022-12-09 00:08:04 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds)
2022-12-09 00:08:31 +0100 <EvanR> I shouldn't do this
2022-12-09 00:08:44 +0100 <c_wraith> For some definitions of "shouldn't", absolutely.
2022-12-09 00:08:53 +0100 <EvanR> bwahahaha
2022-12-09 00:12:24 +0100hpc. o O ( acme-shouldnt - a package documented exactly like acme-dont, but it's a lie and it runs the code anyway )
2022-12-09 00:15:28 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-12-09 00:15:32 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-09 00:16:21 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-09 00:18:54 +0100 <EvanR> post mortem, program still works but doesn't really look much cleaner after all, and same number of lines if you ignore all the setup code
2022-12-09 00:19:55 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
2022-12-09 00:22:20 +0100lbseale(~quassel@user/ep1ctetus) (Quit: No Ping reply in 180 seconds.)
2022-12-09 00:22:36 +0100lbseale(~quassel@user/ep1ctetus)
2022-12-09 00:26:56 +0100 <EvanR> https://i.imgur.com/qw89Knk.png
2022-12-09 00:28:28 +0100pja(~pja@217.155.153.10) (Ping timeout: 260 seconds)
2022-12-09 00:28:39 +0100 <monochrom> More lines and shorter lines vs fewer lines and longer lines :)
2022-12-09 00:29:14 +0100 <iqubic> Why are south and east defined differently from north and west?
2022-12-09 00:32:53 +0100 <EvanR> you're totally right
2022-12-09 00:33:05 +0100 <EvanR> I should have centered my array at (0,0) xD
2022-12-09 00:33:34 +0100 <EvanR> there's an odd number of rows and columns in the input data
2022-12-09 00:38:38 +0100money_(~money@user/polo)
2022-12-09 00:42:06 +0100 <iqubic> What are the differences between IArrays, MArrays and UArrays in the Array package?
2022-12-09 00:43:19 +0100 <c_wraith> Doesn't it... say?
2022-12-09 00:44:36 +0100 <c_wraith> like, the first sentence on each relevant module haddock page says what's going on in that module.
2022-12-09 00:46:43 +0100 <hpc> honestly, it's really easy in haskell to go "i only need the type signatures" and ignore all the descriptions
2022-12-09 00:47:16 +0100 <c_wraith> the types actually do say almost all of it too. But they're a bit less obvious.
2022-12-09 00:48:18 +0100 <iqubic> I'm thinking using some sort of "Array (V2 Int) a" for storing 2D arrays, but I'm not sure what kind of Array would be the best.
2022-12-09 00:50:01 +0100 <c_wraith> First decide if you want mutable or not. Then decide how you want the a values stored
2022-12-09 00:50:18 +0100 <monochrom> At this point the fastest way to know is to try all 3 and benchmark them all.
2022-12-09 00:51:14 +0100 <geekosaur> this kinda sounds like an Array of Vector, though; shouldn't Vector be used for both dimensions? (Doesn't it have optimizations for that?)
2022-12-09 00:51:40 +0100 <monochrom> Oh! Then 4 options to try. \∩/
2022-12-09 00:53:15 +0100 <hpc> just wait until you start asking yourself "is this row-major or column-major"
2022-12-09 00:53:53 +0100 <monochrom> Oh haha I forgot that.
2022-12-09 00:54:11 +0100 <monochrom> Still, benchmarking is faster than waiting for telepathy to happen.
2022-12-09 00:54:36 +0100 <iqubic> hpc: That's the thing I want to avoid by using an Array with (V2 Int) as the index
2022-12-09 00:55:11 +0100 <geekosaur> oh, that's different still
2022-12-09 00:55:26 +0100 <c_wraith> It's not different from what I was saying
2022-12-09 00:55:32 +0100 <geekosaur> hm, does V2 have an Ix instance
2022-12-09 00:55:35 +0100 <c_wraith> yes
2022-12-09 00:55:38 +0100 <monochrom> You mean s/avoid/avoid being aware/
2022-12-09 00:55:42 +0100 <hpc> iqubic: technically the decision is still there and you just let the libraries decide, but yeah it's nice to have a meaningful index :P
2022-12-09 00:55:45 +0100 <c_wraith> It's the same Ix logic as (,) has
2022-12-09 00:56:36 +0100 <monochrom> "What's best?" and "I want to avoid being aware" sound like contradictions to each other.
2022-12-09 00:56:50 +0100 <iqubic> I know. I'll thinking about this on my own
2022-12-09 00:57:18 +0100 <monochrom> But what's new anyway. I want to earn a salary and do no work, too, as much as the next person.
2022-12-09 00:58:12 +0100 <hpc> ah, but the next person by what ordering? :P
2022-12-09 00:58:21 +0100 <monochrom> hahaha
2022-12-09 01:00:38 +0100 <hpc> also, often in programming the two are uncomfortably similar
2022-12-09 01:00:49 +0100 <monochrom> Did I tell you this plot line from a novel? 4 persons sworn to keep a secret; but one of them was evil and used the wording "I won't tell the 5th person". Later, at a conference of like 100 people, he told the secret. His defense: "Who is the 5th person?"
2022-12-09 01:00:54 +0100 <hpc> "do i move $0 to this register or xor it with itself" isn't something anyone wants to be aware of, but they do want fast code
2022-12-09 01:02:41 +0100 <iqubic> The next thing I'm confused by is why there's no lens function called "arrayOf" that constructs an Array from an IndexedTraversal like "toMapOf"
2022-12-09 01:03:11 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds)
2022-12-09 01:03:12 +0100 <c_wraith> It doesn't really add anything on top of composing with listarray
2022-12-09 01:03:36 +0100 <jackdk> I suspect it's also because you cannot guarantee that the traversal visits every index
2022-12-09 01:03:56 +0100 <monochrom> My understanding of human nature and Aesop fables is that I am confused that any function is written at all.
2022-12-09 01:04:15 +0100 <hpc> monochrom: the function was always there, waiting to be discovered
2022-12-09 01:04:40 +0100 <monochrom> Humans are supposed to be like "someone else should write that function" and end with a Mexican standoff impasse.
2022-12-09 01:04:51 +0100hippoid(~idris@user/hippoid) (Quit: WeeChat 3.5)
2022-12-09 01:05:26 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-09 01:05:26 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-09 01:05:26 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-09 01:05:26 +0100ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-09 01:06:02 +0100 <EvanR> all functions are chiseled out of the master function that does everything
2022-12-09 01:06:39 +0100 <iqubic> What's the master function do?
2022-12-09 01:06:40 +0100 <hpc> EvanR: that's amusingly close to a real thing - https://dolphin-emu.org/blog/2017/07/30/ubershaders/
2022-12-09 01:07:05 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!)
2022-12-09 01:07:37 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-09 01:08:17 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-09 01:08:29 +0100califax(~califax@user/califx)
2022-12-09 01:08:31 +0100 <hpc> iqubic: if you're still indecisive after all this discussion, i say break the tie in your head with Vector and wait until your code annoys you to regret the decision
2022-12-09 01:08:32 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-09 01:09:47 +0100 <EvanR> I found Vector of Vector of whatever to be easier to write than Array (Int,Int) because it wasn't symmetric
2022-12-09 01:10:06 +0100 <EvanR> I kept working with the transposed array all the time
2022-12-09 01:13:11 +0100 <jackdk> https://joearms.github.io/published/2013-11-21-My-favorite-erlang-program.html is the closest thing to a master function I've ever seen
2022-12-09 01:15:19 +0100 <hpc> that's pretty neat
2022-12-09 01:15:33 +0100 <hpc> and really does best exemplify erlang
2022-12-09 01:15:46 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-09 01:16:47 +0100 <hpc> one of my favorite little tricks in haskell is a forkIO thread that does nothing but read from a Chan (IO ()) it closes over and run that action
2022-12-09 01:17:50 +0100 <hpc> great for when i don't feel like dealing with dependencies yet :D
2022-12-09 01:18:31 +0100 <jackdk> Oh that's fun
2022-12-09 01:18:31 +0100 <c_wraith> you can do fun stuff in ghci that way too, like working interactively with things that normally need some kind of transformer over IO
2022-12-09 01:19:07 +0100 <c_wraith> just start up the environment, then send actions to it
2022-12-09 01:19:57 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2022-12-09 01:20:44 +0100 <hpc> jackdk: yeah - i have this not-really-a-joke that haskell is my favorite imperative language and perl is my favorite functional language
2022-12-09 01:20:49 +0100 <hpc> and first-class IO is why
2022-12-09 01:21:32 +0100 <iqubic> Why is perl a functional language?
2022-12-09 01:22:10 +0100 <hpc> perl's function calling conventions are extremely flexible
2022-12-09 01:22:31 +0100 <hpc> so like, a simple example with list flattening:
2022-12-09 01:22:42 +0100 <hpc> you have some function that does stuff, and it takes named parameters
2022-12-09 01:23:00 +0100 <hpc> so you can write foo(option1 => value1, option2 => value2)
2022-12-09 01:23:13 +0100 <hpc> but you almost always want option1 to be value3
2022-12-09 01:23:39 +0100 <hpc> well, the function actually just takes a "list", which can be array-ish or hash-ish or some combination
2022-12-09 01:24:23 +0100 <hpc> so you can write sub bar { foo(option1 => value3, @_); }
2022-12-09 01:24:34 +0100 <hpc> and now if you call bar(option2 => value2), option1 is value3
2022-12-09 01:24:47 +0100 <hpc> or you can call bar(option1 => value1, option2 => value2), and it's value1 instead
2022-12-09 01:25:14 +0100 <hpc> and of course, both foo and that defaults thing can be parameters
2022-12-09 01:25:40 +0100 <hpc> sub mkdefaults { my ($fun, $defaults) = @_; return sub { $fun->(%$defaults, @_); }; }
2022-12-09 01:26:13 +0100 <hpc> sub mkdefaults { my ($fun, @defaults) = @_; return sub { $fun->(@defaults, @_); }; } # er, meant to write this
2022-12-09 01:26:34 +0100 <hpc> so now you can write $bar = mkdefaults(\&foo, option1 => value3);
2022-12-09 01:26:48 +0100acidjnk_new(~acidjnk@p200300d6e7137a16f8a8efad5ebd7081.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-12-09 01:27:57 +0100 <hpc> and that's not to mention what you can do with regexes and block arguments
2022-12-09 01:28:29 +0100 <hpc> (regexes can call functions in perl)
2022-12-09 01:29:27 +0100 <monochrom> The Erlang universal server sounds dangerously close to unix inetd of the past and systemd socket activation today. :)
2022-12-09 01:30:38 +0100 <hpc> socket activation is more like lazy IO over a network imo
2022-12-09 01:31:00 +0100 <hpc> you "start" the server but don't actually run any code until something connects
2022-12-09 01:31:16 +0100 <hpc> like how a file handle ends up half-open with hGetContents
2022-12-09 01:32:04 +0100pja(~pja@2a02:8010:6098:0:e65f:1ff:fe1f:660f)
2022-12-09 01:33:19 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2022-12-09 01:33:20 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-09 01:33:38 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-12-09 01:47:05 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-12-09 01:47:48 +0100redmp(~redmp@mobile-166-170-36-4.mycingular.net)
2022-12-09 01:47:52 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-12-09 01:48:56 +0100 <redmp> Hello! I have a question about typeclasses: <https://termbin.com/b8z6> In this example, the C₁ instance can see the A instance, but the C₂ cannot. Why not?
2022-12-09 01:49:30 +0100thegeekinside(~thegeekin@189.217.82.244)
2022-12-09 01:51:53 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Ping timeout: 252 seconds)
2022-12-09 01:55:55 +0100 <jackdk> There's probably a good reason like "an instance must directly mention all declared superclasses" but I don't know what it is.
2022-12-09 01:56:04 +0100 <jackdk> If you don't get an answer, maybe try the Discourse?
2022-12-09 01:59:59 +0100 <EvanR> hpc, I'm not sure I understand the role of the thread + Chan (IO ()) for the purposes of not dealing with dependencies
2022-12-09 02:00:03 +0100Guest75(Guest75@2a01:7e01::f03c:92ff:fe5d:7b18) (Ping timeout: 260 seconds)
2022-12-09 02:01:41 +0100 <redmp> jackdk: Here's a sentence from the 2010 report that seems to contradict the behavior in that snippet:
2022-12-09 02:01:44 +0100 <redmp> "The constraints expressed by the superclass context cx[(T u1 … uk)∕u] of C must be satisfied. In other words, T must be an instance of each of C’s superclasses and the contexts of all superclass instances must be implied by cx′. "
2022-12-09 02:02:05 +0100 <monochrom> Short answer: You are lacking an "instance A x where ...".
2022-12-09 02:02:12 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-09 02:02:16 +0100 <hpc> EvanR: it's a janky way of getting 80% of https://hackage.haskell.org/package/async
2022-12-09 02:02:20 +0100 <monochrom> This is exactly the same as the following.
2022-12-09 02:02:43 +0100 <redmp> jackdk: https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-770004.3.2
2022-12-09 02:02:54 +0100 <monochrom> Because "class Eq a => Ord a", if you add "instance Ord Foo" then you also need to add "instance Eq Foo".
2022-12-09 02:03:03 +0100 <monochrom> Yes, because.
2022-12-09 02:03:09 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-09 02:03:09 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-09 02:03:09 +0100wroathe(~wroathe@user/wroathe)
2022-12-09 02:03:53 +0100 <EvanR> hpc, the only difference from just executing all the IO as is in all the threads is some kind of global serialization?
2022-12-09 02:04:09 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-09 02:04:27 +0100 <redmp> monochrom: But C₂ has an instance of A under the assumption that it has an instance of B, which is stated in C₂'s instance context.
2022-12-09 02:05:02 +0100 <monochrom> That is a wrong interpretation.
2022-12-09 02:05:50 +0100Topsi(~Topsi@dyndsl-095-033-225-177.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-12-09 02:05:58 +0100 <hpc> EvanR: it's just that it gets put in the background in a close-enough way to test an idea
2022-12-09 02:06:06 +0100 <monochrom> Instead, an author of "instance ... C2 Foo" has the obligation, not the assumption, to add "instance ... A Foo". As said.
2022-12-09 02:06:19 +0100 <hpc> the fact that it's still all sort of serial doesn't matter as much as my being able to carry on in the main thread
2022-12-09 02:06:29 +0100 <monochrom> This is also what the Haskell Report clause you quoted says.
2022-12-09 02:06:29 +0100 <EvanR> Oh I see, a cheap way to run a side action without spawning a thread
2022-12-09 02:06:34 +0100 <hpc> and it's like 4 lines of code
2022-12-09 02:06:34 +0100 <EvanR> with no way to get the result
2022-12-09 02:06:41 +0100 <hpc> yeah
2022-12-09 02:06:42 +0100 <redmp> monochrom: C₁ can use 'a' in its implementatino and doesn't add an instance of A anywhere because C₁ has B in its context.
2022-12-09 02:07:11 +0100 <EvanR> though wouldn't that be equivalent to... forkIO io
2022-12-09 02:07:21 +0100 <redmp> Ugh, this is difficult .. sorry, my last sentence is confusing b/c I didn't state when I'm talking about an instance or a class.
2022-12-09 02:07:24 +0100 <EvanR> writeChan ch io <=> forkIO io
2022-12-09 02:07:30 +0100 <monochrom> C1 is different from C2.
2022-12-09 02:07:42 +0100 <EvanR> except for the serialization
2022-12-09 02:07:43 +0100 <geekosaur> monochrom, I would question that because the context can't be discharged until a use site, not the instance declaration, no?
2022-12-09 02:07:55 +0100 <monochrom> C1 is simply "class C1" so it actually imposes fewer obligations on instance authors.
2022-12-09 02:08:40 +0100 <monochrom> OK, everything you say, use it to explain why "instance Ord Foo" is rejected until "instanace Eq Foo" exists.
2022-12-09 02:08:40 +0100 <hpc> EvanR: in the simplest case yeah, but it's also got a bit of flexibility in it
2022-12-09 02:08:51 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-12-09 02:09:02 +0100 <hpc> maybe instead of Chan (IO ()) it's Chan (a -> IO ()) or something, and i have some useful other thing closed over
2022-12-09 02:09:11 +0100 <hpc> or instead of forkIO, it's forkOS and that's actually the opengl thread
2022-12-09 02:09:12 +0100 <monochrom> My simple theory explains it. Your theories don't.
2022-12-09 02:09:20 +0100 <EvanR> ah
2022-12-09 02:09:50 +0100 <EvanR> Chan (a -> IO ()) with something useful closed over, hey look, more globals
2022-12-09 02:09:55 +0100 <EvanR> OOP eat your heart out
2022-12-09 02:10:04 +0100 <monochrom> And damn right "class X => Y" is not "instance X => Y". In fact very opposite.
2022-12-09 02:10:15 +0100 <hpc> in the project i came up with that idiom in, it wasn't one thread
2022-12-09 02:10:23 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-12-09 02:10:23 +0100 <monochrom> One could almost argue that one of those =>'s should have been <=
2022-12-09 02:10:24 +0100 <redmp> monochrom: have i hit a nerve?
2022-12-09 02:10:39 +0100 <hpc> i had a supervisor thread dynamically resizing a pool that all consumed from the same channel, for load testing
2022-12-09 02:11:13 +0100 <EvanR> enough stockholm syndrome has me reading class Eq a => Ord a where from right to left
2022-12-09 02:11:24 +0100 <EvanR> I know it says => but I think <=
2022-12-09 02:11:49 +0100 <hpc> heh, i just think of the base type classes and "know what it means"
2022-12-09 02:12:07 +0100 <hpc> and then get as confused as redmp when the names are reduced to A/B/C :P
2022-12-09 02:14:05 +0100thegeekinside(~thegeekin@189.217.82.244) (Remote host closed the connection)
2022-12-09 02:14:35 +0100EvanR(~EvanR@user/evanr) (Remote host closed the connection)
2022-12-09 02:14:48 +0100 <monochrom> In "instance B x => C1 x", the "B x =>" is used to check "c1 = a" only.
2022-12-09 02:14:56 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-09 02:15:25 +0100EvanR(~EvanR@user/evanr)
2022-12-09 02:15:28 +0100 <monochrom> It is not used to help accept "you can make x an instance of C1" at all.
2022-12-09 02:15:44 +0100 <monochrom> And it does not help accept "you can make x an instance of C2" either.
2022-12-09 02:16:11 +0100 <monochrom> Those of us who survived the Functor-Applicative-Monad transition know it very well.
2022-12-09 02:16:30 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-12-09 02:16:57 +0100 <monochrom> We had all kinds of "instance <possibly constraints => > Monad Foo" without any "instance Functor Foo" or "instance Applicative Foo".
2022-12-09 02:17:27 +0100chomwitt(~chomwitt@athedsl-351826.home.otenet.gr) (Read error: Connection reset by peer)
2022-12-09 02:17:28 +0100 <monochrom> Suddenly base added "class Functor => Applicative" and "class Applicative => Monad", we had to add those extra instances.
2022-12-09 02:17:47 +0100 <monochrom> IT DID NOT MATTER WHAT WE HAD IN <possibly constraints => >
2022-12-09 02:18:06 +0100 <redmp> it seems i hit a nerve
2022-12-09 02:18:17 +0100biancospino(~biancospi@host-212-171-55-162.pool212171.interbusiness.it)
2022-12-09 02:18:22 +0100 <monochrom> Sure.
2022-12-09 02:18:32 +0100 <geekosaur> are you, uh, paying attention?
2022-12-09 02:18:47 +0100 <geekosaur> or just whining about having hit a nerve?
2022-12-09 02:19:15 +0100 <redmp> i dunno, monochrom is the one using caps when all i did was ask a question and then seek clarification, once
2022-12-09 02:19:34 +0100 <redmp> Here's a quote from the 2010 report https://termbin.com/yo1n
2022-12-09 02:20:38 +0100biancospino(~biancospi@host-212-171-55-162.pool212171.interbusiness.it) ()
2022-12-09 02:20:38 +0100 <monochrom> Well I can stop. You won't get further information.
2022-12-09 02:20:44 +0100 <redmp> ???
2022-12-09 02:20:59 +0100 <monochrom> I can complain "all I did was give an honest answer", too.
2022-12-09 02:21:33 +0100 <EvanR> what is the current topic / question
2022-12-09 02:22:15 +0100 <redmp> uh, i just found some behavior i didn't understand and i asked why it works like that
2022-12-09 02:22:29 +0100 <monochrom> And I answered why it works like that.
2022-12-09 02:22:50 +0100 <monochrom> It's also a very simple answer.
2022-12-09 02:23:37 +0100 <redmp> If I can paraphrase your answer, it seems like you said: The constraints mentioned by the class declaration have to be repeated by instance declarations, and there's no flexibility on that point.
2022-12-09 02:23:44 +0100 <redmp> Is that a correct understanding of your answer?
2022-12-09 02:23:53 +0100 <monochrom> No.
2022-12-09 02:24:24 +0100 <EvanR> constraints mentioned in the class declaration have to be satisfied somehow for your instances, one way or another
2022-12-09 02:25:13 +0100 <monochrom> The "satisfied" there is still ambiguous.
2022-12-09 02:25:30 +0100 <monochrom> "repeated by instance declarations" is also ambiguous.
2022-12-09 02:25:38 +0100 <hpc> "class A x => B x" means "to write an instance B x, you must also write an instance A x"
2022-12-09 02:25:51 +0100ddellacosta(~ddellacos@89.45.224.208)
2022-12-09 02:25:57 +0100 <monochrom> Both could be interpreted as "instance Eq Foo => Ord Foo" which is wrong.
2022-12-09 02:25:59 +0100xff0x(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 264 seconds)
2022-12-09 02:26:07 +0100 <monochrom> Yes, see, what hpc said.
2022-12-09 02:26:24 +0100 <hpc> "instance A x => B x" means "this instance covers all x, but you can only use the instance in contexts where you have instance A x, whatever x is"
2022-12-09 02:27:00 +0100 <hpc> so say you wrote "instance A x => B x where b = whatever"
2022-12-09 02:27:13 +0100 <hpc> and now elsewhere in your code you write "example = b 100"
2022-12-09 02:27:31 +0100 <hpc> that will only typecheck if you have instance A Int
2022-12-09 02:29:02 +0100 <hpc> you generally don't want to write "instance A x => B x", for reasons that are hard to understand without a bunch of other type class knowledge
2022-12-09 02:29:20 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-12-09 02:29:37 +0100 <redmp> So is this a difference of *when* the constraint is enforced? The class constraint is enforced where the instance is defined, but the instance constraint is enforced where the methods are used?
2022-12-09 02:29:41 +0100 <hpc> the docs for OverlappingInstances might be a good place to start for background on thata
2022-12-09 02:30:57 +0100 <hpc> redmp: that's probably a good working understanding of it, yeah
2022-12-09 02:31:28 +0100 <redmp> ok, thank you hpc and monochrom
2022-12-09 02:31:32 +0100 <mrkun[m]> https://www.youtube.com/watch?v=OPGd5p_W_LM talks exactly about the original case, if you don't mind video
2022-12-09 02:31:42 +0100 <hpc> you'll find later that "enforced" is a fuzzy way of talking about how instances get resolved and such
2022-12-09 02:31:42 +0100 <redmp> i'll take a look
2022-12-09 02:31:47 +0100 <EvanR> you don't necessarily have to write an instance B x directly, it could provided by a more general instance, based on something else
2022-12-09 02:32:24 +0100money_(~money@user/polo) (Quit: money_)
2022-12-09 02:33:57 +0100 <EvanR> er, I meant A
2022-12-09 02:34:00 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2022-12-09 02:34:30 +0100 <monochrom> I don't think you can get more general than "instance A x" especially with "x" being a type variable. :)
2022-12-09 02:35:02 +0100 <EvanR> some instance declarations produce instances for a family of types at a time, based on more prereqs
2022-12-09 02:35:16 +0100 <EvanR> yeah for some reason I thought x was a metasyntactic variable here not literally a type variable
2022-12-09 02:37:12 +0100 <hpc> heh, yeah i hate when that sort of confusion happens to me
2022-12-09 02:37:21 +0100 <hpc> i try and always name my metasyntactic variables things like "expr"
2022-12-09 02:37:49 +0100 <EvanR> when teachers ask "what is x", they have no idea
2022-12-09 02:38:29 +0100 <hpc> one of my coworkers never properly learned what a graph was
2022-12-09 02:38:30 +0100 <EvanR> what they're getting into!
2022-12-09 02:38:42 +0100 <hpc> i drew a sine wave on his whiteboard and he said "i have no idea what that is"
2022-12-09 02:39:08 +0100 <hpc> it's funny how easily you get used to some things being common knowledge
2022-12-09 02:39:29 +0100 <jean-paul[m]> how ... what ... how do you get out of grade school without knowing what a graph is
2022-12-09 02:39:40 +0100 <hpc> but if i had to explain the difference between a variable and a metasyntactic variable, i don't think i could
2022-12-09 02:39:45 +0100 <monochrom> Selective amnesia.
2022-12-09 02:39:51 +0100 <EvanR> I thought graph was going to be something else
2022-12-09 02:40:22 +0100 <EvanR> something about dijkstra
2022-12-09 02:40:35 +0100 <monochrom> You know how after exams, students are like "now I can forget all this stuff".
2022-12-09 02:40:50 +0100 <hpc> jean-paul[m]: you'd be surprised how far you can go sometimes just by mushing notation together
2022-12-09 02:41:04 +0100 <hpc> (and admittedly also by how far you don't really have to go to graduate)
2022-12-09 02:41:22 +0100 <hpc> i got through a lot of physics work by ignoring reality and doing unit conversions
2022-12-09 02:41:50 +0100 <hpc> m**2 to m, multiply by 2/x, and such
2022-12-09 02:41:58 +0100 <EvanR> i got the impression that the basic levels at my high school were lessons in patience, just sit in the room for 4 years. And they will throw you a party at the end
2022-12-09 02:42:19 +0100 <hpc> (funny enough, this was before i learned calc)
2022-12-09 02:42:40 +0100 <hpc> sometimes the adapation to not learn something is more effective than learning it
2022-12-09 02:47:35 +0100 <redmp> quit
2022-12-09 02:47:36 +0100redmp(~redmp@mobile-166-170-36-4.mycingular.net) (Quit: leaving)
2022-12-09 02:51:00 +0100 <monochrom> Cynically and radically extremistly, I am not convinced that any essay writing "in your own words to show you understand" is any more than mushing notation together.
2022-12-09 02:51:20 +0100 <monochrom> Or at least most essay writing.
2022-12-09 02:52:14 +0100 <hpc> there's a thing on that which i can't find now
2022-12-09 02:52:32 +0100 <c_wraith> "write a more convincing explanation of why you know something than the latest GPT model"
2022-12-09 02:52:34 +0100 <hpc> called "gaming the test" or something like that
2022-12-09 02:52:54 +0100 <monochrom> Ah yes people game the tests all the time.
2022-12-09 02:52:56 +0100 <hpc> where you aren't actually trained in class to know material, you're trained to satisfy the teacher's grading function
2022-12-09 02:53:22 +0100 <hpc> in a math class that might be "show your work confidently no matter how wrong you are"
2022-12-09 02:53:40 +0100 <hpc> in a literature class it might be "in the old man and the sea, joe dimaggio is jesus"
2022-12-09 02:54:16 +0100 <monochrom> My university has insane TOEFL score requirements for foreign students. The East Asian students we get are still very broken in very basic English grammar.
2022-12-09 02:54:17 +0100 <hpc> you don't have to believe it, you just have to write it, chinese room style
2022-12-09 02:54:52 +0100 <monochrom> Explanation: They got insane TOEFL scores by remembering insane long obscure words in the dictionary, not by figuring out English.
2022-12-09 02:55:01 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Remote host closed the connection)
2022-12-09 02:55:11 +0100 <hpc> ah, interesting
2022-12-09 02:55:34 +0100 <hpc> i guess it's like that old ms word feature that said "your document is at an 8th grade reading level" or whatever?
2022-12-09 02:56:03 +0100 <hpc> as long as you just keep using prepositions your score goes up and up
2022-12-09 02:56:10 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-12-09 02:56:43 +0100 <monochrom> Wait, joe dimaggio is jesus??!!
2022-12-09 02:56:57 +0100 <hpc> monochrom: it's been decades and i am still bitter about that class
2022-12-09 02:57:01 +0100monochromdidn't get that back then when reading the old man and the sea.
2022-12-09 02:57:14 +0100monochromdidn't even remember the person's name, dammit
2022-12-09 02:57:32 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Remote host closed the connection)
2022-12-09 02:57:43 +0100 <hpc> i don't think the old man had a name
2022-12-09 02:57:50 +0100 <hpc> but he had a radio on the boat, and listened to baseball
2022-12-09 02:57:54 +0100 <jackdk> I recently a joke that GPT stood for "Guessing the Password of the Teacher"
2022-12-09 02:58:06 +0100 <hpc> jackdk: i think that's actually what it was called
2022-12-09 02:58:20 +0100 <monochrom> btw I read a Chinese translation. That might hurt, too.
2022-12-09 02:58:32 +0100 <hpc> https://www.lesswrong.com/posts/NMoLJuDJEms7Ku9XS/guessing-the-teacher-s-password
2022-12-09 02:58:39 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-12-09 02:59:01 +0100 <monochrom> haha
2022-12-09 02:59:24 +0100 <jackdk> yeah it was a reference to that LW article
2022-12-09 02:59:48 +0100 <hpc> i mean, that's the thing i was forgetting the name of :D
2022-12-09 03:03:44 +0100 <monochrom> OK today I learn that wakalixes is a good password. >:)
2022-12-09 03:04:05 +0100 <hpc> ill remember it the next time i need to log into your email
2022-12-09 03:04:50 +0100beteigeuze(~Thunderbi@85.247.81.220) (Ping timeout: 246 seconds)
2022-12-09 03:13:23 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2022-12-09 03:13:35 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-09 03:17:17 +0100azimut_(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-09 03:18:02 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-09 03:26:13 +0100inversed(~inversed@bcdcac82.skybroadband.com) (Read error: Connection reset by peer)
2022-12-09 03:27:11 +0100notzmv(~zmv@user/notzmv)
2022-12-09 03:27:29 +0100razetime(~quassel@49.207.203.213)
2022-12-09 03:28:58 +0100inversed(~inversed@bcdcac82.skybroadband.com)
2022-12-09 03:35:15 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2022-12-09 03:41:00 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-12-09 03:43:06 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-12-09 03:43:46 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-09 03:45:22 +0100mmhat(~mmh@p200300f1c73b51d2ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1)
2022-12-09 03:50:04 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds)
2022-12-09 03:52:38 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
2022-12-09 03:53:17 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-09 03:56:02 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-09 04:00:02 +0100 <EvanR> stupid question, what is "unlifted" and or "to unlift" / "unlifting" something
2022-12-09 04:00:09 +0100 <EvanR> are they even related
2022-12-09 04:05:01 +0100mvk(~mvk@2607:fea8:5ce3:8500::efb)
2022-12-09 04:05:07 +0100mvk(~mvk@2607:fea8:5ce3:8500::efb) (Client Quit)
2022-12-09 04:16:24 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2022-12-09 04:16:31 +0100jinsun(~jinsun@user/jinsun)
2022-12-09 04:17:52 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43)
2022-12-09 04:19:10 +0100 <monochrom> Depends on context.
2022-12-09 04:19:55 +0100 <monochrom> But I think there is an "unlifted" library that's about bringing forkIO or bracket to StateT IO etc.
2022-12-09 04:21:51 +0100 <jackdk> Unless he's talking about unlifted data types?
2022-12-09 04:22:17 +0100 <EvanR> let the answer be in the list monad xD
2022-12-09 04:22:28 +0100 <EvanR> so far there's two possibilities
2022-12-09 04:24:35 +0100 <ddellacosta> weird I was just this second thinking about this https://www.fpcomplete.com/blog/2017/07/announcing-new-unliftio-library/
2022-12-09 04:26:07 +0100 <EvanR> so in unliftIO, is it supposed to be the opposite of lifting (transformer jargon) ?
2022-12-09 04:26:42 +0100zmt01(~zmt00@user/zmt00)
2022-12-09 04:27:05 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2022-12-09 04:27:17 +0100pflanze_(~pflanze@159.100.249.232)
2022-12-09 04:27:28 +0100tzh_(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-12-09 04:27:31 +0100poljar1(~poljar@93-139-83-160.adsl.net.t-com.hr)
2022-12-09 04:27:36 +0100Luj30(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
2022-12-09 04:27:45 +0100rune_(sid21167@id-21167.ilkley.irccloud.com)
2022-12-09 04:27:46 +0100ozkutuk53(~ozkutuk@176.240.173.153)
2022-12-09 04:27:46 +0100idnar_(sid12240@debian/mithrandi)
2022-12-09 04:27:48 +0100arkeet`(arkeet@moriya.ca)
2022-12-09 04:27:48 +0100econo_(uid147250@user/econo)
2022-12-09 04:28:07 +0100scav_(sid309693@user/scav)
2022-12-09 04:28:09 +0100mxs_(~mxs@user/mxs)
2022-12-09 04:28:28 +0100sclv_(sid39734@haskell/developer/sclv)
2022-12-09 04:28:32 +0100totbwf_(sid402332@id-402332.uxbridge.irccloud.com)
2022-12-09 04:28:33 +0100meinside_(uid24933@id-24933.helmsley.irccloud.com)
2022-12-09 04:28:41 +0100jludwig89(~justin@li657-110.members.linode.com)
2022-12-09 04:28:42 +0100poscat0x04(~poscat@2408:8206:4821:f702:d964:a961:eb17:d7fd)
2022-12-09 04:28:43 +0100Fangs_(sid141280@id-141280.hampstead.irccloud.com)
2022-12-09 04:28:52 +0100jrm2(~jrm@user/jrm)
2022-12-09 04:28:53 +0100coderpat-(~coderpath@d66-183-126-83.bchsia.telus.net)
2022-12-09 04:28:57 +0100pieguy128_(~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-160.dsl.bell.ca)
2022-12-09 04:29:13 +0100 <monochrom> So I think it's called "unlift" because to have some kind of bracket for StateT IO, first you have to bring StateT IO down to IO level, because bracket requires that.
2022-12-09 04:29:19 +0100FragByte_(~christian@user/fragbyte)
2022-12-09 04:29:32 +0100gawen_(~gawen@user/gawen)
2022-12-09 04:29:35 +0100mud(~mud@user/kadoban)
2022-12-09 04:29:49 +0100nek09(~nek0@2a01:4f8:222:2b41::12)
2022-12-09 04:30:10 +0100hrberg_(~quassel@171.79-160-161.customer.lyse.net)
2022-12-09 04:30:14 +0100potash_(~foghorn@94.225.47.8)
2022-12-09 04:30:30 +0100xnbya2(~xnbya@2a01:4f8:c17:cbdd::1)
2022-12-09 04:30:46 +0100shriekingnoise_(~shrieking@186.137.167.202)
2022-12-09 04:30:47 +0100lbseale_(~quassel@user/ep1ctetus)
2022-12-09 04:30:52 +0100haveo_(~haveo@sl35.iuwt.fr)
2022-12-09 04:31:00 +0100meooow_(~meooow@2400:6180:100:d0::ad9:e001)
2022-12-09 04:31:01 +0100tinwood_(~tinwood@general.default.akavanagh.uk0.bigv.io)
2022-12-09 04:31:03 +0100tomku|two(~tomku@user/tomku)
2022-12-09 04:31:06 +0100mauke_(~mauke@user/mauke)
2022-12-09 04:31:20 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-12-09 04:31:20 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-12-09 04:31:20 +0100finn_elijaFinnElija
2022-12-09 04:31:32 +0100mjacob_(~mjacob@adrastea.uberspace.de)
2022-12-09 04:31:35 +0100mtjm_(~mutantmel@2604:a880:2:d0::208b:d001)
2022-12-09 04:31:43 +0100masterbu1lder(~master@user/masterbuilder)
2022-12-09 04:31:44 +0100wroathe_(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-09 04:31:52 +0100xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-09 04:31:53 +0100finstern1s(~X@23.226.237.192)
2022-12-09 04:32:53 +0100mimmy_(~mimmy@2604:a880:cad:d0::3e:1001)
2022-12-09 04:32:59 +0100terrorjack7(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-12-09 04:33:00 +0100Erutuon_(~Erutuon@user/erutuon)
2022-12-09 04:33:48 +0100wroathe(~wroathe@user/wroathe) (Killed (NickServ (GHOST command used by wroathe_!~wroathe@207-153-38-140.fttp.usinternet.com)))
2022-12-09 04:33:51 +0100wroathe_wroathe
2022-12-09 04:34:06 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Client Quit)
2022-12-09 04:34:31 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-09 04:34:32 +0100 <EvanR> ah
2022-12-09 04:34:49 +0100econo(uid147250@user/econo) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100poscat(~poscat@2408:8206:4821:f702:d964:a961:eb17:d7fd) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100jludwig(~justin@user/jludwig) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100mxs(~mxs@user/mxs) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100rune(sid21167@id-21167.ilkley.irccloud.com) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100mimmy(~mimmy@159.203.19.37) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100econo_econo
2022-12-09 04:34:49 +0100TheCoffeMaker(~TheCoffeM@user/thecoffemaker) (Ping timeout: 256 seconds)
2022-12-09 04:34:49 +0100FragByte(~christian@user/fragbyte) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100sclv(sid39734@haskell/developer/sclv) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100idnar(sid12240@debian/mithrandi) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100arkeet(arkeet@moriya.ca) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100mimmy_mimmy
2022-12-09 04:34:50 +0100meinside(uid24933@id-24933.helmsley.irccloud.com) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100tomku(~tomku@user/tomku) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100jludwig89jludwig
2022-12-09 04:34:50 +0100haveo(~haveo@sl35.iuwt.fr) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100tinwood(~tinwood@canonical/tinwood) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100rune_rune
2022-12-09 04:34:50 +0100mauke(~mauke@user/mauke) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100totbwf(sid402332@id-402332.uxbridge.irccloud.com) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100scav(sid309693@user/scav) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100mxs_mxs
2022-12-09 04:34:50 +0100FragByte_FragByte
2022-12-09 04:34:50 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 256 seconds)
2022-12-09 04:34:50 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100lbseale(~quassel@user/ep1ctetus) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100Erutuon(~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100shriekingnoise(~shrieking@186.137.167.202) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100meooow(~meooow@2400:6180:100:d0::ad9:e001) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100mtjm(~mutantmel@2604:a880:2:d0::208b:d001) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100Luj3(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100swamp_(~zmt00@user/zmt00) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100poljar(~poljar@93-139-83-160.adsl.net.t-com.hr) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100arkeet`arkeet
2022-12-09 04:34:51 +0100sclv_sclv
2022-12-09 04:34:51 +0100mjacob(~mjacob@adrastea.uberspace.de) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100masterbuilder(~master@user/masterbuilder) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100hrberg(~quassel@171.79-160-161.customer.lyse.net) (Ping timeout: 256 seconds)
2022-12-09 04:34:51 +0100kadobanana(~mud@user/kadoban) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100nek0(~nek0@2a01:4f8:222:2b41::12) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100pieguy128(~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-160.dsl.bell.ca) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100finsternis(~X@23.226.237.192) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100ozkutuk5(~ozkutuk@176.240.173.153) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100coderpath(~coderpath@d66-183-126-83.bchsia.telus.net) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100gawen(~gawen@user/gawen) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100potash(~foghorn@user/foghorn) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100pflanze(~pflanze@159.100.249.232) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100jrm(~jrm@user/jrm) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100Putonlalla(~Putonlall@it-cyan.it.jyu.fi) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100earthy(~arthurvl@2a02-a469-f5e2-1-ba27-ebff-fea0-40b0.fixed6.kpn.net) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100Fangs(sid141280@id-141280.hampstead.irccloud.com) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100xnbya(~xnbya@2a01:4f8:c17:cbdd::1) (Ping timeout: 256 seconds)
2022-12-09 04:34:52 +0100earthy(~arthurvl@2a02:a469:f5e2:1:ba27:ebff:fea0:40b0)
2022-12-09 04:34:52 +0100wroathe(~wroathe@207.153.38.140)
2022-12-09 04:34:52 +0100totbwf_totbwf
2022-12-09 04:34:52 +0100Luj30Luj3
2022-12-09 04:34:52 +0100ozkutuk53ozkutuk5
2022-12-09 04:34:52 +0100wroathe(~wroathe@207.153.38.140) (Changing host)
2022-12-09 04:34:52 +0100wroathe(~wroathe@user/wroathe)
2022-12-09 04:34:53 +0100jrm2jrm
2022-12-09 04:34:53 +0100Fangs_Fangs
2022-12-09 04:34:53 +0100meinside_meinside
2022-12-09 04:34:53 +0100nek09nek0
2022-12-09 04:34:53 +0100idnar_idnar
2022-12-09 04:34:53 +0100scav_scav
2022-12-09 04:34:53 +0100terrorjack7terrorjack
2022-12-09 04:34:54 +0100finstern1sfinsternis
2022-12-09 04:34:55 +0100TheCoffeMaker_(~TheCoffeM@190.245.123.30)
2022-12-09 04:34:56 +0100wroathe048AAIV30
2022-12-09 04:35:40 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-09 04:35:41 +0100048AAIV30wroathe
2022-12-09 04:36:28 +0100mtjm_mtjm
2022-12-09 04:40:01 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f) (Ping timeout: 256 seconds)
2022-12-09 04:42:48 +0100notzmv(~zmv@user/notzmv)
2022-12-09 04:43:12 +0100Putonlalla(~Putonlall@it-cyan.it.jyu.fi)
2022-12-09 04:43:44 +0100td_(~td@83.135.9.14) (Ping timeout: 260 seconds)
2022-12-09 04:44:11 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f)
2022-12-09 04:45:09 +0100td_(~td@83.135.9.40)
2022-12-09 04:45:10 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43) (Remote host closed the connection)
2022-12-09 04:46:43 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-09 04:47:17 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-09 04:49:17 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-09 04:49:22 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-12-09 04:49:50 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-12-09 04:49:55 +0100rembo10(~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-09 04:50:42 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-12-09 04:52:04 +0100rembo10(~rembo10@main.remulis.com)
2022-12-09 05:03:19 +0100 <jackdk> yes, it's giving you the opposite to `liftIO :: MonadIO m => IO a -> m a`, which you need for all sorts of bracketesque functions
2022-12-09 05:11:34 +0100johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
2022-12-09 05:12:11 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 264 seconds)
2022-12-09 05:28:31 +0100Erutuon_(~Erutuon@user/erutuon) (Ping timeout: 252 seconds)
2022-12-09 05:30:44 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 248 seconds)
2022-12-09 05:39:09 +0100tomokojun(~tomokojun@37.19.221.173) (Quit: じゃあね〜。)
2022-12-09 05:45:40 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43)
2022-12-09 05:46:33 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43) (Remote host closed the connection)
2022-12-09 05:46:47 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43)
2022-12-09 05:47:42 +0100ddellacosta(~ddellacos@89.45.224.208) (Ping timeout: 268 seconds)
2022-12-09 05:50:40 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-09 05:52:58 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-12-09 05:53:40 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-09 06:05:10 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-12-09 06:10:47 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-12-09 06:12:43 +0100mncheck(~mncheck@193.224.205.254) (Ping timeout: 248 seconds)
2022-12-09 06:19:40 +0100mbuf(~Shakthi@49.205.86.134)
2022-12-09 06:24:10 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-12-09 06:24:19 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d)
2022-12-09 06:34:40 +0100dextaa7(~DV@user/dextaa)
2022-12-09 06:35:55 +0100finsternis(~X@23.226.237.192) (Remote host closed the connection)
2022-12-09 06:37:08 +0100dextaa(~DV@user/dextaa) (Ping timeout: 260 seconds)
2022-12-09 06:37:09 +0100dextaa7dextaa
2022-12-09 06:37:31 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Ping timeout: 252 seconds)
2022-12-09 06:37:44 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d)
2022-12-09 06:38:45 +0100phma_(phma@2001:5b0:215d:cc28:414c:6f3a:6804:56b7)
2022-12-09 06:41:26 +0100phma(phma@2001:5b0:215d:cc28:414c:6f3a:6804:56b7) (Ping timeout: 246 seconds)
2022-12-09 06:43:40 +0100king_gs(~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c)
2022-12-09 06:44:10 +0100raym(~ray@user/raym) (Quit: kernel update, rebooting...)
2022-12-09 06:50:40 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-09 07:02:47 +0100king_gs(~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c) (Quit: king_gs)
2022-12-09 07:05:50 +0100Vajb(~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Ping timeout: 256 seconds)
2022-12-09 07:08:13 +0100Guest3061(~Guest30@188.168.24.7)
2022-12-09 07:10:30 +0100 <Guest3061> hello, how haskell parse this expression (head . tail xs)?
2022-12-09 07:11:40 +0100 <c_wraith> prefix function application always binds more tightly than infix operators
2022-12-09 07:11:48 +0100 <c_wraith> so its (head . (tail xs))
2022-12-09 07:11:48 +0100Ybombinator(~Ybombinat@81.198.69.124)
2022-12-09 07:12:03 +0100 <c_wraith> which... looks like a type error
2022-12-09 07:12:08 +0100phma_(phma@2001:5b0:215d:cc28:414c:6f3a:6804:56b7) (Read error: Connection reset by peer)
2022-12-09 07:12:21 +0100 <c_wraith> You probably wanted something more like (head . tail) xs
2022-12-09 07:12:35 +0100 <c_wraith> though I'd rather use pattern matching for that.
2022-12-09 07:12:36 +0100 <Guest3061> why not ((head .) tail) xs
2022-12-09 07:13:04 +0100 <c_wraith> that's the same thing, but with more parens
2022-12-09 07:13:15 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-09 07:13:16 +0100phma_(~phma@host-67-44-208-220.hnremote.net)
2022-12-09 07:14:07 +0100 <c_wraith> (head .) tail === (\x -> head . x) tail === (head . tail)
2022-12-09 07:15:18 +0100 <Guest3061>  (head . (tail xs)) and (head . tail) xs not same
2022-12-09 07:15:32 +0100 <c_wraith> correct.
2022-12-09 07:15:40 +0100 <xerox> @src (.)
2022-12-09 07:15:40 +0100 <lambdabot> (f . g) x = f (g x)
2022-12-09 07:19:17 +0100money_(~money@user/polo)
2022-12-09 07:19:52 +0100 <Guest3061> whats wrong: head . tail xs => (head .) tail xs where (head .) operator section;  (head .) tail xs => (head . tail) xs = head (tail xs), but haskell error
2022-12-09 07:21:36 +0100bilegeek(~bilegeek@2600:1008:b050:71de:7be6:f44e:ae73:bf89)
2022-12-09 07:21:37 +0100 <c_wraith> how are you getting that first transformation?
2022-12-09 07:21:56 +0100 <iqubic> :t head . tail xs
2022-12-09 07:21:57 +0100 <lambdabot> error:
2022-12-09 07:21:57 +0100 <lambdabot> • Variable not in scope: xs :: [a0]
2022-12-09 07:21:57 +0100 <lambdabot> • Perhaps you meant one of these:
2022-12-09 07:22:07 +0100 <c_wraith> iqubic: nevermind that it's a type error
2022-12-09 07:22:13 +0100 <iqubic> :t \xs -> head . tail xs
2022-12-09 07:22:14 +0100 <lambdabot> error:
2022-12-09 07:22:14 +0100 <lambdabot> • Couldn't match expected type ‘a1 -> [c]’ with actual type ‘[a]’
2022-12-09 07:22:14 +0100 <lambdabot> • Possible cause: ‘tail’ is applied to too many arguments
2022-12-09 07:22:40 +0100 <iqubic> Yeah, that just doesn't compile in the first place.
2022-12-09 07:22:49 +0100 <c_wraith> Guest3061: you're changing the parsing rules by using a section. It changes it from an infix operator to a prefix function
2022-12-09 07:23:27 +0100 <c_wraith> (head .) tail xs is parsed as ((head .) tail) xs
2022-12-09 07:23:27 +0100 <Guest3061> ye section is funtction and have high priority
2022-12-09 07:23:48 +0100 <c_wraith> specifically, the tail and the xs aren't grouped together
2022-12-09 07:23:52 +0100 <Guest3061> why error
2022-12-09 07:24:12 +0100raym(~ray@user/raym)
2022-12-09 07:24:38 +0100 <Guest3061> ((head .) tail) xs is correct expression
2022-12-09 07:24:50 +0100 <c_wraith> so is (head . tail) xs, which is exactly identical
2022-12-09 07:24:57 +0100 <c_wraith> except with fewer parenthesis
2022-12-09 07:26:03 +0100money_(~money@user/polo) (Ping timeout: 256 seconds)
2022-12-09 07:26:08 +0100 <c_wraith> But when you change it to (head . tail xs), it's parsing as (head . (tail xs)) instead
2022-12-09 07:26:21 +0100 <c_wraith> which is a type error, because tail xs cannot be a function
2022-12-09 07:26:28 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 248 seconds)
2022-12-09 07:26:43 +0100 <iqubic> Yeah.
2022-12-09 07:27:06 +0100 <iqubic> `head . tail xs` not equal `(head . tail) xs`
2022-12-09 07:27:10 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving)
2022-12-09 07:27:25 +0100 <iqubic> `head . tail xs` is actually `head . (tail xs)`
2022-12-09 07:28:13 +0100 <Guest3061> function is left associative
2022-12-09 07:28:17 +0100 <Guest3061> first function head
2022-12-09 07:28:42 +0100michalz(~michalz@185.246.204.72)
2022-12-09 07:28:53 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2022-12-09 07:29:38 +0100 <c_wraith> associativity only matters when the precedence is the same.
2022-12-09 07:29:44 +0100 <c_wraith> Operators are always lower precedence.
2022-12-09 07:30:14 +0100phma_phma
2022-12-09 07:30:40 +0100 <c_wraith> (than function application)
2022-12-09 07:30:55 +0100paulpaul1076(~textual@95-29-5-111.broadband.corbina.ru)
2022-12-09 07:30:56 +0100 <iqubic> Function application is always done first, then you deal with operators.
2022-12-09 07:31:24 +0100 <Guest3061> we have two function in expression - head and tail, head is first
2022-12-09 07:31:40 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-12-09 07:32:50 +0100 <c_wraith> iqubic: record update syntax has higher precedence than function application
2022-12-09 07:33:07 +0100 <iqubic> Alright, that's fair.
2022-12-09 07:34:13 +0100 <iqubic> In the situation we have `head . tail xs` we have both function application `tail xs` and evaluating an operator `.` Of these two things, GHC will always choose to do function application first
2022-12-09 07:34:25 +0100 <c_wraith> nice precision. :)
2022-12-09 07:36:00 +0100 <Guest3061> why (head .) is operator?
2022-12-09 07:36:25 +0100 <mauke_> it's not
2022-12-09 07:36:34 +0100mauke_mauke
2022-12-09 07:36:46 +0100 <iqubic> (head .) isn't an operator. The only operator here is . which has two arguments `head` and `tail xs`
2022-12-09 07:36:58 +0100 <iqubic> (head .) isn't an operator. The only operator here is . which has two arguments `head` and `tail xs`
2022-12-09 07:37:13 +0100 <mauke> echo?
2022-12-09 07:37:32 +0100 <iqubic> Yeah. Sorry about that. My computer bugged out for a moment.
2022-12-09 07:38:07 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2022-12-09 07:38:47 +0100 <Guest3061> f x f y f z ~ ((((f x) f) y)  f) z correct?
2022-12-09 07:39:06 +0100 <iqubic> Now that is correct.
2022-12-09 07:39:32 +0100 <iqubic> Well, except for the last parthesis being in the wrong spot
2022-12-09 07:40:10 +0100 <iqubic> No actually, a few parentheses are wrong.
2022-12-09 07:40:55 +0100 <mauke> are they?
2022-12-09 07:41:03 +0100 <Guest3061> if x = . is function - arg it will not resemble our expression?
2022-12-09 07:41:30 +0100 <mauke> . is an operator, not a value
2022-12-09 07:41:50 +0100 <mauke> 2 + 2 does not mean ((2) +) 2, it means ((+) 2) 2
2022-12-09 07:42:09 +0100 <mauke> heh
2022-12-09 07:42:12 +0100 <iqubic> Yes, that's correct mauke.
2022-12-09 07:42:20 +0100 <mauke> except (2 +) would be a section, so that would actually work
2022-12-09 07:42:27 +0100 <mauke> 2 + 2 does not mean (2 (+)) 2
2022-12-09 07:42:47 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 264 seconds)
2022-12-09 07:43:23 +0100Ybombinator(~Ybombinat@81.198.69.124) (Read error: Connection reset by peer)
2022-12-09 07:43:28 +0100 <Guest3061> but 2 not function
2022-12-09 07:43:38 +0100jargon_(~jargon@174-22-192-24.phnx.qwest.net) (Ping timeout: 268 seconds)
2022-12-09 07:43:44 +0100 <mauke> it could be
2022-12-09 07:44:16 +0100 <mauke> this is about syntax, not types
2022-12-09 07:46:51 +0100 <mauke> @let instance (Num a) => Num ((->) e) where { (+) = liftA2 (+); (*) = liftA2 (*); abs = fmap abs; signum = fmap signum; fromInteger = pure . fromInteger; negate = fmap negate }
2022-12-09 07:46:52 +0100 <lambdabot> /sandbox/tmp/.L.hs:167:26: error:
2022-12-09 07:46:52 +0100 <lambdabot> • Expecting one more argument to ‘(->) e’
2022-12-09 07:46:52 +0100 <lambdabot> Expected a type, but ‘(->) e’ has kind ‘* -> *’
2022-12-09 07:47:01 +0100 <mauke> @let instance (Num a) => Num (e -> a) where { (+) = liftA2 (+); (*) = liftA2 (*); abs = fmap abs; signum = fmap signum; fromInteger = pure . fromInteger; negate = fmap negate }
2022-12-09 07:47:02 +0100 <lambdabot> Defined.
2022-12-09 07:47:06 +0100 <mauke> > 2 + 2
2022-12-09 07:47:08 +0100 <lambdabot> 4
2022-12-09 07:47:17 +0100 <mauke> > 2 "hello"
2022-12-09 07:47:18 +0100 <lambdabot> 2
2022-12-09 07:47:23 +0100 <mauke> there, now 2 is a function
2022-12-09 07:48:13 +0100Ybombinator(~Ybombinat@81.198.69.124)
2022-12-09 07:48:50 +0100 <mauke> > (sqrt - 1) 2
2022-12-09 07:48:51 +0100 <lambdabot> 0.41421356237309515
2022-12-09 07:50:13 +0100 <c_wraith> > (sin ^ 2 + cos ^ 2) 17
2022-12-09 07:50:15 +0100 <lambdabot> 0.9999999999999999
2022-12-09 07:50:26 +0100 <c_wraith> oh no. the floating point error got me!
2022-12-09 07:50:29 +0100 <mauke> > 2 (3 4)
2022-12-09 07:50:30 +0100 <lambdabot> 2
2022-12-09 07:50:35 +0100 <mauke> > (2 . 3) 4
2022-12-09 07:50:37 +0100 <lambdabot> 2
2022-12-09 07:50:39 +0100 <mauke> > 2 . 3 4
2022-12-09 07:50:41 +0100 <lambdabot> error:
2022-12-09 07:50:41 +0100 <lambdabot> • No instance for (Typeable a0)
2022-12-09 07:50:41 +0100 <lambdabot> arising from a use of ‘show_M75277755340628173127’
2022-12-09 07:50:43 +0100 <mauke> there
2022-12-09 07:50:53 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-09 07:51:04 +0100Guest3061(~Guest30@188.168.24.7) (Quit: Client closed)
2022-12-09 07:51:49 +0100 <iqubic> I guess we scared them off.
2022-12-09 07:52:06 +0100Guest30(~Guest30@188.168.24.7)
2022-12-09 07:52:16 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-09 07:52:18 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-12-09 07:52:54 +0100 <mauke> welcome back :-)
2022-12-09 07:54:34 +0100 <Guest30> head. tail [1,2,3] on what principle haskell choose 1st operation is tail [1, 2, 3]
2022-12-09 07:55:25 +0100m5zs7k(aquares@web10.mydevil.net) (Ping timeout: 260 seconds)
2022-12-09 07:56:00 +0100 <Ybombinator> How does the len function here https://bpa.st/6DRA work? Like how will it look after recursion? I only understood that it will return 0 after the last recursion and I assume the 1s are somehow added to it but it doesn't make sense to me how.
2022-12-09 07:56:07 +0100 <mauke> syntactically, it's like 2 + sqrt 3
2022-12-09 07:56:30 +0100 <mauke> . and + are infix operators, tail and sqrt are values
2022-12-09 07:56:32 +0100 <Guest30> sqrt is function and have high priority
2022-12-09 07:56:49 +0100 <mauke> it's not sqrt itself that has priority
2022-12-09 07:57:09 +0100 <mauke> it's that when you put two values next to each other, that's function application and has high priority
2022-12-09 07:57:32 +0100 <jackdk> Ybombinator: you can use substitution to evaluate by hand: `len "hi" = len "i" + 1 = ((len "") + 1) + 1 = (0 + 1) + 1 = 2`
2022-12-09 07:57:42 +0100 <mud> Ybombinator: It says that the len of an empty list is 0 (len [] = 0) . Then it says that if the list has one element to pick off from them front, then it's 1 + the len of the rest
2022-12-09 07:58:17 +0100 <Guest30> why head . not function application?
2022-12-09 07:58:28 +0100 <mauke> because . is an operator, not a value
2022-12-09 07:58:30 +0100 <mauke> we've been over this
2022-12-09 07:58:32 +0100 <Ybombinator> oh right, the substitution makes it easy to understand
2022-12-09 07:59:13 +0100 <mauke> if you're asking what makes . an operator, it's that its name is made of punctuation symbols
2022-12-09 07:59:33 +0100 <mauke> unlike, say, tail, which is made of letters
2022-12-09 08:00:31 +0100 <Guest30> why do we look at this as an application head to . but not the other way around
2022-12-09 08:01:08 +0100 <mauke> because . is an operator, not a value
2022-12-09 08:02:51 +0100 <c_wraith> that's really the whole point of operators. They're infix, not prefix.
2022-12-09 08:02:54 +0100m5zs7k(aquares@web10.mydevil.net)
2022-12-09 08:03:15 +0100 <c_wraith> It's why you get to write 2 + 2 instead of a lisp-like (+ 2 2)
2022-12-09 08:03:29 +0100 <mauke> syntactically, head . tail xs is no different from x + sqrt y
2022-12-09 08:03:32 +0100 <Guest30> why operator can`t be argument
2022-12-09 08:03:34 +0100 <mauke> the types really don't matter
2022-12-09 08:03:47 +0100 <EvanR> operator section like (+) and (.) can be an argument
2022-12-09 08:04:03 +0100 <mauke> you have to put ( ) around it to turn an operator into a value
2022-12-09 08:04:16 +0100 <mauke> otherwise it's an operator, not a value (we've been over this)
2022-12-09 08:04:23 +0100 <EvanR> naked operators are parsed different
2022-12-09 08:04:59 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-12-09 08:07:45 +0100 <Guest30> thank you very much, I will remember that an operator cannot be an argument of a function
2022-12-09 08:08:18 +0100Ybombinator(~Ybombinat@81.198.69.124) (Ping timeout: 268 seconds)
2022-12-09 08:08:19 +0100 <EvanR> unless you parenthesize it
2022-12-09 08:08:30 +0100Ybombinator(~Ybombinat@81.198.69.124)
2022-12-09 08:08:47 +0100 <Guest30> operator in parentheses is function
2022-12-09 08:08:53 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
2022-12-09 08:09:43 +0100Guest30(~Guest30@188.168.24.7) (Quit: Client closed)
2022-12-09 08:10:03 +0100Ybombinator(~Ybombinat@81.198.69.124) (Read error: Connection reset by peer)
2022-12-09 08:10:15 +0100Ybombinator(~Ybombinat@81.198.69.124)
2022-12-09 08:10:19 +0100Ybombinator(~Ybombinat@81.198.69.124) (Read error: Connection reset by peer)
2022-12-09 08:10:43 +0100Ybombinator(~Ybombinat@81.198.69.124)
2022-12-09 08:10:59 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-09 08:12:03 +0100 <jackdk> Ybombinator: In my personal experience (both in my own learning and when teaching), I have found that "go do the evaluation by hand and work through the substitutions" really helps make things click. Haskell is wonderful in that substitution is pretty much always possible
2022-12-09 08:15:29 +0100Ybombinator(~Ybombinat@81.198.69.124) (Ping timeout: 260 seconds)
2022-12-09 08:16:22 +0100Kaiepi(~Kaiepi@108.175.84.104) (Quit: Leaving)
2022-12-09 08:20:38 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 268 seconds)
2022-12-09 08:24:29 +0100Techcable(~Techcable@user/Techcable) (Ping timeout: 260 seconds)
2022-12-09 08:24:33 +0100 <SrPx> Is it possible to define an efficient hyper-operation sequence as a recursive squaring function over 2-adics in Haskell?
2022-12-09 08:24:37 +0100 <SrPx> https://stackoverflow.com/questions/74739974/is-it-possible-to-define-an-efficient-hyper-operation…
2022-12-09 08:28:08 +0100ft(~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving)
2022-12-09 08:31:46 +0100chele(~chele@user/chele)
2022-12-09 08:32:47 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-12-09 08:34:16 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-09 08:34:24 +0100Ybombinator(~Ybombinat@81.198.69.124)
2022-12-09 08:42:56 +0100blomberg(~default_u@117.247.121.23)
2022-12-09 08:43:00 +0100 <blomberg> he
2022-12-09 08:43:16 +0100 <blomberg> are there default arguments values option for functions
2022-12-09 08:43:31 +0100 <blomberg> f x=2 y=4 = x+y
2022-12-09 08:43:50 +0100 <iqubic> Not in Haskell.
2022-12-09 08:44:11 +0100 <iqubic> Well, I mean, not easily
2022-12-09 08:45:39 +0100nilradical1(~nilradica@123-243-44-216.tpgi.com.au)
2022-12-09 08:45:47 +0100Ybombinator(~Ybombinat@81.198.69.124) (Ping timeout: 248 seconds)
2022-12-09 08:46:06 +0100 <nilradical1> hello, how can i get modules in `app/` to be available for import in the repl
2022-12-09 08:46:26 +0100m5zs7k(aquares@web10.mydevil.net) (Ping timeout: 246 seconds)
2022-12-09 08:46:44 +0100 <nilradical1> using cabal. under 'executable', ive added the module name to 'exposed modules' and also 'other modules' but in the repl its not available
2022-12-09 08:48:47 +0100blomberg(~default_u@117.247.121.23) (Ping timeout: 256 seconds)
2022-12-09 08:49:12 +0100blomberg(default_us@gateway/vpn/protonvpn/thatpythonboy)
2022-12-09 08:50:50 +0100 <blomberg> iqubic:there are easily available using partial application f' = f 2 3 --so 2 3 are defaults :)
2022-12-09 08:51:38 +0100 <blomberg> but i don't want to apply f 2 3 to evaluating, so what's the syntax for partial application
2022-12-09 08:57:56 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-09 08:58:04 +0100 <dminuoso> blomberg: We dont really have partial application.
2022-12-09 08:58:08 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-09 08:58:25 +0100 <dminuoso> Or rather `f 2 3` is exactly that, but its not partial application either
2022-12-09 08:59:04 +0100 <dminuoso> The closest thing to default arguments that we commonly use, is by putting arguments inside a data structure
2022-12-09 08:59:06 +0100 <dminuoso> Say:
2022-12-09 08:59:30 +0100 <dminuoso> % import Data.Word
2022-12-09 08:59:30 +0100 <yahb2> <no output>
2022-12-09 08:59:44 +0100 <dminuoso> % data ServerOptions = ServerOptions { listenPort :: Word16, listenAddress :: Word32, serverName :: T.text }
2022-12-09 08:59:44 +0100 <yahb2> <interactive>:52:99: error: parse error on input ‘T.text’
2022-12-09 08:59:48 +0100 <dminuoso> % data ServerOptions = ServerOptions { listenPort :: Word16, listenAddress :: Word32, serverName :: String }
2022-12-09 08:59:48 +0100 <yahb2> <no output>
2022-12-09 08:59:54 +0100 <dminuoso> And then defining some top level value
2022-12-09 09:00:05 +0100m5zs7k(aquares@web10.mydevil.net)
2022-12-09 09:00:47 +0100 <dminuoso> % defaultOptions = defaultOptions { listenPort = 1234, listenAddress = 0x7F000001, serverName = "myServer" }
2022-12-09 09:00:48 +0100 <yahb2> <no output>
2022-12-09 09:01:17 +0100 <dminuoso> Such that the usage style becomes `startServer defaultOptions`, or if you want to customize some, you might write `startServer defaultOptions{ listenPort = 2345 }`
2022-12-09 09:01:29 +0100 <blomberg> > `(+) 2 3`
2022-12-09 09:01:31 +0100 <lambdabot> <hint>:1:1: error: parse error on input ‘`’
2022-12-09 09:01:39 +0100 <dminuoso> Leave the backticks away
2022-12-09 09:01:45 +0100 <dminuoso> > (+) 2 3
2022-12-09 09:01:46 +0100 <lambdabot> 5
2022-12-09 09:02:06 +0100 <blomberg> quotes in the eval is another option
2022-12-09 09:02:10 +0100Ybombinator(~Ybombinat@85.254.74.38)
2022-12-09 09:02:14 +0100 <blomberg> s/in/and
2022-12-09 09:02:23 +0100nilradical1(~nilradica@123-243-44-216.tpgi.com.au) (Ping timeout: 260 seconds)
2022-12-09 09:02:29 +0100 <dminuoso> You mean like (`f` 3) or (3 `f`)?
2022-12-09 09:03:14 +0100 <dminuoso> blomberg: I mean yes and no. They are partial applications if you consider `f :: Int -> Int -> Int` accepting two arguments.
2022-12-09 09:03:30 +0100 <dminuoso> THough there's also the notion that every function really accepts only one argument
2022-12-09 09:04:24 +0100 <dminuoso> And in that sense something like (`f` 3) is conceptually rather a short hand for `\x -> f x 3`
2022-12-09 09:04:31 +0100 <dminuoso> Or `flip f 3` if you want
2022-12-09 09:05:43 +0100 <dminuoso> blomberg: That being said, writing `f 2 3` to already pre-apply 2 and 3 is fine. Why do you not like it?
2022-12-09 09:06:16 +0100 <dminuoso> It might be helpful to understand, that the way this is implemented in GHC Haskell makes it extremely cheap. GHC doesnt create a new function upon partial application of somne kind.
2022-12-09 09:08:16 +0100mncheck(~mncheck@193.224.205.254)
2022-12-09 09:09:46 +0100MajorBiscuit(~MajorBisc@2001:1c00:2404:ed00:28e1:ad14:ec67:539e)
2022-12-09 09:12:23 +0100MajorBiscuit(~MajorBisc@2001:1c00:2404:ed00:28e1:ad14:ec67:539e) (Client Quit)
2022-12-09 09:17:00 +0100zant1(~zant@62.214.20.26)
2022-12-09 09:17:26 +0100MajorBiscuit(~MajorBisc@2001:1c00:2404:ed00:28e1:ad14:ec67:539e)
2022-12-09 09:18:20 +0100 <albet70> what's the better way to replace a bunch of if-then-else?
2022-12-09 09:18:37 +0100 <dminuoso> albet70: Difficult to say in general. Can you share the code you have specifically?
2022-12-09 09:19:21 +0100 <albet70> dminuoso , https://paste.tomsmeding.com/PMJK278w
2022-12-09 09:20:10 +0100 <dminuoso> albet70: can you share some of the surrounding code as well? perhaps the entirety of the binding here?
2022-12-09 09:20:51 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-09 09:21:17 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-09 09:21:24 +0100 <albet70> https://paste.tomsmeding.com/mf0me8hF
2022-12-09 09:22:12 +0100acidjnk_new(~acidjnk@p200300d6e7137a16c4eff8deb759a49f.dip0.t-ipconnect.de)
2022-12-09 09:22:33 +0100 <dminuoso> You could use MultiWayIf (or an equivalent `case () of ...` expression)
2022-12-09 09:22:41 +0100 <dminuoso> Alternatively, you could use a helper binding that accomlishes the same in guards
2022-12-09 09:24:21 +0100 <albet70> yes
2022-12-09 09:26:50 +0100akegalj(~akegalj@141-136-183-112.dsl.iskon.hr)
2022-12-09 09:31:33 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
2022-12-09 09:32:39 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:5543:4ce0:b6b6:f758)
2022-12-09 09:33:24 +0100nschoe(~q@141.101.51.197)
2022-12-09 09:34:01 +0100shriekingnoise_(~shrieking@186.137.167.202) (Quit: Quit)
2022-12-09 09:36:11 +0100johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
2022-12-09 09:38:42 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43) (Remote host closed the connection)
2022-12-09 09:38:59 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe)
2022-12-09 09:39:53 +0100 <albet70> dminuoso , this 'case ... of ..' is equal to 'switch .. case ...' in other languages like C or Java?
2022-12-09 09:42:57 +0100aeroplane(~user@user/aeroplane)
2022-12-09 09:43:03 +0100 <dminuoso> Not quite
2022-12-09 09:43:12 +0100 <dminuoso> The construct in C is somewhat different
2022-12-09 09:43:23 +0100 <dminuoso> And in Java as well
2022-12-09 09:44:04 +0100 <dminuoso> If you think of the switch-case in C or Java combined with an implicit break; on each clause, then they are similar
2022-12-09 09:44:18 +0100 <kjlid[m]> Actually Java has switch expressions nowadays
2022-12-09 09:44:22 +0100 <dminuoso> But the fact that you can leave a break away in one clause lets you do things that case-of cant.
2022-12-09 09:45:21 +0100 <kjlid[m]> No break needed in those
2022-12-09 09:45:53 +0100mncheck(~mncheck@193.224.205.254) (Remote host closed the connection)
2022-12-09 09:46:16 +0100 <int-e> There's three such pairs I know of. `case ... of` (Algol, Pascal, Haskell) `switch ... case` (C, Java), `match ... with` (ML, Rust)... Oh, Fortran has another "select case ... case". Fun.
2022-12-09 09:47:31 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-09 09:47:46 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32)
2022-12-09 09:48:53 +0100 <kjlid[m]> How would you guys make a `[Maybe String] -> Either String [String]`?
2022-12-09 09:49:50 +0100 <int-e> kjlid[m]: Well, what is it supposed to do?
2022-12-09 09:49:59 +0100 <dminuoso> int-e: How is ml, rust `match ... with` different?
2022-12-09 09:50:24 +0100 <dminuoso> I mean they do have these combined patterns which is useful, is there anything else?
2022-12-09 09:50:25 +0100kenran(~user@user/kenran)
2022-12-09 09:50:30 +0100 <int-e> dminuoso: I think they're surprisingly close because Rust has patterns.
2022-12-09 09:50:48 +0100 <kjlid[m]> I have a [Maybe String] and i want to accumulate those strings into a list, returning an error if one of them is Nothing
2022-12-09 09:50:59 +0100 <dminuoso> kjlid[m]: use `asum`
2022-12-09 09:51:06 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-09 09:51:22 +0100 <dminuoso> kjlid[m]: Did you generate this list by means of using `fmap`?
2022-12-09 09:51:56 +0100 <int-e> > map sequence [[Just 1, Just 2],[Just 1,Nothing]]
2022-12-09 09:51:57 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-12-09 09:51:58 +0100 <lambdabot> [Just [1,2],Nothing]
2022-12-09 09:52:02 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-12-09 09:52:28 +0100 <albet70> I learned a liitle cpp a few days, it's too difficult than other languages, the pointer, the left/right value, too chaos, is rust difficult too?
2022-12-09 09:52:44 +0100 <dminuoso> Ah wait, asum is wrong. sequence it is.
2022-12-09 09:52:58 +0100 <int-e> (that doesn't add an error yet)
2022-12-09 09:53:01 +0100 <dminuoso> Anyway, if you have generated this list with `fmap`, and intend to `sequence` it after, consider using `traverse` instead.
2022-12-09 09:53:06 +0100 <kjlid[m]> mapM actually. The function i am using is actually `IO (Maybe String)`
2022-12-09 09:53:29 +0100 <int-e> :t maybe (Left "oh no") Right $ Nothing
2022-12-09 09:53:30 +0100 <lambdabot> Either [Char] b
2022-12-09 09:53:34 +0100 <dminuoso> kjlid[m]: Okay, if you have mtl already, you could go through MaybeT
2022-12-09 09:53:59 +0100 <dminuoso> If not, `sequence` the result and then use some kind of `note :: e -> Maybe a -> Either e a` function, manually case-of, use `fromMaybe/maybe`
2022-12-09 09:54:05 +0100 <dminuoso> Something along these lines
2022-12-09 09:55:45 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 09:56:15 +0100 <xerox> > traverse sequence [[Just 1, Just 2],[Just 1,Just 4]]
2022-12-09 09:56:16 +0100 <lambdabot> Just [[1,2],[1,4]]
2022-12-09 09:56:58 +0100 <kjlid[m]> Do mtl have MaybeT?
2022-12-09 09:59:58 +0100 <dminuoso> kjlid[m]: Oh well transformers does.
2022-12-09 10:00:15 +0100 <dminuoso> Pardon me. Whenever I have one, I tend to have the other as well. :)
2022-12-09 10:00:29 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-09 10:00:31 +0100 <dminuoso> Whcih is why in my mind I keep conflating them
2022-12-09 10:00:37 +0100 <kjlid[m]> Alright
2022-12-09 10:04:40 +0100m5zs7k(aquares@web10.mydevil.net) (Ping timeout: 265 seconds)
2022-12-09 10:08:02 +0100m5zs7k(aquares@web10.mydevil.net)
2022-12-09 10:09:37 +0100 <blomberg> > x=2
2022-12-09 10:09:38 +0100 <lambdabot> <hint>:1:2: error: parse error on input ‘=’
2022-12-09 10:09:43 +0100 <blomberg> why do i get error
2022-12-09 10:10:05 +0100 <c_wraith> because lambdabot isn't a file, or ghci
2022-12-09 10:10:22 +0100cfricke(~cfricke@user/cfricke)
2022-12-09 10:10:24 +0100 <c_wraith> lambdabot evaluates expressions, and x=2 isn't an expression
2022-12-09 10:10:33 +0100 <c_wraith> > let x=2 in x + 5
2022-12-09 10:10:34 +0100 <lambdabot> 7
2022-12-09 10:10:37 +0100 <blomberg> % x=3
2022-12-09 10:10:37 +0100 <yahb2> <no output>
2022-12-09 10:10:42 +0100 <blomberg> % x
2022-12-09 10:10:42 +0100 <yahb2> 3
2022-12-09 10:10:42 +0100 <dminuoso> Talk to yahb2 (start with %) if you want a GHCi interface that allows you to write `x = 2`
2022-12-09 10:10:48 +0100 <dminuoso> alternatively you can define in lambdabot as follows
2022-12-09 10:10:50 +0100 <dminuoso> @let x = 2
2022-12-09 10:10:51 +0100 <lambdabot> Defined.
2022-12-09 10:10:57 +0100 <dminuoso> > print x
2022-12-09 10:10:58 +0100 <lambdabot> error:
2022-12-09 10:10:58 +0100 <lambdabot> Ambiguous occurrence ‘x’
2022-12-09 10:10:58 +0100 <lambdabot> It could refer to
2022-12-09 10:11:10 +0100 <c_wraith> > L.x
2022-12-09 10:11:14 +0100 <lambdabot> 2
2022-12-09 10:11:43 +0100 <blomberg> print is there in haskell
2022-12-09 10:11:48 +0100 <c_wraith> it's not usually a good idea to @let one-character identifiers
2022-12-09 10:11:58 +0100 <c_wraith> because lambdabot has simplereflect imported
2022-12-09 10:12:06 +0100 <c_wraith> > f y z :: Expr
2022-12-09 10:12:08 +0100 <lambdabot> f y z
2022-12-09 10:13:00 +0100 <blomberg> > add x y = x+y; add'=add 2 3
2022-12-09 10:13:01 +0100 <lambdabot> <hint>:1:9: error: parse error on input ‘=’
2022-12-09 10:13:04 +0100 <int-e> @undef
2022-12-09 10:13:04 +0100 <lambdabot> Undefined.
2022-12-09 10:13:12 +0100 <int-e> :t x
2022-12-09 10:13:13 +0100 <lambdabot> Expr
2022-12-09 10:13:36 +0100mncheck(~mncheck@193.224.205.254)
2022-12-09 10:13:39 +0100 <int-e> > let add x y = x + y in add 2 3
2022-12-09 10:13:40 +0100 <lambdabot> 5
2022-12-09 10:13:43 +0100int-eshrugs
2022-12-09 10:14:28 +0100 <blomberg> int-e:also i want add' = add 2 3
2022-12-09 10:14:54 +0100 <int-e> > let add x y = x + y; add' = add 2 3 in add'
2022-12-09 10:14:56 +0100 <lambdabot> 5
2022-12-09 10:15:45 +0100 <blomberg> we can put multi expressions in let multiexpression in singleexpression ?
2022-12-09 10:16:13 +0100 <dminuoso> What is a multi expression?
2022-12-09 10:16:17 +0100 <int-e> a single `let` can have any number of bindings
2022-12-09 10:17:06 +0100 <int-e> and if you know how layout turns into explicit blocks (delimited by { and }) and semicolons, you can put it all on one line.
2022-12-09 10:17:25 +0100 <blomberg> multi assignments
2022-12-09 10:18:11 +0100 <c_wraith> multiple declarations.
2022-12-09 10:18:59 +0100 <c_wraith> "assignment" carries with it some connotations of modification. You're just defining names to be the same as some other expression.
2022-12-09 10:19:42 +0100 <int-e> @quote no.variables
2022-12-09 10:19:42 +0100 <lambdabot> cjs says: I have to explain this shit to people. I mean, I start out right, "Hey, you know how you always have these bugs because what you thought was in the variable is not there?" And I get all of
2022-12-09 10:19:42 +0100 <lambdabot> these nods of agreement. "Well, I've found a new language that solves that problem." Audience: "Ooooh! How?" Me: "There's no variables!" And then they all start moving away from me slowly....
2022-12-09 10:21:07 +0100 <dminuoso> Of if you dont like declaration, you could use `equation`
2022-12-09 10:21:41 +0100 <dminuoso> Which with a slight bit of squinting works well enough
2022-12-09 10:22:09 +0100 <int-e> > let xs = 1:ys; ys = 2:xs in xs
2022-12-09 10:22:10 +0100 <lambdabot> [1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2...
2022-12-09 10:22:35 +0100 <int-e> (the equations can be recursive)
2022-12-09 10:24:22 +0100 <merijn> int-e: I love that quote :)
2022-12-09 10:25:01 +0100 <c_wraith> it feels very.... Arlo Guthrie
2022-12-09 10:26:09 +0100bilegeek(~bilegeek@2600:1008:b050:71de:7be6:f44e:ae73:bf89) (Quit: Leaving)
2022-12-09 10:27:44 +0100 <blomberg> putStrLn "x value is {x}" --so how do i print x value in that string
2022-12-09 10:27:59 +0100 <merijn> I should actually finally add my favourite XY problem quote
2022-12-09 10:28:10 +0100 <merijn> @remember glyph For example, if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer". If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers
2022-12-09 10:28:11 +0100 <lambdabot> It is stored.
2022-12-09 10:28:36 +0100 <merijn> blomberg: Normally something like: putStrln ("x value is " ++ show x)
2022-12-09 10:28:58 +0100 <merijn> there are some libraries for format strings, but most of the time I don't find them worth the effort
2022-12-09 10:29:21 +0100 <blomberg> show is function from Show typeclass
2022-12-09 10:29:30 +0100 <dminuoso> Im not sure, templated strings its something I regularly miss in Haskell. :/
2022-12-09 10:29:33 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-09 10:29:49 +0100 <dminuoso> People not missing it are probably just suffering from Stockholm syndrome
2022-12-09 10:30:03 +0100 <c_wraith> I just don't format much text.
2022-12-09 10:30:51 +0100 <merijn> blomberg: You can replace show with whatever custom formatting text
2022-12-09 10:31:06 +0100 <int-e> There's always <rot13>Grkg.Cevags</rot13> :-P
2022-12-09 10:31:23 +0100 <merijn> c_wraith: I occasionally do, but mconcat plus a list of strings/show expressions works easiest
2022-12-09 10:31:35 +0100 <c_wraith> also, when I do format text, I'm usually writing showsPrec, and Prelude has a bunch of secret tools for writing showsPrec cleanly
2022-12-09 10:31:54 +0100 <int-e> (Text.Printf. It's such an ugly hack, but it's a useful middle ground between `show` and proper pretty-printing.)
2022-12-09 10:32:15 +0100 <merijn> dminuoso: Usually when I do format things there's more custom formatting around and then the list based approach works fairly well
2022-12-09 10:32:43 +0100 <c_wraith> I *do* wish -XOverloadedList was designed better.
2022-12-09 10:32:46 +0100 <dminuoso> merijn: Re jackhammer. Is it unrelated though? XY problems may not necessarily be a problem, it might be worthwhile explaining how to use a jackhammer, to let them figure out why the goal might be unwise, or perhaps they truly need to perform an excorcism.
2022-12-09 10:33:18 +0100 <c_wraith> toList/fromList are the wrong level of abstraction for making OverloadedLists useful
2022-12-09 10:33:42 +0100 <merijn> dminuoso: I usually end up writing this approach: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/model-src/Evaluate.hs#L402-L409
2022-12-09 10:33:43 +0100 <c_wraith> I want to be able to use heterogenous element types!
2022-12-09 10:33:45 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-09 10:34:22 +0100 <dminuoso> c_wraith: How do you envision this to work?
2022-12-09 10:34:29 +0100 <merijn> dminuoso: GADTs :p
2022-12-09 10:34:43 +0100 <dminuoso> As in magically sprinkle GADTs over modules to make it compile?
2022-12-09 10:35:04 +0100 <int-e> dminuoso: XY problems are problems because they often leave noone happy... neither the person who asked the question but got an answer that wouldn't help them, nor the person who answered but didn't get the satisfaction of actually helping.
2022-12-09 10:35:08 +0100 <c_wraith> no. desugar to overloaded applications of cons and nil
2022-12-09 10:35:18 +0100 <c_wraith> and *then* resolve the overloading.
2022-12-09 10:35:29 +0100 <int-e> dminuoso: But of course there are exceptions on both sides.
2022-12-09 10:35:39 +0100 <dminuoso> What *might* be fun is if GHC had pre-knowledge of all instances present, you get an existential type with `(Show, Read) *> ...` assuming that `Show, Read` is the common set of instances shared by all elements
2022-12-09 10:36:50 +0100 <dminuoso> So something like `["foo", 6]` is fine, but you could only use it in any way that either ignores the contained type, or uses something that us uniformly supported
2022-12-09 10:39:13 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43)
2022-12-09 10:39:46 +0100 <c_wraith> that's way more complicated than what I want
2022-12-09 10:40:30 +0100kritzefitz(~kritzefit@debian/kritzefitz) (Ping timeout: 260 seconds)
2022-12-09 10:43:26 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43) (Ping timeout: 252 seconds)
2022-12-09 10:43:38 +0100tzh_(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-12-09 10:44:38 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-12-09 10:44:41 +0100 <dminuoso> c_wraith: How would you overload cons and nil? With a type of `class Consy t where cons :: a -> t a -> t a; nil :: t a; uncons :: t a -> (a, t a)`
2022-12-09 10:44:49 +0100kritzefitz(~kritzefit@debian/kritzefitz)
2022-12-09 10:45:03 +0100 <dminuoso> Or did you mean something else?
2022-12-09 10:45:33 +0100blomberg(default_us@gateway/vpn/protonvpn/thatpythonboy) (Ping timeout: 268 seconds)
2022-12-09 10:45:59 +0100 <c_wraith> something along those lines. I've worked it out before, but I didn't bother memorizing it.
2022-12-09 10:46:59 +0100 <dminuoso> c_wraith: It might be particularly interesting if this desugared nicely in pattern matches as well, such that `f (x:xs) = ..` would desugar into `f p = case uncons p of (x, xs) -> ...`
2022-12-09 10:47:13 +0100 <dminuoso> Now that could be quite comfortable in a few situations
2022-12-09 10:48:05 +0100 <dminuoso> Because one of the nice things about String is that it lets you comfortably write recursion on its content, but with this you could write it just as easily on text as well.
2022-12-09 10:48:07 +0100 <c_wraith> yeah, it'd have to work out that way somehow
2022-12-09 10:51:16 +0100 <dminuoso> That latter part should be easy enough to retrofit into the existing extension at least
2022-12-09 10:52:03 +0100 <dminuoso> What surprises me a bit however is that IsList has a toList method
2022-12-09 10:52:23 +0100 <dminuoso> That seems like it could rule out some potential instances
2022-12-09 10:59:26 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-09 11:00:00 +0100califax(~califax@user/califx)
2022-12-09 11:04:54 +0100ubert1(~Thunderbi@2a02:8109:abc0:6434:ca01:21c9:7b00:2bcf)
2022-12-09 11:08:24 +0100ubert1(~Thunderbi@2a02:8109:abc0:6434:ca01:21c9:7b00:2bcf) (Client Quit)
2022-12-09 11:08:47 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
2022-12-09 11:10:33 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-09 11:11:52 +0100Guest2318(~Guest23@27.57.46.219)
2022-12-09 11:15:16 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-12-09 11:15:42 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
2022-12-09 11:15:44 +0100acidjnk_new(~acidjnk@p200300d6e7137a16c4eff8deb759a49f.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-09 11:16:16 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-09 11:16:31 +0100Lord_of_Life_Lord_of_Life
2022-12-09 11:16:49 +0100kenran(~user@user/kenran)
2022-12-09 11:28:32 +0100anpad(~pandeyan@user/anpad) (Read error: Connection reset by peer)
2022-12-09 11:30:55 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2022-12-09 11:30:57 +0100anpad(~pandeyan@user/anpad)
2022-12-09 11:33:46 +0100ubert1(~Thunderbi@2a02:8109:abc0:6434:8bbb:a876:10e2:2306)
2022-12-09 11:35:03 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-12-09 11:35:35 +0100raehik(~raehik@213.86.197.10)
2022-12-09 11:58:59 +0100Guest75(Guest75@2a01:7e01::f03c:92ff:fe5d:7b18)
2022-12-09 12:00:18 +0100aeroplane(~user@user/aeroplane) (Ping timeout: 260 seconds)
2022-12-09 12:00:40 +0100acidjnk(~acidjnk@p200300d6e7137a1691284ca25ab2803c.dip0.t-ipconnect.de)
2022-12-09 12:01:00 +0100dextaa8(~DV@user/dextaa)
2022-12-09 12:02:46 +0100dextaa(~DV@user/dextaa) (Ping timeout: 256 seconds)
2022-12-09 12:02:46 +0100dextaa8dextaa
2022-12-09 12:06:02 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-09 12:06:02 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
2022-12-09 12:06:28 +0100xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 248 seconds)
2022-12-09 12:06:29 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-09 12:06:29 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-09 12:06:29 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
2022-12-09 12:06:29 +0100ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-09 12:06:42 +0100califax(~califax@user/califx)
2022-12-09 12:06:54 +0100chexum_(~quassel@gateway/tor-sasl/chexum)
2022-12-09 12:07:23 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
2022-12-09 12:08:06 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex)
2022-12-09 12:08:32 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-09 12:08:38 +0100xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-09 12:09:10 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-09 12:09:53 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-12-09 12:11:16 +0100Guest2318(~Guest23@27.57.46.219) (Ping timeout: 256 seconds)
2022-12-09 12:12:54 +0100 <EvanR> dminuoso, what comes from List goes to List it's List. it's List
2022-12-09 12:13:52 +0100 <dminuoso> EvanR: Sure, its just strange in that it's tighter than IsString, which can only ever go from a string but not back again
2022-12-09 12:15:54 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2022-12-09 12:18:04 +0100xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 256 seconds)
2022-12-09 12:19:56 +0100chexum_(~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
2022-12-09 12:20:03 +0100 <Hecate> https://www.youtube.com/watch?v=MCfD7aIl-_E
2022-12-09 12:21:51 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-12-09 12:22:19 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-09 12:24:18 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-09 12:27:21 +0100pflanze_pflanze
2022-12-09 12:32:53 +0100raehik(~raehik@213.86.197.10) (Ping timeout: 246 seconds)
2022-12-09 12:34:44 +0100tabaqui(~root@88.231.62.215) (Ping timeout: 248 seconds)
2022-12-09 12:37:20 +0100zant1(~zant@62.214.20.26) (Ping timeout: 256 seconds)
2022-12-09 12:41:30 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43)
2022-12-09 12:44:08 +0100Ybombinator(~Ybombinat@85.254.74.38) (Read error: Connection reset by peer)
2022-12-09 12:45:50 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43) (Ping timeout: 256 seconds)
2022-12-09 12:54:10 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-12-09 13:00:16 +0100aeroplane(~user@user/aeroplane)
2022-12-09 13:02:08 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-09 13:03:09 +0100phma(~phma@host-67-44-208-220.hnremote.net) (Read error: Connection reset by peer)
2022-12-09 13:04:02 +0100phma(phma@2001:5b0:211c:98f8:5c75:3015:c8e3:49df)
2022-12-09 13:04:46 +0100zant1(~zant@2a00:20:600c:fe1d:c5b8:5056:38e4:8aa3)
2022-12-09 13:08:21 +0100zant2(~zant@46.183.103.17)
2022-12-09 13:08:21 +0100ec_(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-12-09 13:08:43 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-09 13:08:57 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-09 13:10:20 +0100chomwitt(~chomwitt@2a02:587:7a05:dc00:1ac0:4dff:fedb:a3f1)
2022-12-09 13:10:45 +0100zant1(~zant@2a00:20:600c:fe1d:c5b8:5056:38e4:8aa3) (Ping timeout: 265 seconds)
2022-12-09 13:14:13 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-09 13:15:30 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-09 13:18:00 +0100tabaqui(~root@88.231.62.215)
2022-12-09 13:19:04 +0100raehik(~raehik@213.86.197.10)
2022-12-09 13:21:01 +0100xff0x_(~xff0x@ai071162.d.east.v6connect.net)
2022-12-09 13:24:56 +0100zant2(~zant@46.183.103.17) (Ping timeout: 256 seconds)
2022-12-09 13:32:18 +0100acidjnk(~acidjnk@p200300d6e7137a1691284ca25ab2803c.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-09 13:34:46 +0100zant2(~zant@2a00:20:6058:2168:68e3:1b6:3e79:2688)
2022-12-09 13:37:09 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-12-09 13:37:23 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
2022-12-09 13:37:45 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-09 13:38:32 +0100raehik(~raehik@213.86.197.10) (Ping timeout: 256 seconds)
2022-12-09 13:40:22 +0100 <Guillaum[m]> From the documentation, the "mask" status of `mask $ \restore -> ` is inherited in child threads (created with forkIO, or Async.async.) However, it is unclear if we can use `restore` a the child thread. The documentation of `forkIOWithUnmask` let us think that we cannot.
2022-12-09 13:41:22 +0100zant2(~zant@2a00:20:6058:2168:68e3:1b6:3e79:2688) (Ping timeout: 256 seconds)
2022-12-09 13:42:59 +0100 <Guillaum[m]> Actually, the documentation of forkFinally suggest that it is possible to use restore in the child thread, see https://hackage.haskell.org/package/base-4.17.0.0/docs/Control-Concurrent.html#v:forkFinally, but in this case, what is the point of forkIOWithUnmask?
2022-12-09 13:43:22 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-09 13:44:50 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f) (Ping timeout: 260 seconds)
2022-12-09 13:45:18 +0100goober(~goober@90-231-13-185-no3430.tbcn.telia.com)
2022-12-09 13:45:28 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-12-09 13:45:46 +0100 <Guillaum[m]> Haa, I got it, reading https://www.fpcomplete.com/blog/2018/04/async-exception-handling-haskell/, the difference is subtle. One "restores" the previous state, when the other fully remove the masking state.
2022-12-09 13:45:47 +0100 <Guillaum[m]> Thank you ;)
2022-12-09 13:45:50 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f)
2022-12-09 13:47:45 +0100MajorBiscuit(~MajorBisc@2001:1c00:2404:ed00:28e1:ad14:ec67:539e) (Ping timeout: 260 seconds)
2022-12-09 13:48:07 +0100raehik(~raehik@213.86.197.10)
2022-12-09 13:49:05 +0100mmhat(~mmh@p200300f1c73b51d2ee086bfffe095315.dip0.t-ipconnect.de)
2022-12-09 13:54:47 +0100raehik(~raehik@213.86.197.10) (Ping timeout: 264 seconds)
2022-12-09 13:57:17 +0100 <chreekat> :D
2022-12-09 14:03:02 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-09 14:03:37 +0100kuribas(~user@ptr-17d51epibvf1t5xp3ze.18120a2.ip6.access.telenet.be)
2022-12-09 14:06:00 +0100mestre(~mestre@191.177.185.178)
2022-12-09 14:11:40 +0100cyphase(~cyphase@user/cyphase) (Ping timeout: 260 seconds)
2022-12-09 14:13:08 +0100 <merijn> Guillaum[m]: Also, lemme recommend Simon Marlow's Parallel & Concurrent Haskell book that goes into excruciating detail on this ;)
2022-12-09 14:14:39 +0100 <Guillaum[m]> merijn: thank you. Actually, I'm sure I read that one years ago, but concurrent programming is difficult AND I tend to forget about things when not used daily ;)
2022-12-09 14:18:02 +0100 <maerwald[m]> It's easy to remember: don't trust haskell exceptions
2022-12-09 14:18:29 +0100 <merijn> tbf, don't trust async exceptions in any language :p
2022-12-09 14:18:35 +0100 <merijn> but a lot of languages don't have them
2022-12-09 14:18:59 +0100 <dminuoso> Is there some idiom to tacking callstack information onto IO exception?
2022-12-09 14:19:16 +0100 <Guillaum[m]> Well, C/C++ have signals, which is roughly the same in worse because it can corrupt your memory.
2022-12-09 14:19:33 +0100 <[exa]> "have" signals
2022-12-09 14:19:40 +0100 <dminuoso> Right now Im just annotating HasCallStack with my own exception hierarchy that all include CallStack in them, but that's fairly cumbersome
2022-12-09 14:20:28 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds)
2022-12-09 14:20:41 +0100 <dminuoso> maerwald[m]: any progress on that silly ghcup bug?
2022-12-09 14:20:52 +0100 <merijn> Guillaum[m]: Yes, there's 2 kinds of people
2022-12-09 14:21:06 +0100 <merijn> Guillaum[m]: People who think they can write signal handling code and people who don't lie to themselves :p
2022-12-09 14:21:13 +0100 <dminuoso> Ahh it was indeed a bad header offset.
2022-12-09 14:21:24 +0100 <dminuoso> Good catch
2022-12-09 14:22:29 +0100 <dminuoso> What strikes me as strangely odd, is how d_name appears to have contained sensible results.
2022-12-09 14:22:48 +0100 <dminuoso> Shouldnt d_name have had a bad offsset as well?
2022-12-09 14:28:31 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-12-09 14:30:11 +0100 <maerwald[m]> dminuoso: yes
2022-12-09 14:30:31 +0100 <maerwald[m]> https://github.com/haskell/ghcup-hs/issues/415#issuecomment-1344184716
2022-12-09 14:30:31 +0100 <maerwald[m]> What exactly messes with the defines is still not clear
2022-12-09 14:31:19 +0100 <maerwald[m]> The other ccall is from unix package, which happens to include the right headers
2022-12-09 14:31:32 +0100 <maerwald[m]> Still something is wrong
2022-12-09 14:31:45 +0100 <maerwald[m]> You shouldn't need to add defines for system headers to be correct
2022-12-09 14:32:05 +0100 <maerwald[m]> So I think something is messing with macros
2022-12-09 14:32:16 +0100 <dminuoso> maerwald[m]: But seriously, why did the d_name field contain the expected data?
2022-12-09 14:32:28 +0100 <dminuoso> I dont quite get that part.
2022-12-09 14:32:43 +0100 <dminuoso> Or was d_name just accidentally aligned correctly?
2022-12-09 14:33:01 +0100 <maerwald[m]> dminuoso: the function that uses d_type is defined in GHCup. The function that uses d_name in unix
2022-12-09 14:33:10 +0100 <dminuoso> Ohhhh
2022-12-09 14:33:21 +0100 <maerwald[m]> They have different includes
2022-12-09 14:33:30 +0100 <dminuoso> I hate C with a passion.
2022-12-09 14:33:34 +0100 <maerwald[m]> But that still doesn't make sense
2022-12-09 14:34:10 +0100 <maerwald[m]> If you write a minimal main.c, all the d_type stuff is correct
2022-12-09 14:34:10 +0100 <maerwald[m]> So something makes it incorrect in Haskell
2022-12-09 14:34:36 +0100 <maerwald[m]> And then ghcconfig.h makes it correct again
2022-12-09 14:34:42 +0100 <dminuoso> maerwald[m]: Could be fixincludes perhaps?
2022-12-09 14:35:26 +0100 <dminuoso> If it is, you will have an incredibly hard time figuring it out. :p
2022-12-09 14:36:01 +0100 <dminuoso> Or some other header that gets accidentally tossed in disables that macro
2022-12-09 14:36:21 +0100 <maerwald[m]> But now I worry... including HsFFI.h fixes it, but what other side effects may it have
2022-12-09 14:37:45 +0100MajorBiscuit(~MajorBisc@145.94.137.174)
2022-12-09 14:38:07 +0100 <maerwald[m]> Anyway, that's just more of a reason to merge https://github.com/haskell/unix/pull/251
2022-12-09 14:40:05 +0100 <maerwald[m]> GHC will probably not care, because they stopped supporting armv7
2022-12-09 14:41:20 +0100 <merijn> maerwald[m]: unsupported platforms is just "it is someone else's problem to contribute fixes", so they will care, just not invest any effort into fixing
2022-12-09 14:41:40 +0100 <merijn> Assuming said fixes don't break everything else, ofc :p
2022-12-09 14:42:14 +0100akegalj(~akegalj@141-136-183-112.dsl.iskon.hr) (Ping timeout: 260 seconds)
2022-12-09 14:43:14 +0100 <maerwald[m]> merijn: they don't have arm runners anymore I think
2022-12-09 14:44:06 +0100 <maerwald[m]> https://gitlab.haskell.org/ghc/ghc/-/pipelines/60010
2022-12-09 14:46:23 +0100 <chreekat> yeah, no more armv7 runners, since the servers were taken away. armv7 was and continues to be a "Tier 2 platform", meaning whether GHC works for it depends on community support. In other words, nobody is paid to keep them working
2022-12-09 14:46:32 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-09 14:47:53 +0100 <maerwald[m]> Probably not good for adoption though
2022-12-09 14:52:47 +0100zant2(~zant@62.214.20.26)
2022-12-09 14:56:26 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-12-09 14:56:32 +0100 <merijn> Sure, but someone has to foot the bill for these things
2022-12-09 14:57:04 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex)
2022-12-09 14:59:47 +0100Erutuon_(~Erutuon@user/erutuon)
2022-12-09 15:01:35 +0100 <maerwald> merijn: HF?
2022-12-09 15:02:24 +0100MajorBiscuit(~MajorBisc@145.94.137.174) (Ping timeout: 256 seconds)
2022-12-09 15:02:42 +0100 <chreekat> meanwhile, ghc also doesn't work great on aarch64/macOS Ventura, and that is considered highest priority and ppl are paid to work on it :) https://gitlab.haskell.org/ghc/ghc/-/issues/22497
2022-12-09 15:03:02 +0100 <merijn> maerwald: Sure, but that's up to HF then, not GHC HQ. Can't blame GHC HQ for dropping niche architectures no one is paying to maintain
2022-12-09 15:03:27 +0100 <maerwald> merijn: did they source community opinions before dropping?
2022-12-09 15:03:43 +0100 <maerwald> like, a call for help?
2022-12-09 15:05:30 +0100 <albet70> except callCC, is there way to do early exit?
2022-12-09 15:09:04 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 15:10:49 +0100 <dminuoso> You can use IO exceptions, MaybeT, EitherT
2022-12-09 15:11:06 +0100 <dminuoso> (Err called ExceptT actually)
2022-12-09 15:11:35 +0100 <dminuoso> And you can also wrap entire monadic expressions in `when` ...
2022-12-09 15:11:42 +0100 <dminuoso> Or you branch off in a guard early in a binding
2022-12-09 15:12:26 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-12-09 15:13:41 +0100akegalj(~akegalj@141-136-183-112.dsl.iskon.hr)
2022-12-09 15:16:08 +0100phma(phma@2001:5b0:211c:98f8:5c75:3015:c8e3:49df) (Read error: Connection reset by peer)
2022-12-09 15:16:14 +0100 <albet70> dminuoso , this is the actual code https://paste.tomsmeding.com/FZoU3vqb
2022-12-09 15:17:32 +0100phma(phma@2001:5b0:211b:de08:e3b4:8590:6dc5:da01)
2022-12-09 15:17:56 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-09 15:18:54 +0100 <dminuoso> albet70: Given the context, do you consider an "empty" file an error?
2022-12-09 15:19:22 +0100 <albet70> in that 'traverse' , if-then-else branch, I can set 'return Left x' or 'return Right x' then the whole 'traverse' will return ActionM [Either a b], to check that Left Right decide to run the lase line 'redirect' or 'return ()'
2022-12-09 15:19:33 +0100 <dminuoso> Either way, scotty which I presume you are using, has a bunch of exceptions to short circuit the entire handler
2022-12-09 15:19:36 +0100 <dminuoso> https://hackage.haskell.org/package/scotty-0.12.1/docs/Web-Scotty.html#g:7
2022-12-09 15:20:16 +0100 <dminuoso> Do you want to abort the entire handler, or just skip the file?
2022-12-09 15:20:23 +0100 <dminuoso> Or whats the intention?
2022-12-09 15:21:15 +0100 <albet70> 'finish' seems right
2022-12-09 15:21:27 +0100 <albet70> entire handler
2022-12-09 15:21:41 +0100 <dminuoso> Consider using `raiseStatus` even
2022-12-09 15:22:39 +0100megaTherion(~therion@unix.io) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-09 15:23:27 +0100 <albet70> how about turn it into ContT () ActionM a, then inside callCC to short circuit?
2022-12-09 15:23:53 +0100 <dminuoso> You can do that as well.
2022-12-09 15:24:12 +0100megaTherion(~therion@unix.io)
2022-12-09 15:24:17 +0100 <dminuoso> It seems unnecessarily complex, given that you have `raiseStatus` at your disposal, but its your choice.
2022-12-09 15:24:32 +0100 <maerwald> pleasn don't use ContT
2022-12-09 15:24:40 +0100 <dminuoso> Hey its their sanity.
2022-12-09 15:24:45 +0100 <albet70> I don't want to refresh the front page
2022-12-09 15:24:57 +0100 <dminuoso> Mental wards need patients too, or they lose income
2022-12-09 15:25:05 +0100thegeekinside(~thegeekin@189.217.82.244)
2022-12-09 15:25:21 +0100 <maerwald> that should be in the haddock of ContT
2022-12-09 15:25:25 +0100 <dminuoso> I do not know what raiseStatus has to do with "refreshing the front page" (whatever that means for you)
2022-12-09 15:26:33 +0100 <albet70> Throw an exception, which can be caught with rescue. Uncaught exceptions turn into HTTP responses corresponding to the given status.
2022-12-09 15:26:47 +0100 <albet70> that http responses is not what I want
2022-12-09 15:26:54 +0100shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-12-09 15:27:15 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-12-09 15:27:47 +0100xff0x_(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 264 seconds)
2022-12-09 15:29:51 +0100 <geekosaur> isn't it going to have to produce some HTTP response?
2022-12-09 15:30:01 +0100megaTherion(~therion@unix.io) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-09 15:32:00 +0100xff0x_(~xff0x@ai071162.d.east.v6connect.net)
2022-12-09 15:32:17 +0100megaTherion(~therion@unix.io)
2022-12-09 15:32:40 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f) (Remote host closed the connection)
2022-12-09 15:33:33 +0100Sgeo(~Sgeo@user/sgeo)
2022-12-09 15:34:32 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f)
2022-12-09 15:35:59 +0100 <albet70> it seems likely
2022-12-09 15:36:08 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-12-09 15:37:58 +0100 <albet70> wait a sec, maybe there is no need to create ContT to short circuit, 'traverse' do early exit already
2022-12-09 15:39:02 +0100 <albet70> oh, traverse can not exit whole function, ignore the privious msg
2022-12-09 15:44:17 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-09 15:45:02 +0100gwern(~gwern@user/gwern) (Ping timeout: 246 seconds)
2022-12-09 15:49:29 +0100jargon(~jargon@174-22-192-24.phnx.qwest.net)
2022-12-09 15:54:51 +0100chele(~chele@user/chele) (Quit: Leaving)
2022-12-09 15:56:04 +0100gwern(~gwern@user/gwern)
2022-12-09 15:58:42 +0100mikoto-chan(~mikoto-ch@2001:999:400:4e51:8dbe:5654:a687:d771)
2022-12-09 16:01:20 +0100akegalj(~akegalj@141-136-183-112.dsl.iskon.hr) (Ping timeout: 256 seconds)
2022-12-09 16:02:34 +0100kaskal(~kaskal@213-147-167-253.nat.highway.webapn.at) (Quit: ZNC - https://znc.in)
2022-12-09 16:03:06 +0100kaskal(~kaskal@2001:4bb8:2d1:32ed:7894:4e7:1e3f:f8dd)
2022-12-09 16:05:52 +0100tabaqui(~root@88.231.62.215) (Ping timeout: 256 seconds)
2022-12-09 16:07:53 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-09 16:15:11 +0100motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2022-12-09 16:15:19 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-09 16:15:29 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-09 16:15:52 +0100motherfsck(~motherfsc@user/motherfsck) (Client Quit)
2022-12-09 16:16:29 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-09 16:17:16 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
2022-12-09 16:19:44 +0100razetime(~quassel@49.207.203.213) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-12-09 16:19:51 +0100kaskal(~kaskal@2001:4bb8:2d1:32ed:7894:4e7:1e3f:f8dd) (Quit: ZNC - https://znc.in)
2022-12-09 16:21:18 +0100kaskal(~kaskal@2001:4bb8:2d1:32ed:7894:4e7:1e3f:f8dd)
2022-12-09 16:25:37 +0100motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2022-12-09 16:26:22 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 16:27:22 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-09 16:28:21 +0100mikoto-chan(~mikoto-ch@2001:999:400:4e51:8dbe:5654:a687:d771) (Ping timeout: 256 seconds)
2022-12-09 16:30:09 +0100motherfsck(~motherfsc@user/motherfsck) (Client Quit)
2022-12-09 16:30:31 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-09 16:31:32 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-09 16:32:26 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
2022-12-09 16:32:53 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
2022-12-09 16:33:20 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
2022-12-09 16:33:20 +0100ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-09 16:34:56 +0100raehik(~raehik@213.86.197.10)
2022-12-09 16:35:17 +0100motherfsck(~motherfsc@user/motherfsck) (Client Quit)
2022-12-09 16:35:59 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-09 16:36:52 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-12-09 16:36:54 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex)
2022-12-09 16:37:04 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-09 16:37:51 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-09 16:37:57 +0100califax(~califax@user/califx)
2022-12-09 16:40:27 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-09 16:40:32 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-09 16:42:09 +0100raehik(~raehik@213.86.197.10) (Ping timeout: 252 seconds)
2022-12-09 16:43:20 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-12-09 16:45:11 +0100mestre(~mestre@191.177.185.178) (Quit: Lost terminal)
2022-12-09 16:49:51 +0100tabaqui(~root@88.231.62.215)
2022-12-09 17:00:48 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-09 17:02:25 +0100raehik(~raehik@213.86.197.10)
2022-12-09 17:03:43 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:5543:4ce0:b6b6:f758) (Quit: WeeChat 2.8)
2022-12-09 17:10:03 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 17:13:22 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 17:15:34 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-09 17:17:08 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-12-09 17:17:10 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-09 17:17:44 +0100Techcable(~Techcable@user/Techcable)
2022-12-09 17:26:09 +0100raehik(~raehik@213.86.197.10) (Ping timeout: 260 seconds)
2022-12-09 17:31:45 +0100acidjnk(~acidjnk@p54ad5adb.dip0.t-ipconnect.de)
2022-12-09 17:32:35 +0100causal(~user@50.35.85.7) (Quit: WeeChat 3.7.1)
2022-12-09 17:35:13 +0100mbuf(~Shakthi@49.205.86.134) (Quit: Leaving)
2022-12-09 17:37:22 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43)
2022-12-09 17:40:41 +0100srk(~sorki@user/srk)
2022-12-09 17:43:46 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f) (Remote host closed the connection)
2022-12-09 17:44:22 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-12-09 17:47:15 +0100jespada(~jespada@nmal-24-b2-v4wan-166357-cust1764.vm24.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com)
2022-12-09 17:51:11 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-09 17:52:13 +0100Scraeling(~Scraeling@user/scraeling)
2022-12-09 17:54:13 +0100ubert1(~Thunderbi@2a02:8109:abc0:6434:8bbb:a876:10e2:2306) (Quit: ubert1)
2022-12-09 17:57:04 +0100raehik(~raehik@213.86.197.10)
2022-12-09 17:59:06 +0100Guest237(~Guest23@27.57.46.219)
2022-12-09 18:00:18 +0100srk(~sorki@user/srk) (Quit: ZNC 1.8.1 - https://znc.in)
2022-12-09 18:00:42 +0100srk(~sorki@user/srk)
2022-12-09 18:01:05 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2022-12-09 18:04:54 +0100freeside(~mengwong@103.252.202.193) (Ping timeout: 252 seconds)
2022-12-09 18:05:17 +0100cyphase(~cyphase@user/cyphase)
2022-12-09 18:05:41 +0100finsternis(~X@23.226.237.192)
2022-12-09 18:05:42 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 18:08:43 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-09 18:10:19 +0100festive_kurbus(~festive_k@user/kurbus) (Client Quit)
2022-12-09 18:16:19 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
2022-12-09 18:18:26 +0100freeside(~mengwong@bb115-66-48-84.singnet.com.sg)
2022-12-09 18:21:17 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 18:22:16 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-12-09 18:24:01 +0100econo(uid147250@user/econo)
2022-12-09 18:24:27 +0100pestilence_(~alice@2601:c2:8300:a580:7c6b:b13c:ce9c:c116)
2022-12-09 18:25:46 +0100motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2022-12-09 18:26:12 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-12-09 18:26:37 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!)
2022-12-09 18:28:11 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-09 18:30:11 +0100CiaoSen(~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-12-09 18:30:29 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:30d2:fcaf:3b1c:ad43) (Remote host closed the connection)
2022-12-09 18:32:28 +0100ft(~ft@p508dbd59.dip0.t-ipconnect.de)
2022-12-09 18:35:48 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f)
2022-12-09 18:41:31 +0100tabaqui(~root@88.231.62.215) (Quit: WeeChat 3.7.1)
2022-12-09 18:48:21 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
2022-12-09 18:48:24 +0100Guest237(~Guest23@27.57.46.219) (Ping timeout: 260 seconds)
2022-12-09 18:49:27 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 18:53:21 +0100bazoo(~bazoo@93.51.40.51)
2022-12-09 18:55:19 +0100 <bazoo> geekosaur EvanR: I kept trying making a bounded int type and after digging for a couple hours in the base codebase I came up with the following, Am I on a good track? data Range :: Nat -> Nat -> Type where R :: (KnownNat x, min <= x, x <= max) => Proxy x -> Range min max
2022-12-09 18:57:33 +0100nschoe(~q@141.101.51.197) (Quit: Switching off)
2022-12-09 18:59:17 +0100cyphase(~cyphase@user/cyphase) (Ping timeout: 246 seconds)
2022-12-09 18:59:40 +0100 <c_wraith> I think that's basically as good as possible in GHC as it stands, but I don't think it's going to be pleasant to use.
2022-12-09 19:00:24 +0100raehik(~raehik@213.86.197.10) (Ping timeout: 256 seconds)
2022-12-09 19:00:34 +0100 <bazoo> Indeed, as I'm not even sure how could I construct values of such type
2022-12-09 19:00:49 +0100pestilence_(~alice@2601:c2:8300:a580:7c6b:b13c:ce9c:c116) (Using Circe, the loveliest of all IRC clients)
2022-12-09 19:02:37 +0100 <c_wraith> Oh, that Proxy in a negative position is unnecessarily limiting. You could instead use proxy x -> Range min max
2022-12-09 19:03:28 +0100 <c_wraith> the higher-kinded type variable is a fun trick when doing type-level stuff.
2022-12-09 19:04:26 +0100cyphase(~cyphase@user/cyphase)
2022-12-09 19:04:56 +0100 <c_wraith> but regardless of that. You could construct a value of that type with something like foo :: Range 0 10 ; foo = R (Proxy :: Proxy 5)
2022-12-09 19:05:50 +0100 <c_wraith> But that doesn't change how awkward it is to work with :)
2022-12-09 19:07:29 +0100 <bazoo> True, I was hoping to be able to do something like foo :: Range 0 10 ; foo = R 5, but I'm not able to unify x with 5
2022-12-09 19:10:15 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f)
2022-12-09 19:11:04 +0100 <c_wraith> Yeah, this is the sort of thing that Haskell tools just aren't good at. Even with the extensions GHC provides.
2022-12-09 19:11:27 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 19:13:30 +0100 <bazoo> I think the time has come for me to start looking at idris
2022-12-09 19:13:35 +0100 <stefan-_> I got a question regarding aoc and parsec
2022-12-09 19:13:40 +0100 <stefan-_> for this: https://gist.github.com/dozed/7f0ea0ec4ac6191b4b978012fcf21923
2022-12-09 19:14:01 +0100 <stefan-_> I get: Left (line 5, column 1): unexpected "1" expecting " "
2022-12-09 19:14:22 +0100 <stefan-_> basically the question is how to switch from one parsing mode (with many1) to another mode
2022-12-09 19:17:57 +0100 <stefan-_> s/many1/sepBy1/
2022-12-09 19:18:52 +0100 <dminuoso> All the parsec questions come up in December. Always.
2022-12-09 19:19:14 +0100 <dminuoso> It's like a universal constant that should be included in the Feynman Lectures on Physics
2022-12-09 19:19:31 +0100 <stefan-_> :)
2022-12-09 19:19:34 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f) (Remote host closed the connection)
2022-12-09 19:21:18 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-09 19:21:18 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-09 19:21:18 +0100wroathe(~wroathe@user/wroathe)
2022-12-09 19:22:20 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2022-12-09 19:23:12 +0100Guest2347(~Guest23@27.57.46.219)
2022-12-09 19:23:32 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-09 19:23:56 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-12-09 19:29:12 +0100son0p(~ff@2604:3d08:5b7f:5540::a58f)
2022-12-09 19:33:30 +0100 <mauke> stefan-_: the problem is that string " " commits to succeeding by consuming at least one character of input
2022-12-09 19:35:02 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-12-09 19:35:34 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-09 19:36:47 +0100 <mauke> stefan-_: as a rule of thumb, all string s should be try (string s) instead
2022-12-09 19:36:57 +0100 <carter> hows everyone?
2022-12-09 19:37:26 +0100 <mauke> actually, I'm not sure if that's enough
2022-12-09 19:37:54 +0100 <stefan-_> mauke, this didnt help, gives the same error
2022-12-09 19:38:18 +0100 <stefan-_> I thought about wrapping the two input parts in a sum type and parse with <|>
2022-12-09 19:38:24 +0100 <stefan-_> but this seems overly complicated
2022-12-09 19:38:39 +0100Cale(~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Read error: Connection reset by peer)
2022-12-09 19:38:58 +0100Guest2347(~Guest23@27.57.46.219) (Ping timeout: 268 seconds)
2022-12-09 19:40:36 +0100 <mauke> it should give a slightly different error, I think
2022-12-09 19:40:52 +0100 <mauke> stefan-_: anyway, I think the sepBy1 in the main parser should be endBy1 instead
2022-12-09 19:41:01 +0100 <mauke> (and one of the other endOfLine's removed)
2022-12-09 19:41:52 +0100 <mauke> because in the current code, it sees the '\n' and goes "hey, that's a separator! better parse another occurrence of itemsParser"
2022-12-09 19:41:59 +0100 <mauke> which then fails
2022-12-09 19:42:01 +0100 <dminuoso> Well even with `try (string " ")` you have the problem that no branch available here can succeed.
2022-12-09 19:42:08 +0100 <dminuoso> So parsec will just report on the first branch
2022-12-09 19:43:00 +0100 <dminuoso> Yup, in connection with what mauke said
2022-12-09 19:43:20 +0100 <dminuoso> Honestly this is a type of input I would not use megaparsec to parse with.
2022-12-09 19:43:24 +0100 <dminuoso> *parsec
2022-12-09 19:43:59 +0100caef^(~caef@76.145.185.103)
2022-12-09 19:44:25 +0100 <dminuoso> Or at the very least not with backtracking here. Lookahead and brach is more suitable
2022-12-09 19:44:27 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
2022-12-09 19:44:38 +0100 <dminuoso> Rather than just this <|> randomly stabbing and hopnig it does what you want
2022-12-09 19:45:08 +0100 <stefan-_> try (string " ") together with endBy1 consumes at least the first part
2022-12-09 19:45:18 +0100 <stefan-_> `many1 anyChar` then consumes the rest
2022-12-09 19:45:21 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 19:45:44 +0100 <mauke> here's my parser: https://paste.tomsmeding.com/tLizvfWG
2022-12-09 19:45:57 +0100 <mauke> it doesn't use parsec, but it should be pretty obvious anyway, I hope
2022-12-09 19:46:18 +0100 <dminuoso> I should conjure up a fancy flatparser example for this
2022-12-09 19:46:35 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-09 19:46:51 +0100 <dminuoso> Is this the input for Day 9 part 2?
2022-12-09 19:47:00 +0100 <mauke> this is day 5
2022-12-09 19:48:43 +0100 <mauke> btw, I love the Applicative interface for parsing
2022-12-09 19:49:14 +0100 <mauke> <* is just so nice to have
2022-12-09 19:49:36 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2022-12-09 19:49:53 +0100bazoo(~bazoo@93.51.40.51) (Ping timeout: 260 seconds)
2022-12-09 19:56:38 +0100aeroplane(~user@user/aeroplane) (Ping timeout: 246 seconds)
2022-12-09 19:59:29 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-09 20:03:36 +0100 <stefan-_> mauke, this does it: https://gist.github.com/dozed/2bd3f4321c012727f9587d59450d098c
2022-12-09 20:04:37 +0100 <stefan-_> although I wonder why endBy1 works, but not sepBy1 followed by endOfLine
2022-12-09 20:04:52 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2022-12-09 20:05:11 +0100 <mauke> because endBy1 treats the newline as part of one element (or one iteration of the inner parser)
2022-12-09 20:05:41 +0100 <mauke> if the parser at the beginning of the next iteration fails, endBy1 is fine with it and returns what it managed to collect before
2022-12-09 20:06:06 +0100 <mauke> on the other hand, sepBy1 treats the separator as a reliable indicator that another element will follow
2022-12-09 20:06:23 +0100 <mauke> so if it sees a "\n", it insists on parsing another items line
2022-12-09 20:08:09 +0100jjhoo(~jahakala@user/jjhoo) (Remote host closed the connection)
2022-12-09 20:08:45 +0100 <mauke> basically, there is this branching structure: (sep >> items >> ...) <|> (endOfLine >> ...)
2022-12-09 20:09:09 +0100 <mauke> (the first ... loops back to sepBy1; the second ... is the code block that follows with moveSpecParser)
2022-12-09 20:09:29 +0100 <mauke> since sep = endOfLine in your code, there is an ambiguity here
2022-12-09 20:09:42 +0100 <mauke> and it cannot be resolved just by looking at the next char
2022-12-09 20:10:08 +0100 <mauke> uh, I should be more explicit about stuff
2022-12-09 20:10:40 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 20:11:12 +0100 <mauke> consider the following code: do { items <- sepBy1 itemsParser endOfLine; endOfLine; many1 anyChar }
2022-12-09 20:12:24 +0100 <mauke> after parsing the first occurrence of itemsParser, sepBy1 has to make a choice: either stop and return the list of results so far, or try for another iteration of the inner parser
2022-12-09 20:12:54 +0100 <mauke> well, the way sepBy1 makes this choice is by seeing whether the separator parser succeeds, which is endOfLine in thie code
2022-12-09 20:14:20 +0100 <mauke> since there is a '\n' in the input at that point, the separator check succeeds
2022-12-09 20:14:35 +0100 <stefan-_> ok, so sepBy1 is implemented with `many (sep >> p)`, which fails if p does not succeed
2022-12-09 20:14:39 +0100 <mauke> sepBy1 p sep = do { x <- p; xs <- many (sep >> p); return (x : xs) }
2022-12-09 20:14:54 +0100 <mauke> the only way out of this is to make sep fail without consuming any input
2022-12-09 20:14:56 +0100 <stefan-_> and there is no `try` to mitigate this
2022-12-09 20:15:00 +0100 <mauke> right
2022-12-09 20:15:11 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds)
2022-12-09 20:15:26 +0100 <mauke> you would need a 'try' around the whole (sep >> p) construct, which you can't insert without writing your own version of sepBy1
2022-12-09 20:15:37 +0100 <stefan-_> yep, makes sense
2022-12-09 20:15:43 +0100 <stefan-_> thanks for the explanation :)
2022-12-09 20:15:53 +0100 <mauke> you're welcome :-)
2022-12-09 20:16:43 +0100jjhoo(~jahakala@user/jjhoo)
2022-12-09 20:16:45 +0100 <mauke> also, your move parser is incomplete because it doesn't accept multi-digit numbers
2022-12-09 20:17:18 +0100 <mauke> "move 22 from 3 to 4", etc
2022-12-09 20:18:25 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-09 20:19:02 +0100 <stefan-_> mauke, good point, `many1` should do it
2022-12-09 20:20:55 +0100 <EvanR> wow my day 9 code reduced like hell
2022-12-09 20:21:51 +0100 <mauke> reduce - reuse - ecyce
2022-12-09 20:24:39 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-12-09 20:24:55 +0100ei30metry[m](~ei30metry@2001:470:69fc:105::2:d5ee)
2022-12-09 20:31:12 +0100 <dminuoso> https://gist.github.com/dminuoso/3f8272c66fed64349f28c171deafdefa
2022-12-09 20:31:21 +0100 <dminuoso> This is how I would write a parser for those crates probably?
2022-12-09 20:31:50 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-09 20:31:56 +0100 <dminuoso> I think its much easier to think in terms of branching than to control backtracking and rely on <|>
2022-12-09 20:32:39 +0100 <dminuoso> (But take note, that something like lookahead is absurdly cheap in flatparse, so I dont know about parsec)
2022-12-09 20:32:44 +0100califax(~califax@user/califx)
2022-12-09 20:33:48 +0100Scraeling(~Scraeling@user/scraeling) (Read error: Connection reset by peer)
2022-12-09 20:33:49 +0100 <EvanR> unsolicited report I used pattern matching to turn [c] into Just c and " " into Nothing, then transpose, catMaybes
2022-12-09 20:34:36 +0100 <dminuoso> I gotta golf this out with maximum performance and minimum memory wastage.
2022-12-09 20:34:47 +0100 <EvanR> performance golf lol
2022-12-09 20:35:04 +0100 <mauke> dminuoso: what is FP.empty?
2022-12-09 20:35:16 +0100 <dminuoso> mauke: Its a failure you can backtrack on
2022-12-09 20:35:27 +0100 <dminuoso> (or rather a failure that will trigger backtrack)
2022-12-09 20:35:38 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 20:35:49 +0100 <mauke> not really needed here
2022-12-09 20:36:09 +0100 <dminuoso> It certainly is not, I could just connect the loop here.
2022-12-09 20:36:42 +0100 <mauke> why is FP.char a macro?
2022-12-09 20:36:53 +0100 <dminuoso> Heh yeah funny story here.
2022-12-09 20:37:02 +0100 <dminuoso> Long story is, string is a macro for good reason
2022-12-09 20:37:22 +0100 <dminuoso> And char is a macro because depending on what codepoint you have, we end up generating different code
2022-12-09 20:37:39 +0100 <dminuoso> if its a 1-octet we just peek a singular word off
2022-12-09 20:38:11 +0100 <mauke> I see
2022-12-09 20:39:19 +0100 <dminuoso> And similarly `string` will construct a correct sequence of reading word64, and then word8s...
2022-12-09 20:39:38 +0100 <dminuoso> So read in register sized chunks as much as possible
2022-12-09 20:40:07 +0100 <dminuoso> there's also `switch` with a funny quasi quoter that will let you write a case-of, but compile into a trie based lookup
2022-12-09 20:40:41 +0100 <dminuoso> so you write $(switch [| case _ of "foo" -> ...; "bar" -> ...; "quux" -> ... |] )
2022-12-09 20:40:50 +0100 <dminuoso> And it will do the maximally efficient thing
2022-12-09 20:41:11 +0100 <dminuoso> (And if there's shared prefixes, due to the trie representation, it will save unnecessary duplication)
2022-12-09 20:41:30 +0100 <dminuoso> its pretty cool
2022-12-09 20:41:53 +0100 <mauke> you could still do that at runtime, right?
2022-12-09 20:42:25 +0100 <mauke> hmm
2022-12-09 20:43:04 +0100 <mauke> I suppose you'd need an associated "accept" set (or char?) for each subparser
2022-12-09 20:48:04 +0100zant2(~zant@62.214.20.26) (Ping timeout: 256 seconds)
2022-12-09 20:48:58 +0100 <stefan-_> for the record, here the full solution for day5 part1: https://gist.github.com/dozed/798712c7d1fe4a2a591c9e3d6b7c3586
2022-12-09 20:49:47 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-09 20:50:47 +0100mmhat(~mmh@p200300f1c73b51d2ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1)
2022-12-09 20:53:10 +0100jargon(~jargon@174-22-192-24.phnx.qwest.net) (Ping timeout: 256 seconds)
2022-12-09 20:56:38 +0100huskle(~huskle@250.79-105-213.static.virginmediabusiness.co.uk)
2022-12-09 20:57:05 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2022-12-09 20:57:33 +0100 <huskle> argh god, its friday here and its absolute carnage outside - is there any peaceful sort of haskell stuff that i could use to take my mind of all of this terrifying society
2022-12-09 20:57:55 +0100 <monochrom> What carnage? What outside?
2022-12-09 20:58:06 +0100 <darkling> There's an outside? I don't understand.
2022-12-09 20:58:09 +0100 <huskle> oh, your on-silico too?
2022-12-09 20:58:10 +0100 <monochrom> Are people hoarding toilet papers again?
2022-12-09 20:58:28 +0100 <EvanR> dminuoso, I really like how haskell has options for distilling performance through more or less outlandish machinations
2022-12-09 20:58:38 +0100 <huskle> what!? carrying bundles of rolls or something?
2022-12-09 20:58:43 +0100 <EvanR> I really really like the other options xD
2022-12-09 20:59:23 +0100 <huskle> nono, i meant to take my mind off of all of the terribleness, not be encouraged to explain it!
2022-12-09 20:59:31 +0100 <EvanR> please don't explain it
2022-12-09 20:59:32 +0100 <huskle> isnt there some great new haskell to be getting on with?
2022-12-09 20:59:49 +0100 <huskle> EvanR: or to be discouraged from explaining it!
2022-12-09 20:59:59 +0100 <EvanR> ghc 9.2.5 here, not new but newer than what I had last week
2022-12-09 21:00:25 +0100 <huskle> i thought that it didnt do anything new at all infact
2022-12-09 21:00:47 +0100o-90(~o-90@gateway/tor-sasl/o-90)
2022-12-09 21:01:02 +0100 <monochrom> We could debate again on whether GHC2022 would be a good idea...
2022-12-09 21:01:28 +0100 <monochrom> Or rather, GHC2023.
2022-12-09 21:01:39 +0100 <huskle> this is too far ahead thinking
2022-12-09 21:02:01 +0100 <huskle> my recent updates prevent me from thinking further ahead than the next meal
2022-12-09 21:02:07 +0100 <monochrom> https://discourse.haskell.org/t/quo-vadit-ghc2023/5220 I'm actually surprised that some people say no.
2022-12-09 21:02:21 +0100jargon(~jargon@174-22-192-24.phnx.qwest.net)
2022-12-09 21:02:38 +0100 <EvanR> GHC Oh 23
2022-12-09 21:02:56 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
2022-12-09 21:03:15 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2022-12-09 21:03:22 +0100 <monochrom> Or rather, I'm surprised some people say yes to GHC2021 and then no to GHC2023.
2022-12-09 21:04:14 +0100 <EvanR> are the proposals accelerating in frequency like zeno's paradox, and we are approaching a limiting ghc
2022-12-09 21:04:32 +0100 <huskle> just because im not getting bugs at the frequency i used too..
2022-12-09 21:04:37 +0100 <monochrom> No I think it will be more or less periodic not zeno-converging.
2022-12-09 21:04:57 +0100 <EvanR> no singularity for monochrom
2022-12-09 21:05:05 +0100029AAI9YL(~Thunderbi@179.214.113.107)
2022-12-09 21:05:10 +0100 <huskle> i mean, if we were serious about that i could trying to dig up that code error that near killed me
2022-12-09 21:05:17 +0100kenran(~user@user/kenran)
2022-12-09 21:05:17 +0100 <monochrom> Hell, it may even slow down. There are only so many extensions to add.
2022-12-09 21:05:35 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-12-09 21:05:35 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 264 seconds)
2022-12-09 21:05:55 +0100 <huskle> one thing i think the haskell community could do better at is to do with this "no creative input" paradox
2022-12-09 21:05:59 +0100 <monochrom> Ugh did the code error cause harmful radiation on you so that it really warrants "nearly killed me"?
2022-12-09 21:06:07 +0100 <huskle> yes
2022-12-09 21:06:10 +0100 <dsal> ghc -O23
2022-12-09 21:06:17 +0100 <huskle> i ended up in hospital
2022-12-09 21:06:28 +0100 <EvanR> there's more radiation in the hospital than outside
2022-12-09 21:06:43 +0100 <huskle> and since having been discharged still have not been able to access any GP care to get my prescription
2022-12-09 21:06:49 +0100 <monochrom> What is "no creative input"?
2022-12-09 21:07:00 +0100 <huskle> its to do with "well its your idea, so..."
2022-12-09 21:07:11 +0100 <monochrom> Wait, am I observationally equivalent to Elizer? >:)
2022-12-09 21:07:34 +0100 <huskle> EvanR: this is true, we documented / developed much of it during my stay
2022-12-09 21:07:49 +0100029AAI9YL(~Thunderbi@179.214.113.107) (Remote host closed the connection)
2022-12-09 21:07:49 +0100 <huskle> as im sure you can all appreciate given how we have been working here
2022-12-09 21:08:07 +0100 <huskle> at least haskell isnt as political as the NHS
2022-12-09 21:08:20 +0100 <huskle> or the compiler errors would be, like *even worse*
2022-12-09 21:08:30 +0100 <EvanR> huskle, what is the solution of this equation: x = x + 1
2022-12-09 21:08:38 +0100 <darkling> Inject 'em with technetium, and PET them in the dark... :)
2022-12-09 21:09:00 +0100 <huskle> EvanR: im not sure why you would ask this. im not thankful for the interjection unfortunately
2022-12-09 21:09:14 +0100mvk(~mvk@2607:fea8:5ce3:8500::efb)
2022-12-09 21:09:23 +0100 <mauke> Infinity, -Infinity, NaN, undefined
2022-12-09 21:09:24 +0100 <EvanR> is that all you got
2022-12-09 21:09:29 +0100mvk(~mvk@2607:fea8:5ce3:8500::efb) (Client Quit)
2022-12-09 21:09:40 +0100 <EvanR> mauke confirmed not a bot
2022-12-09 21:09:50 +0100 <monochrom> I still don't understand the ""no creative input" paradox"
2022-12-09 21:09:54 +0100 <huskle> what is this, twitter?
2022-12-09 21:10:14 +0100 <mauke> sorry for interrupting your blog
2022-12-09 21:10:25 +0100 <huskle> good
2022-12-09 21:10:30 +0100 <huskle> monochrom: its kind of an extreem version of "no spoonfeeding" its to do with strange loops
2022-12-09 21:10:56 +0100 <monochrom> Well I stand firming with no spoonfeeding.
2022-12-09 21:11:05 +0100 <monochrom> err, s/firming/firmly/
2022-12-09 21:11:06 +0100 <huskle> makes my life a living hell, other than when people go to great lengths to augment it with things barely recoverable from in terms of space technology
2022-12-09 21:11:15 +0100 <EvanR> no spoon affirming
2022-12-09 21:11:20 +0100 <monochrom> At least, when I'm not getting paid to do spoonfeeding.
2022-12-09 21:11:37 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-09 21:11:49 +0100 <huskle> monochrom: the thing is, while its important that the people that end up fixing issues actually manage to do so, and often therefore cannot get the help they need
2022-12-09 21:12:02 +0100 <monochrom> Hell, even when I'm paid to teach a university course, I have an "I won't do spoonfeeding" course policy stated explicitly.
2022-12-09 21:12:15 +0100 <monochrom> Then again that's just because it's a university course.
2022-12-09 21:12:15 +0100 <huskle> something something i forget but ill just get old and die and nobody will understand or care because they will just rewrite history
2022-12-09 21:12:28 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 21:12:32 +0100 <EvanR> spoonfeeding costs extra. 3rd party tutoring
2022-12-09 21:13:08 +0100 <monochrom> Yeah I'm open to getting paid 10 times more for spoonfeeding.
2022-12-09 21:13:13 +0100 <huskle> well i guess if your from an education background you might value the learning outcomes more than the other outcomes which might be important also
2022-12-09 21:13:20 +0100euandreh(~Thunderbi@179.214.113.107)
2022-12-09 21:13:24 +0100 <huskle> monochrom: you get paid, lets just leave it at that
2022-12-09 21:13:45 +0100 <monochrom> No I'm from a self-interest background I value getting paid for how much I do.
2022-12-09 21:13:59 +0100 <huskle> thats like some krishna thing
2022-12-09 21:14:00 +0100 <mauke> no, I actually do care about how much I'm paid
2022-12-09 21:14:02 +0100 <huskle> im dead against that
2022-12-09 21:14:07 +0100 <huskle> its a form of transactionalism
2022-12-09 21:14:10 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-09 21:14:18 +0100 <huskle> its a result of the synchroniser being in the hands of liberals
2022-12-09 21:14:21 +0100 <monochrom> On IRC I don't get paid, I get to say "that's your job" much more often.
2022-12-09 21:14:41 +0100 <huskle> thanks for that...
2022-12-09 21:15:10 +0100 <monochrom> When a certain discussion interests me, I am happy to do more.
2022-12-09 21:15:16 +0100 <EvanR> huskle, how about that haskell
2022-12-09 21:15:18 +0100 <monochrom> But when not, why should I.
2022-12-09 21:15:21 +0100 <huskle> anyway, in terms of being "forward looking" or "having a say in the future of social credit systems"...
2022-12-09 21:15:50 +0100 <EvanR> lets see your advent of code solutions
2022-12-09 21:15:57 +0100 <huskle> EvanR: well sure, i guess with something as important as a far forwards vantage point central in the development of computing logic on which most of reality is based...
2022-12-09 21:16:16 +0100 <huskle> EvanR: i wrote the orignal turing machine, i think im does proving myself to the comunity.
2022-12-09 21:16:23 +0100o-90(~o-90@gateway/tor-sasl/o-90) (Ping timeout: 255 seconds)
2022-12-09 21:16:39 +0100 <huskle> though in terms of getting my mind off of this friday night business..
2022-12-09 21:16:43 +0100 <huskle> link?
2022-12-09 21:16:47 +0100 <EvanR> after 2 straight days of nonsense on dwarf fortress steam discussions, this is annoying
2022-12-09 21:17:07 +0100 <monochrom> Wait, I thought I supervised Turing on writing the original Turing machine...
2022-12-09 21:17:07 +0100 <huskle> okok, chill
2022-12-09 21:17:18 +0100 <huskle> youd have thought so, but he was gay, so...
2022-12-09 21:17:37 +0100 <huskle> idk, ask tolkien
2022-12-09 21:17:42 +0100 <mauke> is this just outright trolling now?
2022-12-09 21:17:46 +0100 <huskle> he is my go to on all things category theory
2022-12-09 21:17:51 +0100 <huskle> mauke: i see what you did there
2022-12-09 21:18:02 +0100 <monochrom> OK sorry I was trolling! I'll stop.
2022-12-09 21:18:15 +0100 <huskle> you werent trolling, he was!
2022-12-09 21:19:00 +0100 <huskle> right, anyway, "supervising" at least this is comprehensably part of the discussion
2022-12-09 21:19:17 +0100 <huskle> iits to do with this "hands off" approach and the difficulty of colaberation
2022-12-09 21:19:27 +0100 <mauke> what discussion?
2022-12-09 21:20:29 +0100 <huskle> basically, i dont want to have to pluck ideas from my students heads just to get answers to questions my supervisors cant help with because they have already seen the answers - and dont have access to an energy minimisation shceme that could derive the creative input itself
2022-12-09 21:20:33 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-12-09 21:20:41 +0100 <monochrom> No, #haskell doesn't have a "no creative input" paradox. Instead, you millenials need to drop your entitlement attitude.
2022-12-09 21:20:54 +0100 <huskle> not this again...
2022-12-09 21:21:04 +0100 <mauke> heh
2022-12-09 21:21:20 +0100 <huskle> and then the mod doesnt explain what they mean, and we have to buy out twitter to make a metacomentary on class nepotism and bullying
2022-12-09 21:21:25 +0100 <monochrom> Damn right not this again. If you drop this topic, I will drop this topic.
2022-12-09 21:22:22 +0100 <huskle> sorry, what? if i drop the issue of "the complexity of time in the supervisation process" you will stop claiming that "this is me being *entitled* to mechanistically derived creative input" ... yeah, that kind of makes sense i guess
2022-12-09 21:22:44 +0100 <huskle> point is, i dont have students from which i can get answers!
2022-12-09 21:23:05 +0100 <huskle> so we are all kind of stuck wondering why the next big GHC extension is taking so long
2022-12-09 21:23:24 +0100 <geekosaur> ?
2022-12-09 21:23:33 +0100 <huskle> ^this
2022-12-09 21:23:35 +0100 <geekosaur> on second thought I don't think I want to know
2022-12-09 21:23:40 +0100 <huskle> its "informationless"
2022-12-09 21:24:06 +0100 <huskle> "no creative input"... its a "box" thing as far as i can tell
2022-12-09 21:24:09 +0100 <monochrom> Wow I thought I was the only one in town who play the "informationless" card.
2022-12-09 21:24:46 +0100 <huskle> probably common to those forwards nodes in the distributed knowledge generation framework
2022-12-09 21:25:00 +0100 <mauke> 4 informationless corners in one card
2022-12-09 21:25:30 +0100 <huskle> "yes, but then you would think .... "
2022-12-09 21:25:30 +0100 <EvanR> 4 simultaneous corners sun up sun down midday midnight
2022-12-09 21:26:38 +0100 <EvanR> time is not linear, it's cubic
2022-12-09 21:26:47 +0100 <huskle> idk, i kind of assumed that after whatever great advances we were supposed to be presiding over that were so critical for time, that we would be let off the hook and their would be a grand scale societal reconfiguration to reflect the passing of the singularity or whatever
2022-12-09 21:26:50 +0100 <monochrom> Change of subject: Do booleans exist in the untyped lambda calculus? >:)
2022-12-09 21:26:52 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-09 21:27:08 +0100 <EvanR> since booleans are a type, no
2022-12-09 21:27:16 +0100 <huskle> aka "we can still censor you"
2022-12-09 21:27:27 +0100 <monochrom> Ah, right. I need to improve my question.
2022-12-09 21:27:40 +0100 <geekosaur> you can encode them in a number of ways, so yes
2022-12-09 21:27:42 +0100 <monochrom> Do the two boolean values exist in the untyped lambda calculus?
2022-12-09 21:27:53 +0100 <EvanR> "the" two boolean values xD
2022-12-09 21:28:08 +0100 <mauke> yes, true and bottom
2022-12-09 21:28:08 +0100 <monochrom> Right, so the issue is "do encodings count?"
2022-12-09 21:28:17 +0100 <huskle> fine speak among yourselves, iv said my bit
2022-12-09 21:28:33 +0100 <geekosaur> and I question its semantic content
2022-12-09 21:28:58 +0100 <mauke> monochrom: obviously, I'd first ask you to define "the two boolean values"
2022-12-09 21:29:07 +0100 <EvanR> can I derail further by asking what existence means
2022-12-09 21:29:08 +0100 <monochrom> :)
2022-12-09 21:29:15 +0100 <monochrom> :) :)
2022-12-09 21:29:45 +0100 <EvanR> I feel like I may have run out of IRC fuel but huskle
2022-12-09 21:29:54 +0100 <huskle> i was building a house of cards with a bunch of my profs, and they were like "did you know you can smash it down really easily"
2022-12-09 21:29:56 +0100 <EvanR> I guess YMMV
2022-12-09 21:30:30 +0100 <huskle> and i was like "yes you showed me that before" and they were like "but we cant help you build it, and i quite lake smashing it down"
2022-12-09 21:30:53 +0100 <huskle> and i was like "but my life is dwindled already"
2022-12-09 21:30:54 +0100 <monochrom> Are you done?
2022-12-09 21:31:27 +0100 <EvanR> also from a structural or process metaphysics point of view, it's easy to question the idea of "boolean values" in isolation
2022-12-09 21:31:30 +0100 <mauke> more like megabit
2022-12-09 21:31:43 +0100 <huskle> and they were like "smashy smashy, we can escalate this etc" and i was like "but can you not" and they were like "idk, iv never known anything except to abuse my power"
2022-12-09 21:31:55 +0100 <EvanR> the encoding that lets you case analyze is more identifiable
2022-12-09 21:32:02 +0100 <mauke> @where ops
2022-12-09 21:32:03 +0100 <lambdabot> byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw mniip monochrom quicksilver shachaf shapr ski
2022-12-09 21:32:05 +0100ChanServ+o geekosaur
2022-12-09 21:32:08 +0100 <mauke> ah
2022-12-09 21:32:09 +0100 <huskle> threats
2022-12-09 21:32:14 +0100 <huskle> violence
2022-12-09 21:32:16 +0100 <huskle> bad mods
2022-12-09 21:32:16 +0100 <EvanR> ok monochrom is still an op, ok
2022-12-09 21:32:25 +0100geekosaur+b *!*@250.79-105-213.static.virginmediabusiness.co.uk
2022-12-09 21:32:25 +0100husklegeekosaur (huskle)
2022-12-09 21:33:02 +0100 <shapr> thank you geekosaur
2022-12-09 21:33:27 +0100 <geekosaur> been sitting on that for a bit, they're annoying at best
2022-12-09 21:33:57 +0100 <geekosaur> it's timed, they get 15m
2022-12-09 21:34:33 +0100 <geekosaur> but with that last I may just permaban, they seem to think it's their right to just take over someone else's channel
2022-12-09 21:34:44 +0100 <dminuoso> mauke: No you couldnt
2022-12-09 21:34:52 +0100 <dminuoso> mauke: Or rather, it would require cooperation on your part.
2022-12-09 21:35:22 +0100 <monochrom> haha
2022-12-09 21:36:51 +0100 <dminuoso> mauke: the thing is, any time you save in trie based decoding, you would probably pay for in constructing that trie at runtime.
2022-12-09 21:37:32 +0100 <EvanR> you can't memoize it?
2022-12-09 21:37:45 +0100 <dminuoso> Sure, but that goes deeper into cooperation territory
2022-12-09 21:38:12 +0100 <EvanR> cooperation sounds good, maybe you wanna call it collusion xD
2022-12-09 21:38:27 +0100 <dminuoso> By that I mean you have to consciously help with memoization
2022-12-09 21:38:55 +0100 <EvanR> if parties are allowed to collude on performance, the performance goes through the roof
2022-12-09 21:38:57 +0100 <dminuoso> So something like the naive `asum [Foo <$ string "foo", Foobar <$ string "foobar", Fooquux <$ string ]
2022-12-09 21:39:04 +0100 <dminuoso> So something like the naive `asum [Foo <$ string "foo", Foobar <$ string "foobar", Fooquux <$ string "fooquux" ] wouldnt work
2022-12-09 21:39:17 +0100 <dminuoso> And as it stands right now, this type of megaparsec code will punish you twice.
2022-12-09 21:39:42 +0100 <dminuoso> First in terms of compilation (if that list approaches 64 in some combinations of code, you will experience expoentially raising compilation time right up until 10min or so)
2022-12-09 21:39:48 +0100 <dminuoso> and then you will suffer from poor backtracking
2022-12-09 21:39:57 +0100 <monochrom> :(
2022-12-09 21:41:37 +0100 <EvanR> I'm still at the last bus stop where we are using megaparsec and worrying about performance
2022-12-09 21:41:48 +0100 <EvanR> in absolute terms
2022-12-09 21:42:03 +0100 <dminuoso> I just named megaparsec because I know the compilation time to degrade that poorly in that particular case
2022-12-09 21:42:10 +0100 <dminuoso> attoparsec probably has similar problems
2022-12-09 21:42:38 +0100 <dminuoso> its just a result of the library attaching INLINE to pretty much every declaration, and then having very deep binding trees.
2022-12-09 21:42:55 +0100 <dminuoso> (so each time you use a variable, you will drag insane amounts of code that the simplifier has to deal with)
2022-12-09 21:43:22 +0100 <dminuoso> flatparse has inline everywhere too, but the definitions are extremely shallow
2022-12-09 21:43:44 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-09 21:44:30 +0100motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2022-12-09 21:46:05 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-12-09 21:46:37 +0100 <mauke> what was the paper or article that did parser combinators without explicit backtracking?
2022-12-09 21:47:07 +0100 <mauke> I can't remember the author or title :-(
2022-12-09 21:47:37 +0100ChanServ+o litharge
2022-12-09 21:47:37 +0100litharge-bo *!*@250.79-105-213.static.virginmediabusiness.co.uk litharge
2022-12-09 21:48:55 +0100 <mauke> I think it went along the lines of data Parser a = Succeed a | Consume (Char -> Parser a) | Fail String
2022-12-09 21:49:27 +0100 <EvanR> should work
2022-12-09 21:49:29 +0100 <mauke> or possibly a list of successes
2022-12-09 21:49:34 +0100 <dminuoso> mauke: `scanner` looks like that.
2022-12-09 21:50:03 +0100 <[exa]> mauke: how much are lists an explicit backtracking?
2022-12-09 21:50:36 +0100 <mauke> and then Consume f <|> Consume g = Consume (\c -> f c <|> g c)
2022-12-09 21:51:30 +0100 <dminuoso> Backtracking is an interesting topic, since I spend a lot of thoughts on how to deal with stateful parsing in flatparse.
2022-12-09 21:51:50 +0100 <dminuoso> Right now we keep an Int# worth of state around, but thats not enough for parsing whitespace sensitive languages with reasonable inputs
2022-12-09 21:51:52 +0100 <mauke> dminuoso: scanner doesn't seem to have a <|>
2022-12-09 21:52:45 +0100 <dminuoso> In flatparse backtracking is very cheap since all other state we have is just a pointer offset in the bytestring buffer, its essentially cost-free
2022-12-09 21:53:34 +0100 <dminuoso> One thought I had was that you can just use IORef for all state you want, but then you must decouple state mutation from backtracking regions (which is how things like Happy or Bison work anyway)
2022-12-09 21:53:48 +0100 <dminuoso> because in happy the backtracking happens in the BNF syntax, not in the monadic actions
2022-12-09 21:53:49 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f) (Remote host closed the connection)
2022-12-09 21:56:39 +0100 <dminuoso> do we have a haskell aoc channel on libera?
2022-12-09 21:57:14 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-09 21:58:14 +0100festive_kurbus(~festive_k@user/kurbus)
2022-12-09 21:58:51 +0100 <geekosaur> doesn't seem like it
2022-12-09 21:59:01 +0100festive_kurbus(~festive_k@user/kurbus) (Client Quit)
2022-12-09 22:00:27 +0100 <EvanR> haskell is cheating, we shouldn't encourage it
2022-12-09 22:03:34 +0100 <EvanR> though sometimes I think anti-haskell details are included in the puzzle, like today involves the subject of a head and a tail, which are almost language keywords, messing up your variable names
2022-12-09 22:04:12 +0100 <dminuoso> Im just randomly poking at day 5 now.
2022-12-09 22:04:13 +0100 <dminuoso> Think I need repa.
2022-12-09 22:04:20 +0100 <EvanR> lol
2022-12-09 22:05:12 +0100 <mauke> I went with STArray
2022-12-09 22:09:09 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-09 22:11:37 +0100 <glguy> dminuoso: people talk about aoc here, and then there's also the generic #adventofcode and #adventofcode-spoilers that happens to have a number of haskell solvers
2022-12-09 22:13:32 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-09 22:14:55 +0100Chai-T-Rex(~ChaiTRex@user/chaitrex) (Quit: Chai-T-Rex)
2022-12-09 22:15:29 +0100caef^(~caef@76.145.185.103) (Ping timeout: 260 seconds)
2022-12-09 22:16:42 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f)
2022-12-09 22:17:16 +0100jcowan(sid325434@2a03:5180:f:3::4:f73a)
2022-12-09 22:17:21 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-12-09 22:17:43 +0100pavonia(~user@user/siracusa)
2022-12-09 22:18:07 +0100 <jcowan> To what types (other than functions) would Eq be inapplicable?
2022-12-09 22:18:54 +0100califax(~califax@user/califx)
2022-12-09 22:19:04 +0100 <EvanR> real numbers
2022-12-09 22:20:29 +0100 <dminuoso> Float or Double if we were being honest.
2022-12-09 22:21:15 +0100zant2(~zant@62.214.20.26)
2022-12-09 22:21:19 +0100 <dminuoso> Because Reflexivity doesnt hold (since NaN /= NaN)
2022-12-09 22:21:35 +0100 <dminuoso> IO actions
2022-12-09 22:22:56 +0100phma(phma@2001:5b0:211b:de08:e3b4:8590:6dc5:da01) (Read error: Connection reset by peer)
2022-12-09 22:23:02 +0100 <dminuoso> jcowan: Though the Float/Double case might be a good example that it depends on the interpretation of the data.
2022-12-09 22:23:21 +0100 <dsal> Void has an Eq instance…
2022-12-09 22:23:27 +0100phma(~phma@host-67-44-208-53.hnremote.net)
2022-12-09 22:23:57 +0100 <dminuoso> dsal: Seems fine.
2022-12-09 22:24:10 +0100 <dolio> That ones' easy.
2022-12-09 22:24:48 +0100 <dsal> Oh weird. It's derived. I'd expect it to be `const True` or something.
2022-12-09 22:25:04 +0100 <dminuoso> It's bottom.
2022-12-09 22:25:10 +0100 <dminuoso> dsal: Consider that Void is inhabited by just bottom, which itself inhabits every other type, including say `Bool`
2022-12-09 22:25:42 +0100 <dminuoso> Ah but you're right
2022-12-09 22:25:44 +0100 <dsal> Yeah, it's the "you can't get there" part. But the implementation presumably would return True.
2022-12-09 22:25:45 +0100 <dminuoso> its const True
2022-12-09 22:25:50 +0100 <EvanR> anyway, another one is TuringMachine
2022-12-09 22:25:50 +0100 <dminuoso> % import Data.Void
2022-12-09 22:25:50 +0100 <yahb2> <no output>
2022-12-09 22:25:59 +0100 <dminuoso> % (undefined :: Void) == undefined
2022-12-09 22:25:59 +0100 <yahb2> True
2022-12-09 22:26:27 +0100thegeekinside(~thegeekin@189.217.82.244) (Remote host closed the connection)
2022-12-09 22:26:54 +0100 <dminuoso> I guess that follows from reflexitity and the fact that Void is inhabited by only one value
2022-12-09 22:28:43 +0100 <EvanR> (==) :: Void -> Void -> Bool; x == y impossible
2022-12-09 22:29:15 +0100 <EvanR> in another language maybe xD
2022-12-09 22:29:22 +0100 <dminuoso> Which begs an interesting question
2022-12-09 22:29:27 +0100 <dminuoso> % () == undefined
2022-12-09 22:29:27 +0100 <yahb2> *** Exception: Prelude.undefined ; CallStack (from HasCallStack): ; error, called at libraries/base/GHC/Err.hs:74:14 in base:GHC.Err ; undefined, called at <interactive>:66:7 in interactive:Ghci13
2022-12-09 22:29:39 +0100 <dminuoso> Mmm. Shouldnt this return True?
2022-12-09 22:29:56 +0100 <dminuoso> Or uh. I guess this is right after all
2022-12-09 22:29:59 +0100 <EvanR> handling bottoms can be tricky
2022-12-09 22:32:55 +0100 <dsal> Oh, so Void is inhabited by one value, but you can't get to it, so it's *effectively* no values.
2022-12-09 22:33:23 +0100 <dminuoso> No it has one value.
2022-12-09 22:33:31 +0100 <mniip> what's a value anyway
2022-12-09 22:33:32 +0100 <dminuoso> So any comparison could ever be with itself
2022-12-09 22:33:46 +0100 <dminuoso> And by law of refl that must compare to True
2022-12-09 22:34:09 +0100 <EvanR> > [minBound .. maxBound] :: [Void]
2022-12-09 22:34:10 +0100 <lambdabot> error:
2022-12-09 22:34:10 +0100 <lambdabot> • No instance for (Enum Void)
2022-12-09 22:34:11 +0100 <lambdabot> arising from the arithmetic sequence ‘minBound .. maxBound’
2022-12-09 22:34:13 +0100 <dminuoso> It's cunning, really
2022-12-09 22:34:53 +0100 <dminuoso> EvanR: Heh! `fromEnum undefined = 0`?
2022-12-09 22:34:55 +0100 <EvanR> back to the bool in untyped lambda calculus, it depends on what you're going to do with it
2022-12-09 22:35:03 +0100 <dminuoso> Or whats the expected behavior :D
2022-12-09 22:35:13 +0100 <dminuoso> Other than that, I think its fine
2022-12-09 22:35:13 +0100 <EvanR> if you never used bottom, Void is what it says on the tin
2022-12-09 22:35:18 +0100 <dminuoso> succ undefined = undefined; pred undefined = undefined
2022-12-09 22:35:27 +0100 <dminuoso> Can even to `toEnum _ = undefined`
2022-12-09 22:35:31 +0100 <jcowan> there should perhaps be a compiler option to treat NaN as bottom, which would be much better alignment with theory
2022-12-09 22:35:55 +0100 <EvanR> whiney NaN
2022-12-09 22:35:55 +0100 <dminuoso> jcowan: Float/Double are IEEE 754 primitives.
2022-12-09 22:36:03 +0100 <dminuoso> jcowan: As such the equality respects IEE 754
2022-12-09 22:36:09 +0100 <jcowan> I understand
2022-12-09 22:36:17 +0100 <dminuoso> Treating NaN as bottom would be horrid.
2022-12-09 22:36:31 +0100 <dminuoso> What *would* be useful would an option to have IEEE 754 traps
2022-12-09 22:36:33 +0100 <EvanR> if you ever compute a NaN ghc deletes your code
2022-12-09 22:36:47 +0100 <dminuoso> jcowan: So that would kind of fall into that idea
2022-12-09 22:37:56 +0100 <jcowan> In typical fp code, (quiet) NaN is sticky: whatever you do to NaN it remains NaN. This is very much how bottom works (or "works")
2022-12-09 22:38:21 +0100 <dminuoso> NaN can be compared to NaN
2022-12-09 22:38:23 +0100 <darkling> Ah, no, you don't want NaNs, you want Nullity!
2022-12-09 22:38:28 +0100codaraxis___(~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
2022-12-09 22:38:30 +0100 <dminuoso> That is one mighty difference
2022-12-09 22:38:36 +0100 <dminuoso> Ah but hold on
2022-12-09 22:38:45 +0100 <dminuoso> As we have established `undefined :: Void == undefined` earlier
2022-12-09 22:38:45 +0100 <dsal> Void has one value because we can't have zero values, but it's "A logically uninhabited data type, used to indicate that a given term should not exist."
2022-12-09 22:38:47 +0100 <dminuoso> Hah!
2022-12-09 22:39:00 +0100 <dminuoso> (But that only works because of Void, so ignore that)
2022-12-09 22:39:11 +0100 <dsal> The smart constructor for Void is absurd.
2022-12-09 22:39:30 +0100 <c_wraith> no, that's the destructor
2022-12-09 22:39:40 +0100 <jcowan> Nan == NaN is false because in an eager world it has to be something, but it should really return NaB (not a boolean)
2022-12-09 22:39:43 +0100 <EvanR> if you want to stop anyone from observing a difference, make bottom or NaN freeze the computer. If you're have discpline you can get the same effect by just not observing a difference, and it's more flexible
2022-12-09 22:40:01 +0100 <dsal> c_wraith: Oh yeah, I see.
2022-12-09 22:40:08 +0100 <dminuoso> jcowan: No, it is false because whether two unknown values are the same.
2022-12-09 22:40:09 +0100 <mniip> data Double = D1 | D1_0000000000000002 | D1_0000000000000004 | ...
2022-12-09 22:40:14 +0100 <dminuoso> jcowan: its similar to how SQL NULL /= NULL
2022-12-09 22:40:24 +0100 <dminuoso> (or rather, neither holds)
2022-12-09 22:40:31 +0100 <dminuoso> they are neither equal nor not-equal
2022-12-09 22:40:55 +0100 <dminuoso> AH I missed a portion. It is unknown whether two unknown values are the same or not.
2022-12-09 22:41:33 +0100 <jcowan> Exactly, hence in SQL, NULL = NULL is NULL
2022-12-09 22:42:04 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-09 22:42:08 +0100 <jcowan> so NaN == NaN should return a null that is typed boolean.
2022-12-09 22:42:37 +0100 <EvanR> Bool = True | False | Null | FileNotFound
2022-12-09 22:42:45 +0100jcowangiggles
2022-12-09 22:43:07 +0100 <darkling> Equal there is or not equal. There is no lattice.
2022-12-09 22:43:45 +0100jcowanlols outright, possibly scaring the pigeons
2022-12-09 22:44:09 +0100 <jcowan> Except in Ireland, where the rule is "Lattice alone".
2022-12-09 22:44:18 +0100 <dminuoso> Mmm
2022-12-09 22:44:31 +0100 <dminuoso> % (0/0) /= (0/0)
2022-12-09 22:44:31 +0100 <yahb2> True
2022-12-09 22:44:35 +0100 <dminuoso> That seems wrong, no?
2022-12-09 22:44:46 +0100 <dminuoso> Shoudlnt IEEE 754 demand this operation return False?
2022-12-09 22:45:14 +0100 <jcowan> The /= operation isn't primitive; it is the negation of ==.
2022-12-09 22:45:43 +0100 <EvanR> haskell is lazy, it will wait for the actual demand for that operation to yield the right answer
2022-12-09 22:46:24 +0100 <dminuoso> jcowan: that seems irrelevant
2022-12-09 22:46:29 +0100 <jcowan> You can model floats as intervals (although float arithmetic is not interval arithmetic). In that model, NaN is the union of the empty interval and the universal interval.
2022-12-09 22:46:40 +0100 <dminuoso> Its a method of Eq
2022-12-09 22:46:42 +0100 <dminuoso> As such you can override it.
2022-12-09 22:46:45 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-12-09 22:46:52 +0100 <dminuoso> And its not less primitive than (==) too
2022-12-09 22:46:55 +0100 <jcowan> I was talking about IEEE
2022-12-09 22:46:58 +0100 <dminuoso> {-# MINIMAL (==) | (/=) #-}
2022-12-09 22:47:15 +0100 <dsal> https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Eq.html#t:Eq
2022-12-09 22:47:33 +0100 <EvanR> jcowan, that doesn't explain why NaN /= NaN
2022-12-09 22:47:34 +0100 <dsal> You can have things that are neither equal nor not equal.
2022-12-09 22:47:59 +0100 <EvanR> er, doesn't ==
2022-12-09 22:48:25 +0100 <dminuoso> Let me dig into the stndard
2022-12-09 22:49:21 +0100 <dminuoso> `Four mutually exclusive relations are possible: less than, equal, greater than, and unordered. The last case arises when at least one operand is NaN. Every NaN shall compare unordered with everything, including itself`
2022-12-09 22:49:57 +0100 <dminuoso> I suppose that seems faithful then, since `NaN /= NaN` does neither indicate less than, equal or greater than
2022-12-09 22:49:58 +0100 <jcowan> EvanR: In IEEE, /= is defined as "not ==", whereas the definition of = is by fiat
2022-12-09 22:50:32 +0100 <dminuoso> ` In contrast, the logical negation of (X = Y) might be written as either NOT(X = Y) or (X ?<> Y); in this case both expressions are functionally equivalent to (X ≠ Y).`
2022-12-09 22:50:35 +0100 <EvanR> I'm saying if NaN is supposed to be a universal interval, it would equal itself
2022-12-09 22:50:42 +0100 <dsal> > sort [nan, nan]
2022-12-09 22:50:43 +0100 <lambdabot> [NaN,NaN]
2022-12-09 22:50:58 +0100 <dsal> > sort [3, nan, 2, nan, 1]
2022-12-09 22:50:59 +0100 <lambdabot> [1.0,NaN,2.0,NaN,3.0]
2022-12-09 22:51:04 +0100 <dsal> neat
2022-12-09 22:51:08 +0100 <dminuoso> EvanR: There's a very good answer from someone who was on the 754 committee on SO that goes a bit into the details why https://stackoverflow.com/a/1573715/6636995
2022-12-09 22:52:19 +0100 <dminuoso> mauke: I guess you have two STUArrays right? One with the 2-dimensional array, and one with offsets for each stack?
2022-12-09 22:52:35 +0100 <EvanR> > 1/0 == 1/0
2022-12-09 22:52:35 +0100 <dminuoso> though mmm
2022-12-09 22:52:36 +0100 <lambdabot> True
2022-12-09 22:53:06 +0100 <EvanR> dminuoso, reading the last bit sounds like == and NaN is basically historical accident
2022-12-09 22:53:22 +0100 <dminuoso> Not necessarily accident
2022-12-09 22:54:13 +0100 <EvanR> a sort of calculated corner cutting
2022-12-09 22:54:23 +0100 <dminuoso> EvanR: Did you read his Kahan quotes?
2022-12-09 22:54:30 +0100 <dminuoso> (or paraphrasing)
2022-12-09 22:55:21 +0100 <EvanR> "missing isnan()"
2022-12-09 22:55:34 +0100 <EvanR> I mean come on
2022-12-09 22:55:53 +0100 <dminuoso> That was nearly 40 years ago.
2022-12-09 22:56:12 +0100 <EvanR> 40 years ago keeps getting more modern
2022-12-09 22:56:13 +0100 <dminuoso> THere's also the hardware implementation argument
2022-12-09 22:56:32 +0100 <EvanR> 40 years ago was super mario bros on NES xD
2022-12-09 22:56:44 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
2022-12-09 22:56:44 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-09 22:58:39 +0100 <money> Yeahhhh
2022-12-09 22:58:42 +0100 <money> What no was
2022-12-09 22:58:44 +0100 <money> Way
2022-12-09 23:00:18 +0100 <jcowan> IEEE 754 eliminated the chaos and confusion of earlier FPPs, and that is worth any number of cut corners to a numerical programmer, by all reports (I'm not one)
2022-12-09 23:00:20 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-09 23:01:16 +0100 <jcowan> Anyway, I'm glad to know about the pragmatic argument, even if it is long obsolete
2022-12-09 23:02:44 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-12-09 23:02:58 +0100tomokojun(~tomokojun@37.19.221.173)
2022-12-09 23:08:26 +0100jpds2(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
2022-12-09 23:08:42 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-12-09 23:08:59 +0100darkstardevx(~darkstard@50.53.3.186) (Remote host closed the connection)
2022-12-09 23:09:00 +0100RedSwan(~jared@174-23-134-43.slkc.qwest.net)
2022-12-09 23:09:21 +0100 <RedSwan> Hello World!
2022-12-09 23:09:33 +0100darkstardevx(~darkstard@50.53.3.186)
2022-12-09 23:09:45 +0100 <geekosaur> hm
2022-12-09 23:09:49 +0100geekosaur-o geekosaur
2022-12-09 23:21:55 +0100michalz(~michalz@185.246.204.72) (Remote host closed the connection)
2022-12-09 23:23:05 +0100RedSwan(~jared@174-23-134-43.slkc.qwest.net) (Remote host closed the connection)
2022-12-09 23:24:33 +0100jpds2(~jpds@gateway/tor-sasl/jpds)
2022-12-09 23:25:14 +0100 <mauke> dminuoso: no, just a single mutable array of lists
2022-12-09 23:26:42 +0100RedSwan(~jared@174-23-134-43.slkc.qwest.net)
2022-12-09 23:29:44 +0100ddellacosta(~ddellacos@143.244.47.100)
2022-12-09 23:31:51 +0100jcowan(sid325434@2a03:5180:f:3::4:f73a) ()
2022-12-09 23:37:58 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-09 23:37:58 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-09 23:37:58 +0100wroathe(~wroathe@user/wroathe)
2022-12-09 23:39:17 +0100bilegeek(~bilegeek@2600:1008:b081:6315:4a6c:8d52:e369:5a2e)
2022-12-09 23:42:36 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-12-09 23:43:17 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-09 23:43:53 +0100merijn(~merijn@86.86.29.250)
2022-12-09 23:45:29 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-12-09 23:47:31 +0100 <EvanR> mauke, did you have like 9 lists. Seems like an immutable update(s) would be enough?
2022-12-09 23:48:12 +0100 <EvanR> based on nothing admittedly
2022-12-09 23:53:22 +0100mncheck(~mncheck@193.224.205.254) (Ping timeout: 256 seconds)
2022-12-09 23:55:21 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f) (Remote host closed the connection)
2022-12-09 23:57:17 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f)
2022-12-09 23:57:56 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2022-12-09 23:58:45 +0100 <mauke> EvanR: I wrote my first version in perl, so I reused the basic approach
2022-12-09 23:58:50 +0100codaraxis(~codaraxis@user/codaraxis)
2022-12-09 23:58:59 +0100 <mauke> also, I'd never used STArray before, so I wanted to play around with it
2022-12-09 23:59:04 +0100 <EvanR> ah yeah
2022-12-09 23:59:15 +0100 <EvanR> translating an existing algorithm
2022-12-09 23:59:26 +0100 <EvanR> yes haskell can do that!