http://ocw.mit.edu/courses/electrical-engineering-and-comput...
SICP in Clojure
31–40 of 62 posts
Re: SICP in Clojure
#32Earlier quoted context omitted.
Maybe that is the reason why Clojure has growing industry adoption while scheme does not. Clojure used to have automatic promotion and all this stuff, but it was taken out in 1.3. BigInts are usful in a very small domain and Project Euler examples, not in many real applications. If you could start fresh and reprogramm your VM, JIT and GC, it would probebly be good idea to do full numeric tower, but in the real world…
Adoption of Java is a different issue, junk food chains are also enjoys growing adoption, so what?)
That is, you wrongly believe that the popularity of a language isn't, in itself, evidence of its usefulness.
A lot of people making decisions on which language to use are very qualified and knowledgeable. When they choose clojure over scheme, they do it for good reasons.
Re: SICP in Clojure
#33Earlier quoted context omitted.
Adoption of Java is a different issue, junk food chains are also enjoys growing adoption, so what?)
You are engaging in the ad populum fallacy fallacy. That is, you wrongly believe that the popularity of a language isn't, in itself, evidence of its usefulness. A lot of people making decisions on which language to use are very qualified and knowledgeable. When they choose clojure over scheme, they do it for good reasons.
Clojure is gaining popularity (along with Scala) because it makes living in the Java Ecosystem a bit less painful and disgusting. It has nothing to do with the "decline" (non-popularity) of Common Lisps and Schemes in so-called industry, but more with mediocrity of those for whom this very ecosystem was created and marketed in the first place.
Re: SICP in Clojure
#34Does Clojure differ a lot from Scheme for what SICP teaches? Is there any benefit for studying the Clojure version of SICP, rather than the original?
So for example: https://github.com/nickbauman/sicp/blob/master/src/section2_...
You'll see I solved the exercise by ignoring what they were trying to teach because it can't be done in Clojure they way they were trying to teach it. I did learn how to make a tree with only lists, which is cool.
Re: SICP in Clojure
#35The irony is that in Clojure the classic, naive non-tail-recursive factorial procedure from SICP will first result in an Overflow Exception and then in Stack Overflow, while any other Schemes or Lisps could do (fact 1024) easily. Don't tell me that I should use some bigint type, the whole big idea behind the numeric tower is to do not bother with types.
Maybe that is the reason why Clojure has growing industry adoption while scheme does not. Clojure used to have automatic promotion and all this stuff, but it was taken out in 1.3. BigInts are usful in a very small domain and Project Euler examples, not in many real applications. If you could start fresh and reprogramm your VM, JIT and GC, it would probebly be good idea to do full numeric tower, but in the real world…
what is "that"? the lack of tail call optimization?
Re: SICP in Clojure
#36The irony is that in Clojure the classic, naive non-tail-recursive factorial procedure from SICP will first result in an Overflow Exception and then in Stack Overflow, while any other Schemes or Lisps could do (fact 1024) easily. Don't tell me that I should use some bigint type, the whole big idea behind the numeric tower is to do not bother with types.
Sure it is a poor man's replacement, but it works.
Re: SICP in Clojure
#37Clojure joke: 'knock knock!' - Who's there? 'minute of silence' 'Knock Knock!' - Who's there!? 'another minute of silence' - Java - Why did you knock twice? - I didn't, but some other suspicious guy is standing here with raised arm and mouth open. Based on my recent Clojure on Android experience.
Based on my recent Clojure on Android experience. As much as I wish Clojure on Android were a viable option, anyone with any sort of reading comprehension knows it's not. So while I don't doubt your criticism may have some sort of merit, you've managed to shoot your credibility in the foot, at least for this particular post.
Re: SICP in Clojure
#38Earlier quoted context omitted.
If had done some basic googling you wouldnot have needed to try it. Everybody know Clojure is not suited to this as it stands.
I'm able to hack fully working UI without restarting my app in minutes while you are still clicking at your first 'button' in XML. Startup time is very slow, but Android nature makes it 'faster' next time, because Android does not terminate applications on exit by default. So don't lie that 'it is not suited'. There are some fools that actually use it.
Re: SICP in Clojure
#39Does Clojure differ a lot from Scheme for what SICP teaches? Is there any benefit for studying the Clojure version of SICP, rather than the original?
The idea of the book (at least in my interpretation) is that you are given a language with the absolute bare-minimum needed to built programs, thus why you can "learn Scheme in an afternoon." All of these things like (filter), hash-maps, dicts, etc, that we use and take for granted in our programs simply do not exist in Scheme unless you build it yourself.
In Scheme, you have to build up all the tools you need by creating your abstractions. To do this in Clojure (or any language) you have to ignore the abstractions you are given, and often must break the abstractions to create the abstractions you are already given.
Think of it this way. If you are going to be learning how to create and explore algorithms for matrix multiplication, would you prefer to use Mathematica or Python without Numpy?
Re: SICP in Clojure
#40Earlier quoted context omitted.
Maybe that is the reason why Clojure has growing industry adoption while scheme does not. Clojure used to have automatic promotion and all this stuff, but it was taken out in 1.3. BigInts are usful in a very small domain and Project Euler examples, not in many real applications. If you could start fresh and reprogramm your VM, JIT and GC, it would probebly be good idea to do full numeric tower, but in the real world…
> Maybe that is the reason why Clojure has growing industry adoption while scheme does not what is "that"? the lack of tail call optimization?