Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: what do lispers think of clojure?

Reply
Thread Tools

Re: what do lispers think of clojure?

 
 
Xah Lee
Guest
Posts: n/a
 
      11-25-2008
On Nov 25, 1:41 am, Rock <(E-Mail Removed)> wrote:
> On Nov 25, 1:50 am, Mirko <(E-Mail Removed)> wrote:
>
>
>
> > On Nov 21, 8:36 pm, Jon Harrop <(E-Mail Removed)> wrote:

>
> > > gavino wrote:
> > > >http://clojure.org

>
> > > Clojure is Lisp's best chance of success for people who earn their living. I
> > > thought Rich's presentation was very compelling, making it sound like
> > > Clojure is the pinnacle of dynamic programming languages.

>
> > > --
> > > Dr Jon D Harrop, Flying Frog Consultancy Ltd.http://www.ffconsultancy..com/?u

>
> > Yep, his enthusiasm is infecting. I was a bit disappointed with two
> > aspects:
> > - no complex number support (because Java lacks it)
> > - cannot run yet on Android (for reasons way over my head)
> > (although one should never be disappointed with a remarkable piece of
> > work that is being given to the community)

>
> > Mirko

>
> Yeah, no complex number support! Very disappointing when I found out.
> I even had an exchange with Rich Hickey on the issue. He says he's got
> nothing against complex numbers obviously, but he hasn't got the time
> to implement them, and for performance reasons it looks like it has to
> be done in Java. I wanted to give it a try, but I am definitely no
> Java programmer, so I've happily come back to good old Common Lisp.
> I'm a mathematician and complex numbers are VERY important, and I
> think CL (with few other languages) has got the best support in this
> respect.


Native support of complex numbers in a general purpose language of
today, is absolutely necessary!

Java being a pain in the ass in so many ways, doesn't have complex
numbers as a native datatype.

However, luckily there are few roburst 3rd-party open source java
packages that does it. See:

• Complex Numbers in Java
http://xahlee.org/java-a-day/ex_complex.html

So, if Clojure doesn't want to be another toy, it must support it.

maybe the author doesn't have time, maybe it's complex, maybe it must
be implemented in java for speed or whatnot, but that's not the user's
problem. In short, have it in Clojure out of the box soon, or be
assured Clojure won't have a future. (trust me on this)

See also:

• Proliferation of Computing Languages
http://xahlee.org/UnixResource_dir/writ/new_langs.html

Xah
http://xahlee.org/


 
Reply With Quote
 
 
 
 
Thomas F. Burdick
Guest
Posts: n/a
 
      11-25-2008
On 25 nov, 16:43, Xah Lee <(E-Mail Removed)> wrote:

> Native support of complex numbers in a general purpose language of
> today, is absolutely necessary!


How do you figure? It seems more like native support for complex
numbers were more valued 20-30 years ago. The GP languages with such
support date from then ... off the top of my head, I can't think of a
single such language "of today".
 
Reply With Quote
 
 
 
 
Bakul Shah
Guest
Posts: n/a
 
      11-25-2008
Thomas F. Burdick wrote:
> On 25 nov, 16:43, Xah Lee <(E-Mail Removed)> wrote:
>
>> Native support of complex numbers in a general purpose language of
>> today, is absolutely necessary!

>
> How do you figure? It seems more like native support for complex
> numbers were more valued 20-30 years ago. The GP languages with such
> support date from then ... off the top of my head, I can't think of a
> single such language "of today".


C99?
 
Reply With Quote
 
Rock
Guest
Posts: n/a
 
      11-25-2008
On Nov 25, 6:20*pm, Bakul Shah <(E-Mail Removed)> wrote:
> Thomas F. Burdick wrote:
> > On 25 nov, 16:43, Xah Lee <(E-Mail Removed)> wrote:

>
> >> Native support of complex numbers in a general purpose language of
> >> today, is absolutely necessary!

>
> > How do you figure? It seems more like native support for complex
> > numbers were more valued 20-30 years ago. The GP languages with such
> > support date from then ... off the top of my head, I can't think of a
> > single such language "of today".

>
> C99?


Python?
 
Reply With Quote
 
Rock
Guest
Posts: n/a
 
      11-25-2008
On Nov 25, 6:50*pm, Rock <(E-Mail Removed)> wrote:
> On Nov 25, 6:20*pm, Bakul Shah <(E-Mail Removed)> wrote:
>
> > Thomas F. Burdick wrote:
> > > On 25 nov, 16:43, Xah Lee <(E-Mail Removed)> wrote:

>
> > >> Native support of complex numbers in a general purpose language of
> > >> today, is absolutely necessary!

>
> > > How do you figure? It seems more like native support for complex
> > > numbers were more valued 20-30 years ago. The GP languages with such
> > > support date from then ... off the top of my head, I can't think of a
> > > single such language "of today".

>
> > C99?

>
> Python?


And let me add that it's not just a matter of supporting complex
floats. CL and Scheme have always been able to support a full numeric
tower. You've got complex rationals and gaussian integers just as much
as you have complex floats. That is really cool, I believe. I think
it's a big mistake on Clojure's part to underestimate this fact.

Just my 2c.

Rock
 
Reply With Quote
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      11-25-2008
Xah Lee <(E-Mail Removed)> writes:

> Native support of complex numbers in a general purpose language of
> today, is absolutely necessary!


Hardly. Most business applications will never get near them, and the
few scientific programs that need them can do with a library.

I'd much rather have a general way of extending the language with
types that work efficiently. C++ does that pretty well (user defined
types are no more unreadable than C++ code in general .
With that, complex numbers is a pretty simple library.

> Java being a pain in the ass in so many ways, doesn't have complex
> numbers as a native datatype.


Java doesn't allow user-defined types that are not an Object. That's
the real problem.


> So, if Clojure doesn't want to be another toy, it must support it.
> maybe the author doesn't have time, maybe it's complex, maybe it must
> be implemented in java for speed or whatnot, but that's not the user's
> problem. In short, have it in Clojure out of the box soon, or be
> assured Clojure won't have a future. (trust me on this)


Sorry, I don't.
Extensible languages, yes! Complex number support ... meh.

/L
--
Lasse Reichstein Holst Nielsen
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
Rock
Guest
Posts: n/a
 
      11-25-2008
Nice post here on the topic. I feel EXACTLY the same way

http://hans.fugal.net/blog/2008/11/1...re-dsp-longing
 
Reply With Quote
 
Xah Lee
Guest
Posts: n/a
 
      11-25-2008
On Nov 25, 8:31 am, "Thomas F. Burdick" <(E-Mail Removed)> wrote:
> On 25 nov, 16:43, Xah Lee <(E-Mail Removed)> wrote:
>
> > Native support of complex numbers in a general purpose language of
> > today, is absolutely necessary!

>
> How do you figure? It seems more like native support for complex
> numbers were more valued 20-30 years ago. The GP languages with such
> support date from then ... off the top of my head, I can't think of a
> single such language "of today".


On Nov 25, 9:54 am, Rock <(E-Mail Removed)> wrote:
> > > C99?

>
> > Python?

>
> And let me add that it's not just a matter of supporting complex
> floats. CL and Scheme have always been able to support a full numeric
> tower. You've got complex rationals and gaussian integers just as much
> as you have complex floats. That is really cool, I believe. I think
> it's a big mistake on Clojure's part to underestimate this fact.


Adding to what has been said in this thread ...

lisp dialects always supported the complex numbers as well as rational
numbers. Clojure being lispy, not supporting these will not please its
main audience.

also, functional langs are in general strong in math and AI fields.
Full support of complex numbers in necessary.

Sure, 3rd party can always write one. To have full complex number
support to the level of industrial use, is not trivial. Even with the
existing 3rd party open source complex number packages for java... it
makes user to wonder to what degree they are robust... this means lots
of time spent to test it out, and there's the arbitrary choice of
syntax made by the 3rd party. Two 3rd party complex number libs will
likely not be compatible, etc.

as mentioned, C99, Python support it natively. In python, as far as
i've seen, it's support is minimal... just allowing to add and
multiply with it, possbly also taking the phase/degree, length, but
not necessarily allowing other functions such as square root or trig
to work with complex numbers. So, here we see that full support is not
trivial. Also, if we implement complex numbers on top of a lang that
doesn't natively support it, then making it work fast for industrial
use such as scientific computing is also not trivial.

Java is rather a low level lang as opposed to scripting lang such as
perl, python, ruby, etc. Also it is a large lang with heavy
architecture that does almost anything, as opposed to C. As such, lack
of native complex number support is problematic.

Sure, most programing tasks don't involve complex numbers. But with
the proliferation of langs, esp in the past 5 years, you have so many
languages coming out, and so many functional languages too even ... as
time matches goes on, lang are just getting higher and higher level,
and that basically means it can do a lot more things out of the box,
lacking complex numbers will mean your lang loses a edge. I doubt any
general purpose lang as heavy weight as java from today on will not
have complex num support.

i don't think we are seeing the end of proliferation. I think there
will be more and more. Even today it's hard to keep track what's
coming into the scene.

These new langs are not just random toys by random student of some
random proof of concept or weird idea. Each is sufficient robust in
some way to be usable in some industry or academia or niche.

Look at this list:

• Proliferation of Computing Languages
http://xahlee.org/UnixResource_dir/writ/new_langs.html

and go read Wikipedia on the rest tens of langs you never heard of
even for us tech geekers who keep our heads in tech and lang news. If
you spend few hours reading, you'll find that how each is rather
extensive ... not something some nobody curios university compiler
student made as is the situation say before 2000.

In anycase, it'd be fruitful if we can have a list of lang today and
whether they support complex numbers. Here i'll start:

Mathematica yes
Common Lisp yes
Scheme Lisps yes

NewLisp ?
Arc yes?
Qi yes?
Scala ?
Dylan ?
Coq ?

Sleep ?
Groovy ?

ObjectiveC ?
C# ?
D ?

Java no
Erlang ?
Haskell ?
Concurrent Clean ?
Mercury ?
Q ?
Qz ?
OCaml ?
Alice ?
F# ?
SmallTalk ?

Scratch ?
ActionScript no?
Processing ?

Python yes
Lua no?
Tcl no?
Ruby ?
Perl6 ?
Javascript no?
AppleScript no?

APL
Forth
Logo
Pascal

Xah
http://xahlee.org/



 
Reply With Quote
 
Mark Space
Guest
Posts: n/a
 
      11-25-2008
Lasse Reichstein Nielsen wrote:

>
> Java doesn't allow user-defined types that are not an Object. That's
> the real problem.



How does Object affect anything? I'd assume that the lack of operator
overloading would be the real limiting factor....
 
Reply With Quote
 
Rock
Guest
Posts: n/a
 
      11-25-2008
On Nov 25, 10:54*pm, Xah Lee <(E-Mail Removed)> wrote:
> On Nov 25, 8:31 am, "Thomas F. Burdick" <(E-Mail Removed)> wrote:
>
> > On 25 nov, 16:43, Xah Lee <(E-Mail Removed)> wrote:

>
> > > Native support of complex numbers in a general purpose language of
> > > today, is absolutely necessary!

>
> > How do you figure? It seems more like native support for complex
> > numbers were more valued 20-30 years ago. The GP languages with such
> > support date from then ... off the top of my head, I can't think of a
> > single such language "of today".

>
> On Nov 25, 9:54 am, Rock <(E-Mail Removed)> wrote:
>
> > > > C99?

>
> > > Python?

>
> > And let me add that it's not just a matter of supporting complex
> > floats. CL and Scheme have always been able to support a full numeric
> > tower. You've got complex rationals and gaussian integers just as much
> > as you have complex floats. That is really cool, I believe. I think
> > it's a big mistake on Clojure's part to underestimate this fact.

>
> Adding to what has been said in this thread ...
>
> lisp dialects always supported the complex numbers as well as rational
> numbers. Clojure being lispy, not supporting these will not please its
> main audience.
>
> also, functional langs are in general strong in math and AI fields.
> Full support of complex numbers in necessary.
>
> Sure, 3rd party can always write one. To have full complex number
> support to the level of industrial use, is not trivial. Even with the
> existing 3rd party open source complex number packages for java... it
> makes user to wonder to what degree they are robust... this means lots
> of time spent to test it out, and there's the arbitrary choice of
> syntax made by the 3rd party. Two 3rd party complex number libs will
> likely not be compatible, etc.
>
> as mentioned, C99, Python support it natively. In python, as far as
> i've seen, it's support is minimal... just allowing to add and
> multiply with it, possbly also taking the phase/degree, length, but
> not necessarily allowing other functions such as square root or trig
> to work with complex numbers. So, here we see that full support is not
> trivial. Also, if we implement complex numbers on top of a lang that
> doesn't natively support it, then making it work fast for industrial
> use such as scientific computing is also not trivial.
>
> Java is rather a low level lang as opposed to scripting lang such as
> perl, python, ruby, etc. Also it is a large lang with heavy
> architecture that does almost anything, as opposed to C. As such, lack
> of native complex number support is problematic.
>
> Sure, most programing tasks don't involve complex numbers. But with
> the proliferation of langs, esp in the past 5 years, you have so many
> languages coming out, and so many functional languages too even ... as
> time matches goes on, lang are just getting higher and higher level,
> and that basically means it can do a lot more things out of the box,
> lacking complex numbers will mean your lang loses a edge. I doubt any
> general purpose lang as heavy weight as java from today on will not
> have complex num support.
>
> i don't think we are seeing the end of proliferation. I think there
> will be more and more. Even today it's hard to keep track what's
> coming into the scene.
>
> These new langs are not just random toys by random student of some
> random proof of concept or weird idea. Each is sufficient robust in
> some way to be usable in some industry or academia or niche.
>
> Look at this list:
>
> • Proliferation of Computing Languages
> *http://xahlee.org/UnixResource_dir/writ/new_langs.html
>
> and go read Wikipedia on the rest tens of langs you never heard of
> even for us tech geekers who keep our heads in tech and lang news. If
> you spend few hours reading, you'll find that how each is rather
> extensive ... not something some nobody curios university compiler
> student made as is the situation say before 2000.
>
> In anycase, it'd be fruitful if we can have a list of lang today and
> whether they support complex numbers. Here i'll start:
>
> Mathematica * * *yes
> Common Lisp * * *yes
> Scheme Lisps * * *yes
>
> NewLisp * * * * *?
> Arc * * * * * * yes?
> Qi * * * * * * yes?
> Scala * * * * ?
> Dylan * * * * ?
> Coq * * * * ?
>
> Sleep * * * * *?
> Groovy * * * * *?
>
> ObjectiveC * * * * *?
> C# * * * * *?
> D * * * * *?
>
> Java * * * * * * *no
> Erlang * * * * * *?
> Haskell * * * * * *?
> Concurrent Clean * *?
> Mercury * * * * * *?
> Q * * * * * *?
> Qz * * * * * *?
> OCaml * * * * * *?
> Alice * * * * * *?
> F# * * * * * *?
> SmallTalk * * ?
>
> Scratch * * * * ?
> ActionScript * * no?
> Processing * * *?
>
> Python * * * * * *yes
> Lua * * * * * * no?
> Tcl * * * * * * *no?
> Ruby * * * * *?
> Perl6 * * * * *?
> Javascript * * * * no?
> AppleScript * * *no?
>
> APL
> Forth
> Logo
> Pascal
>
> * Xah
> ∑http://xahlee.org/
>
> ☄


In Python there's no problem with applying mathematical functions to
complex numbers (sin, atan, sqrt, etc...). Fully supported. Not as
extensively as CL or Scheme of course (no complex rationals for
instance), yet supported to a fair extent.

Rock
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I think I will get this and I think I will get that =?iso-8859-1?Q?mark=5Fdigital=A9?= Digital Photography 19 03-18-2006 01:42 AM
Need help: Is Quick-Union-Find the right solution to this problem (Now I don't think so and I think that topological sorting should be the way to go...?) ? aredo3604gif@yahoo.com C Programming 1 04-13-2005 12:48 AM
Need help: Is Quick-Union-Find the right solution to this problem (Now I don't think so and I think that topological sorting should be the way to go...?) ? aredo3604gif@yahoo.com C Programming 0 04-12-2005 05:06 PM
Think your Wireless Network is Secure? Think Again. Careers Computer Security 7 01-31-2004 07:04 AM
Think Off Brand Inks Are Just as Good in your Inkjet Printer - Think Again! John Horner Digital Photography 5 11-09-2003 09:38 PM



Advertisments