boelth...@gmx.net (Julian St.) writes: > But I ask myself why there is still no support for multithreading in > e.g. clisp...
Because it's a bunch of work, probably. They had an offer of some money up on sourceforge for a while, but honestly it was less than what I'd want for the job, and now the offer's gone. What can probably be concluded from this is that there just isn't sufficient demand for it in the CLISP community.
-- /|_ .-----------------------. ,' .\ / | No to Imperialist war | ,--' _,' | Wage class war! | / / `-----------------------' ( -. | | ) | (`-. '--.) `. )----'
Francois-Rene Rideau <fare+NOS...@tunes.org> writes: > they also have good features that Lisp never had: [...] > support for building robust massively concurrent systems for Erlang.
I certainly never had any experience with Lisp*, but I'd be surprised if it failed here
-- /|_ .-----------------------. ,' .\ / | No to Imperialist war | ,--' _,' | Wage class war! | / / `-----------------------' ( -. | | ) | (`-. '--.) `. )----'
Francois-Rene Rideau <fare+NOS...@tunes.org> writes: > k...@accton.shaw.ca (Kaz Kylheku) writes: > > Another thing to be considered: is there any *single* language that > > appears to be acquiring the features of Lisp?
> OCaml and Erlang have most of the good features of Lisp, including > macros (with camlp4 and parse_transform), and they also have good > features that Lisp never had: rich static strong typing
Common Lisp has strong dynamic typing, by design, so Lisp has some good features that OCaml and Erlang never had.
> and a higher-order module system
Common Lisp might not have (never had?) a module system, but it has packages, which are first-class objects.
> for OCaml, support for building robust massively concurrent systems for > Erlang.
Common Lisp has support for building robust massive systems (not limited to concurrent systems).
And -- did you want to reinforce the above statement of Kaz Kylheku?
Looking at that impressive list, and given your Google experiences, which of the old projects would you done differently today? Where would the extensive libraries of modern languages (if they had been available at the time) been a great benefit?
------------------------+-------------------------------------------------- --- Christian Lynbech | Ericsson Telebit, Skanderborgvej 232, DK-8260 Viby J Phone: +45 8938 5244 | email: christian.lynb...@ted.ericsson.dk Fax: +45 8938 5101 | web: www.ericsson.com ------------------------+-------------------------------------------------- --- Hit the philistines three times over the head with the Elisp reference manual. - peto...@hal.com (Michael A. Petonic)
* Raffael Cavallaro | In a sense, the bias that performance is a secondary consideration | flows from a contempt for the brute force method, and a preference for | the algorithmically elegant solution. However, some interesting things | are really only doable because of what can only be described as raw | machine power. If one's more elegant language cannot keep up, then | it's elegance is of little use in this type of cutting edge project.
While this is obviously true, the very existence and proliferation of exceedingly slow languages like Perl, Python, and Java, means that people are beginning to understand that performance does not matter for _every_ task and are more than willing to do the logic in a more convenient language. I think Common Lisp may have tried to compete on performance when it should have competed on convenience. On the other hand, I would so love to have all of Common Lisp available to me in a form that would compile to "C-compatible" code, that followed the calling conventions of more widely used languages upon request, so that Common Lisp could be used without having to let it be the master of the whole application.
Erik Naggum <e...@naggum.net> writes: > On the other hand, I would so love to have all of Common Lisp > available to me in a form that would compile to "C-compatible" > code, that followed the calling conventions of more widely used > languages upon request, so that Common Lisp could be used without > having to let it be the master of the whole application.
Have you checked ECL <http://ecls.sourceforge.net/>? It isn't all of CL yet, but the maintainers are aiming "to achieve maximum compliance with ANSI Common-Lisp". It employs standard C calling conventions and it can also build dynamically loadable as well as linkable object files, see <http://ecls.sourceforge.net/ecldev.html> for details.
In article <87y9j0gxds....@Samaris.tunes.org>, Francois-Rene Rideau wrote: > k...@accton.shaw.ca (Kaz Kylheku) writes: >> Another thing to be considered: is there any *single* language that >> appears to be acquiring the features of Lisp? > OCaml and Erlang have most of the good features of Lisp, including macros > (with camlp4 and parse_transform),
Do they? I don't know about Erlang, but I had believed the hype and tried for a whole year to become as productive in OCaml as I used to be in Common Lisp. It didn't work. Macros? Sure, camlp4 certainly gives that functionality, but... it is so hard to use that I doubt that anybody uses it in his everyday programming like I use defmacro in Common Lisp.
> and they also have good features that > Lisp never had: rich static strong typing and a higher-order module system > for OCaml, support for building robust massively concurrent systems for > Erlang.
At first I thought, too, that static typing was a great feature. I don't anymore. You get used to it and after a while learn to write code that contains practically no type errors in the first place. Then, the remaining use of the type checker is only to annoy you because it isn't perfect and rejects correct code all the time. There are lots of things that you could just write down in a dynamically typed language but in OCaml or SML you'd first have to fight the type checker for *hours*, until you finally find a both ingenious and totally braindamaged way to satisfy him. For an example just look up how to write an Y-combinator in the ML FAQ. Or recall the endless discussions of ``phantom types'' in that community. All this type theory is indeed interesting and fun, but I don't think that it really helps in practice. Rather the opposite.
Regards, -- Nils Goesche "Don't ask for whom the <CTRL-G> tolls."
> * Raffael Cavallaro > | However, some interesting things > | are really only doable because of what can only be described as raw > | machine power. If one's more elegant language cannot keep up, then > | it's elegance is of little use in this type of cutting edge project.
I am working on a puzzle over here, maybe y'all can help me out.
Lisp is too slow, C is fast enough, right?
So Lisp should not be used for some kinds of projects, yes?
I hear a numbers from time to time saying Lisp is sometimes as fast as C, sometimes 20% slower. Exact numbers don't matter for this problem.
So we should not work 20% slower on "some interesting things", no matter the advantages of the more elegant language.
OK, not sure on the dates, but six months ago I picked up a 1.4 GHZ Dell, today I hear Pentiums are spinning at 2.2GHZ.
This means that a cutting edge C project today would have been a third slower six months ago, hence too slow and should not have been undertaken.
And systems certainly will be 20% faster before any cutting edge project starting today can be completed, so no interesting project at all should be started. Today's systems are too slow.
That result doe snot look right. Anyone see where I went wrong?
Francois-Rene Rideau <fare+NOS...@tunes.org> writes: > k...@accton.shaw.ca (Kaz Kylheku) writes: > > Another thing to be considered: is there any *single* language that > > appears to be acquiring the features of Lisp? > OCaml and Erlang have most of the good features of Lisp, including macros > (with camlp4 and parse_transform), and they also have good features that > Lisp never had: rich static strong typing and a higher-order module system > for OCaml, support for building robust massively concurrent systems for > Erlang.
I have looked into OCaml because of a local advocate. I agree that some of the features of OCaml are very interesting. But I fail to understand what the OCaml module system buys you (except as a nice single place for interface declarations).
Could you elaborate about how the OCaml module system helps you and to what lengths you have to go to achieve the same effects in Common Lisp.
Cheers
PS. 3 + 3.14 should yield 6.14!
-- Marco Antoniotti ======================================================== NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 719 Broadway 12th Floor fax +1 - 212 - 995 4122 New York, NY 10003, USA http://bioinformatics.cat.nyu.edu "Hello New York! We'll do what we can!" Bill Murray in `Ghostbusters'.
> > * Raffael Cavallaro > > | However, some interesting things > > | are really only doable because of what can only be described as raw > > | machine power. If one's more elegant language cannot keep up, then > > | it's elegance is of little use in this type of cutting edge project.
> I am working on a puzzle over here, maybe y'all can help me out.
> Lisp is too slow, C is fast enough, right?
I think the general sentiment is that Lisp is too slow and C is too slow. I do not think I have seen anyone that is happy that things run quickly enough (even though they do). Push the optimization to cc -O500, maybe then the compiler will optimize the code done to 100 assembly instructions, all running in the processor cache, no stack, all registers.
> There are lots of things that you could just write down in a > dynamically typed language but in OCaml or SML you'd first have to > fight the type checker for *hours*, until you finally find a both > ingenious and totally braindamaged way to satisfy him. For an > example just look up how to write an Y-combinator in the ML FAQ.
Sure, but how often do you use the Y combinator in real programs?
> Or recall the endless discussions of ``phantom types'' in that > community.
Phantom types are a feature, not a problem, of statically typed languages! They enable you to use the type system to express (and automatically verify, at type-checking time) some invariants using types.
For a nice (and very practical) application of phantom types, see e.g. "No-Longer-Foreign: Teaching an ML compiler to speak C natively." by Matthias Blume, available there:
In article <yors1ygrk48p....@lamppc21.epfl.ch>, Michel Schinz wrote: > Nils Goesche <car...@cartan.de> writes:
>> There are lots of things that you could just write down in a >> dynamically typed language but in OCaml or SML you'd first have to >> fight the type checker for *hours*, until you finally find a both >> ingenious and totally braindamaged way to satisfy him. For an >> example just look up how to write an Y-combinator in the ML FAQ.
> Sure, but how often do you use the Y combinator in real programs?
Never. But that doesn't change the fact that the Y combinator is an /example/ for something that is trivially written down in Lisp and extremely hard to write in ML. There are other examples. Who knows, maybe it's just my programming style that keeps me finding one example after another for this when writing in OCaml/SML, but so what? A programming language should allow me to write valid code whenever I want to instead of giving me a ``Hm. I don't understand what the programmer is up to here, so I better signal an error.'' attitude.
When I realized that every OCaml program I (and other people) wrote started with hundreds of lines defining union types and trivial operations on those, whose only purpose is to reintroduce dynamic typing once again, I began to understand that dynamic typing is actually a /feature/ itself, not a lack of a feature. And all those days I spent fighting and outsmarting the type checker, particularly the module type checker (grrrr), were nothing but totally wasted time.
Sure, being able to prove that languages like ML won't have any run-time type errors is an impressive theoretical result. I like reading books about the typed lambda calculus myself, just for fun. But the fact that we have this nice theory does /not/ automatically imply that we all have to immediately switch to ML like languages now. It wasn't so long ago when everybody said that we all had to switch to Haskell, because it was so mathematically pleasing at the time. Now it apparently suffices to use impure languages like SML or OCaml, heaven knows, why.
And maybe when the static typing hype is over, it'll all of a sudden be politically correct again to use dynamically typed languages. I'll be waiting there until then :-)
Regards, -- Nils Goesche "Don't ask for whom the <CTRL-G> tolls."
In article <3C443BF8.C1408...@nyc.rr.com>, Kenny Tilton wrote:
>Erik Naggum wrote:
>> * Raffael Cavallaro >> | However, some interesting things >> | are really only doable because of what can only be described as raw >> | machine power. If one's more elegant language cannot keep up, then >> | it's elegance is of little use in this type of cutting edge project.
>I am working on a puzzle over here, maybe y'all can help me out.
>Lisp is too slow, C is fast enough, right?
>So Lisp should not be used for some kinds of projects, yes?
Yes, if you consider individual functions to be projects. :)
Or if you have some reason to be avoiding mixed-language programming.
>And systems certainly will be 20% faster before any cutting edge project >starting today can be completed, so no interesting project at all should >be started. Today's systems are too slow.
>That result doe snot look right. Anyone see where I went wrong?
Sometimes people write code today in anticipation of faster hardware in six months, a year or two or whatever. This might be true in some industry centered around computer graphics; like games whose primary attractive feature is the sophistication of the rendering model rather than play.
The program is written with some release date in mind, and is planned around the projected hardware available at that time, rather than today's hardware.
This is how Microsoft ensures that they fill up the bleeding edge PC's memory and drag its apparent performance to that of the 4.77 Mhz IBM PC. It's planned months and years in advance.
>> they also have good features that Lisp never had: [...] >> support for building robust massively concurrent systems for Erlang.
> I certainly never had any experience with Lisp*, but I'd be surprised > if it failed here
Maybe you mean *LISP, the language for the Connection Machine; but AFAIK, it wasn't exactly a LISP, just a language metaprogrammed from LISP. So it was used to build massively concurrent systems, but was very idiosyncratic with the CM, kind of SIMD, and didn't survive to the demise of Thinking Machines. I don't think it was designed for robustness, either.
Other LISPs with concurrency (threads) are kind of nice, but not really built for massively concurrent systems: the global garbage-collected shared-memory model of LISP strongly limits the scalability such systems, and their robustness when faced with fault-containment problems. Also, no concurrent LISP extension correctly handles problems of synchronization of interrupted threads with application-defined invariants - see for instance the problems that Joe Marshall had with interrupted transactions. (LISP here is not worse than Java, but JOCaml and Erlang can do much better).
Of course, it is possible to build distributed systems atop of LISP (just like you can atop any language), but then (just like you would have in any such setting), it means that you have a fight a multi-level programming system that imposes arbitrary constraints on your programming style and forces you to make arbitrary early low-level implementation choice as to which problem will be treated at which level. LISP's metaprogramming abilities can help you factor a lot, so you will be better with LISP than with anything else, but if you take this approach seriously, you will but end up reimplementing Erlang or JOCaml in LISP, and the idiosynchrasies of LISP systems (designed around a global namespace) will end up getting in the way, whether you try to emulate them (expensive runtime distributed coherence enforcement) or avoid them (difficult to trace inconsistent behaviour when they are mistakenly used).
Erlang, on the other hand, is a generic tool for building robustp concurrent systems. It does not depend on the idiosynchrasies of any particular hardware architecture. Its model of internally pure communicating processes easily scales to building large distributed systems, while allowing for real-time behaviour (soft-real-time in practice; but nothing in theory prevents a hard-real-time implementation if needed). and provides a framework for fault-containment as well as for asynchronous interruption handling, and more. It is actually used in mission-critical telecom switch systems, in services using internet-standard protocols, etc.
I don't mean that it would be impossible to design a LISP so as to be as good for concurrent programming as Erlang is. But it would require deep changes to the language and its implementations, and the end-result wouldn't quite be like Common Lisp. For instance, instead of global namespaces and am implicit global object heap, it might have something like first-class name-spaces and first-class object-spaces; the behaviour of primitives of the language in face of concurrency would have to be clarified -- maybe by introducing a linear type system.
Yours freely,
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] [ TUNES project for a Free Reflective Computing System | http://tunes.org ] How would the certainty of the near end of the world affect Ethics?
I remember reading that post before. My reaction to what you have done, is, GOOD JOB! Programming and Lisp are more than the narrow idea of writing and compiling a program for a specific machine. There is all the scaffold code to get the code written (your cross compiler, simulators and of course your testing code. The Lisp development environment is also a tool to get the ideas from your head into a rigorous description. Of course most of your stuff has been tossed and obviously not appreciated. I am sorry for that.
I remember working on an embedded system, I wrote code and tested for almost two years (there were 9 of us). I remember sitting down, burning a EPROM (386 K), looking at it and thinking, "This is it?!!". It was a little deflating, what I thought was so important in the big scheme of things wasn't.
Marco Antoniotti <marc...@cs.nyu.edu> writes: > Could you elaborate about how the OCaml module system helps you and > to what lengths you have to go to achieve the same effects in Common > Lisp.
It's difficult to say. One role of the Module system is to allow for separate compilation. There is nothing in standardized CL that really does it, even less that way. Another role is to declare invariants at interfaces between modules, that will be enforced by the system. While the type system of OCaml can be argued to sometimes lack expressiveness (doesn't allow to express some freedom or some constraint) in its system-enforceable invariants, Common Lisp doesn't even have such thing, and you must face the advent of runtime invariant failures, and pay the price of coping with them (either implementing checks and handlers, or enforce and debug manually). Packages in CL can fake the role of modules, but apart from the fact that they are unable to provide with the capability-model of access restriction of ML modules, they most importantly don't scale in presence of higher-order modules ("functors").
Functors allow to build generic code taking types and other functors as parameters; the resulting code can be quite elaborate, and in ML, static typing is very useful in assessing that module combinations are done right. Functors could theoretically be implemented as a very sophisticated set of macros. Indeed, MzScheme has a first-class module system that can do the equivalent of ML's functors, and also solves the global namespace problem of Scheme (that has no packages). In CL, the choice of namespace management technique for functors in CL would be "interesting": Would you rather dynamically generate new packages? Generate new symbols? Generate some first-class namespace objects holding new meanings for existing symbols? Generate code that calls higher-order functions with additional explicit parameters? Would you use the CL class system and generate new classes? Or generate new generic functions? Or generate new objects of a same class, that contain the type and functor parameters as additional runtime data? It isn't all quite clear to me what is the Right Thing(TM) to do that in CL. It seems to me that CL programmers have just learnt to live without the equivalent of higher-order modules and cope up in a case-by-case basis. The fact that CL won't statically enforce much any invariant restricts the pressure to define clean module interfaces, anyway.
> PS. 3 + 3.14 should yield 6.14!
Or maybe it should yield a compile-time error. Dynamic type conversion induces precision issues, and it the cost of requiring the programmer to assert his taking responsibility for them with an explicit conversion might be lower than the cost of handling all of dynamic type-checks, type-errors and precision issues. Moreover, as far as numbers are concerned, in your next operation (lambda (x) (sqrt (- x))), are you considering x as a complex number? as a real? an approximated real? as a member of such of such Ring? Do you want both results, or just one? in the latter case, which? Or do you want all (or some) of these meanings at the same time, and let a further enclosing operation decide between them? If to you, numbers are a low-level concept, then implicit conversions are mostly something that forces decreased performance upon you; and if to you, they are a high-level concept, then you like having a way to specify you actual high-level intent, and implicit conversion will seldom do what you really want unless you have an AI-complete DWIM feature.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] [ TUNES project for a Free Reflective Computing System | http://tunes.org ] You cannot teach a man anything; you can only help him find it for himself.
> > k...@accton.shaw.ca (Kaz Kylheku) writes: > > > Another thing to be considered: is there any *single* language that > > > appears to be acquiring the features of Lisp?
> > OCaml and Erlang have most of the good features of Lisp, including > > macros (with camlp4 and parse_transform), and they also have good > > features that Lisp never had: rich static strong typing
> Common Lisp has strong dynamic typing, by design, so Lisp has some > good features that OCaml and Erlang never had.
Actually, Erlang is dynamically typed too. I'm not sure from where Francois-Rene got "static strong typing". And Erlang macros are basically C macros, not Common Lisp macros (alas :-).
Best, Thomas -- ftl Thomas Lindgren @acm.org I'd rather write programs that write programs than write programs-[R. Sites]
> > k...@accton.shaw.ca (Kaz Kylheku) writes: > > > Another thing to be considered: is there any *single* language that > > > appears to be acquiring the features of Lisp?
> > OCaml and Erlang have most of the good features of Lisp, including > > macros (with camlp4 and parse_transform), and they also have good > > features that Lisp never had: rich static strong typing
> Common Lisp has strong dynamic typing, by design, so Lisp has some > good features that OCaml and Erlang never had.
Bad form of me to comment this twice, but I happened to see that Francois-Rene _didn't_ claim Erlang had static typing. So I shouldn't ascribe that view to him. Sorry about the confusion.
Best, Thomas -- ftl Thomas Lindgren @acm.org I'd rather write programs that write programs than write programs-[R. Sites]
Nils Goesche <car...@cartan.de> writes: > At first I thought, too, that static typing was a great feature. I don't > anymore. You get used to it and after a while learn to write code that > contains practically no type errors in the first place. Then, the > remaining use of the type checker is only to annoy you because it isn't > perfect and rejects correct code all the time.
Yes ... A bit like a spell-checker, isn't it? But you can't turn it off.
Best, Thomas -- ftl Thomas Lindgren @acm.org I'd rather write programs that write programs than write programs-[R. Sites]
Thomas Lindgren <***@***.***> writes: > Actually, Erlang is dynamically typed too. I'm not sure from where > Francois-Rene got "static strong typing".
If you read my message instead of the reply, you'll see that I clearly state that OCaml has static strong typing, while Erlang allows to build robust massively concurrent systems.
> And Erlang macros are basically C macros, not Common Lisp macros (alas :-).
Indeed they are. But Erlang parse_transform feature is more like CL macros.
> ftl Thomas Lindgren > @acm.org > I'd rather write programs that write programs than write programs-[R. Sites]
Nice.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] [ TUNES project for a Free Reflective Computing System | http://tunes.org ] Reisner's Rule of Conceptual Inertia: If you think big enough, you'll never have to do it.
> Looking at that impressive list, and given your Google experiences, > which of the old projects would you done differently today? Where > would the extensive libraries of modern languages (if they had been > available at the time) been a great benefit?
For the most part I would not have done anything differently. Lisp was definitely the right choice at the time. But two of my recent projects (one in Lisp and one in Java) I would have done in Python if I'd know then what I know now. Both of these were relatively simple non-performance-critical Web apps.
<opinion> BTW, I would much rather see Lisp change to meet modern challenges than see Lisp programmers convert to Python. Lisp is still better than Python from purely language-based considerations. But the extent to which Lisp is better than Python is much smaller than the extent to which Lisp is better than C, to the point where non-language considerations (like not having to fight with management) give Python the edge in some cases. </opinion>
E. --- Es is nicht gasagt das es besser wird wenn es anders wirt. Wenn es aber besser werden soll muss es anders werden. (Loosely translated: Different is not necessarily better. But better is necessarily different.) -- G. Ch. Lichtenberg
"Wade Humeniuk" <humen...@cadvision.com> writes: > (even though they do). Push the optimization to cc -O500, maybe then the > compiler will optimize the code done to 100 assembly instructions, all > running in the processor cache, no stack, all registers.
That neglects the fact that programs have an inherent complexity and minimum size. Chaitin has a pretty tight proof on this (he talks about irreducible algorithmic information), but a simple enumeration argument should suffice to understand that on an intuitive basis.
Andreas
-- "In my eyes it is never a crime to steal knowledge. It is a good theft. The pirate of knowledge is a good pirate." (Michel Serres)
Nils Goesche <car...@cartan.de> writes: > Sure, being able to prove that languages like ML won't have any > run-time type errors is an impressive theoretical result. /.../
But you still can get runtime errors in ML. Just rely on some property that ML can't check, like "x is always greater than zero" or something. Then use the wrong x to do 1/x, or index into an array, or whatever, and you get an ML exception.
Best, Thomas -- ftl Thomas Lindgren @acm.org I'd rather write programs that write programs than write programs-[R. Sites]