Newest at the top
| 2026-03-11 08:33:06 +0100 | <mesaoptimizer> | I see. I was using type applications with it |
| 2026-03-11 08:32:15 +0100 | <dminuoso> | Explicit unpacking/repacking is just better most of the time. |
| 2026-03-11 08:31:56 +0100 | <dminuoso> | Oh it's not dangerous, but I'd be willing to say that almost any use of `coerce` in your first year is probably a smell |
| 2026-03-11 08:31:27 +0100 | <dminuoso> | mesaoptimizer: It's not really about "understanding" coercions, just that they dont fit into *any* idiomatic code for when you bootstrap yourself into the language. |
| 2026-03-11 08:31:23 +0100 | <mesaoptimizer> | dminuoso: hmm, perhaps you have a better idea than I do of how footgunny `Data.Coerce` is. I do know that I can't use it if I enable `Safe` language pragma |
| 2026-03-11 08:31:11 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-03-11 08:30:25 +0100 | <[exa]> | :) |
| 2026-03-11 08:30:19 +0100 | <gentauro> | [exa]: got it |
| 2026-03-11 08:30:02 +0100 | <dminuoso> | mesaoptimizer: I'm not sure how that module could help you on your path *shrugs* |
| 2026-03-11 08:30:02 +0100 | <[exa]> | well add the SBS and there you go |
| 2026-03-11 08:29:31 +0100 | <gentauro> | [exa]: yeah, my code import is -> `import qualified Data.ByteString.Lazy as LBS`. Kind of dump to import the `lazy` version if I want to do strict stuff |
| 2026-03-11 08:29:24 +0100 | <mesaoptimizer> | I did a PLT semantics course, its all right |
| 2026-03-11 08:28:58 +0100 | <dminuoso> | If you're starting out Data.Coerce is most likely something you not should be wielding |
| 2026-03-11 08:28:32 +0100 | chele | (~chele@user/chele) chele |
| 2026-03-11 08:28:27 +0100 | <mesaoptimizer> | my current favorite resource has been https://leanpub.com/finding-success-in-haskell by Julie Moronuki and Chris Martin. It helped me ease into the use of Either and Maybe and `newtype` and introduced me to `Data.Coerce` |
| 2026-03-11 08:28:19 +0100 | <preflex> | Sorry, I haven't seen bitemyapp |
| 2026-03-11 08:28:19 +0100 | <ski> | preflex: xseen bitemyapp |
| 2026-03-11 08:28:06 +0100 | <gentauro> | [exa]: use case is (files are small enough to be in mem) so yes, they need to be fully in mem |
| 2026-03-11 08:28:01 +0100 | <[exa]> | as in, `fromStrict <$> StrictBS.readFile` |
| 2026-03-11 08:27:23 +0100 | <[exa]> | gentauro: you might want to use the strict reader https://hackage-content.haskell.org/package/bytestring-0.12.2.0/docs/Data-ByteString.html#v:readFile and then thaw the string |
| 2026-03-11 08:26:45 +0100 | humasect | (~humasect@184.151.37.182) humasect |
| 2026-03-11 08:26:39 +0100 | <gentauro> | :-\ |
| 2026-03-11 08:26:37 +0100 | <gentauro> | I guess by forcing the length of the file and then returning the bytes |
| 2026-03-11 08:26:17 +0100 | <gentauro> | [exa]: last time I did this -> `LBS.readFile f >>= \bs -> LBS.length bs `seq` pure bs` :| |
| 2026-03-11 08:26:14 +0100 | <mesaoptimizer> | then again, Chris Allen and Julie Moronuki's https://haskellbook.com mentions record syntax (I did a search in the PDF) and it was published in 2017 |
| 2026-03-11 08:25:36 +0100 | <mesaoptimizer> | I returned to it recently and didn't like it, and especially didn't appreciate the lack of a mention of record syntax anywhere, but perhaps that was after the publication of the 2016 book |
| 2026-03-11 08:24:51 +0100 | <mesaoptimizer> | I read the first part of Graham Hutton's book two years ago btw |
| 2026-03-11 08:24:50 +0100 | <[exa]> | gentauro: btw what's the usecase there? literally just forcing the file in? |
| 2026-03-11 08:24:32 +0100 | <[exa]> | mesaoptimizer: the community LYAH is not bad if you know some coding already https://learnyouahaskell.github.io/ |
| 2026-03-11 08:22:50 +0100 | <gentauro> | [exa]: thx |
| 2026-03-11 08:22:13 +0100 | <lambdabot> | http://www.haskell.org/haskellwiki/Typeclassopedia |
| 2026-03-11 08:22:12 +0100 | <ski> | @where Typeclassopedia |
| 2026-03-11 08:22:07 +0100 | <ski> | then there's stuff like |
| 2026-03-11 08:21:48 +0100 | <ski> | (by Simon Thompson) |
| 2026-03-11 08:21:38 +0100 | <ski> | iirc "Haskell: The Craft of Functional Programming" should cover that, apart from `Applicative' |
| 2026-03-11 08:21:37 +0100 | <mesaoptimizer> | that's quite an interesting syllabus sequence, I might attempt that MOOC, and if I do, I'll give you feedback too :) |
| 2026-03-11 08:20:06 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds) |
| 2026-03-11 08:19:28 +0100 | <opqdonut> | mesaoptimizer: I'm not sure what the community at large is recommending, but students have been giving good feedbakc on my open online course haskell.mooc.fi |
| 2026-03-11 08:18:38 +0100 | <mesaoptimizer> | What is the current set of recommended beginner's books to learn Haskell (that enables understanding of the following concepts: Functor, Applicatives, Monads, record syntax)? I find my lack of fluency with the following things to be getting in the way of growing the small set of personal applications I use that are written in Haskell |
| 2026-03-11 08:16:24 +0100 | <[exa]> | (or use deepseq) |
| 2026-03-11 08:16:16 +0100 | <[exa]> | there's some strict variant of readFile for this use |
| 2026-03-11 08:15:49 +0100 | <[exa]> | gentauro: I'd suspect it only forces the first cons of the list |
| 2026-03-11 08:15:17 +0100 | gentauro | I mean it compiles. I just want to be use that the `bang` forces the `readFile` to go from lazy to strict |
| 2026-03-11 08:13:08 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-03-11 08:10:59 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2026-03-11 08:10:57 +0100 | <gentauro> | should be `do !foo <- readFile "bar.txt"` |
| 2026-03-11 08:10:44 +0100 | <gentauro> | ups |
| 2026-03-11 08:10:21 +0100 | <gentauro> | Can `BangPatterns` be used in do-notation? Like: `do foo! <- readFile "bar.txt"`. |
| 2026-03-11 08:03:46 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
| 2026-03-11 07:59:04 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |