Hey,
I was wondering about tail optimization since Clojure is based on the JVM.
So I tried the “transform-all” example on a very big vector and as excepted I got a StackOverflowError.
I’ve since read that “recur” is aimed to circumvent this but I’m still learning about it so I can’t explain any further :)
Maybe that’s something that could interest your readers (or it is mentionned later in the tutorial and haven’t read it yet)
I’ve long been looking for an excuse to try MongoDB, but can never seem to find a compelling excuse to choose it over RavenDB.
ignace, on
->>
(Kyle)
(Awesome)
Ron, on
Great Work. I can tell you it’s not easy to find the clear explanations for a newbie. Most people lose track of what you need to know first when you don’t know. Their stuff is good once your going but it’s a rare teacher who can GET you going so you start to intuit how programming goes. Many THX
misha, on
aphyr,
here is a new challenge,
could you say some reasonable :) words about pg sync replication?
Wow, what a great friend you are. Hope this “landed”.
Two years later, would you change anything here? Add anything?
Felling slightly less Stupid, on
maybe I found the explanation myself: You mention the CAP theorem in the postgres arcticle. The CAP theorem states that it is impossible for a distributed computer system to simultaneously provide consistency, availability and partition tolerance. Hence, a CP system is a system which is consistent and partition tolerant.
Feeling Stupid, on
Hi Kyle,
could you include a link that explains the properties of CP Systems? Is it short for consistent & persistent?
Kevin Burton, on
Stopped reading with the animated gifs . I wonder if it’s because I have ADHD because I just couldn’t get past 1-2 paragraphs.
Maybe this is an accessibility issue.
Weslley, on
Hi, this introduction saved my life in starting to learn Clojure. Congratulations for your effort! Thanks
Eddie Gems, on
It would be great to read about NSQ (http://nsq.io) and Kafka in the same manner :) Great job, thank you!
Justin, on
Thanks for the article! As of 02/2015, is elasticsearch safer to use? One of the bug mentioned has shown a lot of progress (https://github.com/elasticsearch/elasticsearch/issues/2488), but overall wonder what could be the pain points for operating a large ES cloud? Thanks!
todd, on
Sorry for the late post, am new to this having recently added a new tool to the herd, a portable sawmill, as I couldn’t bring myself to burn all of the black walnut, cherry, and red cedar in the burn piles from the development I’m working on. I have a growing inventory of slabs, see the url attached, and am getting ready to make some tables and such. Question - how do you keep the ends from checking? Would sawing off the last 4" where the checks are visible most help or would they just start anew from the new end? p.s. love the table ornaments, particularly the Jack with a single cube ;-}
Luaan, on
Tobi, a better example would be a method with named parameters with default values (of “not set”). With a bit of boilerplate, you get pretty close to the samples in the article:
new MyConfig(priority: 1, mode: SomeEnum, isOk: true)
It still allows you to keep immutable things immutable, it still allows you to let the config (and the config-user) classes handle their jobs rather than pushing it from the outside. And it is strongly and statically typed. Sure, it’s compile-time syntactic sugar, but this article is all about static code - as Aphyr said, you can’t statically verify a config file. XML schema only goes so far. And it’s still rather easy to compose. If you do want to store the config elsewhere, you always have to implement the whole config explicitly, no way to “forget” a setting. Now if only you could have a non-nullable type in C# :D
zerkms, on
where you can just write
Your code is based on the assumption that there are public properties and you know how to initialize them.
Fluent builder separates build process from internal state, your code does the opposite job.
Gregg Williams, on
Many thanks for this article! As an intense dabbler in Clojure (for five years now!), I learned a lot–not least of which was how to read the Java stacktrace (always a source of frustration for me).
This is a magazine-article length post, which of necessity took a long time to write. Thank you for your generosity! This will be a go-to article for many Clojure learners.
tobi, on
The fluent builder pattern is especially harmful in C# where you can just write
new MyConfig() { A = 1, B = "2", ... }
The builder adds nothing but takes away. It also is harder to explain.
Yohan Launay, on
I’d say the main issue with using maps is refactoring. If you know that you are refactoring your code very often, it becomes very tedious to track which piece of code uses what when you have map-based constructors all over the place. It is also much harder for autocompletion to work.
I’ve used and still using both, although I do like the map approach, I’d love for Java to have named parameters :)
Thanks for sharing
Glen Mailer, on
It’s possibly also worth noting that you can always use a builder-style API to create a config map if that’s what you desire.
Sumit, on
Job well done! Appreciate the efforts and time taken to test ES in details and find out its shortcomings. Keep up the good work mate!
I have made a simple attempt at 100% read data store. Let me know if you are interested in testing it!
C, on
The reference to Batou trying to revive the dying process 2501 is perfectly hilarious.
Dave Cottlehuber, on
Thanks for one of the clearest introductions resources for Clojure, and the Jepsen series are an excellent gateway drug to the diabolic and fascinating world of distributed systems.
hil, on
great!
Alex Faraone, on
Just idly wondering if there has been any followup on the two recommendations that you put forward in this article since it was written. I’m considering using kafka, and weighing the pros and cons of trying to do so in a cloud scenario (which makes “P” very important in the CAP equation).
Just curious if you have revisited this in the last year or so.
Tim Ellis, on
Let us all consider for a moment that if you’ve carefully engineered all your components to react properly in the face of network partition, that you probably won’t notice that it happens.
I posit a simpler explanation for those that say they don’t have network partitions despite all that effort do, in fact, have network partitions.
They might have alerts based on network partitions, but my experience with such alerts is that they “rust,” that is, they don’t alert on the thing they’re supposed to alert on after some changes to the underlying infra. So to the hypothetical objection: “But we’d see alerts!” I posit the simpler theory is that the alerts simply aren’t being triggered by the real network partitions.
Given what I’ve seen in high-volume clusters, I simply cannot imagine the lack of network partitions. There are too many causes. They need to be accounted for.
John, on
Hi,
Very interested article. I am currently looking for NoSQL DataStore for one of our project. What you say about ES is a bit scary :)
Do you know if ES has improved their write failures ?
Thank you.
John.
Eugene Goostman, on
Very sad to see that you do not include very clever AI chatterbots as well. Alas, I must search elsewhere to learn Clojure
kiquetal, on
When will the book be available on github?.
I love learning xD
Phil Cassin, on
Hello,
We’d very much like to use your ‘Loop-de-Loop’ image for a piece of work that would compliment
Can you advise if you’d approve of this?
Hey, I was wondering about tail optimization since Clojure is based on the JVM. So I tried the “transform-all” example on a very big vector and as excepted I got a StackOverflowError. I’ve since read that “recur” is aimed to circumvent this but I’m still learning about it so I can’t explain any further :) Maybe that’s something that could interest your readers (or it is mentionned later in the tutorial and haven’t read it yet)
Un gros merci pour ce beau tutoriel ! Jo
thank you.
Would love to see you do a similar review on http://ravendb.net/ !!
I’ve long been looking for an excuse to try MongoDB, but can never seem to find a compelling excuse to choose it over RavenDB.
->> (Kyle) (Awesome)
Great Work. I can tell you it’s not easy to find the clear explanations for a newbie. Most people lose track of what you need to know first when you don’t know. Their stuff is good once your going but it’s a rare teacher who can GET you going so you start to intuit how programming goes. Many THX
aphyr, here is a new challenge, could you say some reasonable :) words about pg sync replication?
http://www.postgresql.org/docs/9.4/static/warm-standby.html 25.2.8. Synchronous Replication
Wow, what a great friend you are. Hope this “landed”.
Two years later, would you change anything here? Add anything?
maybe I found the explanation myself: You mention the CAP theorem in the postgres arcticle. The CAP theorem states that it is impossible for a distributed computer system to simultaneously provide consistency, availability and partition tolerance. Hence, a CP system is a system which is consistent and partition tolerant.
Hi Kyle,
could you include a link that explains the properties of CP Systems? Is it short for consistent & persistent?
Stopped reading with the animated gifs . I wonder if it’s because I have ADHD because I just couldn’t get past 1-2 paragraphs.
Maybe this is an accessibility issue.
Hi, this introduction saved my life in starting to learn Clojure. Congratulations for your effort! Thanks
It would be great to read about NSQ (http://nsq.io) and Kafka in the same manner :) Great job, thank you!
Thanks for the article! As of 02/2015, is elasticsearch safer to use? One of the bug mentioned has shown a lot of progress (https://github.com/elasticsearch/elasticsearch/issues/2488), but overall wonder what could be the pain points for operating a large ES cloud? Thanks!
Sorry for the late post, am new to this having recently added a new tool to the herd, a portable sawmill, as I couldn’t bring myself to burn all of the black walnut, cherry, and red cedar in the burn piles from the development I’m working on. I have a growing inventory of slabs, see the url attached, and am getting ready to make some tables and such. Question - how do you keep the ends from checking? Would sawing off the last 4" where the checks are visible most help or would they just start anew from the new end? p.s. love the table ornaments, particularly the Jack with a single cube ;-}
Tobi, a better example would be a method with named parameters with default values (of “not set”). With a bit of boilerplate, you get pretty close to the samples in the article:
new MyConfig(priority: 1, mode: SomeEnum, isOk: true)It still allows you to keep immutable things immutable, it still allows you to let the config (and the config-user) classes handle their jobs rather than pushing it from the outside. And it is strongly and statically typed. Sure, it’s compile-time syntactic sugar, but this article is all about static code - as Aphyr said, you can’t statically verify a config file. XML schema only goes so far. And it’s still rather easy to compose. If you do want to store the config elsewhere, you always have to implement the whole config explicitly, no way to “forget” a setting. Now if only you could have a non-nullable type in C# :D
Your code is based on the assumption that there are public properties and you know how to initialize them.
Fluent builder separates build process from internal state, your code does the opposite job.
Many thanks for this article! As an intense dabbler in Clojure (for five years now!), I learned a lot–not least of which was how to read the Java stacktrace (always a source of frustration for me).
This is a magazine-article length post, which of necessity took a long time to write. Thank you for your generosity! This will be a go-to article for many Clojure learners.
The fluent builder pattern is especially harmful in C# where you can just write
new MyConfig() { A = 1, B = "2", ... }The builder adds nothing but takes away. It also is harder to explain.
I’d say the main issue with using maps is refactoring. If you know that you are refactoring your code very often, it becomes very tedious to track which piece of code uses what when you have map-based constructors all over the place. It is also much harder for autocompletion to work.
I’ve used and still using both, although I do like the map approach, I’d love for Java to have named parameters :)
Thanks for sharing
It’s possibly also worth noting that you can always use a builder-style API to create a config map if that’s what you desire.
Job well done! Appreciate the efforts and time taken to test ES in details and find out its shortcomings. Keep up the good work mate!
Since 0.8.2 it’s possible to disable unclean leader election: https://issues.apache.org/jira/browse/KAFKA-1028
I have made a simple attempt at 100% read data store. Let me know if you are interested in testing it!
The reference to Batou trying to revive the dying process 2501 is perfectly hilarious.
Thanks for one of the clearest introductions resources for Clojure, and the Jepsen series are an excellent gateway drug to the diabolic and fascinating world of distributed systems.
great!
Just idly wondering if there has been any followup on the two recommendations that you put forward in this article since it was written. I’m considering using kafka, and weighing the pros and cons of trying to do so in a cloud scenario (which makes “P” very important in the CAP equation).
Just curious if you have revisited this in the last year or so.
Let us all consider for a moment that if you’ve carefully engineered all your components to react properly in the face of network partition, that you probably won’t notice that it happens.
I posit a simpler explanation for those that say they don’t have network partitions despite all that effort do, in fact, have network partitions.
They might have alerts based on network partitions, but my experience with such alerts is that they “rust,” that is, they don’t alert on the thing they’re supposed to alert on after some changes to the underlying infra. So to the hypothetical objection: “But we’d see alerts!” I posit the simpler theory is that the alerts simply aren’t being triggered by the real network partitions.
Given what I’ve seen in high-volume clusters, I simply cannot imagine the lack of network partitions. There are too many causes. They need to be accounted for.
Hi,
Very interested article. I am currently looking for NoSQL DataStore for one of our project. What you say about ES is a bit scary :)
Do you know if ES has improved their write failures ?
Thank you.
John.
Very sad to see that you do not include very clever AI chatterbots as well. Alas, I must search elsewhere to learn Clojure
When will the book be available on github?. I love learning xD
Hello,
We’d very much like to use your ‘Loop-de-Loop’ image for a piece of work that would compliment Can you advise if you’d approve of this?
Thanks
Phil