2022/10/17

2022-10-17 00:01:12 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 00:01:53 +0200elbear(~lucian@188.24.138.239)
2022-10-17 00:05:39 +0200dimsuz_(~dima@185.17.128.51)
2022-10-17 00:06:13 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 250 seconds)
2022-10-17 00:06:23 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
2022-10-17 00:06:24 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-17 00:08:32 +0200 <dimsuz_> hi! I'm learning optics and successfuly use `record ^. someMaybe` to get `Just Someting`. But what if I want to get Bool which would be True if `someMaybe` is Just? I suspect I need to `map`, but can't find the required operator.
2022-10-17 00:09:49 +0200 <Axman6> % :t has
2022-10-17 00:09:49 +0200 <yahb2> <interactive>:1:1: error: Variable not in scope: has
2022-10-17 00:09:54 +0200 <Axman6> @hoogle has
2022-10-17 00:09:54 +0200 <lambdabot> Control.Lens.Combinators has :: Getting Any s a -> s -> Bool
2022-10-17 00:09:55 +0200 <lambdabot> Control.Lens.Fold has :: Getting Any s a -> s -> Bool
2022-10-17 00:09:55 +0200 <lambdabot> Network.AWS.Lens has :: () => Getting Any s a -> s -> Bool
2022-10-17 00:10:26 +0200 <Axman6> dimsuz_: the last one - it returns trye of the optic returns any values from s
2022-10-17 00:10:38 +0200 <Axman6> % import Control.Lens.Combinators
2022-10-17 00:10:38 +0200 <yahb2> <no location info>: error: ; Could not find module ‘Control.Lens.Combinators’ ; It is not a module in the current program, or in any known package.
2022-10-17 00:10:42 +0200 <Axman6> :(
2022-10-17 00:10:45 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 00:11:01 +0200 <geekosaur> yeh, no lens in yahb2
2022-10-17 00:11:07 +0200 <geekosaur> :t has
2022-10-17 00:11:08 +0200 <lambdabot> Getting Any s a -> s -> Bool
2022-10-17 00:12:29 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 00:13:31 +0200 <EvanR> is Any in that type GHC Any or something else
2022-10-17 00:14:21 +0200 <geekosaur> :k Any
2022-10-17 00:14:22 +0200 <lambdabot> *
2022-10-17 00:14:38 +0200 <geekosaur> I think it's a lens thing
2022-10-17 00:15:29 +0200 <dimsuz_> hm, will it somehow automatically apply it to Maybe (which is at the focus)?
2022-10-17 00:15:45 +0200 <geekosaur> hm, no, I don't see Any in the index
2022-10-17 00:15:54 +0200 <geekosaur> so maybe it's GHC's Any (which is magical)
2022-10-17 00:16:38 +0200 <geekosaur> :t has (Just 1)
2022-10-17 00:16:40 +0200 <lambdabot> error:
2022-10-17 00:16:40 +0200 <lambdabot> • Couldn't match type ‘Maybe a1’
2022-10-17 00:16:40 +0200 <lambdabot> with ‘(a0 -> Const Any a0) -> s -> Const Any s’
2022-10-17 00:16:56 +0200 <geekosaur> right, can't just poke a lens like that
2022-10-17 00:17:07 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-10-17 00:17:16 +0200 <c_wraith> it's Any from Data.Monoid
2022-10-17 00:17:21 +0200 <EvanR> ah
2022-10-17 00:17:23 +0200 <dimsuz_> ah, looks like I should use it like this: `has _Just`
2022-10-17 00:18:43 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 00:19:01 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 00:20:03 +0200jargon(~jargon@184.101.208.112) (Remote host closed the connection)
2022-10-17 00:20:44 +0200jargon(~jargon@184.101.208.112)
2022-10-17 00:23:15 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 00:24:36 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 00:25:47 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-17 00:31:35 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 00:35:26 +0200dimsuz_(~dima@185.17.128.51) (Quit: leaving)
2022-10-17 00:35:49 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 00:36:07 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 00:36:24 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
2022-10-17 00:40:18 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 00:44:03 +0200michalz(~michalz@185.246.207.203) (Remote host closed the connection)
2022-10-17 00:48:08 +0200 <jackdk> That `Any` will be the monoid
2022-10-17 00:49:22 +0200 <ski> @index Any
2022-10-17 00:49:22 +0200 <lambdabot> GHC.Exts, Data.Monoid, GHC.Prim
2022-10-17 00:51:21 +0200 <dminuoso> Is there a convenient way to construct a Text directly using a ByteString buffer?
2022-10-17 00:51:35 +0200 <dminuoso> Internally Text relies on a ByteArray#, while ByteString has just an Addr#
2022-10-17 00:51:39 +0200 <jackdk> `has :: Getting Any s a -> s -> Bool` ~ `((a -> Const Any a) -> s -> Const Any s) -> s -> Bool`. So wherever the provided optic targets a value, it will pass in `Any True`, using `foldMapOf`.
2022-10-17 00:52:33 +0200 <Axman6> dminuoso: I feel there must be a way to go between those somehow - time for some GHC.* spelunking
2022-10-17 00:53:43 +0200 <dminuoso> Im pondering unsafeCoere# here.
2022-10-17 00:56:48 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-10-17 00:57:15 +0200mmhat(~mmh@p200300f1c73377b2ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-10-17 00:57:52 +0200 <dminuoso> let BS.PS (ForeignPtr fp con) off len = "foobar" in T.Text (T.Array (unsafeCoerce# fp)) 6 6
2022-10-17 00:57:56 +0200 <dminuoso> Mmm does appear to workj
2022-10-17 00:58:03 +0200 <Axman6> ... today
2022-10-17 00:58:07 +0200 <Axman6> :P
2022-10-17 00:58:42 +0200 <dminuoso> I just dont like senselessly going through an UTF8 decoding routine, when I already have an invariant established.
2022-10-17 00:58:45 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 00:58:54 +0200 <dminuoso> And copying the buffer is just a waste of CPU cycles too
2022-10-17 00:59:10 +0200 <dminuoso> (Given that not copying it, gives the caller the option to explicitly BS.copy or not)
2022-10-17 00:59:13 +0200 <Axman6> I thought it was just a validation these days and somehow was zero copy
2022-10-17 01:00:19 +0200 <dminuoso> Axman6: Nope, they go through ShortByteString via toShortIO, which induces a copy
2022-10-17 01:00:27 +0200 <dminuoso> https://hackage.haskell.org/package/text-2.0.1/docs/src/Data.Text.Encoding.html#decodeUtf8With
2022-10-17 01:00:32 +0200 <dminuoso> tps://hackage.haskell.org/package/bytestring-0.11.3.1/docs/src/Data.ByteString.Short.Internal.html#toShort
2022-10-17 01:00:36 +0200 <dminuoso> https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/src/Data.ByteString.Short.Internal.ht…
2022-10-17 01:01:20 +0200 <EvanR> rust quietly chuckling in the corner, with its string simply having been a utf8 array from the start
2022-10-17 01:02:16 +0200 <EvanR> and crashing if you try to dereference a pointer into the middle of a character
2022-10-17 01:02:18 +0200 <dminuoso> Heh yeah Im building various primitives into flatparse to make parsing directly into Text viable.
2022-10-17 01:03:17 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 252 seconds)
2022-10-17 01:03:22 +0200 <Axman6> I assume the copy is done to avoid holding onto a large bytestring if the text is just a slice out of it - wouuld be nice to have a non-copying version
2022-10-17 01:03:56 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:2cdc:664b:bb96:11d6) (Remote host closed the connection)
2022-10-17 01:05:35 +0200acidjnk(~acidjnk@p200300d6e7137a21d59bab4b536388a8.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-10-17 01:06:25 +0200EvanR(~EvanR@user/evanr) (Quit: Leaving)
2022-10-17 01:06:43 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 01:08:26 +0200EvanR(~EvanR@user/evanr)
2022-10-17 01:09:26 +0200EvanR(~EvanR@user/evanr) (Client Quit)
2022-10-17 01:10:11 +0200EvanR(~EvanR@user/evanr)
2022-10-17 01:10:47 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 01:17:06 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 01:21:31 +0200phma_phma
2022-10-17 01:21:36 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-10-17 01:22:11 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 248 seconds)
2022-10-17 01:23:03 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
2022-10-17 01:24:02 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 01:25:09 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 01:28:21 +0200 <dminuoso> Axman6: Did you check out flatparse by the way?
2022-10-17 01:28:52 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 01:28:59 +0200 <dminuoso> Even things like parsing an integer is actually fast with it :)
2022-10-17 01:30:21 +0200wonko(~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 260 seconds)
2022-10-17 01:34:05 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 01:35:15 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-17 01:35:15 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-17 01:35:15 +0200wroathe(~wroathe@user/wroathe)
2022-10-17 01:36:50 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.6)
2022-10-17 01:38:57 +0200adium(adium@user/adium) (Quit: Stable ZNC by #bnc4you)
2022-10-17 01:39:49 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 01:40:56 +0200 <Axman6> yeah I had a look through it, looks very exciting
2022-10-17 01:41:09 +0200 <Axman6> I would love to see how something like aeson reimplemented with it performs
2022-10-17 01:41:30 +0200nate1(~nate@98.45.169.16) (Ping timeout: 264 seconds)
2022-10-17 01:44:48 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
2022-10-17 01:46:55 +0200adium(adium@user/adium)
2022-10-17 01:59:27 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 02:00:01 +0200alismanickt(~talismani@2601:200:c100:c9e0::1b0b)
2022-10-17 02:01:35 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-10-17 02:01:52 +0200 <alismanickt> Why might GHC be hanging at link time? The code I've written is fairly conservative: the only extension I used is OverloadedStrings
2022-10-17 02:02:52 +0200 <alismanickt> That's with `cabal run`; if I ^C and `cabal build`, it says "Up to date"
2022-10-17 02:03:05 +0200 <geekosaur> "hanging at link time" usually means it's the system linker that's hanging
2022-10-17 02:03:41 +0200 <geekosaur> if it's ld.bfd then it'll be extremely slow and memory hungry
2022-10-17 02:03:43 +0200 <Axman6> We'd need quite a bit more information to begin to help though
2022-10-17 02:03:47 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-10-17 02:04:09 +0200califax(~califax@user/califx)
2022-10-17 02:04:46 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-17 02:05:30 +0200 <zzz> ok so i created a cabal.project file with `packages: ./*.cabal , ./vendor/*/*.cabal`
2022-10-17 02:05:58 +0200 <alismanickt> I don't see anything linker-related in ~/.cabal/logs/build.log
2022-10-17 02:06:05 +0200 <zzz> how do i import modules from ./vendor/ packages now?
2022-10-17 02:06:38 +0200 <Axman6> zzz: you need to add the packages as dependencies in the .cabal file for your package
2022-10-17 02:06:48 +0200 <Axman6> then they'll be visible within that package
2022-10-17 02:07:02 +0200 <geekosaur> you declare dependencies on the packages as usual (they'll be satisfied locally since they're declared as vendored in cabal.project) and then you can import
2022-10-17 02:07:14 +0200geekosauris slow
2022-10-17 02:07:14 +0200 <Axman6> (afaiui anyway, I haven't done much with cabal.project files)
2022-10-17 02:07:29 +0200 <zzz> Axman6: oh, so cabal looks for local packages and prefers them to remote ones?
2022-10-17 02:07:35 +0200 <zzz> how does this work with versions?
2022-10-17 02:07:35 +0200 <geekosaur> yes
2022-10-17 02:07:58 +0200 <geekosaur> same way it would normally, so you need to declare a dependency on the vendored package's version
2022-10-17 02:08:20 +0200 <zzz> ok nice!
2022-10-17 02:08:23 +0200 <geekosaur> I do this with vendored (from git) xmonad and xmonad-contrib
2022-10-17 02:09:42 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2022-10-17 02:10:16 +0200 <zzz> just to make sure, i need to add them to `build-depends:` on my .cabal file, right?
2022-10-17 02:10:42 +0200 <geekosaur> yes, just like any other package
2022-10-17 02:11:56 +0200_xor(~xor@74.215.182.83) (Quit: WeeChat 3.6)
2022-10-17 02:12:18 +0200 <Axman6> .cabal specifies what packages you depend on, cabal.project specifies where to get them from if they're not from hackage
2022-10-17 02:14:38 +0200alismanickt(~talismani@2601:200:c100:c9e0::1b0b) (Remote host closed the connection)
2022-10-17 02:14:38 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b) (Remote host closed the connection)
2022-10-17 02:15:04 +0200geekosaurwonders if they thought we'd forgotten about them
2022-10-17 02:16:12 +0200causal(~user@50.35.83.177)
2022-10-17 02:16:44 +0200causal(~user@50.35.83.177) (Client Quit)
2022-10-17 02:18:53 +0200jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
2022-10-17 02:19:32 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 02:19:46 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74)
2022-10-17 02:19:50 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 02:20:28 +0200 <zzz> ok i was messing up. i had an alias for ghcid that was the culprit for ignoring cabal.package
2022-10-17 02:20:30 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b)
2022-10-17 02:21:11 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d)
2022-10-17 02:23:08 +0200 <zzz> i was doing `ghcid [options] app/Main.hs` and not just `ghcid [options]`
2022-10-17 02:24:09 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 02:27:26 +0200Topsi(~Topsi@dyndsl-095-033-095-014.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-10-17 02:28:18 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-17 02:28:47 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 02:31:21 +0200 <talismanick> I passed "ld-options: -fuse-ld=gold" and "ghc-options: -optl-fuse-ld=gold" in the .cabal file, deleted dist-newstyle, and tried `cabal run`
2022-10-17 02:31:25 +0200 <talismanick> segfault
2022-10-17 02:31:30 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 02:32:46 +0200 <geekosaur> I think that's the wrong way to do it, because it's being passed to ld itself which is too late for it to take effect
2022-10-17 02:33:07 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 252 seconds)
2022-10-17 02:33:09 +0200 <Axman6> yeah -optl is for passing arguments to the linker
2022-10-17 02:34:14 +0200 <talismanick> so... how do I tell it to use another linker?
2022-10-17 02:34:19 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d) (Quit: WeeChat 3.6)
2022-10-17 02:34:23 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-10-17 02:34:56 +0200 <geekosaur> ghc-options: -pgml=ld.gold
2022-10-17 02:35:08 +0200 <geekosaur> sorry, no = in there
2022-10-17 02:35:14 +0200 <geekosaur> -pgml ld.gold
2022-10-17 02:37:26 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-17 02:37:35 +0200 <geekosaur> althoughm hm, that -optl should have worked (ld-options is not normally used for final link, but for generating shared objects and such)
2022-10-17 02:37:51 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-10-17 02:37:56 +0200 <talismanick> https://0x0.st/owZ-.txt
2022-10-17 02:38:14 +0200jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Quit: leaving)
2022-10-17 02:38:14 +0200causal(~user@50.35.83.177)
2022-10-17 02:38:33 +0200 <geekosaur> right, it really wants cc as the link command
2022-10-17 02:38:57 +0200 <geekosaur> problem there being I'm not sure how to do that via command line options, I've always edited the settings file directly
2022-10-17 02:39:16 +0200 <geekosaur> $(ghc --print-libdir)/settings
2022-10-17 02:39:16 +0200 <talismanick> settings file?
2022-10-17 02:39:57 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 02:40:24 +0200 <talismanick> from there: ,("ld command", "ld.lld")
2022-10-17 02:40:41 +0200 <talismanick> so, that should be even faster than gold, let alone ld.bfd
2022-10-17 02:40:55 +0200 <geekosaur> lld doesn't work as final link
2022-10-17 02:41:33 +0200 <geekosaur> you really want "C compiler link flags" because final link needs to include libc / C runtime stuff only cc knows how to do properly
2022-10-17 02:41:39 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 02:41:56 +0200 <geekosaur> on my system that's ,("C compiler link flags", "-fuse-ld=gold")
2022-10-17 02:42:12 +0200 <talismanick> Yeah, I search-and-replaced lld with gold
2022-10-17 02:42:33 +0200 <talismanick> oh, segfault now!
2022-10-17 02:43:05 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Ping timeout: 250 seconds)
2022-10-17 02:43:22 +0200 <geekosaur> sigh
2022-10-17 02:43:29 +0200 <EvanR> segfaults in haskell, smh
2022-10-17 02:43:45 +0200 <geekosaur> lld is known not to work, but I'd have expected gold to work properly
2022-10-17 02:44:30 +0200 <talismanick> I did just update my system... let me see if another project still builds fine after I edit it
2022-10-17 02:44:39 +0200 <talismanick> nope! segfaults too
2022-10-17 02:44:45 +0200 <geekosaur> 😞
2022-10-17 02:44:55 +0200causal(~user@50.35.83.177) (Read error: Connection reset by peer)
2022-10-17 02:45:13 +0200 <geekosaur> hope you at least saved a copy of the settings file
2022-10-17 02:45:52 +0200causal(~user@50.35.83.177)
2022-10-17 02:46:02 +0200 <talismanick> if there's an issue tracker somewhere: you can record that building with Cabal 3.8.0.0 and GHC 9.2.4 (via ghcup) fails on Void Linux as of Oct. 16, 2022
2022-10-17 02:46:17 +0200 <talismanick> geekosaur: oh, I'll just change gold back to lld
2022-10-17 02:46:28 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 02:46:41 +0200 <geekosaur> .oO { optimist }
2022-10-17 02:46:55 +0200 <talismanick> I mean, it was already broken after this most recent update
2022-10-17 02:47:03 +0200 <talismanick> and, I've evidently been using lld (somehow)
2022-10-17 02:47:11 +0200 <talismanick> (that's what it was before I changed anything)
2022-10-17 02:48:01 +0200zaquest(~notzaques@5.130.79.72)
2022-10-17 02:48:25 +0200 <geekosaur> hm. I don't actually know about lld on linux being working or not. it's mostly on M1 Macs that lld has been being detected a system linker and breaking, and the fix is to switch to the proper system linker
2022-10-17 02:48:32 +0200 <geekosaur> (ld64 on those machines)
2022-10-17 02:50:03 +0200 <geekosaur> *as system
2022-10-17 02:50:11 +0200Kaipei(~Kaiepi@142.68.249.28) (Ping timeout: 248 seconds)
2022-10-17 02:50:27 +0200causal(~user@50.35.83.177) (Ping timeout: 250 seconds)
2022-10-17 02:50:37 +0200 <talismanick> oh, it works if I switch it to ld.bfd
2022-10-17 02:50:44 +0200 <geekosaur> odd
2022-10-17 02:51:01 +0200 <geekosaur> wonder if the hangs are lld's fault then
2022-10-17 02:51:26 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-10-17 02:52:59 +0200fmgornick(~fmgornick@2607:ea00:107:1c07:81d6:d0ad:8522:af6e)
2022-10-17 02:53:18 +0200 <fmgornick> ?src scanr
2022-10-17 02:53:18 +0200 <lambdabot> scanr _ q0 [] = [q0]
2022-10-17 02:53:19 +0200 <lambdabot> scanr f q0 (x:xs) = f x q : qs
2022-10-17 02:53:19 +0200 <lambdabot> where qs@(q:_) = scanr f q0 xs
2022-10-17 02:53:56 +0200fmgornick(~fmgornick@2607:ea00:107:1c07:81d6:d0ad:8522:af6e) (Client Quit)
2022-10-17 02:56:07 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2022-10-17 02:56:36 +0200finsternis(~X@23.226.237.192) (Read error: Connection reset by peer)
2022-10-17 02:57:23 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-10-17 02:57:58 +0200nate1(~nate@98.45.169.16)
2022-10-17 03:05:12 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d)
2022-10-17 03:10:14 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-10-17 03:13:51 +0200justsomeguy(~justsomeg@user/justsomeguy) (WeeChat 3.6)
2022-10-17 03:14:05 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-10-17 03:16:22 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-10-17 03:18:24 +0200xff0x(~xff0x@2405:6580:b080:900:b67d:8bf9:8e64:c723) (Ping timeout: 264 seconds)
2022-10-17 03:21:03 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 03:25:51 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-10-17 03:40:00 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2022-10-17 03:41:20 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-17 03:44:31 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-10-17 03:45:45 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 03:46:16 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-17 03:50:27 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-10-17 03:50:38 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2022-10-17 03:52:51 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 250 seconds)
2022-10-17 03:53:26 +0200[spookyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-10-17 03:54:53 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-10-17 03:57:54 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 03:58:05 +0200 <EvanR> I was like how to fold over this type, then it became clear. That I may have gone insane https://paste.tomsmeding.com/Javeh97i
2022-10-17 03:58:28 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-17 04:00:07 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-10-17 04:01:38 +0200 <byorgey> very nice
2022-10-17 04:01:57 +0200 <Axman6> there are libraries that can autogenerate that right?>
2022-10-17 04:02:06 +0200 <EvanR> what would the type of something like foldMap for this type be?
2022-10-17 04:02:35 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 04:03:03 +0200 <Axman6> also feels quite Data.Data-y
2022-10-17 04:04:32 +0200 <EvanR> I found catamorphism package, which does this one thing
2022-10-17 04:04:52 +0200 <EvanR> another package for another thing, I guess xD
2022-10-17 04:04:56 +0200ddellacosta(~ddellacos@143.244.47.82) (Ping timeout: 260 seconds)
2022-10-17 04:04:56 +0200 <[Leary]> That's why you write `type E = Fix EF; data EF a = ...; cataE :: (EF a -> a) -> ...`.
2022-10-17 04:05:11 +0200 <Axman6> yeah
2022-10-17 04:05:12 +0200 <EvanR> I just deleted the Fix version
2022-10-17 04:05:22 +0200 <Axman6> well ReFix it :P
2022-10-17 04:05:29 +0200 <EvanR> over it, moving on xD
2022-10-17 04:06:40 +0200ddellacosta(~ddellacos@143.244.47.100)
2022-10-17 04:07:36 +0200 <EvanR> here is cataE in action, screaming for some sort of foldMap somehow https://paste.tomsmeding.com/ViIfOUKa
2022-10-17 04:08:48 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 264 seconds)
2022-10-17 04:09:25 +0200califax(~califax@user/califx) (Ping timeout: 258 seconds)
2022-10-17 04:10:11 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
2022-10-17 04:10:20 +0200califax(~califax@user/califx)
2022-10-17 04:10:21 +0200 <Axman6> @hoogle everywhere
2022-10-17 04:10:21 +0200 <lambdabot> Data.Generics.Schemes everywhere :: (forall a . Data a => a -> a) -> forall a . Data a => a -> a
2022-10-17 04:10:21 +0200 <lambdabot> Data.Generics.SYB everywhere :: Biplate b a => (a -> a) -> b -> b
2022-10-17 04:10:21 +0200 <lambdabot> Numeric.Integration.TanhSinh everywhere :: ((Double -> Double) -> Double -> Double -> r) -> (Double -> Double) -> r
2022-10-17 04:10:51 +0200 <Axman6> :t partsOf template
2022-10-17 04:10:52 +0200 <lambdabot> (Functor f, Data t, Typeable a) => LensLike f t t [a] [a]
2022-10-17 04:12:41 +0200 <EvanR> I knew SYB was going to come up
2022-10-17 04:13:01 +0200 <Axman6> > ("Hello", Left "World :: Either String Bool, (Just "some", "String")) ^.. partsOf template :: [String]
2022-10-17 04:13:03 +0200 <lambdabot> <hint>:1:103: error:
2022-10-17 04:13:03 +0200 <lambdabot> lexical error in string/character literal at end of input
2022-10-17 04:13:14 +0200 <Axman6> > ("Hello", Left "World" :: Either String Bool, (Just "some", "String")) ^.. partsOf template :: [String]
2022-10-17 04:13:16 +0200 <lambdabot> ["HelloWorldsomeString"]
2022-10-17 04:13:25 +0200 <Axman6> > ("Hello", Left "World" :: Either String Bool, (Just "some", "String")) ^.. partsOf template :: [[String]]
2022-10-17 04:13:27 +0200 <lambdabot> [["Hello","World","some","String"]]
2022-10-17 04:14:37 +0200 <talismanick> What's the difference between [y | (x,y)<-tupList, x==a, ...] and [y | (a,y)<-tupList ...] ?
2022-10-17 04:14:47 +0200 <talismanick> because, they both compile, but the latter gives the wrong answer
2022-10-17 04:15:04 +0200 <Axman6> the former only returns y's where x is equal to a
2022-10-17 04:15:20 +0200 <talismanick> and the latter not?
2022-10-17 04:15:22 +0200 <Axman6> the later just names x a
2022-10-17 04:15:33 +0200 <Axman6> you can't pattern match on arbitrary values
2022-10-17 04:15:34 +0200 <talismanick> assuming a is already named outside
2022-10-17 04:15:46 +0200 <talismanick> because, then it shouldn't compile...
2022-10-17 04:15:47 +0200 <Axman6> that's not how pattern matching works, you're just shadowing a
2022-10-17 04:15:51 +0200 <talismanick> ah
2022-10-17 04:16:12 +0200 <EvanR> something like that works in elixir... and it's weird
2022-10-17 04:16:28 +0200 <EvanR> instead of shadowing it acts like an extra equality check
2022-10-17 04:16:52 +0200 <talismanick> that'd be Erlang's Prolog heritage rearing its face, I imagine
2022-10-17 04:16:55 +0200razetime(~quassel@117.193.4.27)
2022-10-17 04:17:07 +0200 <talismanick> (Prolog -> Concurrent Prolog -> Erlang -> Elixir)
2022-10-17 04:17:37 +0200 <talismanick> idk if Elixir has logic variables, but Erlang does (a restricted form thereof, at any rate)
2022-10-17 04:18:34 +0200 <EvanR> I guess rearing its face is better than facing its rear
2022-10-17 04:19:13 +0200 <talismanick> hey, predicates run both ways for a reason
2022-10-17 04:19:24 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-10-17 04:19:36 +0200 <EvanR> no this feature of elixir is in the pattern matching
2022-10-17 04:19:55 +0200 <talismanick> pattern matching is a weakened form of unification
2022-10-17 04:20:47 +0200 <Axman6> yeah I remember really liking being able to do foo x x = ... in erlang to require both arguments to be the same
2022-10-17 04:21:18 +0200 <talismanick> trying to write that has bit me multiple times in Haskell :(
2022-10-17 04:21:24 +0200 <EvanR> Refl : a = a
2022-10-17 04:21:40 +0200td_(~td@83.135.9.59) (Ping timeout: 268 seconds)
2022-10-17 04:21:40 +0200 <EvanR> brainexplode
2022-10-17 04:23:18 +0200td_(~td@83.135.9.13)
2022-10-17 04:26:01 +0200elbear(~lucian@188.24.138.239)
2022-10-17 04:26:12 +0200ddellacosta(~ddellacos@143.244.47.100) (Ping timeout: 264 seconds)
2022-10-17 04:29:26 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-10-17 04:30:27 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-17 04:35:12 +0200 <ski> EvanR : next try folding a non-regular `data' type, or even a GADT
2022-10-17 04:35:57 +0200 <EvanR> non-regular?
2022-10-17 04:35:57 +0200 <ski> talismanick : Erlang does not have logic variables, it's just plain (immutable) variables, as in Haskell,SML,OCaml,Clean,F#,..
2022-10-17 04:38:03 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 04:42:41 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 250 seconds)
2022-10-17 04:42:53 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-10-17 04:43:59 +0200 <EvanR> data NRData a b = MkNRData a (NRData b a)
2022-10-17 04:44:15 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-10-17 04:44:59 +0200 <ski> EvanR : ones requiring polymorphic recursion to recur on. ones which don't pass the same parameters recursively. like `data SwapList a b = Nil | Cons a (SwapList b a)', `data PerfectlyBalancedTree a = Elems a | Double (PerfectlyBalancedTree (a,a))', `data Nest a = Leaf a | Node a (Nest [a])', `data IterList f a = Nil | Cons a (IterList f (f a))', `data HyperFunction f a b = HF (a -> b) (HyperFunction f (f a)
2022-10-17 04:45:05 +0200 <ski> (f b))', `data Trist (ar :: k -> k -> *) :: k -> k -> * where Nil :: Trist ar a a; Cons :: ar a b -> Trist ar b c -> Trist ar a b'
2022-10-17 04:46:15 +0200 <ski> (well, you could express the last one as `data Trist ar b c = (b ~ c) => Nil | forall a. Cons (ar a b) (Trist a c)', without using `GADTs')
2022-10-17 04:47:49 +0200 <ski> Erlang does allow matching on an already bound(/instantiated) variable, though. it also allows binding a variable in each branch of a conditional or `case' (or `receive', for matching on messages in the inbox/mailbox of the process), and then use it afterwards
2022-10-17 04:48:13 +0200 <ski> (sometimes i wish for this latter in Haskell. both of these things comes from its Prolog inheritance, yes)
2022-10-17 04:49:40 +0200califax(~califax@user/califx) (Ping timeout: 258 seconds)
2022-10-17 04:50:26 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-17 04:50:56 +0200califax(~califax@user/califx)
2022-10-17 04:51:21 +0200 <EvanR> cataNRData :: (a -> r -> r) -> (b -> r -> r) -> NRData a b -> r
2022-10-17 04:51:28 +0200 <EvanR> cataNRData f g (MkNRData x more) = f x (cataNRData g f more)
2022-10-17 04:53:55 +0200berberman(~berberman@user/berberman) (Ping timeout: 248 seconds)
2022-10-17 04:54:21 +0200Axman6(~Axman6@user/axman6) (Ping timeout: 252 seconds)
2022-10-17 04:56:44 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 04:57:53 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 05:02:54 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-17 05:03:51 +0200AkechiShiro(~licht@user/akechishiro) (Ping timeout: 260 seconds)
2022-10-17 05:04:06 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 268 seconds)
2022-10-17 05:04:26 +0200Luj3(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 260 seconds)
2022-10-17 05:05:36 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-10-17 05:10:28 +0200AkechiShiro(~licht@user/akechishiro)
2022-10-17 05:12:26 +0200Luj3(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
2022-10-17 05:12:56 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Remote host closed the connection)
2022-10-17 05:13:00 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 05:13:20 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-10-17 05:13:22 +0200 <ski> yup, that's an easy one
2022-10-17 05:17:15 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-10-17 05:19:08 +0200 <ski> (`FunList' is another one. <https://twanvl.nl/blog/haskell/non-regular1>,<https://bartoszmilewski.com/2018/10/12/trading-funlists-at-a-bazaar-with-yoneda/>,<https://stackoverflow.com/questions/64935210/what-subclasses-of-profunctor-does-funlist-support>)
2022-10-17 05:20:59 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Max SendQ exceeded)
2022-10-17 05:23:07 +0200nate1(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-10-17 05:23:56 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d) (Quit: WeeChat 3.6)
2022-10-17 05:24:17 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 250 seconds)
2022-10-17 05:28:04 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 05:31:19 +0200causal(~user@50.35.83.177)
2022-10-17 05:35:35 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
2022-10-17 05:37:47 +0200rumraisin(~tardis@user/phileasfogg)
2022-10-17 05:38:15 +0200rumraisin(~tardis@user/phileasfogg) (Client Quit)
2022-10-17 05:38:38 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 05:38:54 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-10-17 05:39:49 +0200nate1(~nate@98.45.169.16)
2022-10-17 05:42:36 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Max SendQ exceeded)
2022-10-17 05:43:31 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 248 seconds)
2022-10-17 05:44:39 +0200nate1(~nate@98.45.169.16) (Ping timeout: 250 seconds)
2022-10-17 05:44:48 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Ping timeout: 264 seconds)
2022-10-17 05:45:27 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-10-17 05:46:43 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-10-17 05:46:55 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-17 05:47:35 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-17 05:50:37 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 05:52:10 +0200berberman(~berberman@user/berberman)
2022-10-17 05:54:49 +0200 <EvanR> still working on HyperFunction
2022-10-17 05:55:32 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-10-17 05:56:41 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net)
2022-10-17 05:59:45 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-10-17 06:00:15 +0200razetime(~quassel@117.193.4.27) (Ping timeout: 250 seconds)
2022-10-17 06:06:15 +0200spaced(uid572193@user/spaced) (Quit: Connection closed for inactivity)
2022-10-17 06:07:52 +0200nate1(~nate@98.45.169.16)
2022-10-17 06:08:11 +0200spaced(uid572193@user/spaced)
2022-10-17 06:12:35 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-17 06:13:29 +0200elbear(~lucian@188.24.138.239)
2022-10-17 06:20:05 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-10-17 06:20:56 +0200califax(~califax@user/califx)
2022-10-17 06:21:23 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 248 seconds)
2022-10-17 06:28:14 +0200nate1(~nate@98.45.169.16)
2022-10-17 06:30:14 +0200vn36__(~vn36@123.63.203.210)
2022-10-17 06:35:29 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-17 06:35:41 +0200razetime(~quassel@117.193.4.27)
2022-10-17 06:36:06 +0200Kaladin(~Kaladin@157-131-169-214.fiber.dynamic.sonic.net)
2022-10-17 06:36:58 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 246 seconds)
2022-10-17 06:43:32 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-17 06:44:01 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-17 06:57:31 +0200tbd(~user@2a00:6020:4119:a000:37c5:734f:1b84:a7c2)
2022-10-17 06:57:36 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 260 seconds)
2022-10-17 07:00:25 +0200vn36__(~vn36@123.63.203.210) (Ping timeout: 252 seconds)
2022-10-17 07:01:46 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Quit: ,-)
2022-10-17 07:01:46 +0200 <tbd> I'm trying to write bindings to a C library using FFI and hsc2hs in several forieign imports I
2022-10-17 07:01:46 +0200 <tbd> get the warning "expected ‘const char **’ but argument is of type ‘char **’". I typed the input argument as
2022-10-17 07:01:46 +0200 <tbd> CString on the Haskell side. Is there anything better?
2022-10-17 07:03:34 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-10-17 07:03:39 +0200zxx7529(~Thunderbi@user/zxx7529) (Client Quit)
2022-10-17 07:04:13 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-10-17 07:05:08 +0200Kaladin(~Kaladin@157-131-169-214.fiber.dynamic.sonic.net) (Quit: Leaving)
2022-10-17 07:06:37 +0200Kaladin(~Kaladin@157-131-169-214.fiber.dynamic.sonic.net)
2022-10-17 07:09:58 +0200elbear(~lucian@188.24.138.239)
2022-10-17 07:10:06 +0200sagax(~sagax_nb@user/sagax)
2022-10-17 07:13:03 +0200sagax(~sagax_nb@user/sagax) (*.net *.split)
2022-10-17 07:13:03 +0200spaced(uid572193@user/spaced) (*.net *.split)
2022-10-17 07:13:03 +0200AkechiShiro(~licht@user/akechishiro) (*.net *.split)
2022-10-17 07:13:03 +0200pavonia(~user@user/siracusa) (*.net *.split)
2022-10-17 07:13:03 +0200lbseale(~quassel@user/ep1ctetus) (*.net *.split)
2022-10-17 07:13:03 +0200raym(~aritra@user/raym) (*.net *.split)
2022-10-17 07:13:03 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (*.net *.split)
2022-10-17 07:13:04 +0200weeezes[m](~weeezesma@2001:470:69fc:105::1:da65) (*.net *.split)
2022-10-17 07:13:04 +0200Neosake[m](~neosakema@2001:470:69fc:105::2:989e) (*.net *.split)
2022-10-17 07:13:04 +0200drsooch[m](~drsoochma@2001:470:69fc:105::1:c8a1) (*.net *.split)
2022-10-17 07:13:04 +0200MangoIV[m](~mangoivma@2001:470:69fc:105::2:8417) (*.net *.split)
2022-10-17 07:13:04 +0200elvishjerricco(~elvishjer@2001:470:69fc:105::6172) (*.net *.split)
2022-10-17 07:13:04 +0200polykernel[m](~polykerne@user/polykernel) (*.net *.split)
2022-10-17 07:13:04 +0200JensPetersen[m](~juhp@2001:470:69fc:105::6e9) (*.net *.split)
2022-10-17 07:13:04 +0200kadoban(~kadoban@user/kadoban) (*.net *.split)
2022-10-17 07:13:04 +0200SeanKing[m](~seankingm@2001:470:69fc:105::cf9c) (*.net *.split)
2022-10-17 07:13:04 +0200Killy(~killy@2001:470:69fc:105::2:6ec1) (*.net *.split)
2022-10-17 07:13:04 +0200nicmollel[m](~nicmollel@2001:470:69fc:105::1:feeb) (*.net *.split)
2022-10-17 07:13:04 +0200fgaz(~fgaz@2001:470:69fc:105::842) (*.net *.split)
2022-10-17 07:13:04 +0200ghoulpine(xfnw@tilde.team) (*.net *.split)
2022-10-17 07:13:04 +0200remexre(~remexre@user/remexre) (*.net *.split)
2022-10-17 07:13:04 +0200dibblego(~dibblego@haskell/developer/dibblego) (*.net *.split)
2022-10-17 07:13:04 +0200GoldsteinQ(~goldstein@goldstein.rs) (*.net *.split)
2022-10-17 07:13:04 +0200joeyh(joeyh@2600:3c03::f03c:91ff:fe73:b0d2) (*.net *.split)
2022-10-17 07:13:04 +0200poscat(~poscat@2408:8206:4823:fd6f:98ab:5c38:136c:5932) (*.net *.split)
2022-10-17 07:13:04 +0200xsarnik(xsarnik@lounge.fi.muni.cz) (*.net *.split)
2022-10-17 07:13:04 +0200stilgart(~Christoph@chezlefab.net) (*.net *.split)
2022-10-17 07:13:04 +0200n1essa(3d621153a5@2604:bf00:561:2000::df7) (*.net *.split)
2022-10-17 07:13:04 +0200sa(sid1055@id-1055.tinside.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200ralu1(~ralu@static.211.245.203.116.clients.your-server.de) (*.net *.split)
2022-10-17 07:13:04 +0200nibelungen(~asturias@2001:19f0:7001:638:5400:3ff:fef3:8725) (*.net *.split)
2022-10-17 07:13:04 +0200sviermsung(E3Ya4Aww1k@user/s4msung) (*.net *.split)
2022-10-17 07:13:04 +0200whatsupboy(~whatsupbo@user/scobydoo) (*.net *.split)
2022-10-17 07:13:04 +0200bsima(~bsima@2604:a880:400:d0::19f1:7001) (*.net *.split)
2022-10-17 07:13:04 +0200agander_m(sid407952@id-407952.tinside.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200SrPx(sid108780@id-108780.uxbridge.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200wafflepirate(sid467876@id-467876.ilkley.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200dispater-(~dispater@mail.brprice.uk) (*.net *.split)
2022-10-17 07:13:04 +0200orcus(~orcus@user/brprice) (*.net *.split)
2022-10-17 07:13:04 +0200integral(sid296274@user/integral) (*.net *.split)
2022-10-17 07:13:04 +0200PotatoGim_(sid99505@id-99505.lymington.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200cln(sid336875@id-336875.ilkley.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200ysh____(sid6017@id-6017.ilkley.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200feliix42(~felix@gibbs.uberspace.de) (*.net *.split)
2022-10-17 07:13:04 +0200sooch_(sid533113@id-533113.hampstead.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200christiaanb(sid84827@id-84827.lymington.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200edmundnoble(sid229620@id-229620.helmsley.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200supersven(sid501114@id-501114.ilkley.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200wallymathieu(sid533252@id-533252.uxbridge.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200AndreasK(sid320732@id-320732.uxbridge.irccloud.com) (*.net *.split)
2022-10-17 07:13:04 +0200sabx(~sabbas@user/sabbas) (*.net *.split)
2022-10-17 07:13:04 +0200urdh(~urdh@user/urdh) (*.net *.split)
2022-10-17 07:13:04 +0200absence(torgeihe@hildring.pvv.ntnu.no) (*.net *.split)
2022-10-17 07:13:04 +0200AWizzArd(~code@gehrels.uberspace.de) (*.net *.split)
2022-10-17 07:13:04 +0200emergence(emergence@2607:5300:60:5910:dcad:beff:feef:5bc) (*.net *.split)
2022-10-17 07:13:04 +0200rawles(~x@user/rawles) (*.net *.split)
2022-10-17 07:13:05 +0200totbwf(sid402332@id-402332.uxbridge.irccloud.com) (*.net *.split)
2022-10-17 07:13:05 +0200edwardk(sid47016@haskell/developer/edwardk) (*.net *.split)
2022-10-17 07:13:05 +0200dixie(~dixie@real.wilbury.sk) (*.net *.split)
2022-10-17 07:13:05 +0200acidsys(~crameleon@openSUSE/member/crameleon) (*.net *.split)
2022-10-17 07:13:05 +0200thonkpod_(~thonkpod@user/thonkpod) (*.net *.split)
2022-10-17 07:13:05 +0200hamishmack(sid389057@id-389057.hampstead.irccloud.com) (*.net *.split)
2022-10-17 07:13:05 +0200drewr(~drew@user/drewr) (*.net *.split)
2022-10-17 07:13:05 +0200yushyin(w8oD1vlcZ2@mail.karif.server-speed.net) (*.net *.split)
2022-10-17 07:13:09 +0200absence_(torgeihe@hildring.pvv.ntnu.no)
2022-10-17 07:13:12 +0200dixie(~dixie@real.wilbury.sk)
2022-10-17 07:13:12 +0200AWizzArd(~code@gehrels.uberspace.de)
2022-10-17 07:13:13 +0200totbwf(sid402332@id-402332.uxbridge.irccloud.com)
2022-10-17 07:13:13 +0200dibblego(~dibblego@122-199-1-30.ip4.superloop.com)
2022-10-17 07:13:14 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
2022-10-17 07:13:15 +0200xsarnik(xsarnik@lounge.fi.muni.cz)
2022-10-17 07:13:16 +0200joeyh(joeyh@2600:3c03::f03c:91ff:fe73:b0d2)
2022-10-17 07:13:16 +0200nibelungen(~asturias@2001:19f0:7001:638:5400:3ff:fef3:8725)
2022-10-17 07:13:16 +0200ralu1(~ralu@static.211.245.203.116.clients.your-server.de)
2022-10-17 07:13:17 +0200ysh____(sid6017@id-6017.ilkley.irccloud.com)
2022-10-17 07:13:17 +0200sooch_(sid533113@id-533113.hampstead.irccloud.com)
2022-10-17 07:13:18 +0200hamishmack(sid389057@id-389057.hampstead.irccloud.com)
2022-10-17 07:13:20 +0200spaced(uid572193@user/spaced)
2022-10-17 07:13:26 +0200rawles(~x@user/rawles)
2022-10-17 07:13:28 +0200cln(sid336875@id-336875.ilkley.irccloud.com)
2022-10-17 07:13:28 +0200AndreasK(sid320732@id-320732.uxbridge.irccloud.com)
2022-10-17 07:13:29 +0200dibblego(~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
2022-10-17 07:13:29 +0200dibblego(~dibblego@haskell/developer/dibblego)
2022-10-17 07:13:29 +0200pavonia(~user@ip5f5bd7bd.dynamic.kabel-deutschland.de)
2022-10-17 07:13:29 +0200supersven(sid501114@id-501114.ilkley.irccloud.com)
2022-10-17 07:13:33 +0200n1essa(3d621153a5@2604:bf00:561:2000::df7)
2022-10-17 07:13:37 +0200yushyin(wEE1cEPkfk@mail.karif.server-speed.net)
2022-10-17 07:13:39 +0200edmundnoble(sid229620@id-229620.helmsley.irccloud.com)
2022-10-17 07:13:39 +0200wafflepirate(sid467876@id-467876.ilkley.irccloud.com)
2022-10-17 07:13:41 +0200thonkpod_(~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d)
2022-10-17 07:13:41 +0200christiaanb(sid84827@id-84827.lymington.irccloud.com)
2022-10-17 07:13:42 +0200AkechiShiro(~licht@2a01:e0a:5f9:9681:1473:3dff:fe42:56a9)
2022-10-17 07:13:46 +0200whatsupboy(~whatsupbo@2a01:4f9:c011:4b51::1)
2022-10-17 07:13:47 +0200PotatoGim_(sid99505@id-99505.lymington.irccloud.com)
2022-10-17 07:13:49 +0200SrPx(sid108780@id-108780.uxbridge.irccloud.com)
2022-10-17 07:14:02 +0200pavonia(~user@ip5f5bd7bd.dynamic.kabel-deutschland.de) (Changing host)
2022-10-17 07:14:02 +0200pavonia(~user@user/siracusa)
2022-10-17 07:14:07 +0200edwardk(sid47016@2a03:5180:f:3::b7a8)
2022-10-17 07:14:13 +0200thonkpod_(~thonkpod@2001:19f0:ac01:b46:5400:1ff:fec7:d73d) (Changing host)
2022-10-17 07:14:13 +0200thonkpod_(~thonkpod@user/thonkpod)
2022-10-17 07:14:26 +0200sa(sid1055@id-1055.tinside.irccloud.com)
2022-10-17 07:14:27 +0200edwardk(sid47016@2a03:5180:f:3::b7a8) (Changing host)
2022-10-17 07:14:27 +0200edwardk(sid47016@haskell/developer/edwardk)
2022-10-17 07:14:29 +0200integral(sid296274@id-296274.lymington.irccloud.com)
2022-10-17 07:14:29 +0200wallymathieu(sid533252@id-533252.uxbridge.irccloud.com)
2022-10-17 07:14:37 +0200integral(sid296274@id-296274.lymington.irccloud.com) (Changing host)
2022-10-17 07:14:37 +0200integral(sid296274@user/integral)
2022-10-17 07:14:40 +0200agander_m(sid407952@2a03:5180:f::6:3990)
2022-10-17 07:14:49 +0200remexre(~remexre@user/remexre)
2022-10-17 07:14:51 +0200dispater(~dispater@user/brprice)
2022-10-17 07:14:55 +0200asan(~asansanwa@150.129.181.196)
2022-10-17 07:14:57 +0200feliix42(~felix@gibbs.uberspace.de)
2022-10-17 07:15:05 +0200urdh(~urdh@user/urdh)
2022-10-17 07:15:08 +0200lbseale(~quassel@user/ep1ctetus)
2022-10-17 07:15:08 +0200poscat(~poscat@114.245.106.84)
2022-10-17 07:15:13 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 248 seconds)
2022-10-17 07:15:37 +0200acidsys(~crameleon@openSUSE/member/crameleon)
2022-10-17 07:15:38 +0200orcus(~orcus@user/brprice)
2022-10-17 07:15:43 +0200bsima(~bsima@2604:a880:400:d0::19f1:7001)
2022-10-17 07:16:29 +0200sviermsung(cqQjNIqEOU@user/s4msung)
2022-10-17 07:16:30 +0200ghoulpine(xfnw@tilde.team)
2022-10-17 07:16:32 +0200 <jackdk> tbd: can you provide a complete example?
2022-10-17 07:16:37 +0200GoldsteinQ(~goldstein@goldstein.rs)
2022-10-17 07:18:07 +0200fgaz(~fgaz@2001:470:69fc:105::842)
2022-10-17 07:18:11 +0200stilgart(~Christoph@chezlefab.net)
2022-10-17 07:18:18 +0200sabx(~sabbas@user/sabbas)
2022-10-17 07:18:21 +0200raym(~aritra@user/raym)
2022-10-17 07:18:41 +0200nicmollel[m](~nicmollel@2001:470:69fc:105::1:feeb)
2022-10-17 07:18:42 +0200Killy(~killy@2001:470:69fc:105::2:6ec1)
2022-10-17 07:18:48 +0200SeanKing[m](~seankingm@2001:470:69fc:105::cf9c)
2022-10-17 07:19:08 +0200AkechiShiro(~licht@2a01:e0a:5f9:9681:1473:3dff:fe42:56a9) (Quit: WeeChat 3.7)
2022-10-17 07:19:42 +0200AkechiShiro(~licht@user/akechishiro)
2022-10-17 07:19:48 +0200kadoban(~kadoban@user/kadoban)
2022-10-17 07:19:49 +0200JensPetersen[m](~juhp@2001:470:69fc:105::6e9)
2022-10-17 07:20:08 +0200polykernel[m](~polykerne@user/polykernel)
2022-10-17 07:20:19 +0200MangoIV[m](~mangoivma@2001:470:69fc:105::2:8417)
2022-10-17 07:20:20 +0200elvishjerricco(~elvishjer@2001:470:69fc:105::6172)
2022-10-17 07:20:54 +0200drsooch[m](~drsoochma@2001:470:69fc:105::1:c8a1)
2022-10-17 07:20:55 +0200Neosake[m](~neosakema@2001:470:69fc:105::2:989e)
2022-10-17 07:21:44 +0200weeezes[m](~weeezesma@2001:470:69fc:105::1:da65)
2022-10-17 07:22:02 +0200 <tbd> https://github.com/thomasbach-dev/hs-rrd/blob/rrd-create/src/RRDTool/LowLevel.hsc#L34
2022-10-17 07:23:09 +0200 <tbd> Here is the function declaration in the headers: https://github.com/oetiker/rrdtool-1.x/blob/master/src/rrd.h#L248
2022-10-17 07:24:26 +0200sagax(~sagax_nb@user/sagax)
2022-10-17 07:26:12 +0200berberman(~berberman@user/berberman) (Ping timeout: 264 seconds)
2022-10-17 07:28:35 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-10-17 07:29:01 +0200elbear(~lucian@188.24.138.239)
2022-10-17 07:29:06 +0200titibandit(~titibandi@xdsl-78-34-208-230.nc.de)
2022-10-17 07:29:38 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2022-10-17 07:30:42 +0200raym(~aritra@user/raym) (Ping timeout: 264 seconds)
2022-10-17 07:32:21 +0200raym(~aritra@user/raym)
2022-10-17 07:33:39 +0200zxx7529(~Thunderbi@user/zxx7529) (Quit: zxx7529)
2022-10-17 07:33:42 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 264 seconds)
2022-10-17 07:39:36 +0200 <jackdk> I cannot replicate your warning on GHC 9.2.2 (which came from shell.nix, I assume). What GHC are you working on?
2022-10-17 07:41:48 +0200Kaladin(~Kaladin@157-131-169-214.fiber.dynamic.sonic.net) (Quit: Leaving)
2022-10-17 07:42:35 +0200raym(~aritra@user/raym) (Ping timeout: 252 seconds)
2022-10-17 07:42:37 +0200 <[Leary]> /exit
2022-10-17 07:42:43 +0200[Leary](~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
2022-10-17 07:42:58 +0200[Leary](~Leary]@user/Leary/x-0910699)
2022-10-17 07:43:19 +0200raym(~aritra@user/raym)
2022-10-17 07:46:18 +0200elbear(~lucian@188.24.138.239)
2022-10-17 07:51:01 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-17 07:55:07 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-10-17 07:56:47 +0200kenran(~user@user/kenran)
2022-10-17 08:05:35 +0200Axman6(~Axman6@user/axman6)
2022-10-17 08:06:52 +0200chomwitt(~chomwitt@2a02:587:dc1e:5e00:35ee:8105:5f30:c2c7)
2022-10-17 08:07:01 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-17 08:09:23 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 250 seconds)
2022-10-17 08:13:48 +0200zeenk(~zeenk@2a02:2f04:a311:7000:aa5:d3dd:854f:9922)
2022-10-17 08:15:55 +0200yelllloowwww(~igloo@76.209.246.53)
2022-10-17 08:16:48 +0200vn36__(~vn36@123.63.203.210)
2022-10-17 08:18:54 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 08:19:30 +0200elbear(~lucian@188.24.138.239)
2022-10-17 08:19:51 +0200raym(~aritra@user/raym) (Ping timeout: 260 seconds)
2022-10-17 08:20:26 +0200mbuf(~Shakthi@49.205.87.29)
2022-10-17 08:21:02 +0200yelllloowwww(~igloo@76.209.246.53) (Quit: Igloo IRC: https://iglooirc.com)
2022-10-17 08:21:12 +0200gmg(~user@user/gehmehgeh)
2022-10-17 08:23:56 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-17 08:24:31 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 260 seconds)
2022-10-17 08:24:38 +0200yelllloowwww(~igloo@76.209.246.53)
2022-10-17 08:25:11 +0200Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-10-17 08:27:16 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-10-17 08:27:30 +0200yelllloowwww(~igloo@76.209.246.53) (Client Quit)
2022-10-17 08:28:53 +0200cfricke(~cfricke@user/cfricke)
2022-10-17 08:29:40 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-10-17 08:29:40 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-10-17 08:29:40 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Write error: Connection reset by peer)
2022-10-17 08:30:04 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-10-17 08:30:15 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-10-17 08:31:18 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-17 08:33:38 +0200 <tbd> jackdk: interesting, it is ghc 9.2.2.
2022-10-17 08:36:06 +0200 <tbd> the warning made perfect sense to me. I guess CString is translated to `char *`, but the
2022-10-17 08:36:06 +0200 <tbd> function is declared to take a `const char *`.
2022-10-17 08:38:38 +0200 <jackdk> Your reported error talks about a `const char **` - two stars, so I'd look at how you map the `argv` permission
2022-10-17 08:38:43 +0200berberman(~berberman@user/berberman)
2022-10-17 08:38:43 +0200 <jackdk> s/permission/parameter/
2022-10-17 08:40:27 +0200 <tbd> Here is the output of my compilation btw: https://pastebin.com/HJKPQyz0
2022-10-17 08:42:01 +0200elbear(~lucian@188.24.138.239)
2022-10-17 08:42:02 +0200 <tbd> Yeah, correct, I'm using `Ptr CString` which feels right. :)
2022-10-17 08:43:06 +0200 <tbd> I just do not have a clue at all what to do with the `const`.
2022-10-17 08:44:16 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 08:45:42 +0200 <jackdk> I would try a GHC issue, and if you get a good answer make a PR against the users guide
2022-10-17 08:46:45 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-17 08:48:06 +0200hask(~robert@ext-1-087.eduroam.chalmers.se)
2022-10-17 08:48:14 +0200 <hask> hello!
2022-10-17 08:48:39 +0200 <hask> I have a quick question -- If I need to get something unique to a forkIO'd thread, any suggestions?
2022-10-17 08:49:11 +0200 <hask> E.g the ThreadID type is stated to be abstract, so it seems unsuitable to deconstruct it and access the identifier inside
2022-10-17 08:49:28 +0200 <hask> I essentially need to generate a directory whose name is unique to the current thread
2022-10-17 08:50:47 +0200 <tbd> hask: Can the temporary package what you need?
2022-10-17 08:51:11 +0200 <hask> Right, from a first look this seems to be exactly what I need
2022-10-17 08:51:14 +0200 <jackdk> The problem you're describing might be well-solved by `mkdtemp` from `unix`
2022-10-17 08:51:15 +0200 <hask> Thanks
2022-10-17 08:51:41 +0200 <jackdk> orrr the `temporary` package tbd mentions, which has a more ergonomic interface
2022-10-17 08:52:00 +0200 <hask> Temporary seem quite intuitive
2022-10-17 08:52:04 +0200 <jackdk> Agreed
2022-10-17 08:52:16 +0200 <hask> Thanks for the help
2022-10-17 08:52:47 +0200 <hask> Hm, before I proceed, my own current usecase for this is to generate unique directories, but there might be other applications for what I am thinking
2022-10-17 08:53:13 +0200 <hask> If you disregard my mentioned case above, and consider the original problem, how could I get a unique 'secret' inside a specific thread?
2022-10-17 08:54:07 +0200 <hask> I see that I got a weird nickname here btw -- for transparency, I am Robert Krook
2022-10-17 08:55:48 +0200raym(~aritra@user/raym)
2022-10-17 08:55:58 +0200 <tbd> hask: Not exactly sure what the requirements are here, but I guess the best way is to pass it
2022-10-17 08:55:58 +0200 <tbd> in from the outside.
2022-10-17 08:57:07 +0200michalz(~michalz@185.246.207.200)
2022-10-17 09:01:34 +0200tbd`(~user@2a00:6020:4119:a000:c9f0:5478:d0b7:cde5)
2022-10-17 09:03:29 +0200nate1(~nate@98.45.169.16)
2022-10-17 09:04:18 +0200 <[Leary]> hask: ThreadId is abstract, but that abstract interface includes Show, and show is presumably injective. You can use that String directly or hash it or whatnot.
2022-10-17 09:05:26 +0200 <[Leary]> Another option is to write a wrapper over `forkIO` that generates and provides a unique symbol, using e.g. Data.Unique.
2022-10-17 09:05:56 +0200tbd(~user@2a00:6020:4119:a000:37c5:734f:1b84:a7c2) (Ping timeout: 260 seconds)
2022-10-17 09:06:18 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:6bf9:1eed:edc8:e002)
2022-10-17 09:06:23 +0200 <jackdk> Or generate something like a guid?
2022-10-17 09:06:25 +0200kenran`(~user@user/kenran)
2022-10-17 09:06:25 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-17 09:07:53 +0200kenran(~user@user/kenran) (Ping timeout: 250 seconds)
2022-10-17 09:08:01 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-17 09:09:12 +0200 <talismanick> How can I enable brittany support in HLS?
2022-10-17 09:13:57 +0200raym(~aritra@user/raym) (Ping timeout: 250 seconds)
2022-10-17 09:14:43 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-10-17 09:16:26 +0200 <tomsmeding> disco-dave[m]: wtf TIL about that issue. Thanks I hate it...
2022-10-17 09:18:30 +0200sagax(~sagax_nb@user/sagax) (Remote host closed the connection)
2022-10-17 09:18:37 +0200 <dminuoso> Im falling in love with flatparse https://gist.github.com/dminuoso/a888cc62b0d5d862f5db157e8519e2dc
2022-10-17 09:19:21 +0200 <dminuoso> It even brings TH helpers to unroll this loop for literals. :)
2022-10-17 09:20:01 +0200raym(~aritra@user/raym)
2022-10-17 09:20:06 +0200 <Axman6> looks like C to me :P
2022-10-17 09:20:31 +0200 <dminuoso> You should see the rest of my module :P
2022-10-17 09:20:37 +0200 <Axman6> trying to understand what's actually going on here, since nothing's being returned
2022-10-17 09:20:56 +0200 <dminuoso> scanXX# is a primitive that will parse and match against a word XX bits wide exactly
2022-10-17 09:21:25 +0200 <Axman6> oh, this is matching a bytestring literal?
2022-10-17 09:21:30 +0200 <dminuoso> Yes
2022-10-17 09:21:31 +0200 <Axman6> "literal", you know what I mean
2022-10-17 09:21:35 +0200 <Axman6> lovely
2022-10-17 09:21:50 +0200 <dminuoso> And instead of doing this in Word8 chunks, this will use native word sizse
2022-10-17 09:21:58 +0200 <tomsmeding> is this faster than comparing lengths and then calling out to memcmp()
2022-10-17 09:22:00 +0200 <Axman6> I wrote similar code for the last attempt of text-utf8 before theone that finally succeeded
2022-10-17 09:22:08 +0200 <dminuoso> tomsmeding: Mmmm!
2022-10-17 09:22:27 +0200 <Axman6> yeah that's the correct solution - but there are probably small lengths where this is faster
2022-10-17 09:22:34 +0200 <tomsmeding> Axman6: fair
2022-10-17 09:22:54 +0200 <tomsmeding> but reimplementing memcmp() is always fraught :p
2022-10-17 09:22:58 +0200 <tomsmeding> performance-wise
2022-10-17 09:23:02 +0200 <Axman6> yeah
2022-10-17 09:23:05 +0200 <dminuoso> Well you can just unsafe FFI call into memcmp
2022-10-17 09:23:21 +0200 <tomsmeding> still has a non-zero overhead, even though small
2022-10-17 09:23:32 +0200 <tomsmeding> but I expect that to be faster for sufficiently long bytestrings
2022-10-17 09:23:49 +0200 <dminuoso> Indeed, I mean I just intend to match small bytestring literals like "integer"
2022-10-17 09:23:55 +0200 <Axman6> I reckon you'd be able to find a small length where just doing the check in Haskell is faster than making the call to memcmp
2022-10-17 09:24:33 +0200 <dminuoso> I do some benchmarking then
2022-10-17 09:24:44 +0200 <tomsmeding> at those lengths, given that length "integer" < 8, I wouldn't even be sure whether the 64-bit stage actually helps you -- one more check for potentially little benefit
2022-10-17 09:24:58 +0200 <Axman6> criterion should be able to tell you where the crossover point (on your system) is
2022-10-17 09:25:06 +0200 <dminuoso> tomsmeding: I dont think that matters realistically.
2022-10-17 09:25:11 +0200 <tomsmeding> :p
2022-10-17 09:25:12 +0200 <dminuoso> quotRem will compile into a single machine instruction
2022-10-17 09:25:29 +0200 <dminuoso> So the only price is an additional branch that may not be used
2022-10-17 09:25:36 +0200 <tomsmeding> yeah it's miniscule
2022-10-17 09:26:06 +0200 <tomsmeding> it was only half-serious, but in microbenchmarks like memcmp() on length 7 (!), all bets are off
2022-10-17 09:26:15 +0200spaced(uid572193@user/spaced) (Quit: Connection closed for inactivity)
2022-10-17 09:26:48 +0200 <dminuoso> You have to be super careful to clear the cache between runs
2022-10-17 09:27:01 +0200 <tomsmeding> or to not
2022-10-17 09:27:10 +0200 <dminuoso> Well I guess both and then compare results.
2022-10-17 09:27:12 +0200 <tomsmeding> depends on whether you want to time the cold or the hot case :p
2022-10-17 09:27:31 +0200 <dminuoso> So this is an interesting case
2022-10-17 09:27:44 +0200 <tomsmeding> dependnig on how the input string gets to you, some part of it might already be in cache
2022-10-17 09:28:03 +0200 <dminuoso> For ultra small chunks you will want to include cache, since its likely that stride detectors will prefetch it ahead of time
2022-10-17 09:28:15 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-17 09:28:22 +0200 <dminuoso> but for large chunks, you definitely want to measure this cold
2022-10-17 09:28:26 +0200 <dminuoso> (given that we are in a parser setting)
2022-10-17 09:28:37 +0200 <Axman6> also, don't forget the prefetch instructions you can add to this!
2022-10-17 09:28:48 +0200 <dminuoso> Does GHC have prefetch prims?
2022-10-17 09:28:53 +0200 <Axman6> yep
2022-10-17 09:28:59 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 09:29:18 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 09:29:32 +0200 <Axman6> https://hackage.haskell.org/package/ghc-prim-0.7.0/docs/GHC-Prim.html#g:36
2022-10-17 09:29:33 +0200 <dminuoso> So I think prefetch prims would make most sense in the TH unrolled version of this.
2022-10-17 09:29:44 +0200 <dminuoso> Because you *know* how much to prefetch
2022-10-17 09:29:47 +0200 <Axman6> yeah
2022-10-17 09:30:34 +0200 <Axman6> and if the streing is short enough you wouldn't bother
2022-10-17 09:30:56 +0200 <Axman6> string too
2022-10-17 09:30:57 +0200 <dminuoso> Mmm, with the TH helper you likely rarely have long enough strings for prefetching to be worth it.
2022-10-17 09:30:59 +0200acidjnk(~acidjnk@p200300d6e7137a21d59bab4b536388a8.dip0.t-ipconnect.de)
2022-10-17 09:31:09 +0200 <dminuoso> Or well I guess it is useful if you exceed 8 bytes...
2022-10-17 09:31:12 +0200 <dminuoso> Which might not be so rare
2022-10-17 09:31:17 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-17 09:31:40 +0200 <tomsmeding> are the bytestrings you're matching compile-time constants
2022-10-17 09:32:04 +0200 <dminuoso> tomsmeding: Sure! I just wrote `bytestring` because it was a bit more convenient for the parser. :P
2022-10-17 09:32:10 +0200 <tomsmeding> if so, decent speedup from computing the straight-line code in advance with TH (not sure that's what you were referring to before)
2022-10-17 09:32:36 +0200 <tomsmeding> (one copy for each distinct length)
2022-10-17 09:32:53 +0200elbear(~lucian@188.24.138.239)
2022-10-17 09:32:57 +0200 <tomsmeding> or hand-tune per-length per-machine lol
2022-10-17 09:32:57 +0200 <dminuoso> https://hackage.haskell.org/package/flatparse-0.3.5.1/docs/src/FlatParse.Basic.html#scanBytes%23
2022-10-17 09:32:59 +0200 <dminuoso> This
2022-10-17 09:33:30 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 09:33:45 +0200 <dminuoso> Oh actually I realize, I can safe myself the length check if I just test the remaining length once at the beginning
2022-10-17 09:33:54 +0200chomwitt(~chomwitt@2a02:587:dc1e:5e00:35ee:8105:5f30:c2c7) (Quit: Leaving)
2022-10-17 09:34:12 +0200 <dminuoso> Oh haha. Actually I dont have any length checks yet. :>
2022-10-17 09:34:28 +0200 <dminuoso> Memory corruption barely avoided.
2022-10-17 09:34:40 +0200 <talismanick> I'm not a fan of excessively vertical code. Which formatters try to keep functions to fewer, longer lines like Brittany?
2022-10-17 09:35:00 +0200 <dminuoso> talismanick: I would try and develop a handwritten style
2022-10-17 09:35:07 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
2022-10-17 09:35:17 +0200 <talismanick> ?
2022-10-17 09:35:26 +0200 <Axman6> yeah Haskell doesn't lend itself particularly well to machine formatting IMO
2022-10-17 09:35:38 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74) (Remote host closed the connection)
2022-10-17 09:35:55 +0200 <Axman6> imports etc are fine, but actual code often benefits for good hand weitten veritcal alignment
2022-10-17 09:35:58 +0200 <Axman6> r*
2022-10-17 09:35:59 +0200tbd`(~user@2a00:6020:4119:a000:c9f0:5478:d0b7:cde5) (Remote host closed the connection)
2022-10-17 09:36:14 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 09:36:34 +0200whatsupboy(~whatsupbo@2a01:4f9:c011:4b51::1) (Quit: brb)
2022-10-17 09:37:36 +0200 <dminuoso> I would argue that formatters are rarely a good idea (outside of a very limited scope like imports). Programming languages are not just for communicating with the compiler, they are more importantly for communicating with the programmer. A formatter will generally have a hard time understanding what you want to communicate.
2022-10-17 09:37:38 +0200 <talismanick> Really? If I'm reading someone else's code, I typically navigate blockwise (along the AST) with shm.el while looking at the type signature
2022-10-17 09:37:54 +0200 <dminuoso> I dont have strict ruels for the most part, I vary formatting locally to express certain facts.
2022-10-17 09:38:02 +0200 <dminuoso> Sometimes I add redundant parens because it helps readability
2022-10-17 09:38:05 +0200 <Axman6> me too
2022-10-17 09:38:07 +0200 <talismanick> I hardly visually parse code... I like to have more on my screen so it's in working memory
2022-10-17 09:38:09 +0200 <Axman6> we should be friends dminuoso
2022-10-17 09:38:30 +0200 <talismanick> shm.el and paredit.el (its inspiration) are great
2022-10-17 09:40:08 +0200 <probie> I'm not a huge fan of vertical alignment, it creates a lot of noise in diffs
2022-10-17 09:40:24 +0200 <Axman6> only with poor diff tools
2022-10-17 09:40:27 +0200 <merijn> Axman6: See also: https://twitter.com/comerijn/status/1257804634833420292
2022-10-17 09:40:34 +0200 <Axman6> code is for me, not diffs
2022-10-17 09:40:59 +0200 <merijn> probie: That's why whitespace ignoring diffs exist in literally every diff/version control system that matters :)
2022-10-17 09:41:12 +0200 <dminuoso> merijn's remark in the second comment has the really relevant bit:
2022-10-17 09:41:19 +0200 <dminuoso> `code is read more often than it's written` (or read in diffs)
2022-10-17 09:41:30 +0200 <merijn> I look at diffs a lot
2022-10-17 09:41:39 +0200 <merijn> but I also use whitespace ignoring diff :p
2022-10-17 09:41:43 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-10-17 09:41:45 +0200 <dminuoso> I look at code more, given that I constantly read contextual code while Im writing.
2022-10-17 09:41:46 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
2022-10-17 09:41:56 +0200 <hask> exit
2022-10-17 09:41:59 +0200hask(~robert@ext-1-087.eduroam.chalmers.se) (Quit: Lost terminal)
2022-10-17 09:42:09 +0200 <tdammers> anyone who has ever reviewed a long-lived PR on a large real-world codebase can tell you that diff ergonomics matter greatly
2022-10-17 09:42:33 +0200 <dminuoso> tdammers: That's absolutely fair. For starters, everybody should be using diff3 style over diff2!
2022-10-17 09:42:57 +0200 <dminuoso> (It's beyond me how `git` even defaults to `diff2`...)
2022-10-17 09:42:58 +0200 <talismanick> I mean, I find it easier to read code when it's a) all on my screen b) structurally navigable (which alleviates the need to space it out vertically for legibility)
2022-10-17 09:43:46 +0200 <Axman6> GitHub's UI does a pretty great job these days with showing the core of the diff and ignoring the whitespace changes needed to facilitate it
2022-10-17 09:43:47 +0200 <tdammers> and here's the thing with vertical aligning: even with whitespace-ignorant diffing, the *merge* that inevitably follows is still hampered by it
2022-10-17 09:43:48 +0200 <talismanick> so, it really annoyed me when my settings for Brittany (which does what I want, mostly) stopped working (no clue why)
2022-10-17 09:44:00 +0200 <dminuoso> Perhaps the biggest problem of vertical alignment is that we use text to communicate code. If we just expressed the AST, then something like formatting could be controlled via a separate style hinting language, potentially even overwritten by rendering preference
2022-10-17 09:44:40 +0200 <Axman6> yeah every few years someone reinvents flexible tabs and then no one ever gets them working
2022-10-17 09:44:50 +0200 <tdammers> if you use newlines + indentation instead of vertical alignment, then the textual representation reflects the AST structure
2022-10-17 09:44:55 +0200 <Axman6> the world needs more Unison
2022-10-17 09:45:10 +0200 <talismanick> I was actually just thinking of mentioning Unison lol
2022-10-17 09:45:15 +0200 <dminuoso> tdammers: Mmm, can you elaborate on that?
2022-10-17 09:45:16 +0200 <talismanick> (not sure if it's offtopic or not)
2022-10-17 09:45:36 +0200 <Axman6> Unison is like Haskell#
2022-10-17 09:45:38 +0200 <talismanick> making the hashed representation the canonical one fixes so much
2022-10-17 09:45:54 +0200 <dminuoso> |> looks elixirish.
2022-10-17 09:46:01 +0200 <merijn> Structural editing and structural VC are the way
2022-10-17 09:46:12 +0200 <merijn> But no one wanted to fund my PhD on those :p
2022-10-17 09:46:20 +0200 <dminuoso> merijn: Sandy Maguire did work on that.
2022-10-17 09:46:27 +0200 <dminuoso> It just headed a different way than originally planned...
2022-10-17 09:46:32 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 09:46:32 +0200 <talismanick> merijn: thoughts on https://github.com/vcmiraldo/hdiff?
2022-10-17 09:46:47 +0200 <Axman6> 404
2022-10-17 09:46:50 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 09:46:53 +0200 <dminuoso> Wingman was supposed to be a structural editing mechanism, arosen from the idea of what it would take to enable programming on a tablet while sitting on a bench in the park
2022-10-17 09:46:55 +0200 <talismanick> https://github.com/VictorCMiraldo/hdiff
2022-10-17 09:47:04 +0200 <dminuoso> But wingman has become something...; else..
2022-10-17 09:47:07 +0200 <talismanick> remembered his handle wrong lol
2022-10-17 09:47:16 +0200 <tdammers> dminuoso: tricky over IRC, but I'll try. The idea is that every AST node (or actually CST, but let's squint a little here) is either represented as a single line of code, or as one line followed by the sub-nodes, indented one level deeper
2022-10-17 09:48:09 +0200 <tdammers> this way, you never need to vertically align anything beyond the natural indentation, and that natural indentation already produces the correct alignments - except when you keep a node collapsed on a single line
2022-10-17 09:48:20 +0200 <dminuoso> Yeah gotcha
2022-10-17 09:48:27 +0200 <merijn> talismanick: Pretty neat stuff
2022-10-17 09:48:29 +0200 <talismanick> My impression is that it's to darcs('s patch-based model) as Unison is to Haskell
2022-10-17 09:49:03 +0200 <talismanick> or, at least, could serve as a basis for such
2022-10-17 09:49:07 +0200 <merijn> talismanick: Somewhat relatedly, in the category of Haskell superpowers there's a diff library for ADTs that produces diff for arbitrary ADT values
2022-10-17 09:49:13 +0200 <Axman6> wasn't there an alternative syntax someone made for Haskell that was more more indentation based? sounds like what you're talking about tdammers
2022-10-17 09:49:41 +0200 <tdammers> Axman6: I don't think you need an alternative syntax for that; plain Haskell gets you 99% there, you just need to follow the conventions consistently
2022-10-17 09:49:46 +0200 <talismanick> Axman6: are you talking about the Markdown-related one?
2022-10-17 09:49:51 +0200 <tdammers> (which, I admit, I don't always do either...)
2022-10-17 09:50:04 +0200 <Axman6> so each function's arguments were on new lines and indented more than the function, and if arguments to that function were other functions, there was no need for brackets, because you'd just indent the arguments more
2022-10-17 09:50:16 +0200vn36__(~vn36@123.63.203.210) (Ping timeout: 260 seconds)
2022-10-17 09:50:16 +0200 <tdammers> oh, like that, eww
2022-10-17 09:50:37 +0200 <tdammers> "layout on crack", a.k.a. "python"
2022-10-17 09:51:04 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 09:51:04 +0200 <dminuoso> tdammers: But yeah it makes perfect sense. This is like the common tree printing algorithm.
2022-10-17 09:51:12 +0200 <tdammers> dminuoso: exactly.
2022-10-17 09:51:39 +0200 <Axman6> https://gist.github.com/axman6-da/586937ed83233823a138c1e247a3bc1d
2022-10-17 09:51:49 +0200 <talismanick> https://web.archive.org/web/20220905031105/https://chrisdone.com/posts/z/ ?
2022-10-17 09:51:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-17 09:52:07 +0200 <Axman6> uh, wrong
2022-10-17 09:52:17 +0200 <tdammers> Axman6: yeah, I get it, but IMO that causes a truckload of other problems (as it does in Python)
2022-10-17 09:52:19 +0200 <Axman6> fixed
2022-10-17 09:52:38 +0200 <talismanick> Axman6: ^ ?
2022-10-17 09:53:10 +0200 <talismanick> idk why, but it 404's on the live page (even though it's linked to as a "Popular Article")
2022-10-17 09:53:45 +0200 <talismanick> not that Z has been a tasteful name for a language this past year >_>
2022-10-17 09:53:56 +0200 <Axman6> I meant my code was wrong, and I fixed it
2022-10-17 09:54:20 +0200 <talismanick> I meant, is the link I sent what you were talking about?
2022-10-17 09:54:25 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-17 09:54:36 +0200 <Axman6> yeah that looks about right
2022-10-17 10:01:36 +0200razetime(~quassel@117.193.4.27) (Ping timeout: 264 seconds)
2022-10-17 10:04:39 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-17 10:07:32 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-17 10:11:29 +0200shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-10-17 10:13:20 +0200 <talismanick> merijn: link to that diff library?
2022-10-17 10:13:40 +0200 <talismanick> phadej's tree-diff?
2022-10-17 10:14:11 +0200fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2022-10-17 10:14:43 +0200 <merijn> yeah
2022-10-17 10:14:50 +0200 <merijn> It's pretty amazing for debugging
2022-10-17 10:15:10 +0200talismanickscribbles down ideas for using new toy
2022-10-17 10:15:36 +0200 <merijn> It's the kinda shit that makes you think all your work in other languages is stone age nonsense
2022-10-17 10:17:07 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 248 seconds)
2022-10-17 10:17:27 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 10:17:36 +0200 <talismanick> oh, gdiff looks nice... been playing around lately with GADTs and free monads in polysemy
2022-10-17 10:18:02 +0200 <talismanick> too bad it's so old
2022-10-17 10:21:33 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 10:22:50 +0200teo(~teo@user/teo)
2022-10-17 10:22:55 +0200 <dminuoso> So?
2022-10-17 10:23:08 +0200 <dminuoso> This is the type of library that is simply... done.
2022-10-17 10:23:15 +0200 <dminuoso> It has no non-base dependencies to ever bump.
2022-10-17 10:23:26 +0200vn36(~vn36@123.63.203.210)
2022-10-17 10:23:35 +0200 <dminuoso> And it has a liberal base constraint that, in all likelihood, will work for a long time.
2022-10-17 10:24:28 +0200 <dminuoso> There's not really any relevant open issues either
2022-10-17 10:26:35 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-17 10:26:38 +0200 <tdammers> it's ridiculous how the idea that code "ages" has spread
2022-10-17 10:26:38 +0200razetime(~quassel@117.193.4.27)
2022-10-17 10:28:49 +0200 <merijn> tdammers: Seems easy to understand if you only ever do JS/python development :p
2022-10-17 10:29:02 +0200 <merijn> because there anything that wasn't used the past month probably *is* broken xD
2022-10-17 10:29:31 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-10-17 10:29:50 +0200titibandit(~titibandi@xdsl-78-34-208-230.nc.de) (Remote host closed the connection)
2022-10-17 10:29:59 +0200 <dminuoso> Im personally a big fan of *stable* APIs too. If your code works 10 years from now, that's a big plus.
2022-10-17 10:30:13 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-10-17 10:30:45 +0200 <dminuoso> But that gets into a different kind of discussion, as that's a compromise between initial release speed, good ergonomics and stability.
2022-10-17 10:31:03 +0200 <dminuoso> One usually must take the backseat
2022-10-17 10:31:38 +0200 <tdammers> merijn: yeah, but that's the ridiculous bit. the code itself doesn't actually "age", it's still exactly the same code. it's just that people decide every other week that the execution environment must change in incompatible ways, for some reason.
2022-10-17 10:32:08 +0200 <dminuoso> tdammers: Hah what is amazing, is how many compatibility shims and libraries exist in the JS world.
2022-10-17 10:32:32 +0200 <dminuoso> The fact that you have entire repositories of compiler plugins designed just for forward or backward compability is just absurd.
2022-10-17 10:33:07 +0200 <dminuoso> But things like `base-compat-batteries` have started to become more and more popular on hackage too
2022-10-17 10:34:33 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-17 10:34:48 +0200 <merijn> Adding forward compat to old base versions is a lot more sound than a lot of the stuff happening in the JS world, though
2022-10-17 10:34:59 +0200 <merijn> So I don't think you can put those at the same level
2022-10-17 10:35:13 +0200 <tdammers> I guess it's a natural development for a language whose origins trace back to the browser wars and weaponized incompatibilities
2022-10-17 10:35:48 +0200 <Hecate> tbh I wouldn't overhype the usage of base-compat-batteries, it's really not used directly that much
2022-10-17 10:36:01 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 10:36:07 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74)
2022-10-17 10:36:55 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:3d5a:c60:7a1a:1513)
2022-10-17 10:37:02 +0200 <merijn> It has a whopping 21 reverse dependencies
2022-10-17 10:37:45 +0200 <dminuoso> It's in aeson.
2022-10-17 10:37:56 +0200 <dminuoso> Which means a quarter of hackage has it.
2022-10-17 10:38:07 +0200 <merijn> yeah, but if aeson dropped it, they wouldn't
2022-10-17 10:38:21 +0200 <dminuoso> aeson does not simply drop a dependency. they add.
2022-10-17 10:38:23 +0200 <dminuoso> :)
2022-10-17 10:40:11 +0200talismanick(~talismani@2601:200:c100:c9e0::1b0b) (Remote host closed the connection)
2022-10-17 10:40:40 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 10:41:01 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74) (Ping timeout: 260 seconds)
2022-10-17 10:41:28 +0200 <probie> Is there something smaller than base that one can depend on and isn't tied to specific GHC versions?
2022-10-17 10:43:00 +0200 <dminuoso> Well you can use.. no base?
2022-10-17 10:43:00 +0200MajorBiscuit(~MajorBisc@145.94.164.10)
2022-10-17 10:43:08 +0200 <dminuoso> :p
2022-10-17 10:43:31 +0200 <dminuoso> I suppose `ghc-prim` would work
2022-10-17 10:44:12 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net) (Ping timeout: 264 seconds)
2022-10-17 10:46:21 +0200szkl(uid110435@uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-17 10:46:37 +0200 <tomsmeding> is ghc-prim not tied to ghc versions?
2022-10-17 10:47:50 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 10:48:08 +0200kuribas(~user@ptr-17d51eoxcqlpawtoc5a.18120a2.ip6.access.telenet.be)
2022-10-17 10:48:44 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-10-17 10:49:13 +0200 <tomsmeding> should be noted, if you're interested in this space, that GHC always makes a module GHC.Prim available, built-into the compiler; that module is not in the ghc-prim docs
2022-10-17 10:50:15 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-10-17 10:53:00 +0200 <merijn> tomsmeding: It is
2022-10-17 10:53:22 +0200 <tomsmeding> right, so it's not really an answer to probie's question :p
2022-10-17 10:53:25 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 10:54:43 +0200 <probie> I want to be able to write something that will work "as is" in 5 years time without just closing my eyes and declaring a very optimistic base upper bound
2022-10-17 10:54:55 +0200 <merijn> probie: You can't
2022-10-17 10:55:09 +0200 <dminuoso> The expectation is completely unreasonable.
2022-10-17 10:55:13 +0200 <merijn> probie: But otoh, realistically, breaking changes in base are a Big Deal (TM)
2022-10-17 10:55:22 +0200 <dminuoso> You expect to work with an unspecified future compiler and magically expect it to be compatible.
2022-10-17 10:55:33 +0200 <dminuoso> These two things are incompatible
2022-10-17 10:55:46 +0200 <merijn> probie: If you use a conservative subset of base then the odds of it breaking are pretty damn small
2022-10-17 10:55:49 +0200 <dminuoso> Unless there was ever a memorando of understanding, that breaking changes are never introoduced
2022-10-17 10:55:53 +0200 <dminuoso> Like in the linux kernel
2022-10-17 10:56:06 +0200 <merijn> probie: I have some libraries where the only changes the past years are "bump base version"
2022-10-17 10:57:05 +0200 <merijn> btw, most underrated Haskell ecosystem feature is packdeps providing an RSS feed notifying you when your upperbounds exclude the most recent version of a dependency
2022-10-17 10:57:39 +0200 <merijn> I just have RSS feeds for my packages to see if/when I need to revisit bounds and don't think about otherwise
2022-10-17 10:57:43 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 10:58:11 +0200 <dminuoso> RSS sits right along IRC. Something ancient and "aged".
2022-10-17 10:58:25 +0200 <dminuoso> People just stopped using it in favour of drastically more complicated and less reliable things
2022-10-17 10:58:37 +0200 <dminuoso> Twitter and Matrix. :p
2022-10-17 10:58:40 +0200elbear(~lucian@188.24.138.239)
2022-10-17 10:58:50 +0200 <merijn> RSS is still amazing
2022-10-17 10:58:53 +0200 <dminuoso> So is IRC!
2022-10-17 10:59:29 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-17 10:59:48 +0200wonko(~wjc@2a0e:1c80:2:0:45:15:19:130)
2022-10-17 11:00:09 +0200TrueBlue[m](~busterblu@2001:470:69fc:105::1:d7e8) (Quit: You have been kicked for being idle)
2022-10-17 11:03:37 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-17 11:03:42 +0200 <merijn> dminuoso: Have you seen the bazqux RSS aggregator?
2022-10-17 11:05:19 +0200razetime(~quassel@117.193.4.27) (Ping timeout: 250 seconds)
2022-10-17 11:05:41 +0200CiaoSen(~Jura@p200300c9570723002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-10-17 11:05:49 +0200razetime(~quassel@117.193.4.27)
2022-10-17 11:11:18 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2022-10-17 11:11:35 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 11:14:22 +0200__monty__(~toonn@user/toonn)
2022-10-17 11:14:32 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 11:16:19 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 11:19:51 +0200`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net)
2022-10-17 11:22:47 +0200nate1(~nate@98.45.169.16)
2022-10-17 11:22:57 +0200vn36(~vn36@123.63.203.210) (Ping timeout: 252 seconds)
2022-10-17 11:24:50 +0200vn36_(~vn36@123.63.203.210)
2022-10-17 11:27:43 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-17 11:31:29 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-10-17 11:31:56 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-10-17 11:37:31 +0200ft(~ft@p3e9bc57b.dip0.t-ipconnect.de) (Quit: leaving)
2022-10-17 11:54:58 +0200jumper149(~jumper149@base.felixspringer.xyz)
2022-10-17 11:56:11 +0200 <jumper149> Does GHC collect garbage concurrently, when compiled with `-threaded` or do I need anything else? I found `--nonmoving-gc`, but the manual says "Hopefully, you won’t need any of these in normal operation".
2022-10-17 11:56:17 +0200elbear(~lucian@188.24.138.239)
2022-10-17 11:56:27 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-10-17 11:57:58 +0200 <merijn> jumper149: No, GC is always stop the world. The non-moving GC aims to stop the world for shorter, bounded times, but still stop the world
2022-10-17 11:58:15 +0200 <merijn> jumper149: Also, why do you think you need concurrent GC?
2022-10-17 11:58:24 +0200 <geekosaur> there is *parallel* gc but until 9.2.x it didn't work well
2022-10-17 11:58:36 +0200 <merijn> geekosaur: Even in 9.2 it's not great afaik
2022-10-17 11:58:39 +0200 <geekosaur> (parallel != cooncurrent)
2022-10-17 11:59:11 +0200 <merijn> geekosaur: Even Simon Marlow recommended non-parallel GC when (did it already happen?) GHC makes -threaded the default
2022-10-17 12:00:20 +0200 <geekosaur> if it happened it'd be in 9.4
2022-10-17 12:00:37 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-17 12:00:43 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-17 12:00:57 +0200 <geekosaur> but I think it hasn't happened yet
2022-10-17 12:01:02 +0200 <geekosaur> maybe 9.6
2022-10-17 12:02:09 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-10-17 12:02:27 +0200califax(~califax@user/califx) (Ping timeout: 258 seconds)
2022-10-17 12:05:55 +0200razetime(~quassel@117.193.4.27) (Ping timeout: 248 seconds)
2022-10-17 12:17:39 +0200 <dminuoso> Axman6: Mmm, we should take cache line alignment into consideration too!
2022-10-17 12:17:48 +0200 <jumper149> Is there anything fundamental, that makes parallel gc hard? I expected it to be quite straightforward? The addresses in memory are accessible by any thread, right?
2022-10-17 12:18:06 +0200 <dminuoso> Blindly just grabbing 64 byte chunks is likely not efficient if you cross cache lines.
2022-10-17 12:18:20 +0200 <dminuoso> That's actually a problem in the TH unrolled helper too.
2022-10-17 12:19:00 +0200CiaoSen(~Jura@p200300c9570723002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-10-17 12:19:02 +0200 <geekosaur> jumper149, that's actually part of the problem. you need to at some point stop all capabilities to do updates, since otherwise any thread might try to access memory while it's being moved
2022-10-17 12:19:25 +0200 <dminuoso> I mean for small strings around the size of 8, it will increase thrashing.
2022-10-17 12:19:41 +0200 <dminuoso> Though.. mmm. I dont think you can get around that here
2022-10-17 12:21:54 +0200 <merijn> jumper149: Also in many cases the parallelism just doesn't gain you much
2022-10-17 12:21:57 +0200 <merijn> It's kinda niche
2022-10-17 12:22:08 +0200 <merijn> parallelism is great if you have a large working set
2022-10-17 12:22:27 +0200 <merijn> But large working sets are bad anyway and generational GC already helps make that less of an issue
2022-10-17 12:23:04 +0200 <merijn> Lazy code tends to allocate *tons* and produce *lots* of garbage, so these are things GHC's GC are tuned for. Allocation is dirt cheap and garbage is free
2022-10-17 12:23:40 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-10-17 12:23:43 +0200afotgkmnzj7asv3r(~afotgkmnz@2001:470:69fc:105::c24b)
2022-10-17 12:23:45 +0200 <merijn> The downside is that concurrent GC is kinda hard with that design. But concurrent GC is mostly relevant for code that can't tolerate a GC pause (i.e. only really real time code)
2022-10-17 12:24:06 +0200 <juri_> merijn: and security related.
2022-10-17 12:24:10 +0200 <merijn> But if you don't have real time code, concurrent GC is most likely gonna be lower efficiency than GC pauses
2022-10-17 12:24:11 +0200`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 250 seconds)
2022-10-17 12:24:29 +0200 <juri_> (making two code paths take the same time always, in a lazy garbage collected language is hard)
2022-10-17 12:25:11 +0200 <merijn> juri_: Sure, but anyone asking these questions doesn't know enough to be writing security code to begin with :)
2022-10-17 12:25:32 +0200 <merijn> because that's the least of your issues with most languages
2022-10-17 12:26:03 +0200 <jumper149> I can agree, I didn't think about security at all :D
2022-10-17 12:26:36 +0200 <juri_> fair. :D
2022-10-17 12:27:04 +0200razetime(~quassel@117.193.4.27)
2022-10-17 12:27:30 +0200vglfr(~vglfr@145.224.100.100)
2022-10-17 12:27:53 +0200califax(~califax@user/califx)
2022-10-17 12:30:50 +0200 <merijn> jumper149: For most code that isn't real time, the thing you care about it "throughput" (or efficiency) i.e. what percentage of CPU time/cycles is spent on "work" vs spent on "GC". If "long" GC pauses get better efficiency, your code will (overall) take shorter to run than code with lower efficiency
2022-10-17 12:31:10 +0200 <jumper149> Overall I was just thinking, whether real time applications were possible with GHC. But there is really no way to take influence on the gc? Or are there primites to delay gc for some time for example?
2022-10-17 12:31:22 +0200 <merijn> jumper149: And in general GHC's GC produces pretty good efficiency
2022-10-17 12:31:33 +0200 <merijn> jumper149: It depends on how tight your deadlines are, etc.
2022-10-17 12:31:48 +0200 <merijn> But in general GHC's runtime isn't really designed with real time in mind
2022-10-17 12:31:49 +0200 <jumper149> merijn: I fully understand the efficiency vs latency
2022-10-17 12:32:16 +0200 <merijn> There's no (theoretical) reason you couldn't produce a more real time focussed runtime that would let you write real time code in Haskell
2022-10-17 12:32:25 +0200 <jumper149> Ok, I guess imperative languages like rust still have the edge in this case
2022-10-17 12:32:26 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
2022-10-17 12:32:28 +0200 <merijn> It's just A LOT of work and not many people caring about that
2022-10-17 12:32:48 +0200 <merijn> The people who are likely to care about real time would probably just use Rust, yeah
2022-10-17 12:33:01 +0200vn36_(~vn36@123.63.203.210) (Ping timeout: 260 seconds)
2022-10-17 12:33:05 +0200 <jumper149> Yeah, I guess the people, that do care, are more into Rust, C++, Zig, etc
2022-10-17 12:33:23 +0200 <merijn> jumper149: Note that it's not necessarily because imperative languages are better. It's more that "doing low level and real time stuff" was a core goal of Rust from the start
2022-10-17 12:33:29 +0200 <merijn> So every system has been designed with that in mind
2022-10-17 12:33:39 +0200 <tdammers> I think the big elephant in the room with realtime Haskell is memory allocations, yeah. The key thing you want with RT is keep allocations out of the RT-critical parts of the code, and Haskell just doesn't give you much control over that
2022-10-17 12:33:45 +0200 <juri_> i know some people who real time "in haskell". they use haskell to write C. ;)
2022-10-17 12:34:00 +0200 <merijn> juri_: Yeah, you might like Ivory (I think it was?)
2022-10-17 12:34:02 +0200 <merijn> eh
2022-10-17 12:34:09 +0200 <merijn> s/juri_/jumper149
2022-10-17 12:34:09 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 12:34:22 +0200 <merijn> It's a Haskell DSL for generating cryptographic code in C
2022-10-17 12:34:42 +0200 <merijn> I think there's a couple of other too
2022-10-17 12:34:44 +0200 <dminuoso> For what its worth, tracking ownership is possible in functional languages too. Clean does it attain huge performance boosts, as it can turn pure updates into in-place memory manipulation using its type system.
2022-10-17 12:35:23 +0200vn36(~vn36@123.63.203.210)
2022-10-17 12:35:26 +0200 <merijn> Right, the focus on lazy + application performance has just moved Haskell into a direction where optimising for realtime wasn't a concern for anyone actually working on the language
2022-10-17 12:35:46 +0200 <jumper149> merijn: That's pretty cool, but I didn't even have any actual TODO in mind ^^
2022-10-17 12:36:24 +0200 <jumper149> Yeah, I can see how it can go into that direction with the focus on lazyness
2022-10-17 12:36:54 +0200 <jumper149> Thanks for the help though :)
2022-10-17 12:37:00 +0200 <merijn> jumper149: And also, have a look at Clash (completely different thing, but still neat!)
2022-10-17 12:38:28 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 12:38:31 +0200shapr(~user@2a02:8106:31:b200:3858:16dd:1a2:d1d1)
2022-10-17 12:40:38 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
2022-10-17 12:41:43 +0200`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net)
2022-10-17 12:51:40 +0200yushyin(wEE1cEPkfk@mail.karif.server-speed.net) (Quit: WeeChat 3.4.1)
2022-10-17 12:51:50 +0200yushyin(U26EzVMO8P@mail.karif.server-speed.net)
2022-10-17 12:52:11 +0200 <juri_> clash is awesome. one of these days.. :)
2022-10-17 12:54:46 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-17 12:57:20 +0200Guest54(~Guest54@base.felixspringer.xyz)
2022-10-17 12:57:55 +0200Guest54(~Guest54@base.felixspringer.xyz) (Client Quit)
2022-10-17 13:05:37 +0200vn36(~vn36@123.63.203.210) (Ping timeout: 252 seconds)
2022-10-17 13:06:45 +0200 <dminuoso> merijn: If you find a poor soul wanting to do a PhD, I really would like a P4 variant of it!
2022-10-17 13:06:51 +0200 <dminuoso> >:)
2022-10-17 13:07:24 +0200 <dminuoso> Though sadly, I think the P4 user base is incredibly small and limited already.
2022-10-17 13:08:32 +0200 <shapr> what did I miss?
2022-10-17 13:08:38 +0200 <shapr> a P4 variant of what?
2022-10-17 13:08:42 +0200 <dminuoso> Of clash
2022-10-17 13:08:45 +0200 <shapr> oh
2022-10-17 13:08:51 +0200 <dminuoso> well "variant" is a bit far stretched
2022-10-17 13:08:56 +0200 <shapr> I know clash, what's P4?
2022-10-17 13:09:11 +0200vglfr(~vglfr@145.224.100.100) (Ping timeout: 260 seconds)
2022-10-17 13:09:18 +0200 <dminuoso> Its a programming language for controlling forwarding planes in networking gear.
2022-10-17 13:09:30 +0200vglfr(~vglfr@145.224.100.100)
2022-10-17 13:09:31 +0200 <dminuoso> For high performance routers and switches
2022-10-17 13:10:15 +0200 <dminuoso> Fixed function ASICs have largely become a thing of the past for the same reasons general purpose CPUs run on microcode
2022-10-17 13:10:27 +0200 <shapr> oh interesting
2022-10-17 13:10:51 +0200vn36__(~vn36@123.63.203.210)
2022-10-17 13:11:13 +0200 <shapr> Is P4 sufficiently close to Verilog that clash would do the right thing?
2022-10-17 13:11:18 +0200 <shapr> or is there some other clash I don't know?
2022-10-17 13:11:22 +0200 <dminuoso> No. P4 is roughly similar to say megaparsec. :P
2022-10-17 13:11:27 +0200 <shapr> oh, ok
2022-10-17 13:12:03 +0200 <dminuoso> Essentially its a way to build stateful parsers but part of a networking pipeline
2022-10-17 13:12:04 +0200 <geekosaur> if you hated yourself you could probably reimplement megaparsec in verilog 🙂
2022-10-17 13:12:11 +0200 <dminuoso> That can decode and handle packets in nanosecond time
2022-10-17 13:13:00 +0200 <dminuoso> shapr: https://github.com/p4lang/tutorials/blob/master/exercises/basic_tunnel/solution/basic_tunnel.p4
2022-10-17 13:13:06 +0200 <dminuoso> This is an example of a P4 program
2022-10-17 13:21:06 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-17 13:23:02 +0200xff0x(~xff0x@2405:6580:b080:900:4d83:b51f:a73e:c986)
2022-10-17 13:25:18 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-17 13:29:11 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 250 seconds)
2022-10-17 13:30:46 +0200 <merijn> dminuoso: Can do a postdoc ;)
2022-10-17 13:30:53 +0200 <merijn> dminuoso: P4 is the routing shit, right?
2022-10-17 13:31:05 +0200 <dminuoso> Or switching, or encapsulation, but yeah.
2022-10-17 13:31:20 +0200 <merijn> dminuoso: my old group used to a bunch of shit like for SDN stuff
2022-10-17 13:31:36 +0200 <dminuoso> OpenFlow?
2022-10-17 13:31:46 +0200 <merijn> My promotor was doing a bunch of that, they wrote some P4 on GPU routing too
2022-10-17 13:31:51 +0200 <merijn> openflow and a bunch of other stuff
2022-10-17 13:31:55 +0200 <dminuoso> Neato
2022-10-17 13:36:13 +0200elbear(~lucian@188.24.138.239)
2022-10-17 13:39:38 +0200shapr(~user@2a02:8106:31:b200:3858:16dd:1a2:d1d1) (Ping timeout: 268 seconds)
2022-10-17 13:40:27 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 250 seconds)
2022-10-17 13:45:26 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
2022-10-17 13:50:47 +0200sshine_sshine
2022-10-17 13:53:50 +0200Profpatsch(~Profpatsc@static.88-198-193-255.clients.your-server.de)
2022-10-17 13:54:07 +0200 <sshine> does anyone have a link to some write-up discussing why the Def type class isn't popular among Haskellers?
2022-10-17 13:55:01 +0200 <Profpatsch> sshine: Mostly cause a) it’s not in base so effort to import and an additional dependency b) it’s inflexible compared to the default* pattern
2022-10-17 13:55:16 +0200 <geekosaur> I don't have a link but I can explain it. defaults are contextual, not per type
2022-10-17 13:55:38 +0200 <Profpatsch> c) it’s hard for reader because it infers data from context
2022-10-17 13:55:42 +0200 <Profpatsch> *for the reader
2022-10-17 13:56:05 +0200 <merijn> Also, "default" doesn't generalise
2022-10-17 13:56:12 +0200 <merijn> Like, what the hell is "the default Integer"?
2022-10-17 13:56:19 +0200 <sshine> Profpatsch, what's "the default* pattern"?
2022-10-17 13:56:21 +0200 <Profpatsch> merijn: 0 according to go :P
2022-10-17 13:56:32 +0200 <merijn> Almost all values have multiple sensible defaults and Def elevates one fairly randomly
2022-10-17 13:56:42 +0200 <Profpatsch> sshine: if you have a type like HttpOptions you provide a function defaultHttpOptions
2022-10-17 13:56:53 +0200 <merijn> The "most useful" case of Def is when you use it transitively to initialise a bunch of fields, but those defaults aren't general
2022-10-17 13:56:58 +0200 <Profpatsch> meaning you can also have a function defaultHttpOptionsSsl or something
2022-10-17 13:57:30 +0200 <sshine> I'm recording your answers, all of which align perfectly with what I believe, but I'm asking if anyone knows a write-up that I can refer to, kind of like when you write a Wikipedia article about your own opinion and you can't say "Scientists say..." just because you're a scientist. :-P
2022-10-17 13:57:36 +0200 <merijn> sshine: What does "instance Def Foo where def = ..." give me that "myDefault :: Foo; myDefault = ..." does not?
2022-10-17 13:57:44 +0200 <merijn> sshine: Fuck yes I can :p
2022-10-17 13:57:57 +0200 <merijn> I've been using "the doctor says so" to justify anything I want the past month!
2022-10-17 13:57:57 +0200 <sshine> merijn, citation needed!
2022-10-17 13:58:02 +0200 <Profpatsch> sshine: maybe you can write one called “why you shouldn’t use the Default trait/typeclass pattern and alternatives”
2022-10-17 13:58:13 +0200 <merijn> sshine: "Merijn Verstraaten, personal communication on IRC" :)
2022-10-17 13:58:14 +0200 <sshine> merijn, an apple a day keeps yourself away? whoops!
2022-10-17 13:58:43 +0200 <merijn> Science got lame when we stopped citing "personal communication" :p
2022-10-17 13:58:51 +0200 <geekosaur> but tbh my main reference for Default being bad is https://github.com/xmonad/xmonad/commit/383ffb772e4a
2022-10-17 13:59:01 +0200 <Profpatsch> the Default pattern is something that sounds cool on first thought, then Rust puts it into its stdlib, then people start thinking about it in depth :PP
2022-10-17 14:00:14 +0200 <merijn> Some things just aren't written down, because they're too obvious
2022-10-17 14:00:32 +0200 <Profpatsch> merijn: my rule is that everything is obvious once you’ve internalized it
2022-10-17 14:00:39 +0200 <sshine> https://i.imgflip.com/6x7dz2.jpg
2022-10-17 14:00:39 +0200 <Profpatsch> but everything warrants documenting
2022-10-17 14:00:51 +0200 <merijn> Now I'm thinking about the guy arguing on reddit that dogs don't understand "finger pointing", because there was no research establishing they could >.>
2022-10-17 14:01:09 +0200 <merijn> Source: "I have interacted with the real world"
2022-10-17 14:01:20 +0200 <sshine> Profpatsch, I wish "then people start thinking about it" was what happened, but it's more like "then people start implementing Default for EVERY FREAKING THING THEY CAN"
2022-10-17 14:01:43 +0200 <Profpatsch> I hope I saved it somewhere
2022-10-17 14:01:49 +0200 <merijn> sshine: I blame English for conflating doctor and "physician" as if the latter isn't just a trade with pretensions :p
2022-10-17 14:04:00 +0200vn36__(~vn36@123.63.203.210) (Ping timeout: 264 seconds)
2022-10-17 14:05:29 +0200 <sshine> merijn, blame Default instances ;)
2022-10-17 14:05:32 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 268 seconds)
2022-10-17 14:05:59 +0200 <sshine> everyone knows doctors fix humans
2022-10-17 14:07:05 +0200poscat(~poscat@114.245.106.84) (Read error: Connection reset by peer)
2022-10-17 14:07:15 +0200 <sshine> geekosaur, thanks for giving me a concrete example of why Default is bad. :)
2022-10-17 14:07:19 +0200poscat(~poscat@2408:8206:4823:fd6f:98ab:5c38:136c:5932)
2022-10-17 14:08:05 +0200 <jackdk> one of these days I'll get around to writing "`Default`? With respect to what? Do you mean `Monoid`?" Until then, I recommend the aesthetically-pleasing instances at https://hackage.haskell.org/package/acme-default
2022-10-17 14:08:16 +0200elbear(~lucian@188.24.138.239)
2022-10-17 14:12:34 +0200 <sshine> jackdk, lol! "Current default False chosen by ertes, the answer to the question whether mniip has a favourite Bool."
2022-10-17 14:12:43 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-17 14:13:39 +0200elbear(~lucian@188.24.138.239)
2022-10-17 14:15:24 +0200 <sshine> another language feature that gets abused by my colleagues new to Rust is 'impl From<X> for Y' and then replace all named functions with .into(), because the first transformation of one type to another might just be the canonical. all your function compositions become these .into() chains. let bar: Bar = foo.into(); let baz: Baz = bar.into();
2022-10-17 14:16:19 +0200 <sshine> I also abuse language features that I discovered recently. I just spend more time exploring language features and apply the abuse in pet projects.
2022-10-17 14:17:30 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-17 14:18:01 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 260 seconds)
2022-10-17 14:18:15 +0200 <merijn> sshine: I write them in obscure gists to show off :p
2022-10-17 14:18:43 +0200 <merijn> Still proud of this atrocity: https://gist.github.com/merijn/6130082
2022-10-17 14:22:38 +0200 <sshine> merijn, hehe
2022-10-17 14:27:16 +0200 <Profpatsch> jackdk: that package makes the point pretty well :P
2022-10-17 14:28:05 +0200 <Profpatsch> oh, and RIP ertes
2022-10-17 14:28:22 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-10-17 14:28:23 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-17 14:28:33 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 250 seconds)
2022-10-17 14:30:18 +0200 <jumper149> merijn: You asked "what is the default Integer". I raise "What is the Semigroup on Integers?". This is a general problem with typeclasses. Idris solves it by having named implementations (instances), so you can have a Semigroup instance named `Plus` and one named `Mult` for example.
2022-10-17 14:31:00 +0200 <jumper149> In Haskell you just have to choose. Or you use newtypes I guess
2022-10-17 14:31:28 +0200 <tdammers> newtypes are kinda like the accepted "solution" for when you want more than one instance
2022-10-17 14:31:32 +0200 <merijn> jumper149: I'm not 100% convinced naming *solves* the problem :p
2022-10-17 14:32:02 +0200 <jackdk> If we had a better hierarchy than `Num` that had a `Ring` somewhere, we could make the canonical semigroup for numeric types plus-ish, and then replace `(<>)` with `(+)` everywhere
2022-10-17 14:32:57 +0200 <jumper149> merijn: Does `Double` have satisfy a ring structure?
2022-10-17 14:33:09 +0200 <jumper149> s/have//
2022-10-17 14:33:20 +0200 <tdammers> that's an orthogonal issue
2022-10-17 14:34:02 +0200 <[Leary]> jackdk: I'd rather we had `(+) :: Semigroup (Sum a) => a -> a -> a`, `(*) :: Semigroup (Product a) => a -> a -> a`.
2022-10-17 14:34:26 +0200 <jumper149> [Leary]: Honestly a nice idea.
2022-10-17 14:34:31 +0200 <tdammers> Numerical typeclasses on Double are wrong, but in a practical "but they should" kind of way; the issue with Semigroup Int is that a typeclass is fundamentally the wrong thing for modelling semigroups, it's just that we don't have anything better
2022-10-17 14:34:46 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 14:34:59 +0200 <tdammers> (or alternatively: naming the Semigroup typeclass after semigroups is wrong, but too tempting not to)
2022-10-17 14:35:02 +0200 <dminuoso> Are there efficient show numerical routines for bytestring like `Int -> ByteString`?
2022-10-17 14:35:08 +0200 <dminuoso> Well. Functions!
2022-10-17 14:35:11 +0200 <sshine> what are some examples of when speaking of defaults makes sense? besides "a configuration file" or "a default file path"
2022-10-17 14:35:12 +0200 <jumper149> Maybe C++ overloading was the best solution all along x)
2022-10-17 14:35:19 +0200 <merijn> dminuoso: What does you mean by "show numerical"
2022-10-17 14:35:23 +0200 <merijn> jumper149: Oh **god** no
2022-10-17 14:35:28 +0200elbear(~lucian@188.24.138.239)
2022-10-17 14:35:35 +0200 <lortabac> if you want you can have named instances in Haskell by adding a type parameter to the class
2022-10-17 14:35:37 +0200 <dminuoso> merijn: what `show 10` would do, but directly on a bytestring buffer.
2022-10-17 14:35:43 +0200 <tdammers> note that I didn't say typeclasses are wrong in general. they're one honking useful language feature
2022-10-17 14:35:48 +0200 <merijn> sshine: Default configuration often make sense, but defining one as a value instead of Def makes 0 difference in effort
2022-10-17 14:35:58 +0200 <dminuoso> merijn: bytestring already comefs with `readInteger` and `readInt`, just want something to roundtrip with that.
2022-10-17 14:36:14 +0200 <tdammers> and in fact we *can* model semigroups correctly, but it's a bit awkward, because it requires passing the semigroup itself around
2022-10-17 14:36:17 +0200 <merijn> sshine: The only "value add" of Def is that you can invoke it recursively (instantiating fields with their defaults), but since defaults aren't general, that doesn't work
2022-10-17 14:36:40 +0200 <sshine> merijn, I agree :) but I'm trying to justify the notion that "a default" makes sense. you have to put a concept on a pedestal to shoot it down.
2022-10-17 14:37:07 +0200 <sshine> merijn, right, I noted that down in the tl;dr version as "Defaults are useful for transitive derivation, but risk context drift causing errors"
2022-10-17 14:37:12 +0200 <tdammers> in practice, the most whopping advantage of `def` is that you get to use the same short identifier for all your default values XD
2022-10-17 14:38:01 +0200 <jackdk> Combine with Applicative for `def <$> def <*> def <*> def <*> def...`
2022-10-17 14:38:23 +0200 <Profpatsch> instance Def a => Def ((->) e) where
2022-10-17 14:38:36 +0200 <Profpatsch> forgot the a
2022-10-17 14:38:39 +0200 <Profpatsch> but you get the idea
2022-10-17 14:39:18 +0200 <Profpatsch> jackdk: what’s the default applicative functor
2022-10-17 14:39:22 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 14:39:50 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74)
2022-10-17 14:40:17 +0200 <merijn> sshine: I think the example of http/SSL options make sense as example when "a default" makes sense
2022-10-17 14:40:27 +0200 <merijn> 90% of programmers want to "just make a connection"
2022-10-17 14:40:41 +0200 <merijn> And a config that "Just Works (TM)" can save a lot of time and be very convenient
2022-10-17 14:41:06 +0200 <merijn> And in general any form of "application config" where there is a sensible default that "just works" and gets overridden makes sense
2022-10-17 14:41:08 +0200 <Profpatsch> merijn: that’s why you usually have a function that wraps makeHttpConnection defaultOptions
2022-10-17 14:42:01 +0200asan(~asansanwa@150.129.181.196) (Quit: This computer has gone to sleep)
2022-10-17 14:44:10 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74) (Ping timeout: 246 seconds)
2022-10-17 14:46:02 +0200asansanwal(~asansanwa@150.129.181.196)
2022-10-17 14:47:08 +0200asansanwal(~asansanwa@150.129.181.196) (Client Quit)
2022-10-17 14:48:48 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-17 14:50:22 +0200 <Profpatsch> Is there a recommended way to deal with sum types in contrafunctors?
2022-10-17 14:50:46 +0200 <Profpatsch> I have a simple contrafunctor newtype Enc from = Enc (from -> Encoding)
2022-10-17 14:51:04 +0200 <Profpatsch> And a bunch of combinators for constructing an Enc
2022-10-17 14:51:40 +0200 <Profpatsch> But sum :: (from -> Encoding) -> Enc from does not feel good to use
2022-10-17 14:51:58 +0200 <Profpatsch> Mostly because I don’t control Encoding (it’s from aeson)
2022-10-17 14:52:35 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-17 14:53:04 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-17 14:55:05 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net)
2022-10-17 14:59:18 +0200 <jumper149> Profpatsch: How about `sum $ \case ...`
2022-10-17 15:00:26 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-10-17 15:00:29 +0200 <jumper149> Which should be the same as `Enc \case` I guess
2022-10-17 15:02:02 +0200 <Profpatsch> jumper149: yeah, I don’t like the way that you have to jump into the “internals”
2022-10-17 15:02:22 +0200 <Profpatsch> cause at some point you can just write a function `a -> Encoding` :P
2022-10-17 15:02:59 +0200 <jumper149> Are you looking for https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Functor-Contravariant.html#v:contramap ?
2022-10-17 15:03:18 +0200littlefinger(~littlefin@pool-74-102-98-242.nwrknj.fios.verizon.net)
2022-10-17 15:04:29 +0200jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-17 15:04:54 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 264 seconds)
2022-10-17 15:05:28 +0200 <Profpatsch> jumper149: yeah that’s the main reason the newtype is there, so that you can use contramap. But maybe a bit weak as a use-case.
2022-10-17 15:05:44 +0200 <[Leary]> I'm not sure I understand the question, but I know you can write e.g. `Enc a -> Enc b -> Enc (Either a b)`. It's possible you can combine that with some prism magic to make it more general.
2022-10-17 15:05:53 +0200 <Profpatsch> esp if it doesn’t work very well for Enc Foo data Foo = Foo Int | Bar Char
2022-10-17 15:07:04 +0200 <Profpatsch> [Leary]: I’m afraid the case match needs to be in there somewhere, otherwise you don’t get exhaustiveness checking.
2022-10-17 15:07:15 +0200 <jumper149> Not sure, why `Enc Foo` would be a problem here, if they both end up inside `Encoding`.
2022-10-17 15:07:38 +0200 <Profpatsch> jumper149: yeah but it would be great if you could use the existing Enc combinators
2022-10-17 15:08:33 +0200 <jumper149> What are they?
2022-10-17 15:08:48 +0200 <Profpatsch> stuff like map :: (Coercible k Text) => Enc v -> Enc (Map k v)
2022-10-17 15:16:26 +0200paddymahoney(~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Read error: Connection reset by peer)
2022-10-17 15:16:34 +0200 <jumper149> I cannot see the problem, sorry ^^
2022-10-17 15:19:27 +0200 <Profpatsch> maybe it’s a brain worm
2022-10-17 15:20:43 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.6)
2022-10-17 15:21:26 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-10-17 15:24:17 +0200nate1(~nate@98.45.169.16)
2022-10-17 15:24:43 +0200abrar(~abrar@static-108-2-152-54.phlapa.fios.verizon.net)
2022-10-17 15:28:59 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-17 15:33:23 +0200vglfr(~vglfr@145.224.100.100) (Ping timeout: 252 seconds)
2022-10-17 15:33:49 +0200 <[Leary]> Profpatsch: One way to make function newtypes more ergonomic is to give them a nice application operator. With that in hand, there's nothing to stop you from leveraging existing combinators to deal with the sum components, e.g. `Enc \case Foo a -> encInt $~ a; Bar c -> encChar $~ c`.
2022-10-17 15:35:32 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-17 15:36:17 +0200 <Profpatsch> [Leary]: oh hell, getting away from weird operators is my main reason why I’m wrapping aeson interfaces :P
2022-10-17 15:38:27 +0200thegeekinside(~thegeekin@189.180.97.156)
2022-10-17 15:40:38 +0200Sgeo(~Sgeo@user/sgeo)
2022-10-17 15:48:16 +0200shriekingnoise(~shrieking@186.137.167.202)
2022-10-17 15:52:41 +0200CiaoSen(~Jura@p200300c9570723002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-10-17 15:58:30 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-17 15:58:50 +0200finsternis(~X@23.226.237.192)
2022-10-17 16:00:09 +0200MajorBiscuit(~MajorBisc@145.94.164.10) (Ping timeout: 252 seconds)
2022-10-17 16:01:03 +0200MajorBiscuit(~MajorBisc@145.94.164.10)
2022-10-17 16:02:56 +0200vglfr(~vglfr@145.224.100.100)
2022-10-17 16:03:12 +0200[Leary](~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
2022-10-17 16:04:02 +0200cfricke(~cfricke@user/cfricke)
2022-10-17 16:05:53 +0200stef204(~stef204@user/stef204)
2022-10-17 16:07:08 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-17 16:09:07 +0200 <probie> How do you define `($~)`? `($~) :: Coercible x (a -> b) => x -> a -> b` is not particularly ergonomic
2022-10-17 16:15:28 +0200elbear(~lucian@188.24.138.239)
2022-10-17 16:20:08 +0200[Leary](~Leary]@user/Leary/x-0910699)
2022-10-17 16:22:05 +0200o-90(~o-90@gateway/tor-sasl/o-90)
2022-10-17 16:24:06 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 16:25:50 +0200o-90(~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection)
2022-10-17 16:28:06 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-17 16:30:05 +0200 <[Leary]> probie: If I don't need to support more than one type at the same time then I wont think too hard; `newtype Foo = Foo{ ($~) :: A -> B }` works just fine.
2022-10-17 16:34:31 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-17 16:35:53 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 16:36:40 +0200 <probie> Right, I thought you wanted something for all newtyped functions (or at least several of them). That makes much more sense
2022-10-17 16:39:27 +0200jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
2022-10-17 16:40:16 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 16:43:15 +0200MajorBiscuit(~MajorBisc@145.94.164.10) (Quit: WeeChat 3.6)
2022-10-17 16:45:48 +0200DavidBinder(~DavidBind@134.2.10.18)
2022-10-17 16:46:23 +0200MajorBiscuit(~MajorBisc@145.94.164.10)
2022-10-17 16:48:25 +0200 <jonathanx_> So I spend a lot of time fixing up import statements that get caught by --pedantic. Is there a way to automatically remove unwanted imports? I'm on vscode/HLS
2022-10-17 16:48:38 +0200 <jonathanx_> (idk if I've asked this before, been a hectic week and I can't find it in the logs)
2022-10-17 16:52:15 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 258 seconds)
2022-10-17 16:52:18 +0200 <merijn> Wait, since when is there a --pedantic? :o
2022-10-17 16:52:48 +0200 <geekosaur> looks to me like there is a "remove all redundant imports" code action
2022-10-17 16:53:23 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
2022-10-17 16:54:06 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-10-17 16:54:10 +0200 <geekosaur> jonathanx_, ^^
2022-10-17 16:54:55 +0200MajorBiscuit(~MajorBisc@145.94.164.10) (Quit: WeeChat 3.6)
2022-10-17 16:55:13 +0200MajorBiscuit(~MajorBisc@145.94.164.10)
2022-10-17 16:55:53 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-17 16:59:50 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 17:01:22 +0200infinity0(~infinity0@pwned.gg) (Remote host closed the connection)
2022-10-17 17:03:07 +0200arahael(~arahael@210.185.98.153) (Ping timeout: 246 seconds)
2022-10-17 17:03:49 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 246 seconds)
2022-10-17 17:04:16 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-17 17:08:09 +0200dibblego(~dibblego@122-199-1-30.ip4.superloop.com)
2022-10-17 17:08:09 +0200dibblego(~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
2022-10-17 17:08:09 +0200dibblego(~dibblego@haskell/developer/dibblego)
2022-10-17 17:08:19 +0200LukeHoersten(~LukeHoers@user/lukehoersten)
2022-10-17 17:09:29 +0200infinity0(~infinity0@pwned.gg)
2022-10-17 17:11:34 +0200elbear(~lucian@188.24.138.239)
2022-10-17 17:12:38 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-17 17:16:05 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-17 17:17:37 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:6bf9:1eed:edc8:e002) (Quit: WeeChat 2.8)
2022-10-17 17:17:39 +0200arahael(~arahael@59-102-114-6.tpgi.com.au)
2022-10-17 17:18:21 +0200kenran`(~user@user/kenran) (Remote host closed the connection)
2022-10-17 17:19:05 +0200telser(~quassel@user/telser)
2022-10-17 17:19:05 +0200telser(~quassel@user/telser) (Client Quit)
2022-10-17 17:19:39 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 17:21:33 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-10-17 17:24:13 +0200Midjak(~Midjak@82.66.147.146)
2022-10-17 17:25:15 +0200LukeHoersten(~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-10-17 17:29:11 +0200mgd(~mgd@85.210.228.38)
2022-10-17 17:29:51 +0200LukeHoersten(~LukeHoers@user/lukehoersten)
2022-10-17 17:32:50 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 17:36:10 +0200 <Profpatsch> yes there is a code action
2022-10-17 17:43:59 +0200LukeHoersten(~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-10-17 17:44:01 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-10-17 17:45:26 +0200nate1(~nate@98.45.169.16)
2022-10-17 17:45:37 +0200asansanwal(~asansanwa@150.129.181.196)
2022-10-17 17:45:45 +0200asansanwal(~asansanwa@150.129.181.196) (Client Quit)
2022-10-17 17:47:38 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-10-17 17:48:45 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-17 17:55:53 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-17 17:57:36 +0200stef204(~stef204@user/stef204) (Quit: WeeChat 3.7)
2022-10-17 18:00:35 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 18:00:53 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 18:03:34 +0200asansanwal(~asansanwa@150.129.181.196)
2022-10-17 18:03:35 +0200stef204(~stef204@user/stef204)
2022-10-17 18:05:13 +0200asansanwal(~asansanwa@150.129.181.196) (Client Quit)
2022-10-17 18:05:45 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-17 18:09:01 +0200CiaoSen(~Jura@p200300c9570723002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-10-17 18:11:32 +0200titibandit(~titibandi@xdsl-78-34-208-230.nc.de)
2022-10-17 18:15:21 +0200MajorBiscuit(~MajorBisc@145.94.164.10) (Quit: WeeChat 3.6)
2022-10-17 18:19:35 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74)
2022-10-17 18:19:59 +0200littlefinger(~littlefin@pool-74-102-98-242.nwrknj.fios.verizon.net) (Ping timeout: 244 seconds)
2022-10-17 18:21:28 +0200stef204(~stef204@user/stef204) (Quit: WeeChat 3.7)
2022-10-17 18:23:36 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-10-17 18:24:48 +0200zmt00(~zmt00@user/zmt00) (Read error: Connection reset by peer)
2022-10-17 18:25:19 +0200vn36__(~vn36@123.63.203.210)
2022-10-17 18:28:14 +0200zmt00(~zmt00@user/zmt00)
2022-10-17 18:30:17 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-10-17 18:30:32 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-17 18:31:39 +0200teo(~teo@user/teo) (Ping timeout: 250 seconds)
2022-10-17 18:33:10 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-17 18:35:59 +0200stef204(~stef204@user/stef204)
2022-10-17 18:42:32 +0200`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 268 seconds)
2022-10-17 18:46:57 +0200 <dminuoso> What I would like, is a minimal-depends. :S
2022-10-17 18:47:17 +0200 <dminuoso> Perhaps even as a default warning in cabal.
2022-10-17 18:47:23 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-10-17 18:48:14 +0200 <dminuoso> I think interface files already expose imported modules (since they are needed for tracking which typeclass instances are in scope), so the basic machinery is already there.
2022-10-17 18:49:19 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-17 18:53:15 +0200VanceIsM7[m](~vanceism7@2001:470:69fc:105::3ad)
2022-10-17 18:53:35 +0200vglfr(~vglfr@145.224.100.100) (Ping timeout: 252 seconds)
2022-10-17 18:55:20 +0200 <EvanR> merijn, Ivory is for generating whatever C code. While I can't seem to find the one specifically for crypto, the one that would generate timing uniform primitives in asm...
2022-10-17 18:55:48 +0200 <EvanR> (or something, I don't know if that makes sense)
2022-10-17 18:57:03 +0200kuribas(~user@ptr-17d51eoxcqlpawtoc5a.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1))
2022-10-17 18:58:13 +0200asansanwal(~asansanwa@150.129.181.196)
2022-10-17 18:58:15 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-17 19:00:50 +0200econo(uid147250@user/econo)
2022-10-17 19:01:47 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Remote host closed the connection)
2022-10-17 19:02:04 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2022-10-17 19:03:27 +0200mgd(~mgd@85.210.228.38) (Quit: Client closed)
2022-10-17 19:07:11 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
2022-10-17 19:07:12 +0200Tuplanolla(~Tuplanoll@91-159-69-174.elisa-laajakaista.fi)
2022-10-17 19:08:41 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7)
2022-10-17 19:11:08 +0200hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 244 seconds)
2022-10-17 19:11:21 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-10-17 19:16:41 +0200vglfr(~vglfr@145.224.100.100)
2022-10-17 19:18:56 +0200 <Guillaum[m]> Is there a way to attach arbitrary data to an object info table. A bit similar to the data attached in info table and which can be queried by https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-Stack-CCS.html#v:whereFrom, but I would like to attach arbitrary data.
2022-10-17 19:19:34 +0200 <Guillaum[m]> Use case: I'd like to add debuging informations about the creation context of an object, but I don't want to be intrusive in my AST.
2022-10-17 19:19:36 +0200zmt00(~zmt00@user/zmt00) (Ping timeout: 260 seconds)
2022-10-17 19:21:41 +0200zmt00(~zmt00@user/zmt00)
2022-10-17 19:25:26 +0200juri_(~juri@84-19-175-179.pool.ovpn.com) (Ping timeout: 260 seconds)
2022-10-17 19:25:56 +0200`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net)
2022-10-17 19:30:41 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 260 seconds)
2022-10-17 19:34:49 +0200 <geekosaur> https://downloads.haskell.org/ghc/9.4.2/docs/users_guide/extending_ghc.html#source-annotations ?
2022-10-17 19:35:20 +0200 <geekosaur> otherwise I think not; the info table's format is fixed by how GC uses it
2022-10-17 19:35:46 +0200EsoAlgo(~EsoAlgo@129.146.136.145)
2022-10-17 19:36:47 +0200 <geekosaur> (I pointed to 9.4 but I think they go back to 7.0 and are certainly in 8.x)
2022-10-17 19:37:35 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-10-17 19:37:44 +0200 <geekosaur> if you really need to alter the info table you'll need to ask in #ghc
2022-10-17 19:38:18 +0200spaced(uid572193@user/spaced)
2022-10-17 19:38:29 +0200gmg(~user@user/gehmehgeh)
2022-10-17 19:39:00 +0200natechan(~nate@98.45.169.16)
2022-10-17 19:42:14 +0200 <jumper149> dminuoso: There is `-Wunused-packages` for GHC.
2022-10-17 19:44:05 +0200asansanwal(~asansanwa@150.129.181.196) (Quit: This computer has gone to sleep)
2022-10-17 19:44:09 +0200 <Guillaum[m]> geekosaur: thank you.
2022-10-17 19:46:30 +0200mbuf(~Shakthi@49.205.87.29) (Quit: Leaving)
2022-10-17 19:48:35 +0200DavidBinder(~DavidBind@134.2.10.18) (Quit: Leaving)
2022-10-17 19:52:01 +0200 <EvanR> > text "ab\tcd"
2022-10-17 19:52:02 +0200 <lambdabot> ab cd
2022-10-17 19:52:14 +0200juri_(~juri@79.140.121.220)
2022-10-17 19:52:33 +0200 <EvanR> which god decides how many spaces a tab is here
2022-10-17 19:56:03 +0200littlefinger(~littlefin@pool-74-102-98-242.nwrknj.fios.verizon.net)
2022-10-17 19:57:01 +0200juri_(~juri@79.140.121.220) (Ping timeout: 252 seconds)
2022-10-17 19:57:55 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 248 seconds)
2022-10-17 19:58:04 +0200juri_(~juri@84-19-175-179.pool.ovpn.com)
2022-10-17 19:58:32 +0200 <EvanR> hopefully not Loki
2022-10-17 19:59:58 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-10-17 20:08:03 +0200crns(~netcrns@user/crns) (Ping timeout: 248 seconds)
2022-10-17 20:09:20 +0200crns(~netcrns@p4ff5e713.dip0.t-ipconnect.de)
2022-10-17 20:09:20 +0200crns(~netcrns@p4ff5e713.dip0.t-ipconnect.de) (Changing host)
2022-10-17 20:09:20 +0200crns(~netcrns@user/crns)
2022-10-17 20:09:53 +0200zkSNOOP(~username@ptr-21zvp7p1ecvdx6mr7hf.18120a2.ip6.access.telenet.be)
2022-10-17 20:13:19 +0200Topsi(~Topsi@dyndsl-095-033-095-014.ewe-ip-backbone.de)
2022-10-17 20:14:51 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-17 20:16:03 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74) (Remote host closed the connection)
2022-10-17 20:16:15 +0200razetime(~quassel@117.193.4.27) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-10-17 20:18:04 +0200loras(~loras@c-73-139-125-125.hsd1.fl.comcast.net) (Ping timeout: 246 seconds)
2022-10-17 20:18:10 +0200elbear(~lucian@188.24.138.239)
2022-10-17 20:19:21 +0200 <jonathanx_> I'm experimenting with an effect lib that comes with a GHC plugin to disambiguate stuff. Using the plugin, ghc compiles fine, but HLS still thinks that the build is broken. How do I make HLS recognize ghc plugins?
2022-10-17 20:22:56 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 268 seconds)
2022-10-17 20:25:37 +0200jbayardo(~jbayardo@20.83.116.49) (Ping timeout: 252 seconds)
2022-10-17 20:25:39 +0200 <geekosaur> that's probably a question for #haskell-language-server
2022-10-17 20:27:16 +0200Alex_test(~al_test@178.34.163.70) (Ping timeout: 260 seconds)
2022-10-17 20:28:26 +0200AlexZenon(~alzenon@178.34.163.70) (Ping timeout: 260 seconds)
2022-10-17 20:29:06 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 20:29:30 +0200 <monochrom> EvanR: Pessimistically I'm pretty sure it's Loki or someone isomorphic to Loki. Look at how everyone disagrees on the number, and on top of that, also voices that propose that there should be no mapping at all. Right, I have read a web page stating both "tab is not any number of spaces" and "tab does not even mean the next designated column, tab is just tab".
2022-10-17 20:30:40 +0200 <EvanR> this calls for category theory
2022-10-17 20:30:53 +0200elbear(~lucian@188.24.138.239)
2022-10-17 20:31:39 +0200Alex_test(~al_test@178.34.163.70)
2022-10-17 20:31:51 +0200 <darkling> Or just a proper standard that unifies all the existing standards.
2022-10-17 20:32:02 +0200 <darkling> It wouldn't have to be very long. Just the parts that everyone can agree on.
2022-10-17 20:32:09 +0200 <geekosaur> *hollow laugh*
2022-10-17 20:32:11 +0200 <darkling> "Tabs are." possibly
2022-10-17 20:32:23 +0200AlexZenon(~alzenon@178.34.163.70)
2022-10-17 20:32:55 +0200raym(~aritra@user/raym) (Ping timeout: 268 seconds)
2022-10-17 20:32:55 +0200geekosaurnotes that an old typewriter he had had fixed tabs. ½ inch
2022-10-17 20:33:15 +0200 <[exa]> pls could tabs finally start doing actual tabulation not just "maybe 8 spaces yolo"
2022-10-17 20:33:35 +0200 <monochrom> Once upon a time, programmers gathered together and were like "let's collaborate on a super-project that develops the ultimate program, it will be so powerful that it will rival God". God cannot let that happen, so God simply said, "let every programmer disagrees on what tab means", and that suffices to dissolve the project. >:)
2022-10-17 20:33:36 +0200 <geekosaur> if you were lucky that was 5 characters
2022-10-17 20:33:37 +0200cdimitroulas(~cdimitrou@17.232.83.98)
2022-10-17 20:33:57 +0200 <geekosaur> the Tab of Babel
2022-10-17 20:34:00 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 264 seconds)
2022-10-17 20:34:06 +0200 <darkling> The Tabulator of Babel?
2022-10-17 20:34:09 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-10-17 20:34:26 +0200jbayardo(~jbayardo@20.83.116.49)
2022-10-17 20:35:09 +0200vn36__(~vn36@123.63.203.210) (Ping timeout: 250 seconds)
2022-10-17 20:36:45 +0200 <EvanR> sadly, the question remains. If you print out tabs to stdio where does the spacing come from
2022-10-17 20:37:02 +0200 <jonathanx_> geekosaur: thanks, I'll check there
2022-10-17 20:37:06 +0200 <monochrom> The terminal.
2022-10-17 20:37:29 +0200 <geekosaur> the terminal emulator
2022-10-17 20:37:35 +0200 <geekosaur> which may or may not be sane
2022-10-17 20:37:40 +0200 <geekosaur> fsvo sane
2022-10-17 20:37:50 +0200 <EvanR> the terminal, it's not the OS, the c library, the runtime system, ...
2022-10-17 20:37:53 +0200 <monochrom> Hell, the terminal doesn't insert spaces either. It just works in terms of screen positions.
2022-10-17 20:38:00 +0200 <darkling> "What is it, doctor?" "I'm afraid it's terminal."
2022-10-17 20:38:22 +0200 <monochrom> Right, except for the terminal, everything else preserves the '\t' character as is.
2022-10-17 20:38:48 +0200 <[exa]> literal indentation heaven ^
2022-10-17 20:39:22 +0200 <monochrom> And the terminal just plays with screen coordinates. In fact, if it retains memory (for copy-paste), it remembers the '\t' too, no change.
2022-10-17 20:39:24 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 264 seconds)
2022-10-17 20:39:37 +0200 <EvanR> cool so I can adjust the tabs globally
2022-10-17 20:39:45 +0200 <EvanR> except within vim
2022-10-17 20:40:08 +0200 <geekosaur> except that prpograms expect to be able to interpret tabs. and $SOMEONE help you if they disagree with your terminal
2022-10-17 20:40:25 +0200 <EvanR> what kind of programs
2022-10-17 20:40:43 +0200 <monochrom> The unix "expand" utility? >:)
2022-10-17 20:40:47 +0200 <geekosaur> editors, indentation-aware compilers/interpreters, etc.
2022-10-17 20:41:15 +0200 <EvanR> indentation aware doesn't mean... "number of tabs" ? xD
2022-10-17 20:41:34 +0200 <monochrom> Next April 1st, "expand" converts tabs to a monkey face emoji >:)
2022-10-17 20:41:45 +0200 <EvanR> looking up expand
2022-10-17 20:42:03 +0200 <monochrom> Oh it normal just convert tabs to spaces.
2022-10-17 20:42:11 +0200 <monochrom> s/normal/normally/
2022-10-17 20:42:18 +0200 <geekosaur> someone apparently hasn't dealt with either haskell or python layout in the presence of tabs
2022-10-17 20:42:38 +0200 <monochrom> Well, expand predates those...
2022-10-17 20:42:44 +0200 <[exa]> hm guys lemme throw together a very quick idea
2022-10-17 20:42:51 +0200 <geekosaur> you get unpleasant surprises if their notion of how tabs work differs from youtr terminal. or your editor
2022-10-17 20:42:55 +0200 <EvanR> I read that there's a rule for figuring out layout when tabs are mixed with spaces, but it doesn't involves "tabs = 8 spaces" or such xD
2022-10-17 20:43:22 +0200 <monochrom> Or at least the creators of expand had not heard of layout-sensitive languages. They were working with C etc.
2022-10-17 20:43:27 +0200 <EvanR> how would haskell know what your editor is set to
2022-10-17 20:43:42 +0200 <geekosaur> that's kinda the point
2022-10-17 20:43:44 +0200 <geekosaur> it doesn't
2022-10-17 20:43:57 +0200 <geekosaur> it's on *you* to make sure they agree
2022-10-17 20:44:34 +0200 <monochrom> Yeah the rule is "go back to what terminals and typewriters actually do, tab expands to enough spaces for the next tabstop, rather than always a constant number of spaces".
2022-10-17 20:45:08 +0200 <EvanR> ok, and that's why expand makes no sense
2022-10-17 20:45:48 +0200 <tdammers> problem is that terminals and typewriters don't agree on where the next tabstop is
2022-10-17 20:46:07 +0200 <monochrom> For the most part I'm OK with the wrong wording "tab is n spaces" whenever all participants knows it's an abbreviation for the correct but long wording.
2022-10-17 20:46:08 +0200vn36__(~vn36@123.63.203.210)
2022-10-17 20:46:16 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74)
2022-10-17 20:46:55 +0200 <EvanR> is that "shortcut" language what is actually meant by the expand manual? xD
2022-10-17 20:47:02 +0200 <monochrom> I mean, on other topics there are even worse wrong wordings to pick on, if you want to pick a fight.
2022-10-17 20:47:07 +0200 <EvanR> or does it literally replace \t with n spaces
2022-10-17 20:47:21 +0200 <geekosaur> EvanR, it at least used to mean that shortcut
2022-10-17 20:47:30 +0200 <geekosaur> I haven't checked since the 1980s…
2022-10-17 20:47:49 +0200 <darkling> tdammers: The last mechanical typewriter I used had settable tab stops, but they were true "move to the next tab column" tabs, not some fixed number of spaces.
2022-10-17 20:48:06 +0200 <EvanR> oh yeah I remember that
2022-10-17 20:48:11 +0200 <EvanR> tabstops were cool
2022-10-17 20:48:15 +0200 <monochrom> I think "have tabs N characters apart" is close to the right wording, no?
2022-10-17 20:48:28 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 20:48:31 +0200 <tdammers> darkling: well yeah, and as long as the Tab key only drives the local, mechanically connected typing apparatus, it's fine. The trouble started when they started making teletypes.
2022-10-17 20:48:52 +0200 <monochrom> I mean if you s/tabs/tabstops/ then it is unambiguously right.
2022-10-17 20:49:20 +0200 <monochrom> And it is not literally "N spaces".
2022-10-17 20:49:58 +0200 <EvanR> yeah, so the key mystery revealed was that tab is not a character but a location on the page
2022-10-17 20:50:01 +0200wrengr(~wrengr@201.59.83.34.bc.googleusercontent.com) (Remote host closed the connection)
2022-10-17 20:50:14 +0200 <EvanR> which contradicts everything everyone knows... about ASCII
2022-10-17 20:50:14 +0200codaraxis___(~codaraxis@user/codaraxis)
2022-10-17 20:50:38 +0200ft(~ft@p3e9bc57b.dip0.t-ipconnect.de)
2022-10-17 20:50:39 +0200 <darkling> And what does LF do? :)
2022-10-17 20:51:11 +0200 <EvanR> carriage return obv
2022-10-17 20:51:28 +0200 <EvanR> and CR moves the page up xD
2022-10-17 20:51:36 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-17 20:51:39 +0200 <darkling> Hey, *I* was stirring with that spoon!
2022-10-17 20:52:07 +0200 <monochrom> Well you need a wire format that accomodates both "actual data for humans" and "metadata/instructions for the machine".
2022-10-17 20:52:13 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-17 20:52:34 +0200 <EvanR> that sounds like a bad sequel to the matrix
2022-10-17 20:52:56 +0200 <darkling> ROFL
2022-10-17 20:53:00 +0200 <monochrom> This is why tab and LF and etc are "control characters". Meaning, for the machine to move to locations, not for the ABC123 for humans.
2022-10-17 20:53:04 +0200stef204(~stef204@user/stef204) (Quit: WeeChat 3.7)
2022-10-17 20:53:24 +0200 <darkling> It's just that they've undergone semantic drift in the lsat 50 years.
2022-10-17 20:53:51 +0200codaraxis__(~codaraxis@user/codaraxis) (Ping timeout: 252 seconds)
2022-10-17 20:54:14 +0200 <monochrom> But then, once you have both in the same stream/wire, the same mentality as Lisp's "program and data can be unified" is the next logical conclusion slippery slope.
2022-10-17 20:54:23 +0200Tuplanolla(~Tuplanoll@91-159-69-174.elisa-laajakaista.fi) (Ping timeout: 268 seconds)
2022-10-17 20:55:05 +0200wrengr(~wrengr@201.59.83.34.bc.googleusercontent.com)
2022-10-17 20:56:06 +0200 <EvanR> ok so operational semantics. Category theory would be useless, nevermind
2022-10-17 20:57:20 +0200cdimitroulas(~cdimitrou@17.232.83.98) (Quit: Connection closed)
2022-10-17 20:58:02 +0200raym(~aritra@user/raym)
2022-10-17 20:59:02 +0200 <EvanR> I was reading that when ascii was being invented (some time in the 5th century?) there were other options like shift between text mode and control mode, but not shifting modes was the decision and the rest is history
2022-10-17 21:00:21 +0200 <EvanR> imagine if plain text files had to shift modes xD (ok, now we have unicode)
2022-10-17 21:01:24 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 21:05:24 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-10-17 21:06:21 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 260 seconds)
2022-10-17 21:06:22 +0200 <geekosaur> uh, you do know about SI and SO?
2022-10-17 21:06:43 +0200 <geekosaur> > ord '\SI'
2022-10-17 21:06:44 +0200 <lambdabot> 15
2022-10-17 21:07:35 +0200 <geekosaur> that said, earlier character sets used shift codes a lot more (BAUDOT, RADIX32, etc.)
2022-10-17 21:08:48 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
2022-10-17 21:09:44 +0200 <EvanR> yeah, maybe it was that any control would be unavailable in text mode
2022-10-17 21:10:15 +0200 <EvanR> the text would be out of control
2022-10-17 21:10:40 +0200 <vn36__> hahaha
2022-10-17 21:13:46 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-10-17 21:17:31 +0200arcadewise(52968ed80d@2604:bf00:561:2000::3df)
2022-10-17 21:19:15 +0200 <arcadewise> Hi! I'm trying to apply a function to a value i recieved from io, without having to do it on a seprate line, is there a way to do that? currently i get the value like this `s1 <- prompt "First sentence: "`, but ideally i could call `scntNum` on the result before i store it in `s1`
2022-10-17 21:20:03 +0200Kaiepi(~Kaiepi@142.68.249.28) (Read error: Connection reset by peer)
2022-10-17 21:20:07 +0200 <EvanR> fmap :: (a -> b) -> IO a -> IO b
2022-10-17 21:20:16 +0200 <EvanR> IO post processor
2022-10-17 21:20:27 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-17 21:21:08 +0200 <dminuoso> Also as its infix variant <$>
2022-10-17 21:21:14 +0200 <EvanR> s1 <- fmap scntNum (prompt "First sentence: ")
2022-10-17 21:21:15 +0200 <dminuoso> Or with flipped arguments <&>
2022-10-17 21:21:15 +0200 <EvanR> or
2022-10-17 21:21:26 +0200 <EvanR> s1 <- scntNum <$> prompt "First sentence: "
2022-10-17 21:21:54 +0200 <arcadewise> thank you so much!
2022-10-17 21:24:45 +0200 <EvanR> if foldr is a catamorphism, is there a fancy word for foldl or foldl'
2022-10-17 21:25:02 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-17 21:25:07 +0200 <dminuoso> loop?
2022-10-17 21:25:12 +0200 <dminuoso> :S
2022-10-17 21:26:17 +0200 <dminuoso> But seriously, isnt foldl a catamorphism too?
2022-10-17 21:26:24 +0200 <dminuoso> It's just a into a different algebra
2022-10-17 21:30:47 +0200 <EvanR> :thonk:
2022-10-17 21:31:42 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
2022-10-17 21:32:46 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-17 21:33:06 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-10-17 21:33:22 +0200zebrag(~chris@user/zebrag)
2022-10-17 21:35:27 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 21:36:09 +0200 <dminuoso> Okay so messing a lot with flatparse made me realize, that parsing UTF8 data is.. quite annoying . :S
2022-10-17 21:38:06 +0200Kaiepi(~Kaiepi@142.68.249.28) (Remote host closed the connection)
2022-10-17 21:38:41 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-17 21:39:43 +0200vn36__(~vn36@123.63.203.210) (Ping timeout: 250 seconds)
2022-10-17 21:40:08 +0200freeside(~mengwong@103.252.202.193) (Ping timeout: 268 seconds)
2022-10-17 21:42:11 +0200liz(~liz@cpc84585-newc17-2-0-cust60.16-2.cable.virginm.net)
2022-10-17 21:43:36 +0200Kaiepi(~Kaiepi@142.68.249.28) (Ping timeout: 264 seconds)
2022-10-17 21:45:57 +0200TheCreatorOfCrea(~TheCreato@2a0a-a546-c344-1-e0bc-1e36-315c-295b.ipv6dyn.netcologne.de)
2022-10-17 21:49:35 +0200elbear(~lucian@188.24.138.239) (Ping timeout: 252 seconds)
2022-10-17 21:49:46 +0200 <TheCreatorOfCrea> Hello. :) … I noticde that there a separate type syntax and even kind syntax in Haskell. I just read about GADT and data kinds and kind signatures and such, and it seems to approaches functionality duplication with “reqular” syntax. … I know there’s languages with more powerful type systems, so… Is there an alternative approach of just
2022-10-17 21:49:47 +0200 <TheCreatorOfCrea> making type declarations in regular Haskell, so only one syntax is needed?
2022-10-17 21:50:26 +0200 <dminuoso> TheCreatorOfCrea: Actually, the kind and type system has long been merged into a singular system.
2022-10-17 21:50:32 +0200pavonia(~user@user/siracusa)
2022-10-17 21:50:41 +0200fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Ping timeout: 260 seconds)
2022-10-17 21:51:01 +0200 <TheCreatorOfCrea> dminuoso: Hmm, that sounds great. Can you point me in the right direction for reading about it?
2022-10-17 21:51:08 +0200 <EvanR> Maybe you are being tempted by Dependent Types, where kinds are just types, and values work as is at the type level
2022-10-17 21:51:13 +0200 <geekosaur> look for TypeInType
2022-10-17 21:51:20 +0200 <TheCreatorOfCrea> dminuoso: (I have no idea what to enter into the search engine for this.)
2022-10-17 21:51:59 +0200 <geekosaur> also, you may be interested in https://en.wikipedia.org/wiki/%CE%A9mega
2022-10-17 21:52:03 +0200 <dminuoso> TheCreatorOfCrea: The extension was called TypeInType, which over the course of the versions has become redundant.
2022-10-17 21:52:14 +0200 <dminuoso> THat is, TypeInType is in effect whether you enable it or not.
2022-10-17 21:52:22 +0200 <dminuoso> In short, `Type :: Type` holds.
2022-10-17 21:52:29 +0200 <geekosaur> where every level works exactly the same way: value level, type level, kind level, sort level, and up infinitely
2022-10-17 21:52:45 +0200 <dminuoso> Where `Type` is a more modern and better name for `*`
2022-10-17 21:52:57 +0200 <EvanR> values work at the type level now?
2022-10-17 21:53:20 +0200 <EvanR> or that still requires DataKinds
2022-10-17 21:53:26 +0200 <c_wraith> no, that's the one set that wasn't collapsed.
2022-10-17 21:53:36 +0200 <c_wraith> DataKinds doesn't give you arbitrary values, just constructors
2022-10-17 21:53:39 +0200 <geekosaur> no, I was talking about Ωmega
2022-10-17 21:53:46 +0200 <EvanR> oh
2022-10-17 21:54:21 +0200 <TheCreatorOfCrea> dminuoso: Ok… does this allow you to define types as just regular functions, without the separate `::` syntax? Or does the `::` just allow you to write function-like syntax behind it. (I’m admittedly out of my depth here, so bear with my vague questions and just assume what you think makes the most sense. :)
2022-10-17 21:54:42 +0200 <dminuoso> TheCreatorOfCrea: No, it just collapses everything above type into just types.
2022-10-17 21:54:51 +0200 <geekosaur> haskell does not yet have dependent types, or type level functions, or other fancies
2022-10-17 21:54:59 +0200 <dminuoso> TheCreatorOfCrea: before expressions had types, types had kinds, kinds had sorts, and above that everything was just an infinite singletons tack in haskell at least.
2022-10-17 21:55:12 +0200 <TheCreatorOfCrea> dminuoso: Ah, so if I understan correctly, it does away with the kind syntax right?
2022-10-17 21:55:26 +0200 <dminuoso> TheCreatorOfCrea: well the kind *syntax* was always the same as the type *syntax*
2022-10-17 21:55:35 +0200 <dminuoso> TheCreatorOfCrea: what changes is that kinds and types are the same thing now.
2022-10-17 21:55:51 +0200 <dminuoso> Or they exist in the same universe, rather.
2022-10-17 21:56:30 +0200 <TheCreatorOfCrea> geekosaur: But it sounds like that is a goal, right? Because that would make me like the direction Haskell’s taking much more. :-) (Provided they manage to make it easy to actually use. :)
2022-10-17 21:56:45 +0200 <geekosaur> that last is quite a sticking point though
2022-10-17 21:56:59 +0200 <TheCreatorOfCrea> dminuoso: Sorts? wow. :D *takes step back*
2022-10-17 21:57:11 +0200 <geekosaur> and iirc typechecking of general type level functions is undecidable
2022-10-17 21:57:11 +0200 <EvanR> if haskell makes dependent types easy to use I'll eat my hat
2022-10-17 21:57:28 +0200 <geekosaur> so you'd lose type inference and other nice things
2022-10-17 21:57:30 +0200 <TheCreatorOfCrea> dminuoso: True, the syntax was the same. But yeah, that sounds really great.
2022-10-17 21:57:31 +0200 <dolio> Instead of harder to use than normal?
2022-10-17 21:57:38 +0200 <geekosaur> maybe it's just inference that's undecidable
2022-10-17 21:57:45 +0200 <EvanR> exactly
2022-10-17 21:58:04 +0200 <dminuoso> TheCreatorOfCrea: Well, in truth its actually very undesirable in general.
2022-10-17 21:58:25 +0200 <TheCreatorOfCrea> geekosaur: about undecidability: Yeah, I thought there might be a conceptual hindrance like that there. :)
2022-10-17 21:58:57 +0200 <geekosaur> and I'm not sure you can usefully infer dependent types either
2022-10-17 21:58:58 +0200 <TheCreatorOfCrea> EvanR: Which type of had shall I serve you then, good sir? *opens fancy hat shop site*
2022-10-17 21:59:08 +0200 <dminuoso> TheCreatorOfCrea: It violates logical consistencies in the type system, which would not happen if you have an infinite tower of types. But it turns out that Haskell already is inconsistent, so making that change doesnt make this worse.
2022-10-17 21:59:26 +0200 <geekosaur> the whole point of them being providing proofs of things that can't otherwise be proven
2022-10-17 22:00:55 +0200 <EvanR> when programming in idris, even though you can't freewheel put no type signatures anywhere, writing code haskell style with top level signatures often does work, with inference figuring out the rest of the function
2022-10-17 22:01:21 +0200 <dminuoso> TheCreatorOfCrea: The expression for the alternative is a stratified universe (hierarchy), where you have an infinite tower of such universes. Agda is an example of a language that has this.
2022-10-17 22:02:00 +0200 <TheCreatorOfCrea> dolio: I’m torn about “harder to use”. With time, I found that it only demands you actually make decisions that need to be made to obtain reliable yet fast code, which is what I like; but it was merely the way it was communicated, that was quite sub-optimal. So I think it’s like quantum physics: It’s easy once you can wrap your head
2022-10-17 22:02:01 +0200 <TheCreatorOfCrea> around it. But it takes somebody to wrap his head around it first, before he can explain it to you at the Feyman “freshman level”. And we’re not really there yet. :)
2022-10-17 22:02:17 +0200 <c_wraith> it's worth pointing out that inconsistent is not the same as unsafe. Inconsistency can be made safe by inserting runtime checks.
2022-10-17 22:02:34 +0200 <EvanR> "quantum physics is easy once you get your head around it" --not feynmann
2022-10-17 22:02:40 +0200 <c_wraith> and all the ways haskell is inconsistent does so. Sort of incidentally, but it works out!
2022-10-17 22:03:00 +0200 <geekosaur> everyone keeps forgetting the "think really hard" part…
2022-10-17 22:03:16 +0200 <c_wraith> On the other hand, Haskell has lots of unsafe functions that really are unsafe...
2022-10-17 22:03:26 +0200 <dolio> I'm not saying dependent types are hard to use. I'm saying the things people do in GHC to fake them are much worse than using a language with dependent types.
2022-10-17 22:03:31 +0200 <dminuoso> c_wraith: Heh, was about to say that GHC does not have runtime checks for infinite loops.. until I realized it does!
2022-10-17 22:03:47 +0200 <geekosaur> only for the easy to detect ones
2022-10-17 22:04:02 +0200 <EvanR> compile time checks for infinite loops would be better
2022-10-17 22:04:07 +0200 <c_wraith> Well, and it never executes code that depends on the infinite loop!
2022-10-17 22:04:08 +0200 <TheCreatorOfCrea> dminuoso: What did you refer to, when you said it was undesirable?
2022-10-17 22:04:52 +0200 <dminuoso> TheCreatorOfCrea: See Girard's paradox
2022-10-17 22:05:01 +0200 <c_wraith> like... (case (let x = x in x) of () -> "hello") - I'd argue this checks for an infinite loop, in some sense.
2022-10-17 22:05:09 +0200 <dminuoso> You can roughly think of this as Russels paradox in the type system.
2022-10-17 22:05:19 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-17 22:08:09 +0200 <TheCreatorOfCrea> EvanR: My thought too: As long as the compiler can tell me whether it cannot infer a type, and ask me to either provide or remove it, I’m fine with that. I’m no fan of implicitisms anyway. The many levels of implicit things you have to keep in mind is the biggest hindrance to using Haskell for me. (I’m the type who can’t stand the
2022-10-17 22:08:10 +0200 <TheCreatorOfCrea> non-descriptive identifiers of mathematics though. To me they just look like deliberate obfuscation and gatekeeping. But I am willing to chalk that up to just different ways of thinking. )
2022-10-17 22:08:45 +0200 <EvanR> the difference between math type inference and haskell type inference is that it's reliable when it works
2022-10-17 22:09:15 +0200 <EvanR> it's not going to infer something totally wrong
2022-10-17 22:09:34 +0200 <EvanR> the whole principal type thing
2022-10-17 22:09:39 +0200 <c_wraith> I'd argue that non-meaningful identifiers are often more appropriate in Haskell than in math. It's common to write code in haskell that's so generic that there *is* no meaningful name for something.
2022-10-17 22:10:04 +0200 <dminuoso> Monad being one such example :>
2022-10-17 22:10:07 +0200 <TheCreatorOfCrea> c_wraith: about runtime checks: I’m using Haskell partially because it is able to move those checks to compile time though. :) But yeah, doing runtime checks it what Java does, AFAIK, and it’s not _that_ slow nowadays. I definitely prefer my life support machine to have runtime checks and be a little bit more expensive due to it. ;)
2022-10-17 22:10:18 +0200 <c_wraith> is theFirstArgumentToThisFunction more meaningful than x?
2022-10-17 22:10:55 +0200freeside(~mengwong@103.252.202.193)
2022-10-17 22:11:11 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-10-17 22:11:33 +0200 <EvanR> the main problem with runtime checks is when they finally happen...
2022-10-17 22:11:47 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 250 seconds)
2022-10-17 22:11:50 +0200 <c_wraith> I agree that it's reasonable to view type system inconsistencies as potential performance issues.
2022-10-17 22:11:57 +0200 <dminuoso> EvanR: Be honest. When was the last time you used `evaluate`?
2022-10-17 22:13:12 +0200 <EvanR> objection. relevance!
2022-10-17 22:14:05 +0200 <EvanR> TheCreatorOfCrea, also, on invisible type inference, it's not invisible. You can always query ghci for the type of something
2022-10-17 22:14:19 +0200 <TheCreatorOfCrea> c_wraith: Yes, you are right. In case of truly generic code, you cannot give the identifiers non-generic names. The trouble with that was, that in practice, for example, I hardly ever see the point of such generic things. E.g. yes, the concept of the monoid is nice. And I certainly wrote code that could implement the monoid class. But… why? All
2022-10-17 22:14:19 +0200 <TheCreatorOfCrea> it gives me is that I can now use operators that obfuscate what my code does even more. :)
2022-10-17 22:14:22 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 22:14:59 +0200 <EvanR> abstraction is supposed to be for the opposite of obfuscation
2022-10-17 22:15:11 +0200 <EvanR> to draw attention only to the important parts of what's going on
2022-10-17 22:15:22 +0200 <EvanR> in the case of monoids, combining stuff
2022-10-17 22:15:26 +0200 <c_wraith> what it gives you is the ability to use your type in places that abstract over all Monoid instances
2022-10-17 22:15:32 +0200 <dminuoso> TheCreatorOfCrea: the main usefulness of many classes like monoid isnt as much using `(<>)` as opposed to say `(++)`, but its for when you write code that is *polymorphic* over any monoid, where the caller can decide what they want.
2022-10-17 22:15:48 +0200 <TheCreatorOfCrea> dminuoso: At least `evaluate` is not the thing that it is in languages like JS. XD
2022-10-17 22:15:58 +0200 <dminuoso> Or when you want to emphasize laws, such that you can on the spot use the laws to associate things around, or add a mempty in some spot.
2022-10-17 22:16:37 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:3d5a:c60:7a1a:1513) (Read error: Connection reset by peer)
2022-10-17 22:16:46 +0200 <c_wraith> :t M.alterF
2022-10-17 22:16:47 +0200 <lambdabot> (Functor f, Ord k) => (Maybe a -> f (Maybe a)) -> k -> M.Map k a -> f (M.Map k a)
2022-10-17 22:16:59 +0200 <TheCreatorOfCrea> EvanR: You have to query it though. BTW: Is there a code editor that just always shows this, without needing to press any shortcun even? Purely due to where the cursor currently is?
2022-10-17 22:16:59 +0200 <EvanR> I should say proper abstraction, if your monoid generic code is really generic, it doesn't matter what monoid is used. Of course you see that messed up a lot in clojure, java, which always peeks around abstractions
2022-10-17 22:17:29 +0200 <c_wraith> I love how powerful that function is. it can do about half the things Data.Map supports, based on your choice if Functor
2022-10-17 22:17:29 +0200vn36__(~vn36@123.63.203.210)
2022-10-17 22:17:58 +0200 <EvanR> I'm not the editor fu guy, sorry
2022-10-17 22:18:22 +0200 <c_wraith> and there are a lot of cases where you can create a new Functor to add new functionality
2022-10-17 22:18:52 +0200 <c_wraith> Monoid is a bit less general, but it's still really useful
2022-10-17 22:19:09 +0200 <dminuoso> c_wraith: By the way, I recall from a previous discussion you mentioned (a,) as an interesting functor for alterF, and Ive begun to understand why.
2022-10-17 22:19:13 +0200 <TheCreatorOfCrea> EvanR: Hmm, humans don’t do well with abstraction though. E.g. in 3D games you easily get lost if every wall texture is abstracted to look the same. It’s the same trap every novice coder falls in, to generalize everything until he ends up with a one super-generic thing like “evaluate”, that just takes a whole new language as its parameter
2022-10-17 22:19:14 +0200 <TheCreatorOfCrea> again. ;)
2022-10-17 22:19:25 +0200 <EvanR> see we're talking past each other again
2022-10-17 22:19:31 +0200talismanick(~talismani@96-67-197-217-static.hfc.comcastbusiness.net)
2022-10-17 22:19:35 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 250 seconds)
2022-10-17 22:19:43 +0200 <EvanR> I say abstraction is structure, you say abstraction is lack of structure
2022-10-17 22:20:01 +0200 <c_wraith> dminuoso: ah, cool. I like returning a computed result and the updated map at the same time!
2022-10-17 22:20:28 +0200 <EvanR> `eval' is a good example of the second kind
2022-10-17 22:20:42 +0200 <TheCreatorOfCrea> dminuoso: Thanks for that point about monoids. It was useful to repeat that, and I agree. I’ll have to ponder it though, as it still feels uneasy. :)
2022-10-17 22:21:33 +0200 <talismanick> if I define `f .> v = liftM2 f v`, what infix{r,l,} declaration makes do what I want in `(<>) .> fst (drop 1 . snd)`?
2022-10-17 22:21:42 +0200 <EvanR> visualizations of structure is another topic though
2022-10-17 22:22:09 +0200 <talismanick> (where the alternative was the working-but-ugly-looking `liftM2 (<>) fst (drop 1 . snd)`)
2022-10-17 22:22:13 +0200 <dminuoso> TheCreatorOfCrea: That notion extends very well into monad, by the way. To a beginner, the term `Monad` is a red herring because it abstracts over something not necessarily relevant to the beginner themself, much like Monoid abstracts over say Integer addition.
2022-10-17 22:22:29 +0200 <talismanick> makes .> do what I want*
2022-10-17 22:22:31 +0200 <c_wraith> talismanick: it's the only infix operator in that expression. it doesn't matter.
2022-10-17 22:23:01 +0200 <c_wraith> well. the only infix operator at that level
2022-10-17 22:23:11 +0200 <talismanick> Then why is it giving me an error?
2022-10-17 22:23:24 +0200 <c_wraith> we'd need more context to know.
2022-10-17 22:23:32 +0200 <dminuoso> TheCreatorOfCrea: THere's a kind of symmetry in polymorphic things: When something has a `Monad` constraint it doesnt mean you have to know what Monad abstracts over to use it, it just means "As long as your type T has Monad T, you can use it at at that type". Its rather the author of that Monad polymorphic definition that has/wants to understand it.
2022-10-17 22:23:48 +0200 <dminuoso> (Replace `Monad` with an arbitrary typeclass)
2022-10-17 22:24:13 +0200 <TheCreatorOfCrea> EvanR: Ah, okay, if abstraction is structure by your definition, I’d agree. I implied abstraction is generalization to a more general pattern, as that was the definition I learned. But maybe those can be the same idea, if we simply think that there can be /many/ general patterns, which add structure again.
2022-10-17 22:24:33 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74) (Remote host closed the connection)
2022-10-17 22:24:43 +0200 <dminuoso> The caller has the obligation/freedom to pick a particular type, but the implementor is writing over an unknown choice, so their implementation has to work with *any* possible type the user might choose. There is a kind of duality here.
2022-10-17 22:24:55 +0200 <talismanick> nvm, fixed it
2022-10-17 22:24:56 +0200 <EvanR> by melting away the unnecessary parts to leave the important structure, you could say that is a kind of generalization too
2022-10-17 22:25:06 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-10-17 22:25:25 +0200 <EvanR> since it leaves the door open for other things to act as drop in replacements
2022-10-17 22:25:41 +0200 <EvanR> different implementations, same interface
2022-10-17 22:25:45 +0200jargon(~jargon@184.101.208.112) (Remote host closed the connection)
2022-10-17 22:26:12 +0200 <EvanR> but eval, taking a string and "run it", leaves you with very little to go on
2022-10-17 22:26:48 +0200 <EvanR> too much generalization if anything
2022-10-17 22:26:54 +0200 <dminuoso> The two benefits of `Monad` is just avoiding needlessly naming things with the same shape `mapMaybe :: Maybe a -> (a -> Maybe b) -> Maybe b`, `concatMap :: [a] -> (a -> [b]) -> [b]`, `ioThen :: IO a -> (a -> IO b) -> IO b`, which I guess is just for convenience (remembering fewer names), and allowing folks to write generically over any such thing. The laws themselves are unrelated to the typeclass
2022-10-17 22:26:56 +0200 <dminuoso> (as each individual such function already has these laws, whether a typeclass exists or not)
2022-10-17 22:27:02 +0200 <dminuoso> (Or equivalently with monoid, or any other typeclass)
2022-10-17 22:27:55 +0200 <TheCreatorOfCrea> dminuoso: I used to be at a level where I understood “A monad is just a monoid in the category of endofunctors! What’s the problem!” and it actually was easy to me! (Thanks to Bartosz Milewski’s YouTube series on category theory, which is really good.) But I forgot it all again. :( … But monads are a great example, because the main
2022-10-17 22:27:55 +0200 <TheCreatorOfCrea> problem in that they are badly *explained*. E.g. what do we expect when we start our explanation by telling novices that it is considered a big riddle and hard to understand? It’s not. It’s just an interface for things with certain rules.
2022-10-17 22:28:43 +0200 <dminuoso> TheCreatorOfCrea: The monad problem is as if you were introducing monoids to students in first class before talking about things like adding numbers. students get confused, dont know what you are talking about and why its a useful thing.
2022-10-17 22:29:13 +0200 <EvanR> that's the worst explanation of a Monad ever xD
2022-10-17 22:29:21 +0200wonko(~wjc@2a0e:1c80:2:0:45:15:19:130) (Ping timeout: 268 seconds)
2022-10-17 22:29:41 +0200 <Rembane> EvanR: Challenge accepted! :D
2022-10-17 22:29:51 +0200 <dminuoso> I think the single most important and best article on `Monad` is https://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/
2022-10-17 22:30:03 +0200 <talismanick> Monoids aren't hard to explain if you can explain what a free group is (and substitute monoid for group)
2022-10-17 22:30:07 +0200chomwitt(~chomwitt@2a02:587:dc1e:5e00:e9e7:bb14:f272:9a4b)
2022-10-17 22:30:15 +0200 <c_wraith> I've said it before and I'll say it again: I finally figured out what the heck is going on with Monad when I started learning Parsec and was like "wait, do notation just works!"
2022-10-17 22:30:15 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 22:30:26 +0200 <talismanick> then, "endofunctor" just means m(m a) = m a, but you also can't pull a back out
2022-10-17 22:30:28 +0200 <Rembane> talismanick: What's a free group?
2022-10-17 22:30:39 +0200 <dminuoso> @remember talismanick Monoids aren't hard to explain if you can explain what a free group is (and substitute monoid for group)
2022-10-17 22:30:39 +0200 <lambdabot> Done.
2022-10-17 22:31:06 +0200 <talismanick> Rembane: so, you could build the integers using {1} and adding/subtracting repeatedly
2022-10-17 22:31:30 +0200 <talismanick> if you have some set, the free group is the smallest part which you can build the rest of it out of
2022-10-17 22:31:33 +0200 <Rembane> talismanick: All integers? Not only positive ones?
2022-10-17 22:31:44 +0200 <talismanick> Rembane: that's for free groups :)
2022-10-17 22:31:51 +0200 <EvanR> it's a group so you can do -1
2022-10-17 22:31:53 +0200 <talismanick> group = monoid + invertibility
2022-10-17 22:32:21 +0200 <Rembane> talismanick: Cool, uh... I don't get it. Are the integers a free group?
2022-10-17 22:32:21 +0200 <TheCreatorOfCrea> dminuoso: I would not say it’s needless, because it is imo extremely hard what that generic implementation *is* that the author of a monad actually chose. E.g. for lists, there are clearly several choices. That insight gets lost when you use the monad. Which, to me, is about as problematic as dynamic languages’ implicit casting. (E.g.
2022-10-17 22:32:22 +0200 <TheCreatorOfCrea> JavaScript’s nightmares. ;)
2022-10-17 22:32:37 +0200 <dminuoso> Rembane: That's also quite easily explained: First you must understand that a free functor is just left adjoint to a forgetful functor
2022-10-17 22:32:41 +0200 <talismanick> {1}, together with + (and its minus) is the free group over the integers
2022-10-17 22:33:02 +0200 <talismanick> a group is a set with some operator which takes 2 elements of that set and returns another element
2022-10-17 22:33:14 +0200 <Rembane> talismanick: That funny {1}, is that the set consisting of the number one?
2022-10-17 22:33:19 +0200 <talismanick> yep!
2022-10-17 22:33:29 +0200 <talismanick> because, 4 = 1 + 1 + 1 + 1
2022-10-17 22:33:31 +0200 <EvanR> I like how this exposition of free groups is going in reverse from the most abstract back to what a group even is
2022-10-17 22:33:32 +0200 <Rembane> Cool, I thought it was some reference to something else at first.
2022-10-17 22:33:44 +0200 <Rembane> dminuoso: :D
2022-10-17 22:33:45 +0200 <Franciman> talismanick: wait i thought the free group over the integers was (Z, +)
2022-10-17 22:33:57 +0200 <TheCreatorOfCrea> dminuoso: Also, I found it very hard to actually realize that my code is just an attempt at re-implementing that monad and I could clarify my code by using the monad. Specifically because it’s so hard to tell what implementation was chosen.
2022-10-17 22:34:09 +0200 <talismanick> wait, shoot, you're right
2022-10-17 22:34:19 +0200 <talismanick> haven't done abstract algebra in years :D
2022-10-17 22:34:29 +0200 <dminuoso> Rembane: As a very simple starter, we can imagine lists to be a free monoid.
2022-10-17 22:34:36 +0200 <c_wraith> Franciman: notational difference. 1 is a generator, and there are group notations where you list the generators.
2022-10-17 22:34:39 +0200 <dminuoso> (or free monoidS)
2022-10-17 22:34:45 +0200 <Franciman> ah ok cool
2022-10-17 22:34:48 +0200 <EvanR> you can call Z with + and negate a group, now what about free group
2022-10-17 22:34:52 +0200 <Franciman> i used <1> for that
2022-10-17 22:34:54 +0200 <Franciman> now it makes sense
2022-10-17 22:35:03 +0200 <dminuoso> Rembane: Very roughly the idea is that a free something is the simplest something, that satisfies all the laws of something, without any extra baggage.
2022-10-17 22:35:13 +0200 <talismanick> but, yea, if you're given {'a','b'} with the concatenation operator, that's the free group over {'ab', 'aaaba', 'ababa', ...}
2022-10-17 22:35:17 +0200 <talismanick> free monoid, I mean
2022-10-17 22:35:21 +0200 <talismanick> because you don't have an inverse
2022-10-17 22:35:24 +0200 <Rembane> dminuoso: Cool, a minimum working example. *handwaves*
2022-10-17 22:35:29 +0200 <TheCreatorOfCrea> dminuoso: Yes. somehow, monoids and such were trivial to me though. Just an operator and a unit element. Like + and 0, or * and 1.
2022-10-17 22:35:51 +0200 <EvanR> the concatenation is what you get when ask for the free monoid over that set
2022-10-17 22:35:57 +0200 <TheCreatorOfCrea> dminuoso: I literally read that exact article! :D
2022-10-17 22:36:02 +0200 <EvanR> you don't have to start with it
2022-10-17 22:36:05 +0200 <talismanick> so, a monad is a monoid (maps back to itself under some operation), which maps back to itself
2022-10-17 22:36:15 +0200 <dminuoso> Rembane: and in that sense, a list encapsulates bare monoidal structure, where [A, B] can be imagined as the monoidal combination of A and B.. but without talking what that monoidal combination really is.
2022-10-17 22:36:19 +0200 <dminuoso> It's just the general shape.
2022-10-17 22:36:26 +0200 <talismanick> so you can sequence them and get back a single one, but it's also a black hole, typewise
2022-10-17 22:36:32 +0200 <dminuoso> And you can build things along that monoidal shape, but without actually picking an actual monoid (extra baggage)
2022-10-17 22:36:50 +0200 <talismanick> what goes in doesn't come back out, because its only functors... are back into itself! they're endo-functors
2022-10-17 22:37:08 +0200 <EvanR> I'm lost
2022-10-17 22:37:11 +0200 <TheCreatorOfCrea> talismanick: What I saw: “just means [meaningless letters, maybe a call to mama]” 🤣
2022-10-17 22:37:12 +0200 <talismanick> (endo is Greek for "into", "inside")
2022-10-17 22:38:52 +0200 <talismanick> TheCreatorOfCrea: so, if you have a monad over a type, "m a", your operations include binding one wrapped value to another (>>=) and wrapping a value in "m" (return), but you aren't given any method to pull a value out
2022-10-17 22:38:59 +0200 <dminuoso> Rembane: And similarly, free monads work the same way. You just use an algebraic datatype to build up the monad shape computation `data Free f a = Pure a | Roll (f (Free f a))` (you can think `Roll` as just a delayed `join` that we can execute once we commit to some particular `f`). You just capture the raw monad shape, without any extra baggage. Do you see the pattern here?
2022-10-17 22:39:10 +0200 <talismanick> so, all of its maps which would otherwise go to another type, go back to itself
2022-10-17 22:39:17 +0200 <dminuoso> (this is very handwavy, but I think its more usable from a programmer point of view this way)
2022-10-17 22:39:18 +0200 <talismanick> once a value is inside, it's stuck there
2022-10-17 22:39:29 +0200 <EvanR> so you're saying monads are like burritos
2022-10-17 22:39:54 +0200 <talismanick> sure, if burritos destroyed information like black holes
2022-10-17 22:39:54 +0200 <Rembane> dminuoso: I see the pattern. Somehow it's easier to see it in the free monad than in the free monoid. Most probably because I've actually used the free monad for implementing stuff.
2022-10-17 22:40:05 +0200 <EvanR> monads are like black holes
2022-10-17 22:40:09 +0200 <TheCreatorOfCrea> talismanick: The “maps back” explanation is actually a pretty good one, yeah. It partially reminds me of how I had understood it, when it was still fresh. But, the “return” adds one more thing to it, no?
2022-10-17 22:40:10 +0200 <EvanR> that is a new one
2022-10-17 22:40:14 +0200 <talismanick> I microwave my burritos with Hawking radiation
2022-10-17 22:40:20 +0200 <dminuoso> Rembane: Imagine the `,` in the list to be the delayed mappend.
2022-10-17 22:40:49 +0200 <dminuoso> with foldMap you can commit to a particular monoid choice
2022-10-17 22:41:04 +0200 <talismanick> TheCreatorOfCrea: so, the signature is return :: a -> m a
2022-10-17 22:41:11 +0200 <Rembane> dminuoso: Oh, cool. This is good stuff.
2022-10-17 22:41:46 +0200 <talismanick> so, if you have some sequence of operations (inside the monad), return means "I'm done, you can stop here and wherever I'm at is the single opaque return value"
2022-10-17 22:42:14 +0200 <dminuoso> Rembane: and lack of any associative structure in the list can be thought of proof of associativity embedded.
2022-10-17 22:42:29 +0200 <EvanR> terms in a free monoid over a set are like the stem cells, you can replace the <>'s to get the behavior of any other monoid
2022-10-17 22:42:42 +0200 <dminuoso> that is [a,b,c] makes no comment about whether ((a,b),c) or (a,(b,c)) so to speak
2022-10-17 22:42:45 +0200 <EvanR> specialize into terms in any other monoid
2022-10-17 22:42:47 +0200 <dminuoso> its just.. the same.
2022-10-17 22:43:01 +0200 <talismanick> if you have readMyList :: IO [Int], you can read your list of Ints from the user and return that list, so you can `xs <- readMyList` inside main :: IO ()
2022-10-17 22:43:22 +0200 <talismanick> return is what allows you to write with certainty that m ( m a ) == m a
2022-10-17 22:43:31 +0200 <Rembane> dminuoso: That makes sense. The foldr-diagram of the Haskell Wiki is flashing in my brain, but that might be something else.
2022-10-17 22:43:36 +0200 <dminuoso> Rembane: though I guess this doesnt really hold true if you look closer. but we do accept (++) to satisfy associativty
2022-10-17 22:43:49 +0200 <talismanick> because it lets the inner one finish its work and cleanly merge back into the outer monadic context
2022-10-17 22:43:57 +0200 <dminuoso> So there's this cool notion edward once brought up somewhere, where he argued that we could define list also as:
2022-10-17 22:44:13 +0200 <dminuoso> newtype List a = List (forall b. Monoid b => (a -> b) -> b)
2022-10-17 22:44:40 +0200 <TheCreatorOfCrea> talismanick: Well, you can always pull the value out, by “running” the monad. (Which btw is a really confusing name for that operation, because it only makes sense for IO.) The only monad where you can’t do that in Haskell is the IO monad, no? (Unless GHC allows you to `unsafeInvokeElterGods :: IO a -> (RealWorld, a)` :D
2022-10-17 22:45:26 +0200 <EvanR> not all monads have run
2022-10-17 22:45:29 +0200 <dminuoso> This also follows from the fact that Foldable itself is fully characterstic for something being list-like, and yet you can define it in terms of `foldr` *OR* `foldMap`
2022-10-17 22:45:37 +0200 <EvanR> all comonads have extract
2022-10-17 22:45:57 +0200 <talismanick> I remember once reading a suggestion to reimagine IO as a comonad
2022-10-17 22:46:00 +0200 <talismanick> IIRC
2022-10-17 22:46:01 +0200nate1(~nate@98.45.169.16)
2022-10-17 22:46:23 +0200 <talismanick> flew over my head at the time, but I might understand it better now
2022-10-17 22:47:39 +0200 <geekosaur> TheCreatorOfCrea, there is unsafePerformIO. and worse ones
2022-10-17 22:48:29 +0200 <EvanR> IO a -> (RealWorld, a) looks bad
2022-10-17 22:49:12 +0200 <[exa]> that's way beyond unsafe* prefixes
2022-10-17 22:49:17 +0200TheCreatorOfCreahas `fold*` flashbacks. … I *never* remember which one goes into which direction. All explanations I ever saw still stay ambiguous, since “*r” and “*l” could still mean either way, depending on which way you mean “right” and “left”.
2022-10-17 22:49:29 +0200 <dminuoso> TheCreatorOfCrea: both go the same direcftion./
2022-10-17 22:49:33 +0200 <geekosaur> ^
2022-10-17 22:49:42 +0200 <geekosaur> they *associate* in different directions
2022-10-17 22:49:45 +0200 <dminuoso> TheCreatorOfCrea: the difference between foldr and foldl is in association.
2022-10-17 22:49:55 +0200 <dminuoso> its similar to say infixr vs infixl
2022-10-17 22:49:55 +0200Guest|32(~Guest|32@dyn1174-208.insecure.ic.ac.uk)
2022-10-17 22:50:07 +0200Guest|32(~Guest|32@dyn1174-208.insecure.ic.ac.uk) (Client Quit)
2022-10-17 22:50:37 +0200 <dminuoso> foldr replaces (:) with a function, associating towards the right
2022-10-17 22:50:40 +0200 <dminuoso> foldl replaces (:) with a function, associating towards the left
2022-10-17 22:51:33 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-17 22:51:38 +0200 <talismanick> I wish there was a Zip class in Prelude so I could zipWith-apply an n-tuple of functions to an n-tuple of values
2022-10-17 22:51:45 +0200 <Rembane> It just struck me. There's no such thing as a foldmiddle, right?
2022-10-17 22:51:45 +0200littlefinger(~littlefin@pool-74-102-98-242.nwrknj.fios.verizon.net) (Ping timeout: 244 seconds)
2022-10-17 22:52:02 +0200 <dminuoso> TheCreatorOfCrea: https://upload.wikimedia.org/wikipedia/commons/3/3e/Right-fold-transformation.png https://upload.wikimedia.org/wikipedia/commons/5/5a/Left-fold-transformation.png
2022-10-17 22:52:17 +0200 <dminuoso> See that, from left to right, the order of the numbers is the same?
2022-10-17 22:52:19 +0200 <geekosaur> how do you associate a binary operation to the middle?
2022-10-17 22:52:37 +0200 <TheCreatorOfCrea> geekosaur: I know. I had to use it once. (I used it somewhere, where I could know that it was safe, but the compiler couldn’t know so it was OK. Had to do with implementing dynamically loaded instances of a class, to allow for plugins. But I found better ways to do the same thing now.)
2022-10-17 22:53:04 +0200 <Rembane> geekosaur: Like a binary tree perhaps?
2022-10-17 22:53:20 +0200 <dminuoso> Mmm well on the grammatical level we have `infix` as an equivalent.
2022-10-17 22:53:33 +0200 <dminuoso> A binary tree seems to be the shape here yes
2022-10-17 22:53:44 +0200 <dminuoso> But it begs the question of balancing
2022-10-17 22:54:13 +0200 <monochrom> For tree structures and most ADTs, perhaps you would like catamorphisms.
2022-10-17 22:55:15 +0200 <darkling> I keep reading that word as "cacomorphisms". :/
2022-10-17 22:55:36 +0200 <dminuoso> a comorphism!
2022-10-17 22:55:42 +0200 <dminuoso> But what does ca mean
2022-10-17 22:55:44 +0200 <EvanR> TheCreatorOfCrea, don't remember foldr foldl, rederive it
2022-10-17 22:55:45 +0200 <monochrom> On Halloween, you will also hear me bring up pumpkin catmorphisms >:)
2022-10-17 22:55:48 +0200 <TheCreatorOfCrea> EvanR: Wouldn’t `virtualMachine :: RealWorld -> IO a -> (RealWorld, a)` make sense though? ^^ Provided one could actually define “RealWorld”. (Maybe merely as `IO b`, so one can drop it into an outer IO monad, after processing it in some way that implements the VM?)
2022-10-17 22:55:57 +0200 <dminuoso> TheCreatorOfCrea: that exists.
2022-10-17 22:56:09 +0200 <dminuoso> Flip it around, and you have it
2022-10-17 22:56:09 +0200 <talismanick> it means a morphism which you shotgun in hell while heavy metal blares
2022-10-17 22:56:12 +0200 <dminuoso> https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-Base.html#v:unIO
2022-10-17 22:56:14 +0200 <dminuoso> unIO :: IO a -> State# RealWorld -> (# State# RealWorld, a #)
2022-10-17 22:56:30 +0200 <monochrom> Preview: https://www.vex.net/~trebla/photo/unorganized/pumpkin-catmorphism.jpg
2022-10-17 22:56:47 +0200 <darkling> Scary.
2022-10-17 22:56:57 +0200 <dminuoso> TheCreatorOfCrea: and it turns out, making a real world is possible too: https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-Exts.html#v:realWorld-35-
2022-10-17 22:57:17 +0200 <dminuoso> If you combine these two, you have accursedUnutterablePerformIO which will elide all your mutable buffers or worse.
2022-10-17 22:57:20 +0200 <TheCreatorOfCrea> dminuoso: Ok, that was actually helpful. :) Now I can blame my lack of understanding on having trouble remembering which direction “associates towards *” means. ;)
2022-10-17 22:58:12 +0200 <geekosaur> that's easy though. (a * b) * c vs. a * (b * c) for some operator *
2022-10-17 22:58:21 +0200 <dminuoso> TheCreatorOfCrea: Though I think picturing it horizontally is even better: (((z `f` 1) `f` 2) `f` 3) vs (1 `f` (2 `f` (3 `f` z)))
2022-10-17 22:59:06 +0200 <TheCreatorOfCrea> talismanick: Isn’t the whole point of tuples that you cannot treat their elements the same? … But I think such functions exist though, for basic levels, no? … In any case, this sounds more like a list without the monomorphism restriction.
2022-10-17 22:59:06 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
2022-10-17 22:59:14 +0200Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-10-17 22:59:34 +0200 <dminuoso> In effect the former is more like a loop (especially if `f` is strict in its first argument, or that strictness is forced inside the foldl'ing), because it readily computes answers, whereas foldr rather constructs structure.
2022-10-17 22:59:48 +0200 <dminuoso> So its really not about direction, they are for different things.
2022-10-17 23:00:16 +0200 <talismanick> TheCreatorOfCrea: yeah, but just the case of `apply :: (a->a1,b->b1,...) -> (a,b,...) -> (a1,b1,....)
2022-10-17 23:00:43 +0200 <talismanick> err, zipApply
2022-10-17 23:01:13 +0200darkstardevx(~darkstard@50.126.124.156)
2022-10-17 23:01:22 +0200 <TheCreatorOfCrea> Rembane: Now you made me think of audio filters. high pass (foldr), low pass (foldl), band pass (foldmiddle), and notch filder (foldouter), plus a merely phase-inverting filter (folddual?). ;)
2022-10-17 23:02:31 +0200Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-10-17 23:02:35 +0200 <TheCreatorOfCrea> dminuoso: Those images you linked to are *exactly* what /causes/ my confusion. Thank you for trying to help, but this is a bug in my own mind that I need to fix myself first. ;)
2022-10-17 23:02:51 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-10-17 23:03:09 +0200darkstardevx(~darkstard@50.126.124.156) (Remote host closed the connection)
2022-10-17 23:03:14 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
2022-10-17 23:03:28 +0200 <TheCreatorOfCrea> dminuoso: Thank you in general, too. It is always a joy to come here… and leave inspired. :)
2022-10-17 23:03:33 +0200darkstardevx(~darkstard@50.126.124.156)
2022-10-17 23:05:20 +0200 <Rembane> TheCreatorOfCrea: Muaha! :D
2022-10-17 23:06:50 +0200 <TheCreatorOfCrea> dminuoso: `unIO` => 😳
2022-10-17 23:08:12 +0200johnjaye(~pi@173.209.64.74) (Ping timeout: 268 seconds)
2022-10-17 23:08:41 +0200 <TheCreatorOfCrea> dminuoso: `import GHC.Magic; main = youShallNotPass -- cause it is unsafe`
2022-10-17 23:09:02 +0200 <dminuoso> TheCreatorOfCrea: Let me emphasize: these two primitives are absurdly unsafe.
2022-10-17 23:09:28 +0200 <dminuoso> In combination.
2022-10-17 23:09:33 +0200 <TheCreatorOfCrea> dminuoso: WTF, `accursedUnutterablePerformIO` is an actual function!!
2022-10-17 23:09:36 +0200 <dminuoso> Yes.
2022-10-17 23:09:43 +0200 <dminuoso> Take one guess why it was renamed that way.
2022-10-17 23:10:03 +0200johnjaye(~pi@173.209.64.74)
2022-10-17 23:10:23 +0200 <dminuoso> Imagine you pry open an IO with that, and you have two IO actions both of which internally do `malloc 4096`. Take one guess what the optimizer will do here.
2022-10-17 23:10:34 +0200darkstardevx(~darkstard@50.126.124.156) (Remote host closed the connection)
2022-10-17 23:10:55 +0200darkstardevx(~darkstard@50.126.124.156)
2022-10-17 23:12:58 +0200 <TheCreatorOfCrea> dminuoso: foldl being more like a loop, and foldr constructing structure finally seems to have made it stick for me. Amazin. Let’s see if I remember it the next time. :)
2022-10-17 23:13:19 +0200 <dminuoso> TheCreatorOfCrea: note that foldl' should be better used in most cases when you want a loop
2022-10-17 23:13:29 +0200 <dminuoso> otherwise you will accumulate thunks for every round.
2022-10-17 23:13:36 +0200titibandit(~titibandi@xdsl-78-34-208-230.nc.de) (Remote host closed the connection)
2022-10-17 23:14:12 +0200 <TheCreatorOfCrea> dminuoso: No need to take a guess. I instantly hoogled it, and the documentation speaks for itself. :D
2022-10-17 23:14:42 +0200 <geekosaur> the linked bug reports are quite instructive
2022-10-17 23:14:52 +0200 <TheCreatorOfCrea> dminuoso: I will definitely use it, just because I like to summon elder gods and watch the world burn. ;) (At least the virtual one that goes away after I reset my computer.)
2022-10-17 23:15:08 +0200wonko(~wjc@2a0e:1c80:2:0:45:15:19:130)
2022-10-17 23:15:11 +0200gnyeki(~gnyeki@user/gnyeki) (Quit: leaving)
2022-10-17 23:15:14 +0200 <dminuoso> TheCreatorOfCrea: yeah its fun. you now have mutable buffer, and if later IO actions come to free them, you might double-free that too. or maybe they get elided, free occurs, but the other side keeps using free'd memory!
2022-10-17 23:15:27 +0200 <dminuoso> TheCreatorOfCrea: all kinds of memory corruption and bugs.
2022-10-17 23:15:29 +0200 <dminuoso> :>
2022-10-17 23:15:36 +0200 <geekosaur> (I winced when I read the descriptions; I could already see what was coming. But I suspect I'm a bit more familiar with this than the ByteString devs were back then)
2022-10-17 23:15:36 +0200 <TheCreatorOfCrea> dminuoso: I know about `foldl'`. :)
2022-10-17 23:16:17 +0200 <geekosaur> aliased buffers because ghc hoists the common allocation out of the loop
2022-10-17 23:16:23 +0200 <geekosaur> fun stuff like that
2022-10-17 23:16:53 +0200TheCreatorOfCreaneeds MOAR Tardis monad in there! :D
2022-10-17 23:17:13 +0200 <geekosaur> (just remember the Tardis monad is slow)
2022-10-17 23:17:34 +0200`2jt(~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 268 seconds)
2022-10-17 23:17:36 +0200vn36__(~vn36@123.63.203.210) (Ping timeout: 260 seconds)
2022-10-17 23:19:29 +0200 <TheCreatorOfCrea> geekosaur: I plan to relocate next to a black hole anyway, so no problem. ;)
2022-10-17 23:19:47 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-17 23:19:59 +0200 <dminuoso> I think you will find out that plan wont work out so well.
2022-10-17 23:20:33 +0200michalz(~michalz@185.246.207.200) (Remote host closed the connection)
2022-10-17 23:23:35 +0200 <TheCreatorOfCrea> dminuoso: If you stay at the right distance, actually it does. :D
2022-10-17 23:24:38 +0200 <dminuoso> Just be sure to pick one without an accretion disk
2022-10-17 23:25:00 +0200 <dminuoso> (Best to check before you fly there)
2022-10-17 23:25:03 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74)
2022-10-17 23:25:30 +0200 <geekosaur> still not the greatest of ideas, depending on distance. see Niven's "Neutron Star"
2022-10-17 23:27:48 +0200 <TheCreatorOfCrea> geekosaur: I’m more of a Saggitarius A* kinda guy. :P
2022-10-17 23:28:15 +0200 <geekosaur> same tidal effects only more so
2022-10-17 23:28:18 +0200 <dminuoso> SagA* has a massive accretion disk
2022-10-17 23:28:29 +0200 <dminuoso> You will have some serious thermal and radiation problems.
2022-10-17 23:28:44 +0200 <geekosaur> you do not want tidal effects between your head and your feet
2022-10-17 23:28:59 +0200 <dminuoso> geekosaur: the shear depends on how close to the event horizon you are though
2022-10-17 23:29:13 +0200 <geekosaur> that's why I said "depending on distance"
2022-10-17 23:29:16 +0200 <dminuoso> RIght.
2022-10-17 23:29:26 +0200 <dminuoso> So first we have to establish how expensive TheCreatorOfCrea's tardis computation is
2022-10-17 23:29:31 +0200 <dminuoso> And how much time he wants to skip
2022-10-17 23:29:51 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:253c:9364:4f2a:ce74) (Ping timeout: 260 seconds)
2022-10-17 23:30:03 +0200 <TheCreatorOfCrea> geekosaur: Actually, the bigger the hole, the more gradual the tidal effects. If the hole is big enough, you will not even notice you went past the horizon unless you got a window. Your space will have become ”time-like” though. ^^
2022-10-17 23:30:26 +0200 <dminuoso> Then we just apply the lorentz transformation, figure out ideal orbit, predict radiation/thermal problems
2022-10-17 23:30:40 +0200 <dminuoso> calculate necessary fuel for escape velocity
2022-10-17 23:31:30 +0200 <dminuoso> I dont think its well agreed upon what you would observe when crossing the event horizon
2022-10-17 23:31:35 +0200 <geekosaur> ^
2022-10-17 23:31:42 +0200abiss27(~abiss27@190.213.236.106)
2022-10-17 23:32:03 +0200 <geekosaur> hell, there are still hypotheses that the universe itself is contained within a massive event horizon
2022-10-17 23:32:05 +0200 <TheCreatorOfCrea> dminuoso: “It’s almost TOO easy!” -- Garth ;)
2022-10-17 23:32:47 +0200 <TheCreatorOfCrea> geekosaur: Yes, and like the big bang, the lack of testability makes it merely yet another creation myth. ^^
2022-10-17 23:32:56 +0200 <geekosaur> yep
2022-10-17 23:32:58 +0200TheCreatorOfCreaducks. ;)
2022-10-17 23:33:44 +0200TheCreatorOfCrea’s porn is existentialism.
2022-10-17 23:33:52 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2022-10-17 23:34:28 +0200TheCreatorOfCrea(~TheCreato@2a0a-a546-c344-1-e0bc-1e36-315c-295b.ipv6dyn.netcologne.de) (Quit: Client closed)
2022-10-17 23:34:32 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-17 23:34:41 +0200TheCreatorOfCrea(~TheCreato@2a0a-a546-c344-1-e0bc-1e36-315c-295b.ipv6dyn.netcologne.de)
2022-10-17 23:34:49 +0200rockystone(~rocky@user/rockymarine)
2022-10-17 23:35:05 +0200vn36_(~vn36@123.63.203.210)
2022-10-17 23:35:10 +0200chomwitt(~chomwitt@2a02:587:dc1e:5e00:e9e7:bb14:f272:9a4b) (Remote host closed the connection)
2022-10-17 23:35:32 +0200TheCreatorOfCrea(~TheCreato@2a0a-a546-c344-1-e0bc-1e36-315c-295b.ipv6dyn.netcologne.de) (Client Quit)
2022-10-17 23:35:41 +0200TheCreatorOfCrea(~TheCreato@2a0a-a546-c344-1-e0bc-1e36-315c-295b.ipv6dyn.netcologne.de)
2022-10-17 23:36:46 +0200iphy_iphy
2022-10-17 23:37:48 +0200 <TheCreatorOfCrea> What’s the difference between Vector and MArray, btw? They seem to both be mutable arrays…
2022-10-17 23:38:37 +0200 <TheCreatorOfCrea> (Ok, MArray seems to be indexed by a definable index, so I guess I already answered my own question.)
2022-10-17 23:38:57 +0200stackdroid18(14094@user/stackdroid)
2022-10-17 23:39:37 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-10-17 23:39:57 +0200 <EvanR> there's what's the difference between Vector and Array, and MVector / MArray
2022-10-17 23:40:04 +0200 <EvanR> mutability isn't it, since both has both versions
2022-10-17 23:40:43 +0200 <EvanR> Array uses an index type, Vector uses Int (and has more API)
2022-10-17 23:44:16 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-17 23:44:17 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-17 23:44:18 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-10-17 23:44:21 +0200johnjaye(~pi@173.209.64.74) (Ping timeout: 252 seconds)
2022-10-17 23:44:55 +0200 <TheCreatorOfCrea> EvanR: Ah, OK, that completes the picture.
2022-10-17 23:45:01 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-17 23:45:18 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-17 23:51:11 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-17 23:51:42 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-17 23:52:19 +0200ddellacosta(~ddellacos@86.106.143.65)
2022-10-17 23:56:41 +0200abiss27(~abiss27@190.213.236.106) (Ping timeout: 260 seconds)
2022-10-17 23:58:09 +0200ddellacosta(~ddellacos@86.106.143.65) (Ping timeout: 268 seconds)