more food for lisp fans and sage

91 views
Skip to first unread message

Harald Schilly

unread,
Mar 13, 2012, 3:46:37 PM3/13/12
to sage-...@googlegroups.com
clojure is somehow similar to lisp. we could include it in sage on top of python (not the usual JVM) via this wonderful project. this solves everything! pure happiness! 42!

code looks great:

h

rjf

unread,
Mar 13, 2012, 4:07:29 PM3/13/12
to sage-...@googlegroups.com
I suppose that means one no longer has to write in Python. but can use
a language that is nicer, but probably even slower.
Except for getting rid of Python, what does it solve?


(I assume that Clojure will not run Common Lisp code unchanged, and to the
extent that it can run something close to CL, it will suffer a substantial
performance penalty compared to native language implementations). 
RJF

Harald Schilly

unread,
Mar 13, 2012, 4:15:18 PM3/13/12
to sage-...@googlegroups.com
On Tue, Mar 13, 2012 at 21:07, rjf <fat...@gmail.com> wrote:
> I suppose that means one no longer has to write in Python. but can use
> a language that is nicer, but probably even slower.

the example file i linked to has some benchmarks at the top. there is
almost no difference to python and it is in the range of clojure's
usual runtime environment (JVM). if i understand it correctly, they do
not interpret the code, but generate something out of the files.
that's why it is equally fast as python.
if i'm not mistaken, it should be possible to access the whole sage
python library -- just with clojure's syntax and nearly no overhead!

h

Tom Boothby

unread,
Mar 13, 2012, 5:26:26 PM3/13/12
to sage-...@googlegroups.com
Can Common Lisp cleanly make calls to clojure? If so, Maxima could
include Sage as a package, and pick up some extra number theoretic
functionality! Though... the size of the source tarball would
probably grow a bit if we're not careful.

> --
> You received this message because you are subscribed to the Google Groups "sage-flame" group.
> To post to this group, send email to sage-...@googlegroups.com.
> To unsubscribe from this group, send email to sage-flame+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sage-flame?hl=en.
>

rjf

unread,
Mar 13, 2012, 6:07:39 PM3/13/12
to sage-...@googlegroups.com


On Tuesday, March 13, 2012 2:26:26 PM UTC-7, Tom wrote:
Can Common Lisp cleanly make calls to clojure?

I expect that most common lisps can make calls to python without clojure
being involved at all.
see

which I have not tried. However, I have loaded a dll intended for python
directly into Allegro Common Lisp, for GMP or something similar.  I found
the interface provided, equivalent to that provided to python, to be inadequate
for my purposes, since it did not allow for destructive alteration of structures.

I then found a GMP dll for Windows (actually a bunch, for Pentium, for other Intel implementations, etc))
and used that from lisp.

If Python is no faster than Clojure, I guess that is another reason not to use Python.

RJF
 
  If so, Maxima could
include Sage as a package, and pick up some extra number theoretic
functionality!  Though... the size of the source tarball would
probably grow a bit if we're not careful.

On Tue, Mar 13, 2012 at 1:15 PM, Harald Schilly
<harald....@gmail.com> wrote:
> On Tue, Mar 13, 2012 at 21:07, rjf <fat...@gmail.com> wrote:
>> I suppose that means one no longer has to write in Python. but can use
>> a language that is nicer, but probably even slower.
>
> the example file i linked to has some benchmarks at the top. there is
> almost no difference to python and it is in the range of clojure's
> usual runtime environment (JVM). if i understand it correctly, they do
> not interpret the code, but generate something out of the files.
> that's why it is equally fast as python.
> if i'm not mistaken, it should be possible to access the whole sage
> python library -- just with clojure's syntax and nearly no overhead!
>
> h
>
> --
> You received this message because you are subscribed to the Google Groups "sage-flame" group.
> To post to this group, send email to sage-...@googlegroups.com.

> To unsubscribe from this group, send email to sage-flame+unsubscribe@googlegroups.com.

Bill Hart

unread,
Mar 13, 2012, 7:25:40 PM3/13/12
to sage-...@googlegroups.com
Clojure is not a Common Lisp, but is nevertheless a pretty competent
Lisp which has gained a lot of attention. It is still not in the top
50 programming languages though.

It is much faster than Python, but still slower than Java (it is
implemented on the JVM).

I can't see any genuine justification for implementing Clojure in
Python other than to have fun doing so. The popularity of Python has
been plummeting like a rock. Contrast the sudden resurgence of
interest in C putting it again in top spot.

For another language very similar to Lisp which has seen phenomenal
growth, take a look at Logo.

Anyhow, my favourite language by far at the moment is Julia. It has
the performance of C (even when run via its REPL), the power of Python
and a nice familiar syntax. There's a real buzz around it at the
moment.

Bill.

>> > sage-flame+...@googlegroups.com.


>> > For more options, visit this group at
>> > http://groups.google.com/group/sage-flame?hl=en.
>> >
>

> --
> You received this message because you are subscribed to the Google Groups
> "sage-flame" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/sage-flame/-/id1eHed059YJ.


>
> To post to this group, send email to sage-...@googlegroups.com.
> To unsubscribe from this group, send email to

> sage-flame+...@googlegroups.com.

Harald Schilly

unread,
Mar 13, 2012, 8:13:29 PM3/13/12
to sage-...@googlegroups.com
On Wed, Mar 14, 2012 at 00:25, Bill Hart <goodwi...@googlemail.com> wrote:
> I can't see any genuine justification for implementing Clojure in
> Python other than to have fun doing so.

from the top of the pure-programming-language-hill yes, it's fun to do
this. but calling stuff from the sage library might be a neat thing to
try nevertheless.

h

Reply all
Reply to author
Forward
0 new messages