2024/11/19

Newest at the top

2024-11-19 16:09:08 +0100divya`(~user@139.5.11.231) (Ping timeout: 244 seconds)
2024-11-19 16:00:08 +0100alexherbo2(~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) (Remote host closed the connection)
2024-11-19 15:51:19 +0100tv(~tv@user/tv) tv
2024-11-19 15:50:45 +0100tv(~tv@user/tv) (Quit: derp)
2024-11-19 15:49:17 +0100euleritian(~euleritia@dynamic-176-001-192-221.176.1.pool.telefonica.de)
2024-11-19 15:48:39 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-11-19 15:44:19 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de)
2024-11-19 15:43:33 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
2024-11-19 15:42:35 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 15:42:18 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2024-11-19 15:37:04 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2024-11-19 15:36:41 +0100sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-11-19 15:34:18 +0100 <hellwolf> I bet vscode has it better.
2024-11-19 15:34:10 +0100 <hellwolf> emacs lsp haskell formatting just not ideal, not sure how to fix :/
2024-11-19 15:33:51 +0100 <haskellbridge> <hellwolf> https://kf8nh.com/_heisenbridge/media/matrix.org/UnZTcaLGKnpftQUaEXKifiUY/SmsNSH3-GDQ/image.png
2024-11-19 15:30:45 +0100 <bwe> dminuoso, mauke, Leary: Thanks for your inputs!
2024-11-19 15:24:08 +0100jinsun(~jinsun@user/jinsun) jinsun
2024-11-19 15:22:54 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 276 seconds)
2024-11-19 15:21:25 +0100mari-estel(~mari-este@user/mari-estel) mari-estel
2024-11-19 15:18:53 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-11-19 15:14:46 +0100 <bwe> dminuoso: wow, I've got it working now. It's magic.
2024-11-19 15:07:53 +0100 <dminuoso> With default implementations of sizeOfP
2024-11-19 15:07:28 +0100 <dminuoso> Though we could conceive a world of having `sizeOf :: Storable s => s -> Int`, `sizeOfP :: Storable s => proxy s -> Int`, `alignment :: Storable s => s -> Int` and `alignmentP :: Storable s => proxy s -> Int`
2024-11-19 15:05:30 +0100 <dminuoso> (Now in this particular example it could be argued, that sizeOf might also be applied to actual values not just undefined at a type)
2024-11-19 15:04:38 +0100 <dminuoso> Something like `sizeOf (Proxy :: Proxy T)` would have been cleaner.
2024-11-19 15:04:25 +0100 <dminuoso> You will find plenty of snippets like `sizeOf (undefined :: T)` in the wild.
2024-11-19 15:04:11 +0100 <dminuoso> bwe: Fun fact, the proxy pattern is what sizeOf in Storable should arguably use.
2024-11-19 15:02:26 +0100 <dminuoso> https://hackage.haskell.org/package/servant-server-0.20.2/docs/Servant-Server.html#t:HasServer
2024-11-19 15:02:23 +0100 <dminuoso> bwe: Take note that this is exactly how servant works its magic:
2024-11-19 15:01:28 +0100 <mauke> (the latter part being equivalent to (Proxy :: Proxy Website))
2024-11-19 15:01:16 +0100 <dminuoso> i.e. `class FromWebsite a where getNavigationURIs :: proxy a -> [NaviURI]`
2024-11-19 15:01:05 +0100 <bwe> Yes, it is. I omitted functions with `a` which do exist.
2024-11-19 15:00:52 +0100 <dminuoso> That way you could write `getNavigationURIs (Proxy @Website)`
2024-11-19 15:00:35 +0100 <dminuoso> (If thats the intent)
2024-11-19 15:00:29 +0100 <dminuoso> You could add `proxy a` to your methods.
2024-11-19 15:00:06 +0100 <dminuoso> Im not quite sure what the intent is.
2024-11-19 14:59:54 +0100 <bwe> (before switching to Proxy)
2024-11-19 14:59:40 +0100 <bwe> (of a type class)
2024-11-19 14:59:31 +0100 <bwe> dminuoso: here is some more specific example: https://paste.tomsmeding.com/M0BnSi2q
2024-11-19 14:57:35 +0100 <dminuoso> bwe: Out of curiosity, that snippet reads `Proxy 3`, where is that from?
2024-11-19 14:56:52 +0100 <dminuoso> Ah right, infix is for something like `f :+: b`
2024-11-19 14:56:11 +0100 <mauke> :-)
2024-11-19 14:55:59 +0100 <dminuoso> Ah I guess.
2024-11-19 14:55:56 +0100 <dminuoso> circumfix?
2024-11-19 14:55:51 +0100 <mauke> (circumfix)
2024-11-19 14:55:49 +0100 <dminuoso> Where proxy ~ []
2024-11-19 14:55:27 +0100 <dminuoso> ^- Of course, [Int] is just some infix notation for `[] Int`
2024-11-19 14:55:14 +0100 <mauke> (because proxy = [] for this call)
2024-11-19 14:54:52 +0100 <mauke> e.g. if you take 'proxy a', then f ([] :: [Int]) is a valid use
2024-11-19 14:54:36 +0100 <mauke> bwe: it also means you can define your function without importing Data.Proxy, and if someone already has an expression of the right parameterized type, they can pass that in