top | item 7686472

(no title)

w01fe | 12 years ago

Also perhaps interesting for comparison, a Clojure library called Vertigo that emulates C structs with high performance on top of byte buffers:

https://github.com/ztellman/vertigo

discuss

order

lispm|12 years ago

Also perhaps interesting for comparison, a 1981 Lisp Machine library called DEFSTORAGE provides structures on memory, based on a similar feature of PL/1. For example used in the Lisp Machine file system. Example from Symbolics Genera:

    (defstorage (file-header)
      (version		fixnum)
      (logical-size		fixnum-bytes 2)
      (bootload-generation  fixnum)				;for validating
      (version-in-bootload  fixnum)				;used in above

      (number-of-elements	fixnum-bytes 2)			;for later expansion
      (ignore mod word)

      (* union
        (parts-array array 8 fh-element)
        (parts being fh-element				;and/or reformatting
               fh-header						;this header itself
               info						;header-resident info
               header-fm						;file map of header
               dire						;directory-entry-info
               property-list
               file-map
               pad-area						;many natures of obsolescence
               pad2-area)))

taeric|12 years ago

Another borderline insane example of how richly lisp can be extended. That is crazy.