Newest at the top
| 2026-01-25 22:42:41 +0100 | pavonia | (~user@user/siracusa) siracusa |
| 2026-01-25 22:41:26 +0100 | oskarw | (~user@user/oskarw) (Remote host closed the connection) |
| 2026-01-25 22:40:50 +0100 | <geekosaur> | in Haskell it's a distinct type, not a distinct value inhabiting every type |
| 2026-01-25 22:40:35 +0100 | <geekosaur> | that's what I meant by "in-band" |
| 2026-01-25 22:39:24 +0100 | <monochrom> | Does the empty object {} exist in JSON? I would be OK with that becoming () in Haskell. But then my idea still implies that parse errors still exist, e.g., parsing "5" to () should be an error. |
| 2026-01-25 22:38:58 +0100 | <[exa]> | the philosophical reason is: in js everything can be null |
| 2026-01-25 22:38:30 +0100 | <[exa]> | oh well look at that https://github.com/haskell/aeson/issues/788#issuecomment-939328524 |
| 2026-01-25 22:37:09 +0100 | <geekosaur> | tbh that actually feels a bit wrong to me, since null is in-band in JSON |
| 2026-01-25 22:36:19 +0100 | <[exa]> | I wanted to nicely match if a value is empty, looked pretty much okay that way |
| 2026-01-25 22:36:04 +0100 | geekosaur | wonders if it's to play a bit more nicely in ghci with ExtendedDefaultRules or something like that |
| 2026-01-25 22:35:41 +0100 | <tomsmeding> | [exa]: let me invert the question: why are you parsing a ()? |
| 2026-01-25 22:35:11 +0100 | <[exa]> | but we've got our cozy haskell null!!! |
| 2026-01-25 22:35:02 +0100 | <[exa]> | yeah well you can do `Null <- ...` |
| 2026-01-25 22:34:30 +0100 | <tomsmeding> | I might actually expect () to parse `null`, because there doesn't seem to be another way to specifically parse `null`? (Apart from parsing a `Value` and requiring it to be `Null`) |
| 2026-01-25 22:32:48 +0100 | tomsmeding | isn't sure, but that sounds like a bad reason |
| 2026-01-25 22:32:27 +0100 | <[exa]> | I guess might be the case because of defaulting, if you write a parser and do `_ <- parseJSON`, it would select () by default |
| 2026-01-25 22:32:03 +0100 | <[exa]> | like, it's somewhat surprising |
| 2026-01-25 22:29:21 +0100 | <[exa]> | not really, there's helpers to avoid that |
| 2026-01-25 22:29:03 +0100 | <tomsmeding> | doesn't aeson always allow it if there's more stuff than expected? |
| 2026-01-25 22:28:33 +0100 | <[exa]> | ref: https://hackage.haskell.org/package/aeson-2.2.3.0/docs/src/Data.Aeson.Types.FromJSON.html#line-1672 |
| 2026-01-25 22:28:23 +0100 | <[exa]> | is there some philosophical reason for instance FromJSON () to always succeed? I'd kinda expect it should match a `null` or `[]` or something and scream if there's actual data |
| 2026-01-25 22:16:36 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 252 seconds) |
| 2026-01-25 22:15:51 +0100 | Beowulf | (florian@2a01:4f9:3b:2d56::2) |
| 2026-01-25 22:14:57 +0100 | <tomsmeding> | but thank you, that looks better than the 2018-era packages I was finding |
| 2026-01-25 22:14:28 +0100 | myxos | (~myxos@174-18-58-141.tcso.qwest.net) myxokephale |
| 2026-01-25 22:13:51 +0100 | <geekosaur> | tbh I use flora these days |
| 2026-01-25 22:13:29 +0100 | <tomsmeding> | why am I not getting that when I search for "notify" on hackage |
| 2026-01-25 22:13:12 +0100 | <[exa]> | tomsmeding: ghcid uses `fsnotify` and it was ok iirc |
| 2026-01-25 22:13:06 +0100 | <geekosaur> | the usual is fsnotify, I think |
| 2026-01-25 22:11:44 +0100 | <tomsmeding> | does anyone have a recommendation for a package for filesystem events |
| 2026-01-25 22:10:53 +0100 | myxos | (~myxos@174-18-58-141.tcso.qwest.net) (Remote host closed the connection) |
| 2026-01-25 22:09:57 +0100 | <[exa]> | oh wow the magic numbers actually googled |
| 2026-01-25 22:08:03 +0100 | <[exa]> | I found it in some very old source with a comment that it's very good indeed |
| 2026-01-25 22:07:50 +0100 | <[exa]> | hsh x seed = seed `xor` (x * 2654435761 + 2654435769 + (shiftL seed 6) + (shiftR seed 2)) |
| 2026-01-25 22:07:48 +0100 | <[exa]> | btw kinda related to the above, does anyone recognize what kind of hash is this: |
| 2026-01-25 22:05:16 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
| 2026-01-25 21:56:43 +0100 | wickedja` | (~user@2605:8d80:5431:62ef:ec3f:86f3:7664:49eb) (Remote host closed the connection) |
| 2026-01-25 21:36:58 +0100 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) (Client Quit) |
| 2026-01-25 21:36:10 +0100 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) humasect |
| 2026-01-25 21:34:03 +0100 | <[exa]> | cool. |
| 2026-01-25 21:33:56 +0100 | <[exa]> | hashable internally has some XXH3 or what |
| 2026-01-25 21:32:39 +0100 | <tomsmeding> | the proxy is ugly but it works |
| 2026-01-25 21:32:21 +0100 | <tomsmeding> | class BaseHash base where { baseHash :: proxy base -> ByteString -> Int }; class BaseHash base => AnyHashable base a where { hash :: proxy base -> a -> Int } |
| 2026-01-25 21:31:28 +0100 | <[exa]> | if I package it, the generality is gonna kill it :D :D |
| 2026-01-25 21:31:23 +0100 | <tomsmeding> | there's actually a way to make the typeclass generic over the underlying hash implementation |
| 2026-01-25 21:31:17 +0100 | <[exa]> | nah I have like 10 types, that's 10 functions |
| 2026-01-25 21:30:59 +0100 | <tomsmeding> | and then package it up :) |
| 2026-01-25 21:30:53 +0100 | <[exa]> | okay good that sounds like time to roll it |
| 2026-01-25 21:29:54 +0100 | <geekosaur> | to ensure core data structures don't get changed unnecessarily and cause downstream breakage |
| 2026-01-25 21:29:42 +0100 | <tomsmeding> | [exa]: roll it yourself? How many types do you need |