Logs on 2022-08-07 (liberachat/#haskell)
| 00:00:32 | <erisco> | but today I don't think their role is as noticed |
| 00:00:59 | <erisco> | you might as well teach AWS in place of Unix |
| 00:01:24 | <qrpnxz> | aws runs on linux, so still relevant |
| 00:01:39 | → | dcoutts__ joins (~duncan@host86-150-18-57.range86-150.btcentralplus.com) |
| 00:01:43 | <qrpnxz> | just because you don't own the machine doesn't mean the os disapeared |
| 00:02:04 | <geekosaur> | and you can't run aws on your desktop |
| 00:02:21 | → | merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) |
| 00:02:35 | <geekosaur> | or your laptop |
| 00:02:42 | <qrpnxz> | indeed lol |
| 00:02:46 | <erisco> | AWS is full of serverless, uh, services... which is what I am more so referring to |
| 00:03:43 | <geekosaur> | and you can just ignore all the rest? |
| 00:03:48 | <erisco> | yes |
| 00:03:52 | <geekosaur> | no |
| 00:04:09 | <monochrom> | See, this is why when I say "ideology" it's a derogatory term. |
| 00:04:12 | <erisco> | well, you can, you don't need to know anything about unix or any OS to use aws |
| 00:04:22 | × | dcoutts_ quits (~duncan@host86-153-247-178.range86-153.btcentralplus.com) (Ping timeout: 268 seconds) |
| 00:04:26 | <monochrom> | Ideology blinds you of reality or even plain reason. |
| 00:04:29 | <geekosaur> | you still can't run aws on your lapto[ |
| 00:05:39 | <erisco> | my point is that there are other specialised environments in which you can build and execute programs, and you could be just as focused on one of those and not unix |
| 00:06:00 | <qrpnxz> | erisco: but most of your coding still happen on your computer because aws is expensive and not set up as a programming IDE. The ideal in fact is if your desktop is running what aws is running as closely as possible, which would mean running linux lol |
| 00:06:08 | <geekosaur> | show me the laptop running aws and I might concede your point. until then it's irrelevant |
| 00:06:30 | <geekosaur> | mostly because of what qrpnxz just said |
| 00:06:31 | <erisco> | I don't really understand what my laptop has to do with it |
| 00:06:41 | <erisco> | I don't need to know unix to know how to use my laptop, even if it is running unix |
| 00:06:50 | <monochrom> | Pretty sure Amazon wants to keep their AWS implementation a secret and not let your computer run it. :) |
| 00:07:37 | <erisco> | I think I can get by without knowing about PCBs or scheduling or CPU rings |
| 00:07:38 | <qrpnxz> | programming for a computer you don't have is like programming without a compiler, and then paying 5$ to build it. Terrible. |
| 00:07:44 | <geekosaur> | they also want to be able to hiure people who can develop and maintain it, which means they must know unix |
| 00:07:51 | <monochrom> | You don't need a CS degree to use your laptop. By your logic, universities can cancel all their CS programs now. |
| 00:08:03 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.6) |
| 00:09:07 | <monochrom> | I dare you to generalize from "we should top teaching C" to "we should stop teaching CS altogether". At least I would respect the epicness of that argument. :) |
| 00:10:15 | <erisco> | I don't see C as necessary in a CS program, even if it is the lingua franca of OS programmers, because I don't see OSes as necessary in a CS program |
| 00:10:24 | <qrpnxz> | lmao mono |
| 00:12:23 | <qrpnxz> | C is like the antidote to learning Python. If all you know is python you are totally screwed up. Should be illegal to know python and not know C. (Better yet no python at all, but this is a compromise 🙂) |
| 00:13:27 | <monochrom> | Oh hey we have a prof at my school who successfully did that. |
| 00:13:52 | <erisco> | I think it should be illegal to only know Java |
| 00:14:00 | <qrpnxz> | monochrom: did what |
| 00:14:23 | <erisco> | put that in your AbstractObservableVisitorFactory and smoke it |
| 00:14:36 | <monochrom> | So, previously, our CS101 and CS102 both used Python. The prof managed to convince us to change to: CS102 should use C. |
| 00:14:50 | <qrpnxz> | epic |
| 00:15:20 | <erisco> | I think after I graduated our intro courses were changed to Python too actually oO |
| 00:15:34 | <erisco> | C is already on the ropes |
| 00:15:37 | <monochrom> | I am in favour. (Not to say I actually had a vote; I didn't, still don't.) I have seen how Python convinced students that, for example, copying a string is O(1)-time. |
| 00:16:16 | <monochrom> | I told the prof "Ideally I would prefer Pascal but I can take a compromise too" :) |
| 00:16:21 | → | adanwan_ joins (~adanwan@gateway/tor-sasl/adanwan) |
| 00:16:27 | <qrpnxz> | lol |
| 00:16:49 | <monochrom> | united front for Profs Against Python, right? >:) |
| 00:16:50 | <erisco> | a string is the fundamental unit of measure for any dynamic programmer, so O(1) follows naturally |
| 00:17:01 | <qrpnxz> | hahaha |
| 00:17:24 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds) |
| 00:18:43 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@142.147.89.248) (Quit: Leaving) |
| 00:19:09 | <monochrom> | But yeah "C as antidote to Python" is what the prof (and me and some others) thought, though we didn't think of wording it like that. |
| 00:20:08 | <monochrom> | But were you aware that python is also a snake species, so "antidote" can be a pun there? :) |
| 00:21:19 | <erisco> | monochrom, actually, now that I think of it, our OS course was also taught in Java, lmao... |
| 00:21:44 | <erisco> | no joke, you had the option of either doing it in C, or doing it make-believe in Java |
| 00:24:22 | <erisco> | I think because some programs had the OS course but not the entry C courses... for whatever reason |
| 00:27:11 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 00:31:16 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal) |
| 00:32:50 | <qrpnxz> | monochrom: oh yeah! |
| 00:33:43 | <monochrom> | Nice. Took me a while to see that. :) |
| 00:34:59 | <erisco> | what is Python other than a timid attempt at making Ruby? |
| 00:35:28 | <erisco> | which I have not heard a word of for many years now... is it still a thing? I still have to suffer active record in every ORM I have to use |
| 00:35:50 | <monochrom> | Did Ruby predate Python? |
| 00:35:54 | <geekosaur> | no |
| 00:36:36 | <geekosaur> | python 1.0 and perl 3.0 (first public releases of each) came out at the same time |
| 00:36:38 | <monochrom> | But I don't think of either Python or Ruby as timid. |
| 00:36:42 | × | merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 245 seconds) |
| 00:37:07 | × | gurkenglas quits (~gurkengla@p548ac3ba.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 00:37:28 | <geekosaur> | ruby started out as a perl knock-off with some smalltalk features |
| 00:37:48 | <monochrom> | Both are heavily opinionated, I can only imagine their creators to be egomaniacs. |
| 00:37:50 | <geekosaur> | but by ruby 2.0 most of the perl-isms were deprecated |
| 00:37:53 | <erisco> | my understanding is Python strived to be an OOP, but fell short by having a few non-object values, a weakness that Ruby fixed |
| 00:38:35 | <erisco> | Python did not have the bravery to make numbers assignable |
| 00:39:00 | <monochrom> | Well it has the bravery to say no to FP. |
| 00:39:23 | geekosaur | is still highly annoyed that in a language that wants so badly to be OO, strings are appended with + |
| 00:39:27 | <erisco> | what are decorators other than a timid attempt at function composition, a staple FP feature |
| 00:40:00 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 00:41:24 | <monochrom> | OK, in the following sense C does not have the bravery to say no to FP. It has ?: . C compilers do not refuse TCO. |
| 00:42:10 | <monochrom> | GvR had the bravery to say no to the former for a long time, and still say no to TCO. In both cases explicitly stating "this is not FP". |
| 00:42:29 | <monochrom> | And still have the bravery to keep lambda castrated. |
| 00:43:34 | <erisco> | this reminds me of how surprised I was to see inline function syntax added to Java |
| 00:44:12 | <erisco> | they just couldn't keep lying about the superiority of inline classes any longer |
| 00:44:12 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 00:49:53 | <qrpnxz> | i mean, anon classes are pretty nice, and in fact the lambda syntax is just a super neat sugar the exact same feature. Fits like a glove. |
| 00:55:58 | <erisco> | I haven't been paying attention to Haskell closely for a couple years... anything big? |
| 00:58:51 | <qrpnxz> | hard to say. Checkout the changelog of your favourite libs? |
| 00:59:32 | <erisco> | I guess my question is almost synonymous with looking at Kmett's new packages |
| 00:59:49 | <qrpnxz> | hahaha |
| 01:00:06 | <qrpnxz> | lens change a lot, it's at 5.0.0 recently i think? |
| 01:01:18 | <erisco> | they didn't really grip me until I studied the profunctor approach... and then I used them mainly to unwrap and wrap newtypes and not much else oO |
| 01:05:24 | × | hgolden quits (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) (Quit: Konversation terminated!) |
| 01:05:54 | <geekosaur> | text and aeson both had major revs. ghc9 got linear types |
| 01:07:10 | <qrpnxz> | oh yeah, text 2 is here pretty recently |
| 01:07:13 | <qrpnxz> | now with utf8 finally |
| 01:07:15 | → | hgolden joins (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
| 01:07:50 | × | Colere quits (~colere@about/linux/staff/sauvin) (Ping timeout: 240 seconds) |
| 01:08:07 | <geekosaur> | ghc 9.2 got LANGUAGE GHC2021 with a bunch of extensions turned on by default |
| 01:08:32 | <qrpnxz> | was gonna bring that up and got distracted. https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html |
| 01:08:40 | <qrpnxz> | still had the link in my buffer lol |
| 01:09:49 | → | Furor joins (~colere@about/linux/staff/sauvin) |
| 01:10:59 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 01:10:59 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 01:10:59 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:11:02 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:03 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds) |
| 01:12:18 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 01:17:10 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:19:12 | → | Sciencentistguy9 joins (~sciencent@hacksoc/ordinary-member) |
| 01:20:56 | → | codaraxis__ joins (~codaraxis@user/codaraxis) |
| 01:20:59 | × | Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 268 seconds) |
| 01:20:59 | Sciencentistguy9 | is now known as Sciencentistguy |
| 01:23:46 | <erisco> | linear types might be fun |
| 01:24:35 | × | codaraxis___ quits (~codaraxis@user/codaraxis) (Ping timeout: 252 seconds) |
| 01:32:53 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::d5f2) |
| 01:34:07 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 252 seconds) |
| 01:35:20 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 01:35:22 | × | machinedgod quits (~machinedg@d172-219-86-154.abhsia.telus.net) (Remote host closed the connection) |
| 01:36:46 | → | nilradical joins (~nilradica@user/naso) |
| 01:37:53 | → | neceve joins (~quassel@2.26.93.14) |
| 01:39:20 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 01:47:19 | × | neceve quits (~quassel@2.26.93.14) (Ping timeout: 252 seconds) |
| 01:49:09 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 252 seconds) |
| 01:52:33 | Furor | is now known as Colere |
| 01:57:36 | <albet70> | what SKI calculus is used for? |
| 02:01:15 | <qrpnxz> | stack have any prebuilt way to display pretty graphs from benchmarks? Kind of a PITA to move this data to librecalc |
| 02:01:47 | <qrpnxz> | i should just write a short program, i'm a programmer after all |
| 02:03:30 | → | merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) |
| 02:10:15 | <Cale> | albet70: It's not so much useful as it is an interesting thing to think about -- that 2 or 3 combinators are sufficient to encode computation. The types of S and K in a typed lambda calculus can be taken as axioms for intuitionistic logic (though usually most would prefer a presentation based on structural rules these days) |
| 02:10:53 | <Cale> | albet70: also, they're closely related to Applicative: pure and (<*>) for the instance Applicative ((->) e) are exactly K and S |
| 02:12:06 | → | frost joins (~frost@user/frost) |
| 02:12:18 | <Cale> | If you need something which is Turing complete and extremely simple, it can sometimes fit the bill, though there are a lot of those. |
| 02:13:21 | × | mob quits (~kvirc@62-11-5-95.dialup.tiscali.it) (Ping timeout: 252 seconds) |
| 02:18:06 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:18:06 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:18:06 | finn_elija | is now known as FinnElija |
| 02:19:55 | <albet70> | class SKI repr where app :: repr (a -> b) -> repr a -> repr b; s :: repr ((a -> b -> c) -> (a -> b) -> a -> c); k :: repr (a -> b -> a); i :: repr (a -> a); this s's type signature is like (<*>) @((->)_) :: (_ -> a -> b) -> (_ -> a) -> _ -> b |
| 02:20:28 | <qrpnxz> | it makes sense because lambda calc is turing complete, and all S and K do is give you "computation with an implied environment". So if you make every single function argument as an implied argument in a reader monad, then bam, you have the same program but just using (<*>) and pure to deal with the environment that would otherwise be done with lambda abstractions |
| 02:24:43 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds) |
| 02:27:15 | × | hgolden quits (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) (Quit: Konversation terminated!) |
| 02:28:51 | → | hgolden joins (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
| 02:35:26 | × | td_ quits (~td@94.134.91.51) (Ping timeout: 240 seconds) |
| 02:36:49 | × | merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 02:37:33 | → | td_ joins (~td@94.134.91.67) |
| 02:40:20 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 02:42:48 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 02:42:53 | <edwardk> | erisco: re new packages: mostly spent some time puttering with stronger linear-logic in haskell, with supporting various unlifted data types with a somewhat modified prelude, recently trying to get something like egg ported over and failing several times to make it nice, and i still every once in a while keep dusting off the new distributive changes and trying to make a go at rewriting the whole package hierarchy |
| 02:43:29 | <edwardk> | currently making a go at doing some of the typechecker like code i like to write in rust, we'll see how long that lasts. |
| 02:43:51 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 02:44:26 | × | mzan quits (~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:45:40 | → | mzan joins (~quassel@mail.asterisell.com) |
| 02:46:21 | <erisco> | what is the typechecker code about? |
| 02:52:10 | × | frost quits (~frost@user/frost) (Quit: Client closed) |
| 03:12:43 | → | frost joins (~frost@user/frost) |
| 03:15:04 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 03:15:19 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds) |
| 03:20:00 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 268 seconds) |
| 03:21:02 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal) |
| 03:22:06 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 03:22:06 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 03:22:06 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:23:05 | × | vglfr quits (~vglfr@194.9.14.33) (Read error: Connection reset by peer) |
| 03:23:57 | → | vglfr joins (~vglfr@194.9.14.33) |
| 03:31:16 | <erisco> | albet70, SKI doesn't use variables, which makes certain analyses and constructions much easier... variable scope, hygiene, etc, is complicated |
| 03:35:17 | <erisco> | first you remove loops, then mutability, then variables... a hat trick to impress friends |
| 03:41:35 | × | xff0x quits (~xff0x@2405:6580:b080:900:5628:7137:a023:aad6) (Ping timeout: 255 seconds) |
| 03:42:38 | → | xff0x joins (~xff0x@2405:6580:b080:900:d33e:2826:e840:9afc) |
| 03:43:26 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 03:49:56 | <albet70> | S is ap, K is const, I is id, right? |
| 03:49:57 | <monochrom> | "First they remove your loops. Then they remove your mutability. Then they remove your variables. Then you win." :) |
| 03:53:36 | <edwardk> | erisco: i spend a lot of time writing little toy typecheckers and the like, but this one is really about trying to see if i can put a better skin on enso.org's language |
| 03:54:32 | <edwardk> | which requires some pretty nasty typechecking tricks to pull off, because you have a language with things like positional and named arguments, but also currying, basically there are like 4 places in the design of the type system that need something like row types |
| 03:54:43 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 03:54:44 | <edwardk> | and one of them requires those row types to be able to be instantiated with polytypes |
| 03:55:11 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 03:56:30 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 03:56:53 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 03:58:40 | <edwardk> | albet70: yes, i like to think of them in terms of the reader monad as well. S is like 'f <*> x' an application that takes an extra environment and plumbs it both ways. K ignores it (pure = const). I uses it (ask = id) |
| 03:59:11 | <edwardk> | albet70: i wanted to say things with explicitly reader-like analogues, because then its clearer, mixing (<*>) with const and id makes it pretty hard to see the reader connections |
| 03:59:34 | <edwardk> | otoh, pure and ask are pretty obscure if you just want to think of it in combinator terms =) |
| 04:00:20 | <edwardk> | ok, simd bitvector for rust done, now i can actually get the succinct stuff i need done, and then i can finally get my catamorphisms out of the way |
| 04:02:50 | → | merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) |
| 04:04:39 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 04:05:34 | → | gmg joins (~user@user/gehmehgeh) |
| 04:16:19 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 04:22:25 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 04:23:25 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 04:24:27 | × | nilradical quits (~nilradica@user/naso) () |
| 04:26:18 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:26:23 | × | vglfr quits (~vglfr@194.9.14.33) (Read error: Connection reset by peer) |
| 04:27:04 | → | vglfr joins (~vglfr@194.9.14.33) |
| 04:27:50 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds) |
| 04:28:50 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 04:30:05 | × | paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Read error: Connection reset by peer) |
| 04:30:21 | <albet70> | are there some types instance of applicative but not functor? |
| 04:31:54 | → | paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) |
| 04:33:25 | × | vglfr quits (~vglfr@194.9.14.33) (Read error: Connection reset by peer) |
| 04:33:40 | → | vglfr joins (~vglfr@194.9.14.33) |
| 04:37:05 | × | merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 04:40:02 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 245 seconds) |
| 04:42:06 | <dolio> | No. |
| 04:42:39 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 04:42:39 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 04:42:39 | finn_elija | is now known as FinnElija |
| 04:43:32 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 04:44:04 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 04:51:17 | × | foul_owl quits (~kerry@23.82.194.107) (Ping timeout: 245 seconds) |
| 04:57:00 | <qrpnxz> | albet70: https://hackage.haskell.org/package/base-4.16.3.0/docs/Control-Applicative.html#v:liftA |
| 04:57:38 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 05:01:45 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 268 seconds) |
| 05:02:09 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 05:06:09 | → | vglfr joins (~vglfr@194.9.14.33) |
| 05:06:30 | <albet70> | and instance of functor but not applicative? |
| 05:11:54 | → | mbuf joins (~Shakthi@122.165.55.71) |
| 05:18:08 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 05:18:26 | <absentia> | albet70: every functor gets an applicative "for free" |
| 05:18:28 | <absentia> | https://hackage.haskell.org/package/free-5.1.9/docs/Control-Applicative-Free.html |
| 05:19:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds) |
| 05:23:33 | → | notzmv joins (~zmv@user/notzmv) |
| 05:24:42 | <jackdk> | albet70: `Data.Map.Map k` is `Functor` and `Apply` (from `semigroupoids`) but not `Applicative` (no valid `pure`) |
| 05:26:07 | × | myme1 quits (~myme@2a01:799:d5a:cd00:f235:66bd:b223:d95e) (Ping timeout: 272 seconds) |
| 05:26:59 | → | myme1 joins (~myme@2a01:799:d5a:cd00:e0d6:bd5d:e9e6:2667) |
| 05:27:02 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 05:28:28 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 05:28:28 | × | Vajb quits (~Vajb@85-76-11-145-nat.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 05:28:40 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) |
| 05:31:01 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 05:42:55 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 268 seconds) |
| 05:43:49 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 252 seconds) |
| 05:51:04 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 05:52:55 | → | acidjnk joins (~acidjnk@p200300d6e7058660dd6adf7799b0bbfd.dip0.t-ipconnect.de) |
| 05:54:12 | → | vglfr joins (~vglfr@194.9.14.33) |
| 05:59:36 | → | Vajb joins (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) |
| 06:03:06 | → | rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
| 06:03:08 | → | merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) |
| 06:05:57 | × | rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Remote host closed the connection) |
| 06:07:44 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 06:09:43 | → | rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
| 06:10:05 | × | rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Remote host closed the connection) |
| 06:10:47 | → | rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
| 06:13:22 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 06:15:04 | → | titibandit joins (~titibandi@xdsl-212-8-147-38.nc.de) |
| 06:28:38 | × | noteness quits (~noteness@user/noteness) (Ping timeout: 268 seconds) |
| 06:37:32 | × | merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 245 seconds) |
| 06:42:08 | → | Sujjek joins (~Sujjek@90.95.10.128) |
| 06:42:45 | <Sujjek> | Hi, how can I overcome the problem with cabal init "cabal: The name hopfield is already in use by another package on Hackage."? |
| 06:43:02 | × | acidjnk quits (~acidjnk@p200300d6e7058660dd6adf7799b0bbfd.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 06:43:22 | <absentia> | Sujjek: are you trying to install hopfield |
| 06:43:27 | <absentia> | as a dependency of your project |
| 06:43:32 | → | nilradical joins (~nilradica@user/naso) |
| 06:43:39 | <sclv> | Sujjek: use another name lol |
| 06:44:21 | <Sujjek> | No |
| 06:44:38 | <Sujjek> | It appears my cabal is outdated |
| 06:44:54 | <absentia> | https://hackage.haskell.org/package/hopfield |
| 06:45:24 | <Sujjek> | No my project is called hopfield |
| 06:46:00 | <absentia> | Sujjek: that's what the error is saying |
| 06:46:03 | <absentia> | it's already in use |
| 06:46:08 | <absentia> | by the package linked |
| 06:48:00 | <Sujjek> | I know |
| 06:48:19 | <dsal> | Your query is confusing. Is https://hackage.haskell.org/package/hopfield your package? |
| 06:48:41 | → | machinedgod joins (~machinedg@d172-219-86-154.abhsia.telus.net) |
| 06:51:24 | <Sujjek> | No. `mkdir hopfield; cd hopfield; cabal init` >>> "cabal: The name hopfield is already in use by another package on Hackage." |
| 06:51:43 | → | noteness joins (~noteness@user/noteness) |
| 06:52:02 | <Sujjek> | I just rm -rf ~/.cabal so it doesn't know the hackage packages and that let me create it |
| 06:52:20 | <dsal> | Oh. I've not used cabal directly. That seems like it should be advisory. You wouldn't be able to publish something called `hopfield` but you should be able to make a project called that that you don't intend to publish. |
| 06:54:17 | <absentia> | Sujjek: what cabal version |
| 06:54:30 | <absentia> | oh guess you figured it out |
| 06:55:47 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:56:42 | <Sujjek> | It's fixed in master https://github.com/haskell/cabal/issues/7909 |
| 07:07:01 | × | Sujjek quits (~Sujjek@90.95.10.128) (Remote host closed the connection) |
| 07:07:12 | × | titibandit quits (~titibandi@xdsl-212-8-147-38.nc.de) (Quit: Leaving.) |
| 07:14:59 | → | gurkenglas joins (~gurkengla@p548ac3ba.dip0.t-ipconnect.de) |
| 07:17:53 | × | rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 268 seconds) |
| 07:22:52 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 07:23:49 | → | nilradical joins (~nilradica@user/naso) |
| 07:23:55 | → | coot joins (~coot@213.134.176.158) |
| 07:25:45 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 07:26:05 | → | nilradical joins (~nilradica@user/naso) |
| 07:38:07 | → | Tuplanolla joins (~Tuplanoll@91-159-69-231.elisa-laajakaista.fi) |
| 07:38:23 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 07:44:55 | × | cosimone quits (~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection) |
| 07:45:06 | → | acidjnk joins (~acidjnk@p200300d6e7058660e0ca873366cee89c.dip0.t-ipconnect.de) |
| 07:52:07 | → | foul_owl joins (~kerry@23.82.194.108) |
| 07:53:11 | → | nilradical joins (~nilradica@user/naso) |
| 08:01:20 | → | merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) |
| 08:02:25 | Kaipei | is now known as Kaiepi |
| 08:03:26 | × | jargon quits (~jargon@184.101.188.251) (Remote host closed the connection) |
| 08:06:33 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 08:09:56 | × | JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Read error: Connection reset by peer) |
| 08:10:07 | × | machinedgod quits (~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 08:15:43 | → | JimL joins (~quassel@89-162-2-132.fiber.signal.no) |
| 08:21:20 | × | vglfr quits (~vglfr@194.9.14.33) (Read error: Connection reset by peer) |
| 08:21:30 | → | vglfr joins (~vglfr@194.9.14.33) |
| 08:24:59 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 08:27:13 | → | zeenk joins (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) |
| 08:27:32 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 08:38:39 | → | Midjak joins (~Midjak@82.66.147.146) |
| 08:42:33 | × | Midjak quits (~Midjak@82.66.147.146) (Read error: Connection reset by peer) |
| 08:43:29 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 252 seconds) |
| 08:45:46 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:46:10 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 08:46:50 | × | JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 268 seconds) |
| 08:48:17 | → | JimL joins (~quassel@89-162-2-132.fiber.signal.no) |
| 08:48:59 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 08:52:04 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 08:55:26 | × | acidjnk quits (~acidjnk@p200300d6e7058660e0ca873366cee89c.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 09:00:22 | → | maroloccio joins (~marolocci@62.98.94.196) |
| 09:07:37 | → | elkcl_ joins (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) |
| 09:08:47 | × | elkcl quits (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 245 seconds) |
| 09:08:48 | elkcl_ | is now known as elkcl |
| 09:11:08 | → | jgeerds joins (~jgeerds@55d46bad.access.ecotel.net) |
| 09:11:57 | → | kenran joins (~kenran@200116b82b39570069e9463f1b15ab5c.dip.versatel-1u1.de) |
| 09:13:26 | × | kenran quits (~kenran@200116b82b39570069e9463f1b15ab5c.dip.versatel-1u1.de) (Client Quit) |
| 09:14:39 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 09:14:39 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Read error: Connection reset by peer) |
| 09:14:39 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Read error: Connection reset by peer) |
| 09:14:39 | × | noteness quits (~noteness@user/noteness) (Write error: Connection reset by peer) |
| 09:15:19 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 09:15:28 | → | noteness joins (~noteness@user/noteness) |
| 09:15:34 | → | gmg joins (~user@user/gehmehgeh) |
| 09:15:43 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 09:25:21 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:26:59 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 09:33:50 | <pavonia> | Is there already a strict function to apply a function n times on a given value? |
| 09:37:27 | <merijn> | pavonia: iterate' ? |
| 09:38:47 | <pavonia> | Oh, didn't see there's a strict version of it |
| 09:45:25 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 09:46:02 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 268 seconds) |
| 09:47:53 | × | yaroot quits (~yaroot@p3374048-ipngn8502souka.saitama.ocn.ne.jp) (Ping timeout: 268 seconds) |
| 09:49:52 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 09:50:28 | → | nilradical joins (~nilradica@user/naso) |
| 09:52:00 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 09:52:37 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 09:56:08 | → | Cerins joins (~Cerins@m90-128-49-116.cust.tele2.lv) |
| 09:57:11 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 09:57:39 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 09:57:52 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:58:40 | → | nilradical joins (~nilradica@user/naso) |
| 09:58:43 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 09:59:02 | → | nilradical joins (~nilradica@user/naso) |
| 10:03:13 | → | yaroot joins (~yaroot@2400:4052:ac0:d900:680e:dbff:fe1e:4953) |
| 10:04:39 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 10:04:57 | → | MajorBiscuit joins (~MajorBisc@86-88-79-148.fixed.kpn.net) |
| 10:06:47 | × | mbuf quits (~Shakthi@122.165.55.71) (Quit: Leaving) |
| 10:09:56 | × | MajorBiscuit quits (~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 10:11:41 | → | neceve joins (~quassel@2.26.93.14) |
| 10:12:24 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 10:18:33 | × | coot quits (~coot@213.134.176.158) (Read error: Connection reset by peer) |
| 10:18:42 | → | coot joins (~coot@213.134.176.158) |
| 10:19:07 | → | instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net) |
| 10:23:35 | × | instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 252 seconds) |
| 10:26:31 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 10:27:56 | × | yaroot quits (~yaroot@2400:4052:ac0:d900:680e:dbff:fe1e:4953) (Ping timeout: 255 seconds) |
| 10:29:38 | → | vglfr joins (~vglfr@194.9.14.33) |
| 10:34:21 | → | MajorBiscuit joins (~MajorBisc@86-88-79-148.fixed.kpn.net) |
| 10:36:18 | → | yaroot joins (~yaroot@2400:4052:ac0:d900:680e:dbff:fe1e:4953) |
| 10:38:59 | × | MajorBiscuit quits (~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 10:42:07 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 245 seconds) |
| 10:44:04 | → | vglfr joins (~vglfr@194.9.14.33) |
| 10:53:18 | × | coot quits (~coot@213.134.176.158) (Quit: coot) |
| 10:53:30 | × | Cerins quits (~Cerins@m90-128-49-116.cust.tele2.lv) (Read error: Connection reset by peer) |
| 10:54:11 | → | Cerins joins (~Cerins@m90-128-49-116.cust.tele2.lv) |
| 10:54:24 | → | acidjnk joins (~acidjnk@p200300d6e7058660e81ade68fca2dfc2.dip0.t-ipconnect.de) |
| 10:54:46 | → | coot_ joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 10:57:35 | × | zeenk quits (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!) |
| 11:03:33 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 252 seconds) |
| 11:04:04 | × | JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Quit: No Ping reply in 180 seconds.) |
| 11:06:41 | → | JimL joins (~quassel@89-162-2-132.fiber.signal.no) |
| 11:07:57 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 11:09:13 | → | vglfr joins (~vglfr@194.9.14.33) |
| 11:09:32 | × | coot_ quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot_) |
| 11:13:24 | → | ubert joins (~Thunderbi@77.119.210.41.wireless.dyn.drei.com) |
| 11:20:37 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 11:21:27 | → | nilradical joins (~nilradica@user/naso) |
| 11:21:42 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 245 seconds) |
| 11:24:09 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 11:25:34 | → | Pickchea joins (~private@user/pickchea) |
| 11:26:17 | × | nilradical quits (~nilradica@user/naso) (Ping timeout: 245 seconds) |
| 11:28:14 | × | acidjnk quits (~acidjnk@p200300d6e7058660e81ade68fca2dfc2.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 11:30:18 | → | vglfr joins (~vglfr@194.9.14.33) |
| 11:30:50 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 11:34:00 | → | Cerins1 joins (~Cerins@m90-128-49-116.cust.tele2.lv) |
| 11:35:11 | × | Cerins1 quits (~Cerins@m90-128-49-116.cust.tele2.lv) (Client Quit) |
| 11:36:11 | × | Cerins quits (~Cerins@m90-128-49-116.cust.tele2.lv) (Ping timeout: 252 seconds) |
| 11:38:04 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:39:29 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds) |
| 11:43:46 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 11:45:40 | × | jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 268 seconds) |
| 11:46:05 | → | nilradical joins (~nilradica@user/naso) |
| 11:49:12 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 245 seconds) |
| 11:54:20 | → | vglfr joins (~vglfr@194.9.14.33) |
| 11:54:49 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 11:59:51 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 12:01:17 | → | Cerins joins (~Cerins@m90-128-49-116.cust.tele2.lv) |
| 12:06:33 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Quit: leaving) |
| 12:07:50 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 12:08:50 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 12:23:11 | → | rawles joins (~x@user/rawles) |
| 12:23:33 | × | vglfr quits (~vglfr@194.9.14.33) (Read error: Connection reset by peer) |
| 12:25:30 | → | joo-_ joins (~joo-_@87-49-45-115-mobile.dk.customer.tdc.net) |
| 12:25:30 | × | joo-_ quits (~joo-_@87-49-45-115-mobile.dk.customer.tdc.net) (Changing host) |
| 12:25:30 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 12:27:25 | <rawles> | Can someone name this function for me? I have a list of values whose type I've defined as a record. The second field is a timestamp, and the same data can appear several times in this list. I want to take my sorted list and retain only the first element appearing for each timestamp. Any ideas for an elegant way to do this? |
| 12:27:38 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 12:28:10 | <rawles> | I could group them by timestamp, and take the head of each list, but maybe there's a nicer way. |
| 12:28:50 | × | remedan quits (~remedan@octo.cafe) (Read error: Connection reset by peer) |
| 12:31:08 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:31:12 | <Cale> | That already sounds like a one-liner... |
| 12:31:22 | → | acidjnk joins (~acidjnk@p200300d6e705866035693c7955124d42.dip0.t-ipconnect.de) |
| 12:32:19 | → | vglfr joins (~vglfr@194.9.14.33) |
| 12:32:34 | → | remedan joins (~remedan@octo.cafe) |
| 12:32:50 | <Cale> | map head . groupBy ((==) `on` fooTimestamp) |
| 12:33:42 | <Cale> | or you could write a lambda there and it's not much longer |
| 12:33:43 | <rawles> | Fantastic. Thanks Cale. I'll give that a go in a bit. |
| 12:34:49 | <Cale> | head is guaranteed not to fail here because groupBy only ever produces nonempty groups, but if you're worried about how the code might evolve, using (\(x:_) -> x) is also an option (which will produce a more helpful error message at runtime if anyone ever gives it an empty list) |
| 12:35:32 | → | kyborg2011 joins (~kyborg201@host-176-36-215-61.b024.la.net.ua) |
| 12:35:49 | <rawles> | Programming in Haskell at this stage is as much an self-education as it is creating code, so that sounds like a good habit. Thanks. |
| 12:35:56 | × | kyborg2011 quits (~kyborg201@host-176-36-215-61.b024.la.net.ua) (Remote host closed the connection) |
| 12:36:48 | <absentia> | https://hackage.haskell.org/package/protolude-0.3.2/docs/Protolude-List.html |
| 12:37:10 | → | kyborg2011 joins (~kyborg201@host-176-36-215-61.b024.la.net.ua) |
| 12:37:19 | <rawles> | oh nice! |
| 12:39:26 | × | jmd_ quits (~jmdaemon@user/jmdaemon) (Ping timeout: 240 seconds) |
| 12:40:33 | → | Midjak joins (~Midjak@82.66.147.146) |
| 12:41:17 | × | kyborg2011 quits (~kyborg201@host-176-36-215-61.b024.la.net.ua) (Ping timeout: 245 seconds) |
| 12:58:13 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 12:59:37 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 245 seconds) |
| 13:00:11 | → | coot_ joins (~coot@213.134.176.158) |
| 13:00:21 | <Cale> | That's just basically a subset of what's in Data.List |
| 13:00:56 | <absentia> | with safer `head` |
| 13:01:16 | <Cale> | oh, I see |
| 13:01:32 | × | coot_ quits (~coot@213.134.176.158) (Read error: Connection reset by peer) |
| 13:01:42 | <Cale> | Though, that often won't help any, because you'll just end up wanting to pattern match on the Just which you know is coming. |
| 13:01:44 | → | coot_ joins (~coot@213.134.176.158) |
| 13:01:59 | <Cale> | (Like in this case) |
| 13:02:25 | → | vglfr joins (~vglfr@194.9.14.33) |
| 13:02:38 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 13:04:17 | <Cale> | But yeah, 'head' and 'tail' are kind of a silly thing to have around in general, since they're both beginner traps most of the time, but also very easy to implement when you need them, and implementing them inline means the compiler has the opportunity to generate a better error message if you end up being (or becoming) incorrect about the list always being nonempty. |
| 13:04:29 | → | hrberg joins (~quassel@171.79-160-161.customer.lyse.net) |
| 13:05:41 | × | remedan quits (~remedan@octo.cafe) (Quit: Bye!) |
| 13:07:25 | <Cale> | haha, safeFromJust :: Maybe a -> Maybe a; safeFromJust = id |
| 13:07:50 | × | acidjnk quits (~acidjnk@p200300d6e705866035693c7955124d42.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 13:09:10 | <hpc> | or if you want to optimize it, safeFromJust = unsafeCoerce |
| 13:15:21 | → | remedan joins (~remedan@octo.cafe) |
| 13:16:50 | <rawles> | Imagine I want to write a library that constructs a bitmap graphic in a canvas of 256x256 pixels. In my library, functions flip pixels, draw lines, and so on. But I don't want to carry around tens of thousands of values on the stack each time I change something. What should I be looking into to solve this - should I be learning about mutable data structures, or something else? |
| 13:16:57 | <rawles> | (I have a lot of questions) |
| 13:17:28 | <geekosaur> | take a look at JuicyPixels, nmuch of that might already be done for you |
| 13:18:08 | <rawles> | geekosaur: Thank you |
| 13:18:50 | <geekosaur> | also all values in Haskell are on the heap 🙂 |
| 13:19:08 | <geekosaur> | there is a pattern match stack, and a C stack for FFI calls |
| 13:19:32 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 13:19:48 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 13:20:12 | <rawles> | Oh I see, that makes sense. |
| 13:20:45 | → | nilradical joins (~nilradica@user/naso) |
| 13:20:51 | <geekosaur> | (the pattern match stack is how things get evaluated, since a 100% lazy language would never do anything. so patterns cause forcing of lazy values) |
| 13:22:33 | × | remedan quits (~remedan@octo.cafe) (Read error: Connection reset by peer) |
| 13:25:26 | × | nilradical quits (~nilradica@user/naso) (Ping timeout: 240 seconds) |
| 13:26:42 | → | remedan joins (~remedan@octo.cafe) |
| 13:26:51 | × | remedan quits (~remedan@octo.cafe) (Read error: Connection reset by peer) |
| 13:27:57 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 244 seconds) |
| 13:28:16 | → | kilolympus joins (~kilolympu@90.206.106.191) |
| 13:30:41 | × | mxs quits (~mxs@user/mxs) (Ping timeout: 255 seconds) |
| 13:31:01 | → | vglfr joins (~vglfr@194.9.14.33) |
| 13:31:05 | → | remedan joins (~remedan@octo.cafe) |
| 13:34:37 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 245 seconds) |
| 13:35:21 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 252 seconds) |
| 13:35:48 | × | remedan quits (~remedan@octo.cafe) (Remote host closed the connection) |
| 13:35:56 | × | maroloccio quits (~marolocci@62.98.94.196) (Quit: WeeChat 3.0) |
| 13:36:36 | → | vglfr joins (~vglfr@194.9.14.33) |
| 13:36:47 | × | Cerins quits (~Cerins@m90-128-49-116.cust.tele2.lv) (Quit: Leaving) |
| 13:37:20 | <yin> | is Stack still relevant? |
| 13:38:01 | <yin> | or has cabal caught up and made it obsolete? |
| 13:38:29 | <geekosaur> | there are still a few things stack does better, notably documentation |
| 13:38:53 | <geekosaur> | also some people prefer the resolver-based setup to cabal's more floating arrangement |
| 13:39:12 | <hpc> | ghcup solves what i expect most people use the resolver for |
| 13:39:15 | <geekosaur> | (although you can now simulate a resolver with a cabal.freeze file, but it's only a simulation) |
| 13:39:33 | <hpc> | (installing ghc/cabal in the first place, rather than trying to precisely control package versions) |
| 13:40:46 | <hpc> | can't you also download a cabal.freeze file that corresponds to a resolver? |
| 13:41:55 | <geekosaur> | yes |
| 13:42:18 | <geekosaur> | the upcoming 3.8 release even includes a way to have cabal download it for you |
| 13:43:55 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 268 seconds) |
| 13:44:36 | <geekosaur> | in any case, stack still has something like 50% of the "market",m such as it is, and up to 80% in industry; it's not going away any time soon |
| 13:45:31 | <geekosaur> | I think most people in here prefer cabal, though, so it'll be easier to get help for it |
| 13:48:17 | × | hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 13:48:18 | <hpc> | at the very least, cabal is more "fundamental", so even if you're using stack you have to understand cabal anyway |
| 13:48:38 | → | hrberg joins (~quassel@171.79-160-161.customer.lyse.net) |
| 13:49:08 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 13:50:04 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 13:51:57 | → | zebrag joins (~chris@user/zebrag) |
| 13:51:59 | → | vglfr joins (~vglfr@194.9.14.33) |
| 13:53:26 | × | [Leary] quits (~Leary]@122-58-224-198-vdsl.sparkbb.co.nz) (Ping timeout: 240 seconds) |
| 13:54:10 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 13:56:11 | → | nilradical joins (~nilradica@user/naso) |
| 13:58:54 | <yin> | yeah i stopped using stack because i didn't really see the benefits |
| 13:59:15 | <yin> | since cabal became sane |
| 14:02:51 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 252 seconds) |
| 14:04:17 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 14:04:54 | → | doelie joins (~tom@c-73-17-195-134.hsd1.me.comcast.net) |
| 14:05:02 | × | gurkenglas quits (~gurkengla@p548ac3ba.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 14:06:41 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 14:06:55 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:07:07 | → | vglfr joins (~vglfr@194.9.14.33) |
| 14:07:09 | <doelie> | hi. what's a good place to start reading about dependent types in Haskell? i got a bit confused from just googling. there seems to be a lot of fragmented, outdated information online about how to emulate it and (unfinshed?) attempts to integrate it in ghc |
| 14:08:11 | <geekosaur> | the singletons library is how to emulate it. work to integrate it is still ongoing, various pieces have been appearing but it's fragmented and incomplete as yet |
| 14:08:39 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 14:08:43 | <hippoid> | i'm used to seeing the terms covariant and contravariant in terms of oop, but those terms are used in haskell as well in regards to bifuntors and profunctors. What's the meaning of covariant and contravariant in haskell, where there are no subclasses and superclasses? |
| 14:09:07 | <doelie> | geekosaur: thanks |
| 14:09:22 | <geekosaur> | https://www.cis.upenn.edu/~sweirich/papers/eisenberg-thesis.pdf is the plan, only partially implemented |
| 14:09:51 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 14:10:45 | → | geranim0 joins (~geranim0@modemcable062.79-202-24.mc.videotron.ca) |
| 14:10:49 | → | bob joins (~geranim0@modemcable062.79-202-24.mc.videotron.ca) |
| 14:12:44 | <hpc> | hippoid: they mean sort of the same thing, funny enough |
| 14:12:49 | <kaol> | If you squint a bit substituting a type variable with a concrete type is somewhat like subclassing. |
| 14:13:02 | <hpc> | in OOP, they have to do with parameterized types, if you have say Foo<T> you can think about the variance of T |
| 14:13:11 | → | remedan joins (~remedan@octo.cafe) |
| 14:13:13 | <hpc> | in haskell, when you have (a -> b) you can think about the variance of a |
| 14:13:51 | <hpc> | there's a page on this somewhere... |
| 14:15:08 | <hippoid> | for (a->b), is there an implicit forall a, forall b? |
| 14:15:19 | <hpc> | yeah |
| 14:15:29 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 244 seconds) |
| 14:16:08 | <hippoid> | hmm, then a and b can vary universally, so where is the constraint on what concrete type either of them can be? |
| 14:16:09 | <hpc> | https://hackage.haskell.org/package/base-4.16.3.0/docs/Data-Functor-Contravariant.html is a bit of a clue |
| 14:16:17 | <hpc> | (Functor being covariant) |
| 14:16:36 | <hpc> | there's also an implicit (a :: Type) and (b :: Type) |
| 14:16:51 | <hpc> | same as when i write Foo<T>, there's quantifiers there that OOP languages have no syntax for |
| 14:17:41 | <hpc> | or it sort of does, but it gets weird with subtyping and doesn't look like a simple forall |
| 14:17:56 | <hpc> | Foo<T extends SomethingElse>, and such |
| 14:18:19 | <hippoid> | huh, i dont get it |
| 14:19:01 | <hippoid> | i should start with -- what does covariant mean? |
| 14:19:08 | <hpc> | https://www.fpcomplete.com/blog/2016/11/covariance-contravariance/ isn't the page i am thinking of, but it seems to explain everything |
| 14:19:19 | <hpc> | except for that MonadIO part at the bottom, that seems like a weird tangent |
| 14:19:23 | <hippoid> | hpc: thanks, ill check that out! |
| 14:25:51 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds) |
| 14:26:02 | <hpc> | the bridge betwen oop variance and fp variance might be, imagine you have some function "B convert(A inputvalue)" |
| 14:26:20 | <hpc> | if you can use convert to write Foo<B> convertFoo(Foo<A> inputvalue), it's covariant |
| 14:26:35 | <hpc> | if you can use convert to write Foo<A> convertFoo(Foo<B> inputvalue), it's contravariant |
| 14:27:33 | → | vglfr joins (~vglfr@194.9.14.33) |
| 14:30:13 | <hpc> | convert might be a whole bunch of code, or it might just be a type cast |
| 14:31:51 | <hpc> | then you can imagine that they way OOP co/contravariance is taught just uses implicit type casts |
| 14:33:02 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Ping timeout: 240 seconds) |
| 14:33:17 | × | nilradical quits (~nilradica@user/naso) (Ping timeout: 252 seconds) |
| 14:34:54 | → | joo-_ joins (~joo-_@80-62-116-136-mobile.dk.customer.tdc.net) |
| 14:34:54 | × | joo-_ quits (~joo-_@80-62-116-136-mobile.dk.customer.tdc.net) (Changing host) |
| 14:34:54 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 14:36:13 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 252 seconds) |
| 14:38:01 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Quit: zxx7529) |
| 14:38:23 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 14:43:35 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Quit: zxx7529) |
| 14:46:40 | × | Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat) |
| 14:47:31 | → | Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com) |
| 14:53:16 | × | Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat) |
| 14:53:32 | → | nilradical joins (~nilradica@user/naso) |
| 14:53:34 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:54:28 | → | Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com) |
| 14:56:04 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 14:57:13 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:01:29 | → | johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 15:01:46 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 15:04:14 | × | Vajb quits (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) (Read error: Connection reset by peer) |
| 15:04:50 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) |
| 15:05:45 | × | dcoutts__ quits (~duncan@host86-150-18-57.range86-150.btcentralplus.com) (Remote host closed the connection) |
| 15:06:07 | → | dcoutts__ joins (~duncan@host86-150-18-57.range86-150.btcentralplus.com) |
| 15:06:38 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 15:07:27 | → | nilradical joins (~nilradica@user/naso) |
| 15:09:08 | → | dcoutts_ joins (~duncan@host86-150-18-2.range86-150.btcentralplus.com) |
| 15:10:38 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 240 seconds) |
| 15:11:47 | × | dcoutts__ quits (~duncan@host86-150-18-57.range86-150.btcentralplus.com) (Ping timeout: 252 seconds) |
| 15:11:50 | × | nilradical quits (~nilradica@user/naso) (Ping timeout: 240 seconds) |
| 15:13:28 | → | Cerins joins (~Cerins@m90-128-49-116.cust.tele2.lv) |
| 15:15:17 | → | dcoutts joins (~duncan@host86-171-59-73.range86-171.btcentralplus.com) |
| 15:17:09 | → | dcoutts__ joins (~duncan@host213-122-143-21.range213-122.btcentralplus.com) |
| 15:17:29 | × | Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat) |
| 15:17:50 | × | dcoutts_ quits (~duncan@host86-150-18-2.range86-150.btcentralplus.com) (Ping timeout: 240 seconds) |
| 15:18:01 | × | TonyStone quits (~TonyStone@2603-7080-8607-c36a-05bb-8b0e-3f23-c965.res6.spectrum.com) (Ping timeout: 244 seconds) |
| 15:18:39 | → | Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com) |
| 15:20:07 | × | dcoutts quits (~duncan@host86-171-59-73.range86-171.btcentralplus.com) (Ping timeout: 268 seconds) |
| 15:21:15 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:25:02 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 15:29:43 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:30:39 | → | TonyStone joins (~TonyStone@2603-7080-8607-c36a-2cf3-e44c-3193-429d.res6.spectrum.com) |
| 15:32:44 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 15:33:49 | → | dcoutts joins (~duncan@host86-144-78-222.range86-144.btcentralplus.com) |
| 15:35:22 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 15:35:41 | × | dcoutts__ quits (~duncan@host213-122-143-21.range213-122.btcentralplus.com) (Ping timeout: 268 seconds) |
| 15:37:03 | → | nilradical joins (~nilradica@user/naso) |
| 15:37:09 | → | dcoutts_ joins (~duncan@host86-144-78-222.range86-144.btcentralplus.com) |
| 15:39:42 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 15:39:42 | × | dcoutts quits (~duncan@host86-144-78-222.range86-144.btcentralplus.com) (Ping timeout: 244 seconds) |
| 15:42:04 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 15:42:15 | → | [Leary] joins (~Leary]@122-58-224-198-vdsl.sparkbb.co.nz) |
| 15:42:21 | → | nilradical joins (~nilradica@user/naso) |
| 15:42:38 | × | nilradical quits (~nilradica@user/naso) (Client Quit) |
| 15:42:50 | → | causal joins (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) |
| 15:43:35 | → | titibandit joins (~titibandi@xdsl-212-8-147-38.nc.de) |
| 15:43:36 | → | vglfr joins (~vglfr@194.9.14.33) |
| 15:49:26 | × | cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds) |
| 15:50:24 | → | dcoutts joins (~duncan@host86-149-51-51.range86-149.btcentralplus.com) |
| 15:50:29 | → | emad joins (~emad@102.40.214.221) |
| 15:51:35 | × | dcoutts_ quits (~duncan@host86-144-78-222.range86-144.btcentralplus.com) (Ping timeout: 244 seconds) |
| 15:52:22 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 15:53:18 | → | cheater joins (~Username@user/cheater) |
| 16:00:10 | × | mimi1vx[m] quits (~osukupmat@2001:470:69fc:105::2:418d) (Quit: You have been kicked for being idle) |
| 16:00:48 | → | acidjnk joins (~acidjnk@p200300d6e705866035693c7955124d42.dip0.t-ipconnect.de) |
| 16:02:53 | × | Cerins quits (~Cerins@m90-128-49-116.cust.tele2.lv) (Quit: Leaving) |
| 16:11:27 | × | noteness quits (~noteness@user/noteness) (Remote host closed the connection) |
| 16:12:16 | → | noteness joins (~noteness@user/noteness) |
| 16:13:59 | → | machinedgod joins (~machinedg@d172-219-86-154.abhsia.telus.net) |
| 16:14:09 | → | coco joins (~coco@212-51-146-199.fiber7.init7.net) |
| 16:15:11 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 16:15:11 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 16:15:11 | → | wroathe joins (~wroathe@user/wroathe) |
| 16:15:29 | → | alp_ joins (~alp@user/alp) |
| 16:19:08 | → | eldritch_cookie joins (~eldritch@2804:7f4:8280:8d2f:870a:e15e:a75:13c7) |
| 16:21:32 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 16:27:12 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:27:42 | → | Guest26 joins (~Guest26@node-b8g.pool-180-180.dynamic.totinternet.net) |
| 16:28:37 | Guest26 | is now known as sdev |
| 16:33:23 | × | sdev quits (~Guest26@node-b8g.pool-180-180.dynamic.totinternet.net) (Quit: Client closed) |
| 16:37:57 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 252 seconds) |
| 16:41:03 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 16:41:52 | <albet70> | return is const in Reader? |
| 16:44:29 | <c_wraith> | technically... no. It has a newtype wrapper thrown in somewhere along the line in Reader. |
| 16:45:01 | <c_wraith> | But if you ignore that, like... |
| 16:45:05 | <c_wraith> | @unmtl Reader r a |
| 16:45:05 | <lambdabot> | r -> a |
| 16:45:10 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 16:45:15 | <albet70> | ignore the type constructor |
| 16:45:24 | <c_wraith> | what else could it do? |
| 16:45:45 | <c_wraith> | like, there's only one useful implementation of a -> (r -> a) |
| 16:47:13 | × | lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 268 seconds) |
| 16:50:37 | <albet70> | return_func = \x -> \_ -> x; return_cont = \a -> \k -> k a |
| 16:50:55 | <johnw> | yes, it's const, modulo type wrappers |
| 16:51:28 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 16:51:29 | <albet70> | S is ap, K is const, I is id, is that something? |
| 16:54:56 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 16:58:59 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 16:59:39 | → | mxs joins (~mxs@user/mxs) |
| 17:00:01 | × | Tuplanolla quits (~Tuplanoll@91-159-69-231.elisa-laajakaista.fi) (Ping timeout: 268 seconds) |
| 17:02:00 | <albet70> | @djinn (((a->b) -> r) -> r) -> ((a->r)->r) -> (b->r) -> r |
| 17:02:00 | <lambdabot> | f a b c = b (\ d -> a (\ e -> c (e d))) |
| 17:02:07 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 17:03:01 | → | econo joins (uid147250@user/econo) |
| 17:03:37 | × | mtjm quits (~mutantmel@2604:a880:2:d0::208b:d001) (Remote host closed the connection) |
| 17:04:50 | → | mtjm joins (~mutantmel@2604:a880:2:d0::208b:d001) |
| 17:06:34 | × | cheater quits (~Username@user/cheater) (Quit: (BitchX) Chester Cheeta uses BitchX. Ayeuhayueuhayueuh!) |
| 17:10:01 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:10:10 | <albet70> | which case would use this function? too weird |
| 17:10:49 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 17:11:16 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 17:11:37 | × | emad quits (~emad@102.40.214.221) (Quit: Leaving) |
| 17:13:51 | → | Tuplanolla joins (~Tuplanoll@91-159-68-188.elisa-laajakaista.fi) |
| 17:15:12 | <monochrom> | None. You can stop now. |
| 17:18:53 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:26:31 | → | cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it) |
| 17:27:47 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 17:29:44 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 17:30:21 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 17:31:08 | → | AlexNoo_ joins (~AlexNoo@178.34.151.166) |
| 17:32:46 | <johnw> | albet70: isn't that just liftA2 ($) in Cont r? |
| 17:33:41 | <tomsmeding> | it's the _type_ of that, in any case |
| 17:33:45 | <monochrom> | A shorter name is <*> :) |
| 17:33:47 | × | AlexZenon quits (~alzenon@94.233.241.233) (Ping timeout: 245 seconds) |
| 17:33:53 | <johnw> | ah, yes :) |
| 17:34:03 | × | Alex_test quits (~al_test@94.233.241.233) (Ping timeout: 252 seconds) |
| 17:34:04 | <APic> | ☺ |
| 17:34:16 | × | Techcable quits (~Techcable@user/Techcable) (Remote host closed the connection) |
| 17:34:17 | <johnw> | I love the _accuracy_ in this channel :) |
| 17:34:33 | <tomsmeding> | that djinn output is incorrect as an implementation for Cont though |
| 17:34:41 | <tomsmeding> | because it evaluates the argument before the function :p |
| 17:34:42 | × | AlexNoo quits (~AlexNoo@94.233.241.233) (Ping timeout: 268 seconds) |
| 17:34:51 | <monochrom> | I am still ambivalent whether I should teach <*> or liftA2 though, when I teach Applicative. |
| 17:37:07 | → | Techcable joins (~Techcable@user/Techcable) |
| 17:37:30 | × | vglfr quits (~vglfr@194.9.14.33) (Read error: Connection reset by peer) |
| 17:37:45 | → | vglfr joins (~vglfr@194.9.14.33) |
| 17:38:13 | → | cheater joins (~Username@user/cheater) |
| 17:39:22 | → | Alex_test joins (~al_test@178.34.151.166) |
| 17:39:39 | → | AlexZenon joins (~alzenon@178.34.151.166) |
| 17:40:29 | → | Guest8787 joins (~Guest87@105.157.240.67) |
| 17:40:52 | × | Guest8787 quits (~Guest87@105.157.240.67) (Client Quit) |
| 17:42:10 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 244 seconds) |
| 17:42:24 | <[exa]> | monochrom: imo <*> in combination with <$> looks way more intuitive, and everyone is kinda able to chew themselves through the types to liftA2 after the intuition is in. |
| 17:43:02 | × | acidjnk quits (~acidjnk@p200300d6e705866035693c7955124d42.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 17:44:43 | AlexNoo_ | is now known as AlexNoo |
| 17:44:53 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 255 seconds) |
| 17:44:54 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 17:45:01 | → | Vajb joins (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) |
| 17:48:26 | → | vglfr joins (~vglfr@194.9.14.33) |
| 17:49:18 | × | machinedgod quits (~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 240 seconds) |
| 17:52:35 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:53:50 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 17:55:52 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 17:55:59 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 17:59:50 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 268 seconds) |
| 18:00:18 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 18:07:57 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 245 seconds) |
| 18:08:57 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 18:09:04 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 18:09:44 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 18:13:27 | × | noteness quits (~noteness@user/noteness) (Remote host closed the connection) |
| 18:14:18 | → | noteness joins (~noteness@user/noteness) |
| 18:17:34 | <johnw> | monochrom: didatictally, I think the story from fmap -> liftA2 has some clarity, whereas <*> is better if speaking of practicalities |
| 18:17:57 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 18:24:41 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 18:37:32 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds) |
| 18:38:23 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 18:38:23 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 18:38:23 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:38:47 | × | codaraxis__ quits (~codaraxis@user/codaraxis) (Ping timeout: 245 seconds) |
| 18:40:12 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 18:42:18 | × | alp_ quits (~alp@user/alp) (Ping timeout: 240 seconds) |
| 18:48:05 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 18:48:48 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 18:54:50 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 18:56:24 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 18:57:12 | → | alp_ joins (~alp@user/alp) |
| 18:57:50 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Read error: Connection reset by peer) |
| 18:58:06 | → | Milan joins (~Milan@46.245.124.208) |
| 18:58:20 | × | Milan quits (~Milan@46.245.124.208) (Client Quit) |
| 19:00:56 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 19:00:58 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds) |
| 19:02:56 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 19:03:31 | × | coot_ quits (~coot@213.134.176.158) (Ping timeout: 252 seconds) |
| 19:07:45 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds) |
| 19:07:55 | × | kilolympus quits (~kilolympu@90.206.106.191) (Ping timeout: 252 seconds) |
| 19:09:31 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 268 seconds) |
| 19:11:27 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds) |
| 19:12:36 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 268 seconds) |
| 19:12:37 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5) |
| 19:13:06 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 19:13:07 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 19:14:53 | → | vglfr joins (~vglfr@194.9.14.33) |
| 19:16:27 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 19:17:11 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 19:19:29 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 19:21:26 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 240 seconds) |
| 19:21:30 | → | acidjnk joins (~acidjnk@p200300d6e70586601410f2009aecb0a6.dip0.t-ipconnect.de) |
| 19:24:17 | → | vglfr joins (~vglfr@194.9.14.33) |
| 19:25:59 | → | kenran joins (~kenran@200116b82b395700fac15ccb28c8605f.dip.versatel-1u1.de) |
| 19:26:15 | × | kenran quits (~kenran@200116b82b395700fac15ccb28c8605f.dip.versatel-1u1.de) (Client Quit) |
| 19:28:04 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 19:28:19 | → | jimmy joins (~rethinkpa@static-198-54-130-104.cust.tzulo.com) |
| 19:28:38 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 240 seconds) |
| 19:31:10 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 19:31:54 | <davean> | johnw: I ... yah, I think I'd agree with you. I never actually use liftA2, but its a good way to explain things. |
| 19:34:31 | → | vglfr joins (~vglfr@194.9.14.33) |
| 19:38:51 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 19:40:07 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 19:48:59 | × | lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 268 seconds) |
| 19:50:36 | × | cosimone quits (~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection) |
| 19:50:56 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 19:55:23 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 19:56:57 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 19:58:31 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 252 seconds) |
| 20:00:35 | → | cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it) |
| 20:00:54 | → | vglfr joins (~vglfr@194.9.14.33) |
| 20:07:32 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:08:28 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 20:11:11 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 20:11:43 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 20:12:12 | → | coot_ joins (~coot@213.134.176.158) |
| 20:17:57 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 245 seconds) |
| 20:19:25 | → | vglfr joins (~vglfr@194.9.14.33) |
| 20:22:04 | → | jgeerds joins (~jgeerds@55d46bad.access.ecotel.net) |
| 20:23:35 | <monochrom> | Currently I teach liftA2, then use liftA2($) to show that it is enough to induce liftAn, then introduce the name <*>. |
| 20:25:25 | × | titibandit quits (~titibandi@xdsl-212-8-147-38.nc.de) (Remote host closed the connection) |
| 20:25:52 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 245 seconds) |
| 20:27:41 | <darkling> | "lift" makes me nervous, probably because every time I've met it so far, it's been used without explanation, and apparently the assumption that I know what it means; I don't. |
| 20:27:47 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 20:28:08 | <geekosaur> | "lift" means too many things and none of them are explained 🙂 |
| 20:28:23 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 20:28:23 | <c_wraith> | yeah, you can't assume there's any pattern to things named lift. |
| 20:28:29 | <c_wraith> | Each one is its own thing |
| 20:28:45 | <darkling> | Well, that's a good meta-explanation, at least. :) |
| 20:29:06 | × | noteness quits (~noteness@user/noteness) (Remote host closed the connection) |
| 20:29:07 | × | adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 20:29:10 | <monochrom> | I have long learned that names are meaningless. Context and actual usages give the semantics. |
| 20:29:33 | <monochrom> | Programmers are the worst offenders in two senses. |
| 20:29:35 | → | noteness joins (~noteness@user/noteness) |
| 20:29:36 | <c_wraith> | also, types are documentation that *rarely* lies in Haskell |
| 20:29:50 | <c_wraith> | get fluent in reading types :) |
| 20:29:51 | <monochrom> | For example, consider this name one of them coined: "test pollution". |
| 20:29:57 | <int-e> | It's simple: lift is a next-level operation. |
| 20:30:14 | <Rembane> | Do you even <*>? |
| 20:30:23 | <monochrom> | IMO more people should learn Chess. |
| 20:30:25 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 20:30:37 | <c_wraith> | great, now I'm going to read <*> as a guy flexing his lats forever |
| 20:30:40 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 20:30:47 | <monochrom> | Then you will understand that the names "queen", "bishop", "rook", "knight", "pawn" all mean nothing. |
| 20:30:51 | <int-e> | `ap` forever |
| 20:31:06 | <darkling> | Yeah, the CS environment is absolutely dreadful for pinching otherwise well-defined terms and redefining them to mean something subly (or totally) different. |
| 20:31:32 | <monochrom> | The name "king" marginally mean a tiny little bit of something, insofar as it means the one piece you can't sacrifice. |
| 20:31:33 | <Rembane> | c_wraith: You're welcome! :D |
| 20:31:50 | <darkling> | My last job title was "ontologist". Just don't tell the philosophers. |
| 20:32:02 | <monochrom> | And if that is not enough, consider the "cannon" piece in Chinese Chess. |
| 20:32:19 | <c_wraith> | Everyone knows knights are famous for their leaping abilitiesa |
| 20:32:46 | <monochrom> | It's a cute little marvel. It can move like a rook, but not capture like a rook. To capture, you must have exactly one obstacle in the line of sight. |
| 20:33:05 | <darkling> | Yeah, the cannon's great. |
| 20:33:12 | <monochrom> | Oh and everyone knows stone towers are famous for their mobility? |
| 20:33:29 | <c_wraith> | yes. but only in cardinal directions |
| 20:33:35 | Rembane | knows this |
| 20:33:37 | <monochrom> | And queens are famous for walking faster than kings? |
| 20:33:48 | <Rembane> | And being absolutely fierce |
| 20:34:02 | <absentia> | the "bishop" visited my local church the other day |
| 20:34:05 | <absentia> | he was a fuckin impostor |
| 20:34:07 | <int-e> | c_wraith: ...what do you make of bishops avoiding cardinal directions... |
| 20:34:08 | <absentia> | never once moved diagonally |
| 20:34:16 | <monochrom> | And pawns are famous for becoming additional royal consorts when hitting the enemy baseline? |
| 20:34:23 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 20:34:29 | <absentia> | http://bash.org/?261501 |
| 20:34:30 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 20:34:33 | <c_wraith> | int-e: I only know it to be true. I cannot comprehend their ways. |
| 20:34:45 | <int-e> | There's more I'd like to add but first I have something to check, mate. |
| 20:34:51 | → | michalz joins (~michalz@185.246.204.87) |
| 20:35:13 | <int-e> | c_wraith: They stay true to their colors at least |
| 20:35:14 | <darkling> | It becomes easier if you generalise to fairy chess, and then look at the traditional set as a selected subset. :) |
| 20:35:47 | <darkling> | Alternatively, this: https://en.wikipedia.org/wiki/Gess |
| 20:35:58 | <darkling> | (I've got the original paper for that one. :) ) |
| 20:36:34 | <monochrom> | After Chess and Chinese Chess and a few more kinds of games, you learn that "lift" has as much meaning as names in Chess. |
| 20:37:01 | <monochrom> | You just go "yeah whatever, just tell me the actual rules of engagement". |
| 20:37:53 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 20:38:24 | <monochrom> | "is this Chess but Transformers?" butterfly man meme |
| 20:38:49 | × | jimmy quits (~rethinkpa@static-198-54-130-104.cust.tzulo.com) (Quit: Leaving) |
| 20:39:52 | <int-e> | it's funny how fork lifts have nothing to do with dininig etiquette. |
| 20:40:14 | <c_wraith> | fork lifts lift the concept of forks to palletes |
| 20:40:34 | <darkling> | Isn't that what dining forks do? |
| 20:40:40 | <c_wraith> | spelling is hared |
| 20:40:45 | <c_wraith> | (case in point...) |
| 20:40:46 | <darkling> | Lift the food to the palette. :) |
| 20:41:20 | <c_wraith> | I was close. It's pallets. |
| 20:42:10 | <monochrom> | I still spell spurrious with a spurious r. :) |
| 20:42:12 | darkling | hangs up the homophone. |
| 20:43:03 | <Rembane> | So... what's an isophone? |
| 20:43:24 | <monochrom> | I name my iPhone "monophone". :) |
| 20:43:52 | <Rembane> | ^^ |
| 20:44:31 | <monochrom> | Idea for Harry Potter knockoff: Edsger Dijkstra And The Philosopher's Fork :) |
| 20:44:37 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 245 seconds) |
| 20:45:14 | <Rembane> | I want rap battles between Dijkstra and the rest of the world |
| 20:45:23 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 20:45:27 | <c_wraith> | What's wrong with CS people, always trying to starve philosophers? |
| 20:46:15 | <monochrom> | Because the philosophers put us on rail tracks to be hit by a train? |
| 20:47:24 | <darkling> | You'd rather leave the Byzantine generals to work out the issues for themselves? |
| 20:47:51 | <Rembane> | darkling: As long as they live stream it I'm cool |
| 20:48:10 | <monochrom> | hahahaha |
| 20:49:03 | <darkling> | I think that's my call for bedtime. G'night, ladles and jellyspoons. o/ |
| 20:51:02 | <Rembane> | \o |
| 20:53:14 | → | slack1256 joins (~slack1256@181.43.227.178) |
| 20:55:39 | <slack1256> | I got a really minor memory leak. Every week this program run it increases its RSS by 20MiB. I can diagnose leaks easily when they are noticiable, but how would you approach this? |
| 20:57:26 | <geekosaur> | eventlog and hs-speedscope? |
| 20:58:05 | × | bob quits (~geranim0@modemcable062.79-202-24.mc.videotron.ca) (Remote host closed the connection) |
| 20:58:05 | × | geranim0 quits (~geranim0@modemcable062.79-202-24.mc.videotron.ca) (Remote host closed the connection) |
| 20:58:23 | <sm> | bisect.. remove functionality until it stops., try to narrow it down |
| 20:59:01 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 252 seconds) |
| 20:59:33 | → | vglfr joins (~vglfr@194.9.14.33) |
| 21:00:52 | <sm> | ..watch live memory use with +RTS -S, try to identify events that trigger it.. |
| 21:01:03 | <slack1256> | sm: The bisect testing takes a lot of time. It does not manifest until the next week... |
| 21:01:54 | <sm> | yes that would be slow, unless you can find ways to trigger it faster |
| 21:01:55 | <hpc> | that's about 32 bits per second |
| 21:03:07 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 21:05:31 | <monochrom> | Take a trip around the solar system at 0.2c speed. Then you can wait less. >:) |
| 21:06:28 | <sm> | if you can't go that fast, rent a super fast vps ? :) |
| 21:06:43 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 21:06:53 | <slack1256> | hpc: Mmm that is true. I remember there was a new feature on a release note that said you could activate the profiling in certain pieces of code. I could wrap the "loop" part of the program and study the retained allocation per loop. |
| 21:07:19 | <slack1256> | monochrom: Hey, I would if I could. But Musk & Co are more interested on pump-and-dumping doge ;_; . |
| 21:11:02 | × | zer0bitz quits (~zer0bitz@2001:2003:f748:2000:788d:7b3b:7037:afae) (Ping timeout: 240 seconds) |
| 21:13:31 | × | adium quits (adium@user/adium) (Quit: Stable ZNC by #bnc4you) |
| 21:14:25 | × | neceve quits (~quassel@2.26.93.14) (Ping timeout: 252 seconds) |
| 21:15:21 | × | coco quits (~coco@212-51-146-199.fiber7.init7.net) (Quit: WeeChat 3.5) |
| 21:17:55 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 21:18:28 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 21:19:01 | × | vglfr quits (~vglfr@194.9.14.33) (Ping timeout: 268 seconds) |
| 21:20:51 | × | michalz quits (~michalz@185.246.204.87) (Remote host closed the connection) |
| 21:20:57 | × | coot_ quits (~coot@213.134.176.158) (Quit: coot_) |
| 21:26:40 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 21:29:30 | → | pavonia joins (~user@user/siracusa) |
| 21:35:43 | <slack1256> | Oh, eventlog2html has the slope of allocation of different cost-centres... interesting. |
| 21:36:08 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 21:36:15 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 21:40:01 | → | vglfr joins (~vglfr@194.9.14.33) |
| 21:42:38 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:48:25 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 21:48:29 | <geekosaur> | 9.4.1 just landed, it seems |
| 21:49:07 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection) |
| 21:49:11 | → | gmg joins (~user@user/gehmehgeh) |
| 21:51:27 | <monochrom> | -fprof-late gives me that AoE4 feeling: Why wasn't it done on day 1? :) |
| 21:52:50 | <monochrom> | (AoE4 is a game such that, for example, 1.5 years after initial release, players can finally pick colours.) |
| 21:54:35 | Hecate | stoped after AoE II |
| 21:54:38 | × | acidjnk quits (~acidjnk@p200300d6e70586601410f2009aecb0a6.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 22:05:04 | → | moonsheep joins (~user@user/moonsheep) |
| 22:05:05 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 22:06:46 | <moonsheep> | Hi there, I'm having a hard time understanding STM, especially for a single-consumer, multiple-producers problem. |
| 22:07:02 | <moonsheep> | Why does STM tell me that a thread is blocked indefinitely in the following snippet? https://paste.tomsmeding.com/bVC8E0Dl |
| 22:07:32 | <moonsheep> | Does it not understand that after the threadDelay new data will be written to the queue? |
| 22:07:39 | <moonsheep> | Or are you just not supposed to read from empty queues? |
| 22:07:50 | <merijn> | moonsheep: Because, eventually all writing threads finish |
| 22:07:52 | <c_wraith> | neither |
| 22:07:56 | <dolio> | This is all one thread. |
| 22:08:04 | <dolio> | Isn't it? |
| 22:08:06 | <merijn> | moonsheep: And your loop tries to read from the queue, and blocks |
| 22:08:11 | <merijn> | dolio: Note async in the mapM |
| 22:08:21 | <dolio> | Oh, okay. |
| 22:08:22 | → | machinedgod joins (~machinedg@d172-219-86-154.abhsia.telus.net) |
| 22:08:23 | <merijn> | but the read loop never terminates |
| 22:08:30 | <moonsheep> | Yes that is intentional |
| 22:08:32 | <c_wraith> | STM reports something is blocked indefinitely on a read when all remaining uses of a particular reference cell are currently blocked on a read |
| 22:08:33 | <merijn> | and the write loop does |
| 22:08:48 | <merijn> | moonsheep: Yes, but nothing else can ever write when the writers terminate |
| 22:08:52 | <c_wraith> | It's tied in with the garbage collector |
| 22:09:00 | <merijn> | moonsheep: GHC detects this, and helpfully throws an exception in your blocking thread |
| 22:09:12 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 245 seconds) |
| 22:09:22 | <moonsheep> | So here it is pretty clear that the writer will at some point stop writing, but what if I am (in my actual problem) crawling the internet? The writers may never stop for all I know |
| 22:09:42 | → | eldritchcookie joins (~eldritch@177.132.37.49) |
| 22:09:42 | <moonsheep> | I really *don't* want the reader to ever terminate |
| 22:09:44 | × | eldritch_cookie quits (~eldritch@2804:7f4:8280:8d2f:870a:e15e:a75:13c7) (Ping timeout: 268 seconds) |
| 22:09:44 | <c_wraith> | if something that isn't blocked on reading still has a reference to the cell, no problem |
| 22:09:44 | <merijn> | moonsheep: Sure, but then the exception won't throw either :p |
| 22:09:53 | <moonsheep> | Yeah it does |
| 22:09:56 | × | eldritchcookie quits (~eldritch@177.132.37.49) (Client Quit) |
| 22:10:08 | <c_wraith> | moonsheep: this is very much about *garbage collection* |
| 22:10:13 | <merijn> | moonsheep: No, the problem is "no thread (except the blocked one) has a reference to the queue |
| 22:10:24 | <merijn> | moonsheep: Therefore, provably, no one can ever write to week up your reader |
| 22:10:25 | <c_wraith> | moonsheep: if the cell is *reachable* by a thread that isn't reading from it, no exceptions thrown |
| 22:10:27 | <moonsheep> | Hmm that is weird because I'm pretty sure they do |
| 22:10:41 | <merijn> | moonsheep: If, another thread is alive and has a reference to your queue THEN this won't happen |
| 22:10:47 | <moonsheep> | Wait maybe my example isn't analogous to my actual use case |
| 22:11:03 | <c_wraith> | it isn't, because after 10 iterations your thread dies |
| 22:11:05 | <merijn> | moonsheep: It is not, since in your usecases the writers (presumably) don't terminate |
| 22:11:12 | <c_wraith> | and nothing is left that can write to the queue |
| 22:11:21 | <moonsheep> | c_wraith: well yes, but the example isn't my actual use case, that is over 1000 lines long |
| 22:11:29 | <monochrom> | Show us a reproducible example where a writer writes infinitely, the reader reads infinitely, and you still receive a "blocked" error? |
| 22:11:40 | <monochrom> | I mean at this point all is speculation. |
| 22:11:42 | <moonsheep> | Alright I'll try |
| 22:11:57 | <moonsheep> | Yeah I was about to say I'll try to come up with a better minimal test case |
| 22:11:59 | <c_wraith> | I mean, it's not speculation to explain where that exception actually comes from. :P |
| 22:12:28 | <moonsheep> | The problem is that it happens a few minutes into the crawling process so debugging is a nightmare |
| 22:12:54 | <c_wraith> | it's quite possible all your threads you expect to be writing to the cell are dying to uncaught exceptions |
| 22:13:04 | <sm> | geekosaur: \o/ ! |
| 22:13:23 | <moonsheep> | No I'm fairly certain there are no uncaught exceptions, but they're probably dying some way or another |
| 22:14:09 | × | slack1256 quits (~slack1256@181.43.227.178) (Remote host closed the connection) |
| 22:14:19 | × | noteness quits (~noteness@user/noteness) (Remote host closed the connection) |
| 22:14:26 | <c_wraith> | I mean... threads only terminate from finishing or uncaught exceptions... |
| 22:14:42 | → | noteness joins (~noteness@user/noteness) |
| 22:15:18 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 22:15:54 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 22:15:56 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 22:16:35 | → | syntactic_sugar joins (~amoljha@2601:644:9080:77c0::54f1) |
| 22:17:02 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds) |
| 22:17:12 | <moonsheep> | Oh wait a second, I've just realized I was completely misunderstand what I was doing |
| 22:17:32 | <moonsheep> | Turns out I don't have a consumer and multiple-producers, I have multiple consumers which, after consuming, become producers |
| 22:17:42 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 22:17:42 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 22:17:45 | allbery_b | is now known as geekosaur |
| 22:17:55 | <moonsheep> | Alright then nevermind my original question, this is a completely different case |
| 22:17:57 | <moonsheep> | My bad for not realizing |
| 22:18:07 | <c_wraith> | ah. well then yes, if all of them become consumers at the same time... |
| 22:18:56 | <moonsheep> | Also they are fed some initial data |
| 22:19:02 | <moonsheep> | Here is how the whole thing looks: |
| 22:19:10 | <moonsheep> | At first everyone is a consumer, and everyone is fed some initial data |
| 22:19:26 | → | waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
| 22:19:37 | <monochrom> | This is sounding like a bad case of the tragedy of commons :) |
| 22:19:39 | <moonsheep> | After someone finishes consuming all that data, they become a producer that gives data to other consumers |
| 22:19:59 | <moonsheep> | After that they wait for someone else to become a producer and give them data |
| 22:20:10 | <moonsheep> | Alright I need to simplify things |
| 22:20:15 | <moonsheep> | This is way too complicated for me to reason about |
| 22:20:30 | <monochrom> | Yeah this is known as "economics" no? >:) |
| 22:21:05 | <moonsheep> | Well if this is economics my program invests in crypto cause it ain't workin out |
| 22:21:10 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:21:18 | × | dcoutts quits (~duncan@host86-149-51-51.range86-149.btcentralplus.com) (Remote host closed the connection) |
| 22:21:25 | <merijn> | moonsheep: What are you trying to do? |
| 22:21:37 | → | dcoutts joins (~duncan@host86-149-51-51.range86-149.btcentralplus.com) |
| 22:21:39 | <moonsheep> | A concurrent crawler (of something similar to the web) |
| 22:21:58 | <moonsheep> | After a page is crawled, all it's links are sent to other consumers who crawl each of them |
| 22:22:12 | <moonsheep> | After each of those finish in turn crawling, they send their respective outlinks to other consumerss |
| 22:22:34 | <merijn> | I mean, it really sounds like you just want a single queue with multiple readers AND writers |
| 22:22:39 | <moonsheep> | Ideally I have as many threads (consumer+producer) as I have hosts, so I can download concurrently from separate hosts, but not from the same one (not to overload it) |
| 22:22:59 | <moonsheep> | merijn: but I don't! I want a separate queue for every host |
| 22:23:13 | <moonsheep> | So all pages by google.com get processed by thread 1, all by wikipedia.com by thread 2, etc. |
| 22:23:20 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 22:23:30 | <moonsheep> | But what if a page in wikipedia.com links to one in google.com? |
| 22:23:38 | <moonsheep> | I have to allow it to add it's page to google's queue |
| 22:24:05 | <moonsheep> | Hmm, honestly this is startingg to ssound an awful lot like the actor model |
| 22:24:15 | <merijn> | ok, so you need a "Map Domain Queue" |
| 22:24:36 | <moonsheep> | Yeah I do have literally a type like that |
| 22:24:46 | <moonsheep> | So you seem to be following a thought process similar to mine when designing it |
| 22:24:51 | <moonsheep> | I can't be that far off from the answer |
| 22:25:03 | <moonsheep> | Wait I'll try to design a more minimal example |
| 22:25:04 | <monochrom> | This would not cause a block error because GC could not prove that no writer exists. |
| 22:25:37 | <moonsheep> | monochrom: empirical evidence suggests the contrary. So either the GC is broken (highly unlikely) or I'm doing something wrong |
| 22:25:53 | <merijn> | I'm pretty willing to bet on option 2 :) |
| 22:26:00 | <merijn> | Given that I know how the GC does it :p |
| 22:26:16 | <moonsheep> | Again this is one of those situations that are a nightmare to debug because it doesn't fail until like 5 minutes into crawling :'( |
| 22:26:30 | <moonsheep> | merijn: I don't know how the GC works but I trust it way more than myself, so definitely |
| 22:27:01 | × | ubert quits (~Thunderbi@77.119.210.41.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 22:28:20 | <moonsheep> | Oh boy, I'm just starting to realize how fundamentally flawed my current design is |
| 22:28:36 | <moonsheep> | For one I already noticed a few mistakes in the implementation |
| 22:28:55 | <moonsheep> | But also this is a giant mess of spaghetti, I should probably organize it a little before trying to do fancy pants concurrency |
| 22:29:20 | <moonsheep> | Anyway, I'll be back in a few hours or weeks, thank you my dearest debugging ducks :) |
| 22:36:09 | → | nate4 joins (~nate@98.45.169.16) |
| 22:40:57 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
| 22:44:15 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 252 seconds) |
| 22:47:44 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 22:48:23 | → | Achylles joins (~Achylles_@2804:431:d725:d87b:def0:5845:5ed6:f001) |
| 22:56:51 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 22:58:18 | × | jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 268 seconds) |
| 23:00:59 | → | pioneer joins (~pioneer@186-241-18-221.user3p.veloxzone.com.br) |
| 23:01:27 | pioneer | is now known as UnrelatedMicrowa |
| 23:01:36 | UnrelatedMicrowa | is now known as Microwave |
| 23:06:56 | × | BanUtama quits (~blake.rai@user/BanUtama) (Ping timeout: 268 seconds) |
| 23:08:07 | × | Achylles quits (~Achylles_@2804:431:d725:d87b:def0:5845:5ed6:f001) (Quit: Leaving) |
| 23:10:34 | → | BanUtama joins (~blake.rai@user/BanUtama) |
| 23:10:53 | × | haritz quits (~hrtz@user/haritz) (Remote host closed the connection) |
| 23:12:57 | × | alp_ quits (~alp@user/alp) (Ping timeout: 245 seconds) |
| 23:16:34 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 23:18:02 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:18:44 | × | noteness quits (~noteness@user/noteness) (Ping timeout: 268 seconds) |
| 23:18:44 | × | califax quits (~califax@user/califx) (Ping timeout: 268 seconds) |
| 23:18:52 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 23:18:52 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 23:18:52 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Read error: Connection reset by peer) |
| 23:18:52 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Write error: Connection reset by peer) |
| 23:18:52 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 23:18:52 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Read error: Connection reset by peer) |
| 23:19:03 | → | haritz joins (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) |
| 23:19:03 | × | haritz quits (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host) |
| 23:19:03 | → | haritz joins (~hrtz@user/haritz) |
| 23:19:14 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 23:19:18 | → | califax joins (~califax@user/califx) |
| 23:19:24 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 23:19:27 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 23:19:39 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 23:19:39 | → | noteness joins (~noteness@user/noteness) |
| 23:19:55 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:29:32 | → | gmg joins (~user@user/gehmehgeh) |
| 23:31:04 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds) |
| 23:32:41 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 23:36:49 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 23:40:03 | → | mikoto-chan joins (~mikoto-ch@164.5.249.78) |
| 23:40:43 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds) |
| 23:45:06 | → | adium joins (adium@user/adium) |
| 23:51:59 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
| 23:57:13 | × | merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
All times are in UTC on 2022-08-07.