This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (5)
- # alda (1)
- # aws-lambda (1)
- # beginners (74)
- # boot (62)
- # cider (29)
- # cljs-dev (36)
- # cljsjs (15)
- # cljsrn (34)
- # clojure (58)
- # clojure-android (3)
- # clojure-austin (15)
- # clojure-austria (11)
- # clojure-dusseldorf (25)
- # clojure-germany (6)
- # clojure-greece (26)
- # clojure-quebec (8)
- # clojure-russia (50)
- # clojure-spec (12)
- # clojure-uk (8)
- # clojurescript (46)
- # core-async (11)
- # cursive (22)
- # datomic (2)
- # devcards (27)
- # dirac (5)
- # hoplon (109)
- # jobs (1)
- # kekkonen (2)
- # lein-figwheel (12)
- # leiningen (2)
- # microservices (1)
- # off-topic (3)
- # om (70)
- # onyx (17)
- # planck (21)
- # re-frame (3)
- # reagent (2)
- # rum (1)
- # spacemacs (12)
- # spirituality-ethics (9)
- # untangled (44)
- # vim (2)
- # yada (8)
rosetta code has a ton of interview questions, some solved in clojure and some not.
@zzamboni: maybe check out http://hackerrank.com. They have a functional programming track that you can do in Clojure
Thanks @dmbennett, @mkaschenko, @yogidevbear - very nice resources! In the meantime I also found https://notamonadtutorial.com/how-to-earn-your-clojure-white-belt-7e7db68a71e5#.59pfu7f8r, which has pointers to most of the above plus some other things
guys, I’m trying to join this wonderful clojure world (I’ve started dirtying my hands last saturday)… and it’s pretty awesome… I’ve started from Brave Clojure and Aphyr - Clojure From ground up… But actually I’m not liking it anymore… because I don’t feel the examples are going to fit the real world, I would like something more enterprise… whole scenarios, not only algorithms… structure full projects, manage db access with connection pool, jdbc, serve and process json, etc… do you suggest me any good content that I can find all of it?
@leo.ribeiro: so Clojure for the Brave and True doesn't go to those things? Hmm.. the only thing that comes to mind for now is getting your hands dirty and starting with a project, maybe using Luminus? It's got some pretty good documentation, and helps you set everything up so you can focus on small parts first.
http://www.clojurebook.com/ is a good book too, but not available online I think. It's got a pretty good balance of language features and real world scenarios.
Building Bulletproof Web Apps in Clojure (something like that) goes through a lot of that. I’m only in the first few chapters so I don’t know if it gets into pooling but it does do database code.
Yeah, @leo.ribeiro the book @jeff.engebretsen mentioned is this one: https://pragprog.com/book/dswdcloj2/web-development-with-clojure-second-edition ---I've been using the beta 2nd edition as reference for basically every question for building my first complicated webapp. It's really good.
@kauko @jeff.engebretsen @meow @meowy — thank you very much guys!!! besides everything, I can feel that this community is pretty awesome!
@gowder: the beta edition covers a full web app? or it’s missing any important part?
@leo.ribeiro: Here are the community docs for using JDBC http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html
There’s a page about connection pooling, with examples for two different libraries.
If you’re willing to invest in more books, you might find Clojure Applied helpful (as well as the already-recommended http://clojurebook.com from O’Reilly).
@leo.ribeiro: it's not missing anything that I can discern! (then again, I'm not an expert, just learning how to do web stuff... maybe ask @yogthos ?)
(also, happy to answer any questions you have about
java.jdbc that don’t seem to be answered by the docs — since I maintain
java.jdbc and wrote most of those docs)
My experience has been when trying to tackle projects like leo.ribeiro is talking about, I was intimidated and hungry for a framework or example that showed how to do all of the things I wanted to do, but when I approached it one bite at a time, (JDBC, HTTP, JavaSockets) I was super amazed with how quickly I got to the meat of productive business problem solving..
@fingertoe: exactly… I’m trying to runaway from frameworks… I would like to just glue the pieces together… what I need? An "http-server" library that can provides and listen a port (I think it’s RING right?), then I would route my request based on the address, or to avoid reinvent the wheel I would use a route for that (compojure), finally I would need a json processor (serialize and deserialize) to understand my requests and also serialize my response… obviously I would need a database behind my processes…
But what I’m going to do now is follow this book that I already bought and saw that it follows the luminus, and after the end of everything I will see what I will need to keep from luminus and what I should remove… because I don’t want templates and probably a bunch of other stuff
@leo.ribeiro: Ring is basically an abstraction for different web servers, comparable to Rack in the Ruby world. It essentially defines how a handler for HTTP requests should look like - handlers are designed to be nestable to allow building middleware - and also brings along some useful handlers of its own. It also abstracts the complexities of HTTP itself into a defined interface. Rack doesn't actually handle requests or define how the server should work, all it defines is how the server and the application code should talk to each other.
A unified layer like this allows application code not to depend on the server and vice versa - you can swap them out.
There are a few servers that implement the Ring interface: ring-jetty-adapter, http-kit, and Immutant, among others.
It's up to you what to use, but personally, I roll with Immutant as it's based on a Java web server library called Undertow, which I have good experience with.
undertow has the best performances overall under this benchmark: http://techempower.com/benchmarks/
For routing, you'd probably use Compojure, though there's a few other libraries available for that task. Depends on your requirements, really. What it essentially does is just to provide you with Ring middleware, that's all - you can compose it with other Ring handlers as you like.
For JSON serialization and deserialization, the go-to solution is Cheshire, which is based on Java's Jackson. It's fast and does what it's supposed to.
Note that Immutant's actually a set of projects, and you can pick and choose which ones you want to use. You don't need to use the caching stuff if you only need the web server, for instance.
Also, if all you want to do is to provide an API and maybe some static pages (i.e. you don't need templating), look into compojure-api.
Also handles request and response serialization and deserialization, so you don't need to care about it.
Actually, typesafe might have the wrong connotation... what I mean is that it uses Schema, which lets you validate your input and output. It's a lot more flexible than type systems.
by the way it’s not just the db library, it happens to the v/required, v/min-count which is from bouncer
Oh, yeah, I had the same problem. Basically, Conman dynamically defines functions at runtime, and Cursive (the IntelliJ IDEA plugin) doesn't know about it. Not sure about Bouncer, though.
@leo.ribeiro: did you refresh the leiningen plugin after adding libs to project.clj? Apart from that @cfleming is very active in #C0744GXCJ and usually has a fast respond time if he is awake.
do you know the exact name of that command in the intellij menu? because I think my shortcut is not working
I’ve refreshed but same problem… anyway I posted into the #C0744GXCJ now I will wait for their response! 😄
Hm, strange, did you check that this function exists with zero arity in the given namespace?
I’ve restarted intellij and created a new projected… the same issue happened with ring.adapter.jetty that I was trying to use...