Home liberachat/#haskell: Logs Calendar

Logs on 2021-07-01 (liberachat/#haskell)

00:00:02 × zopsi quits (zopsi@2600:3c00::f03c:91ff:fe14:551f) (Quit: Oops)
00:00:20 zopsi joins (zopsi@2600:3c00::f03c:91ff:fe14:551f)
00:00:49 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Ping timeout: 265 seconds)
00:01:38 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Remote host closed the connection)
00:13:21 TranquilEcho joins (~grom@user/tranquilecho)
00:14:09 justsomeguy joins (~justsomeg@user/justsomeguy)
00:20:41 × tdammers quits (~tdammers@77.109.72.213.res.static.edpnet.net) (Ping timeout: 272 seconds)
00:20:42 × chexum quits (~chexum@gateway/tor-sasl/chexum) (Remote host closed the connection)
00:20:56 chexum joins (~chexum@gateway/tor-sasl/chexum)
00:21:36 × cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds)
00:22:01 cheater joins (~Username@user/cheater)
00:22:38 sheepduck joins (~sheepduck@user/sheepduck)
00:22:46 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
00:22:58 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
00:23:36 cmburnett joins (~cmburnett@c-73-37-184-31.hsd1.mn.comcast.net)
00:25:34 tdammers joins (~tdammers@77.109.72.213.res.static.edpnet.net)
00:25:54 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
00:28:39 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
00:28:51 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 265 seconds)
00:29:49 × pagnol quits (~user@014198154145.ctinets.com) (Ping timeout: 265 seconds)
00:30:40 × Morrow quits (~MorrowM_@147.161.13.35) (Ping timeout: 256 seconds)
00:34:06 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:35:14 × obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Ping timeout: 272 seconds)
00:35:36 dajoer joins (~david@user/gvx)
00:40:19 Morrow joins (~MorrowM_@147.161.13.35)
00:43:35 norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net)
00:43:43 obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl)
00:44:56 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Remote host closed the connection)
00:46:30 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
00:47:16 × hegstal quits (~hegstal@2a02:c7f:7604:8a00:1749:70f2:c3b4:7591) (Remote host closed the connection)
00:47:33 × Deide quits (~Deide@user/deide) (Quit: Seeee yaaaa)
00:48:58 notzmv joins (~zmv@user/notzmv)
00:51:08 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
00:55:50 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
00:55:54 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
00:56:10 × favonia quits (~favonia@user/favonia) (Ping timeout: 256 seconds)
00:56:28 favonia joins (~favonia@user/favonia)
00:58:30 Nolrai joins (~Nolrai@c-76-27-202-218.hsd1.or.comcast.net)
00:58:55 willbush joins (~user@47.183.200.14)
01:02:28 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 272 seconds)
01:02:46 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
01:03:54 × pbrisbin quits (~patrick@pool-173-49-147-28.phlapa.fios.verizon.net) (Ping timeout: 240 seconds)
01:05:14 × chomwitt quits (~Pitsikoko@2a02:587:dc0b:0:d8f7:cdfe:4658:bec4) (Ping timeout: 256 seconds)
01:05:30 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
01:07:33 <dsal> I have a really dumb basic question. I've been doing a bit of refactoring around an API change I made and I found myself doing `Just x = ...` in a where clause once or twice. I realized I don't exactly understand what that does.
01:07:43 <dsal> Can someone help my mental model be a bit more complete here?
01:08:17 machinedgod joins (~machinedg@24.105.81.50)
01:08:40 <Axman6> it's an irrefutable pattern match, it basically creates code that looks like case ... of Just x -> <define x>; Nothing -> error "pattern match failed"
01:09:08 <Axman6> it's generally not a safe thing to do, but if you know the result is guaranteed to be Just, it's fine
01:09:44 <dsal> Yeah, I think I understood the safety of it and stuff, I just had a bit of trouble understanding what it actually did. My mental model isn't quite right there.
01:09:46 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 256 seconds)
01:10:04 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
01:10:14 favonia joins (~favonia@user/favonia)
01:10:35 <Axman6> it's just a pattern match, the same as you can do let (x,y) = (x0+1,y0+2) to give definitions for x and y
01:11:23 <dsal> I guess it doesn't make sense to ask what to do if it's `Nothing` because there's no `x` to name.
01:11:39 <c_wraith> Whoa.. it's not like that case expression in one important detail
01:12:00 <c_wraith> It's an irrefutable match, which means that unlike a case statement, it won't be evaluated before choosing a branch
01:12:01 <Axman6> it throws an error
01:12:18 <c_wraith> the pattern match is only done when x is evaluated
01:12:32 <Nolrai> So, are Control.Lens style lenses worth using? I am using them with a small/medium size project and they just seem to make refactoring harder.
01:12:38 hammock joins (~Hammock@2600:1700:19a1:3330::625)
01:12:38 <dsal> I think that's also part of my confusion. So when does stuff break?
01:12:53 <c_wraith> > let Just x = Nothing in "hello"
01:12:54 <lambdabot> "hello"
01:13:05 <c_wraith> > case Nothing of Just x -> "hello"
01:13:07 <lambdabot> "*Exception: <interactive>:(3,1)-(4,22): Non-exhaustive patterns in case
01:13:11 <Axman6> > let Just x = Nothing in x + 1 :: Int
01:13:13 <lambdabot> *Exception: <interactive>:3:5-20: Non-exhaustive patterns in Just x
01:13:16 <Nolrai> @c_wraith so its more like `do ~(x, y) = `
01:13:16 <lambdabot> Unknown command, try @list
01:13:32 <c_wraith> yes, ~ is how you explicitly introduce irrefutable matches
01:13:42 <c_wraith> > case Nothing of ~(Just x) -> "hello"
01:13:44 <lambdabot> "hello"
01:14:14 <dsal> Nolrai: what do you find is harder in refactoring lens?
01:15:00 × Morrow quits (~MorrowM_@147.161.13.35) (Read error: Connection reset by peer)
01:15:21 MorrowM joins (~MorrowM_@147.161.13.35)
01:15:47 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
01:15:49 <c_wraith> it's funny, the lens laws exist specifically so that you can refactor without thinking about it. (this is the problem law-breaking optics cause - you have to think when you refactor)
01:16:14 <Axman6> yeah also curious what problems you're running into Nolrai
01:16:44 × MorrowM quits (~MorrowM_@147.161.13.35) (Remote host closed the connection)
01:17:30 × xff0x quits (~xff0x@2001:1a81:53f8:b100:933a:3ba5:1174:9474) (Ping timeout: 240 seconds)
01:17:31 Morrow joins (~MorrowM_@147.161.13.35)
01:19:34 <Nolrai> Hmm. Actually this is really weird, hmm. I am not sure its the Lens librarie's fault, function arguments just seem to be missing all over the place. What did I do?!?
01:19:44 xff0x joins (~xff0x@2001:1a81:5237:1000:d9df:afaf:2f58:a5ba)
01:20:50 <Nolrai> It doesn't help that the VSCode Haskell plugin keeps crashing or hanging.
01:21:53 <dsal> Every time I `type X = Y` something and then go back and change `X` to a `newtype`, I find all kinds of places I got sloppy. I am beginning to consider `type` harmful.
01:21:54 × Morrow quits (~MorrowM_@147.161.13.35) (Ping timeout: 240 seconds)
01:22:14 <Nolrai> I consider type harmful.
01:22:32 <Cale> Mostly it is, yeah
01:22:43 <Nolrai> Or rather it should only be used for abreviations.
01:23:22 <Cale> I think Lens can kind of get away with it only because what its synonyms unfold to is pretty uniform, and you sort of know to expect them
01:23:30 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
01:23:36 <Nolrai> Yeah.
01:24:47 <Cale> That said, I do think people overuse lenses to death a lot of the time. They certainly have their places, but if there's a reasonable way to not use Lens in any given scenario, then I probably won't.
01:24:54 <Nolrai> Hmm. I mean I don't think HSpec's `type Spec = SpecM ()` I think its dumb because it only saves 3 characters, so is a bad abreviation, but its an example of something that isn't harmful the way many uses of `type` are.
01:25:08 <Nolrai> * is harmful.
01:25:14 favonia joins (~favonia@user/favonia)
01:25:47 <Cale> Yeah, why not just rename SpecM to Spec and then get rid of the synonym, and write Spec () a bit?
01:25:57 <c_wraith> I dislike any type alias that looks like it has a different kind than the expression it expands to
01:26:11 stevenxl_ joins (~stevenlei@68.235.43.101)
01:26:29 <c_wraith> kinds are important documentation, too!
01:26:38 <Nolrai> That makes sense.
01:27:08 <Cale> Example of that?
01:27:27 <c_wraith> type Foo m = FooT m ()
01:27:42 <Cale> ah, yeah, that's kinda gross
01:27:48 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
01:27:53 <monochrom> Finally my opinion is not unpopular. >:)
01:28:22 <Nolrai> Is there a less awful way to do this `let [a,b,c,d,e,f] = bitToRB w <$> [0..5] in Cell a b c d e f` ?
01:29:18 <monochrom> "type alias = failing to make up your mind whether you want an abstraction or not" before it was cool.
01:29:23 <Nolrai> Heh.
01:29:28 × stevenxl quits (~stevenlei@68.235.43.157) (Ping timeout: 258 seconds)
01:30:17 <Nolrai> Yeah, I am pretty sure if it wasn't part of the language from the beginning, it wouldn't be getting put in.
01:31:44 <Cale> monochrom: Yeah, and the thing is, it perhaps *could* have been a nice means of abstraction in conjunction with the module system, if it were treated a little differently
01:32:09 <monochrom> That is true. CLU and SML do it properly.
01:32:27 <c_wraith> Also, I don't understand any of the type aliases in Template Haskell. ExpQ is not better than Q Exp
01:32:27 × carbolymer quits (~carbolyme@dropacid.net) (Read error: Connection reset by peer)
01:32:41 <monochrom> internal to your module it's an alias. When exported it's a newtype to your user.
01:32:55 <Cale> c_wraith: Not only do I agree, but I hate that entire module of lower-cased versions of everything
01:33:10 <monochrom> CLU is why I like Liskov.
01:33:17 carbolymer joins (~carbolyme@dropacid.net)
01:33:25 <Cale> It's like, a module of stuff for people who are uncomfortable with using monads
01:33:49 <c_wraith> typing "return" adds a bunch of letters!
01:34:00 <Cale> Which is probably why it exists to begin with, because it was constructed at a time when everyone was not entirely comfortable with monads
01:34:23 × raoul quits (~raoul@nomnomnomnom.co.uk) (Quit: The Lounge - https://thelounge.github.io)
01:35:42 <monochrom> Haskellers uncomfortable with monads. Almost sounds like an oxymoron.
01:36:08 <monochrom> Consider pythonistas uncomfortable with objects and assignment statements.
01:36:29 <monochrom> Dennis Ritchie uncomfortable with pointers.
01:36:34 <Cale> We also need to get more actually useful stuf into Template Haskell
01:36:58 <jao> lispers uncomfortable with parentheses
01:36:59 <c_wraith> typed template haskell is in a really awkward spot right now. Though at least liftTyped exists now
01:38:05 <Cale> Like, did you know that reifyInstances, when given a type that has type variables in it, will find all instances which unify with those variables, and if you want those variables not to be specialised, you have to pull some skolemization trickery by hand?
01:38:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:38:50 <Cale> I sure do, since it ends up being something I need to do every time I use TH
01:39:09 <Axman6> Anyone know if there's an IRC channel for Rel8?
01:40:13 <Cale> Also, this is quite fancy, but I'd really love to have more ways to interact with the type checker while building declarations and expressions in TH
01:40:35 <Cale> It would be really nice to be able to build an expression and ask "if I were to declare this, what type would you infer for it"?
01:41:15 <Cale> 99% of the work of any TH I write is figuring out what constraints go in my instance head.
01:41:42 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
01:41:46 <Cale> which basically amounts to imitating the typechecker/instance resolution
01:42:24 × cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 252 seconds)
01:44:15 <Cale> https://hackage.haskell.org/package/th-abstraction is really good though, at least most of the time
01:44:18 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds)
01:44:58 <Cale> Sometimes the canonicalisation of GADTs that gives you a bunch of type equalities is doing negative work, but most of the time at least it's pretty good
01:45:04 <Axman6> monochrom: or go programmings writing more than two lines without explicit error checking
01:45:10 <Axman6> programmers*
01:46:41 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
01:47:09 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
01:48:12 <monochrom> :)
01:48:20 adanwan_ joins (~adanwan@gateway/tor-sasl/adanwan)
01:48:42 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
01:49:16 cods joins (~fred@82-65-232-44.subs.proxad.net)
01:49:36 neurocyte43 joins (~neurocyte@45.14.191.41)
01:49:37 × neurocyte43 quits (~neurocyte@45.14.191.41) (Changing host)
01:49:37 neurocyte43 joins (~neurocyte@user/neurocyte)
01:51:37 <dsal> ... But how long are you comfortable not knowing whether err is not nil?
01:52:48 <Axman6> exactly once, because it should be immutable
01:53:24 × neurocyte4 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds)
01:53:24 neurocyte43 is now known as neurocyte4
01:53:45 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 268 seconds)
01:54:27 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:55:14 <dsal> Most go code is just EitherT without helpful syntax
01:58:43 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
01:59:00 <Axman6> mo' lines, mo' productive
01:59:02 favonia joins (~favonia@user/favonia)
02:00:58 × egoist quits (~egoist@186.235.80.194) (Quit: WeeChat 3.2)
02:01:06 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
02:01:19 × cjb quits (~cjb@user/cjb) ()
02:05:07 × cheater quits (~Username@user/cheater) (Ping timeout: 258 seconds)
02:05:37 cheater joins (~Username@user/cheater)
02:07:48 × sheepduck quits (~sheepduck@user/sheepduck) (Ping timeout: 258 seconds)
02:12:17 × juhp quits (~juhp@128.106.188.66) (Quit: juhp)
02:12:31 juhp joins (~juhp@128.106.188.66)
02:12:32 × finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer)
02:12:40 × stevenxl_ quits (~stevenlei@68.235.43.101) (Ping timeout: 256 seconds)
02:12:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
02:18:23 thiagomm joins (~thiagomm@179.156.177.136)
02:18:54 × thiagomm quits (~thiagomm@179.156.177.136) (Client Quit)
02:20:37 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:21:23 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
02:22:49 MQ-17J joins (~MQ-17J@8.21.10.15)
02:24:10 stevenxl joins (~stevenlei@68.235.43.101)
02:25:30 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 240 seconds)
02:27:11 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
02:29:36 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:29:36 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (copper.libera.chat (Nickname regained by services)))
02:29:36 finn_elija is now known as FinnElija
02:29:52 × stevenxl quits (~stevenlei@68.235.43.101) (Ping timeout: 272 seconds)
02:30:25 × td_ quits (~td@94.134.91.65) (Ping timeout: 258 seconds)
02:32:16 td_ joins (~td@94.134.91.214)
02:34:46 × derelict quits (~derelict@user/derelict) (Ping timeout: 256 seconds)
02:35:54 haliq joins (~haliq@128.106.240.245)
02:40:09 × Nolrai quits (~Nolrai@c-76-27-202-218.hsd1.or.comcast.net) (Quit: Client closed)
02:42:40 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:45:42 <qrpnxz> thoughts on this? https://termbin.com/fs8d
02:48:11 <jackdk> haskell is a pretty cool imperative language
02:48:32 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 265 seconds)
02:48:39 <qrpnxz> haha, the haskell one is a bit more inscrutable, but it's safe! Here's the Go one for comparison: Go program just as fast as the C one
02:48:57 <qrpnxz> https://termbin.com/26pd
02:49:49 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
02:50:01 <qrpnxz> half of the fast C and haskell programs is recreating what go slices do for free
02:50:05 <qrpnxz> truly sad
02:50:16 <qrpnxz> should be illegal to have a language without go slices
02:50:42 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
02:51:07 favonia joins (~favonia@user/favonia)
02:51:37 <jackdk> it should be illegal to have nulls just lying around in a language but here we are
02:51:53 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
02:53:12 <qrpnxz> meh
02:54:23 <keltono> ditto for not having generics :P
02:58:42 <qrpnxz> version two is rather nice and it's only 4 times slower
02:59:38 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
03:00:10 <nshepperd> go slices are just dynamic vectors?
03:00:40 <qrpnxz> yeah they are a pointer, a length, and a capacity
03:01:27 <nshepperd> there's a package for those
03:01:49 <qrpnxz> someone said that before and it wasn't it, but if you wanna share
03:02:40 lavaman joins (~lavaman@98.38.249.169)
03:03:16 img joins (~img@user/img)
03:03:37 <nshepperd> dynamic-mvector? doesn't implement the unboxed version though, which is lame
03:05:18 <qrpnxz> nice that it has push, but missing slices
03:06:07 <qrpnxz> also it's really annoying that data.vector's "safe" move requires both sides to be the same length
03:10:24 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
03:11:02 derelict joins (~derelict@user/derelict)
03:11:02 <nshepperd> odd that there's no slice function given all the doc comments about what happens to slices
03:11:24 <nshepperd> in go, are slices copy on write or what
03:11:49 <dsal> go slices are immutable
03:12:14 <nshepperd> so they're not dynamic vectors at all?
03:12:47 <dsal> You can write *through* them and "reslice" them (which copies them). There's an `append` operation which is basically realloc + copy
03:12:55 <dsal> (with all the downsides of being realloc + copy)
03:14:42 × hammock quits (~Hammock@2600:1700:19a1:3330::625) (Ping timeout: 240 seconds)
03:15:07 <nshepperd> weird
03:15:25 <dsal> You don't much use arrays in go because the size is part of the type. So slices are the general thing. They have some pointy edges, though.
03:18:45 × jao quits (jao@gateway/vpn/protonvpn/jao) (Remote host closed the connection)
03:19:12 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
03:19:25 <qrpnxz> go slices are not immutable
03:19:25 <nshepperd> i can imagine
03:19:26 <qrpnxz> wtf
03:19:32 cheater joins (~Username@user/cheater)
03:20:59 <qrpnxz> what is "pointy" about slices?
03:21:22 <dsal> https://play.golang.org/p/b7uoMnonP4Z
03:21:25 <dsal> Stuff like this.
03:21:29 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
03:21:30 <dsal> Why do you think go slices are mutable?
03:21:54 sheepduck joins (~sheepduck@user/sheepduck)
03:22:07 <qrpnxz> uh cause they are
03:22:12 <qrpnxz> idk what you are demonstrating here btw
03:22:21 <nshepperd> this go program is claimed to be fast, so i assume 'primes = append(primes, n)' is not copying the vector, but writing to the available space at the end of the storage
03:22:33 <qrpnxz> only grows as needed
03:22:34 <dsal> (oops, messed up that format string)
03:22:41 <dsal> qrpnxz: Please demonstrate mutating a slice.
03:22:48 <qrpnxz> s[0] = 1
03:22:53 <dsal> That doesn't change s.
03:23:15 <qrpnxz> obj.set(0) doesn't change obj either
03:23:32 <dsal> I don't know what obj is.
03:23:53 <qrpnxz> a reference type, like slices. You can imagine it as any java object
03:23:56 <dsal> nshepperd: append *might* copy and it might mutate the underlying array. If it mutates the underlying array, it might affect other things that share the array.
03:24:20 <nshepperd> in which case, a = append(primes, 1); b = append (primes, 2) will result in both a and b containing 2
03:24:39 <dsal> nshepperd: Yeah, that's what I'm demonstrating. It'll do that *sometimes*
03:24:46 <qrpnxz> right, append returns a new slice, the new slice might be pointing to new memory. I don't care about the old slice, so i assign it on top of the old one
03:24:50 <nshepperd> sounds horribly
03:25:28 <dsal> There are a few places go makes for strange bugs.
03:25:36 × shapr quits (~user@pool-108-28-144-11.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
03:25:48 <qrpnxz> a is always looks like primes with 1 at the end
03:25:55 <qrpnxz> b always looks like primes with 2 at the end
03:26:15 <dsal> qrpnxz: that's not true, as I demonstrated here: https://play.golang.org/p/FlJSCKXl-xE
03:26:16 <nshepperd> how does append enforce that? reference counting?
03:26:42 <qrpnxz> ah your thing works now
03:26:46 <qrpnxz> ah yeah ur right lol
03:26:56 <qrpnxz> well w/e, this literally never comes up
03:26:59 <nshepperd> lol
03:27:07 <dsal> This comes up *all the time*.
03:27:21 <qrpnxz> if you need a nice pure slice you just make yourself a new one like append([]int{}, old...)
03:27:31 <qrpnxz> lol where
03:27:34 <dsal> You can reslice with a maximum capacity without forcing a copy.
03:27:46 <dsal> In large go codebases? I work on... very large go codebases.
03:27:47 <qrpnxz> yeah so?
03:27:48 <nshepperd> so append assumes uniqueness
03:27:53 <nshepperd> that's pretty sharp
03:28:02 <qrpnxz> append doesn't assume anything
03:28:05 <qrpnxz> just does what it does
03:28:19 <dsal> append does two distinct things depending on stuff you're probably not paying attention to.
03:28:21 <qrpnxz> ok it assumes that you know what append does
03:28:22 <qrpnxz> lol
03:29:01 <dsal> If you're below cap, it just copies your new value into the underlying array past the len index and returns a new slice with len incremented. If you're at cap, it allocates a new array, copies all the existing data and then adds your new item.
03:29:19 <dsal> (which is sort of like realloc, which also has fun bugs)
03:30:12 <qrpnxz> idk how this ever comes up as a problem honestly, if you got a foreign slice that you don't own and you want to append and stuff, you copy it
03:30:24 <dsal> Why would you copy it?
03:30:34 rachel231 joins (~rachel231@c-73-142-199-151.hsd1.nh.comcast.net)
03:30:59 <dsal> You can always reslice adjusting the cap down.
03:31:06 <qrpnxz> if you don't own it and you wanna do crap like append to it, or use it after the real owner needs it again
03:31:21 <qrpnxz> go giving you the change to copy if you need to and not copy if you don't need to
03:31:31 × TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8)
03:32:15 <qrpnxz> some api gives you a copy every time, sometimes it gives you a buffer slice only valid until next call. If it's the latter you can get very efficient, but if you need to keep the slice past the call, you copy yourself
03:33:02 <nshepperd> if you need to copy it before appending is safe, shouldn't copying return a different type so you don't fuck it up
03:33:32 <dsal> In general, I try to steer people towards doing stuff that doesn't create bugs. It's difficult sometimes.
03:33:52 <qrpnxz> bro this is not haskell, we don't do immutable data structures generally lol
03:34:19 <nshepperd> idk this api seems like a mistake
03:34:30 <qrpnxz> like for example https://golang.org/pkg/bufio/#Reader.ReadSlice if you don't need to keep the bytes, then you can zip through a reader super fast, by not copying, but if you do need them you just copy, or use another method that automatically copies
03:34:34 <nshepperd> compared to plain ol dynamic vectors
03:34:58 <dsal> Part of my day job is teaching people at google how to write less buggy go code.
03:34:59 <qrpnxz> well actually there is one exception, which is strings. If you want immutable byte slice in go you use string
03:35:33 <qrpnxz> dsal, i thought googlers were supposed to be good, not reuse slices they weren't supposed to
03:35:36 spruit11 joins (~quassel@2a02:a467:ccd6:1:d8ed:8d81:7c94:d830)
03:35:56 <nshepperd> if googlers were good they wouldn't invent bad APIs
03:36:00 <dsal> haha
03:36:02 <qrpnxz> xd
03:36:34 curiousggay_ joins (~curiousgg@77-120-144-167.kha.volia.net)
03:36:34 <qrpnxz> haskell definitely safer, but go so much more productive for me still with it's readers and writers
03:36:43 <qrpnxz> *its
03:36:49 cloudy`` joins (~user@2600:8807:c207:f00:d412:4cce:d9f1:ba0)
03:37:02 <DigitalKiwi> go is garbage
03:37:17 <qrpnxz> nah
03:37:29 × Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:5def:8486:9e4:b49a) (Read error: Connection reset by peer)
03:37:29 × curiousgay quits (~curiousgg@77-120-144-167.kha.volia.net) (Read error: Connection reset by peer)
03:37:29 the_proffesor joins (~theproffe@2601:282:847f:8010::3a29)
03:37:29 Feuermagier_ joins (~Feuermagi@2a02:2488:4211:3400:5def:8486:9e4:b49a)
03:37:29 × justache quits (~justache@user/justache) (Quit: Ping timeout (120 seconds))
03:37:29 × azeem quits (~azeem@dynamic-adsl-94-34-20-185.clienti.tiscali.it) (Ping timeout: 240 seconds)
03:37:45 justache joins (~justache@user/justache)
03:37:50 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
03:37:54 zmt00 joins (~zmt00@user/zmt00)
03:38:03 <dsal> I can get so much done so much faster in Haskell.
03:38:32 × the_proffesor quits (~theproffe@2601:282:847f:8010::3a29) (Changing host)
03:38:32 the_proffesor joins (~theproffe@user/theproffesor)
03:38:32 theproffesor is now known as Guest2594
03:38:32 the_proffesor is now known as theproffesor
03:38:38 <qrpnxz> yeah i hope to learn to do that one day, for now gotta use another language for results
03:38:42 × cloudy` quits (~user@2600:8807:c207:f00:d022:dd81:f0f8:bb22) (Ping timeout: 240 seconds)
03:38:42 × spruit11_ quits (~quassel@2a02:a467:ccd6:1:70d9:6b8a:7264:8769) (Ping timeout: 240 seconds)
03:38:42 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds)
03:38:42 × Guest2594 quits (~theproffe@user/theproffesor) (Ping timeout: 240 seconds)
03:38:48 <qrpnxz> like net package too good
03:38:55 <qrpnxz> how to live without net package
03:39:32 <dsal> I just realized I've been working in go for nearly 12 years. :/ But it's still painful.
03:40:13 <qrpnxz> how are haskellers doing error handling? I barely see any, do they just use exceptions or what?
03:40:40 <dsal> errors? We don't write code with errors. :P
03:41:10 <qrpnxz> xd
03:41:13 <nshepperd> I/O code uses exceptions, generally
03:41:17 <dsal> It depends on what you mean. There's maybe/either kinds of things and there's various exceptions.
03:41:24 <qrpnxz> ig the database just never fails when you program in haskell
03:41:26 <dsal> I don't enjoy exceptions in haskell any more than I do in any other language.
03:42:04 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds)
03:42:18 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
03:42:40 <dsal> `bracket` is fine. `catch`/`catches` and the like are OK. Getting reckless with async exceptions can be exciting.
03:42:56 × alx741 quits (~alx741@186.178.108.157) (Quit: alx741)
03:43:07 <qrpnxz> It's continuation time
03:43:45 <myShoggoth> Haskell Foundation June Update: https://discourse.haskell.org/t/haskell-foundation-june-update/2722
03:43:53 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
03:45:26 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
03:46:42 × sheepduck quits (~sheepduck@user/sheepduck) (Ping timeout: 252 seconds)
03:47:16 img joins (~img@user/img)
03:49:21 × adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Quit: _)
03:49:33 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
03:52:42 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
03:53:40 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
03:56:58 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds)
03:59:30 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
04:03:34 × cheater quits (~Username@user/cheater) (Ping timeout: 258 seconds)
04:03:43 cheater joins (~Username@user/cheater)
04:04:16 × cloudy quits (~user@2600:8807:c207:f00:d022:dd81:f0f8:bb22) (Remote host closed the connection)
04:04:16 raoul joins (~raoul@nom4.xyz)
04:04:57 × rachel231 quits (~rachel231@c-73-142-199-151.hsd1.nh.comcast.net) (Quit: Connection closed)
04:07:55 × cloudy`` quits (~user@2600:8807:c207:f00:d412:4cce:d9f1:ba0) (Remote host closed the connection)
04:08:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:16:10 azeem joins (~azeem@dynamic-adsl-94-34-20-185.clienti.tiscali.it)
04:18:41 × azeem quits (~azeem@dynamic-adsl-94-34-20-185.clienti.tiscali.it) (Read error: Connection reset by peer)
04:22:30 × eight quits (~eight@user/eight) (Quit: leaving)
04:24:11 lavaman joins (~lavaman@98.38.249.169)
04:28:18 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
04:30:41 <sm[m]> bravo cabal documentors! https://cabal.readthedocs.io/en/3.4/cabal-projectindex.html is fantastic
04:33:33 sheepduck joins (~sheepduck@user/sheepduck)
04:40:37 × sheepduck quits (~sheepduck@user/sheepduck) (Remote host closed the connection)
04:43:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
04:44:05 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
04:46:26 × marinelli[m] quits (~marinelli@2001:470:69fc:105::2d8) (Quit: node-irc says goodbye)
04:48:53 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
04:50:46 × derelict quits (~derelict@user/derelict) (Ping timeout: 256 seconds)
05:03:47 × favonia quits (~favonia@user/favonia) (Ping timeout: 256 seconds)
05:07:26 favonia joins (~favonia@user/favonia)
05:08:18 notzmv joins (~zmv@user/notzmv)
05:16:18 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
05:19:25 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
05:22:19 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:23:31 marinelli[m] joins (~marinelli@2001:470:69fc:105::2d8)
05:42:01 curiousggay_ is now known as curiousgay
05:43:04 Guest39 joins (~steve@2403:6200:8872:c9a0:7400:c8ff:92fb:3985)
05:48:18 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
05:48:59 × HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Ping timeout: 244 seconds)
05:49:06 michalz joins (~michalz@185.246.204.105)
05:50:04 HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato)
05:54:20 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
05:57:48 <feetwind> what ghc flags do i need to get a good callstack from a failing (Data.Vector.!) call? do i need to add HasCallStack constraints everywhere?
05:58:18 <feetwind> (the program is quite large so the latter is not very realistic)
05:58:36 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
05:58:55 × Guest39 quits (~steve@2403:6200:8872:c9a0:7400:c8ff:92fb:3985) (Quit: Leaving)
06:01:34 cmburnett parts (~cmburnett@c-73-37-184-31.hsd1.mn.comcast.net) ()
06:02:43 qbt joins (~edun@user/edun)
06:03:09 anandprabhu joins (~anandprab@94.202.243.198)
06:03:12 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:05:04 <feetwind> or is there maybe a ghc plugin that can add HasCallStack constraints per module?
06:05:21 chris_ joins (~chris@81.96.113.213)
06:05:21 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
06:06:15 Codaraxis__ joins (~Codaraxis@193.32.126.157)
06:07:46 × myShoggoth quits (~myShoggot@75.164.51.64) (Ping timeout: 258 seconds)
06:08:09 dka joins (~code-is-a@ns3059207.ip-193-70-33.eu)
06:08:55 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
06:09:42 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
06:10:14 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:10:33 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
06:10:54 × Codaraxis_ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Ping timeout: 272 seconds)
06:12:58 mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be)
06:13:04 × fabfianda quits (~fabfianda@37.183.255.57) (Read error: Connection reset by peer)
06:13:12 fabfianda joins (~fabfianda@37.183.255.57)
06:14:04 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
06:14:18 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
06:14:18 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
06:20:14 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:20:33 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
06:24:50 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds)
06:25:19 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:28:24 × turlando quits (~turlando@user/turlando) (Ping timeout: 272 seconds)
06:29:17 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 244 seconds)
06:29:30 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
06:31:54 <ephemient> feetwind: -prof -fprof-auto -fprof-cafs will add cost centers to (just about) all declarations, which should show up in exception stacktraces. not sure about per-module though
06:32:04 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
06:34:13 × willbush quits (~user@47.183.200.14) (Remote host closed the connection)
06:34:21 <ephemient> https://ghc.gitlab.haskell.org/ghc/doc/users_guide/runtime_control.html#rts-flag--xc
06:35:25 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:39:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:40:03 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 265 seconds)
06:40:33 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:41:56 lavaman joins (~lavaman@98.38.249.169)
06:42:45 v01d4lph4 joins (~v01d4lph4@122.160.65.250)
06:42:45 × v01d4lph4 quits (~v01d4lph4@122.160.65.250) (Changing host)
06:42:45 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
06:43:11 chele joins (~chele@user/chele)
06:45:25 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
06:46:22 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
06:47:41 <rune> If I include all the packages inside the "dist-newstyle" folder in my hie.yaml file, would this enable "Jump to definition" for functions defined in a dependencies?
06:47:48 fef joins (~thedawn@user/thedawn)
06:47:59 betelgeuse joins (~john2gb@94-225-47-8.access.telenet.be)
06:48:09 <rune> Sorry, wrong channel
06:48:16 zangi joins (~zangi@103.154.230.230)
06:49:10 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 258 seconds)
06:49:39 <zangi> why doesn't listDirectory list "foo"?
06:49:42 <zangi> `filter (== "foo") <$> listDirectory "." <* writeFile "foo" "something"`
06:49:58 × betelgeuse quits (~john2gb@94-225-47-8.access.telenet.be) (Client Quit)
06:50:00 <zangi> []
06:50:14 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
06:50:48 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
06:51:46 betelgeuse joins (~john2gb@94-225-47-8.access.telenet.be)
06:52:22 × betelgeuse quits (~john2gb@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer)
06:53:58 × norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 272 seconds)
06:53:59 betelgeuse joins (~john2gb@94-225-47-8.access.telenet.be)
06:54:18 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
06:54:26 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
06:54:38 × betelgeuse quits (~john2gb@94-225-47-8.access.telenet.be) (Read error: Connection reset by peer)
06:55:03 thornAvery joins (~thorn@121.220.33.124)
06:55:52 <thornAvery> howdy, i have a question about brick but im not sure if this is the place to ask it, would it be ok?
06:56:14 betelgeuse joins (~john2gb@94-225-47-8.access.telenet.be)
06:56:16 × betelgeuse quits (~john2gb@94-225-47-8.access.telenet.be) (Client Quit)
07:00:14 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:03:14 fvr joins (uid503686@id-503686.highgate.irccloud.com)
07:04:42 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds)
07:05:17 gehmehgeh joins (~user@user/gehmehgeh)
07:06:47 <sm[m]> go for it thornAvery
07:10:03 × sm quits (~user@plaintextaccounting/sm) (Remote host closed the connection)
07:10:15 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:12:48 chomwitt joins (~Pitsikoko@2a02:587:dc0b:0:d8f7:cdfe:4658:bec4)
07:13:30 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
07:14:18 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
07:14:52 × oxide quits (~lambda@user/oxide) (Ping timeout: 272 seconds)
07:15:46 azeem joins (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it)
07:16:00 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 258 seconds)
07:16:24 oxide joins (~lambda@user/oxide)
07:16:53 geekosaur joins (~geekosaur@xmonad/geekosaur)
07:17:16 <[exa]> zangi: maybe the operation order is wrong?
07:19:03 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
07:20:15 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:24:34 acidjnk_new joins (~acidjnk@p200300d0c72b954061d05013652ae098.dip0.t-ipconnect.de)
07:25:00 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 265 seconds)
07:25:30 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:25:54 × alex3 quits (~alex3@BSN-77-82-41.static.siol.net) (Ping timeout: 240 seconds)
07:26:19 <tomsmeding> sm[m]: that's a bookmark
07:26:28 <tomsmeding> that's great
07:28:34 turlando joins (~turlando@5.171.97.176)
07:28:35 × turlando quits (~turlando@5.171.97.176) (Changing host)
07:28:35 turlando joins (~turlando@user/turlando)
07:30:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:31:13 cfricke joins (~cfricke@user/cfricke)
07:31:58 alex3 joins (~alex3@BSN-77-82-41.static.siol.net)
07:33:33 × turlando quits (~turlando@user/turlando) (Ping timeout: 268 seconds)
07:33:54 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
07:35:36 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:36:16 <thornAvery> so im trying to visualise a cellular automata, im currently constructing a vBox full of hBoxs, where each hBox is a single character string that i apply attributes to. constructing this is taknig a large amount of my cpu usage, and i feel there should be a quicker way to map a [[MyType]] to the screen, where MyType is a simple `data MyType = A | B | C` which determines the attributes to apply
07:37:34 <thornAvery> but reading the docs its not immediately obvious if i can do something like, render whole-line strings but with parts of it having different attributes
07:44:39 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
07:45:15 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:46:01 × euandreh quits (~euandreh@2804:14c:33:9fe5:fe7c:a1fa:94dc:c42a) (Remote host closed the connection)
07:46:25 euandreh joins (~euandreh@2804:14c:33:9fe5:af42:e045:e98b:4388)
07:49:48 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds)
07:49:51 Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de)
07:50:19 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:54:42 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds)
07:57:07 × fef quits (~thedawn@user/thedawn) (Ping timeout: 244 seconds)
07:57:35 <zangi> [exa]: apparently it prints ["foo"] in do notation, weird
07:58:03 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection)
08:00:15 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
08:01:12 v01d4lph4 joins (~v01d4lph4@122.160.65.250)
08:01:12 × v01d4lph4 quits (~v01d4lph4@122.160.65.250) (Changing host)
08:01:12 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
08:01:13 <tomsmeding> zangi: https://hackage.haskell.org/package/base-4.15.0.0/docs/Control-Applicative.html#v:-60--42-
08:01:28 bor0 joins (~boro@user/bor0)
08:01:32 <tomsmeding> <* first executes the action of its left argument, then the action of its right argument, and finally returns the value from the left argument
08:01:52 <tomsmeding> it's not like =<< where it really executes the actions from right to left
08:01:56 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.2)
08:03:39 jakalx joins (~jakalx@base.jakalx.net)
08:04:34 ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de)
08:05:07 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 265 seconds)
08:06:08 hendursaga joins (~weechat@user/hendursaga)
08:08:55 mikail joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
08:09:31 × hendursa1 quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds)
08:09:53 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
08:11:03 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
08:12:30 MoC joins (~moc@user/moc)
08:13:44 <zangi> tomsmeding: makes sense, thanks
08:14:47 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 265 seconds)
08:15:19 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
08:15:49 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
08:16:19 hegstal joins (~hegstal@2a02:c7f:7604:8a00:8d05:aaa6:8a87:6441)
08:16:50 hololeap joins (~hololeap@user/hololeap)
08:17:28 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
08:17:52 geekosaur joins (~geekosaur@xmonad/geekosaur)
08:18:10 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
08:18:10 Lord_of_Life_ is now known as Lord_of_Life
08:20:07 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
08:22:31 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
08:27:09 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:28:17 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:30:00 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
08:30:14 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds)
08:32:46 jakalx parts (~jakalx@base.jakalx.net) ()
08:34:30 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
08:34:53 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
08:38:41 fendor joins (~fendor@77.119.196.177.wireless.dyn.drei.com)
08:39:26 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 265 seconds)
08:40:35 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
08:41:41 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
08:44:27 × tomferon[m] quits (~tomferon@2001:470:69fc:105::268) (Quit: node-irc says goodbye)
08:44:33 × eddiemundo quits (~eddiemund@2001:470:69fc:105::a9c) (Quit: node-irc says goodbye)
08:46:10 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
08:46:38 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
08:46:55 cheater joins (~Username@user/cheater)
08:48:10 jakalx joins (~jakalx@base.jakalx.net)
08:49:24 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
08:53:02 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
08:55:26 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 252 seconds)
08:55:30 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
09:04:29 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 258 seconds)
09:09:11 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Remote host closed the connection)
09:09:53 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
09:11:00 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:12:43 fef joins (~thedawn@user/thedawn)
09:14:08 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds)
09:14:15 nanoc joins (~nanocoast@p200300e1273bf000ccc6df24f323b7c2.dip0.t-ipconnect.de)
09:14:41 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
09:15:35 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
09:19:22 cfricke joins (~cfricke@user/cfricke)
09:23:03 a6a45081-2b83 joins (~aditya@223.235.222.167)
09:24:42 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds)
09:25:34 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
09:26:47 × ukari quits (~ukari@user/ukari) (Remote host closed the connection)
09:26:52 × bor0 quits (~boro@user/bor0) (Quit: Leaving)
09:27:48 ukari joins (~ukari@user/ukari)
09:28:31 × Cajun quits (~Cajun@ip98-163-211-112.no.no.cox.net) (Quit: Client closed)
09:32:00 Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se)
09:33:23 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection)
09:35:02 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
09:40:02 Pickchea joins (~private@user/pickchea)
09:45:14 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
09:49:43 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 258 seconds)
09:53:00 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Ping timeout: 252 seconds)
09:53:26 × mikail quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Remote host closed the connection)
09:53:56 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 258 seconds)
09:58:04 mikail joins (~mikail@90.212.77.3)
10:02:52 derelict joins (~derelict@user/derelict)
10:05:56 Torro joins (Torro@gateway/vpn/protonvpn/torro)
10:08:29 dunj3 joins (~dunj3@p200300f61714a66193d8ecf822b563af.dip0.t-ipconnect.de)
10:09:35 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
10:11:54 × azeem quits (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it) (Ping timeout: 240 seconds)
10:12:10 azeem joins (~azeem@176.201.21.236)
10:13:54 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Ping timeout: 240 seconds)
10:14:19 × a6a45081-2b83 quits (~aditya@223.235.222.167) (Remote host closed the connection)
10:15:29 ph88 joins (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de)
10:24:22 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 268 seconds)
10:25:48 azeem joins (~azeem@176.201.21.236)
10:27:26 neo joins (~neo3@cpe-292712.ip.primehome.com)
10:28:49 × haliq quits (~haliq@128.106.240.245) (Quit: Client closed)
10:30:15 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
10:37:51 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 265 seconds)
10:40:47 azeem joins (~azeem@176.201.21.236)
10:42:18 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds)
10:43:10 lavaman joins (~lavaman@98.38.249.169)
10:43:29 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
10:44:02 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:45:06 × zangi quits (~zangi@103.154.230.230) (Ping timeout: 240 seconds)
10:46:14 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
10:47:26 zangi joins (~zangi@114.125.101.225)
10:47:49 chris_ joins (~chris@81.96.113.213)
10:48:00 × oxide quits (~lambda@user/oxide) (Ping timeout: 265 seconds)
10:48:18 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
10:49:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
10:49:25 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
10:49:34 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:49:57 nschoe joins (~quassel@178.251.84.79)
10:49:59 Schrostfutz joins (~Schrostfu@schettlerdck.tkn.tu-berlin.de)
10:50:01 × zangi quits (~zangi@114.125.101.225) (Client Quit)
10:50:08 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
10:53:21 × alex3 quits (~alex3@BSN-77-82-41.static.siol.net) (Ping timeout: 258 seconds)
10:54:36 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
10:54:42 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
10:55:25 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:55:54 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 272 seconds)
10:57:27 azeem joins (~azeem@176.201.21.236)
11:00:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
11:00:32 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:00:39 alex3 joins (~alex3@BSN-77-82-41.static.siol.net)
11:01:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:04:48 kspalaiologos joins (~kspalaiol@user/kspalaiologos)
11:05:24 × mikail quits (~mikail@90.212.77.3) (Ping timeout: 272 seconds)
11:06:40 AlexNoo_ joins (~AlexNoo@94.233.241.144)
11:08:22 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
11:10:13 × AlexNoo quits (~AlexNoo@178.34.161.92) (Ping timeout: 258 seconds)
11:10:17 × ukari quits (~ukari@user/ukari) (Remote host closed the connection)
11:10:19 × AlexZenon quits (~alzenon@178.34.161.92) (Ping timeout: 268 seconds)
11:10:22 × Alex_test quits (~al_test@178.34.161.92) (Ping timeout: 252 seconds)
11:10:50 ukari joins (~ukari@user/ukari)
11:10:52 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
11:13:57 mikail joins (~mikail@90.152.14.81)
11:14:11 AlexZenon joins (~alzenon@94.233.241.144)
11:14:32 Alex_test joins (~al_test@94.233.241.144)
11:15:32 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Ping timeout: 256 seconds)
11:23:06 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 240 seconds)
11:24:18 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 252 seconds)
11:25:38 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
11:26:15 chris_ joins (~chris@81.96.113.213)
11:26:44 azeem joins (~azeem@176.201.21.236)
11:27:20 × natechan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
11:27:48 Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se)
11:29:45 Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de)
11:30:44 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 272 seconds)
11:31:17 chris_ joins (~chris@81.96.113.213)
11:31:20 natechan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
11:32:22 jippiedoe joins (~david@2a02-a44c-e14e-1-2787-f5de-e687-987e.fixed6.kpn.net)
11:35:40 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
11:37:55 chronon parts (~chronon@user/chronon) ()
11:39:10 × anandprabhu quits (~anandprab@94.202.243.198) (Quit: Leaving)
11:40:26 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
11:44:29 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
11:48:28 × jespada quits (~jespada@90.254.247.46) (Ping timeout: 272 seconds)
11:49:06 jespada joins (~jespada@90.254.247.46)
11:55:08 <Profpatsch> What do people do with lots of nested IO (Validation err a) operations?
11:55:56 <merijn> "It Depends (TM)"
11:57:18 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 252 seconds)
11:58:11 <Franciman> haskell is basically at a dead end
11:58:24 <Franciman> it has to decide
11:58:29 <Franciman> will it get dependent types?
11:58:42 <Franciman> will it get better macros?
11:58:48 <Franciman> what will it do?
11:58:51 <Franciman> will it stay the same?
11:59:17 × cheater quits (~Username@user/cheater) (Ping timeout: 258 seconds)
11:59:35 cheater joins (~Username@user/cheater)
12:00:01 <Profpatsch> Franciman: ok
12:00:17 <Profpatsch> merijn: on what?
12:01:17 <hpc> the real problem with haskell is it can't implement ebpf in homomorphically encrypted iphone apps :D
12:01:25 × Codaraxis__ quits (~Codaraxis@193.32.126.157) (Remote host closed the connection)
12:01:39 <merijn> Profpatsch: What's the errors? How do you wanna handle them? Why are they in IO? How do you wanna deal with complication from that? etc.
12:01:44 Codaraxis__ joins (~Codaraxis@193.32.126.157)
12:02:33 azeem joins (~azeem@176.201.21.236)
12:03:00 <Profpatsch> merijn: basically I have a bunch of IO functions that parse stuff into Validation
12:03:15 <Profpatsch> e.g. readDir and then read every file in the dir
12:03:23 fef joins (~thedawn@user/thedawn)
12:03:31 magnuscake joins (~magnuscak@87-121-92-61.dyn.launtel.net.au)
12:03:57 <Profpatsch> Usually the way that works is if readDir fails, put that in the Failure and return, if it succeeds read every file and accumulate errors
12:04:17 <magnuscake> Hello. I have the following; https://paste.tomsmeding.com/HCa1nNvS
12:04:19 <Profpatsch> So there’s a bunch of nested (a -> IO (Validation (NonEmpty err) b)
12:04:27 <magnuscake> This is just a general question, but for normal form, why can't I write
12:04:37 <magnuscake> data Garden' = Gardner Gardneria'
12:04:55 <merijn> I'd say you first use sequence to go from "[IO (Validation err a)]" to "IO [Validation err a]" and then you can fmap sequence into IO to go from '[Validation err a]' to 'Validation err [a]'
12:05:07 <magnuscake> | Gardner Daisy'
12:05:32 <hpc> magnuscake: the first thing in each section is the data constructor
12:05:39 <hpc> it's easier to see with GADT syntax, you get something like
12:05:59 <hpc> data Garden' where Gardenia' :: Gardener -> Garden'; Daisy' :: Gardener -> Garden'; ...
12:06:18 × acidjnk_new quits (~acidjnk@p200300d0c72b954061d05013652ae098.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
12:06:22 <hpc> and those constructors have to be unique so you know which one it is later when you construct the value
12:07:50 <magnuscake> Ah ok that makes sense thanks
12:08:15 <Profpatsch> merijn: let’s see whether this play on traverse gets me anywhere:
12:08:17 <Profpatsch> forValidate ::
12:08:20 <Profpatsch> (Traversable t, Applicative ap, Semigroup err) =>
12:08:22 <Profpatsch> t (ap (Validation err a)) ->
12:08:22 × phma quits (phma@2001:5b0:211c:8948:6f8b:5fd0:dc14:21f2) (Read error: Connection reset by peer)
12:08:24 <Profpatsch> (a -> ap (Validation err b)) ->
12:08:26 <Profpatsch> ap (t (Validation err b))
12:09:04 AlexNoo_ is now known as AlexNoo
12:09:14 phma joins (phma@2001:5b0:211f:2298:dd93:a388:d3e:b1b1)
12:09:38 lortabac joins (~lortabac@95.138.56.124)
12:10:35 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
12:12:36 acidjnk_new joins (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de)
12:19:28 cfricke joins (~cfricke@user/cfricke)
12:21:06 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 240 seconds)
12:21:21 azeem joins (~azeem@176.201.21.236)
12:25:24 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
12:25:24 Kaipi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
12:26:49 × Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer)
12:26:59 Kaipi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
12:27:01 dwalker joins (~user@user/dwalker)
12:29:53 pbrisbin joins (~patrick@pool-173-49-147-28.phlapa.fios.verizon.net)
12:30:44 jumper149 joins (~jumper149@80.240.31.34)
12:31:06 <jumper149> Hmmmm, ghc is using 30GB RAM + 60GB swap. I think something might be wrong x)
12:31:22 <jumper149> It fininshes compiling though
12:31:40 stevenxl joins (~stevenlei@68.235.43.101)
12:34:33 × dwalker quits (~user@user/dwalker) (Quit: ERC Version 5.3 (IRC client for Emacs))
12:35:30 machinedgod joins (~machinedg@24.105.81.50)
12:37:55 dwalker joins (~user@185.189.160.132)
12:39:54 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 240 seconds)
12:40:05 <merijn> jumper149: oof
12:42:49 <jumper149> merijn: https://github.com/biocad/servant-openapi3/issues/8
12:42:55 <jumper149> This seems to be related.
12:42:58 notzmv joins (~zmv@user/notzmv)
12:43:16 <jumper149> I hope splitting up the API type will help
12:45:03 azeem joins (~azeem@176.201.21.236)
12:45:59 lavaman joins (~lavaman@98.38.249.169)
12:46:23 <merijn> iirc Servant is rather type heavy, which certainly correlates with compile times
12:46:52 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
12:50:06 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:50:50 chris_ joins (~chris@81.96.113.213)
12:51:03 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
12:51:17 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Ping timeout: 256 seconds)
12:51:41 <maerwald> the bigger problem with servant is my terminal size
12:52:24 jumper149 chuckles
12:53:43 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Quit: Leaving)
12:53:57 Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se)
12:54:08 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Read error: Connection reset by peer)
12:55:30 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
12:56:33 alx741 joins (~alx741@186.178.108.157)
12:58:30 × sqrt2 quits (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) (Quit: ZNC - http://znc.in)
12:58:41 sqrt2 joins (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net)
13:01:12 <merijn> :)
13:01:27 <ph88> how can i let stack download multiple GHC versions for my docker image ? so that it doesn't have to download again when image is executed ?
13:08:04 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
13:10:12 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 258 seconds)
13:10:35 azeem joins (~azeem@176.201.21.236)
13:12:50 × stevenxl quits (~stevenlei@68.235.43.101) (Ping timeout: 256 seconds)
13:13:50 stevenxl joins (~stevenlei@68.235.43.101)
13:14:52 <fendor> ph88, I think you can use something like: stack setup --resolver=lts-18.0, e
13:15:11 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 268 seconds)
13:15:49 <ph88> thanks !
13:16:28 azeem joins (~azeem@176.201.21.236)
13:17:30 <merijn> Ah better question is: Why are you making docker images with compilers in it?
13:18:27 robbert-vdh parts (~robbert@robbertvanderhelm.nl) (WeeChat 3.2)
13:20:03 × kspalaiologos quits (~kspalaiol@user/kspalaiologos) (Quit: Leaving)
13:21:03 <fendor> development container!
13:23:09 × magnuscake quits (~magnuscak@87-121-92-61.dyn.launtel.net.au) (Ping timeout: 265 seconds)
13:27:02 × qrpnxz quits (~qrpnxz@user/qrpnxz) (Ping timeout: 272 seconds)
13:28:45 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 268 seconds)
13:29:50 azeem joins (~azeem@176.201.21.236)
13:33:50 favonia joins (~favonia@user/favonia)
13:38:42 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 240 seconds)
13:38:55 × dwalker quits (~user@185.189.160.132) (Quit: ERC Version 5.3 (IRC client for Emacs))
13:39:16 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
13:39:29 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
13:39:52 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
13:40:06 chris_ joins (~chris@81.96.113.213)
13:40:45 mnrmnaugh is now known as i
13:40:55 i is now known as mnrmnaugh
13:41:11 qrpnxz joins (~qrpnxz@user/qrpnxz)
13:41:15 mnrmnaugh is now known as why
13:41:30 why is now known as awk
13:41:52 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
13:42:15 × fef quits (~thedawn@user/thedawn) (Ping timeout: 244 seconds)
13:42:27 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
13:42:55 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
13:45:00 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 272 seconds)
13:45:29 azeem joins (~azeem@176.201.21.236)
13:48:18 × Pickchea quits (~private@user/pickchea) (Ping timeout: 240 seconds)
13:49:06 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
13:50:04 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 272 seconds)
13:53:34 azeem joins (~azeem@176.201.21.236)
13:57:11 Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se)
13:57:16 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Read error: Connection reset by peer)
13:58:44 × acidjnk_new quits (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
13:59:29 Feuermagier joins (~Feuermagi@user/feuermagier)
14:00:18 × Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:5def:8486:9e4:b49a) (Ping timeout: 240 seconds)
14:00:23 × fvr quits (uid503686@id-503686.highgate.irccloud.com) (Quit: Connection closed for inactivity)
14:01:19 Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se)
14:02:17 acidjnk_new joins (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de)
14:04:15 zebrag joins (~chris@user/zebrag)
14:05:55 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
14:07:10 fizbin_ joins (~fizbin@93.sub-174-198-203.myvzw.com)
14:07:36 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
14:08:13 × MQ-17J quits (~MQ-17J@8.21.10.15) (Ping timeout: 268 seconds)
14:08:22 × acidjnk_new quits (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
14:08:54 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
14:09:56 Deide joins (~Deide@wire.desu.ga)
14:09:56 × Deide quits (~Deide@wire.desu.ga) (Changing host)
14:09:56 Deide joins (~Deide@user/deide)
14:10:02 × fendor quits (~fendor@77.119.196.177.wireless.dyn.drei.com) (Remote host closed the connection)
14:12:44 fendor joins (~fendor@77.119.218.107.wireless.dyn.drei.com)
14:14:30 <Profpatsch> super helpful for validation:
14:14:32 <Profpatsch> traverseFold :: (Applicative ap, Traversable t, Monoid m) => (a -> ap m) -> t a -> ap m
14:14:35 <Profpatsch> traverseFold f xs = fold <$> traverse f xs
14:15:02 TranquilEcho joins (~grom@user/tranquilecho)
14:15:27 <Profpatsch> (a -> IO (Validation err b)) -> IO a -> IO (Validation err b)
14:15:54 <Taneb> Profpatsch: I think that can be rewritten to just have a Foldable constraint on t
14:16:24 <Profpatsch> Taneb: how do you do traverse then?
14:16:45 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:16:51 <Taneb> Profpatsch: you don't need it, a -> Ap ap m has the right monoid instance to just use foldmap
14:17:42 <Profpatsch> Taneb: what does the implementation look like?
14:17:44 <Taneb> :t \f -> getAp . foldMap (Ap . f)
14:17:45 <lambdabot> forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Ap f a1)) => (a2 -> f a1) -> t a2 -> f a1
14:18:30 <Taneb> :: (Foldable t, Applicative f, Monoid m) => (a -> f m) -> t a -> f m
14:18:51 <Taneb> Ap is in Data.Monoid although I'm not quite convinced that lambdabot picked up the right Ap there
14:20:18 <Profpatsch> Taneb: but can you do the same for Semigroup?
14:20:36 <Profpatsch> I don’t think you can
14:20:41 <Taneb> Profpatsch: with Foldable1 from semigroupoids I guess
14:20:47 <Taneb> But I don't think you can your way either
14:20:51 <Profpatsch> But that doesn’t use APplicative
14:20:59 <Profpatsch> But the class that just has <*>
14:21:01 <Profpatsch> not pure
14:21:16 <Profpatsch> Apply
14:22:52 <Profpatsch> But it’s interesting that you can weaken one but not the other in the ecosystem
14:23:00 <Taneb> ?
14:23:14 <Profpatsch> Doesn’t work for Semigroup
14:23:30 <Profpatsch> Even though it could, but the class tree is missing Apply
14:24:29 <Taneb> :t \f -> foldr1 (liftA2 (<>) . f)
14:24:30 <lambdabot> (Foldable t, Applicative f, Semigroup c) => (f c -> f c) -> t (f c) -> f c
14:24:39 Sgeo joins (~Sgeo@user/sgeo)
14:24:46 <Taneb> That's not quite right :(
14:26:10 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 272 seconds)
14:28:24 <Profpatsch> Taneb: I wonder if the actual code that is run with the getAp method is different than with the traverse method
14:28:30 <Profpatsch> like there is a foldMap and a foldMap'
14:28:49 <Profpatsch> But there is no traverse'
14:29:09 × bollu quits (~bollu@139.59.46.74) (Ping timeout: 272 seconds)
14:29:10 <Profpatsch> which kinda makes sense I guess
14:29:24 bollu joins (~bollu@139.59.46.74)
14:29:33 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds)
14:29:51 slowButPresent joins (~slowButPr@user/slowbutpresent)
14:29:56 pja joins (~pja@dsl-217-155-153-10.zen.co.uk)
14:30:26 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
14:31:14 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 272 seconds)
14:34:15 azeem joins (~azeem@176.201.21.236)
14:40:33 <Taneb> godbolt gives different assembly for them
14:41:14 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 256 seconds)
14:41:46 azeem joins (~azeem@176.201.21.236)
14:47:19 × jippiedoe quits (~david@2a02-a44c-e14e-1-2787-f5de-e687-987e.fixed6.kpn.net) (Remote host closed the connection)
14:48:03 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
14:48:36 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
14:49:39 × fizbin_ quits (~fizbin@93.sub-174-198-203.myvzw.com) (Read error: Connection reset by peer)
14:49:42 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
14:49:58 jippiedoe joins (~david@2a02-a44c-e14e-1-2787-f5de-e687-987e.fixed6.kpn.net)
14:51:24 zeenk joins (~zeenk@2a02:2f04:a106:9600:82fb:aed9:ca9:38d3)
14:51:43 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
14:51:48 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
14:52:24 finsternis joins (~X@23.226.237.192)
14:53:08 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Ping timeout: 256 seconds)
14:54:38 usera joins (~usera@151.45.149.246)
14:59:20 norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net)
14:59:41 × lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap)
14:59:44 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
14:59:44 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
15:00:15 lambdap joins (~lambdap@static.167.190.119.168.clients.your-server.de)
15:03:42 × ph88 quits (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de) (Quit: Leaving)
15:05:12 × usera quits (~usera@151.45.149.246) (Quit: Client closed)
15:05:46 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 252 seconds)
15:07:03 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.1)
15:07:40 cuz joins (~user@38.140.58.234)
15:08:25 aravk_ is now known as aravk
15:10:47 <tomsmeding> maerwald: I saw somebody recommend the Haskell Platform to a mac user asking how to get started with haskell; I was on the brink of shouting "ghcup" but it's good I had a look at the official webpage, because I see it actually lists ghcup already :)
15:11:05 <tomsmeding> It does give a separate link for installing stack, but ghcup can do that now too, right?
15:11:34 <maerwald> yeah
15:11:38 azeem joins (~azeem@176.201.21.236)
15:12:38 × juhp quits (~juhp@128.106.188.66) (Quit: juhp)
15:12:51 juhp joins (~juhp@128.106.188.66)
15:13:46 myShoggoth joins (~myShoggot@75.164.51.64)
15:13:49 thiagomm joins (~thiagomm@2804:14c:de88:87a9::1000)
15:14:05 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 256 seconds)
15:14:23 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
15:14:42 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds)
15:15:20 romes2 joins (~romes2@44.190.189.46.rev.vodafone.pt)
15:15:26 <romes2> hi!
15:15:54 × mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 240 seconds)
15:15:55 <boxscape> hi
15:15:58 × thiagomm quits (~thiagomm@2804:14c:de88:87a9::1000) (Client Quit)
15:16:01 <Vq> Hi romes
15:16:18 × TranquilEcho quits (~grom@user/tranquilecho) (Ping timeout: 240 seconds)
15:16:23 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
15:17:01 dunkeln joins (~dunkeln@188.70.10.165)
15:17:25 TranquilEcho joins (~grom@user/tranquilecho)
15:18:27 × nanoc quits (~nanocoast@p200300e1273bf000ccc6df24f323b7c2.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
15:18:42 mei joins (~mei@user/mei)
15:19:19 <romes2> I have a question, how would I check if the value of a Monadic computation is empty ?
15:19:38 × cuz quits (~user@38.140.58.234) (Remote host closed the connection)
15:19:48 <romes2> x = Nothing >> return (Just 1) is Nothing, and I could wrap it in a "case", but if it wasn't the Maybe monad, but something else that supported "empty"
15:20:40 cuz joins (~user@38.140.58.234)
15:20:55 × Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 246 seconds)
15:21:18 <romes2> oh I think I figured it out... when I phrased it as "conditional" when writing another message I got an idea
15:22:19 <romes2> thank you everyone hahaha (if anyone wants to know this remembered me of a function called "ifte" in the LogicT backtracking library
15:22:27 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds)
15:22:36 Guest1870 joins (~Guest18@27.147.234.193)
15:22:45 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
15:23:10 <merijn> tomsmeding: on macos you might as well install the ghc bindists, imo
15:23:52 <Guest1870> why is `take 10 [13, 26..]` better than `[13, 26..13*10]`?
15:24:08 <merijn> Who says it is?
15:24:23 <Guest1870> http://learnyouahaskell.com/starting-out#ready-set-go
15:25:21 <merijn> I don't see where it says that is better?
15:25:39 <boxscape> Guest1870: to me it's a bit more immediately obvious what `take 10 [13, 26..]` means but I'd say both are fine
15:25:41 chris_ joins (~chris@81.96.113.213)
15:25:46 <boxscape> merijn: it says "Sure, you could do [13,26..24*13]. But there's a better way: take 24 [13,26..]"
15:26:02 <geekosaur> might be because it
15:26:04 <merijn> I'd say the main advantage is where you don't know if you will need 10 items ahead of time
15:26:10 <geekosaur> 's clearer what you intend
15:26:14 <Guest1870> better how? syntax wise?
15:26:22 <merijn> Like, suppose you wanna assign unique indices to a container of elements
15:26:36 <merijn> With the infinite list you don't have to know the size ahead of time
15:27:59 <dolio> I'd have to think longer about what the actual upper bound should be, at least.
15:29:13 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
15:29:13 <dolio> I'm never confident about that sort of off-by-one stuff.
15:30:50 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
15:31:26 × Guest1870 quits (~Guest18@27.147.234.193) (Quit: Client closed)
15:31:27 chris_ joins (~chris@81.96.113.213)
15:31:32 shapr joins (~user@pool-108-28-144-11.washdc.fios.verizon.net)
15:32:23 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
15:32:23 × cuz quits (~user@38.140.58.234) (Read error: Connection reset by peer)
15:32:35 chris_ joins (~chris@81.96.113.213)
15:32:35 × awk quits (~mnrmnaugh@pool-96-252-87-182.bstnma.fios.verizon.net) (Read error: Connection reset by peer)
15:32:39 cuz joins (~user@38.140.58.234)
15:33:11 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
15:33:23 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
15:34:00 mnrmnaugh joins (~mnrmnaugh@pool-96-252-87-182.bstnma.fios.verizon.net)
15:36:11 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
15:37:20 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 256 seconds)
15:37:33 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
15:42:23 × dunkeln quits (~dunkeln@188.70.10.165) (Ping timeout: 258 seconds)
15:42:43 × lortabac quits (~lortabac@95.138.56.124) (Quit: WeeChat 2.8)
15:44:05 dunkeln joins (~dunkeln@188.70.10.165)
15:44:29 <nshepperd> which is better depends what the list is for
15:46:52 warnz joins (~warnz@104-55-100-55.lightspeed.lsvlky.sbcglobal.net)
15:48:19 Morrow joins (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net)
15:50:33 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
15:53:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
15:53:09 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
15:56:31 tenniscp25 joins (~textual@134.196.209.118)
15:56:46 × Torro quits (Torro@gateway/vpn/protonvpn/torro) (Quit: leaving)
15:57:39 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:59:56 eight joins (~eight@user/eight)
16:00:41 <monochrom> Both are worse.
16:01:25 <monochrom> One of them doesn't make clear what length to expect. The other doesn't make clear what end to expect.
16:01:33 <monochrom> The only way to win is not to play.
16:02:39 berberman_ joins (~berberman@user/berberman)
16:02:43 <monochrom> perhaps s/make clear/spell out/
16:02:50 × berberman quits (~berberman@user/berberman) (Ping timeout: 256 seconds)
16:02:52 <dolio> Well, if the problem specification has the length of the list, which it does in the example, then it's easier to use the one that makes the length obvious.
16:02:56 × tenniscp25 quits (~textual@134.196.209.118) (Quit: Textual IRC Client: www.textualapp.com)
16:03:19 <monochrom> Ah, yes I agree. :)
16:03:25 tenniscp25 joins (~textual@134.196.209.118)
16:04:21 lavaman joins (~lavaman@98.38.249.169)
16:04:41 <nshepperd> is that a koan? "there is no better, only worse"
16:04:48 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
16:04:50 <monochrom> Oh hey I have a cunning plan! take 10 [13, 26..13*10]
16:06:20 <monochrom> nshepperd, generally I think up pessimism jokes. For example, every silver lining has tarnish. >:)
16:07:24 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: Textual IRC Client: www.textualapp.com)
16:09:06 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e) (Ping timeout: 240 seconds)
16:13:46 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds)
16:14:52 lbseale joins (~lbseale@user/ep1ctetus)
16:16:13 MQ-17J joins (~MQ-17J@8.21.10.15)
16:16:42 × xff0x quits (~xff0x@2001:1a81:5237:1000:d9df:afaf:2f58:a5ba) (Ping timeout: 240 seconds)
16:16:45 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
16:18:49 xff0x joins (~xff0x@141.98.255.146)
16:19:30 × nschoe quits (~quassel@178.251.84.79) (Ping timeout: 240 seconds)
16:22:46 econo joins (uid147250@user/econo)
16:24:15 × romes2 quits (~romes2@44.190.189.46.rev.vodafone.pt) (Quit: Client closed)
16:25:01 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:25:07 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 268 seconds)
16:26:21 × qbt quits (~edun@user/edun) (Ping timeout: 268 seconds)
16:26:31 × tenniscp25 quits (~textual@134.196.209.118) (Quit: Textual IRC Client: www.textualapp.com)
16:27:41 azeem joins (~azeem@176.201.21.236)
16:27:50 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:dc49:b28b:5485:3e7e)
16:28:42 fef joins (~thedawn@user/thedawn)
16:28:55 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
16:29:37 chris_ joins (~chris@81.96.113.213)
16:30:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:32:57 <DigitalKiwi> not every thorn has a rose
16:33:29 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2)
16:33:54 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
16:34:30 chris_ joins (~chris@81.96.113.213)
16:34:57 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
16:35:08 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:37:12 × dunkeln quits (~dunkeln@188.70.10.165) (Ping timeout: 258 seconds)
16:38:54 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
16:39:14 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
16:40:06 × dajoer quits (~david@user/gvx) (Quit: leaving)
16:40:26 <monochrom> Even better: roses wither, thorns are forever >:)
16:41:12 <qrpnxz> thorns let roses live longer
16:44:03 <DigitalKiwi> oh here comes the go programmer telling us "thorns are good, actually"
16:44:33 chris_ joins (~chris@81.96.113.213)
16:47:20 dunkeln joins (~dunkeln@188.70.10.165)
16:49:47 × azeem quits (~azeem@176.201.21.236) (Ping timeout: 268 seconds)
16:49:50 jess joins (~jess@libera/staff/jess)
16:50:22 Guest9 joins (~Guest9@103.86.19.221)
16:51:49 azeem joins (~azeem@176.201.21.236)
16:53:53 × xff0x quits (~xff0x@141.98.255.146) (Ping timeout: 265 seconds)
16:54:43 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
16:55:15 xff0x joins (~xff0x@2001:1a81:5237:1000:d9df:afaf:2f58:a5ba)
16:55:24 × azeem quits (~azeem@176.201.21.236) (Read error: Connection reset by peer)
16:56:19 azeem joins (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it)
17:00:04 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
17:02:01 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:04:02 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
17:05:10 × azeem quits (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it) (Ping timeout: 256 seconds)
17:06:11 azeem joins (~azeem@176.201.21.236)
17:07:31 pavonia joins (~user@user/siracusa)
17:08:50 × azeem quits (~azeem@176.201.21.236) (Read error: Connection reset by peer)
17:10:10 azeem joins (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it)
17:11:06 × cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
17:11:52 cheater joins (~Username@user/cheater)
17:14:11 mikail_ joins (~mikail@213.205.242.43)
17:14:46 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 258 seconds)
17:15:28 nixtamalize joins (~nixtamali@117.222.65.230)
17:15:58 × chele quits (~chele@user/chele) (Remote host closed the connection)
17:16:42 × mikail quits (~mikail@90.152.14.81) (Ping timeout: 240 seconds)
17:19:30 ringo_ joins (~ringo@157.230.117.128)
17:20:18 ph88 joins (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de)
17:22:36 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:23:18 × jippiedoe quits (~david@2a02-a44c-e14e-1-2787-f5de-e687-987e.fixed6.kpn.net) (Ping timeout: 256 seconds)
17:24:10 elf_fortrez joins (~elf_fortr@adsl-72-50-4-120.prtc.net)
17:30:17 mikail__ joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
17:31:54 × mikail_ quits (~mikail@213.205.242.43) (Ping timeout: 240 seconds)
17:32:24 × mikail__ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Remote host closed the connection)
17:33:00 mikail__ joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
17:33:41 <qrpnxz> xd
17:35:07 alphabeta joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net)
17:36:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
17:36:21 × mikail__ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Remote host closed the connection)
17:37:19 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:37:58 anviking joins (~anviking@90-229-193-56-no14.tbcn.telia.com)
17:38:12 × kilolympus quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Ping timeout: 268 seconds)
17:39:00 × anviking quits (~anviking@90-229-193-56-no14.tbcn.telia.com) (Client Quit)
17:39:10 × azeem quits (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it) (Ping timeout: 256 seconds)
17:39:15 mikail__ joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
17:41:00 azeem joins (~azeem@176.201.21.236)
17:44:48 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
17:45:30 chris_ joins (~chris@81.96.113.213)
17:45:30 <qrpnxz> thorns keep side-effects out of functions in haskell
17:45:49 × fendor quits (~fendor@77.119.218.107.wireless.dyn.drei.com) (Ping timeout: 258 seconds)
17:47:32 × azeem quits (~azeem@176.201.21.236) (Read error: Connection reset by peer)
17:48:04 azeem joins (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it)
17:48:19 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
17:49:07 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
17:49:19 chris_ joins (~chris@81.96.113.213)
17:49:22 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
17:52:11 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
17:52:18 wickedjargon joins (~wickedjar@cpeac202ebc90c3-cmac202ebc90c0.cpe.net.fido.ca)
17:52:58 × fabfianda quits (~fabfianda@37.183.255.57) (Ping timeout: 252 seconds)
17:53:21 fabfianda joins (~fabfianda@37.183.255.57)
17:54:08 hammock joins (~Hammock@2600:1700:19a1:3330::625)
17:54:32 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
17:55:02 × ubert quits (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
17:55:31 Erutuon joins (~Erutuon@user/erutuon)
17:55:48 × Schrostfutz quits (~Schrostfu@schettlerdck.tkn.tu-berlin.de) (Ping timeout: 272 seconds)
17:57:41 chris_ joins (~chris@81.96.113.213)
17:59:28 × norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 268 seconds)
17:59:53 × elf_fortrez quits (~elf_fortr@adsl-72-50-4-120.prtc.net) (Quit: Client closed)
18:00:04 × fef quits (~thedawn@user/thedawn) (Ping timeout: 244 seconds)
18:00:16 Iryon joins (~Iryon@2a02:a31a:a045:3500:90e2:686f:e863:4359)
18:01:11 × cheater quits (~Username@user/cheater) (Quit: (BitchX) I see your BitchX is as big as mine!)
18:01:54 <dminuoso> accursedUnutterablePerformIO is at my side, I have all the side effects.
18:02:43 nick8325 joins (~nick@2001:9b1:26f9:3e00:b7ea:ac95:e18:4c1d)
18:03:25 <davean> dminuoso: just forge an MD5 hash - that way it can be SafeHaskell also
18:04:02 × shapr quits (~user@pool-108-28-144-11.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
18:04:20 cheater joins (~Username@user/cheater)
18:04:43 × nick8325 quits (~nick@2001:9b1:26f9:3e00:b7ea:ac95:e18:4c1d) (Client Quit)
18:04:59 nick8325 joins (~nick@2001:9b1:26f9:3e00:b7ea:ac95:e18:4c1d)
18:05:41 × nick8325 quits (~nick@2001:9b1:26f9:3e00:b7ea:ac95:e18:4c1d) (Client Quit)
18:05:57 nick8325 joins (~nick@2001:9b1:26f9:3e00:b7ea:ac95:e18:4c1d)
18:06:21 × mikail__ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Remote host closed the connection)
18:07:04 mikail__ joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
18:07:51 × mikail__ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Remote host closed the connection)
18:08:02 nixtamalize parts (~nixtamali@117.222.65.230) ()
18:08:11 × michalz quits (~michalz@185.246.204.105) (Remote host closed the connection)
18:08:48 mikail__ joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
18:09:52 Pickchea joins (~private@user/pickchea)
18:10:04 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
18:10:51 × mikail__ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Remote host closed the connection)
18:11:18 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
18:11:20 mikail__ joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f)
18:11:44 cheater joins (~Username@user/cheater)
18:15:59 × hiruji quits (~hiruji@user/hiruji) (Quit: ZNC 1.8.2 - https://znc.in)
18:16:18 hiruji joins (~hiruji@user/hiruji)
18:16:23 × marinelli[m] quits (~marinelli@2001:470:69fc:105::2d8) (Quit: node-irc says goodbye)
18:20:47 ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de)
18:21:26 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
18:21:46 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
18:22:58 × Guest9 quits (~Guest9@103.86.19.221) (Quit: Connection closed)
18:25:47 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
18:27:28 × dunkeln quits (~dunkeln@188.70.10.165) (Ping timeout: 272 seconds)
18:27:35 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
18:28:03 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
18:31:11 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
18:32:29 × Morrow quits (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection)
18:32:48 Morrow joins (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net)
18:34:13 × mikail__ quits (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) (Quit: Leaving)
18:34:52 <chris_> trying to convert a division operation to a fractional
18:36:00 <chris_> sorry
18:36:04 <chris_> to a Rational*
18:37:56 MoC joins (~moc@user/moc)
18:39:51 × chexum quits (~chexum@gateway/tor-sasl/chexum) (Ping timeout: 244 seconds)
18:41:23 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:44:48 learner-monad joins (~ehanneken@user/learner-monad)
18:47:53 octeep[m]1 joins (~octeepmoc@2001:470:69fc:105::695e)
18:47:55 × MQ-17J quits (~MQ-17J@8.21.10.15) (Ping timeout: 258 seconds)
18:48:32 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
18:49:24 <monochrom> That's pretty vague.
18:50:20 chexum joins (~chexum@gateway/tor-sasl/chexum)
18:50:44 <chris_> i did 1/(toRational n-1)
18:51:26 <monochrom> What is the type of n?
18:51:36 <monochrom> Are you missing some parentheses?
18:51:42 <chris_> ahh type of n is Int
18:51:59 <davean> why not use %?
18:52:58 <chris_> what's % do?
18:53:04 <chris_> that does*
18:53:17 <chris_> % 4/2
18:53:18 <yahb> chris_: 2.0
18:53:26 <chris_> % 4%2
18:53:27 <yahb> chris_: 2 % 1
18:54:24 × jolly quits (~jolly@208.180.97.158) (Quit: Connection closed)
18:54:27 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
18:54:33 <monochrom> But if n::Int, then 1%n gives Ratio Int, not Rational (Ratio Integer)
18:55:06 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds)
18:55:23 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
18:56:27 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
19:00:24 × wickedjargon quits (~wickedjar@cpeac202ebc90c3-cmac202ebc90c0.cpe.net.fido.ca) (Ping timeout: 272 seconds)
19:00:59 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
19:01:11 betelgeuse joins (~john2gb@94-225-47-8.access.telenet.be)
19:01:40 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
19:02:11 <chris_> doing toRational on the (n-1) makes it run
19:02:15 marinelli[m] joins (~marinelli@2001:470:69fc:105::2d8)
19:03:32 dunkeln_ joins (~dunkeln@188.70.10.165)
19:05:31 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
19:06:18 × xff0x quits (~xff0x@2001:1a81:5237:1000:d9df:afaf:2f58:a5ba) (Ping timeout: 240 seconds)
19:07:29 xff0x joins (~xff0x@2001:1a81:5237:1000:bd6:e736:a4f:c278)
19:08:44 × dunkeln_ quits (~dunkeln@188.70.10.165) (Ping timeout: 265 seconds)
19:09:13 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
19:10:11 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: Well, off to Libera.)
19:10:32 ChaiTRex joins (~ChaiTRex@user/chaitrex)
19:11:03 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
19:13:54 <davean> chris_: % is ~ a constructor for Ratio
19:14:18 <davean> Rational is Ratio on Integer
19:21:37 wickedjargon joins (~wickedjar@cpeac202ebc90c3-cmac202ebc90c0.cpe.net.fido.ca)
19:23:42 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
19:25:15 <chris_> ok thx davean
19:26:05 <chris_> seems that haskell is very explicit with its numeric types compared to other languages?
19:28:02 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
19:28:36 <davean> yes
19:28:51 <davean> It tries to not fuck up the math without making it explicite
19:29:21 <maerwald> Is it? I usually have no idea what's going on and insert fromIneger/fromIntegral/justMakeThisShitCompile
19:29:29 blackfield parts (~blackfiel@85.255.4.218) ()
19:29:38 <davean> I certainly never approach it like that
19:29:45 <maerwald> :D
19:30:05 <davean> https://hackage.haskell.org/package/int-cast-0.2.0.0/docs/Data-IntCast.html is much nicer for example if you do need to convert
19:30:29 <maerwald> I'm exaggerating, but our numerical stuff isn't textbook engineering
19:30:40 <davean> Our numerical tower isn't
19:30:43 <davean> our numerical tower sucks
19:30:48 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 272 seconds)
19:30:48 <davean> I tihnk we have good conversions though
19:30:52 geekosaur joins (~geekosaur@xmonad/geekosaur)
19:30:59 <davean> we just lack laws inside a type sadly because we split operations up poorly
19:31:07 <davean> Its seriously fucked up mind you
19:31:13 <davean> I've had SERIOUS issues due to that lack of laws
19:31:14 lavaman joins (~lavaman@98.38.249.169)
19:31:16 cloudy joins (~user@2600:8807:c207:f00:d412:4cce:d9f1:ba0)
19:31:52 <davean> We basicly can't abstract over numeric types because of it
19:32:30 <dolio> That seems accurate to reality.
19:32:38 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:34:26 <davean> Its really frustrating, but its also complicated. Its not clear what the right factoring would be
19:34:31 × jneira_ quits (~jneira_@217.red-81-39-172.dynamicip.rima-tde.net) (Quit: Ping timeout (120 seconds))
19:38:16 <chris_> can the same function have different pattern matching WITH different params lengths
19:38:42 <chris_> like: initially call this func with 1 arg, then call with 2 afterwards
19:39:02 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
19:39:08 <davean> no, a function is exactly one thing, but you can make something that LOOKS like that with type classes.
19:39:18 <davean> infact, Haskell sorta only has one argument functions
19:39:50 × tomsmeding quits (~tomsmedin@2a03:b0c0:0:1010::767:3001) (Quit: ZNC 1.8.2 - https://znc.in)
19:39:59 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:40:06 <davean> You can make something difficult to tell appart from a variable argument function with type classes
19:40:09 tomsmeding joins (~tomsmedin@tomsmeding.com)
19:40:15 <chris_> i'm facing a dilemma with recursive incrementation
19:40:22 <chris_> i want to increment by argument n
19:40:47 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
19:41:44 <davean> ok, so?
19:41:46 <Rembane> What's the problem?
19:42:05 <davean> we all stare at you wondering what the problem is, and expecting you're having an x-y problem
19:42:45 <chris_> it's probably more simple than i realize i'll just see if i can solve it first
19:42:45 <Rembane> davean: If this channel had a motivating poster, that would be the text of it.
19:42:58 Rembane hands chris_ a rubber duck
19:43:11 <davean> chris_: Try focusing on what you're actually trying to do, not how you're trying to do it
19:45:11 abrar_ joins (~abrar@static-108-2-152-54.phlapa.fios.verizon.net)
19:50:38 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 256 seconds)
19:51:13 <dminuoso> 21:30:48 davean | I tihnk we have good conversions though
19:51:15 <dminuoso> We dont.
19:52:00 <Rembane> dminuoso: Give us the rant!
19:52:07 <dminuoso> I can hold back I think.
19:52:13 <dminuoso> But Im really itching.
19:53:44 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
20:03:55 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:05:18 <maerwald> :D
20:05:21 × juhp quits (~juhp@128.106.188.66) (Ping timeout: 258 seconds)
20:07:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
20:07:26 juhp joins (~juhp@128.106.188.66)
20:13:58 jneira_ joins (~jneira_@217.red-81-39-172.dynamicip.rima-tde.net)
20:15:13 chisui joins (~chisui@200116b866be75009cc16d86abb76e8b.dip.versatel-1u1.de)
20:20:04 × wickedjargon quits (~wickedjar@cpeac202ebc90c3-cmac202ebc90c0.cpe.net.fido.ca) (Ping timeout: 268 seconds)
20:25:18 × phma quits (phma@2001:5b0:211f:2298:dd93:a388:d3e:b1b1) (Read error: Connection reset by peer)
20:25:49 <ixlun> Does anyone know how I'd go about starting to debug a performance issue with Conduit?
20:26:32 <ixlun> I'm getting a lot of time spent and allocs in the function `injectLeftovers`
20:26:32 <dminuoso> ixlun: You can start with the simple RTS profiler
20:26:35 phma joins (phma@2001:5b0:211f:fff8:cd25:f96a:65d:6896)
20:26:49 × abrar_ quits (~abrar@static-108-2-152-54.phlapa.fios.verizon.net) (Ping timeout: 258 seconds)
20:27:04 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
20:28:37 <ixlun> dminuoso: Yep, I've done a profile and the above function appears to be the culprit. I'm not sure why though.
20:30:35 wickedjargon joins (~wickedjar@cpeac202ebc90c3-cmac202ebc90c0.cpe.net.fido.ca)
20:31:53 <chris_> so ye i'm a little confused as too how to incremen
20:32:03 × wickedjargon quits (~wickedjar@cpeac202ebc90c3-cmac202ebc90c0.cpe.net.fido.ca) (Client Quit)
20:32:05 <chris_> as how to* write a function that recursively increments by n
20:32:32 <Cale> chris_: What does this function compute?
20:32:32 <Rembane> chris_: Increments what?
20:33:05 jakalx joins (~jakalx@base.jakalx.net)
20:35:56 fendor joins (~fendor@77.119.218.107.wireless.dyn.drei.com)
20:36:08 kilolympus joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net)
20:36:24 <chris_> i'm incrementing by +2 each time the function is called
20:36:52 <chris_> i can paste my code somewhere maybe
20:37:36 <chris_> the function is create a structure of notes where each note's interval (keys up on keyboard) is +n
20:37:39 <geekosaur> @where paste
20:37:39 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
20:37:59 <dminuoso> ixlun: What cost centers are generated? Did you use all-functions?
20:38:34 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
20:38:47 <tomsmeding> ixlun: does the (huge) call stack trace below the top part of the profiling output tell anything interesting?
20:38:49 <davean> injectLeftovers is pretty clear in what it does - don't have left overs, read just what you need? Is there a reason you're sending too much data down to consumers?
20:39:07 <tomsmeding> not sure how using a streaming library messes up those call stacks
20:39:12 × alphabeta quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Ping timeout: 272 seconds)
20:39:32 <davean> tomsmeding: its just functions? You might have to understand how streaming libraries are implimented though to understand what they mean
20:39:45 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
20:39:49 <dminuoso> Indeed
20:39:53 <ixlun> dminuoso: I'm not sure, I used the `--enable-profiling` cabal option.
20:40:09 <tomsmeding> I thought there may be sufficient CPS going on that the callstack doesn't make sense anymore, but then I haven't used streaming libraries yet so in particular not with a profiler :p
20:40:41 <chris_> https://paste.tomsmeding.com/sSE5bwAK
20:40:53 <davean> tomsmeding: I mean I don't find CPS ruins callstacks, but I also understand the CPS, so your mileage might vary?
20:41:01 <ixlun> davean: Indeed, I think that's the issue. Since the whole conduit is a function, the translation means that it's hard to figure out which part of the conduit is causing issues.
20:41:07 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
20:41:19 <dminuoso> ixlun: Also add `--profiling-detail=all-functions`, then you might get more granular data.
20:41:29 <tomsmeding> davean: I was just guessing, you're likely right :)
20:42:02 <dminuoso> ixlun: At any rate, judging from an initial look at conduit, as long as you're just using conduit directly, it seems the only reasonable explanation is that you're only consuming little input. Are you perhaps left with too much.. leftovers at the end of your pipe?
20:42:04 <davean> tomsmeding: it does mean you have to know EVERY name in the internals of the library, but we're not talking large libraries
20:42:25 <dminuoso> ixlun: If you re-run with --profiling-detail=all-functions, perhaps you can share the output?
20:42:26 <davean> dminuoso: they can happen at every step
20:42:35 <tomsmeding> chris_: let the function take an extra parameter, e.g. "increment", where you add "increment" instead of 2, and recursively call with increment+2?
20:43:03 <davean> dminuoso: so every monadic bind for example
20:43:04 <dminuoso> davean: Yes, but if the cost center is right on `injectLeftovers`, then it's a matter of understanding where it's mostly called.
20:43:10 <koz> For InstanceD, I get the parts of an instance declaration represented by the 'Maybe Overlap' and 'Cxt', but not the 'Type'.
20:43:13 <dminuoso> davean: And injeftLeftovers is not called on monadic bind
20:43:36 <koz> In the example in the docs, does the 'Type' correspond to 'Show [w]', or just '[w]'?
20:43:40 <ixlun> dminuoso: Yep, running the profile now.
20:43:45 <chris_> tomsmeding: i could do that, but then 1 of the params is redundant in a way
20:43:49 <dminuoso> davean: Though, I think we're a bit at a cross roads.
20:43:50 <koz> Docs here: https://hackage.haskell.org/package/template-haskell-2.17.0.0/docs/Language-Haskell-TH.html#t:Dec
20:44:05 <tomsmeding> chris_: then write a wrapper function that just calls the function you just wrote with 2 :)
20:44:16 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 272 seconds)
20:44:24 <chris_> ahhh ye that's prob what i want
20:44:28 <tomsmeding> you can even hide the inner function by putting it in a 'where' block below the wrapper function
20:44:39 <tomsmeding> this wrapper pattern is quite common in haskell
20:44:55 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds)
20:45:03 <davean> dminuoso: well it depends on what things he's using - I'm saying it can show up at any, not that it does show up at any
20:45:08 <dminuoso> Right
20:45:13 <chris_> that's what i was thinking of ye intitially, shall i google haskell wrapper pattern? you have an example?
20:45:28 <tomsmeding> not sure if that's the right name to be honest
20:45:30 <dminuoso> davean: Hence, I asked for --profiling-detail=all-functions, hopefully this will give better cost centers. :)
20:45:52 <davean> Why am I helping with conduit though? I ran away from that, I'm going back to machines where things make sense :-p
20:46:23 <davean> If I want pushback to be a thing, I'll use a stack!
20:46:33 <ixlun> dminuoso: https://termbin.com/tn6c
20:46:36 <dminuoso> Okay... are you comparing conduit to a stack now? :<
20:46:38 × GIANTWORLDKEEPER quits (~pjetcetal@128-71-13-182.broadband.corbina.ru) (Quit: EXIT)
20:46:49 <davean> dminuoso: Huh?
20:46:56 <tomsmeding> chris_: https://hackage.haskell.org/package/base-4.15.0.0/docs/src/GHC-List.html#zipWith
20:47:00 <Cale> chris_: What if you were to make a list of the intervals to start with, and then zipWith that with the ds?
20:47:02 <davean> dminuoso: pushback is a stack operation
20:47:17 <Cale> oh, you're already talking about this :)
20:47:41 <davean> dminuoso: https://hackage.haskell.org/package/machines-0.7.2/docs/Data-Machine-Stack.html
20:47:48 <tomsmeding> Cale: no, I was just showing an example of this wrapper pattern thing :p
20:47:49 <dminuoso> Yes I understand..
20:47:52 <Cale> ah
20:47:53 <tomsmeding> and accidentally gave precisely zipWith
20:48:02 <dminuoso> davean: Lets just drop it, I think we got our wires crossed here.
20:48:03 <davean> dminuoso: if the entirety of the initial input is the dataset, pushback is stack push, and all reads are stack pop
20:48:07 <davean> dminuoso: ok
20:48:09 <davean> I'm confused
20:48:24 <dminuoso> oh
20:48:28 <dminuoso> Now I see what you mean
20:48:36 <dminuoso> Odd, but okay
20:48:46 <davean> Its litterly the stack operational semantics
20:48:54 <davean> which allows you to compose it
20:49:00 <davean> which allows you to control how it happens and where
20:49:32 <davean> The implicity and inability to control it is one of the major pain points IME in optimizing streaming
20:50:08 <Cale> chris_: So, you'd have something like f ds interval = foldr (:+:) (rest 0) $ zipWith (\d n -> note d (trans n (A,2)) [interval, 2*interval ..]
20:50:14 <dminuoso> But isnt a conduit more like a fifo? You cant continuously push on a stack while you're popping and preserve the input order..
20:50:34 <dminuoso> I must be misunderstanding something here
20:50:48 <davean> dminuoso: no, it isn't, not internally - consider how "take 50" would be implimented on a string
20:51:00 <davean> now consider how it would be implimented on Text
20:51:29 <davean> With text you'd get a chunk that reached >= 50 charactures
20:51:44 <davean> now, if you got the next characture, if you didn't stack push it, you'd lose the over-read data
20:52:00 <davean> do { drop 50; head }
20:52:03 <davean> what does head return?
20:52:20 <davean> if the semantics were to differ between Text and String you'd have an issue
20:53:02 <tomsmeding> (this sounds to me like you have a queue with a putback operation at the taking end, not necessarily that you now have a stack)
20:53:12 <ixlun> Now my conduit does have a place where it takes one input value and outputs 15 values for each value. Would those be classed as leftovers?
20:53:13 <davean> take/drop are somewhat simple examples, but consider parsers, which might have to read to see if they should consume
20:53:14 <tomsmeding> (but /me is out of my depth here)
20:53:14 shapr joins (~user@pool-108-28-144-11.washdc.fios.verizon.net)
20:53:40 <davean> tomsmeding: you (virtually) populate the entire stack with the entire data that will be streamed initially, and then you pop and push
20:54:13 <tomsmeding> oooh you don't see the initial population as stack operations
20:54:28 <davean> Its like setting the tape in a turing machine
20:54:37 <davean> Its the starting condition
20:54:51 <tomsmeding> my mental model (and I think dminuoso's) is that you're continuously feeding input at the tail end, and taking (and putting back of you over-took) at the head end
20:54:59 <dminuoso> Yes.
20:55:02 <tomsmeding> that's a queue with an additional "putback" operation
20:55:13 <davean> Theres no way to actually feed
20:55:16 <dminuoso> I somehow fail to understand davean's model.
20:55:19 <davean> you can't control the head of a streamign library
20:55:21 <tomsmeding> or, I guess, a stack with an additional shove-below-bottom operation
20:55:32 <davean> You don't get any queue operations in any streaming library I know of
20:55:34 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
20:55:39 <tomsmeding> dminuoso: create lazy list of all data, then take and putback at the front
20:55:42 <tomsmeding> that take and putback is a stack
20:55:51 <monochrom> I feel that the pushback operation is usually motivated by, only, wanting a lookahead and deciding split it into read-then-pushback.
20:56:10 <dminuoso> What's the role of "putback"? leftover from conduit?
20:56:16 <davean> monochrom: its not wanting - theres no choice
20:56:21 <tomsmeding> dminuoso: as monochrom says, lookahead
20:56:24 <monochrom> in which case perhaps supporting lookahead itself directly solves the real problem
20:56:25 <davean> the control domains are split
20:56:28 <dminuoso> tomsmeding: Right, then `leftover`!
20:56:34 <dminuoso> Alright, I see what you mean
20:57:03 <davean> Leftover (Pipe l i o u m r) l
20:57:05 <davean> Return leftover input, which should be provided to future operations.
20:57:07 safinaskar joins (~safinaska@109.252.90.89)
20:57:12 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
20:57:13 <davean> thats part of the core operational instructions of Conduit
20:57:23 × TheRAt quits (~TheRAt@user/therat) (Ping timeout: 268 seconds)
20:57:40 <davean> monochrom: well, its required if you're *monadic* I suppose - I guess weaker streaming might not require it
20:57:41 <tomsmeding> that's approaching the number of type parameters in a project of mine
20:57:48 <davean> monochrom: I'd have to consider if its optional in Selective
20:58:00 <monochrom> and I feel that lookahead semantics and implementation is likely much nicer than pushback semantics and implementation
20:58:11 <dminuoso> davean: Leftover is mostly just needed for fusion (and lookahead) though.
20:58:19 <chris_> thx cale tomsmeding, looking at your stuff now
20:58:27 <safinaskar> is there analog of c++'s std::vector in haskell? i. e. mutable vector i can add elements to. It should have function with type (Vec s a -> a -> ST s (Vec s a)) and that function should not create copy of a vector!
20:58:29 <chris_> i just wrote another func for now with another param
20:58:31 <davean> monochrom: You'd have to have fusion across arbitrary monadic value sets
20:58:36 <chris_> but i'll see how u guys did it
20:58:39 <dminuoso> or rather I need to got sleep, I cant form coherent sentences anymore
20:58:39 <chris_> or recommend
20:58:52 <davean> monochrom: I don't think its viable in any generalized streaming library
20:59:05 <safinaskar> i am aware of hackage package "vector", but as well as i know, its "grow" function creates copy of source vector, and thus can be slow
20:59:13 <davean> safinaskar: 'vector'
20:59:21 <davean> safinaskar: C++'s also creates a copy
20:59:34 <tomsmeding> davean: only if it exhausts the underlying buffer
20:59:48 <davean> tomsmeding: correct, smae as MVector in 'vector' with certain uses
21:00:08 <safinaskar> davean: if you push N elements to c++'s vector one-by-one, full copy will be performed (log N) times
21:00:09 <ixlun> So, is the issue that I'm having that I don't have a 1:1 mapping between input and output elements?
21:00:17 <davean> safinaskar: sure, so do that with 'vector'
21:00:30 <dminuoso> ixlun: Personally Id do some memory profiling to be sure here.
21:00:31 <safinaskar> davean: docs don't say this
21:00:51 <chris_> https://paste.tomsmeding.com/xxaG2Kxy
21:00:58 <chris_> tomsmeding:
21:01:09 <davean> safinaskar: MVector !Int !Int !(MutableArray s a), so you'd have to use it the way you want it
21:01:10 <chris_> Cale:
21:01:41 <davean> safinaskar: it doesn't manage it for you
21:01:44 <dminuoso> ixlun: I gotta go to bed, but this talk nicely illuminated how you can e.g. use eventlog2html https://www.youtube.com/watch?v=6Ljv5FHGXDM
21:01:54 <safinaskar> okey, give 5 mins, i will write example
21:01:54 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
21:02:08 <dminuoso> (or ghc-debug)
21:02:10 <davean> safinaskar: But it allows slicing, so basicly you just return the size you want when you finish
21:02:23 <davean> safinaskar: its not as nice
21:02:32 <ixlun> dminuoso: Cool, thanks for the talk. I'll have a watch and see if I can get any further. Thanks!
21:03:23 <monochrom> Yeah, I think Selective is related. Moving even one level up, the only motivation of lookahead is "a <- lookahead; case a of { 5 cases; }". It may be even better to just provide a cominbator for that instead of exposing lookahead.
21:03:32 <davean> monochrom: anyway, I'd be super interested if you could show that you could cover the space of even something as limited as Conduit with just lookahead
21:03:36 <davean> I don't think its theoretically possible
21:04:04 <davean> monochrom: no, sadly thats not the only motivation
21:04:10 <dminuoso> ixlun: Personally I suspect that at the end of your pipe you have something like a large String (or maybe some [Bit]), and are left with large amounts of unconsumed input.
21:04:27 <davean> monochrom: I can push the pushback to an arbitrary depth
21:04:33 <dminuoso> But I encourage you to perhaps look at the video, and try and employ those memory debugging techniques yourself.
21:05:16 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:05:21 <ixlun> Indeed, I'll take a look.. Might be a job for tomorrow though. hanks for the link!
21:05:35 <monochrom> Then this comes down to "LL(1) is much more optimzable than arbitrary lookahead, which is yet more optimizable than full monadic" etc.
21:05:37 <davean> monochrom: this issue is deeply related to parsing
21:05:47 <monochrom> Yeah, that.
21:05:51 <dminuoso> Debugging this in terms of allocations is probably easier, since GHC has good abilities to show you where allocations happen exactly
21:06:16 <davean> which is why I like calling in an explicite stack when I need it
21:06:40 × cuz quits (~user@38.140.58.234) (Ping timeout: 265 seconds)
21:06:42 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds)
21:07:00 <safinaskar> here is example! https://paste.debian.net/1203071/
21:07:31 <monochrom> BTW unpopular opinion: Control.Machine and Data.Lens. >:)
21:07:33 <safinaskar> how many times this code will duplicate whole vector? (assuming N is length of source list, i. e. length of [a])
21:07:37 <safinaskar> N or log(N)?
21:08:42 <davean> safinaskar: N, because you're calling grow every time instead of slicing the vector
21:09:16 <tomsmeding> davean: so what safinaskar is asking is whether there is a library that already encapsulates this intelligent growing behaviour
21:09:30 <tomsmeding> (like std::vector in c++ :) )
21:09:30 <davean> tomsmeding: for streaming and such there is, not sure about list
21:09:56 <davean> for list, vector already has stuff
21:10:13 <tomsmeding> I haven't seen such a library but that says absolutely nothing because I'm usually quite unaware of all the wealth of libraries in existence
21:10:28 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
21:10:38 <davean> Data.Vector.fromList is O(N)
21:10:41 abrar_ joins (~abrar@static-108-2-152-54.phlapa.fios.verizon.net)
21:10:47 <davean> which clearly you can see doesn't allow N copies
21:10:54 <davean> for example
21:11:31 <tomsmeding> well yes, if you know in advance how many elements you're going to push, you can do it in linear time :)
21:11:54 <davean> https://hackage.haskell.org/package/vector-conduit-0.5.0.0/docs/Data-Conduit-Vector.html for streaming for example
21:12:03 <davean> tomsmeding: fromListN vs. fromList ;)
21:12:49 <davean> tomsmeding: Vector's fusion system takes care of it
21:12:54 <davean> oh, ok
21:12:55 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
21:13:10 <davean> heres whats confusing here! safinaskar and tomsmeding, Vector depends on fusion to deal with this sort of thing
21:13:47 <tomsmeding> which merges operations only if the compiler can pair them together
21:14:03 <davean> tomsmeding: well, of it you do them specificly via explicite fusion
21:14:12 <davean> tomsmeding: but like fromList does that explicitely
21:14:17 <tomsmeding> right
21:15:22 <davean> so Vector already encapsulates this, just not how you expect to see it
21:16:12 <davean> All the normal functions in Vector already use it though
21:16:20 <tomsmeding> but long story short, Vector doesn't have this 'push' operation, but it should be easily implementable in terms of 'grow' with slicing?
21:16:33 <davean> tomsmeding: It does have the push operation, on Streams
21:16:47 <davean> tomsmeding: under Data.Vector.Fusion.Stream
21:17:11 <davean> tomsmeding: see snoc and cons
21:17:50 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 272 seconds)
21:18:10 <safinaskar> tomsmeding: "but it should be easily implementable in terms of 'grow' with slicing" - no, because i don't want new variable, i want "push" to look like it changed existing entity. I. e. I want to still refer to my modified vector using same "MVector s a" handle, just as I can in C++
21:19:00 <davean> cons prepends an element, snock appends an element
21:19:19 <tomsmeding> but doesn't mutate the reference
21:19:26 × Iryon quits (~Iryon@2a02:a31a:a045:3500:90e2:686f:e863:4359) (Remote host closed the connection)
21:19:29 <davean> Right because we're a functional language
21:19:31 <tomsmeding> safinaskar: I think the conclusion is that at least vector doesn't provide the exact API you want
21:19:46 <safinaskar> tomsmeding: yes
21:19:53 <safinaskar> okey, i will try to find library i want
21:20:14 <davean> I mean in a technical sense nothing will
21:20:18 <davean> Haskell always rebinds
21:20:24 <tomsmeding> it could, right?
21:20:30 <tomsmeding> safinaskar was asking for a mutable-vector API
21:20:34 <tomsmeding> in an ST monad
21:20:40 <tomsmeding> and then you suddenly have all kinds of possibilities
21:20:45 <davean> It could look like it, but it couldn't do it
21:20:54 <davean> Not at a low level you don't
21:21:00 <davean> the ST cell will constantly rebind
21:21:02 <davean> at best
21:21:17 <tomsmeding> will the underlying mutable byte array not be modified in-place?
21:21:23 <koz> I'm doing something like [d| instance $(foo) => IsBar ... |]. According to GHC, foo :: Q Type. However, I can't see a way to construct a list of superclass constraints in Type's data constructors. What am I missing?
21:21:28 × acid quits (~acid@user/acid) (Read error: Connection reset by peer)
21:21:36 acid joins (~acid@user/acid)
21:22:05 <davean> tomsmeding: it'll be modified in place, sure, but your pointer to it won't - and thats the same low level operations I was describing above, and looks almost the same at the higher level
21:22:33 <tomsmeding> davean: the point is that you can make an implementation of the suggested API that has the intended complexity
21:22:33 <davean> tomsmeding: Haskell implimentations reuse parts in memory all the time
21:22:39 <tomsmeding> whether some pointers are copied or not is immaterial :p
21:22:47 <davean> tomsmeding: and what we already have has the same complexity and the same oeprations
21:22:57 <tomsmeding> no, the operations have a slightly different API
21:23:15 <davean> Right, at the end you unstream
21:23:19 <tomsmeding> of course, perhaps it might be good to restructure code to use the existing API instead of forcing your own
21:23:20 <davean> vs. freeze
21:23:22 <tomsmeding> but that's a different question!
21:23:27 <davean> No, no restructuring
21:23:37 <davean> its the difference between unstream and freeze
21:24:18 <tomsmeding> I kind of feel we're talking past each other here :)
21:24:22 <davean> maybe
21:24:30 <davean> have you looked at the streaming stuff?
21:25:14 <tomsmeding> I'm not familiar with the fusion internals, so I was trying to think about implementing the given API based on top-level, non-streaming vector functions
21:25:21 <davean> This is NOT internals really
21:25:31 <davean> This is an exposed interface
21:25:39 <davean> This is the top level API
21:25:43 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.1)
21:25:54 <tomsmeding> which I clearly know too little about :)
21:26:15 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
21:26:38 <tomsmeding> I'll have a better look at it at some point, because it looks kind of sophisticated
21:26:51 <tomsmeding> the design, at least
21:27:29 <davean> tomsmeding: what about it?
21:27:37 <davean> its almost directly parrallel the standard vector API
21:28:16 <tomsmeding> maybe I should stop making unsubstantiated claims
21:28:22 <monochrom> koz: ForallT has a Cxt field. Cxt = [Pred] = [Type]. That would be a list of constraints.
21:28:29 cheater1__ joins (~Username@user/cheater)
21:28:30 <davean> tomsmeding: note I said Vector, not MVector
21:28:35 <koz> monochrom: Ah, thanks!
21:28:36 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
21:28:42 cheater1__ is now known as cheater
21:28:44 <davean> tomsmeding: the difference is in name binding
21:28:59 <koz> What would go in its third argument in this case?
21:29:04 <safinaskar> davean: "see snoc and cons" - they are pure functional. They return other vector, not the same. (I want api to look like it modifies in place)
21:29:11 <koz> Or should I wrap the whole thing?
21:29:22 <davean> safinaskar: that does modify in place.
21:29:23 <koz> So it'd be [d| instance $(foo) where ... |]?
21:29:47 <geekosaur> you need to be in IO or ST to do that. but are you prematurely optimizing, or just using a non-Haskelly API for some reason?
21:29:53 <tomsmeding> davean: note the "api to look like"
21:29:55 <davean> safinaskar: or at least it doesn't move, copy, or such any existing data
21:30:07 <monochrom> Hrm, I don't know. I would expect foo :: Q [Type] actually.
21:30:14 <davean> "In place" is a little undefined for new data! :)
21:30:23 <davean> In terms of hte old data though, it doesn't touch it
21:30:43 <koz> monochrom: That's what I would expect as well, but clearly not. I can wrap the whole thing if that's what it takes.
21:30:51 <monochrom> so that it means Q [Pred], list of constraints
21:31:02 <davean> tomsmeding: which part do you mean by look-like here?
21:31:55 <koz> If I try [d| instance $(foo) where ... |], GHC complains.
21:32:02 <davean> tomsmeding: do you want hte name rebindign to be implicite never explicite? I guess I don't see a difference because the name always rebinds
21:32:05 <koz> (aka it tells me my instance is malformed)
21:32:31 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
21:32:35 <koz> But if I try [d| instance $(foo) => IsBar (conT typeName) where ... |], GHC insists that foo :: Q Type.
21:34:17 <tomsmeding> davean: ah now I see, it was me who was confused. safinaskar asked for a function with type signature (Vec s a -> a -> ST s (Vec s a)), whereas I thought they were asking for (Vec s a -> a -> ST s ())
21:34:32 <davean> tomsmeding: Ah! ok, so yah
21:34:37 <tomsmeding> where I would say that the second "looks like" it modifies in place, whereas the first doesn't
21:34:54 <tomsmeding> what they do to the underlying buffer is a different, orthogonal issue (which the question also had a requirement on)
21:35:40 <davean> tomsmeding: well this explains our conversation :)
21:35:43 × fendor quits (~fendor@77.119.218.107.wireless.dyn.drei.com) (Read error: Connection reset by peer)
21:35:45 <tomsmeding> :')
21:36:42 fendor joins (~fendor@77.119.218.107.wireless.dyn.drei.com)
21:36:44 tomsmeding was confused by the language of "look like" which I would interpret as the second type signature
21:36:50 <safinaskar> tomsmeding: yes, i mean type with "ST s ()" in the end
21:36:54 <tomsmeding> lol
21:37:00 <safinaskar> it seems i can write lib i want
21:37:07 <safinaskar> wait 5 mins, i will show you code
21:37:25 <monochrom> All pronouns and the adjective "like" should be banned from programming discussions.
21:37:47 acidjnk_new joins (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de)
21:38:04 tomsmeding . o O ( SELECT * FROM table WHERE thing LIKE '%abc%' )
21:38:24 <safinaskar> tomsmeding: use "he" when talking about me
21:38:26 <monochrom> Programming is not marketing, there is no room for that much ambiguity and refusing to really spell out what you mean.
21:39:30 <tomsmeding> safinaskar: I suspected that, but I try to build a habit of saying 'they' in any situation of vaguely unclear genering :p
21:39:56 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
21:40:05 <tomsmeding> monochrom: I would love to live in that world
21:40:24 <tomsmeding> also where everyone speaks and writes the common language with poise
21:40:30 <tomsmeding> unfortunately that is not the world we live in :p
21:41:51 × hsiktas[m] quits (~hsiktasma@2001:470:69fc:105::30d4) (Quit: node-irc says goodbye)
21:43:29 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 258 seconds)
21:43:30 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
21:43:35 <tomsmeding> s/genering/gendering/ .-.
21:47:09 <davean> tomsmeding: you can always hide the naming by sticking it in an STRef and <$> the opterations or something :)
21:49:05 notzmv joins (~zmv@user/notzmv)
21:49:48 <safinaskar> i wrote vector i want!!!!! look here: https://paste.debian.net/1203074/
21:50:27 <tomsmeding> "With C++-like performance -- I didn't try to compile this" X doubt :p
21:51:55 <safinaskar> i mean "with same asymptotic"
21:52:22 <tomsmeding> yep that looks quite like I expected it to look
21:52:51 <tomsmeding> I wonder if it would be slightly more efficient to use only one STRef, but that really can only be answered with benchmarking
21:53:28 <tomsmeding> safinaskar: downside of wrapping MVector like this: you'll have to wrap all the other vector operations you want as well :p
21:54:15 <orzo> i'm looking for a haskell job
21:54:22 machinedgod joins (~machinedg@24.105.81.50)
21:54:28 <orzo> anybody hiring haskellers?
21:55:44 <tomsmeding> safinaskar: I believe C++ doesn't do scaling by 2 but by the golden ratio (phi), because phi^2 = phi + 1; that means that after growing twice, the new buffer fits precisely where the previous two buffers were in memory
21:55:46 <tomsmeding> but I may misremember
21:56:07 <tomsmeding> also profile profile :p
22:01:10 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Quit: Leaving)
22:02:02 <monochrom> That golden ratio trick is nice.
22:02:50 <monochrom> And Fibonacci is behind it.
22:03:08 <monochrom> https://twitter.com/sigfpe/status/776420034419658752
22:03:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:04:05 <safinaskar> geekosaur: are you prematurely optimizing, or just using a non-Haskelly API for some reason?" - i already have non-optimized version, and now i want to optimize it. in fact code i want to optimize is here: https://hackage.haskell.org/package/check-cfg-ambiguity-0.0.0.1/docs/src/CheckCFGAmbiguity.html#lowLevelTestAmbiguity . it uses "STRef s [a]"
22:04:05 <safinaskar> and i want to replace it with my vector
22:05:07 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:05:27 <davean> tomsmeding: Its mroe efficient with one STRef, and I believe two refernces to the same vector
22:09:20 cuz joins (~user@2601:182:cc02:8b0:480:5e00:5c91:f4b2)
22:09:49 × chisui quits (~chisui@200116b866be75009cc16d86abb76e8b.dip.versatel-1u1.de) (Ping timeout: 246 seconds)
22:13:11 × Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
22:14:07 Kaipi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
22:19:20 × Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
22:19:31 Kaipi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
22:23:29 Merfont joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
22:24:09 × Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
22:24:28 jakalx parts (~jakalx@base.jakalx.net) ()
22:24:56 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
22:25:33 chris_ joins (~chris@81.96.113.213)
22:27:05 × Merfont quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
22:27:52 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 265 seconds)
22:29:06 × chomwitt quits (~Pitsikoko@2a02:587:dc0b:0:d8f7:cdfe:4658:bec4) (Ping timeout: 240 seconds)
22:29:34 × jonatan quits (~nate@h77-53-70-163.cust.a3fiber.se) (Ping timeout: 268 seconds)
22:30:02 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 272 seconds)
22:31:09 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
22:31:14 hsiktas[m] joins (~hsiktasma@2001:470:69fc:105::30d4)
22:32:39 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net)
22:32:54 <ph88> is there any way to get the name of the compiled binary with either stack or cabal ? i need to know the name for a command line tool
22:37:45 × dunj3 quits (~dunj3@p200300f61714a66193d8ecf822b563af.dip0.t-ipconnect.de) (Quit: Leaving)
22:38:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
22:39:05 × fendor quits (~fendor@77.119.218.107.wireless.dyn.drei.com) (Read error: Connection reset by peer)
22:41:39 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
22:42:13 <geekosaur> https://downloads.haskell.org/ghc/latest/docs/html/libraries/base-4.15.0.0/System-Environment.html#v:getProgName
22:42:54 × acidjnk_new quits (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
22:46:17 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds)
22:47:05 <ph88> geekosaur, i think that is the name of the program as it was executed (in case the user renamed the program) .. i would like the name from the cabal file how it was compiled
22:47:12 <Lycurgus> yeah
22:47:23 <Lycurgus> just look in the damn fs
22:48:05 <Lycurgus> it's usually pretty clear if you look at the tree or .local/bin , ~/.stack whatever
22:48:25 jakalx joins (~jakalx@base.jakalx.net)
22:48:44 <Clint> ph88: you want the equivalent of `grep -i executable *.cabal`?
22:49:28 <Lycurgus> if you mean prior the instantiation of any project, you'll need the look at the particular pkg (stack, flavors of cabal, etc)
22:49:37 <Lycurgus> *need to look
22:50:56 oxide joins (~lambda@user/oxide)
22:51:30 <geekosaur> that seems to be the best you'll do; it's not for example part of the Paths_ module
22:51:42 <ph88> Clint, yes. I thought there might be a clean way to do this without using grep
22:51:54 × pbrisbin quits (~patrick@pool-173-49-147-28.phlapa.fios.verizon.net) (Ping timeout: 240 seconds)
22:52:38 <Clint> i'm sure you could parse the cabal file and output the list of executables
22:52:58 <geekosaur> I'm not so sure of that, parsing the cabal file is known to be painful
22:53:10 <geekosaur> I just used grep when I needed that
22:53:23 <monochrom> How automatic do you really need this to be?
22:54:53 <ph88> for a CI configuration file that i want to use for multiple projects
22:55:06 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds)
22:55:24 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
22:58:01 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
22:59:44 justsomeguy joins (~justsomeg@user/justsomeguy)
23:00:32 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
23:02:58 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:02:58 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
23:03:09 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
23:03:40 <Clint> ph88: you can grab them out of https://downloads.haskell.org/ghc/8.2.1/docs/html/libraries/Cabal-2.0.0.2/Distribution-Types-PackageDescription.html#t:PackageDescription
23:03:52 chris_ joins (~chris@81.96.113.213)
23:03:52 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:04:20 <ph88> ye ok i could build a cli tool to do just that
23:05:00 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
23:05:00 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
23:05:43 gentauro joins (~gentauro@user/gentauro)
23:09:07 <monochrom> If cabal build is successful, you can expect dist-newstyle/build/<arch>/ghc-<version>/<pkg>-<version>/x to have subdirectories, one per executable.
23:09:38 <monochrom> Now I have reduced the problem to "how to compute <arch>, ghc version number, etc". >:)
23:10:12 <monochrom> But perhaps you can play fast and loose and just say "whatever directory I find at that place I'll go for it, I don't care"
23:13:18 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds)
23:13:35 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
23:14:59 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.0.1)
23:19:53 × zeenk quits (~zeenk@2a02:2f04:a106:9600:82fb:aed9:ca9:38d3) (Quit: Konversation terminated!)
23:23:52 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
23:24:42 <dsal> I'm going to see if I can convert one of my projects to cabal again...
23:25:58 × mud quits (~mud@user/kadoban) (Ping timeout: 256 seconds)
23:31:45 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
23:32:53 <jackdk> What is a good random number generator that performs well in a multithreaded environment (ideally supported by `random-source`, since that's what the project I'm refactoring uses). /dev/urandom seems to suffer contention, if this blog post I found from 2014 is still accurate
23:34:33 <dsal> For what purpose?
23:34:46 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
23:35:42 <jackdk> good question. Simulation, not cryptography
23:36:01 × stefan-_ quits (~cri@42dots.de) (Ping timeout: 265 seconds)
23:36:18 <monochrom> If just statistically random, use /dev/urandom or equivalent to seed, then use any splittable generator, e.g., random-1.2. Every time you fork, you split.
23:38:20 <jackdk> random-source includes support for StdGen. I did try splitting the stdgen before each fork, but was still pegging one core at runtime (as seen by htop). Perhaps I was doing something else wrong. At least I know that the overall idea there was correct
23:40:11 stefan-_ joins (~cri@42dots.de)
23:40:58 lavaman joins (~lavaman@98.38.249.169)
23:44:06 × cuz quits (~user@2601:182:cc02:8b0:480:5e00:5c91:f4b2) (Ping timeout: 256 seconds)
23:44:42 × shapr quits (~user@pool-108-28-144-11.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
23:47:12 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:57:48 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds)

All times are in UTC on 2021-07-01.