Fork me on GitHub
#beginners
<
2018-01-11
>
julius_dott03:01:06

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

julius_dott03:01:34

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

dpsutton03:01:15

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

andy.fingerhut04:01:33

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."

andy.fingerhut04:01:20

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

julius_dott04:01:44

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

julius_dott04:01:12

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

julius_dott04:01:16

Elixir comes a close second (in terms of backend)

julius_dott04:01:31

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

julius_dott04:01:44

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

julius_dott04:01:00

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

dpsutton05:01:35

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

seancorfield06:01:46

@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.

lee.justin.m07:01:11

@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.

lee.justin.m07:01:45

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.

alex34007: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.

drewverlee14: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?

alex34007:01:25

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

sabbatical201713:01:19

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.

dpsutton14:01:27

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

sabbatical201714:01:06

@dpsutton Thank you!

wmichaelshirk14:01:48

@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!

lilactown17:01:59

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

lockdown-17:01:21

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

admay17:01:40

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

lockdown-17:01:47

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

bronsa17:01:43

no you can’t use cider with clj

bronsa17:01:22

you can use inf-clojure tho

lepistane18:01:47

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?

hiredman18:01:43

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

hiredman18:01:29

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

hiredman18:01:27

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

hiredman18:01:09

there is also a #sql channel