Viewing profile — girvel
girvel
HN member- Joined
- Fri, Jan 31, 2025, 8:41 AM UTC
- HN karma
- 64
- Public activity
- 16 items
- HN profile
- View on Hacker News ↗
About girvel
No profile information was provided.
Recent public activity
-
comment
Comment #49023992
I like writing by hand, but I don’t agree with the logic that it’s good because it recruits more areas of the brain. The less effective the medium is, the more of the brain it will…
-
comment
Comment #48858846
I did not get this argument. Diagrams are nice, and I probably missed something in lisp code (not used to lisp syntax), but I see no argument that Emacs has more service-like inter…
-
comment
Comment #42892079
For example, you want to keep a set of objects -- then the objects themselves would be keys, and values would be true/nil. Or there is a good example in one of ldump's recent issue…
-
comment
Comment #42892045
This is fascinating. I wonder if this issue exists in Lua5.2+, where there is no jit and `load` is able to restrict used environment.
-
comment
Comment #42888346
I looked into it, and Lua allows limiting the environment when `load`ing -- through `env` argument since 5.2 or through setfenv before. I will add a helper function to produce a mi…
-
comment
Comment #42888263
LOVE2D is a great gamedev framework, I can not recommend it enough. It is so pleasant to work with.
-
comment
Comment #42888183
I actually thought the comment was about ldump implementation: it uses %q to serialize strings, and it may not be a reliable way.
-
comment
Comment #42888175
It is intended to be used in cases where you need to store data on a disk or transfer it to another machine -- like in a video game save or a network data exchange
-
comment
Comment #42888147
On my machine it produces an equivalent string, although differently formatted. It seems that ldump preserves all special characters (`"\a\b\f\n\r\t\v\\\"\'"`), although I will nee…
-
comment
Comment #42886786
Oh wow, didn't expect to meet the author, thank you!
-
comment
Comment #42886639
Thank you, it is really nice to hear. Though, I have to give credit to Lua's standard library -- the basic function serialization (without upvalues) is implemented there as `string…
-
comment
Comment #42886622
This is an interesting thought. Currently, it is unsafe and intended to load only the files you trust. I should definitely include a warning into README. Overall, it would be nice …
-
comment
Comment #42886567
Yep, that is correct. I think ldump is able to preserve all upvalues, even on edge cases such as "_ENV" and joined upvalues (multiple functions referencing one upvalue). A closure …
-
comment
Comment #42886523
The function (even a closure) would be fully recreated on deserialization, it is fully safe to save it to disk. It wouldn't preserve reference equality -- it would be a new functio…
-
comment
Comment #42886425
Damn, it really would
-
story
Show HN: Ldump – serialize any Lua data
Some time ago, I was implementing saves for my LOVE2D game. I wanted to do a full dump of the game state -- which included closures (AI), complex graphs, sets with tables as keys a…