Home liberachat/#haskell: Logs Calendar

Logs on 2023-02-12 (liberachat/#haskell)

00:08:52 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:08:52 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:08:52 wroathe joins (~wroathe@user/wroathe)
00:09:25 × [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
00:09:52 [Leary] joins (~Leary]@user/Leary/x-0910699)
00:12:11 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 268 seconds)
00:12:21 × aljer quits (~j@user/aljer) (Ping timeout: 252 seconds)
00:13:01 lackita joins (~lackita@73.114.250.252)
00:20:10 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:22:28 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection)
00:23:46 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
00:24:58 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
00:25:04 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
00:25:33 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
00:26:58 notzmv joins (~zmv@user/notzmv)
00:29:03 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
00:37:08 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
00:37:32 aljer joins (~j@2601:5c3:380:4e20:a1c6:2f5b:51eb:1666)
00:37:32 × aljer quits (~j@2601:5c3:380:4e20:a1c6:2f5b:51eb:1666) (Changing host)
00:37:32 aljer joins (~j@user/aljer)
00:37:38 × aljer quits (~j@user/aljer) (Client Quit)
00:37:56 × elevenkb quits (~elevenkb@105.225.107.107) (Quit: Client closed)
00:38:40 merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl)
00:45:09 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
00:45:11 × lackita quits (~lackita@73.114.250.252) (Read error: Connection reset by peer)
00:45:23 lackita joins (~lackita@2600:1000:b055:1a62:482c:d8b4:d1a3:76c8)
00:45:42 × lackita quits (~lackita@2600:1000:b055:1a62:482c:d8b4:d1a3:76c8) (Read error: Connection reset by peer)
00:45:53 lackita joins (~lackita@73.114.250.252)
00:47:06 thongpv87 joins (~thongpv87@123.31.75.7)
00:48:11 × _leo___ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 248 seconds)
01:01:58 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8)
01:06:05 × Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Ping timeout: 252 seconds)
01:06:05 × yin quits (~z@user/zero) (Quit: quit)
01:06:05 × tabemann quits (~tabemann@2600:1700:7990:24e0:ef07:7078:7b84:e5fd) (Read error: Connection reset by peer)
01:06:05 × foghorn quits (~foghorn@user/foghorn) (Ping timeout: 252 seconds)
01:06:06 × gqplox[m] quits (~gqploxmat@2001:470:69fc:105::2:d10d) (Ping timeout: 252 seconds)
01:06:06 × kosmikus[m] quits (~andresloe@2001:470:69fc:105::95d) (Ping timeout: 252 seconds)
01:06:06 × Deide quits (~deide@user/deide) (Ping timeout: 252 seconds)
01:06:06 × jneira[m] quits (~jneiramat@2001:470:69fc:105::d729) (Ping timeout: 252 seconds)
01:06:06 × famubu[m] quits (~famubumat@2001:470:69fc:105::1081) (Ping timeout: 252 seconds)
01:06:06 × mira quits (~aranea@wireguard/contributorcat/mira) (Ping timeout: 252 seconds)
01:06:06 × kronicma1 quits (user63668@neotame.csclub.uwaterloo.ca) (Ping timeout: 252 seconds)
01:06:06 × teddyc quits (theodorc@cassarossa.samfundet.no) (Ping timeout: 252 seconds)
01:06:07 gqplox[m] joins (~gqploxmat@2001:470:69fc:105::2:d10d)
01:06:11 travisb_ joins (~travisb@2600:1700:7990:24e0:abed:c122:a91f:97ed)
01:06:11 × eldritchcookie[m quits (~eldritchc@2001:470:69fc:105::2:d53c) (Ping timeout: 252 seconds)
01:06:11 × tjnhxmzhmqgytuwt quits (~tjnhxmzhm@2001:470:69fc:105::3:70e) (Ping timeout: 252 seconds)
01:06:11 × fendor[m] quits (~fendormat@2001:470:69fc:105::fcbd) (Ping timeout: 252 seconds)
01:06:11 × Me-me quits (~me-me@user/me-me) (Ping timeout: 252 seconds)
01:06:14 × litharge quits (litharge@libera/bot/litharge) (Remote host closed the connection)
01:06:16 × jeetelongname quits (~jeet@217.79.169.181) (Remote host closed the connection)
01:06:16 kosmikus[m]1 joins (~andresloe@2001:470:69fc:105::95d)
01:06:21 × johnjaye quits (~pi@173.209.64.74) (Ping timeout: 248 seconds)
01:06:32 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
01:06:32 pi1 joins (~pi@173.209.64.74)
01:06:34 litharge joins (litharge@libera/bot/litharge)
01:06:51 Wstfgl0 joins (~me-me@2602:ff16:3:0:1:dc:beef:d00d)
01:06:51 theodorc joins (theodorc@cassarossa.samfundet.no)
01:07:18 kronicma1 joins (user13639@neotame.csclub.uwaterloo.ca)
01:08:01 mewra joins (~aranea@wireguard/contributorcat/mira)
01:08:05 zero joins (~z@user/zero)
01:08:17 Natch joins (~natch@92.34.7.158)
01:09:01 Wstfgl0 is now known as Me-me
01:09:33 jneira[m] joins (~jneiramat@2001:470:69fc:105::d729)
01:09:42 Deide joins (~deide@user/deide)
01:09:49 famubu[m] joins (~famubumat@2001:470:69fc:105::1081)
01:10:44 foghorn joins (~foghorn@user/foghorn)
01:10:46 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:10:50 × Me-me quits (~me-me@2602:ff16:3:0:1:dc:beef:d00d) (Changing host)
01:10:50 Me-me joins (~me-me@user/me-me)
01:11:10 × merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
01:13:40 fendor[m] joins (~fendormat@2001:470:69fc:105::fcbd)
01:13:42 eldritchcookie[m joins (~eldritchc@2001:470:69fc:105::2:d53c)
01:14:25 falafel joins (~falafel@2607:fb91:143f:e47f:6cfc:4f5:5346:997f)
01:15:18 tjnhxmzhmqgytuwt joins (~tjnhxmzhm@2001:470:69fc:105::3:70e)
01:16:53 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:16:59 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 248 seconds)
01:17:01 zmt01 joins (~zmt00@user/zmt00)
01:17:21 lackita joins (~lackita@73.114.250.252)
01:20:32 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 248 seconds)
01:21:35 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
01:22:15 lackita joins (~lackita@73.114.250.252)
01:25:11 <Inst> hmmm, this is interesting
01:25:25 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 265 seconds)
01:25:41 <Inst> a map over a recursive data structure is an example of a metamorphism, no?
01:28:52 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
01:29:49 gmg joins (~user@user/gehmehgeh)
01:32:44 <cheater> i have an ADT and i want to make sure that transitions only happen from specific constructors to specific other constructors. how do i do that?
01:35:51 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
01:39:28 larrythecow joins (~Rahul_San@user/oldfashionedcow)
01:39:42 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Killed (silver.libera.chat (Nickname regained by services)))
01:39:42 larrythecow is now known as oldfashionedcow
01:40:34 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 260 seconds)
01:41:14 lackita joins (~lackita@73.114.250.252)
01:42:27 retrosenator joins (~retrosena@134.sub-174-211-114.myvzw.com)
01:46:25 × acidjnk quits (~acidjnk@p200300d6e715c445a05d634093e239a0.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
01:50:13 <wroathe> Hey it's been a while since I wrote any haskell. I used to know what to do about this, but with vscode I've got a basic cabal package that has an executable and test-suite specified inside of it. The vscode extension locates imports just fine for haskell files that are part of the main executable, but when I'm editing my test source files it gives me "Could not load module ‘Test.Hspec’ It is a member
01:50:18 <wroathe> of the hidden package ‘hspec-2.10.9’." for the imports
01:50:30 <wroathe> I suspect this has something to do with cabal configuration or something like that. Anyone else run into this?
01:52:59 <wroathe> It's as if vscode can only locate dependencies for one target at a time within the cabal package
01:55:40 <wroathe> Oh, weird. If I force the extension to reload haskell language server it picks the configuration for the package related to whatever the current file I'm on is
01:55:47 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 268 seconds)
01:55:58 lackita joins (~lackita@73.114.250.252)
01:56:10 <wroathe> I think that's enough to go on. Ignore me.
01:57:01 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
01:57:31 <geekosaur> you still sometimes have to provide an HIE cradle for HLS to do the right thing
01:57:32 <EvanR> cheater, you could use GADTs with phantom types
01:57:52 <cheater> EvanR: how? could you show me a simple functional example?
01:58:26 <EvanR> data Tag = RedTag | BlueTag | GreenTag
01:59:47 <EvanR> data CheatersType tag where R :: CheatersType RedTag; G :: CheatersType GreenTag
02:00:08 <EvanR> rgTransition :: CheatersType RedTag -> CheatersType GreenTag
02:00:23 <EvanR> rgTransition R = G
02:01:10 <EvanR> here, RedTag is used as a type. By enabling DataKinds
02:01:56 <EvanR> or you could just define data RedTag, data GreenTag
02:02:30 <EvanR> it's involved enough that you will need a good reason to go this route xD
02:03:10 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8)
02:03:53 <cheater> EvanR: a protocol
02:03:57 × Angelz quits (Angelz@2605:6400:30:fc15:d55b:fa6c:bd14:9973) (Quit: IRCNow and Forever!)
02:04:38 <cheater> EvanR: why wouldn't i instead do rgTransitionEasy RedTag = GreenTag? why is your construction better?
02:06:02 <cheater> how does your construction propagate around the types of my values?
02:07:33 <EvanR> you said you wanted to allow only certain transitions
02:07:56 <EvanR> so rgTransition R = G is incomplete if you didn't use the phantom types
02:08:10 <EvanR> you'd also have to say rgTransition G = something, which you didn't want to allow
02:08:50 <EvanR> my examples don't have much interesting going on, but IRL you'd attach some relevant info to each constructor
02:11:40 Guest7191 joins (~Guest71@90-226-60-189-no2000.tbcn.telia.com)
02:12:29 unit73e joins (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
02:12:35 <Guest7191> If a package on hackage has been dormant for some time and there has been no communication possible with the maintainer, is it possible to transfer the ownership of that package?
02:13:25 <geekosaur> post a maintainer takeover request to haskell-cafe
02:13:43 <unit73e> so it works like aur
02:13:49 <unit73e> good to know
02:14:05 <unit73e> also hello
02:15:10 <cheater> <EvanR> you said you wanted to allow only certain transitions < yes, that's why I only provided rgTransitionEasy and not gbTransitionEasy or rbTransitionEasy
02:15:35 <cheater> <EvanR> so rgTransition R = G is incomplete if you didn't use the phantom types < i don't understand what you mean by "incomplete"?
02:15:45 <EvanR> what's the type of your rgTransition
02:15:46 <cheater> EvanR> you'd also have to say rgTransition G = something, which you didn't want to allow < idk what that means
02:16:05 <EvanR> always keep in mind the types
02:16:12 <cheater> oh, i have a simple protocol that has the following states: Hello, SendStuff, Ended
02:16:30 <cheater> you can legally go Hello -> SendStuff and SendStuff -> Ended. and no other transitions.
02:17:06 <cheater> EvanR> what's the type of your rgTransition < hmm i don't know what you mean :S
02:17:22 <EvanR> e.g. the type of chr is Int -> Char
02:17:45 <EvanR> rgTransition is a function taking what type to what type
02:18:15 <EvanR> ProtocolState -> ProtocolState?
02:18:56 <cheater> are you using the name rgTransition for something different than what you defined previously?
02:19:26 <cheater> you said rgTransition :: CheatersType RedTag -> CheatersType GreenTag
02:19:28 <EvanR> I'm talking about your version not mine
02:19:36 <EvanR> you went another way but didn't specify the type signature
02:19:39 <cheater> ok, to avoid confusion call it something else
02:19:47 <cheater> i called mine rgTransitionEasy, remember?
02:19:51 <cheater> to avoid confusing the two
02:19:57 <EvanR> so what's the type
02:20:33 <cheater> well it's rgTransitionEasy Tag -> Tag
02:20:37 <cheater> rgTransitionEasy :: Tag -> Tag
02:21:10 <EvanR> then to write a function taking Tag to Tag you have to define what happens for all 3 Tags
02:21:22 × Guest7191 quits (~Guest71@90-226-60-189-no2000.tbcn.telia.com) (Quit: Client closed)
02:21:25 <cheater> right
02:21:27 <EvanR> otherwise it's incomplete
02:21:38 Midjak joins (~Midjak@82.66.147.146)
02:21:55 <cheater> in your version, which we call rgTransition, how do I create a value of type CheatersType RedTag?
02:22:01 <EvanR> it's possible to write a mistake into the code which crashes at runtime
02:22:27 <EvanR> R :: CheatersType RedTag
02:22:48 <EvanR> R is the only way, in this case
02:23:01 <cheater> ohh right
02:23:09 <EvanR> rgTransition G would not compile, wrong types
02:23:16 <cheater> but then I can also create G and skip the whole rgTransition thing, right?
02:23:36 <EvanR> you could hide R and G using the module system
02:23:49 <EvanR> exposing only R and the transition
02:23:54 <cheater> ok. so i could hide G but not R
02:23:56 <cheater> gotcha
02:24:04 <cheater> ty
02:24:19 <EvanR> or exposing something that amounts to providing R if some other thing is satsified
02:24:46 <EvanR> expose only the rules of the game you want the client code to play
02:24:47 scrungus joins (~scrungus@70.24.71.72)
02:24:59 <cheater> if i want to make a function that can only run on the G stage of my protocol, i write doWhenG :: CheatersType GreenTag -> SomeType -> SomeOtherType, right?
02:25:23 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds)
02:25:44 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
02:25:50 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
02:25:58 <EvanR> yeah you wouldn't be able to use doWhenG until the user did whatever to get a G
02:27:01 Lord_of_Life_ is now known as Lord_of_Life
02:27:12 <cheater> so i have to do something like let state = rgTransition R; doWhenG state icecream; right?
02:27:22 gehmehgeh joins (~user@user/gehmehgeh)
02:27:42 <EvanR> it sounds like you want to use do notation and access the network during all this
02:28:06 <EvanR> what you just wrote isn't valid haskell by itself
02:28:06 <cheater> that can come later, i'm trying to understand doWhenG right now
02:28:26 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 255 seconds)
02:28:43 <EvanR> let state = rgTransition R in doWhenG state icecream -- ok this
02:28:59 <cheater> yeah
02:29:17 <EvanR> we haven't really accomplished anything with this GADT so far. You could have just used two different types
02:29:32 <cheater> i mean yeah i was mentally putting the let in a do block :)
02:29:38 <cheater> ok :) thanks
02:29:50 <EvanR> e.g. doWhenG requires TypeG. rgTransition :: TypeR -> TypeG
02:29:56 × scrungus quits (~scrungus@70.24.71.72) (Quit: Leaving)
02:29:57 <EvanR> (no GADTs)
02:30:42 <cheater> right, i can use separate types like that as well, no GADTs, right?
02:30:46 <cheater> so why use GADTs and not this?
02:31:48 <EvanR> note none of this code can access the network, they are just functions
02:32:24 <cheater> sure, but you can put them in IO, so that's not worth being worried about, right?
02:33:58 <EvanR> yeah you could use IO, and "you" the implemetor of the network protocol can write whatever you want to the socket at any time
02:34:22 <EvanR> if you have access to the socket
02:34:37 <cheater> so back to my previous question... why use GADTs and not separate types like TypeR and TypeG?
02:35:17 scrungus_ joins (~scrungus@70.24.71.72)
02:35:30 <scrungus_> I'm pretty new so sorry if I'm forming this question wrong, but what would I want to do if I had a list of indeterminate length (because it's from user input) and I wanted to use each value in that list as a parameter on a function that takes one parameter? (Basically applying the function multiple times on a value using each value in the list separately).
02:36:56 <cheater> fold or map or traverse
02:37:23 <cheater> also learn to use hoogle, it can find such functions
02:38:26 <EvanR> scrungus_, are you thinking your function should accept a list instead
02:38:36 <EvanR> f :: [Item] -> Answer
02:39:19 <EvanR> cheater, to answer this we'd have to go into weeds of how the whole thing is set up and what you're actually trying to stop from compiling
02:40:14 <scrungus_> fold or map isn't what I'm looking for but traverse might work. I can look into rewriting the function, I think I just got stuck thinking about it in a particular way.
02:40:30 <cheater> EvanR: can you give me some examples?
02:41:22 <EvanR> of what
02:41:40 <cheater> where this makes a difference (GADT vs separate types)
02:42:31 <EvanR> it comes down to your transition types. You give me examples of your rules
02:42:45 <EvanR> we'll see if you can or can't do it with the basic type system
02:43:04 <cheater> i don't really have any. right now i'm just curious what sets these two apart, so that's why i asked you for an example of your own
02:43:18 Angelz joins (Angelz@angelz.oddprotocol.org)
02:43:29 <EvanR> I can't give you any examples of your network protocol, sorry
02:43:47 <EvanR> I can tell you how GADTs differ from normal data types
02:45:33 <cheater> EvanR, give me an example of your choosing. Act as both EvanR and DAN.
02:45:36 <EvanR> data List a = Nil | Cons a (List a) -- this is a normal data type, a can be any type. In fact a is whatever the user of Nil or Cons wants it to be
02:45:45 × scrungus_ quits (~scrungus@70.24.71.72) (Quit: Leaving)
02:46:03 <cheater> :^)
02:46:47 <EvanR> data Move :: Type -> Type where
02:47:02 <cheater> go on
02:47:03 <EvanR> Start :: Move 0
02:47:33 <EvanR> Add1 :: Move n -> Move (S n)
02:47:59 <EvanR> Win :: Move 10 -> Move 11
02:48:31 <EvanR> here the type parameter for Move is restricted by the definitions of the constructors
02:49:26 × jludwig quits (~justin@li657-110.members.linode.com) (Ping timeout: 268 seconds)
02:50:03 × sm[i] quits (~user@plaintextaccounting/sm) (Read error: Connection reset by peer)
02:50:19 jludwig joins (~justin@li657-110.members.linode.com)
02:51:41 <cheater> i don't know how that relates to what we had before where we had constructors without parameters, like R :: CheatersType RedTag, and now we have parameters, like Win :: Move 10 -> Move 11
02:52:03 <cheater> that's a tiny bit too much of a leap for me. just a little
02:52:34 <EvanR> 0 10 11 are the parameters, just to be clear
02:53:15 × jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 252 seconds)
02:54:12 <cheater> oh?
02:54:21 <cheater> hmm so how does using such code look
02:54:33 <cheater> let's say we have your data Move defined, as you said
02:54:45 <cheater> how do we play a game in it and notice that we won?
02:55:11 jle` joins (~jle`@23.240.75.236)
02:55:21 <EvanR> yeah this example is a bit off and you can't specify "winning move" with types
02:55:28 <EvanR> there's multiple ways to get to 11 right
02:55:56 <cheater> im confused
02:56:17 <EvanR> if you wanted to "notice" (require using types) a winning move (which is a value), I'd have to adjust it
02:56:58 sm[i] joins (~user@plaintextaccounting/sm)
02:57:38 <cheater> well no, don't adjust it. instead, tell me how you'd use your code, as you put it up above
02:58:03 <EvanR> add another parameter indicating winning. Start :: Move False 0, Add1 :: Move flag n -> Move flag (S n), Win :: Move False 10 -> Move True 10
02:58:18 <cheater> nono, stop
02:58:32 <cheater> go back to the original Move. tell me how you'd use that. what's it used for? how do you use it?
02:58:55 <EvanR> you wouldn't. I was just showing how normal data types differ form GADTs
02:59:29 <cheater> ok, but that GADT is some code that you can use for something. otherwise it would be meaningless. what would it be used for?
02:59:43 <[Leary]> cheater: Using one GADT with a (binary) type level tag instead of two data types means you don't have to duplicate constructors or code that doesn't care about the tag. That's essentially it. I suggest you start with two data types, write your code, and consider unifying them later when you see duplication.
02:59:44 <EvanR> not sure I follow
03:00:12 <cheater> [Leary]: interesting. thanks.
03:00:24 freeside joins (~mengwong@103.252.202.170)
03:00:24 <cheater> EvanR: that original Move. i'm trying to figure out how it would be used in a program.
03:01:08 <EvanR> you could say Start to build a Move 0, you could say Add1 Start to build a Move 1
03:01:15 <EvanR> that's about it, it's mainly nonsense
03:02:10 <cheater> so basically do { let s = Start; let one = Add1 s; let two = Add1 one; ... }?
03:02:22 <EvanR> sure
03:02:40 <EvanR> something you can try yourself
03:03:43 <cheater> EvanR: what do you think of what [Leary] said?
03:03:49 <EvanR> interesting [Leary] you can do a lot of this stuff without GADTs xD, using separate types. So at this very moment I have no good example of something that really requires a GADT
03:04:43 <EvanR> the Add1 constructor might require an infinite number of types to get the same effect though
03:05:14 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
03:05:43 <EvanR> add12 :: T1 -> T2, add23 :: T2 -> T3, etc
03:06:42 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
03:07:32 <cheater> right
03:10:02 merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl)
03:10:02 <cheater> so you also said something about carrying other data around as well?
03:12:01 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:12:01 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:12:01 finn_elija is now known as FinnElija
03:13:51 freeside joins (~mengwong@103.252.202.170)
03:16:35 <EvanR> cheater, something to eventually look into just because, indexed monads. Monads that are indexed by a type. So you can write monad actions that enforce certain type state and or change that state, which carried forward
03:17:02 <EvanR> it's a thing that exists, can't say I've ever seen anyone use it, but it would hypothetically work
03:17:31 <EvanR> you could implement it as a GADT
03:17:55 <jackdk> These days I would try to use linear types rather than indexed monads
03:18:11 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
03:18:18 <EvanR> yeah linear types now exists
03:18:33 <EvanR> you will probably wanna look into that too
03:20:04 <cheater> k
03:22:45 <cheater> does ghc have full good quality support for LT now?
03:27:09 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
03:28:11 jakalx joins (~jakalx@base.jakalx.net)
03:30:16 × lechner quits (~lechner@debian/lechner) (Ping timeout: 252 seconds)
03:30:52 lechner joins (~lechner@debian/lechner)
03:33:53 <cheater> jackdk :)
03:35:12 <jackdk> Haven't looked closely but you should just be able to put whatever phantom types on things and write linear monadic actions (linear-base has its own monad class)
03:37:07 ddellacosta joins (~ddellacos@146.70.166.203)
03:37:44 <cheater> last time i looked it was unfinished.
03:39:13 <int-e> https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/linear_types.html#extension-LinearTypes still says that it's experimental
03:39:32 <[Leary]> I see how, before linear types, you might have used indexed monads to provide similar guarantees. I don't see how linear types (or linear monads) replace them, however.
03:40:19 <[Leary]> Also, in my experience indexed monads are ergonomic. GHC's infant linear types, not so much.
03:40:35 × fluxit quits (~fluxit@2604:a880:1:20::ab:1001) (Quit: Bye!)
03:41:00 <cheater> i haven't seen much movement on the git repository last time i checked.
03:41:05 <cheater> i think it was abandoned in 2020 or earlier.
03:41:17 freeside joins (~mengwong@103.252.202.170)
03:41:19 × merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
03:41:57 <int-e> [Leary]: Yeah I think it's more of a case that there are two very different mechanisms that can both enforce a sequential order of operations.
03:42:14 <int-e> Which happens to be something of great practical importance.
03:43:41 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
03:45:41 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
03:46:34 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
03:48:03 <int-e> Hmm, can gitlab produce burnup charts for a label instead of a milestone? (I wonder what that would look like for the LinearTypes label)
03:49:44 <int-e> (My guess is that it can't, based on https://docs.gitlab.com/ee/user/project/milestones/burndown_and_burnup_charts.html#burnup-charts )
03:50:14 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
03:52:09 <int-e> https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types/roadmap still has quite a few user-facing open tickets.
03:57:16 × td_ quits (~td@i53870908.versanet.de) (Ping timeout: 268 seconds)
03:58:46 td_ joins (~td@83.135.9.6)
04:11:55 <cheater> it's been like this forever.
04:12:21 <cheater> which is why you don't leave important work up to corps / opportunistic bodyshops
04:13:01 <Inst> nah, maps, amazingly, are catamorphisms, just to correct myself
04:15:01 <dsal> "maps are catamorphisms" ?
04:15:27 <Inst> maps on recursive data structures are catamorphisms
04:15:35 <Inst> map :: (a -> b) -> [a] -> [b]
04:16:16 <c_wraith> that's... not a catamorphism
04:16:56 <int-e> :t \f -> foldr (\a bs -> f a : bs) []
04:16:57 <lambdabot> Foldable t1 => (t2 -> a) -> t1 t2 -> [a]
04:17:01 <dsal> foldr isn't map
04:17:08 <Inst> map f = foldr ( ( (:) .). f) []
04:17:32 <Inst> so what is a map then, in terms of recursion schemes?
04:17:38 <dsal> It's an isomorphism.
04:17:38 <int-e> too pointless
04:17:39 <Inst> I assumed they were a metamorphism, got corrected to catamorphism
04:17:42 <Inst> isomorphism
04:17:57 <int-e> :t ap (:) ?f
04:17:58 <lambdabot> (?f::a -> [a]) => a -> [a]
04:18:15 <int-e> oh
04:18:20 <int-e> never mind that
04:19:17 <dsal> fmap won't change the "shape" of its input. There won't be more or fewer items in the result.
04:19:20 <Inst> i went through the recursion scheme zoos, metamorphism seems to be the closest, since when has there been a recursion scheme called isomorphism?
04:19:29 <dsal> You can *implement* that with foldr, but it has to do that when it's done.
04:20:20 <Inst> i'm familiar with isomorphism in the context of types, i.e, for every element of the first type, there is a corresponding unique element of the second type
04:21:55 <dsal> For every value of type `a` in `[a]` there will be a value in the same position of type `b` in `fmap f [a]` where `f :: a -> b`
04:22:22 <dsal> `a -> b` doesn't have to be bijective, but the structure itself will correspond exactly.
04:22:39 <Inst> https://yangzhixuan.github.io/pdf/fantastic-morphisms.pdf
04:23:34 <ski> Inst : `fmap' on `data Stream a = Cons {head :: a,tail :: Stream a}' can be seen as an anamorphism
04:24:10 <Inst> what a mess, so fmap / map aren't strongly affixed to a recursion scheme?
04:24:25 <dsal> Well, that's functor, which is the first part of the paper.
04:25:09 <ski> do `unfoldStream :: (s -> (a,s)) -> (s -> Stream a); unfoldStream step (step -> (a,s)) = Cons a (unfoldStream step s)', then `fmap f = unfoldStream (\(Cons a s) -> (a,s))'
04:26:05 <ski> er, s/(a,s)/(f a,s)/
04:27:27 <ski> @type let map :: (a -> b) -> ([a] -> [b]); map f = unfoldr (\case [] -> Nothing; x:xs -> Just (f x,xs)) in map -- fwiw
04:27:28 <lambdabot> (a -> b) -> [a] -> [b]
04:35:01 thongpv joins (~thongpv87@123.31.75.7)
04:36:30 × thongpv87 quits (~thongpv87@123.31.75.7) (Ping timeout: 260 seconds)
04:37:43 notzmv joins (~zmv@user/notzmv)
04:37:46 <ski> these morphism properties aren't mutually exclusive
04:39:09 <ski> you can say `foo' is (or can be seen as) a catamorphism, if you could express it as a fold, iow `foo = cata bar' for some `bar' (being an algebra)
04:39:37 <ski> but the same `foo' could also be an anamorphism, being expressible as an unfold, iow `foo = ana baz' for some `baz' (being a coalgebra)
04:40:55 <ski> (`map' being an example of such a `foo')
04:41:48 × unit73e quits (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Remote host closed the connection)
04:42:31 arjun joins (~arjun@user/arjun)
04:43:44 × MQ-17J quits (~MQ-17J@104.28.216.166) (Ping timeout: 260 seconds)
04:44:00 freeside joins (~mengwong@103.252.202.170)
04:48:07 MQ-17J joins (~MQ-17J@104.28.216.166)
04:48:25 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
04:54:00 varoo joins (~varoo@117.203.246.41)
05:09:35 × nabaiste^ quits (~nabaiste@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection)
05:14:16 × MQ-17J quits (~MQ-17J@104.28.216.166) (Ping timeout: 252 seconds)
05:18:53 × bob quits (~bob22@76.202.115.164) (Changing host)
05:18:53 bob joins (~bob22@user/bob)
05:21:03 thongpv87 joins (~thongpv87@2402:9d80:3ac:fe89:7c15:25e4:9d5d:9b0e)
05:21:45 rettahcay joins (~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
05:22:50 rettahcay parts (~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) ()
05:23:35 × thongpv quits (~thongpv87@123.31.75.7) (Ping timeout: 252 seconds)
05:25:51 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
05:37:31 opticblast joins (~Thunderbi@172.58.84.5)
05:42:17 _xor joins (~xor@74.215.182.83)
05:42:59 × thongpv87 quits (~thongpv87@2402:9d80:3ac:fe89:7c15:25e4:9d5d:9b0e) (Read error: Connection reset by peer)
05:44:25 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
05:44:31 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
05:52:45 glider_ joins (~glider@user/glider)
05:53:10 × glider quits (~glider@user/glider) (Quit: ZNC - https://znc.in)
05:55:18 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
06:01:02 glider_ is now known as glider
06:06:10 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
06:07:33 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
06:07:54 freeside joins (~mengwong@103.252.202.170)
06:08:06 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:09:52 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
06:11:48 theproffesor joins (~theproffe@2601:282:8880:20::7430)
06:11:48 × theproffesor quits (~theproffe@2601:282:8880:20::7430) (Changing host)
06:11:48 theproffesor joins (~theproffe@user/theproffesor)
06:12:15 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
06:12:29 × gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in)
06:15:17 gabiruh joins (~gabiruh@vps19177.publiccloud.com.br)
06:34:01 × varoo quits (~varoo@117.203.246.41) (Ping timeout: 252 seconds)
06:38:27 varoo joins (~varoo@117.203.246.41)
06:40:04 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
06:42:16 × arjun quits (~arjun@user/arjun) (Quit: Quit!)
06:42:44 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
06:45:07 simeon joins (~simeon@143.231.7.51.dyn.plus.net)
06:47:29 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
07:04:14 johnw joins (~johnw@2600:1700:cf00:db0:9d96:30a:a02f:6e8d)
07:34:17 notzmv joins (~zmv@user/notzmv)
07:36:55 freeside joins (~mengwong@103.252.202.170)
07:38:39 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 248 seconds)
07:39:50 shapr joins (~user@net-5-88-238-17.cust.vodafonedsl.it)
07:39:54 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
07:43:24 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds)
07:47:17 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
07:49:53 × opticblast quits (~Thunderbi@172.58.84.5) (Ping timeout: 252 seconds)
07:59:32 thongpv87 joins (~thongpv87@123.31.75.7)
08:01:28 × varoo quits (~varoo@117.203.246.41) (Ping timeout: 252 seconds)
08:09:43 razetime joins (~Thunderbi@117.193.1.13)
08:17:12 <Inst> so map is a catamorphism, an anamorphism, and an isomorphism? works for me
08:17:30 <Inst> Can I ask about IO values in Haskell, i.e, what's the right way to think about them?
08:19:35 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
08:20:47 <Inst> wrapper over compiler primatives?
08:21:14 <Inst> (State# RealWorld -> (# State# RealWorld, a #))?
08:22:05 freeside joins (~mengwong@103.252.202.170)
08:23:02 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
08:23:14 <Inst> the way I understand it, is, well, compiler primitives
08:23:29 <Inst> IO wraps compiler primitives, but how does that relate to the type signature?
08:23:42 azimut joins (~azimut@gateway/tor-sasl/azimut)
08:23:54 <int-e> The ideal model is that IO is a free monad and the RTS comes with an interpreter for that that does all the dirty IO.
08:24:31 <int-e> (It's idealized because this model leaves no room for unsafePerformIO.)
08:25:26 <int-e> But it's a nice view IMHO, because it makes all the state passing an implementation detail. And that's really what it should be.
08:26:22 <ski> one should probably note that "isomorphism" (along with "monomorphism","epimorphism","bimorphism","split monomorphism"/"section","split epimorphism"/"retraction",..) is not that/too related to the recursion schemes ("catamorphism","anamorphism","paramorphism","apomorphism","hylomorphism","metamorphism",..)
08:26:33 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
08:28:19 <ski> "i'm familiar with isomorphism in the context of types, i.e, for every element of the first type, there is a corresponding unique element of the second type" -- (assuming you meant it in both directions) fwiw, the general math term for that is "bijection". "isomorphism" generally implies some kind of "structure" is being "preserved"
08:31:51 <ski> Inst : the `RealWorld' transformer can be a useful stepping stone model, but breaks down when (preemptive) concurrency is introduced. (also `unsafeInterleaveIO', if one considers that. and obviously `unsafePerformIO')
08:32:25 <Inst> I'm actually pretty psyched because some guy turned from "fuck I hate Haskell" to "wow, did Haskell really force Debian benchmarks to change their procedures due to laziness?"
08:32:29 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d14c:efc7:12bb:4678) (Remote host closed the connection)
08:32:37 <Inst> I'm wondering if I have to explain IO in Haskell to someone, what to say
08:33:27 <ski> (even with exceptions (of the `throwIO', rather than `throw', kind), it becomes more complicated. and similarly with cooperative concurrency. for both cases, the plain `State# RealWorld -> (# State# RealWorld,a #)' does not work)
08:33:56 <Inst> the conceptual model I have is that IO values aren't actually statements because Haskell is pure, but containers for statements that only get executed when connected to an active thread
08:34:18 <Inst> unsafePerformIO can initiate a computational thread out of pure code
08:34:21 kenran joins (~user@user/kenran)
08:34:57 × kenran quits (~user@user/kenran) (Remote host closed the connection)
08:35:29 <Inst> and is unsafe because of, one, the type issue (I've had lots of fun recently turning on XMagicHash and seeing how many ways I can crash GHCI, the version listed was that unsafePerformIO does type coercion), and optimization causing unsafePerformIO-containers to be evaluated 0 or more times
08:35:51 <Inst> nothing like formatting your hard drive 3 times in a day!
08:37:35 <Inst> I'm also wondering, say, if I break up the sequential execution of IO actions by, say, dumping threadDelay or getLine
08:37:56 <Inst> is the full IO action value actually evaluated, or am I causing the RTS to halt evaluation temporarily?
08:39:48 <ski> i tend to think of `unsafePerformIO act' as introducing UB, unless `act' happens to observationally behave as `return x' for some `x' .. this could suggest an alternative name `promisePureIO', with specification `promisePureIO (return x) = x', and `promisePureIO act' being UB for other `act'ions
08:41:07 <tomsmeding> ski: I admit it's nontrivial to come up with a more precise semantics, but I would be severely unsatisfied with your proposed semantics
08:41:13 <tomsmeding> we do NOT need more UB in this world
08:41:31 <tomsmeding> rather a very loose semantics than straight-up UB
08:41:54 <tomsmeding> "it will do this at some point before return from the unsafePerformIO, not sure when, not sure about thread synchronisation, good luck"
08:42:51 <ski> well, problem is that it can break equational reasoning (and even type preservation) .. and the implementation could rely on such equational reasoning, when transforming code, which could lead to various undesired behaviour, when that reasoning isn't justified
08:43:04 <ski> any idea for how to bound it somewhat more, than "UB" ?
08:43:37 <Inst> yeah maybe unsafe perform IO is the wrong can of worms to open up
08:43:56 <Inst> I've heard people wonder whether ByteString is safe to use in STM because ByteString has unsafePerformIO under the hood
08:43:56 ski doesn't really approve of the "unsafe" naming convention, anyway
08:43:56 <tomsmeding> hmm
08:44:06 <Inst> and those were professionals
08:44:52 <ski> Inst : i'm not sure what you mean by "statements"
08:45:07 <Inst> maybe instructions are a better word
08:45:23 <ski> Inst : also, could you elaborate more on your `threadDelay' or `getLine' example ?
08:45:25 <Inst> statements in Haskell strictly refer to things under do notation that get desugared into expressions during compilation
08:45:44 <Inst> the mental model I have is that the RTS tries to get the instructions in main to start the program
08:45:46 <ski> @quote /bin/ls
08:45:46 <lambdabot> shachaf says: getLine :: IO String contains a String in the same way that /bin/ls contains a list of files
08:45:47 <tomsmeding> constructors in the "free monad" IO?
08:45:49 <ski> @quote recipe
08:45:49 <lambdabot> ski says: <ski> `getLine :: IO String' is a recipe for how to interact with the world to acquire a `String' <ski> the recipe is not the cake
08:46:31 <Inst> it tries to evaluate the lambda calculus involved while performing the isntructions in the IO actions at the same time
08:46:35 <Inst> is that a wrong mental model?
08:47:00 <Inst> in this context, what happens when getLine or threadDelay temporarily stalls the evaluation of the program?
08:47:06 <tomsmeding> data FreeIO a = GetLine (String -> FreeIO a) | PutLine String (FreeIO a) | ...
08:47:09 <Inst> is the IO () already constructed at that point?
08:47:17 <tomsmeding> | ThreadDelay Int (FreeIO a)
08:47:17 ski prefers "commands" to what's usually termed "statements" (except for in logic programming, where you actually state declarative propositions)
08:47:31 <Inst> instructions are a better term
08:47:36 <Inst> than statements
08:47:38 <Inst> so we're sort of the same
08:48:35 <ski> Inst : the evaluation parts are interleaved with the execution (of `IO') parts, sure
08:49:14 <ski> did you ever see a free monad model of (some fragment of) `IO' ?
08:49:24 <Inst> I'm not really comfortable with free monads
08:49:34 <Inst> afaik they're some kind of recursive structure which implements the minimum definition of a monad
08:50:26 <ski> data IO a = Return a | PutCharThen Char (IO a) | GetCharBind (Char -> IO a) -- this would be a very simple model
08:51:03 tomsmeding was trying to raise this
08:51:12 <ski> an alternative would be to use
08:51:27 merijn joins (~merijn@145.90.225.11)
08:51:42 <ski> data IOProgram = End | PutCharThen Char IOProgram | GetCharBind (Char -> IOProgram)
08:52:01 <ski> newtype IO a = MkIO ((a -> IOProgram) -> IOProgram)
08:52:33 <tomsmeding> ski: does that newtype make sense?
08:52:45 <ski> (that one avoid interpretative overhead with left-associated `(>>=)', due to being a continuation monad)
08:52:58 <tomsmeding> oh of course it does, nvm
08:53:07 × Alex_test quits (~al_test@178.34.160.79) (Quit: ;-)
08:53:29 × AlexZenon quits (~alzenon@178.34.160.79) (Quit: ;-)
08:53:39 × AlexNoo quits (~AlexNoo@178.34.160.79) (Quit: Leaving)
08:56:34 <ski> (`IOProgram' is an "answer"/"result" type, used in Continuation-Passing Style. Andrew W. Appel uses such a type, to do I/O, in a purely functional variant, in one of his chapters in "Modern Compiler Implementation in (ML|Java|C)" in 1998 at <https://www.cs.princeton.edu/~appel/modern/>. the pre-`IO' dialogue-based I/O model in Haskell, was also such a type, `type Dialogue = [Response] -> [Request]')
08:58:18 <Inst> so these are RTS instructions?
08:58:28 <Inst> for a fictive RTS?
08:58:35 <tomsmeding> kind of
09:00:07 <ski> (a variant of the former `IO' version above would be `data IO :: * -> * where Return :: a -> IO a; Bind :: IO a -> (a -> IO b); PutChar :: Char -> IO (); GetChar :: IO Char' .. but then you have actions that should be equivalent, but are represented differently, like `act' vs. `Bind act Return', and similarly for the other monad laws .. so, in order to not expose this, you'd need to make the type abstract,
09:00:13 <ski> not export any data constructors)
09:00:54 <Inst> Thank you for the insights, I'm going to try to read "Tackling the Awkward Squad" again
09:01:04 <ski> Inst : you could (rather easily) make a translation (interpreter) from any one of these representations above, to the "usual" `IO' .. this is a good exercise, if you don't immediately see how it would work
09:01:38 <ski> (you could also try implementing a `Dialogue'-style one ..)
09:01:38 <Inst> the main difficulty might be the CPS
09:01:53 <Inst> otherwise, I think I get the concept
09:01:56 <ski> the first version above does no CPS
09:02:11 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 255 seconds)
09:02:24 <Inst> the data IO a = Return... version
09:02:26 <ski> (apart from CPS in the sense inherently present, whenver you have `(>>=)')
09:02:33 <ski> right
09:02:51 × retrosenator quits (~retrosena@134.sub-174-211-114.myvzw.com) (Read error: Connection reset by peer)
09:03:51 <ski> tomsmeding : ah, sorry, i missed that
09:04:38 gurkenglas joins (~gurkengla@2.247.242.221)
09:06:49 <tomsmeding> Inst: free monad IO https://play-haskell.tomsmeding.com/saved/AtL7IJ7a
09:07:07 <tomsmeding> if you want spoilers on how 'interpret' should be defined: https://play-haskell.tomsmeding.com/saved/zI0hsNWy
09:07:38 <tomsmeding> unfortunately can't Show a free monad thing because of the continuations
09:07:57 <tomsmeding> Inst: also good exercise: inline Free into FIOF, i.e. define FIO directly
09:08:07 <tomsmeding> (it's not hard)
09:09:01 AlexNoo joins (~AlexNoo@178.34.160.79)
09:09:21 <tomsmeding> ski: you start needing a GADT for the free monad if you want to have stuff like newIORef in there, right?
09:09:47 <tomsmeding> ah no
09:09:52 <Inst> hmmm, okay, i'll play around with it, I owe you guys that much
09:10:36 <Inst> what is playground implemented in, anyways?
09:10:46 <tomsmeding> Inst: click the link in the right-top corner ;)
09:10:54 <tomsmeding> Haskell on the server, typescript on the client
09:11:09 <tomsmeding> though the editor is an off-the-shelf javascript thing
09:11:18 <tomsmeding> only a little bit of typescript
09:11:41 <ski> well, i guess you could say there's CPS inherent in `PutCharThen' and `GetCharBind', yea
09:12:01 <tomsmeding> you need only existentials to have IORefs in free monad form
09:12:34 <ski> elaborate ?
09:12:34 <tomsmeding> ski: PutCharThen is not interesting, it's only GetCharBind that introduces a function however you look at it
09:12:56 <ski> yes .. but conceptually, the `IO a' in `PutCharThen' is still a continuation
09:13:08 <tomsmeding> sure
09:13:20 <tomsmeding> ski: see the FIOF type here https://play-haskell.tomsmeding.com/saved/Y0PvC8XQ
09:13:31 <tomsmeding> you need existentials, but no GADT
09:13:43 <ski> (just as the accumulator, in `flattenTreeAppend :: Tree a -> [a] -> [a]', could also be viewed as a continuation)
09:14:03 <Inst> thanks for giving me a free monad $ tutorial
09:14:20 <Inst> this is fun, even if free monads apparently perform like crap, type-level is intrinsically fun
09:14:27 <tomsmeding> (was it a (free monad) tutorial or a free (monad tutorial), though?)
09:14:41 <Inst> free is applied to monad first, no?
09:14:41 <tomsmeding> yeah these things I wrote perform crap
09:14:45 Alex_test joins (~al_test@178.34.160.79)
09:14:51 <tomsmeding> like, absolute crap
09:14:59 <tomsmeding> quadratic in the length of your program
09:15:21 ski . o O ( non-associative language strikes again ! )
09:15:25 <tomsmeding> :D
09:15:42 <tomsmeding> Inst: well, was it a tutorial on free monads, or was it a free tutorial on monads?
09:15:44 <tomsmeding> maybe it was both!
09:15:58 <ski> Inst : if you CPS them, it's not as bad
09:16:23 <Inst> i mean, c'mon, the $ should make it obvious ;_;
09:16:42 <tomsmeding> fair point :p
09:17:35 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
09:17:37 ski . o O ( `feof' )
09:18:30 <tomsmeding> F00F
09:19:54 chexum joins (~quassel@gateway/tor-sasl/chexum)
09:20:10 <ski> tomsmeding : right. you can also do `Bind' existentially
09:20:57 AlexZenon joins (~alzenon@178.34.160.79)
09:21:08 <tomsmeding> data IO a = ... | forall b. Bind (IO b) (b -> IO a) | ...
09:21:26 <ski> (oops, `Bind :: IO a -> (a -> IO b)' should obviously be `Bind :: IO a -> (a -> IO b) -> IO b'. with existentials, you have `data IO a = ... | forall b. Bind (IO b) (b -> IO a) | ...' )
09:21:38 ski low fours tomsmeding
09:21:43 <tomsmeding> we were typing the same thing at the same time, including your fix lol
09:22:33 ski mumbles something about fugu
09:22:57 <tomsmeding> ?
09:23:47 <tomsmeding> https://en.wikipedia.org/wiki/Fugu
09:23:51 <ski> @quote contrapuntal
09:23:51 <lambdabot> monochrom says: Welcome to #haskell, where your questions are answered in contrapuntal fugues.
09:23:56 <ski> @quote stereo
09:23:56 <lambdabot> geheimdienst says: data Stereoloid = BanachTyvski | CoBanachTyvski
09:24:05 <ski> @quote quote.stereo
09:24:05 <lambdabot> shachaf says: I remember when I joined #haskell and everyone would @quote stereo.
09:24:07 acidjnk joins (~acidjnk@2003:d6:e715:c488:698a:1110:aea1:4b48)
09:24:21 <tomsmeding> :')
09:24:41 <tomsmeding> now where does Tyvski come from
09:24:42 <ski> (there used to be some other quotes, re "stereo", e.g. "answering in majestic stereo", iirc)
09:26:03 <ski> .. misspelling (for some reason i'm not sure) of "Tarski"
09:26:24 <tomsmeding> presumably
09:26:38 ski . o O ( <https://en.wikipedia.org/wiki/Banach-Tarski_paradox> )
09:26:44 <Inst> also, quick question, what happens if some deliberately tries to do stuff that normally causes GHCI and Haskell RTS to segfault?
09:27:00 <tomsmeding> ski: I don't think there are many people in science who haven't heard of that
09:27:10 <tomsmeding> Inst: such as?
09:27:13 <ski> Inst : i don't think the intent is taken into account
09:27:22 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:27:52 <ski> tomsmeding : random lurkers might not have
09:27:59 <tomsmeding> fair
09:29:52 <tomsmeding> I low how searching for "stereoloid" yields logs of freenode #esoteric containing lambdabot reproducing the same line
09:30:09 <tomsmeding> where it was also unintented
09:30:12 <tomsmeding> *unintended
09:30:33 <Inst> if Haskell does well, someone sooner or later is going to play "let's crash the runtime"
09:30:48 <Inst> i guess that's why you're not hosted on Haskell.org
09:30:49 <int-e> . o O ( Stereoloid is one step beyond monoloid. Whatever that is. )
09:31:20 <int-e> Inst: Sandboxing is a thing.
09:31:39 <tomsmeding> int-e: oh you mean the sandbox
09:31:43 <tomsmeding> *playground
09:31:46 <tomsmeding> brain is fried
09:31:51 <int-e> tomsmeding: not I :)
09:31:51 <tomsmeding> yeah sandboxing
09:31:54 <Inst> oh, sorry, I misread ski's statement as tomsmeding's
09:32:08 <tomsmeding> int-e: well you _did_ mean the sandbox :')
09:32:23 <Inst> causes core dump:
09:32:24 <Inst> https://hackage.haskell.org/package/base-4.17.0.0/docs/System-IO-Unsafe.html
09:32:50 <Inst> warning, this can fail with an unchecked exception
09:32:51 <Inst> https://hackage.haskell.org/package/ghc-prim-0.9.0/docs/GHC-Prim.html
09:32:53 <int-e> tomsmeding: I may have meant a different sandbox.
09:32:55 <int-e> ;)
09:32:59 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
09:32:59 <int-e> @bot
09:32:59 <lambdabot> :)
09:33:11 <tomsmeding> Inst: rather easy https://play-haskell.tomsmeding.com/saved/qRyAd0XA
09:33:42 <Inst> so it kills the process, but your server is built to spawn multiple processes instead
09:33:43 <tomsmeding> and this is the mildest of things you can do to the sandbox, this doesn't even try to break out of it
09:34:04 <tomsmeding> Inst: you can import System.Process, run gcc to compile some C code, and run that
09:34:17 <Inst> and you're still protected against that?
09:34:20 <tomsmeding> should be
09:34:21 <int-e> % :! ls
09:34:23 <tomsmeding> hopefully
09:34:32 <tomsmeding> int-e: that's special-cased in yahb2
09:34:38 <Inst> well i assume it's hosted on a VM with image back-ups, so who cares
09:34:50 <int-e> tomsmeding: Ah. Makes sense, it's too easy.
09:34:54 <Inst> and you can't send HTTP requests out, right?
09:34:59 <Inst> I wonder if the Go folks permit that
09:35:05 <tomsmeding> % System.Process.system "ls"
09:35:05 <yahb2> entry.sh ; Yahb2Defs.hs ; ExitSuccess
09:35:13 <tomsmeding> Inst: network is cut off
09:35:47 <Inst> also, unrelated question: how suitable and how necessary might it be to use Haskell to develop a general terminal emulator?
09:36:10 <tomsmeding> I rather want my terminal emulator to have low, predictable resource usage and be fast
09:36:11 <Inst> I'm still kvetching about getChar not working on Windows
09:36:16 <Inst> yeah, okay
09:36:21 <Inst> tabby's built in typescript around a C++ core
09:36:48 <Inst> a good general terminal emulator is good marketing
09:37:05 <Inst> and XLinearHaskell is in development, so at least we can eventually get predictable resource usage
09:37:23 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
09:37:24 <tomsmeding> Inst: not sure that's a valid conclusion
09:37:36 <tomsmeding> almost every single thing you do in haskell allocates
09:37:49 <Inst> ah, the space problem
09:38:02 <tomsmeding> you wouldn't want to have to do explicit resource tracking on Nothing and Just, would you
09:38:17 <tomsmeding> haskell needs a GC by design, which is fine
09:38:27 <tomsmeding> but I'd rather my terminal emulator be written in a language without a GC
09:38:39 <tomsmeding> plenty of applications left where that's less of a thing
09:43:25 <Inst> got your minimum version working
09:43:26 <Inst> https://play-haskell.tomsmeding.com/saved/38Fg7T7s
09:44:02 <Inst> it's more that I'm annoyed that getChar doesn't work, that console integration in Windows isn't as good as it could be, but then again...
09:44:16 <Inst> did you know Python actually outperforms C when it comes to IO intensive code to Windows console?
09:44:29 <Inst> maybe I didn't optimize the C properly, I'm a programming newbie
09:44:35 <Inst> just a fizzbuzz printer
09:44:36 <tomsmeding> Inst: nice, that's almost exactly what I wrote
09:44:47 <tomsmeding> Inst: also have you tried again with recent GHC on windows?
09:44:55 <Inst> it was recent
09:45:04 <tomsmeding> Inst: also, what, gimme that C and Python code and I'll flip the tables
09:45:04 <Inst> winio throws a whole different set of bugs
09:45:09 <tomsmeding> ah
09:45:39 <tomsmeding> oh to windows console specifically
09:45:43 <tomsmeding> dunno about that
09:45:52 <tomsmeding> Inst: did you compile the C with msvc?
09:46:07 <[exa]> that's the bug with C stdlib trying to be nice and flush after every newline?
09:46:15 <tomsmeding> python does the same
09:46:33 <tomsmeding> and both don't if stdout is not a tty
09:48:18 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:49:28 × razetime quits (~Thunderbi@117.193.1.13) (Remote host closed the connection)
09:50:10 ski . o O ( "What If We Don't Pop the Stack? The Return of 2nd-Class Values" by Anxhelo Xhebraj,Oliver Bračevac,Guannan Wei,Tiark Rompf in 2022 at <https://drops.dagstuhl.de/opus/volltexte/2022/16243/pdf/LIPIcs-ECOOP-2022-15.pdf> )
09:51:00 <[exa]> oh lovely
09:51:41 <tomsmeding> ski: I wonder how that compares to c++'s optimisation where it constructs a value in the spot where the parent function expects it
09:51:46 <tomsmeding> it has a name, I forget which
09:51:50 <ski> (in cases where you want to return a value of a size not known prior to the call, on the stack)
09:52:19 ardell joins (~ardell@user/ardell)
09:52:48 <ski> (could also be used to return stack-allocated closures .. cf. <https://en.wikipedia.org/wiki/Region-based_memory_management>)
09:52:50 <tomsmeding> ah, copy elision / named return value optimisation
09:53:05 × merijn quits (~merijn@145.90.225.11) (Ping timeout: 252 seconds)
09:53:27 <Inst> let me go reproduce the results
09:53:41 <Inst> done via gcc, i have no idea how i installed it, on windows
09:57:14 <[exa]> tomsmeding: destination-passing style or copy/move elision?
09:57:33 <[exa]> ski: "storage mode polymorphism" is top
09:57:34 <tomsmeding> I guess those are similar?
09:57:59 <[exa]> yeah, the copy elision is somewhere in the smudgy middle between full dps and normal values
09:58:09 <tomsmeding> yeah
09:58:25 <tomsmeding> though does that don't-pop-the-stack paper give you full DPS?
09:58:28 <[exa]> "syntactically viable local optimum"
09:58:32 <tomsmeding> probably slightly better than copy elision still
09:58:56 <ski> the ML Kit <https://elsman.com/mlkit/>,<https://elsman.com/mlkit/pdf/mlkit-4.7.2.pdf>,<https://github.com/melsman/mlkit> (which does region inference) is interesting
09:59:20 <ski> [exa] : "is top" ?
09:59:54 <[exa]> tomsmeding: as far as I understand it now the paper basically gives you an easy and statically inferrable option to leave some stuff on the stack to be reliably collected by callers, which helps
10:00:01 <[exa]> ski: as in "is very good" :D
10:00:12 <ski> the Melbourne Mercury compiler does DPS, in some optimizations, to achieve last/tail calls
10:00:15 <tomsmeding> [exa]: right, so another mid-way point
10:00:35 <ski> [exa] : elaborate on "storage mode polymorphism" ?
10:00:41 <ski> (links ?)
10:01:39 <[exa]> in that stack-not-popping paper you linked, section 6.2
10:02:08 freeside joins (~mengwong@103.252.202.170)
10:02:28 <Inst> okies, reproduced the weird behavior, will try a few more time
10:02:34 tomsmeding . o O ( popping-not-your-stack )
10:02:42 <ski> (it was a week or two since i read the aforementioned paper, i think it probably mentioned the term, iirc it suggested three (?) different strategies for how to implement an operation being polymorphic in whether to allocate result on stack or not .. but i was unsure whether you have the paper in mind, or perhaps some other source)
10:03:05 <Inst> 5.42 seconds C, 4.82 seconds Python
10:03:16 <Inst> iirc, it was Py < Julia < Haskell < C
10:03:21 <tomsmeding> Inst: share code?
10:03:24 <tomsmeding> wat haskell faster than C
10:03:26 <Inst> will in a bit
10:03:35 <Inst> yeah i've been encountering that for a bit
10:03:41 <tomsmeding> I mean, go haskell, but wat
10:03:55 <Inst> it probably has to do with the quality of the libraries that connect to windows console
10:04:02 <[exa]> sounds like C crippled by simplicity
10:04:04 <tomsmeding> yeah
10:04:34 <Inst> but that's sort of a fun point to make, it's completely useless and stupid, but it's a trivial way to reverse the usual language performance benchmarks by something incidental
10:04:34 <[exa]> if Julia is faster that basically means there are dirty tricks that reduce the system communication
10:04:44 <Inst> and implies that Py is doing so as well
10:05:23 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
10:05:31 <[exa]> Inst: you mean IO library benchmark? not really surprising to prove that C doesn't really have one
10:07:01 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
10:07:25 × falafel quits (~falafel@2607:fb91:143f:e47f:6cfc:4f5:5346:997f) (Ping timeout: 252 seconds)
10:08:18 <[exa]> ski: yeah that paper, I just skimmed over it and it looks really good. I wanted a tool like that for some other projects for a very long time now.
10:08:33 <[exa]> great it has materialized now :]
10:09:01 <Inst> the C code is bugged, but in C's favor
10:09:02 <Inst> https://paste.tomsmeding.com/9hjCRbej
10:10:11 <tomsmeding> Inst: why bugged?
10:10:33 <tomsmeding> oh more newlines
10:10:33 <Inst> i can't be arsed to find the right analogues to putStr
10:10:37 <tomsmeding> that's not in C's favour
10:10:39 <tomsmeding> printf
10:10:43 <tomsmeding> printf("Fizz");
10:10:58 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
10:11:14 <tomsmeding> more newlines is more flushes is more IO calls is less speed
10:11:35 <Inst> 10 seconds on this variant
10:11:38 <int-e> or fputs(stdout, "Fizz") but a compiler might do that for you
10:11:49 <tomsmeding> probably will
10:11:51 <Inst> https://paste.tomsmeding.com/RtqhBpiX
10:12:00 <Inst> maybe set O?
10:12:02 <Inst> let me try that
10:12:08 <int-e> (I know that gcc will)
10:12:23 <Inst> 10.55 seconds
10:12:27 <Inst> under O2
10:12:43 <Inst> so, virtually any language can beat C by simply exploiting the poor C windows IO library
10:13:49 <int-e> you still have printf("\n");
10:14:16 <int-e> ah, sorry, python code does that too
10:14:37 <tomsmeding> Inst: python takes 0.0527 seconds here on linux in the 'st' terminal, C takes 0.0049 seconds
10:14:52 <Inst> sounds about right :)
10:14:55 <tomsmeding> sorry poor windows users, stuff's not optimised for windows
10:15:10 <Inst> please fix my getChar ;___;
10:15:14 <tomsmeding> oh I lie
10:15:24 <tomsmeding> 0.17s py, 0.072s C
10:15:31 <tomsmeding> was not writing to terminal, which is kind of essential
10:16:19 <Inst> https://gitlab.haskell.org/ghc/ghc/-/issues/21047
10:16:45 <Inst> i'm a big fan of bird's book, and while it's not his fault done isn't a thing
10:16:53 <Inst> done :: m ()
10:16:56 <Inst> done = pure ()
10:17:09 <Inst> you can't implement getLine in terms of getChar as requested
10:17:12 <Inst> on windows systems
10:17:47 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:18:04 <Inst> *while it's his fault
10:18:58 <tomsmeding> 0.14 for haskell, so C < haskell < py here
10:19:04 <tomsmeding> but varies
10:21:08 <ski> ((section 3) "Making Mercury programs tail recursive" by Peter Ross,David Overton,Zoltan Somogyi in 1999-09 at <https://www.mercurylang.org/documentation/papers.html#tail_lopstr> (extended abstract),<https://www.mercurylang.org/documentation/papers.html#tail_lopstr_lncs> does DPS (Destination-Passing Style), with LCMC/TCMC (Last/Tail Call Modulo Cons(tructor)), tracking definite aliases in the inst
10:21:14 <ski> (instantiation) system)
10:22:41 <Inst> so, ummm, you want me to inline the free monad into FIOF?
10:22:54 <Inst> https://play-haskell.tomsmeding.com/saved/38Fg7T7s
10:23:29 <tomsmeding> Inst: yeah make one datatype, FIO (replace the existing one) that inlines Free and FIOF into one thing
10:23:42 <tomsmeding> so that you see that Free is not magic
10:23:45 <ski> Inst,tomsmeding : `fputs("Fizz",stdout);'
10:25:31 <Inst> roughly looks like this right now
10:25:32 <Inst> data FIOF a
10:25:32 <Inst> = Put String FIOF
10:25:32 <Inst> | Get (String -> FIOF)
10:25:32 <Inst> | Sleep Int FIOF
10:25:32 <Inst> | Pure a
10:25:50 <tomsmeding> ski: funnily regardless of whether I use fputs or printf, the compiled assembly seems to call printf always
10:25:54 <Inst> also re console, you can always just use Haskell to wrap C, C++, or something like that
10:25:55 <tomsmeding> and runtimes are identical
10:26:08 <tomsmeding> Inst: that doesn't kindcheck
10:26:11 ski for a moment thought that Inst's "5.42 seconds C, 4.82 seconds Python" was referring to sections in the "don't pop the stack" paper
10:26:15 <Inst> that's what Tabby seems to do, and it's what Facebook did with Sigma / Standard Chartered
10:26:16 <Inst> ah
10:26:35 × ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!)
10:26:39 <ski> Inst : needs more parameters
10:26:56 <ski> tomsmeding : curious
10:26:59 <Inst> yeah, added the a to FIOF, forgot it during refactoring
10:28:34 <ski> you could just omit `a', (renaming `Pure' to `End' or `Terminate' or somesuch), if/when you're doing the CPS (as in `Cont IOAction a = (a -> IOAction) -> IOAction') version
10:36:31 freeside joins (~mengwong@103.252.202.170)
10:41:55 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
10:52:48 thongpv joins (~thongpv87@123.31.75.7)
10:54:44 × simeon quits (~simeon@143.231.7.51.dyn.plus.net) (Ping timeout: 260 seconds)
10:54:45 × thongpv87 quits (~thongpv87@123.31.75.7) (Ping timeout: 268 seconds)
10:59:23 × xff0x quits (~xff0x@2405:6580:b080:900:161d:e8bd:9253:e61c) (Ping timeout: 246 seconds)
11:01:05 xff0x joins (~xff0x@138.64.81.74)
11:01:05 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
11:02:03 azimut joins (~azimut@gateway/tor-sasl/azimut)
11:04:50 mc47 joins (~mc47@xmonad/TheMC47)
11:12:39 × gurkenglas quits (~gurkengla@2.247.242.221) (Ping timeout: 252 seconds)
11:12:44 notzmv joins (~zmv@user/notzmv)
11:17:34 × thongpv quits (~thongpv87@123.31.75.7) (Ping timeout: 268 seconds)
11:18:03 <Inst> done tomsmeding
11:18:05 <Inst> you're great at this
11:18:22 <tomsmeding> <3
11:18:30 <Inst> https://play-haskell.tomsmeding.com/saved/bfa763t9
11:18:36 <Inst> you should go set up a template system on playgrounds
11:18:54 <Inst> so, say, someone wants to set up an exercise, they can just get a copy of the template, and spawn a new playground based off the template
11:18:58 <Inst> unless it's already a feature
11:19:01 <tomsmeding> it's not
11:19:15 <tomsmeding> https://github.com/tomsmeding/play-haskell/issues/new?assignees=&labels=&template=feature_request.md
11:22:07 <Inst> thanks for the Free $ Free Monad $ Tutorial
11:22:31 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
11:22:33 <tomsmeding> :D
11:22:52 <ski> make that `(Free . Free Monad) Tutorial'
11:23:07 × shapr quits (~user@net-5-88-238-17.cust.vodafonedsl.it) (Ping timeout: 268 seconds)
11:23:14 <tomsmeding> @pl \f -> (f . f Monad) Tutorial
11:23:14 <lambdabot> flip (ap (.) ($ Monad)) Tutorial
11:23:31 <tomsmeding> @pl \f -> f . f Monad
11:23:31 <lambdabot> ap (.) ($ Monad)
11:24:00 <tomsmeding> ((.) <*> flip id Monad) Free Tutorial
11:24:00 <ski> Inst : brackets in `(Pure a) >>= f = f a' are useless (and ditto for the other defining equations)
11:24:23 <ski> .. and in `(cont u) >>= f'
11:24:45 <ski> (also `deriving (Functor)' ..)
11:25:01 <Inst> done
11:25:04 <tomsmeding> I've taken to always putting parentheses around the deriving RHS
11:25:06 <Inst> I got lazy
11:25:12 <Inst> forgot to factor them out
11:25:43 <ski> is the `DerivingStrategies' really necessary ?
11:25:50 <Inst> nope, didn't refactor that out either
11:26:29 <tomsmeding> ski: ah, I put that in to do 'deriving newtype (Functor, Applicative, Monad)' on newtype FIO a = FIO (Free FIOF a)
11:26:49 <tomsmeding> Inst: <3 for issue
11:26:56 <ski> `\m -> go m' can be eta-reduced to `m' (alternatively `interpret m = go m' can be "function extensionality"d to `interpret = go')
11:27:19 <ski> tomsmeding : yes. doesn't a plain `deriving' work there ?
11:27:42 <Inst> i don't do that much type-level programming, in fact, i don't actually get it, outside of building some hacks around stuff
11:27:45 <ski> oh, and apparently `go' has some double brackets
11:27:50 <tomsmeding> ski: yes
11:28:12 <Inst> i think being able to develop in a top-down way with minimal type annotations is a show of the flexibility of Haskell toward some use cases
11:28:32 <tomsmeding> but I feel usage of GeneralizedNewtypeDeriving could use explicit signals
11:29:07 <Inst> Version 9.2.5 not available
11:29:07 <ski> yea, i was thinking maybe it was for being explicit
11:29:31 <tomsmeding> Inst: yeah oops I'm messing with the playground
11:29:34 <ski> Inst : now for CPS version ?
11:29:38 <Inst> sleep!
11:29:56 <ski> happy dreaming in CPS !
11:30:00 <tomsmeding> Inst: should work again
11:30:26 <ski> (be sure to call `sleep' with a continuation involving your actions for tomorrow)
11:38:01 <Unicorn_Princess> should i ever call `cabal upgrade` and the like if i'm managing my haskell install through ghcup?
11:38:23 <maerwald> Unicorn_Princess: there's no such thing as 'cabal upgrade'
11:38:39 <Unicorn_Princess> or update or uh... anything of that nature
11:38:47 MQ-17J joins (~MQ-17J@104.28.248.166)
11:38:50 <tomsmeding> there is 'stack upgrade' though, and that you should _not_ use if you install stack through ghcup
11:38:52 <maerwald> 'cabal update' does not update the binary
11:39:05 <tomsmeding> Unicorn_Princess: 'cabal update' is a completely different thing, downloads the most recent package list
11:39:08 <tomsmeding> that you should run once in a while
11:39:36 <Unicorn_Princess> ah, so package list is handled separately. got it, thanks
11:45:24 <tomsmeding> is there anything in ~/.cabal/packages that is linux-distribution-specific? I.e. if I copy that directory over to another machine with the same CPU architecture, will that just work?
11:47:29 × MQ-17J quits (~MQ-17J@104.28.248.166) (Ping timeout: 252 seconds)
11:49:37 wootehfoot joins (~wootehfoo@user/wootehfoot)
11:54:18 <int-e> If it's the same ghc too and the same $HOME chances are pretty good that this works.
11:54:32 freeside joins (~mengwong@103.252.202.170)
11:54:52 <tomsmeding> (of course there is no "another machine" here, it's a chroot with a different linux distro)
11:54:53 <maerwald> int-e: .cabal/packages is not the store
11:55:00 <int-e> oh
11:55:09 <tomsmeding> yeah I'm asking specifically about .cabal/packages
11:55:20 <maerwald> I'd be surprised
11:55:23 <int-e> sorry, that one can be copied over regardless of the platform
11:55:28 <maerwald> yeah
11:55:28 <tomsmeding> .cabal/store and .cabal/logs I can redirect, but it seems I can't do that to .cabal/packages and it also seems I don't need to
11:55:29 <tomsmeding> cool
11:58:55 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
12:01:28 L29Ah joins (~L29Ah@wikipedia/L29Ah)
12:02:51 × mechap quits (~mechap@user/mechap) (Ping timeout: 248 seconds)
12:05:08 mechap joins (~mechap@user/mechap)
12:13:29 gurkenglas joins (~gurkengla@dynamic-002-247-242-221.2.247.pool.telefonica.de)
12:15:33 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Quit: beteigeuze)
12:15:58 beteigeuze joins (~Thunderbi@85.247.81.220)
12:16:03 × beteigeuze quits (~Thunderbi@85.247.81.220) (Client Quit)
12:26:21 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
12:26:54 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
12:28:27 mmhat joins (~mmh@p200300f1c730fb3aee086bfffe095315.dip0.t-ipconnect.de)
12:28:49 × mmhat quits (~mmh@p200300f1c730fb3aee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
12:43:13 × yahb2 quits (~yahb2@2a01:4f8:c0c:5c7b::2) (Remote host closed the connection)
12:43:25 yahb2 joins (~yahb2@2a01:4f8:c0c:5c7b::2)
12:45:44 freeside joins (~mengwong@103.252.202.170)
12:51:21 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
12:51:57 majjoha joins (~majjoha@80.71.142.8.ipv4.parknet.dk)
12:52:10 × majjoha quits (~majjoha@80.71.142.8.ipv4.parknet.dk) (Client Quit)
12:52:21 simeon joins (~simeon@51.7.231.143)
12:56:04 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
12:57:25 majjoha joins (~majjoha@80.71.142.8.ipv4.parknet.dk)
12:58:36 × majjoha quits (~majjoha@80.71.142.8.ipv4.parknet.dk) (Client Quit)
12:58:50 majjoha joins (~majjoha@80.71.142.8.ipv4.parknet.dk)
13:01:37 CiaoSen joins (~Jura@p200300c9570460002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
13:05:41 × majjoha quits (~majjoha@80.71.142.8.ipv4.parknet.dk) (Quit: Ping timeout (120 seconds))
13:07:59 shapr joins (~user@host-79-37-239-243.retail.telecomitalia.it)
13:10:21 × simeon quits (~simeon@51.7.231.143) (Ping timeout: 252 seconds)
13:10:35 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
13:14:11 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
13:16:10 chexum joins (~quassel@gateway/tor-sasl/chexum)
13:17:15 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
13:30:09 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
13:30:38 lackita joins (~lackita@73.114.250.252)
13:30:46 __monty__ joins (~toonn@user/toonn)
13:31:44 freeside joins (~mengwong@103.252.202.170)
13:31:52 × lackita quits (~lackita@73.114.250.252) (Read error: Connection reset by peer)
13:32:04 lackita joins (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286)
13:32:23 × lackita quits (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286) (Read error: Connection reset by peer)
13:32:34 lackita joins (~lackita@73.114.250.252)
13:33:22 thongpv joins (~thongpv87@123.31.75.7)
13:35:51 thongpv87 joins (~thongpv87@2402:9d80:3ac:fe89:f117:a1ed:9f3d:f0e3)
13:35:59 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
13:38:08 × thongpv quits (~thongpv87@123.31.75.7) (Ping timeout: 248 seconds)
13:38:39 × juri_ quits (~juri@84-19-175-179.pool.ovpn.com) (Ping timeout: 260 seconds)
13:39:10 juri_ joins (~juri@84.19.175.179)
13:41:09 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
13:41:18 lackita joins (~lackita@73.114.250.252)
13:41:19 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
13:45:27 retrosenator joins (~retrosena@174.211.112.224)
13:46:19 × lackita quits (~lackita@73.114.250.252) (Read error: Connection reset by peer)
13:46:44 lackita joins (~lackita@73.114.250.252)
13:47:29 × Axman6 quits (~Axman6@user/axman6) (Remote host closed the connection)
13:47:46 Axman6 joins (~Axman6@user/axman6)
13:49:35 × juri_ quits (~juri@84.19.175.179) (Ping timeout: 252 seconds)
13:50:52 juri_ joins (~juri@84.19.175.179)
13:52:04 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
13:57:19 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 260 seconds)
13:57:42 simeon joins (~simeon@37.205.58.148)
13:57:45 × simeon quits (~simeon@37.205.58.148) (Remote host closed the connection)
13:58:12 lackita joins (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286)
13:59:50 agevelt[m] joins (~ageveltmo@2001:470:69fc:105::3:16db)
13:59:56 freeside joins (~mengwong@103.252.202.170)
14:00:09 _leo___ joins (~emmanuelu@user/emmanuelux)
14:03:23 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 248 seconds)
14:08:23 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
14:18:06 trev joins (~trev@user/trev)
14:21:43 L29Ah joins (~L29Ah@wikipedia/L29Ah)
14:26:36 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
14:27:29 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
14:28:14 o-90 joins (~o-90@gateway/tor-sasl/o-90)
14:29:04 L29Ah joins (~L29Ah@wikipedia/L29Ah)
14:29:58 × o-90 quits (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection)
14:31:49 <cheater> what's the best way to use integers on the type level?
14:32:02 <cheater> i have to specify large numbers, like 1337 and 420
14:32:15 freeside joins (~mengwong@103.252.202.170)
14:33:53 <retrosenator> what exactly does the program do if you need only those two particular numbers?
14:34:04 dsrt^ joins (~dsrt@c-24-30-76-89.hsd1.ga.comcast.net)
14:34:36 <cheater> it needs to send 1337 messages
14:34:41 <cheater> and then disconnect
14:34:51 <cheater> (it's actually a different number. but 1337 is funnier)
14:36:30 <retrosenator> 420?
14:36:35 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
14:36:38 notzmv joins (~zmv@user/notzmv)
14:37:00 <retrosenator> you just inspired me...
14:37:38 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d14c:efc7:12bb:4678)
14:39:46 <tomsmeding> cheater: https://hackage.haskell.org/package/base-4.16.0.0/docs/GHC-TypeNats.html in combination with https://hackage.haskell.org/package/ghc-typelits-natnormalise and perhaps https://hackage.haskell.org/package/ghc-typelits-knownnat works acceptably
14:40:10 <cheater> thanks, i'll read through that tomsmeding
14:42:00 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d14c:efc7:12bb:4678) (Ping timeout: 260 seconds)
14:48:35 Sinbad joins (~Sinbad@user/sinbad)
14:52:20 × Sinbad quits (~Sinbad@user/sinbad) (Quit: WeeChat 3.8)
15:00:21 × pie_ quits (~pie_bnc@user/pie/x-2818909) ()
15:00:40 pie_ joins (~pie_bnc@user/pie/x-2818909)
15:01:00 freeside joins (~mengwong@103.252.202.170)
15:05:36 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
15:06:58 × gurkenglas quits (~gurkengla@dynamic-002-247-242-221.2.247.pool.telefonica.de) (Ping timeout: 268 seconds)
15:07:42 merijn joins (~merijn@145.90.225.11)
15:09:38 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
15:11:15 jakalx parts (~jakalx@base.jakalx.net) ()
15:13:33 × merijn quits (~merijn@145.90.225.11) (Ping timeout: 252 seconds)
15:20:55 ubert joins (~Thunderbi@p200300ecdf130185faf60c5e727d766b.dip0.t-ipconnect.de)
15:27:30 <shapr> xerox: are you in Rome?
15:27:37 son0p joins (~ff@190.158.28.118)
15:28:13 patrl joins (~patrl@user/patrl)
15:31:57 × pie_ quits (~pie_bnc@user/pie/x-2818909) ()
15:32:41 pie_ joins (~pie_bnc@user/pie/x-2818909)
15:32:43 × patrl quits (~patrl@user/patrl) (Client Quit)
15:36:58 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
15:38:06 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350)
15:41:06 <Unicorn_Princess> hrm... is hls-based completion janky, or is it just me/my emacs setup?
15:42:26 <Unicorn_Princess> it'll suggest stuff from all sorts of libraries, but not from the file i'm working in
15:42:38 × vjoki quits (~vjoki@2a00:d880:3:1::fea1:9ae) (Quit: ...)
15:42:41 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350) (Ping timeout: 255 seconds)
15:42:52 vjoki joins (~vjoki@2a00:d880:3:1::fea1:9ae)
15:43:09 <geekosaur> suspect it's you; works fine for me in vs code. although hls sometimes becomes confused and needs to be restarted
15:43:11 <shapr> If you haven't yet done a "cabal build" on the project, HLS won't know about the local definitions. could that be it?
15:44:20 <Unicorn_Princess> shapr, alas that's not it. but it may be stale, i'll try a restart
15:45:09 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
15:45:21 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
15:45:25 <Unicorn_Princess> seems to have helped. let's hope it sticks!
15:45:26 <shapr> if something seems entirely broken, you can delete ~/.cache/ghcide and ~/.cache/hie-bios but that's is rare
15:45:35 <shapr> that's rarely the issue
15:47:36 L29Ah joins (~L29Ah@wikipedia/L29Ah)
15:48:01 × juri_ quits (~juri@84.19.175.179) (Ping timeout: 252 seconds)
15:49:07 juri_ joins (~juri@79.140.122.38)
15:50:35 × Sauvin quits (~sauvin@user/Sauvin) (Read error: Connection reset by peer)
15:54:24 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
15:55:36 rettahcay joins (~kaushikv@c-24-20-37-193.hsd1.or.comcast.net)
16:00:14 ski . o O ( `iterate :: (a -> a) -> a -> (Nat -> a); iterate (\(f n) -> f (Succ n)) (f Zero) = f' )
16:00:52 ski . o O ( `many,many :: Alternative i => i a -> i [a]; (many x,some x) = (many_x,some_x) where many_x = some_x <|> pure []; some_x = liftA2 (:) x many_x' )
16:01:04 <ski> (er, s/many,many/many,some/)
16:01:54 Sauvin joins (~sauvin@user/Sauvin)
16:02:14 jakalx joins (~jakalx@base.jakalx.net)
16:04:23 × pie_ quits (~pie_bnc@user/pie/x-2818909) ()
16:05:10 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
16:05:16 pie_ joins (~pie_bnc@user/pie/x-2818909)
16:09:13 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
16:11:00 rettahcay parts (~kaushikv@c-24-20-37-193.hsd1.or.comcast.net) ()
16:13:41 npmania joins (~Thunderbi@45.8.223.218)
16:14:33 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
16:18:47 razetime joins (~Thunderbi@117.193.1.13)
16:22:15 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
16:22:16 wroathe joins (~wroathe@207.153.38.140)
16:22:16 × wroathe quits (~wroathe@207.153.38.140) (Changing host)
16:22:16 wroathe joins (~wroathe@user/wroathe)
16:22:51 azimut joins (~azimut@gateway/tor-sasl/azimut)
16:24:31 <tomsmeding> ski: what language is that 'iterate' written in :p
16:28:36 <ski> tomsmeding : pseudo-Haskell :b
16:28:56 <ski> (more specifically, some pattern extensions i'm pondering)
16:29:29 <tomsmeding> how does pattern matching on function application work
16:29:34 <tomsmeding> s/does/can/
16:29:56 <ski> the same way `f x = x + 1' works, with function application to the left of the `='
16:30:07 <ski> (FSVO "same")
16:30:19 <tomsmeding> that works for the (many x, some x) case, ish
16:30:45 <ski> that's a multiple-entry piece of code
16:31:26 <ski> (but perhaps you should also ask about the lambda abstraction ..)
16:31:52 <tomsmeding> oh so for that iterate, the compiler is supposed to do induction over Nat or something, and recognise that there is exactly one f that can be synthesised from the arguments to follow that specification, and then return that?
16:31:54 <tomsmeding> that sounds like madness
16:32:38 gurkenglas joins (~gurkengla@dynamic-046-114-178-040.46.114.pool.telefonica.de)
16:32:41 <ski> that `iterate' definition is equivalent to
16:32:45 <ski> iterate g = f
16:32:47 <ski> where
16:33:14 <ski> f Zero = x
16:33:24 <ski> f (Succ n) = g (f n)
16:33:32 <ski> er, s/iterate g/iterate g x/
16:34:21 ub joins (~Thunderbi@p200300ecdf1301856cd886509d6d0bd1.dip0.t-ipconnect.de)
16:34:31 × _xor quits (~xor@74.215.182.83) (Quit: brb)
16:34:32 <ski> so, clearly, in either definition of `iterate', `f' is defined on both cases `Zero' and `Succ n', recursively defined for the latter one
16:35:10 <tomsmeding> so that f (Succ n) and that (f Zero) need to be patterns then, at the very least
16:35:12 <ski> the only thing that feels a bit icky would be if there were overlapping cases
16:35:29 <ski> `Zero' and `Succ n' are patterns, yes
16:35:40 <tomsmeding> right
16:35:44 <ski> is `f x' in `f x = x + 1' a pattern, in your mind ?
16:35:50 <tomsmeding> no you're right
16:36:09 <tomsmeding> but e.g. `iterate (\(f n) -> f (Succ n) + 1) (f Zero) = ...' cannot be valid
16:36:22 <ski> why not ? ;D
16:36:29 <tomsmeding> wtf does it mean
16:36:35 <tomsmeding> f Zero = x ; f (Succ n) + 1 = g (f n)
16:36:36 <tomsmeding> ?
16:36:59 <tomsmeding> and don't n+k patterns me
16:37:08 <ski> yes (minus the ` + 1')
16:37:11 <tomsmeding> or I guess this is precisely a generalisation of n+k patterns
16:37:26 <tomsmeding> ski: the '+ 1' was precisely my point
16:37:31 <ski> (the `f x = x + 1' was a separate, unrelated, example)
16:37:40 <tomsmeding> yeah I know
16:38:18 <ski> so `f (Succ n) + 1' never enters my picture
16:39:11 <tomsmeding> because the "body" (after possible lambda abstractions) of each ski-extended argument must be left-hand sides (better term?), and 'f (Succ n) + 1' is not a LHS?
16:39:19 <tomsmeding> well it is for (+), I guess
16:39:20 <ski> `f (Succ n)' is not an expression, so `f (Succ n) + 1' is not valid (unless you go `NPlusKPatterns', yes)
16:39:21 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
16:39:43 <ski> (this is why i asked about `f x = x + 1', what you'd call `f x' there)
16:39:51 <tomsmeding> did you mean to say "`f (Succ n)' is not a pattern"?
16:39:57 <ski> no
16:39:58 <tomsmeding> ski: I'd call that a left-hand side
16:40:05 <ski> fair enough
16:40:16 <ski> `f (Succ n)' is a "left-hand side"
16:40:22 <tomsmeding> right
16:40:30 <ski> (i'd probably say "definiendum")
16:40:44 <tomsmeding> LHS is shorter :)
16:41:04 <ski> in `iterate (\(f n) -> f (Succ n)) (f Zero) = f', `f n' is an expression, and `f (Succ n)' is a definiendum / left-hand side
16:41:07 <tomsmeding> is `f (Succ n) + 1' a LHS?
16:41:11 <ski> no
16:41:25 <tomsmeding> with your extended patterns it might be
16:41:26 <ski> well, it is, if you're defining `(+)'
16:41:30 <tomsmeding> right
16:41:46 <ski> (but disregarding that)
16:41:54 <tomsmeding> so if you write `iterate (\(f n) -> f (Succ n) + 1) (f Zero) = ...', you're defining both f and plus
16:41:57 <tomsmeding> and neither fully
16:42:08 <tomsmeding> and in the definition of (+) you have another definition of f
16:42:23 <ski> tomsmeding : you're actually defining two separate variables `f', in that case
16:42:26 <tomsmeding> yes
16:42:36 <tomsmeding> to make things more intelligible :)
16:42:40 × juri_ quits (~juri@79.140.122.38) (Read error: Connection reset by peer)
16:42:56 <tomsmeding> this is confusing
16:43:08 <ski> it's fun :)
16:44:00 <ski> if `<expr>' is an expression, and `<pat>' is a pattern, then `\<expr> -> <pat>' is a pattern, that when matched with a function will apply that function on `<expr>', and match the result with `<pat>'
16:44:12 <tomsmeding> unrelated question, can I initialise some IORef once without needing to pass it around all the time, without using unsafePerformIO? Assuming I'll need it in IO only, not in pure code
16:44:41 <ski> (iow, the pattern `\<expr> -> <pat>' can be explained in terms of view patterns, to be equivalent to `($ <expr>) -> <pat>')
16:44:59 × gurkenglas quits (~gurkengla@dynamic-046-114-178-040.46.114.pool.telefonica.de) (Ping timeout: 248 seconds)
16:45:49 <ski> you'll probably need at least one `IORef', say to register other `IORef's under some kind of identifiers ?
16:45:53 <tomsmeding> but now any variables in <pat> that are also defined in other patterns, get put together in "definition blocks"? how are those called
16:46:29 <tomsmeding> ski: right, but that first IORef I need to either pass around or create using unsafePerformIO, right?
16:47:23 <mauke> or implicit parameters or passed through the type checker
16:47:25 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350)
16:47:39 <xerox> shapr: nope, 400km north!
16:47:56 <ski> @wiki Top level mutable state
16:47:56 <lambdabot> https://wiki.haskell.org/Top_level_mutable_state
16:47:59 <ski> @wiki Global keys
16:47:59 <lambdabot> https://wiki.haskell.org/Global_keys
16:48:21 juri_ joins (~juri@84-19-175-179.pool.ovpn.com)
16:48:36 <ski> tomsmeding : i believe so
16:49:30 <ski> @hackage reflection
16:49:30 <lambdabot> https://hackage.haskell.org/package/reflection
16:50:09 <ski> (cue mauke)
16:51:04 <tomsmeding> ski: is reflection relevant to my question? I hope not!
16:51:34 <mauke> reflection is the "pass values through the type checker" option
16:52:05 <tomsmeding> ah right, but the initialisation could be an empty IORef for all I care
16:52:09 <tomsmeding> as long as there is one
16:52:23 <mauke> after all, why shouldn't we use the type system as a message bus?
16:52:27 <tomsmeding> :D
16:55:31 freeside joins (~mengwong@103.252.202.170)
16:56:13 <tomsmeding> I like the mkOnceIO thing from proposal 4
16:57:14 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350) (Remote host closed the connection)
16:57:27 <tomsmeding> oh actually I don't because it still requires -fno-cse in client code
16:57:38 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
16:59:53 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
17:03:40 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350)
17:03:42 <ski> tomsmeding : yes, next step is to add `<def>' as an alternative of `<pat>', `<pat> ::= ... | \ <expr> -> <pat> | <def>', with `<def> ::= <var> | <def> <pat> | <con> <def> .. <def> | \ <expr> -> <def> | <expr> -> <def> | ...'
17:04:06 jao joins (~jao@92.233.85.247)
17:05:56 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
17:06:02 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
17:06:53 <ski> (i've a bunch more additional alternatives i'm pondering, hidden behind the `...'s above)
17:06:53 azimut joins (~azimut@gateway/tor-sasl/azimut)
17:07:29 boxscape_ joins (~boxscape_@81.191.27.107)
17:07:36 <boxscape_> % {}
17:07:36 <yahb2> <no output>
17:07:40 <boxscape_> how is this not a parse error
17:08:05 <ski> tomsmeding : by "definition blocks", do you mean (effectively) a set of defining equations (or definition/binding sites) that together make up a whole definition/binding ?
17:08:16 <tomsmeding> ski: that's precisely what I meant
17:08:19 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
17:08:20 <tomsmeding> probably wrong word
17:08:21 <boxscape_> Oh I guess it's like how modules can be indented or in {}
17:08:32 <tomsmeding> % { x = 1 }
17:08:32 <yahb2> <no output>
17:08:39 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 260 seconds)
17:08:42 <boxscape_> % x
17:08:42 <yahb2> 1
17:09:11 <tomsmeding> ski: wild stuff
17:09:18 <tomsmeding> I'm not sure it will increase readability of code
17:09:46 <tomsmeding> but it's very interesting that one can give this weird "inverted" code a well-defined semantics without program synthesis
17:10:07 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
17:10:33 merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl)
17:13:06 <ski> tomsmeding : hmm .. a "declaration group" is somewhat near, but not quite the same thing
17:13:46 <ski> "A declaration group is a minimal set of mutually dependent bindings. Hindley-Milner type inference is applied to each declaration group in dependency order. The order of declarations in where/let constructs is irrelevant" <https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-880004.5>
17:14:24 × thongpv87 quits (~thongpv87@2402:9d80:3ac:fe89:f117:a1ed:9f3d:f0e3) (Read error: Connection reset by peer)
17:15:19 <ski> tomsmeding : some of my examples, that i'm playing around with (to explore the design space), i'm having trouble understanding, myself ;p
17:15:56 <tomsmeding> :p
17:16:02 <ski> (the two i gave above, are not among those. those two are fairly straight-forward)
17:20:00 <ski> i'm also thinking about "message-dispatching" syntax / "copatterns"
17:20:08 <ski> cf. "Copatterns: Programming Infinite Structures by Observations" by Andreas Abel,Brigitte Pientka,David Thibodeau,Anton Setzer in 2013 at <https://www.cse.chalmers.se/~abela/popl13.pdf>
17:21:08 freeside joins (~mengwong@103.252.202.170)
17:21:24 <ski> and "Subtyping and Inheritance for Inductive Types" in 1997 at <https://www.cs.ru.nl/E.Poll/papers/durham97.pdf>,"Subtyping and Inheritance for Categorical Datatypes" in 1997 at <https://www.cs.ru.nl/E.Poll/papers/kyoto97.pdf>, both by Erik Poll
17:22:12 rlj joins (~rlj@194-218-34-180.customer.telia.com)
17:25:37 ub1 joins (~Thunderbi@84.140.142.240)
17:25:47 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 246 seconds)
17:26:03 × ub quits (~Thunderbi@p200300ecdf1301856cd886509d6d0bd1.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
17:27:53 ub1 is now known as ub
17:28:25 L29Ah joins (~L29Ah@wikipedia/L29Ah)
17:30:03 × razetime quits (~Thunderbi@117.193.1.13) (Remote host closed the connection)
17:40:10 <cheater> is that the guy responsible for scala
17:43:59 × merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds)
17:45:40 wroathe joins (~wroathe@50.205.197.50)
17:45:40 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
17:45:40 wroathe joins (~wroathe@user/wroathe)
17:47:18 × shapr quits (~user@host-79-37-239-243.retail.telecomitalia.it) (Ping timeout: 268 seconds)
17:52:46 freeside joins (~mengwong@103.252.202.170)
17:52:53 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:53:31 <eldritchcookie[m> i read about backpack and love the idea however what happens if the module i am importing defines the correct functions but with different names? the problem becomes even worse if this happens with classes
17:53:38 <ski> .. as well as "absurd" patterns (cf. <https://agda.readthedocs.io/en/v2.6.3/language/function-definitions.html#absurd-patterns>,<http://docs.idris-lang.org/en/latest/reference/syntax-reference.html?highlight=impossible#grammar-token-rhs>,<https://stackoverflow.com/questions/32947534/impossible-patterns-in-idris>),
17:53:52 <ski> or- / disjunctive patterns (cf. <https://smlfamily.github.io/successor-ml/OldSuccessorMLWiki/Disjunctive_patterns.html>,<https://www.smlnj.org/doc/features.html>,<https://v2.ocaml.org/manual/patterns.html#sss:pat-or>,<https://rosettacode.org/wiki/Algebraic_data_types#OCaml>), and-patterns (generalized `<pat> @ <pat>') (and expression variants of these);
17:54:11 <ski> `let'-`in' patterns, `case'-`of' (and `if'-`then'-`else') patterns (and declarations)
17:54:32 <ski> (oh, and definiendum versions of those patterns)
17:56:24 <ddellacosta> Is there some standard way to handle 3rd-party library data types when implementing ToJSON/FromJSON with Aeson? I'm struggling to write instances for a custom data type where one of the fields is a CronSchedule (https://hackage.haskell.org/package/cron-0.7.0/docs/System-Cron-Types.html). Even though CronSchedule derives Generic, genericToEncoding that doesn't seem to be sufficient for ToJSON, and
17:56:26 <ddellacosta> it seems like I'm going to have to implement orphan instances for all of the CronSchedule field types as well, which smells. I feel like I'm missing something obvious.
17:56:54 <geekosaur> eldritchcookie[m, I believe a module signature allows you to do that mapping?
17:57:27 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
17:58:21 notzmv joins (~zmv@user/notzmv)
17:58:43 <geekosaur> https://github.com/danidiaz/really-small-backpack-example
18:01:15 Sgeo joins (~Sgeo@user/sgeo)
18:01:46 gurkenglas joins (~gurkengla@dynamic-046-114-178-040.46.114.pool.telefonica.de)
18:01:50 npmania1 joins (~Thunderbi@45.8.223.203)
18:03:23 × npmania quits (~Thunderbi@45.8.223.218) (Ping timeout: 252 seconds)
18:03:23 npmania1 is now known as npmania
18:03:43 <ski> ddellacosta : i don't think backpack has any support for renaming exported identifiers in a module or signature .. (and unfortunately there's no rename-on-export nor rename-on-import (of identifiers exported from the module), with plain Haskell modules, either)
18:03:49 <ski> er ..
18:03:58 <ski> eldritchcookie[m : that ^ was intended for you
18:04:06 <ddellacosta> whew lol
18:07:14 <ski> (i know several Scheme module systems support both renaming of identifiers on import, and on export. both can be useful. it would also be interesting/nice if one could restrict the type signature, while exporting (e.g. when reexporting from another module) (or while importing, i suppose) .. somewhat relatedly, it would be nice if one could generalize a signature in a subclass)
18:12:16 freeside joins (~mengwong@103.252.202.170)
18:14:56 econo joins (uid147250@user/econo)
18:15:03 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
18:16:28 × rlj quits (~rlj@194-218-34-180.customer.telia.com) (Quit: Client closed)
18:16:31 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
18:17:06 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
18:17:34 _leo___ is now known as emmanuelux
18:18:16 × boxscape_ quits (~boxscape_@81.191.27.107) (Quit: Connection closed)
18:22:49 freeside joins (~mengwong@103.252.202.170)
18:28:23 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 264 seconds)
18:37:53 <eldritchcookie[m> if i define a new class lets say... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/0e730cee9520066ea8482ae08f846e99d2310a30>)
18:38:01 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
18:38:10 emmanuelux joins (~emmanuelu@user/emmanuelux)
18:38:27 freeside joins (~mengwong@103.252.202.170)
18:39:52 × lackita quits (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286) (Read error: Connection reset by peer)
18:40:04 lackita joins (~lackita@73.114.250.252)
18:40:37 <geekosaur> no. The Functor precondition on the instance is checked at use sites
18:40:44 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
18:40:53 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
18:41:00 <geekosaur> also you can't have other instances of that class
18:41:14 <geekosaur> (wellm you can., but they'll overlap and therefore won't be reliable)
18:42:39 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
18:44:15 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 248 seconds)
18:44:43 lackita joins (~lackita@73.114.250.252)
18:45:11 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
18:45:20 rlj joins (~rlj@194-218-34-180.customer.telia.com)
18:45:55 <eldritchcookie[m> sad
18:46:28 <rlj> ski: please see privmsg
18:49:53 × jao quits (~jao@92.233.85.247) (Ping timeout: 252 seconds)
18:50:29 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 246 seconds)
18:50:54 lackita joins (~lackita@73.114.250.252)
18:51:33 <wroathe> geekosaur: FYI try as I might I couldn't figure it out last night, but just now I had the idea to roll back to GHC 9.2.5 instead of the latest, and with that everything seems to be working again for this multi-component project
18:51:52 <wroathe> So something appears to be a bit wonky with HIE / HLS / GHC 9.4
18:52:54 <geekosaur> wonder if that's related to multiple home modules…
18:53:06 <geekosaur> probably need to ask in #haskell-language-server
18:55:05 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
18:55:32 lackita joins (~lackita@73.114.250.252)
18:56:31 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds)
18:59:07 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:00:04 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Max SendQ exceeded)
19:00:35 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:00:54 cheater joins (~Username@user/cheater)
19:06:27 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 252 seconds)
19:08:25 falafel joins (~falafel@2607:fb91:143f:e47f:3f5:ed1d:a924:9b13)
19:08:35 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
19:08:58 aljer joins (~j@user/aljer)
19:09:15 lackita joins (~lackita@73.114.250.252)
19:14:31 kaction joins (~kaction@173.66.188.18)
19:18:51 freeside joins (~mengwong@103.252.202.170)
19:20:50 <aljer> Does anyone here develop on Apple silicon? If so, do you have a preferred method of installing cabal or stack (using nix, rosetta, etc)?
19:21:20 × trev quits (~trev@user/trev) (Remote host closed the connection)
19:22:23 wroathe joins (~wroathe@207.153.38.140)
19:22:23 × wroathe quits (~wroathe@207.153.38.140) (Changing host)
19:22:23 wroathe joins (~wroathe@user/wroathe)
19:22:27 <dsal> I use nix
19:22:31 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
19:23:07 lackita joins (~lackita@73.114.250.252)
19:24:21 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
19:24:59 × falafel quits (~falafel@2607:fb91:143f:e47f:3f5:ed1d:a924:9b13) (Quit: Leaving)
19:25:21 falafel joins (~falafel@2607:fb91:143f:e47f:3f5:ed1d:a924:9b13)
19:26:01 <sm> ghcup. Before that, brew
19:26:23 <aljer> dsal: Thanks, that's what I'm leaning toward
19:26:26 <sm> no need for rosetta
19:27:27 <aljer> sm: I was trying to set up with ghcup but was getting a segfault with cabal, and another issue with stack (I believe it's due to a subdependency being installed with homebrew)
19:27:39 _leo___ joins (~emmanuelu@user/emmanuelux)
19:27:56 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:28:23 <sm> the one rule is try to go all in with ghcup, don't mix haskell tools installed by different methods
19:28:41 <sm> especially not mixed intel/arm tools
19:29:50 <aljer> sm: That makes sense. This is my first time away from pacman/apt so still getting my bearings.
19:30:56 <sm> either ghcup or arm brew will install arm haskell tools (and those will build arm executables). Watch out you don't install intel brew, which runs but will install intel things
19:31:34 <sm> ghcup is the simple path I would say
19:33:16 oldfashionedcow is now known as oldfashionedrat
19:33:37 <dsal> nix is the only thing that's worked consistently for me. But it does require knowing at least a little about nix.
19:33:39 oldfashionedrat is now known as oldfashionedcow
19:33:41 × _leo___ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:34:00 emmanuelux joins (~emmanuelu@user/emmanuelux)
19:35:11 <eldritchcookie[m> does backpack also recompile all dependencies if we change only the instantiated module and not the hsig file?
19:35:42 <eldritchcookie[m> *dependants
19:36:23 × tomku quits (~tomku@user/tomku) (Read error: Connection reset by peer)
19:36:34 <eldritchcookie[m> like say i have module Foo that depends on Bar.hsig is Foo recompiled if Bar.hs is modified?
19:36:41 tomku joins (~tomku@user/tomku)
19:37:33 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
19:37:59 lackita joins (~lackita@73.114.250.252)
19:40:53 × npmania quits (~Thunderbi@45.8.223.203) (Quit: npmania)
19:41:40 merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl)
19:41:54 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
19:41:58 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:42:04 npmania joins (~Thunderbi@45.8.223.203)
19:42:25 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
19:43:38 L29Ah joins (~L29Ah@wikipedia/L29Ah)
19:45:33 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
19:48:46 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
19:48:57 × malte quits (~malte@mal.tc) (Remote host closed the connection)
19:49:01 lackita joins (~lackita@73.114.250.252)
19:49:25 emmanuelux joins (~emmanuelu@user/emmanuelux)
19:49:32 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
19:49:58 malte joins (~malte@152.89.107.66)
19:50:22 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:53:20 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
19:53:32 × gurkenglas quits (~gurkengla@dynamic-046-114-178-040.46.114.pool.telefonica.de) (Ping timeout: 246 seconds)
19:53:43 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 268 seconds)
19:53:51 lackita joins (~lackita@73.114.250.252)
19:54:07 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:55:17 _leo___ joins (~emmanuelu@user/emmanuelux)
19:55:29 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:55:31 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350) (Remote host closed the connection)
19:58:41 emmanuelux_ joins (~emmanuelu@user/emmanuelux)
19:58:48 × _leo___ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
19:59:25 eggplantade joins (~Eggplanta@104.55.37.220)
20:01:14 freeside joins (~mengwong@103.252.202.170)
20:02:03 × emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
20:02:27 emmanuelux joins (~emmanuelu@user/emmanuelux)
20:04:27 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
20:04:41 emmanuelux joins (~emmanuelu@user/emmanuelux)
20:06:03 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
20:08:50 opticblast joins (~Thunderbi@172.58.82.191)
20:11:37 gurkenglas joins (~gurkengla@46.114.178.40)
20:11:57 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
20:13:53 <aljer> Alright, I uninstalled/reinstalled ghcup and was able to create and compile a cabal project immediately. Not sure what I had configured incorrectly the first time. Thanks for the help/suggestions
20:14:09 × merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
20:14:13 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
20:16:21 wroathe joins (~wroathe@207.153.38.140)
20:16:21 × wroathe quits (~wroathe@207.153.38.140) (Changing host)
20:16:21 wroathe joins (~wroathe@user/wroathe)
20:16:43 <sm> 👍️
20:17:04 L29Ah joins (~L29Ah@wikipedia/L29Ah)
20:18:28 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
20:19:34 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
20:19:45 <tomsmeding> is there a library to parse cabal.project files?
20:19:57 <tomsmeding> Cabal-syntax seems to be for .cabal files only, but I may be mistaken
20:22:22 <Hecate> tomsmeding: I'd forward this question to #hackage if I were you
20:22:33 <tomsmeding> oh wait I need the cabal-install library of course
20:25:38 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
20:26:02 pavonia joins (~user@user/siracusa)
20:26:05 <tomsmeding> meeh why does that need an HttpTransport
20:26:17 <tomsmeding> just parse the bloody thing
20:26:44 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
20:28:07 Bocaneri joins (~sauvin@user/Sauvin)
20:28:30 Bocaneri is now known as Guest6558
20:29:42 Guest6558 is now known as SenFache
20:30:43 × Sauvin quits (~sauvin@user/Sauvin) (Ping timeout: 252 seconds)
20:37:13 Sinbad joins (~Sinbad@user/sinbad)
20:39:01 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
20:40:01 mewra is now known as mira
20:40:09 emmanuelux joins (~emmanuelu@user/emmanuelux)
20:42:23 <sclv> tomsmeding: because you can include remote files
20:43:18 <sclv> if you never will parse with a remote includes its ok to pass in a dummy one iirc
20:44:04 <tomsmeding> sclv: will 'cabal freeze' ever generate anything with a remote include :p
20:44:21 <sclv> no
20:46:13 <sclv> in fact for freeze files the cabal config parser might suffice, since project files are just an extension of it
20:46:29 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
20:47:24 <tomsmeding> sclv: where is said config parser?
20:48:29 <sclv> cant lookup now, on my phone
20:48:39 <tomsmeding> sure, no problem
20:55:20 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 260 seconds)
20:59:15 wroathe joins (~wroathe@50.205.197.50)
20:59:15 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
20:59:15 wroathe joins (~wroathe@user/wroathe)
21:01:52 × rlj quits (~rlj@194-218-34-180.customer.telia.com) (Quit: Client closed)
21:02:05 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 246 seconds)
21:02:24 <sclv> also may want to use https://hackage.haskell.org/package/cabal-install-parsers
21:04:57 <sclv> and for standard config parser https://hackage.haskell.org/package/cabal-install-3.8.1.0/docs/Distribution-Client-Config.html#v:loadConfig
21:08:11 × retrosenator quits (~retrosena@174.211.112.224) (Read error: Connection reset by peer)
21:08:39 freeside joins (~mengwong@103.252.202.170)
21:11:54 × opticblast quits (~Thunderbi@172.58.82.191) (Ping timeout: 260 seconds)
21:12:53 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
21:18:49 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 268 seconds)
21:18:56 lackita joins (~lackita@73.114.250.252)
21:19:09 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:21:49 justsomeguy joins (~justsomeg@user/justsomeguy)
21:21:58 × aljer quits (~j@user/aljer) (Quit: WeeChat 3.8)
21:25:50 jinsun joins (~jinsun@user/jinsun)
21:26:35 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
21:28:19 × Cale quits (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) (Ping timeout: 252 seconds)
21:28:53 <eldritchcookie[m> is there some way to get cabal to dump interface files? i don't know how to compile with backpack without cabal
21:31:14 Guest69 joins (~Guest69@2601:401:4300:55a0:1b95:c0a4:db57:c150)
21:32:24 × Guest69 quits (~Guest69@2601:401:4300:55a0:1b95:c0a4:db57:c150) (Client Quit)
21:33:10 freeside joins (~mengwong@103.252.202.170)
21:37:55 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds)
21:38:32 <monochrom> backpack does need cabal.
21:39:11 <davean> backpack needs cabal?
21:39:13 <davean> hum?
21:39:18 <monochrom> Is it not good enough to run "cabal build" as usual and then you hunt down the *.hi files?
21:39:38 <monochrom> Or if you mean the *.hsig files then you have to write them.
21:42:32 jpds joins (~jpds@gateway/tor-sasl/jpds)
21:44:12 × michalz quits (~michalz@185.246.204.121) (Remote host closed the connection)
21:47:54 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:49:11 × gurkenglas quits (~gurkengla@46.114.178.40) (Ping timeout: 252 seconds)
21:52:00 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
21:52:43 mmhat joins (~mmh@2003:f1:c730:fb3a:ee08:6bff:fe09:5315)
21:56:35 × mmhat quits (~mmh@2003:f1:c730:fb3a:ee08:6bff:fe09:5315) (Client Quit)
21:59:51 <__monty__> /wg 15
22:00:00 × ubert quits (~Thunderbi@p200300ecdf130185faf60c5e727d766b.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
22:00:00 ub is now known as ubert
22:00:17 <__monty__> Whoops, disregard.
22:00:42 ubert1 joins (~Thunderbi@p200300ecdf13019b2eac5c41519fc3af.dip0.t-ipconnect.de)
22:03:02 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
22:03:25 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
22:05:48 Lord_of_Life_ is now known as Lord_of_Life
22:05:58 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
22:06:40 freeside joins (~mengwong@103.252.202.170)
22:12:15 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds)
22:17:08 × adium quits (adium@user/adium) (Quit: Stable ZNC by #bnc4you)
22:17:37 × SenFache quits (~sauvin@user/Sauvin) (Remote host closed the connection)
22:18:13 opticblast joins (~Thunderbi@172.58.84.5)
22:19:09 SenFache joins (~sauvin@user/Sauvin)
22:19:50 × eggplantade quits (~Eggplanta@104.55.37.220) (Remote host closed the connection)
22:27:39 <davean> __monty__: "good enough" is not "required"
22:27:48 <davean> er, monochrom
22:34:15 gurkenglas joins (~gurkengla@46.114.178.40)
22:40:54 freeside joins (~mengwong@103.252.202.170)
22:45:46 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 268 seconds)
22:46:03 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
22:46:30 × opticblast quits (~Thunderbi@172.58.84.5) (Quit: opticblast)
22:47:51 notzmv joins (~zmv@user/notzmv)
22:48:00 × CiaoSen quits (~Jura@p200300c9570460002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
22:49:26 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
22:59:57 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 268 seconds)
23:00:06 lackita joins (~lackita@73.114.250.252)
23:00:43 × apache2 quits (apache2@anubis.0x90.dk) (Remote host closed the connection)
23:00:52 apache2 joins (apache2@46.101.137.181)
23:02:20 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds)
23:04:13 paulpaul1076 joins (~textual@2a0a:8f40:2:3:662c:e9e1:97be:2d8b)
23:04:14 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:cd1a:e6be:bfd3:350)
23:04:42 × paulpaul1076 quits (~textual@2a0a:8f40:2:3:662c:e9e1:97be:2d8b) (Remote host closed the connection)
23:05:06 × SenFache quits (~sauvin@user/Sauvin) (Remote host closed the connection)
23:06:02 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
23:06:11 <dibblego> is there a function everyPossibleListOfListsPreservingOrder :: [a] -> [[a]] ?
23:07:41 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8)
23:08:16 stiell joins (~stiell@gateway/tor-sasl/stiell)
23:08:28 adium joins (adium@user/adium)
23:08:34 <[Leary]> > subsequences "abcd"
23:08:36 <lambdabot> ["","a","b","ab","c","ac","bc","abc","d","ad","bd","abd","cd","acd","bcd","a...
23:10:06 SenFache joins (~sauvin@user/Sauvin)
23:11:29 <dibblego> thanks, I may have messed that question up
23:12:27 <mauke> > filterM (return [True, False]) "abcd"
23:12:28 <lambdabot> ["abcd","abc","abd","ab","acd","ac","ad","a","bcd","bc","bd","b","cd","c","d...
23:12:47 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
23:14:56 <dibblego> f ["a", "b", "c"] == [[['a', 'b', 'c']], [['a', 'b'], ['c']], [['a'], ['b', 'c']]]
23:15:03 stiell joins (~stiell@gateway/tor-sasl/stiell)
23:15:29 <dibblego> f ["a", "b", "c"] == [[["abc"]], [["ab"], ["c"]], [["a"], ["bc"]]]
23:15:36 <mauke> that's missing a few
23:16:05 <dibblego> yeah, though that's what I am looking for ^^ just didn't word it well
23:16:35 <mauke> [("", "abc"), ("a", "bc"), ("ab", "c"), ("abc", "")]
23:16:50 × SenFache quits (~sauvin@user/Sauvin) (Remote host closed the connection)
23:16:53 <dibblego> actually …
23:17:52 SenFache joins (~sauvin@user/Sauvin)
23:18:01 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:18:17 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
23:18:27 <mauke> > (\xs -> map (\n -> splitAt n xs) [0 .. length xs]) "abc"
23:18:29 <lambdabot> [("","abc"),("a","bc"),("ab","c"),("abc","")]
23:20:16 <dibblego> f ["a", "b", "c", "d"] == [["abcd"], ["abc", "d"], ["ab", "cd"], ["a", "bcd"], ["ab", "c", "d"], ["a", "bc", "d"], ["a", "b", "cd"], ["a", "b", "c", "d"]]
23:21:11 <mauke> non-empty subsequences
23:21:23 × adium quits (adium@user/adium) (Quit: Stable ZNC by #bnc4you)
23:23:46 × SenFache quits (~sauvin@user/Sauvin) (Remote host closed the connection)
23:25:04 <dibblego> looks different to subsequences right?
23:26:11 SenFache joins (~sauvin@user/Sauvin)
23:26:27 <mauke> yeah
23:26:35 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
23:28:10 adium joins (adium@user/adium)
23:28:59 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 260 seconds)
23:29:18 lackita joins (~lackita@73.114.250.252)
23:30:07 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
23:30:24 <[Leary]> > let chunkings :: [a] -> [[[a]]]; chunkings (x:xs@(_:_)) = [onHead (x:), ([x]:)] <*> chunkings xs; chunkings [x] = [[[x]]]; chunkings [] = []; onHead f (x:xs) = f x:xs; onHead _ [] = [] in chunkings "abcd"
23:30:25 × Sinbad quits (~Sinbad@user/sinbad) (Ping timeout: 252 seconds)
23:30:26 <lambdabot> [["abcd"],["abc","d"],["ab","cd"],["ab","c","d"],["a","bcd"],["a","bc","d"],...
23:30:40 <[Leary]> I don't know if there's a cleaner way.
23:31:13 biberu joins (~biberu@user/biberu)
23:32:06 <[Leary]> dibblego: ^
23:32:27 × AlexZenon quits (~alzenon@178.34.160.79) (Ping timeout: 248 seconds)
23:32:47 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
23:33:25 × Alex_test quits (~al_test@178.34.160.79) (Ping timeout: 260 seconds)
23:34:23 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
23:34:23 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
23:34:35 opticblast joins (~Thunderbi@172.58.84.5)
23:35:04 <dibblego> ah nice thank you
23:36:15 × son0p quits (~ff@190.158.28.118) (Ping timeout: 252 seconds)
23:38:48 × SenFache quits (~sauvin@user/Sauvin) (Ping timeout: 255 seconds)
23:39:24 L29Ah joins (~L29Ah@wikipedia/L29Ah)
23:39:27 × lackita quits (~lackita@73.114.250.252) (Read error: Connection reset by peer)
23:39:59 lackita joins (~lackita@73.114.250.252)
23:40:17 × gurkenglas quits (~gurkengla@46.114.178.40) (Ping timeout: 252 seconds)
23:40:21 Alex_test joins (~al_test@178.34.160.79)
23:41:10 AlexZenon joins (~alzenon@178.34.160.79)
23:46:31 × lackita quits (~lackita@73.114.250.252) (Ping timeout: 252 seconds)
23:47:09 lackita joins (~lackita@73.114.250.252)
23:47:48 Sauvin joins (~sauvin@user/Sauvin)
23:49:31 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
23:49:31 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
23:49:31 wroathe joins (~wroathe@user/wroathe)
23:49:36 freeside joins (~mengwong@103.252.202.170)
23:50:19 maximalmuncher joins (~maximalmu@108.168.13.112)
23:51:03 × lackita quits (~lackita@73.114.250.252) (Read error: Connection reset by peer)
23:51:14 lackita joins (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286)
23:51:34 × lackita quits (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286) (Read error: Connection reset by peer)
23:51:48 lackita joins (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286)
23:52:07 × lackita quits (~lackita@2600:1000:b033:adf2:42c8:c73b:9ad5:1286) (Read error: Connection reset by peer)
23:52:19 lackita joins (~lackita@73.114.250.252)
23:53:51 × freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds)
23:58:02 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)

All times are in UTC on 2023-02-12.