3 ms·
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 libra
by emsy 10y ago
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.
- chimeracoder 10y ago> 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.
- klibertp 10y ago> 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 https://klibert.pl/posts/clojure_and_racket_history.html
- klibertp 10y ago> 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 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 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.
- cygned 10y agoI 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 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/zwitscher/routes/settings.clj https://github.com/dak0rn/Zwitscher/blob/master/src/zwitsche...