4 ms·
NewLisp
- thurn 15y agoCan someone explain NewLisp's memory management model to me? The description here: http://www.newlisp.org/MemoryManagement.html http://www.newlisp.org/MemoryManagement.html makes it sound like NewLisp essentially uses something like an std::auto_ptr from C++ for all its references, but I'm not sure how its possible to write a Lisp where you only ever have one reference to things.
- SoftwareMaven 15y agoIt looks like everything is passed by value, so instead of passing a reference to that int, string, list, array, etc, you are always passing a copy. Once you hit an evaluation contact above where the copy cane from, it can be deleted. I would imagine for some particular set of data (many large arrays and such) that this could get really slow, but their claim is, at least in the general case, it is faster to copy everything.
- praptak 15y agoThey also provide mechanisms to pass by reference. Default pass-by-copy with specially enabled pass-by-reference is indeed the opposite from most other languages do. I wonder how this interacts with things like memory paging and CPU cache.
- _delirium 15y agoDefault pass-by-copy with specially enabled pass-by-reference isn't that uncommon; it's how C++ works, for example.
- spookydan 15y ago.-' `'. / \ | ; | | ___.--, _.._ |0) ~ (0) | _.---'`__.-( (_. __.--'`_.. '.__.\ '--. \_.-' ,.--'` `""` ( ,.--'` ',__ /./; ;, '.__.'` __ _`) ) .---.__.' / | |\ \__..--"" """--.,_ `---' .'.''-._.-'`_./ /\ '. \ _.-~~~````~~~-._`-.__.' | | .' _.-' | | \ \ '. `~---` \ \/ .' \ \ '. '-._) \/ / \ \ `=.__`~-. / /\ `) ) / / `"".`\ , _.-'.'\ \ / / ( ( / / `--~` ) ) .-'.' '.'. | ( (/` ( (` ) ) '-; ` '-; (-' emacs user.
- tsotha 15y agoIt is especially well-suited for applications in AI... <Groan>. I wish people would stop putting "lisp" and "AI" in the same sentence. How many decades did lisp languish because people thought there was no reason to learn it if they weren't doing AI?
- Miky 15y agoAnd from the other side, how many decades was AI approached from an ineffective direction because it was assumed that Lisp was good at it?
- pangram 15y agoYour thesis here is that Lisp itself was a limiting factor in AI research? What alternate language/direction would have resulted in substantially more progress?
- maaku 15y agoI'm not Miky, but I interpreted his statement to be that doing AI is a whole heck of a lot more complicated than just using an introspective, code-as-data, data-as-code language. LISP is a hammer in an AI researcher's toolbox. Human-level AI is a monumental skyscraper undertaking. For sure, any construction team would be hard-pressed to build the Empire State Building without the proper tools, but there's a lot more to it than that.
- tsotha 15y agoHas there been any measurable progress in actual AI since, well, ever?
- jules 15y agoBetter spend your time learning Clojure, Racket, Scheme or Common Lisp. NewLisp repeats the design mistakes of ancient Lisps that were fixed in the newer Lisps, like dynamic scoping and interpreting only instead of compiling which makes it much slower than other Lisps. NewLisp should be called OldLisp. It also adds some mistakes of its own, like deep copying everything when you pass it around. And making `cons` act like `list` when the second argument is not a list.
- oofoe 15y agoWhile it is true that NewLisp isn't going to win any awards from either the Avant /or/ the Vieille Garde, I would argue that just because its philosophy is different from what you believe is most performant doesn't make it a bad language. Ruby's defenders should back me up on that... As I understand it, scoping is handled by "contexts", which can be inconvenient if you expect every function to be a single standalone snowflake, but just fine if you`re tossing off quick scripts which don`t require hermetic degrees of encapsulation. You can also force scope by using 'let' or declaring private variables as arguments, among other things. Certainly Emacs Lisp seems to do OK with similar constraints. As mentioned elsewhere in this post, the deep copy thing may not be as bad as you make it out to be -- certainly it's never particularly troubled me. As for cons... It seems to me that cons is a rather obsolete construct, referring to a long obsolesced hardware feature. I can't get too unhappy about someone trying to make it more immediately useful in a modern context. We've talked about what you don't like about it -- here's what I think NewLisp has gotten very much right: * It's simple to use. * It's small and self contained. * It has a REPL and you can do introspection. * It has conveniently and reasonably named built-in functions. * It deals well with a UNIX-derived file system. * It's easy to pick up and start using, but you can still do fancy stuff. * The documentation contains worked out examples for every built in function. * The main developer is very responsive and helpful. * Trivially cross-platform with downloads, not compiles. I have found NewLisp to be very convenient for many of the problems I have applied it to. I have used it for everything from dynamic web pages to image processing to ad-hoc render farms. So, I certainly feel that it may be invaluable for someone who is interested in Lisp, but has been intimidated or discouraged by the "official" compilers and needs to get some real world work done.
- deleted 15y ago[deleted]
- GuidoS 15y agoWhen I read any well written Lisp code I feel my awareness of the subject gets cleaner, sharper and lighter. I never experienced a similar thing with other languages. I am not belittling them, or criticising. It is just a deep personal feeling, that has been lasting since university times, back in the 90s. I liked the code that I have seen at newlisp.org, newlisper.wordpress.com (for example) and I am eager to see what I can do with it. After reading so many pages (including this one), on so many sites, I have decided that I will learn newlisp too.