Re: Fixing "stringly typed" data structures in Artanis (Was: Learning Guile web. Stuck on returning an image.)

2015-12-10 Thread Nala Ginrut
Actually, all of these issues (better rule parsing, anti SQL-injection...) have been concerning when developing Artanis. And I've prepared something for them in Artanis, but all these new solutions are still premature. It's why I didn't announce them. 1. For better rule parsing In the beginning, I

Re: Learning Guile web. Stuck on returning an image. (Martyn Smith)

2015-12-10 Thread Nala Ginrut
Hi Martyn! I'm very glad to see a new user of Artanis! On Thu, 2015-12-10 at 19:44 +, Martyn Smith wrote: > (use-modules (artanis artanis) > (rnrs io ports)) > > (init-server) > > (get "/image" > (lambda (rc) >(let* ((port (open-file "s.jpg" "r")) >

Re: Fixing "stringly typed" data structures in Artanis

2015-12-10 Thread Mike Gerwitz
On Thu, Dec 10, 2015 at 17:02:52 -0500, Thompson, David wrote: > (match uri (("user" id) (display-user-info id))) I agree with this. I understand where Artanis has derived its conventions from, (e.g. Sinatra/Ruby; Express/Node.js; Symfony/PHP; Spark/Java; and countless others), and how useful

Fixing "stringly typed" data structures in Artanis (Was: Learning Guile web. Stuck on returning an image.)

2015-12-10 Thread Thompson, David
[ Changing the subject for this little rant below ] On Thu, Dec 10, 2015 at 2:44 PM, Martyn Smith wrote: [snip] > (get "/image" > (lambda (rc) >(let* ((port (open-file "s.jpg" "r")) >(bytes (get-bytevector-all port))) > (close-port port) > (response-emit b

Re: Learning Guile web. Stuck on returning an image. (Martyn Smith)

2015-12-10 Thread Martyn Smith
Hi all, Whilst looking around the guile-user area, I noticed an old question I posted with regards to returning an image in GNU Guile Web. Sadly, I did not add closure to this query. As this question comes up on google search I felt I should respond with a solution. I honestly thought I responded