3 ms·
> If only a real Lisp would come along that had the leadership, library, community and documentation of Python. Someone was asking for that just the other day.
by AF 19y ago
> If only a real Lisp would come along that had the leadership, library, community and documentation of Python.
Someone was asking for that just the other day. I was thinking myself that it would be pretty neat to write a Lisp dialect that compiled down to Python, and therefore you could get access to all the Python libraries, a decent VM, and also macros.
I've had trouble figuring out where to start, though. Would be a fun project.
- mdakin 19y agoI'm no expert (merely a user of these systems) but it seems to me that the Python runtime is a POS compared to what you find in some Common Lisps like SBCL. The really appealing approach to me would be to pull Python into the Lisp environment rather than the other way around. Python's lib is so nice, coherent and complete but Lisp is nicer to program and the tools seem much more mature.
- omouse 19y agoI'd prefer a Scheme implementation (or two) getting better libraries than Common Lisp. Check out Bigloo Scheme...it compiles down to C, JVM and .NET bytecode. I've only had it compile down to C but it was really quick. I'll have to get the computer language shootout guys to add Bigloo to their benchmarks.
- mdakin 19y agoMy first Lisp experience was SICP/Scheme and it always felt cleaner and nicer as a language compared to CL. I gravitated towards CL over time due to perceived runtime and library advantages. If any Lisp could pull it all together like Python has I'd jump on board though. And if it was a Scheme then all the better.
- michaelneale 19y agoI agree. CL carries a lot of weight behind it, that is all legacy that really isn't going anywhere. Scheme has always stayed deliberately less "practical" but I think that means it will last longer.
- AF 19y agoYou are right about the runtimes. SBCL is something else. And there have been attempts to pull Python into Lisp: http://common-lisp.net/project/python-on-lisp/ http://common-lisp.net/project/python-on-lisp/ The only thing is, I find CL a really baroque language. The issues have been touched upon by many, but CL just has many spots where due to being standardized 2 decades ago, it isn't really consistent. Python for the most part is extremely consistent and the VM runs on any major OS (SBCL still has issues on Windows). Not to mention the language seems to be evolving naturally (Python 3). That's the main reason I'd like to see a Lisp on Python.
- mdakin 19y agoUnderstood, and I agree about Python's consistency and coherent evolution relative to CL. Thanks for the link.
- pc 19y ago"I was thinking myself that it would be pretty neat to write a Lisp dialect that compiled down to Python" That would be an incredibly bad idea. The implementation of SBCL (and CMUCL, upon which SBCL is based) is second to none--it has an optimizing compiler (available at runtime) with code-generation backends for architectures from x86 to MIPS; fantastic support for type inference, inline expansion, modular arithmetic, unreachable code deletion, constant folding, control optimization, generational garbage collection (doesn't python still use reference counts?)... amongst a bunch of other stuff. http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=0&xloc=0&binarytrees=1&chameneos=0&message=0&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1 http://shootout.alioth.debian.org/gp4/benchmark.php?test=all... Benchmarks are of course arbitrary, but no matter what way you dice things, SBCL is vastly superior to Python's crappy VM. In the case of the link above, over 10 times faster.
- AF 19y agoAs I mentioned in another post, I'm aware of the qualities of SBCL. I know it is a much better VM. That's not what I am concerned about...what I like about Python is its quantity and consistency of libraries and its overall consistency period. Common Lisp just doesn't have that, and SBCL isn't perfect - its full functionality doesn't work across all platforms. > That would be an incredibly bad idea. And I'm just wondering...even with SBCL, why would it be an 'incredibly bad idea' to undertake such a project to convert a Lisp dialect to Python?
- jey 19y ago> And I'm just wondering...even with SBCL, why would it be an 'incredibly bad idea' to undertake such a project to convert a Lisp dialect to Python? Well...what's the point of compiling Lisp into a language with a slower runtime? If you mean that you want it to compiel to something "pretty", well, the output of a compiler is generally not pretty. It's just meant to be used as opaque object code, not something for human consumption.
- 19y ago
- nearfar 19y ago> it would be pretty neat to write a Lisp dialect that compiled down to Python, and therefore you could get access to all the Python libraries, a decent VM, and also macros. Ok, I had started just that. It's called Boa Lisp. http://nearfar.org/code/boalisp/ http://nearfar.org/code/boalisp/ http://nearfar.org/code/boalisp/README.txt http://nearfar.org/code/boalisp/README.txt (sorry, site will be down for the next few hours)
- kirubakaran 19y agoSeems really cool. Hope you will build on it further.
- kirubakaran 19y agoIs there a way to get REPL?
- nearfar 19y agoPatches are welcome. :) OTOH, how are you? remember ugh2yay?
- kirubakaran 19y agoWill email :-)
- ced 19y agoWouldn't it be best to just interface Python and an existing Lisp, using FFI, or something similar? I'm already using matplotlib and scipy with CLisp, communicating through pipes. I can write (plot '(1 2 3)). The communication between the two is really not a speed concern. Most of the time, Lisp is not waiting for an answer, so on my dual core, the other core is handling it. For all its power though, writing Python code in Common Lisp feels really clunky. I don't do it much. I wouldn't feel comfortable writing (funcall (dot somedict keys)) for instance. Macros can only help so much.