halgari
๐ Joined in 2012
๐ผ 45 Karma
โ๏ธ 15 posts
Load more
(Replying to PARENT post)
To be honest, I've found that my degree carrying co-workers fall way short in the basics. Perhaps it's just me, but my background in languages went something like this: GW-BASIC -> QBASIC -> ASM -> C -> C++ -> PHP -> JS --> Python -> Erlang -> Ruby -> C# -> Clojure. So for me, programming in C meant that I had to understand linked lists and sort algorithms.
I've sat in in interviews before and asked candidates (with degrees and experience) the difference between a dictionary, a hash-set and a list, and I just get blank stares.
So no, I think it's more about the desire to learn. If you have a true interest in Software Engineering, you'll teach these basics to yourself. If not, then not even college will help you.
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
So instead of using DataOutputStream, you have to use BinaryOutputStream.
Clojure doesn't wrap much, so that means very little code written for one VM runs on the other. Plus you don't have lein, which is a bit problem tooling-wise
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
Basically it reflection (aka dynamic dispatch) is a major performance killer if you don't implement a tracing jit.
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
user=> (time (reduce1 + (range 100000)))
Elapsed time: 903.011083603 msecs
4999950000
user=> (time (reduce1 + (range 1000000)))
Elapsed time: 777.748823166 msecs
499999500000
user=> (time (reduce1 + (range 10000000)))
Elapsed time: 8764.57095146 msecs
49999995000000
user=>
Clojure via hotspot:
user=> (time (reduce + (range 100000)))
"Elapsed time: 174.768593 msecs"
4999950000
user=> (time (reduce + (range 1000000)))
"Elapsed time: 267.60421 msecs"
499999500000
user=> (time (reduce + (range 10000000)))
"Elapsed time: 1131.77367 msecs"
49999995000000
user=>
But yes, we still have some room for improvement.(Replying to PARENT post)
Secondly, there is some benifit to not having to worry about static typing in a dynamic language. Anyone want to explain how to read a binary file in Clojure? Here's a hint, it takes the use of FileInputStream, DataInputStream. In clojure-py it's as simple as (py/open "foo.bin" "r").
And thirdly, why are we writing a dynamic language on a static VM? Fast Clojure code on the JVM these days takes little hints. You have to tag parameters with ^Integer and ^Double to kick the compiler type inference into gear. None of this is required on a dynamic VM. In fact, it's completely pointless.