News for hackers. Stuff that matters.
Re:SICP in Clojure by dschiptsov on Friday January 17, 2014 @09:48PM (#7079825)
The 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 by nickik on Friday January 17, 2014 @09:55PM (#7079846)
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 you have constraints and you cant be pure.

Re:SICP in Clojure by dschiptsov on Friday January 17, 2014 @10:36PM (#7079947)
Adoption of Java is a different issue, junk food chains are also enjoys growing adoption, so what?)
Re:SICP in Clojure by yetanotherphd on Saturday January 18, 2014 @12:07AM (#7080160)
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.

Re:SICP in Clojure by dschiptsov on Saturday January 18, 2014 @12:27AM (#7080205)
If I am engaging in anything here, it is not this. You should take a look at my blog at least.)

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 by nickik on Saturday January 18, 2014 @08:38AM (#7080966)
You just assume that it was much better then anything else and people where to stupid and the marketing of the others to good and thats why CL and Scheme see no industry adoption.

This might be true and it might not be true but its sure arrogance to pretend to know that it is true. Your(and other Lispers) arrogance might be a big reason why Scheme and CL never got adopted.

Re:SICP in Clojure by lispm on Saturday January 18, 2014 @12:10PM (#7081422)
It is pure ignorance on your side to say Scheme or CL never got adopted.
Re:SICP in Clojure by nickik on Saturday January 18, 2014 @11:17PM (#7083360)
After the AI Winter they where of course still both used, but its absolutly clear that they did not have the addoption other languages had.

At no point was it among the couple of most common used languages at least in the last 30 years. Look at jobs, popularity or any ranking for as we long as we have data.

Re:SICP in Clojure by lispm on Sunday January 19, 2014 @08:17AM (#7084328)
That sounds different like 'no adoption'. Based on that I would say Clojure has very little adoption. Probably there are a few hundred people using Clojure - not more. The latest State of Clojure survey had just 1000 people taking part. Half of those say they use Clojure at work - where work can be anything from academic to industry.

Clojure has to show a few websites, very few applications and a bunch of hobby projects.

Given that Clojure is at a different point in the hype cycle than Scheme or CL, it does not look like mass scale adoption rivalling Python, Ruby, C++, Objective C or Java is coming soon...

In this light there is absolutely no reason to make snide remarks about CL or Scheme 'industry' adoption, where for example Google uses CL, Sony uses Scheme for game programming, where companies use Siscog's scheduling applications, PTC sells CAD systems, Amdocs uses Allegro Cl in Telco applications, various spae and earth telescopes use a CL-based scheduling engine, various companies use ACL2, NASA has a theorem prover in Lisp, ...

If these apps were written in Clojure we would see large amounts of blog posts, ...

Re:SICP in Clojure by dschiptsov on Sunday January 19, 2014 @06:12AM (#7084121)
There is an opinion that AI Winter was caused by dramatic spending cuts, which quickly results in "brain power shortage", and has nothing to do with The Common Lisp, which is considered as [modest] success.)
Re:SICP in Clojure by billsix on Saturday January 18, 2014 @12:58AM (#7080276)
> Maybe that is the reason why Clojure has growing industry adoption while scheme does not

what is "that"? the lack of tail call optimization?

Re:SICP in Clojure by reitzensteinm on Saturday January 18, 2014 @04:55AM (#7080652)
Indirectly, yes. Lack of TCO is a byproduct of being on the JVM, but the JVM is the biggest reason why you can write production systems in Clojure today.
Re:SICP in Clojure by devasiajoseph on Friday January 17, 2014 @10:37PM (#7079949)
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
Re:SICP in Clojure by dschiptsov on Friday January 17, 2014 @10:47PM (#7079979)
Again, the point is precisely in having just one star.
Re:SICP in Clojure by pjmlp on Saturday January 18, 2014 @02:20AM (#7080420)
Only if (recur ...) is not used.

Sure it is a poor man's replacement, but it works.