13 ms·
NewLisp
- shakna 10y agoIncluding Bayes in the standard library is cool, but newLISP must be one of the slowest LISP interpreters out there. Its certainly useable - usually on par with Python... But picolisp, Gambit, SBCL are more on par with D or Rebol. So when newLISP claims to be great for embedding, I feel cautious.
- tluyben2 10y agoFor me Picolisp is a very nice Lisp implementation; easy to understand, enthused founder who has been at it since the 80s. Which is amazing in it's own right. And a solid community. Won't go away any time soon. Gambit is the same age, but I find the source code far harder to read. That's a matter of taste I guess.
- shakna 10y agoF-Expressions are awesome fun. Gambit internals does kind of look like black magic half the time, but the author implemented environments because I asked [0], which is very cool. The more experimental lisps, the better we can make the future. I love how the lispish community views PLT, and always tries out someone's new idea. (Bayes integration in newLISP is cool. LFE is also cool.) [0] https://github.com/gambit/gambit/issues/204 https://github.com/gambit/gambit/issues/204
- eggy 10y agoDitto on Fexprs, and PicoLisp! Xtlang in Extempore is a whole lot of fun [1]. Echolisp has amazing built-ins and runs in the browser [2]. Gambit is great to get C code out of. I like LFE, but I have to learn more OTP/BEAM to really use it. Wasp Lisp is a lot of fun for me, and for playing with distributed programs. [1] http://extempore.moso.com.au/ http://extempore.moso.com.au/ [2] http://www.echolalie.org/echolisp/ http://www.echolalie.org/echolisp/
- shakna 10y agoHadn't heard of Wasp [0] before. Looking forward to trying it out! [0] https://github.com/swdunlop/WaspVM https://github.com/swdunlop/WaspVM
- qwertyuiop924 10y agoHave you tried Kernel?
- freekh 10y agoFexprs should be fun, it stands for fun-expression after all... Right?.. I am not a lisper though...:D
- qwertyuiop924 10y agoNo, although what it stands for has been lost to the ages. They're functions whose args are passed unevaled. It kills a whole variety of compiler optimizations, but in an interpreter, there's no reason not to have them.
- minikomi 10y agoHow much of an issue does fixed point over floating point become in picolisp?
- throwaway7645 10y agoMy only criticism (not really criticism)is that Windows is only supported through Cygwin. I will say you can tell the community is very competent. 9/10, the picolisp example on RosettaCode is the most readable while being in the top 5 shortest for loc (kind of hard to beat J in loc).
- kazinator 10y agohttp://www.kylheku.com/cygnal/ http://www.kylheku.com/cygnal/
- deleted 10y ago[deleted]
- throwaway7645 10y agoD is more like C++ and I guess SBCL isn't too far from that realm in some cases (certainly slower in most). Rebol, python, and picolisp are all interpreted though and quite slow by comparison.
- shakna 10y agoSBCL really isn't that slow [0], being on par if not faster than Java in most things. Python is a magnitude of order slower [1] than most things, and that was my point. newLISP is slow. I do have to take exception to you calling interpreted slow - because you've called Python interpreted, I'm guessing bytecode interpreted fits your view. Picrin [2] is bytecode interpreted, and isn't slow. [3] By Rebol I mostly meant Red, which isn't exactly slow, as it aims for 1-3x the speed of C. (Though I can't find any decent set of benchmarks for it currently). [0] https://benchmarksgame.alioth.debian.org/u64q/lisp.html https://benchmarksgame.alioth.debian.org/u64q/lisp.html [1] http://benchmarksgame.alioth.debian.org/u64q/python.html http://benchmarksgame.alioth.debian.org/u64q/python.html [2] https://github.com/picrin-scheme/picrin https://github.com/picrin-scheme/picrin [3] http://www.larcenists.org/benchmarksGenuineR7Linux.html http://www.larcenists.org/benchmarksGenuineR7Linux.html
- igouy 10y ago> Picrin is bytecode interpreted, and isn't slow. [3] Those measurements seem to show Picrin at-least an order of magnitude slower than Larceny?
- shakna 10y agoYep. Larceny is one of the fastest compiled Schemes. Doesn't mean Picrin is slow, though. It matches Chicken in most of the stats, and Chicken uses the same process (Cheney on the MTA), but Chicken is compiled. Picrin is bytecode interpreted.
- dfox 10y agoThe whole newLISP semantics (everything dynamic, no closures) serves for it to be one of the fastest pure interpreters out there. IIRC it is even significantly faster than CPython (on microbenchmarks). The reason for that lies in the fact that newLISP's interpreter does not have to do that much of pointer chasing as other interpreters which implement some kind of lexical scoping. In dfsch I found out that about 80% of time is spent in symbol-lookup related code and had to resort to some ugly tricks (inlining constant references in AST, microoptimalizations in lookup code...) to get it's performance to be somewhere between CPython and newLISP.
- life_is_short 10y agoIn NewLisp's memory management model, I didn't understand if one-reference-only limits what the programmer can do. http://www.newlisp.org/MemoryManagement.html http://www.newlisp.org/MemoryManagement.html Does it mean it's impossible for more than one variable to refer to a variable already referenced? If yes, is this a problem in practice? If no, is this the way of the future?
- hilti 10y agoThis comes up every time newLISP is introduced somewhere. I'm not a developer who ever tried to create or invent a new language, so my knowledge is really limited regarding which memory management is advanced or dumb. BUT I've used newLISP in many web business applications, which are still used by hundreds of users, under load and I've never ran into trouble. Developing and coding such big projects has been great (we used newLISP contexts a lot). I'm trying to say: in practice I don't care about internal memeory management if the language does it job. And in my opinion newLISP is a good tool to solve real world problems.
- david-given 10y agoA brief skim of the document suggests: - single-reference-only for expressions (so, static object lifetime); deletion is delayed until a stack slot gets reused, allowing return values - assignment to variables or values passed into functions are done by copy - EXCEPT certain types are passed into functions by reference as an optimisation So, basically, values are owned by either the stack or a variable. Assignment to a stack cell destroys what was there before. To keep a stacked value, it needs to be copied into a variable. That all seems pretty intelligent, and I might steal the idea; except that I don't see any mention of how cyclic data structures or mutable data structures are implemented. Does anyone know how these are handled?
- astrobe_ 10y agoFor mutable structures you use the "context" concept, which is also used to build a form of OOP. For cyclic data structures, I'm not sure. I think one can pass a function, a list or a context to a function that expects a list. This it might do the trick.
- jurip 10y agoPaul Graham on newLISP, 12 years ago: http://lambda-the-ultimate.org/node/257#comment-1889 http://lambda-the-ultimate.org/node/257#comment-1889 With hindsight, turns out that none of newLISP, Goo or Arc set the world on fire.
- ghayes 10y agoYet, functional programming is an in vogue as ever.
- Semiapies 10y agoIt's perpetually going to be huge Real Soon Now.
- barrkel 10y agoThe kinds of things PG was promoting were call/cc for web interaction flows and macros to create a DSL for the application. These are heavily Lispy ideas and not hugely functional.
- qwertyuiop924 10y agoHe wasn't promoting call/cc. I know he wasn't because neither CL nor arc actually support the construct.
- kazinator 10y agoFrom a Lisp POV, the only thing wrong with NewLisp is the name. It flouts McCarthy's wish that no language be called just Lisp. Well, okay, it's not literally called Lisp; it has the "New" in front. On the surface, it seems to be sticking to the letter of the wish. Does it conform to the spirit, though? Is a common English adjective enough? Is "New" a sufficient qualifier? The mere prefixing of "New" looks like it's claiming to be a new version of something that is just Lisp, unqualified. A "New Lisp" is plausibly something that was "Lisp" before, and was then enhanced to create a new version derived from "Lisp". Lots of projects get rewritten, or otherwise revampd and called "New Whatever". But NewLisp certainly has no such lineage. One historic dialect was called NIL which stood for "New Implementation of Lisp". But it went by the name NIL, with the acronym just being an explanation for that name (as far as I can tell). Change the arrogant name, and you will not hear another criticism from Lisp programmers. Make it LutzLisp or whatever. It doesn't matter what it is if it is called LutzLisp; it's not that type of thing that's claiming to be a new, improved version of Lisp. Breaking, or skirting a sacrosanct rule is now how you play along in the broad Lisp family.
- jacinabox 10y agoBoo.
- B1FF_PSUVM 10y agoIf you gather three Lisp programmers, you can have at least four different factions. It's the nature of the thing - a selfish language. It allows you to have things exactly your way, and that's the way it's going to be. P.S. Emo Philips nailed it down: http://splitframeofreference.blogspot.pt/2013/04/the-greatest-religious-joke-of-all-time.html http://splitframeofreference.blogspot.pt/2013/04/the-greates...
- klibertp 10y agoWhat does http://boo-lang.org/ http://boo-lang.org/ have to do with this?
- coldtea 10y ago>Change the arrogant name, and you will not hear another criticism from Lisp programmers. I don't think anyone else cares for that, or even went that far in their syllogism anyway.
- quickben 10y agoIt would be interesting to see some speed benchmarks.
- hilti 10y agoHere You go :-) http://www.newlisp.org/index.cgi?page=MergesortBenchmark http://www.newlisp.org/index.cgi?page=MergesortBenchmark
- hilti 10y agoAnd regarding hardware benchmarks this is fun too, seeing on how many platforms this scripting language is running. (Source: http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=3708 http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=...) 0.33 ; 2.7GHz Intel Core i5 iMac, 64 bit newLISP 10.3.2 - cormullion\n 0.45 ; 2.4GHz Intel Core i5 MacBook Pro, 64 bit newLISP - itistoday\n 0.5 ; 2.2Ghz AMD Phenom(tm) 9550 Quad-Core Processor 64-bit on Linux IPv4 - pjot\n 0.55 ; Windows XP at AMD Phenom II X2 545, 3 GHz - Cyril \n 0.6 ; 2 x 3.2 GHz Quad-Core Intel Xeon - joe \n 0.63 ; FreeBSD at NFSHOST poss. 2.8 GHZ CPU - lutz\n 0.7 ; FreeBSD at NFSHOST probably the same on a bad day - cormullion 0.71 ; Mac OS X 2.0 GHz Intel Core 2 Duo, 64-bit version of newLISP - cormullion 0.75 ; MacBook Pro 2.4 GHz Intel Core 2 Duo running 32-bit newLISP - hilti 0.8 ; AMD 64 3200+ - newdep 0.89 ; zLinux (for the IBM mainframe) - jopython 0.9 ; Mac OS X 2.0 GHz Intel Core 2 Duo, 32-bit newLISP- cormullion 1.00 ; Mac OS X 1.83 GHz Intel Core 2 Duo - Lutz 1.1 ; Windows Vista 64 at Intel Pentium D 940, 3.2 Ghz. - kazimir 1.36 ; Pentium 4, 2Ghz running Ubuntu 9.04 - robert gorenc 2.24 ; Sun Sparc 1350MHZ processor - jopython 3.25 ; Windows XP at Intel Pentium III, 800 MHz - Cyril 3.40 ; Nokia N900 at 950 MHz - hilti's "numbercruncher" 5.15 ; Nokia N900 at 700 MHz 5.37 ; Raspberry Pi 900 mHz (overclocked with the raspi-config tool) - Hilti 5.44 ; Mac OS X 1GHz PowerPC G4 (eMac) - cormullion 6.72 ; Raspberry Pi 700 mHz 256 MB RAM - Hilti 9.52 ; Sun Sparc Ultra-2 - lutz 13.7 ; Nokia N810 armv61 - newdep 30.64 ; Pentium 90, running DamnSmallLinux - robert gorenc 50.0 ; Intel Pentium 120 - P54CQS - 120MHz - xytroxon
- criddell 10y agoSpeed of development or speed of execution? :) I don't think anybody anywhere has ever chosen a Lisp language because it's fast.
- the_duke 10y ago> newLISP is LISP reborn as a scripting language: pragmatic and casual, simple to learn without requiring you to know advanced computer science concepts. How is this different from LISP?
- throwaway7645 10y agoIf you play with the examples it becomes more apparent, but you can use it alongside gnu-utils like grep with pipes on the command line easier than a lot of traditional lisps that have a slower startup (ex: Clojure). Kind of like Perl.
- bitwize 10y agoClojure is not a "traditional lisp". And Guile was my Perl in the late nineties. Never experienced startup time issues, even on Pentium-class hardware.
- justinhj 10y agoThere are ways around the slow startup of Clojure such as http://leiningen.org/grench.html http://leiningen.org/grench.html
- klibertp 10y agoFrom that website: > Grenchman lets you run Clojure code quickly. By connecting to a running nREPL server you avoid JVM startup time, streamlining your development workflow. It's irritating to see the same claim repeated again and again. It's not JVM startup time, it's Clojure startup time. Whether it's because JVM is ill-suited for the kind of code Clojure uses or for other reasons I don't know, but JVM itself starts up 100x faster than Clojure on JVM. Moreover, a daemon running in the background is a just a workaround. To use it you need to write your app in a certain way so that reloading works, and you still need to start the daemon at some point. I've been working with Clojure for a few months full-time and it was kind of ok, however, for command line utilities, almost anything is better than Clojure. Python, JS with Node, Racket, Ruby, GNU Smalltalk, even Io - all these start up much faster than Clojure. ClojureScript with Node would be an option, but then ClojureScript (and Node). In short: if you need to write a cmd line utility program you should avoid Clojure as much as possible.
- taylodl 10y agoIf you want to use a Lisp for scripting, embedding it into an application and having great interoperability with C then you also have Guile Scheme (https://www.gnu.org/software/guile/ https://www.gnu.org/software/guile/) as an option. I don't have comparative benchmarks but I've never had any issues with its performance.
- qwertyuiop924 10y agoIt's interesting. I'm not a fan of dynamic scoping, but it's okay. ORO looks no worse than Rust's borrowing, so that's not a worry, aside from cyclical datastructures.
- bitwize 10y agoAh, Newlisp -- the Isagenix of programming languages. Sooner or later, every general-programming community will have to deal with a deployment of Newlispoids eager to convince you how great the language is and that finally, programming is fun again. As if programmers hadn't enjoyed themselves much more using "old" Lisps that embraced advanced features like lexical scoping and hygienic macros.
- sriku 10y agoThe slew of differences dont seem very "designed", meaning some corner of the world won't end if life wasn't that way. They seem more like a consequence of "my pet lisp interpreter as I began implementing it". I know that smell 'cos I've been through it myself and subsequently redesigned and reimplemented things.
- zeveb 10y agoExactly. After playing with different Lisp dialects for well over a decade I've come to the conclusion that Common Lisp's decisions are, generally, reasonably well-thought-out and not often terrible. I've not found a Lisp better-suited for the name. I'd love to see a new version of Common Lisp fixing some of the decisions which were terrible, but I don't see that happening.
- JohnStrange 10y agoWhy not, by the way? I've always wondered why the CL community hasn't come up with a new, improved standard for such a long time. Other old languages like Fortran and Ada are continuously updated. Why not CommonLisp?
- whyever 10y agoAs a lisp noob, I found many of common lisp's function names to be extremely arcane.
- qwertyuiop924 10y agoEh. I lean more on the scheme side of things, myself. One namespace, less historical cruft, and macros that are hygenic by default. It's a pretty good deal.
- zeveb 10y agoI actually think that the single namespace and weak macros are design mistakes. The lack of (as much) historical cruft is probably a Good Thing. call/cc is a great teaching tool but a terrible thing for use in an implementation supporting production software: it's goto without the limited scope of TAGBODY. I don't blame Scheme for not learning from Common Lisp, since the former predated the latter; indeed, Common Lisp learned from Scheme.
- eddieh 10y agoI wish every programming language homepage had a small code example. I know this is a LISP-like language and I can expect it to look like any other LISP. But I still appreciate getting a glimpse of the language without having to hunt through documentation for a tutorial. A small code example can tell you way more than a language description. An example is the PL equivalent of the picture is worth a thousand words adage. Additionally, it is not a given that a LISP will use S-expressions. It could use M-expressions, or even G-expressions (form a LISP like language I helped develop that nobody has ever heard of). Go, Rust, Ruby, Python all have examples on their homepage. Oddly, Swift does not.
- deleted 10y ago[deleted]
- clamberson 10y agoDid you work on Ginger? I'd love to see what that looked like :)
- eddieh 10y agoYup, it was Ginger. The syntax was like a mix of Python and Scheme. define fib (n) if (= n 0) 0 elsif: (= n 1) 1 else: (+ (fib (- n 1)) (fib (- n 2))) println (fib 20)
- hilti 10y agoIf you love small code examples, then check out newLISP running inside a browser. That REPL is pretty fun. http://www.newlisp.org/newlisp-js/ http://www.newlisp.org/newlisp-js/