Home liberachat/#haskell: Logs Calendar

Logs on 2022-09-30 (liberachat/#haskell)

00:00:53 nate3 joins (~nate@98.45.169.16)
00:02:20 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 268 seconds)
00:02:52 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 258 seconds)
00:03:36 adanwan_ joins (~adanwan@gateway/tor-sasl/adanwan)
00:03:38 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
00:03:48 × califax quits (~califax@user/califx) (Quit: ZNC 1.8.2 - https://znc.in)
00:04:01 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
00:04:30 califax joins (~califax@user/califx)
00:05:16 ChaiTRex joins (~ChaiTRex@user/chaitrex)
00:05:25 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
00:05:33 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
00:05:49 <jackdk> The `:info` command in GHCi is also useful for answering questions like this:
00:05:49 × adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
00:05:51 <jackdk> % :info Ord
00:05:52 <yahb2> type Ord :: * -> Constraint ; class Eq a => Ord a where ; compare :: a -> a -> Ordering ; (<) :: a -> a -> Bool ; (<=) :: a -> a -> Bool ; (>) :: a -> a -> Bool ; (>=) :: a -> a -> Bool ;...
00:05:52 ec joins (~ec@gateway/tor-sasl/ec)
00:06:18 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
00:06:38 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
00:06:58 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
00:06:58 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
00:06:58 wroathe joins (~wroathe@user/wroathe)
00:12:09 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
00:13:03 <EvanR> because Ord is supposed to be a "total order"
00:13:21 <EvanR> other kind of orderings are cool, some don't entail equality issues
00:15:20 × levitating quits (~irc@user/levitating) (Ping timeout: 265 seconds)
00:16:54 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
00:17:12 × chomwitt quits (~chomwitt@2a02:587:dc14:f500:9e6a:c6cb:5be3:53b3) (Ping timeout: 264 seconds)
00:21:31 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
00:23:21 <ski> equality issues ?
00:23:51 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
00:24:34 × sagax quits (~sagax_nb@user/sagax) (Ping timeout: 244 seconds)
00:26:25 <EvanR> you might not need to or want to define equality
00:27:01 <EvanR> or in the case of real numbers, can't xD (have decidable equality)
00:42:12 levitating joins (~irc@user/levitating)
00:42:38 <L29Ah> https://hackage.haskell.org/package/array-0.5.4.0/docs/src/Data.Array.Base.html#local-6989586621679067856 omg this looks very complex, is it even fast? is there a simpler unboxed array impl?
00:43:35 <geekosaur> there are unboxed Vectors
00:44:33 <L29Ah> https://hackage.haskell.org/package/vector-0.13.0.0/docs/src/Data.Vector.Generic.html#unsafeIndex this looks even more complex
00:46:51 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
00:47:02 adanwan_ joins (~adanwan@gateway/tor-sasl/adanwan)
00:50:57 <EvanR> looks like when you access an array of unboxed Char you get an actual Char and not an unboxed thing
00:51:17 <EvanR> so it's not like C in this case...
00:52:55 <EvanR> I guess you can pattern match on C# to use the unboxed char in your unboxed algorithm?
00:54:45 <dolio> Why would you?
00:55:13 <EvanR> in a desperate attempt to avoid allocating boxes?
00:55:35 <Axman6> L29Ah: what's "complex" about that code?
00:55:53 <dolio> Right, ignorance.
00:55:54 <L29Ah> Axman6: very many functions
00:56:26 <Axman6> they just encode the various uptions that arrays need to be able to do
00:56:49 <Axman6> and you'll see all the definitions are simple, and straight forward
00:56:54 <geekosaur> and I saw an INLINE_FUSED in there so I assume it goes away
00:57:39 kiri1606[m] joins (~kiri1606m@2001:470:69fc:105::2:8ec9)
00:58:03 <EvanR> automagic unboxing? cool
00:58:15 <geekosaur> (although INLINE_FUSED isn't a ghc thing so I assume there's some CPP going on)
00:58:21 <L29Ah> ok i gotta read generated assembly first it seems
00:58:24 mikoto-chan joins (~mikoto-ch@2001:999:688:67e8:7b13:7bf9:475:595a)
00:58:35 <L29Ah> still i see a sus `xor` call at that first link!
00:59:10 <L29Ah> a bit of context: i'm trying to rice up https://github.com/l29ah/hyborg/blob/master/Chunker/BuzHash.hs#L52
00:59:44 <L29Ah> now kinda sad that i didn't write it in C
00:59:48 × levitating quits (~irc@user/levitating) (Ping timeout: 265 seconds)
01:00:04 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
01:00:37 sagax joins (~sagax_nb@user/sagax)
01:03:43 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:03:56 <kenaryn> Thank you Axman6 jackdk yahb2 EvanR :)
01:04:21 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
01:05:45 × xff0x quits (~xff0x@2405:6580:b080:900:2f8c:7144:6283:fa6) (Ping timeout: 250 seconds)
01:06:26 levitating joins (~irc@user/levitating)
01:06:35 <jackdk> Polite of you to thank the bot too ^^
01:06:56 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
01:07:21 <kenaryn> yeah AI will have sooner or later feelings too
01:07:45 <EvanR> %botsnack
01:08:43 <Axman6> @botsnack
01:08:43 <lambdabot> :)
01:10:46 Colere joins (~colere@about/linux/staff/sauvin)
01:10:56 × LoupGris quits (~colere@about/linux/staff/sauvin) (Ping timeout: 265 seconds)
01:11:02 <Axman6> L29Ah: the xor is in there because IArray for Bool is a packed representation, so the Bools are stored as individual bits, you'd expect to see code like that in any language that has a packed array of bits
01:11:41 archsinner joins (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com)
01:12:25 archsinner parts (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com) ()
01:13:09 Furor joins (~colere@about/linux/staff/sauvin)
01:13:13 archsinner joins (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com)
01:13:55 × kenaryn quits (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving)
01:13:57 <ski> EvanR : yea, but not having decidable equality is not the same as not having equality
01:14:19 <dolio> The reals in fact aren't a total order, though.
01:14:29 <dolio> Only a linear order.
01:14:33 <ski> they're a linear order, though
01:14:36 <ski> yea
01:15:53 × Colere quits (~colere@about/linux/staff/sauvin) (Ping timeout: 252 seconds)
01:15:53 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
01:16:07 × archsinner quits (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com) (Quit: archsinner)
01:17:05 <EvanR> what's the difference, wikipedia can't explain it
01:17:14 frost joins (~frost@user/frost)
01:17:26 <dolio> Linear applies to (<)
01:17:36 <EvanR> ok
01:17:58 <ski> linear has comparision/cotransitivity. if `a < c' then `a < b' or `b < c'
01:18:10 <dolio> Yeah.
01:18:33 <ski> but there's no dichotomy (either `a =< b' or `b =< c') nor trichotomy (either `a < b' or `a = b' or `a > b')
01:20:33 <dolio> (<) on the reals is constructively stronger, because it tells you how to separate its arguments. (≤) is defined by negation of (<), I think.
01:20:50 <dolio> Or, if not defined, equivalent.
01:21:27 <ski> yes
01:22:35 ski . o O ( <https://ncatlab.org/nlab/show/linear+order> )
01:24:08 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
01:26:28 <geekosaur> did you mean (≥)?
01:26:29 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
01:26:48 <ski> hm, right
01:26:52 <ski> (or flipping?
01:26:56 <ski> )
01:27:05 <dolio> Yeah, you have to flip the arguments to define ≤.
01:27:41 <ski> and you can define apartness as being either less or greater than
01:28:33 ski . o O ( <https://ncatlab.org/nlab/show/apartness+relation> )
01:28:47 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:f03d:9d14:c4b1:e7e0)
01:33:12 <ski> hm, iirc Pascal has finite subsets of ranges and enumerations, typically implemented as bitvectors
01:33:17 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:f03d:9d14:c4b1:e7e0) (Ping timeout: 244 seconds)
01:35:04 <ski> > complement 0 :: Integer
01:35:06 <lambdabot> -1
01:35:34 <EvanR> that's... correct
01:35:58 <ski> > popCount (-1)
01:36:00 <lambdabot> -1
01:36:07 <EvanR> that's not
01:36:19 <EvanR> population -1
01:36:37 <ski> i think when there's infinitely many `1's, they're counting the number of `0's, and subtracting that from `-1' ?
01:36:52 <ski> > map popCount [-1,-2 ..]
01:36:54 <lambdabot> [-1,-1,-2,-1,-2,-2,-3,-1,-2,-2,-3,-2,-3,-3,-4,-1,-2,-2,-3,-2,-3,-3,-4,-2,-3,...
01:37:30 <ski> > map popCount [0 ..]
01:37:32 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
01:37:32 <EvanR> haha for any finite integer (??) there's an infinite string of zeros or ones off the end
01:38:08 <EvanR> that's imperfect and ad hoc, it should be generalized immediately to arbitrary zeros and ones
01:38:26 <Clinton[m]> What am I doing wrong here with pattern synonyms, or do I need an extension?... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/fd17ec5ff0ce981d1427274d4b9fc9690f9c4cc3>)
01:38:27 <ski> hmm .. seems `popCount (-n)' rather does `- popCount n' ? .. weird
01:38:50 <Clinton[m]> * What am I doing wrong here with pattern synonyms, or do I need an extension (other than `PatternSynonyms` of course)?... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/5e93f79760c908ac49715b3a77c8e3c829b52238>)
01:38:59 <EvanR> > popCount (-5 :: Int)
01:39:01 <lambdabot> 63
01:39:01 <Clinton[m]> * What am I doing wrong here with pattern synonyms, or do I need an extension (other than `PatternSynonyms` of course)?... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/371822ac5679469a90a590e34b67fac4a58fb1b0>)
01:39:17 <ski> EvanR : well, you can't construct those `2'-adic numbers, with ring operations
01:40:01 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
01:41:29 <ski> note that ⌜⋯010101₂ = −½⌝
01:41:33 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
01:42:01 <EvanR> 🤔
01:42:10 × tomku quits (~tomku@user/tomku) (Quit: Lost terminal)
01:42:20 <EvanR> are those your new quotes or what
01:43:17 <dolio> That's the Gödel code quotation.
01:43:47 <ski> well .. Quine quotes
01:43:56 <ski> (that i use for unicode)
01:44:11 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
01:44:21 <EvanR> in what sense is that equality true
01:45:15 nate3 joins (~nate@98.45.169.16)
01:45:22 tomku joins (~tomku@user/tomku)
01:45:27 <ski> er, sorry, that should be ⌜⋯010101₂ = −⅓⌝
01:46:11 <ski> try adding three copies of that binary numeral together, and you'll get ⌜⋯111111₂⌝, which is negative one
01:46:12 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
01:48:23 ProbablyReturnin joins (~ProbablyR@S01069050ca4e3573.cg.shawcable.net)
01:48:55 ProbablyReturnin parts (~ProbablyR@S01069050ca4e3573.cg.shawcable.net) ()
01:49:18 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
01:49:49 <EvanR> gnarly
01:50:42 × tomku quits (~tomku@user/tomku) (Quit: Lost terminal)
01:50:59 ski . o O ( <https://en.wikipedia.org/wiki/P-adic_number#Positional_notation> )
01:52:46 tomku joins (~tomku@user/tomku)
01:54:41 <byorgey> Clinton[m]: I think you just need to get rid of the parentheses around (x :=: y)
01:55:05 × sympt quits (~sympt@user/sympt) (Read error: Connection reset by peer)
01:55:40 <ski> in `2'-adic, you can represent all rationals (as "repeating digits to the left"), except for those (when put in reduced form) whose denominator is divisible by `2'
01:56:33 <ski> (and ditto for `p'-adic, for any prime number `p'. you have digits `{0,1,...,p-1}', as usual for base `p', except that you can repeat infinitely to the left)
01:57:10 sympt joins (~sympt@user/sympt)
01:58:28 <ski> Clinton[m] : hmm .. did you intend to effectively make an existential ?
01:59:19 <ski> (.. since that type doesn't look too useful, to me -- with or without the pattern synonym. but perhaps this is a simplification of what you're really trying)
02:01:37 beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt)
02:03:38 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
02:05:03 <Clinton[m]> ski: `pattern (:==:) x y = Equal x y` works fine I worked out in the end. My example wasn't complete, in the real example in `Equal` (which is actually something different) `a` is not of kind `Type` but instead another kind and `Equal` has a number of constructors which expose the actual type.
02:05:23 <ski> sure, not saying it doesn't work
02:05:40 <ski> just that you couldn't actually do anything with `x' and `y', after matching on the pattern
02:06:21 <ski> hm .. you want to avoid exposing the type representation ?
02:06:51 <Clinton[m]> In my actual code I can, but yes, in the example I agree no I can't.
02:07:02 ski nods
02:08:42 <Clinton[m]> @ski:... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/c92e19c0584fc25777bd17f72a6ddf17bd698a4d>)
02:08:43 <lambdabot> Unknown command, try @list
02:09:44 Cale joins (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com)
02:11:13 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
02:12:01 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
02:13:04 × beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Ping timeout: 268 seconds)
02:13:32 × td_ quits (~td@muedsl-82-207-238-058.citykom.de) (Ping timeout: 260 seconds)
02:14:07 <ski> (fwiw, there's no need / custom to adorn nicknames with sigils (like `@') on IRC. just mention the nick of the person you wish to address, or reference. in case of the former, e.g. starting the message with the name, followed by a comma or colon, and the rest of the message. most IRC clients will highlight/alert the user when their nick is mentioned first think (iow so with no `@' before it) in the message.
02:14:13 <ski> not as many will do it if it occurs otherwhere in the message)
02:14:24 <ski> (`@' also happens to already mean something else, on IRC .. namely channel operator)
02:14:52 <ski> Clinton[m] : ok, a GADT
02:15:01 td_ joins (~td@94.134.91.160)
02:15:07 <ski> indexed by a datakind
02:15:34 ski would probably write `data Alice :: Bob -> * where' (or `Type' in place of `*', if you prefer), there ..
02:15:47 <ski> (.. since the name `a' is of no use there)
02:17:06 <ski> Clinton[m] : .. did you want to make a pattern synonym for the general type Alice a or for one of the specialized ones, Alice 'Integer resp. Alice 'Text ?
02:18:21 <Clinton[m]> Ah, okay, I've just bumped into a separate problem.... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/ac79b8834810e59ba6bf7b3429df6ded4f256b16>)
02:18:28 <Clinton[m]> s///, s///
02:20:03 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:20:03 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:20:03 finn_elija is now known as FinnElija
02:20:04 × mrianbloom quits (uid350277@id-350277.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
02:22:44 <ski> Clinton[m] : you could make a "singleton" type
02:22:59 <ski> data BobIs :: Bob -> *
02:23:01 <ski> where
02:23:18 <ski> IsInteger :: BobIs 'Integer
02:23:28 <ski> IsText :: BobIs 'Text
02:23:34 <ski> and then you could do
02:23:42 <ski> class Chuck (a :: Bob)
02:23:44 <ski> where
02:23:54 <ski> f :: BobIs a -> Alice a
02:23:55 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:f03d:9d14:c4b1:e7e0)
02:24:32 × zebrag quits (~chris@user/zebrag) (Remote host closed the connection)
02:26:09 <ski> (called a "singleton" since, for each particular type `a' of kind `Bob', `BobIs a' has just one (total) value .. so you can pass this value, and pattern-match on it, as an ersatz for not being able to pattern-match on a type (`forall') parameter of kind `Bob')
02:26:27 rockymarine joins (~rocky@user/rockymarine)
02:27:01 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
02:28:50 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
02:29:54 <ski> (whereas, `f :: a -> Alice a' wouldn't work, since the latter `a' has, as you noted, kind `Bob', while the former has to be a concrete type (one which is capable of being inhabited, having values), iow having kind `*' (or being an unboxed type or a few more variants))
02:37:44 Linux is now known as HP-UX
02:41:31 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
02:41:58 <ski> (so .. `f :: BobIs a -> Alice a' here works as a replacement for the proper dependent type (signature) `f :: (a ::) Bob -> Alice a' (or `f :: foreach (a :: Bob) -> Alice a' in Dependent Haskell syntax, iirc))
02:45:01 × mikoto-chan quits (~mikoto-ch@2001:999:688:67e8:7b13:7bf9:475:595a) (Ping timeout: 260 seconds)
02:45:39 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
02:56:11 mikoto-chan joins (~mikoto-ch@2001:999:588:88d8:9998:df71:a0e0:69a1)
03:06:56 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
03:08:34 × vglfr quits (~vglfr@145.224.100.190) (Ping timeout: 268 seconds)
03:08:38 <kiri1606[m]> Hello! I’m trying to understand this piece of code but I’m having a hard time deciphering the last line. `fmap (c:)` followed by `$`…... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/50eb7698d7a55001eb86a802a721b8e35496123c>)
03:09:06 razetime joins (~quassel@117.254.35.71)
03:10:30 <c_wraith> It's followed by <$> , not $
03:11:26 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
03:12:51 <kiri1606[m]> Oops, that’s what I meant! Yeah i don’t understand what that means here. (I know that <$> is functor application, but i can’t seem to make sense of it here)
03:13:12 <kiri1606[m]> * functor application/fmap, but
03:13:22 rockymarine joins (~rocky@user/rockymarine)
03:13:34 <c_wraith> so, it's a nested fmap. Another way to write that would be fmap (fmap (c:)) (...)
03:14:01 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
03:14:03 <ski> or `(fmap . fmap) (c :) (...)'
03:14:11 <c_wraith> so it's applying the function (c:) to a value nested inside two functors
03:14:26 <c_wraith> (c:) just prepends the value c to a list.
03:14:55 <c_wraith> so basically it's "parse the rest of the expected input, then prepend c to the generated input"
03:15:23 <ski> in this case, `fmap . fmap' has type `(String -> String) -> (Maybe (String,String) -> Maybe (String,String))'
03:15:23 <kiri1606[m]> Ah,`(fmap . fmap) (c :) (...)' I’m familiar with this, so it’s basically the equivalent of applying a function that’s embedded 2 layers deep ?
03:15:28 <c_wraith> yes
03:15:38 <ski> the outer functor is `Maybe', the inner is `(String,)'
03:17:10 <ski> (so the `String' that's "changed" by `(c :) :: String -> String' here is the second component of the pair .. which is the monadic result, for `Parser'. the first `String' is the remainder of the token (`Char') stream)
03:17:49 <kiri1606[m]> Thanks c_wraith ski! It makes sense now. I was a bit confused as i wasn’t sure of the « precedence », like… i thought that <$> was an argument passed to the first fmap
03:17:50 <ski> btw, there is no need to say `(c:cs) -> ...', it could just say `c:cs -> ...'
03:18:02 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
03:18:03 <kiri1606[m]> Gotcha
03:18:16 <c_wraith> kiri1606[m]: ah. for reference, infix operators are always lower precedence than prefix function application
03:18:17 <ski> yea, function application binds tighter than infix operators
03:18:33 ski low fours c_wraith
03:18:47 <kiri1606[m]> Thanks! That’s a useful tip to keep at the back of my head
03:18:58 <DigitalKiwi> i like parens though (aesthetically, so not lisp lol)
03:19:33 <kiri1606[m]> * a function on something that’s embedded
03:19:33 <ski> (record construction&update binds tigher, though ! .. as do `!',`~',`@' in patterns. and `@' (meaning something else) in expressions)
03:24:39 × zmt01 quits (~zmt00@user/zmt00) (Read error: Connection reset by peer)
03:25:47 zmt00 joins (~zmt00@user/zmt00)
03:25:51 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
03:26:38 × tomku quits (~tomku@user/tomku) (Quit: Lost terminal)
03:27:14 × razetime quits (~quassel@117.254.35.71) (Ping timeout: 265 seconds)
03:28:53 tomku joins (~tomku@user/tomku)
03:29:47 rockymarine joins (~rocky@user/rockymarine)
03:30:56 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
03:34:23 × mcglk quits (~mcglk@131.191.49.120) (Ping timeout: 250 seconds)
03:35:13 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
03:35:26 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
03:36:39 mcglk joins (~mcglk@131.191.49.120)
03:36:42 vglfr joins (~vglfr@145.224.100.164)
03:36:49 king_gs joins (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5)
03:36:56 × king_gs quits (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5) (Client Quit)
03:42:19 × mikoto-chan quits (~mikoto-ch@2001:999:588:88d8:9998:df71:a0e0:69a1) (Ping timeout: 246 seconds)
03:44:24 mikoto-chan joins (~mikoto-ch@2001:999:589:2115:1305:6aca:b6bf:af91)
03:46:11 × Vajb quits (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
03:47:00 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
03:47:39 rockymarine joins (~rocky@user/rockymarine)
03:50:51 × mikoto-chan quits (~mikoto-ch@2001:999:589:2115:1305:6aca:b6bf:af91) (Ping timeout: 250 seconds)
03:51:04 nate3 joins (~nate@98.45.169.16)
03:57:27 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds)
04:03:35 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
04:04:08 Vajb joins (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
04:06:38 razetime joins (~quassel@117.254.35.71)
04:10:09 nate3 joins (~nate@98.45.169.16)
04:15:05 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
04:32:27 × jargon quits (~jargon@184.101.88.60) (Remote host closed the connection)
04:32:57 fef joins (~thedawn@user/thedawn)
04:36:57 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
04:41:11 × darkstardevx quits (~darkstard@192.183.207.94) (Ping timeout: 265 seconds)
04:53:21 darkstardevx joins (~darkstard@192.183.207.94)
04:54:58 × darkstardevx quits (~darkstard@192.183.207.94) (Remote host closed the connection)
04:55:22 darkstardevx joins (~darkstard@192.183.207.94)
04:59:11 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
05:09:30 nate3 joins (~nate@98.45.169.16)
05:13:28 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
05:14:59 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
05:19:11 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
05:20:20 chomwitt joins (~chomwitt@2a02:587:dc14:f500:3759:458b:6e75:9dca)
05:30:15 Furor is now known as LoupGris
05:32:38 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:36:49 × tmiller quits (~tmiller@199.241.26.152) (Quit: WeeChat 3.6)
05:49:39 michalz joins (~michalz@185.246.207.221)
05:53:44 × landonf quits (landonf@mac68k.info) (Quit: ZNC - http://znc.sourceforge.net)
05:55:14 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 244 seconds)
05:59:47 nate3 joins (~nate@98.45.169.16)
06:01:14 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
06:04:27 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
06:04:45 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 250 seconds)
06:13:51 <Axman6> Anyone know what the unsafeCoerce# is doing in https://hackage.haskell.org/package/array-0.5.4.0/docs/src/Data.Array.Base.html#thawSTUArray?
06:16:18 <Axman6> oh it's converting an IO call into an ST one
06:16:48 <Axman6> unsafeCoerce# :: (State# RealWorld -> (# State# RealWorld, Ptr Any #)) -> State# s -> (# State# s, Any #)
06:20:13 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
06:23:18 king_gs joins (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5)
06:24:31 × king_gs quits (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5) (Client Quit)
06:24:35 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 248 seconds)
06:31:04 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
06:34:30 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 244 seconds)
06:36:06 acidjnk_new joins (~acidjnk@p200300d6e7137a84319f91f8881062b6.dip0.t-ipconnect.de)
06:38:38 ellensol joins (~ellen@ua-84-216-129-63.bbcust.telenor.se)
06:39:46 gmg joins (~user@user/gehmehgeh)
06:42:56 × joeyh quits (joeyh@2600:3c03::f03c:91ff:fe73:b0d2) (Ping timeout: 255 seconds)
06:45:06 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
06:45:58 × ft quits (~ft@p3e9bc57b.dip0.t-ipconnect.de) (Quit: leaving)
06:49:26 rockymarine joins (~rocky@user/rockymarine)
06:52:44 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
06:54:39 × glguy quits (~glguy@libera/staff-emeritus/glguy) (Ping timeout: 244 seconds)
06:55:39 mncheck joins (~mncheck@193.224.205.254)
06:57:08 glguy joins (~glguy@libera/staff-emeritus/glguy)
06:59:12 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
07:02:03 lortabac joins (~lortabac@2a01:e0a:541:b8f0:255f:4d0:bef0:41ba)
07:02:55 × glguy quits (~glguy@libera/staff-emeritus/glguy) (Ping timeout: 244 seconds)
07:04:02 rockymarine joins (~rocky@user/rockymarine)
07:04:24 cfricke joins (~cfricke@user/cfricke)
07:05:13 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
07:06:21 MajorBiscuit joins (~MajorBisc@c-001-026-007.client.tudelft.eduvpn.nl)
07:10:02 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
07:11:53 king_gs joins (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5)
07:13:12 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
07:14:15 × king_gs quits (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5) (Client Quit)
07:15:53 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
07:18:45 × ellensol quits (~ellen@ua-84-216-129-63.bbcust.telenor.se) (Read error: Connection reset by peer)
07:22:08 glguy joins (~glguy@libera/staff-emeritus/glguy)
07:24:24 × acidjnk_new quits (~acidjnk@p200300d6e7137a84319f91f8881062b6.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
07:27:18 acidjnk_new joins (~acidjnk@p200300d6e7137a84319f91f8881062b6.dip0.t-ipconnect.de)
07:32:25 nate3 joins (~nate@98.45.169.16)
07:34:16 <maerwald> wow... ghci core dumps on alpine 3.15
07:36:27 × tcard_ quits (~tcard@p696070-ipngn8501hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
07:36:42 mixfix41 joins (~sdeny9ee@user/mixfix41)
07:37:13 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
07:39:41 nschoe joins (~quassel@141.101.51.197)
07:42:55 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 265 seconds)
07:42:57 tcard joins (~tcard@p696070-ipngn8501hodogaya.kanagawa.ocn.ne.jp)
07:44:20 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
07:46:17 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
07:47:42 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
07:49:51 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
07:51:31 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 248 seconds)
07:52:03 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 248 seconds)
07:52:18 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
07:53:04 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
07:56:10 waldo joins (~waldo@user/waldo)
07:57:29 kenran joins (~user@user/kenran)
07:58:02 akegalj joins (~akegalj@93-139-186-42.adsl.net.t-com.hr)
07:58:34 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:00:22 × k8yun quits (~k8yun@user/k8yun) (Quit: Leaving)
08:03:37 × razetime quits (~quassel@117.254.35.71) (Ping timeout: 252 seconds)
08:08:10 titibandit joins (~titibandi@xdsl-212-8-150-57.nc.de)
08:08:21 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
08:09:45 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
08:11:12 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
08:15:37 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 250 seconds)
08:16:19 <kenran> okay, another day, another (last) try to manhandle the named pipes problem I had yesterday :D I could just go the domain socket route instead, but I _need_ to know whether I'm just making mistakes or there could really be an OS bug involved somewhere.
08:16:44 <[exa]> kenran: what's the issue?
08:17:37 <[exa]> btw y u no domain sockets?
08:20:57 razetime joins (~quassel@117.254.35.71)
08:28:49 <probie> kenran: how are you reading from the named pipes? Off memory things like Data.ByteString.readFile don't work
08:29:22 × hsw__ quits (~hsw@112-104-87-196.adsl.dynamic.seed.net.tw) (Quit: Leaving)
08:29:37 hsw joins (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net)
08:32:10 <dr_merijn> probie: Well, it does, just, like, probably not what you'd expect if you don't know what's happening underneath :p
08:34:13 × frost quits (~frost@user/frost) (Quit: Client closed)
08:34:55 × kenran quits (~user@user/kenran) (Remote host closed the connection)
08:34:59 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:f03d:9d14:c4b1:e7e0) (Remote host closed the connection)
08:35:24 kenran joins (~user@user/kenran)
08:35:53 kuribas joins (~user@ptr-17d51emgkkoi3ymbxyx.18120a2.ip6.access.telenet.be)
08:44:21 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
08:46:13 × mixfix41 quits (~sdeny9ee@user/mixfix41) (Ping timeout: 265 seconds)
08:46:38 × califax quits (~califax@user/califx) (Remote host closed the connection)
08:48:20 califax joins (~califax@user/califx)
08:52:02 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
08:52:56 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
08:57:24 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 264 seconds)
08:57:24 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 264 seconds)
08:58:47 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
09:00:15 × steve[m]1 quits (~stevetrou@2001:470:69fc:105::e0b) (Quit: You have been kicked for being idle)
09:14:11 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
09:22:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:23:02 zaquest joins (~notzaques@5.130.79.72)
09:25:21 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 268 seconds)
09:26:45 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
09:27:58 wonko joins (~wjc@2a0e:1c80:11::50)
09:28:13 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
09:31:36 × razetime quits (~quassel@117.254.35.71) (Ping timeout: 260 seconds)
09:31:42 razetime_ joins (~quassel@117.254.35.71)
09:32:38 CiaoSen joins (~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
09:35:28 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:f03d:9d14:c4b1:e7e0)
09:37:34 × wonko quits (~wjc@2a0e:1c80:11::50) (Ping timeout: 246 seconds)
09:39:00 wonko joins (~wjc@2a0e:1c80:11::50)
09:39:59 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:f03d:9d14:c4b1:e7e0) (Ping timeout: 244 seconds)
09:46:28 × wonko quits (~wjc@2a0e:1c80:11::50) (Changing host)
09:46:28 wonko joins (~wjc@user/wonko)
09:46:38 × nschoe quits (~quassel@141.101.51.197) (Ping timeout: 265 seconds)
09:52:23 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 244 seconds)
09:59:31 × wonko quits (~wjc@user/wonko) (Ping timeout: 248 seconds)
09:59:54 wonko joins (~wjc@2a0e:1c80:11::50)
10:00:02 acidjnk joins (~acidjnk@p200300d6e7137a8424c1978e90463b18.dip0.t-ipconnect.de)
10:00:29 × waldo quits (~waldo@user/waldo) (Ping timeout: 250 seconds)
10:01:09 nate3 joins (~nate@98.45.169.16)
10:01:40 × acidjnk_new quits (~acidjnk@p200300d6e7137a84319f91f8881062b6.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
10:01:41 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Quit: WeeChat 3.6)
10:02:06 × hpc quits (~juzz@ip98-169-32-242.dc.dc.cox.net) (Ping timeout: 265 seconds)
10:02:40 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
10:03:34 hpc joins (~juzz@ip98-169-32-242.dc.dc.cox.net)
10:05:59 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
10:06:36 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
10:10:07 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
10:12:30 luffy joins (~chenqisu1@183.217.201.220)
10:13:38 __monty__ joins (~toonn@user/toonn)
10:26:05 DavidBinder joins (~DavidBind@134.2.10.18)
10:27:44 waldo joins (~waldo@user/waldo)
10:28:51 × CiaoSen quits (~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
10:30:50 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
10:33:10 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
10:33:13 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 246 seconds)
10:34:00 × luffy quits (~chenqisu1@183.217.201.220) (Ping timeout: 265 seconds)
10:35:12 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
10:35:23 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
10:36:54 × fef quits (~thedawn@user/thedawn) (Ping timeout: 258 seconds)
10:37:52 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 244 seconds)
10:42:21 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
10:42:46 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
10:43:41 <dminuoso> Given an UDP protocol where a single protocol data unit will never exceed a single UDP segment, is there any real benefit to using `binary` over just a handwritten Get/Put that work on a static single bytestring?
10:44:58 CiaoSen joins (~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
10:45:04 <dminuoso> The more I think about it, the only reason for its existence is to work with lazy bytestrings
10:45:25 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
10:45:34 gmg joins (~user@user/gehmehgeh)
10:48:38 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
10:49:40 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 246 seconds)
10:53:10 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 246 seconds)
10:57:15 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
10:59:12 × wonko quits (~wjc@2a0e:1c80:11::50) (Ping timeout: 264 seconds)
11:01:37 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 244 seconds)
11:02:02 × Midjak quits (~Midjak@82.66.147.146) (Ping timeout: 265 seconds)
11:02:30 Pickchea joins (~private@user/pickchea)
11:04:34 xff0x joins (~xff0x@2405:6580:b080:900:b7c1:3130:710b:2a7f)
11:04:58 waleee joins (~waleee@192.165.44.49)
11:09:10 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
11:09:59 Lycurgus joins (~juan@user/Lycurgus)
11:10:20 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
11:14:33 × talismanick quits (~talismani@2601:200:c100:c9e0::24ac) (Ping timeout: 244 seconds)
11:14:58 <jackdk> I don't like `binary` because it has some dicey instances for Double: https://github.com/kolmodin/binary/issues/69
11:15:06 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
11:15:45 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 252 seconds)
11:17:19 × mncheck quits (~mncheck@193.224.205.254) (Write error: Connection reset by peer)
11:17:57 <dr_merijn> binary the package is great
11:18:01 <dr_merijn> Binary the class is trash
11:18:25 <dr_merijn> You should never use the Binary class for anything but throwaway prototypes and even *then*
11:19:12 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
11:19:34 <dminuoso> Fair, I think Ill roll my own eventually though. There's just nothing in `binary` I care about, its just an extra dependency.
11:19:44 <dr_merijn> The Binary class introduces it's own (non-futureproof) custom padding/tagging scheme which means you can't use it for data you intend to parse outside Haskell anyway, and for data parsed by Haskell it's bad if you ever intend to read old data
11:19:56 <dr_merijn> You should always just use explicit Get/Put
11:20:08 <dr_merijn> (for stuff you care about, anyway)
11:20:09 <dminuoso> Sure, I mean Im using non-classes with it right now
11:20:57 <dr_merijn> dminuoso: That was mostly wrt to jackdk's comments
11:20:57 <dminuoso> Unrelatedly, for a datatype of unary constructors, is there a way to get the boxed value out as a Dynamic?
11:21:01 <dminuoso> dr_merijn: Ah fair enough.
11:21:18 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Remote host closed the connection)
11:21:32 <dr_merijn> The Double issues are only for the Binary class, getDoublebe etc. all just do "what you'd expect"
11:21:40 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
11:22:33 <dminuoso> Given that Im doing protocol decoding, Im checking their internal behavior irrespetive of my expectations. :P
11:23:37 <dr_merijn> dminuoso: getDouble/getFloat just use the standard 4/8 byte IEEE-754 encoding
11:23:46 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
11:23:50 <dr_merijn> Which is the obvious sensible thing to do
11:24:20 <dminuoso> yeah I read the bug report, its a bit weird
11:25:17 <dminuoso> Speaking of things that are annoying and wrong, these belong right in there:
11:25:22 <dminuoso> attoparsec: decimal :: Integral a => Parser a
11:25:29 <dminuoso> megaparsec: decimal :: forall e s m a . (MonadParsec e s m, Token s ~ Word8, Num a) => m a
11:26:16 <dminuoso> These should in addition deserve a Bounded constraint.
11:26:31 × acidjnk quits (~acidjnk@p200300d6e7137a8424c1978e90463b18.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
11:27:22 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
11:29:34 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
11:33:36 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
11:38:17 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
11:40:06 ft joins (~ft@p3e9bc57b.dip0.t-ipconnect.de)
11:43:58 lyle joins (~lyle@104.246.145.85)
11:44:08 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
11:46:58 acidjnk joins (~acidjnk@p200300d6e7137a84917195bd27e414df.dip0.t-ipconnect.de)
11:49:19 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
11:51:30 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 268 seconds)
11:53:02 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
11:56:21 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
11:58:36 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 264 seconds)
12:00:14 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
12:01:50 notzmv joins (~zmv@user/notzmv)
12:01:59 faultline joins (~christian@200116b82b18a100216c022468c65178.dip.versatel-1u1.de)
12:03:24 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 264 seconds)
12:05:01 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
12:06:00 × faultline quits (~christian@200116b82b18a100216c022468c65178.dip.versatel-1u1.de) (Remote host closed the connection)
12:10:18 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
12:11:52 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
12:13:34 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
12:17:53 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
12:19:57 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:20:08 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
12:24:41 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
12:29:02 <dr_merijn> Athas: Doing the lord's work with that XDG support, so I don't have to but can still make my config portable across environments :>
12:32:12 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 264 seconds)
12:35:41 yvan-sraka joins (~yvan-srak@37.173.255.198)
12:37:09 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 252 seconds)
12:37:19 wonko joins (~wjc@2a0e:1c80:11::50)
12:39:39 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
12:40:01 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Ping timeout: 260 seconds)
12:41:34 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
12:42:15 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
12:43:15 × wonko quits (~wjc@2a0e:1c80:11::50) (Ping timeout: 268 seconds)
12:43:42 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
12:43:46 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 246 seconds)
12:49:10 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
12:51:04 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 258 seconds)
12:52:13 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
12:53:23 ec joins (~ec@gateway/tor-sasl/ec)
12:53:44 gmg joins (~user@user/gehmehgeh)
12:54:39 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
12:55:10 × yvan-sraka quits (~yvan-srak@37.173.255.198) (Ping timeout: 252 seconds)
13:00:27 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
13:02:03 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 250 seconds)
13:02:38 joeyh joins (~joeyh@kitenet.net)
13:07:10 × califax quits (~califax@user/califx) (Read error: Connection reset by peer)
13:07:10 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
13:07:10 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
13:07:35 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
13:08:19 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
13:09:26 califax joins (~califax@user/califx)
13:09:44 Sose joins (~sose@mobile-access-567367-206.dhcp.inet.fi)
13:10:43 gmg joins (~user@user/gehmehgeh)
13:14:09 × Sose quits (~sose@mobile-access-567367-206.dhcp.inet.fi) (Client Quit)
13:14:27 × califax quits (~califax@user/califx) (Ping timeout: 258 seconds)
13:14:30 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
13:16:24 expipiplus1 joins (~expipiplu@2001:470:69fc:105::d713)
13:17:32 califax joins (~califax@user/califx)
13:18:34 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
13:18:57 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
13:23:23 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 268 seconds)
13:25:34 × akegalj quits (~akegalj@93-139-186-42.adsl.net.t-com.hr) (Quit: leaving)
13:28:59 zebrag joins (~chris@user/zebrag)
13:29:07 × kuribas quits (~user@ptr-17d51emgkkoi3ymbxyx.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
13:29:23 yvan-sraka joins (~yvan-srak@37.173.255.198)
13:31:38 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
13:32:48 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
13:33:32 ChaiTRex joins (~ChaiTRex@user/chaitrex)
13:36:14 × razetime_ quits (~quassel@117.254.35.71) (Ping timeout: 265 seconds)
13:36:36 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:255f:4d0:bef0:41ba) (Quit: WeeChat 2.8)
13:39:11 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
13:41:42 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
13:43:37 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Ping timeout: 246 seconds)
13:44:21 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
13:47:02 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
13:50:25 razetime joins (~quassel@117.254.35.71)
13:50:36 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 260 seconds)
13:54:22 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
13:54:22 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
13:54:22 wroathe joins (~wroathe@user/wroathe)
13:59:56 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
14:00:42 xd1le joins (~xd1le@user/xd1le)
14:01:10 ellensol joins (~ellen@ua-84-216-129-63.bbcust.telenor.se)
14:01:38 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.6)
14:02:13 xd1le parts (~xd1le@user/xd1le) ()
14:02:40 nate3 joins (~nate@98.45.169.16)
14:04:00 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
14:04:18 × ellensol quits (~ellen@ua-84-216-129-63.bbcust.telenor.se) (Read error: Connection reset by peer)
14:06:21 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
14:06:35 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 244 seconds)
14:06:41 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
14:07:12 <ozkutuk> Is there any tutorial/guide on how to use SYB? I could only find this 2003 paper, but I don't if it's even relevant anymore
14:07:40 × califax quits (~califax@user/califx) (Remote host closed the connection)
14:07:47 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
14:07:56 × yvan-sraka quits (~yvan-srak@37.173.255.198) (Remote host closed the connection)
14:10:21 <davean> ozkutuk: A paper is the expression of the idea. If its not relevant anymore than SYB isn't relevant anymore.
14:11:02 califax joins (~califax@user/califx)
14:11:24 <davean> That doesn't mean the code in the paper ever matches the code in the package, because papers try to focus on the core of the idea, not the details of a particular implimentation
14:11:34 <davean> Those details fall inside the realm of just programming though.
14:15:45 × califax quits (~califax@user/califx) (Remote host closed the connection)
14:18:13 <ChaiTRex> Does anyone know what terminal line editing library GHCi uses for letting people edit while composing a line to be evaluated?
14:18:25 <ozkutuk> davean: Well, yes, I certainly do find papers valuable in that regard. It is just that I am looking for a more "practical" material, for the lack of a better term
14:18:55 califax joins (~califax@user/califx)
14:19:00 <davean> The paper should allow you to produce your own implimentation, if you can produce your own implimentation using an existing one should be trivial.
14:19:42 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
14:19:49 shriekingnoise joins (~shrieking@186.137.167.202)
14:19:52 <dr_merijn> ChaiTRex: ghci uses haskeline
14:19:53 gustik joins (~gustik@2a01:c844:2457:2220:475d:34f:d571:996f)
14:20:08 <dr_merijn> @hackage haskeline
14:20:09 <lambdabot> https://hackage.haskell.org/package/haskeline
14:20:21 <ChaiTRex> dr_merijn: Thanks.
14:20:41 <dr_merijn> ChaiTRex: It's pretty easy to use, I managed to implemented something with interactive database-based auto completion
14:20:44 <dr_merijn> Pretty neat
14:23:04 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
14:24:14 <ozkutuk> davean: Right. Either way reading the paper is probably a good idea, I think I'll do that. Thanks
14:24:29 <ChaiTRex> dr_merijn: I found that using ANSI escape sequences messed up the line editor's idea of where the cursor was on the screen relative to the characters it inserted. Searched GitHub and found that it needs \STX after each ANSI sequence.
14:25:37 <geekosaur> are you on an M1/M2 Mac by any chance?
14:27:17 <EvanR> haskell line has 3 l's and haskeline lost two of them?
14:27:28 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 265 seconds)
14:27:54 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
14:28:15 <ChaiTRex> geekosaur: If you mean me, no, I'm on Ubuntu.
14:29:02 <geekosaur> interesting. haskeline has generally worked for me on various platforms, but has a bug in M1/M2 macs because of a mis-declared FFI call
14:29:23 <geekosaur> whoch leads among other things to corrupted lines
14:31:27 Guest60 joins (~Guest60@2400:1a00:b011:ad4b:5555:45e3:e613:a20f)
14:31:33 <ChaiTRex> This was due to haskeline's claim that it can't detect the end of ANSI escape sequences (presumably it would be a lot of work to include all of the details), and so \STX is used as the indication that one just ended. My colorful GHCi prompt finally works.
14:32:21 <ChaiTRex> https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt
14:33:17 <geekosaur> oh, that kind of problem, not general issues
14:33:24 <geekosaur> that makes more sense
14:33:46 <geekosaur> although I'd expect it to be able to detect escape sequences reliably, ANSI sequences are very structured
14:34:13 <geekosaur> (when I started out I worked with a lot of pre-ANSI terminals, those sucked a lot)
14:34:55 <Guest60> Hi all, is it possible to create list from my algebraic data types?
14:34:56 <Guest60> Example:
14:34:57 <Guest60> data MakeMeAList = One | Two | Three | Four | Five
14:34:57 <Guest60> listMaker :: [MakeMeAList]
14:34:58 <Guest60> listMaker =
14:34:58 <Guest60>     -- ????
14:36:14 <geekosaur> derive Enum and Bounded and use [minBound .. maxBound]
14:36:15 × xstill_ quits (xstill@fimu/xstill) (Quit: Ping timeout (120 seconds))
14:36:20 <ChaiTRex> Guest60: Yes, you can just write something like `[One, Two, Five, Three]`.
14:36:52 <geekosaur> @let data MakeMeAList = One | Two | Three | Four | Five deriving (Enum, Bounded)
14:36:54 <lambdabot> Defined.
14:37:10 × CiaoSen quits (~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
14:37:15 <geekosaur> > [minBound .. maxBound :: MakeMeAList]
14:37:16 <lambdabot> error:
14:37:16 <lambdabot> • No instance for (Show MakeMeAList)
14:37:16 <lambdabot> arising from a use of ‘show_M71299666854855747388’
14:37:25 <geekosaur> @let data MakeMeAList = One | Two | Three | Four | Five deriving (Enum, Bounded, Show)
14:37:26 <lambdabot> /sandbox/tmp/.L.hs:202:1: error:
14:37:26 <lambdabot> Multiple declarations of ‘MakeMeAList’
14:37:26 <lambdabot> Declared at: /sandbox/tmp/.L.hs:195:1
14:37:30 <geekosaur> @undefine
14:37:30 <lambdabot> Undefined.
14:37:33 <geekosaur> @let data MakeMeAList = One | Two | Three | Four | Five deriving (Enum, Bounded, Show)
14:37:34 <lambdabot> Defined.
14:37:36 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 265 seconds)
14:37:37 <geekosaur> > [minBound .. maxBound :: MakeMeAList]
14:37:39 <lambdabot> [One,Two,Three,Four,Five]
14:37:52 xstill_ joins (xstill@fimu/xstill)
14:38:20 <EvanR> \o/
14:39:22 <Guest60> ChaiTRex if do that then, i'll have to update my list maker everytime i update `MakeMeAList` which im trying to avoid.
14:39:40 <ChaiTRex> What is the function supposed to return?
14:39:58 <Guest60> geekosaur thanks a lot, it helped
14:40:31 × FragByte quits (~christian@user/fragbyte) (Quit: Quit)
14:40:42 <Guest60> ChaiTRex i want it to return list of `MakeMeAList`, eg `listMaker :: [MakeMeAList]`
14:41:17 <geekosaur> "list of" doesn't actually help much. "a list of all" would be what I did, but "list if" covers a lot of possibilities
14:42:30 FragByte joins (~christian@user/fragbyte)
14:43:53 × waleee quits (~waleee@192.165.44.49) (Ping timeout: 265 seconds)
14:44:52 <Guest60> Forgive my wrong usage of terms, im coming from imperative world and getting my feet wet in haskell for the first time.
14:44:53 <Guest60> Yes list of all elements of `MakeMeAList` type. geekosaur
14:46:16 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
14:46:28 × kenran quits (~user@user/kenran) (Remote host closed the connection)
14:46:46 jakalx joins (~jakalx@base.jakalx.net)
14:46:59 <EvanR> to a first approximation, data types are nouns while functions are verbs. Since classes tend to be NounVerbers it can be tough to disentangle. But these all have counterexamples, YMMV
14:47:38 <ski> (fwiw, functional vs. imperative doesn't factor into that. people in imperative world would have just as much trouble trying to figure out which elements you wanted in your list)
14:48:10 Midjak joins (~Midjak@82.66.147.146)
14:48:43 <geekosaur> right, it was just an unclear question. I assumed froim the `MakeMeAList` that you wanted a list of all values, but could easily have been wrong
14:51:25 <EvanR> data NumbersFive = One | Two | Three | Four | Five deriving (Enum, Bounded, Show)
14:51:47 <ski> various different approaches to (or info on) generic programming (in rough order of appearance, iirc) :
14:51:53 <ski> Patrik Jansson's page : <https://www.cse.chalmers.se/~patrikj/poly/>
14:51:59 <ski> Scrap Your Boilerplate (SYB) : <https://hackage.haskell.org/package/syb>,<https://wiki.haskell.org/Scrap_your_boilerplate>,<https://wiki.haskell.org/Applications_and_libraries/Generic_programming/SyB>
14:52:09 <ski> `GHC.Generics' : <https://wiki.haskell.org/GHC.Generics>,<https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/generics.html>
14:52:15 <ski> Compositional Data Types (compdata) : <https://hackage.haskell.org/package/compdata>
14:52:22 <ski> Compos (almost compositional functions over recursive data types) : <https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.233.3357>
14:52:35 <ski> Uniplate :
14:52:35 <ski> <https://hackage.haskell.org/package/uniplate>,<https://wiki.haskell.org/Uniplate>,<https://web.archive.org/web/20180702150456/http://community.haskell.org/~ndm/uniplate/>,<https://www.cs.york.ac.uk/fp/darcs/uniplate/uniplate.htm>,<https://www.cs.york.ac.uk/fp/haddock/uniplate/>,<http://neilmitchell.blogspot.com/2007/06/boilerplate-considered-harmful-uniplate.html>,<https://ndmitchell.com/>,<https://hackage.h
14:52:41 <ski> askell.org/package/lens-4.15.4/docs/Control-Lens-Plated.html>
14:52:42 <ski> ozkutuk ^
14:52:45 <ski> Multiplate : <https://hackage.haskell.org/package/multiplate>,<https://wiki.haskell.org/Multiplate>
14:53:03 <ski> (hm, maybe `GHC.Generics' was a bit later ..)
14:55:03 <EvanR> makeMeAllList = [minBound .. maxBound] but since this isn't actually a function could just be called
14:55:10 <EvanR> allTheThings = [minBound .. maxBound]
14:55:37 <ski> (sometimes called `universe' or `finiteUniverse', i think)
14:56:12 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
14:59:15 <EvanR> I guess the haskell equivalent of a noun verber is a module
14:59:45 <EvanR> or maybe a thread
15:00:21 <davean> I've lost the analogy
15:00:53 <EvanR> anti analogy of what tense to use for naming things
15:00:56 <davean> I mean a datatype is a calculation?
15:01:10 <davean> unless by verb you mean externally visible actions?
15:01:20 <davean> I'm so lost
15:01:21 <EvanR> grammar
15:01:29 <EvanR> MakeMeAList
15:01:46 <EvanR> seems especially odd
15:01:48 <davean> type MakeMeAList a = [a]
15:02:05 <EvanR> it's just a style question, obviously you could put anything
15:02:20 <EvanR> oh yeah, a data type can be a type function lol
15:02:47 <davean> Sorta, if you want it to actually match a function would have to leave a space in the grammar for a parameter to say which list to make
15:03:02 <davean> and the reference to the list is the actual MakeMeAList unqualified
15:03:14 <davean> hence it sorta having to be data type? But thats an action its self.
15:03:28 <davean> you can setup making the list or make the list
15:03:28 <EvanR> well they just wanted to an actual list
15:03:34 <EvanR> not a type
15:03:55 <davean> Sure, its just that ... well, at the end of the day thats a calculation too?
15:04:09 <Guest60> yeah, english is not my first language :)
15:04:47 <EvanR> in some metaphysics somewhere I'm sure a rock sitting inanimate on the desert floor is a calculation
15:04:47 ellensol joins (~ellen@emp-95-224.eduroam.uu.se)
15:06:47 Sgeo joins (~Sgeo@user/sgeo)
15:06:50 <EvanR> calculus originally "pebble used as a reckoning counter" (rockoning?) I've gone down a rabbit hole now
15:12:16 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
15:12:46 mrianbloom joins (uid350277@id-350277.ilkley.irccloud.com)
15:12:52 × ellensol quits (~ellen@emp-95-224.eduroam.uu.se) (Ping timeout: 260 seconds)
15:13:01 <mrianbloom> If the incoherent instances extension is deprecated, what replaced it?
15:13:51 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
15:14:10 <mrianbloom> Or can you just use the pragmas without any extension enabled?
15:14:48 <ski> wasn't Demosthenes (rhetorician) said to have put pebbles in his mouth, while standing by the sea, trying to talk louder than it, in order to improve upon his stuttering and general bad talking skills ?
15:15:39 <geekosaur> the extension wasn't granular enough so you just use the pragmas instead
15:15:45 <geekosaur> they're not controlled by the extension
15:16:08 jakalx joins (~jakalx@base.jakalx.net)
15:16:27 <mrianbloom> I see. And in general do you just make your most general instance {-# INCOHERENT #-}?
15:16:27 <geekosaur> (pragmas are by definition extensions)
15:16:50 shapr joins (~user@68.54.166.125)
15:17:18 <geekosaur> that I wouldn't tell you; I generally try to avoid needing those pragmas in the first place
15:17:37 <c_wraith> No. why would I do that to myself? Incoherent instances are well named. They make your program incoherent.
15:17:53 <ski> <https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/instances.html#instance-overlap> doesn't seem to have an incoherent pragma example (nor <https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/pragmas.html#overlapping-overlappable-overlaps-and-incoherent-pragmas>)
15:18:07 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
15:20:00 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
15:20:03 <mrianbloom> I see, I'm using Data.Comp.Multi so I think it's unavoidable if I want the other functionality.
15:22:36 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 264 seconds)
15:26:40 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
15:27:09 × Guest60 quits (~Guest60@2400:1a00:b011:ad4b:5555:45e3:e613:a20f) (Quit: Client closed)
15:34:33 × califax quits (~califax@user/califx) (Remote host closed the connection)
15:35:35 <davean> mrianbloom: I have no clue about that myself, but why do you think that vs. overlapping or undecidable?
15:35:54 <davean> Why do you specificly think 2 could apply at the same time?
15:36:13 <davean> even when you can have a priority system to select between them
15:36:22 <davean> or what would prevent that priority system?
15:37:55 califax joins (~califax@user/califx)
15:45:01 rockymarine joins (~rocky@user/rockymarine)
15:47:39 × waldo quits (~waldo@user/waldo) (Quit: quit)
15:48:10 × califax quits (~califax@user/califx) (Ping timeout: 258 seconds)
15:51:31 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
15:52:19 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Remote host closed the connection)
15:53:09 kenran joins (~user@user/kenran)
15:59:11 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
16:00:06 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
16:01:04 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
16:05:18 califax joins (~califax@user/califx)
16:05:51 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
16:06:10 × DavidBinder quits (~DavidBind@134.2.10.18) (Quit: Leaving)
16:13:56 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Quit: Leaving)
16:20:36 jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
16:21:11 × euandreh quits (~euandreh@179.214.113.107) (Ping timeout: 252 seconds)
16:21:32 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
16:27:25 Everything joins (~Everythin@37.115.210.35)
16:34:10 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
16:36:18 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
16:37:35 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
16:38:29 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
16:41:38 waldo joins (~waldo@user/waldo)
16:44:51 <dminuoso> Incoherent instances are, for the most part, rather horrible and not something the average user would ever enable.
16:45:32 <dminuoso> I'm sure there's some highly exotic place for them, but for mortal Haskellers enabling IncoherentInstances is not a good idea.
16:49:10 × MajorBiscuit quits (~MajorBisc@c-001-026-007.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.5)
16:50:22 <davean> dminuoso: well, there are restrictions on overlapping and if the incoherent instances produce the exact same computation you're fine
16:50:31 <davean> which can resolve some non-termiantion issues
16:50:38 <davean> I just don't know why mrianbloom would need them for that
16:51:52 <c_wraith> probably trying to write instances for "everything else", which is... generally a bad idea. Better to just require types to opt in to a default implementation.
16:52:07 <dminuoso> davean: If you are in a problem domain where you would need this, it's more than likely they wouldn't ask such a question. It seems more likely they are using it for lack of better knowledge.
16:53:41 <davean> dminuoso: that was my point
16:53:57 <davean> well they referenced something specific
16:54:19 <davean> it might be something in the domain that actually does need it. I have inclings on why that might be an "everything else" situation
16:54:32 <dminuoso> Unrelated question: Say I have a kind of box type full with unary type constructors (wrapping various types like Word8, Int8, Text). Is there a boilerplate-free mechanism to get the contained value out as a Dynamic?
16:55:46 <c_wraith> You could probably use like Data.Data
16:57:03 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
16:57:11 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Remote host closed the connection)
16:58:55 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
16:59:15 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Ping timeout: 268 seconds)
16:59:19 <c_wraith> dminuoso: yeah, like.. head . gmapQ toDyn
16:59:33 <c_wraith> Or something safer than head
17:00:20 × razetime quits (~quassel@117.254.35.71) (Remote host closed the connection)
17:00:31 <c_wraith> I guess `gmapQi 0 toDyn` is mildly safer
17:01:14 <dminuoso> c_wraith: Ah neat, exactly what I was looking for. Thanks.
17:01:27 <c_wraith> well. gmapQi isn't safer at all. :)
17:01:38 <c_wraith> it's just as unsafe, and the error message isn't even better!
17:01:47 <dminuoso> Yeah this is fine, I know how to case-of lists. :)
17:10:20 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
17:11:09 × Midjak quits (~Midjak@82.66.147.146) (Quit: Leaving)
17:17:33 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
17:17:48 × acidjnk quits (~acidjnk@p200300d6e7137a84917195bd27e414df.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
17:20:03 mmhat joins (~mmh@p200300f1c7062359ee086bfffe095315.dip0.t-ipconnect.de)
17:20:15 Midjak joins (~Midjak@82.66.147.146)
17:20:39 tmiller joins (~tmiller@199.241.26.152)
17:24:45 × kenran quits (~user@user/kenran) (Remote host closed the connection)
17:31:17 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
17:31:21 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
17:31:40 ec joins (~ec@gateway/tor-sasl/ec)
17:31:59 <hololeap> I have a `Map k (OSet v)` and I want to do a breadth-first walk along the `v` contents. I was thinking using interleave from logict, but I don't know how to convert this into a `Logic v`
17:32:13 <monochrom> What is OSet?
17:32:39 <hololeap> ordered set. each value is unique but it preserves the order they were inserted
17:33:06 <hololeap> from ordered-containers
17:34:14 <monochrom> You can convert [v] to Logic v.
17:34:53 <hololeap> what's the standard way to do that?
17:35:18 <hololeap> is there anything better than `asum . fmap pure`?
17:36:14 <monochrom> logic (\op z -> foldr op z yourlist)
17:36:36 <monochrom> Although, I think it doesn't really mater.
17:37:04 <hololeap> I'm just a bit surprised that this isn't included as a helper function in logict. it almost seems intentional.
17:38:04 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
17:39:19 <monochrom> msum pure, too >:)
17:39:34 <monochrom> err, mconcat pure !
17:40:10 euandreh joins (~euandreh@179.214.113.107)
17:41:03 <[Leary]> hololeap: Note the haddocks for `type Logic`.
17:42:06 Lycurgus joins (~juan@user/Lycurgus)
17:42:15 <hololeap> what about them
17:42:29 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
17:42:29 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
17:42:46 rockymarine joins (~rocky@user/rockymarine)
17:43:04 chexum joins (~quassel@gateway/tor-sasl/chexum)
17:43:25 <monochrom> [Leary] is probably referring to "Technical perspective. Logic is a Boehm-Berarducci encoding of lists." etc.
17:43:49 <monochrom> which is how I derived logic (\op z -> foldr op z yourlist)
17:43:55 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
17:44:54 <hololeap> ok then why isn't there a `fromList :: [a] -> Logic a`. this seems like such an obvious thing, its omission seems intentional, like it breaks performance or something
17:45:11 <monochrom> The front-page example has "choose = foldr ((<|>) . pure) empty" so your idea of asum . fmap pure is as standard as everyone else :)
17:46:12 <monochrom> BTW Logic is also Foldable so I guess that answers your question :)
17:46:23 <monochrom> Err no, wrong direction!
17:46:25 <[Leary]> I suspect they just consider it too trivial for anyone who understands the representation.
17:47:36 <monochrom> I think you're 2nd-guessing too much why it wasn't included.
17:48:17 <hololeap> ok, fair enough. I just thought I would ask
17:48:30 <monochrom> Reality is always much more boring than deep technical considerations. The real reason is usually procrastination, laziness, lack of care.
17:49:41 <[Leary]> If it did break performance, I bet they'd go out of their way to write it, just so they could slap a big warning on it.
17:50:40 <hololeap> I have very little experience with this package, partly because I was confused how to actually use it in most cases
17:51:11 <hololeap> but I keep forgetting to look at a package's README in their source repo
17:51:53 <monochrom> The readme is also on the hackage page. I never read source repos.
17:52:05 <monochrom> Unpopular opinion: Never use the source, Luke.
17:52:59 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
17:53:11 <hololeap> oh, you're right. it is (in this case) but I've seen others that don't have it. also the generated haddocks I can read locally don't include it for some reason.
17:53:35 <hololeap> or at least I've seen it where the README on hackage and on github differ
17:54:02 <hololeap> possibly because of the one on github being updated more recently, IDK
17:54:04 <monochrom> Yeah local haddocks don't include the readme. Hackage does something extra for it.
17:54:13 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 246 seconds)
17:54:28 <hololeap> ok, well thanks for the help
17:57:55 <monochrom> Is OSet Foldable? You may have as simple as foldMap pure my_oset
17:58:31 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
18:00:23 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
18:00:26 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Quit: leaving)
18:04:11 nate3 joins (~nate@98.45.169.16)
18:05:17 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
18:08:31 a6a45081-2b83 joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507)
18:08:45 <a6a45081-2b83> what's a better way to do this? https://bpa.st/AFBA
18:09:03 <a6a45081-2b83> defining data constructors with varying argument orders
18:09:24 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 264 seconds)
18:10:25 <monochrom> Offer fewer choices and resist feature creep.
18:12:09 <geekosaur> depends on how important preserving said order is
18:12:23 <monochrom> That's one extremal solution. The other extremal solution on the other side is:
18:12:26 <ski> why those exact permutations ?
18:12:50 <davean> This seems like a pattern thing
18:12:55 <davean> it also seems like a bad idea
18:12:58 <ski> (also, why `End' ? .. and why the redundant brackets ?)
18:13:30 <tomsmeding> ski: End because the data type is recursive
18:13:48 <monochrom> Resist type-level enforcement of order and uniqueness. Just use a term-level list to store a layout. Now you are also offering more choices and features! Because maybe there is nothing wrong in supporting a layout that repeats my name 100 times.
18:13:50 <ski> oh, right. missed that part
18:14:04 <davean> tomsmeding: Well its recursive in the sense that a list is, so one can also ask why that isn't factored out.
18:14:16 <tomsmeding> sure
18:14:35 <davean> I think this is a very odd question from every direction.
18:14:58 <monochrom> Oh it's recursive? Well then it already lets me repeat my name 100 times. So yeah just use a list.
18:15:17 <monochrom> A rose tree too if necessary.
18:16:01 <monochrom> Anyway extremal solutions are the best solutions, literally. :)
18:16:23 <ski> "extremal" ?
18:16:35 <a6a45081-2b83> Different layouts to find the one that works best with the search algorithm for efficiency due to ordering
18:16:44 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
18:16:54 <davean> a6a45081-2b83: why is that part of the *datastructure*
18:16:59 <davean> its not data, its representation
18:17:07 <davean> Those are seperate things
18:17:22 <a6a45081-2b83> yup so can we switch/reorder data layout with ghc?
18:17:46 <davean> I feel you have some deep confusion at the base of this question
18:17:47 <monochrom> OK so what's wrong with [Header, Author, Date, Content, Author, Tags]?
18:18:18 <davean> I have no idea what though. I have no idea why you think the datastructure has anything to do with how it is presented to search engines
18:18:29 <a6a45081-2b83> after it's serialization there would be a cost associated with travelling the data structure based on layout
18:18:40 <davean> No there wouldn't?
18:18:52 <monochrom> Is that cost at the type level or at the term level?
18:19:03 <davean> Hell, having them all represented the same way is actually cheaper because its less conditionals
18:19:05 <a6a45081-2b83> if it's on heap using pointers then probably not
18:19:05 <monochrom> If the cost is at the term level then the layout is also at the term level.
18:19:14 <a6a45081-2b83> but if I serialized it it would be linear
18:19:24 <monochrom> So what's wrong with [Header, Author, Date, Content, Author, Tags] at the term level?
18:19:36 <monochrom> [Header, Author, Date, Content, Author, Tags] is also linear.
18:19:42 <a6a45081-2b83> hmm
18:19:43 <monochrom> It's literally a list.
18:20:24 <monochrom> I have never heard of type-level search or optimization algorithms BTW.
18:20:35 talismanick joins (~talismani@96-67-197-217-static.hfc.comcastbusiness.net)
18:21:09 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
18:21:12 <a6a45081-2b83> probably see https://research.cs.wisc.edu/multifacet/papers/pldi99_cache_layout_pdf.pdf
18:21:19 <a6a45081-2b83> or https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.91.6594&rep=rep1&type=pdf
18:21:21 <davean> "a6a45081-2b83 after it's serialization there would be a cost associated with travelling the data structure based on layout" so the only cost here is the conditionals and the non-deterministic parsing. That doesn't have anything to do with your data type, it has to do with your serialization function
18:21:29 <monochrom> And I'm sure there is a cost function that says repeating my name 100 times is optimal.
18:21:54 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
18:21:55 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
18:21:55 × califax quits (~califax@user/califx) (Remote host closed the connection)
18:21:55 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Read error: Connection reset by peer)
18:22:38 <davean> a6a45081-2b83: ah, if you're trying to do memory optimal things, you're really off the track, you're going to need to know about GHC's representations and boxing and laziness
18:22:44 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
18:22:48 ChaiTRex joins (~ChaiTRex@user/chaitrex)
18:22:51 <davean> the ordering is the least of your concerns there.
18:22:57 <monochrom> I don't understand the relevance of the cache paper.
18:23:18 <monochrom> I mean relevance to blog layouts.
18:23:28 <davean> Oh CERTAINLY no relivent to blogs
18:23:50 califax joins (~califax@user/califx)
18:23:51 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
18:23:52 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
18:23:57 <davean> I do happen to know a lot about optimizing Haskell data definitions for cache optimality.
18:24:10 ec joins (~ec@gateway/tor-sasl/ec)
18:24:17 <monochrom> After you know GHC's representations you will conclude that you should give up on optimizing for cache. :)
18:24:38 <davean> Absolutely not. I've done a lot of cycle perfect Haskell programming :)
18:24:44 <davean> Its actually not that bad
18:24:54 <davean> We have some pretty good tools
18:25:05 <davean> Now, our levity polymorphism story ...
18:25:08 <davean> thats pretty shit.
18:25:44 <davean> but making isolated kernels that are optimal are actually really pretty easy to get close to right in Haskell and sometimes you can get them perfect
18:25:44 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
18:25:52 <monochrom> OK OK my sentence is tailor-made for a particular class of "you".
18:26:08 <davean> It just doesn't integrate well into other Haskell code, you need a translation boundary
18:26:53 <davean> If we had some type classes like Num polymorphic ... well of course there are reasons we don't.
18:27:07 king_gs joins (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5)
18:28:25 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
18:28:35 biberu joins (~biberu@user/biberu)
18:29:05 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
18:29:44 <monochrom> Do you allow GHC to use copying GC? Because the copy algorithm may or may not happen to preserve or ruin your carefully created layout.
18:30:30 <monochrom> perhaps s/layout/locality/
18:31:18 <EvanR> I'm curious about these tools for optimizing cache performance of haskell code
18:31:23 <davean> locality is a different concern and I'd say alignment matters more. If you want to preseve locality you can arraize it and move it out of GC.
18:31:33 <monochrom> Although, I can be ignorant in thinking that cache locality is the only issue.
18:31:50 <monochrom> Ah alignment.
18:31:51 <davean> monochrom: well cache locality and memory locality aren't very related, except by alignment
18:32:13 <monochrom> OK does GHC's copying GCer ruin your alignment? :)
18:32:13 <davean> there IS associtivity but with 16 way associtive caches that can mostly be hand waved
18:32:18 <davean> monochrom: generally not!
18:32:25 <int-e> There's also the GHC.Compact stuff... which I'm only vaguely aware of.
18:32:36 <davean> int-e: yep, rather nice but inflexible.
18:32:45 <davean> What we don't have is general tools, we have a lot of very specific ones
18:33:35 beteigeuze joins (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
18:34:38 <davean> Honestly thats always the case outside assembly
18:34:51 × a6a45081-2b83 quits (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection)
18:34:52 <dminuoso> monochrom: Never use the source? Haskell is the wrong language for you then.
18:35:23 <dminuoso> I'd say being able to quickly understand undocumented things right via hyperlink on haddock is the only way to use a fair chunk of hackage.
18:35:40 <monochrom> Well the whole world is basically the wrong world for me.
18:35:41 <dminuoso> Hyperlinks named "Source" have to be my most visited ones.
18:35:48 <davean> monochrom: you are always such a downer
18:35:52 <davean> monochrom: what is with that?
18:36:02 <monochrom> I'm cynical!
18:36:11 <davean> I mean we figured that out.
18:36:55 <dontdieych> (this channel ,.. always working)
18:37:14 wootehfoot joins (~wootehfoo@user/wootehfoot)
18:37:18 <monochrom> In practice I sometimes take a look at the source code, as you explained.
18:37:40 sibnull[m] joins (~sibnullma@2001:470:69fc:105::1:1291)
18:37:58 <monochrom> But that's a statement of the status quo that authors don't bother to write docs, not an endorsement.
18:38:10 lys joins (lys@id-194105.uxbridge.irccloud.com)
18:38:10 <davean> monochrom: my main alignment issues in haskell are inside of datastructures, and historically GHC didn't do anything subword so you just got way too much padding.
18:38:16 <monochrom> We are always pushing more authors to write better docs, no?
18:38:18 <davean> so sometimes you had to hand-pack things
18:38:39 <davean> now with the subword stuff I haven't had a deep dive yet but if it has changed that you can just pad
18:40:18 <dontdieych> My Haskell bottleneck https://en.m.wikibooks.org/wiki/Haskell/Understanding_monads/State
18:40:41 <c_wraith> state was a challenge for me at the start too
18:40:51 <dontdieych> stop at that point...
18:40:59 LukeHoersten joins (~LukeHoers@user/lukehoersten)
18:42:22 <monochrom> If you have a functional mind then you always reduce "I have state variables" to "I have a state transition function S -> S".
18:42:48 <monochrom> And then you add "but I also have an input and an output" so it's (X,S) -> (Y,S).
18:43:28 <monochrom> From there it is not so big a leap to accept that perhaps S->(Y,S) suffices because you can always slap on an X-> when necessary.
18:43:38 <davean> monochrom: so locality comes into play with prefetching and most CPUs will do indirect loop detection so walking over a pointer array is fine. I haven't worked on proccessors with more limited prefetching recently.
18:43:45 dminuoso is itching to make a funny remark about reverse state
18:44:18 <dminuoso> davean: their prefetchers havent really become much better.
18:44:25 <EvanR> if the type of a "normal" function that is stateless is A -> B, then you can add statefulness by doing (A,S) -> (B,S). Now the function can depend on state and change the state
18:44:31 <dminuoso> At least on Intel side. AMD I keep forgetting how to find the optimization manuals
18:44:53 <davean> dminuoso: right but its about more limited ones because desktop and server class CPUs have been much better than needed for quite a long time.
18:44:56 <EvanR> the State monad is just stringing together such functions so the output state is the state fed to the next input state
18:45:01 <davean> dminuoso: I don't know the story on like low end ARM phone CPUs.
18:45:15 Everything parts (~Everythin@37.115.210.35) ()
18:45:17 <davean> dminuoso: CPU pretetchers actually have become a decent bit better though
18:45:35 <davean> Its that it only really matters for poorly optimized code
18:45:48 <dminuoso> davean: Honestly I would expect a simple prefetcher to be present even on ARM phones. Memory stride detection is super trivial.
18:45:54 <davean> where you have longer, more complex conditionals to do prediction off of
18:45:57 <dminuoso> Even Intel has the most dumb logic ever.
18:45:59 LukeHoersten_ joins (~LukeHoers@user/lukehoersten)
18:46:12 <davean> dminuoso: Intel has MASSIVELY more than memory stride detection
18:46:25 <dminuoso> For automatic memory prefetching, not really
18:46:36 <dminuoso> There's 2 different stride prefetcher that each have 2-3 cases where they trigger
18:46:45 <monochrom> I'm impressed that for modern CPUs a pointer array is fine. That really enables a lot more high-level programming.
18:47:04 <davean> monochrom: mostly only catches the simple cases
18:47:16 <dminuoso> But I guess its the combination with speculative execution this kicks in really well
18:47:36 <dminuoso> That is, if the cpu can speculatively execute code with a semantically stalled pipeline, it can trigger stride prefetchers even earlier
18:47:41 <davean> dminuoso: right
18:47:54 dcoutts_ joins (~duncan@host86-177-125-45.range86-177.btcentralplus.com)
18:48:05 <monochrom> OK yeah but if I have like Vector (boxed Int) it may be one of the simple cases.
18:48:17 <davean> Yep! Exactly
18:48:22 <dminuoso> What is really super interesting, is that the current (not the brand new one) architecture is able maintain a constant throughput of 8 instructions per cycle.
18:48:24 <monochrom> Or if I have the analogue in C++.
18:48:28 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Ping timeout: 246 seconds)
18:48:39 <dminuoso> Without being stalled (assuming some good and targeted code of course)
18:48:48 <dminuoso> No CPU before could do that well. :)
18:48:50 <davean> where that doesn't work, rotating to a SoA design can fix a lot too
18:49:01 <dminuoso> (Again, talking Intel)
18:49:08 <davean> dminuoso: Oh, ok, sticking to Intel yah
18:49:26 <davean> dminuoso: I mean I was about to bring up a few elephands in the room.
18:49:32 <dminuoso> Agner Fog has most details on their CPUs :>
18:50:35 <dminuoso> It's somewhat of a shame that you have to resort to some person privately benchmarking and thereby reverse engineering microarchitecture details. Intel wont tell you half the things necessary for optimal code generation.
18:50:48 × dcoutts__ quits (~duncan@host86-177-125-45.range86-177.btcentralplus.com) (Ping timeout: 264 seconds)
18:51:12 <davean> dminuoso: Yah, if you want to optimize CPU code you have to have friends that want to optimize CPU code.
18:52:12 <dminuoso> No I rather meant, both AMD and Intel are rather sketchy on microarchitectural details
18:52:17 <davean> Honestly I think sticking to things like Cache Oblivious algs and such is better 99% of the time; it works fairly well across languages, and it doesn't fall appart in the future.
18:52:26 <dminuoso> Yup.
18:52:52 <davean> dminuoso: yes, and the only way to get around that is to have friends who also want to optimize CPU code, because there is no way to one man lift figuring out solutions. I got what you meant.
18:52:55 <dminuoso> Cache awareness I think is one of the primary optimization opportunities in many algorithms or programs.
18:53:05 <dminuoso> That is very frequently left untouched.
18:53:08 <davean> you have to be part of a community working on it to really have a chance.
18:53:12 <dminuoso> Outside of OS code you rarely see cache coloring for example
18:53:36 <davean> Most of the high level techniques don't care what language you're in or anything if you have decent data layout control, and haskell DOES have that.
18:53:42 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
18:53:42 <davean> in modern times.
18:53:55 <davean> And haskell can MOSTLY optimize datapacking ok, so generally that stuff works out.
18:54:28 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
18:54:47 <davean> dminuoso: my point there was one doesn't just stumble into how to optimize for CPUs, nor can one just deduce it from straight experimentation
18:54:51 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 258 seconds)
18:55:03 <dminuoso> Ah yes right.
18:55:04 <davean> you need a combination of experimentation, mechanical sympathy, and idea generation
18:55:49 <dontdieych> sigh.. cant grog state monad signature.
18:55:54 <dontdieych> another day
18:56:01 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
18:56:02 <davean> dontdieych: Do you have a specific problem?
18:56:44 <davean> dontdieych: do you understand the equivilence of (a, b) -> c and a -> b -> c?
18:56:47 <monochrom> I mean well yeah a state transition function also says that there is always the next state, another day. >:)
18:56:51 <dontdieych> davean: no just read and learn haskell. actually it is fun and joy
18:57:06 <davean> dontdieych: Yah its just "I don't understand" doesn't really give any way to help you
18:57:14 <davean> "A seems in conflict with B" might
18:57:17 <davean> or something like that.
18:57:24 <dminuoso> dontdieych: You should go one step back, and start with the motivation problem, which both the wikibooks article you pointed out goes into great length to setup, and all monochrom, davean and EvanR have been trying to set you up with.
18:57:26 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
18:57:32 <EvanR> "he should move to the next state" actual review of actual digital logic professor
18:57:40 <dminuoso> Don't jump towards the State type, start with the motivating problem.
18:58:08 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
18:58:09 <monochrom> haha EvanR. It's real?! Some student wrote that?!
18:58:13 <EvanR> yeah
18:58:22 <davean> EvanR: I love that student so much right now.
18:58:23 <EvanR> though you probably heard that 100 times
18:58:34 <monochrom> No, this is the 1st time.
18:58:37 <dontdieych> Thank you for all
18:59:01 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
18:59:13 <dontdieych> I'll read back to books
18:59:16 × LukeHoersten_ quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:59:32 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
19:00:07 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 268 seconds)
19:00:11 Lord_of_Life_ is now known as Lord_of_Life
19:00:12 LukeHoersten joins (~LukeHoers@user/lukehoersten)
19:01:13 <dminuoso> dontdieych: And another personal tip: just drop the word Monad. Scratch it from your definition list.
19:01:32 <monochrom> :(
19:01:53 <monochrom> I take the opposite view.
19:02:39 <monochrom> For example I don't understand CPUs. Especially after today listening to you about cache behaviour and how to or not to write code to play nice with it.
19:02:57 <monochrom> Has that ever stopped me from just going ahead and using CPUs?
19:03:27 <geekosaur> I think that was actually the point?
19:03:35 <int-e> But you use CPUs rather indirectly (like everybody else) ;-)
19:03:38 <geekosaur> Don't try to understand it, just use it and understanding will come
19:03:49 <monochrom> (Unpopular opinion: You know what, I'm cynical, perhaps the world would be better if everyone thought "I don't understand CPUs so perhaps I should not become a programmer.")
19:04:03 <hololeap> anyone know of a lib with a data structure that can lookup a collection of values given a key, but also lookup the parent key given a value?
19:04:11 <int-e> You should still use the term "monad" though because a) that's the type class name and b) that's the name by which everybody else knows the concept.
19:04:14 <geekosaur> Bimap?
19:04:24 <hololeap> it's not quite bimap, I don't think
19:04:25 <dminuoso> hololeap: What is "parent"?
19:04:34 <hololeap> good question
19:04:39 <dminuoso> Do you mean "key"?
19:04:48 <int-e> But I'd agree that you don't have to internalize all the monad laws to use monads.
19:04:49 <hololeap> sure
19:04:54 <dminuoso> Use two maps?
19:04:59 <dminuoso> And a data wrapper
19:05:00 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
19:05:04 <monochrom> Um but I have used CPUs pretty directly. I sometimes read asm code. I used to write a little bit of asm code too. I used to even measure CPU pins with oscilloscopes of logic analyzers.
19:05:19 <EvanR> I don't understand cars so maybe I shouldn't drive
19:05:24 <dontdieych> I'd made once ! real world program with Haskell accidentally, for my daily jobs. ... that was great.
19:05:25 <EvanR> actually, we don't even need the first part
19:05:26 <hololeap> so write it myself, because there is no popular lib that has this already
19:05:54 <dminuoso> Not that I've seen
19:06:15 <int-e> monochrom: but I imagine you're still using a keyboard, maybe a mouse, a monitor (via a graphics controller), storage devices... etc. rather than injecting your own electric signals into the CPU core.
19:06:32 <dminuoso> hololeap: well there is https://hackage.haskell.org/package/bimap-0.5.0/docs/Data-Bimap.html
19:06:40 <dminuoso> Which I suppose geekosaur referred to
19:06:45 <EvanR> what is "direct" anyway
19:07:01 <int-e> monochrom: even assembly language isn't very direct
19:07:06 <EvanR> your quantum state is entangled with the computer hardware in some sense
19:07:21 <dminuoso> int-e: Even machine code isnt very direct either for AMD64 CPUs :>
19:07:24 <sm> could anyone explain how you're supposed to use https://hackage.haskell.org/package/time-parsers-0.1.2.1/docs/Data-Time-Parsers.html ?
19:07:47 <EvanR> and everything you ever told the computer to do was superdetermined at the beginning of the universe!
19:07:53 <dminuoso> Your machine code gets compiled into micro ops by a big black box of micro code.
19:07:53 <hololeap> well, it's not quite a bimap, but that would probably be the best thing to use if I do write it myself
19:08:13 <dminuoso> hololeap: Or are you looking for a kind of tree perhaps?
19:08:23 <monochrom> Humanity started using fire without understanding fire.
19:08:37 <EvanR> same with computers
19:08:41 <EvanR> and computation
19:08:43 <sm> also do we approve of "case undefined" in https://hackage.haskell.org/package/time-parsers-0.1.2.1/docs/src/Data.Time.Parsers.html#timeZone ?
19:08:43 <monochrom> Every time you enjoy a BBQ or a nicely grilled steak, remember that.
19:09:13 <dminuoso> sm: instantiate m at a suitable type satisfying CharParsing, LookAheadParsing and Monad, and use that?
19:09:23 <monochrom> If every human were like every monad student "I don't understand fire so I refuse to just go ahead and use fire", ...
19:09:25 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
19:09:25 <int-e> dminuoso: Well at least you will find machine code travel along the memory interfaces. (There's no point to this, I just wanted to tease monochrom a bit.)
19:09:44 <monochrom> Well I guess we would all enjoy beef sashimi and tartar steak instead :)
19:09:48 <sm> dminuoso: I'm needing more..
19:09:55 <dminuoso> more what?
19:10:08 <dminuoso> sm: Mind my asking, what is is that you want to parse?
19:10:12 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
19:10:15 <EvanR> I've played enough minecraft to know you need to cook the food for best results
19:10:16 <sm> clear advice
19:10:25 <sm> dminuoso: a time zone, in this case
19:10:33 <sm> I thought I'd save some time and use this
19:10:44 <EvanR> same with computations
19:10:44 <geekosaur> time zones are hell
19:10:53 <sm> but it's got me baffled
19:11:06 <dminuoso> There's that crufty ancient library that all linux comes with.. uh what is its name again
19:11:17 <EvanR> olsen timezone package has parsers right?
19:11:20 <sm> I see that DateParsing is... a triple ?
19:11:24 <hololeap> no, I just want something that has all the standard Map functions, but the value is always a collection of values, and it also includes something like `getKey :: ThingMap k v -> v -> k` in addition to `lookup :: ThingMap k v -> k -> Set v`
19:11:27 <sm> how does that even..
19:11:31 <dminuoso> sm: a triple constraint
19:11:52 <monochrom> sm: I would be more happy if it were "case () of", but really it doesn't matter to me.
19:12:03 <dminuoso> zonedTime :: DateParsing m => m ZonedTime
19:12:04 <dminuoso> zonedTime :: (CharParsing m, LookAheadParsing m, Monad m) => m ZonedTime
19:12:07 <dminuoso> These two are the same thing
19:12:07 × king_gs quits (~Thunderbi@2806:103e:29:5a6:d0be:f9c4:80c9:e8c5) (Remote host closed the connection)
19:12:18 <hololeap> anyway I can write it if need be
19:12:19 <dminuoso> sm: See why I mean "pick a type m that satisfies these three constraints"?
19:12:48 <dminuoso> sm: You would click on CharParsing and LookAheadParsing, see what kind of instances these come with, and look for a type supported in both
19:12:52 ec joins (~ec@gateway/tor-sasl/ec)
19:12:52 <monochrom> More precisely I would be most happy with MultiWayIf, but here we're looking at a piece of code that predates that.
19:12:56 <sm> yes I got that general sense myself but it is far from obvious
19:13:10 <sm> this is one of those undocumented packages we hear about
19:13:10 <dminuoso> sm: You can use ReadP or attoparsec Parser for example.
19:13:14 <sm> thanks
19:14:38 <sm> doh, I can just use parseTimeM like I'm already doing
19:15:45 <sm> parseTimeM False defaultTimeLocale "%Z" "UTC" :: Maybe TimeZone
19:17:02 × califax quits (~califax@user/califx) (Quit: ZNC 1.8.2 - https://znc.in)
19:17:02 × vglfr quits (~vglfr@145.224.100.164) (Read error: Connection reset by peer)
19:17:02 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
19:17:13 vglfr joins (~vglfr@145.224.100.164)
19:17:32 califax joins (~califax@user/califx)
19:17:33 ChaiTRex joins (~ChaiTRex@user/chaitrex)
19:17:41 <monochrom> int-e: Basically the definition of "use", aka "black-box use", comes with a lower bound of indirectness.
19:17:46 <EvanR> I always though if I was going to do industrial timezone bullshit I'd use timezone-olsen package
19:17:54 × beteigeuze quits (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 268 seconds)
19:18:40 <EvanR> which defines the thing TimeZoneSeries, which is usually what a TimeZone ends up being
19:18:52 <dminuoso> What is the corresponding C facility to interact with tzdb?
19:19:08 × waldo quits (~waldo@user/waldo) (Ping timeout: 268 seconds)
19:20:10 pavonia joins (~user@user/siracusa)
19:20:54 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
19:21:03 waldo joins (~waldo@user/waldo)
19:21:13 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
19:21:13 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
19:21:13 × califax quits (~califax@user/califx) (Remote host closed the connection)
19:21:15 <EvanR> there's tzset
19:21:26 <EvanR> but that only does 1 thing
19:21:47 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
19:21:54 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
19:21:59 ec joins (~ec@gateway/tor-sasl/ec)
19:22:07 <geekosaur> there's a library for the olsen tzdb stuff, iirc it's bundled with timezone-olsen?
19:22:17 <geekosaur> but not standard on e.g. linux
19:23:31 × mrmr quits (~mrmr@user/mrmr) (Quit: Ping timeout (120 seconds))
19:23:42 califax joins (~califax@user/califx)
19:23:48 mrmr joins (~mrmr@user/mrmr)
19:24:14 × gustik quits (~gustik@2a01:c844:2457:2220:475d:34f:d571:996f) (Quit: Leaving)
19:25:29 acidjnk joins (~acidjnk@p200300d6e7137a85945ed0a823b800bd.dip0.t-ipconnect.de)
19:26:30 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
19:28:01 lys is now known as rosalind
19:30:51 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:31:51 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
19:33:03 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
19:33:55 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
19:34:11 jakalx joins (~jakalx@base.jakalx.net)
19:37:15 codaraxis joins (~codaraxis@user/codaraxis)
19:37:41 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 260 seconds)
19:37:46 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
19:41:33 mrmr9 joins (~mrmr@user/mrmr)
19:42:06 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
19:43:15 × mrmr quits (~mrmr@user/mrmr) (Ping timeout: 268 seconds)
19:43:15 mrmr9 is now known as mrmr
19:46:10 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
19:50:09 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
19:53:00 ski thought sashimi had to be fish
19:53:47 <ski> a `ThingMap k v' sounds like it's representing a functional relation (from `v' to `k'), which can be used both forwards and backwards
19:54:03 <monochrom> There are urchin and octopus too. And then there is beef.
19:54:19 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
19:54:41 <ski> hm, okay
19:54:59 ski imagines sea bovines
19:56:34 <Rembane> Like manates?
19:56:42 <talismanick> I just tried `cabal install hood` - it appears it requires base <4.11 :|
19:57:08 <talismanick> Are there any other debuggers like it? I'm intrigued by this concept of debugging by observing the sequence of intermediate data structures generated
19:57:22 <monochrom> hood is probably very old and not updated.
19:57:53 <talismanick> It'd mesh well with what I've learned from "Algorithm Design With Haskell", and seems like a good way to search for space leaks
19:58:39 <monochrom> You can try telling cabal "--allow-newer" but if there are compile-time errors it can be a rabbit hole to bring the code up to date.
19:59:23 <ski> Rembane : .. maybe ?
19:59:27 <talismanick> Let's see... what fails is a dependency, FPretty
19:59:43 <sclv> hood is likely extremely bitrotted but also it would be a good project to get it up to date
20:00:15 × waldo quits (~waldo@user/waldo) (Quit: quit)
20:00:37 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
20:00:53 <talismanick> Oh my god, 800 lines of error messages
20:01:22 ski . o O ( "Luvly jubly !" )
20:01:33 <talismanick> 86 instances of the word "error" when grepping, 64 from FPretty
20:03:10 <geekosaur> hood knows a bit too much about ghc internals, which will have changed drastically since it was written
20:03:36 <ski> (hm, there's also a `hood2', and `GHood')
20:04:06 <geekosaur> the only other thing like it I know is ghc-vis, which might even be up to date (hm, don't know about ghc9 though)
20:04:19 ski idly reminisces Buddha
20:05:18 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
20:07:28 causal joins (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e)
20:07:43 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 265 seconds)
20:08:00 <geekosaur> iirc GHood is just a GUI wrapper for hood. no idea about hood2
20:08:14 × rosalind quits (lys@id-194105.uxbridge.irccloud.com) (Quit: bbl)
20:12:21 <talismanick> hood2 and ghc-vis both fail to compile
20:12:55 <talismanick> buddha appears Hugs-related and even predates hood, so I presume it won't work with GHC
20:13:31 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 265 seconds)
20:13:51 × shapr quits (~user@68.54.166.125) (Ping timeout: 260 seconds)
20:16:30 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
20:16:30 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 258 seconds)
20:17:23 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
20:17:26 kenran joins (~user@user/kenran)
20:17:45 gmg joins (~user@user/gehmehgeh)
20:18:04 × vglfr quits (~vglfr@145.224.100.164) (Ping timeout: 244 seconds)
20:19:28 × kenran quits (~user@user/kenran) (Remote host closed the connection)
20:20:55 Everything joins (~Everythin@37.115.210.35)
20:21:45 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
20:22:13 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
20:24:08 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
20:25:11 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 268 seconds)
20:25:48 × talismanick quits (~talismani@96-67-197-217-static.hfc.comcastbusiness.net) (Ping timeout: 268 seconds)
20:26:48 kenran joins (~user@user/kenran)
20:27:14 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
20:28:00 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
20:28:47 × kenran quits (~user@user/kenran) (Read error: Connection reset by peer)
20:30:02 kenran joins (~user@user/kenran)
20:30:04 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
20:30:31 ec joins (~ec@gateway/tor-sasl/ec)
20:32:03 ardell joins (~ardell@user/ardell)
20:33:09 rosalind joins (rosalind@id-194105.uxbridge.irccloud.com)
20:34:06 rosalind parts (rosalind@id-194105.uxbridge.irccloud.com) ()
20:35:43 lys joins (lys@id-194105.uxbridge.irccloud.com)
20:36:15 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
20:38:21 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
20:38:36 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
20:40:39 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
20:41:10 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
20:42:38 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
20:43:20 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
20:45:21 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
20:45:26 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
20:51:03 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
20:51:40 × lagash quits (lagash@lagash.shelltalk.net) (Ping timeout: 244 seconds)
20:56:26 × mrmr quits (~mrmr@user/mrmr) (Ping timeout: 260 seconds)
20:58:36 lagash joins (lagash@lagash.shelltalk.net)
20:59:24 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:01:40 rockymarine joins (~rocky@user/rockymarine)
21:04:02 JimL joins (~quassel@89-162-2-132.fiber.signal.no)
21:07:09 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 244 seconds)
21:08:01 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Quit: Leaving)
21:08:06 x7Ot joins (~x7Ot@2804:14d:78a6:85fe:8df8:3066:639f:5a59)
21:10:13 × x7Ot quits (~x7Ot@2804:14d:78a6:85fe:8df8:3066:639f:5a59) (Client Quit)
21:10:38 lys is now known as rosalind
21:13:55 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:15:27 rockymarine joins (~rocky@user/rockymarine)
21:16:15 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
21:16:39 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
21:18:34 × rosalind quits (lys@id-194105.uxbridge.irccloud.com) (Quit: Time)
21:20:45 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
21:21:31 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
21:24:43 × acidjnk quits (~acidjnk@p200300d6e7137a85945ed0a823b800bd.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
21:26:11 × mmhat quits (~mmh@p200300f1c7062359ee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
21:31:19 bilegeek joins (~bilegeek@2600:1008:b018:1dfc:44e1:aaa5:595f:8e17)
21:31:58 × zebrag quits (~chris@user/zebrag) (Ping timeout: 244 seconds)
21:32:41 × kenran quits (~user@user/kenran) (Remote host closed the connection)
21:35:21 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:39:06 mmhat joins (~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de)
21:41:31 shapr joins (~user@68.54.166.125)
21:44:07 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
21:44:21 talismanick joins (~talismani@c-73-41-86-39.hsd1.ca.comcast.net)
21:44:49 <shapr> @quote
21:44:49 <lambdabot> cowardlydragon says: [from a reddit comment thread] Don't get me started on monad. What is that, a man with a single testicle?
21:51:34 moonsheep joins (~user@user/moonsheep)
21:52:30 thyriaen joins (~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce)
21:55:01 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
21:56:21 rockymarine joins (~rocky@user/rockymarine)
21:56:28 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
21:59:07 <monochrom> haha how does lambdabot actually chooses quotes to match recent conversations?!
21:59:18 rosalind joins (rosalind@id-194105.uxbridge.irccloud.com)
22:00:23 beteigeuze joins (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
22:02:33 zero joins (~z@user/zero)
22:02:54 <[exa]> monadic joke choice is pretty safe here tbh. :D
22:04:30 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 244 seconds)
22:05:05 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
22:05:41 nate3 joins (~nate@98.45.169.16)
22:06:00 <monochrom> Oh heh.
22:06:16 × zzz quits (~z@user/zero) (Ping timeout: 268 seconds)
22:10:31 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
22:10:53 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
22:10:56 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
22:14:38 rockymarine joins (~rocky@user/rockymarine)
22:15:46 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
22:16:21 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
22:18:15 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
22:18:36 × thyriaen quits (~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce) (Quit: Leaving)
22:23:41 × zmt00 quits (~zmt00@user/zmt00) (Read error: Connection reset by peer)
22:23:42 vorpuni joins (~pvorp@2001:861:3881:c690:ec7f:c79:dd1b:f81a)
22:25:38 zmt00 joins (~zmt00@user/zmt00)
22:26:43 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
22:28:22 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
22:31:59 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
22:32:45 × titibandit quits (~titibandi@xdsl-212-8-150-57.nc.de) (Remote host closed the connection)
22:32:58 × michalz quits (~michalz@185.246.207.221) (Remote host closed the connection)
22:35:31 × rosalind quits (rosalind@id-194105.uxbridge.irccloud.com) (Quit: bbl)
22:37:34 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
22:39:55 zebrag joins (~chris@user/zebrag)
22:41:18 rosalind joins (rosalind@id-194105.uxbridge.irccloud.com)
22:41:38 × ardell quits (~ardell@user/ardell) (Quit: Leaving)
22:55:13 × gff_ quits (~gff@user/gff) (Ping timeout: 246 seconds)
22:56:01 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
22:57:26 gff_ joins (~gff@user/gff)
22:59:21 vglfr joins (~vglfr@145.224.100.164)
22:59:47 Tuplanolla joins (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
22:59:49 × megaTherion quits (~therion@unix.io) (Remote host closed the connection)
22:59:56 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:00:08 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
23:03:12 megaTherion joins (~therion@unix.io)
23:03:52 edrx joins (~Eduardo@2804:18:5805:83e:c9df:9b:886f:e903)
23:04:21 <edrx> hi all!
23:04:57 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
23:05:50 rockymarine joins (~rocky@user/rockymarine)
23:05:51 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
23:06:07 <edrx> I am trying to translate the definitions of Functor, Applicative, and Monad into some kinds of diagrams that I am very familiar with... two questions: 1) what is the pronounciation of <*>? 2) is there a way to define <*> from (>>=)? how?
23:07:00 <hpc> @src ap
23:07:00 <lambdabot> ap = liftM2 id
23:07:07 <hpc> bah
23:07:21 <ski> well, i pronounce it `ap' .. for the other question, see ^
23:07:24 <hpc> anyhoo, ap = (<*>), so see how that's defined
23:07:31 <ski> @src liftM2
23:07:32 <lambdabot> liftM2 f m1 m2 = do
23:07:32 <lambdabot> x1 <- m1
23:07:32 <lambdabot> x2 <- m2
23:07:33 <lambdabot> return (f x1 x2)
23:08:49 <ski> liftM2 f m0 m1 = m0 >>= \x0 -> m1 >>= \x1 -> return (f x0 x1)
23:08:54 <ski> = m0 >>= \x0 -> (return . f x0 <$> m1)
23:09:17 <ski> so
23:09:31 <edrx> so that's a definition for <*>?
23:09:43 chexum joins (~quassel@gateway/tor-sasl/chexum)
23:09:47 <edrx> I'll need some minutes to type each subexpression of that
23:09:55 <geekosaur> use `id` for `f`
23:10:20 <ski> er, sorry, no `return' in the last line
23:10:26 <ski> = m0 >>= \x0 -> (f x0 <$> m1)
23:11:34 <ski> mf `ap` mx = mf >>= \f -> f <$> mx
23:11:35 <ski> = mf >>= (<$> mx)
23:14:44 <ski> (i used here that `f <$> mx ={synonym}= fmap f mx ={law}= liftM f mx ={definition}= mx >>= \x -> return (f x)' to simplify the `m1 >>= \x1 -> return (f x0 x1)' to `f x0 <$> m1')
23:15:48 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
23:17:01 <edrx> let me see
23:18:21 <ski> edrx : it's not uncommon, if you're making both an `Applicative', and a `Monad' instance, to do the former like `pure = return' and `(<*>) = ap', and then do the "real implementation" in `Monad', defining `return' and `(>>=)' (and maybe `(>>)', if you care enough / want something better than the default implementation)
23:19:21 <ski> similarly, if you're making an `Applicative' instance, you can make the `Functor' instance by `fmap = liftA' (`liftA' is defined in terms of `pure' and `(<*>)'). or, if you already also have a `Monad' instance, you could go directly for `fmap = liftM'
23:20:19 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
23:21:12 <ski> iow, `liftA' and `liftM' are suitable default implementations for `fmap' (/ `(<$>)'), in case you have the "proper" implementation in `Applicative' or `Monad'. and similarly `ap' (and `return') is a suitable default implementation of `(<*>)' (and `pure'), if you're doing `Monad'
23:23:31 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
23:24:10 <ski> it would also be nice if one could implement `Monad' by defining `join' (and `fmap' in `Functor', possibly via `liftA'), and then `mx >>= k = join (k <$> mx)' .. but alas, there are currently technical difficulties to this (related to being able to derive `Functor',`Applicative',`Monad' instances for `newtypes', iirc)
23:24:50 <ski> (because sometimes, it's easier to think in terms of `join' than `(>>=)'/`(=<<)' (or even `(>=>)'/`(<=<)'))
23:28:53 × chomwitt quits (~chomwitt@2a02:587:dc14:f500:3759:458b:6e75:9dca) (Ping timeout: 268 seconds)
23:29:19 nckx is now known as nckhexen
23:33:19 <edrx> are the symbols "={synonym}=", "={law}=", "={definition}=" common? I'm going to start using them!
23:33:29 × rosalind quits (rosalind@id-194105.uxbridge.irccloud.com) (Quit: Yawn)
23:33:50 rosalind joins (rosalind@id-194105.uxbridge.irccloud.com)
23:34:53 <edrx> oops
23:35:08 <edrx> I think I've asked the wrong question =/
23:35:50 <edrx> I was looking for a way to define <*> - not <$> - from return and (>>=)...
23:36:46 <geekosaur> you were shown the definiiton of `ap` which is <*>, thn how to derive it from >>=
23:37:03 <edrx> gaaah
23:37:08 <edrx> let me read that again, sorry
23:38:54 rosalind parts (rosalind@id-194105.uxbridge.irccloud.com) ()
23:41:31 × edrx quits (~Eduardo@2804:18:5805:83e:c9df:9b:886f:e903) (Ping timeout: 260 seconds)
23:47:19 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
23:50:29 <ski> @tell edrx "are the symbols \"={synonym}=\", \"={law}=\", \"={definition}=\" common? I'm going to start using them!" -- well, `={...}=' is just a symbol i've been using (and others have used similar symbols before) for documenting the *reason*/*justification* for an equality holding, when doing equational reasoning (for reasoning about code, including refactoring code)
23:50:30 <lambdabot> Consider it noted.
23:51:28 anthezium joins (~anthezium@75.164.54.59)
23:53:31 <anthezium> hey folks, does anyone know what the blessed way to do things like map a closed type family over a type-level list promoted with DataKinds is?  Is the functionality from e.g. https://hackage.haskell.org/package/type-list-0.5.0.0 duplicated in a non-deprecated place?
23:54:20 <anthezium> is there a way to promote term-level map from the prelude, or something?
23:56:55 <ski> @tell edrx "I was looking for a way to define <*> - not <$> - from return and (>>=)..." -- and i derived, from the definition `ap = liftM2 id', and the definitions of `liftM',`liftM2' (in terms of `do'-notation / `(>>=)' and `return'), (also using the definitions `(<$>) = fmap' and (implicitly) `id x = x'), and the laws `liftM = fmap' and `ap = (<*>)', an alternate definition of `(<*>)'/`ap' in terms
23:56:55 <lambdabot> Consider it noted.
23:57:01 <ski> of`(>>=)' and `(<$>)'
23:57:10 <ski> @tell edrx .. of `(>>=)' and `(<$>)'
23:57:11 <lambdabot> Consider it noted.
23:58:02 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
23:58:37 <moonsheep> How many bytes can I receive from a TCP stream with the network package?
23:58:45 <moonsheep> The docs say that "Considering hardware and network realities, the maximum number of bytes to receive should be a small power of 2, e.g., 4096."
23:58:48 L29Ah joins (~L29Ah@wikipedia/L29Ah)
23:58:59 <moonsheep> Yet it is my understanding that TCP can split messages into separate packets and deliver them in order
23:59:21 <moonsheep> So do I have to manually receive 4k chunks and reassemble them?

All times are in UTC on 2022-09-30.