* json parser
@ 2010-04-02 1:39 Corey Thomasson
2010-08-28 23:55 ` Andy Wingo
0 siblings, 1 reply; 2+ messages in thread
From: Corey Thomasson @ 2010-04-02 1:39 UTC (permalink / raw)
To: guile-user
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: json parser
2010-04-02 1:39 json parser Corey Thomasson
@ 2010-08-28 23:55 ` Andy Wingo
0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2010-08-28 23:55 UTC (permalink / raw)
To: Corey Thomasson; +Cc: guile-user
Hi Corey,
On Thu 01 Apr 2010 18:39, Corey Thomasson <cthom.lists@gmail.com> 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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-28 23:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 1:39 json parser Corey Thomasson
2010-08-28 23:55 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).