2025/11/22

Newest at the top

2025-11-22 21:45:29 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-22 21:40:08 +0100jmcantrell(~weechat@user/jmcantrell) (Ping timeout: 240 seconds)
2025-11-22 21:38:34 +0100trickard_(~trickard@cpe-87-98-47-163.wireline.com.au)
2025-11-22 21:38:07 +0100trickard_(~trickard@cpe-87-98-47-163.wireline.com.au) (Ping timeout: 240 seconds)
2025-11-22 21:37:44 +0100 <mauke> type Lexicon = [Word]
2025-11-22 21:35:39 +0100deptype(~deptype@2406:b400:3a:9d2f:863f:df64:5fc4:398c)
2025-11-22 21:35:04 +0100deptype(~deptype@2406:b400:3a:9d2f:4399:e959:784c:f191) (Remote host closed the connection)
2025-11-22 21:34:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-11-22 21:31:57 +0100 <monochrom> haha that's great
2025-11-22 21:31:46 +0100 <int-e> monochrom: teach it with s/parsing/word processing/g? :P
2025-11-22 21:30:56 +0100monochromis preparing to teach a compiler course in which we begin with tokenization aka lexical analysis!
2025-11-22 21:30:55 +0100 <EvanR> data NonZero = PosMinusOne Natural | NegPlusOne Natural
2025-11-22 21:30:27 +0100arandombit(~arandombi@user/arandombit) arandombit
2025-11-22 21:30:14 +0100 <monochrom> type Lexicon = Word >:)
2025-11-22 21:30:01 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-22 21:29:38 +0100 <glguy> Natural
2025-11-22 21:29:30 +0100arandombit(~arandombi@user/arandombit) (Ping timeout: 252 seconds)
2025-11-22 21:28:20 +0100 <monochrom> No more confusing than any other meaningful names.
2025-11-22 21:27:32 +0100 <haskellbridge> <Morj> Don't say Wordeger
2025-11-22 21:27:23 +0100 <haskellbridge> <Morj> If Word is not confusing, what's the name of dynamic-sized word?
2025-11-22 21:27:12 +0100 <bwe> No, I mean the word `Word`.
2025-11-22 21:26:59 +0100 <monochrom> Word is no more confusing than Int.
2025-11-22 21:26:30 +0100 <EvanR> er, maxWord
2025-11-22 21:26:28 +0100 <bwe> Word is confusing
2025-11-22 21:26:16 +0100 <EvanR> then zero is literally not representable... but 255 is necessarily an error
2025-11-22 21:25:14 +0100 <EvanR> Word + 1
2025-11-22 21:25:10 +0100 <EvanR> yes Word is what I should have thought of
2025-11-22 21:24:59 +0100 <haskellbridge> <Morj> Yes, this is a common trick. Usually used for data structures, like https://hackage.haskell.org/package/mono-traversable-1.0.21.0/docs/Data-NonNull.html
2025-11-22 21:24:49 +0100 <monochrom> Use Natural or Word but consistently off by 1, e.g., 1 is represented by 0.
2025-11-22 21:24:26 +0100 <bwe> glguy: oh, that's a nice trick. So I am not constructing it with MyType but newMyType that checks for 0.
2025-11-22 21:23:50 +0100 <EvanR> but that might be too heady
2025-11-22 21:23:25 +0100 <EvanR> another avenue is to make the new type represent the value wrapped value + something
2025-11-22 21:22:32 +0100 <glguy> check for 0 in the function that constructs values of your new type
2025-11-22 21:22:18 +0100 <EvanR> a newtype wrapper with a smart constructor?
2025-11-22 21:22:07 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-22 21:21:37 +0100 <bwe> How can I make 0 unrepresentable for a data type that is Int right now?
2025-11-22 21:21:05 +0100 <haskellbridge> <Morj> The worst part is that I can't define the parsers at module's top level because of ambigous types. Makes iterating in ghci a bit annoying
2025-11-22 21:20:09 +0100Fischmiep(~Fischmiep@user/Fischmiep) Fischmiep
2025-11-22 21:19:50 +0100Fischmiep(~Fischmiep@user/Fischmiep) (Remote host closed the connection)
2025-11-22 21:18:52 +0100jmcantrell(~weechat@user/jmcantrell) jmcantrell
2025-11-22 21:18:28 +0100Fischmiep(~Fischmiep@user/Fischmiep) Fischmiep
2025-11-22 21:18:21 +0100Lycurgus(~juan@user/Lycurgus) Lycurgus
2025-11-22 21:17:55 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-22 21:16:38 +0100Fischmiep(~Fischmiep@user/Fischmiep) (Quit: ZNC - https://znc.in)
2025-11-22 21:16:18 +0100Square3(~Square@user/square) Square
2025-11-22 21:15:24 +0100 <haskellbridge> <Morj> An btw 'scalpel' package is pretty good
2025-11-22 21:15:07 +0100deptype(~deptype@2406:b400:3a:9d2f:4399:e959:784c:f191)
2025-11-22 21:14:32 +0100deptype(~deptype@2406:b400:3a:9d2f:1c0f:7b0:178a:6f00) (Remote host closed the connection)
2025-11-22 21:14:16 +0100 <haskellbridge> <Morj> I wonder if the page I'm scraping is going to block curl after 500 requests (in 500*2 seconds)
2025-11-22 21:07:13 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)