Live data from Hacker News

Viewing profile — girvel

girvel

HN member
Joined
Fri, Jan 31, 2025, 8:41 AM UTC
HN karma
64
Public activity
16 items

About girvel

No profile information was provided.

Recent public activity

  1. 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…

  2. 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…

  3. 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…

  4. 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.

  5. 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…

  6. comment
    Comment #42888263

    LOVE2D is a great gamedev framework, I can not recommend it enough. It is so pleasant to work with.

  7. 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.

  8. 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

  9. 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…

  10. comment
    Comment #42886786

    Oh wow, didn't expect to meet the author, thank you!

  11. 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…

  12. 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 …

  13. 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 …

  14. 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…

  15. comment
    Comment #42886425

    Damn, it really would

  16. 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…