Could we stop posting this please? It is a fantastic idea, but is incomplete and not worked on much at all. http://news.ycombinator.com/item?id=7078660 http://news.ycombinator.com/item?id=900865 http://news.ycombinator.com/item?id=1425203 http://news.ycombinator.com/item?id=6843719 http://news.ycombinator.com/item?id=2701414 http://news.ycombinator.com/item?id=4112852
Also when will people understand that SICP is not about teaching programming language? There is no fucking point in rewriting it in your favourite language, it is 99.9% your language less suitable for it (99% it already has mutable state, assignment, loops, (pseudo-)OOP and 5 layers of historic brain damage) Don't know scheme? But it's even better that way! Many things will faster click in your head. Like oh wtf we'r…
SICP in Clojure
21–30 of 62 posts
Re: SICP in Clojure
#22Don'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.
Re: SICP in Clojure
#23Could we stop posting this please? It is a fantastic idea, but is incomplete and not worked on much at all. http://news.ycombinator.com/item?id=7078660 http://news.ycombinator.com/item?id=900865 http://news.ycombinator.com/item?id=1425203 http://news.ycombinator.com/item?id=6843719 http://news.ycombinator.com/item?id=2701414 http://news.ycombinator.com/item?id=4112852
Also when will people understand that SICP is not about teaching programming language? There is no fucking point in rewriting it in your favourite language, it is 99.9% your language less suitable for it (99% it already has mutable state, assignment, loops, (pseudo-)OOP and 5 layers of historic brain damage) Don't know scheme? But it's even better that way! Many things will faster click in your head. Like oh wtf we'r…
You mean like Scheme, right? It's got all that, plus an extra couple of layers now that there's R7RS.
Re: SICP in Clojure
#24The 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.
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 you have constraints and you cant be pure.
Re: SICP in Clojure
#25Re: SICP in Clojure
#26The 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.
Re: SICP in Clojure
#27The 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…
Re: SICP in Clojure
#28The 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.
Re: SICP in Clojure
#29Earlier quoted context omitted.
Also when will people understand that SICP is not about teaching programming language? There is no fucking point in rewriting it in your favourite language, it is 99.9% your language less suitable for it (99% it already has mutable state, assignment, loops, (pseudo-)OOP and 5 layers of historic brain damage) Don't know scheme? But it's even better that way! Many things will faster click in your head. Like oh wtf we'r…
Scheme and/or Common LISP seem to be the common recommendation to embark on SICP journey, just for reference.
Re: SICP in Clojure
#30The 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.
To auto-promote to BigInt in case of an overflow, use a quote after the star(multiplier) operator. Since HN is not allowing me to use star in this comment here is the link to the gist with a simple factorial example: https://gist.github.com/devasiajoseph/8485836