2023/10/23

2023-10-23 00:01:45 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 00:03:59 +0200td_(~td@i53870910.versanet.de) (Ping timeout: 255 seconds)
2023-10-23 00:05:57 +0200td_(~td@i5387093D.versanet.de)
2023-10-23 00:06:28 +0200acidjnk_new(~acidjnk@p200300d6e72b938125cc9ae0c91bfe8f.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2023-10-23 00:06:28 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
2023-10-23 00:08:58 +0200 <EvanR> Inst, MaybeT would only let you throw 1 kind of exception. try ExceptT
2023-10-23 00:09:26 +0200 <Inst> see, I'm annoyed because the easy way to do it is just to stuff it into IO :(
2023-10-23 00:09:38 +0200 <Inst> then throwIO and catchIO during the processing
2023-10-23 00:09:54 +0200 <Inst> I'm throwing the second set of exceptions case pattern matching
2023-10-23 00:11:18 +0200 <probie> If you want the ability to randomly throw exceptions, don't want to use `Either`/`ExceptT` or `IO`, how about `Cont`?
2023-10-23 00:11:34 +0200thegeekinside(~thegeekin@189.180.4.84) (Ping timeout: 255 seconds)
2023-10-23 00:11:47 +0200 <Inst> I'm trying to parse a maze
2023-10-23 00:11:59 +0200 <EvanR> what are the two kinds of exceptions
2023-10-23 00:12:13 +0200 <Inst> the failure indications are: "file characters don't match the specification"
2023-10-23 00:12:48 +0200 <Inst> "start position not included and/or exit position not included"
2023-10-23 00:12:50 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 00:12:58 +0200 <EvanR> sounds like 1 kind of exception. String. xD
2023-10-23 00:13:07 +0200 <Inst> :(
2023-10-23 00:13:24 +0200 <Inst> but the point is, I want to toss maps over the data
2023-10-23 00:13:45 +0200 <EvanR> those are both parse errors, so you could also make a ParseError type
2023-10-23 00:13:48 +0200 <Inst> and I don't want to pay for GHC Premium Edition
2023-10-23 00:14:08 +0200 <Inst> file characters not matching -> throw the exception immediately and stop parsing
2023-10-23 00:14:20 +0200 <Inst> start position not included and/or exit position not included: you know after you're done parsing
2023-10-23 00:14:44 +0200 <EvanR> either way you need to pass at least those checkpoints to have a Maze
2023-10-23 00:15:13 +0200 <Inst> well, the Maze is stored as Vector (Vector MazeTile)
2023-10-23 00:15:49 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-10-23 00:16:28 +0200 <Inst> i mean, I can trivially just parse the maze twice, i.e, first convert it to a Maybe Maze, then scan the maze for start and exit positions
2023-10-23 00:16:34 +0200 <Inst> but I want to do it in one traversal
2023-10-23 00:16:55 +0200 <EvanR> that's why it's part of the parser
2023-10-23 00:17:01 +0200 <EvanR> not a second pass
2023-10-23 00:17:21 +0200 <Inst> hmmm, I never thought of that, what if there are multiple start positions? :(
2023-10-23 00:17:27 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds)
2023-10-23 00:17:32 +0200 <EvanR> is that another possible problem?
2023-10-23 00:17:39 +0200 <EvanR> also part of the parser
2023-10-23 00:18:15 +0200 <Inst> I really don't want to dig out attoparsec / megaparsec / flatparse :(
2023-10-23 00:18:42 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-10-23 00:18:42 +0200 <Inst> should I?
2023-10-23 00:18:44 +0200 <EvanR> you don't have to, I think it's a big picture point
2023-10-23 00:19:12 +0200 <Inst> if there are multiple start positions, I can store it in a vector of start positions
2023-10-23 00:19:12 +0200 <EvanR> the parser returns a (valid) Maze or not, if not possibly additional info
2023-10-23 00:19:28 +0200 <Inst> https://inventwithpython.com/bigbookpython/project44.html
2023-10-23 00:19:52 +0200 <Inst> it's currently supposed to return start positions, exit positions, and a maze
2023-10-23 00:20:01 +0200 <Inst> well, A start position, A exit position, and a maze
2023-10-23 00:20:07 +0200 <EvanR> well that's all bundled together then
2023-10-23 00:20:11 +0200 <Inst> I can have it return start positions, exit positions, and a maze
2023-10-23 00:20:25 +0200 <EvanR> and you don't get any of it if parsing fails
2023-10-23 00:20:31 +0200 <Inst> the game loop would randomly choose a start position if there's more than one
2023-10-23 00:20:56 +0200 <Inst> do I even need StateT?
2023-10-23 00:21:09 +0200 <Inst> I can just do a straight maybe over data
2023-10-23 00:21:25 +0200 <Inst> and return a 3-tuple of start positions, exit positions, and a maze
2023-10-23 00:21:33 +0200 <EvanR> however it is accomplished, it sounds like you want a FilePath -> IO (Either Problem Maze) , where Maze is the bundle of data not just raw maze tiles
2023-10-23 00:21:56 +0200 <Inst> I have a loadFile :: FilePath -> IO Game right now
2023-10-23 00:21:58 +0200 <EvanR> this 3 tuple sounds like it has moved into the "needs its own record type" phase
2023-10-23 00:22:34 +0200 <Inst> which first tries to load the file using readFile' :: IO String
2023-10-23 00:23:01 +0200 <Inst> and has a catch keyed to IOException on it
2023-10-23 00:23:30 +0200 <EvanR> I guess you can do it that way but none of the issues you mentioned sound like IOExceptions
2023-10-23 00:24:07 +0200 <EvanR> meanwhile after you explicitly return 2 or 3 actual issue with the data, there are still actual IOExceptions possible which is fine and separate
2023-10-23 00:24:19 +0200 <EvanR> like file not found
2023-10-23 00:24:29 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 00:25:12 +0200 <Inst> oh no, the catch is tossing `putStrLn $ fileName <> " does not exist or cannot be opened."
2023-10-23 00:25:21 +0200 <Inst> then using exitFailure
2023-10-23 00:25:23 +0200 <EvanR> this is all quite formal sounding, and a quick and dirty way would be to return Either String Maze where String is the textual problem explained
2023-10-23 00:26:00 +0200 <Inst> probably makes everything much simpler
2023-10-23 00:26:18 +0200michalz(~michalz@185.246.207.221) (Remote host closed the connection)
2023-10-23 00:26:34 +0200 <Inst> then I just pattern match over Lefts, toss it into an error throwing function
2023-10-23 00:26:41 +0200 <EvanR> sure
2023-10-23 00:27:39 +0200 <EvanR> throwIO (userError explanation)
2023-10-23 00:28:58 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
2023-10-23 00:29:31 +0200 <Inst> Was it you or Axman6 who came up with the GHC Premium Edition joke?
2023-10-23 00:29:42 +0200 <EvanR> I don't get it
2023-10-23 00:29:44 +0200 <Inst> "Chase Success At All Costs"
2023-10-23 00:30:00 +0200 <probie> You can just implement the parser using `foldr` :p
2023-10-23 00:30:13 +0200 <Inst> GHC is crippled unless you pay for it, and it can't throw exceptions
2023-10-23 00:30:16 +0200 <probie> GHC Premium Edition sounds plausibly like Axman6
2023-10-23 00:30:17 +0200 <Inst> probie: thank you! <3
2023-10-23 00:31:16 +0200 <probie> now I'm tempted to actually do that instead of work for $dayjob
2023-10-23 00:32:25 +0200 <EvanR> new languages that can't throw exceptions do brag about it like it's a feature
2023-10-23 00:32:50 +0200 <EvanR> (zig, rust)
2023-10-23 00:33:00 +0200 <probie> go
2023-10-23 00:33:44 +0200 <EvanR> leads people to believe their code can't crash. Ok but then there's infinite loops
2023-10-23 00:33:52 +0200 <probie> although, at least zig and rust aren't just repeating `if err != nil` several thousand times
2023-10-23 00:35:26 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 00:35:39 +0200 <EvanR> in haskell there's a handy incantation to avoid infinite loops: "ignoring bottoms," xD
2023-10-23 00:39:45 +0200 <isekaijin> EvanR: Proving that a program will terminate at all is muuuch easier than proving that a program will terminate in a specific way (not throwing exceptions).
2023-10-23 00:40:12 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 248 seconds)
2023-10-23 00:51:49 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 00:52:00 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
2023-10-23 00:55:27 +0200notzmv(~zmv@user/notzmv) (Remote host closed the connection)
2023-10-23 00:56:25 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
2023-10-23 00:57:51 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
2023-10-23 01:00:13 +0200 <Inst> awww
2023-10-23 01:02:40 +0200notzmv(~zmv@user/notzmv)
2023-10-23 01:02:42 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 01:07:05 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds)
2023-10-23 01:08:25 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 01:13:04 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
2023-10-23 01:13:40 +0200tv(~tv@user/tv) (Read error: Connection reset by peer)
2023-10-23 01:15:15 +0200 <probie> Inst: https://paste.tomsmeding.com/UCIohO3H complete with a disgusting 5-tuple (sorry for the delay)
2023-10-23 01:16:47 +0200xigua(~xigua@user/xigua) (Remote host closed the connection)
2023-10-23 01:16:56 +0200 <Inst> I'll github my solution when I'm done
2023-10-23 01:17:22 +0200xigua(~xigua@user/xigua)
2023-10-23 01:18:41 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-23 01:19:20 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 01:23:46 +0200 <EvanR> \o/ parsing without parsec
2023-10-23 01:23:52 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
2023-10-23 01:25:12 +0200arahael(~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net)
2023-10-23 01:28:03 +0200ddellacosta(~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 258 seconds)
2023-10-23 01:28:42 +0200ddellacosta(~ddellacos@ool-44c738de.dyn.optonline.net)
2023-10-23 01:30:25 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 01:30:30 +0200 <monochrom> "A parser is a disgusting 5-tuple where..." :)
2023-10-23 01:30:59 +0200 <monochrom> Haha I like the wording "foldr go finish". :)
2023-10-23 01:32:13 +0200tv(~tv@user/tv)
2023-10-23 01:32:39 +0200td_(~td@i5387093D.versanet.de) (Ping timeout: 240 seconds)
2023-10-23 01:33:42 +0200cuiltb^(~cd@76.145.193.217) (Remote host closed the connection)
2023-10-23 01:34:07 +0200 <Axman6> Inst: probie not sure I can take full credit for GHC-PE, I feel someone (possibily EvanR, sclv or glguy) planted the seed (or, promoted appropriate synergy for us to achieve out corporate targets in bring value to our customers, of as I've come to call them our family)
2023-10-23 01:34:13 +0200 <Axman6> our*
2023-10-23 01:34:31 +0200td_(~td@i5387090A.versanet.de)
2023-10-23 01:34:57 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 258 seconds)
2023-10-23 01:36:37 +0200 <arahael> What's GHC-PE again?
2023-10-23 01:36:47 +0200arahaelis bad with names.
2023-10-23 01:37:07 +0200 <EvanR> GHC petroleum engineering
2023-10-23 01:37:42 +0200 <EvanR> or premium edition according to the previous discussion
2023-10-23 01:38:29 +0200 <Inst> oh crap, I just reinvented hughes lists
2023-10-23 01:38:33 +0200 <Inst> look what you made me do, probie
2023-10-23 01:38:51 +0200 <arahael> Ah, checked the logs. :)
2023-10-23 01:38:59 +0200 <arahael> Axman6 had me fooled for a bit there. :D
2023-10-23 01:41:20 +0200 <monochrom> GHC Python Edition >:)
2023-10-23 01:41:33 +0200 <geekosaur> that was MissingPy, way back when 😛
2023-10-23 01:41:54 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 01:46:43 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 252 seconds)
2023-10-23 01:46:54 +0200 <probie> Re GHC PE: Perhaps the Haskell foundation consider paywalling typeclasses? $2 a month for Applicative, $5 for Monads, $10 for Arrows and Comonads (Functors are included in the free plan)
2023-10-23 01:48:04 +0200 <geekosaur> Functor's way too important to be free, and Arrow's not worth that much 😛
2023-10-23 01:48:56 +0200 <geekosaur> make Monad the free one, with the kicker that to actually use it you need to pay for Functor
2023-10-23 01:49:37 +0200yoyofreeman(~yoyofreem@176.97.76.178) (Read error: Connection reset by peer)
2023-10-23 01:50:16 +0200 <EvanR> you can use any type class as long as you want but if you want them to follow laws that's extra
2023-10-23 01:50:17 +0200 <Axman6> monochrom: https://www.youtube.com/watch?v=BvECNQRrjCY
2023-10-23 01:50:19 +0200yoyofreeman(~yoyofreem@176.97.76.178)
2023-10-23 01:51:33 +0200 <Axman6> geekosaur: I wonder how many people actually got that reference; what a fun time it was when there was an idea we just needed one library to add all the missing functionality of the language
2023-10-23 01:51:41 +0200 <jackdk> probie: you gotta bulk out the free tier with janky offerings that might let you do what you want if you can figure them out. I'd put Comonad in the free tier for that reason. Also chuck in Semigroup because if you have to pay for Monoid then you'll tie yourself in knots doing everything with semigroupoids and known-nonempty containers
2023-10-23 01:52:32 +0200 <jackdk> (guess who's spent too much time looking at AWS' list?)
2023-10-23 01:52:37 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 01:54:55 +0200 <monochrom> Haha I remember Python 5.
2023-10-23 01:56:32 +0200 <monochrom> And don't forget #scalaz /topic has "download Scalaz 10 at https://www.haskell.org/"
2023-10-23 01:57:38 +0200 <dibblego> :)
2023-10-23 01:58:21 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 260 seconds)
2023-10-23 02:01:04 +0200 <Axman6> =)
2023-10-23 02:01:41 +0200 <Axman6> probie: I wish Go included Functor in the free plan
2023-10-23 02:01:55 +0200 <Axman6> And Elm while we're at it
2023-10-23 02:04:07 +0200 <EvanR> how to upgrade, go -> elm -> scalaz -> haskell -> neohaskell? xD
2023-10-23 02:04:39 +0200 <geekosaur> neohaskell supposedly is an entry point to learning haskell, so swap them
2023-10-23 02:05:03 +0200 <monochrom> After haskell, consider agda or lean :)
2023-10-23 02:05:18 +0200 <geekosaur> idris
2023-10-23 02:05:29 +0200 <monochrom> yeah
2023-10-23 02:07:14 +0200 <jackdk> geekosaur: have they shipped anything yet?
2023-10-23 02:07:33 +0200 <geekosaur> not so far as I'm aware
2023-10-23 02:07:41 +0200 <geekosaur> not that I've been paying close attention
2023-10-23 02:07:48 +0200 <dibblego> the scala train is a long journey to realising it was all a waste of time
2023-10-23 02:10:19 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 02:12:15 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2023-10-23 02:14:56 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds)
2023-10-23 02:16:16 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 272 seconds)
2023-10-23 02:21:08 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 02:25:24 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds)
2023-10-23 02:26:51 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 02:36:16 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935) (Quit: Disrupting the dragon's slumber one time too often shall eventually bestow upon all an empirical and indiscriminate conflagration that will last for all goddamn eternity.)
2023-10-23 02:36:32 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds)
2023-10-23 02:50:51 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 258 seconds)
2023-10-23 02:59:15 +0200 <probie> https://github.com/neohaskell/NeoHaskell hasn't had any commits pushed in the last month, but the proposals repo has https://github.com/neohaskell/NHEP
2023-10-23 02:59:19 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
2023-10-23 02:59:21 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-23 03:00:12 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2023-10-23 03:02:19 +0200 <EvanR> holy crap the proposals site CSS
2023-10-23 03:02:32 +0200 <EvanR> somehow it's worse than haskell
2023-10-23 03:03:36 +0200 <EvanR> proposal 6: the list type should be implemented as Vector or Data.Sequence instead of linked list
2023-10-23 03:04:13 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-10-23 03:04:45 +0200 <EvanR> admits that haskells linked list is more efficient than either of these in many cases, in which case they recommend using another data type like Queue
2023-10-23 03:04:52 +0200 <EvanR> (I guess they mean Stack)
2023-10-23 03:05:12 +0200 <probie> What's with all the list hate?
2023-10-23 03:05:24 +0200 <dibblego> string addiction
2023-10-23 03:05:30 +0200 <EvanR> <- concerned
2023-10-23 03:05:46 +0200 <probie> Strings should not be a `[Char]`, but that's a separate issue
2023-10-23 03:05:57 +0200 <dibblego> addictions are complicated
2023-10-23 03:06:09 +0200 <EvanR> that's proposal 5, make String = Text
2023-10-23 03:06:35 +0200 <EvanR> but also suggests makine it equal ByteString xD
2023-10-23 03:07:23 +0200 <EvanR> String = ByteString has going for it that every other languages accidentally has done this already
2023-10-23 03:07:37 +0200 <EvanR> so we won't be alone is messing that up
2023-10-23 03:07:40 +0200 <EvanR> in*
2023-10-23 03:07:47 +0200 <monochrom> If Text=ByteString, then []=Vector=Queue=Identity=IO.
2023-10-23 03:07:48 +0200 <probie> EvanR: Not quite - Golang didn't mess this up.
2023-10-23 03:07:56 +0200 <EvanR> really? impressive
2023-10-23 03:08:29 +0200otto_s(~user@p4ff27d6b.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
2023-10-23 03:08:48 +0200 <probie> it probably helps that Rob Pike was involved in creating UTF-8, so it's front of mind for him
2023-10-23 03:08:55 +0200 <monochrom> Oh just reinterpret "every other language" as in "every other line" so only half of the languages >:D
2023-10-23 03:08:56 +0200 <EvanR> when in doubt make the same mistakes that anything anyone else heard of has made
2023-10-23 03:09:48 +0200waleee(~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds)
2023-10-23 03:10:14 +0200otto_s(~user@p5b044a8c.dip0.t-ipconnect.de)
2023-10-23 03:12:59 +0200 <dsal> I think the written word was a mistake and there's no way to do it right.
2023-10-23 03:18:14 +0200 <probie> I feel like there's a joke to be made about Arabic, Aramaic, Farsi, Hebrew etc. doing it left
2023-10-23 03:18:29 +0200 <yin> Words are easy like the wind, faithful friends are hard to find.
2023-10-23 03:18:59 +0200 <probie> False friends are a Gift
2023-10-23 03:20:21 +0200 <geekosaur> in German, I presume?
2023-10-23 03:20:23 +0200 <probie> https://en.wikipedia.org/wiki/False_friend
2023-10-23 03:20:49 +0200 <probie> geekosaur: that was indeed the joke
2023-10-23 03:22:18 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 03:24:41 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 260 seconds)
2023-10-23 03:26:04 +0200CiaoSen(~Jura@2a05:5800:2be:1b00:664b:f0ff:fe37:9ef) (Ping timeout: 248 seconds)
2023-10-23 03:27:12 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds)
2023-10-23 03:28:13 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
2023-10-23 03:29:13 +0200 <EvanR> the same words mean fresh bread and stale bread in two languages, oof
2023-10-23 03:30:10 +0200 <EvanR> return is a false friend I guess
2023-10-23 03:33:39 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 03:38:20 +0200 <probie> Out of curiosity, does anyone know what datatype NeoHaskell plans to use for things which are to be iterated over once instead of lists? It doesn't really seem to address that in the proposal to not use lists
2023-10-23 03:38:36 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds)
2023-10-23 03:41:31 +0200 <EvanR> technically Vector would work as well as it does in ruby
2023-10-23 03:41:37 +0200 <EvanR> for that
2023-10-23 03:42:13 +0200 <EvanR> or maybe the assumption is the normal list type will be used qualified
2023-10-23 03:43:49 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-23 03:46:49 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:7c71:e1a2:664b:2a25) (Remote host closed the connection)
2023-10-23 03:47:35 +0200notzmv(~zmv@user/notzmv)
2023-10-23 03:54:58 +0200dhruvasagar(~dhruvasag@49.207.194.211)
2023-10-23 03:55:10 +0200 <geekosaur> someone mentioned Queue earlier, I think
2023-10-23 03:55:34 +0200 <geekosaur> [23 01:04:45] <EvanR> admits that haskells linked list is more efficient than either of these in many cases, in which case they recommend using another data type like Queue
2023-10-23 03:55:48 +0200 <Inst> what's the difference between random and random.fu besides rudeness?
2023-10-23 03:56:20 +0200 <geekosaur> it's not intended to be rudeness as in a certain four letter word, it's a reference to kung fu
2023-10-23 03:56:48 +0200 <geekosaur> and random 1.1 picked up a lot of what random-fu offers, yes
2023-10-23 03:56:56 +0200 <Inst> bad joke on my part, i prefer f for arbitrary function name, u for arbitrary value name
2023-10-23 03:56:56 +0200 <geekosaur> but not all
2023-10-23 03:57:02 +0200dhruvasagar1(~dhruvasag@37.19.205.196)
2023-10-23 03:57:08 +0200dhruvasagar(~dhruvasag@49.207.194.211) (Read error: Connection reset by peer)
2023-10-23 03:57:27 +0200 <Inst> they actually share 1 maintainer
2023-10-23 03:58:01 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2023-10-23 03:59:49 +0200 <geekosaur> I think mostly at this point it's just backward compatibility for folks who switched to random-fu back in the random-1.0 days
2023-10-23 04:00:28 +0200 <geekosaur> but I have heard of folks who think random-fu still does some things better than random, and random's interface would now be hard to change to offer the same
2023-10-23 04:01:59 +0200 <geekosaur> I don't recall details at this point though
2023-10-23 04:02:27 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:7c71:e1a2:664b:2a25)
2023-10-23 04:04:23 +0200 <geekosaur> one thing I think random offers but random-fu doesn't is splitting generators; there's been a long-running argument over whether splitting is actually useful and can be trusted to make safe generators
2023-10-23 04:05:15 +0200 <geekosaur> (splitting is something you would do if you need to make a new random generator given an existing one; consider making a new thread, which should have its own independent generator)
2023-10-23 04:12:22 +0200 <Inst> i see, as opposed to stuffing it in MVar or TVar and having each thread read the shared generator
2023-10-23 04:13:21 +0200 <geekosaur> yes. you split the generator, keep one of the new ones, give the new thread the other. much faster than having to coordinate access via an MVar or etc.
2023-10-23 04:13:39 +0200santiagopim(~user@90.167.66.131) (Ping timeout: 258 seconds)
2023-10-23 04:14:44 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-10-23 04:14:44 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-10-23 04:14:44 +0200finn_elijaFinnElija
2023-10-23 04:15:11 +0200arahael(~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 258 seconds)
2023-10-23 04:32:29 +0200arahael(~arahael@1.145.66.50)
2023-10-23 04:33:34 +0200Inst(~Inst@120.244.192.250) (Read error: Connection reset by peer)
2023-10-23 04:56:12 +0200ddellacosta(~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 258 seconds)
2023-10-23 04:57:56 +0200ddellacosta(~ddellacos@ool-44c738de.dyn.optonline.net)
2023-10-23 05:03:28 +0200td_(~td@i5387090A.versanet.de) (Ping timeout: 272 seconds)
2023-10-23 05:05:05 +0200td_(~td@i53870920.versanet.de)
2023-10-23 05:12:23 +0200eggplant_(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
2023-10-23 05:12:41 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:7c71:e1a2:664b:2a25) (Ping timeout: 246 seconds)
2023-10-23 05:14:24 +0200aforemny_(~aforemny@2001:9e8:6cdc:d800:4073:3320:51a8:3861)
2023-10-23 05:15:55 +0200aforemny(~aforemny@i59F516CF.versanet.de) (Ping timeout: 264 seconds)
2023-10-23 05:16:08 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 258 seconds)
2023-10-23 05:29:22 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-10-23 05:29:22 +0200 <mauke> <EvanR> String = ByteString has going for it that every other languages accidentally has done this already <- hey, maxBound :: Char in Perl is '\9223372036854775807'
2023-10-23 05:29:38 +0200 <mauke> even Haskell can't do that :-)
2023-10-23 05:31:30 +0200 <mauke> <probie> Out of curiosity, does anyone know what datatype NeoHaskell plans to use for things which are to be iterated over once instead of lists? <- I wonder how they would feel about Stream (Of a) m ()
2023-10-23 05:35:31 +0200arahael(~arahael@1.145.66.50) (Ping timeout: 252 seconds)
2023-10-23 06:00:43 +0200actioninja(~actioninj@user/actioninja) (Quit: see ya mane)
2023-10-23 06:01:11 +0200actioninja(~actioninj@user/actioninja)
2023-10-23 06:03:37 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2023-10-23 06:06:35 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-10-23 06:08:39 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 258 seconds)
2023-10-23 06:19:41 +0200Pseudonym(~IceChat95@203.214.86.172)
2023-10-23 06:27:34 +0200michalz(~michalz@185.246.207.215)
2023-10-23 06:27:37 +0200 <Pseudonym> Kinda bummed to learn that David Turner died this week. RIP.
2023-10-23 06:30:18 +0200 <jackdk> Well, damn. I'd been hacking on some stuff based on his old research just recently. RIP
2023-10-23 06:30:18 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2023-10-23 06:31:03 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 06:31:36 +0200 <jackdk> https://twitter.com/FrancescoC/status/1716157062122438873 is the only thing I can see so far, so it must be very recent news
2023-10-23 06:32:05 +0200 <Pseudonym> Yeah, apparently it was a few days ago, but it only started reaching the community today.
2023-10-23 06:39:08 +0200cheater_(~Username@user/cheater)
2023-10-23 06:42:26 +0200cheater(~Username@user/cheater) (Ping timeout: 260 seconds)
2023-10-23 06:42:33 +0200cheater_cheater
2023-10-23 06:43:02 +0200rosco(~rosco@yp-150-69.tm.net.my)
2023-10-23 06:44:05 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2023-10-23 06:46:06 +0200Vajb(~Vajb@85-76-79-129-nat.elisa-mobile.fi)
2023-10-23 06:47:54 +0200 <probie> Wikipedia has been updated
2023-10-23 06:48:22 +0200 <probie> (I checked because I couldn't remember if he was the Miranda guy or not)
2023-10-23 06:49:40 +0200 <probie> mauke: I think it'd be against their goals of "easy to use" - their target audience is people who know some language like Java, want to be quickly productive and don't want to spend much time learning new things
2023-10-23 06:50:49 +0200 <jackdk> probie: https://en.wikipedia.org/w/index.php?title=David_Turner_%28computer_scientist%29&diff=1181414085&o… non-logged-in user, no source as yet
2023-10-23 06:51:27 +0200b_jonas(~x@89.134.28.176) (Read error: Connection reset by peer)
2023-10-23 06:56:44 +0200Vajb(~Vajb@85-76-79-129-nat.elisa-mobile.fi) (Ping timeout: 245 seconds)
2023-10-23 06:57:03 +0200Vajb(~Vajb@2001:999:708:a4c2:fac0:4b47:e109:420c)
2023-10-23 07:00:52 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-23 07:05:27 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
2023-10-23 07:05:43 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
2023-10-23 07:06:01 +0200arahael(~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net)
2023-10-23 07:09:01 +0200segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
2023-10-23 07:12:01 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-10-23 07:17:27 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2023-10-23 07:22:55 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 07:24:33 +0200takuan_dozo(~takuan@178-116-218-225.access.telenet.be)
2023-10-23 07:24:33 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
2023-10-23 07:24:33 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2023-10-23 07:25:03 +0200rgw(~R@2605:a601:a0df:5600:28a6:bcb9:bb55:dff5) (Read error: Connection reset by peer)
2023-10-23 07:26:12 +0200aljazmc(~aljazmc@user/aljazmc)
2023-10-23 07:29:32 +0200simendsjo(~user@84.211.91.241)
2023-10-23 07:30:52 +0200euleritian(~euleritia@dynamic-046-114-205-056.46.114.pool.telefonica.de)
2023-10-23 07:32:30 +0200tzh(~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz)
2023-10-23 07:36:28 +0200aljazmc(~aljazmc@user/aljazmc) (Remote host closed the connection)
2023-10-23 07:36:55 +0200aljazmc(~aljazmc@user/aljazmc)
2023-10-23 07:38:36 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-10-23 07:40:13 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-10-23 07:49:43 +0200Feuermagier(~Feuermagi@user/feuermagier)
2023-10-23 08:01:40 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-10-23 08:12:38 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2023-10-23 08:14:14 +0200Vajb(~Vajb@2001:999:708:a4c2:fac0:4b47:e109:420c) (Ping timeout: 245 seconds)
2023-10-23 08:14:28 +0200aljazmc(~aljazmc@user/aljazmc) (Quit: Leaving)
2023-10-23 08:14:51 +0200aljazmc(~aljazmc@user/aljazmc)
2023-10-23 08:17:43 +0200ft(~ft@p4fc2a529.dip0.t-ipconnect.de) (Quit: leaving)
2023-10-23 08:18:18 +0200aljazmc(~aljazmc@user/aljazmc) (Remote host closed the connection)
2023-10-23 08:18:40 +0200aljazmc(~aljazmc@user/aljazmc)
2023-10-23 08:20:09 +0200aljazmc(~aljazmc@user/aljazmc) (Remote host closed the connection)
2023-10-23 08:20:20 +0200ShalokShalom(~ShalokSha@17-14-5.cgnat.fonira.net)
2023-10-23 08:21:00 +0200aljazmc(~aljazmc@user/aljazmc)
2023-10-23 08:21:13 +0200 <ShalokShalom> Implementing Result or Maybe in another language has probably implications that are negative, if done with untagged union types, yes?
2023-10-23 08:25:04 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net) (Ping timeout: 255 seconds)
2023-10-23 08:28:47 +0200euleritian(~euleritia@dynamic-046-114-205-056.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 08:29:06 +0200euleritian(~euleritia@77.22.252.56)
2023-10-23 08:32:27 +0200sm(~sm@plaintextaccounting/sm)
2023-10-23 08:39:48 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-10-23 08:40:49 +0200random-jellyfish(~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99)
2023-10-23 08:40:49 +0200random-jellyfish(~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99) (Changing host)
2023-10-23 08:40:49 +0200random-jellyfish(~tiber@user/random-jellyfish)
2023-10-23 08:42:57 +0200nickiminjaj(~nickiminj@user/laxhh) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 08:48:11 +0200ShalokShalom(~ShalokSha@17-14-5.cgnat.fonira.net) (Quit: Client closed)
2023-10-23 08:50:44 +0200acidjnk_new(~acidjnk@p200300d6e72b935208de20f4829382c8.dip0.t-ipconnect.de)
2023-10-23 08:53:26 +0200nickiminjaj(~nickiminj@188.146.126.78)
2023-10-23 08:53:26 +0200nickiminjaj(~nickiminj@188.146.126.78) (Changing host)
2023-10-23 08:53:26 +0200nickiminjaj(~nickiminj@user/laxhh)
2023-10-23 09:00:33 +0200raym(~ray@user/raym) (Quit: Update to FreeBSD 14.0 RC2)
2023-10-23 09:00:38 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-10-23 09:00:52 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-10-23 09:09:06 +0200sord937(~sord937@gateway/tor-sasl/sord937)
2023-10-23 09:09:43 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:8a8e:8087:d0:8e92)
2023-10-23 09:16:39 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-10-23 09:18:16 +0200vglfr(~vglfr@88.155.140.136)
2023-10-23 09:18:40 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-10-23 09:23:21 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-10-23 09:23:43 +0200titibandit(~titibandi@user/titibandit) (Quit: leaving)
2023-10-23 09:23:59 +0200titibandit(~titibandi@user/titibandit)
2023-10-23 09:27:57 +0200stefan-__(~m-ohzqow@42dots.de) (Remote host closed the connection)
2023-10-23 09:28:27 +0200stefan-__(~m-ohzqow@42dots.de)
2023-10-23 09:29:31 +0200fendor(~fendor@2a02:8388:1640:be00:aab:1226:f274:5021)
2023-10-23 09:33:55 +0200vglfr(~vglfr@88.155.140.136) (Read error: Connection reset by peer)
2023-10-23 09:34:01 +0200Jackneill(~Jackneill@20014C4E1E0E6F00958F8CDDD487D8C2.dsl.pool.telekom.hu)
2023-10-23 09:34:15 +0200vglfr(~vglfr@149.102.244.104)
2023-10-23 09:35:31 +0200Vajb(~Vajb@85-76-20-175-nat.elisa-mobile.fi)
2023-10-23 09:35:56 +0200eggplant_(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
2023-10-23 09:40:05 +0200 <[exa]> elevenkb: thanks for the hvega link, not bad
2023-10-23 09:40:10 +0200emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-10-23 09:40:13 +0200 <[exa]> still, cowplot quality is sorely missed
2023-10-23 09:40:44 +0200 <[exa]> but yeah this is good, I'll try to make a theme for it
2023-10-23 09:49:15 +0200chele(~chele@user/chele)
2023-10-23 09:50:07 +0200yoyofreeman(~yoyofreem@176.97.76.178) (Remote host closed the connection)
2023-10-23 09:52:26 +0200Square(~Square@user/square)
2023-10-23 09:55:45 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-23 10:05:09 +0200[_](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2023-10-23 10:09:17 +0200billchenchina(~billchenc@103.152.35.21)
2023-10-23 10:09:21 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-10-23 10:13:35 +0200billchenchina(~billchenc@103.152.35.21) (Ping timeout: 240 seconds)
2023-10-23 10:14:40 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
2023-10-23 10:15:03 +0200danse-nr3(~francesco@151.37.143.24)
2023-10-23 10:16:22 +0200mrvdb(~mrvdb@185.92.221.186) (Quit: ZNC 1.8.2 - https://znc.in)
2023-10-23 10:17:23 +0200mrvdb(~mrvdb@2001:19f0:5000:8582:5400:ff:fe07:3df5)
2023-10-23 10:17:55 +0200econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2023-10-23 10:21:24 +0200vglfr(~vglfr@149.102.244.104) (Ping timeout: 240 seconds)
2023-10-23 10:22:17 +0200vglfr(~vglfr@88.155.140.136)
2023-10-23 10:46:37 +0200danse-nr3(~francesco@151.37.143.24) (Remote host closed the connection)
2023-10-23 10:47:00 +0200danse-nr3(~francesco@151.37.143.24)
2023-10-23 10:48:44 +0200Square(~Square@user/square) (Ping timeout: 248 seconds)
2023-10-23 10:48:57 +0200 <danse-nr3> the question asked here on friday was answered on stack overflow https://stackoverflow.com/questions/77332495/is-it-possible-using-phoas-to-evaluate-a-term-to-norm…
2023-10-23 10:49:54 +0200 <danse-nr3> also, good morning from this slice of the planet
2023-10-23 10:49:57 +0200adium(adium@user/adium) (Read error: Connection reset by peer)
2023-10-23 10:50:07 +0200billchenchina(~billchenc@103.152.35.21)
2023-10-23 10:51:16 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2023-10-23 10:54:37 +0200billchenchina(~billchenc@103.152.35.21) (Read error: Connection reset by peer)
2023-10-23 10:56:10 +0200billchenchina(~billchenc@103.152.35.21)
2023-10-23 11:01:57 +0200billchenchina(~billchenc@103.152.35.21) (Remote host closed the connection)
2023-10-23 11:02:24 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-23 11:03:11 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 260 seconds)
2023-10-23 11:07:01 +0200Square(~Square@user/square)
2023-10-23 11:07:05 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-10-23 11:17:27 +0200adium(adium@user/adium)
2023-10-23 11:23:31 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2023-10-23 11:25:11 +0200ubert1(~Thunderbi@91.141.50.28.wireless.dyn.drei.com)
2023-10-23 11:26:36 +0200ubert(~Thunderbi@77.119.202.255.wireless.dyn.drei.com) (Ping timeout: 248 seconds)
2023-10-23 11:26:37 +0200ubert1ubert
2023-10-23 11:30:41 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-10-23 11:41:52 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-10-23 11:41:52 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-10-23 11:41:52 +0200finn_elijaFinnElija
2023-10-23 11:41:57 +0200 <elevenkb> [exa]: welcome!
2023-10-23 11:48:06 +0200Square(~Square@user/square) (Ping timeout: 260 seconds)
2023-10-23 11:49:03 +0200Katarushisu19(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
2023-10-23 11:50:16 +0200Katarushisu1(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 255 seconds)
2023-10-23 11:50:16 +0200Katarushisu19Katarushisu1
2023-10-23 11:50:42 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 272 seconds)
2023-10-23 11:55:22 +0200__monty__(~toonn@user/toonn)
2023-10-23 11:57:22 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-10-23 11:57:22 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-10-23 11:57:22 +0200finn_elijaFinnElija
2023-10-23 12:21:38 +0200td_(~td@i53870920.versanet.de) (Ping timeout: 258 seconds)
2023-10-23 12:21:48 +0200dhil(~dhil@2001:8e0:2014:3100:5b69:27c9:1127:c4c8)
2023-10-23 12:28:26 +0200td_(~td@i5387090e.versanet.de)
2023-10-23 12:31:30 +0200sm(~sm@plaintextaccounting/sm)
2023-10-23 12:35:34 +0200titibandit1(~titibandi@ip-037-201-154-092.um10.pools.vodafone-ip.de)
2023-10-23 12:37:20 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-10-23 12:40:14 +0200titibandit1(~titibandi@ip-037-201-154-092.um10.pools.vodafone-ip.de) (Client Quit)
2023-10-23 12:42:10 +0200Inst(~Inst@120.244.192.250)
2023-10-23 12:52:39 +0200fweht(uid404746@id-404746.lymington.irccloud.com)
2023-10-23 12:53:59 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2023-10-23 12:54:10 +0200td_(~td@i5387090e.versanet.de) (Ping timeout: 255 seconds)
2023-10-23 12:56:01 +0200td_(~td@i53870909.versanet.de)
2023-10-23 13:02:38 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
2023-10-23 13:04:12 +0200td_(~td@i53870909.versanet.de) (Ping timeout: 248 seconds)
2023-10-23 13:06:18 +0200td_(~td@i53870916.versanet.de)
2023-10-23 13:07:44 +0200thyriaen(~thyriaen@2a01:aea0:dd4:7550:6245:cbff:fe9f:48b1)
2023-10-23 13:10:04 +0200euleritian(~euleritia@77.22.252.56) (Ping timeout: 255 seconds)
2023-10-23 13:10:37 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 13:12:07 +0200crazazy(~user@2001:67c:2564:a315:7404:ba10:b615:5403)
2023-10-23 13:14:31 +0200danse-nr3_(~francesco@151.35.175.49)
2023-10-23 13:14:38 +0200Guest|85(~Guest|85@212.154.102.176.client.nordic.tel)
2023-10-23 13:15:48 +0200Guest|85(~Guest|85@212.154.102.176.client.nordic.tel) (Client Quit)
2023-10-23 13:17:13 +0200danse-nr3(~francesco@151.37.143.24) (Ping timeout: 258 seconds)
2023-10-23 13:19:31 +0200AlexZenon(~alzenon@178.34.162.116) (Ping timeout: 258 seconds)
2023-10-23 13:21:19 +0200AlexNoo(~AlexNoo@178.34.162.116) (Ping timeout: 255 seconds)
2023-10-23 13:23:35 +0200danse-nr3_(~francesco@151.35.175.49) (Ping timeout: 240 seconds)
2023-10-23 13:25:06 +0200 <Unicorn_Princess> i wrote a library with a bunch of submodules (e.g. Farm.Animals, Farm.Equipment, Farm.Activities). now i wanna make a single module that for convenience re-exports all the stuff in those submodules, so a user can just import Farm.AllTheStuff, and get it. is there a consensus style how to name such a module? maybe just 'Farm', no submodule?
2023-10-23 13:36:36 +0200random-jellyfish(~tiber@user/random-jellyfish) (Ping timeout: 260 seconds)
2023-10-23 13:38:49 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 13:38:49 +0200vglfr(~vglfr@88.155.140.136) (Read error: Connection reset by peer)
2023-10-23 13:39:06 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 13:39:45 +0200random-jellyfish(~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99)
2023-10-23 13:39:45 +0200random-jellyfish(~tiber@2a02:2f04:11e:c600:968:a8b2:adff:5b99) (Changing host)
2023-10-23 13:39:45 +0200random-jellyfish(~tiber@user/random-jellyfish)
2023-10-23 13:48:19 +0200Pseudonym(~IceChat95@203.214.86.172) (Quit: I was standing in the park wondering why frisbees got bigger as they get closer. Then it hit me.)
2023-10-23 13:48:20 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
2023-10-23 13:52:59 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-23 13:57:55 +0200arahael(~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 264 seconds)
2023-10-23 13:59:58 +0200int-e(~noone@int-e.eu) (Remote host closed the connection)
2023-10-23 14:00:51 +0200int-e(~noone@int-e.eu)
2023-10-23 14:03:45 +0200lambdabot(~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
2023-10-23 14:04:12 +0200lambdabot(~lambdabot@silicon.int-e.eu)
2023-10-23 14:04:12 +0200lambdabot(~lambdabot@silicon.int-e.eu) (Changing host)
2023-10-23 14:04:12 +0200lambdabot(~lambdabot@haskell/bot/lambdabot)
2023-10-23 14:04:12 +0200ChanServ+v lambdabot
2023-10-23 14:06:12 +0200sm(~sm@plaintextaccounting/sm)
2023-10-23 14:07:51 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
2023-10-23 14:08:18 +0200danse-nr3_(~francesco@151.35.175.49)
2023-10-23 14:08:29 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 14:10:10 +0200Pickchea(~private@user/pickchea)
2023-10-23 14:17:52 +0200masterbuilder(~masterbui@user/masterbuilder) (Ping timeout: 255 seconds)
2023-10-23 14:18:56 +0200td_(~td@i53870916.versanet.de) (Ping timeout: 258 seconds)
2023-10-23 14:19:50 +0200masterbuilder(~masterbui@user/masterbuilder)
2023-10-23 14:20:38 +0200td_(~td@i5387090D.versanet.de)
2023-10-23 14:34:06 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2023-10-23 14:36:40 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2023-10-23 14:38:11 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
2023-10-23 14:48:03 +0200AlexNoo(~AlexNoo@178.34.162.116)
2023-10-23 14:48:19 +0200random-jellyfish(~tiber@user/random-jellyfish) (Ping timeout: 264 seconds)
2023-10-23 14:52:30 +0200vglfr(~vglfr@88.155.140.136)
2023-10-23 14:53:05 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 240 seconds)
2023-10-23 15:03:53 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-23 15:05:05 +0200crazazy(~user@2001:67c:2564:a315:7404:ba10:b615:5403) (Ping timeout: 240 seconds)
2023-10-23 15:08:56 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-10-23 15:12:27 +0200 <Inst> ugh, this is annoying
2023-10-23 15:13:02 +0200 <Inst> what Char in haskell represents a key press of the up arrow key?
2023-10-23 15:13:37 +0200 <nullie> is it a char?
2023-10-23 15:14:23 +0200 <nullie> I think it's an escape sequence
2023-10-23 15:16:38 +0200 <mauke> none
2023-10-23 15:16:56 +0200 <mauke> Char maps to unicodepoints, which are character (fragments), not keys
2023-10-23 15:16:56 +0200 <danse-nr3_> i thought i could find out from a simple experiment but it did not work out. Apologies for pasting multiple lines
2023-10-23 15:17:05 +0200 <danse-nr3_> Prelude Data.Char> show . ord <$> readLn
2023-10-23 15:17:05 +0200 <danse-nr3_> ^[[A
2023-10-23 15:17:05 +0200 <danse-nr3_> *** Exception: user error (Prelude.readIO: no parse)
2023-10-23 15:17:18 +0200 <mauke> yeah, can't 'read' that
2023-10-23 15:17:34 +0200 <mauke> > "\e[A"
2023-10-23 15:17:35 +0200 <lambdabot> <hint>:1:3: error:
2023-10-23 15:17:35 +0200 <lambdabot> lexical error in string/character literal at character 'e'
2023-10-23 15:17:38 +0200 <mauke> > "\ESC[A"
2023-10-23 15:17:40 +0200 <lambdabot> "\ESC[A"
2023-10-23 15:17:42 +0200 <mauke> there we go
2023-10-23 15:17:47 +0200 <mauke> > map ord "\ESC[A"
2023-10-23 15:17:49 +0200 <lambdabot> [27,91,65]
2023-10-23 15:18:11 +0200 <danse-nr3_> thanks mauke
2023-10-23 15:18:18 +0200 <mauke> of course this is all terminal (and terminal settings) dependent
2023-10-23 15:19:50 +0200 <Inst> ah, so it's ESC/A?
2023-10-23 15:19:52 +0200 <mauke> > let ctrl = chr . xor (ord '@') . ord . toUpper in ctrl '['
2023-10-23 15:19:54 +0200 <lambdabot> '\ESC'
2023-10-23 15:19:59 +0200 <Inst> groan, there goes my maze program :(
2023-10-23 15:20:08 +0200 <mauke> > let ctrl = chr . xor (ord '@') . ord . toUpper in ctrl 'A'
2023-10-23 15:20:10 +0200 <lambdabot> '\SOH'
2023-10-23 15:20:15 +0200 <mauke> sounds about right
2023-10-23 15:20:19 +0200 <Inst> I'm really stalled at two problems, how to get it to detect keypresses, and how to get it to detect
2023-10-23 15:20:26 +0200 <Inst> how to get it to hide inputs
2023-10-23 15:20:33 +0200 <mauke> Inst: what OS is this on?
2023-10-23 15:20:36 +0200 <Inst> I'm using Haskeline, but it feels like I'm using the wrong tool fo rthe job
2023-10-23 15:20:37 +0200 <Inst> Arch
2023-10-23 15:20:49 +0200 <mauke> yeah, that's terminal stuff
2023-10-23 15:20:56 +0200 <Inst> so if I hSetEcho stdin False or hSetEcho stdout False
2023-10-23 15:20:58 +0200 <mauke> you'd have to turn off "echo"
2023-10-23 15:21:07 +0200 <Inst> it's no longer reading stuff anymore
2023-10-23 15:21:37 +0200 <mauke> > let ctrl = chr . xor (ord '@') . ord . toUpper in ctrl '?'
2023-10-23 15:21:39 +0200 <lambdabot> '\DEL'
2023-10-23 15:22:28 +0200danse-nr3_is jealous of Inst, seems to be doing always fun stuff
2023-10-23 15:22:53 +0200 <Inst> just, spare time
2023-10-23 15:23:00 +0200 <Inst> if you're bored, go set up a project and translate this
2023-10-23 15:23:19 +0200 <Inst> https://inventwithpython.com/bigbookpython/
2023-10-23 15:23:45 +0200 <Inst> so hSetEcho stdout off messes with haskeline
2023-10-23 15:23:46 +0200Instsighs
2023-10-23 15:24:40 +0200 <danse-nr3_> i am mostly exhausted in spare time and try to keep away from coding for a minimum of healthy habits ^^;
2023-10-23 15:25:36 +0200 <Inst> I'm so annoyed that the tooling needs improvement :(
2023-10-23 15:25:41 +0200 <Inst> I wish we'd all focus on building ecosystem instead
2023-10-23 15:28:08 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 15:28:26 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 15:29:56 +0200 <Inst> my program so far
2023-10-23 15:31:26 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-10-23 15:31:53 +0200 <Inst> https://paste.tomsmeding.com/RpwFgUkf
2023-10-23 15:31:54 +0200billchenchina(~billchenc@103.152.35.21)
2023-10-23 15:32:22 +0200 <haskellbridge> <s​m> making a game Inst ? hurrah
2023-10-23 15:32:47 +0200 <Inst> sm: well, just porting a project
2023-10-23 15:33:29 +0200 <haskellbridge> <s​m> as mauke said, haskeline is the wrong tool - it's for reading one line at a time, terminated by ENTER
2023-10-23 15:34:05 +0200 <Inst> i should be porting it to brick :(
2023-10-23 15:35:40 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935)
2023-10-23 15:35:59 +0200 <Inst> three problems: can't get inputs to work, either the parser or the display is truncating the last lines of the input file
2023-10-23 15:36:04 +0200 <haskellbridge> <s​m> vty or ansi-terminal-game include raw keyboard input. There's a more basic lib for it, but I can't find it
2023-10-23 15:36:16 +0200 <haskellbridge> <s​m> #haskell-game:matrix.org is also there to help
2023-10-23 15:36:35 +0200 <Inst> I probably need StateT to keep track of where the display is handling it, or worse, I can call an IORef (le sigh)
2023-10-23 15:36:45 +0200 <Inst> I'm on haskell-game Matrix :)
2023-10-23 15:37:55 +0200 <Inst> and i need keyboard reading, but w/e, i just want to get a prototype up
2023-10-23 15:38:13 +0200 <Inst> afterwards, I want to install a maze validator to show that the maze loaded can be solved
2023-10-23 15:38:28 +0200 <Inst> install opt-parse applicative, and probably switch to ansi-terminal-game? :(
2023-10-23 15:38:34 +0200 <haskellbridge> <s​m> ah: https://hackage.haskell.org/package/base-4.19.0.0/docs/System-IO.html#g:17
2023-10-23 15:39:00 +0200 <Inst> It looks like hGetFile would be useful?
2023-10-23 15:39:04 +0200 <Inst> erm, hGetChar?
2023-10-23 15:39:09 +0200 <Inst> but I think I wouldn't be reading stdin?
2023-10-23 15:39:51 +0200 <haskellbridge> <s​m> oh no that one blocks until you press a key. A raw input helper exists somewhere deep in GHC.IO IIRC
2023-10-23 15:40:06 +0200 <Inst> so i can drop out of haskeline
2023-10-23 15:40:19 +0200 <Inst> i mean if i need it to block, worst case, I can forkIO, no?
2023-10-23 15:41:07 +0200 <haskellbridge> <s​m> yes you can drop haskeline. I'd use ansi-terminal-game unless you really want to figure out everything from scratch
2023-10-23 15:42:54 +0200 <haskellbridge> <s​m> simple real time games + laziness = way more head scratching than you realise now !
2023-10-23 15:43:14 +0200 <haskellbridge> <s​m> (afk)
2023-10-23 15:43:42 +0200 <Inst> thanks <3
2023-10-23 15:47:24 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
2023-10-23 15:47:35 +0200acarrico(~acarrico@dhcp-68-142-49-163.greenmountainaccess.net) (Ping timeout: 240 seconds)
2023-10-23 15:48:07 +0200 <Inst> laziness isn't a problem if you import DeepSeq
2023-10-23 15:48:07 +0200hippoid(~hippoid@user/hippoid) (Remote host closed the connection)
2023-10-23 15:48:08 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 15:48:27 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 15:48:29 +0200hippoid(~hippoid@c-98-213-162-40.hsd1.il.comcast.net)
2023-10-23 15:48:31 +0200 <Inst> use bang patterns, force, etc
2023-10-23 15:48:44 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 15:51:08 +0200AlexZenon(~alzenon@178.34.162.116)
2023-10-23 15:51:12 +0200 <Inst> yeah, and not using getChar / hGetChar, once upon a time on Windows, getChar was bugged
2023-10-23 15:57:50 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds)
2023-10-23 15:58:18 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 15:59:26 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-10-23 15:59:34 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-10-23 16:00:01 +0200billchenchina(~billchenc@103.152.35.21) (Remote host closed the connection)
2023-10-23 16:01:20 +0200gehmehgeh(~user@user/gehmehgeh)
2023-10-23 16:06:33 +0200gatekempt(~gatekempt@user/gatekempt)
2023-10-23 16:08:39 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 240 seconds)
2023-10-23 16:08:48 +0200waleee(~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c)
2023-10-23 16:19:21 +0200random-jellyfish(~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617)
2023-10-23 16:19:21 +0200random-jellyfish(~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617) (Changing host)
2023-10-23 16:19:21 +0200random-jellyfish(~tiber@user/random-jellyfish)
2023-10-23 16:26:02 +0200vglfr(~vglfr@88.155.140.136) (Read error: Connection reset by peer)
2023-10-23 16:29:50 +0200 <Inst> > '\ESC[A'
2023-10-23 16:29:52 +0200 <lambdabot> <hint>:1:6: error:
2023-10-23 16:29:52 +0200 <lambdabot> lexical error in string/character literal at character '['
2023-10-23 16:30:07 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
2023-10-23 16:31:41 +0200Inst_(~Inst@120.244.192.250)
2023-10-23 16:33:00 +0200 <danse-nr3_> > "\ESC[A"
2023-10-23 16:33:01 +0200 <lambdabot> "\ESC[A"
2023-10-23 16:34:32 +0200Inst(~Inst@120.244.192.250) (Ping timeout: 255 seconds)
2023-10-23 16:35:24 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef) (Ping timeout: 240 seconds)
2023-10-23 16:42:34 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-10-23 16:43:02 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-10-23 16:54:36 +0200simendsjo(~user@84.211.91.241) (Ping timeout: 248 seconds)
2023-10-23 16:56:02 +0200Inst_(~Inst@120.244.192.250) (Ping timeout: 255 seconds)
2023-10-23 16:59:40 +0200segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
2023-10-23 17:00:28 +0200vglfr(~vglfr@88.155.140.136)
2023-10-23 17:02:55 +0200nickiminjaj(~nickiminj@user/laxhh) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 17:03:33 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
2023-10-23 17:08:12 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-10-23 17:09:24 +0200nickiminjaj(~nickiminj@188.146.126.78)
2023-10-23 17:09:25 +0200nickiminjaj(~nickiminj@188.146.126.78) (Changing host)
2023-10-23 17:09:25 +0200nickiminjaj(~nickiminj@user/laxhh)
2023-10-23 17:12:25 +0200Inst_(~Inst@120.244.192.250)
2023-10-23 17:12:33 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-10-23 17:13:58 +0200danse-nr3_(~francesco@151.35.175.49) (Read error: Connection reset by peer)
2023-10-23 17:14:11 +0200danse-nr3_(~francesco@151.37.200.212)
2023-10-23 17:14:59 +0200 <EvanR> Inst_, flagrant use of deepseq might result in unwanted strictness problems
2023-10-23 17:15:39 +0200Inst_Inst
2023-10-23 17:15:41 +0200 <EvanR> strict fields in data types that shouldn't be lazy might be the first step to getting rid of unwanted laziness
2023-10-23 17:15:56 +0200 <Inst> I mean I default to Vector much of the time
2023-10-23 17:16:03 +0200 <Inst> only problem is that I want to update a field in a nested vector
2023-10-23 17:16:11 +0200 <Inst> now I'm confused how to do this without rewriting the entire vector
2023-10-23 17:16:13 +0200Guest86(~Guest86@14.139.128.51)
2023-10-23 17:16:32 +0200 <Guest86> Hi
2023-10-23 17:16:48 +0200 <Guest86> I wanted to create a monadic version of (&&)
2023-10-23 17:17:16 +0200 <Guest86> my current implementation: andM x y = x >>= \xm -> y >>= (pure . (&& xm))
2023-10-23 17:17:34 +0200 <Inst> if you're challenged with your problem, write it in do notation, then desugar to direct binds
2023-10-23 17:17:39 +0200vglfr(~vglfr@88.155.140.136) (Read error: Connection reset by peer)
2023-10-23 17:17:44 +0200 <Inst> using lambda with direct binds usually insidacets that something went wrong
2023-10-23 17:17:52 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:8a8e:8087:d0:8e92) (Ping timeout: 252 seconds)
2023-10-23 17:17:59 +0200vglfr(vglfr@gateway/vpn/protonvpn/vglfr)
2023-10-23 17:18:05 +0200 <Guest86> this: andM x y = fmap (&&) x <*> y
2023-10-23 17:18:05 +0200 <Guest86> ?
2023-10-23 17:18:40 +0200 <EvanR> Inst, to update 1 cell in a Vector you have to rewrite the whole vector, regardless of laziness
2023-10-23 17:18:43 +0200 <Guest86> (Just False) addM (Nothing)
2023-10-23 17:18:47 +0200 <Guest86> gives Nothing
2023-10-23 17:18:53 +0200 <EvanR> so do all your updates at once if possible
2023-10-23 17:18:56 +0200 <Guest86> I want to get Just False
2023-10-23 17:18:58 +0200 <Inst> EvanR: unless I unsafeFreeze etc?
2023-10-23 17:19:10 +0200 <Guest86> How can I get that?
2023-10-23 17:19:21 +0200 <EvanR> do you mean unsafeThaw
2023-10-23 17:19:25 +0200 <Inst> yes
2023-10-23 17:19:35 +0200 <EvanR> that sounds unsafe
2023-10-23 17:19:46 +0200 <mauke> Guest86: andM x y = do xm <- x; ym <- y; pure (xm && ym)
2023-10-23 17:19:50 +0200 <Inst> sounds like I love your sense of humor
2023-10-23 17:19:57 +0200 <EvanR> regardless, deepseq is a heavy handed way to update 1 cell in a vector
2023-10-23 17:20:16 +0200 <ncf> that will still give you Nothing because that's how the Maybe monad works. if you want something else, you'll need to use a different interface
2023-10-23 17:20:31 +0200 <mauke> oh, wait
2023-10-23 17:20:53 +0200 <Guest86> mauke still getting Nothing
2023-10-23 17:21:03 +0200 <mauke> yes, this is andM, not addM
2023-10-23 17:21:18 +0200 <EvanR> Inst, a saner way to mutate a vector in place is to use IOVector (in IO)
2023-10-23 17:21:26 +0200 <ncf> could you specify your request a bit more? what should andM do with e.g. the list monad?
2023-10-23 17:21:39 +0200 <EvanR> a saner way to do a multidimensional array using vector is to make it 1 dimensional and convert the indexes using a formula
2023-10-23 17:21:43 +0200 <ncf> [True, False] `andM` [] = ?
2023-10-23 17:21:44 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 246 seconds)
2023-10-23 17:21:51 +0200random-jellyfish(~tiber@user/random-jellyfish) (Read error: Connection reset by peer)
2023-10-23 17:22:07 +0200 <Guest86> my bad, I need andM
2023-10-23 17:22:13 +0200random-jellyfish(~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617)
2023-10-23 17:22:13 +0200random-jellyfish(~tiber@2a02:2f0f:a002:5000:c912:a1b7:f1:6617) (Changing host)
2023-10-23 17:22:13 +0200random-jellyfish(~tiber@user/random-jellyfish)
2023-10-23 17:22:29 +0200 <Guest86> and (Just False) andM Nothing
2023-10-23 17:22:34 +0200 <Guest86> should give Just False
2023-10-23 17:22:43 +0200 <mauke> Guest86: andM x _ = x
2023-10-23 17:22:49 +0200 <Inst> solved it, guest86
2023-10-23 17:23:02 +0200 <EvanR> wouldn't that be Nothing, intuitively
2023-10-23 17:23:31 +0200 <Guest86> mauke lol, andM (Just True) (Just False) should also give (Just False)
2023-10-23 17:23:35 +0200 <Inst> (&&>>) :: Monad m => m Bool -> m Bool -> m Bool
2023-10-23 17:23:43 +0200 <mauke> Guest86: andM _ _ = Just False
2023-10-23 17:23:58 +0200chele(~chele@user/chele) (Remote host closed the connection)
2023-10-23 17:24:00 +0200 <Guest86> lol,
2023-10-23 17:24:07 +0200 <EvanR> do you want liftA2 (&&)
2023-10-23 17:24:13 +0200 <EvanR> :t liftA2 (&&)
2023-10-23 17:24:14 +0200 <lambdabot> Applicative f => f Bool -> f Bool -> f Bool
2023-10-23 17:24:18 +0200 <mauke> no
2023-10-23 17:24:19 +0200 <Guest86> andM (Just True) (Just True) = Just True
2023-10-23 17:24:30 +0200 <Inst> liftA2 sequences both actions together
2023-10-23 17:24:37 +0200 <Inst> should I post my implementation or is it spoon-feeding?
2023-10-23 17:24:53 +0200 <ncf> at this point you've probably got enough equations for a pattern-matching definition
2023-10-23 17:25:02 +0200 <Guest86> I spent about an hour trying '=D
2023-10-23 17:25:20 +0200 <ncf> trying to do what? you still haven't told us what the function should do, apart from a handful of cases
2023-10-23 17:25:28 +0200 <Inst> you need Monad because you're acting based on the result of the left m Bool
2023-10-23 17:26:17 +0200 <Guest86> monad version of AND
2023-10-23 17:26:25 +0200 <EvanR> which means what again
2023-10-23 17:26:27 +0200 <Inst> and or (&&)?
2023-10-23 17:26:35 +0200 <Guest86> so that I can apply to Maybe
2023-10-23 17:26:38 +0200 <Guest86> (&&)
2023-10-23 17:26:44 +0200 <mauke> this is not a monad version of &&
2023-10-23 17:26:47 +0200 <Inst> and is a function, iirc, and :: Foldable t => t Bool -> Bool
2023-10-23 17:26:52 +0200 <EvanR> is it specific to Maybe
2023-10-23 17:26:59 +0200 <Guest86> yes
2023-10-23 17:27:04 +0200 <EvanR> so not really monads
2023-10-23 17:27:12 +0200 <Inst> i guess you can't do this in a strict language
2023-10-23 17:27:15 +0200 <Guest86> but I would like it to be generalizable
2023-10-23 17:27:26 +0200 <mauke> yes, but to what?
2023-10-23 17:27:32 +0200 <Guest86> yeah, it can just be a functor
2023-10-23 17:27:35 +0200 <Inst> (&&>>) :: Monad m => m Bool -> m Bool -> m Bool
2023-10-23 17:27:38 +0200 <Inst> It has to be a monad :)
2023-10-23 17:27:42 +0200 <mauke> Inst: why?
2023-10-23 17:27:48 +0200 <Guest86> andM :: (Monad m) => m Bool -> m Bool -> m Bool
2023-10-23 17:27:53 +0200 <Inst> They want pure short-circuiting
2023-10-23 17:28:05 +0200 <mauke> Inst: that's not what it sounded like to me
2023-10-23 17:28:12 +0200 <Inst> so the second f/m doesn't get executed
2023-10-23 17:28:16 +0200 <mauke> but then Guest86 never explained what they're trying to do
2023-10-23 17:28:29 +0200 <mauke> so I guess your interpretation is as valid as mine
2023-10-23 17:28:30 +0200 <EvanR> Inst you sound like you're talking about "monadic OR"
2023-10-23 17:28:34 +0200 <Guest86> Inst yes I want that
2023-10-23 17:28:42 +0200 <EvanR> do this but stop if first result is false
2023-10-23 17:28:45 +0200 <Inst> Guest86: write it in do notation, use an if then else
2023-10-23 17:29:18 +0200 <mauke> Guest86: what should the result be for 'andM Nothing (Just False)' and 'andM (Just True) Nothing'?
2023-10-23 17:29:48 +0200 <Guest86> Just False and Nothing
2023-10-23 17:30:10 +0200 <Guest86> ideally
2023-10-23 17:30:12 +0200 <ncf> ._.
2023-10-23 17:30:12 +0200 <mauke> ok, that means neither of our interpretations are correct
2023-10-23 17:30:19 +0200 <EvanR> so you want to catch the failure of the first action
2023-10-23 17:30:20 +0200 <Guest86> but I guess Nothing and Nothing will do as well
2023-10-23 17:30:27 +0200 <mauke> I have no clue what your function is supposed to do
2023-10-23 17:30:36 +0200 <Inst> ah, so my interpretation isn't correct either
2023-10-23 17:30:39 +0200 <EvanR> convert a failure into pure False
2023-10-23 17:30:46 +0200 <Inst> but it's a lot harder for it to treat failure as a pure false generically
2023-10-23 17:30:56 +0200 <Inst> import Data.Bool
2023-10-23 17:30:56 +0200 <Inst> (&&>>) :: Monad m => m Bool -> m Bool -> m Bool
2023-10-23 17:30:56 +0200 <Inst> a &&>> b = a >>= bool (pure False) b
2023-10-23 17:31:01 +0200 <EvanR> MonadCatch
2023-10-23 17:31:31 +0200 <mauke> Guest86: start by writing down all possible cases
2023-10-23 17:31:43 +0200 <mauke> that should give you a complete function definition in at most 9 equations
2023-10-23 17:31:52 +0200 <Inst> the one I gave you will return Nothing if the left term is Nothing, unfortunately
2023-10-23 17:32:26 +0200 <mauke> my interpretation would have given 'Just False' and 'Just True', respectively
2023-10-23 17:33:01 +0200 <EvanR> ok, MonadCatch doesn't cover stuff like Maybe
2023-10-23 17:33:21 +0200 <mauke> hmm, these are SQL NULL semantics
2023-10-23 17:33:29 +0200 <Inst> but tbh the problem is more
2023-10-23 17:33:36 +0200 <mauke> or at least the examples we've seen so far are compatible with that interpretation
2023-10-23 17:33:44 +0200 <Inst> either case, Monadic and Applicative types all contain a notion of effect
2023-10-23 17:33:56 +0200 <Guest86> andM (Just True) (Just True) == Just True
2023-10-23 17:33:56 +0200 <Guest86> andM (Just True) (Just False) == Just False
2023-10-23 17:33:57 +0200 <Guest86> andM (Just False) (Just True) == Just False
2023-10-23 17:33:57 +0200 <Guest86> andM (Just False) (Just False) == Just False
2023-10-23 17:33:58 +0200 <Guest86> andM (Just True) Nothing == Nothing
2023-10-23 17:33:58 +0200 <Guest86> andM Nothing (Just True) == Nothing
2023-10-23 17:33:59 +0200 <Guest86> andM (Just False) Nothing == Just False
2023-10-23 17:33:59 +0200 <Guest86> andM Nothing (Just False) == Just False
2023-10-23 17:34:02 +0200 <Inst> ...
2023-10-23 17:34:03 +0200 <Inst> careful
2023-10-23 17:34:08 +0200 <Inst> bots might boot you for spamming
2023-10-23 17:34:12 +0200 <Inst> paste.tomsmeding.com
2023-10-23 17:34:24 +0200 <mauke> Guest86: don't paste into the channel; use a paste site or something
2023-10-23 17:34:29 +0200 <Guest86> Ah, sorry. Whats the limit?
2023-10-23 17:34:35 +0200 <EvanR> lol
2023-10-23 17:34:37 +0200acarrico(~acarrico@dhcp-68-142-49-163.greenmountainaccess.net)
2023-10-23 17:34:38 +0200 <Inst> i was pushing it with 3 entries
2023-10-23 17:34:43 +0200 <geekosaur> ^
2023-10-23 17:34:53 +0200 <Guest86> Oh. Will keep that in mind
2023-10-23 17:34:54 +0200 <EvanR> what are the limits so I may push them
2023-10-23 17:35:04 +0200 <mauke> ... yep, that's SQL NULL
2023-10-23 17:35:27 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-10-23 17:35:35 +0200 <EvanR> Guest86, that doesn't really have much to do with monads
2023-10-23 17:35:50 +0200 <EvanR> it's just a function on Maybe Bool
2023-10-23 17:36:01 +0200 <Inst> i think the &&>>, even if it doesn't give you the behavior you want, is reasonable when you consider monadic effects
2023-10-23 17:36:13 +0200 <EvanR> smh
2023-10-23 17:36:27 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
2023-10-23 17:36:29 +0200 <Inst> what's wrong with that? :(
2023-10-23 17:36:32 +0200 <Guest86> yeah. thanks
2023-10-23 17:37:07 +0200 <EvanR> "now that you finally defined what you want it to do, here's something that doesn't do that, and confuses monads into it like you wanted" xD
2023-10-23 17:37:10 +0200 <mauke> I guess it's a sort of minimum function if you map Just False to 0, Nothing to 1, Just True to 2
2023-10-23 17:37:31 +0200 <Inst> you could just data SQLBool =...
2023-10-23 17:39:21 +0200 <mauke> data SQLBool = SQLFalse | SQLNull | SQLTrue deriving (Eq, Ord) -- :-)
2023-10-23 17:39:31 +0200 <mauke> sqlAnd = min; sqlOr = max
2023-10-23 17:39:48 +0200 <EvanR> is NULL really ordered between False and True
2023-10-23 17:40:06 +0200 <mauke> NULL represents an unknown/indeterminate value
2023-10-23 17:40:25 +0200 <EvanR> so it should be unordered?
2023-10-23 17:40:29 +0200 <mauke> FALSE && ??? is definitely FALSE, but TRUE && ??? is indeterminate
2023-10-23 17:40:50 +0200 <EvanR> partially ordered
2023-10-23 17:41:17 +0200 <mauke> conversely, TRUE || ??? is definitely TRUE, but FALSE || ??? is indeterminate
2023-10-23 17:42:02 +0200 <danse-nr3_> Guest86, how about this? https://paste.tomsmeding.com/Aa4cHddj
2023-10-23 17:42:31 +0200 <danse-nr3_> hum no i see that is wrong, misses the `Just True` cases
2023-10-23 17:42:51 +0200 <mauke> danse-nr3_: yeah, that was my original interpretation :-)
2023-10-23 17:44:50 +0200Vajb(~Vajb@85-76-20-175-nat.elisa-mobile.fi) (Ping timeout: 246 seconds)
2023-10-23 17:45:22 +0200Square(~Square@user/square)
2023-10-23 17:45:52 +0200tzh(~tzh@c-71-193-181-0.hsd1.or.comcast.net)
2023-10-23 17:46:04 +0200 <Vq> are || and && commutative at least?
2023-10-23 17:46:19 +0200dhil(~dhil@2001:8e0:2014:3100:5b69:27c9:1127:c4c8) (Ping timeout: 245 seconds)
2023-10-23 17:46:25 +0200nickiminjaj(~nickiminj@user/laxhh) (Read error: Connection reset by peer)
2023-10-23 17:46:28 +0200 <int-e> not when you take laziness into account
2023-10-23 17:46:32 +0200 <EvanR> not the version in many languages which use them to stop evaluation of the next expression
2023-10-23 17:46:37 +0200 <int-e> > True || undefined
2023-10-23 17:46:38 +0200 <lambdabot> True
2023-10-23 17:46:41 +0200 <int-e> > undefined || True
2023-10-23 17:46:42 +0200 <lambdabot> *Exception: Prelude.undefined
2023-10-23 17:46:58 +0200nickiminjaj(~nickiminj@188.146.126.78)
2023-10-23 17:46:58 +0200nickiminjaj(~nickiminj@188.146.126.78) (Changing host)
2023-10-23 17:46:58 +0200nickiminjaj(~nickiminj@user/laxhh)
2023-10-23 17:47:11 +0200 <Inst> hmmm, so what do I do
2023-10-23 17:47:25 +0200 <Inst> about trying to update an element in a vector?
2023-10-23 17:47:44 +0200 <Inst> i thought about keeping state in a scanner, but it'd be easiest... oh fffs, i need lens, don't I? :(
2023-10-23 17:48:04 +0200Vajb(~Vajb@2001:999:785:c11e:a1b8:59fa:dee7:e490)
2023-10-23 17:48:10 +0200santiagopim(~user@90.167.66.131)
2023-10-23 17:48:19 +0200 <EvanR> updating elements 1 at a time in a big vector is suboptimal
2023-10-23 17:48:32 +0200 <Inst> i only need to update exactly one element
2023-10-23 17:48:32 +0200 <EvanR> but there are many scans and maps you can use
2023-10-23 17:48:53 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 17:49:11 +0200euleritian(~euleritia@77.22.252.56)
2023-10-23 17:49:16 +0200 <int-e> . o O ( ST a b -- the original stabby thing )
2023-10-23 17:49:17 +0200 <Inst> https://paste.tomsmeding.com/bURBnofj
2023-10-23 17:49:19 +0200 <Inst> yes yes, i know it's crap
2023-10-23 17:49:20 +0200 <EvanR> write a function which does that, but make sure it evaluates the new element first
2023-10-23 17:49:46 +0200danse-nr3_(~francesco@151.37.200.212) (Ping timeout: 258 seconds)
2023-10-23 17:50:04 +0200 <EvanR> (if that's what you want)
2023-10-23 17:50:08 +0200 <mauke> Inst: could use //
2023-10-23 17:50:20 +0200 <Inst> oh
2023-10-23 17:50:55 +0200 <Inst> yeah, i'm changing it to get it to evaluate the 2D vector first either into a 2D Vector of chars or a 2D list of chars
2023-10-23 17:51:10 +0200 <EvanR> nameMe i v !x = v // [(i,x)]
2023-10-23 17:51:25 +0200vglfr(vglfr@gateway/vpn/protonvpn/vglfr) (Ping timeout: 252 seconds)
2023-10-23 17:51:57 +0200vglfr(~vglfr@88.155.140.136)
2023-10-23 17:51:58 +0200 <EvanR> and like I said for a 2D vector it's probably easier to use a flat vector and munge the indexes
2023-10-23 17:52:04 +0200 <Inst> so i now have a notion of a print object that I traverse_ (traverse_ ((>> putStrLn ""). putStr) ) into
2023-10-23 17:52:07 +0200 <EvanR> instead of deal with nested vectors
2023-10-23 17:52:13 +0200 <Inst> what do you mean by munge the indexes?
2023-10-23 17:52:40 +0200 <mauke> C style, baby
2023-10-23 17:52:57 +0200 <EvanR> if you want 2D index (x,y) that is i = y * width + x, or similar
2023-10-23 17:53:19 +0200 <mauke> instead of vec2d ! i ! j, you have vec1d ! (i * dim + j)
2023-10-23 17:53:29 +0200 <hamess> why is `:t traverse_` in ghci giving me an undefined error ?
2023-10-23 17:53:42 +0200 <Inst> because you have to import Data.Foldable (traverse_) first
2023-10-23 17:54:13 +0200 <Inst> the reason people don't teach that a lot, even though it's the optimal solution a lot of the time, is because traverse / for is exactly what it sounds like
2023-10-23 17:54:35 +0200 <Inst> well, not really
2023-10-23 17:55:12 +0200gentauro(~gentauro@user/gentauro)
2023-10-23 17:55:19 +0200thyriaen(~thyriaen@2a01:aea0:dd4:7550:6245:cbff:fe9f:48b1) (Remote host closed the connection)
2023-10-23 17:56:01 +0200czy(~user@121.231.41.11)
2023-10-23 17:56:34 +0200stefan-__(~m-ohzqow@42dots.de) (Remote host closed the connection)
2023-10-23 17:57:48 +0200 <Inst> i love traverse and traverse, though, it's so great when you can repeat an applicative action with different arguments via traverse_ action ["arg1", "arg2", "arg3"]
2023-10-23 17:58:34 +0200danse-nr3_(~francesco@151.37.200.212)
2023-10-23 18:00:10 +0200euleritian(~euleritia@77.22.252.56) (Ping timeout: 255 seconds)
2023-10-23 18:00:28 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 18:01:34 +0200rosco(~rosco@yp-150-69.tm.net.my) (Read error: Connection reset by peer)
2023-10-23 18:02:12 +0200waleee(~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds)
2023-10-23 18:02:26 +0200 <EvanR> int-e, I only just got that one. Prior to this my theory was that ST lets you "stab" (mutate) stuff
2023-10-23 18:03:26 +0200 <int-e> Hmm, do I remember correctly that the official meaning is "State Thread"?
2023-10-23 18:03:36 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-10-23 18:04:32 +0200 <geekosaur> yes
2023-10-23 18:04:49 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
2023-10-23 18:04:53 +0200 <geekosaur> because it's local state isolated from other computations
2023-10-23 18:05:14 +0200 <geekosaur> so not "thread" in the CPU sense, but in local state
2023-10-23 18:05:39 +0200 <mauke> I mean, they could have called it LocalVars or LocalState
2023-10-23 18:05:43 +0200random-jellyfish(~tiber@user/random-jellyfish) (Ping timeout: 252 seconds)
2023-10-23 18:05:50 +0200 <mauke> or LMut
2023-10-23 18:06:12 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2023-10-23 18:06:52 +0200ec(~ec@gateway/tor-sasl/ec)
2023-10-23 18:09:11 +0200 <c_wraith> all of those are a lot of typing
2023-10-23 18:10:11 +0200rosco(~rosco@yp-150-69.tm.net.my)
2023-10-23 18:12:16 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-10-23 18:13:26 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 18:13:32 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 258 seconds)
2023-10-23 18:13:48 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 18:17:39 +0200econo_(uid147250@id-147250.tinside.irccloud.com)
2023-10-23 18:18:11 +0200chomwitt(~chomwitt@2a02:587:7a1a:8700:1ac0:4dff:fedb:a3f1)
2023-10-23 18:22:13 +0200rgw(~R@2605:a601:a0df:5600:f816:aa41:2408:8443)
2023-10-23 18:22:15 +0200sm(~sm@plaintextaccounting/sm)
2023-10-23 18:23:56 +0200thegeekinside(~thegeekin@189.180.4.84)
2023-10-23 18:25:56 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 18:26:06 +0200thegeekinside(~thegeekin@189.180.4.84) (Remote host closed the connection)
2023-10-23 18:26:14 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 18:26:28 +0200YoungFrog(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
2023-10-23 18:26:31 +0200 <monochrom> mapM_ is already in the Prelude.
2023-10-23 18:29:38 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-23 18:30:03 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-10-23 18:37:39 +0200Guest86(~Guest86@14.139.128.51) (Quit: Client closed)
2023-10-23 18:43:29 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2023-10-23 18:43:52 +0200ec(~ec@gateway/tor-sasl/ec)
2023-10-23 18:47:40 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
2023-10-23 18:48:20 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 18:52:40 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-10-23 18:52:58 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-23 18:53:48 +0200JuanDaugherty(~juan@user/JuanDaugherty)
2023-10-23 18:56:14 +0200kuribas(~user@2a02:1808:81:3b8c:f27b:355a:7e45:2b1)
2023-10-23 19:00:00 +0200rosco(~rosco@yp-150-69.tm.net.my) (Quit: Lost terminal)
2023-10-23 19:01:04 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds)
2023-10-23 19:03:30 +0200 <EvanR> the rank2 "trick" which makes ST "safe" is considered cool. But is it not the same thing as the RealWorld "hack" which is considered an inessential-to-the-concept-of-IO implementation detail
2023-10-23 19:03:49 +0200 <EvanR> and daresay uncool
2023-10-23 19:04:33 +0200 <EvanR> and actually the actual same thing when you break open the IO or ST wrapper
2023-10-23 19:04:48 +0200 <mauke> IO = ST RealWorld, IIRC
2023-10-23 19:05:18 +0200 <EvanR> maybe because the ST thing is at type level and RealWorld is at value level
2023-10-23 19:05:24 +0200 <mauke> RealWorld is a hack
2023-10-23 19:05:26 +0200 <mauke> ST isn't
2023-10-23 19:05:26 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-23 19:05:34 +0200 <int-e> No, ST has the same non-essential "token that is erased at runtime" implementation detail that IO has.
2023-10-23 19:06:04 +0200 <int-e> The fact that the *essential* scope type is attached to that token is a distraction, it's an entirely different trick.
2023-10-23 19:07:01 +0200 <EvanR> RealWorld is erased at runtime?
2023-10-23 19:07:07 +0200 <c_wraith> yes.
2023-10-23 19:07:08 +0200 <geekosaur> yes
2023-10-23 19:07:10 +0200 <int-e> State# RealWorld is
2023-10-23 19:07:18 +0200 <int-e> Same as State# s
2023-10-23 19:07:26 +0200 <geekosaur> well, actually during compile time during codegen
2023-10-23 19:07:42 +0200 <int-e> s/at/for/ I guess
2023-10-23 19:07:50 +0200 <c_wraith> IIRC, it's kept around for all the optimizations that work on core, but eliminated when core is compiled to Cmm
2023-10-23 19:08:01 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-10-23 19:08:03 +0200 <EvanR> RealWorld had been hitherforeto erased
2023-10-23 19:08:14 +0200 <yin> can anyone explain this error to me? https://paste.jrvieira.com/1698080870528
2023-10-23 19:08:35 +0200 <c_wraith> yin: can you include the error message? it helps a lot.
2023-10-23 19:08:38 +0200 <geekosaur> I don't see an error there
2023-10-23 19:08:44 +0200 <yin> sorry, wrong link
2023-10-23 19:08:44 +0200AlexZenon(~alzenon@178.34.162.116) (Ping timeout: 258 seconds)
2023-10-23 19:09:05 +0200 <yin> https://paste.jrvieira.com/1698080938556
2023-10-23 19:10:03 +0200 <int-e> There's still a distinction between a closure that takes a void argument and the result after applying the void argument, which is why there ar special apply methods in the RTS for that (cf. stg_ap_v_fast).
2023-10-23 19:10:10 +0200 <c_wraith> oh, is this one of the cases where using church numerals in Haskell requires a higher-rank type?
2023-10-23 19:10:47 +0200 <int-e> yin: that would be easier to answer if you included the error
2023-10-23 19:10:52 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-10-23 19:11:58 +0200 <yin> here's with the error message: https://paste.jrvieira.com/1698081101844
2023-10-23 19:12:24 +0200AlexZenon(~alzenon@178.34.162.116)
2023-10-23 19:14:15 +0200 <c_wraith> yin: fwiw, it's weird to use a pattern guard when you could use a normal guard instead. But that's not the problem.
2023-10-23 19:14:21 +0200stefan-__(~m-ohzqow@42dots.de)
2023-10-23 19:14:27 +0200 <mauke> I don't think it needs to be higher rank if you go through a custom type
2023-10-23 19:14:56 +0200 <mauke> newtype F = MkF (F -> F) -- or something like that? might be useless, though
2023-10-23 19:15:05 +0200 <int-e> It's much easier though... https://paste.tomsmeding.com/dbZiGGVu
2023-10-23 19:15:15 +0200 <int-e> mauke: Yeah that, but that makes inspection awkwardf
2023-10-23 19:15:16 +0200 <int-e> -f
2023-10-23 19:15:36 +0200 <int-e> (often called LC for lambda calculus)
2023-10-23 19:17:14 +0200 <int-e> Other than that it's very nice though... newtype LC = Abs { app :: LC -> LC } allows stuff like t = Abs (\a -> Abs (\b -> a `app` b))
2023-10-23 19:18:40 +0200 <EvanR> in the #lambdacalculus channel there was a flash of interest in various lambda calculus compilers and questions about which one "was fastest"
2023-10-23 19:19:02 +0200 <EvanR> now that you just said that, I'm wondering if ghc is just that
2023-10-23 19:19:20 +0200 <EvanR> by compiling programs of type LC
2023-10-23 19:20:15 +0200stefan-__(~m-ohzqow@42dots.de) (Remote host closed the connection)
2023-10-23 19:20:17 +0200 <dolio> RealWorld passing gives the right semantics for ST. It doesn't for IO.
2023-10-23 19:21:27 +0200kuribas(~user@2a02:1808:81:3b8c:f27b:355a:7e45:2b1) (Ping timeout: 240 seconds)
2023-10-23 19:21:29 +0200 <yin> i still don't understand
2023-10-23 19:22:34 +0200 <dolio> If you write an infinite loop that modifies references in ST, that's indistinguishable from one that doesn't modify references, because the exact reference behavior isn't supposed to be observable, just the result (which is ⊥ in both cases).
2023-10-23 19:23:22 +0200 <dolio> If you write an infinte loop that prints things, that's not the same as an infinite loop that doesn't print things, which doesn't make sense in terms of pure functions that pass around a 'state'.
2023-10-23 19:23:52 +0200 <c_wraith> yin: what happens if you give an explicit type to all your top-level definitions?
2023-10-23 19:23:57 +0200 <EvanR> devil's advocate reacts to that example by saying the printer is in the world state
2023-10-23 19:24:12 +0200JuanDaugherty(~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
2023-10-23 19:24:39 +0200 <EvanR> but RealWorld doesn't explain how getCurrentTime "works"
2023-10-23 19:24:40 +0200 <dolio> Is the devil's advocate someone who doesn't actually think through the example?
2023-10-23 19:25:21 +0200 <mauke> my objection is that the universe doesn't actually get piped through my PC
2023-10-23 19:25:26 +0200 <yin> c_wraith: the type-checker flips out
2023-10-23 19:26:25 +0200 <c_wraith> yin: it's probably worth paying attention to that. the types you want aren't inexpressible in Haskell, but they're not necessarily what you think they are.
2023-10-23 19:27:14 +0200 <monochrom> IO's "World" is just a data dependency trick to tell the optimizer don't reorder getLine >> putStrLn "thanks" just because getLine's answer isn't "used".
2023-10-23 19:27:21 +0200 <int-e> The "take old world, produce new world" is a small-step semantics thing, isn't it. And it falls apart when your program isnt' the only thing interacting with the world, especially once you start composing those functions blindly.
2023-10-23 19:27:49 +0200 <EvanR> multithreading and time-dependence
2023-10-23 19:27:52 +0200simendsjo(~user@84.211.91.241)
2023-10-23 19:27:57 +0200 <EvanR> at least
2023-10-23 19:27:58 +0200 <int-e> (or your thread)
2023-10-23 19:27:59 +0200 <monochrom> getLine's answer isn't used, but it's output "World" is used by the putStrLn, so the optimizer can't reorder.
2023-10-23 19:28:01 +0200 <dolio> It falls apart with infinite loops, just like I said.
2023-10-23 19:28:19 +0200 <dolio> Well, unless you're okay with impure functions.
2023-10-23 19:28:20 +0200 <int-e> dolio: eh it's just another kind of bottom on the end
2023-10-23 19:28:23 +0200 <EvanR> you're assuming there's a second thread which can observe the printer
2023-10-23 19:28:36 +0200 <monochrom> Without it, recall that the optimizer is free to reorder code as long as nonstrictness is preserved.
2023-10-23 19:28:47 +0200 <monochrom> (and it does often)
2023-10-23 19:30:11 +0200 <int-e> dolio: One way to put my point of view here would be... you wouldn't see those prints if you just let the program finish first before looking.
2023-10-23 19:30:30 +0200 <int-e> By looking, you interact with the state, and that breaks the abstraction.
2023-10-23 19:30:47 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-10-23 19:30:52 +0200 <monochrom> But people are used to "use the source Luke" and believe that everything in the source code is real, as opposed to just pleasing the compiler.
2023-10-23 19:30:52 +0200 <int-e> But perhaps that's a weird point of view.
2023-10-23 19:31:17 +0200 <dolio> I'm assuming that printing things forever is distinct from not printing things forever.
2023-10-23 19:31:18 +0200 <EvanR> what is and isn't observable is partially up to the person making up the model
2023-10-23 19:31:29 +0200 <yin> c_wraith: ok let me work this out
2023-10-23 19:31:40 +0200 <EvanR> because you can choose to ignore things for abstraction
2023-10-23 19:31:43 +0200 <monochrom> It also doesn't help that SPJ's Awkward Squad lecture notes began with world passing as the preferred model.
2023-10-23 19:31:52 +0200 <EvanR> yes!
2023-10-23 19:31:54 +0200 <EvanR> it's terrible
2023-10-23 19:31:55 +0200 <int-e> (I think in the end we all agree that the model breaks down for full programs.)
2023-10-23 19:32:29 +0200 <int-e> . o O ( Turing: Award. SPJ: Awkward. )
2023-10-23 19:32:44 +0200 <dolio> Because that's like a basic requirement for writing some actual programs.
2023-10-23 19:32:45 +0200 <monochrom> Oh it does have one sentence "this is not real" but guess how many people take one sentence seriously when there are 1000 other lines contradicting it.
2023-10-23 19:32:59 +0200 <int-e> It is the preferred implementation.
2023-10-23 19:33:22 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 19:33:36 +0200 <int-e> (We take a broken model and execute it with great success. What's wrong with that?)
2023-10-23 19:33:40 +0200 <EvanR> awkward squad says it gives the right intuition so I will use it for the moment. Then never returns to the point or offers a different story
2023-10-23 19:34:34 +0200 <monochrom> Well yeah better IO semantics was (still is) very open and unsolved research question.
2023-10-23 19:35:09 +0200 <monochrom> I was there in the lectures. He did mention "yeah would be nice to have a denotational semantics. people are trying"
2023-10-23 19:35:23 +0200 <dolio> HBC had a different model which makes sense of infinite loops before GHC existed, I think.
2023-10-23 19:36:19 +0200 <monochrom> Unfortunately, to most people with denotational aptitudes, IO is too ugly or mundane to be interesting. And other people lack the aptitude.
2023-10-23 19:37:31 +0200 <EvanR> which aspect of IO would benefit from denotational semantics, because "all of it" sounds like a lot to deal with. Like do you include quantum physics somehow
2023-10-23 19:37:34 +0200nickiminjaj(~nickiminj@user/laxhh) (Quit: Textual IRC Client: www.textualapp.com)
2023-10-23 19:37:40 +0200 <EvanR> general relativity
2023-10-23 19:37:49 +0200 <monochrom> :)
2023-10-23 19:37:53 +0200 <int-e> yin: I'd do something similar to BBool: type CNat = forall r. (r -> r) -> r -> r, and give all those functions the corresponding signature, e.g. succ :: CNat -> CNat. That probably works, or at least will be closer to working.
2023-10-23 19:38:18 +0200 <monochrom> I would be happy enough if it included merely getChar and putChar.
2023-10-23 19:38:41 +0200 <monochrom> To a large extent the other features are "similar". I get the point.
2023-10-23 19:38:46 +0200 <c_wraith> dolio: edwardk had a model of IO for ermine where it's essentially a free monad. what it does is up to the interpreter.
2023-10-23 19:38:46 +0200 <int-e> GHC can't infer higher ranked types
2023-10-23 19:39:04 +0200 <dolio> Yeah, that's sort of the same model.
2023-10-23 19:39:08 +0200 <dolio> Dialogue trees.
2023-10-23 19:39:22 +0200 <Inst> am I using lens wrong?
2023-10-23 19:39:22 +0200 <monochrom> I think many people (who care) think likewise. Andrew Gordon's Functional I/O thesis did exactly that. (But operational instead of denotational.)
2023-10-23 19:40:02 +0200 <Inst> sliced col 1 . sliced row 1 %~ const (V.fromList [V.fromList ["@"])
2023-10-23 19:40:57 +0200 <Inst> it's constantly giving me an index out of bounds error
2023-10-23 19:41:15 +0200 <dolio> An infinite printing loop is a different tree than an infinite do-nothing loop.
2023-10-23 19:41:25 +0200 <monochrom> A long time ago Hoare et al. already proposed, generally and regardless of languages, set of traces for denotational I/O. But that paper was not accepted.
2023-10-23 19:41:51 +0200 <monochrom> I am happy with set of traces or tree of traces. (Same difference.)
2023-10-23 19:42:04 +0200 <int-e> dolio: dialogue trees correspond to some free monad I suppose
2023-10-23 19:42:32 +0200 <EvanR> does that ignore the issue of getCurrentTime, like what determines what comes back from that. The interpreter? It chooses the time arbitrarily?
2023-10-23 19:42:39 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
2023-10-23 19:42:42 +0200 <dolio> Yeah.
2023-10-23 19:42:53 +0200 <monochrom> Or rather s/traces/dialogue/ # Much better wording, yeah, thanks.
2023-10-23 19:42:57 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de)
2023-10-23 19:43:25 +0200 <c_wraith> it's not like the OS can't return a totally arbitrary result for getCurrentTime anyway. and even will, if you change your system clock enough!
2023-10-23 19:43:27 +0200 <dolio> And if you quotient the free get/put dialogue tree by the equations that State is supposed to satisfy, you can prove that it's equivalent to `s -> (s,a)`.
2023-10-23 19:44:02 +0200 <monochrom> Heh this is why it is safer to say "set". >:)
2023-10-23 19:44:07 +0200 <EvanR> yes the clock api that reacts to changes in system clock is one thing
2023-10-23 19:44:37 +0200 <EvanR> but there's the monotonic clock, if that wasn't monotonic then you can't write a correct algorithm based on it
2023-10-23 19:45:07 +0200 <EvanR> so you're relying on something not in the semantics
2023-10-23 19:45:15 +0200 <dolio> At least, in better behaved settings. If you want to do it for something more like Haskell it's probably a little more work, but I expect you can do it.
2023-10-23 19:45:18 +0200 <c_wraith> you're stuck with writing algorithms that are correct if the clock is correct.
2023-10-23 19:45:23 +0200 <monochrom> I would consider getChar : stdin :: getCurrentTime : some-other-device-that-people-pretend-is-time-but-it's-just-another-input-source
2023-10-23 19:46:09 +0200 <int-e> . o O ( hopefully monotonic but sometimes it isn't and you better cope with that too )
2023-10-23 19:46:17 +0200 <monochrom> For some applications maybe just add a monotonic increasing assumption.
2023-10-23 19:46:59 +0200 <Inst> zing, finally got the lens working, via element in control.lens
2023-10-23 19:47:16 +0200 <monochrom> At some people, at the meta level, you accept that you use a stronger theory for a more demanding application, and a more relaxed theory for a more relaxed application. You don't need to have a unique semantics.
2023-10-23 19:47:20 +0200 <Inst> control.lens.traversal
2023-10-23 19:47:28 +0200 <EvanR> "so you want to update an array. First let me introduce you to some lens theory" xD
2023-10-23 19:47:35 +0200 <monochrom> err s/At some people/At some point/
2023-10-23 19:48:02 +0200 <albet70> help! I suddenly don't know what MaybeT and ExceptT are used for?
2023-10-23 19:48:02 +0200 <dsal> TBH, I use lens with HashMap because I had to use HashMap somewhere and didn't want to know anything about it.
2023-10-23 19:48:09 +0200 <int-e> EvanR: If only somebody had suggested // ...
2023-10-23 19:48:16 +0200 <Inst> someone did
2023-10-23 19:48:25 +0200 <EvanR> some at least one
2023-10-23 19:48:44 +0200 <Inst> the problem was i'm still using a 2D vector
2023-10-23 19:48:49 +0200 <monochrom> Wait, is it // ? Is it \\ ?
2023-10-23 19:48:52 +0200segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Remote host closed the connection)
2023-10-23 19:48:56 +0200 <EvanR> \\ is minus
2023-10-23 19:49:11 +0200 <monochrom> Ah right // is update/override. Sorry!
2023-10-23 19:49:16 +0200 <EvanR> in before "haskell has too many operators!"
2023-10-23 19:49:29 +0200 <monochrom> COBOL has too many words. :)
2023-10-23 19:49:38 +0200 <Inst> so composing via Control.Lens was the easier way to do so given that neither Data.Vector nor Data.List support naive uses for 2D / XD vectors / arrays
2023-10-23 19:49:41 +0200 <monochrom> Java has too many classes.
2023-10-23 19:49:42 +0200 <dsal> albet70: Do you understand where the Maybe monad is helpful?
2023-10-23 19:49:58 +0200 <monochrom> Everything except Haskell has too many null pointers. :)
2023-10-23 19:49:59 +0200 <Inst> APLer: Haskell has too few operators ;)
2023-10-23 19:50:12 +0200 <int-e> Haskell has Nothing.
2023-10-23 19:50:13 +0200 <albet70> dsal , kind of
2023-10-23 19:51:14 +0200 <dsal> albet70: Well, the idea is that you can have a series of things that produce Maybe values and short-circuit on Nothing. i.e., you can pretend it's not a Maybe and only work on the Just values. If you ever _did_ get a Nothing, then Nothing is returned, otherwise Just result.
2023-10-23 19:51:49 +0200 <dsal> MaybeT allows you to mix that in with other monads, such as IO where an action might be (IO (Maybe X)) and you want to combine some of those.
2023-10-23 19:51:55 +0200 <dsal> ExceptT is the same thing, but with Either
2023-10-23 19:52:51 +0200 <monochrom> There is no "IOT Maybe" so "MaybeT IO" is your only choice. Fortunately it works out as expected.
2023-10-23 19:52:52 +0200wombat8756(~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com)
2023-10-23 19:53:36 +0200 <EvanR> IOT IO a would do what
2023-10-23 19:53:39 +0200 <helge_> Is it a good or bad idea to remove ~/.stack, and instead use ~/.ghcup/bin/stack? Currently, my Stack installation and ghcup disagrees about which stack, which cabal and which ghci versions that are installed. I'm using a Mac, and intend to edit my programs in VS Code.
2023-10-23 19:53:45 +0200 <dsal> EvanR: It's the internet of things monad
2023-10-23 19:53:51 +0200 <EvanR> is that like 2 time dimensions
2023-10-23 19:53:53 +0200 <monochrom> Don't take that fortune for granted. "ListT IO" if defined as [IO] did not work out. :)
2023-10-23 19:54:39 +0200 <haskellbridge> <s​m> helge: if you are using ghcup, you may want to go all in; configure stack to use it (there's info in the ghcup docs)
2023-10-23 19:54:44 +0200 <monochrom> I thought ~/.stack was data+config directory, ~/.ghcup/bin/stack was the program. Apples and oranges.
2023-10-23 19:54:52 +0200 <geekosaur> helge_, that sounds confused? ~/.stack is the global state directory
2023-10-23 19:54:56 +0200 <albet70> what does <- do on Nothing in do notation?
2023-10-23 19:55:07 +0200 <geekosaur> `fail`
2023-10-23 19:55:39 +0200 <EvanR> @undo do { x <- Nothing; return (x + 1) }
2023-10-23 19:55:39 +0200 <lambdabot> Nothing >>= \ x -> return (x + 1)
2023-10-23 19:55:54 +0200 <EvanR> whatever that does
2023-10-23 19:56:01 +0200 <[Leary]> "it does Nothing"
2023-10-23 19:56:03 +0200 <geekosaur> which short-circuits and produces Nothing, per the definition of >>= for Maybe
2023-10-23 19:56:32 +0200 <monochrom> "Haskell has Nothing. It does Nothing." >:)
2023-10-23 19:56:37 +0200 <geekosaur> right, sorry, not fail
2023-10-23 19:56:43 +0200 <EvanR> "Haskell is useless"
2023-10-23 19:57:03 +0200 <helge_> geekosaur , if it sounds confused, it's because I'm confused. It seems to me that Stack and ghcup do partly the same thing. I've seen that stack can be set up to use the ghc version that ghcup decides. But they don't even agree on which version of stack to use.
2023-10-23 19:57:24 +0200wombat8756(~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com) (Read error: Connection reset by peer)
2023-10-23 19:57:31 +0200 <helge_> I just want something that works inside VSCode, so that I can get nice type annotations etc.
2023-10-23 19:57:41 +0200 <geekosaur> you apparently have another version of stack installed somewhere (check /usr/bin from a system package, and ~/.local/bin)
2023-10-23 19:58:31 +0200danse-nr3_(~francesco@151.37.200.212) (Ping timeout: 255 seconds)
2023-10-23 19:58:37 +0200 <monochrom> For VSCode, I think (but haven't really checked) my students simply went into VSCode and clicked its "add Haskell" or something, and never needed to think about this.
2023-10-23 19:58:38 +0200 <geekosaur> you probably want to use the one installed by ghcup instead, and make sure you use the compiler install hook (https://www.haskell.org/ghcup/guide/#strategy-1-stack-hooks-new-recommended)
2023-10-23 19:58:40 +0200 <albet70> 1. MaybeT and IO (Maybe a) different, in MaybeT do notation <- get a directly, in IO do notation get Maybe a 2. MaybeT is also a constructor, MaybeT $ f can construct MaybeT m (Maybe a)
2023-10-23 19:58:47 +0200 <helge_> Maybe I can simply remove ~/.local/bin/stack. I'm not sure how it got there. I've tried to get started with Haskell for many years, and every time I use it, there are some changes to the echosystem.
2023-10-23 19:58:51 +0200 <yin> c_wraith: i' not going to pretend i didn't just copy subtract's signature from a wildcard inference, but this is what i came up with
2023-10-23 19:58:54 +0200 <yin> https://paste.jrvieira.com/1698083872712
2023-10-23 19:58:56 +0200wombat8756(~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com)
2023-10-23 19:59:32 +0200 <geekosaur> and the one in ~/.local/bin probably came from a "stack upgrade"
2023-10-23 20:00:07 +0200 <EvanR> albet70, yes it's two different monads. MaybeT IO has both IO effects and the "Maybe effect"
2023-10-23 20:00:14 +0200 <monochrom> Though I haven't checked, my hypothesis is likely because my students never asked me about "should I use stack or should I use ghcup?"
2023-10-23 20:00:25 +0200 <c_wraith> yin: I should have been more accurate above... you can't type those in standard Haskell, but you can in GHC. you need a higher-rank type. see int-e's suggestions.
2023-10-23 20:00:54 +0200 <monochrom> And I also hypothesis that they have HLS running because they hand in code that adds "import System.Win32" which can only be explained by HLS.
2023-10-23 20:02:29 +0200waleee(~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c)
2023-10-23 20:03:18 +0200 <helge_> geekosaur : I've seen that web page. Will try to read it more carefully. Thank's for the suggestion.
2023-10-23 20:03:23 +0200 <c_wraith> why would HLS insert that?
2023-10-23 20:03:54 +0200 <[Leary]> yin: To avoid impredicativity issues, I suggest you use `newtype CNat = C{ iterate :: forall a. (a -> a) -> a -> a }`.
2023-10-23 20:04:07 +0200wombat8756(~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com) (Read error: Connection reset by peer)
2023-10-23 20:04:13 +0200 <albet70> EvanR , it can only run IO action on Right a, right?
2023-10-23 20:04:36 +0200 <geekosaur> IME HLS has a bad tendency to autoselect the first completion in a list, say "but you need an import to use that", and automatically add the import
2023-10-23 20:05:16 +0200 <monochrom> Evidently my assignments tend to use function names that clash with Win32 and OpenGL function names. :)
2023-10-23 20:05:18 +0200wombat8756(~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com)
2023-10-23 20:05:39 +0200 <EvanR> albet70, use lift to turn an IO action into a MaybeT IO action
2023-10-23 20:05:48 +0200 <EvanR> how that's implemented is not important
2023-10-23 20:05:48 +0200 <monochrom> Hell, a long time ago I maliciously chose such a name clash.
2023-10-23 20:06:15 +0200 <monochrom> I made an assignment that boiled down to one version of the probability monad.
2023-10-23 20:06:37 +0200 <monochrom> Then I realized "if I call it that, it's way too googlable."
2023-10-23 20:06:56 +0200 <monochrom> Then I further realized "let them google for the wrong thing! call it the random monad!"
2023-10-23 20:07:18 +0200 <monochrom> I know I was successful because one student emailed me "may I import Control.Monad.Random?" >:D
2023-10-23 20:08:00 +0200 <albet70> MaybeT's do notation, v <- x; when f :: a -> IO (); if x is IO (Right _) then f v will run, if x is IO (Left _) f v won't run
2023-10-23 20:08:10 +0200 <tomsmeding> monochrom: did you tell them "yes, sure"? :p
2023-10-23 20:08:20 +0200 <monochrom> Nah, I just said "no".
2023-10-23 20:08:34 +0200 <geekosaur> albet70, that would be EitherT / ExceptT (Left and Right)
2023-10-23 20:08:41 +0200 <tomsmeding> monochrom: I see your malice ended with the deliberate name clash
2023-10-23 20:09:11 +0200 <albet70> geekosaur , yes
2023-10-23 20:10:43 +0200 <albet70> since then Left won't run, what's the meaning to use case of in ExceptT do notation?
2023-10-23 20:11:20 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 20:12:25 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-23 20:12:49 +0200 <monochrom> You can have an outer "catch" that catches that Left.
2023-10-23 20:12:56 +0200wombat8756(~user@2603-7000-3e00-1b01-687f-dfa1-6b05-7e2f.res6.spectrum.com) (Ping timeout: 272 seconds)
2023-10-23 20:13:03 +0200 <monochrom> So now you have an exception system.
2023-10-23 20:14:02 +0200 <geekosaur> MaybeT tells you that something failed; ExceptT lets you pass back *what* failed
2023-10-23 20:15:32 +0200 <yin> am i *sort of* correct in saying that type-checking breaks referential transparency?
2023-10-23 20:15:37 +0200Guest|62(~Guest|62@p5797961b.dip0.t-ipconnect.de)
2023-10-23 20:15:50 +0200 <tomsmeding> you'll need to explain that one :p
2023-10-23 20:15:56 +0200 <monochrom> What would be an example of that?
2023-10-23 20:16:45 +0200 <albet70> monochrom , right
2023-10-23 20:17:11 +0200Guest|62(~Guest|62@p5797961b.dip0.t-ipconnect.de) (Client Quit)
2023-10-23 20:17:57 +0200 <geekosaur> the point of not running f v is that >>= propagates the Left instead, short-circuiting the rest of the failed computation
2023-10-23 20:19:54 +0200 <dsal> albet70: I think `do` might be confusing you a bit. It's a bit easier to think about these things if you don't also think about `do` notation.
2023-10-23 20:20:11 +0200 <albet70> short circuiting is improper I think, Cont is short circuiting
2023-10-23 20:20:42 +0200 <rgw> why does ghcup list cabal 3.6.2.0 and ghc 9.4.7 as the recommended versions when cabal 3.6.2.0 only supports up to ghc 9.4.0?
2023-10-23 20:20:44 +0200 <monochrom> I won't waste time arguing against that.
2023-10-23 20:20:56 +0200 <albet70> dsal , haha, but everyone is using do notation
2023-10-23 20:20:59 +0200 <monochrom> Words mean nothing. Show actual examples and actual math.
2023-10-23 20:21:38 +0200 <tomsmeding> rgw: enlighten me when you know :p
2023-10-23 20:21:39 +0200 <dsal> albet70: do notation is just another layer on the thing you're trying to understand.
2023-10-23 20:21:43 +0200 <monochrom> Words mean sh*t and COBOL is full of those.
2023-10-23 20:22:32 +0200 <c_wraith> Python is also full of words. awkward as heck.
2023-10-23 20:23:29 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 258 seconds)
2023-10-23 20:23:35 +0200_xor(~xor@72.49.199.93) (Read error: Connection reset by peer)
2023-10-23 20:23:42 +0200 <geekosaur> albet70, I'd say it's short-circuiting your computation (the `f …`) but not the chain of `>>=`s
2023-10-23 20:23:52 +0200 <yin> tomsmeding: monochrom: this https://paste.jrvieira.com/1698085410423
2023-10-23 20:23:57 +0200 <geekosaur> short circuiting could happen on multiple levels
2023-10-23 20:24:05 +0200danza(~francesco@151.37.200.212)
2023-10-23 20:24:56 +0200 <monochrom> The ghcup team humanly considers factors including GHC bugs and hackage library support in order to choose and update the recommended GHC version. I don't know how they choose the recommended cabal-install version.
2023-10-23 20:25:29 +0200 <tomsmeding> yin: who said that church numerals work in the simply-typed lambda calculus
2023-10-23 20:25:38 +0200 <geekosaur> there's an obscure Windows bug in 3.8.x and 3.10.0/3.10.1 iirc. 3.10.2 should have a fix but has not yet been released
2023-10-23 20:25:50 +0200_xor(~xor@72.49.199.93)
2023-10-23 20:26:04 +0200 <rgw> seems like they've previously recommended a haskell version that wasn't hls powered
2023-10-23 20:26:30 +0200 <geekosaur> yes, because HLS can't always keep up with GHC
2023-10-23 20:26:31 +0200 <tomsmeding> yin: you might have more luck with explicit polymorphism, like newtype Church = Church (forall a. (a -> a) -> a -> a)
2023-10-23 20:26:48 +0200 <albet70> how you handle multiple wrapped monad? since ExceptT Error IO a only has Either and IO effect, what it needs more effects?
2023-10-23 20:26:58 +0200 <rgw> i would think they'd recommend a version that is hls powered
2023-10-23 20:27:01 +0200 <monochrom> yin: There are multiple stances about that.
2023-10-23 20:27:07 +0200 <monochrom> One is what you said.
2023-10-23 20:27:12 +0200 <rgw> "recommended" is kind of a nebulous term though
2023-10-23 20:27:21 +0200 <monochrom> Another is "use a better type system" :)
2023-10-23 20:27:33 +0200 <yin> monochrom: :)
2023-10-23 20:27:50 +0200 <monochrom> Another is "only consider typable expressions".
2023-10-23 20:28:40 +0200 <dsal> albet70: In practice, if I'm using MaybeT, it's around some other application-specific monad around IO. Then you just lift to unpeel each layer.
2023-10-23 20:29:16 +0200 <yin> it was not easy for someone like me to understand why `num_ 0 = zero` breaks
2023-10-23 20:29:21 +0200 <monochrom> But yeah all of Church encodings work in only untyped and System F. Hindley-Milner is not going to work.
2023-10-23 20:29:46 +0200 <monochrom> "go big or go home" :)
2023-10-23 20:31:40 +0200 <yin> going big being having System F?
2023-10-23 20:32:33 +0200 <monochrom> Wadler's https://homepages.inf.ed.ac.uk/wadler/topics/parametricity.html#free (recursive types for free) kind of shows why you need System F and parametricity to ensure that you actually can encoding initial algebras.
2023-10-23 20:32:37 +0200 <monochrom> Yeah
2023-10-23 20:33:16 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935) (Remote host closed the connection)
2023-10-23 20:33:37 +0200 <tomsmeding> yin: https://paste.tomsmeding.com/3XGP1tfq
2023-10-23 20:33:41 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935)
2023-10-23 20:34:10 +0200 <monochrom> Oleg also has https://okmij.org/ftp/tagless-final/course/Boehm-Berarducci.html along the same theme.
2023-10-23 20:35:09 +0200 <yin> ty ty
2023-10-23 20:35:59 +0200 <yin> i have no formal education on any of this
2023-10-23 20:36:33 +0200 <monochrom> Well yeah I bet most of us self-taught this stuff and couldn't find formal courses...
2023-10-23 20:36:54 +0200tomsmedinghas had some formal courses but not on this :p
2023-10-23 20:37:29 +0200 <monochrom> Who needs course when one can just read TaPL from cover to cover >:D
2023-10-23 20:37:29 +0200 <tomsmeding> tried to understand Oleg's stuff at some point and gave up quickly -- perhaps I should persevere at some point
2023-10-23 20:37:51 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935) (Remote host closed the connection)
2023-10-23 20:38:18 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935)
2023-10-23 20:38:31 +0200 <monochrom> I think I didn't carefully read the Boehm-Berarducci paper, but I did persevere Wadler's one.
2023-10-23 20:39:23 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-10-23 20:40:13 +0200 <monochrom> Well, time is a zero-sum game. I spent time on this, you spent time on something else. There will be other topics you know much more deeply. :)
2023-10-23 20:40:14 +0200 <EvanR> monochrom, I like how polymorphic "words mean sh*t" is, (not referring to the wildcard)
2023-10-23 20:40:32 +0200 <monochrom> :)
2023-10-23 20:44:31 +0200Lycurgus(~georg@user/Lycurgus)
2023-10-23 20:47:39 +0200dhil(~dhil@2001:8e0:2014:3100:c465:c19e:7201:d418)
2023-10-23 20:49:32 +0200picnoir(~ninja@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.0.5)
2023-10-23 20:49:56 +0200danza(~francesco@151.37.200.212) (Ping timeout: 258 seconds)
2023-10-23 20:51:02 +0200euleritian(~euleritia@dynamic-046-114-207-189.46.114.pool.telefonica.de) (Ping timeout: 255 seconds)
2023-10-23 20:51:05 +0200Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 258 seconds)
2023-10-23 20:52:41 +0200picnoir(~picnoir@about/aquilenet/vodoo/NinjaTrappeur)
2023-10-23 20:52:44 +0200Maxdamantus(~Maxdamant@user/maxdamantus)
2023-10-23 21:02:31 +0200 <haskellbridge> <m​auke> Haskellers love arguing about semantics
2023-10-23 21:03:55 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 264 seconds)
2023-10-23 21:05:05 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 21:05:11 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
2023-10-23 21:07:39 +0200Pickchea(~private@user/pickchea)
2023-10-23 21:08:23 +0200fendor(~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Remote host closed the connection)
2023-10-23 21:09:50 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
2023-10-23 21:10:22 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 21:13:27 +0200Lycurgus(~georg@user/Lycurgus) (Quit: leaving)
2023-10-23 21:13:59 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Remote host closed the connection)
2023-10-23 21:19:39 +0200CiaoSen(~Jura@2a05:5800:2cd:b800:664b:f0ff:fe37:9ef)
2023-10-23 21:20:43 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 21:27:42 +0200gatekempt(~gatekempt@user/gatekempt) (Remote host closed the connection)
2023-10-23 21:34:21 +0200 <johnw> mauke: what you mean by that
2023-10-23 21:34:46 +0200 <monochrom> :)
2023-10-23 21:36:52 +0200 <johnw> ;-)
2023-10-23 21:37:13 +0200 <Inst> port of Python book project #44 complete, did not read nor care for Python original
2023-10-23 21:39:16 +0200 <haskellbridge> <I​nst> https://paste.tomsmeding.com/Ni3w5J5X
2023-10-23 21:50:00 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 21:51:13 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-10-23 21:52:45 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
2023-10-23 21:53:43 +0200elkcl(~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru) (Ping timeout: 255 seconds)
2023-10-23 21:54:17 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
2023-10-23 21:55:21 +0200target_i(~target_i@217.175.14.39)
2023-10-23 21:57:01 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-23 21:58:52 +0200actioninja6(~actioninj@user/actioninja)
2023-10-23 21:58:53 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 255 seconds)
2023-10-23 21:58:56 +0200fweht(uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2023-10-23 21:59:09 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 21:59:53 +0200elkcl(~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru)
2023-10-23 21:59:58 +0200czy(~user@121.231.41.11) (Ping timeout: 272 seconds)
2023-10-23 22:00:28 +0200actioninja(~actioninj@user/actioninja) (Ping timeout: 258 seconds)
2023-10-23 22:00:29 +0200actioninja6actioninja
2023-10-23 22:01:36 +0200random-jellyfish(~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444)
2023-10-23 22:01:36 +0200random-jellyfish(~tiber@2a02:2f04:11e:c600:d86:8764:b7a3:4444) (Changing host)
2023-10-23 22:01:36 +0200random-jellyfish(~tiber@user/random-jellyfish)
2023-10-23 22:04:11 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2023-10-23 22:05:15 +0200takuan_dozo(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-10-23 22:06:42 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 22:08:34 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-23 22:11:03 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 22:16:26 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
2023-10-23 22:17:45 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 22:18:27 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-23 22:21:23 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 22:22:04 +0200simendsjo(~user@84.211.91.241) (Ping timeout: 255 seconds)
2023-10-23 22:22:15 +0200dudek(~dudek@185.150.236.168)
2023-10-23 22:23:40 +0200dhil(~dhil@2001:8e0:2014:3100:c465:c19e:7201:d418) (Ping timeout: 252 seconds)
2023-10-23 22:27:05 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f)
2023-10-23 22:40:13 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 22:40:56 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 22:46:51 +0200emmanuelux(~emmanuelu@user/emmanuelux)
2023-10-23 22:50:53 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 22:51:01 +0200 <EvanR> Inst, it's quite an IO heavy translation
2023-10-23 22:51:48 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 22:52:04 +0200 <EvanR> and I'm wondering if the lenses are helping as far as total code size
2023-10-23 22:52:50 +0200 <Inst> It's not, I think, it's just because I didn't want to munge the vector.
2023-10-23 22:52:59 +0200 <Inst> I'm curious if you think there's any way to increase the pure-impure ratio?
2023-10-23 22:56:13 +0200 <EvanR> is it basically, sit and wait until an arrow key is pressed, at which point crunch a state transition function and print out an updated picture, repeat
2023-10-23 22:56:54 +0200 <EvanR> the parseMaze was factored out of IO so that's good
2023-10-23 22:59:13 +0200 <Inst> the weirder part i guess is probably the huge closures, which might impede readibility
2023-10-23 22:59:42 +0200 <EvanR> I have to admit, I'm a never nester. So I would've not done that
2023-10-23 23:00:06 +0200 <EvanR> but you see very nested haskell code if you look at libraries
2023-10-23 23:00:07 +0200 <Inst> part of the issue is that this is designed as a cabal script, so moving off to separate modules is more difficult
2023-10-23 23:00:45 +0200 <Inst> I guess this is a closure abuse issue :(
2023-10-23 23:01:28 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 23:02:04 +0200 <EvanR> it's pretty readable
2023-10-23 23:02:15 +0200 <Inst> this is the original
2023-10-23 23:02:17 +0200 <Inst> https://inventwithpython.com/bigbookpython/project44.html
2023-10-23 23:02:20 +0200 <EvanR> but when everything is in IO that tends to increase the size of code
2023-10-23 23:02:26 +0200 <EvanR> at least, if you don't need IO
2023-10-23 23:04:47 +0200 <Inst> I guess it was more for a rough draft / move fast and break things approach
2023-10-23 23:04:56 +0200 <Inst> I was horribly tempted to do the file parser in IO
2023-10-23 23:05:07 +0200 <EvanR> that's why I brought it up
2023-10-23 23:06:07 +0200 <EvanR> the classic advice is to have most of your code in not-IO and use it within a thin IO shell which is the part that actually does the I/O. For this program that seems actually possible
2023-10-23 23:06:57 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-23 23:08:01 +0200 <Inst> probably the part that could be replaced by optparse-applicative is inflating IO size
2023-10-23 23:08:21 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Quit: ZNC 1.8.2 - https://znc.in)
2023-10-23 23:08:52 +0200 <EvanR> :t getArgs
2023-10-23 23:08:53 +0200 <lambdabot> error: Variable not in scope: getArgs
2023-10-23 23:09:05 +0200 <Inst> > import System.Environment
2023-10-23 23:09:07 +0200 <lambdabot> <hint>:1:1: error: parse error on input ‘import’
2023-10-23 23:09:11 +0200 <EvanR> getArgs :: IO [String]
2023-10-23 23:09:19 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-10-23 23:09:47 +0200 <EvanR> the getting of the args list requires IO
2023-10-23 23:10:00 +0200 <Inst> the [String] can be processed without IO
2023-10-23 23:10:45 +0200 <Inst> but there's no real string processing, just a bunch of complaints if the args are given in the wrong format (no args, too many args, file doesn't exist)
2023-10-23 23:11:13 +0200 <EvanR> either way the analysis of args doesn't require IO
2023-10-23 23:11:46 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-10-23 23:12:14 +0200 <EvanR> (file doesn't exist might be a complaint, but it's primarily an I/O exception when you go to open the file)
2023-10-23 23:12:17 +0200 <Inst> that implies, though, you'd have a datatype that represents the outcomes of analysis, then pattern match on the analysis
2023-10-23 23:12:43 +0200 <EvanR> Either String FilePath, or whatever
2023-10-23 23:13:19 +0200 <Inst> that's an interesting design
2023-10-23 23:13:37 +0200 <Inst> Either String Game
2023-10-23 23:14:08 +0200 <EvanR> reading the file requires IO, if the arguments are obviously bogus
2023-10-23 23:14:08 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds)
2023-10-23 23:14:10 +0200 <Inst> on left, output the pure error message, and exit
2023-10-23 23:14:18 +0200 <EvanR> arent*
2023-10-23 23:14:52 +0200 <EvanR> so there's a clear sequence of IO stages which may or may not fail until you get to the game loop
2023-10-23 23:15:04 +0200 <Inst> the biggest complain i have with the code is the early exit
2023-10-23 23:15:19 +0200 <Inst> main = initialize >>= mazeProg
2023-10-23 23:15:33 +0200 <Inst> that's essentially a schematic of the program, but it's not honored
2023-10-23 23:15:36 +0200 <EvanR> IO can exit early
2023-10-23 23:15:39 +0200 <EvanR> everyone knows
2023-10-23 23:15:50 +0200 <Inst> since stuff inside initialize is calling exitSuccess, exitFailure, etc
2023-10-23 23:18:30 +0200 <EvanR> you could exit without those too, pattern matching between stages
2023-10-23 23:18:48 +0200 <Inst> so what I can do is to change initialize to IO (Either String Game), then pass mazeProg to decide what to do about it, then create a separate loop within mazeProg
2023-10-23 23:18:55 +0200 <Inst> there's more entertaining things to do, for instance
2023-10-23 23:19:06 +0200 <Inst> https://invpy.com/mazes/
2023-10-23 23:19:18 +0200 <Inst> for instance, I could build a HTML parser, call simpleHTTP onto this address
2023-10-23 23:19:27 +0200 <Inst> then provide a choice of mazes from there
2023-10-23 23:20:24 +0200 <Inst> seems more honorable for practicing HTML parsing than trying to bill tomsmeding for 1 GB trying to parse his irclogs
2023-10-23 23:20:38 +0200 <rgw> " --he:lp Show help options"
2023-10-23 23:20:41 +0200 <rgw> small typo
2023-10-23 23:20:52 +0200 <monochrom> heh
2023-10-23 23:21:06 +0200 <EvanR> "entertaining" and "HTML parser" in the same plan
2023-10-23 23:21:31 +0200 <rgw> (line 88)
2023-10-23 23:21:54 +0200 <Inst> fixed already
2023-10-23 23:22:08 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-10-23 23:22:34 +0200 <Unicorn_Princess> hrm. how do i make available a local haskell library to ghci/other local haskell projects? i.e. how do i install it, and then how do i uninstall it? my current workflow of `cd mylocallib; cabal build; cabal install` only kinda works, and i'm sure i'm doing uninstalls wrong
2023-10-23 23:23:09 +0200 <exarkun> Unicorn_Princess: "cabal install" for libraries is no longer encouraged
2023-10-23 23:23:44 +0200 <exarkun> Unicorn_Princess: instead, declare dependencies with "build-depends" in a .cabal file and just use "cabal build" (or "cabal v2-build" if you have're stuck with a really old cabal for some reason)
2023-10-23 23:24:31 +0200 <exarkun> Unicorn_Princess: with "build-depends" every project can have its own private dependency solution space, instead of throwing everything into a single global set where _everything_ has to play nicely together.
2023-10-23 23:24:50 +0200 <Unicorn_Princess> what is ghci's version of a .cabal file?
2023-10-23 23:25:30 +0200 <Inst> problem is, Cabal currently has no way to uninstall
2023-10-23 23:25:51 +0200 <exarkun> Unicorn_Princess: "cabal repl" probably
2023-10-23 23:26:48 +0200 <EvanR> I uninstall my cabalckages easily, delete the project directory
2023-10-23 23:26:51 +0200 <exarkun> Unicorn_Princess: with "--build-depends=..." as an argument if you don't want to write a .cabal file
2023-10-23 23:27:06 +0200 <Inst> https://cabal.readthedocs.io/en/3.4/cabal-project.html
2023-10-23 23:27:15 +0200 <Unicorn_Princess> `cabal repl` will look for a .cabal file in ~/?
2023-10-23 23:27:25 +0200 <exarkun> Unicorn_Princess: no, in .
2023-10-23 23:27:47 +0200 <exarkun> or maybe it will walk up the filesystem too, I'm not sure
2023-10-23 23:27:57 +0200 <exarkun> but I don't use it that way
2023-10-23 23:27:58 +0200 <Unicorn_Princess> hm. i'd like to make my library available to the repl no matter where i start the repl, tho
2023-10-23 23:28:07 +0200 <Inst> oh, old version
2023-10-23 23:28:08 +0200 <Inst> https://cabal.readthedocs.io/en/stable/cabal-project.html
2023-10-23 23:28:14 +0200 <exarkun> well, that's just the thing that cabal no longer particularly wants to help you do
2023-10-23 23:28:29 +0200 <Inst> worst case, you could github your libs, then download the packages from github
2023-10-23 23:28:44 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 23:29:15 +0200 <Inst> https://dev.to/piq9117/using-github-repos-as-haskell-dependency-m2o
2023-10-23 23:29:33 +0200 <exarkun> Inst: lots of words, it's not clear who they're for
2023-10-23 23:30:22 +0200 <Inst> which link? It's for unicornprincess, as a workaround, because I don't know how to get cabal to read local libs
2023-10-23 23:30:26 +0200 <Unicorn_Princess> hmmm, okay, i'll hit my head against this wall some more, i see the glimmer of a solution. thanks
2023-10-23 23:30:46 +0200 <Inst> you could ask in #hackage
2023-10-23 23:30:50 +0200 <Inst> that's where cabal team hangs out
2023-10-23 23:31:27 +0200 <Unicorn_Princess> (the problem with ~/.config/cabal/config is that it applies to all projects on my system. but i'll figure something out to apply it only to ghci when i want it to)
2023-10-23 23:33:20 +0200 <Inst> via sclv, V2 install / builds ignore global repo, afaik
2023-10-23 23:35:02 +0200 <monochrom> Unicorn_Princess: Firstly, in this the 21st Century CE, devs are overpaid and spoiled with 10PB NVMe's and 256TB of RAM, no one speaks of "uninstall" any more. Still, I wrote https://github.com/treblacy/cabalgc to help.
2023-10-23 23:35:54 +0200 <monochrom> With that out of the way, I personally use "cabal install --lib random" sometimes (though not always), but people here will scaremonger you out of it.
2023-10-23 23:36:03 +0200 <Unicorn_Princess> i think i'll just nuke and reinstall my whole haskell, and then never `cabal install` anything else again >_>
2023-10-23 23:36:24 +0200 <monochrom> So if not that, then it's "cabal script" or "cabal repl -brandom". That also work fine.
2023-10-23 23:36:29 +0200 <Inst> monochrom: gotta remember the poor kids at Chennai Mathematical Institute, who apparently intro course with Haskell
2023-10-23 23:36:37 +0200 <Inst> a good laptop is equal to 100% of GDP per capita :(
2023-10-23 23:36:42 +0200 <Unicorn_Princess> it's been giving me weird warnings it didn't use to anyway, and i'm not figuring out how to fix those if i don't absolutely have to
2023-10-23 23:37:18 +0200 <monochrom> Yes it is my very extremely unpopular opinion that web devs should be confined to OLPC netbooks. (Remember those?)
2023-10-23 23:37:33 +0200 <monochrom> And yes, netbooks, not even laptops.
2023-10-23 23:37:49 +0200 <Unicorn_Princess> oh it's actually called `ghcup nuke`, neat
2023-10-23 23:37:57 +0200 <Inst> Btw, sorry about the state of tooling, Unicorn_Princess
2023-10-23 23:38:06 +0200 <Inst> there are many very talented people (not me) working on it, but it takes time.
2023-10-23 23:38:10 +0200 <Inst> Thanks for taking an interest in Haskell :)
2023-10-23 23:38:12 +0200ft(~ft@p4fc2a529.dip0.t-ipconnect.de)
2023-10-23 23:39:30 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-10-23 23:39:37 +0200 <Unicorn_Princess> ah that's okay. ghcup is pleasant at least, and the library thing is more about documentation than tooling itself (i assume, we'll see how the no-install route works for me)
2023-10-23 23:39:57 +0200 <Inst> you're having trouble even without --lib?
2023-10-23 23:40:15 +0200 <Inst> I'm one of the maniacs that actually set up an env file, i.e, I set up cabal install base --lib
2023-10-23 23:40:21 +0200 <Inst> then cabal install everything else
2023-10-23 23:40:27 +0200Jackneill(~Jackneill@20014C4E1E0E6F00958F8CDDD487D8C2.dsl.pool.telekom.hu) (Ping timeout: 246 seconds)
2023-10-23 23:40:42 +0200 <Inst> but without --lib, because adding --lib causes the package to be exposed in global env file
2023-10-23 23:41:12 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se)
2023-10-23 23:41:32 +0200 <Inst> which causes problems, instead I ghci -package necessarypackage -package otherneededpackage instead, and use :set -package in ghci to turn various libraries on
2023-10-23 23:41:43 +0200 <Inst> and I still have to routinely clear my cabal repo
2023-10-23 23:43:12 +0200 <Unicorn_Princess> uh i think it didn't work at all without --lib, but i forgot
2023-10-23 23:44:23 +0200 <Inst> --lib is horrible
2023-10-23 23:44:34 +0200helge_(~textual@h-158-174-186-9.NA.cust.bahnhof.se) (Client Quit)
2023-10-23 23:44:34 +0200 <Inst> you end up having the package permanently exposed in GHCI
2023-10-23 23:45:31 +0200 <monochrom> Without --lib means exe only. For lib-only packages, therefore the computer churns but installs nothing permanent.
2023-10-23 23:45:53 +0200 <monochrom> Great for when your stove doesn't work but you need to fry eggs.
2023-10-23 23:47:03 +0200 <Unicorn_Princess> well in my case it is a lib-only package, so exe only does me little good, yeah
2023-10-23 23:47:38 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds)
2023-10-23 23:53:48 +0200random-jellyfish(~tiber@user/random-jellyfish) (Ping timeout: 240 seconds)
2023-10-23 23:55:11 +0200 <Inst> if you have an environment file, without --lib dumps into package repo, but doesn't expose it
2023-10-23 23:55:24 +0200 <Inst> it also writes the existence of the lib into the environment file, but doesn't load it by default
2023-10-23 23:55:38 +0200 <Inst> works on arch and windows afaik
2023-10-23 23:57:08 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:9d17:6d56:150b:424f) (Ping timeout: 272 seconds)
2023-10-23 23:57:11 +0200 <Unicorn_Princess> okay but if i understand correctly, `cabal install`, with or without --lib, is not The Way anymore, right? and instead i wanna just specify my library as a dependency for other projects/ghci
2023-10-23 23:57:31 +0200 <Unicorn_Princess> and never run cabal install mylocalproject
2023-10-23 23:58:12 +0200vglfr(~vglfr@88.155.140.136) (Remote host closed the connection)
2023-10-23 23:58:23 +0200 <Inst> the problem is that cabal install has been sort of broken for a long time
2023-10-23 23:58:44 +0200 <Inst> it's connected to the old Cabal Hell, even though cabal projects now completely ignore your global environment file
2023-10-23 23:58:53 +0200 <Inst> all the old textbooks say cabal install foo
2023-10-23 23:59:01 +0200vglfr(~vglfr@88.155.140.136)
2023-10-23 23:59:10 +0200 <Unicorn_Princess> yes but i won't be using cabal install, right?
2023-10-23 23:59:17 +0200 <Inst> yeah, i guess, because it's finicky
2023-10-23 23:59:29 +0200 <Unicorn_Princess> so it may be a problem, but it is Somebody Else's Problem
2023-10-23 23:59:29 +0200 <Inst> you can just load stuff on a github and increase your commit history
2023-10-23 23:59:40 +0200 <Inst> then go to the package-based workflow
2023-10-23 23:59:44 +0200michalz(~michalz@185.246.207.215) (Remote host closed the connection)
2023-10-23 23:59:57 +0200 <monochrom> For exes, "cabal install" is standard.