Fork me on GitHub
#beginners
<
2018-07-21
>
chase-lambert01:07:05

is the clojurebridge curriculum still good for beginners? I noticed the website: http://www.clojurebridge.org/curriculum/ is down but the actual github pages still seem to be up: https://github.com/ClojureBridge/curriculum/blob/gh-pages/outline/intro.md Or would this be outdated if not actively maintained? my impression is clojure seems to have been a pretty stable language but i'm not really at a level to actually be confident in that hunch.

chase-lambert01:07:15

on that note, my library has some clojure books but they are first editions or seem to be over 5 years old. has clojure changed too much to make those books still effective? Or would i still learn a lot going through the older texts.

chase-lambert01:07:23

http://clojurekoans.com seems to be down too. i'm wondering if some of these "learn clojure" guides i'm finding online are no longer accurate and if there is a more update to date approved solution to teach a relative programming newb to start with clojure. i'm doing clojure for the brave and true and then was thinking maybe joy of clojure or living clojure next?

chase-lambert01:07:51

I also have access to Clojure Programming and Programming Clojure if those are more appropriate books to start with after Brave

jonahbenton01:07:13

from a quick look, brave seems a lot deeper than clojurebridge

chase-lambert01:07:36

i'm definitely liking brave but i'm just building a learning path here. i seem to be picking things up slowly in this new programming pursuit but things eventually click. i imagine i'll need more than one beginner source. i'm a book guy so i'm glad it appears there are a few good clojure books out there. just not sure what order to do it all in.

jonahbenton02:07:20

hmm, yeah, that's hard to say out of context; it's probably highly individual. the general quality of clojure books is high, and many are good books in ways that are unusual in the technical book arena, in the sense that there is more of a focus on the why-to, rather than just the how-to, so they reward reading and thinking apart from sitting and doing. that said, the mechanical practice of sitting at the repl and typing in forms- that dialogue, that constructivist, learning-by-doing experience- is not to be undervalued, even if one is a book person. and as a book person- there are also a lot of non-clojure programming books that are very rewarding.

chase-lambert02:07:11

i can dig it. i'm looking forward to SICP. I think that will be a great experience that will help in my general knowledge. But i'm also going to try and make my own small projects too. i imagine that will be one of the most important ways to learn. this clojurebridge thing does seem cool too. I also found this one and it seems like a good little beginner intro: https://aphyr.com/posts/301-clojure-from-the-ground-up-welcome

jonahbenton02:07:11

yes, +100 for aphyr's work.

jonahbenton02:07:54

oh, and it looks like the list of beginner-friendly projects at braveclojure is pretty good: http://open-source.braveclojure.com/

chase-lambert02:07:21

good stuff. thanks

seancorfield02:07:19

@chase-lambert As one of the original ClojureBridge founders I'll observe that the curriculum is designed for a single day workshop so it's deliberately fairly minimal: it's meant to cover the basics for beginners (new-to-Clojure) and get them just far enough to build a simple app at the end of the day.

seancorfield02:07:34

Brave and True is a good book to work through. Living Clojure is another good option for beginners.

chase-lambert02:07:01

yup, i was beginning to get that impression. i'm still looking forward to powering through it over the weekend while i continue through Brave. it's introduced me to Quil which seems really fun and cool so it's been a positive experience already.

chase-lambert02:07:47

my library has the 2nd edition of that Programming Clojure book. I hope that will be fine.

seancorfield02:07:52

One thing to bear in mind about some of the older editions (in your library) is that Clojure's "standard library" went through a massive change between 1.2 and 1.3 so most of the examples in 1.2-based books won't work with "modern Clojure" (for reasons that shouldn't matter to beginners).

chase-lambert02:07:54

good to know. that is what i was looking for. it is good to know the version of clojure to keep an eye out for for these older resources. anything 1.3 and newer should be ok

seancorfield02:07:36

https://pragprog.com/titles/shcloj2/programming-clojure is written for 1.3 so it should be OK but some things may have changed since then. Take a look at https://github.com/clojure/clojure/blob/master/changes.md to see what's changed across the various versions...

seancorfield02:07:28

1.5 introduced cond-> and as-> which I think are very useful (I use mapv and reduce-kv quite a bit too, from 1.4). 1.7 introduced transducers. 1.9 introduced clojure.spec and better support for (and encouragement to use) namespaced keys in maps.

seancorfield02:07:46

Some people will highlight different "important" additions since 1.3 but those would be mine.

chase-lambert02:07:16

good stuff. i'll use what's available to the best of my ability and if not...i'll be here chatting with you fine folks. haha. thanks for all the info, i have to head out now.

chase-lambert16:07:14

a few tutorials have me making a string that shows quotation marks like this: (str "\" Here is how you include quotation marks in your string\"") but the backslash keeps pulling through to the output string. what am i doing wrong here?

mark54016:07:41

I think the \ is shown in the repl output, but it's not actually in the string

jonahbenton17:07:55

yes, though there is a lispy concept here that is worth pointing out

jonahbenton17:07:54

try: (def s "\"i am groot\"")

jonahbenton17:07:18

then compare (pr s) and (print s)

jonahbenton17:07:00

and check (doc pr) and (doc print)

jonahbenton17:07:57

in lisps there is a duality between the "reader" and the "printer". the reader takes bytes from a stream and turns them into data. the printer takes data and renders it as bytes on a stream.

jonahbenton17:07:31

what the one produces has to be consumable by the other

jonahbenton17:07:03

it can seem trivial but it's part of the basis for one of the major distinctions, in evolutionary tree terms, between lisps and non-lisp languages. code is "evaluated" data, which is produced by a reader from a stream. hence the "read-eval-print-loop" or repl

mark54017:07:40

nice, thanks

chase-lambert19:07:10

interesting. is this one of those things that people talk about how with lisp it will just click one day and you reach enlightenment? hahaha.

chase-lambert19:07:12

and that whole (doc function) thing is super helpful!

jonahbenton19:07:48

lol, yes, "enlightenment" might be going to far, but as one works through at one level of abstraction, sometimes one gets glimpses of the layer and reasoning below, and can see the shape and consistency and implications of the lower level model, which then explains higher level phenomena- there is perhaps more of this in lisps in general than in other languages. this is not at all necessary for a language to be successful- php in particular is something of an archeological dig, with different civilizations that had different values still manifest at the highest levels- but it does provide a different tenor to the development of mastery. sometimes knowing a thing is more about knowing the exceptional cases, and sometimes knowing a thing is more about knowing the principles

chase-lambert19:07:13

i like it. i'm still not able to quite wrap my head around this but i'm staying patient. so many things returning a value and nil at the same time isn't clicking but i'm not even halfway through my first clojure book. is it something to do with cons and how it is a value and a nil and then those just keep getting nested together?

jonahbenton19:07:42

ah, what's the specific reference? a cons cell?

chase-lambert19:07:26

i couldn't even tell you, sorry. i think i was browsing through land of lisp one day and it was talking about cons cells being nested together and how that formed a lot of the foundation behind lisp. and the cons cells themselves always had a value (or list?) and a nil. i'm making it all up by this point though. sorry

jonahbenton19:07:29

no, no i gotcha. my advice would be- ignore/forget about "cons cells." the language common lisp- is a lisp, but is also- like php above- an archeological accretion of features, a number of which date to times in computing that are no longer relevant. cons cells are an implementation detail in that category. the analogue in clojure to the narrative in common lisp literature that starts with cons cells is the distinction between lists and vectors. this distinction has to do with the way computer memory works. that's a better/more relevant thing to puzzle over and think about.

chase-lambert20:07:19

gotcha. i just covered the vectors, lists, and sets intro in Brave. i'll keep that in mind as i go along.

jonahbenton20:07:29

a somewhat off-the-trail/digression about memory and cpus that may be fun/interesting or may be confusing is this interactive site about an old chip: https://skilldrick.github.io/easy6502/. i'm personally a fan of the 6502 as a teaching/learning device- the very literal way in which instructions and memory work is very concrete and can be useful in thinking about higher level data concepts like vectors vs lists, and what nil means, and others

chase-lambert20:07:13

i'll bookmark it. its funny, that is the second reference to 6502 in as many days. what a weird coincidence.

seancorfield20:07:51

The 6502 was a great chip. Writing an emulator for it is a fun exercise when really trying to learn a new language in depth.

seancorfield20:07:20

It's particularly challenging to write an emulator in a functional language, avoiding mutable data 😄

sb18:07:08

Hello, I try to switch to emacs. I see few good thing vs Intellij/Cursive. I can switch to namespace with C-c M-n (cider) but how to load automatically the namespace content in repl? (eg. vars or functions)

sb18:07:51

Just with C-c M-e, send to repl?

michael.gaare18:07:51

C-c C-k will compile the namespace

michael.gaare18:07:11

Rather, the contents of current buffer

dpsutton18:07:15

C-u C-c M-z will load the code and set the namespace. C-c C-k will just load the buffer. If you are using helm it should list all the cider commands to aid in discover ability

sb04:07:40

Thanks!! :+1:

dpsutton18:07:26

And there's the manual which is extensive and helpful

sb05:07:14

I know, I read. I watch tutorials (Purely., LamdbaIsland.. Youtube.. etc) Now again and again.. but I didn’t find this. Thanks again!

tkjone19:07:18

I followed along with https://clojure.org/guides/deps_and_cli#_using_local_libraries to setup a small CLJS monorepo (app + ui library). My question is, is it possible to setup deps.edn so that when I make changes to the library, I can consume those changes without killing my current process and re-running the app? I am thinking something along the lines of lein checkouts