Hey I’m just getting started with Clojure right now and this is awesome!
Ibuprofen is spelled with an “e”, though :)
Aphyr, on
I agree, jarppe. Went back and forth several times on whether it made more sense to introduce the (fun & args) syntax initially–and introduce the concept of evaluation as substitution–or stick with more concrete semantics as in Chapter 2. I… think it paid off; folks seem to be following this path without getting too lost, and it sets the stage for a deeper exploration of substitution later.
Definitely a more abstract path, though. I’m trying to explain the core structure as deeply as possible without getting bogged down, but without losing sight of inductive learners either. We’ll see how it goes. :)
Aphyr, on
Good catch, it is a mistake. Thanks M.
jarppe, on
Hello Kyle,
I really liked you approach where you introduce quoting first, then using quoting introduce a list, and only then calling functions.
I have been giving Clojure introductions and I usually start from literals and simple collections. When I go from vectors to lists I have to introduce quoting and evaluation at the same time and this is usually hard to grasp.
Next I will try to introduce Clojure to my 18 years old daughter and I think I’ll use your blog as starting point. So please continue your excellent blog.
Br, Jarppe
Andreas, on
Hi Kyle,
the goals of this introduction you’re mentioning are just wonderful.
I have nothing than deep respect for your openness, encouragement and your profound technical skills! Please, just keep walking this path.
Best,
Andreas
M, on
user=> ‘(1 (2 (3 ()))
(1 (2 (3)))
is this a mistake?
epyf, on
Well, women, LGBT and people of color can always take classes on Coursera.
The quality there is high too, and they won’t get the impression of being “people with special teaching ”. Or flagships - want it or not.
I do understand that the tutorial is aimed at just anybody, but this is really the feeling I get when I read that paragraph (but I’m white and straight, that may be the reason)
epyf, on
Well, women, LGBT and people of color can always take classes on Coursera.
The quality there is high too, and they won’t get the impression of being “people with special teaching ”. Or flagships - want it or not.
I do understand that the tutorial is aimed at just anybody, but this is really the feeling I get when I read that paragraph (but I’m white and straight, that may be the reason)
Johnny Chang, on
@Tim Condit, ‘or’ returns the last negative value if there are no positive values, I believe.
I love this series. Written engagingly, fun to read, and organized really well. Looking forward to the next one!
Mark Wotton, on
Nice tute - but isn’t it a read-Eval-print-loop, not execute?
Branden Rolston, on
^ TIm:
“or” will return the last value in the list if no preceding values are logically true.
Loving this and thanks for the encouraging intro ( i am gay), just reading the “Clojure data analisys cookbook” and this will help me to go trough the chapters.
Tim Condit, on
Ah. The result is nil, meaning there were no positive values in the list being evaluated. Never mind. :)
Kasim, on
Hi,
Great post and keep up the good work. I’d be happy to help with reviewing codes and such before you publish.
I don’t understand the statement and result that ‘or’ returns the first positive value.
user=> (or false nil)
nil
Earlier you showed that the only negative values are false and nil.
Great stuff so far! I’m looking forward to more.
Rick James, on
The whole white knight paragraph was horrible. Nobody thinks you’re a great guy because you did that. You’re just an asshole.
Kevin Whitefoot, on
This is a nice gentle introduction. I would like to take issue with one thing, something that annoys me often: -263 is not the smallest possible Long, it is the most negative. The comparison operators do not test for size but for order.
It might sound like nit-picking but I encountered a bug quite recently that hinged on this distinction where a function was rounding a number and the comments said that the result would always be greater than or equal to the input when what the code actually did was to ensure that the result was never more negative than the input. This was in VB.Net but the principle is the same for all the languages with which I am familiar. Documentation for all the languages I know use greater and less than in this jargon way which misleads people when they apply code to the real world (I write simulation software).
Aahz, on
It’s not really clear who this is aimed at. For example, I got here
through a feed thingie (DuckDuckGo on Android) and had no idea what
exactly Clojure was until I saw the magic word “LISP”. Might be a good
idea to at least link to something.
ScientificCoder, on
Nice !
I’ll be sure to point newcomers to your site.
Kuddos and keep them coming ! ☺
Cheers.
JD, on
I’m definitely following these posts.
Thank you! :)
alex, on
I have to make a comment entirely unrelated to your post - I love your blog design and layout. It is great. The comments, the terminal CSS, etc. great job.
Johnny Chang, on
Awesome! Eagerly awaiting the next installment!
na, on
Seriously? LISP? Haven’t we learned?
Apparently you haven’t
Agreed.
Peter, on
Seriously? LISP? Haven’t we learned?
Apparently you haven’t
BR, on
Seriously? LISP? Haven’t we learned?
david karapetyan, on
Looking forward to what’s next.
svankie, on
Loving this.
Vasudev Ram, on
Nice idea, Kyle.
Tanios, on
What is CP system and AP system?
Aphyr, on
nice read but riak doesn’t use timestamps, if my memory serves me correct
Riak has two modes; the default (which will change in the next release) is to use last-write-wins, which ignores vclock information in favor of timestamps. If you use allow-mult instead, (which I absolutely recommend ;-)), Riak does use logical clocks. See http://aphyr.com/posts/285-call-me-maybe-riak for more details.
yeah thx for this openess.
really nice introduction, thx!
Hey I’m just getting started with Clojure right now and this is awesome!
Ibuprofen is spelled with an “e”, though :)
I agree, jarppe. Went back and forth several times on whether it made more sense to introduce the (fun & args) syntax initially–and introduce the concept of evaluation as substitution–or stick with more concrete semantics as in Chapter 2. I… think it paid off; folks seem to be following this path without getting too lost, and it sets the stage for a deeper exploration of substitution later.
Definitely a more abstract path, though. I’m trying to explain the core structure as deeply as possible without getting bogged down, but without losing sight of inductive learners either. We’ll see how it goes. :)
Good catch, it is a mistake. Thanks M.
Hello Kyle,
I really liked you approach where you introduce quoting first, then using quoting introduce a list, and only then calling functions.
I have been giving Clojure introductions and I usually start from literals and simple collections. When I go from vectors to lists I have to introduce quoting and evaluation at the same time and this is usually hard to grasp.
Next I will try to introduce Clojure to my 18 years old daughter and I think I’ll use your blog as starting point. So please continue your excellent blog.
Br, Jarppe
Hi Kyle,
the goals of this introduction you’re mentioning are just wonderful. I have nothing than deep respect for your openness, encouragement and your profound technical skills! Please, just keep walking this path.
Best, Andreas
user=> ‘(1 (2 (3 ())) (1 (2 (3)))
is this a mistake?
Well, women, LGBT and people of color can always take classes on Coursera. The quality there is high too, and they won’t get the impression of being “people with special teaching ”. Or flagships - want it or not.
I do understand that the tutorial is aimed at just anybody, but this is really the feeling I get when I read that paragraph (but I’m white and straight, that may be the reason)
Well, women, LGBT and people of color can always take classes on Coursera. The quality there is high too, and they won’t get the impression of being “people with special teaching ”. Or flagships - want it or not.
I do understand that the tutorial is aimed at just anybody, but this is really the feeling I get when I read that paragraph (but I’m white and straight, that may be the reason)
@Tim Condit, ‘or’ returns the last negative value if there are no positive values, I believe.
I love this series. Written engagingly, fun to read, and organized really well. Looking forward to the next one!
Nice tute - but isn’t it a read-Eval-print-loop, not execute?
^ TIm:
“or” will return the last value in the list if no preceding values are logically true.
http://clojuredocs.org/clojure_core/clojure.core/or
Loving this and thanks for the encouraging intro ( i am gay), just reading the “Clojure data analisys cookbook” and this will help me to go trough the chapters.
Ah. The result is nil, meaning there were no positive values in the list being evaluated. Never mind. :)
Hi,
Great post and keep up the good work. I’d be happy to help with reviewing codes and such before you publish.
Just let you know we are hiring Clojure developers. Come check us out: http://staplesinnovationlab.com/
I don’t understand the statement and result that ‘or’ returns the first positive value.
user=> (or false nil) nil
Earlier you showed that the only negative values are false and nil.
Great stuff so far! I’m looking forward to more.
The whole white knight paragraph was horrible. Nobody thinks you’re a great guy because you did that. You’re just an asshole.
This is a nice gentle introduction. I would like to take issue with one thing, something that annoys me often: -263 is not the smallest possible Long, it is the most negative. The comparison operators do not test for size but for order.
It might sound like nit-picking but I encountered a bug quite recently that hinged on this distinction where a function was rounding a number and the comments said that the result would always be greater than or equal to the input when what the code actually did was to ensure that the result was never more negative than the input. This was in VB.Net but the principle is the same for all the languages with which I am familiar. Documentation for all the languages I know use greater and less than in this jargon way which misleads people when they apply code to the real world (I write simulation software).
It’s not really clear who this is aimed at. For example, I got here through a feed thingie (DuckDuckGo on Android) and had no idea what exactly Clojure was until I saw the magic word “LISP”. Might be a good idea to at least link to something.
Nice ! I’ll be sure to point newcomers to your site. Kuddos and keep them coming ! ☺
Cheers.
I’m definitely following these posts.
Thank you! :)
I have to make a comment entirely unrelated to your post - I love your blog design and layout. It is great. The comments, the terminal CSS, etc. great job.
Awesome! Eagerly awaiting the next installment!
Agreed.
Apparently you haven’t
Seriously? LISP? Haven’t we learned?
Looking forward to what’s next.
Loving this.
Nice idea, Kyle.
What is CP system and AP system?
Riak has two modes; the default (which will change in the next release) is to use last-write-wins, which ignores vclock information in favor of timestamps. If you use allow-mult instead, (which I absolutely recommend ;-)), Riak does use logical clocks. See http://aphyr.com/posts/285-call-me-maybe-riak for more details.