2024/06/25

Newest at the top

2024-06-26 01:53:00 +0200 <EvanR> joeyadams, did you try flags to reduce the binary size, did you try to strip the binary
2024-06-26 01:52:06 +0200 <safinaskar> EvanR: okay :(
2024-06-26 01:51:40 +0200 <joeyadams> I should try writing the instances manually to see how big the code footprint is.
2024-06-26 01:51:39 +0200 <EvanR> Hi can you not respond to a haskell question by saying use rust
2024-06-26 01:51:23 +0200 <joeyadams> But I am curious why derived instances might take up so much code. Deriving FromJSON/ToJSON for 15 records produces as much binary code as the whole Aeson library.
2024-06-26 01:48:19 +0200 <joeyadams> An important detail I left out: I had deriving Show on all my records. I took that off and that took off 300K.
2024-06-26 01:46:56 +0200 <safinaskar> and then serde_json uses these instances
2024-06-26 01:46:49 +0200 <safinaskar> joeyadams: first package called "serde" derives all needed instances in compile time using so-called proc macros (it is code, which executes in compile time and generates AST, similar to template haskell)
2024-06-26 01:45:55 +0200 <safinaskar> joeyadams: serde_json works in compile-time
2024-06-26 01:45:46 +0200 <joeyadams> So I just need to write a quick sed replace to turn my Haskell code into Rust, and I'll be set :-)
2024-06-26 01:45:06 +0200 <safinaskar> joeyadams: binary sizes likely to be big, too. but compilation speed will be nice
2024-06-26 01:45:03 +0200 <joeyadams> Just curious, does serde_json use a generic system sort of like Haskell has, or is it more like C# where it's all run-time reflection?
2024-06-26 01:44:14 +0200 <safinaskar> joeyadams: instances for serde_json are generated automatically, too
2024-06-26 01:43:47 +0200 <safinaskar> joeyadams: aeson in rust world is called serde_json
2024-06-26 01:43:27 +0200 <safinaskar> joeyadams: use rust. it compiles fast (compared to haskell)
2024-06-26 01:35:44 +0200 <joeyadams> This means if I generate bindings for a database with 100 tables, I end up with an absurdly large binary. Not the end of the world, just slightly disappointing.
2024-06-26 01:34:18 +0200 <joeyadams> Records compile into somewhat large binaries, is this a known issue? For example, I have a module with 16 records (205 fields), and it produces a 490K .o file (versus 99K if I remove the records). If I derive generic Aeson instances, it becomes 2.3M, and takes several seconds to compile.
2024-06-26 01:11:36 +0200 <safinaskar> for example, "f :: forall (a :: Type -> Type). Int" can be written in C++ so: "template <template <typename> typename T> int f()"
2024-06-26 01:10:22 +0200 <safinaskar> i'm not sure about Rust, but in C++ this seems to be totally possible
2024-06-26 01:09:54 +0200 <safinaskar> how i will try to prove the same thing using C++ and Rust :)
2024-06-26 01:04:25 +0200 <EvanR> and see that it is much more powerful than stuff like coq which cripples itself into only proving true stuff
2024-06-26 01:04:13 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-06-26 01:04:09 +0200 <safinaskar> EvanR: unfortunately, this is easy, too. "false :: forall a. a" "false = undefined"
2024-06-26 01:03:21 +0200 <EvanR> for your next trick, use haskell to prove FALSE
2024-06-26 01:01:52 +0200 <safinaskar> so, yes, it is possible to fake type-level lambdas!
2024-06-26 01:01:13 +0200 <safinaskar> so yes, i was able to cope with all problems!
2024-06-26 01:00:57 +0200 <safinaskar> this means that induction actually works!
2024-06-26 01:00:46 +0200 <safinaskar> in haskell
2024-06-26 01:00:39 +0200 <safinaskar> ha! i proved (0 + x = x) using (x + 0 = x) and induction! https://godbolt.org/z/YMYrWW6Ee
2024-06-26 01:00:20 +0200ft(~ft@p4fc2ab80.dip0.t-ipconnect.de)
2024-06-26 00:51:57 +0200noumenon(~noumenon@113.51-175-156.customer.lyse.net)
2024-06-26 00:49:55 +0200causal(~eric@50.35.88.207) (Quit: WeeChat 4.3.1)
2024-06-26 00:46:23 +0200 <EvanR> call it ring theory
2024-06-26 00:46:08 +0200 <EvanR> just make an axiom for that
2024-06-26 00:46:07 +0200joeyadams(~joeyadams@2607:fb91:1617:1400:929b:26f0:654:cc5a)
2024-06-26 00:46:05 +0200 <EvanR> easy
2024-06-26 00:44:36 +0200cheater(~Username@user/cheater)
2024-06-26 00:44:31 +0200acidjnk_new3(~acidjnk@p200300d6e714dc90fd0a56c96235233a.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2024-06-26 00:44:29 +0200cheater(~Username@user/cheater) (Ping timeout: 256 seconds)
2024-06-26 00:44:02 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
2024-06-26 00:43:30 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 255 seconds)
2024-06-26 00:42:11 +0200 <safinaskar> now i'm trying to prove (x + y = y + x) (or something similar) using all this machinery
2024-06-26 00:33:33 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2024-06-26 00:31:40 +0200Foxxer(~Foxxer@152.250.71.122) (Remote host closed the connection)
2024-06-26 00:30:13 +0200Foxxer(~Foxxer@152.250.71.122)
2024-06-26 00:29:56 +0200michalz(~michalz@185.246.207.193) (Quit: ZNC 1.9.0 - https://znc.in)
2024-06-26 00:29:47 +0200Foxxer(~Foxxer@152.250.71.122) (Remote host closed the connection)
2024-06-26 00:29:46 +0200Foxxer(~Foxxer@152.250.71.122)
2024-06-26 00:25:44 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-06-26 00:24:05 +0200sp1ff(~user@c-73-11-70-111.hsd1.wa.comcast.net)