findinglisp wrote:That's an interesting usage of displaced arrays, but it seems pretty costly in terms of garbage generated. Typically, when I call a predicate, I don't expect it to cons. Obviously, if you only call it rarely, that won't be a problem, but just recognize that you're making the GC work overtime.
What's memory?
When I initially implemented that, I wondered if it was excessively consing, but the HyperSpec gave me the impression it might not be to bad.
HyperSpec wrote:displaced array n. an array which has no storage of its own, but which is instead indirected to the storage of another array, called its target, at a specified offset, in such a way that any attempt to access the displaced array implicitly references the target array.
I just profiled it and it is indeed consing a lot. Thanks for the heads up. It's still not a problem for my application, but now I'm a little worried. My MO at the moment, though, is make it concise and correct. Then, when the performance is unacceptable, profile and optimize.
findinglisp wrote:I don't have enough knowledge to know if "hard to compile" is an insurmountable problem. Maybe "too much memory" can be solved with ECL http://ecls.sourceforge.net/ or something like L http://www.cs.cmu.edu/~chuck/pubpg/luv95.pdf.
ECL is a great implementation with a small footprint, but ECL can't solve fundamental CL issues. Weinreb is talking about things that are intrinsic to the language, not the implementation. The only way to solve those problems is to change the language itself.
So, maybe what we're looking for here is not an updated Common Lisp, but a different lisp. That's basically what the link to L above describes, although it is a subset of Common Lisp. Upon further review of the ILC 2009 forum article, it appears that Weinreb was not referring to small memory so much as fast startup.
Weinreb wrote:OK, I should not have put it in terms of memory. The real point is that it should be possible to write programs that start up fast. In fact, I've been having a whole conversation on another blog about this. See ...
This is getting a little confusing.
findinglisp wrote:"Archaic naming" is a non-issue because CL has "Too many concepts", so you don't have to use the "Archaic naming". I'd like to take this opportunity to suggest starting an annual Common Lisp programming challenge along the lines of the "Obfuscated Code Contest" called the "Archaic Code Contest".
Yea, I don't have too much problem with funky naming. Every language has some funky naming and you just have to get used to it. CAR vs. FIRST isn't that much of a problem for me. The bigger problem is regular naming. For instance, I love Scheme's use of "!" to signify mutation. I'd rather have APPEND and then APPEND! rather than NCONC.
Well, that falls under the first problem he stated.
findinglisp wrote:"Not uniformly object-oriented" has actually been a problem for me. But, compared to the conceptual limitations that I've hit my head against in other languages, I can live with it.
Yes, but that's the sort of thinking that keeps anything from improving. In other words, I don't think anybody is arguing that CL is unusable. It isn't. People use it all the time. It's a great language, with a lot of great concepts. The only thing that Weinreb is saying is that it's a great example of a language that has evolved over time and now need some clean up. In the same way that we "refactor" code over time, the same concept could be applied to languages.
I waffle on this subject. Having Common Lisp defined and static is a benefit from the perspective of not having to worry about losing the investment made in writing a library and learning the idiosyncrasies of the language. The enemy you know is always better than the enemy you don't.
On the other hand, stasis is death, and there are obviously many lessons learned and changes in the computing environment since 1994 that would benefit an updated Lisp. On reflection, what I think I would want to see is not a new Common Lisp, but a new Lisp based on Common Lisp. Two things are required for me to buy into it:
(1) A detailed design and analysis document
The document should itemize the motivations for designing a new lisp. It should describe each problem, show specific code demonstrating the problem, a
literature review of the history of the problem, solutions to the problem and the proposed solution.
The document should then describe what the language will provide. Are we talking batteries included or a tight core language? Personally, I like the idea of a tight core language with everything else as a library. It's worked well for C. But, then again, you can't argue with those that advocate the Java/Python batteries included approach. No, really, I'm serious, you can't argue with them.
Finally, the document should define the language like the HyperSpec does, but without allowing implementation defined behavior. I realize this contradicts my previous argument, but that was cast in light of I don't really think it is a problem for Common Lisp. But in the new language, might as well get rid of implementation differences to negate this argument from the outset.
(2) A reference implementation
A design document is one thing, but there are complications with designs that simply don't manifest until you actually start to implement the design. So, there should be a reference implementation that evolves with the design document. Only when the implementation is fully synchronized with the design document should the new Lisp be frozen.
I could really care less if it is an ANSI standard. In fact, it would probably be better if it wasn't. I think a moderated wiki would work better. And without a standard, when the next round of miscreants surfaces griping about this new Lisp, they can fork it and run off into their corner and hack away to their hearts desire. I would argue this hasn't hurt the BSDs and in fact is beneficial when you consider the cross pollination that occurs.