Fork me on GitHub

@tbaldridge thanks, do you have other suggestions written up else? I see you have a profiling video so will check that out in the meantime!


@tbaldridge Thanks, I've moved to an unordered pipeline and that seems to have done the trick.


what does “unordered pipeline” mean in this context? pipeline-async?


Am I understanding :require correctly here: (:require [clojure.browser.repl :as repl]) means I am using the clojure.browser.repl library in it's entirety, aliased as repl (:require [cljs.core.async :refer [<!]]) means I am using asynchronous take (`<!`) from within cljs.core.async without requiring the entire cljs.core.async library. Is this correct?


the first one is just aliasing the namespace, the second one is importing a specific function from the namespace


How does something like (:require [clojure.some.namespace :refer :all]) differ?


it differs because it's putting all the function of that namespace in the current file


if you know python, it's like *


from clojure.some.namespace import *


Okay, so if I'm using the alias :as form, this is calling functions from within the original namespace, whereas :refer :all imports all those functions into my current namespace and I can reference them directly as if they'd been defined within my namespace?


e.g. repl.somefunction vs somefunction


=> (:require [clojure.string :as s])
=> s/split

=> (:require [clojure.string :refer [split]])
=> split

=> (:require [clojure.string :refer :all])
=> split


the 2nd one can only call split from the clojure.string namespace, because that's what it only referred the 3rd one can call all the keywords (whre split also comes from) of the clojure.string, because it referred all of its keywords


Perfect. Thanks @ejelome :thumbsup:


@yogidevbear use the first two though if you can, :refer :all can make code harder to read, since you have no clue where a given symbol is imported from.


about the only time I use it is when I'm testing [clojure.test :refer :all]


Will do. I remember seeing it in Living Clojure (which I'm working through at the moment) and just wanted to make sure I grokked the differences


hello, i’m wondering what folks in this channel recommend in the way of resources to introduce someone to programming generally and to programming in clojure in particular


i was thinking that The Little Schemer might be a good first book since it seems to be good at introducing the habits of thinking of programming


but i’d love to know what else the community likes


tbh I think clojure might be tough for someones first intro to programming


I’d start with some Ruby or Python thing for beginners


@seako I've heard good things about The Little Schemer, another option would be SICP (also teaches Scheme)


I suggest HtDP


I think FP in general maybe harder to grasp if you have years of OOP behind you. But if your mind is free I guess it would be easier to start with clojure. That said, why should it be easy in general? Programming can make a rocket fly to the moon, I dont see how that should be easy 😉


^ right, I even remembered looking for variable when I started learning Lisp, fun times 😄


yeah, there is just so much that is different from “regular” programming that it might just confuse a beginner


when you are learning, I think you should just focus on trying out stuff and not care too much about best practices


that's true, by experience, I actually learn faster and understand better if I build something that interests me, than mere following tuts


@ejelome that’s How to Design Programs, right? i’ve never read it but i like that it’s from one of the authors of the Little books. kind of fun that they start you out with an algebra of pictures. very different from the usual introduction.


yes, same author, but I think the main goal of his books is geared towards how to solve problems (how to think), rather than teaching you how to code; and as I have not come from a compsci background but merely a self taught individual, I find that I'm going into that direction, how wonderful if a newbie will start from that actual point I will go into, after some years of coding, kinda sad for me and ironic to them


thanks all for you input and suggestions