Re: bug#11198: prefab structs in guile

2012-07-05 Thread Thien-Thi Nguyen
() Andy Wingo wi...@pobox.com () Thu, 05 Jul 2012 10:00:17 +0200 For more details, see: [...] See also (info (elisp) Byte Packing) which describes Emacs' bindat.el. The context there is network protocols, but the design requirements are the same.

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Andy Wingo
On Thu 05 Jul 2012 15:42, Thien-Thi Nguyen t...@gnuvola.org writes: See also (info (elisp) Byte Packing) which describes Emacs' bindat.el. The context there is network protocols, but the design requirements are the same. Interesting. The use cases are a bit different though; much of bindat

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Ludovic Courtès
Hello, Andy Wingo wi...@pobox.com skribis: Then you would modify the reader to call out to (ice-9 prefab) with the list after #s, e.g. the (foo ...) in #s(foo ...). (ice-9 prefab) would return the record, creating the RTD if needed. The problem with this is that one could precisely forge

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Andy Wingo
On Thu 05 Jul 2012 22:57, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com skribis: Then you would modify the reader to call out to (ice-9 prefab) with the list after #s, e.g. the (foo ...) in #s(foo ...). (ice-9 prefab) would return the record, creating the RTD if

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com skribis: Since the expression reader can generate prefab instances, they are useful when convenient serialization is more important than abstraction. Opaque and transparent structures also can be serialized, however, if they are defined with

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Andy Wingo
On Thu 05 Jul 2012 23:55, l...@gnu.org (Ludovic Courtès) writes: So I’d be in the ‘define-serializable-struct’ camp, so to speak. That's a valid position to have in general. I can also imagine cases in which you would choose other things. It's a spectrum. Prefabs raise an number of

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Andy Wingo
On Thu 05 Jul 2012 23:55, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com skribis: Since the expression reader can generate prefab instances, they are useful when convenient serialization is more important than abstraction. Opaque and transparent structures also can

Re: bug#11198: prefab structs in guile

2012-07-05 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com skribis: On Thu 05 Jul 2012 23:55, l...@gnu.org (Ludovic Courtès) writes: So I’d be in the ‘define-serializable-struct’ camp, so to speak. That's a valid position to have in general. I can also imagine cases in which you would choose other things. It's a