Fork me on GitHub

hey peeps


I've been doing a lot of Elm lately and absolutely love ML, and then I forget about the fact that I also did Clojure at one stage, so alas here I am


and already just seeing the amount of parenthesis is driving me nuts lol


((((("well")))) (((("it")))) (((("is")))) (((("good")))) (((("to")))) (((("have")))) (((("you")))) (((("here")))))


Quote from the movie the Blues Brothers, after being shown a dirt-cheap apartment in Chicago, where the elevated train runs about 10 feet from their window, very loudly. "How often does that train go by?" Landlord: "So often you won't even notice."


I only notice them when they don't seem to be balanced properly.


I just wonder if lisp macro is better than the static typing and conciseness of ML


having done Elm, I would have to say it's been the most positive experience I've had in terms of functional languages


Elixir comes a close second (in terms of backend)


but everytime I've dabbled in Clojure/Clojurescript it hasn't quite been as smooth


especially Clojurescript, where a lot of libraries no longer seem to be maintained


so I'm trying to figure out where Clojure would fit in


well feel free to ask any questions. it may not be for you but if you give it a good go i think you'll find things that you quite like about it


@julius_dott FWIW, we tried ClojureScript at work about three years ago and the ecosystem had a lot of rough edges and seemed to be moving very, very fast. We decided to give up on ClojureScript at the time (we may yet revisit it in the future). OTOH, we have been happily using Clojure in production for nearly seven years now.


@julius_dott I couldn’t deal with elm because of the interop story. React has a huge ecosystem of sophisticated libraries and you really want to be able to use them without a day-long project. ReasonML is cute but it seems to me like its basically an internal facebook tool and nowhere near prime time. So far for me clojurescript has just worked, even though some of the tooling and setup has been a pain. Libraries tend to be pretty stable and I find myself able to read the source already much better, even though I have just weeks in clojurescript vs years in javascript.


Also: a lot of libraries appear unmaintained because of clojure’s habit of using version numbers that asymptotically approach 1.0 even on very stable and actively maintained libraries that have been production worth for years. But even truly abandoned projects are less scary than in javascript because the language and ecosystem do not change out from underneath you every 6 months. Javascript’s always changing dev stack creates a bit of ptsd. But yea I get your concern that the ecosystem seems to have some quiet corners.

Alex H07:01:56

what annoys me generally is that people assume a library is no longer maintained because it doesn't have recent commits. Often enough it's just the case that the library is stable, and there isn't any real work to be done.

Drew Verlee14:01:27

In general, I usually assume that if there aren’t a pile of open, un-responded to issues, that its working just fine for its intended use. Does that strategy make sense?

Alex H07:01:25

a case of: it does what it says on the tin


Is there a key in CIDER that will do cider-eval-defun-at-point and move the point to the next top-level sexp? Coming from a Jupyter background, this seems like a very useful thing to do.


i don't believe that there is. however, C-M-e is end-of-defun so you could make your own function that you invoke that is essentially cider-eval-defun-at-point and then end-of-defun forward-sexp


@julius_dott I’ve just been trying dabble in Elm some and have had the opposite experience: I’m constantly struggling with which direction functions and operators evaluate (so I fill my code with parentheses just to know what’s happening), and I struggle with “reading” what are functions and what are arguments etc. Clojure’s syntax is just so clear!


personally, I’m in love with ReasonML right now but I convinced my team at work to do clojure + clojurescript with me 😄




Can cider be used without lein or boot and just the new clj?


@lockdown- Any reason why you want to use it without lein or boot? Just wondering


for non project centric stuff, I hear it may be faster to start too


no you can’t use cider with clj


you can use inf-clojure tho


How do i insert data using clj-jdbc? i found (j/insert! db-spec :fruit {:name "Pear" :appearance "green" :cost 99}) i have uuid in my example and it gives me errors do i need explicitly to convert uuid or insert! doesn't work with java uuids? is there a way for me to write statement which looks more like plain old SQL? insert into fruits (name, appearance) values( ? ?) (Pear, green) and it does validation to stop sql injection?


there are a few layers that do mappings between jvm types and sql times, the most important being the jdbc drivers themselves, but most clojure jdbc libraries provide some facility for it as well


if whatever sql db you are using has a uuid type I would be surprised if the jdbc driver didn't map java.util.UUIDs to that


I haven't seen a library called "clj-jdbc", but I have used a fair bit


there is also a #sql channel