Home liberachat/#haskell: Logs Calendar

Logs on 2022-12-10 (liberachat/#haskell)

00:04:58 × ozkutuk5 quits (~ozkutuk@176.240.173.153) (Ping timeout: 252 seconds)
00:11:19 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
00:11:37 OscarZ joins (~oscarz@95.175.104.30)
00:12:07 × Inoperable quits (~PLAYER_1@fancydata.science) (Quit: All your buffer are belong to us!)
00:13:16 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
00:15:03 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:16:30 bilbo joins (~root@64.251.77.178)
00:17:34 <bilbo> is it possible to query lambdabot? it seems to be ignoring me (but I also forgot how to talk to lambdabot even in-channel)
00:19:03 dekh^ joins (~caef@76.145.185.103)
00:19:30 <EvanR> I do this
00:19:44 <EvanR> /msg lambdabot :t id
00:20:15 <EvanR> /msg lambdabot @botsnack
00:21:36 <monochrom> For evaluating expressions, /msg lambdabot > 1+1
00:22:00 <monochrom> But it is expression only, "f x = x+1" is rejected.
00:22:20 <monochrom> And I don't understand it but most programmers think "> 1+1" means ">1+1"
00:22:21 <xerox> > "f x = x+1"
00:22:23 <lambdabot> "f x = x+1"
00:22:32 <monochrom> Ugh haha
00:22:35 xerox chuckles
00:22:43 <mauke> > var "f x = x+1"
00:22:45 <lambdabot> f x = x+1
00:23:48 × hueso quits (~root@user/hueso) (Ping timeout: 248 seconds)
00:25:57 <geekosaur> also note that libera disables /msg for unauth users by default to reduce spam; I don't think lambdabot has the umode setting to override that
00:26:16 <monochrom> Yikes.
00:27:08 <monochrom> In lieu of that, you can use all those commands in channel.
00:27:41 <monochrom> We still encourage using PM until you have something to show the channel.
00:29:05 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f)
00:29:17 <bilbo> oh maybe I should auth...
00:29:39 <bilbo> I don't have my password with me though :(
00:31:58 × tremon quits (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
00:32:32 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds)
00:32:58 × kuribas quits (~user@ptr-17d51epibvf1t5xp3ze.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
00:35:22 × Erutuon_ quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
00:36:33 Andrew13 joins (~Andrew@37.19.220.202)
00:37:12 <Andrew13> can anyone explain this "list literal" and how it's being used in this function?
00:37:21 <Andrew13> allSums :: [Int] -> [Int]
00:37:22 <Andrew13> allSums [] = [0]
00:37:22 <Andrew13> allSums (x:xs) = do
00:37:23 <Andrew13>   term <- [x,0]
00:37:23 <Andrew13>   sum <- allSums xs
00:37:24 <Andrew13>   pure $ term + sum
00:37:30 <geekosaur> please use a pastebin
00:38:39 <monochrom> Are you willing to exchange that for list comprehension? allSums (x:xs) = [ term + sum | term <- [x,0], sum <- allSums xs ]
00:39:00 <geekosaur> anyway: this function is using the list Monad instance. you can think of <- here as running the rest of the computation in parallel for each element of the list and combining the results
00:40:48 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:40:48 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:40:48 wroathe joins (~wroathe@user/wroathe)
00:40:53 <Andrew13> it's the [x,0] that I don't understand
00:41:01 <OscarZ> Hi.. I'm just an occasional Haskell user and I've always found Haskell type system cool and unique, even though I don't fully understand its power. I've recently got to use TypeScript in some projects and it seems really cool and versatile, however I've understood the type system of TypeScript is not that "rigorous" or "sound" as Haskell. Could someone who knows about these topics shed some light what kind of problems can you run into with TypeScript, but
00:41:02 <OscarZ> you are safe with Haskell?
00:41:11 razetime joins (~quassel@49.207.203.213)
00:41:13 <OscarZ> And also, what kind of things are more convenient with Haskell kind of type system vs. TypeScript
00:41:14 <EvanR> [x,0] is just a list of two things
00:42:02 <EvanR> that you can <- it is the kicker, it's translated to the >>= operator, which a method of the Monad class, like geekosaur was saying
00:42:13 <EvanR> which is*
00:42:31 <Andrew13> I've studied that part, it's binding it to term
00:42:52 <EvanR> in this case, it's "binding twice" xD
00:43:05 <EvanR> term is x, also it is 0 in another universe
00:43:14 <hpc> typescript is interesting because it's starting from "typical" javascript code, and tries to figure out how to give that types
00:43:36 <hpc> and that informs all of its design, and lets it go off in odd directions
00:43:37 <Andrew13> and that gets this result..how?
00:43:46 <EvanR> what's the result
00:44:06 <Andrew13> all the possible sums permutations with the list provided
00:44:30 <EvanR> yeah you split into multiple universes at each step, at the end all results from all universes combine
00:44:55 <hpc> i don't know where i would even start on trying to compare it, since they're so philosophically different, i think i would have an easier time comparing haskell to python even
00:44:56 <EvanR> it's possible some computations end in no results
00:46:17 <Andrew13> the hint they provided for this question was that a [True,False] literal could also be useful combined with do-notation
00:46:24 <Andrew13> though provided no context on how
00:46:51 <EvanR> it lets you try both possibilities
00:47:44 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
00:48:27 <OscarZ> hpc: Yes, I think we can agree that "typical" javascript code = jungle ... but still it seems to be quite powerful in giving order in that jungle. I'm not really an expert TypeScript programmer, but there seems to be some quite powerful constructs there and I've always felt a bit like "can this really work" but havent yet got into bad trouble..
00:48:50 <geekosaur> Andrew13, again: it runs the rest of the computation with one and then with the other
00:48:59 <geekosaur> and combines the results
00:50:02 <Andrew13> ok, I'll study it a bit more, thanks
00:50:14 <geekosaur> in this case it does so recursively because "the rest of the computation" starts with `sum <- allSums xs` (which itself splits into multiple computations)
00:50:59 <geekosaur> so each value in the original list is run with 0 and then with the actual value, and both results are produced at the end. and recursively for the rest of the list
00:51:31 <dsal> OscarZ: I've never got the appeal of typescript. It feels like painting over rotten wood.
00:51:35 <OscarZ> hpc: Just looking for some insights on what are the differences between Haskell and TypeScript kind of type system (whats it even called) in real life
00:51:55 <geekosaur> this does get a bit mind-bending; the list monad (sometimes called the nondeterminacy monad because of this behavior) is often difficult for people to understand, because of this "forking" behavior
00:52:13 <dsal> There's Elm and PureScript and stuff like ReScript and even Haskell.
00:52:25 <geekosaur> so let's start with [1,2,3]
00:52:30 <Andrew13> ok I have an instructor-led class tomorrow, I'll try asking him to break it down
00:52:43 <Andrew13> or if you can?
00:52:43 <geekosaur> okay
00:53:15 <geekosaur> I can but it's a bit involved. lemme see if I can write it up in a pastebin rather than spamming the channel especially while another discussion is also going on
00:53:25 <Andrew13> ok thank you
00:54:00 <EvanR> TypeScript managed to take javascript, add a type system, and still retained the "wtf" of javascript
00:54:04 <OscarZ> dsal, I felt bad painting it haha.. but maybe I'm looking more like typical scenarious where you get in trouble with it..
00:56:14 <dsal> OscarZ: There's a bit of a gap here. Part of it depends on what kinds of things you do with JavaScript. How many things can you make impossible?
00:59:35 money is now known as Guest7643
00:59:35 money_ is now known as money
00:59:54 <OscarZ> dsal, I think the usual things in JavaScript world are like describing what are the properties of objects and signatures of functions.. and you have some kind of type parameter thing going on as well.
01:01:48 <dsal> I guess the problem with that is that you're pretty limited in how you can think about problems.
01:02:51 <OscarZ> dsal, in what way, can you give some example?
01:03:04 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
01:03:07 <mauke> > filterM (\_ -> [True]) ["a", "b", "c"]
01:03:09 <lambdabot> [["a","b","c"]]
01:03:28 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
01:03:28 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
01:03:28 wroathe joins (~wroathe@user/wroathe)
01:04:24 <dsal> OscarZ: I don't know much about TypeScript. I think that's the gap. heh
01:04:49 <geekosaur> maybe I should just ask someone else to do this 🙂
01:05:05 <geekosaur> I'm confusing myself as I go :upside_down_smile:
01:05:19 <monochrom> This is why I would rather explain list comprehension instead. :)
01:05:51 <dsal> @undo [ not t | t <- [False..]]
01:05:51 <lambdabot> <unknown>.hs:1:24:Parse error: ]
01:05:54 <dsal> @undo do [ not t | t <- [False..]]
01:05:54 <lambdabot> <unknown>.hs:1:27:Parse error: ]
01:05:55 <Andrew13> no worries if it's too much trouble
01:06:08 <dsal> @undo do [ not t | t <- [False ..]]
01:06:08 <lambdabot> concatMap (\ t -> [not t]) [False ..]
01:06:11 <geekosaur> False.. runs into a parse issue
01:06:16 <Andrew13> my understanding is list comprehension is just syntactical sugar for this list monad?
01:06:19 <dsal> Yeah, I always forget that.
01:06:28 <dsal> That undo isn't super helpful, though.
01:06:31 <geekosaur> it can be
01:06:41 <geekosaur> more often it desugars to map and filter
01:06:46 <monochrom> A simple example like [x+y | x<-[a,b], y<-[d,e,f]] = [a+d, a+e, a+f, b+d, b+e, b+f] gives most students enough to extrapolate the general case.
01:06:58 <geekosaur> with MonadComprehensions it's syntax sugar
01:07:31 <mauke> > [x+y | x<-[a,b], y<-[d,e,f]]
01:07:32 <lambdabot> [a + d,a + e,a + f,b + d,b + e,b + f]
01:07:34 <monochrom> Equivalently I can just cite "python has list comprehension too" and usually that's the end of the story.
01:07:37 <EvanR> type system philosophy 1, the master language can do anything. Apply types gradually to eliminate a few unwanted possibilities. 2, there is no master language. Apply types to do anything, ideally stuff you want
01:07:54 Erutuon_ joins (~Erutuon@user/erutuon)
01:07:58 <EvanR> subtractive synthesis, additive synthesis
01:08:14 <monochrom> Whoever inflicted do-notation on absolute beginners is a criminal.
01:08:29 <EvanR> a smooth criminal?
01:09:51 <OscarZ> dsal, no probs... I have a feeling not many people who are fluent in Haskell like go "back" in TypeScript as it exists in the JS jungle.. but I'm sure some people might have some insight what this "unsound" type system might lead into
01:10:24 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:10:55 <dsal> OscarZ: A fun one I've got at work is a type that parses and/or serializes fixed-width fields. There's a type parameterized by a number N such that a parser function that doesn't consume exactly N characters will fail to compile. Similar on the serialization. If the function is capable of producing anything other than exactly N characters, it will fail to compile.
01:11:46 <EvanR> in the theory/practice of abstract data types, when you have a type T it comes with guarantees. The guarantees come from the type system ensuring you can only interact with the ADT in certain ways. I'm not sure type script has this
01:12:14 <OscarZ> dsal, that's cool.. pretty sure not possible in TypeScript
01:13:15 <EvanR> that is, you can always "break in" to the implementation of some object
01:13:22 <dsal> Outside of what's possible, there's also the culture. I found that someone did implement `foldMap` in TS, but like… do people use it?
01:13:38 × zant2 quits (~zant@62.214.20.26) (Ping timeout: 268 seconds)
01:14:48 <monochrom> EvanR: But even in Haskell, that is done by the module system limiting exports, rather than the type system. So this is only a critique on typescript following javascript in having no module system.
01:14:59 <OscarZ> the problem might be that I don't really grasp the power of Haskell type system as I havent really worked with it, only played with it a bit :) but that is a good example dsal
01:15:23 <dsal> I'm trying to see what people do in TypeScript. e.g. this thing: https://codewithstyle.info/advanced-functional-programming-in-typescript-maybe-monad/
01:15:46 <dsal> Like, you *can* do it, but that looks like so much work I'd be surprised if it gets used much.
01:15:51 <EvanR> yeah maybe 50 to 75% of the benefit of haskell is the perspective xD
01:16:02 <EvanR> since the type system isn't fool proof
01:16:31 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:18:02 <dminuoso> monochrom: JavaScript has modules.
01:18:11 <dminuoso> Or well, ECMAScript does
01:18:13 <dsal> > do { a <- readMaybe "3"; b <- readMaybe "7"; pure (a * b) } -- in Haskell, we have syntax that makes it easy to do that without lots of things that look like function calls sticking stuff together.
01:18:14 <lambdabot> Just 21
01:19:04 <monochrom> I don't teach do-notation to my students, but even >>= beats prefix notation.
01:19:57 <monochrom> This strangely credits Haskell and SML etc allowing user-definable infix non-alphanumeric operators.
01:20:36 <OscarZ> Good stuff... I can definitely understand the "you *can* do it" but its horror point...
01:22:04 <dminuoso> Im quite jealous about agda mixfix operators.
01:22:52 <dminuoso> Not that I want to know how the parser must be written to allow this, nor do I want the headache of making sense of code using it.. but it looks fun.
01:23:50 <dminuoso> (But the implementation is probably somewhere akin to how infixr/infixl works, and executing fixup passes after initial parsing is done..)
01:23:51 <monochrom> Non-abused mixfix operators are easy to make sense of. (Great tautology haha.)
01:28:10 <OscarZ> This was quite interesting https://www.typescriptlang.org/docs/handbook/2/conditional-types.html
01:29:24 <dsal> OscarZ: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
01:30:03 Lycurgus joins (~juan@user/Lycurgus)
01:30:16 <EvanR> reading that as conditional type safety xD
01:31:10 <OscarZ> Thanks I'll read that, seems interesting
01:31:56 <dsal> OscarZ: It's a helpful thing in any language, though it's not as easy to enforce in many.
01:38:06 SyntaxAnomaly joins (~Haskell@184.151.230.80)
01:38:24 tomokojun_ joins (~tomokojun@37.19.221.147)
01:40:23 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
01:40:32 × tomokojun quits (~tomokojun@37.19.221.173) (Ping timeout: 256 seconds)
01:40:39 <dsal> I'm not sure how much comes down to what people would actually do, though. Are people going to do a fold when it's a lot of work to write a lambda and you can't curry when you could just use a for loop instead?
01:40:57 king_gs joins (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c)
01:41:11 tomokojun_ is now known as tomokojun
01:42:00 <dsal> Like this example: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce -- that's just like, `foldr (+)` in haskell.
01:43:50 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
01:44:00 califax joins (~califax@user/califx)
01:45:12 × SyntaxAnomaly quits (~Haskell@184.151.230.80) (Read error: Connection reset by peer)
01:45:56 Haskell joins (~Haskell@node-1w7jr9umyj0lsx4k07h370qrp.ipv6.telus.net)
01:51:29 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:53:00 × dekh^ quits (~caef@76.145.185.103) (Remote host closed the connection)
01:55:20 <maerwald[m]> If you can't use curry, just use sugar
01:56:23 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.7.1)
01:56:24 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
01:57:28 × Guest75 quits (Guest75@2a01:7e01::f03c:92ff:fe5d:7b18) (Ping timeout: 260 seconds)
02:02:26 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
02:02:29 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
02:03:33 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:04:18 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
02:04:33 <OscarZ> Thanks dsal, EvanR & folks.. exactly the kind of insight I was looking for.. I need to chew a bit on that article, interesting links in there too and I'll get back to you if I can formulate some meaningful questions out of them :)
02:08:20 × bilbo quits (~root@64.251.77.178) (Quit: Lost terminal)
02:10:18 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
02:12:22 × OscarZ quits (~oscarz@95.175.104.30) (Quit: Leaving)
02:14:08 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
02:14:53 × masterbu1lder quits (~master@user/masterbuilder) (Quit: Lost terminal)
02:17:39 masterbuilder joins (~master@user/masterbuilder)
02:17:56 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
02:18:11 × Sauvin quits (~sauvin@user/Sauvin) (Ping timeout: 264 seconds)
02:21:33 Sauvin joins (~sauvin@user/Sauvin)
02:21:41 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
02:23:02 × Haskell quits (~Haskell@node-1w7jr9umyj0lsx4k07h370qrp.ipv6.telus.net) (Ping timeout: 256 seconds)
02:23:23 Haskell joins (~Haskell@184.151.230.220)
02:24:10 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds)
02:24:58 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
02:26:18 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:27:05 × son0p quits (~ff@2604:3d08:5b7f:5540::a58f) (Ping timeout: 246 seconds)
02:32:06 × Haskell quits (~Haskell@184.151.230.220) (Ping timeout: 256 seconds)
02:35:57 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
02:39:21 × Erutuon_ quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds)
02:43:11 <EvanR> mauke, in data Parser a = Succeed a | Consume (Char -> Parser a) | Fail String, I'm having trouble implementing something like `many' without consuming too much input on the last success. You said there was no explicit backtracking. Can you not even do 1 lookahead?
02:44:16 <EvanR> should there be a Peek (Char -> Parser a) added
02:47:36 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
02:48:43 ChaiTRex joins (~ChaiTRex@user/chaitrex)
02:49:24 × ddellacosta quits (~ddellacos@143.244.47.100) (Quit: WeeChat 3.7.1)
02:50:33 lisbeths_ joins (uid135845@id-135845.lymington.irccloud.com)
02:50:54 ddellacosta joins (~ddellacos@143.244.47.76)
02:54:38 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
02:54:38 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
02:55:32 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
02:56:26 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
02:56:26 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
02:56:58 × Techcable quits (~Techcable@user/Techcable) (Ping timeout: 260 seconds)
03:04:40 × codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
03:12:00 × nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat)
03:12:47 × king_gs quits (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c) (Ping timeout: 264 seconds)
03:14:49 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
03:17:46 chexum joins (~quassel@gateway/tor-sasl/chexum)
03:18:43 stiell joins (~stiell@gateway/tor-sasl/stiell)
03:18:57 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
03:19:08 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
03:20:06 × money quits (~money@user/polo) (Quit: money)
03:21:55 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:22:36 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:23:31 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
03:24:29 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:24:34 ec_ joins (~ec@gateway/tor-sasl/ec)
03:24:51 nek0 joins (~nek0@2a01:4f8:222:2b41::12)
03:30:22 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:30:25 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:31:55 Erutuon_ joins (~Erutuon@user/erutuon)
03:34:02 money joins (~money@user/polo)
03:37:01 × money quits (~money@user/polo) (Client Quit)
03:37:23 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
03:38:15 money joins (~money@user/polo)
03:39:38 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
03:40:17 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:42:00 × td_ quits (~td@83.135.9.40) (Ping timeout: 260 seconds)
03:43:06 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
03:43:51 td_ joins (~td@83.135.9.5)
03:44:30 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
03:50:01 codaraxis joins (~codaraxis@user/codaraxis)
03:52:57 × money quits (~money@user/polo) (Ping timeout: 256 seconds)
03:56:25 stiell joins (~stiell@gateway/tor-sasl/stiell)
04:13:17 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
04:14:33 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
04:15:45 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
04:24:12 codaraxis__ joins (~codaraxis@user/codaraxis)
04:24:14 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
04:27:34 × codaraxis quits (~codaraxis@user/codaraxis) (Read error: Connection reset by peer)
04:38:10 <davean> Does anyone here know off the top of their head if there is a package on hackage the generates unrolled loops for foldl' (or equiv) for small, known size, sequences?
04:38:12 son0p joins (~ff@2604:3d08:5b7f:5540:98a9:2169:15a1:4c7f)
04:39:10 <dsal> I have movement in 297 snakes with my input.
04:39:20 <dsal> Oops, wrong channel.
04:42:07 <sm> intriguing! I would watch this movie
04:42:17 <int-e> snakes on a plane?
04:42:25 <EvanR> SNAAAAAAAAAAKE
04:42:48 <int-e> sm: (pretty sure they already made that movie)
04:44:19 <monochrom> https://www.imdb.com/title/tt0417148/?ref_=nv_sr_srsg_0 or https://en.wikipedia.org/wiki/Snakes_on_a_Plane
04:46:23 × RedSwan quits (~jared@174-23-134-43.slkc.qwest.net) (Ping timeout: 268 seconds)
04:49:19 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
04:51:05 <EvanR> they made a sequel, but it should have been Planes on a Snake
04:51:22 <dsal> Snacks on a Plain
04:52:11 <monochrom> What is the sequel?
04:52:26 <monochrom> Is it just something like "snakes on a plane 2"?
04:52:37 <Rembane> Snakes in space!
04:52:50 <dsal> Needs more aaaaas
04:52:50 <monochrom> haha
04:53:36 <monochrom> Oh, I know. In the good spirit of TypeInType, Snakes in Snakes.
04:54:10 <Rembane> {-# LANGUAGE SNAKEINSNAAAAAAAAAAAAAAAAAKE #-}
04:54:12 tvandinther joins (~tvandinth@121.98.23.103)
04:54:12 <int-e> It's not a worthy sequel if it doesn't have a space pirate princess
04:54:32 <EvanR> apparently there was never a sequel?
04:55:38 <EvanR> was Python on a Plane ever a webframework?
04:55:49 <monochrom> Topology-inspired sequel: Snakes on a Torus.
04:55:54 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
04:55:57 <tvandinther> Hey, I'm a little confused on how to compose functions for sorting. I want to sort a list based on a mapping in descending order using `sortOn` but I am not sure how to compose `f :: a -> b` and `Down` to sort `[a]`
04:56:11 <dsal> :t sortOn
04:56:12 <lambdabot> Ord b => (a -> b) -> [a] -> [a]
04:56:20 <EvanR> :t Down
04:56:21 <lambdabot> a -> Down a
04:56:36 <int-e> monochrom: Time to refresh my memory on the spelling of "Ouroboros".
04:56:56 <dsal> > sortOn Down "abcdef"
04:56:58 <lambdabot> "fedcba"
04:57:09 <dsal> tvandinther: Which part is confusing you?
04:57:21 <int-e> > let ouroboros = cycle in ouroboros "ha"
04:57:22 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
04:57:22 <lambdabot> "hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahah...
04:57:24 <tvandinther> oh man its obvious now
04:57:32 <tvandinther> `sortOn Down . f`
04:57:33 <Rembane> int-e: My favourite spelling is wrong but consistent: OOROOBOOROOS
04:57:55 <monochrom> Do you mean sortOn (Down . f) ?
04:58:04 <tvandinther> yes, I do
04:58:05 <tvandinther> oops
04:59:01 <monochrom> Is Ouroboros a Möbius strip? :)
04:59:10 <monochrom> :8
05:01:18 × Andrew13 quits (~Andrew@37.19.220.202) (Quit: Client closed)
05:10:55 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
05:14:16 × tvandinther quits (~tvandinth@121.98.23.103) (Quit: Client closed)
05:17:55 aeroplane joins (~user@user/aeroplane)
05:19:26 <int-e> monochrom: I suspect that's up to the artist
05:20:16 <int-e> > cycle "counting"
05:20:18 <lambdabot> "countingcountingcountingcountingcountingcountingcountingcountingcountingcou...
05:20:53 × Lears quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
05:20:58 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
05:21:29 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
05:22:13 [Leary] joins (~Leary]@user/Leary/x-0910699)
05:25:38 king_gs joins (~Thunderbi@187.201.150.200)
05:27:12 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
05:28:06 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
05:30:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
05:32:28 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:32:52 <aeroplane> Hello all, I have read that you use '$' sign in order to avoid writing parenthesis, but I cant figure out about why this works
05:32:55 <aeroplane> λ> putStr $ "len " ++ show (length [1..5])
05:33:07 <aeroplane> but this doesnt \n putStr $ "len " ++ show $ length [1..5]
05:34:06 <int-e> aeroplane: $ has the lowest possible precedence, so this is parsed as (putStr $ "len " ++ show) $ (length [1..5])
05:34:59 <dolio> It's also right-associative.
05:35:10 <int-e> aaaaaargh
05:35:32 <int-e> right. putStr $ (("len " ++ show) $ (length [1..5]))
05:35:50 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
05:35:58 <int-e> Sorry, that should not have happened.
05:36:44 <aeroplane> Thanks, I think I need to study the basics
05:36:57 <int-e> Anyway, the length [1..5] subexpression is not the argument of `show`.
05:37:50 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 246 seconds)
05:39:50 <monochrom> I write parentheses to avoid getting confused by $.
05:40:28 <[Leary]> capitalism strikes again
05:41:03 <monochrom> The Parenthism Manifesto :)
05:41:54 <monochrom> Programming is the dialectic class struggle between implementers and users. Just like ( and ) opposing each other and yet of the same nature.
05:42:36 <monochrom> OK that becomes simply Taoism pretty quickly. :)
05:45:40 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
05:46:53 <monochrom> But I confess that sometimes I use $! to avoid nonstrictness. :)
05:46:55 <int-e> monochrom: I use $ mostly for functions that are (almost) always at the beginning of expressions or statements and take a single argument. `pure`, `putStr`. Oh and for the second argument of `forM`.
05:47:36 <monochrom> Sure. Basically when the whole expression has only one infix $ it's OK.
05:48:06 <int-e> I also do f . g . h $ x ...basically when composing more than two functions, I think the parentheses are too heavy.
05:48:21 Haskell joins (~Haskell@node-1w7jr9umyj0lsx4k07h370qrp.ipv6.telus.net)
05:48:28 × Haskell quits (~Haskell@node-1w7jr9umyj0lsx4k07h370qrp.ipv6.telus.net) (Remote host closed the connection)
05:48:52 <monochrom> But by the time you have 2, 50% of the time it does the opposite of what you want, namely, 50% of the time the associativity works against you. And how many people actually remembers its associativity?
05:49:03 <int-e> (Also, while I got the parsing wrong above (no excuse for that), I don't get it wrong when writing Haskell :P)
05:49:23 <monochrom> Hence, I use parentheses to avoid getting confused by $.
05:49:39 <int-e> I certainly don't go out of my way to use $ as much as possible.
05:50:10 int-e shrugs.
05:50:34 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
05:51:42 <monochrom> For the next level of controversy, consider BlockArguments vs $. >:)
05:52:08 <DigitalKiwi> П> (☭)=($) ; infixr 0 ☭
05:52:09 <DigitalKiwi> П> putStr ☭ "len " ++ show (length [1..5])
05:52:09 <monochrom> for_ xs $ \x -> ... vs for_ xs \x -> ...
05:52:11 <DigitalKiwi> len 5П>
05:55:00 × king_gs quits (~Thunderbi@187.201.150.200) (Read error: Connection reset by peer)
05:55:02 king_gs1 joins (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c)
05:57:20 king_gs1 is now known as king_gs
05:59:09 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
06:01:12 × ddellacosta quits (~ddellacos@143.244.47.76) (Ping timeout: 256 seconds)
06:02:50 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
06:03:28 × Erutuon_ quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
06:05:54 money joins (~money@user/polo)
06:09:31 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
06:18:18 Inst_ joins (~Inst@c-98-208-218-119.hsd1.fl.comcast.net)
06:22:24 × money quits (~money@user/polo) (Quit: money)
06:31:32 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
06:31:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
06:31:59 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
06:32:26 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
06:32:53 califax joins (~califax@user/califx)
06:33:12 chexum joins (~quassel@gateway/tor-sasl/chexum)
06:33:47 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
06:33:47 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
06:34:11 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
06:34:14 ChaiTRex joins (~ChaiTRex@user/chaitrex)
06:34:55 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
06:47:32 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
06:48:48 stiell joins (~stiell@gateway/tor-sasl/stiell)
06:51:32 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
06:51:49 × foul_owl quits (~kerry@157.97.134.158) (Read error: Connection reset by peer)
06:51:59 stiell joins (~stiell@gateway/tor-sasl/stiell)
07:11:49 foul_owl joins (~kerry@174-21-75-230.tukw.qwest.net)
07:14:44 × phma quits (phma@2001:5b0:212a:a8b8:8561:6792:7340:d9af) (Read error: Connection reset by peer)
07:15:45 phma joins (phma@2001:5b0:215a:c6f8:290c:9583:a7f8:18f1)
07:20:55 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
07:27:12 money joins (~money@user/polo)
07:32:28 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
07:32:52 chexum joins (~quassel@gateway/tor-sasl/chexum)
07:35:29 × jargon quits (~jargon@174-22-192-24.phnx.qwest.net) (Ping timeout: 252 seconds)
07:35:39 × money quits (~money@user/polo) (Ping timeout: 256 seconds)
07:38:19 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
07:38:21 takuan joins (~takuan@178-116-218-225.access.telenet.be)
07:46:56 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
07:47:03 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:47:30 ec_ joins (~ec@gateway/tor-sasl/ec)
07:48:03 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
07:49:21 × AlexZenon quits (~alzenon@178.34.151.8) (Quit: ;-)
07:49:24 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
07:50:01 × Alex_test quits (~al_test@178.34.151.8) (Quit: ;-)
07:50:11 × AlexNoo quits (~AlexNoo@178.34.151.8) (Quit: Leaving)
07:53:42 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
07:55:02 gmg joins (~user@user/gehmehgeh)
07:59:46 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
08:00:32 gmg joins (~user@user/gehmehgeh)
08:08:42 × foul_owl quits (~kerry@174-21-75-230.tukw.qwest.net) (Ping timeout: 256 seconds)
08:11:57 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
08:14:56 × bilegeek quits (~bilegeek@2600:1008:b081:6315:4a6c:8d52:e369:5a2e) (Quit: Leaving)
08:16:47 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds)
08:20:05 acidjnk joins (~acidjnk@p200300d6e7137a605449a7b5e6225820.dip0.t-ipconnect.de)
08:21:59 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
08:22:37 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
08:23:22 foul_owl joins (~kerry@71.212.143.88)
08:27:20 × tomokojun quits (~tomokojun@37.19.221.147) (Quit: じゃあね〜。)
08:32:41 bilegeek joins (~bilegeek@2600:1008:b081:6315:4a6c:8d52:e369:5a2e)
08:38:34 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
08:46:59 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
08:47:26 califax joins (~califax@user/califx)
08:50:55 <carbolymer> why am I getting `variable not in scope: x` here: https://bpa.st/PT2Q ?
08:51:56 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
08:53:25 <darkling> Because x isn't defined anywhere. You probably want _x, which is the accessor function for the _x element of Foo.
08:54:51 <carbolymer> darkling: it's defined by `makeLenses`
08:54:52 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
08:54:58 <darkling> (Unless I'm missing some magic that turns the _x definition into an x accessor)
08:55:07 <carbolymer> oh evaluation order matters when using TH
08:55:18 <carbolymer> I need to reder stuff here...
08:55:25 <darkling> I just spotted the TemplateHaskell at the top, so that's well past my abilities now. :)
08:55:30 money joins (~money@user/polo)
08:57:34 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
08:59:27 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
09:02:13 <carbolymer> pointfree.io is gone?
09:04:14 <carbolymer> oh there's lambdabot
09:04:22 <carbolymer> @pl >>= . pure
09:04:22 <lambdabot> (line 1, column 1):
09:04:22 <lambdabot> unexpected ">"
09:04:22 <lambdabot> expecting white space, "()", natural, identifier, lambda abstraction or expression
09:04:38 <carbolymer> @pl >>= pure
09:04:38 <lambdabot> (line 1, column 1):
09:04:38 <lambdabot> unexpected ">"
09:04:38 <lambdabot> expecting white space, "()", natural, identifier, lambda abstraction or expression
09:11:20 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
09:16:49 × money quits (~money@user/polo) (Quit: money)
09:19:35 <aeroplane> Is it possible for this simple code to be further minimized?
09:19:38 <aeroplane> http://ix.io/4icF/haskell
09:21:58 <aeroplane> It looks a lot like imperative code
09:23:30 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 256 seconds)
09:23:58 <davean> Today in Haskell, random segfaults.
09:28:43 × nonzen_ quits (~nonzen@user/nonzen) (Ping timeout: 248 seconds)
09:28:47 × sajith quits (~sajith@user/sajith) (Ping timeout: 252 seconds)
09:29:49 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
09:30:52 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
09:31:08 jakalx joins (~jakalx@base.jakalx.net)
09:31:39 × Inst_ quits (~Inst@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
09:32:28 nonzen joins (~nonzen@user/nonzen)
09:33:00 sajith joins (~sajith@user/sajith)
09:35:30 <int-e> :t getLine
09:35:32 <lambdabot> IO String
09:37:37 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
09:42:04 <aeroplane> int-e: I know that, I was just interested to know, that whether it can be reduced to a one liner and without using getLine or hGetLine
09:43:59 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
09:44:14 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
09:47:13 <[Leary]> aeroplane: It can if you write and use, say, `untilM :: Monad m => m a -> (a -> m Bool) -> m [a]`.
09:49:01 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
09:52:42 Axma61595 joins (~Axman6@user/axman6)
09:54:27 × Axman6 quits (~Axman6@user/axman6) (Ping timeout: 240 seconds)
09:58:08 × potash_ quits (~foghorn@94.225.47.8) (Excess Flood)
10:00:17 potash joins (~foghorn@user/foghorn)
10:06:58 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
10:07:07 elevenkb joins (~elevenkb@105.224.37.83)
10:11:55 kenran joins (~user@user/kenran)
10:13:44 × kenran quits (~user@user/kenran) (Remote host closed the connection)
10:16:12 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
10:16:47 Axma61595 is now known as Axman6
10:17:20 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
10:17:36 <carbolymer> aeroplane: sth like that: https://bpa.st/IDUQ ?
10:22:09 Guest3029 joins (~Guest30@188.168.24.7)
10:23:39 × elevenkb quits (~elevenkb@105.224.37.83) (Quit: Client closed)
10:24:48 money joins (~money@user/polo)
10:25:23 <Guest3029> hi, why 'comp [(1, [2]), (2, [1])]' where
10:25:24 <Guest3029> 'comp :: [(a, [a])] -> [[a]]
10:25:24 <Guest3029> comp l@[(x, [y])] = map (\ (x, [y]) -> [x, y]) l'
10:25:25 <Guest3029> get error Non-exhaustive patterns in function comp, but
10:25:25 <Guest3029> map (\ (x, [y]) -> [x, y]) [(1, [2]), (2, [1])] is OK
10:27:47 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 264 seconds)
10:27:54 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
10:28:35 × bilegeek quits (~bilegeek@2600:1008:b081:6315:4a6c:8d52:e369:5a2e) (Quit: Leaving)
10:32:09 × Guest3029 quits (~Guest30@188.168.24.7) (Quit: Client closed)
10:32:12 elevenkb joins (~elevenkb@105.224.37.83)
10:33:34 Inst_ joins (~Inst@c-98-208-218-119.hsd1.fl.comcast.net)
10:34:58 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
10:37:56 × money quits (~money@user/polo) (Quit: money)
10:40:00 × acidjnk quits (~acidjnk@p200300d6e7137a605449a7b5e6225820.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
10:40:25 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
10:50:18 money joins (~money@user/polo)
10:54:55 acidjnk joins (~acidjnk@p200300d6e7137a605449a7b5e6225820.dip0.t-ipconnect.de)
10:55:41 × money quits (~money@user/polo) (Read error: Connection reset by peer)
11:03:18 <DigitalKiwi> lolwut
11:03:20 <DigitalKiwi> https://hackage.haskell.org/packages/search?terms=exif
11:03:43 <DigitalKiwi> https://hackage.haskell.org/package/exiftool
11:03:50 <DigitalKiwi> how is that not on the search result page
11:04:52 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
11:07:11 × king_gs quits (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c) (Ping timeout: 260 seconds)
11:07:17 <DigitalKiwi> Hecate: lol https://flora.pm/search?q=exif 20 results! flora is now > hackage
11:07:39 <maerwald> written in the 90s
11:08:18 <maerwald> flora seems to over-match
11:08:24 <DigitalKiwi> some awfully fuzzy matching going on here lol
11:09:38 <DigitalKiwi> what's kind of funny/sad about the hackage one is i looked for exif libraries a few days ago and came to the conclusion there weren't any good ones :P
11:10:11 <DigitalKiwi> the only one i wanted to find doesn't show up in search lol
11:10:42 <DigitalKiwi> shows up on bing...
11:15:15 <aeroplane> [Leary]: thanks
11:15:48 <aeroplane> carbolymer: thanks, yeah somethin like that
11:16:00 pagnol joins (~user@92-64-37-85.biz.kpn.net)
11:16:12 <pagnol> Is there a version of foldM that accumlates the steps?
11:19:47 money joins (~money@user/polo)
11:23:53 × money quits (~money@user/polo) (Client Quit)
11:26:09 <pagnol> ah, just saw that those are called scan
11:26:32 Guest6 joins (~Guest6@86.63.50.105)
11:26:55 × Guest6 quits (~Guest6@86.63.50.105) (Client Quit)
11:30:14 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f) (Remote host closed the connection)
11:34:33 <dminuoso> monochrom: (☭) is almost certainly *left* associative.
11:34:42 <carbolymer> :D
11:34:47 king_gs joins (~Thunderbi@187.201.150.200)
11:36:18 <pagnol> let's not talk about the right associative one
11:37:51 <carbolymer> are both annihilation operators?
11:38:16 <DigitalKiwi> $ is the right associative one no?
11:39:10 <dminuoso> That's not the one we are talking about, DigitalKiwi.
11:39:25 <dminuoso> Was just making a little political pun
11:39:54 <pagnol> they're often used together though
11:39:55 <Franciman> they were talking about the Littorian Fasces operator
11:39:56 <carbolymer> but DigitalKiwi is right
11:40:21 × use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
11:40:40 use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
11:41:27 <DigitalKiwi> https://twitter.com/ArchKiwi/status/1589808069433004032
11:41:29 <DigitalKiwi> hehe
11:41:35 × ft quits (~ft@p508dbd59.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
11:42:06 <carbolymer> ah yes, mad Stephen
11:42:35 <dminuoso> Not sure sure about that comparison
11:43:20 ft joins (~ft@p4fc2a257.dip0.t-ipconnect.de)
11:43:39 <DigitalKiwi> almost every critique stephen has of crypto applies to capitalism just as well lol
11:45:13 kuribas joins (~user@ptr-17d51ensnhliua7uirq.18120a2.ip6.access.telenet.be)
11:48:37 <pagnol> I'm looking for a variant of foldM that accumulates the steps and saw that the foldl package has a scanM which seems to do that, but somehow it requires use of StateT. Is there perhaps a more sraightforward way?
11:49:21 <dminuoso> mapAccumL ?
11:49:56 <dminuoso> Though amusingly that uses StateL internally too :p
11:50:08 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
11:50:09 <dminuoso> But that's nothing you need to worry about
11:50:10 Techcable joins (~Techcable@user/Techcable)
11:50:52 <pagnol> hmm I didn't know about mapAccumL, looks like what I'm looking for, thanks
11:53:14 <davean> dminuoso: well, I mean any implimentation will because the core idea is a state one, it might just not say it.
11:54:39 <dminuoso> davean: Sure, I just thought it was slightly amusing due to their comment about foldM requiring to use StateT.
11:54:43 × king_gs quits (~Thunderbi@187.201.150.200) (Read error: Connection reset by peer)
11:54:55 <pagnol> hm, I think mapAccumL is almost what I need. In my case the f returns an (m (s, b))
11:55:33 king_gs joins (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c)
11:55:43 <pagnol> the m is an Either
11:56:22 <dminuoso> Either handle the state passing manually or use StateT then
11:57:11 <pagnol> ok
11:58:30 <DigitalKiwi> get rid of the state you say
11:59:11 <carbolymer> state bad
12:01:13 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
12:02:23 × pagnol quits (~user@92-64-37-85.biz.kpn.net) (Ping timeout: 265 seconds)
12:06:35 wootehfoot joins (~wootehfoo@user/wootehfoot)
12:06:42 × king_gs quits (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c) (Ping timeout: 256 seconds)
12:07:30 Pickchea joins (~private@user/pickchea)
12:12:31 zant2 joins (~zant@62.214.20.26)
12:14:35 <DigitalKiwi> https://twitter.com/ArchKiwi/status/1494761627903840267
12:19:59 × danza quits (~francesco@4.red-79-153-154.dynamicip.rima-tde.net) (Ping timeout: 246 seconds)
12:22:17 money joins (~money@user/polo)
12:22:28 × foul_owl quits (~kerry@71.212.143.88) (Ping timeout: 252 seconds)
12:23:47 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
12:27:20 × money quits (~money@user/polo) (Quit: money)
12:30:09 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
12:30:43 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f)
12:33:19 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
12:35:24 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
12:35:25 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:cc2a:ce80:f3c:358f) (Ping timeout: 256 seconds)
12:38:04 foul_owl joins (~kerry@193.29.61.77)
12:39:59 Guest75 joins (Guest75@2a01:7e01::f03c:92ff:fe5d:7b18)
12:40:34 × use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
12:40:53 use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
12:42:38 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
12:54:02 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
12:54:29 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
12:58:04 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
12:59:11 ec_ joins (~ec@gateway/tor-sasl/ec)
13:01:06 × Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds)
13:02:14 × zant2 quits (~zant@62.214.20.26) (Ping timeout: 260 seconds)
13:15:58 causal joins (~user@50.35.85.7)
13:20:13 <jackdk> Your handle betrays you.
13:27:30 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
13:31:46 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
13:38:16 money joins (~money@user/polo)
13:38:38 kilolympus joins (~kilolympu@213.144.144.24)
13:41:56 × use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
13:42:15 use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
13:44:57 tremon joins (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl)
13:53:02 <DigitalKiwi> but it's a really cool logo
13:53:49 <DigitalKiwi> https://www.redbubble.com/i/sticker/Kiwi-on-Kiwi-Avatar-by-MostlyAbsurd/126038830.EJUG5 isn't as cool :(
13:54:09 danza joins (~francesco@128.red-79-152-194.dynamicip.rima-tde.net)
13:56:19 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
13:58:12 Erutuon_ joins (~Erutuon@user/erutuon)
14:05:43 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
14:06:24 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
14:10:01 hsw_ joins (~hsw@112-104-142-182.adsl.dynamic.seed.net.tw)
14:10:06 jespada joins (~jespada@nmal-24-b2-v4wan-166357-cust1764.vm24.cable.virginm.net)
14:11:23 × hsw quits (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) (Ping timeout: 248 seconds)
14:13:04 × acidjnk quits (~acidjnk@p200300d6e7137a605449a7b5e6225820.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
14:24:53 × money quits (~money@user/polo) (Quit: money)
14:27:49 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:28:19 × lottaquestions quits (~nick@2607:fa49:503e:7100:fd99:63e8:8bc:5217) (Remote host closed the connection)
14:28:46 lottaquestions joins (~nick@2607:fa49:503e:7100:80c9:a594:75a5:27d3)
14:32:54 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:44ff:72e2:5072:e2ac)
14:37:39 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:44ff:72e2:5072:e2ac) (Ping timeout: 260 seconds)
14:37:53 Lycurgus joins (~juan@user/Lycurgus)
14:39:06 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
14:41:35 × danza quits (~francesco@128.red-79-152-194.dynamicip.rima-tde.net) (Ping timeout: 264 seconds)
14:44:11 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
14:45:11 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
14:46:05 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
14:46:32 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
14:46:32 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
14:51:34 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:59:15 money joins (~money@user/polo)
14:59:54 × elevenkb quits (~elevenkb@105.224.37.83) (Quit: Client closed)
15:02:01 <darkling> Is there a function or simple syntax for generating an (infinite) list of integers with a skip in them? Say, something like map (\x -> 2+3*x) [1..] only without having to build the equation...
15:02:18 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
15:03:16 <int-e> > [5,8..]
15:03:17 <lambdabot> [5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80...
15:03:20 acidjnk joins (~acidjnk@p200300d6e7137a06608dcb978e6b7ed4.dip0.t-ipconnect.de)
15:03:40 <int-e> > iterate (+3) 5
15:03:41 <lambdabot> [5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80...
15:03:43 <darkling> Ah, I'd put a comma after the 8. Thanks.
15:04:41 chexum joins (~quassel@gateway/tor-sasl/chexum)
15:05:24 califax joins (~califax@user/califx)
15:07:35 × Guest75 quits (Guest75@2a01:7e01::f03c:92ff:fe5d:7b18) (Quit: Client closed)
15:10:01 Azel_ joins (~Azel@2a01:e0a:1f1:98e0:3223:2d3e:4f65:245e)
15:12:57 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
15:14:34 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
15:15:22 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
15:18:57 Guest4274 joins (~Guest42@91.199.84.149)
15:23:29 Guest4274 parts (~Guest42@91.199.84.149) ()
15:26:24 jakalx parts (~jakalx@base.jakalx.net) ()
15:28:49 × money quits (~money@user/polo) (Ping timeout: 256 seconds)
15:30:35 Ybombinator joins (~Ybombinat@89.254.152.15)
15:30:37 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:32:04 jakalx joins (~jakalx@base.jakalx.net)
15:32:15 ddellacosta joins (~ddellacos@143.244.47.100)
15:36:35 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
15:43:32 gmg joins (~user@user/gehmehgeh)
15:46:09 × Ranhir quits (~Ranhir@157.97.53.139) (Ping timeout: 260 seconds)
15:48:25 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:48:34 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
15:49:46 Pickchea joins (~private@user/pickchea)
15:50:59 pagnol joins (~user@213-205-209-87.ftth.glasoperator.nl)
15:51:28 zant2 joins (~zant@62.214.20.26)
15:54:54 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
15:56:18 Ranhir joins (~Ranhir@157.97.53.139)
15:56:41 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
15:56:44 money joins (~money@user/polo)
16:01:11 danza joins (~francesco@4.red-79-153-154.dynamicip.rima-tde.net)
16:02:46 × cheater quits (~Username@user/cheater) (Quit: Killed (KrON (Requested by panasync)))
16:03:33 cheater joins (~Username@user/cheater)
16:07:32 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
16:08:26 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds)
16:08:53 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
16:09:00 califax joins (~califax@user/califx)
16:09:18 <aeroplane> Can somebody help me in resolving error in http://ix.io/4ieB/haskell
16:09:20 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
16:09:22 <aeroplane> I just want to put "yes" when (f x) returns a Just value and "No" when it retursn Nothing
16:09:40 <aeroplane> Thanks
16:09:57 ec_ joins (~ec@gateway/tor-sasl/ec)
16:10:52 gmg joins (~user@user/gehmehgeh)
16:11:13 <[Leary]> aeroplane: let y = case ...
16:11:14 chexum joins (~quassel@gateway/tor-sasl/chexum)
16:12:40 × Ybombinator quits (~Ybombinat@89.254.152.15) (Quit: Quit)
16:12:51 <[Leary]> <- is monadic bind, but you're not doing IO in the case-of expression, so it's both unnecessary and a type error.
16:15:21 <aeroplane> [Leary]: thanks, I understand now, you use "<-" when getting input from function like getLine..etc
16:15:38 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
16:16:38 <aeroplane> but there is also one more error, at the very end in 'y'
16:16:43 <dsal> aeroplane: that is one use case
16:17:09 <aeroplane> the 'y' error is gone
16:17:09 ChaiTRex joins (~ChaiTRex@user/chaitrex)
16:18:27 <aeroplane> dsal: sorry, I didnt got you
16:19:11 k8yun joins (~k8yun@user/k8yun)
16:19:44 <dsal> <- isn't "getting input from functions" it's just a monadic bind.
16:19:45 <dsal> `do` syntax does seem to confuse people.
16:21:45 <dsal> @undo do { a <- [Just 5, Nothing]; pure $ maybe False (const True) a }
16:21:45 <lambdabot> [Just 5, Nothing] >>= \ a -> pure $ maybe False (const True) a
16:22:00 <dsal> > do { a <- [Just 5, Nothing]; pure $ maybe False (const True) a }
16:22:01 <lambdabot> [True,False]
16:22:17 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
16:23:38 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 246 seconds)
16:26:39 <aeroplane> dsal: I not able to find anything related to "monadic bind" on the internet. From what I know, ">>=" is called bind and "<-" is used to take input from a file. This is what Ive learned and I am just a beginner :)
16:27:59 <dsal> <- doesn't take input, it just gives some syntax sugar to >>=
16:28:34 <dsal> See the @undo above. That desugared
16:28:46 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 268 seconds)
16:29:29 <dsal> Some here argue that `do` syntax should come much later in learning. It causes a lot of confusion.
16:29:32 sadmax joins (~user@209.205.174.253)
16:30:21 <dsal> @undo do { x <- a; f a }
16:30:21 <lambdabot> a >>= \ x -> f a
16:30:41 <dsal> @undo do { x <- a; f x }
16:30:41 <lambdabot> a >>= \ x -> f x
16:32:07 × money quits (~money@user/polo) (Quit: money)
16:32:57 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
16:37:28 <aeroplane> dsal: thanks a lot, I understand now, its just syntactic sugar. But do looks a lot cleaner from beginners perspective
16:38:23 <dsal> Looking cleaner isn't as important as being able to understand what you're looking at.
16:38:57 × sadmax quits (~user@209.205.174.253) (Remote host closed the connection)
16:39:02 <glguy> A better model might be not to avoid do but just to avoid trying to teach its generalization, let people get used to it with IO and then generalize later
16:40:46 <dsal> That's probably fine. It's just going to be confusing when to use `let` and when to use `<-`.
16:41:38 <dsal> If you're in `IO` I guess that's just "does this do something like `IO`?" But IO is larger than most people think.
16:41:49 <aeroplane> > getChar>>=putChar
16:41:51 <lambdabot> <IO ()>
16:42:38 <glguy> any difference between let = and <- can just be explained in the context of IO without needing to worry about generalizations
16:43:15 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
16:44:30 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
16:44:44 <dsal> Yeah. It just feels like lying. Though lying seems to be a rather critical element of teaching.
16:47:26 Franciman is now known as fancyman
16:47:43 fancyman is now known as Franciman
16:49:42 money joins (~money@user/polo)
16:50:23 byorgey takes issue with that last statement
16:56:51 × money quits (~money@user/polo) (Read error: Connection reset by peer)
17:00:09 × Guest7643 quits (money@user/polo) ()
17:01:27 money joins (sid532813@user/polo)
17:01:51 <dsal> byorgey: Anyone who wants to know the whole truth about a topic dedicates their life to it. The rest of us just learn patterns that are statistically likely to match what we encounter.
17:03:02 money_ joins (~money@user/polo)
17:07:00 <monochrom> My observation of students: do-notation is hard for them to write correctly.
17:07:23 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
17:07:44 <monochrom> Easy for them to read and guess, sure, but that's just speaking to imperative presumptions that no longer applies to Haskell, and hard-to-write-correctly shows it.
17:08:22 <monochrom> To wit, just wait for them to ask why sometimes it's "let x = f y" and why sometimes "x <- f y" "what's the difference?"
17:08:41 <monochrom> If they ask questions then it is not "easy".
17:09:21 × Azel_ quits (~Azel@2a01:e0a:1f1:98e0:3223:2d3e:4f65:245e) (Quit: Konversation terminated!)
17:10:11 × money_ quits (~money@user/polo) (Quit: money_)
17:10:51 <monochrom> Upon recommendation from both TAs and students, I have stopped teaching do-notation at all. It's all purely >>= now. My students' questions are now on more important and deeper issues.
17:12:11 <monochrom> And reflects that they know they have issues, rather than presume it's easy.
17:12:20 <monochrom> "easy"
17:12:29 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 260 seconds)
17:13:27 Axma25968 joins (~Axman6@user/axman6)
17:15:15 × Axman6 quits (~Axman6@user/axman6) (Ping timeout: 240 seconds)
17:15:26 × razetime quits (~quassel@49.207.203.213) (Remote host closed the connection)
17:15:31 Xeroine joins (~Xeroine@user/xeroine)
17:17:40 <monochrom> Now, about lying. First let's examine: What does "truth" mean? >:)
17:19:04 money_ joins (~money@user/polo)
17:26:16 <monochrom> dminuoso: Haha that's brilliant, ☭ is left associative, so $ must be right associative!
17:26:52 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Ping timeout: 256 seconds)
17:26:56 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
17:28:15 × money_ quits (~money@user/polo) (Quit: money_)
17:36:15 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
17:37:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
17:37:59 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
17:37:59 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
17:38:28 money_ joins (~money@user/polo)
17:38:55 califax joins (~califax@user/califx)
17:39:14 chexum_ joins (~quassel@gateway/tor-sasl/chexum)
17:40:14 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
17:40:20 ChaiTRex joins (~ChaiTRex@user/chaitrex)
17:40:43 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
17:41:00 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
17:43:37 <aeroplane> I am gonna ask a very lame question from what I've learned from previous comments , let's say we have a function for the time being
17:43:40 <aeroplane> getTail x = Just $ tail x
17:43:57 codaraxis___ joins (~codaraxis@user/codaraxis)
17:43:57 <aeroplane> we can run it like this- getTail [1..5]
17:44:23 <aeroplane> and this- getTail [1..5]>>=getTail
17:44:42 <aeroplane> but not this- a <- getTail [1..5], why
17:45:25 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:46:24 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
17:47:50 × codaraxis__ quits (~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
17:52:11 Azel_ joins (~Azel@2a01:e0a:1f1:98e0:556b:ff1f:9810:e191)
17:52:20 × Azel_ quits (~Azel@2a01:e0a:1f1:98e0:556b:ff1f:9810:e191) (Client Quit)
17:52:43 <mauke> aeroplane: your question is incorrect
17:53:06 <mauke> there exists at least one program in which 'a <- getTail [1..5]' is a valid line
17:53:34 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
17:56:10 × money_ quits (~money@user/polo) (Quit: money_)
18:03:27 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
18:03:38 <monochrom> You can have: do { a <- getTail [1..5]; getTail a }
18:03:42 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Ping timeout: 256 seconds)
18:03:42 × zant2 quits (~zant@62.214.20.26) (Ping timeout: 256 seconds)
18:03:50 <monochrom> It is the same as getTail [1..5]>>=getTail
18:05:45 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
18:07:02 <monochrom> But yeah whether one single line of code is allowed or disallowed depends on the other 100 lines of code. You will not have any luck with that kind of simple isolation.
18:07:16 money_ joins (~money@user/polo)
18:08:03 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
18:09:39 <monochrom> Plus the statistical almost certainty that whenever a beginner singles out a line of code, it means that the real error is in the other 100 lines.
18:10:34 <darkling> That last point often applies to the compiler, too. ;)
18:11:08 <geekosaur> not so much if you annotate types appropriately
18:11:18 <mauke> right. if you knew the exact location of the problem, you wouldn't need to ask for help with debugging
18:11:36 Scraeling joins (~Scraeling@user/scraeling)
18:12:47 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:13:28 <monochrom> Sometimes C compilers and C++ compilers do that.
18:13:44 <monochrom> And the LaTeX compiler does that even more.
18:14:03 <geekosaur> C++ compilers are more likely to vomit up a 3-page error and you have to associate it with the 1 line you typed
18:14:26 <geekosaur> since it expands template code in the error message
18:14:26 <mauke> 3 pages? that's a bit optimistic
18:14:30 <geekosaur> true
18:14:31 <darkling> 3 pages? C++ compilers have got more laconic since I last used one. :)
18:14:37 <monochrom> -_- XD
18:14:49 <geekosaur> but there's also whose definition of "page" 🙂
18:15:20 <geekosaur> 66 lines is about 3 screens
18:15:29 <darkling> 4 KiB on x86, of course...
18:16:25 <glguy> You guys are printing your c++ error outputs?
18:16:57 <monochrom> Yeah, they make great wallpapers. >:)
18:16:58 <geekosaur> darkling is apparently using a hex debugger
18:17:07 <monochrom> haha
18:17:28 <monochrom> Real programmers pipe C++ error outputs to od
18:17:52 <geekosaur> real programmers flash the lights on the console
18:17:52 Jade[m] joins (~jade1024m@2001:470:69fc:105::2:d68a)
18:18:23 <monochrom> Is there a programming language called Real? Or should I make one?
18:18:37 <money_> 3doit
18:18:51 <monochrom> Then I get to say all sorts of crazy things about Real programming language has lambda, Real programmers write functions...
18:19:07 <darkling> Make one anyway. Then if there's already one, you can have arguments about which is the real Real.
18:19:16 <monochrom> haha
18:19:24 <mauke> it's too bad that the C/C++ language specification has disappeared from the internet
18:20:05 <geekosaur> even the one-version-behind one they used to allow? sad
18:20:14 × money_ quits (~money@user/polo) (Quit: money_)
18:20:29 <mauke> it was just a bunch of drafts; it never got finalized
18:20:54 <monochrom> Real committees never finalize. >:)
18:21:30 hueso joins (~root@user/hueso)
18:21:34 <darkling> It's all just continuations.
18:23:16 <mauke> I wrote what was probably the only attempt at an implementation of it, but I don't remember most of the details
18:23:22 money_ joins (~money@user/polo)
18:24:44 <mauke> IIRC it had built-in array slicing and concatenation, which I implemented using Data.Sequence
18:25:08 <monochrom> You... wrote a C++ compiler in Haskell?!
18:25:15 <mauke> no, a C/C++ interpreter
18:25:24 <monochrom> Still, bravo
18:25:35 <mauke> wasn't that hard
18:25:40 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
18:25:50 <mauke> C/C++ is simpler than C
18:26:11 <monochrom> My wish has come true. C is desugared to Haskell!
18:26:20 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
18:26:28 <mauke> but it's not C :-(
18:26:36 <Jade[m]> It was haskell all along
18:27:17 <monochrom> Oh, is it that kind of math thing where C/C++ means "take C, quotient by C++ to get something drastically smaller"?
18:27:47 Sgeo joins (~Sgeo@user/sgeo)
18:28:35 <mauke> no, it's literally a language called "C/C++"
18:28:52 <monochrom> X|
18:29:05 <mauke> mostly created so you can truthfully put it on your resume
18:29:19 <dolio> @karma C/C
18:29:19 <lambdabot> C/C has a karma of 52
18:29:23 <mauke> for jobs that ask for experience with "C/C++"
18:29:28 <monochrom> haha
18:30:06 <monochrom> Would you also like me to create a language called J/Java/Javacript ? :)
18:30:44 <mauke> I think there's less demand for that :-)
18:31:00 Scraeling_ joins (~Scraeling@27.63.255.104)
18:33:57 × Scraeling quits (~Scraeling@user/scraeling) (Ping timeout: 268 seconds)
18:34:06 Scraeling_ is now known as Scraeling
18:35:40 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
18:36:34 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
18:36:41 jakalx joins (~jakalx@base.jakalx.net)
18:37:56 <EvanR> so C/C++ was a language and it had a specification, what
18:37:59 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
18:38:42 <monochrom> Hence the sadness when mauke can't find a URL to show you.
18:39:02 <EvanR> I'm mainly a John/J/Jingleheimerscript programmer
18:42:35 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 268 seconds)
18:48:40 <mauke> http://www.cpax.org.uk/prg/portable/c/c++/ is where it used to live for a short while
18:48:57 jargon joins (~jargon@174-22-192-24.phnx.qwest.net)
18:48:59 <mauke> ~15 years ago
18:50:21 <dminuoso> Wayback Machine didnt crawl it at that time :(
18:50:29 <EvanR> it's impossible to google
18:50:40 <dminuoso> EvanR: I guess thats also part of the joke.
18:52:53 fizbin joins (~fizbin@user/fizbin)
18:53:57 <EvanR> I did find a bjarne stroustrup quote that says "there is no language called C/C++", so I guess that's what happened
18:54:26 <EvanR> god negatively asserted it
18:54:36 <dminuoso> If I was to make a bad language, I would probably name it C+.
18:54:48 <EvanR> yeah take the average
18:54:57 <Jade[m]> C--
18:55:02 <dminuoso> C-- already exists.
18:55:07 <Jade[m]> that's a haskell IR right
18:55:11 <dminuoso> Not quite
18:55:15 <EvanR> there's multiple C--'s
18:55:16 <dminuoso> We have cmm which is a derivative of it
18:55:21 <darkling> Surely C++ evaluates to C, so if you want an improvement, you should use ++C
18:55:53 <EvanR> C++ is better eventually
18:56:11 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
18:56:47 × money_ quits (~money@user/polo) (Ping timeout: 256 seconds)
18:57:19 <mauke> the presence of C++ merely increases the value of C
18:57:32 <dminuoso> But only after you assign it to a programmer.
18:57:51 <dminuoso> Or no, after you use it.
18:57:59 <dminuoso> There's a grain of truth to it.
18:58:06 <fizbin> Modern C++ (i.e. C++20 and following) is truly a wonder to behold, if you learned C++ back in the bad old days when I first learned it.
18:58:07 <dminuoso> Every time you use C++, your perceived value of C raises.
18:58:13 <dminuoso> So it is true.
18:58:32 <dminuoso> fizbin: Yes, it is a wonder to behold. Did you know one can conjure up non-constant constexpr?
18:58:36 money_ joins (~money@user/polo)
18:58:38 <dminuoso> In a standard conforming manner.
18:58:53 <dminuoso> A language that can design such a thing is truly magnificient.
19:00:27 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
19:03:35 × money_ quits (~money@user/polo) (Ping timeout: 256 seconds)
19:07:25 × glguy quits (~glguy@libera/staff-emeritus/glguy) (Read error: Connection reset by peer)
19:09:13 money_ joins (~money@user/polo)
19:09:38 cole45 joins (~cole@cpe-104-32-238-223.socal.res.rr.com)
19:15:49 × kuribas quits (~user@ptr-17d51ensnhliua7uirq.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1))
19:16:15 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
19:16:24 <EvanR> does that mean you have e.g. a non constant 5
19:16:39 <EvanR> a 5 whose value can change
19:16:45 glguy joins (~glguy@libera/staff-emeritus/glguy)
19:17:35 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
19:18:58 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
19:22:57 <darkling> A friend once worked with a FORTRAN compiler that could be made to do that.
19:23:39 freeside joins (~mengwong@103.252.202.159)
19:23:46 <darkling> Write a function that mutates its parameter, then pass a literal 1 as the parameter to the function call...
19:25:23 <geekosaur[m]> Fortran is call by name so parameters are mutable. Combine with hardware that lacked immediate mode instructions
19:25:56 <geekosaur[m]> (some IBM hardware IIRC)
19:26:19 AlexZenon joins (~alzenon@178.34.161.14)
19:26:54 AlexNoo joins (~AlexNoo@178.34.161.14)
19:28:01 <darkling> I don't know which hardware or compiler she was using. This was back in the late '80s.
19:28:08 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 256 seconds)
19:28:19 Alex_test joins (~al_test@178.34.161.14)
19:29:08 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:31:47 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
19:33:54 freeside joins (~mengwong@103.252.202.159)
19:34:33 lortabac joins (~lortabac@2a01:e0a:541:b8f0:ba90:de94:fe74:d463)
19:35:51 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:36:43 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
19:38:11 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
19:42:44 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
19:43:56 wroathe joins (~wroathe@50.205.197.50)
19:43:56 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
19:43:56 wroathe joins (~wroathe@user/wroathe)
19:45:30 <cole45> I'm trying to make a Calendar widget library for Brick and I'm running into an issue where I need to have a generic way to name subwidgets I create and also handle events for those names. I looked to preexisting widget libraries for inspiration and https://hackage.haskell.org/package/brick-filetree seems to force the name to be a String - I would
19:45:31 <cole45> like to ideally be generic in the name. Brick's own FileBrowser widget (https://hackage.haskell.org/package/brick-1.5/docs/Brick-Widgets-FileBrowser.html#g:5) _is_ generic in the name, but it only ever uses a single name, which it takes at creation (see newFileBrowser). In the event handler it provides, it doesn't look at the name given.
19:45:52 codaraxis__ joins (~codaraxis@user/codaraxis)
19:46:02 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:ba90:de94:fe74:d463) (Quit: WeeChat 2.8)
19:46:51 <cole45> My attempted solution to this is to make "constructors" for appEvent and appDraw that take in functions which go from a Name to a calendar-specific identifier (e.g. a Date) and back. I've tried to distill what I'm talking about (including the Brick context) to this paste https://paste.tomsmeding.com/V3xM7drs. Does this seem like a reasonable
19:46:51 <cole45> solution?
19:48:47 perrierj1 joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
19:49:15 × money_ quits (~money@user/polo) (Quit: money_)
19:49:40 × codaraxis___ quits (~codaraxis@user/codaraxis) (Ping timeout: 256 seconds)
19:52:24 freeside joins (~mengwong@103.252.202.159)
19:55:25 money_ joins (~money@user/polo)
19:55:56 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:56:27 × fizbin quits (~fizbin@user/fizbin) (Read error: Connection reset by peer)
19:57:14 × money_ quits (~money@user/polo) (Remote host closed the connection)
19:58:01 × Scraeling quits (~Scraeling@27.63.255.104) (Quit: Scraeling)
20:06:14 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
20:06:14 × califax quits (~califax@user/califx) (Remote host closed the connection)
20:06:14 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
20:06:14 × chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
20:06:42 chexum joins (~quassel@gateway/tor-sasl/chexum)
20:07:03 gmg joins (~user@user/gehmehgeh)
20:07:05 ChaiTRex joins (~ChaiTRex@user/chaitrex)
20:07:36 califax joins (~califax@user/califx)
20:07:58 zant2 joins (~zant@62.214.20.26)
20:10:09 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
20:13:09 money_ joins (~money@user/polo)
20:13:41 wroathe joins (~wroathe@50.205.197.50)
20:13:41 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
20:13:41 wroathe joins (~wroathe@user/wroathe)
20:14:50 Topsi joins (~Topsi@dyndsl-091-096-147-161.ewe-ip-backbone.de)
20:14:53 alphabeta joins (~kilolympu@213.144.144.24)
20:15:04 × kilolympus quits (~kilolympu@213.144.144.24) (Ping timeout: 260 seconds)
20:16:14 money__ joins (~money@user/polo)
20:17:16 Guest97 joins (~Guest97@205.251.233.105)
20:19:31 × money_ quits (~money@user/polo) (Ping timeout: 256 seconds)
20:19:53 codaraxis___ joins (~codaraxis@user/codaraxis)
20:21:14 money is now known as Guest5800
20:21:14 money__ is now known as money
20:21:17 × pagnol quits (~user@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 246 seconds)
20:23:49 × codaraxis__ quits (~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
20:29:05 × cole45 quits (~cole@cpe-104-32-238-223.socal.res.rr.com) (Quit: Client closed)
20:30:02 × dtman34 quits (~dtman34@2601:447:d000:93c9:9211:a0f7:7474:e151) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
20:30:08 cole51 joins (~cole@cpe-104-32-238-223.socal.res.rr.com)
20:30:23 dtman34 joins (~dtman34@76.156.89.180)
20:31:19 fizbin joins (~fizbin@user/fizbin)
20:32:06 × fizbin quits (~fizbin@user/fizbin) (Read error: Connection reset by peer)
20:32:16 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
20:34:05 cole51 is now known as cole45
20:35:07 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
20:36:11 gmg joins (~user@user/gehmehgeh)
20:36:12 tomokojun joins (~tomokojun@143.244.47.82)
20:37:03 fizbin joins (~fizbin@user/fizbin)
20:49:16 × tomokojun quits (~tomokojun@143.244.47.82) (Remote host closed the connection)
20:49:16 pavonia joins (~user@user/siracusa)
20:49:44 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 256 seconds)
20:50:13 tomokojun joins (~tomokojun@87.249.134.18)
20:51:02 × money quits (~money@user/polo) (Quit: money)
20:51:20 × tomokojun quits (~tomokojun@87.249.134.18) (Client Quit)
20:52:28 × perrierj1 quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
20:56:24 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
20:57:06 gmg joins (~user@user/gehmehgeh)
20:59:45 × califax quits (~califax@user/califx) (Remote host closed the connection)
21:00:43 fizbin joins (~fizbin@user/fizbin)
21:00:53 califax joins (~califax@user/califx)
21:04:40 × k8yun quits (~k8yun@user/k8yun) (Quit: Leaving)
21:06:24 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
21:16:32 michalz joins (~michalz@185.246.204.93)
21:18:46 money joins (~money@user/polo)
21:21:04 king_gs joins (~Thunderbi@187.201.150.200)
21:21:59 × [exa] quits (exa@user/exa/x-3587197) (Quit: reconneeeeeeeeect)
21:23:01 [exa] joins (~exa@user/exa/x-3587197)
21:23:40 × cole45 quits (~cole@cpe-104-32-238-223.socal.res.rr.com) (Quit: Client closed)
21:27:08 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 256 seconds)
21:28:26 Guest75 joins (Guest75@2a01:7e01::f03c:92ff:fe5d:7b18)
21:30:01 × srk quits (~sorki@user/srk) (Ping timeout: 252 seconds)
21:39:01 freeside joins (~mengwong@103.252.202.159)
21:39:15 kenran joins (~user@user/kenran)
21:39:41 × kenran quits (~user@user/kenran) (Remote host closed the connection)
21:42:37 king_gs1 joins (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c)
21:42:40 × king_gs quits (~Thunderbi@187.201.150.200) (Read error: Connection reset by peer)
21:42:41 king_gs1 is now known as king_gs
21:43:34 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 256 seconds)
21:46:23 × money quits (~money@user/polo) (Quit: money)
21:47:34 zeenk joins (~zeenk@2a02:2f04:a30d:4300::7fe)
21:48:26 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:49:07 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
21:49:14 × king_gs quits (~Thunderbi@2806:103e:29:cdd2:b2dd:cddc:5884:d05c) (Ping timeout: 256 seconds)
21:52:31 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
21:54:57 × Guest97 quits (~Guest97@205.251.233.105) (Quit: Client closed)
21:57:11 × inversed quits (~inversed@bcdcac82.skybroadband.com) (Read error: Connection reset by peer)
21:57:34 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
21:59:08 srk joins (~sorki@user/srk)
21:59:15 money joins (~money@user/polo)
22:00:45 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:01:31 × arahael quits (~arahael@193-119-109-208.tpgi.com.au) (Ping timeout: 256 seconds)
22:02:49 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
22:03:47 × money quits (~money@user/polo) (Ping timeout: 256 seconds)
22:04:08 inversed joins (~inversed@bcdcac82.skybroadband.com)
22:10:02 freeside joins (~mengwong@103.252.202.159)
22:11:08 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
22:11:53 wootehfoot joins (~wootehfoo@user/wootehfoot)
22:14:53 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
22:15:36 <EvanR> So I know about a paper called seven trees in one. But someone linked a paper about how "anything" you prove from type equations by pretending you're talking about complex numbers is still correct for types
22:15:46 <EvanR> and now I can't find it in my bookmarks, any idea what it's called
22:19:30 money joins (~money@user/polo)
22:19:41 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
22:23:30 <dolio> https://arxiv.org/abs/math/0212377
22:24:00 <geekosaur> Oct 31 19:42:14 * ski . o O ( "Objects of Categories as Complex Numbers" by Marcelo Fiore,Tom Leinster in 2002-12-30 at <https://arxiv.org/abs/math/0212377> ; <https://golem.ph.utexas.edu/category/2009/07/searching_for_a_video_proof_of.html> ; "This Week's Finds in Mathematical Physics (Week 202)" by John Baez in 2004-02-21 at <https://math.ucr.edu/home/baez/week202.html> ; "Seven Trees in One" by Andreas Blass in 1995
22:24:00 <geekosaur> Oct 31 19:42:20 * ski at <https://dept.math.lsa.umich.edu/~ablass/cat.html> )
22:26:47 <EvanR> \o/
22:27:46 × sagax quits (~sagax_nb@user/sagax) (Remote host closed the connection)
22:28:41 freeside joins (~mengwong@103.252.202.159)
22:28:59 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds)
22:30:58 × money quits (~money@user/polo) (Read error: Connection reset by peer)
22:31:34 money joins (~money@user/polo)
22:32:52 × zant2 quits (~zant@62.214.20.26) (Ping timeout: 256 seconds)
22:37:24 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
22:37:24 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
22:38:58 × Sauvin quits (~sauvin@user/Sauvin) (Remote host closed the connection)
22:39:27 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:41:37 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:43:51 × money quits (~money@user/polo) (Quit: money)
22:44:01 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:44:51 Sauvin joins (~sauvin@user/Sauvin)
22:45:50 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
22:45:53 money joins (~money@user/polo)
22:45:59 zant2 joins (~zant@62.214.20.26)
22:48:12 × zeenk quits (~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!)
22:50:33 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Client Quit)
22:50:49 × zant2 quits (~zant@62.214.20.26) (Ping timeout: 260 seconds)
22:54:54 × money quits (~money@user/polo) (Read error: Connection reset by peer)
22:55:30 money joins (~money@user/polo)
22:56:27 <iqubic> Are arxiv papers paywalled?
22:56:51 <monochrom> Have you tried?
22:57:02 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
22:57:21 <iqubic> Not yet
22:57:31 <EvanR> the answer to that will cost you $10
22:57:53 <iqubic> Oh, there's just a download button on the right side
22:57:56 <monochrom> :)
22:59:43 <EvanR> I can't do like youtubers and call arxiv "archive.org", that's a different site entirely
22:59:55 <EvanR> where you can watch all the old star treks
23:00:11 ChaiTRex joins (~ChaiTRex@user/chaitrex)
23:02:04 <monochrom> That is because you should say "archiveks.org" :)
23:02:15 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
23:04:04 <EvanR> huh
23:04:14 <monochrom> because of the x
23:04:26 zant2 joins (~zant@62.214.20.26)
23:04:26 × money quits (~money@user/polo) (Quit: money)
23:05:14 perrierjouet1 joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
23:05:25 × perrierjouet1 quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Client Quit)
23:06:18 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
23:08:37 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:44ff:72e2:5072:e2ac)
23:08:55 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
23:12:01 <mauke> I just say arχiv
23:13:58 <mauke> @remember LeoNerd I wanna open a bike shop called Hamiltonian Cycles. No customer is ever allowed to visit more than once
23:13:58 <lambdabot> Okay.
23:15:02 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
23:15:44 ChaiTRex joins (~ChaiTRex@user/chaitrex)
23:17:10 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
23:18:24 Guest47 joins (~Guest47@host86-135-0-95.range86-135.btcentralplus.com)
23:20:04 <Guest47> Is GHC able to inline bind and return in the identity monad, ultimately generating the same code as a non-monadic version of the function?
23:21:10 <Guest47> or rather are there any situations where it is able to do so, not so much if it is able to in general
23:21:18 <geekosaur> if you know it's always in Identity, why didn't you write it non-monadic in the first place? and if you don't, how can it do so?
23:21:41 <hpc> mauke: and right next to it is Epi Cycles, their bikes have infinitely many infinitely small tires :D
23:21:59 <geekosaur> (hm. I suppose there is SPECIALIZE)
23:22:53 <Guest47> yeah the compiler would be able to know statically (for the sake of argument)
23:23:56 <geekosaur> there is no reason they couldn't be inlinable, but I don't know offhand if they are so marked and I'm not sure it would do so on its own
23:24:54 <mauke> @quote
23:24:54 <lambdabot> LarryWall says: We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.
23:25:27 <geekosaur> looks like it's all marked INLINE so it pretty much should
23:26:14 <mauke> it'll still be sequenced, though, right?
23:27:44 <geekosaur> I don't think Identity introduces anything to do sequencing on
23:28:14 <geekosaur> sequencing requires there be a data dependency, but there's no data to have a dependency on for Identity
23:30:26 <mauke> @src Identity
23:30:26 <lambdabot> newtype Identity a = Identity { runIdentity :: a }
23:30:34 × rburkholder quits (~blurb@96.45.2.121) (Ping timeout: 268 seconds)
23:31:29 <geekosaur> right, so that means you'd get the same sequencing from runIdentity as from writing it non-monadic
23:32:06 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
23:32:15 <mauke> yes
23:32:21 <geekosaur> sequencing comes in when you have something like State that injects an extra parameter and pulls it back out of a tuple at the end, or the unboxed (and "fake state") equivalent for IO
23:32:48 <mauke> (runIdentity is id operationally)
23:33:44 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
23:35:04 <intelligent_boat> I see here a stackoverflow answer that tells "always use the Applicative interface, unless it is too weak." https://stackoverflow.com/questions/60498712/when-should-one-use-applicatives-over-monads . a specific application of this question I have: sometimes I have stuff like: forM_ [2, 4] $ \n -> print (doStuff n). should I take that advice to mean I should be using for_ instead of forM_ there?
23:35:10 <intelligent_boat> no negative repercurssions of doing that?
23:36:47 <mauke> :t for_
23:36:47 <lambdabot> (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
23:37:59 <mauke> :t foldr (*>) (pure ())
23:38:00 <lambdabot> (Foldable t, Applicative f) => t (f a) -> f ()
23:38:55 <mauke> :t \f xs -> foldr (\x z -> f x *> z) (pure ()) xs
23:38:56 <lambdabot> (Foldable t1, Applicative f) => (t2 -> f a) -> t1 t2 -> f ()
23:39:23 <geekosaur> my impression is that forM / forM_ is historical
23:39:38 <mauke> I don't see any problems with that
23:39:53 <mauke> for monads, (*>) = (>>) and pure = return
23:41:20 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
23:41:28 <intelligent_boat> ah and https://stackoverflow.com/questions/39100320/is-form-idiomatic-haskell was a question about forM_ and one answer says "though you'd probably better using just for_"
23:42:43 <intelligent_boat> although I wish they'd say why it'd be better but okay
23:44:30 freeside joins (~mengwong@103.252.202.159)
23:48:48 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 256 seconds)
23:48:51 × Guest47 quits (~Guest47@host86-135-0-95.range86-135.btcentralplus.com) (Quit: Client closed)
23:52:50 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
23:53:02 freeside joins (~mengwong@103.252.202.159)
23:54:31 × TonyStone quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Quit: Leaving)
23:55:11 Lycurgus joins (~juan@user/Lycurgus)
23:56:44 × acidjnk quits (~acidjnk@p200300d6e7137a06608dcb978e6b7ed4.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
23:57:54 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 260 seconds)

All times are in UTC on 2022-12-10.