Re: what do lispers think of clojure?

Discussion in 'Java' started by Xah Lee, Nov 25, 2008.

  1. Xah Lee

    Xah Lee Guest

    On Nov 25, 1:41 am, Rock <> wrote:
    > On Nov 25, 1:50 am, Mirko <> wrote:
    >
    >
    >
    > > On Nov 21, 8:36 pm, Jon Harrop <> 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/

    ☄
     
    Xah Lee, Nov 25, 2008
    #1
    1. Advertising

  2. On 25 nov, 16:43, Xah Lee <> 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".
     
    Thomas F. Burdick, Nov 25, 2008
    #2
    1. Advertising

  3. Xah Lee

    Bakul Shah Guest

    Thomas F. Burdick wrote:
    > On 25 nov, 16:43, Xah Lee <> 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?
     
    Bakul Shah, Nov 25, 2008
    #3
  4. Xah Lee

    Rock Guest

    On Nov 25, 6:20 pm, Bakul Shah <> wrote:
    > Thomas F. Burdick wrote:
    > > On 25 nov, 16:43, Xah Lee <> 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?
     
    Rock, Nov 25, 2008
    #4
  5. Xah Lee

    Rock Guest

    On Nov 25, 6:50 pm, Rock <> wrote:
    > On Nov 25, 6:20 pm, Bakul Shah <> wrote:
    >
    > > Thomas F. Burdick wrote:
    > > > On 25 nov, 16:43, Xah Lee <> 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
     
    Rock, Nov 25, 2008
    #5
  6. Xah Lee <> 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.'
     
    Lasse Reichstein Nielsen, Nov 25, 2008
    #6
  7. Xah Lee

    Rock Guest

    Rock, Nov 25, 2008
    #7
  8. Xah Lee

    Xah Lee Guest

    On Nov 25, 8:31 am, "Thomas F. Burdick" <> wrote:
    > On 25 nov, 16:43, Xah Lee <> 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 <> 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/

    ☄
     
    Xah Lee, Nov 25, 2008
    #8
  9. Xah Lee

    Mark Space Guest

    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....
     
    Mark Space, Nov 25, 2008
    #9
  10. Xah Lee

    Rock Guest

    On Nov 25, 10:54 pm, Xah Lee <> wrote:
    > On Nov 25, 8:31 am, "Thomas F. Burdick" <> wrote:
    >
    > > On 25 nov, 16:43, Xah Lee <> 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 <> 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
     
    Rock, Nov 25, 2008
    #10
  11. Mark Space wrote:
    > 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....


    I'd want complex number to look as much like primitves as possible:

    1. Allocated as locals, rather than requiring "new()"
    2. Passed as values, not references.
     
    Mike Schilling, Nov 26, 2008
    #11
  12. On 25 nov, 18:20, Bakul Shah <> wrote:
    > Thomas F. Burdick wrote:
    > > On 25 nov, 16:43, Xah Lee <> 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?


    Right, this whole thread exposed a blind spot in my reasoning: I was
    working under the unstated assumption that *useful* complex numbers
    require rationals, which in turn pretty much require bignums to be
    useful. Which pretty much leaves ... various Lisps, some Smalltalks,
    mathematical languages (which is pushing the "GP" thing a bit),
    and ... ?

    The blind spot is of course because complex numbers are a useful
    addition to rationals. Not having rationals is appalling, but common,
    and it seems only older languages care about them.
     
    Thomas F. Burdick, Nov 26, 2008
    #12
  13. Xah Lee

    Scott Guest

    On Nov 26, 9:46 am, "Thomas F. Burdick" <> wrote:
    >
    > Right, this whole thread exposed a blind spot in my reasoning: I was
    > working under the unstated assumption that *useful* complex numbers
    > require rationals, which in turn pretty much require bignums to be
    > useful. Which pretty much leaves ... various Lisps, some Smalltalks,
    > mathematical languages (which is pushing the "GP" thing a bit),
    > and ... ?
    >
    > Not having rationals is appalling, but common,
    > and it seems only older languages care about them.


    I agree that any language worth it's salt for scientific purposes
    should have complex numbers, but the reason most of us don't care
    about rationals is because we have to do things with transcendental
    functions... I don't need an array of rational numbers when the first
    thing I'm going to do with that array is take an FFT (which multiplies
    the elements by sines and cosines...). As such, arbitrary precision
    rational numbers are *useless* to me.
     
    Scott, Nov 26, 2008
    #13
  14. Xah Lee

    Tamas K Papp Guest

    On Wed, 26 Nov 2008 08:46:37 -0800, Thomas F. Burdick wrote:

    > working under the unstated assumption that *useful* complex numbers
    > require rationals, which in turn pretty much require bignums to be


    I don't agree. Complex numbers do not have to be rational/exact to be
    handy - think about a Schur decomposition for instance.

    Best,

    Tamas
     
    Tamas K Papp, Nov 26, 2008
    #14
  15. Xah Lee wrote:
    > On Nov 25, 1:41 am, Rock <> wrote:
    >> 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!


    Complex numbers are very useful in scientific computing
    but not in business computing.

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


    Scientific computing has never been a high priority for Java.

    Arne
     
    Arne Vajhøj, Nov 27, 2008
    #15
  16. Xah Lee

    Arne Vajhøj Guest

    Bakul Shah wrote:
    > Thomas F. Burdick wrote:
    >> On 25 nov, 16:43, Xah Lee <> 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?


    The complex support in C99 is not that good.

    Even Fortran is better.

    Arne
     
    Arne Vajhøj, Nov 27, 2008
    #16
  17. Xah Lee

    Arne Vajhøj Guest

    Jon Harrop wrote:
    > Bakul Shah wrote:
    >> Thomas F. Burdick wrote:
    >>> On 25 nov, 16:43, Xah Lee <> 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?

    >
    > Today != 1999


    Today is very close to 99 when we talk about the C standard.

    Lot of compiler have not even implemented all of C99.

    Other priorities.

    Arne
     
    Arne Vajhøj, Nov 27, 2008
    #17
  18. Xah Lee

    Lew Guest

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


    Arne Vajhøj wrote:
    > Scientific computing has never been a high priority for Java.


    Besides, even if we grant "Java being a pain in the ass in so many ways",
    unsubstantiated as that toss-off is, it remains to establish that Java is any
    more a "pain in the ass" than any other computer language, or in any way not
    inherent to computer languages generally

    --
    Lew
     
    Lew, Nov 28, 2008
    #18
  19. Jon Harrop wrote:
    > Arne Vajhøj wrote:
    >> Jon Harrop wrote:
    >>> Today != 1999

    >> Today is very close to 99 when we talk about the C standard.
    >>
    >> Lot of compiler have not even implemented all of C99.
    >>
    >> Other priorities.

    >
    > Other languages more like. :)


    Yes.

    Arne
     
    Arne Vajhøj, Nov 28, 2008
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. fft1976
    Replies:
    7
    Views:
    830
    jgrant27
    Jun 19, 2009
  2. fft1976
    Replies:
    22
    Views:
    2,641
    Arved Sandstrom
    Aug 1, 2009
  3. Shaguf
    Replies:
    0
    Views:
    169
    Shaguf
    Dec 11, 2008
  4. rahul

    Clojure based objects

    rahul, Dec 8, 2009, in forum: Perl Misc
    Replies:
    4
    Views:
    142
    rahul
    Dec 8, 2009
  5. Eric Normand

    Introduction to Clojure Videos

    Eric Normand, Feb 19, 2013, in forum: Java
    Replies:
    0
    Views:
    262
    Eric Normand
    Feb 19, 2013
Loading...

Share This Page