This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (5)
- # beginners (92)
- # cider (37)
- # cljs-dev (38)
- # cljsjs (2)
- # cljsrn (3)
- # clojure (50)
- # clojure-berlin (1)
- # clojure-canada (3)
- # clojure-dusseldorf (4)
- # clojure-france (1)
- # clojure-germany (1)
- # clojure-italy (7)
- # clojure-nl (21)
- # clojure-spec (2)
- # clojure-uk (106)
- # clojurescript (165)
- # code-reviews (1)
- # community-development (3)
- # cursive (5)
- # datomic (13)
- # editors (12)
- # emacs (3)
- # figwheel-main (141)
- # fulcro (28)
- # graphql (1)
- # immutant (1)
- # jobs (1)
- # jobs-discuss (5)
- # midje (8)
- # nrepl (3)
- # off-topic (28)
- # onyx (4)
- # re-frame (21)
- # reagent (70)
- # ring (2)
- # ring-swagger (9)
- # shadow-cljs (18)
- # spacemacs (6)
- # specter (23)
- # tools-deps (21)
not a table, but in the book “Clojure Standard Library” for every discussed function there is a performance considerations paragraph: https://www.manning.com/books/clojure-standard-library
a good place to start :thinking_face: https://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Clojure
Hey all, I've been listening to Rich Hickey's talks and I've been convinced. I want to make a web app with a clojure back end and a clojurescript front end.
I want to have user authentication/authorization and I'd prefer to use a document store like mongodb.
Compojure will likely be part of your app, since it's widely used and you'll find lots of people who know it well enough to answer questions about it. Compojure is just the piece that connects
/some/app/url to the code that's supposed to respond to that URL, so you'll need more than just Compojure.
@lee.justin.m “I’d like to maintain the “looks imperative” style.” Aha! I have been trying to get a Clojurian to admit threading is imperative/procedural! You will be cited in many footnotes to come. 🙂
@hiskennyness well undoubtedly someone will tell me i’m using the word “imperative” wrong. but when my internal model is “do this then that” I want the code to look that way. i think this is why sql of any complexity is very hard to understand.
Yeah, a die-hard Clojurian swore to me that do-this-do-that threading was functional, so yer in trouble. 🙂
the problem is in what is meant by these words. threading still gives you referential transparency (which is functional), but the code is time-ordered (which is imperative, in my mind).
any synchronous code is time-ordered. by that logic
when or even
defn are imperative because you can have multiple sequential statements?
imo threading is just syntax sugar for regular clojure code, syntax sugar can't be imperative or functional, as it does nothing by itself
I agree, but I think
let (as opposed to threading) is a bit more than just syntactic sugar for regular code.
let lets you get away with writing very imperative-styled code though
@vale yes, i do think they are imperative in a sense. any def is imperative since it mutates the global state 🙂
Threading’s excuse is that no new “places” in the sense of named state are introduced. Not buying it,
in my case, I don’t care. but in my original question from yesterday i was trying to use some word to communicate what problem i was trying to solve
maybe I’ll say “time-ordered code” next time because the word “imperative” always draws sharp reactions
i think it’s downright funny that people emoji’d up the “who cares” above because people clearly do care! it always draws a reaction
I don't really get what you mean
time-ordered, but I get what you mean by imperative. It's not like every top-level form executes asynchronously
I guess as-> helps a little. Me, I can never keep straight where the imaginary “place” is in threaded code. No,
,,, was not the answer. 🙂
I mean, who cares that
def is imperative (creating side effects), if it doesn't create problems for you/your program (in contrast with general data structure mutability)
Funny seeing the incredibly conformist Clojure crowd suddenly cheering “Who cares?”
@joelsanchez That’s fine, but if I put a closing parens on its own line I get tarred and feathered. 🙂
I also believe that's poor style but I don't see the connection to the current discussion
Paul Graham illustrates functional code as flowing down and to the right. Lispers “get it”. Clojurians turn it into a thread of steps, losing (to a Lisper) the true functional flow.
let over lambda's author (the book that builds on On Lisp) strongly argues that lisp is not functional (at least common lisp) https://letoverlambda.com/index.cl/guest/chap5.html
Could someone explain to me the situation with Java licensing? Should I try and get openjdk? Currently I'm talking about my laptop/home computer.
CL is a big ball of mud. We do what we want. If we are smart, we code functionally. It is better. But no one collapses in a heap if a SETF comes in handy.
@joelsanchez I would distinguish between functional and immutability. With threading we start with x then create f(x) which becomes x for the next f(x) etc. Each f(x) leaves its x unmutated, but in effect a “temp” var is being created and then re-written at each step.
as-> is explicit about that. Functionally we say “The dog that chased the car that ran the red light”, beginning with the semantic outcome (the dog) then revealing recursively its derivation from inputs. In threading we have, “There was this red light. A car ran it. A dog chased that.” Imperative, step-wise evolution of the semantics.
threadings dont create temp vars, try macroexpanding it to see it...I guess its more of a "mental concept" problem you're talking about
they are also very dumb in the sensw that they dont care what you are threading, as others have noted before
I'd argue against the "rewritten" part regardless - even when you reuse a binding name in let, there's no rewrite in the sequence of operations
@clojurians-slack yep, threading is a functional pipeline, but it is necessarily of functions with one parameter, the result of the prior step. My functional mind works with functions of N parameters, so threads look like strait jackets.
@avovsya openjdk can't hurt. That's always been the first thing I install on a Linux box.
While you all are on this topic. I've been asking around lately... Do you think learning common lisp along with clojure would be confusing. I'm a hobbyists programmer and I've taken a liken to lisp so there are a lot of older texts that I want to go through. I have Paul graham's ansi common lisp and paip. Ive heard good things about LoL but that seems to be a book I need more under my belt for.
I'd say learning scheme and ml would contribute more directly to appreciating clojure
@noisesmith :thinking_face: OK. I've skimmed through sicp. I also wanted to go through the osaki book at some point so I'd expect to have to take a look at ocaml. But why do you say ML over common lisp? Just to experience a purely functional environment?
there's a lot of things that are normal in common lisp that aren't really normal clojure things
So I just switched to Spacemacs. I used Emacs for like a week a few years ago, so I am pretty new to the whole Emacs/Spacemacs thing. I have it installed and set up with the
clojure layer. However, when it comes to the rest of how to use the editor, I'm pretty lost. Any recommendations/links to good tutorials, things to go through? Trying to get up to speed on Spacemacs as fast as I can so I can get back to learning Clojure 🙂 (I also posted this in the #spacemacs channel)
I’m going through this myself really and these have been fairly helpful. But mostly, it’s been pick things up as I need them.
I use lispy/evil-lispy. It kind of adds another mode on top of evil to navigate similar to the built in lispy mode. I use lisp state for certain things but am starting to get used to lispy/evil-lispy
@ryan.russell011 Recommendations? Stop sounding so cheerful and optimistic, you are crossing the River Styx and the boatman does not like you. Abandon most hope. A wise soul once said “It is easier for a good programmer to learn a new language than a new editor,” and Emacs is a lost-in-the-sixties joke. Spacemacs only make it worse with all its opinionation. Get IntelliJ and spend your next night of drinking on Cursive instead. If however you are an RMS-bred Communist refusing to pay for anything other than beer just go with raw Emacs and Cider and paredit. You’ll be fine in a month. hth!
hahaha... well that was an entertaining response. I am wanting to learn Spacemacs for my own personal enjoyment. tbh.. I don't really feel like using IntelliJ for the moment, kind of burned out on it for now. I was using VSCode, but it is still missing things.... and I use Vim for everyday quick editing of config files and such... so figured wth.. might as well learn Spacemacs 🙂 And I am cheerful... I enjoy such things. When I used Emacs for like a week (or two)... I spent like 3 solid days customizing it to what I wanted... started using it for stuff, and ended up in Java where I needed IntelliJ.