Home liberachat/#haskell: Logs Calendar

Logs on 2024-09-21 (liberachat/#haskell)

00:04:35 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
00:04:40 <probie> You can evaluate that question thunk at a later time
00:06:35 <Inst> it's more like weirdness with GHCI, possibly not an issue with ghc
00:07:13 <Inst> if i bang a let declaration in a do block, do traceShowId over a number, it doesn't evaluate, if I traceShowId something else, it evaluates
00:07:53 <Inst> it looks like it's wonkiness related to default types, because if I affix a type annotation, it evaluates
00:09:49 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
00:10:09 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
00:15:52 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
00:20:19 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
00:22:56 × ZharMeny quits (~ZharMeny@user/ZharMeny) (Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4))
00:25:30 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
00:32:20 × califax quits (~califax@user/califx) (Remote host closed the connection)
00:33:59 califax joins (~califax@user/califx)
00:36:07 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
00:40:52 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
00:51:51 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
00:53:19 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
00:55:07 troojg joins (~troojg@user/troojg)
00:56:38 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
01:04:01 <cheater> what
01:07:40 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
01:12:21 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
01:21:40 pavonia joins (~user@user/siracusa)
01:22:55 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
01:23:27 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
01:24:54 Oxf1ac joins (~Oxf1ac@62.4.42.168)
01:27:36 × CrunchyFlakes quits (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
01:28:31 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
01:30:16 CrunchyFlakes joins (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de)
01:35:38 Oxf1ac parts (~Oxf1ac@62.4.42.168) (WeeChat 4.4.2)
01:35:54 gvg_ joins (~dcd@user/gvg)
01:36:58 × gvg quits (~dcd@user/gvg) (Ping timeout: 252 seconds)
01:39:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
01:44:19 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
01:44:57 × Fijxu_ quits (~Fijxu@user/fijxu) (Ping timeout: 252 seconds)
01:48:37 <probie> % do{let {!x=trace "Hello" 42}; putStrLn "World"}
01:48:37 <yahb2> World
01:48:45 <probie> % do{let {!x=trace "Hello" (42 :: Int)}; putStrLn "World"}
01:48:45 <yahb2> Hello ; World
01:48:59 Fijxu joins (~Fijxu@user/fijxu)
01:49:00 <probie> That isn't type defaulting
01:49:20 <probie> % do{let {x=trace "Hello" (42 :: Int)}; x `seq` putStrLn "World"}
01:49:20 <yahb2> Hello ; World
01:49:30 <probie> % do{let {x=trace "Hello" 42}; x `seq` putStrLn "World"}
01:49:30 <yahb2> Hello ; World
01:51:12 <probie> It's that `x` has type `Num a => a`, which is "pretty much" a function, and therefore already in WHNF since it's a lambda
01:54:12 × Squared quits (~Square@user/square) (Ping timeout: 252 seconds)
01:54:20 <Inst> thanks probie
01:54:33 <Inst> but if you do this on ghc, it works
01:55:01 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
01:55:17 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
01:55:19 <geekosaur> in a sense that is defaulting
01:56:27 <geekosaur> ghci has NoMonomorphismRestriction, so it doesn't resolve things like (Num a => a) immediately. ghc doesn't, so it gets defaulted to Int and is no longer a function taking a Num dictionary
01:56:30 Guest19 joins (~Guest57@syn-075-131-084-201.res.spectrum.com)
01:57:14 <geekosaur> if you compile with -XNoMonomorphismRestriction, you should get the same behavior as ghci
01:58:03 <geekosaur> if you run it in "ghci -XMonomorphismRestriction", you should get the same behavior as ghc
01:59:57 × Guest19 quits (~Guest57@syn-075-131-084-201.res.spectrum.com) (Client Quit)
01:59:58 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
02:02:33 <Inst> thanks geekosaur
02:03:42 <geekosaur> this kind of confusion is more or less why the monomorphism restriction exists and is the default; x there "looks like" a value, but without the MMR it's actually a function
02:04:15 <Inst> also, curious, can you still get unsafePerformIO to segfault with the example code?
02:04:38 <geekosaur> I saw you bring that up in #ghc but I haven't lookmed
02:05:01 <Inst> it's weird, but probably why it's just unsafe, i.e, might be platform specific
02:05:49 <Inst> thanks anyways
02:06:00 <Inst> I used to get it to crash, but I guess that's why it's unsafe
02:06:08 <Inst> undefined behavior depending on platform and kernel version
02:07:25 <geekosaur> I think the example code was "broken" by ghc's runtime representations changing in 8.10.5+ to support Apple AArch64
02:07:40 <geekosaur> but that's just a suspicion
02:07:46 <geekosaur> (it didn't core here)
02:07:52 <Inst> i swapped to 8.x via ghcup
02:08:55 <Inst> still fails to crash, I suspect it's something to do with linux kernel updates
02:09:25 <geekosaur> keep in mind that I'm on Ubuntu 22.04, so my kernel is practically ancient
02:11:59 <Inst> iirc it does crash in windows, but i sort of lost my windows drive :(
02:12:41 <geekosaur> the problem they're talking about can't be fixed as such (it might be made slightly less likely to happen in certain specific cases, but the general problem is not fixable)
02:13:05 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Remote host closed the connection)
02:13:35 <geekosaur> as the discussion says, if you have unsafePerformIO, you have unsafeCoerce and what happens if you use it as such will be up to the whim of the RTS
02:15:27 <geekosaur> the example code may now be too simplistic to demonstrate the problem, but I'm sure it won't need much tweaking to reveal it again
02:17:03 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
02:19:23 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
02:26:35 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
02:31:55 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
02:34:30 × td_ quits (~td@i53870926.versanet.de) (Ping timeout: 246 seconds)
02:36:21 td_ joins (~td@i5387092D.versanet.de)
02:40:48 × machinedgod quits (~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 246 seconds)
02:42:23 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
02:43:13 <Inst> this is weird
02:43:43 <Inst> 234288 unsafeCoerce-ed to System.IO.Handle gets you the crash I'm looking for
02:43:50 <Inst> but other integers don't produce the same effects
02:44:08 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Remote host closed the connection)
02:44:43 JuanDaugherty joins (~juan@user/JuanDaugherty)
02:45:08 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
02:45:20 × terrorjack4 quits (~terrorjac@2a01:4f8:c17:dc9f::) (Quit: The Lounge - https://thelounge.chat)
02:46:01 <Inst> okay, Integers (mostly) seem to produce the desired crash on unsafeCoerce to System.IO.Handle (using unsafePerformIO)
02:47:18 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
02:47:36 terrorjack4 joins (~terrorjac@static.48.15.202.116.clients.your-server.de)
02:49:43 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds)
02:53:12 <geekosaur> that's not too surprising, it very likely depends on the internal GMP representation
02:53:33 <geekosaur> that's more or less what you're inviting with unsafeCoerce in any form
02:54:05 <Inst> iirc it should be safe to use unsafePerformIO for read-only operations, right? as long as you ensure the write is done beforehand
02:54:26 <Inst> i'm more trying to figure out when it's safe to use unsafeCoerce
02:54:54 <geekosaur> even read-only is unsafe if you coerced an unboxed value into a boxed one
02:55:24 <geekosaur> because reading it will follow what it thinks is a pointer
02:55:50 <geekosaur> @quote monochrom unsafeCoerce.*Either
02:55:50 <lambdabot> monochrom says: isTrue = (unsafeCoerce :: Either a b -> Bool) . (unsafeCoerce :: Maybe c -> Either a b) . (unsafeCoerce :: Bool -> Maybe c)
02:56:50 <geekosaur> if (a) all types are boxed (b) all types have at least as many constructors as the starting type does, you can generally get away with it
02:56:51 <Inst> i mean without coercion in unsafePerformIO, i.e, a way to avoid passing large parameters around
02:57:34 <geekosaur> unsafePerformIO only matters insofar as it can give you a polymorphic IORef, which implicitly unsafeCoerces anything taken out of it
02:57:56 <Inst> iirc i used unsafePerformIO as an optimization pass
02:58:09 <geekosaur> it's the unsafeCoerce part, however you got it, that is problematic
02:58:10 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
02:58:44 <Inst> i thought the main reason unsafePerformIO was considered unsafe was because Haskell gives very weak guarantees on evaluation order of pure functions?
02:58:56 <geekosaur> and re "large parameters", if they are boxed, you're passing a pointer
02:59:08 <geekosaur> if they're unboxed, you need to rethink your design
02:59:36 <Inst> weird because it was boxed, and I was using monomorphic IORef and got a performance improvement
03:00:00 <geekosaur> not really. if you want that level of unsafety, you want accursedUnutterablePerformIO (that is, inlining runRW#)
03:02:06 <geekosaur> unsafePerformIO will reveal to you when things are evaluated (on demand aka "lazily") but won't in general cause evaluation order issues otherwise
03:02:32 <geekosaur> at least, not any more than multithreaded access to the same resource will
03:03:14 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
03:03:47 <geekosaur> con template Debug.Trace, which uses unsafePerformIO under the hood
03:04:40 <Inst> ehhh, unsafePerformIO sort of breaks the entire haskell programming model, doesn't it?
03:04:44 <Inst> since you can now run IO anywhere
03:05:17 <geekosaur> if you get a performance improvement from an IORef, I would first suspect you had thunk buildup that the IORef was causing to be forced
03:06:11 <Inst> probably, sigh
03:06:33 <Inst> also, by the way, do I finally get monads now that I'm thinking in terms of monadic typeclasses?
03:06:51 <geekosaur> actually, no, you can't. that;s not what unsafePerformIO is. unsafePerformIO is "hey compiler, I promise you that this is actually pure". at which point it is evaluated on demand instead of forcing evaluation
03:06:56 <Inst> as in, Constraint m => m a type actions
03:07:14 <geekosaur> not all constraints are monads
03:07:45 <geekosaur> what if the constraint is Functor?
03:07:58 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
03:08:24 <Inst> i know, but what I mean is that using monadic / applicative polymorphism to write actions such that it's the type that forces the actual codepath
03:09:02 <Inst> hence the old canard about "computation in a context"
03:09:04 <geekosaur> mmm, I'd say that's more about "free monad"?
03:09:11 <geekosaur> which is a subset of monads
03:09:51 <geekosaur> that said, I'm operating on 3h of sleep and it's getting late here so I may be blathering at this point 😞
03:12:00 <Inst> i'm blathering at all times, go to bed, geekosaur, it's friday :)
03:12:33 <geekosaur> gotta wait for my nighttime drugs to kick in (in particular the painkillers, sigh)
03:13:53 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds)
03:13:56 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
03:14:01 <Inst> i'm sorry to hear :(
03:14:10 <Inst> and that's sort of a giveaway :(
03:14:20 <Inst> also I guess I was talking about mtl style
03:16:16 <geekosaur> effect systems do the same thing, they just get there via a different path
03:18:24 <Inst> what's the exact name for constraint-based polymorphic effects?
03:18:36 <geekosaur> beats me 🙂
03:18:48 <Inst> iirc it was mentioned it's useful for mocking, but i can't figure out other contexts where the effect polymorphism is useful
03:19:12 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
03:19:16 <geekosaur> swapping out effect providers
03:19:29 <Inst> i realize i had a large chunk of code, and it was problematic because i couldn't redirect stdout trivially
03:19:34 <geekosaur> for example, switching logging frameworks
03:20:43 <geekosaur> (this is not the problem I have with effect systems. the problem I have with them is that they will happily let you "algebraically" combine effects that mtl will rightly reject because they're not safe to combine)
03:20:45 <dolio> unsafeCoercing between boxed values, even if you think they should be represented 'the same' is not something you can generally get away with, in my experience.
03:21:05 <dolio> Boxed values of different types, that is.
03:21:12 <geekosaur> I provided a more specific rule earlier
03:21:24 <geekosaur> even used monochrom's quote to demonstrate 🙂
03:26:36 athan joins (~athan@syn-098-153-145-140.biz.spectrum.com)
03:26:55 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
03:27:20 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
03:29:17 × bilegeek quits (~bilegeek@227.sub-174-208-228.myvzw.com) (Quit: Leaving)
03:29:43 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
03:34:39 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
03:35:45 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
03:37:14 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
03:41:31 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 264 seconds)
03:45:31 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
03:46:49 × troojg quits (~troojg@user/troojg) (Ping timeout: 260 seconds)
03:50:23 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
03:50:27 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
03:54:58 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds)
03:58:50 troojg joins (~troojg@user/troojg)
04:01:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
04:04:05 × xff0x quits (~xff0x@2405:6580:b080:900:64be:ce6a:a0a8:1563) (Ping timeout: 248 seconds)
04:04:23 xff0x joins (~xff0x@2405:6580:b080:900:64be:ce6a:a0a8:1563)
04:06:12 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
04:06:12 robobub joins (uid248673@id-248673.uxbridge.irccloud.com)
04:17:03 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
04:21:57 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
04:23:46 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
04:28:11 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds)
04:28:14 × troojg quits (~troojg@user/troojg) (Ping timeout: 260 seconds)
04:30:26 neuroevolutus joins (~neuroevol@146.70.211.110)
04:34:20 × benjaminl quits (~benjaminl@user/benjaminl) (Read error: Connection reset by peer)
04:34:36 benjaminl joins (~benjaminl@user/benjaminl)
04:48:38 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
04:53:27 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
04:53:29 × hammond quits (proscan@gateway04.insomnia247.nl) (Ping timeout: 260 seconds)
04:54:33 × terrorjack4 quits (~terrorjac@static.48.15.202.116.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat)
04:55:31 × libertyprime quits (~libertypr@118-92-68-68.dsl.dyn.ihug.co.nz) (Remote host closed the connection)
04:57:21 terrorjack4 joins (~terrorjac@2a01:4f8:c17:dc9f::)
05:01:59 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
05:07:01 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
05:09:03 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
05:13:51 <Inst> by the way, am i really not understanding arrows?
05:14:39 <Inst> getLine >>= (<$) <*> putStrLn >>= putStrLn is a shoddy mess
05:15:06 <Inst> but so's getLine >>= runKleisli (Kleisli putStrLn &&& Kleisli putStrLn)
05:15:41 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds)
05:15:45 <Inst> arr is Kleisli . (pure . f) ffs
05:16:56 <Inst> getLine >>= ((>>) . putStrLn) <*> putStrLn is only slightly better
05:17:46 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
05:23:04 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
05:25:05 × neuroevolutus quits (~neuroevol@146.70.211.110) (Ping timeout: 256 seconds)
05:26:05 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
05:28:20 × mikess quits (~mikess@user/mikess) (Ping timeout: 252 seconds)
05:30:25 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:32:00 euphores joins (~SASL_euph@user/euphores)
05:32:37 × euphores quits (~SASL_euph@user/euphores) (Max SendQ exceeded)
05:33:14 euphores joins (~SASL_euph@user/euphores)
05:33:33 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
05:38:35 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
05:45:21 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
05:49:21 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
05:50:07 hammond joins (proscan@gateway04.insomnia247.nl)
05:52:31 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds)
05:54:00 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
06:02:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
06:06:48 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
06:07:20 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
06:07:32 × CrunchyFlakes quits (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
06:09:29 JuanDaugherty joins (~juan@user/JuanDaugherty)
06:10:01 CrunchyFlakes joins (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de)
06:12:04 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
06:15:25 <Inst> for that problem
06:15:46 <Inst> getLine >>= for_ [putStrLn, putStrLn] . (&) works better
06:16:41 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
06:18:03 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
06:18:05 neuroevolutus joins (~neuroevol@146.70.211.110)
06:21:40 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
06:22:58 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
06:26:19 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
06:31:19 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 264 seconds)
06:33:23 × Me-me quits (~me-me@kc.randomserver.name) (Read error: Connection reset by peer)
06:33:50 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
06:34:45 Me-me joins (~me-me@kc.randomserver.name)
06:38:43 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
06:41:12 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:44:48 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
06:49:36 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
06:49:58 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 245 seconds)
06:54:33 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
06:59:09 <geekosaur> Inst, Arrows are mostly a failed experiment
06:59:29 <geekosaur> but they gave rise to Profunctor and Applicative
06:59:45 <geekosaur> however there are some FRP frameworks based on Arrows
07:00:01 × caconym quits (~caconym@user/caconym) (Quit: bye)
07:00:02 <geekosaur> some of which have proposed modified versions of Arrow
07:00:18 × JamesMowery quits (~JamesMowe@ip98-167-207-182.ph.ph.cox.net) (Quit: Goodbye)
07:00:37 caconym joins (~caconym@user/caconym)
07:00:45 JamesMowery joins (~JamesMowe@ip98-167-207-182.ph.ph.cox.net)
07:02:40 <geekosaur> I think the original idea was abstraction over composition, that is, normal functions and monadic functions (wrapped in Kleisli) can be composed in the same way in an Arrow framework
07:03:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
07:03:17 × hsw quits (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) (Ping timeout: 248 seconds)
07:03:39 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
07:03:52 hsw joins (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net)
07:04:26 <geekosaur> but it turned out that there was no real point in unifying (.) and (>=>), and while Arrow has the potential for static analysis, `arr` severely restricts what you can do with it
07:05:19 <geekosaur> (sorry, `flip (.)`)
07:06:59 <ski> `arr' should be moved to a subclass
07:08:03 <geekosaur> I have so far heard 3 proposals for how Arrow should be reworked
07:08:11 <geekosaur> none of them seems to have much traction
07:08:18 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
07:08:57 <geekosaur> and I'm not sure any of them is compatible with the few existing users of Arrow (e.g. Yampa)
07:10:17 <ski> didn't conal have some work on compiling categorical stuff ?
07:10:34 <geekosaur> "Compiling to Categories"?
07:11:29 <ski> probably, yeah
07:12:48 <geekosaur> but he went straight to Control.Category in the paper I dug up
07:13:53 <ski> maybe we need `proc' notation that uses that
07:14:30 <geekosaur> (he used a plugin)
07:17:46 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
07:19:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
07:22:05 <Inst> geekosaur: you're STILl in pain? :(
07:22:48 <Inst> since i thought you went to sleep
07:23:09 <geekosaur> my sleep has been severely disturbed for longer than I've had the neck/arm issue
07:23:24 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
07:23:26 × jle` quits (~jle`@2603:8001:3b02:84d4:6c44:9933:28ff:d264) (Remote host closed the connection)
07:23:36 <geekosaur> it's absolutely not unusual that I wake up 02:30-03:00 and am up for an hour or so 😞
07:23:59 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
07:24:06 jle` joins (~jle`@2603:8001:3b02:84d4:eb82:e687:8bae:8fb3)
07:24:06 <Inst> by the way, if I want to model an HTML object, is vector or seq a better application data structure for children / attributes?
07:24:31 <tomsmeding> Inst: will you be appending to that list
07:24:43 <Inst> yes, which is why i'm thinking seq not vector
07:24:54 <tomsmeding> i.e. what's the ratio between the number of times you read that list, and the number of times you modify it
07:24:58 <Inst> i guess i'm doing yet another html / css library
07:25:20 <geekosaur> cue xkcd 😛
07:25:23 <Inst> well, i mean, it'll be converted to lazy bytestring
07:25:35 <tomsmeding> if you can arrange to always append at the front, and don't need to index into the thing, plain [] may be best
07:25:48 <geekosaur> that's what I was thinking
07:25:54 <Inst> wait, can you edit / replace Blaze / Lucid HTML types once they've been generated?
07:25:59 <geekosaur> but it definitely depends on what uou're doing
07:26:53 <Inst> iirc blaze and lucid are builders
07:27:07 <tomsmeding> bonus points if you ensure that client code can only treat the thing as a Monoid, so that you can swap out the implementation later :)
07:27:09 <Inst> https://hackage.haskell.org/package/type-of-html
07:29:00 <Inst> well, i have no idea what i'm doing, i think implementing ADTs for HTML / CSS will probably help me learn HTML / CSS better, and when this stuff falls through, I'll just rewrite the library
07:29:08 <Inst> already have a friend lined up to help me maintain it
07:29:31 geekosaur is having a "that trick never works!" moment
07:29:46 <tomsmeding> I feel like coding up representations of html/css will help you very well in learning the syntax of them both
07:29:50 <Inst> whatever, I'll just use list then then change the datatypes later!
07:29:55 <tomsmeding> which is like the easiest and least interesting part :)
07:29:56 <Inst> thanks tomsmeding
07:30:10 <geekosaur> (well, I nsuppose an ADT doesn't necessarily imply a structure)
07:30:16 <Inst> yeah, well, finally get out of vaporware, actually build something useful in the Haskell ecosystem instead of being a semi-tolerated troll
07:30:24 <Inst> and then go rework it once I have some idea of what I'm doing
07:30:33 <tomsmeding> css gets really complicated in how all the properties interact, e.g. how css Grid interacts with other layout stuff
07:30:37 <tomsmeding> or how the whole box model works
07:31:04 <tomsmeding> does a box shadow count as size of the element or not? Does the border? (depends on the border-box property)
07:31:07 <geekosaur> welp. going to be up a while longer, I guess
07:31:13 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
07:31:16 <geekosaur> fire engines just pulled up
07:31:21 <tomsmeding> O.o
07:31:38 <tomsmeding> nearby?
07:31:39 <geekosaur> either the building fire alarm misfired again, or someone's stuck in the elevator again
07:31:44 <tomsmeding> ah
07:32:04 × jle` quits (~jle`@2603:8001:3b02:84d4:eb82:e687:8bae:8fb3) (Read error: Connection reset by peer)
07:32:46 <geekosaur> …and one of the engines just turned around and left. that usually takes longer if it's the building fire alarm
07:33:06 <geekosaur> so maybe (c) someone called 911 in a panic and they just sent everything
07:33:09 <tomsmeding> re css, also the whole priority ordering of rules
07:33:19 <geekosaur> akron's weird that way
07:33:41 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
07:34:17 gmg joins (~user@user/gehmehgeh)
07:34:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
07:36:25 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
07:40:21 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
07:41:13 <tomsmeding> I would imagine that happens in lots of places, sometimes
07:48:35 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 255 seconds)
07:50:36 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
07:52:56 <Inst> is it a good or bad thing that Haskell matches so many of my neuroses?
07:53:12 <Inst> like, I like planning too much, doing too little
07:53:50 <tomsmeding> it means that you should watch out for overfitting :)
07:53:53 acidjnk joins (~acidjnk@p200300d6e72cfb631d346e810a542001.dip0.t-ipconnect.de)
07:54:01 <tomsmeding> (to a software development style)
07:55:54 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
07:56:54 <tomsmeding> Inst: ooof https://hackage.haskell.org/package/type-of-html-1.6.2.0/docs/src/Html.Type.Internal.html#line-1408
07:56:59 misterfish joins (~misterfis@84.53.85.146)
07:57:52 <Inst> someone should have used template Haskell there
07:58:11 <tomsmeding> well it's not _too_ bad
07:58:18 <tomsmeding> and the list doesn't necessarily have to be any longer, maybe
07:58:26 <tomsmeding> but beautiful it is not :p
07:58:30 <Inst> I just brought up the library as something close to what I wanted, I'm just doing straight ADT (without fancy type mechanics) until I get the hang of things, but it's annoying how I can't use subtypes etc
07:59:46 <tomsmeding> type classes can give you kind of the dual of that, "sub-behaviours"?
08:00:45 <tomsmeding> i.e. if the more general behaviour is a superclass of the more specific one, then any type that implements the specfic behaviour will be implicitly known to also implement the more general behaviour
08:01:16 <tomsmeding> which is analogous to subtyping in OOP, where a specfic object is also implicitly a more general object
08:01:47 <tomsmeding> (if you don't need the "implicit" part, you can just use what OOP calls "composition", i.e. just put the parent object in a field of the child object)
08:02:43 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
08:02:43 <tomsmeding> (which is also how all of the implicit techniques are implemented; the compiler just knows about them and resolves references to the contained structure automagically)
08:02:44 × neuroevolutus quits (~neuroevol@146.70.211.110) (Quit: Client closed)
08:04:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
08:07:52 × youthlic quits (~Thunderbi@user/youthlic) (Quit: youthlic)
08:08:19 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
08:09:06 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
08:09:30 youthlic joins (~Thunderbi@user/youthlic)
08:12:01 gary_borg joins (~gary_borg@144.6.194.76)
08:12:56 <gary_borg> why is haskelbridge my opp
08:13:04 <gary_borg> im confused with this app im new ot irc
08:13:09 <gary_borg> why is someone here my opp
08:13:12 <gary_borg> what did i do wronh
08:13:27 <tomsmeding> what do you mean with "opp"?
08:14:20 <gary_borg> opposition
08:14:36 <gary_borg> Opponent or Opposition
08:14:37 <gary_borg> Opp (Opponent or Opposition) "Opp" is a slang abbreviation of the word "opponent" or "enemy." It is commonly used to refer to someone who is viewed as an adversary or someone with whom one has a conflict or disagreement.
08:14:51 <tomsmeding> irc does not have a concept of "opposition", so not sure what you're referring to :)
08:15:40 <Inst> tomsmeding: tbh you're right, you could use typeclasses and existential types for that
08:16:06 <tomsmeding> Inst: existential types are almost never the right answer
08:16:28 <tomsmeding> sometimes they are, sure, but when modelling data, they usually bring more harm than good
08:17:23 <Inst> after touching julia, why yes, you can have an entire language made out of typeclasses (since implicitly in Julia every function is a typeclass)
08:17:25 <gary_borg> https://imgur.com/a/7GTqvrr this is what im referring to.
08:17:31 <Inst> just in Haskell it's a lot more wonky
08:17:59 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
08:18:00 <tomsmeding> gary_borg: ah lol
08:18:15 <tomsmeding> an "op" (not "opp") is an "operator", i.e. a user with admin rights on the channel
08:18:19 <tomsmeding> that user here is ChanServ
08:18:26 Inst parts (~Inst@user/Inst) (Leaving)
08:18:29 Inst joins (~Inst@user/Inst)
08:18:39 <tomsmeding> which is a bot from the irc server that mediates admin rights to the actual people having said access
08:19:29 <ski> (clearly operators are opposition, adversaries)
08:19:33 <tomsmeding> :D
08:19:47 <gary_borg> timtamspelling: oh ok ythank yo for choryfinning
08:20:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
08:21:22 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
08:24:21 × gary_borg quits (~gary_borg@144.6.194.76) (Quit: Leaving)
08:24:45 gary_borg joins (~gary_borg@144.6.194.76)
08:25:04 × misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 260 seconds)
08:25:09 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
08:25:28 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 244 seconds)
08:26:45 misterfish joins (~misterfis@84.53.85.146)
08:27:05 mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com)
08:29:10 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:31:36 <Inst> tomsmeding: why are existential types a bad idea?
08:35:02 <ski> @where existential-antipattern
08:35:02 <lambdabot> "Haskell Antipattern: Existential Typeclass" by Luke Palmer at <https://web.archive.org/web/20220121105027/https://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/>
08:35:50 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
08:36:27 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:38:12 × gary_borg quits (~gary_borg@144.6.194.76) (Killed (ozone (No Spam)))
08:40:20 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
08:40:49 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
08:42:13 random-jellyfish joins (~developer@user/random-jellyfish)
08:45:38 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds)
08:50:31 <Inst> oh fine, i'll do it the old fashioned way with a sum type :(
08:51:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
08:55:33 __monty__ joins (~toonn@user/toonn)
08:56:35 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
08:56:55 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
08:59:22 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
09:03:53 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:05:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
09:09:00 srazkvt joins (~sarah@user/srazkvt)
09:09:25 × srazkvt quits (~sarah@user/srazkvt) (Client Quit)
09:10:16 <tomsmeding> Inst: what ski posted, but also just that they tend to make life more annoying while not actually helping much
09:10:34 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
09:11:44 <tomsmeding> mind you, exceptions exist, especially if your types have some GADT-like type parameters and you're doing some computations that cannot (or should not) be fully reflected on the type level
09:12:03 <tomsmeding> but if you're in that world, you tend to know it
09:20:50 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 255 seconds)
09:21:01 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
09:26:03 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
09:27:15 <Inst> i'm more annoyed that you can't newtype constructors for these types of sumtypes
09:28:19 target_i joins (~target_i@user/target-i/x-6023099)
09:28:28 <tomsmeding> Inst: what do you mean?
09:28:46 <tomsmeding> have a type that allows just one of the constructors?
09:29:04 <tomsmeding> you could make it a GADT and give it a type parameter that is different for each constructor
09:29:43 <tomsmeding> question is whether that's worth it
09:30:05 <tomsmeding> at least it still behaves properly with the rest of the language, contrary to existentials :p
09:36:19 × random-jellyfish quits (~developer@user/random-jellyfish) (Quit: Leaving)
09:36:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
09:37:21 CiaoSen joins (~Jura@2a05:5800:22d:f000:ca4b:d6ff:fec1:99da)
09:40:34 <Inst> i mean that newtype is just transparent, it's effectively a type synonym that's enforced only on the type level
09:40:59 <Inst> also iirc there's some freaky laziness-related quirkiness there as well, i.e, the constructor doesn't exist and when you evaluate for the constructor you're also evaluating the underlying term, iirc
09:41:30 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
09:41:36 <Inst> but the two characteristics of newtypes are, no sum types, and only one field allowed
09:41:38 <ski> Hugs has restrricted type synonyms (like in the MLs)
09:42:24 <Inst> i'd rather have sum types (i.e, C union types) with the newtype transparency
09:42:34 <tomsmeding> Inst: do you mean sum types or union types?
09:42:40 <tomsmeding> union types do not have a tag, sum types do
09:42:59 <Inst> ah, and that's why Cmm can't do it, and thus haskell can't
09:43:18 <tomsmeding> the haskell source language has sum types, and no union types; C has union types and no sum types
09:43:23 <tomsmeding> python also "has" union types
09:43:27 <tomsmeding> as does typescript
09:44:19 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
09:44:45 lxsameer joins (~lxsameer@Serene/lxsameer)
09:45:09 L29Ah joins (~L29Ah@wikipedia/L29Ah)
09:51:06 morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
09:52:36 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
09:52:57 wootehfoot joins (~wootehfoo@user/wootehfoot)
09:56:21 nnm joins (~nnm@79-139-162-83.dynamic.spd-mgts.ru)
09:57:09 × morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds)
09:57:28 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
09:59:39 <Inst> tagged unions, i guess
09:59:49 <tomsmeding> right
10:00:09 <tomsmeding> I'd call a tagged union a "sum type" when the language ensures that the tag and the union contents remain in sync
10:00:29 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
10:01:15 <tomsmeding> well -- the language, or the API of the sum type, if it's implemented in user space
10:01:41 <tomsmeding> e.g. std::variant in C++ builds on the underlying support for union types to create a sum type, because its API doesn't allow letting the tag and the contents get out of sync
10:01:56 <tomsmeding> (never mind that there are umpteen other problems with std::variant, it's a mess, but it _is_ a sum type)
10:03:18 <ski> the tag also needs to be distinct from the type of the contents
10:03:32 <ski> (`A + A' should not equal `A'9
10:04:00 <tomsmeding> I would rather formulate that as "every alternative of the union should have a distinct tag"
10:04:48 <tomsmeding> looking at the types becomes ambiguous if you have e.g. a language with refinement types, where Int and {v : Int | v > 0} are distinct types but have indistinguishable values
10:04:50 <ski> yep, that's a more constructive way to phrase it
10:05:39 ski would call those (subset) comprenesion types
10:06:08 <tomsmeding> isn't "refinement type" a more general term?
10:06:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
10:06:32 <tomsmeding> at the very least, liquid haskell has these things and calls them "refinement types" :)
10:07:08 <ski> given `data List a = Nil | Cons a (List a)', i'd say `data EvenList a <: List a = Nil | Cons a (OddList a)' and `data OddList a <: List a = Cons a (EvenList a)' are refinement types
10:07:25 <ski> you refine a variant/sum type, by removing alternatives, yielding a subtype
10:07:51 <ski> this was described in papers before LiquidHaskell existed
10:08:11 <tomsmeding> I see
10:08:11 <Lears> "Union types" need to be debunked so people will stop expecting them to be a thing. They don't even make sense.
10:08:15 <tomsmeding> difference in terminology, then
10:08:36 <tomsmeding> Lears: there are type systems that support them /shrug/
10:08:36 <ski> (you can also refine a record/product type, by removing fields, yielding a supertype)
10:10:15 <ski> "Supertyping Suggestion for Haskell" by jmeacham (of jhc) at <http://repetae.net/recent/out/supertyping.html> is something similar, but for type classes
10:11:24 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
10:15:33 spenat_ is now known as spenat
10:16:30 × CiaoSen quits (~Jura@2a05:5800:22d:f000:ca4b:d6ff:fec1:99da) (Ping timeout: 246 seconds)
10:17:18 Guest4 joins (~Guest4@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net)
10:21:38 × connrs quits (~connrs@user/connrs) (Ping timeout: 265 seconds)
10:22:03 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
10:22:54 × dolio quits (~dolio@130.44.140.168) (Ping timeout: 260 seconds)
10:22:55 × mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 264 seconds)
10:23:21 connrs joins (~connrs@user/connrs)
10:24:09 dolio joins (~dolio@130.44.140.168)
10:26:57 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
10:34:33 × driib318 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat)
10:35:39 driib318 joins (~driib@176.57.184.141)
10:37:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
10:38:53 × Guest4 quits (~Guest4@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net) (Quit: Client closed)
10:42:34 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
10:43:17 gvg_ is now known as gvg
10:53:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
10:55:18 Guest4 joins (~Guest4@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net)
10:58:29 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
11:00:04 × caconym quits (~caconym@user/caconym) (Quit: bye)
11:01:38 × YoungFrog quits (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in)
11:01:58 YoungFrog joins (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
11:05:08 caconym joins (~caconym@user/caconym)
11:09:38 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:10:38 mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com)
11:13:35 × Guest4 quits (~Guest4@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net) (Ping timeout: 256 seconds)
11:14:15 Squared joins (~Square@user/square)
11:16:29 Guest4 joins (~Guest4@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net)
11:19:59 × paddymahoney quits (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) (Ping timeout: 245 seconds)
11:20:57 × Guest4 quits (~Guest4@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net) (Ping timeout: 256 seconds)
11:23:03 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
11:26:06 × synchromesh quits (~john@2406:5a00:241a:5600:3c25:ae8:512d:c1ef) (Read error: Connection reset by peer)
11:27:35 synchromesh joins (~john@2406:5a00:241a:5600:5db8:4c32:8611:a0fa)
11:28:40 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
11:32:20 ZharMeny joins (~ZharMeny@user/ZharMeny)
11:34:01 × tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 252 seconds)
11:37:49 paddymahoney joins (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com)
11:38:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
11:39:55 nnm_ joins (~nnm@79-139-162-83.dynamic.spd-mgts.ru)
11:41:12 tomboy64 joins (~tomboy64@user/tomboy64)
11:43:24 × nnm quits (~nnm@79-139-162-83.dynamic.spd-mgts.ru) (Ping timeout: 260 seconds)
11:43:59 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
11:45:55 nnm__ joins (~nnm@79-139-162-83.dynamic.spd-mgts.ru)
11:49:06 × nnm_ quits (~nnm@79-139-162-83.dynamic.spd-mgts.ru) (Ping timeout: 248 seconds)
11:54:35 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
11:59:54 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
12:08:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
12:13:09 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
12:19:29 × ZharMeny quits (~ZharMeny@user/ZharMeny) (Ping timeout: 255 seconds)
12:19:35 ZharMeny` joins (~ZharMeny@user/ZharMeny)
12:21:52 ZharMeny` is now known as ZharMeny
12:22:30 × ZharMeny quits (~ZharMeny@user/ZharMeny) (Read error: Connection reset by peer)
12:22:48 ZharMeny joins (~ZharMeny@user/ZharMeny)
12:24:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
12:28:49 nnm_ joins (~nnm@79-139-162-83.dynamic.spd-mgts.ru)
12:28:53 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
12:32:35 × nnm__ quits (~nnm@79-139-162-83.dynamic.spd-mgts.ru) (Ping timeout: 260 seconds)
12:33:27 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
12:33:54 × nnm_ quits (~nnm@79-139-162-83.dynamic.spd-mgts.ru) (Ping timeout: 272 seconds)
12:37:53 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 245 seconds)
12:39:50 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
12:44:33 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
12:52:11 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds)
12:55:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
12:56:20 gmg joins (~user@user/gehmehgeh)
12:59:18 JuanDaugherty joins (~juan@user/JuanDaugherty)
13:00:26 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
13:02:00 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
13:02:10 gmg joins (~user@user/gehmehgeh)
13:09:16 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
13:11:52 machinedgod joins (~machinedg@d50-99-47-73.abhsia.telus.net)
13:13:59 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
13:15:01 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
13:20:24 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
13:20:39 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
13:24:00 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
13:28:45 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
13:31:58 weary-traveler joins (~user@user/user363627)
13:34:19 × misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 264 seconds)
13:39:28 <Inst> ski: I still remember that you guys are teaching IO first. Have you guys considered teaching parallel and concurrent programming first, as that's the "polite" way to teach IO first? :)
13:39:47 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
13:42:03 × jinsun quits (~jinsun@user/jinsun) (Ping timeout: 245 seconds)
13:45:07 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
13:52:21 mari-estel joins (~mari-este@2a02:3032:303:eecf:216:3eff:fe65:4eef)
13:55:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
14:00:34 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
14:04:41 ZharMeny is now known as identity
14:10:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
14:11:51 × ski quits (~ski@ext-1-196.eduroam.chalmers.se) (Ping timeout: 252 seconds)
14:15:12 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
14:22:17 × Digit quits (~user@user/digit) (Read error: Connection reset by peer)
14:24:00 Digit joins (~user@user/digit)
14:25:45 × Xe quits (~cadey@perl/impostor/xe) (Quit: WeeChat 4.4.0)
14:26:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
14:26:40 Xe joins (~cadey@perl/impostor/xe)
14:31:00 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
14:32:43 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:41:48 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
14:43:03 Iceland_jack joins (~Iceland_j@user/Iceland-jack:62112)
14:46:44 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
14:49:29 × mari-estel quits (~mari-este@2a02:3032:303:eecf:216:3eff:fe65:4eef) (Ping timeout: 260 seconds)
14:57:23 × machinedgod quits (~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 252 seconds)
14:57:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
14:59:43 Iceland_jack58 joins (~Iceland_j@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net)
14:59:43 Iceland_jack58 is now known as Icelandjack
15:00:07 × Icelandjack quits (~Iceland_j@cpc122096-bmly10-2-0-cust498.2-3.cable.virginm.net) (Client Quit)
15:00:25 Iceland_jack24 joins (~Iceland_j@user/Iceland-jack:62112)
15:00:49 × Iceland_jack quits (~Iceland_j@user/Iceland-jack:62112) (Ping timeout: 256 seconds)
15:02:31 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
15:05:21 Iceland_jack24 is now known as Iceland_jack
15:10:55 troojg joins (~troojg@user/troojg)
15:11:00 × malte quits (~malte@mal.tc) (Remote host closed the connection)
15:11:16 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
15:12:11 malte joins (~malte@mal.tc)
15:16:02 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
15:17:57 ski joins (~ski@remote11.chalmers.se)
15:19:50 × mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 272 seconds)
15:27:03 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
15:27:17 Digitteknohippie joins (~user@user/digit)
15:29:02 × Digit quits (~user@user/digit) (Ping timeout: 265 seconds)
15:32:25 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
15:32:39 billchenchina- joins (~billchenc@124.90.85.141)
15:32:45 <Inst> if i'm building a HTML library, and I'm planning to abuse typeclasses like crazy (i.e, a ton of functions are defined within typeclasses)
15:34:01 <monochrom> then you can just plagiarize the xhtml package (comes with GHC) >:)
15:34:06 <geekosaur> don't unless you can be certain they all get resoilved at compile time
15:34:53 <geekosaur> otherweise they'll be indirect calls (possibly double indirect, if the typeclass dictionary isn't unboxed by optimizations) and be slooooow
15:34:56 <monochrom> Err, no, xhtml doesn't do that. Something else does.
15:37:43 × billchenchina- quits (~billchenc@124.90.85.141) (Read error: Connection reset by peer)
15:37:50 Digitteknohippie is now known as Digit
15:38:30 billchenchina- joins (~billchenc@103.118.42.229)
15:39:20 <monochrom> regex-base does that for regex. If you figure out how to use it, then you can hope that your users can figure out how to use yours.
15:39:29 × billchenchina- quits (~billchenc@103.118.42.229) (Max SendQ exceeded)
15:39:59 <geekosaur> it's also kinda infamously "wtf?"-inducing
15:40:26 <geekosaur> (granting that's because the author was trying to write Perl in Haskell)
15:40:58 billchenchina- joins (~billchenc@103.118.42.229)
15:41:21 <monochrom> Yeah I was going for "someone typeclassified everything, this is what happened" :)
15:41:47 × billchenchina- quits (~billchenc@103.118.42.229) (Max SendQ exceeded)
15:41:57 <monochrom> Oh, "someone learned Perl, this is what happened" works too >:)
15:42:19 <monochrom> "someone learned Perl, this is what happened to their fRMI brain image"
15:42:44 <geekosaur> remember, back when it was written, there was a shocking amount of overlap between the Perl and Haskell communities, and I don't mean PUGS
15:42:50 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
15:42:53 billchenchina- joins (~billchenc@103.118.42.229)
15:42:54 <geekosaur> (a few of us are still around 🙂 )
15:47:50 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
15:49:52 × athan quits (~athan@syn-098-153-145-140.biz.spectrum.com) (Quit: Konversation terminated!)
15:50:21 <Franciman> geekosaur: you mean when raku was written in haskell?
15:50:25 <mauke> that's not just writing perl in haskell, that's trying to outperl perl by a factor of at least 10
15:50:33 <Franciman> lol
15:51:09 <mauke> the regex interface in perl is much simpler because hey, global variables :-)
15:53:48 <geekosaur> Franciman: did you not see PUGS there?
15:54:32 <Franciman> no i asked because i was asking what times you were talking about?
15:55:39 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
15:56:26 gmg joins (~user@user/gehmehgeh)
15:58:35 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 244 seconds)
15:58:39 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
15:58:45 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
15:59:28 gmg joins (~user@user/gehmehgeh)
16:01:11 × finsternis quits (~X@23.226.237.192) (Remote host closed the connection)
16:03:33 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
16:07:11 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
16:07:35 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
16:10:07 <Franciman> ah geekosaur lol
16:10:15 <Franciman> I parsed PUGS as Perl user groups
16:10:18 <Franciman> not as Pugs
16:10:23 <Franciman> pardon
16:10:41 <ski> @where pugs
16:10:41 <lambdabot> http://www.pugscode.org/
16:11:17 <Franciman> lol ski it changed a bit
16:11:26 <Franciman> it redirects to https://www.musbed.com/
16:11:36 <ski> probably expired long ago
16:12:16 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
16:13:12 finsternis joins (~X@23.226.237.192)
16:13:24 <ski> <https://web.archive.org/web/20150214140229/http://www.pugscode.org/> is pre-expiry
16:17:21 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
16:17:34 × troojg quits (~troojg@user/troojg) (Ping timeout: 260 seconds)
16:19:22 × billchenchina- quits (~billchenc@103.118.42.229) (Quit: Leaving)
16:19:46 <ggVGc> What's the current state of stack usage? Some years ago I felt a lot of people were moving back to cabal. I haven't been touching my Haskell stuff much the past 3 years, and am still rolling with stack since that's what the project was started with a long time ago.
16:20:09 <ggVGc> But, it seems cabal is the main focus of the general community again by now?
16:20:38 <ggVGc> I guess a more concrete question is, is anyone of you still using stack?
16:21:04 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:24:53 ss4 joins (~wootehfoo@user/wootehfoot)
16:27:14 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 252 seconds)
16:27:39 mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com)
16:34:51 <haskellbridge> <sm> Of course we are. Search recent discourse and Reddit threads and you’ll find some related discussion ggVGc
16:35:50 <haskellbridge> <sm> See also stack’s matrix room
16:38:27 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
16:43:11 × ss4 quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
16:43:20 × driib318 quits (~driib@176.57.184.141) (Quit: The Lounge - https://thelounge.chat)
16:43:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
16:46:15 wootehfoot joins (~wootehfoo@user/wootehfoot)
16:47:34 athan joins (~athan@syn-098-153-145-140.biz.spectrum.com)
16:48:22 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
16:48:43 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
16:48:45 driib318 joins (~driib@vmi931078.contaboserver.net)
16:49:21 <tomsmeding> ggVGc: before, cabal was the "official but it's annoying to use" and stack was the "other thing that is nice". These days both are quite nice. For some people that meant dropping stack and going back to cabal; for others that meant using what they've mostly always used
16:49:32 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
16:50:05 <tomsmeding> the community is large-ish, so "main focus of the community" is generally hard to say
16:50:08 <tomsmeding> both have mindshare
16:50:21 <tomsmeding> but it's not as polarised as it was in the past, and that's a good thing :)
16:50:42 <tomsmeding> sm: I hope I'm not misrepresenting things
16:57:18 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
16:59:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
17:04:49 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
17:10:24 <haskellbridge> <sm> sounds fair tomsmeding!
17:10:43 danza joins (~danza@user/danza)
17:13:10 × mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 260 seconds)
17:13:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
17:14:55 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
17:16:51 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
17:18:17 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
17:19:17 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
17:20:50 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
17:21:38 <monochrom> Main focus of the community is coexistence!
17:24:11 L29Ah joins (~L29Ah@wikipedia/L29Ah)
17:26:33 × danza quits (~danza@user/danza) ()
17:29:01 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
17:29:22 stiell joins (~stiell@gateway/tor-sasl/stiell)
17:31:15 × youthlic quits (~Thunderbi@user/youthlic) (Quit: youthlic)
17:32:26 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:33:30 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
17:33:38 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
17:34:44 L29Ah joins (~L29Ah@wikipedia/L29Ah)
17:39:06 Sgeo joins (~Sgeo@user/sgeo)
17:41:10 misterfish joins (~misterfis@84.53.85.146)
17:44:25 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
17:44:29 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
17:45:58 Digitteknohippie joins (~user@user/digit)
17:46:04 × Digit quits (~user@user/digit) (Ping timeout: 252 seconds)
17:46:05 <geekosaur> last time a survey was done, the community was 50-50. I think we're due for another one soon-ish though?
17:49:09 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
17:53:35 jinsun joins (~jinsun@user/jinsun)
17:54:33 Digitteknohippie is now known as Digit
17:55:33 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:56:59 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:59:08 tuxpaint joins (~a@put.gay)
18:00:12 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
18:03:13 <dmj`> what about all the "runhaskell Setup.hs" people?
18:04:20 geekosaur emphatically doesn't miss that
18:04:38 <tomsmeding> dmj`: my condolences for your time if you do that and want to use any package from hackage that depends on more than boot libs :p
18:04:46 <geekosaur> ^
18:05:08 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
18:05:10 <geekosaur> that's what tooling is for!
18:05:37 tomsmeding came into haskell land recently enough to have had cabal from the get go -- albeit with cabal hell
18:05:49 <tomsmeding> and on arch without knowing about -dynamic, hence nothing worked
18:05:51 <geekosaur> I was pre-cabal
18:05:51 <tomsmeding> :D
18:05:53 <tomsmeding> but boot libs worked
18:06:00 <tomsmeding> so I used boot libs and was happy
18:06:04 <geekosaur> even with cabal hell, cabal was a massive improvement over the status quo
18:06:11 <tomsmeding> I can believe
18:06:22 <tomsmeding> did hackage exist before cabal?
18:06:34 <tomsmeding> sounds like a contradiction, almost
18:06:41 dmj` used to copy around cabal sandboxes and use hsenv
18:06:56 <tomsmeding> what is hsenv?
18:07:10 <dmj`> @package hsenv
18:07:10 <lambdabot> https://hackage.haskell.org/package/hsenv
18:07:26 <tomsmeding> I see
18:07:33 <geekosaur> roughly, virtuualenv for haskell
18:07:46 <geekosaur> I used that a fair bit too BITD
18:08:20 <dmj`> nix solved cabal hell, works well with Setup.hs
18:08:24 <geekosaur> (there was a "virthualenv" too IIRC but hsenv was more popular)
18:08:58 <geekosaur> then came cabal sandboxes and both pretty much disappeared
18:10:38 × monochrom quits (trebla@216.138.220.146) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in)
18:11:22 <Franciman> tomsmeding: who needs anything more than boot libs? /s
18:12:12 <tomsmeding> if you're happy not doing "modern practical" stuff like build a web server, communicate in json, I dunno what, a learner is IMO quite set with just boot libs
18:12:27 <tomsmeding> plenty of learning and interesting things you can build with just that
18:12:30 <tomsmeding> "just" that
18:12:47 <Franciman> i thought you use java for practical stff
18:13:09 <tomsmeding> if you want ordinary mortals to understand it, maybe
18:13:24 rekahsoft joins (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca)
18:13:33 <tomsmeding> java has a good GC and does good OOP; if you need those together, use java
18:13:49 <haskellbridge> <magic_rb> We also have a good gc
18:13:57 <haskellbridge> <magic_rb> So it depends on if you want fp or oop
18:14:03 <tomsmeding> ghc also has a good GC (but not quite as well-tuned as java's -- a matter of an order of magnitude more engineering hours)
18:14:07 × rekahsoft quits (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca) (Remote host closed the connection)
18:14:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
18:14:21 <haskellbridge> <magic_rb> But not much gain for the time put in tbh
18:14:24 <tomsmeding> and indeed, haskell has good FP
18:14:33 rekahsoft joins (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca)
18:14:48 <tomsmeding> maybe not much, but I recall pretty embarrassing stories about GHC's GC
18:14:59 <tomsmeding> especially the parallel GC is often quite awkward
18:15:17 <geekosaur> hasn't that improved of late though?
18:15:25 <haskellbridge> <magic_rb> Since we have a gc which doesnt stop the world, its not nearly as bad tho
18:15:30 <geekosaur> I thought 9.2.x had major improvements
18:15:30 <tomsmeding> now the nonmoving GC exists, of course, but it's not default, and it's a latency-throughput tradeoff with the default GC
18:15:54 <tomsmeding> the nonmoving GC results in lower overall throughput, but gives you a much shorter GC pause (i.e. lower latency)
18:16:08 <tomsmeding> geekosaur: could well be!
18:16:21 <tomsmeding> also to the default parallel GC?
18:16:33 <haskellbridge> <magic_rb> I think we dont stop the world anymore, not sure
18:16:42 <tomsmeding> nonmoving GC still has a pause
18:16:51 <tomsmeding> it's just much shorter, because much of the actual GC work happens concurrently
18:16:53 <tomsmeding> but not everything
18:17:06 <haskellbridge> <magic_rb> Moving pauses too?
18:17:10 <tomsmeding> (I don't know the details)
18:17:27 <geekosaur> https://downloads.haskell.org/ghc/9.2.1/docs/html/users_guide/9.2.1-notes.html#runtime-system
18:17:42 <geekosaur> we still stop the world but it's shorter
18:18:17 <tomsmeding> :o that first paragraph is good
18:18:20 <tomsmeding> my experience is 8.10 era
18:18:44 <geekosaur> yes. llook again, a lot of work went into making parallel GC usable
18:18:49 <tomsmeding> I -qg'd all the things
18:19:01 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
18:19:05 <tomsmeding> (I'm not really using that code any more, but it's good to know for future stuff)
18:20:48 <haskellbridge> <magic_rb> I havent written anything where i would care about performance yet, i should maybe do so before attempting to outperform the vfat driver in linux using haskell and FUSE
18:20:59 <tomsmeding> lol
18:21:03 <tomsmeding> that sounds like a lost game
18:21:13 <tomsmeding> that, or the existing driver is horribly written
18:21:21 <geekosaur> I don't think I've ever written much where performance mattered beyond "is it faster than I could do it with pen and paper? good."
18:21:23 <tomsmeding> FUSE alone
18:21:55 <geekosaur> (outside of commercial contexts of course)
18:22:47 <haskellbridge> <magic_rb> FUSE should be okay ish with iouring
18:23:00 <haskellbridge> <magic_rb> But yeah probably not happening
18:23:14 <haskellbridge> <magic_rb> Still makes for a google title of the thesis lol
18:23:24 <dmj`> tomsmeding: working on a web server right now with lots of libs, runhaskell Setup.hs configure and build work fine, don't have to dig into dist-newstyle either, dist/build/app/app
18:23:54 <tomsmeding> dmj`: oh I forget -- Setup.hs pulls in Cabal, right?
18:24:01 <tomsmeding> I guess that works
18:24:09 <dmj`> Cabal is wired-in
18:24:16 <tomsmeding> right
18:24:30 <haskellbridge> <magic_rb> Weird way if doing things? Why not use cabal itself?
18:24:46 <haskellbridge> <magic_rb> Or rather cabal-install ig
18:24:53 monochrom joins (trebla@216.138.220.146)
18:25:36 <dmj`> nix pulls in an immutable ghc-pkg list, don't need to install anything, just build, most of the config is in the cabal file itself or nix overrides from haskell.lib
18:27:03 <tomsmeding> you do you :)
18:27:16 <dmj`> you can make bash functions inside a shell environment for all the building / documentation / ghcid stuff
18:27:18 <tomsmeding> I can believe that this works more easily with nix somehow
18:27:36 <tomsmeding> but then, that's the problem of the people who want to use nix, not my problem :p
18:27:48 <tomsmeding> (nothing against nix, I just don't use it)
18:28:43 <tuxpaint> I compiled a binary using `ghc main.hs -o main`. the binary takes ~12ms to execute on my system, after timing it with both hyperfine and zsh/time. This was weird to me (longer than i expected), so i recompiled with `ghc main.hs -prof -fprof-auto -o main` to profile. however, executing this binary, it takes an expected 2-3ms. I'm a bit confused what could be causing this? the code and the ghc environment file is all here https://github.com/elee1766/potatoe/tree/mast
18:28:43 <tuxpaint> er/contrib/haskell
18:28:46 <tuxpaint> mann
18:28:47 <tuxpaint> https://github.com/elee1766/potatoe/tree/master/contrib/haskell
18:29:16 <tomsmeding> tuxpaint: what is the output of `./main +RTS -s`
18:30:01 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
18:30:07 <tuxpaint> https://put.gay/files/HZZFrCYV6b.txt
18:30:26 <tomsmeding> is that the profiling or the non-profiling version?
18:30:31 <tuxpaint> profiling
18:30:33 <tomsmeding> and what OS is this?
18:30:42 <tomsmeding> what about the non-profiling version?
18:31:12 <tomsmeding> (trying to determine if the difference is whether GC ran or not)
18:31:28 <monochrom> Perhaps first establish a baseline. Merely "main = pure ()". Measure that first.
18:31:31 <tuxpaint> linux, debian 12, non-profiling https://put.gay/files/YjjCegtEl7XE.txt
18:31:40 <tomsmeding> also that ^
18:32:03 <tomsmeding> ok that's basically identical
18:33:23 <tomsmeding> reproduces here, profiling version of `main = pure ()` takes around 6ms, non-profiling takes around 12ms
18:33:37 <tuxpaint> i get the same behavior on baseline, https://put.gay/files/vllWFpymoiT2.txt
18:33:54 <tuxpaint> 12s nonprofiling, 2.5ms profiling
18:34:00 <tuxpaint> ms*
18:35:24 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
18:36:27 ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207)
18:36:32 <tomsmeding> under strace there's just an additional gap with no syscalls happening in the non-profiling version
18:40:43 <monochrom> Hypothesis: The profiling RTS simply has different timer/alarm settings from the normal RTS.
18:41:26 <tomsmeding> monochrom: what timer would it be waiting for?
18:42:52 <monochrom> If you don't use the threaded RTS, then the non-threaded RTS has to set up its own regular alarm for DIY time slicing, just in case you use forkIO or par.
18:43:35 <monochrom> OK OK it's a hypothesis, I confess I don't know what I'm talking about :)
18:44:25 <monochrom> Or rather, I haven't answered the question, and I don't know how to.
18:45:08 × foul_owl quits (~kerry@185.219.141.160) (Ping timeout: 255 seconds)
18:45:15 <monochrom> This is interesting. Next time someone find startup time to be too long, we can suggest "turn on profiling" >:)
18:45:43 <monochrom> Actually someone on haskell-cafe asked about that a while ago.
18:45:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
18:47:13 <monochrom> This: https://mail.haskell.org/pipermail/haskell-cafe/2024-August/136863.html
18:47:25 <tomsmeding> for the record, -threaded doesn't make a difference for me, both in the default and in the profiling case :p
18:47:34 <tuxpaint> yeah i'm basically comparing the startup time of a few different languages. it was odd that haskell is much worse than other compiled counterparts, but i guess somehow -prof changes something
18:47:42 <tuxpaint> -threaded made no difference for me either, yeah
18:49:08 × ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 245 seconds)
18:50:01 <tomsmeding> profiling this (with perf) is difficult because there's not much there :p
18:50:05 <monochrom> This is strange. But you look at "user" and "sys" and you see that the wallclock time just means the process is sleeping most of the time. Yeah what is it waiting for?
18:51:07 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
18:51:18 <tomsmeding> ~all of the time in perf(1) report output point to the kernel for me
18:51:27 <tomsmeding> (for the record: ghc -O also doesn't help >:D)
18:51:35 <tomsmeding> (I hadn't expected it to)
18:52:55 srcd joins (~srcd@93-140-131-235.adsl.net.t-com.hr)
18:53:56 × srcd quits (~srcd@93-140-131-235.adsl.net.t-com.hr) (Client Quit)
18:54:39 <tomsmeding> okay perf(1) is pointless here, it gets way too few samples
18:55:21 <tomsmeding> it's like, 70% of your time is in this kernel function. Okay, so where? Well, 100% of the time in this kernel function is in this instruction: push %rbx
18:55:23 <tomsmeding> yeah right
18:55:26 <tomsmeding> that's 1 sample
18:57:32 mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com)
18:58:51 <tomsmeding> okay with `perf record -F max` (higher sample frequency), I reliably get that about 23% of the time is spent in a kernel function called clear_page_erms
18:59:20 <tomsmeding> and that function fills a 4KiB page with zeros
19:00:02 × caconym quits (~caconym@user/caconym) (Quit: bye)
19:00:41 caconym joins (~caconym@user/caconym)
19:01:37 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
19:02:14 <tomsmeding> (the function is literally 5 instructions long: `endbr64` (control flow protection magic), `%ecx := 4096`, `%eax := 0`, `rep stos` which does essentially memset, `ret`)
19:03:24 <tomsmeding> but perf doesn't see much difference between the default and the profiling version
19:03:54 <tomsmeding> ok I dunno, someone with knowledge about the RTS and the ability to print debug info from it (with timestamps) should investigate this, not me
19:04:32 <dolio> Should they, though?
19:04:53 <tomsmeding> startup time is a valid thing to optimise for
19:05:01 <tomsmeding> it's likely not top priority, and it shouldn't be
19:05:31 <tomsmeding> 12ms is a fairly long time
19:07:12 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
19:07:29 <geekosaur> there is ongoing work on optimizing startup time, actually
19:07:32 <tuxpaint> 12ms puts it at the same speed as the perl/python scripts that do the same thing, which feels a little wrong.
19:07:44 <geekosaur> they already did a lot of qwork on shutdown time, which was kinda horrendous
19:07:56 <geekosaur> so now they've moved on to startup
19:08:01 <tuxpaint> regardless if it's correct to care about startup time, many people do, so maybe that is a good enough reason
19:08:06 <tomsmeding> tuxpaint: but when a haskell program is going, it's quite a bit faster than python ;)
19:08:31 <geekosaur> overhead can still eat your lunch though…
19:14:56 <monochrom> Ugh the joke is on me. I lost an old exe that uses regex-base etc, now I have to recompile it again.
19:15:10 <geekosaur> heh
19:15:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
19:16:39 rvalue- joins (~rvalue@user/rvalue)
19:17:10 × briandaed quits (~root@185.234.210.211.r.toneticgroup.pl) (Remote host closed the connection)
19:17:49 × rvalue quits (~rvalue@user/rvalue) (Ping timeout: 260 seconds)
19:19:11 × rekahsoft quits (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca) (Remote host closed the connection)
19:20:23 rekahsoft joins (~rekahsoft@76.69.85.220)
19:20:33 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
19:20:42 <tuxpaint> monochrom: your hypothesis is somewhat confirmed i think. compiling with `rtsflags` and using `-V0.001` gets me the same startup time as -prof https://downloads.haskell.org/ghc/latest/docs/users_guide/profiling.html#rts-flag--V%20%E2%9F%A8secs%E2%9F%A9
19:22:33 <tuxpaint> so i can compile with `-with-rtsopts="-V0.001"` and now it's the same. if i do `-V0.00001` it starts up even faster
19:23:29 × connrs quits (~connrs@user/connrs) (Ping timeout: 248 seconds)
19:24:50 rvalue- is now known as rvalue
19:26:49 <tuxpaint> i guess my program doesn't use any timers, so the fastest option would be to use `-V0` and disable the RTS clock?
19:28:09 <tomsmeding> > The default is 0.001 seconds when profiling, and 0.01 otherwise.
19:28:11 <tomsmeding> ooh
19:28:43 connrs joins (~connrs@user/connrs)
19:29:50 <tomsmeding> tuxpaint: is this startup-time benchmark just curiosity, or do you have a real usecase for 1. wanting to use a high-level language like haskell, and 2. needing fast startup time?
19:30:01 <tuxpaint> interestingly, if i set it to a 8ms clock, runtime is 10ms. if i set it to 15ms clock, runtime is 17ms, up to 20ms, where anything there and above gives me ~22ms
19:30:41 <tuxpaint> 12ms startup time in a cli is perceivable to a user. i'm exploring languages to write clis in.
19:31:03 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
19:31:27 <tuxpaint> so i've been going through seeing how the basic experience of reading flags and files is, along with writing to stdout.
19:31:40 <tomsmeding> rust is a good candidate if you like haskell, otherwise (but I don't know anything about startup time here, so YMMV) ocaml
19:32:11 <tuxpaint> yeah, so far i have perl, python, c, go, nim, rust, haskell, c# done
19:32:35 <tuxpaint> ocaml sounds fun, i may give it a try
19:33:36 <tomsmeding> strict functional language, funny syntax sometimes (especially data type declarations), somewhat fewer fancy type system features than haskell, first-class mutability
19:35:49 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
19:35:51 <tomsmeding> tuxpaint: one thing that you may or may not be taking into account with perl and python is that they are interpreted, hence if you import a bunch of libraries, your startup time is going to suffer significantly
19:36:06 <tuxpaint> i am, which is why it was very confusing that haskell was starting up in the same amount of time
19:36:20 <tomsmeding> same would hold for nodejs
19:36:27 <tuxpaint> of course there's a balance between the user experience in how easy it is for me to write the cli (more features), and how fast it executes
19:36:49 <tuxpaint> haskell is fun; it was my first language when learning to code many years ago. the IO monad was very nice to work with - didn't have a chance to do IO when i first touched haskell.
19:39:00 <tomsmeding> case in point: I also got 12ms for the `main = pure ()` with default settings on my machine, but starting a full blown web server and immediately exiting with `exitSuccess` if there are no command line arguments (to ensure that nothing can be optimised away) takes 15ms
19:39:07 <tuxpaint> i'm looking around for 20ms in the code. maybe it has something to do with the rescheduling timer?
19:40:09 <tomsmeding> s
19:40:12 <tomsmeding> oops
19:41:05 <tuxpaint> yeah. if i set V=100ms, and i=5ms, i get 7ms
19:41:25 <tuxpaint> so it seems it waits for either the first tick of the reschedule timer, or the clock timer or something?
19:42:01 <tuxpaint> huh, but if i set both above 20ms, it then caps at 22ms runtime again
19:42:46 <tomsmeding> it seems the time is spent in shutdown, not in startup
19:43:35 <tomsmeding> with `main = putStrLn "hi"`, and looking at strace output with nanosecond timestamps attached, a whole bunch of stuff happens, then the write, then 8ms of nothing, then a few more syscalls and exit
19:43:52 × synchromesh quits (~john@2406:5a00:241a:5600:5db8:4c32:8611:a0fa) (Read error: Connection reset by peer)
19:44:24 <EvanR> I have no noticed any startup time in haskell
19:44:28 <tomsmeding> and the first thing after the wait is a futex wait
19:44:47 <tomsmeding> EvanR: `echo 'main = pure ()' >pure.hs; ghc pure.hs -o pure; time ./pure`
19:44:54 <tomsmeding> repeat that last command ~10 times
19:44:58 <tomsmeding> how long does that take?
19:45:11 synchromesh joins (~john@2406:5a00:241a:5600:5db8:4c32:8611:a0fa)
19:45:27 <tuxpaint> hmm. so it's waiting to exit or something? i noticed it was "slow" initially because of the time it spent to return me back to interactive
19:46:20 <EvanR> it says real = 0.012s or 0.013s but when you press enter on ./pure, I am back to the prompt instantly
19:46:33 <EvanR> without the time command
19:46:45 <tomsmeding> how instant is "instantly" :P
19:47:07 <dolio> Sufficiently instantly for like 99.999% of use cases.
19:47:11 <tomsmeding> that is true
19:47:24 <EvanR> imperceptibly different from the equivalent C program
19:47:57 <tomsmeding> in bash, I do notice a difference between 'echo hi' and './pure'
19:48:20 <tomsmeding> I notice it less in fish, apparently fish prompt drawing takes time too :')
19:48:34 <EvanR> I'll try xterm
19:48:35 <tuxpaint> i notice a difference in my zsh between ./pure and ./pureinc
19:48:43 <EvanR> the best term
19:48:45 <tuxpaint> terminal=st
19:49:21 <EvanR> in xterm there is noticable delay in haskell and C :(
19:49:56 <EvanR> probably because I have to tricked out with fancy font
19:49:59 <EvanR> it
19:50:03 <tomsmeding> tuxpaint: https://paste.tomsmeding.com/2YnbokDI
19:50:27 <EvanR> lol
19:50:28 <tomsmeding> definitely in shutdown :D
19:50:35 <tomsmeding> well there's still a few ms left
19:50:40 <EvanR> 0.012 and 0.013 is less than the monitor refresh rate xD
19:50:49 <dolio> Yeah.
19:50:52 <tomsmeding> oh hey
19:50:55 <tomsmeding> I have no compositor
19:50:58 <tomsmeding> maybe that makes a difference
19:51:02 <tuxpaint> i can feel the difference as well in xterm - 12ms vs 3ms is perceivable for sure for many users. i can't notice much between the 3ms with -V0.0001 and 1.1ms in c
19:51:06 <tuxpaint> i have no compositor
19:51:31 <tomsmeding> (I'm in st too)
19:51:36 <tomsmeding> (but in tmux)
19:51:43 <EvanR> yes some users can see the results of their keystrokes before they show up on the monitor
19:51:45 <tuxpaint> i am in tmux as well. twinning!
19:52:11 <tomsmeding> :D (though st being st, it's likely there is some tmux-like thing involved)
19:52:36 <EvanR> these are some serious super users
19:52:54 <tuxpaint> you also have your own paste! mine is in go, not haskell though
19:53:20 <tomsmeding> 3 out of 5 of the links in the /topic are hosted by me :p
19:53:26 <tomsmeding> (ircbrowse is not written by me, just hosted)
19:54:27 <tomsmeding> monochrom: I think you would also enjoy this https://paste.tomsmeding.com/2YnbokDI
19:54:47 <monochrom> Yeah I saw. Haha.
19:56:11 <tuxpaint> this is calling libc yes?
19:56:21 <tomsmeding> yes, this is calling exit(3) via the C FFI
19:56:36 × mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 272 seconds)
19:57:11 <tuxpaint> curious - is it possible at all to do syscalls in haskell without libc?
19:58:19 <tomsmeding> without libc, yes, without C, no, I think
19:58:40 <tomsmeding> as in, you can FFI to a function written in C, and in C you can do syscalls without needing libc
19:58:43 × euphores quits (~SASL_euph@user/euphores) (Ping timeout: 245 seconds)
19:58:50 <tomsmeding> but haskell does not have some kind of inline assembly
20:00:23 zero is now known as zzz
20:02:18 <geekosaur> not reliably without libc
20:02:38 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
20:03:00 <geekosaur> the kernel's interface with glibc changes constantly. alternative libcs like musl need to keep up, and if something changed that they don't know about your program will crash
20:03:01 <EvanR> ghc generates its own code right
20:03:04 <tuxpaint> got it, makes sense
20:03:13 <EvanR> or experts llvm
20:03:14 <tomsmeding> geekosaur: surely that's false on linux?
20:03:24 <geekosaur> no, it is especially true on linux
20:03:31 <tomsmeding> wasn't Linus' mantra "don't break userspace"?
20:03:36 <tuxpaint> i am coming from golang world, where syscalls are implemented without any C. I know it is rather unique to go.
20:03:46 <geekosaur> yes, he did it by making a contract with the glibc maintainers
20:03:48 <tomsmeding> I know on macos the syscall interface is unstable
20:03:56 <tomsmeding> TIL
20:04:06 <EvanR> sounds like golang likes job security
20:04:20 <geekosaur> and glibc has massive amounts of code to look up and adapt to specific kernel versions' ABIs
20:04:20 <EvanR> constantly following changes in linux
20:04:27 <tomsmeding> I mean, exit(2) probably isn't going anywhere
20:04:37 <geekosaur> it did, actually
20:05:48 <geekosaur> In glibc up to version 2.3, the _exit() wrapper function invoked the kernel system call of the same name. Since
20:05:49 <geekosaur> glibc 2.3, the wrapper function invokes exit_group(2), in order to terminate all of the threads in a process.
20:05:49 <geekosaur> (The raw _exit() system call terminates only the calling thread.)
20:06:30 euphores joins (~SASL_euph@user/euphores)
20:06:38 <tomsmeding> tuxpaint: seems those 6ms and 15ms numbers were including some shell overhead. I installed hyperfine, and `hyperfine -N ./pure` (i.e. not going via the shell) yields 13.8ms without exit(3), and 0.93ms with exit(3)
20:06:42 <geekosaur> (this is not according to POSIX, iirc, threads are associated with a process and _exit() kills the entire process. thanks the old LinuxThreads disaster for this)
20:06:47 <tomsmeding> seems almost _all_ of the time is spent in shutdown
20:06:59 <tuxpaint> yeah, i'm getting 1.1ms with exit() with hyperfine -N
20:07:22 × lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 272 seconds)
20:07:27 <tomsmeding> that seems within cpu speed variation
20:07:32 <tomsmeding> geekosaur: TIL
20:07:36 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
20:07:46 <monochrom> If you s/ccall "exit"/capi "stdlib.h exit"/ it will be more portable over various platforms that may make "exit()" a function or a macro or a syscall or anything.
20:08:02 <tomsmeding> monochrom: I know
20:08:02 troojg joins (~troojg@user/troojg)
20:08:03 <geekosaur> ^
20:08:05 <monochrom> (The price is of course the compile time is longer.)
20:08:07 <tuxpaint> EvanR: its somewhat required as part of design, since having non-go code, or linking to libc would remove the "fast compilation speed and compile everything from scratch" feature.
20:08:11 <monochrom> OK heh :)
20:08:22 <tuxpaint> and yeah, it's google. they probably need more jobs for the employees they already have :)
20:09:00 <geekosaur> no, they just want absolute speed and went the accursedUnutterablePerformIO route
20:09:39 <tomsmeding> ah good, capi vs ccall import doesn't make a difference in timing
20:09:41 <geekosaur> so they can't update a kernel without auditing the kernel/libc interface and updating their go libs, or they get random crashes
20:09:58 × athan quits (~athan@syn-098-153-145-140.biz.spectrum.com) (Quit: Konversation terminated!)
20:10:12 <EvanR> move fast break things
20:10:21 <tomsmeding> tuxpaint: seems we have a workaround? :p
20:10:25 <tuxpaint> yep!
20:10:33 <tuxpaint> if you do syscalls through libc you have to do calls which fuck with the go scheduler.
20:10:37 <tomsmeding> use the capi style though, for the reasons monochrom mentioned
20:11:03 <geekosaur> (more likely they watch the commits list very closely so they have the necessary library changes by the time it's released)
20:11:24 <tuxpaint> it's not about absolute speed, it locks up the runtime and would make the language unusable
20:11:37 <tomsmeding> https://paste.tomsmeding.com/WzVl8hRp
20:11:50 <tomsmeding> note that buffers are not flushed by the RTS upon exit(3)
20:13:18 <tomsmeding> tuxpaint: that sounds weird to me; libc surely doesn't lock up the runtime any more than a system call does. The only reason would be that libc has overhead -- which I can accept -- but that would still just be "doing syscalls directly is faster".
20:13:41 <tuxpaint> it becomes a task that is uninterruptable by the go runtime, since the syscall is happening outside of the runtime, it has to make the most conservative assumptions possible
20:13:49 <tomsmeding> libc is just C code, which is just additional work that happens before and after the syscall -- which itself is just work that happens on a different privilege level
20:14:01 <geekosaur> blocking syscalls would be a problem, imagine that a go syscall is Haskell's `unsafe`
20:14:05 <tomsmeding> but a syscall is also uninterruptible
20:14:36 <tomsmeding> well, some are, but then the libc call would also be
20:14:49 <tomsmeding> (surely?)
20:15:18 <geekosaur> right, but you're not supposed to do either, you use the go function which offloads the call (similarly to Haskell's `safe`) so it doesn't block the scheduler
20:15:36 <tomsmeding> of course, but we're talking about how said go function is implemented
20:16:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
20:16:23 <tomsmeding> eventually there is some code in go's stdlib or RTS that does the actual syscall, be it directly or through libc
20:16:27 <geekosaur> right, I assume it offloads the actual call to a thread that isn't part of the scheduler so it can safely block
20:16:44 <geekosaur> similarly to what ghc's RTS does with `safe` calls
20:16:58 <tomsmeding> I dunno, maybe. But if so, then what's the difference (to go) between a syscall and a libc function that wraps that syscall?
20:17:11 <tomsmeding> (apart from the latter possibly being a little slower)
20:17:31 <geekosaur> speed. did you notice earlier when I mentioned the extra code to check kernel ABI versions?
20:17:50 <tomsmeding> sure, but tuxpaint is claiming that there is more than just speed
20:17:57 <geekosaur> I assume go's stdlib is wired to a particular kernel ABI and doesn't need the runtime checks
20:18:21 <tuxpaint> in go there is gomaxprocs, so each blocking thread takes a slot from gomaxprocs. say you have 20 slots, a cgo call will take one of those 20 slots when invoked, and cannot unblock the worker.
20:19:00 <geekosaur> other things that come up are C-style global constructors/destructors and things that look like syscalls but aren't directly and may use services like malloc which could well fail with the go runtime because the C runtime isn't initialized
20:19:11 <tuxpaint> while the pure-go syscall, they can unblock the worker and do something else while the syscall is waiting
20:19:26 <tuxpaint> and it doesn't take up when waiting, one of your gomaxprocs slots
20:19:31 <tomsmeding> tuxpaint: if you perform a syscall, your thread is blocked
20:19:39 <geekosaur> (ghc ensures the C RTS is set up, but go's pure-go approach means it probably isn't and going through libc will therefore be dangerous)
20:19:45 <tomsmeding> so something is contradictory here
20:19:51 <tuxpaint> the runtime does not see that thread as a thread that is "working"
20:19:58 <geekosaur> right
20:20:03 <geekosaur> like ghc's IO manager threads
20:20:12 <tomsmeding> ... okay, but the thread is still blocked and can't do anything else
20:20:26 <geekosaur> the IO manager manages them separately from standard threads
20:20:39 <tomsmeding> fine, but you still have a thread less for "normal" go code!
20:20:55 <geekosaur> no? it fires off completely separate threads for that
20:20:55 <tuxpaint> you can launch another thread and do work, you are not frozen
20:21:01 <tomsmeding> it's not like that `syscall` instruction can magically go off and run asynchronously
20:21:02 <tuxpaint> gomaxprocs does not determine the max amount of system threads
20:21:23 <tomsmeding> okay, but if you're willing to start another thread for that syscall, why not run the libc call in that new thread too?
20:21:30 <tomsmeding> I still don't see what the difference is
20:21:36 <geekosaur> you still don't have loibc initialized
20:21:46 <tuxpaint> yes, you can set gomaxprocs to a very high number, and do one thread per syscall
20:21:52 <tomsmeding> that's just `start()` at the start of the go _process_
20:21:53 <geekosaur> libc *has a runtime*. go does not initialize that runtume
20:21:54 <tuxpaint> it makes it faster, but it's still very very slow
20:21:56 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
20:22:00 <geekosaur> libc calls can therefore crash
20:22:19 <tuxpaint> as in, unusably slow for many disk operations (think database)
20:22:47 <tomsmeding> tuxpaint: why could the runtime not spawn up a new system thread, that is _not_ registered as a go worker, to run the libc call in?
20:22:57 <geekosaur> (glibc's RTS startup actually does quite a lot, if you strace a program you'll see a _lot_ of activity before main() is called)
20:23:07 <tomsmeding> this libc call is written by go developers in the go standard library, it's not a random go programmer that goes through the cgo interface
20:23:31 <tomsmeding> and anyway, freeing up a worker is lying to yourself, because the time that you spend in kernel mode is also cpu time
20:23:32 <tuxpaint> well now you are calling libc right?
20:23:33 <geekosaur> …right, never mind
20:23:40 <tuxpaint> so you either need to link it, or rebuild it every time
20:23:47 <tomsmeding> geekosaur: right, but you just do that once, right?
20:23:49 <tuxpaint> which defeats the goal of having portable static binaries, and very fast build times
20:24:01 <tuxpaint> for such static binaries
20:24:10 <geekosaur> tomsmeding, in the go world you do _not_ call it. at all.
20:24:12 <tomsmeding> tuxpaint: is that linking/rebuilding/static binaries reason the only reason to not want to link libc?
20:24:22 <tuxpaint> imo yes. and it's a major language feature of go
20:24:24 <tomsmeding> because previously you were claiming, repeatedly, that there is a real runtime cost
20:24:29 <geekosaur> that's the whole point of this, libc is replaced by go's RTS
20:24:35 <tomsmeding> _apart_ from initialisation at the start of the process
20:24:53 <tuxpaint> there is no libc at all, that is one of the goals
20:25:04 <tomsmeding> and I have been trying to reason that there is no such cost, apart from libc being somewhat slower, which is what geekosaur has been saying all the time already
20:25:06 <geekosaur> and I told you part of what that runtime cost was
20:25:17 <geekosaur> but I'm bailing since I'm apparently talking to a wall
20:25:17 <tuxpaint> and its to have the fast compile times, and to compile the entire project from source every compile
20:25:18 <tomsmeding> as far as I understand, the gomaxprocs story is all irrelevant
20:25:26 <tomsmeding> I get that!
20:25:49 <tomsmeding> I get that 1. linking with libc means that the compiler has to do more, and that 2. going via libc takes longer than just doing the syscall, and 3. initialising libc takes time
20:25:50 <geekosaur> libc does extra runtime checks, it randomly wraps syscalls with extra goop that updates libc internal data, etc,
20:25:58 <tomsmeding> but you were saying that there's _more_ and I still haven't gotten clear what that is :p
20:26:13 <tomsmeding> I fucking KNOW, you two :')
20:26:27 <tomsmeding> sorry for the outburst
20:26:32 <tuxpaint> the only way to use libc in go is through CGO, it's treated as any other c library
20:26:40 <tuxpaint> there's no special things to handle libc safely, if that is what you are asking?
20:26:50 <tomsmeding> that is exactly what I'm asking
20:26:56 <tuxpaint> i guess you could make your own special wrappers with safety guarantees around each libc, yes
20:27:03 <tuxpaint> i think the go team felt that was just as much effort as doing it themselves
20:27:14 <tomsmeding> and I claim that these (hypothetical) libc calls are written by go developers in the go stdlib, so there's no good reason to have to go through all the usual hoops
20:27:33 <tomsmeding> libc calls can crash, but syscalls also can
20:27:39 <geekosaur> now you're in a quasi-philosophical argument with the go devs
20:27:43 <tuxpaint> yeah, there's no special handling of libc
20:27:50 <geekosaur> and, well, this is part of why I dont like or use go
20:27:59 <tomsmeding> tuxpaint: thank you, that answers my question :p
20:28:10 <tomsmeding> (something got lost in communication here, somewhere)
20:28:12 <tuxpaint> whether you should implement the syscalls with pure go, or handle libc specially, idk which is better
20:28:28 <geekosaur> google apparently thinks it's a good thing; I have not heard any statistics to back them up, but I;m sure they have them (but how true are they? lies, damned lies, and…)
20:28:30 <tuxpaint> but they're paying for it and it works.
20:29:11 <tomsmeding> right, direct syscalls vs libc handling is a game of tradeoffs: needing to track linux syscall ABI vs a little overhead
20:29:18 <tuxpaint> personally, as the developer i don't really care. if they changed how it worked one day i wouldn't really bat an eye.
20:29:30 <geekosaur> (and, of course, sunk cost fallacy such that if they turned out to be false, they think turning back would be too much work)
20:30:04 <tuxpaint> which is one of the ideas of go - don't worry too much about implementation, just write go code and let the language implementation people make the go code faster for you as the language evolves
20:30:39 <tomsmeding> (isn't that the idea of every language :p)
20:30:46 <monochrom> I will do quasi-politics instead. They say it's for speed, but I say it's for politics. If you go through any C lib, you confess that C is still native. Well Go wants to replace C and be called the new native, of course it can't go through a C lib for posture.
20:31:19 <geekosaur> I think not, I really do think they need to do this for speed
20:31:24 <tuxpaint> tomsmeding: you would think? but thinking about how many ways there are to do x in rust/c makes me think not
20:31:30 <geekosaur> which is why I compared it to accursedUnutterablePerformIO
20:31:54 <monochrom> Now imagine 10 years from now we Haskellers have to write "foreign import goapi" instead haha.
20:32:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
20:32:14 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:32:43 <monochrom> (Fortunately it didn't happen during the last 10 years, so by "induction" we're safe.)
20:32:46 <tomsmeding> tuxpaint: maybe, yes
20:32:59 <tuxpaint> dont worry. go can barely even do that within go. the plugin system requires everything to be compiled with the exact same compiler version, and it's awful
20:33:16 <tuxpaint> there is 0 stability guarantee for any go internals between versions.
20:33:41 <tuxpaint> that is all "implementation", developers are "not supposed to rely on it"
20:35:46 <tuxpaint> typical plugins systems are either grpc or wasm. and because of the cgo overhead, it's very common to compile code -> wasm, then use a pure-go wasm runtime.
20:36:45 <tuxpaint> even plugins written in go, many of them are written in go, then compiled via tinygo to wasm, then run via like wazero in go. since zero compatiblity between go versions.
20:37:24 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
20:43:54 × tcard_ quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving)
20:47:17 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:47:48 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
20:50:45 tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
20:51:55 <EvanR> more job security xD
20:52:37 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
21:03:24 × misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 260 seconds)
21:03:36 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
21:08:35 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
21:17:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
21:17:29 mikess joins (~mikess@user/mikess)
21:20:01 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:22:36 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
21:27:59 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
21:30:46 athan joins (~athan@syn-098-153-145-140.biz.spectrum.com)
21:33:02 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
21:39:22 × athan quits (~athan@syn-098-153-145-140.biz.spectrum.com) (Quit: Konversation terminated!)
21:43:46 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
21:46:26 pavonia joins (~user@user/siracusa)
21:47:15 aljazmc joins (~aljazmc@user/aljazmc)
21:48:54 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
21:51:20 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
21:57:46 × aljazmc quits (~aljazmc@user/aljazmc) (Quit: Leaving)
21:59:34 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
22:04:34 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
22:08:18 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
22:09:42 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:15:21 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
22:21:24 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
22:22:17 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:23:23 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds)
22:24:55 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Client Quit)
22:25:22 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:26:26 mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com)
22:30:17 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:33:41 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
22:34:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
22:34:09 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:34:16 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Remote host closed the connection)
22:34:44 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:37:05 × ThePenguin7 quits (~ThePengui@cust-95-80-24-166.csbnet.se) (Ping timeout: 248 seconds)
22:38:08 ThePenguin7 joins (~ThePengui@cust-95-80-24-166.csbnet.se)
22:38:35 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Client Quit)
22:39:02 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
22:41:30 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:46:20 emmanuelux joins (~emmanuelu@user/emmanuelux)
22:48:05 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
22:48:39 × Squared quits (~Square@user/square) (Ping timeout: 246 seconds)
22:48:59 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
22:49:49 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
22:54:36 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
23:01:14 × ridcully quits (~ridcully@p57b528bc.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:03:28 × mikess quits (~mikess@user/mikess) (Quit: mikess)
23:03:42 × troojg quits (~troojg@user/troojg) (Ping timeout: 246 seconds)
23:05:36 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
23:07:55 × mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 264 seconds)
23:09:14 athan joins (~athan@syn-098-153-145-140.biz.spectrum.com)
23:10:23 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
23:17:09 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
23:19:03 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
23:19:15 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
23:24:00 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
23:32:07 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:35:02 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
23:39:53 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
23:45:14 ridcully joins (~ridcully@pd951fe51.dip0.t-ipconnect.de)
23:50:51 merijn joins (~merijn@204-220-045-062.dynamic.caiway.nl)
23:51:08 × identity quits (~ZharMeny@user/ZharMeny) (Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4))
23:55:30 × merijn quits (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
23:58:42 × todi_away quits (~todi@p57803331.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)

All times are in UTC on 2024-09-21.