In article <5me1ro$qe...@pf1.phil.uni-sb.de> s...@mpi-sb.mpg.de (Sean Matthews) writes:
In article <5maer6$...@uni.library.ucla.edu>, jmar...@cs.ucla.edu (Jay Martin) writes: > This is total heresay and of course is pointless as it says nothing > about the the long term maintanance which usually consists of like 80% > of the project costs. If it was a research project, then it was > highly likely that it was a poorly designed piece of crap. Most > researchers just don't have the discipline to be good software > engineers.
Funny. You know, contrary to the apparent beliefs of some people in this thread, there are imaginative programmers in other parts of the world than the USA, and even companies other than Lucent in the telcom switch business.
I think you are beating the wrong horse here. First of all, many of the hardcore C++ guys, Bjarne Stroustrup in particular, are NOT at Lucent. And then, there are things like SML/NJ, for example, which started at AT&T Bell Labs and are now continued at Lucent Bell Labs.
Does this need to be cross-posted to all these lists, or is that just to fully enflame all the religous sects?
Ulf Wiger <etxu...@etxb.ericsson.se> writes: > When building a telephone switch, which might be supported for decades > (e.g. the Ericsson AXE switch), maintenance is essential. > It would surprise me to learn that the researchers at AT&T didn't > factor in maintenance as a vital design parameter when prototyping > a switch in LISP.
Actually, I believe that high software maintenance costs was the primary reason that they chose to use LISP. I recall them explaining how they had armies of people struggling to maintain the 5ESS code. The other reason was the ability to rapidly develop new, highly reliable switch features and deploy them in a dynamic environment (eg. downloading them into a running Lisp.)
Why would you imagine that LISP code is not maintainable?
>> I think what the benchmark was designed to show, and what it had some >> degree of success showing, was that many of the people who choose C++ >> because they think that they need it for efficiency, are at best not >> getting their priorities right, and at worst are just wrong.
>But it doesn't show that. No single benchmark could.
>Nor does it do what I thought it was intended to do, >which was to refute the claim that C++ allows generic >programs to run as fast as their hand-coded counterparts.
It wasn't meant to refute anything. The author was expecting to prove the opposite.
Forget the C++ results for a moment. Let's assume they are flawed for whatever reason.
The closeness of the C and Scheme results seems to justify my original statement: That being that it "had some degree of success showing, was that many of the people who choose C++ because they think that they need it for efficiency, are at best not getting their priorities right, and at worst are just wrong."
"Some degree" doesn't mean that it is proof, but that it is one piece of evidence that could form the start of something meaningful.
The point is, most people who think they need C++ for "hand-coded performance" are probably wrong.
David Hanley <da...@nospan.netright.com> writes: > Erik Naggum wrote:
> > | If C++ can get us increased productivity in the next quarter, great. > > | Let's use it. It would probably take more time than that to teach the > > | whole staff passable LISP.
> > I realize that it has become the norm to guise wild guesses in the cloth of > > respectable fact, but where do you find the foundation for your "probably"?
> Quite a bit of personal experience. Many functional programming > advocates have stated, in this thread, that moving to functional > programming > takes quite a bit of time. When I took SE in collecge, the prof tried > to > teach lisp for 1/2 the semester. No one cared about lisp--they wanted > to learn C++. > I've tried to show friends struggling with a C++ program how easy it > would be > in SML. People don't care, and it seems foreign.
To back this up, at my school C++ is taught to first-year computer science students, because the students want to learn C++ -- it's a marketable skill. Personally, I think that it is a bad choice, due to the complexity of the language. Students who don't even know how to think about programming a linear search over an array shouldn't have to worry about writing code to do the search over any structure that implements a forward iterator (but that's what they are doing). Other language choices (like C, Modula-2, or Scheme) were rejected because C++ is the language of choice right now (and I have heard talk of switching to Java)
In article <izwwolau9o....@mocha.CS.Princeton.EDU>,
bl...@mocha.cs.princeton.edu (Matthias Blume) wrote: > nobody has the resources to develop a complete telephone switch > in 10 different languages only for the purpose of a comparison.
This falls into the same category as the statement "We can't afford to do it right the first time, but we can afford to keep fixing it up with band-aids and baling wire".
The truth is that most large systems would be better off if they took their 200 grunts and broke them into 10-20 competing teams, each using what they considered the best approach. This solves 2 problems: you don't have to try to figure out in advance who are the best programmers (or the best programming languages), because that will subsequently become quite clear; and you don't have to have 5 layers of 'managers' and interminable meetings to try to coordinate 200 people.
I suspect that most companies who developed telephone switching software didn't start out to write 10 versions of the switch program, but they probably ended up that way.
cosc1...@bayou.uh.edu <cosc1...@Bayou.UH.EDU> wrote: > Peter da Silva (pe...@nmti.com) wrote: > : In article <5ln5nq$bc...@masala.cc.uh.edu>, > : cosc1...@bayou.uh.edu <cosc1...@Bayou.UH.EDU> wrote: > : > I think the question goes further to "do we even need to obtain and > : > dereference them?". I'm using Scheme, and before that Haskell -- 2 > : > languages without pointers, and I've yet to run into a situation > : > where I even remotely missed them much less thought about them. > : Last I checked, Scheme was a very close Lisp variant. Now, Lisp has pointers > : and pointer operations (CAR, CDR, RPLACA, RPLACD, ...). Doesn't Scheme? > However car, cdr, etc... implement their operations is a non-issue,
You're right, but I'm not talking about the implementation.
It's not that the Lisp cell is implemented as a pair of pointers.
It's that the lisp cell *is* a pair of pointers.
You can do everything with these pointers that you can do with pointers in any other language, except perform arithmetic on them. Which was the point of the message you're responding to in <5ln5nq$bc...@masala.cc.uh.edu>.
> This entire genre of operations is abstracted away from us, we are > given a view of lists.
Nonsense. You can build arbitrary structures with these pointers using the five basic operations (CONS, CAR, CDR, RPLACA, RPLACD). You obtain a pair of pointers with CONS, assign them with RPLACA and RPLACD, and dereference them with CAR and CDR.
There's really not much more to lisp than that. Toss in COND, SET, LAMBDA, and EVAL and I think you've got it. (Don't beat me up too hard if I missed something, it's been a while since I did a lot of lisp). And I'll bet you could implement SET by CARing and CDRing around in OBLIST. -- The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. Har du kramat din varg, idag? `-_-' Kulanu Kibo. Hail Eris! All Hail Discordia! Vi er alle Kibo. HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
Peter da Silva wrote: > It's not that the Lisp cell is implemented as a pair of pointers.
> It's that the lisp cell *is* a pair of pointers.
> You can do everything with these pointers that you can do with pointers in > any other language, except perform arithmetic on them. Which was the point > of the message you're responding to in <5ln5nq$bc...@masala.cc.uh.edu>.
This is true to almost exactly the same extent as is the statement "Every Lisp object is a pointer". In particular, you say one can do everything with half-cons-cells that one can with pointers, except arithmetic; well, actually there isn't much that one can do with pointers, except arithmetic :-), but in any case you can't e.g. build an array of pointers using this technology. You can, of course, build an array of Lisp objects, but you don't do so by going via cons cells.
Really, the main useful thing one can do with pointers is to compare them, yielding a notion of object identity. And Lisp provides the EQ predicate for any pair of objects, not just half-cons-cells.
> Nonsense. You can build arbitrary structures with these pointers using > the five basic operations (CONS, CAR, CDR, RPLACA, RPLACD). You obtain > a pair of pointers with CONS, assign them with RPLACA and RPLACD, and > dereference them with CAR and CDR.
> There's really not much more to lisp than that. Toss in COND, SET, LAMBDA, > and EVAL and I think you've got it. (Don't beat me up too hard if I missed > something, it's been a while since I did a lot of lisp). And I'll bet you > could implement SET by CARing and CDRing around in OBLIST.
Er. It seems like "a while" means "since the days of Lisp 1.5, or earlier"; or is this a troll?
Common Lisp provides arrays, hash tables, characters, strings, I/O streams, conditions, closures, classes, and so on and on and on.
Even Scheme, which is about as minimal as you'll find these days, has arrays as well as cons cells; and most Scheme implementations provide hash tables and things too, I believe.
And I don't remember the last time I used a Lisp implementation that had OBLIST.
HIBT?
-- Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics, gj...@dpmms.cam.ac.uk Cambridge University, England.
>I think you are beating the wrong horse here. First of all, many of >the hardcore C++ guys, Bjarne Stroustrup in particular, are NOT at >Lucent. And then, there are things like SML/NJ, for example, which >started at AT&T Bell Labs and are now continued at Lucent Bell Labs.
I've been dying to insert a comment into this discussion at some point, and this is probably my last best chance to get it in.
The C++ advocates debating here (and elsewhere) often bring up the fact that C++ has succeeded in the marketplace where alternatives, such as Lisp, have failed. When it is pointed out to them that market acceptance is not proof of worth, they agree and fall back on some other finer point that can be gathered from the fact of market acceptance (like proof that real software can be written in C++ and knocking down other similar strawmen).
The advantage to the C++ advocates in bringing up the relative success of C++ vs. alternatives is to EMBARRASS the advocates of alternatives. These discussions generally go something like:
C++ advocate: C++ is obviously a good thing, look at it's market acceptance.
Others: Yes, but Lisp is not accepted due to, uhhhh, sloppy thinking, uhhhh, cabal of software "experts" and their trade press lackeys, uhhhh, Microsoft politics, uhhh....
The problem is that Lisp is not accepted better and nobody really knows why. Those who attempt to explain it directly sound like paranoid conspiracy theorists, or they have some unfounded argument about Lisp syntax or GC or some other technical detail. I'm sure it's entertaining to the C++ advocates to watch all the weak-sounding defenses of Lisp (and alternatives) whenever they bring up the issue of market acceptance.
There has recently been a great deal of discussion about some studies that some claim were done in their organization at some time in the past that shows that C++ is, to some appreciable degree, better in most respects to C. The subjects of the studies were disciplined, expert C programmers.
In the spirit of asking embarrassing questions, why is it that the MOST expert C programmers, those fine folks at lucent.com chose C as the implementation language for both of their most recent visible projects, Plan 9 and Inferno? These people have had access to the best C++ technology and expertise in the recent past AND they have not, in the past, shown a reluctance to use other programming languages such as Pascal.
No, I don't think that I've added anything to the ongoing discussions. I just couldn't help myself.
In article <izyb91av0c....@mocha.CS.Princeton.EDU>, bl...@mocha.cs.princeton.edu (Matthias Blume) writes:
> In article <5me1ro$qe...@pf1.phil.uni-sb.de> s...@mpi-sb.mpg.de (Sean Matthews) writes:
> Funny. You know, contrary to the apparent beliefs of some people > in this thread, there are imaginative programmers in other parts > of the world than the USA, and even companies other than Lucent in > the telcom switch business.
> I think you are beating the wrong horse here. First of all, many of > the hardcore C++ guys, Bjarne Stroustrup in particular, are NOT at > Lucent. And then, there are things like SML/NJ, for example, which > started at AT&T Bell Labs and are now continued at Lucent Bell Labs.
> Regards, > -- > -Matthias
I think you misunderstand me. This remark wasn't aimed at people at Lucent/ATT/Bell labs (I lose track of exactly which bit is which these days). I was referring, maybe too obliquely, to some rather silly remarks made by other people which could generously be described as parochial.
Henry Baker wrote: > ... > I suspect that most companies who developed telephone switching software > didn't start out to write 10 versions of the switch program, but they > probably ended up that way.
Some of them instead invented their own languages. Ericsson invented Erlang to build/prototype telephone switches since there were proper languages available. C++ was not even concidered. Erlang is a process-oriented and declarative functional language that looks very much like Prolog (no back-tracking).
o...@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes:
> The interesting thing is that I originally set out to demonstrate the > impact of a design decision in the STL which I regard as dubious, and > that decision is also present in Scheme. The design decision is make > all comparison-based algorithms use exclusively a BOOLEAN-valued test.
Yes, that was a dubious design decision. In fact, I'd go so far as to simply say "wrong". Three-way comparisons are sometimes much better than two-way.
(The original version of the STL, before it was incorporated into the C++ standard, did have algorithms with both two-way and three-way comparisons. When it was made part of the standard, though, features were removed. This wasn't the only useful feature tobe taken out.)
It's easy to construct test cases that show three-way comparisons to be much better than two-way. It's also easy, of course, to construct test cases that show exactly the opposite. A good library ought to provide both.
Jordan Henderson <jor...@Starbase.NeoSoft.COM> wrote: > C++ advocate: C++ is obviously a good thing, look at it's > market acceptance.
Response: Windows 95 is obviously a good thing. Look at its market acceptance.
Side issue: let's not lump everyone into Lisp Advocate Versus C++ Advocate.
Some of us are devout agnostics.
> The problem is that Lisp is not accepted better and nobody really knows > why.
Lisp looks weird. I like it, but I'm a weirdo.
Heck, I like Tcl. But then Tcl is a lisp variant.
> No, I don't think that I've added anything to the ongoing discussions. I > just couldn't help myself.
You naughty boy, Jordan.
PS: "HI!" -- The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. Har du kramat din varg, idag? `-_-' Kulanu Kibo. Hail Eris! All Hail Discordia! Vi er alle Kibo. HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
* Peter da Silva | There's really not much more to lisp than that. Toss in COND, SET, LAMBDA, | and EVAL and I think you've got it. (Don't beat me up too hard if I missed | something, it's been a while since I did a lot of lisp). And I'll bet you | could implement SET by CARing and CDRing around in OBLIST.
"a while"? looks like it was 25 years since you last saw Lisp. *sigh*
in Common Lisp (since 1984), you could use hash tables for sets.
as for your theory of dereferencing pointers, a CONS is an object with two slots. CAR returns the _contents_ of the first slot, CDR the second. if you pass an object not created by CONS to CAR, you get a type error.
#\Erik -- if we work harder, will obsolescence be farther ahead or closer?
> In article <5mbhae$u...@goanna.cs.rmit.edu.au> o...@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes:
> [a 346-line message, to which I do not have time to respond in detail, > but of which I believe the main point is]
> > Yeah, well, all I can say is that the test was actually written in the > > expectation that it would show something very different. I found the > > results *shockingly* different from what I had expected. It certainly > > wasn't written with the intention of stressing whatever it is that it > > does stress.
> ...
> > - an experienced programmer wrote a program in three languages. > > - the program is small, but follows an historically extremely important > > outline: sort two sequences and merge them.
> ...
> > - the results were shockingly different: 1:3:9 C:Scheme:C++ times.
> ...
> > question is yes" is a triumph of faith over reason. I *tried* it. > > It just plain DID NOT HAPPEN THAT WAY. C++ generic/C++ specific = 6/1.
> If this is true -- that is, if what you think you are measuring is what > you are actually measuring, then there is surely a performance bug somewhere.
> It might be in the compiler, or in the particular implementation of STL, > or elsewhere in the library, but something is definitely not working > as it should.
> If you had said `I don't want to use C++ because the compiler available > to me has a serious performance bug,' I would have nothing to say. > If you had proof that what looks like a bug is actually an > intrinsic flaw in the language, then I would also have nothing to say.
> But to dismiss the entire language because one implementation appears > to have a performance bug that shows up in one test case is just silly.
It does show one important thing:
This discussion came from the STL thread. What eventually seemed to come from that thread was that C++ was used for STL was because it would be faster than other languages available. At least, I never heard anyone claim that C++ was used for any other reason, and I asked many times.
Mr okeffe's test shows that, a least for a naive program, such as _many_ programmers might write, that STL in C++ will not necessarily be faster than the alternatives.
Now, I don't care what Mr Stepanov wrote his STL in. If he likes C++, fine, wonderful. I'd like to find out why he likes it, though I never did figure it out. And now he's gone away.
Incedentally, common lisp has hashtables, and I'd be interested to see how common lisp code from a good compiler competes with the C++ STL hashset version. But I don't expect this would prove anything to anyone. If the LISP code were slower, or the C++ code were slower, people would still remain in their respective camps. I personally think they'd be pretty close in speed if both were 'tweaked'.
Interestingly, it seems that generics in SML ought to be as fast as the 'best possible' C++ generics, though ML compilers seem to have lagged. However, some LISP compilers seem to emit pretty good generic code!
In article <86wwojd3jg....@g.pet.cam.ac.uk>, Gareth McCaughan <gj...@dpmms.cam.ac.uk> wrote:
> Peter da Silva wrote: > > It's not that the Lisp cell is implemented as a pair of pointers.
> > It's that the lisp cell *is* a pair of pointers.
> > You can do everything with these pointers that you can do with pointers in > > any other language, except perform arithmetic on them. Which was the point > > of the message you're responding to in <5ln5nq$bc...@masala.cc.uh.edu>. > This is true to almost exactly the same extent as is the statement > "Every Lisp object is a pointer".
Depending on the definition of "pointer", sure.
Look, let's put this in a wee bit of context.
The message that spawned this side-thread said something like "the only problem with C pointers is that they support arithmetic, what if all you could do was allocate and dereference them?". And, presumably, assign them... otherwise there's nothing to dereference.
So this guy at UH said he didn't even want pointers that did that much, and pointed to scheme as a pointerless language.
The point I'm trying to make is, that if you take out the arithmetic, but still call what's left a "pointer", then scheme does have pointers. Now you can argue that what's left isn't really a pointer any more. That's quite legitimate, but then it's sort of hard to understand the original objection, because they're not pointers when they're embedded in C either.
> Er. It seems like "a while" means "since the days of Lisp 1.5, or > earlier"; or is this a troll?
Is Lisp 1.5 still lisp?
> Common Lisp provides arrays, hash tables, characters, strings, > I/O streams, conditions, closures, classes, and so on and > on and on.
But those things don't define what Lisp is. They're elaborations. Lisp, at the bottom level, is the list. The ability to express programs and data in the same format, and manipulate it using list operations, is what really defines a language as being part of the lisp family.
> HIBT?
No. I'm simply ignoring a lot of irrelevant issues that, while they make the language more efficient and convenient, don't change its essential nature.
-- The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. Har du kramat din varg, idag? `-_-' Kulanu Kibo. Hail Eris! All Hail Discordia! Vi er alle Kibo. HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
* Peter da Silva | But those things don't define what Lisp is. They're elaborations. Lisp, | at the bottom level, is the list. The ability to express programs and | data in the same format, and manipulate it using list operations, is what | really defines a language as being part of the lisp family.
it's a persistent myth that Lisp has only one data type, the list. (obviously, there must be a list of _something_, but hey, myths don't generally respect logic any day of the week.) I don't think it's wise to keep that myth alive.
another persistent myth is that Lisp programs are lists. they aren't. Lisp _source_ code uses lists. _compiled_, it is another data type, like a code vector, which includes native machine code or perhaps byte code.
what defines the Lisp family to me, after I have had the opportunity to refine my definition over time, is READ/WRITE CONSISTENCY. all languages in the extended Lisp family have this in common, and no languages outside the Lisp family can sport anything like it. that is, the ability to print (write) some object out in text form and read it back in again (or the other way around, depending on where the object is originating).
#\Erik -- if we work harder, will obsolescence be farther ahead or closer?
In article <3073830464727...@naggum.no>, Erik Naggum <e...@naggum.no> wrote:
> in Common Lisp (since 1984), you could use hash tables for sets.
But a language without hash tables is still a lisp. A language without lists isn't a lisp.
> as for your theory of dereferencing pointers, a CONS is an object with two > slots.
What's the difference between a slot and a pointer, semantically?
> CAR returns the _contents_ of the first slot, CDR the second.
"Returning the contents of" is "dereferencing". That's what the word means, taking a reference to an object and returning the object itself. Whether the words you use are "a slot containing an object" or "a pointer to an object", semantically the operation is the same one.
> if you pass an object not created by CONS to CAR, you get a type error.
Yes, they're safe. That's cool. That's also true of pointers in Pascal.
If I say "var a: int" and then later "a^" it'll give me a type error. Should the pointers in Pascal be called "slots" instead?
Let's say I defined a C-like language with "slots" instead of "pointers". If the operations on the "slots" are restricted to exclude arithmetic (which means excluding casting, because that allows you to perform arithmetic), then are they somehow no longer pointers? If not, how do they differ from the "slots" you're talking about above?
(remember, I'm just responding to an assertion that pointers, as defined above, don't exist in scheme) -- The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. Har du kramat din varg, idag? `-_-' Kulanu Kibo. Hail Eris! All Hail Discordia! Vi er alle Kibo. HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
In article <3073836438931...@naggum.no>, Erik Naggum <e...@naggum.no> wrote:
> * Peter da Silva > | But those things don't define what Lisp is. They're elaborations. Lisp, > | at the bottom level, is the list. The ability to express programs and > | data in the same format, and manipulate it using list operations, is what > | really defines a language as being part of the lisp family. > it's a persistent myth that Lisp has only one data type, the list.
Of course it doesn't *just* have one data type, any more than APL just has arrays. But it is the list that defines what Lisp is.
> another persistent myth is that Lisp programs are lists. they aren't.
Sure they are. Compilation is just an optimization. If you know that you're never going to manipulate a chunk of code, it's a perfectly reasonable optimization to generate a more efficient representation of the same code.
(this is an extension of the aphorism that "all programming is an excersize in caching)
But semantically compilation has no effect on understanding a Lisp program.
> what defines the Lisp family to me, after I have had the opportunity to > refine my definition over time, is READ/WRITE CONSISTENCY. all languages > in the extended Lisp family have this in common, and no languages outside > the Lisp family can sport anything like it. that is, the ability to print > (write) some object out in text form and read it back in again (or the > other way around, depending on where the object is originating).
You mean like in APL? I don't consider APL part of the extended Lisp family but it has this property. It's been a while since I've dug into Smalltalk but I'm pretty sure it has this property as well. If not, it would not be hard to extend Smalltalk to have it (simply add a "dump" method to the each primitive object, and define it for collections).
This property is a natural consequence of the original structure of lisp, and it's been extended with lisp because it's a useful property, but I think it's a metaphenomenon, one of the many delightful results of the core structure of the language. -- The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. Har du kramat din varg, idag? `-_-' Kulanu Kibo. Hail Eris! All Hail Discordia! Vi er alle Kibo. HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
> You're right, but I'm not talking about the implementation. It's > not that the Lisp cell is implemented as a pair of pointers. It's > that the lisp cell *is* a pair of pointers.
[... you can implement everything as a list ...]
> There's really not much more to lisp than that. Toss in COND, SET, > LAMBDA, and EVAL and I think you've got it. (Don't beat me up too > hard if I missed something, it's been a while since I did a lot of > lisp). And I'll bet you could implement SET by CARing and CDRing > around in OBLIST.
-- Hrvoje Niksic <hnik...@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- Unspeakable horrors from outer space paralyze the living and resurrect the dead!
Peter da Silva (pe...@nmti.com) wrote: : In article <5mfos6$ng...@masala.cc.uh.edu>,
[Snip]
: > However car, cdr, etc... implement their operations is a non-issue,
: You're right, but I'm not talking about the implementation.
: It's not that the Lisp cell is implemented as a pair of pointers.
: It's that the lisp cell *is* a pair of pointers.
If this detail is something that we need not be aware of then it is an implementation issue as far as I am concerned. My point in all of this -- and one that I made before, is what we as the programmers are seeing.
: You can do everything with these pointers that you can do with pointers in : any other language, except perform arithmetic on them. Which was the point : of the message you're responding to in <5ln5nq$bc...@masala.cc.uh.edu>.
It's nice to know that you've kept enough of a handle on this thread to supply a specific reference, yet it's depressing to know that you haven't kept enough of a handle on this thread to know what I've been talking about all along.
I was comparing a generalized pointer ala C with Lisp's generalized list mechanism. My entire point was that these were two entirely different beasts. The newcomer to Lisp can be told that there are no pointers in the language and will never be the wiser (particularly if s/he utilizes a functional style as I do in Scheme). This is all that matters and that is my point.
: > This entire genre of operations is abstracted away from us, we are : > given a view of lists.
: Nonsense. You can build arbitrary structures with these pointers using : the five basic operations (CONS, CAR, CDR, RPLACA, RPLACD). You obtain : a pair of pointers with CONS, assign them with RPLACA and RPLACD, and : dereference them with CAR and CDR.
Arbitrary structures of these _LISTS_ are nothing more than _LISTS_ of _LISTS_. Again there is no resemblence to the traditional pointer -- we don't allocate to it, we don't use any stupid dereferencing symbols, etc...
Lisp is about Lists. As far as I'm concerned there are no pointers and until I encounter a situation that breaks the abstraction of the high level object (lists), then I will not budge.
When you can show me an example of Lisp code that dereferences pointers ala C or Pascal then I'll believe you, until then, you have proven nothing.
: There's really not much more to lisp than that. Toss in COND, SET, LAMBDA, : and EVAL and I think you've got it. (Don't beat me up too hard if I missed : something, it's been a while since I did a lot of lisp). And I'll bet you : could implement SET by CARing and CDRing around in OBLIST.
*Sigh*. Read back a few more articles.
: -- : The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. : Har du kramat din varg, idag? `-_-' Kulanu Kibo. : Hail Eris! All Hail Discordia! Vi er alle Kibo. : HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
-- Cya, Ahmed
Momma, where's your little daughter? She's here, right here on the altar. You should never have opened that door, Now you're never gonna see her no more. "You Should Never Have Opened that Door" by the Ramones
Peter da Silva (pe...@nmti.com) wrote: : In article <86wwojd3jg....@g.pet.cam.ac.uk>,
[Snip]
: Depending on the definition of "pointer", sure.
This has been covered several articles back -- do your homework.
: Look, let's put this in a wee bit of context.
It's been put in context already -- check the above.
: The message that spawned this side-thread said something like "the only : problem with C pointers is that they support arithmetic, what if all you : could do was allocate and dereference them?". And, presumably, assign : them... otherwise there's nothing to dereference.
: So this guy at UH said he didn't even want pointers that did that much, and : pointed to scheme as a pointerless language.
Again, if you read the threads thoroughly, you would know by now that this was discussed with an emphasis on interface. GC, no annoying "pointer vs. value" syntax, etc...
: The point I'm trying to make is, that if you take out the arithmetic, but : still call what's left a "pointer", then scheme does have pointers. Now you : can argue that what's left isn't really a pointer any more. That's quite : legitimate, but then it's sort of hard to understand the original objection, : because they're not pointers when they're embedded in C either.
But in C they do have arithmetic properties so your statement is quite pointless.
: > Er. It seems like "a while" means "since the days of Lisp 1.5, or : > earlier"; or is this a troll?
: Is Lisp 1.5 still lisp?
It depends on your definition of "Lisp". Maybe we could squabble over this a while to make you realize just how pointless your quibbles are.
: > Common Lisp provides arrays, hash tables, characters, strings, : > I/O streams, conditions, closures, classes, and so on and : > on and on.
: But those things don't define what Lisp is. They're elaborations. Lisp, at : the bottom level, is the list. The ability to express programs and data in : the same format, and manipulate it using list operations, is what really : defines a language as being part of the lisp family.
Interface vs. Implementation. See pointers. Re-read passage.
: > HIBT?
: No. I'm simply ignoring a lot of irrelevant issues that, while they make the : language more efficient and convenient, don't change its essential nature.
That would depend on what you consider "its essential nature" to be now wouldn't it?
: -- : The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. : Har du kramat din varg, idag? `-_-' Kulanu Kibo. : Hail Eris! All Hail Discordia! Vi er alle Kibo. : HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
-- Cya, Ahmed
Momma, where's your little daughter? She's here, right here on the altar. You should never have opened that door, Now you're never gonna see her no more. "You Should Never Have Opened that Door" by the Ramones
Peter da Silva (pe...@nmti.com) wrote: : In article <3073830464727...@naggum.no>, Erik Naggum <e...@naggum.no> wrote: : > in Common Lisp (since 1984), you could use hash tables for sets.
<Irritable Mode On>
: But a language without hash tables is still a lisp. A language without : lists isn't a lisp.
<Sarcasm On>
A language without hash tables isn't necessarily a lisp. C doesn't have hash tables, yet by your logic it is a lisp.
<Sarcasm Off>
: > as for your theory of dereferencing pointers, a CONS is an object with two : > slots.
: What's the difference between a slot and a pointer, semantically? ^^^^^^^^^^^^^
Semantics has nothing to do with it. My arguments were not with respect to semantics, and if you had bothered to pay attention you would know this.
: > CAR returns the _contents_ of the first slot, CDR the second.
: "Returning the contents of" is "dereferencing". That's what the word : means, taking a reference to an object and returning the object itself. : Whether the words you use are "a slot containing an object" or "a pointer : to an object", semantically the operation is the same one. ^^^^^^^^^^^^
Again since I'm not talking about semantics, your passage is irrelevant.
[Snip]
: (remember, I'm just responding to an assertion that pointers, as defined above, : don't exist in scheme)
Pointers as defined in a previous thread which you obviously didn't read.
Suggestion: Read that thread.
<Irritable Mode Off>
: -- : The Reverend Peter da Silva, ULC, COQO, BOFH, 3D0G, KIBO, POPE Ziggy Wotzit II. : Har du kramat din varg, idag? `-_-' Kulanu Kibo. : Hail Eris! All Hail Discordia! Vi er alle Kibo. : HEIL KIBO! HEIL KIBO! HEIL KIBO! Wir sind alle Kibo.
-- Cya, Ahmed
Momma, where's your little daughter? She's here, right here on the altar. You should never have opened that door, Now you're never gonna see her no more. "You Should Never Have Opened that Door" by the Ramones
In article <338BA992.6...@possibility.com>, t...@possibility.com wrote: > Rainer Joswig wrote:
> > In article <5maer6$...@uni.library.ucla.edu>, jmar...@cs.ucla.edu (Jay > > Martin) wrote: > > The Lisp system worked. One person > > told me that he phoned home to France using the switch.
> Working means it works under full load, not for a call. Is > there any experience under these conditions?
What kind of a question is this? Do you really think they are building an ATM switch that does not perform well in the real world?
From the Franz, Inc. web site:
Lucent Technologies, formerly AT&T Network Systems and Bell Labs Research, has licensed Allegro CL products for the past 10 years. Lucent's various projects involving Allegro CL development have included a distributed service workbench for video on demand applications over ATM, ATM switching, and interfaces to various database systems.
A switching application known as the Globeview-2000 Broadband System was developed to accommodate new or custom services such as routing by call origin, call forwarding, universal telephone numbers, voice mail and other services. These services could be updated on-the-fly to a running switch because of Allegro CL's Dynamic Objects technology.
> > - a number of special purpose processors doing the switching
> Ok, so hardware did all the fast stuff and Lisp was the glue.
Oh guys... What do think how a switching system in the
>10 Gbps range works? > Question 1: was the lisp used commerically > available or was it home spun? If so it would be very > difficult for your average shop to reproduce the results.
Ask Symbolics, Harlequin and Franz.
> Question 2: how would it work in small memory footprint and > anemic processor environments? > A switch is going to have all the memory and processor > it needs, an embedded toaster won't.
a...@research.att.com (Andrew Koenig) writes: >But to dismiss the entire language because one implementation appears >to have a performance bug that shows up in one test case is just silly.
It would be, but I haven't done any such thing.
First of all, *YOU* have provided no evidence whatsoever that this is a 'performance bug'. It would appear that any discrepancy between the "C++ is fast" religion and practice will be dismissed as 'a performance bug'. Is there any conceivable measurement, involving any C++ program and any *actual* compiler, that would lead someone to decide against C++, which you could not similarly dismiss as 'just silly' because it's only due to 'a performance bug'?
Don't forget, I tried *TWO* independent implementations of C++. One couldn't compile the program *AT ALL*. The other one did, and it ran slow.
Now, it appears that a large part of the problem is due to the use of the <string> header and the 'string' data type therein. This is not part of the compiler. I suppose you could call it a 'performance bug' in the library, and
*if* you could provide me with a version of <string> that came as close to standard conformance as the one in libg++, and *if* the program then ran faster, you would hvae *evidence* of a 'performance bug' in the library. I'm quite willing to believe it.
*Some* C++ advocates in this thread have provided more than excuses. I've forgotten who it was that tried the thing out using char* instead of <string>. THAT WAS WELL DONE! That was USEFUL! It did establish that <string> is part of the problem in this test.
But where is the evidence that an efficient implementation of <string> is actually *possible*? There's a known performance design bug in Scheme strings (strings are mutable, which forces (substring) to copy instead of sharing). C++ <string> has the same performance design bug. That's not the only one.
Don't forget, it's not really a matter of 'one implementation, one bug, one test" amongst many. For *me* the actual experience was "the *BEST* compiler I had access to, the *FIRST* serious test I did." Do you call someone 'just silly' who fears the flame after his fingers are burnt the first time? I have actually done several other tests since the first one, and while they are not all as extreme, they all consistently show C++ to be more than a factor of 2 slower than C *IF* I use the features of C++ that are not also in C. If I use the C-like aspects of C++, then I get C-like performance, which makes it rather hard to believe in 'performance bugs'.
Frankly, for me the really damning thing is CC, not g++. I don't know when the feaures I have been trying were first put in the C++ draft standard, but they were there in April 1995, and they were still there looking just the same in December 1996, and yet the latest C++ compiler from a major vendor, which we installed in February 1997, WAS NOT ABLE TO COMPILE A PROGRAM USING <string> AT ALL.
Being unimpressed by a language on the basis of one bad benchmark might be silly (though nowhere near as silly as trying to pretend that it has no significance at all), but surely no-one in these closing years of the 20th century would want to deny that _dramatic_ differences in what compilers for the 'same' langauge actually accept is cause for concern? (After all, it _was_ the most commonly given excuse for not using Prolog.)
Hans-Juergen Boehm <bo...@mti.sgi.com> writes: >I think it has been established that the C++ program is NOT the most >efficient way to solve the problem in C++.
Of course not! The most efficient way to solve the problem in C++ is to compile the C version with a C++ compiler!
>Two of us have posted much >faster C++ solutions to the same problem, using either sets or vectors >instead of lists.
I cannot get over this! I write a program precisely to test out one particular data structure, and people dismiss it because _another_ data structure isn't as bad!
I have also posted numbers for a more efficient solution to the problem, and while the C++ code using <set> AND <list> was less inefficient than the C++ code using <list> alone, it was STILL no less than FOUR TIMES SLOWER than the corresponding C code.
>It also presumably does not use the same data >structure as the Scheme program (the C++ code uses doubly linked lists,
Again, *THAT IS THE BLOODY POINT*!
Now, I *do* accept as a valid criticism that there *is* an STL- compatible <slist>, and I know where to find it. A pity it isn't in the standard. Perhaps it will be.
>I would be amazed if the Scheme program did), nor does it use the same >algorithm (duplicates eliminated early vs. late).
Again, THAT IS THE BLOODY POINT! The fact that the efficient algorithm was *missing* is an important and relevant fact!
>Thus it seems to me the Scheme to C++ comparisons using this benchmark >don't show much, as it stands. You either need to compare the fastest >possible programs to solve a given problem, or solutions based on >exactly the same algorithms and data structures.
Come *on*! Anyone who tries to understand this as a Scheme -vs- C++ contest has missed everything that matters about it. It isn't even a *C* -vs- C++ contest, although that would be more accurate. My interest was in the STL! The point at issue is whether using the STL does or does not make it easy to do efficient sort/sort/merge operations. The entire absence of batch operations from <set> made it pointless to use that data structure at all.
I consider it beyond any possible dispute that >>> C++ <<< can solve this problem (or indeed most others) as efficiently as C.
The question is whether *using the STL* helps. The aim was to build the simplest clearest solution using the STL in a fair way, and to compare that with reusing existing Scheme and C library code.
>(The latter is still >tricky because Scheme implementations emphasize list handling, where C++ >usually does better with arrays.) >The current benchmark does neither, >though it was an honest attempt to do the latter. Benchmarking is hard.
For what it's worth, the STL version using <set> is STILL FOUR TIMES SLOWER than using C code that maintains a set. At least half of this must be due to using <string> instead of char*. But there again, if I've got to avoid <string> in order to get good performance, what's the point of having it?