Hi Corey, On Thu 01 Apr 2010 18:39, Corey Thomasson <[email protected]> writes:
> I'm new to scheme/guile, but I got tired of writing web pages in > php/html and started poking around my shared hosts /bin. Turns out > guile 1.8 is installed, so I got to hacking. > > I couldn't find any json parsers that worked with guile, so I hacked > on together. > > I don't know if it works with 1.9x, or how it could be improved > (though I'm positive it could), or how unidiomatic it is, so any > comment/advice/criticism/ridicule is welcome. > > http://github.com/cthom06/guile-json Interesting stuff :) Some comments: * Indentation is non-standard; you should read http://mumble.net/~campbell/scheme/style.txt. It's a bit curmudgeonly, but correct. * Alists would be better for objects, I think, as it's a serializable data structure; obviously some form of serializable map would be better, if Guile had them ;) * Use #:use-module and #:export clauses in your define-module forms. * In fact a number of your let statements have bad syntax; apologies that guile 1.8 didn't catch this for you (it would have if the code were executed). 2.0 would have caught it at expansion time. There are a few more things. If we were to include this in Guile 2.0 we'd probably use an expansion-time parser/lexer generator, perhaps via PEG. Happy hacking, Andy -- http://wingolog.org/
