Home liberachat/#haskell: Logs Calendar

Logs on 2021-12-05 (liberachat/#haskell)

00:00:17 × pfurla quits (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…)
00:01:11 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
00:03:11 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
00:03:30 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
00:05:20 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
00:07:09 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
00:07:28 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
00:07:38 maroloccio joins (~marolocci@151.53.155.184)
00:09:18 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
00:09:36 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
00:09:45 pfurla joins (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6)
00:11:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
00:11:42 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
00:11:43 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
00:12:01 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
00:14:56 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 245 seconds)
00:16:15 × curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 256 seconds)
00:16:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
00:22:49 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 252 seconds)
00:23:38 alx741 joins (~alx741@186.178.108.253)
00:26:29 × xff0x quits (~xff0x@2001:1a81:53e7:c700:4988:289c:a66b:6fe) (Ping timeout: 252 seconds)
00:26:47 × pfurla quits (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6) (Quit: gone to sleep. ZZZzzz…)
00:27:14 xff0x joins (~xff0x@2001:1a81:53e7:c700:1510:f8b4:a5f5:28f)
00:29:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
00:29:14 pfurla joins (~pfurla@201.17.118.230)
00:34:15 × acidjnk_new quits (~acidjnk@p200300d0c7271e5135c37e9089e8a354.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
00:35:23 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
00:36:10 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:36:41 chenqisu1 joins (~chenqisu1@183.217.200.156)
00:40:36 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
00:45:43 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds)
00:47:07 <arahael> ^^ that.
00:48:03 mvk joins (~mvk@2607:fea8:5cdd:f000::9788)
00:59:06 <yin> why is GeneralizedNewtypeDeriving not allowed in Safe Haskell?
01:01:46 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
01:03:45 <geekosaur> https://stackoverflow.com/questions/17137111/why-isnt-generalizednewtypederiving-a-safe-haskell
01:04:15 <geekosaur> includes not only an explanation but also a link to a ghc ticket with examples of why it's unsafe
01:08:14 retro_ joins (~retro@97e2ba2e.skybroadband.com)
01:09:58 <geekosaur> from what I just read, the original concerns were mostly addressed with the roles system but it also brought in new questions
01:10:59 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:11:00 <int-e> Well with GND using `coerce` nowadays it /should/ be safe.
01:11:31 <geekosaur> https://mail.haskell.org/pipermail/haskell-cafe/2015-April/118970.html ff
01:11:52 × retroid_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
01:11:55 <geekosaur> apparently there's still some thorny questions
01:12:29 × hololeap quits (~hololeap@user/hololeap) (Excess Flood)
01:12:35 retroid_ joins (~retro@97e2ba2e.skybroadband.com)
01:13:06 × retro_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
01:13:27 <int-e> and the exactl meaning of "safe"
01:13:38 <int-e> is still unclear
01:14:01 hololeap joins (~hololeap@user/hololeap)
01:14:40 <int-e> But thanks, I guess "coerce breaks abstraction via newtype" is also the reason why Data.Coerce is marked unsafe.
01:16:49 × vgtw quits (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) (Quit: ZNC - https://znc.in)
01:16:54 × maroloccio quits (~marolocci@151.53.155.184) (Quit: WeeChat 3.0)
01:17:06 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:17:27 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
01:19:36 maroloccio joins (~marolocci@151.53.155.184)
01:19:46 × maroloccio quits (~marolocci@151.53.155.184) (Client Quit)
01:20:08 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
01:20:15 maroloccio joins (~marolocci@151.53.155.184)
01:22:50 vgtw joins (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se)
01:29:56 × vgtw quits (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) (Quit: ZNC - https://znc.in)
01:33:16 vgtw joins (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se)
01:44:10 <yin> geekosaur: thanks
01:46:42 <yin> i wish i could have Safe and add an exception. like {-# UnsafeException trace #-}
01:46:47 × axeman quits (~quassel@2a02:8109:a3c0:b10:7b24:ebdc:13ed:79b5) (Ping timeout: 252 seconds)
01:46:50 abrantesasf joins (~abrantesa@187.36.170.211)
01:47:53 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
01:48:37 <geekosaur> reexport trace from a module marked Trusted?
01:51:42 <geekosaur> …hm, how does that even work with modern stack/cabal? trust is marked in the package database, which is synthetic
01:52:10 <yin> i'm getting "incompatible Safe Haskell flags! (Safe, Trustworthy)
01:52:21 <yin> i'm doing something wrong i think
01:52:30 <geekosaur> right, that module cannot be marked Safe
01:52:48 <geekosaur> if it were then it wouldn't be allowed to import trace
01:53:13 <yin> hmm
01:53:24 jmorris joins (uid433911@id-433911.hampstead.irccloud.com)
01:53:34 <geekosaur> alternatively I suppose you could mark Debug.Trace itself as Trustworthy
01:53:46 <geekosaur> but that might be going farther than you want
01:54:10 <yin> if i add Safe to default-extensions in my .cabal file, does that mean that all submodules are marked as safe?
01:55:39 <yin> is it a stupid thing to add Safe in default-extensions even?
01:55:42 <geekosaur> yes, if I understand "submodule" correctly. (hierarchical modules aren't, really, they're just an organizational aid for people)
01:55:57 <geekosaur> I think most people would avoid that, yes
01:56:11 <yin> ok that makes sense
01:56:17 <geekosaur> in part because of what int-e said earlier: "safe" is not well defined at present
01:57:26 <geekosaur> as best I can tell, it is intended to mean "cannot be used to define unsafeCoerce" — but that's already true of Debug.Trace, so it should be at least Trustworthy
01:57:59 <geekosaur> which is why "Safe Haskell" is confusing and largely avoided; it's inconsistent
02:01:19 <yin> i think i remember a nice enough system from rust (?) where you marked individual functions as "trust me, i'm being responsible with {unsafe method}"
02:04:59 <EvanR> a nice sentiment
02:06:59 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:06:59 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
02:06:59 wroathe joins (~wroathe@user/wroathe)
02:07:18 <yin> :P
02:10:59 retro_ joins (~retro@97e2ba2e.skybroadband.com)
02:13:23 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
02:14:46 × retroid_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
02:15:16 <geekosaur> well, actually there are other problems. like iirc the reason for Debug.Trace not being Trustworthy is it's left to the developer to decide what is Trustworthy or not
02:15:29 retroid_ joins (~retro@97e2ba2e.skybroadband.com)
02:15:35 <geekosaur> but then with base any module you mark Trustworthy becomes Trustworthy everywhere
02:15:48 <geekosaur> when you might want it for only one stack/cabal project
02:16:00 × retro_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
02:16:07 <geekosaur> which is a downside of storing Trustworthy in the package db
02:17:03 <geekosaur> also, hm. the other Debug.Trace functions don't expose IO in any way so they are fine, but I haven't vetted traceIO
02:17:37 <geekosaur> it may be fine if the only use of IO is sequencing, but it may not
02:17:51 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
02:19:00 × hololeap quits (~hololeap@user/hololeap) (Read error: Connection reset by peer)
02:19:05 × xff0x quits (~xff0x@2001:1a81:53e7:c700:1510:f8b4:a5f5:28f) (Ping timeout: 268 seconds)
02:19:28 xff0x joins (~xff0x@2001:1a81:53e7:c700:5d29:4d4d:a0f8:12e7)
02:19:44 hololeap joins (~hololeap@user/hololeap)
02:19:55 <geekosaur> also: if the package db for a stack/cabal project is created once for the project and retained, such that you could mark modules Trustworthy and have it stick, you now have additional metadata that's not part of the project definition (cabal files, stack.yaml/cabal.project, etc.)
02:20:45 <geekosaur> so if you duplicate that project or transport it somewhere else or nuke and regenerate the package db, you have to remember to mark modules as Trustworthy again
02:22:47 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Ping timeout: 268 seconds)
02:24:04 <geekosaur> I'd be interested in hearing from sm or sclv about that one
02:25:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:25:39 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 252 seconds)
02:26:32 <sm> no real insight from me I'm afraid, except maximising the immutable and reproducible parts is always good
02:29:18 zincy_ joins (~zincy@host86-151-99-97.range86-151.btcentralplus.com)
02:29:38 tom_ joins (~tom@2a00:23c8:970c:4801:8164:4807:4ccb:62f3)
02:29:41 × xff0x quits (~xff0x@2001:1a81:53e7:c700:5d29:4d4d:a0f8:12e7) (Ping timeout: 252 seconds)
02:30:09 × zincy_ quits (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Read error: Connection reset by peer)
02:30:26 sm feels reproducible builds is higher priority than marking things safe
02:31:35 × zincy quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Ping timeout: 250 seconds)
02:31:38 <geekosaur> yin ^ this is more or less what you're fighting
02:31:40 xff0x joins (~xff0x@2001:1a81:5227:8600:681d:a189:70c5:145e)
02:31:41 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
02:31:41 × abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection)
02:31:42 zincy joins (~tom@2a00:23c8:970c:4801:8164:4807:4ccb:62f3)
02:32:02 × tom__ quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Ping timeout: 268 seconds)
02:33:56 <yin> i get it
02:37:18 <zwro[m]> what's an easy way to build a n-bit type where i can use Data.Bits where n is arbitrary?
02:37:21 × alx741 quits (~alx741@186.178.108.253) (Ping timeout: 256 seconds)
02:39:21 <zwro[m]> where i can do `complement 0b0011001` for instance and get 0b1100110
02:40:03 <zwro[m]> (this would be a Word7)
02:40:51 <yin> list of Bool with a Bits instance?
02:40:52 <awpr> newtype around Integer (or Int if you're sure you won't need more than 64 / the platform native bit width) is a reasonably easy way to implement it
02:41:24 <awpr> with a phantom Nat type parameter: `newtype Bit (n :: Nat) = Bit Integer`
02:42:12 <yin> oh that might be better
02:42:45 <awpr> then with KnownNat constraints on the typeclass instances and the appropriate masking / bounds checking / whatever you prefer, it can be made to behave like an n-bit integer
02:46:26 <zwro[m]> that's KindSignatures, right?
02:47:25 <zwro[m]> and which Nat is that?
02:48:07 <awpr> yeah, it's a kind signature, and as far as I know there's only one Nat type, exported from Data.TypeNats and a few other places
02:48:41 <zwro[m]> it's not GHC.TypeLits ?
02:49:11 <awpr> oh, it's GHC.TypeNats and not Data, but yeah, that's one of the other places it's exported from
02:50:00 <zwro[m]> ok, i've got some reading to do
02:50:08 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
02:50:11 <zwro[m]> ty
02:51:56 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
02:52:02 <yin> i have no idea how to estimate performance of type level stuff
02:52:22 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
02:54:19 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3)
02:56:03 × namkeleser quits (~namkelese@101.175.128.51) (Ping timeout: 256 seconds)
02:58:13 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
02:58:37 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
03:00:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
03:05:02 namkeleser joins (~namkelese@101.175.128.51)
03:11:02 alx741 joins (~alx741@186.178.108.253)
03:12:16 <EvanR> yin, static types are only checked at compile time
03:12:37 <EvanR> so runtime performance is great
03:14:30 zebrag joins (~chris@user/zebrag)
03:14:33 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
03:15:18 × maroloccio quits (~marolocci@151.53.155.184) (Quit: WeeChat 3.0)
03:19:17 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
03:20:01 <yin> what about space?
03:20:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Remote host closed the connection)
03:21:15 <EvanR> types don't exist at runtime so they take zero space!
03:22:47 <yin> how would the type literal solution above compare to something like type Bin = [Bool] with a Bits instance?
03:23:55 <EvanR> the Nat suggestion was so you can work with multiple size bit vectors safely?
03:24:12 <EvanR> not involved in the runtime bit banging
03:25:41 × renzhi quits (~xp@2607:fa49:6500:b100::5cef) (Ping timeout: 268 seconds)
03:26:10 <yin> oh i must have misundertood what was being asked then
03:27:13 <EvanR> :t 1234 .|. 4321
03:27:14 <lambdabot> (Bits a, Num a) => a
03:27:22 <yin> i thought you were talking about dynamically sized words
03:27:22 <EvanR> (1234::Integer) .|. 4321
03:27:36 <EvanR> > (1234::Integer) .|. 4321
03:27:38 <lambdabot> 5363
03:27:48 <EvanR> more like fixed size n that you choose
03:28:06 <yin> yup i get it now
03:28:30 <unclechu> Hey, when I turn on GHC2021 extension my type family fails to compile. It’s poly-kinded.
03:28:30 <unclechu> `type family ToSigned (x ∷ k) ∷ Signed a where ToSigned (x ∷ Nat) = P x`
03:28:30 <unclechu> GHC complains that “Expected kind ‘k’, but ‘x :: Nat’ has kind ‘Nat’”
03:28:55 <unclechu> Any ideas why does this happen? A bug or maybe some included extension?
03:28:59 <yin> what would be a good approach for dynamic?
03:29:54 <EvanR> what does dynamic mean here
03:30:37 <yin> n depending on some input for instance
03:30:48 <EvanR> oof
03:31:44 <yin> is this dependent type territory?
03:31:50 <EvanR> if your code works for all n, then it's a matter of convincing the type system that your parser produces the correct type of value corresponding to that unknown input value
03:32:52 <EvanR> you can also bundle the unknown value in a... dependent pair...
03:33:19 <EvanR> but the parser is tricky
03:34:16 <yin> or just go with [[Bool]] :)
03:34:42 <EvanR> if you don't care about the types, Integer would probably be faster
03:35:35 <yin> sure but then this conversation is no fun
03:35:41 × td_ quits (~td@muedsl-82-207-238-245.citykom.de) (Ping timeout: 252 seconds)
03:37:13 td_ joins (~td@muedsl-82-207-238-182.citykom.de)
03:37:40 <yin> is GHC smart enough to optimize a list or n-tuple of bools in memory?
03:38:03 <yin> as in more efficiently allocate it?
03:39:07 <EvanR> no
03:39:19 <yin> :(
03:40:31 <EvanR> a list is either made of list nodes or is made of nothing after it's optimized out
03:40:42 <yin> i wonder how feasable that would be
03:41:45 <yin> wait wdym by that last part?
03:41:48 <EvanR> a normal n tuple of bools can't be packed together since tuples hold lazy values
03:42:29 <EvanR> there's unpacked tuples though
03:42:32 <EvanR> er, unboxed
03:42:43 <yin> what about unboxed?
03:42:59 <yin> yes i was just about to ask :)
03:43:57 <yin> -O2 should take care of that anyways, right?
03:43:59 <EvanR> an unboxed bool is still a whole word I think
03:44:40 <yin> iirc something changed in 9.2
03:44:41 <EvanR> instead of a pointer to a bool box, it's just the bool data
03:45:43 <yin> it's now 8 bits instead of Word (?) smething like that
03:47:10 <yin> this inner works of GHC is beyond my level of understanding
03:47:22 <EvanR> I do not know
03:52:19 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:52:19 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:52:19 finn_elija is now known as FinnElija
03:53:17 × chenqisu1 quits (~chenqisu1@183.217.200.156) (Ping timeout: 256 seconds)
03:54:49 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
03:56:48 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
03:57:20 img joins (~img@user/img)
04:01:52 arjun joins (~user@user/arjun)
04:09:14 × xff0x quits (~xff0x@2001:1a81:5227:8600:681d:a189:70c5:145e) (Ping timeout: 252 seconds)
04:09:54 xff0x joins (~xff0x@2001:1a81:5227:8600:4d3a:2f6a:351b:d244)
04:16:09 hololeap_ joins (~hololeap@user/hololeap)
04:17:20 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
04:18:53 sunmountain joins (~sunmounta@206.217.205.57)
04:19:41 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 252 seconds)
04:20:05 <EvanR> at some point there were proposals to do something with FilePath, such as change it to ByteString. Did anything ever happen
04:21:17 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
04:21:53 × mvk quits (~mvk@2607:fea8:5cdd:f000::9788) (Ping timeout: 252 seconds)
04:22:15 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
04:23:48 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
04:26:31 × hololeap quits (~hololeap@user/hololeap) (Read error: Connection reset by peer)
04:26:43 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
04:27:44 <c_wraith> the real problem is that there is no right answer.
04:32:18 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
04:32:59 × jmorris quits (uid433911@id-433911.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
04:33:03 lavaman joins (~lavaman@98.38.249.169)
04:37:17 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
04:39:41 × xff0x quits (~xff0x@2001:1a81:5227:8600:4d3a:2f6a:351b:d244) (Ping timeout: 268 seconds)
04:40:05 xff0x joins (~xff0x@2001:1a81:5227:8600:2d6c:ad13:e9b9:6c25)
04:45:22 <dmj`> @package filepath-bytestring
04:45:22 <lambdabot> https://hackage.haskell.org/package/filepath-bytestring
04:45:37 Lycurgus joins (~juan@98.4.112.204)
04:46:44 <EvanR> looks promising
04:53:35 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
04:54:20 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 252 seconds)
04:56:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:03:04 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
05:05:26 deadmarshal joins (~deadmarsh@95.38.231.28)
05:07:06 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
05:09:59 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
05:16:24 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
05:18:24 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:20:38 × namkeleser quits (~namkelese@101.175.128.51) (Quit: Client closed)
05:21:22 × pfurla quits (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…)
05:27:00 nfd joins (~nfd@user/nfd)
05:28:31 <nfd> alright, i could use an AoC day 4 rubberduck for a moment, because i seem too sleepy to get something pretty simple here:
05:30:16 <nfd> i'm writing a megaparsec parser for reading cards in day 4, and it keeps dying after the first line of the first card on the example data, because it's not expecting the leading space
05:30:29 <nfd> ``parseCard = hspace *> sepBy (many ((,False) <$> lexeme number)) eol``
05:30:42 <nfd> ...but i thought that leading hspace call should've done it.
05:30:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
05:31:02 <nfd> (i'll pastebin the whole thing if anyone wants ofc)
05:33:35 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
05:37:43 mbuf joins (~Shakthi@122.174.197.155)
05:38:15 <nfd> (my previous attempts were way too zealous about eating whitespace, and just read the rest of the file as one massive one-lined card)
05:41:35 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 256 seconds)
05:44:21 <dsal> nfd: what is lexeme?
05:47:46 chenqisu1 joins (~chenqisu1@183.217.200.156)
05:51:31 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b)
05:51:31 × fabfianda quits (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it) (Read error: Connection reset by peer)
05:51:45 fabfianda joins (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it)
05:52:09 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
05:53:38 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
06:05:35 namkeleser joins (~namkelese@101.175.128.51)
06:06:29 <nfd> (got it; obviously put it in the wrong spot)
06:08:22 <nfd> still a bit to iron out, but :)
06:10:20 deadmarshal joins (~deadmarsh@95.38.231.28)
06:13:13 dignissimus joins (~dignissim@88-104-68-62.dynamic.dsl.as9105.com)
06:14:04 <nfd> alright, now i'm cooking with gas. to allow this to be a lesson for everyone:
06:14:13 <nfd> `parseCard = sepEndBy (hspace *> some ((,False) <$> lexeme number)) eol`
06:15:25 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
06:16:32 <dignissimus> I'm reading integers so I wanted to use Int, but I want to divide these numbers and the reuslt is probably not an integer, how should I approach this while making sure the code doesn't become too ugly (Adevent of Code) https://paste.tomsmeding.com/KrceTN3w
06:20:25 <EvanR> well
06:21:11 <EvanR> if you literally want to use division to get points on a line with algebraic certitude, you can use Rational
06:21:57 <EvanR> but it's not necessary for that problem because the lines are only horizontal vertical or diagonal
06:22:25 <dignissimus> Oh, even in part 2??
06:22:39 <EvanR> yeah read the text more carefully
06:23:25 × arjun quits (~user@user/arjun) (Remote host closed the connection)
06:23:40 <EvanR> (in general if you wanted to use / with integers you can from fromInteger first to get a Double, and all that that entails. Or Rational)
06:23:53 <EvanR> use* fromInteger
06:23:57 <EvanR> fromIntegral!
06:24:46 <dignissimus> My only concern is that if I replace all the variables with (fromIntegral x) the code might look really messy
06:25:03 <dignissimus> Do I need to use a helper function?
06:25:43 <EvanR> sometimes I define fi = fromIntegral, but it needs a type signature if you intend to use it at more than one type
06:26:10 <EvanR> (and if I do... I put a type sig anyway and pick a better name!)
06:26:24 <EvanR> (if I intend to use it at 1 type)
06:26:54 <EvanR> you're right it'll look messy
06:27:18 <EvanR> and won't even work if go with Double lol
06:34:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
06:42:17 × int-e quits (~noone@int-e.eu) (Quit: Reconnecting)
06:42:26 int-e joins (~noone@int-e.eu)
06:47:24 curiousgay joins (~curiousga@77-120-141-90.kha.volia.net)
06:48:24 × shailangsa quits (~shailangs@host86-162-150-209.range86-162.btcentralplus.com) (Ping timeout: 265 seconds)
06:49:16 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
06:50:39 × Techcable quits (~Techcable@168.235.93.147) (Ping timeout: 256 seconds)
06:53:41 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
06:55:14 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
06:59:13 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:11:51 <EvanR> that's cool vector algorithms sort is much faster than Data.List sort
07:12:44 <int-e> Well it should be :)
07:13:39 <int-e> (As optimized as it is, the Data.List sort still dereferences a ton of random pointers, something you don't do when sorting an array in place)
07:22:32 <EvanR> yeah it seems any time a list becomes materialized and stays around, bad things happen
07:26:20 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
07:26:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:27:25 zaquest joins (~notzaques@5.130.79.72)
07:27:49 shailangsa joins (~shailangs@host86-186-142-82.range86-186.btcentralplus.com)
07:28:40 yauhsien joins (~yauhsien@2402:7500:4e5:d897:ecaa:ad5f:48c0:a8a4)
07:29:31 <dmj`> lists are great as control structures (for loop replacement), but not so good for representing data
07:35:50 max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
07:37:03 × gabiruh_ quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in)
07:37:17 gabiruh joins (~gabiruh@vps19177.publiccloud.com.br)
07:40:20 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:41:09 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
07:46:52 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:47:09 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:48:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:49:07 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:51:10 thevishy joins (~Nishant@2405:201:f005:c007:fd4c:a570:99e4:8844)
07:53:06 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
07:54:02 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
07:54:11 × emf_ quits (~emf@2620:10d:c090:400::5:d28b) (Ping timeout: 252 seconds)
07:54:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
07:55:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:00:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
08:02:38 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
08:05:00 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
08:11:07 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
08:13:54 axeman joins (~quassel@ip5f5aeb08.dynamic.kabel-deutschland.de)
08:15:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:24:15 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
08:25:08 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:26:48 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:27:06 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:30:58 geekosaur joins (~geekosaur@xmonad/geekosaur)
08:33:11 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:33:29 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:34:52 lavaman joins (~lavaman@98.38.249.169)
08:38:47 chenqisu12 joins (~chenqisu1@183.217.201.63)
08:39:27 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
08:39:55 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:40:13 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:41:09 × chenqisu1 quits (~chenqisu1@183.217.200.156) (Ping timeout: 256 seconds)
08:48:49 × yauhsien quits (~yauhsien@2402:7500:4e5:d897:ecaa:ad5f:48c0:a8a4) (Ping timeout: 252 seconds)
08:53:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:53:18 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:54:58 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
08:55:16 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
08:55:26 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
08:55:47 acidjnk_new joins (~acidjnk@p200300d0c7271e5135c37e9089e8a354.dip0.t-ipconnect.de)
08:58:56 Techcable joins (~Techcable@168.235.93.147)
09:00:13 × sky_lounge[m] quits (~skylounge@2001:470:69fc:105::efa6) (Quit: You have been kicked for being idle)
09:00:29 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
09:03:47 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:04:05 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:05:32 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
09:07:46 × Jonno_FTW quits (~come@user/jonno-ftw/x-0835346) (Ping timeout: 265 seconds)
09:08:21 Jonno_FTW joins (~come@api.carswap.me)
09:10:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:10:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:10:41 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 256 seconds)
09:13:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:14:17 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:16:29 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
09:17:36 allbery_b joins (~geekosaur@xmonad/geekosaur)
09:17:36 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
09:17:39 allbery_b is now known as geekosaur
09:18:18 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:18:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:22:41 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:25:36 deadmarshal joins (~deadmarsh@95.38.231.28)
09:27:13 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
09:30:10 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
09:31:39 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
09:33:36 × flukiluke quits (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) (Remote host closed the connection)
09:34:32 flukiluke joins (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962)
09:46:53 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:49:14 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:49:17 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:49:37 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:49:58 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f5ec:bb0e:161e:528b) (Remote host closed the connection)
09:50:19 Pickchea joins (~private@user/pickchea)
09:51:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:52:17 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:53:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:54:05 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
09:54:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
09:54:16 mc47 joins (~mc47@xmonad/TheMC47)
09:55:55 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
09:56:14 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:00:18 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:00:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:02:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:02:33 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:03:06 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
10:05:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:05:18 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
10:05:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:06:03 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
10:07:21 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:08:23 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
10:10:07 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
10:10:10 Lord_of_Life_ is now known as Lord_of_Life
10:12:34 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
10:14:45 <Square> is there a way to make a partial function "complete" by just catching non handled cases?
10:17:22 <tomsmeding> Square: you need to return _something_ in all cases -- that's the point of being a total function
10:17:33 <tomsmeding> what are you going to return in non-handled cases?
10:18:09 <Square> I was thinking "Left SomeErrorType"
10:19:26 <tomsmeding> right, if you function return type is 'Either SomeErrorType Value', and you can generate some kind of standard error type, then you can do that
10:20:25 Guest|22 joins (~Guest|22@188.163.27.147)
10:20:53 × Guest|22 quits (~Guest|22@188.163.27.147) (Client Quit)
10:22:33 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:22:50 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:24:44 <Square> tomsmeding, what im after is avoiding to implement the error handling case whenever i do this. Hopefully like "dealWithNonHandled $ (\(MySumTypeCaseC x) -> Right x) value"
10:26:22 <tomsmeding> ah, in that specific shape you can't make this
10:26:53 <tomsmeding> what you can do, is (\case MySumTypeCaseC x -> Right x ; _ -> somedefaultstuff) value
10:26:56 <tomsmeding> if you turn on LambdaCase
10:27:12 <tomsmeding> if you don't like LambdaCase, of course (\v -> case v of MySu...
10:28:52 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:29:10 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:30:18 × max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection)
10:31:02 max22- joins (~maxime@2a01cb0883359800e6d6eb63f9f5fddc.ipv6.abo.wanadoo.fr)
10:31:05 <tomsmeding> Square: a way to see that what you want is impossible, is: what would the type of dealWithNonHandled be?
10:31:09 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
10:31:15 <tomsmeding> and what would its argument be
10:32:00 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
10:32:21 <Square> tomsmeding, i see how its impossible. Just hoped there was a trick around it =D
10:32:32 <Square> ill go with LambdaCase. Good enough
10:33:55 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
10:37:27 simendsjo joins (~user@84.211.91.241)
10:38:07 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
10:42:00 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
10:44:34 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
10:46:46 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:47:01 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
10:47:21 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
10:49:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
10:49:18 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
10:50:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b)
10:53:08 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
10:54:35 × fabfianda quits (~fabfianda@net-109-115-246-237.cust.vodafonedsl.it) (Ping timeout: 252 seconds)
10:54:57 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b) (Ping timeout: 252 seconds)
10:55:14 fabfianda joins (~fabfianda@mob-5-90-255-224.net.vodafone.it)
10:55:28 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
10:56:23 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
10:57:28 Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
10:57:31 × lstor quits (~lstor@user/lstor) (Remote host closed the connection)
10:58:11 MoC joins (~moc@user/moc)
10:58:37 jakalx parts (~jakalx@base.jakalx.net) ()
11:00:19 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:00:37 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:01:07 Guest|85 joins (~Guest|85@35.85-84-235.dynamic.clientes.euskaltel.es)
11:01:11 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 252 seconds)
11:04:29 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:04:47 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:05:35 × fabfianda quits (~fabfianda@mob-5-90-255-224.net.vodafone.it) (Ping timeout: 252 seconds)
11:07:19 × AndreasK quits (sid320732@id-320732.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
11:07:56 aegon joins (~mike@174.127.249.180)
11:08:33 <aegon> what are the keyboard shortcuts to search within a package on hackage? where can i find them if i forget next time. :P
11:09:56 × Guest|85 quits (~Guest|85@35.85-84-235.dynamic.clientes.euskaltel.es) (Quit: Connection closed)
11:10:58 <maerwald> s
11:15:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:15:33 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:19:11 <aegon> thanks :)
11:21:29 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:21:47 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:25:27 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:25:45 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:27:33 zer0bitz joins (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi)
11:27:47 shriekingnoise joins (~shrieking@186.137.144.80)
11:28:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:30:01 × Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds)
11:30:25 gehmehgeh joins (~user@user/gehmehgeh)
11:32:02 × eyJhb quits (~eyJhb@user/eyjhb) (Quit: Clever message)
11:32:33 narendraj9 joins (~user@2a02:8109:b63f:ff7c::57b2)
11:32:55 eyJhb joins (~eyJhb@user/eyjhb)
11:33:31 pfurla joins (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6)
11:33:38 <pragma-> aegon: it's easy to remember the key is 's' because "s" stands for "sedimentologically"
11:34:12 InternetCitizen4 joins (~fuzzypixe@tchebychev.ensimag.fr)
11:34:39 <InternetCitizen4> screw arch linux for enforcing dynamic linking 'ghc -dynamic' my ass
11:34:54 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:35:05 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
11:35:11 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:39:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:39:21 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:41:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:41:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:42:15 <maerwald> pick a better distro
11:43:31 cosimone joins (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3)
11:45:17 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:45:23 <InternetCitizen4> like ?
11:45:35 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:47:33 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
11:47:43 <maerwald> or better yet, switch to windows
11:47:50 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
11:48:07 bbear100 joins (~bbear@2a01:e34:ec2b:d430:e0dd:e718:df68:1877)
11:48:07 <bbear100> Hi
11:48:34 <bbear100> just wanted to know if there is a better API than the [a..b] one for generating sequences of numbers
11:49:09 <bbear100> my use case: I want to generate contiguous integer but I don't know if a > b or b > a, but I want the sequence to be in reverse order in the former case.
11:50:23 <aegon> bbear100: guards will get you there
11:50:33 × max22- quits (~maxime@2a01cb0883359800e6d6eb63f9f5fddc.ipv6.abo.wanadoo.fr) (Quit: Leaving)
11:50:57 max22- joins (~maxime@2a01cb0883359800e6d6eb63f9f5fddc.ipv6.abo.wanadoo.fr)
11:51:13 <maerwald> InternetCitizen4: I don't know... openSUSE?
11:51:45 <aegon> maerwald: i can't tell if your trollin :P
11:51:52 <maerwald> aegon: I'm not
11:52:00 <maerwald> they have competent packagers
11:52:08 <maerwald> something that's missing in most distros
11:52:52 <aegon> gentoo! just package yourself :P
11:53:02 jakalx joins (~jakalx@base.jakalx.net)
11:53:11 <maerwald> I did gentoo deving for 4 years and will never go back to that madness
11:53:16 <bbear100> archlinux if you like reading doc and running pre-compiled vanilla linux with decent community support
11:53:42 <maerwald> bbear100: they asked about an alternative to arch, because arch is broken sh*t :p
11:53:54 <bbear100> it's not *that* broken
11:54:00 <maerwald> for Haskell, it is
11:54:17 <fendor[m]> it is fine, as long as you use ghcup ;D
11:54:48 <bbear100> I'm using stack. Lesson in life: never use your distro package libraries for development workflow
11:55:01 <maerwald> I'm on fedora... but not because I believe in it. The main issue is that you can't easily switch gcc versions, which you sometimes need for Haskell deving
11:55:21 × max22- quits (~maxime@2a01cb0883359800e6d6eb63f9f5fddc.ipv6.abo.wanadoo.fr) (Ping timeout: 245 seconds)
11:56:26 <aegon> bbear100: you mean you always want a descending sequence?
11:56:37 <bbear100> not always, can be up or down
11:56:40 <bbear100> I have another question:
11:57:00 <bbear100> how can you define (+) for a datastructure like `data Point = Point Int Int` ?
11:57:17 <bbear100> Do you really need to make it an instance of `Num` ?
11:58:01 <bbear100> can I just define it?
11:58:19 <aegon> yeah, instance num but if your really doing points, you can just derive it with the stock one
11:58:26 × pfurla quits (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6) (Quit: gone to sleep. ZZZzzz…)
11:58:29 <aegon> it'll do the right thing
11:58:40 <bbear100> deriving Num will work ?
11:59:18 <aegon> and Eq, not sure if Ord will be sane
11:59:37 <aegon> i doubt Ord would be sane
12:00:27 xkuru joins (~xkuru@user/xkuru)
12:01:37 <bbear100>     • Can't make a derived instance of ‘Num Point’:
12:01:38 <bbear100>         ‘Num’ is not a stock derivable class (Eq, Show, etc.)
12:02:17 <bbear100> too bad
12:02:25 × xff0x quits (~xff0x@2001:1a81:5227:8600:2d6c:ad13:e9b9:6c25) (Ping timeout: 252 seconds)
12:02:45 <maerwald> aegon: I don't think you can derive that
12:02:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:03:17 xff0x joins (~xff0x@2001:1a81:5227:8600:e134:3a0d:618c:1205)
12:05:45 <aegon> yeah, i was trying to get it to work and realizing it's not gonna work, just came back from that
12:08:09 <bbear100> you can't redifine (+) for any type right, but you actually have to make it an instance of the correct typeclass, right '
12:09:52 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:10:10 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:10:48 <aegon> bbear100: yeah, your gonna need to figure out what each thing in Num means for your Point, you could make a non (+) function and use that instead
12:11:05 <aegon> i don't think i'm understanding your needs on the contigous but this is a quick paste https://paste.tomsmeding.com/EjB6Yung
12:14:17 <tomsmeding> bbear100: in fact:
12:14:22 <tomsmeding> % :t (+)
12:14:23 <yahb> tomsmeding: Num a => a -> a -> a
12:14:34 <tomsmeding> (+) is defined for _precisely_ those types that implement Num
12:14:46 <tomsmeding> because it is a method of the Num class
12:15:34 <aegon> bbear100: the hackage docs have good info on what the minimum required definitions are and what rules they need to satisfy
12:15:48 <bbear100> ha allright
12:16:15 <aegon> https://hackage.haskell.org/package/base-4.16.0.0/docs/Prelude.html#g:7
12:16:36 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:16:39 <maerwald> void linux actually looks nice, but I'm not sure
12:16:42 desantra joins (~skykanin@user/skykanin)
12:18:40 <aegon> bbear100: if you treat (*) as distributive you could make a num instance but i think your looking for something besides Num with Points, Maybe a Vector class or something similar would fit more naturally
12:18:51 pfurla joins (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6)
12:18:57 <bbear100> yes nevermind I don't really need a function
12:19:14 <bbear100> Just want to try things.
12:19:23 <bbear100> BTW, is there a counterSet available in the prelude ?
12:19:43 <bbear100> like you can tell how many times an element is in the set ?
12:19:54 × pfurla quits (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6) (Client Quit)
12:20:13 × narendraj9 quits (~user@2a02:8109:b63f:ff7c::57b2) (Remote host closed the connection)
12:21:42 Pickchea joins (~private@user/pickchea)
12:22:02 × Megant quits (megant@user/megant) (Ping timeout: 252 seconds)
12:23:10 <aegon> i think thats a Bag
12:23:11 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
12:23:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
12:23:42 Megant joins (megant@user/megant)
12:23:42 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:24:30 <aegon> bbear100: https://hackage.haskell.org/package/multiset-0.3.4.3/docs/Data-MultiSet.html
12:24:38 <aegon> or i'm old and now its being called a multi-set
12:27:28 machinedgod joins (~machinedg@24.105.81.50)
12:28:23 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
12:29:19 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
12:31:56 × xff0x quits (~xff0x@2001:1a81:5227:8600:e134:3a0d:618c:1205) (Ping timeout: 252 seconds)
12:32:55 × namkeleser quits (~namkelese@101.175.128.51) (Ping timeout: 256 seconds)
12:33:29 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
12:33:31 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
12:34:06 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
12:35:33 pfurla joins (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6)
12:36:28 × pfurla quits (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6) (Client Quit)
12:38:39 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
12:39:38 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 252 seconds)
12:41:36 <InternetCitizen4> is Parsec in base? :/
12:41:57 <geekosaur> no
12:42:27 <geekosaur> base is kept small, because it can only be upgraded with ghc
12:42:48 <geekosaur> there is a parser in base, but it's a pretty slow and bad one (ReadP)
12:42:57 <geekosaur> used by Read instances
12:43:31 <geekosaur> parsec does ship with ghc but it's still upgradeable, unlike base
12:46:40 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection)
12:46:40 Farzad joins (~FarzadBek@37.98.106.33)
12:48:24 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
12:49:46 <Farzad> guys anyone using postgresql-simple here?
12:50:53 polezaivsani joins (~polezaivs@orangeshoelaces.net)
12:53:19 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
12:53:59 xff0x joins (~xff0x@2001:1a81:5227:8600:e134:3a0d:618c:1205)
12:54:00 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
12:56:05 hololeap_ is now known as hololeap
12:56:39 <aegon> Farzad: yep
12:57:15 <Farzad> can you direct me to an example usage of RowParser? I cant find any on google
12:58:25 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 256 seconds)
12:59:46 <InternetCitizen4> geekosaur: oh so it does ship with ghc that's good
13:01:27 <aegon> i've never used them :| but it looks like you pass it a conversion that runs in io and you get that
13:01:33 <aegon> sorry, not much help there
13:03:00 <Farzad> aegon: np, thanks anyway
13:03:19 CiaoSen joins (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
13:04:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:05:16 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:06:56 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:07:14 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:09:51 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
13:10:03 <dignissimus> My day 5 solution, I think my haskell is improving: https://paste.tomsmeding.com/ykQKkds8
13:10:26 × Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds)
13:10:34 <dignissimus> Any feedback on the code? This time I made use of helper functions becuse last time it was difficult to read
13:12:11 × aegon quits (~mike@174.127.249.180) (Remote host closed the connection)
13:13:59 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
13:14:17 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
13:15:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
13:16:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
13:16:43 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
13:16:49 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
13:19:36 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
13:20:12 kuribas joins (~user@ptr-25vy0i87ls363spjkfx.18120a2.ip6.access.telenet.be)
13:20:19 jpds joins (~jpds@gateway/tor-sasl/jpds)
13:20:50 <kuribas> What's this BS: https://blog.klipse.tech/databook/2020/10/02/generic-data-structures.html
13:20:53 <kuribas> "FP Languages that are statically typed (e.g. Haskell and Ocaml) are not compliant with this principle."
13:20:57 <kuribas> I can represent generic data structures in haskell just fine thank you.
13:21:16 <kuribas> I probably don't want to, but I can...
13:21:32 imdoor joins (~imdoor@balticom-142-78-50.balticom.lv)
13:23:30 <Franciman> what does generic mean?
13:25:03 <kuribas> unityped I suppose.
13:25:30 <kuribas> One big sumtype to rule them all :)
13:26:38 <Franciman> honestly what the heck
13:26:45 <Franciman> I can't wait to finish my garbage collector, btw
13:26:52 kennyd joins (~bc8165b6@cerf.good1.com)
13:27:01 <Franciman> then I'll be able to start experimenting more freely with the evaluator
13:27:06 <Franciman> and make it FFAST
13:27:23 <Franciman> i'll be finally able to draw coherent conclusions re. haskell's evaluation behaviour
13:28:23 <kuribas> BTW, to me this "data-oriented programming" looks just like an interpreter design.
13:28:48 <kuribas> You write your logic as static data, then write an interpreter to apply it.
13:29:15 <kuribas> That definitely doesn't require "generic" only data.
13:29:37 <Franciman> to me data-oriented programming is basically
13:29:40 <Franciman> try to make things fit in the cache
13:30:00 <Franciman> otherwise I don't need anybody to tell me I should first think about data and how it flows
13:30:08 <Franciman> because that's on of the core pillars of fp
13:30:15 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
13:30:18 <Franciman> we already design our data and write functions on it
13:30:28 <kuribas> Franciman: yeah, that was before the clojure crowd took over the term...
13:30:46 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
13:30:51 <Franciman> what I miss in haskell, but let me say this clear, it's my fault
13:30:56 <Franciman> is being able to predict what goes where
13:30:59 <Franciman> in the cache
13:31:05 deadmarshal joins (~deadmarsh@95.38.231.28)
13:31:10 <Franciman> and allowing super fast cache refs
13:31:25 <kuribas> Then use unboxed vectors.
13:31:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
13:31:52 max22- joins (~maxime@2a01cb0883359800155b4e4e6792e366.ipv6.abo.wanadoo.fr)
13:32:58 <kuribas> And write strict loops.
13:34:33 <kuribas> But in haskell data is code, in the sense that data is lambdas and infinite structures.
13:34:40 <kuribas> So it's inherently not inspectable.
13:35:11 × simendsjo quits (~user@84.211.91.241) (Remote host closed the connection)
13:35:11 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
13:35:25 <kuribas> For most problems that works fine, you just write your code so that you don't *need* to inspect the logic.
13:36:43 son0p joins (~ff@181.136.122.143)
13:39:35 × max22- quits (~maxime@2a01cb0883359800155b4e4e6792e366.ipv6.abo.wanadoo.fr) (Ping timeout: 252 seconds)
13:39:48 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
13:40:55 <juri_> kuribas: unboxed vectors don't work with Data.Parallel.
13:41:27 <kuribas> juri_: you don't want parallism at that granularity...
13:41:43 <kuribas> juri_: except for SIMD.
13:43:27 lavaman joins (~lavaman@98.38.249.169)
13:48:17 × chenqisu12 quits (~chenqisu1@183.217.201.63) (Ping timeout: 256 seconds)
13:48:22 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
13:49:20 jakalx joins (~jakalx@base.jakalx.net)
13:50:57 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 252 seconds)
13:52:15 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
13:54:14 darchitect joins (~darchitec@2a00:23c6:3584:df00:7dec:bf13:8fa:748c)
13:54:26 × alx741 quits (~alx741@186.178.108.253) (Ping timeout: 252 seconds)
13:54:32 <darchitect> hi guys
13:55:29 <darchitect> first time using irc so sorry for stupid questions, but I'm just a beginner on my "Haskell journey" and was wondering if this is the right place to ask code-related questions ?
13:56:05 × sunmountain quits (~sunmounta@206.217.205.57) (Ping timeout: 252 seconds)
13:56:41 darchite` joins (~user@2a00:23c6:3584:df00:7dec:bf13:8fa:748c)
13:57:40 <darchite`> test
13:57:48 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Quit: WeeChat 3.3)
13:58:03 <darchitect> test
13:58:05 <darchitect> ?
13:58:37 <dignissimus> darchitect: It is
13:58:41 jpds joins (~jpds@gateway/tor-sasl/jpds)
13:58:54 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
13:58:55 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
13:59:23 max22- joins (~maxime@2a01cb0883359800ca908bdf23b4cd25.ipv6.abo.wanadoo.fr)
13:59:45 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
14:00:34 Guest76 joins (~Guest76@wireless-student-pt10-183-60.lut.ac.uk)
14:01:59 × dignissimus quits (~dignissim@88-104-68-62.dynamic.dsl.as9105.com) (Quit: Bye!)
14:02:08 × acidjnk_new quits (~acidjnk@p200300d0c7271e5135c37e9089e8a354.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
14:02:32 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
14:02:35 <kuribas> darchitect: if it is haskell code, yes.
14:03:00 <kuribas> darchitect: if it is not haskell code, but relevant to haskell, then also yes.
14:05:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
14:07:03 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
14:07:28 alx741 joins (~alx741@186.178.109.217)
14:08:15 × desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3)
14:08:19 <darchitect> thanks a lot, will keep it mind !
14:11:26 desantra joins (~skykanin@user/skykanin)
14:12:39 × InternetCitizen4 quits (~fuzzypixe@tchebychev.ensimag.fr) (Ping timeout: 256 seconds)
14:12:45 InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
14:17:26 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 245 seconds)
14:17:56 <Guest76> hi all, im a new haskell user and am stuck on a problem, can i ask questions here?
14:18:05 × axeman quits (~quassel@ip5f5aeb08.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
14:18:50 <geekosaur> yes
14:19:42 <kuribas> don't ask to ask
14:21:40 <Guest76> im trying to create a function where the function takes list and a character it searches through the list for and partitions each part of the list where it occurs for example countsplit "hello world" 'o' would be [4,2,3], here is my code https://paste.tomsmeding.com/dP0Nji7h
14:23:55 <kuribas> Guest76: that's not valid haskell syntax.
14:24:13 <kuribas> Guest76: I am not even sure what it's supposed to do...
14:25:15 <kuribas> length(head(xs)) head(xs) is of type `a`, so it doesn't have a length (in general).
14:25:16 <Guest76> it's meant to search the list for each instance of a character / number and find how many characters are before it and hence the list of numbers as the result
14:25:36 <Guest76> qutie new to functional paradigm so sorry if it looks bad
14:25:54 <kuribas> And xs could be the empty list, so `head xs` will crash.
14:26:08 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds)
14:26:45 <Guest76> ok
14:27:06 <kuribas> Guest76: you are recursing on the list, so you don't know what is before it, unless you pass that to the recursive case.
14:27:38 <kuribas> Guest76: also, [4, 3, 2] is not of type [[Int]]
14:28:18 <Guest76> yes thats what im trying to do, trying to recurse through the list for each instance of a character and find the length of how many characters are before that letter so in my example you saw 4,3,2 since before the first o there was 4 characters etc...
14:29:04 genieliu joins (~genieliu@111.193.167.10)
14:30:33 <kuribas> Guest76: that's not what head does...
14:30:37 <kuribas> > head [1, 2, 3]
14:30:39 <lambdabot> 1
14:30:42 <kuribas> > head []
14:30:43 <Guest76> ok so does head only take the first element
14:30:43 <lambdabot> *Exception: Prelude.head: empty list
14:31:11 <kuribas> Guest76: you're asking about previous elements, but they are not passed to the function...
14:31:17 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
14:31:18 <Guest76> ok
14:31:37 <kuribas> Guest76: function programming is easy, you cannot access anything that you don't pass to the function.
14:31:39 zebrag joins (~chris@user/zebrag)
14:31:48 <kuribas> Unlike OO.
14:32:18 <Guest76> Yes, I only have OO experience so the new ideas are slightly confusing
14:32:38 <Guest76> So would it be a better idea to do it through a list comprehension or can i do it through pattern matching?
14:33:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
14:34:25 <kuribas> Guest76: If you want to "remember" the amount of previous characters, you need to pass it.
14:34:42 <kuribas> Guest76: You can make an auxiliary function.
14:34:58 <kuribas> Also fix the type of countsplit.
14:35:19 × InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 252 seconds)
14:35:49 <Guest76> Okay, so countsplit, at the end [[Int]] isn't the type of the list I want, so it is just [Int]?
14:36:06 <kuribas> :t [[1, 2], [3, 4, 5]]
14:36:07 <lambdabot> Num a => [[a]]
14:36:13 <kuribas> :t [1, 2, 3]
14:36:14 <lambdabot> Num a => [a]
14:36:16 <Guest76> got it
14:36:19 <Guest76> Okay
14:36:35 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
14:36:47 <kuribas> Guest76: it also depends on your course. You are probably expected to use functions that you have already seens before.
14:37:42 <Guest76> I think we have to create them just for this function since this is on its own with nothing else attached to it
14:38:15 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
14:38:23 <Guest76> So for an auxillary function, can you explain to me what one is please since I don't think I've came across the term before
14:38:43 <geekosaur> helper function
14:39:42 <Guest76> so a function where you use where underneath
14:40:00 <Guest76> I have used those before but they were never told as auxillary functions
14:40:37 <geekosaur> no, "where" isn't related. just a function that uses another function to do part of the work
14:40:55 <geekosaur> either as part of recursion or to avoid duplicating code
14:41:02 <kuribas> Guest76: How to write this function should be in the course material.
14:41:54 <Guest76> So in the case of my problem, I can use an auxillary function to split the list into indexes where the character occurs then find the lengths of each of those indexes
14:42:01 <Guest76> That is what I am getting at
14:42:30 <kuribas> no, countsplitaux :: Eq a => Int -> [a] -> a -> [Int]
14:42:43 <kuribas> you pass the current index to the function.
14:43:25 <Guest76> Why would I need the Int at the start of the function definition?
14:45:35 <kuribas> it's the current index
14:46:40 <Guest76> On the question it says it can only have 2 arguments [a] and a so would I have to do that in a separate function and use that within countsplit
14:46:41 × kennyd quits (~bc8165b6@cerf.good1.com) (Quit: CGI:IRC)
14:47:03 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
14:47:06 × xsperry quits (~xs@user/xsperry) ()
14:47:15 kennyd joins (~bc8165b6@cerf.good1.com)
14:48:09 <kuribas> yes
14:48:50 <kennyd> Guest76, countsplit xs y = go 0 xs y where go {- your main definition goes in here -}. the point of this is to avoid passing index, which would always be 0, to the countsplit as the user of that function
14:49:06 <kuribas> > let countsplit l x = fold $ zipWith ($) (map (\y i -> if x == y then [i] else []) l) [0..] in countsplit "hello world" 'o'
14:49:08 <lambdabot> [4,7]
14:49:34 <Guest76> Ok, I shall give that a go. So I am going to try and create a function which would make 'hello world' 'o' into ['hell', ' w', 'rld'] then find the length of those
14:49:40 <Guest76> thank you very much kuribas
14:49:47 <Guest76> thank you kennyd
14:49:48 <kuribas> Guest76: don't use that
14:50:00 <Guest76> dont use what sorry?
14:50:10 <kuribas> my example
14:50:33 <Guest76> yeah i am not going to or else i wont learn (y)
14:50:54 <kennyd> Guest76, if that is your end goal I'd create sublists directly instead of generating indices first
14:50:55 <Guest76> I appreciate your help and being patient with me
14:51:26 × desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3)
14:51:26 <Guest76> kennyd thats what im going to do i think
14:51:41 deadmarshal joins (~deadmarsh@95.38.231.28)
14:51:53 <Guest76> i had a look on google turns out there are modules i can use but unfortunately we are not allowed to use anu
14:51:56 <Guest76> any
14:52:06 <kennyd> yeah
14:52:11 jkaye joins (~jkaye@2601:281:8300:7530:5a4f:5910:1ea1:e61f)
14:52:22 <bbear100> How can you use do notation in ghci ?
14:52:57 <kennyd> > splitOn "o" "hello world"
14:52:59 <lambdabot> ["hell"," w","rld"]
14:53:18 <kennyd> bbear100, you can use semicolons
14:53:20 <Guest76> yeah thats what i want but isnt that in a module
14:53:22 <tomsmeding> > do { x <- [1,2,3] ; y <- [4,5,6] ; return (x + y) }
14:53:24 <lambdabot> [5,6,7,6,7,8,7,8,9]
14:53:29 <geekosaur> bbear100, probably with braces. ghci has a multiline mode (two, actually) but it's painful
14:53:46 <kennyd> Guest76, it is
14:53:47 <bbear100> ok :+1:
14:53:59 <geekosaur> and just naïvely hitting return won't do what you want
14:54:08 <kennyd> Guest76, nevermind that, was just testing if it worked in lambdabot
14:54:14 <Guest76> going to have to create a function to do that then
14:54:15 × CiaoSen quits (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
14:55:58 <kennyd> Guest76, your type would be countsplit :: Eq a => [a] -> a -> [[a]]
14:56:21 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 256 seconds)
14:56:25 <Guest76> why not [[Int]]?
14:57:13 <kennyd> ["hell"," w","rld"] is not [[Int]]
14:57:43 <Guest76> I want to make that into [4,2,3] as that will be how many characters are in each element
14:58:45 <kennyd> you don't need that step if the goal is to take "hello world" and 'o', and return ["hell"," w","rld"]
14:59:22 <bbear100> do you have the feeling that you do serious mental gymnastic when coding in haskell ?
14:59:53 <bbear100> I'd like to be a bit more comfortable with automatisms
15:00:06 <Guest76> I want [4,2,3] returned, ["hell"," w","rld"] is what the indexes of [4,2,3] will be from due to that being the length of each element of ["hell"," w","rld"]
15:00:50 <kennyd> Guest76, ok, then Eq a => [a] -> a -> [Int]
15:01:12 xsperry joins (~xs@user/xsperry)
15:01:31 <bbear100> map length ["hell"," w","rld"] ?
15:02:14 <Guest76> kennyd I had that before so thats good that i had the right idea
15:03:06 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:03:08 <Guest76> bbear100 Yeah I do sometimes lol, especially as im a beginner and that is what im trying to acheive yeah, just need to get that list from ["hello world"] 'o' now
15:03:23 × unyu quits (~pyon@user/pyon) (Quit: WeeChat 3.3)
15:04:35 unyu joins (~pyon@user/pyon)
15:06:11 xkuru joins (~xkuru@user/xkuru)
15:06:19 axeman joins (~quassel@2a02:8109:a3c0:b10:91ce:4409:54:e379)
15:11:05 <xsperry> @hoogle Eq a => a -> [a] -> [Int]
15:11:06 <lambdabot> Data.List elemIndices :: Eq a => a -> [a] -> [Int]
15:11:06 <lambdabot> GHC.OldList elemIndices :: Eq a => a -> [a] -> [Int]
15:11:06 <lambdabot> BasePrelude elemIndices :: Eq a => a -> [a] -> [Int]
15:11:30 <xsperry> Data.List.elemIndices is in base, so you may be able to use it, if this is part of larger excercise
15:11:45 × kuribas quits (~user@ptr-25vy0i87ls363spjkfx.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
15:11:55 <xsperry> > elemIndices 'o' "hello world"
15:11:56 <lambdabot> [4,7]
15:13:11 <Guest76> xsperry unfortunately it isn't, they specifically said that no modules are to be used at any point
15:13:21 <bbear100> why don't you write your own function?
15:13:27 <Guest76> thats what i am doing now haha
15:17:29 × genieliu quits (~genieliu@111.193.167.10) (Ping timeout: 252 seconds)
15:17:44 <bbear100> using takeWhile and an accumulator for the length should work
15:19:05 <kennyd> > [ i | (i,x) <- zip [0..] "hello world", x=='o']
15:19:07 <lambdabot> [4,7]
15:20:45 <Guest76> thanks for the help and explanations everyone going to give this a good go now (y)
15:21:08 <kennyd> neat solution that I, admittedly, stole from lambdabot :)
15:21:20 <kennyd> > zip [0..] "hello world"
15:21:21 <lambdabot> [(0,'h'),(1,'e'),(2,'l'),(3,'l'),(4,'o'),(5,' '),(6,'w'),(7,'o'),(8,'r'),(9,...
15:21:59 <kennyd> @src elemIndices
15:22:00 <lambdabot> elemIndices x = findIndices (x==)
15:22:03 <kennyd> @src findIndices
15:22:04 <lambdabot> findIndices p xs = [ i | (x,i) <- zip xs [0..], p x]
15:22:25 × Farzad quits (~FarzadBek@37.98.106.33) (Ping timeout: 256 seconds)
15:23:21 × polezaivsani quits (~polezaivs@orangeshoelaces.net) (Ping timeout: 252 seconds)
15:25:09 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:25:29 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:27:20 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:27:38 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:27:56 × hook54321 quits (sid149355@user/hook54321) (Ping timeout: 252 seconds)
15:28:02 × taktoa[c] quits (sid282096@id-282096.tinside.irccloud.com) (Ping timeout: 240 seconds)
15:29:28 __monty__ joins (~toonn@user/toonn)
15:29:37 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:30:38 hook54321 joins (sid149355@user/hook54321)
15:31:13 taktoa[c] joins (sid282096@id-282096.tinside.irccloud.com)
15:31:18 gzj joins (~GZJ0X@216.24.178.99.16clouds.com)
15:36:31 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
15:37:42 × gzj quits (~GZJ0X@216.24.178.99.16clouds.com) (Remote host closed the connection)
15:41:47 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection)
15:42:59 desantra joins (~skykanin@user/skykanin)
15:44:06 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
15:44:34 <xsperry> > [ i | (i,'o') <- zip [0..] "hello world"]
15:44:36 <lambdabot> [4,7]
15:47:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:47:17 × johnjay quits (~pi@192.142.100.50) (Ping timeout: 256 seconds)
15:47:33 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:48:50 johnjay joins (~pi@154.6.152.74)
15:49:03 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
15:51:13 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:51:31 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:53:11 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
15:53:29 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
15:54:08 cheater joins (~Username@user/cheater)
15:54:16 CiaoSen joins (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
15:55:17 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b)
15:55:59 lavaman joins (~lavaman@98.38.249.169)
15:57:05 <bbear100> > guestFoo :: String -> Char -> [Int]
15:57:05 <bbear100> guestFoo inputStr token = guestFoo' 0 inputStr token
15:57:06 <bbear100>   where guestFoo' n (x:xs) token
15:57:06 <bbear100>           | x == token = (n:(guestFoo' (n+1) xs token))
15:57:07 <lambdabot> error:
15:57:07 <lambdabot> Variable not in scope: guestFoo :: String -> Char -> [Int]
15:57:07 <bbear100>           | otherwise = guestFoo' (n+1) xs token
15:57:07 <bbear100>         guestFoo' _ null = null
15:57:30 <bbear100> > guestFoo :: String -> Char -> [Int]
15:57:30 <bbear100> > guestFoo inputStr token = guestFoo' 0 inputStr token
15:57:31 <bbear100> >   where guestFoo' n (x:xs) token
15:57:31 <bbear100> >         | x == token = (n:(guestFoo' (n+1) xs token))
15:57:31 <lambdabot> error:
15:57:31 <lambdabot> Variable not in scope: guestFoo :: String -> Char -> [Int]
15:57:32 <bbear100> >         | otherwise = guestFoo' (n+1) xs token
15:57:32 <lambdabot> <hint>:1:25: error: parse error on input ‘=’
15:57:32 <bbear100> >       guestFoo' _ null = null
15:57:32 <lambdabot> <hint>:1:3: error: parse error on input ‘where’
15:57:33 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
15:57:42 lbseale joins (~ep1ctetus@user/ep1ctetus)
15:58:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
15:58:09 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
15:59:39 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b) (Ping timeout: 252 seconds)
16:02:39 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
16:04:21 justsomeguy joins (~justsomeg@user/justsomeguy)
16:05:25 <bbear100> Guest76 https://0bin.net/paste/1qYvulRI#Xu76HUnNZ88TgrVcjrmxhNwUL91uOvOIDqxA3ztb97J
16:05:47 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
16:05:50 × bbear100 quits (~bbear@2a01:e34:ec2b:d430:e0dd:e718:df68:1877) (Quit: Client closed)
16:07:36 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
16:07:52 <gentauro> `While building package network-3.1.1.1 (scroll up to its section to see the error)` :S
16:07:57 Farzad joins (~FarzadBek@185.212.51.70)
16:07:58 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
16:08:13 <gentauro> no `lsp-haskell` on the `apple m1` :(
16:09:01 <gentauro> I noticed that `stack` doesn't really care about `m1` unless you make an alias like: `stack='stack --arch=aarch64'`
16:10:08 gentauro even though I have added the `arch: aarch64` to `.stack/global-project/stack.yaml`
16:11:41 <gentauro> perhaps I should aim for building it for the `rosetta x64` and execute it with emulation
16:11:47 <gentauro> but, that would suck
16:11:54 <gentauro> all network "emulated" :-\
16:14:31 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 245 seconds)
16:18:50 Vajb joins (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi)
16:20:16 slowButPresent joins (~slowButPr@user/slowbutpresent)
16:23:58 <maerwald> gentauro: network package was fixed
16:25:30 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:26:14 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:26:55 <maerwald> https://hackage.haskell.org/package/network-3.1.2.5/changelog
16:28:22 <EvanR> Guest76, here's a helpful predefined list function
16:28:27 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
16:28:38 <EvanR> > span (=='o') "hello world"
16:28:39 <lambdabot> ("","hello world")
16:28:45 <EvanR> thonk
16:28:52 <EvanR> > span (/='o') "hello world"
16:28:54 <lambdabot> ("hell","o world")
16:28:59 <EvanR> > break (=='o') "hello world"
16:29:01 <lambdabot> ("hell","o world")
16:29:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:32:35 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:32:52 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:33:20 × connrs quits (~connrs@user/connrs) (Read error: Connection reset by peer)
16:33:48 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
16:34:46 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b)
16:35:53 connrs joins (~connrs@user/connrs)
16:36:17 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
16:38:49 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:39:07 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:40:47 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:40:50 hololeap_ joins (~hololeap@user/hololeap)
16:41:05 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:41:15 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
16:41:38 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 252 seconds)
16:42:53 euandreh joins (~euandreh@2804:14c:33:9fe5:f767:b15a:e5b1:96f0)
16:43:44 pgib joins (~textual@173.38.117.87)
16:45:24 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:45:42 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
16:46:21 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
16:46:39 neurocyte0132889 joins (~neurocyte@94.46.79.27)
16:46:39 × neurocyte0132889 quits (~neurocyte@94.46.79.27) (Changing host)
16:46:39 neurocyte0132889 joins (~neurocyte@user/neurocyte)
16:47:52 Hanicef joins (~gustaf@81-229-9-108-no92.tbcn.telia.com)
16:51:29 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:52:42 notzmv joins (~zmv@user/notzmv)
16:54:18 × desantra quits (~skykanin@user/skykanin) (Read error: Connection reset by peer)
16:57:28 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
16:58:05 jpds joins (~jpds@gateway/tor-sasl/jpds)
16:59:56 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
17:00:00 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:00:00 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
17:00:00 wroathe joins (~wroathe@user/wroathe)
17:00:18 jpds joins (~jpds@gateway/tor-sasl/jpds)
17:01:40 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:02:36 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:03:49 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
17:04:11 × mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 252 seconds)
17:05:00 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
17:05:04 deadmarshal joins (~deadmarsh@95.38.231.28)
17:05:25 sebeko joins (uid530526@id-530526.helmsley.irccloud.com)
17:06:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
17:15:09 × tito quits (tito@tilde.team) (Quit: WeeChat 3.2.1)
17:15:14 renzhi joins (~xp@2607:fa49:6500:b100::5cef)
17:16:27 tito joins (tito@tilde.team)
17:19:58 <dsal> Hey, someone fixed the compiler on my mac. Thanks, someone.
17:20:24 <Franciman> \o/
17:20:26 × perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3)
17:20:39 × CiaoSen quits (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
17:21:09 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:23:14 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
17:28:06 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
17:28:46 perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
17:32:26 <EvanR> is your compiler running?
17:32:31 <EvanR> better catch it
17:32:47 <juri_> my compiler is too lazy to run.
17:33:43 jakalx joins (~jakalx@base.jakalx.net)
17:33:53 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 256 seconds)
17:36:52 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
17:37:37 econo joins (uid147250@user/econo)
17:38:00 InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
17:38:17 × axeman quits (~quassel@2a02:8109:a3c0:b10:91ce:4409:54:e379) (Ping timeout: 252 seconds)
17:39:41 <dsal> I have no idea what my compiler is doing. Benchmarks are varying so wildly that it could be doing anything.
17:39:55 <Franciman> dsal: writing a compiler for your language?
17:40:47 <dsal> No, just doing AoC stuff. But when I try to speed something up, it just sort of goes random.
17:41:06 <dsal> Benchmarks I was running last night in 500ms are now taking 14s -- in code I didn't change.
17:41:19 <dsal> This didn't seem to change when I moved away from rosetta.
17:41:37 <Franciman> dsal: did you learn about STG machine?
17:41:39 <Franciman> et similia
17:41:58 <Franciman> this seems to help understanding what goes on
17:43:38 <sebeko> Was there a separate channel for haskell AoC?
17:44:46 <dsal> Franciman: Not sure what that is.
17:45:08 <dsal> It's getting voodoo for me, though. All I've done since last night was plugged my computer in and moved it to a different room.
17:45:21 <Franciman> if you speak italian, we are discussing them in #haskell-it-offtopic
17:45:37 <Franciman> same, dear dsal. same T.T
17:45:38 <dsal> I've since also shifted to a native compiler, but that doesn't seem to be an issue.
17:45:50 <Franciman> optimisation is _hard_
17:46:53 abccgr joins (abccgr@117.194.180.165)
17:46:55 <dsal> I'd be fine if it were at least *consistent*. :)
17:46:59 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
17:46:59 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
17:46:59 finn_elija is now known as FinnElija
17:47:15 <Franciman> are you optimizing haskell, dsal ?
17:47:18 <sebeko> dsal: you can always try running on linux (say online) and see if it is at all caused by your machine
17:48:04 <dsal> I've got a thinkpad next to me. It seems way happier.
17:48:24 <dsal> Franciman: I was trying to, but doing it with inconsistent benchmarks is a really dumb idea.
17:49:04 <dsal> A few years ago, I was doing this and my (intel) mac was consistently faster than my Linux machine.
17:49:58 <Franciman> do you use criterion for getting some statistcal info
17:50:01 <Franciman> ?
17:50:39 <dsal> Yeah
17:50:48 <Franciman> i see
17:50:52 <sebeko> You could also bench functions separately to bisect the problem I think 🤔
17:50:55 <dsal> But it's not subtle at all.
17:51:07 <dsal> Literally zero changes, went from 500ms to 13s
17:51:11 <dsal> ~14s
17:51:41 <dsal> The only thing that actually changed was plugging in my laptop.
17:51:56 <dsal> Switching compilers off of rosetta didn't help, but it didn't hurt, so... OK?
17:52:03 <dsal> But I'm going to stop thinking about this. :)
17:52:23 <Franciman> lol
17:52:26 <Franciman> awesum
17:52:27 × curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Quit: Leaving)
17:52:29 <Franciman> this may be a bug
17:52:41 <sebeko> When I was going crazy from something like this, the problem was I saved the file :D
17:52:50 <Franciman> lol
17:53:44 <gentauro> 17:26 < maerwald> https://hackage.haskell.org/package/network-3.1.2.5/changelog
17:54:05 <gentauro> maerwald: I have to jump on the GHC-901 wagon :o https://www.stackage.org/lts-18.18/package/network-3.1.1.1
17:55:00 <gentauro> maerwald: might be the right thing to do as LTS is not really working properly on the M1 anyway xD
17:56:08 <InternetCitizen> if I want to use something like Megaparsec or attoparsec, do I have to use cabal/stack?
17:56:43 <Franciman> not necessarily, but it would be much easier yes
17:57:00 <InternetCitizen> I'm not too sure how Haskell dependency management works, I know I can just use stack but this is a simple AOC problem and I'd really like to simply compile my code with plain old GHC and a makefile
17:57:11 <sebeko> Have to? No I think there is ghc-pkg or something
17:57:36 <sebeko> Cabal has yaml files and is very easy to setup for aoc
17:57:59 <sebeko> there are even templates on reddit ;)
17:59:00 <InternetCitizen> I see, maybe I will just use Parsec
17:59:31 <Franciman> InternetCitizen: if you have cabal installed
17:59:50 <Franciman> cabal has a much lighter way than stack at getting you started in this case
18:00:07 <Franciman> the chief problem of not using cabal is that attoparsec and megaparsec have their dependencies
18:00:12 <Franciman> so you have to also compile them
18:00:45 <Franciman> of not using cabal/stack*
18:00:52 <Franciman> yeah parsec is a good tradeoff
18:04:26 hololeap joins (~hololeap@user/hololeap)
18:04:57 × Vajb quits (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
18:05:06 × hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
18:05:08 <EvanR> dsal, first, performance something that runs very quickly can be very sensitive to OS conditions. Like memory cache, i/o cache, other processes
18:05:55 <EvanR> second, to get a feel for what's happening you might want to accumulate a lot of samples and check mean and std deviation
18:05:57 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
18:06:11 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Remote host closed the connection)
18:06:38 <EvanR> I don't know how deterministic the GC is either
18:09:35 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
18:10:21 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
18:11:38 hololeap joins (~hololeap@user/hololeap)
18:12:06 <dsal> gentauro: I've mostly been having good luck with LTS on m1. This new machine has had a few oddities.
18:13:51 axeman joins (~quassel@2a02:8109:a3c0:b10:9fd2:9b38:d0eb:7d85)
18:14:09 <dsal> My problem seems to be some kind of linker madness.
18:14:57 dhruvasagar joins (~dhruvasag@49.207.222.205)
18:15:42 <dsal> If I roll back to an older version of my code before I added a new benchmark, I get ~400ms on this benchmark.
18:15:52 <dsal> Ha, then I rolled it forward and now it's ~600ms.
18:25:01 deadmarshal joins (~deadmarsh@95.38.231.28)
18:27:05 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 256 seconds)
18:27:53 <janus> InternetCitizen: if you use cabal/scripts or files, you can have each AoC day be self-contained. no need for separate configuration files
18:28:35 <janus> you just stick a header on each day speciying its dependencies, then cabal/stack can run it
18:29:06 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b) (Remote host closed the connection)
18:30:46 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:30:46 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 245 seconds)
18:31:03 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
18:31:38 × deadmarshal quits (~deadmarsh@95.38.231.28) (Ping timeout: 252 seconds)
18:32:10 Lycurgus joins (~juan@98.4.112.204)
18:33:02 Erutuon joins (~Erutuon@user/erutuon)
18:36:13 notzmv joins (~zmv@user/notzmv)
18:37:04 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
18:39:07 <EvanR> "don't attempt to mutate vector after unsafeThaw unless you know how to prevent GHC from aliasing buffers accidentally. We don't" xD
18:39:58 johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0)
18:40:35 <InternetCitizen> janus: I'm not very familar with the header technique ...
18:40:42 <InternetCitizen> what does it onsist of?
18:41:19 <janus> InternetCitizen: look at https://cabal.readthedocs.io/en/latest/cabal-commands.html#cabal-v2-run and scroll down to "v2-run also supports running script files"
18:41:39 <InternetCitizen> thank you very much
18:42:05 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
18:43:48 <EvanR> it's pretty convenient, except for the initial delay to run the file
18:44:36 <EvanR> though when iterating AoC attempts you have to recompile and relink anyway
18:46:29 × jkaye quits (~jkaye@2601:281:8300:7530:5a4f:5910:1ea1:e61f) (Ping timeout: 252 seconds)
18:47:01 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:47:57 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
18:49:20 × mbuf quits (~Shakthi@122.174.197.155) (Quit: Leaving)
18:49:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
18:51:27 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:51:45 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
18:52:08 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.3)
18:52:23 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:53:09 <raehik> Which of Nat and Natural should I use for easy type-level naturals? on Hackage it sounds like they've been merged recently, maybe? but there are Integer <-> Natural funcs but none for Nat
18:55:59 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:56:11 × bradparker quits (sid262931@uxbridge.irccloud.com) (Read error: Connection reset by peer)
18:56:16 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
18:56:20 bradparker joins (sid262931@id-262931.uxbridge.irccloud.com)
18:59:55 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:00:13 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:00:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:01:03 <awpr> before the merge, `Natural` was not possible to use at type level. if you care about compatibility with GHC < 9.2, `Nat` is the only choice
19:01:30 <awpr> if you're writing an application that only needs to build with GHC 9.2+, there's no difference between the two (it's literally `type Nat = Natural`
19:02:18 <awpr> ah, it's been a few minutes, since that message, so I'll ping: raehik
19:02:46 Cajun joins (~Cajun@user/cajun)
19:02:59 <raehik> awpr: ahhhh. I see, it's because I hadn't actually being using Natural at the type level until now, just with datakinds
19:03:28 <raehik> ahhhh and it's because I'm on Stack GHC which isn't 9.2 yet >:(
19:04:01 <awpr> hmm, DataKinds is exactly about promoting term-level data to type level, so I don't understand the last message
19:04:57 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:05:39 <awpr> hmm... GHC 8.6.5 actually accepts using `Natural` as a kind. but maybe it's impossible to construct a type-level thing of that kind?
19:05:48 <raehik> ah sry I mean typefamilies then. I wasn't putting Naturals in the type level but they got returned by a type family, and I had slightly confused myself
19:06:20 <raehik> and just now yeah, I used it as a kind. but as you say, hadn't tried constructed a type level one
19:06:48 <awpr> ah right, indeed that wouldn't have required the unified Nat/Natural yet
19:07:23 × max22- quits (~maxime@2a01cb0883359800ca908bdf23b4cd25.ipv6.abo.wanadoo.fr) (Ping timeout: 252 seconds)
19:08:35 <raehik> so I'll use Natural everywhere I can, and Nat for while I can't upgrade to GHC 9.2. until Stackage moves their nightlies
19:08:38 <raehik> thx awpr !
19:09:46 × axeman quits (~quassel@2a02:8109:a3c0:b10:9fd2:9b38:d0eb:7d85) (Quit: No Ping reply in 180 seconds.)
19:10:18 <awpr> yeah, the only thing I know of that this unification _really_ changes is the ability to use the same definition for term and type level: `data Thing = Thing Natural` pre-unification can't be promoted usefully, it'd have to be `data Thing a = Thing a` and `type TermThing = Thing Natural` and `type TypeThing = Thing Nat` to treat them differently
19:10:31 ss4 joins (~wootehfoo@user/wootehfoot)
19:11:00 <awpr> so if you don't need to do that very specific thing, I think it shouldn't affect you and you should be fine just using `Nat` for type-level and `Natural` for term-level
19:11:01 axeman joins (~quassel@2a02:8109:a3c0:b10:c575:40eb:1f86:4317)
19:11:05 AlexNoo_ joins (~AlexNoo@178.34.151.83)
19:11:07 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
19:11:26 mc47 joins (~mc47@xmonad/TheMC47)
19:11:28 FarzadBekran_ joins (~FarzadBek@185.212.51.70)
19:11:44 <raehik> what do you mean by promotion - is that something GHC can do? (I only know that from singletons)
19:12:25 <awpr> promotion is the term for what DataKinds enables: if `data Thing = MkThing`, then `x :: Proxy MkThing` uses the promoted data constructor `MkThing`
19:12:43 × Techcable quits (~Techcable@168.235.93.147) (Quit: ZNC - https://znc.in)
19:12:56 Techcable_ joins (~Techcable@168.235.93.147)
19:13:03 <janus> i think you can use stack with newer compilers, you just have to put extra-deps for every single dep that is broken in the snapshot you use
19:13:33 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds)
19:14:04 <awpr> (there isn't any built-in promotion of normal functions, only data constructors)
19:14:26 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 256 seconds)
19:14:40 × AlexNoo quits (~AlexNoo@178.34.151.83) (Ping timeout: 256 seconds)
19:14:41 <awpr> re janus yes, I've built all the packages I maintain under Stack with 9.2, with a moderate amount of effort in manually fiddling with dependencies
19:15:00 <awpr> so it's definitely possible if you really must have new features for any reason
19:15:07 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
19:15:49 × Farzad quits (~FarzadBek@185.212.51.70) (Ping timeout: 256 seconds)
19:19:29 × pgib quits (~textual@173.38.117.87) (Ping timeout: 252 seconds)
19:21:09 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
19:26:33 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:26:51 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:28:31 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:28:48 × abccgr quits (abccgr@117.194.180.165) (Remote host closed the connection)
19:28:49 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
19:29:30 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b)
19:31:55 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
19:32:03 × thevishy quits (~Nishant@2405:201:f005:c007:fd4c:a570:99e4:8844) (Quit: Leaving)
19:32:29 max22- joins (~maxime@2a01cb08833598006b46964008321399.ipv6.abo.wanadoo.fr)
19:33:32 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b) (Ping timeout: 240 seconds)
19:34:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
19:37:09 <janus> how do i find out which package a symbol is exported from?
19:37:46 <janus> when i do ":t (.:)" it says aeson, but i believe that the symbol is reexported from another library, because i didn't do ":m +Data.Aeson"
19:39:39 <boxscape> janus: maybe try misspelling it, ghc might suggest the correct spelling along with where it's imported from
19:40:26 <boxscape> % joiin -- example
19:40:26 <yahb> boxscape: ; <interactive>:14:1: error:; * Variable not in scope: joiin; * Perhaps you meant `join' (imported from Control.Monad)
19:41:24 <dmj`> janus: you can use PackageImports to be explicit about it, import "base" Control.Monad (forM_)
19:42:26 <boxscape> (also if ghc finds that something is a valid holefit it will also say from where it's imported)
19:48:29 jkaye joins (~jkaye@2601:281:8300:7530:3bdb:266b:f9cc:b3bc)
19:49:43 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Read error: Connection reset by peer)
19:50:21 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
19:50:39 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
19:52:58 <__monty__> Is there a function like enumFromTo/([x..y]) but that does descending ranges too without resorting to enumFromThenTo?
19:53:32 <__monty__> I mean, without explicitly doing so, if the function internally uses enumFromThenTo, that's fine.
19:54:50 <pragma-> the full monty
19:54:52 <tomsmeding> enumImplicitFromTo x y = if y < x then enumFromThenTo x (x - 1) y else enumFromTo x y
19:55:03 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 252 seconds)
19:55:26 gentauro `You are using snapshot: nightly-2021-12-04`
19:55:29 gentauro `stack ghci`
19:55:46 gentauro `ghci> /private/tmp/nix-shell-96787-0/rc: line 3: 96791 Segmentation fault: 11 '/usr/local/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.7.3' '--arch=aarch64' 'ghci'`
19:55:50 <gentauro> LEL
19:55:57 <gentauro> I guess it's a no HaskLEL on the M1 ..
19:56:44 <gentauro> why can't Levondo deliver laptops like in a timely manner? (end of Q1 2022 / start Q2 2022) #firstworldproblems
19:57:02 jle` joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
19:57:16 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
19:57:17 <__monty__> tomsmeding: I know the implementation is very simple, just seems like a silly thing to need to implement. I'd probably do reverse [y..x] though, doesn't rely on them being Num per se : )
19:57:48 × Hanicef quits (~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving)
19:58:12 <monochrom> It also relies on Ord. "y<x"
19:58:36 <tomsmeding> __monty__: right, 'pred x' is better than 'x - 1'
19:58:51 <monochrom> After a while, you realize that it relies on so many externalities, you begin to appreciate how, at least, it doesn't belong in Enum.
19:58:52 <tomsmeding> reduces constraints from Num+Ord+Enum to Ord+Enum
19:58:57 <EvanR> reverse destroys your laziness
20:01:19 <EvanR> > [0 % 1 .. 5 % 1]
20:01:21 <lambdabot> [0 % 1,1 % 1,2 % 1,3 % 1,4 % 1,5 % 1]
20:01:26 <EvanR> > [0 % 2 .. 5 % 2]
20:01:28 <lambdabot> [0 % 1,1 % 1,2 % 1,3 % 1]
20:01:45 <EvanR> what is 'Enum' supposed to be anyway xD
20:01:58 <tomsmeding> isn't that like the prime complaint about the class
20:02:01 <tomsmeding> that the semantics are unclear
20:02:15 <tomsmeding> > [1.2 .. 4.5]
20:02:16 <lambdabot> [1.2,2.2,3.2,4.2]
20:02:33 <tomsmeding> at least Ratio's implementation is consistent with Double's
20:03:15 <EvanR> > [0/2 .. 5/2]
20:03:17 <lambdabot> [0.0,1.0,2.0,3.0]
20:03:22 <tomsmeding> wait wat
20:03:22 <EvanR> overshoot
20:03:29 <tomsmeding> ok the overshoot is consistent
20:03:31 <tomsmeding> but wat
20:03:47 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
20:04:09 <EvanR> "I'm going to add 1 and you can't stop me!!!"
20:04:59 <tomsmeding> > ([1.0 .. 3.4], [1.0 .. 3.6])
20:05:01 <lambdabot> ([1.0,2.0,3.0],[1.0,2.0,3.0,4.0])
20:05:05 <tomsmeding> why does it round
20:05:08 <tomsmeding> that makes no sense at all
20:05:11 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 256 seconds)
20:05:26 <EvanR> oof
20:06:05 <tomsmeding> I'm still not quite convinced the Enum class is useless as a whole, but that Double instance is just plain madness
20:06:32 <c_wraith> I still believe the only correct instance for Float and Double counts the number of ulps you increment by
20:06:40 <__monty__> tomsmeding: Right, that's even better.
20:06:47 juhp joins (~juhp@128.106.188.82)
20:06:59 sprout_ joins (~quassel@2a02:a467:ccd6:1:bde9:c3fb:c9c:3dee)
20:06:59 <c_wraith> No one would ever use it then, because it would be obviously wrong for their case, instead of non-obviously wrong
20:07:27 <__monty__> monochrom: Didn't say it belongs in Enum. Just the kind of relatively common thing I'd expect in a common (probably base) library.
20:07:34 <EvanR> something about a functor from category of reals to category of integers wrt ordering
20:08:11 <EvanR> nvm lol
20:08:33 <tomsmeding> what are the objects and morphisms in a category of integers :p
20:09:01 <EvanR> (objects are integers, x < y would be a morphism if it were true
20:10:10 pfurla joins (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6)
20:10:15 <EvanR> if someone said give me an mapping from Int to Double, that might leaves some questions.
20:10:31 <tomsmeding> EvanR: https://ncatlab.org/nlab/show/partial+order#AsACategoryWithExtraProperties
20:10:32 <EvanR> (an injective mapping)
20:10:38 × sprout quits (~quassel@2a02:a467:ccd6:1:ed9e:6da6:fee6:2db6) (Ping timeout: 252 seconds)
20:12:18 <EvanR> > toEnum 50 :: Float
20:12:19 <lambdabot> 50.0
20:12:31 <EvanR> > toEnum 500000000 :: Float
20:12:32 <lambdabot> 5.0e8
20:12:37 <EvanR> come on..
20:13:13 <EvanR> > toEnum (maxBound `div` 2) :: Float
20:13:14 <lambdabot> 4.611686e18
20:13:23 <EvanR> > maxBound `div` 2
20:13:24 <lambdabot> error:
20:13:24 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M806950334028...
20:13:24 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
20:13:25 Sgeo joins (~Sgeo@user/sgeo)
20:13:29 <EvanR> > maxBound `div` 2 :: Int
20:13:30 <lambdabot> 4611686018427387903
20:13:40 <EvanR> look look it's wrong!
20:15:18 <EvanR> I guess you can think of it as a fuzzy or noisy association between Int and floats
20:16:06 <EvanR> the farther you go the worse it gets like a hyperbolic plane
20:18:15 × pfurla quits (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6) (Quit: gone to sleep. ZZZzzz…)
20:18:39 <tomsmeding> > fromEnum (toEnum 10000000000000000 :: Float) -- EvanR possibly clearer example
20:18:40 <lambdabot> 10000000272564224
20:19:19 sm[i]_ is now known as sm[i]
20:19:20 × sm[i] quits (~user@li229-222.members.linode.com) (Changing host)
20:19:20 sm[i] joins (~user@plaintextaccounting/sm)
20:19:56 <tomsmeding> injective mapping from Int64 to either Float or Double would be impossible by the pigeonhole principle, and the fact that 0.0 == -0.0 :p
20:21:05 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b)
20:21:14 <EvanR> > show (100 * (10000000272564224 - 10000000000000000) % 10000000000000000) ++ "%"
20:21:16 <lambdabot> "16636 % 6103515625%"
20:21:20 <EvanR> close enough xD
20:22:13 <EvanR> > showFFloat (Just 9) (16636/6103515625) ""
20:22:15 <lambdabot> "0.000002726"
20:22:34 <tomsmeding> you can kind of see that from the numbers already :p
20:22:43 <EvanR> lol
20:22:44 <tomsmeding> point of it being a power of 10
20:23:16 <EvanR> morally injective
20:24:12 <Profpatsch> How do we know any of the streaming/Bundle stuff in the implementation of Vector actually does anything?
20:24:14 <tomsmeding> > fromEnum (toEnum 8000000000000000001 :: Double)
20:24:16 <lambdabot> 8000000000000000000
20:24:19 <EvanR> pigeonhole though? there are 2^64 Int64s, but less than that Doubles
20:24:27 <EvanR> oh I see
20:24:34 <Profpatsch> There’s a lot of undocumented magic that seems to be hoping that fusion happens
20:24:35 <tomsmeding> EvanR: Double is a 64 bit value :p
20:24:50 <EvanR> a lot of values are reserved and don't represent numbers
20:25:08 <EvanR> to be exploited for fun and profit
20:25:10 <Profpatsch> How would I verify it actually does something as pertaining to speed?
20:25:14 <tomsmeding> Profpatsch: you might want to try the -ddump-rule-firings option to GHC
20:25:45 <Profpatsch> But e.g. aeson returns a Vector from its Array type
20:25:57 <tomsmeding> and perhaps -fno-enable-rewrite-rules to compare
20:26:12 <Profpatsch> Now, looking at its code
20:26:14 × bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
20:26:26 <tomsmeding> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/rewrite_rules.html?highlight=enable%20rewrite%20rules#rewrite-rules
20:26:46 <Profpatsch> https://hackage.haskell.org/package/aeson-2.0.2.0/docs/src/Data.Aeson.Parser.Internal.html#arrayValues
20:27:15 <Profpatsch> It *still* constructs a list, then converts it to a Vector (O(n)), then reverses the vector (O(n) again)
20:27:38 <Profpatsch> And then the question remains whether the underlying data is actually garbage collected in the end
20:28:06 <Profpatsch> It does pass the length to the list to the vector library
20:28:17 <tomsmeding> Profpatsch: I would bet that reverse . fromListN is getting fused -- that's kind of the point of the rules. But try -ddump-rule-rewrites.
20:28:19 <Profpatsch> But god knows what the performance improvementes of that are
20:28:20 <EvanR> yeah, does aeson's parser depend on the input bytestring later, or is everything copies out
20:28:30 <EvanR> copied
20:28:33 <Profpatsch> vector certainly doesn’t document it
20:28:39 <tomsmeding> and see the docs page I linked
20:29:40 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
20:29:44 <EvanR> I guess it can't really use the input string directly because of string escapes
20:29:44 <Profpatsch> tomsmeding: thing is, I know how rewrite rules work roundabout. But I don’t trust whether Vector actually works as advertised
20:29:51 <tomsmeding> then check :p
20:29:53 <Profpatsch> And even then it doesn’t document anything
20:30:08 <EvanR> even if it did document stuff having a way to verify is good lol
20:30:45 <Profpatsch> like, as far as I can see vector has like 10 benchmarks
20:31:02 <Profpatsch> So what does that tell me
20:31:09 <Profpatsch> lol https://github.com/haskell/vector/issues/229
20:31:12 <tomsmeding> and if you checked and you found something interesting, that may be a good opportunity for a PR to vector :)
20:32:13 <Profpatsch> I just can’t build any trust in such a fundamental library
20:32:39 <Profpatsch> So I won’t use it because stuff is advertised but there’s no way to use it without falling down a rabbit hole
20:33:00 <EvanR> I'm using vector right now for audio and no rabbit hole
20:33:13 <EvanR> (because not having any performance problems yet)
20:33:36 <Profpatsch> e.g. with Vec in rust I can be sure that it’s optimized to death
20:33:51 <Profpatsch> And the performance will be pretty obvious and is documented liberally
20:34:30 <EvanR> in general using haskell and caring about the compiled code at the same time is a step up in effort
20:34:46 <tomsmeding> Profpatsch: is the purpose of you talking about this here, trying to get someone to do something about it? Or something else?
20:37:23 <tomsmeding> also, something else: you note the reverse . fromListN pattern in aeson. Did you notice that this is a (potential) problem in a benchmark? Or is this premature optimisation? ;)
20:37:42 <tomsmeding> though I'm all for premature optimisation if it's fun
20:37:50 <Profpatsch> tomsmeding: No, just trying to figure out whether I should use Vector for a parser I’m writing
20:38:00 <tomsmeding> instead of?
20:38:42 <Profpatsch> Just returning a []. And going down the rabbit hole of checking how aeson does it, and figuring out that everything is kinda undocumented and it’s not easy to see why things are done
20:39:09 <tomsmeding> as in, you're parsing a list value?
20:39:44 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
20:39:48 <Profpatsch> For example https://github.com/haskell/aeson/commit/2f24e555d86a36fdda6d4cad79976004b382ab3b
20:39:55 <Profpatsch> This is a commit touching the aeson parser liberally
20:40:12 <tomsmeding> I think that depends a lot on how you're parsing that value and how you're going to use the value. If you know in advance how long the list is going to be, and it's going to be kept around / accessed randomly, go for vector for sure, regardless of whether the fusion rules actually do anything or not
20:40:13 <Profpatsch> with no commit description
20:40:16 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
20:40:18 VoidNoir0 joins (~VoidNoir0@72.80.203.52)
20:40:35 <Profpatsch> which introduces the change to how Vector is used
20:40:51 <tomsmeding> if you don't know the length in advance, you can't do much better than returning a list, perhaps postfixed with a fromList -- but that doesn't need to be done by your parser
20:40:58 <Profpatsch> I guess I’m just complaining how shitty the code quality of even very basic libraries is
20:41:04 <tomsmeding> but that all assumes your parser is building the list trivially by consing
20:41:25 gehmehgeh joins (~user@user/gehmehgeh)
20:41:55 <tomsmeding> Profpatsch: "shitty" is kind of unkind to the people that do the hard work. :) I do agree that more documentation about performance, and investigation into performance, would be quite beneficial.
20:42:08 <Profpatsch> So what I gather is that if I have a sequence of a known list, I should use Vector
20:42:14 <tomsmeding> But I'm 100% sure this is because of a lack of manpower
20:42:16 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
20:42:24 <Profpatsch> tomsmeding: No, sorry, if you do a major change to a base library, you better document what you are doing.
20:42:27 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
20:42:29 <Profpatsch> Otherwise it’s just shitty code.
20:42:38 <EvanR> oh man, X Y problems
20:43:03 <EvanR> you can't figure out how to write a parser so the library vector sucks xD
20:43:05 <tomsmeding> Profpatsch: if you have a sequence of known length, and you're going to do more to it than just traverse it once
20:43:20 <tomsmeding> and it's long
20:43:25 <tomsmeding> if it's short then it doesn't matter anyway
20:43:38 <c_wraith> Profpatsch: ? that change is pretty obvious. take advantage of known lengths, move the bytestring unescaping to C
20:44:05 <c_wraith> Profpatsch: it's just a performance tweak.
20:44:15 <c_wraith> Profpatsch: and that's what the patch description says
20:45:10 <tomsmeding> Profpatsch: and note that these considerations that I gave are still independent on whether vector's fusion rules actually do anything :)
20:45:30 <Profpatsch> I’m not going to argue about this lol, I just think we should do better.
20:45:53 <tomsmeding> "we" should indeed. And someone's gotta pay for that -- either with money or with time
20:45:55 <Profpatsch> Take that as you will
20:46:14 <tomsmeding> and people are hard at work at fixing that, not least at the Haskell Foundation :)
20:46:49 <c_wraith> I mean, I don't see anything bad here. Maybe it's not utopian, but it's better than average.
20:47:06 <c_wraith> And I don't mean average for Haskell. I mean average for software development.
20:47:21 <dsal> aeson does seem to be quite near the most popular library on hackage, but it would be nice if they used the tools a bit better.
20:49:10 pfurla joins (~pfurla@201.17.118.230)
20:52:07 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
20:52:25 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
20:56:04 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Remote host closed the connection)
20:56:15 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
20:56:36 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
20:56:41 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 256 seconds)
20:56:59 azimut joins (~azimut@gateway/tor-sasl/azimut)
20:56:59 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
20:58:39 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
20:58:57 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
20:58:58 acidjnk_new joins (~acidjnk@p200300d0c7271e180970d7f4a6232670.dip0.t-ipconnect.de)
21:01:17 × burnsidesLlama quits (~burnsides@dhcp168-020.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
21:05:34 zincy_ joins (~zincy@host86-151-99-97.range86-151.btcentralplus.com)
21:06:11 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:07:51 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
21:08:08 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
21:09:04 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
21:10:25 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Remote host closed the connection)
21:10:41 × imdoor quits (~imdoor@balticom-142-78-50.balticom.lv) (Remote host closed the connection)
21:11:49 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
21:13:31 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
21:13:52 × axeman quits (~quassel@2a02:8109:a3c0:b10:c575:40eb:1f86:4317) (Remote host closed the connection)
21:14:31 × sayola quits (~vekto@dslb-092-072-095-186.092.072.pools.vodafone-ip.de) (Ping timeout: 245 seconds)
21:14:34 × zer0bitz quits (~zer0bitz@dsl-hkibng32-54fbfb-173.dhcp.inet.fi) (Read error: Connection reset by peer)
21:14:55 <boxscape> How do I include newlines in a CPP pragma?
21:15:37 × zincy_ quits (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection)
21:15:38 <boxscape> s/pragma/macro
21:15:51 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
21:16:26 <boxscape> Wait I think I remember now
21:16:32 <boxscape> it's not possible and you have to work around it with {;}
21:16:57 sayola joins (~vekto@dslb-092-072-095-186.092.072.pools.vodafone-ip.de)
21:17:44 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:18:44 <tomsmeding> yeah impossible, that's also a thing in C
21:19:11 <boxscape> okay, thanks for confirming
21:19:26 <tomsmeding> though in C there's IIRC nothing that needs actual hard newlines, except CPP macros, which you can't generate from CPP macros anyway :)
21:19:35 <boxscape> right, good point
21:19:54 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
21:19:55 × FarzadBekran_ quits (~FarzadBek@185.212.51.70) (Remote host closed the connection)
21:20:41 <boxscape> :/ I can't use a macro here anyway because recursion is not allowed
21:20:59 cjb joins (~cjb@user/cjb)
21:21:04 <tomsmeding> just iterate the preprocessor over your file!
21:21:13 <tomsmeding> then it becomes turing complete :)
21:21:17 <tomsmeding> also: templatehaskell
21:21:42 <boxscape> TH seems like too much effort
21:21:49 <tomsmeding> can relate
21:22:10 <boxscape> realistically there should be a way to just use a regular Haskell function to remove the code duplication here, but I can't figure it out https://paste.tomsmeding.com/ei7jlZip
21:22:38 <c_wraith> the duplication in the instances?
21:22:48 <boxscape> no, in genericEscape and genericUnescape
21:22:55 <boxscape> I'm trying to combine them into one function
21:23:02 <boxscape> main problem is I need (Typeable (Parsed a)) or (Typeable a) in the local function, and I can't get that if I don't know which one of them I need
21:23:13 <c_wraith> because the instances have some unnecessary code duplication in them. :P
21:23:36 <boxscape> yeah, that's because they are simplified here :)
21:23:42 <boxscape> they don't have any duplication in the actual code
21:24:55 bollu joins (uid233390@id-233390.helmsley.irccloud.com)
21:25:06 <boxscape> though I've only tried combining the two on the actual code, I should probably try it on the simplified code
21:25:14 × cosimone quits (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Quit: ERC (IRC client for Emacs 27.1))
21:25:40 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
21:25:46 <c_wraith> the simplified code seems like you could probably RankNTypes your way through it
21:26:35 azimut joins (~azimut@gateway/tor-sasl/azimut)
21:30:01 <hololeap> @unmtl [StateT s m a]
21:30:01 <lambdabot> [StateT s m a]
21:30:27 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:30:27 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
21:30:27 wroathe joins (~wroathe@user/wroathe)
21:30:32 <hololeap> @unmtl StateT s (Writer w) a
21:30:33 <lambdabot> s -> (a, s, w)
21:30:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:34:56 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 245 seconds)
21:36:53 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
21:37:11 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
21:37:27 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
21:37:51 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:38:04 <boxscape> this is about how far I get :/ https://paste.tomsmeding.com/mGzaUClb
21:38:15 <boxscape> just no idea how I could fulfill that constraint
21:41:02 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
21:41:20 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
21:43:29 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
21:43:47 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
21:44:41 × Guest76 quits (~Guest76@wireless-student-pt10-183-60.lut.ac.uk) (Quit: Client closed)
21:48:39 <hololeap> @hoogle (Monad m, Monoid a) => [StateT s m a] -> StateT [s] m a
21:48:40 <lambdabot> No results found
21:51:03 <hololeap> :t StateT . (\l ss -> sequenceA <$> sequenceA (l <*> ss)) . fmap runStateT :: (Monad m, Monoid a) => [StateT s m a] -> StateT [s] m a
21:51:04 <lambdabot> (Monad m, Monoid a) => [StateT s m a] -> StateT [s] m a
21:51:31 <hololeap> i'm a bit surprised this doesn't exist on hoogle
21:51:39 × InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds)
21:53:10 InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
21:53:22 <hololeap> maybe this would be easier with the zoom optic
21:55:04 × kennyd quits (~bc8165b6@cerf.good1.com) (Quit: CGI:IRC)
21:56:14 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Ping timeout: 252 seconds)
21:56:14 × justSleigh quits (~justache@user/justache) (Quit: The Lounge - https://thelounge.chat)
21:56:47 × xsperry quits (~xs@user/xsperry) ()
21:57:24 <boxscape> tomsmeding: turns out I *can* use a CPP macro, I just have to supply the name of the function as well so I can call that name recursively instead of the macro itself
21:57:59 justSleigh joins (~justache@user/justache)
21:58:26 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
21:59:26 emf joins (~emf@2620:10d:c090:400::5:3b6)
21:59:35 <boxscape> I'll just keep a comment saying "Fun challenge: Try to do this using a polymorphic function instead of a macro" in the code to nerdsnipe innocent passers-by
22:00:08 <Rembane> "How to lower the efficiency of your team in one simple step."
22:00:09 xsperry joins (~xs@user/xsperry)
22:01:59 <boxscape> :) luckily I'm doing this in a one-man team and I've already nerdsniped myself so now I'm immune
22:02:27 zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0)
22:04:15 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
22:04:51 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
22:05:27 <Rembane> Sweet! :)
22:05:56 geekosaur joins (~geekosaur@xmonad/geekosaur)
22:08:03 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:08:21 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:10:01 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:10:19 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:10:26 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
22:12:06 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:12:23 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:14:04 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:14:22 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:15:29 jakalx joins (~jakalx@base.jakalx.net)
22:18:15 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:18:33 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:20:13 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:20:31 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:24:29 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:24:47 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:26:05 Lycurgus joins (~juan@98.4.112.204)
22:27:39 Lycurgus parts (~juan@98.4.112.204) ()
22:28:41 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 245 seconds)
22:30:43 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:31:01 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:31:28 × jakzale quits (6291399afa@2604:bf00:561:2000::1e4) (Changing host)
22:31:28 jakzale joins (6291399afa@user/jakzale)
22:33:51 × ss4 quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
22:34:50 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
22:36:57 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:37:15 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:37:20 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
22:37:32 × max22- quits (~maxime@2a01cb08833598006b46964008321399.ipv6.abo.wanadoo.fr) (Quit: Leaving)
22:38:47 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
22:40:48 notzmv joins (~zmv@user/notzmv)
22:41:20 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
22:41:21 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
22:41:50 kennyd joins (~bc8165b6@83.167.180.121)
22:41:59 pavonia joins (~user@user/siracusa)
22:43:20 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:45:27 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:45:45 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:46:39 × emf quits (~emf@2620:10d:c090:400::5:3b6) (Ping timeout: 252 seconds)
22:47:35 × zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection)
22:48:14 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
22:48:34 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
22:48:51 hskpractice joins (~hskpracti@94-255-217-215.cust.bredband2.com)
22:50:02 emf joins (~emf@2620:10d:c090:400::5:3b6)
22:52:35 vgtw_ joins (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se)
22:53:25 × hskpractice quits (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
22:53:59 × vgtw quits (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) (Ping timeout: 256 seconds)
22:54:58 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:58:44 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
22:59:49 aweinstock joins (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com)
23:01:06 × pfurla quits (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…)
23:11:57 pfurla joins (~pfurla@2804:14d:5c81:4104:9dad:b7eb:58e3:98e6)
23:13:48 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e52b:eca6:e736:3c6b) (Remote host closed the connection)
23:19:39 × emf quits (~emf@2620:10d:c090:400::5:3b6) (Ping timeout: 252 seconds)
23:19:40 yauhsien joins (~yauhsien@61-231-32-247.dynamic-ip.hinet.net)
23:24:03 × yauhsien quits (~yauhsien@61-231-32-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
23:28:27 × jkaye quits (~jkaye@2601:281:8300:7530:3bdb:266b:f9cc:b3bc) (Ping timeout: 252 seconds)
23:29:26 AlexNoo__ joins (~AlexNoo@178.34.163.11)
23:31:23 × AlexZenon quits (~alzenon@178.34.151.83) (Ping timeout: 252 seconds)
23:32:29 × Alex_test quits (~al_test@178.34.151.83) (Ping timeout: 252 seconds)
23:32:47 TranquilEcho joins (~grom@user/tranquilecho)
23:33:02 × AlexNoo_ quits (~AlexNoo@178.34.151.83) (Ping timeout: 252 seconds)
23:35:11 <Axman6> anyone know what the state of the are for anonymous sum types is? Are there any that don't need linear time to discriminate?
23:35:16 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:35:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:35:16 wroathe joins (~wroathe@user/wroathe)
23:36:02 burnsidesLlama joins (~burnsides@dhcp168-020.wadham.ox.ac.uk)
23:36:49 AlexZenon joins (~alzenon@178.34.163.11)
23:36:55 <Axman6> I remember there being a PR for generica-sop which did that I think...
23:36:55 Alex_test joins (~al_test@178.34.163.11)
23:39:24 <jackdk> I believe DeriveGeneric instances aim to balance the tree of `:+:`s but I haven't gone looking for libs that guarantee logtime discriminatino
23:40:45 chenqisu12 joins (~chenqisu1@183.217.201.63)
23:41:05 <Axman6> The case I'm interested in would probably involve an anonymous sum type with hundreds of cases, so constant time wouldbe pretty important (I'm wanting to use it with the discrimination package... but that might actually be useful in making things linear... hmmm)
23:41:43 <Axman6> https://github.com/well-typed/generics-sop/pull/129/files#diff-73d5674c9c5f0908d8b3ad84b68e7345f1c9aca30b0ede39b6a6505fe85f71d3 is the change to generica-sop I was interested in
23:43:16 <Axman6> and https://github.com/well-typed/generics-sop/pull/129/files#diff-73d5674c9c5f0908d8b3ad84b68e7345f1c9aca30b0ede39b6a6505fe85f71d3R464 would also be very useful here too...
23:44:09 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: Leaving)
23:45:29 Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
23:46:41 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
23:47:56 <boxscape> Axman6: maybe an unboxed sum could work?
23:48:13 <Axman6> hmm, that's a possibility
23:48:23 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:54:54 <jackdk> Does anyone know if there are good adapters that get you generic-lens style accessors for the structures generated by the large-record package? I'm hacking on a package with many very large records, and would like to get the compilation time down while supporting both `lens` and `optics`
23:56:51 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
23:57:36 <Axman6> is that package related to https://youtu.be/GkoQbJofm1A?
23:57:47 <Axman6> uh, not that one
23:58:00 <jackdk> https://well-typed.com/blog/2021/10/large-records-part-2/
23:58:14 <Axman6> https://youtu.be/XXPWVPquYvw

All times are in UTC on 2021-12-05.