This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (33)
- # boot (58)
- # cider (21)
- # cljs-dev (197)
- # cljsrn (112)
- # clojure (136)
- # clojure-belgium (5)
- # clojure-dev (57)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (6)
- # clojure-spec (148)
- # clojure-uk (54)
- # clojurescript (29)
- # cursive (24)
- # datomic (36)
- # devops (4)
- # emacs (11)
- # figwheel (1)
- # graphql (18)
- # hoplon (6)
- # leiningen (2)
- # luminus (4)
- # off-topic (7)
- # om (4)
- # onyx (27)
- # precept (1)
- # protorepl (12)
- # quil (1)
- # re-frame (28)
- # reagent (10)
- # ring (9)
- # robots (1)
- # rum (2)
- # slack-help (5)
- # spacemacs (16)
- # sql (16)
- # untangled (16)
- # vim (3)
- # yada (2)
On the subject of do's and don'ts for Clojure, I'd really like to see more material describing (and forgive me for using this term as short hand) "best practices". Specifically, I see huge variation in the way Clojure is structured in the micro and the macro. One of the huge advantages with Clojure is the speed with which it can be used to explore a problem. However, I believe we pay the price in the fact that the characteristics that make Clojure a powerful exploratory/new development tool (dynamic typing, terseness, meta programming) also tend to lead to a lot of variation in the way code is structured and the cues we use to scan code (especially determining what inputs and outputs look like). As we tend to spend approximately 80% of our time reading and understanding code we should really spend more time optimizing for maintenance. This is also why I take the deeply unpopular view that Frameworks are not evil and certainly give that consistency. Spring and Rails have their issues but you can get an awful lot of sh*t done with them over a long period of time once you learn the idioms. We should spend more time giving higher level idioms for how to structure Clojure and, even more so, Clojurescript. To that effect, I'd like to see more material like "Clojure Applied". Phew, that's a lot to type on my phone!
just realiser that Carin Meier is this week in Rotterdam for Joy of Coding... and I should have gotten a copy of living Clojure for her to sign!
Good to see Clojure Applied being mentioned here. I was literally looking at it yesterday after reading another thread on books for Clojure newbies and thought it looks like a good companion to Living Clojure which I got for Christmas
@seancorfield shared this on another slack group I'm on and I thought it made some interesting points so re-sharing here 🙂 https://blog.bradfieldcs.com/in-2017-learn-every-language-59b11f68eee
Although, coming in a C → Python → Clojure direction, I feel like that has captured most paradigms. Particularly as Clojure has good OO, and I've been able to use Datalog a lot (declarative). Though I'd like to do more declarative.
type-classes as a macro - my current fave example of the sort of new stuff you can do when you mix up some of those paradigms in new ways (in this case - syntactic abstraction of lisps, functional abstraction, static typing) - https://github.com/LuxLang/lux/blob/master/stdlib/source/lux/type/auto.lux#L308
A language that captures side effects in the type system is worth learning too I’d say
@agile_geek in some ways I think clojure is a framework (as far as lisps go) in that if you so things that look like seqs and maps then everything works really well. Stray from that and you end up building a lot yourself.
Hello everyone... Anyone in the vague vicinity of Chancery Lane -> Liverpool Street and fancy getting lunch?
The usual amount of time (1hr 15min flight), sadly we took off a little over 3 hours late, so I could only get to my accommodation in a reasonable timeframe by hopping in an Über
Still good trip, all things considered and I am off to Stanstead later - should be home at around 2200h as long as there are no delays.
@thomas I think a lot of people assume learning other languages takes more time than it actually does -- have you tried the Seven Languages in Seven Weeks books? I found I could work through those, an hour or two a night while watching 📺 with my wife. Took longer than seven weeks but it wasn't a huge burden.
And they pick a really good spread of paradigms across the two books. Four months of an hour or two here and there and that's thirteen languages covering nearly all the main types of languages! Clojure crops up twice (once for the language itself, and again for mini-Kanren).
I like that they do "uncourses" for minikanren via hangouts and post the links afterwards. This is a really neat approach https://www.youtube.com/playlist?list=PLO4TbomOdn2cks2n5PvifialL8kQwt0aW
@thomas - Hi (been getting to the airport)... Yeah, it's a lot of flying, but barring emergencies I'm only doing the trip one more time before the end of the summer, so it's not so bad... 🙂
I think that the more languages you learn, the easier it is to learn more languages.
and some languages have an outsized effect on your future language comprehension abilities, so you should deliberately pick those languages to learn
@mccraigmccraig Definitely! I tend to advise folks learn a handful of “really different” languages first, even if they never program in them later. I always used to suggest APL, Haskell, and Prolog. But APL has become harder and harder to actually practice (given all the symbols) and I think J just looks like line noise so I’m not sure what to recommend there.
But as Thomas says, it's a matter of finding time. I've got that talk I've volunteered myself for which is a Clojure learning experience, and I've got some moonlighting I need to do inbetween which "complicates" my evening schedule
But at least you’re on the path… and the conference talk will ensure you learn enough Clojure to be dangerous 🙂
Also, a Lisp of some flavor (so many to choose from — but I’d definitely recommend Clojure these days).
What’s this doing
(potemkin/import-vars [clj-ssh.ssh connected? connect disconnect]) above and beyond what
:refer would do?
This is why I am (slowly) learning Elixir alongside attempting to ascend to "competent" with Clojure 😉
@mattford the imported vars will appear def'd in the namespace, so referenceable from other ns ... a :refer makes the name usable within the namespace but not referenceable from elsewhere
Warning: Potemkin does “magic” and can cause all sorts of compatibility problems with some other libraries 🙂
oh - i haven't had any of those problems - i've found potemkin to be quite useful for structuring apis
@mccraigmccraig I don’t recall specifics — just that I’ve seen several people warn others off using it (and I have run into problems with Potemkin when it’s been pulled in as a transitive dependency… I think I just solved it by switching to a library that didn’t use Potemkin).
That said, we’re using
clj-http 3.4.1 and that pulls in Potemkin 0.4.3 and we’re OK at the moment…
us too - we're using aleph and a few other libs which pull in potemkin 0.4.3, and our stuff uses it in a few places - i've not seen any problems
it doesn't seem to do anything very magical either - https://github.com/ztellman/potemkin/blob/master/src/potemkin/namespaces.clj#L11
creates a new var with the same content and a copy of the metadata of the original var... plus a watch on the original var so that changes are reflected to the new var