Slashdot Log In
Kent M. Pitman's Second Wind
from the paraffin-wax-bath-for-kent's-hands dept.
12) Good texts for learning Scheme?
by drenehtsral
I have recently been working on learning Scheme in my spare time, with the eventual goal of writing a scheme based scripting system to run the guts of a massive adventure game/graphical mud sort of system, everything from environment simulation (predator/prey cycles, etc...) to 3d models (i.e. models will be geometry glued together by scripts so you could have trees that by a random seed and a growth level variable have grown over time and are unique to provide interresting landscape features). Scheme is appealing because it's simple, powerful, and adapts well to the idea of a threaded interpreter.
To further my goal of learning Scheme inside and out, I've been reading "The Little Schemer," as well as "Structure and Interpretation of Computer Programs." Do you have any other recommendations for good Scheme programming texts?
Kent M. Pitman: You can get a list of textbooks from Schemers website. If you can articulate a particular need or preference that you think should help narrow down the many available choices, I'd suggest posting a more specific inquiry to the comp.lang.scheme newsgroup.
13) Overlooked practical aspects of Lisp
by hding
Why do you think that people so often overlook many of the wonderful things in Common Lisp such as unwind-protect, the whole condition system (which you are of course closely associated with), and so on - things that make it very useful for day-to-day programming, and are there any such things that you'd particularly highlight, or conversely that you wish had become part of the standard but did not.
Incidentally, thank you for all of the insight so generously and regularly poured forth in comp.lang.lisp.
KMP: Well, people program with tools that are familiar to them. Unless Common Lisp is someone's first language, it'd be easy for them to overlook the things it contains that are not like the things they're familiar with. There's a certain irony here because often the reason people will leave a language for another language is that they've reached the limits of what they can do with the first language and they need more power. So you'd expect that they'd aggressively look for features of the new language that were different than the things they've used before. And probably some do. But you're right that others cling to the safety and familiarity of the operators they could just as well have found in the old language they left behind, and so in the process they miss out on what the language can offer them.
Fortunately, unwind-protect is finally (pardon the pun) present in Java. And some hints of the Common Lisp condition system made it into Java as well. So probably people who come to Common Lisp from Java will be inclined to seek out those capabilities. But there's a lot of other stuff there and I hope new users will indulge their curiosity and take the time to explore.
As to what we should have in the language, the main omission of note is some sort of system definition tool (the in-Lisp analog of make). It was a shame that we did a feature-freeze on ANSI Common Lisp in 1988 but didn't get the standard out until 1994, and the suggestion of including such a tool didn't come until the after-freeze period. All vendors offer such a facility, but programs would be more portable if there were a uniform solution.
There are also quite a number of things about Common Lisp that are available in the same or similar forms in nearly all implementations. Multi-tasking, sockets, database access, external function call, windowing, and so on. It wouldn't be bad to have included any of these, but the fact is that they weren't ready for standarization in 1988. At this point, though, I think other mechanisms than standards are the right way to proceed.
The Lisp community used to expect the delivery mechanism for new functionality to be a new language spec. But that requires working through consensus standards bodies. The problem is that, by their nature, standards bodies are synchronization mechanisms. The problem with synchronization mechanisms in a massively parallel world is that they slow things down. The world is not going to wait for us to slow down, so I think we need to evolve mechanisms that will keep up better with a degree of pace that is externally dictated.
I think this is an area where Lisp as a community has been slow to respond. There need to be community mechanisms for sharing the many great commercial and private packages people have been creating in Lisp, so that we can properly reap the cross-product benefits of our community's productivity. I see evidence that this is changing. The Common Lisp Open Code Collection (CLOCC) is one such mechanism that addresses open source code. I'd like to see similar mechanisms arise for the exchange of proprietary products as well.
As to my posts on the comp.lang.lisp newsgroup, thank you. I'm glad you enjoy them. Frankly, I always consider it a victory to hear I haven't bored everyone to death. In background I've been working on putting together several books on Lisp, but one never quite knows if one will finish such things. I regard comp.lang.lisp as a kind of insurance policy, assuring that at least some piece of what I have seen and done in my career gets transferred from individual memory to global group memory.
I think preserving individual experiences for history is quite important. In the future, this will happen naturally due to logs kept by online collaboration tools. But I'm especially worried about the records of what happened between about 1960 (the birth of programming languages) and 1994 (the birth of the web). Most of everything in that time range is recorded on paper and will eventually be lost. Looking back from the future, I expect it to be as confusing to figure out how the information society was born as it is to look back in a telescope to see the birth of the Universe. You'll get very close, but then you'll get to a point where you can see nothing. The informational big bang. I've been working on webbing all of my old hardcopy papers, and I hope others of that era will commit to doing the same.
14) Lisp - Scheme - ML
by Tom7
I know a lot of big academic (erstwhile) lisp shops, such as CMU, have transitioned away from lisp to ML [standardml.org] and relatives [inria.fr]. Some of the reasons we might give are:
- Sophisticated type systems, catching most bugs before your program is run, ensuring safety, etc.
- Much more efficient (http://www.bagley.org/~doug/shootout/craps.shtml), partly due to compilation strategies using types
- Increased modularity and abstraction
- Pattern matching, (subjectively) more natural syntax
In fact, I'm one of those people. I've been scoffed at by lisp fans, but most had never used ML. But I have an open mind, so, in the face of more "modern" languages, what advantages do lisp and scheme offer? Do you think that these advantages are fundamentally impossible to achieve in a typed setting?
KMP: First, I assume by "typed" you mean "statically typed." I think of Lisp as "dynamically typed." I think of most machine languages as "untyped." I've heard statically typed languages sometimes called strongly typed, and I sometimes use this terminology myself out of habit, but I've grown to dislike it because it seems to me that the issue of strength ought to refer to whether you check types, not when you do. The terms "static" and "dynamic" seem to me to better get to the heart of the matter.
To quote Abraham Lincoln, admittedly somewhat out of context, "People who like this sort of thing will find this the sort of thing they like." So to somewhat flippantly re-interpret Lincoln's remarks in a modern context, applying perhaps just a bit of obligatory political spin to the result: The fact that functional languages appeal to people who like functional languages is not a proof that functional languages are of general purpose appeal.
I think the real reason that CMU (or any university with a grant-based funding model) changed its direction is good sources of funding in research depend on saying you're doing something "new and different." Such a shift doesn't imply that the thing left behind wasn't "tried and true," but only that "tried and true" is not what gets research dollars. Research must constantly stir the mix, but that doesn't imply obsolescence to what came before. So don't read too much into that.
Answering each of your points in detail might require a whole article, but I'll touch on each in brief:
- Sophisticated type systems, catching most bugs before your
program is run, ensuring safety, etc. Much more efficient partly due to
compilation strategies using types.
Actually, it's funny that you both mention the CMU project and then make this comment. Before moving away from Common Lisp, the CMU crowd was successful in demonstrating to the Lisp community's satisfaction that there were enormous opportunities offered by the Common Lisp language design in terms of type inferencing that still today go untapped by implementations. This is really a market issue, not a language design issue. The fact is that although other languages do a lot more type inferencing, vendors are not getting huge numbers of bug reports saying that better type inferencing is what stands between programmers and the commercial success of their product. Over time, I think you'll see more and more interesting type analysis done, but such work is always balanced against other needs of users, such as CORBA, COM, RMI, and web interfaces, for example, such as UI toolkits and debugging options. When I observe, as I often do, that languages are political parties, this is what I mean. They are each responsive not to the needs of the world, but to the needs of their constituencies. And the Lisp constituency, while it is not oblivious to the value of type inferencing, does not see that issue as its number one priority.
- Increased modularity and abstraction.
This is quite a multidimensional space. I think Lisp provides great opportunities for modularity and abstraction that other languages do not. And yet, there are sometimes things I can't abstract as well as I wish. An example of a minor omission: Common Lisp's CLOS doesn't do protocol abstraction as well as Zetalisp's New Flavors; among other things, one can't declare that certain unimplemented methods are required. But with the use of the macro system and the Meta-Object Protocol (MOP), one can add this kind of thing. Further, the package system is missing certain kinds of inheritance capabilities I've often wished for, but I recently sat down and did the work of writing my own versions of defpackage for my own use, adding the capabilities I wanted in a way that my own tools can use, and I had no difficulty. For the most part, I've found the limitations of Common Lisp's abstraction capabilites to be incidental, and not deep, and I've found its syntactic reorganization capabilities more than capable of making up for it.
-
Pattern matching.
I think you're right that Lisp doesn't do pattern matching. Whether or not that's a good or bad thing is subjective. I think there are people who like pattern matching and people who don't. In fairness to Lisp, though, on the few occasions in my career where I've felt a strong need for pattern matching, I've been able to implement it easily. And, importantly, Lisp's syntactic adaptability has allowed me to make my personal implementation look as natural in the programs I write as if it were natively provided by the language; most other languages don't give me the syntactic control to be able to add new functionality in a way that feels appropriate to the language. So personally, I don't find this a strong negative; rather, I see it as an opportunity for you to create a layered library that supports the needs of yourself and others like you.
-
(Subjectively) more natural syntax.
I don't think you can make the case that much of any language has "natural" syntax. COBOL and HyperTalk gave this the fairest shot and there's a big difference even between them and any natural language. I personally find Lisp syntax remarkably natural in that it focuses on symbols that you could say out loud, marking them minimally to indicate grouping. Other languages contain lots of special-purpose markers like commas, semicolons, asterisks, and braces/brackets/parens that are used in quite nitpicky ways. All this to say that you're right on this one: it's subjective. And as such, I hope I can fairly dismiss this as an even draw.
15) Lisp in Mathematics Programming
by An Anonymous Coward
Gregory Chaitin has a book called "The Limits of Mathematics." In it he claims that mathematicians should love Lisp because Lisp is basically set theory, and all mathematicians love set theory. I wholeheartedly agree with this, one only needs to look at Chaitin's Lisp programs to realize how quickly and succinctly one can arrive at astonishing incompleteness results in mathematics. So we know Lisp is great for stuff like this, really researching a mathematical subject. Do you see Lisp continuing in this direction, showing and discovering theorems, or will it move into industry? Or has it moved into industry, and we just don't know it? Do the likes of NASA and JPL use Lisp and Scheme religiously? I would bet so.
KMP: Lisp may have started out as a way of addressing abstract topics like math (logic, calculus, prime numbers, etc.) and artificial intelligence, but it long ago made the transition to commercial applications. Both Scheme and Common Lisp have been and continue to be used in real-world applications that might surprise you. These include (but are certainly not limited to) applications in airline scheduling, commercial database manipulation, computer operating systems, bioengineering, web services, document format translation, and, yes, even space exploration. Franz, Inc. has created quite a nice page of Lisp success stories that I think expand on this much better than I could in the space I've allowed myself to answer this question. And speaking of NASA/JPL, they did a comparative study of Lisp vs Java and C++ that some might find interesting.
16) Scheme in CS
by An Anonymous Coward
It seems many of the more popular CS programs in the world use Scheme as a teaching language. A lot of times, students complain about this, saying they'd prefer to learn about C or another language that is considered "apt for industry." I used to be like this too, but have now discovered the error of my thinking. How have you convinced others that while the latest programs might not be written in Scheme, that it is worth a student's time to learn Scheme. Many seem stuck to the point that if they won't use it outside of school, they shouldn't learn it. How can we convince them otherwise, to become scholarly citizens instead of drones?
KMP: I think the thing to explain to a student is that the world is ever changing and that one cannot put ones eggs all in one basket. Furthermore, modern environments are often quite heterogeneous, with different languages and systems being used together cooperatively. Especially for a CS student, who often has the luxury of time that a person in the job world does not, I think it's worth taking time to learn as many different languages as possible. This not only exposes the students to alternate ways of thinking, but it also prepares the student to quickly change modes of thought or languages of expression later. Once on the job, one often can't afford the ramp-up time to learn a new language at the point it becomes necessary to use. Better to already know it and just have to "brush up".
One is much more likely to consider alternative approaches if one has a sense of what is involved in them; it's very easy to fear the unknown, even when the unknown might be of great help. So get to know as many things as you can while you can. Common Lisp and Scheme, which I regard as two very different languages, by the way, should definitely be among the things every student studies. But they should not be the only things the person studies. Like it or not, there is a lot the professional programmer needs to know to be really successful not just tomorrow, but for a lifetime.
As Oliver Wendell Holmes is often quoted as saying, "A mind stretched to a new idea never returns to its original dimensions." In order to stretch a student's mind, I recommend they make a list of "kinds of languages" and then learn as many different kinds as they can. Here are some that come to mind, though I'm sure others with different experience than me might reasonably contribute still others.
- A block-structured language, such as Algol or Pascal or Scheme.
- A line-oriented language, such as Fortran or BASIC.
- A rule-based logic language, such as Prolog or EMYCIN.
- An Englishy language such as HyperTalk or Cobol.
- A "stack" language such as PostScript.
- A "line noise" language (heavy emphasis on one-letter operators) like APL or Teco.
- A dynamic object-oriented language, such as Common Lisp or Smalltalk .
- A strongly-typed, statically analyzed language such as ML or Haskell.
- A dynamically-typed functional programming language, such as Scheme.
- A string or macro processing language, such as Perl or m4 or TeX or Teco.
- A database access language, such as SQL.
- An abstract high-level, assembly language, such as Java.
- A concrete high-level, assembly language, such as C.
- A low-level, traditional assembly language.
- A scripting language, such as Javascript.
- An interface-definition language such as Visual Basic, HyperTalk, or Javascript.
- A document-structuring language such as XSL or TeX.
- A language with a modern error system, such as Common Lisp or Dylan.
- A reflective/introspective language such as Common Lisp or Java.
- A symbolic programming language, such as Common Lisp or Scheme.
- A security-oriented language, such as Java or MOO.
- A language where both programs and data are fully persistent, such as MOO or HyperTalk.
17) A question for Kent
by MarkusQ
Do you have a maclisp manual I could borrow?
KMP:For those not familiar with Maclisp, it's a defunct dialect of Lisp that predated and strongly influenced the design of Common Lisp.
I've been working on webbing The Revised Maclisp Manual, which I had published on paper back in the early 1980's. It's not quite ready to go out yet, but should finally be ready sometime in the not terribly distant future. Probably a month or two. Watch the site maclisp.info for more information.
18) Open Implementationsby Martin Pomije
What is your opinion of the idea of Open Implementations from Gregor Kiczales? Do you think that his idea could help Lisp be more widely used?
You can see him giving a lecture about this idea here. [microsoft.com] The video is only available in Windows Media format on this site.
KMP: I hadn't seen Gregor Kiczales's talk on Open Implementations, so I enjoyed watching it. Thanks for the pointer!
The talk made me think back to various related ideas I've seen batted around for a long time, the earliest of which that I can recall is a short paper on something called "Capsules" (an object system where classes were allowed to have multiple implementations) by Richard Zippel back in the late 1970s or early 1980s at MIT. Often, especially in a university environment, people will make up such a concept, bat it around for a bit, and then go on to something else. There are some very interesting ideas there and I'm glad to see that they're being pursued seriously, especially by someone as thoughtful and talented as I know Gregor to be.
As a formalized area of study, this topic of "aspect-oriented programming" is new to me. It reuses some old ideas in new ways, and introduces some new ones along with it. I'm only just barely becoming conversant in the terminology, so I can't really speak to it from a theoretical point of view. But it looks promising. And from a practical point of view, I can note that I'm getting daily on-the-job training in it through my consulting relationship with The Software Smith. They're using Lisp as a vehicle to apply the principles of aspect-oriented programming, and the results they get are quite spectacular.
19) What was up with CLisp's "loop" form?
by Jayson
Did you can have anything to do or know who had anything to do with the "loop" form in Common Lisp? Why does it look and feel just like a FOR loop on C (from the Graham book):
(loop for x = 8 then (/x 2)
until (< x 1)
do (princ x))
This is one of by biggest minor nags about CLisp and I am very curious what was going through the committee's collective head. Didn't anybody balk at this enough to at least get the syntax cleaned up?
KMP: The example you cite is quite simplistic and if this were the only reason for using LOOP, we wouldn't have it. Lisp has a number of other iteration operators for doing simple loops like this. However, the reason for using LOOP is that it can represent much more complicated arrangements of iteration paths and collection techniques. I used to grumble a lot myself about how "un-Lispy" LOOP seemed, but over time I come to the belief that the benefits outweigh the costs. A loop like this:
(loop for x from 0
for y in some-list
when
(good-result? y)
collect (list x y))
is easy to write and maintain, and much easier to explain than the equivalent, but more Lispy:
(do ((x 0 (+ x 1))(y-list some-list (cdr y-list))
(result '()))
((null y)
(nreverse result))
(let ((y (first y-list)))
(when (good-result? y)
(push (list x y) result))))
The Common Lisp community likes to offer the traditional Lispy notations for places where they enhance readability, but we also offer alternative notations for situations where we've learned there's a call for it. We leave the choice of which style to use up to the individual taste of the programmer. Common Lisp is not a minimalist language offering only one way to do things or rigidly attempting to force people into a single programming paradigm.
By the way, this is a fundamental difference between the ANSI Common Lisp design philosophy and the Scheme design philosophy. The introduction to the Scheme specification states:
By contrast, the charter for X3J13, the group that designed ANSI Common Lisp, stated the following in the X3J13 charter:Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary. Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed, suffice to form a practical and efficient programming language that is flexible enough to support most of the major programming paradigms in use today.
It will codify existing practice, provide additional features to facilitate portability of code among diverse implementations, and establish normative Common Lisp programming practice. The committee will begin with the language described in Common Lisp: The Language by Guy L. Steele Jr. (Digital Press, 1984), which is the current de facto standard for Common Lisp. Whenever there is a proposal for the standard to differ from Common Lisp: The Language, the committee shall weigh both future costs of adopting (or not adopting) a change and costs of conversion of existing code. Aesthetic criteria shall be a subordinate consideration.
In other words, the Scheme community is a very conservative community that is highly focused on keeping its language specification as highly aesthetic and minimal in size as possible. By contrast, the Common Lisp community is an industrial standard that is concerned with messier issues of compatibility, portability, and commercial need; while the Common Lisp community cares about aesthetics, it does not allow aesthetics to dominate practicality as a design criterion.
The relevance of this here is that the Lisp family of languages is made up of a number of smaller communities who share a few core ideas, but really have some very divergent points of view. Each is worthy of study in its own right. One should not, having looked at Scheme, assume they have good intuitions about Common Lisp, nor vice versa.
Thanks Kent! (Score:2, Interesting)
Wait a second... (Score:5, Funny)
Re:Wait a second... (Score:2, Funny)
> Don't Fear the Penguin!
Another Anti-Lisp ? Tux the Penguin will be as straw before a furnace when the DAY OF LAMBDA arrives. Do not mock, the Holy Lambda or I shall dispatch the Frightful Mark And Sweep Garbage Collector to get you. -- Yet Another comp.lang.lisp Lunatic
Greenspun's Tenth Rule of Programming:
"Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."
Vote Lisp Machine in '96!
Because today is the car of the cdr of your life.
-- http://www.cs.rice.edu/~shriram/LispM/Campaign/
And finally, to pay homage to the Tao of Programming...
A novice was trying to fix a broken Lisp machine by turning the power off and on. Knight, seeing what the student was doing spoke sternly: "You can not fix a machine by just power-cycling it with no understanding of what is going wrong." Knight turned the machine off and on. The machine worked.
Re:Wait a second... (Score:4, Funny)
Parent
Re:Wait a second... (Score:3, Funny)
Keiner hat einen Anspruch darauf, daß diese Sprache einer anderen Sprache anspruchsvoller gelegt war! Was ist mit dem Flamewar? Und die 4000+ Kommentaren? Im Namen des Herrn, dieses ist verdammt noch mal Slashdot, oder?! GIB MIR MEINE FLAMMEN (or FLAMES) ZURÜCK, DU DRECKSAU!
You're right... it does work better in German.
woof.
BTW, don't use the Fish [altavista.com] for this. The Fish is good for getting the gist of things, but the translations themselves are unintentionally funny. Like Japanglish [jun-gifts.com] (Mmmmm... tasty Japanglish [engrish.com]). If you don't believe me, try my translation in German->English mode! Bwahahahaha!
The brackets and parentheses are killing me! Make them stop!!!
One of the *great* things about lisp... (Score:2)
Like writing thesi^H^H^H^H^Hreplies to
Thanks Kent (Score:5, Informative)
I especially think your description of a list of language types to learn is valuable to those who haven't had the experience of learning multiple languages.
I want to address a few questions I've heard frequently myself.
1) Why learn XYZ it won't help me get a job or won't be used on the job.
The fact of the matter is that the more you know about how computations CAN be described, the more you will know about what the right way to describe a *particular* computation is. This means when someone comes to you with 150 pages of code in straight C that implements a simple data format parser, or a preferences file reader, or a layout engine for a diagram editor or whatever, if you have seen 5 or 6 different styles of languages and techniques for programming, you will be able to decide how best to attack the problem that needs solving.
Often with the right point of view, a problem becomes an order of magnitude simpler. The beautiful thing about LISP is that it gives you the ability to take so many different points of view within a single language.
I still use flex/YACC, and M4, and sed, shell scripts, and will occasionally write some C/C++ (usually to link into lisp at a hotspot
This approach is basically the same approach a mathematician takes to proofs and problem solutions. Make the problem smaller, make it more like something we know how to solve...
Here's the other one I hear often:
2) We can't use XYZ there aren't enough people who know XYZ to support it. Go back to (or stick with) C/C++/Java/Perl!
This simply is a way to dodge having to rationally consider a different language or system. The fact of the matter is:
a) Just because you can hire someone who claims to know C/C++ or whatever, doesn't mean you can hire someone who can solve your problem! Programming involves a lot more than just knowing the syntax of a given langauge, and some of the features the library offers.
b) If by switching to something else you can make your problem several times easier, then the cost of training every good candidate vs. sticking to your old ways is essentially negative!
Most of the time, spending a few weeks of training your new candidate in how your system works will pay off big-time when it comes to debugging, quality assurance, adding new features, and even implementing the feature you initially hired them for. Why? Because understanding the PROBLEM and the solution method is much harder than understanding the language syntax, or even most language semantics.
I run my own business, it's just me. My ability to understand a problem, work with people to figure out good implementation strategies, and write code in LISP to rapidly create the products and services I want to provide are all advantages that I got by learning many languages, and especially LISP family languages.
thanks again Kent!
Do your customers know? (Score:3, Interesting)
Seriously, should you pass on and they need to hire someone else to maintain your LISP, they will certainly pay 2x or 3x the cost of a C programmer, as good LISP programmers are far more rare.
This isn't a joke - I know of companies that have acquired LISP code that has become a complete albatross as they struggle to hire or train people to maintain it - here's a hint - not many programmers want to bother with LISP as they see it as career-limiting.
All in all, I think offering LISP solutions to your customers is a lousy value proposition in the long term.
Re:Thanks Kent (Score:2, Insightful)
If you're a contract programmer looking to move from job to job at Fortune 500 companies every 6 months, then by all means stick with C++/Java.
Much of choosing a language (or a project, or even an industry) comes down to being willing to bet the farm on your success. Big companies rarely bet the farm on anything. Small companies have already done it just by starting up. It's not surprising that more and more start ups are choosing Python or Lisp. See Paul Graham's article on "beating the averages" for his take on this issue. Google will find it for you. There were even some slashdot articles about him.
Re:Thanks Kent (Score:2)
Yahoo is a lot better off with a working production quality Lisp solution, rather than no solution at all. If they had implemented it in Perl, I'm sure it would have collapsed under its own weight by now.
As much of a productivity drain learning a new languages is, it's a fact of life that there are millions of special purpose little languages out there, built into most of the large projects you will probably encounter in your career as a programmer.
Take LambdaMoo's Moo scripting language, Quake's attempt at C, RMS Emacs's Teco, Gosling Emacs's infamous Mocklisp, Gnu Emacs's ELisp, AutoCad's AutoLisp, 3D Studio Max's MaxScript, Maya's GEL, or Alice's Python, as a few examples.
You should thank the gods when somebody was thoughtful enough to use a decent, well documented and supported, off-the-shelf extension language like Lisp, Scheme or Python.
But most of the time, large programs that pass a certain point of complexity inevitably develop their own cheezy special purpose totally bizarre weird assed scripting languages with silly names, that you simply have no other choice but to learn to love and live with.
This was certainly the case with The Sims. It has a built-in special purpose visual programming language called "SimAntics", that Maxis developed over a long period of time to support the needs of Will Wright, to dynamically design and prototype simulated human behavior, which was used in SimCopter, then in The Sims.
Designing, implementing and debugging the visual programming language, porting it from the Mac to Windows, supporting it with debuggers, browsers, editors, writing documentation, training new hires and summer interns to use it, all was an enormous drain of time and resources: it was no easy solution or magic bullet. But the result was well worth it.
Having been given a choice between passing up a job because I wanted to stick to tools and programming languages I already knew and loved, or else having to use horrible tools like Visual C++, STL, and DirectX, and learn "yet another silly special purpose programming language" in order to work with Will Wright on The Sims, I have no regrets that I chose to use horrible tools and learn yet another silly programming language.
My point is that you're cheating yourself out of some of the most interesting jobs in the industry, if you refuse to use shitty tools or learn weird new languages that no headhunter has ever heard of.
-Don
NASA comparative study (Score:5, Insightful)
I'm not that impressed with the NASA study linked. Anyone who has done any Lisp programming in school will know that Lisp is a great language for algorithmic problem solving, and the problem used in the study really plays to that strength in Lisp. Perl would also likely kick C++ and Java's ass in this task. That doesn't mean that Perl or Lisp would necessarily be as good a choice as C++ or Java in a wide range of problem domains.
Lisp is a great language, but it traditionally has not interfaced as well with the Real World as a number of other languages that were more practically oriented.
I know that people absolutely rave about the pleasures of programming on all-Lisp machines, but most of us don't have those, and without either having a Java-style complete set of API's for doing GUI and system interfacing, or having C's ability to directly call system API's, one is left without the tools to directly influence the environment. And, yes, I'm sure there are implementations that have those things there, but without them being absolutely standardized, you can wind up locked in a ghetto of your own making.
As a side note, Kent, don't you think it a little churlish to denigrate Java as merely 'an abstract, high level assembly language'? ;-)
Re:NASA comparative study (Score:4, Interesting)
If you took the time to read the paper, you'd notice that the study was based on an earlier one that did include Perl. They both did, indeed, kick C++'s ass.
However, Lisp still did somewhat better than Perl in terms of time spent coding the task, had less variability in the time it took to code the task, and used significantly fewer runtime resources than Perl, IIRC.
don't you think it a little churlish to denigrate Java as 'an abstract, high level assembly language'?
It's not?
Parent
Re:NASA comparative study (Score:4, Insightful)
Depends on what you think of as an assembly language. It was a somewhat provocative statement, but I didn't mean it to anger people, just to make them think.
Java is missing certain kinds of syntactic abstraction that force me to forever spell out things that I'd rather abbreviate. That's characteristic of assembly languages. Some of them anyway. Some of them actually have better syntactic abstraction than Java does. Perhaps I was unfair in reverse.
Further, when I hear people rave about Java, it is more for the libraries it offers than for the syntax. The syntax is regular enough, but I don't find it particularly "empowering" when compared against other object systems. Compared to nothing, it is certainly empowering. But as an object system, it's fairly vanilla.
So if libraries are its strength, I model that as a kind of modern day assembly language (I did say it was abstract, after all) with a large instruction set of interesting instructions.. But anything you want to do with those has to be laboriously spelled out, and if you change something, the language's static phase really forces you to do a lot of work to make things self-consistent, providing really very little help.
I'd say an assembly language is one I'm happy to have present at a substrate level but that I'd rather not program in on a day-in and day-out basis. C, Java, and TeX all fill the bill in that regard. They each provide a fine layer of support, but I'm happier with them in tools that use them as a backend than in tools that use them as a front end.
It's just my opinion, though. Offered only for the sake of getting you to stop and re-examine your presuppositions for a few minutes. Others are entitled to hold differing opinions without thinking I've accused them of being idiots.
Parent
Java is a lot more interesting than that (Score:2)
The language is clearly not what makes Java interesting--it's a conservative, somewhat tedious language. The libraries are quite good. But the runtime and its specification what makes Java really interesting from a systems point of view because it offers
- a well-specified, complete reflection interface.
- a well-specified, complete interface for dynamic code generation.
- a well-specified set of interfaces to the garbage collector.
- complete specification of what operations must throw what exceptions under what conditions.
- complete specifications of both statically typed and dynamically typed operations (in particular, numbers behave with predictable efficiency).
- implementations that actually reliably perform cross-compilation-unit inlining and other dynamic optimizations.
This makes it straightforward to implement bullet-proof and portable code walkers, debuggers, inspectors, novel efficient object systems, code instrumentation systems, transparent persistence and transparent remote objects, and lots more.it's not a problem with Lisp (Score:2)
It's not Lisp in general. Lisp integrates just fine with lots of environments. Lisp can integrate very well with UNIX if you let it (Elk Scheme and Bigloo are an excellent examples). And traditional Lisp implementations had everything from the assembler on up built-in and written in Lisp.
I think many of the people who developed CommonLisp and the Lisp machine just had a deep disdain for anything UNIX-related and therefore couldn't care less whether CommonLisp integrated well with UNIX or the kinds of things people were doing on UNIX. Just read the UNIX Hater's Handbook [catalog.com], contributed to by many vocal Lisp users in the the 1980's. As a result, CommonLisp has endless provisions allowing for pathname syntax on TENEX or oddball byte sizes, but few of the things that make systems like Perl, Python, or even Java so useful on UNIX and Windows. Other essential facilities didn't make it into the standard probably because many CL vendors thought they could use essential proprietary functionality as a way of binding users to their product.
I hope future Lisp implementations will learn from these past mistakes. CMU CommonLisp, in my opinion one of the best implementations around right now, might do well to just forget going for ANSI CL compatibility and instead come up with a more useful, more complete, and more streamlined feature set.
Re:it's not a problem with Lisp (Score:2)
Very true. And we'll just have to disagree on whether that was actually a good design decision. I think history will tell on this one ;-)
If you're going to critique Lisp in this way, be specific.
I'm not sure what you are responding to but it isn't anything I wrote. I do believe that CL has many problems, but CL is not the same as Lisp.
Vague and general insults without substance are not appropriate in this venue.
Are you kidding? This is Slashdot. I'll have to remember to add some next time.
Good Point! (Score:2, Redundant)
I remember when I was in school, taking a databases class where one of the requirements for the last project of the semester was to program it in a language/system we had never used before. It was actually kind of fun (I chose PHP).
I have seen way too many recent college grads who are proficient in little more than VB. I'm sure they were exposed to C/Java/What-have-you, but man, to say all they needed to do was "brush up" would have been a long stretch.
So to any professors out there, encourage your students to get some breadth when it comes to languages. The experience will prove invaluable.
repost: Classic /. language rant (author unkown) (Score:3, Interesting)
I've spent the last several years trying to explain to colleagues why
they should start using another obscure-but-good language, Eiffel, to no avail.
Here is what I have learned. Note that this is not about the pros and cons of
particular languages or paradigms, its about the way the programming language
industry actually works.
The language industry is dominated by network effects. There are major
costs with using a minority language, and for an individual project these
completely outweigh the benefits, even when the benefits are very large. Hence
it is generally far better to stay with a majority language. The costs of a
minority language include:
Support. Sure, you can get a GPL compiler for most languages, but on a project
you don't want to have your coders digging into the code trying to
fix a bug, you want them writing code. Support is something you outsource.
Performance. Every minority language claims to be faster than C, but often
isn't in practice. Whatever the truth, C and C++ are at least known
quantities. Maybe the minority language will be faster, maybe slower. If its
faster, well gee so what. If its slower then you have a major problem.
Tool support. These days even small projects start by drawing UML diagrams and
then converting these automatically into class templates. CASE
tool vendors don't support minority languages. Ditto for testing and
documentation tools. Little things like tying your compiler to your
configuration control manager might potentially be major headaches. Again, its
more risk that the PM can do without.
Nobody ever got fired for buying C/C++/Java. If you are a PM this is a major
issue. Every language is going to bring some headaches, but if you have chosen
a minority language then these headaches can be turned into an excuse for
project failure, and hence for hanging you out to dry.
Trained staff in a minority language are going to be rare. This does not
necessarily make them more expensive (nobody else wants them), but it
does make recruitment much harder and more uncertain. Alternatively you have to
train all your existing people in the new language. And for Functional
Languages its not just another syntax, its a whole new way of thinking. The
industry went through this with OO languages, and many PMs have vivid memories
of reams of non-OO obfuscated C++ written by a bunch of C hackers who had been
sent on a one week C++ course. Getting your head around a new paradigm can take
months, and this is time that the project just does not have.
So, overall the PMs want to go with popular languages, not for PHM
reasons, but for entirely rational local reasons. But rational local decisions
turn into globally arbitrary decisions, as the entire herd gallops off in a
random direction chosen only because most of the herd thought that most of the
herd were headed that way.
The lesson of this is that if you want to introduce a language, you don't
concentrate on making it a good language, you try to persuade the herd of
programmers, PMs and tool vendors that your language is the Next Big Thing. The
important point here is not how much the language will do for productivity,
quality and cost, it is to create the perception that everyone else thinks that
this language will be the next big thing.
There are two ways to do this. One way is to tackle the whole industry at once.
For an object lesson in how to do this, see Java. For an object lesson
in how not to do it, see Eiffel. Believe me, I know all about this. I have
spent a long time giving presentations extolling the technical virtues of
Eiffel, only to have my audience say "Yes, but in the Real World....". In the
Real World what counts is the network effects. And you know what? My audiences
were right. It has taken me a long time to realise this.
The other more interesting and more promising way to introduce a new
language is to identify a niche market and attack that. Once you have taken
over your niche you can expand to nearby niches and start to build momentum.
Python is doing exactly this in web serving, for example. Web serving is a good
niche because lots of people do it, and productivity and quality generally
count for more than raw performance. Projects also tend to be small, so
experiments are not the Career Limiting Moves they are for large projects.
Education can also be a useful niche if you can afford to take the long view,
which is how Pascal, Basic and Unix got started.
who updates this thing? (Score:2)
Re:repost: Classic /. language rant (author unkown (Score:2)
Since little companies seem to manage to upset big ones' applecarts from time to time, I'm sure that's true at the big companies, where bureaucracy is more important than profits. This same effect might be connected to HP's decision to dump their calculator division?
Interview (Score:2)
I dislike Lisp for many reasons,BUT this is a worth while nerd interview that belongs on
I like Bruce Cambell, but his interview in no way a nerd matter.
If you learned it, you'd like it? (Score:3, Insightful)
The argument for efficiency via type inferencing is made for many languages, including BASIC. Seldom is it implemented. Smalltalk implementations probably got further in that direction than LISP did.
The object system in Common LISP was an afterthought, and it shows. It's really a macro package kind of thing. LISP has a strong history of overly elaborate macros; ever see the MIT LOOP macro? These have the usual problem; what you're looking at in the source isn't what's running, and debugging macros (especially those written by others) is hell. Most other high-level languages have banished macros, or discourage their use.
If you really want dynamism at run time, Smalltalk has most of what you want, and it's cleaner. But Smalltalk is dying, if not dead. Even the ParcPlace people gave up. Java ate their market.
Re:If you learned it, you'd like it? (Score:2, Interesting)
Most people who learned Lisp at some school seem to dislike it first. Learning something and getting something learnt is sometimes something completely different. The Lisp that you can learn on most schools is insanely crippled down to months of hacking low-level, useless list-fiddling programs.
Another problem is that most of these people did not see any need for many of the high-level features offered by lisp and therefore see no urge to use/learn/understand it.
The object system in Common LISP was an afterthought, and it shows. It's really a macro package kind of thing. LISP has a strong history of overly elaborate macros; ever see the MIT LOOP macro? These have the usual problem; what you're looking at in the source isn't what's running, and debugging macros (especially those written by others) is hell.Many people have a bad taste in mind if a notion like "macro" is mentioned. It remembers them on crippled things like C Preprocessor macros , stupid little script languages or embedded pseudo-languages like VBA. But in Lisp a macro is in fact some kind of generalisation over functions. The reasoning is rather simple: 1) Programs are written to solve problems. 2) Writing a program is a problem 3) Solving 2 with 1 means simply to write a program that writes a program. 4) If still too complex goto 2
Most other high-level languages have banished macros, or discourage their use.I don't think that that is really true. Most other high-level languages never had macros. Often enough the designers of other high-level languages do not even know what macros (in the Lisp way of sense) are...
Sometimes it takes more than one try (Score:3, Interesting)
I was first exposed to Lisp as an undergrad, in probably the worst possible way. It was as part of the canonical language survey course, taught by someone who didn't really know Lisp, using an atrocious little monograph titled "Lisp for Fortran Programmers". List processing using only PROG, SETQ,and GO *shudder*. No macros, no arrays, no structures. And the implementation we used was essentially a batch interpreter - no emacs, no debugger, just a raw command-line read-eval-print loop.
When I saw Lisp again, in my second year of graduate school, it was taught by someone who used it to get real work done, with an implementation that had most of the features I have come to know and love.
A large fraction of current Lisp users (judging from comments in comp.lang.lisp) are people who started out knowing other languages, became frustrated with their instability or limitations, and went out looking for alternatives. Their choice of Lisp was not made in ignorance.
Lisp is not perfect, but it is an excellent balance of features in progrmming space. Lisp allows you to do imperative code, functional code, and OO code, without forcing you exclusively down one road or another. It is still one of the languages of choice when you want to do something truly new, and it will likely remain so.
Re:If you learned it, you'd like it? (Score:3, Insightful)
There is only one hell worse than debugging Lisp macros, and that's not having any Lisp macros to debug.
Debugging macros in any language is hard. Instead of Lisp macros, would you rather be debugging C++ templates like STL?
Seriously, have you ever tried to port any large code bases using STL from one platform to another? It totally sucks! The fountain of error messages that the compiler vomits gives no clue to the cause to the problem. Debugging STL is much more difficult than debugging Lisp macros, because of the nonsensical jibberish it expands into that the compiler won't even show, instead of simple Lisp s-expressions.
That's a hell of lot worse than writing clean, simple, reliable, portable macros in Lisp, that you don't have to spend ages debugging, because they often work the first time. Lisp macros are well defined and easy to understand compared to C++ templates mish-mashed with C preprocessor macros.
Forget all the prejudices against macros you ever learned from other languages like the C preprocessor and C++ templates. They're fundamentally flawed, and qualitatively inferior to Lisp macros.
-Don
Re:Large-scale Lisp projects? (Score:5, Informative)
Here are some, [franz.com] and some more, [telent.net] and a few others. [psg.com]
Parent
Re:LISP LISP LISP (Score:2, Insightful)
Re:LISP LISP LISP (Score:4, Insightful)
Actually, I'd argue that the genericity of lisp's syntax is as much a hindrance as it is a help, emacs parenthesis-matching aside.
The above quoted lisp sexp could mean almost anything or nothing, depending on the context in which that sexp occurs. (Is it data? Is it code? In what evaluation context will it be processed?). Java, C, and most other languages at least give you more distinct contextual tokens to guide you in your understanding.
Parent
You totally miss the point. (Score:2)
With Java, C and most other neanderthal programming languages, it's only code, and you have no other choice.
The fact that an expression may be interpreted as data or code is an extremely important ADVANTAGE.
Go back to school and learn about Alan Turing.
-Don
Precedence and Associativity cause Unreadable Code (Score:4, Interesting)
And readability has a whole lot to do with maintainability. Programs should not just be written for the computer to understand. Much more importantly, other people should be able to clearly read and unambiguously understand the code.
I've read and written quite a lot of Lisp and other Lisp-like languages, not only in school, but also in the real world. I've spent much time reading, understanding and modifying huge complex Lisp systems written by other people, and I don't think it's unreadable at all. Well written Lisp code is extremely elegant, and a joy to read.
Complaining about parenthesis is trivial, misguided nit picking, and totally misses many much more important points.
Don't like parenthesis? Then let's talk about how all the subtle levels of operator precedence and associativity rules effect the readability and writability of C, C++, Java and Perl code!
Can't remember the difference in precedence between "==" and "<="? Then you have to either look it up (and require the poor bastards reading your code to either remember it or look it up themselves), or use an extra level of parenthesis!
Now whose code has lots of unnecessary parenthesis? Not the Lisp code. Every paren is in there for a reason. But most C, C++, Java and Perl code is eather riddled with unnecessary parenthesis, or totally unreadable, brittle and unmaintainable, because it subtly depends on operator precedence and associativity.
Most competent programmers put in lots of extra parenthesis just to be sure, because code is changed over time by other people. Relying on operator precidence causes many subtle, hard to find bugs, because it's extremely easy to make and miss practically invisible mistakes. And text editors like Emacs can't give you any help with operator precedence and associativity, like they can with parenthesis.
The arguments for operator precedence that claim people expect it are ridiculous. It's an utterly arbitrary and capricious linguistic artifact foolishly copied from mathematics (which most people don't understand), and taken to a ridiculous extreme (with many additional subtle levels of precedence for operators that simply don't exist in standard mathematical notation).
http://www.howstuffworks.com/c14.htm [howstuffworks.com]
C contains many operators, and because of the way in which operator precedence works, the interactions between multiple operators can become confusing.
x=5+3*6;
X receives the value 23, not 48, because in C multiplication and division have higher precedence than addition and subtraction.
char *a[10];
Is a a single pointer to an array of 10 characters, or is it an array of 10 pointers to character? Unless you know the precedence conventions in C, there is no way to find out. Similarly, in E.11 we saw that because of precedence statements such as *p.i = 10; do not work. Instead, the form (*p).i = 10; must be used to force correct precedence.
The following table from Kernigan and Richie shows the precedence hierarchy in C. The top line has the highest precedence.
[I am forced to spell out the operators in order to get past slashdot's lameness filter -- and I totally agree that languages with lots of ridiculous noisy punctuation are lame. Save it for cursing in comic strips.]
Operators : Associativity
"open paren" "open bracket" "minus" "dot": Left to right
"exclamation mark", "plus", "minus", "plus-plus", "minus-minus", "star", "ampersand", "(type-cast)", "sizeof": Right to left
(in the above line, "plus", "minus" and "star" are the unary forms)
"star", "slash", "percent": Left to right
"plus", "minus": Left to right
"less-less", "greater-greater": Left to right
"less", "less-equal", "greater", "greater-equal": Left to right
"equal-equal", "exclaimation-equal": Left to right
"ampersand": Left to right
"caret": Left to right
"pipe" : Left to right
"ampersand-ampersand": Left to right
"pipe-pipe": Left to right
"question-colon": Left to right
"equal", "plus-equal", "minus-equal", "slash-equal", "percent-equal", "ampersand-equal", "caret-equal", "pipe-equal", "less-less-equal", "greater-greater-equal": Right to left
"comma": Left to right
Using this table, you can see that char *a[10]; is an array of 10 pointers to character. You can also see why the parentheses are required if (*p).i is to be handled correctly. After some practice, you will memorize most of this table, but every now and again something will not work because you have been caught by a subtle precedence problem.
-Don
Parent
Re:Precedence and Associativity cause Unreadable C (Score:2)
I've read and written quite a lot of ______ and other ______-like languages, not only in school, but also in the real world. I've spent much time reading, understanding and modifying huge complex ____ systems written by other people, and I don't think it's unreadable at all. Well written _____ code is extremely elegant, and a joy to read.
Readability is a function of the level of understanding of both the person reading and the person writing. If I write in a very verbose style I could make my code completely unreadable. You may not be able to fit all of one particularly ostentiated thought in your head. If I write code in a very terse style same thing, but now you need to do too much expansion. This particular argument about the joys of _____ is moot. If you wish to argue on this level it must be about the expresiveness of a language. Show thoughts that are easy to express in one language but not in another -a problem that appears in both human and computer languages.
--locust
Re:Precedence and Associativity cause Unreadable C (Score:3, Insightful)
But in the usability sense explored by the Psychology of Programming [ppig.org] field, there are important differences between programming languages, in terms of ease of use, learnability, maintainability, readability, syntactic surface area, cognitive load, etc.
The trivial fact that a language is Turing complete, does not mean that it's well designed or easy to use. It's not all just a function of the programmer's skill. Certainly there are objective qualitative differences between programming languages that make some substantially better than others.
-Don
Re:Precedence and Associativity cause Unreadable C (Score:2)
I agree that language ease of use is not just a function of programmer skill. But I think its more of a function of the programmers background. Consider, Java. It syntax is designed to look a lot like C and C++, to make it easier to use for people coming from those languages. While the syntax of Java may appear close enough to someone who has done all thier programming functionally in C, object orientation, exception handling, and so forth are still foriegn. By cloaking them in a familiar syntax you make it easier for them to learn, but drop that programmer into an interpreted smalltalk environemnt, or throw prolog at them, and they will be much more lost.
The analogy has to be made to natural languages. In english we 'get on a bus' where in fact we ride inside it. In other languages you do in fact 'get in the bus'. More particularly, in navaho (sp?) a man cannot be kicked by a horse, he allows the horse to kick him. In that language the horse cannot be though of as having intent. The same sorts of things are true for programming languages. In some langauges particular thoughts are easier to express than others, and lend themselves to specific ways of thinking. In C no matter how hard I try I cannot encapsulate... Yet C remains a perfectly satisfactory way of expressing a great number of things. At times it is expressiveness superior to languages that do provide encapsulation.
When you pick the right tool for the job, you are picking it based on what you know, and that boils down to a qualitative decision based on how you are used to thinking.
--locust
Re:Precedence and Associativity cause Unreadable C (Score:3, Informative)
The ScriptX parser allowed you to type in a straightforward javascript-like syntax, with traditional infix notation, precedence rules and other additional syntactic sugar.
The parser transformed text into a parse tree, that was like Lisp s-expressions. ScriptX macros operated in terms of those parse trees, not the surface syntax. So internally it even had "downward passing" continuations (that you couldn't pass outside of the scope they were created), but the parse trees were compiled into a byte code, not unlike the Java virtual machine (which explains why it didn't support fully general continuations).
So you could implement any number of different surface syntaxes for ScriptX, by writing different parsers. My trusty Kaleida colleague DanFuzz [milk.com] wrote a traditional Scheme parser for ScriptX.
ScriptX was a lot like Dylan with a cross platform multimedia class library. It was essentially a Lisp-like language, designed around an object system and class library, more dynamic like CLOS than static like Java. Unlike Java, all data types including integers and arrays are first class objects.
ScriptX had a rich set of polymorphic container classes, much more dynamic than STL, that made heavy use of multiple inheritance.
The container classes (like arrays and maps) were supported by the language sytax, and mixed into many system classes, so you could easily treat windows as arrays, looping over their subwindows, filtering collections of objects through functions and type conversions with "pipes", mix collections into your own classes so they're easy to use through well supported interfaces, etc.
ScriptX had built-in high level time synchronization and graphics classes, including QuickTime movies, sprite graphics like Director, and vector graphics similar to Flash.
One of the great things about ScriptX, which also applies to CLOS and Dylan which inspired it, is its wonderful dynamic objects system. Programming in C++ and STL is totally miserable after having been exposed to ScriptX and CLOS.
For example, I subclassed ScriptX container classes like Array to implement ScriptX Classes for automatically generating HTML [catalog.com], that macros can plug together like legos and dynamically expand into complex web pages.
The ScriptX Tracking Service [catalog.com] is a good example of using multiple inheritance with the container and presentation classes.
There's an abstract class called Tracker (that inherits only from RootObject): "This mixin class gives an object the ability to track the mouse, by participating in the tracking service protocol. You can mix Tracker in with presentation and model objects to implement all kinds of direct manipulation interfaces.".
The abstract Tracker class is subclassed by the concrete leaf class TrackerCachedPresenter, and also by another abstract class, TrackerMulti, which implement the recursive tracking protocol. TrackerMulti is then mixed down into concrete with the various container presentation classes TrackerMultiPresenter, TrackerGroupPresenter and TrackerTwoDSpace.
ScriptX was great fun to think and program in. It was an ideal language for developing an open ended platform for plugging together dynamically loaded interactive multimedia objects like Legos [catalog.com].
At the time (1995), Java was no nowhere near capable of doing anything like that on the Mac, Windows and OS/2. With regard to more modern languages, Python [python.org] is most exciting dynamic and practical programming language around.
The best thing about Python, is that it's completely open source.
It's not tightly controled by a short sighted company that only intends to use it in their religious Jihad against Microsoft, like Java.
And it's not proprietary, jointly developed by strange bedfellows Apple and IBM, and swept under the rug, like Kaleida's ScriptX was.
So Python will be around forever, while quickly and naturally evolving, because it has earnestly learned so many lessons from Lisp and other languages.
Q: What do you get when you cross Apple and IBM?
A: IBM.
-Don
Re:Precedence and Associativity cause Unreadable C (Score:2)
Sounds wonderful. I still have my prized Dylan manual that I ordered from Apple's Cambridge labs back in the day.
Is ScriptX still a going concern in any way?
Re:Precedence and Associativity cause Unreadable C (Score:2)
We shipped the final version of ScriptX, and Kaleida closed in January of 1996. Apple said they were going to support it at first, then swept it under the rug. Now you can't find anything about ScriptX on Apple's or IBM's web sites.
Python [python.org] and Zope [zope.org] are clearly the coolest dynamic cross platform open source programming environments happening today.
-Don
Re:cdecl's your daddy. (Score:2)
-Don
Re:Precedence and Associativity cause Unreadable C (Score:3, Funny)
I can't remember, but I sure could use some more peanut butter cups.
Your guess was close, but it was even more traumatic than that. A stupid TA took off points because I left a superfluous BEGIN/END in my Pascal program, around a single statement terminated by a semicolon underneath an IF statement. I insisted that the reason the null statement was defined in Pascal was exactly for that purpose. And that the code was more maintainable because it was easier to insert and delete debugging writeln statements in the if statement, without having to move to the previous line and add a semicolon. But he marked me off anyway.
Yeah, I admit it. I have written functions that go on for pages and pages, and I need Emacs to help me understand and edit them. Out of necessity and haste, I've written lots of horrible code that isn't readable, and I've been stuck working with and maintaining a whole lot more unreadable code than I could ever write myself. That is life. Thank McCarthy for Lisp and RMS for Emacs. Now where do we go from here?
Wouldn't the world be a better place if more programs were written in languages that were essentially easy to maintain and more robust against mistakes, misunderstanding, code rot and entropy?
I view parenthesis like the tie-downs and steel bars that reinforce a building against hurricanes and earthquakes, such as email corruption, global search-and-replace damage, tab changes and misleading reindentation.
Please don't pigeonhole Guido van Rossum as a usability guru -- GUI is only 60% of his first name! He's really a completely general purpose Guru! Python is just the latest thing that Guido is well know for. Just as Java is for Gosling, who's also implemented several programming languages that most headhunters have never heard of.
-Don
Re:LISP LISP LISP (Score:3, Interesting)
The above quoted lisp sexp could mean almost anything or nothing, depending on the context in which that sexp occurs. (Is it data? Is it code? In what evaluation context will it be processed?). Java, C, and most other languages at least give you more distinct contextual tokens to guide you in your understanding.
I like Lisp a lot, but I tend to agree with this point of view. I'm simply more comfortable infix-syntax for simple arithmetic. Prefix syntax is great for function calls -- and I don't really care whether the parens go around the whole thing (Lisp), after the function name and aroudn the arguments (most languages), or aren't there at all (ML/Haskell/Logo). Hell, I even cope happily with postfix function calls (Postscript/Forth/GML).
But when it comes to control structures I really, really prefer a keyword-rich syntax and explicit markers saying just what it is that you've just come to the end of. e.g. if/then/elseif/fi or any of a number of equally reasonable alternatives.
This is why I think that Dylan is currently the best language out there. It does pretty much everything that Common Lisp does, but in a more familiar syntax and with a lot of CLs historical cruft cleaned up. Dylan was designed by a bunch of Common Lisp gurus with the intention of designing the replacement for CL. And I think they suceeded technically.
Dylan currently has two implementations, one open source [gwydiondylan.org] batch compiler for Unixy systems and one commercial IDE for Windows [functional-objects.com] (with a free personal edition). Both systems compile to fast machine code and can compete with C in all but the most hardcore applications -- certainly far far better than Java or Perl or Python.
Functional Developer is a quite mature system with nice IDE and debugger and lots of libraries.
Gwydion Dylan is a bit less polished, but it's still good enough that a team using it managed 2nd place this year in this year's ICFP [inria.fr] 72 hour programming contest.
All previous winners at this contest have been written in either C or else one of the Hindley-Milner statically typed languages (SML/OCaml/Haskell), all of which have very fast execution speeds with a good compiler.
You don't necessarily have to have the best possible langauge to win at ICFP, but you must have no major weaknesses -- you have to have a language and compiler that lets you develop and debug complex code in a very short time, and the end result must run fast. Much like in the real work
Common Lisp and Scheme have never yet won a prize here (though I believe Common Lisp could), and it seems that the large number of Java and Perl and Python entries produced every year simply don't run fast enough to do well. On the other hand, the vast majority of C and C++ programs get eliminated because of bugs (occasionally one gets through!).
Having said all that, the one-line summary is this: if you like the idea of Common Lisp but just can't stand all those parens, take a close look at Dylan instead.
Re:Okay, enough Lisp advocacy (Score:3, Insightful)
No one cares how useful a programming language is - they care how many competent programmers they can hire who can code with it.
Dude, you need to get on some antidepressants or else find something you love doing. There is more to life and one's job than conformity and groupthink.
Rather than rag you too much, I'd like to invite some C or Java programmers to expound the joy of their chosen languages.
Re:Okay, enough Lisp advocacy (Score:4, Interesting)
I'm familiar with a few languages. I begun with C++, thought it was nice and fun. Then I learned Java: I thought it was great not to have to worry about memory allocation and pointers, etc. I thought Java was fun too. But damn the Java community is dry. Then I learned Perl: I was in love. You can build things quick, and the community around the language is just so alive, diverse and interesting. You can get help anytime, people just _love_ to teach you (and show off ;-).
And these time, I'm into Scheme. It's very different, very fun and rewarding. You get to see the world from a new angle. You get to stretch your mind.
And everytime I learn a new language it just helps me to better understand the others. And don't forget the fun-factor: it is what drives me to try new stuff, to learn more. Ah well, just random rambling from a happy CS student ;-)
Parent
who updates this thing? (Score:2)
Does the "nobody got fired for Java" comment indicate that this was written after Java escaped being a minority language? Or does somebody update the essay as language "fashion" changes? With this kind of advice, new languages can never be mainstream, and old languages can never see a resurgence.
Not to worry, though. The "fashion" people will be swept along eventually, whether by new fashion, or by old fashion making a comeback.
True for industry... but... (Score:2)
But there's no reason this kind of marketplace idea should apply to the "open source" or "free software" world. Personally, I feel free to hack my software in whatever language I like (typically SML, my favorite underdog). I hope that other hobbyists do take the time to build up an environment where their favorite (whatever that may be) can flourish, too. It is in our spirit to embrace things because of their technical merits, rather than their popularity!
Re:I took Lisp in school (Score:3, Funny)
I must have...the book is sitting there on the shelf right next to my Prolog manual and my Abstract Non-Linear Algebra book.
Wait a minute.
Glorious memories of parties and all-night bull-sessions returning...
Feelings of immortality returning...
Confusion and credit card debt fading fast...
O great God Lisp. Why did I forsake thee?
Re:I took Lisp in school (Score:2)
Search for: "linear algebra NOT!"
(Postfix "NOT!": Low precedence, right to left associativity.)
-Don
Re:I took Lisp in school (Score:2)
I know this was a joke but... I assumed the OP meant abstract algebra (i.e., groups, fields, categories) which is often taught in a separate course than linear algebra. Or at least it was when/where I went to college.
Re:How many more questions/answers are there? (Score:2)
Re:How many more questions/answers are there? (Score:2, Informative)
And by the way... (Score:2)
Anyway, I'll find some way to let my wife order those books.
Thanks again.
deliberate obfuscation? (Score:2)