News for hackers. Stuff that matters.
Re:Not Lisp again (2009) by emsy on Tuesday May 02, 2017 @12:51PM (#14248070)
For me it's not the paranthesis, but that Lisp posts always show low level code. At least half of my programming is tying together high level services and libraries. I know how I can express those concepts succinctly in Java, C++, JS, Swift etc. I'd love to see some examples of Lisp for something like a REST controller, where I call services, repositories etc.
Re:Not Lisp again (2009) by chimeracoder on Tuesday May 02, 2017 @02:04PM (#14248878)
> At least half of my programming is tying together high level services and libraries. I know how I can express those concepts succinctly in Java, C++, JS, Swift etc. I'd love to see some examples of Lisp for something like a REST controller, where I call services, repositories etc.

You should look at Racket. Racket is a Scheme-like[0] Lisp that aims to be "batteries-included". It includes things like a web-server out-of-the-box.

[0] it is technically a hybrid of R5RS and R6RS, so pedants can argue over whether it is really "a Scheme" or not.

Re:Not Lisp again (2009) by klibertp on Tuesday May 02, 2017 @02:22PM (#14249079)
> whether it is really "a Scheme" or not

It's not and it's not about being pedantic. Racket changed its name nearly a decade ago and, at that point, it already wasn't Scheme either.

I have a post about where Racket (and Clojure) come from: https://klibert.pl/posts/clojure_and_racket_history.html

Re:Not Lisp again (2009) by klibertp on Tuesday May 02, 2017 @02:19PM (#14249048)
> I'd love to see some examples of Lisp for something like a REST controller, where I call services, repositories etc.

Not exactly what you're looking for, but take a look at my post: https://klibert.pl/posts/racket_quickie.html

It shows a little JSON-based REST service which stores a list of messages and allows listing them and adding to them. With more URLs you'd likely use something like this: http://docs.racket-lang.org/web-server/dispatch.html for dispatch, instead of hand-coded function.

It's notable for only using stdlib, no additional packages (beyond purely syntactic, Clojure-like, `~>` support).

To be honest, the APIs exposed in the stdlib feel kind of awkward - like using SimpleHTTPServer in Python. Still, it's just a couple of lines and easy (automatic, in this example) in-process concurrency is not bad.

Re:Not Lisp again (2009) by cygned on Tuesday May 02, 2017 @02:28PM (#14249143)
I have written an example web application for my cloud computing lecture. The code is not pretty nor 100% functionally and there are some bugs, but it shows how my applications work. It's just for demonstration purposes and therefore kept simple.

https://github.com/dak0rn/Zwitscher

Feel free to shout me questions or remarks.

Edit: Here's a simple endpoint that uses a service which then works with the database;

https://github.com/dak0rn/Zwitscher/blob/master/src/zwitsche...