Live data from Hacker News

Why I'm Productive in Clojure

yogthos.net

81–90 of 99 posts

Re: Why I'm Productive in Clojure

#81
post #73

Earlier quoted context omitted.

Sorry pardon my ignorance but that seems like parallization not concurrency. I would like examples of things like pmap being used in the wild.

Well, p in pmap does stand for parallel. :) The two are obviously linked, Storm does both parallel and concurrent processing on the data. Another example is PigPen ( http://techblog.netflix.com/2014/01/introducing-pigpen-map-r... ) from Netflix. As far as pure concurrency goes, I'm not sure any companies have articles discussing that.

Ok thank you. Implementing map reduce style parallzation doesn't need any language level support. I don't see how clojure is any better at this than say java ( hadoop is java after all).

I am looking for 'pure concurrency' in a app like videos games exctracting last ounce of processing power from a multicore machine. This what the original comment stated was the core competence of Clojure.

Re: Why I'm Productive in Clojure

#82
post #80
post #72

Earlier quoted context omitted.

I made a career move from dentistry to programming. And I would say that anything I've used pre-clojure is a good approximation of pulling teeth. But even pulling teeth has the benefits of knowing when you're finished and the direct customer feedback is usually good.

Why did you decide to switch from dentistry?

[deleted]

Re: Why I'm Productive in Clojure

#83
post #36
post #34

Earlier quoted context omitted.

You can't wrap it with your own scripting because compiling is too slow. That's the essential problem, Leiningen has to be the center of your workflow. There's no other (meaningfully productive) way. What I dislike is the need to run a background task per-project, every time I work on the project. What I would like is either: 1) Faster (sub 500ms) compile times so that I can flexibly use a workflow I prefer. 2) A "Le…

Fast JVM startup is possible with a preloader like Nailgun. A Leiningen daemon is very easy to create. lein-cljsbuild automatically generates ClojureScript so you can use any editor and refresh your browser. The JVM way of doing things is different but not inferior. You extend Leiningen with Leiningen plugins written in JVM languages, not with external tools. Yes, you can do everything you would ever want to do.

> Fast JVM startup is possible with a preloader like Nailgun.

This has never worked for me with Clojure. I'd enjoy a more specific example.

> A Leiningen daemon is very easy to create.

Could you explain more? I specifically want 1 Lein daemon for all projects, not 1 per project. I want to be able to create new projects on the fly. I only want this feature because the ClojureScript build process is too slow to do on demand.

Re: Why I'm Productive in Clojure

#84
post #26

Earlier quoted context omitted.

> Well, people do use these tools, but honestly, do you really want a language with multiple build tools / package managers? I want multiple workflows . A single build tool can accommodate that, but Leiningen can't/doesn't. For example, let's say I have a compiler called mycc. I can build something like this: mycc main.c -o main I might then combine it with an file watcher utility like entr find . -name '*.c' | entr…

Right now I'm using a combination of leiningen, guard, livereload, compass and a shell script to handle my specific build workflow. I'm confused as to why you think leiningen has to do it all. I'm also not sure what you mean by auto rebuilder (for clojurescript I use the auto feature of cljsbuild ...). My workflow starts with starting a REPL. Also, I use vim very happily, many people use Cursive happily. But the reas…

I think you are misunderstanding. People have shown in this thread that they have a slightly different workflow from each other, but my point was that Clojure(Script) points you towards a particular type of workflow, one that I do not like. What I essentially want is 1 of three things:

1) Fast builds so I can set up an auto-build script.

2) A Leinengen daemon so I don't have to worry about building at all.

3) ClojureScript so I can just refresh the browser.

As far as I can tell none of these are possible. If I am wrong please correct me.

Re: Why I'm Productive in Clojure

#85
post #73

Earlier quoted context omitted.

Well, p in pmap does stand for parallel. :) The two are obviously linked, Storm does both parallel and concurrent processing on the data. Another example is PigPen ( http://techblog.netflix.com/2014/01/introducing-pigpen-map-r... ) from Netflix. As far as pure concurrency goes, I'm not sure any companies have articles discussing that.

Ok thank you. Implementing map reduce style parallzation doesn't need any language level support. I don't see how clojure is any better at this than say java ( hadoop is java after all). I am looking for 'pure concurrency' in a app like videos games exctracting last ounce of processing power from a multicore machine. This what the original comment stated was the core competence of Clojure.

https://github.com/puniverse/quasar looks pretty nice, assuming you can't use erlang for whatever reason.

Re: Why I'm Productive in Clojure

#86
post #73

Earlier quoted context omitted.

Well, p in pmap does stand for parallel. :) The two are obviously linked, Storm does both parallel and concurrent processing on the data. Another example is PigPen ( http://techblog.netflix.com/2014/01/introducing-pigpen-map-r... ) from Netflix. As far as pure concurrency goes, I'm not sure any companies have articles discussing that.

Ok thank you. Implementing map reduce style parallzation doesn't need any language level support. I don't see how clojure is any better at this than say java ( hadoop is java after all). I am looking for 'pure concurrency' in a app like videos games exctracting last ounce of processing power from a multicore machine. This what the original comment stated was the core competence of Clojure.

>I am looking for 'pure concurrency' in a app like videos games exctracting last ounce of processing power from a multicore machine. This what the original comment stated was the core competence of Clojure.

That's not actually what the parent comment stated though. It says that Clojure is designed to solve real-world problems in production environments.

In many cases this doesn't mean squeezing out the last ounce of processing power, but being able to reason about concurrent code safely. You pay an overhead of using immutability in order to facilitate higher correctness.

When your system grows it becomes important to be able to reason about parts of it in isolation. This is particularly important when you're running in a multithreaded environment.

That's what people generally mean when they say that Clojure has focus on concurrency. Since the data is immutable you can make assumptions about what the code is doing that you wouldn't be able to make otherwise.

Re: Why I'm Productive in Clojure

#87
post #80
post #72

Earlier quoted context omitted.

I made a career move from dentistry to programming. And I would say that anything I've used pre-clojure is a good approximation of pulling teeth. But even pulling teeth has the benefits of knowing when you're finished and the direct customer feedback is usually good.

Why did you decide to switch from dentistry?

An intellectual, emotional disaster.

I'd been programming since a child and I think in all honesty I was pushed into dentistry by the people that love me and wanted me to make money.

However dentistry in London is medicine in two years then three years specialising in the head and neck. Then two years dentistry training.

I found it a LOT of learning facts. I know that knowledge-based systems are better than humans for that application.

I had the pleasure of learning human anatomy for two years with Prof Harrold Ellis. Which is what I really took away with me. The guy was a genius. And the other was "If you are not certain then say I don't know, never guess, always seek truth" not that many people appreciate that knowledge in my experience. Robotic surgery yes, lying about the safety of amalgamate fillings no and telling mums of the effects of sugar and carbonic acid drinks was not enough scientific exploration for me.

I think I was too young, always the youngest in my year, to really know and show what I wanted to do. I should have studied Physics but was told at the time "I'd end up a Physics teacher" as if this was a bad thing...

Pre-uni I wanted to build quantum computers but my Physics teacher at St John Ruskin College school didn't know what direction I should head in (the school at the time was also being ripped off by the head mistress, look it up, bad).

After that I got a scholarship to a private school to do A levels which was absolutely brilliant. Dulwich College an excellent school where I was treated like an adult and learnt maths, physics and chemistry. Two of the best years of my life.

Nobody noticed really that I wasn't just lazy and so it was very tempting to my parents to be told I could go to the best medical school etc when I pissed the exams.

So I went to the best medical school in the UK, Europe not really sure why.

After two years depression forced me to take some action and I quit and got a job in a bank as a COBOL programmer. I learnt that COBOL doesn't cure depression but can even make it worse. However I learnt from two old ladies who were probably employed AS computers in their prime. And they were the awesome COBOL dinosaurs.

From there on its always been a bit of struggle not having a degree. Although what I've taught myself, and continue to do so, is worth several degrees at least. Probably a PhD or two.

I now know a lot of programming languages and have lots of experience in them. Clojure took me to the next level with regards to meta-programming and language design. I still have hopes for genetic programming.

My interests now are really into augmented reality and basically augmentation of human perception, memory and "brain power" both in the progression of our species and knowledge itself.

If you really want to know where my head is at read The Beginnings of Infinity by David Deutsch http://en.m.wikipedia.org/wiki/David_Deutsch.

He has interesting ideas on quantum computing, knowledge and reality which align most closely with my own.

I'm now mostly a "Senior Developer". How about you?

Re: Why I'm Productive in Clojure

#88
post #19

Earlier quoted context omitted.

You don't have to use Make, there are a half a dozen other popular build systems.

I personally find that to be a horrible experience. Nothing worse than having to install a bunch of tools that you'll never use again, to compile someone else's project. For example, if you use CMake, tough, project A uses autotools. You use bjam? Project B uses QtCreator/QMake. You use Waf? Project C uses SCons. No thanks, just give me a standard build tool like leiningen and be done with it. (Ok, so its not "usuall…

You're confusing the end user experience from the developer experience.

Re: Why I'm Productive in Clojure

#89
post #58
post #2

> What matters to me in a language is whether I can use it without thinking about it. I love this statement. It reminds me of the what it feels to be good at mathematics (not my words): "Your intuitive thinking about a problem is productive and usefully structured, wasting little time on being aimlessly puzzled." from http://www.quora.com/Mathematics/What-is-it-like-to-understa... The author also says more about math…

Alfred North Whitehead on notation[1]: " By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases the mental power of the race. " Probably nothing in the modern world would have more astonished a Greek mathematician than to learn that...the whole population of Western Europe...could perform the operation of division for the largest…

Thanks -- I had seen this quotation but forgotten the source. It is even better than I remembered.

Re: Why I'm Productive in Clojure

#90
post #74
post #15

I recently migrated to clojure from the php world. I have to say that although I am still learning the language, its actually fun compared to php, which would sometimes feel like pulling teeth to get some basic functionality. Way less boilerplate, and as can be said of anything good, it just works. Also, the idea of thinking in the problem domain versus the subset of problems that arise in languages like php is an ac…

I'm in the process of making the move from PHP to Clojure as well. FYI, deploying to Amazon Elastic Beanstalk with the beanstalk leiningen plugin is a breeze.

Just looked into this, and I am quite surprised with the fluid UX. Thanks for the suggestion!
Post reply on HN