Slashdot Mirror


Common Lisp: Inside Sabre

bugbear writes "I just got permission from the author (Carl de Marcken of ITA Software) to publish this email, which describes the inner workings of Sabre, the flight search software that the airlines and travel agencies use. It is a case study in cheap Linux/Intel, NT/Intel and Hpux boxes replacing mainframes, and also the use of lisp and other languages in a server-based app. Update: 01/16 13:45 GMT by H :RawDigits writes "Common Lisp: Inside Sabre - correction. The Lisp engine is used by Orbitz, and not Sabre. Sabre still maintains mainframe systems for their booking. I should know, I am sitting in the Orbitz NOC right now ;)"

227 comments

  1. Crazy stuff. by digitalunity · · Score: 0

    5. Every query that hits our site gets sent via tcpip to a Lisp process running on an dual 800mhz x86 Linux box with 2g of ram ($3000, vs about $1,000,000 for a similarly capable mainframe), and the process devotes between 5 and 15 seconds of CPU time to it. One of our customers will have 200 such boxes, each running 2 or 3 Lisp processes. We save on ram by putting multiple processes on one box, since the virtual memory system automatically shares our read-only memory-mapped files between processes.

    That is some crazy-fun processing power!
    I wish I had 200 of those babies. My 3D Studio rendering would fly like nobodies business :)

    --
    You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    1. Re:Crazy stuff. by matthew.thompson · · Score: 2

      Performance wise how do 200 PCs stand when compared with one of these mainframe class boxes?

      Also what's the differences in Power utilisation?

      --
      Matt Thompson - Actuality - Insert product here.
    2. Re:Crazy stuff. by servasius_jr · · Score: 3, Funny

      That is some crazy-fun processing power!
      I wish I had 200 of those babies. My 3D Studio rendering would fly like nobodies business :)


      Would it be fair to say that you are imagining a beowulf cluster of these?

      Ahem . . . . Bad joke, I know.

    3. Re:Crazy stuff. by supersnail · · Score: 1

      This is a bit like comaparing a fleet of ford escorts with a PeterBuilt.

      You can buy a lot of low end fords for the same price as a 50 ton truck, but all the family saloons put together will not transport 50 tons.

      The current mainframe technoligy "IBMs zSeries" is extremely powerfull and so highly configureable that each "mainframe" is effectively a "one-off" with differnt numbers of CPUs, memory size, channels(IO buses) and interconnects, it is very diffcult to compare with other architectures.

      Some years ago IBM posted the higest TCP/A benchmark ever using a cluster of mainframes and the venerable IMS database software, this configuration was some 5 times faster than the previous fastest benchmark using Oracle and DEC alpha cluster.

      Given that the alpha chip hasn't moved on much since then and that a 1gz+ pentium is roughly equvalent to a compaq alpha chip this differential still holds.

      On the other hand you don't really get much of a zSeries box for $1,000,000. But the power consumption and aircon required for 400 Intel processors has got to eat up some of the differential.

      --
      Old COBOL programmers never die. They just code in C.
    4. Re:Crazy stuff. by battjt · · Score: 1

      Mainframes are slow for calculations, fast with IO. (Or more precisely very expensive for calculations and just expensive for IO.)

      The IBM mainframe I used at a very large life insurance company had 11 400 Mz cpus that compared roughly to Intel CPUs, so I assume that they were a PowerPC like chip. 5 were dedicated to development and testing. One nice feature was that the L2 caches were shared across all the CPUs, unlike the Intel model, so process affinity wasn't a very big deal.

      CPU resources are very expensive on a mainframe, but you do have the option of features like hot swappable CPUs and main memory. Mainframe uptimes can be 25 years; you can't do that with most computers, because you need to shut them down to upgrade CPUs and memory.

      Supercomputers are another story. You can buy SGI hardware that is build around rendering images and pumping them through some very high bandwidth channels for display walls and the like. But I don't know anything about supercomputers.

      Joe

      --
      Joe Batt Solid Design
  2. I hadn't realized... by boopus · · Score: 4, Interesting

    This is the first use of lisp that I've seen that used it in an environment where performance was the main goal. This seems like what I've always been told any "reasonable person" would use C for. Is it common that lisp is used in mission-critical high volume computing? Or was the point in using lisp the fare-searching algorithm? My lisp knowledge is limited to one semester of scheme, so I'm pretty ignorant.

    1. Re:I hadn't realized... by Anonymous Coward · · Score: 0

      if you don't mind switch back and forth between
      lisp and c++. Just like using python. You actually have to use 2 language to do one job.

      And actually, the lisp is compiled to machine
      code. So it is not slow like intepreted language.

    2. Re:I hadn't realized... by entrox · · Score: 5, Informative

      Lisp doesn't need to be slow at all. You're thinking of the old 70's Lisp, which was usually interpreted and ran slowly. Today's Lisp implementations can also be compiled in addition interpreted, which results in a big performance boost (lagging only slightly behind C, but faster then Java). Commercial Lisps capable of compiling are for example Allegro CL and LispWorks.
      This isn't limited to the commercial ones: CMUCL and SBCL do also compile to native code. The compilers are optimizing (you can choose between variying degrees of Speed, Safety, Debugability and Compile Speed) and you can even enter Assembler code or disassemble single expressions.

      --
      -- The plural of 'anecdote' is not 'data'.
    3. Re:I hadn't realized... by marcovje · · Score: 1


      If it lags behind C, it lags behind Pascal and Fortran too.

    4. Re:I hadn't realized... by entrox · · Score: 1

      and your point is?

      --
      -- The plural of 'anecdote' is not 'data'.
    5. Re:I hadn't realized... by marcovje · · Score: 1

      Sorry, replied to the wrong msg.

      Should have gone to one level higher.

      Point is:
      Any sane person can choose those language for
      performance too, not just C.

      There are of course more languages, the point is that
      C is not holy in that respect.

    6. Re:I hadn't realized... by NonSequor · · Score: 1

      Actually, long ago there was a comparison between DEC's Fortran compiler and MIT's Lisp compiler. The two were found to be about even in speed. Of course, more optimizations for both languages have been developed since then, so that should be taken with a grain of salt.

      --
      My only political goal is to see to it that no political party achieves its goals.
    7. Re:I hadn't realized... by cow-orker · · Score: 1

      Lisp (or any functional programming language) shines where you have to handle complicated data structures. Complicated probably already includes binary trees.

      Said application not only involves high volumes of data, but also complex searching strategies on certainly non-trivial graphs. Well, the same done in C would probably be faster, but no one would want to write it. The C equivalent would use simpler algorithms and lose on that ground.

    8. Re:I hadn't realized... by Anonymous Coward · · Score: 0

      Lisp is slower than C by a factor of about 2, according to most estimates. That's OK, because its greater flexibility allows better algorithms. In cases like flight planning, that's what you want.

      Lisp is very far from the machine, unlike C. Consider the following discussion about how many lines of lisp it takes to get a single assembler opcode:
      http://groups.google.com/groups?hl=en&frame=righ t& rnum=181&thl=1151804417,1151713704,1151669803,1151 649419,1151610315,1151337112,1151334083,1151292643 ,1151556851,1151359841,1151283354,1151625049&seekm =3213654193623720%40naggum.net#link182

      Even Ken Pittman (one of the inventors) admits that Lisp is not as fast as some lower-level languages:
      http://groups.google.com/groups?q=g:thl55678398d &h l=en&selm=sfwn11x6xfs.fsf%40shell01.TheWorld.com

    9. Re:I hadn't realized... by kirkb · · Score: 0, Flamebait

      Sorry, but I don't really feel comfortable using a compiler that has an adjustment for "safety".

      I suspect the /safety=0 option probably produces similar output to random &gtapp.exe

      --
      Slashdot: come for the pedantry, stay for the condescension.
    10. Re:I hadn't realized... by sketerpot · · Score: 1
      C code for some binary trees already exists, and you can copy and paste it to your heart's content.

      It can be faster, too.

    11. Re:I hadn't realized... by Tiny+Elvis · · Score: 1

      safety controls the amount of run-time error checking.

    12. Re:I hadn't realized... by Anonymous Coward · · Score: 0

      Yes, but it can also be slower.

      And it's still C. (As in C your sanity go down the drain).

    13. Re:I hadn't realized... by mrdlinux · · Score: 1

      Speed can range anywhere from what you say, to
      worse, to better than C. It all depends on
      how well you write your code, and how good the
      compiler is.
      As for far from the machine? Uh, ok...:

      CMU Common Lisp release x86-linux 3.0.4 18c+ 17 November 2001 build 2828

      Loaded subsystems:
      Python 1.0, target Intel x86
      CLOS based on PCL version: September 16 92 PCL (f)
      * (defun fixnum-add (a b)
      (declare (type fixnum a b)
      (optimize (speed 3) (safety 0)))
      (the fixnum
      (+ a b)))

      FIXNUM-ADD
      * (compile 'fixnum-add)
      Compiling LAMBDA (A B):
      Compiling Top-Level Form:

      FIXNUM-ADD
      NIL
      NIL
      * (disassemble 'fixnum-add)

      48135B30: .ENTRY FIXNUM-ADD(a b) ; (FUNCTION (FIXNUM FIXNUM) FIXNUM)
      48: POP DWORD PTR [EBP-8]
      4B: LEA ESP, [EBP-32]
      4E: ADD EDX, EDI ; No-arg-parsing entry point
      50: MOV ECX, [EBP-8]
      53: MOV EAX, [EBP-4]
      56: ADD ECX, 2
      59: MOV ESP, EBP
      5B: MOV EBP, EAX
      5D: JMP ECX
      * (describe 'fixnum-add)

      FIXNUM-ADD is an internal symbol in the COMMON-LISP-USER package.
      Function: #<Function FIXNUM-ADD {480AD151}>
      Function arguments:
      (a b)
      Its defined argument types are:
      (FIXNUM FIXNUM)
      Its result type is:
      FIXNUM

      * (fixnum-add 3 4)

      7

      --
      Those who do not know the past are doomed to reimplement it, poorly.
    14. Re:I hadn't realized... by RevAaron · · Score: 2

      Contrary to what most C people think, performance is very dependent on what you're doing and how it was designed. I've seen some benchmarks where a well designed compiled Common Lisp program beat out a well designed FORTRAN program for heavy duty number munching. I wish I could find that bleeding link again!

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    15. Re:I hadn't realized... by Jon+Howard · · Score: 1

      There are quite a few companies using Lisp for quite a few different things in the "Success Stories" section of the Franz website (makers of Allegro Common Lisp). Examples include the Final Fantasy movie, Crash Bandicoot, Orbitz (as above), and tons of other places that tend to surprise people who are unfamiliar with Lisp.

      Here are the categories the Franz site lists:

      • Quotes
      • Animation & Graphics
      • Artificial Intelligence
      • BioInformatics
      • B2B & E-Commerce
      • Data Integ. & Mining
      • EDA
      • Expert Systems
      • Finance
      • Intelligent Agents
      • Knowledge Mgmt
      • Mechanical CAD
      • Modeling & Simulation
      • Natural Lang. Proc.
      • Optimization
      • Research
      • Risk Analysis
      • Scheduling
      • Telecom
      • Web Authoring
    16. Re:I hadn't realized... by RevAaron · · Score: 2

      And assembler is faster than C. So you must be a fool for using C! Oh, you say that it's a pain in the ass to program in Asm? Well, for those of us who have seen Lisp, C is just as much of a pain as assembler. Whatever tiny bit of performance using C over Lisp can produce, it's not worth my time and pain.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    17. Re:I hadn't realized... by Hercynium · · Score: 2

      I have been programming in C for quite a while, but I've very recently begun reading up on LISP. I'll probably begin by coding my next database app in it (small job for my dad's business.)

      What my point is is that it seems that a language like LISP is designed to handle data in the way that is optimally processed by modern computing architectures. Binary trees, lists and stacks are handled easily by LISP, as well as nearly every other recursive and relational structure in widespread use today. While C allows immense flexibility, I believe that it's strength is in it's ease of use; It's easier to program functionally or iteratively rather than recursively. However, optimization of C code probably requires much more knowledge of the specific architecture one is working on. LISP by it's very structure is optimized for any turing-complete system.

      Take in mind, IANALP = (IANA = (I Am Not A) Lisp Programmer) :^p So maybe I'm wrong about LISP. I'll definitely know better in a few weeks though!

      --
      I'm done with sigs. Sigs are lame.
  3. Look at the Lisp newsgroups for more information.. by cymen · · Score: 2, Informative
    When the last big Lisp story came up on /. I spent a fair amount of time following the Lisp newsgroups. The airline system came up a couple times and a few very interesting posts were made. I haven't found anything yet with groups.google.com but I remember reading quite a bit more than what was in the email linked to in the main story....


    Go forth ye google hunters! I'm going to bed.

  4. More like "Look how clever we are!" by Anonymous Coward · · Score: 1, Troll

    I expected to see a report on how Sabre works... not a long diatribe - 'oooh, look at us - we do it faster!' - about the replacement software these guys have cooked up.

    Well done on getting some free advertising.

  5. Yahoo Stores uses Lisp by niola · · Score: 4, Interesting

    I did some research a few months ago on Lisp since I am not very familiar with it and I discovered that Yahoo stores uses Lisp.

    It would seem to me that if it can power 14,000 e-commerce sites for the largest web network that it must be pretty scalable.

    Lisp, due to its recursive nature is often used in AI because it can perform operations with lower overhead.

    --Jon

    1. Re:Yahoo Stores uses Lisp by banky · · Score: 2

      His logic seems to be related to the reason NeXTStep/OpenStep/MacOSX use ObjectiveC instead of the more common C++. If its best for you, use it; it'll either fail miserably or become the secret weapon that empowers you ahead of your competitors.

      --
      ZOMG I WOULD LOVE TO KNOW ABOUT YOUR FEELINGS ON MACINTOSH VERSUS WINDOWS, VI VERSUS EMACS, AND HOW YOU'RE NOT A DORK
  6. Germany and ...? by Anonymous Coward · · Score: 0

    "...complexes in Kansas City, Denver, Germany and Atlanta, and ...."

    Is this the Germany I am thinking about? Cool!

  7. Best quote by Dr.+Tom · · Score: 3, Interesting
    They use Lisp (with a little bit of C++), and they find that some of their customers can't program very well in Lisp. Typical Lisp education teaches inefficient techniques. Furthermore:

    "Of course, with things like STL and Java, I think programmers of other languages are also becoming pretty ignorant."

    1. Re:Best quote by archen · · Score: 1

      To me it seems it isn't so much about Lisp education, as it is about having and aptitude to program in Lisp in the first place. Languages like Java and C++ concentrate on letting us model things in the real world and such - very strait foreward. By contrast Lisp is a language where you actually have to think differently. If you try to make a linear program with Lisp, you are probably missing the point. I guess I'd venture to say that you can't just take your run of the mill VB programmer and expect them to really grasp Lisp unless they can re-think the way they program. Some can; Most cannot.

    2. Re:Best quote by PrismaticBooger · · Score: 1
      "Of course, with things like STL and Java, I think programmers of other languages are also becoming pretty ignorant."

      That's a pretty ignorant comment, especially considering the context.

      While naive programmers may see the STL as just another grab-bag of functionality, naive programmers will see any library that way. Put in its proper perspective, though, the STL is a framework for generic programming. Generic programming actually has a lot more in common with Lisp programming than the conventional way C and C++ have been applied. I find generic programming generally requires a good deal more thought and planning in the early stages of design, but the reward is more concise, more consistent, and thus easier to understand code. It takes practice, and you don't tend to find naive programmers developing software this way.

      Naive application of the STL, though, is very easy to spot. The STL isn't increasing the number of naive programmers, but it certainly may make naive programmers more visible. The author's comment strikes me as just another case of blaming the tool when the problem is the user.

    3. Re:Best quote by divbyzero · · Score: 2

      Why do people get in such a huff about learning new programming models? Neither Lisp, nor C, nor Java requires you to learn a new programming model to start writing programs.

      • You can write predominantly linear or iterative programs in Lisp.
      • You can write predominantly functional, recursive programs in C and Java.
      • You can write predominantly object oriented programs in C.
      • You can write predominantly procedural programs in Java.

      None of the above is the optimal programming model for each of the languages, and would not normally be used for a large scale or high performance application. However, large scale and high performance applications are not tasks for beginning programmers, and only a beginner would shy away from an opportunity to learn a new, potentially useful programming model.

      --
      But my grandest creation, as history will tell,
      Was Firefrorefiddle, the Fiend of the Fell.
    4. Re:Best quote by sv0f · · Score: 2

      Generic programming actually has a lot more in common with Lisp programming than the conventional way C and C++ have been applied.

      Agreed.

      The author's comment strikes me as just another case of blaming the tool when the problem is the user.

      Perhaps what he's saying is that generic programming is simplicty itself in a dynamic programming language such as Common Lisp, and a syntactic nightmare in C++, where it runs head-first into the static bias of that language?

  8. Lisp without GC! by nagora · · Score: 2, Insightful
    How very odd... I'd have liked a bit more on why they used Lisp since one reason many give is normally the garbage collection which isn't being used here. Why is GC too slow in Lisp when there are years of experience behind it?

    TWW

    --
    "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    1. Re:Lisp without GC! by sarcast · · Score: 4, Informative
      Why is GC too slow in Lisp when there are years of experience behind it?

      It is not that the garbage collection is too slow in Lisp, he gave the reason that the amount of data that it had to go through was very large. The point of the system was to be as speedy as possible and garbage collection would slow that down no matter how much or how little data you gave it to process. If you look at real-time processing projects, none of them (to my knowledge) employ a garbage collector because that would take up valuable resources.
      They made a wise decision to keep the garbage collection to a minimum so that the actual searching process would be all that was running on the boxes.

    2. Re:Lisp without GC! by markj02 · · Score: 2

      The C/C++ memory allocator is about as slow as a good Lisp or Java garbage collector. If you write performance critical code, the first thing to do is to look at your memory allocation and usage patterns--in any language.

    3. Re:Lisp without GC! by nagora · · Score: 1
      Yes, you're right. It hadn't sunk in that they were not using any GC at all.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    4. Re:Lisp without GC! by Paul+Johnson · · Score: 3, Interesting
      A garbage collector has to scan all the data in memory to decide which bits are needed and which bits are garbage. If you have gigabytes of data, or you allocate lots of data and therefore need to run the GC a lot to reclaim it, then the GC is going to take a correspondingly long time.

      In this case they are getting the best of both worlds by using GC where appropriate, and then using special knowledge about the application to optimise away the overhead.

      Paul.

      --
      You are lost in a twisty maze of little standards, all different.
    5. Re:Lisp without GC! by WolfWithoutAClause · · Score: 2

      Actually, I'm not totally sure that this was the right decision. Some of the generational garbage collector schemes could have given much the same behaviour- they don't touch objects that don't change and their basic data set doesn't change.

      --

      -WolfWithoutAClause

      "Gravity is only a theory, not a fact!"
    6. Re:Lisp without GC! by Anonymous Coward · · Score: 0

      Lisp GC Generally uses tag-and-delete garbage collection. This means that they crawl through all the data and flag any items that are referenced. Then they crawl through again and delete the items that aren't flagged. This takes alot more time than the other way (reference counting, and deleting yourself when your count equals zero) but it's a more "proper" way to do GC.

      Python (for example) can generate minor memory leaks if you have circular references going. COM can create some serious memory leaks if you don't decrement refs properly.

      The lisp attitude is: Why should you force a mere mortal programmer to spend hours tracking down wierd exceptions and memory leaks when the computer can do it without complaining and only slight overhead.

      The slight overhead of crawling through two gigs starts to add up though, especially when you know you don't want the data thrown away in the first place.

    7. Re:Lisp without GC! by jonis · · Score: 2, Insightful

      > A garbage collector has to scan all the data in memory to decide which bits are needed and which bits are garbage.

      This is actually not right. GC does not have to (as opposed to _can_) scan everything. Some (e.g. copying) GCs scan only the objects that are referenced (live objects). And in generational GCs the set of objects scanned is usually a fraction of live objects (recently created ones).

    8. Re:Lisp without GC! by drj11 · · Score: 1

      AT&T's Globeview 2000 (an ATM phone switch I think, telecoms is not my speciality) uses Harlequin's (presumably now xanalys) Real Time Lisp (a variant on their ordinary Lisp). It certainly garbage collects in real time meaning their is an upper bound on the length of a pause due to GC and a guarantee of maximum CPU overhead due to GC.

      Those resources might be valuable, but so is the ability to add a new voicemail service to your phone switch without dropping existing calls (which rebooting the switch would do).

      Here's a press release with some marketing details

    9. Re:Lisp without GC! by aminorex · · Score: 1

      No, an exact garbage collector does not scan all
      the data in memory. Yes, if you have a lot of
      allocations, GC takes longer. So does free().

      --
      -I like my women like I like my tea: green-
    10. Re:Lisp without GC! by aminorex · · Score: 1

      There are a number of real-time GC systems,
      all of them incremental, some of them exact.
      Embedded Java is big business, and in many
      cases uses real-time GC.

      --
      -I like my women like I like my tea: green-
    11. Re:Lisp without GC! by Doctor+Memory · · Score: 1

      I was able to realize over 100% improvement in our app by cacheing and re-using some objects instead of just allocating new ones. Use of a good profiling tool (JProbe, in my case) is essential for finding these things.

      --
      Just junk food for thought...
    12. Re:Lisp without GC! by ahde · · Score: 2

      no, look what your passing around. In C/C++, probably the biggest resource hog in untuned code is passing around big ugly structures (esp. strings) instead of a pointer, reference, or a state flag.

    13. Re:Lisp without GC! by Anonymous Coward · · Score: 1, Informative

      It depends.
      There's such a thing like generational GCs which need not scan the whole heap most of the time. Also, by 'scan all the data' we need not assume that each datum is small: if that 2Gb chunk is known to be a single immutable object, it can be count for one (big) object with no need to peek into its internals.

    14. Re:Lisp without GC! by Anonymous Coward · · Score: 0

      C/C++ allocation is probably guaranteed to take more than a good Lisp allocator, since the Lisp allocator just needs to increment the free-space pointer by the size of the new object, and return the old free-space pointer (assuming it's sane and uses some form of copying GC). This is an O(1) process, and a very fast one at that. When the free-space pointer goes beyond the end of the memory-arena, a GC is started and all the live objects (objects that have references to them) are copied over (the collection takes O(m) where m is the number of live objects).
      In a malloc/free scheme, you'll need to search free-lists which could be quite long if memory is fragmented. Analyzing the performance of malloc/free implementations is a black art which I will not pretend to understand. For information from someone who does understand it, see this paper.

      --
      Rahul Jain

    15. Re:Lisp without GC! by markj02 · · Score: 2

      No, that's not right. Good malloc/free allocators use buckets, hash tables, and trees, and no linear search is involved. It's slower than most people think, but it's pretty fast--about comparable to GC in my experience (there are some cases where GC is faster and some where it is slower).

    16. Re:Lisp without GC! by markj02 · · Score: 2

      Whether copying or sharing is faster really depends a lot on the program and the hardware. "Everything is pointers" can be just as devastating to performance as "nothing is pointers". That's probably why C/C++ are so popular, since they give the programmer control over this important aspect of computation. Languages like Lisp don't, and their optimizers cannot infer the necessary optimizations automatically.

    17. Re:Lisp without GC! by Anonymous Coward · · Score: 0

      Shhh. The plan is that if we repeat our unsupported anecdote enough times, people will believe it.

    18. Re:Lisp without GC! by cracauer · · Score: 3, Informative

      [I work for ITA]

      A real-time GC is not in the least what we need. A real-time GC makes the pauses go away. We don't care about the pauses, we're not interactive. But the real-time GC creates an even bigger overall CPU- and run-time overhead. While the visible pauses go away, the application is slower.

      That is the basic problem about many of these discussions: there is no magic bullet. There are GC schemes more or less suitable for some tasks, but not for others. It is tradeoffs, guys.

      BTW, at my former employer I had a system written in C with parts using the Boehm GC. It was faster than the malloc/free variant (the application's part could switch at compile time). The Boehm GC would screw ITA's system royally, though.

      We could very well write a GC specially coded for our application, but that is a lot of work. And since we can do without system-visible memory allocation when answering search requests, we prefer to that and we hide the data bulk from the GC when cleaning up the systems in-between activities.

      GC is a hard problem, just as manual memory management is. For none of these you can buy or download a perfect solution.

    19. Re:Lisp without GC! by joto · · Score: 2
      While technically true, the difference is really not that much important in practice, as there is a lot of other problems involved in building a good garbage collector (and for any practical program and garbage collector, the size of the live objects would be of the same order as the size of memory requested from the operating system).

      A copying garbage collector is actually guaranteed to allocate at least twice as much memory from the operating system then is currently occupied by live objects. Otherwise, it couldn't copy them. Now, imagine what that does for locality of memory, and cache efficiency (This is why Appel's paper comparing gc and stack allocation haven't made most people abandoning the stack just yet).

      On the other hand, a mark-sweep garbage collector never moves objects, resulting in external fragmentation (also true of malloc/free), which is also bad for locality of memory and cache efficiency.

      You can also use a compacting garbage collector, which works mostly like a mark-sweep garbage collector, but occasionally compacts fragmented memory as well. The downside is complexity (and thus also performance of the compacting phase).

      In practice, the problem of external fragmentation isn't really much of a problem with a good allocator using the buddy-system. At least, almost any non-contrived application or benchmark should have less than 10% fragmentation using a good allocator. But that still leaves the problem of having related objects occupy nearby memory locations open (which is needed for good cache efficiency).

      Copying garbage collection can be used for that purpose. But if you are using the simple two-space algorithm, you'll find that you are doing the exact opposite of that, the two-space algorithm tends to put related objects far away from each other, due to the depth-first search it uses to find live objects.

      So we need another more complex copying collector... But that will again slow down the performance of the collector.

      One possible performance neck of a mark-sweep collector is that it needs two passes: one to mark live memory, and one to collect garbage. But the copying collector is no better, first you need to traverse live objects, then you need to copy them somewhere else.

      While I still haven't touched on the subject of generational and incremental garbage collection, I think you will already see that writing a good garbage collector is far from trivial. There are no simple cookbook approaches for achieving optimal performance. The only reasonable approach is experimentation, testing, and fine-tuning of parameters. Most real-life garbage collectors use a hybrid of different techniques for different types of objects (distinguished by such attributes as age, size, mutability, etc...)

    20. Re:Lisp without GC! by lexpr-funcall · · Score: 1

      It is not that the garbage collection is too slow in Lisp, he gave the reason that the amount of data that it had to go through was very large. The point of the system was to be as speedy as possible and garbage collection would slow that down no matter how much or how little data you gave it to process.

      The speed of your GC does not have to be dependant on the amount of data allocated through Lisp's storage management facility. For example, many garbage collectors (such as those found in the Lisp implementations used by ITA) allow one to allocate objects in "static space" which is effectively not examined by the scavenger.

      The more compelling reason to allocate objects in foreign space is mentioned at the end of paragraph 5. You can mmap() huge amounts of data read-only and have it sharable amongst an arbitrary number of user level processes.

  9. Re:hi by Anonymous Coward · · Score: 0

    ROTFLMAO, that's too funny, offtopic as hell but way tooo funny.
    Y'know, I bet if you went over this with your english teacher and cleaned up the grammar a bit
    you could actually post this someplace else and people would take it seriously
    ; now there's a scary thought.

  10. LISP, language for "perfect code" by MosesJones · · Score: 5, Interesting


    I once worked on a project where we used LISP to processes elements of Radar data. Our reason for choosing LISP was two fold, firstly we were doing List transformation, mapping and comparison. Secondly and most importantly though....

    we knew that when it worked, that was it and we didn't want people buggering with it if they didn't understand it. LISP makes sure that the people writing it are going to have a better grasp on computing that the average C/C++/Java person.

    Of course the comment at the top of "If you come here thinking you've found a bug, you are wrong, look elsewhere. If you are 100% certain then remember this.... everyone relies on this, if you bugger it up thats a lot of angry people" also probably helped. But using LISP enabled us to write a small piece of very tight code that made understanding the task simple.

    You can also write the most evil code in the world in LISP, variables that become functions... occasionaly, excellent stuff >:-)

    --
    An Eye for an Eye will make the whole world blind - Gandhi
    1. Re:LISP, language for "perfect code" by The+Pim · · Score: 2
      we didn't want people buggering with it if they didn't understand it.

      Damn right! I'm disgusted with the common argument that, "in three years, when you're gone, the 'Learn VB in 24 hours' intern is going to have to debug/extend it". That is not a rational approach to code maintenance. You wouldn't have the intern write the code; why would you have him maintain it?

      Keeping a codebase clean and correct long-term is not simple. In some ways, it is fundamentally more difficult than writing new code: You don't get to pick your concepts from scratch, instead you have to discover sensible ways to alter and reuse existing ones. If you just do the first thing that works, you will turn a beautiful design into an abject mess alarmingly fast.

      Of course, your application had special demands, but I believe most organizations would benefit from a similar attitude. Using "obscure" languages to discourage unconsidered changes may seem elitist, but I agree that it is probably effective. (You might compare Linus's argument about debuggers.) I like your warning, as well. :-)

      --

      The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
    2. Re:LISP, language for "perfect code" by CrazyLegs · · Score: 3, Insightful

      You make an interesting point, but the 'obscure languages' angle cannot work in a typical corporate IT environment. In this world you need to deal with legions of meatball programmers peppered with a few alpha-geeks to set direction. The realities here are:

      • software change is constant
      • organizational change is constant
      • code development is a business process

      The only way to deal with all this is to ensure that a hive mentality is enforced where coding standards and methodology are King. This ensures that, from a purely technical perspective, all code looks (somewhat) familiar to all programmers and new programmers can be put to good use in fairly short order.

      Sounds boring (and maybe evil) - sure. But this has been my experience and observations at more than a few large development sites.

      --

      CrazyLegs

      "Pork!!" said the Fish, and we all laughed.

    3. Re:LISP, language for "perfect code" by Anonymous Coward · · Score: 0

      Agreed.

      You will also find it very rare for the alpha hackers (especially recent hires) to volunteer to maintain someone else's code; they want new development projects. Maintenance is almost always handed off to a junior person, preferably someone too timid to protest.

  11. saber and Kasnas City by thogard · · Score: 0, Offtopic

    years ago I had a chat with some nice people in blue suits who wanted to know what I knew about an airline system in Kasnas City and what I knew about programming. Turns out that a friend of mine told the nice men in blue suits that I had taught him how to program. He was part of a group of "evil hacker" types and one of them had been running a multi channel BBS. The BBS had two lines and was running on a vic 20. Now the odd thing about this BBS is you could upload as much stuff as your 110 baud modem could choke on and weeks later it was still there. This was odd considering the best you could on a vic 20 was maybe 8 single sided floppys. It turns out that someone from this evil computer club had found out how to transfer stuff off to one of the backup mainframes and he was using that for storage and all the vic 20 was doing was multiplexing data streams and sending out ansi graphics. I still consider that one of the best all time hacks I've heard of.

  12. Look at the big boys. by digitalunity · · Score: 3, Informative

    The Cray T3E weighs in at up-to-3-TFLOPS; depending on number of processors. Of course, this machine costs over $10,000,000.

    For something a little more practical and realistic, the extremely-fast yet value priced Compaq AlphaServer rings in at 47 GFLOPS.

    Granted, FLOPS aren't a very good judge of speed for this application, but they are easy stats to find. If you really want a standardized test, take a look at the TPC-C stats for the fastest cluster machines in the world. These more accurately reflect the kind of performance stats you're looking for in relation to this article.

    --
    You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
  13. Rule 1 of Efficient Lisp: Lisp is not functional by Nindalf · · Score: 5, Interesting

    The system has a state, which you don't feed entirely into your top-level query, rather, you examine the state, and sometimes change it, from wherever in the program flow you need the data.

    The characteristic that really gives you benefits in Lisp is the way you can have Lisp write itself, creating little programming languages which fit each problem. They don't have the visual appeal of a specialized language written with full freedom to define the syntax, but their form still reflects the programmer's understanding of the problem, rather than the details of the solution.

    People shouldn't talk about Lisp as "functional" versus "imperative" languages like C++, they should talk about Lisp as "flexible" as opposed to the inflexibility of C, which forces the programmer to do tedious, repetitive work.

    Everything about Lisp facilitates this flexibility, from its simple, regular syntax to its implicit type handling.

    Turing said: "This process of constructing instruction tables [i.e., programming] should be very fascinating. There need be no real danger of it ever becoming a drudge, for any processes that are quite mechanical may be turned over to the machine itself." And Lisp is certainly well-made for this method of avoiding drudgery.

    The real beauty of it comes when you have to optimize your code: rather than fiddling with the part that defines the problem, you change the bit that transforms it from a problem definition to a solution. This ability to seperate leaves you free to optimize one problem area however you wish, without having to go around and fix the code in a thousand other places your modification breaks.

    Getting back on topic, Lisp certainly allows functional programming, but sit down with Common Lisp and try to translate a C program into it line by line; you'll have very little trouble: it contains all the imperative stuff you need. For that matter, you can program C in a very functional style, using the trinary ?: operator and recursion, if you like. In either language, though, sticking to functional style as strictly as possible will hurt your performance.

    Just as the standard teaching examples of C, full of gets(), sprintf(), and the like, are terrible for C code stability, the standard teaching examples of Lisp, which emphasize its functional nature, are terrible for code efficiency.

    Some tasks are naturally functional, some are inherently imperative, and any large project (even most small projects!) will include both. A good language for large projects provides support for both, as it is foolish to fight the nature of the problem.

  14. 1964 by Anonymous Coward · · Score: 0

    Sabre has been in existence for quite a long time. I have this April 1964 issue of Fortune that describes the system. The magazine also has other interesting articles like "Security Is Too Important to Be Left to Computers" and ""On Line" in "Real Time"".

  15. Power by Anonymous Coward · · Score: 0

    Most likely, if you have all the PCs on with 2g ram, i would suspect that it is >= to the mainframe. But one nice thing is that you can sleep these when the load is lighter. Even though the web is 24/7, there is a noticable difference during day vs. night (MST). It would be easy to then scale up when you need these. BTW, I suspect that they now run p4's of even a lower powered risc chip.

    1. Re:Power by digitalunity · · Score: 3, Informative

      It depends on what exactly the machine is for. The Cray I linked to has a peak system bandwidth of 136 GB/sec! Of course, this is for the entire system. Bandwidth between adjacent system boards is +600 MB/sec. You cannot do this with commodity PC's even when clustered with Gigabit nics. These are definitely for people wih serious needs. You also get the benefits of a single system image and linearly addressed memory for the entire system. However, if you have an obviously parallel need, like that stated in this article, a cluster is an ideal solution. You can spend less money and get the same result.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    2. Re:Power by aminorex · · Score: 1

      Let's see now, 2.1GB/sec per CPU (PC2100 DDR),
      it would take less than 68 Athlons to provide the
      bandwidth to memory that you describe. To get
      600 MB/sec between system boards would require
      3 bonded gig-e nics per system. For 34 dual cpu
      (COTS) boxes, that's less than 100 ports on the switch. Yeah, you can do with with COTS. Now if
      you want *cross-sectional* bandwidth, it takes a lot more switches, but the PC's aren't the problem.

      --
      -I like my women like I like my tea: green-
    3. Re:Power by Anonymous Coward · · Score: 0

      why stop at gigE? likely for the app that guy is doing
      he cares about inter-board latency just as much as he does about bandwidth. Look at myrinet, quadrix, etc. That will give you both higher speed
      than gigE and lower latency - -while consuming
      less cpu.

    4. Re:Power by digitalunity · · Score: 1

      Sorry, 3 bonded gigabits, assuming ideal transfers is still only 400MB/sec. Also, 68 athlons are going to take up a whole lot of space, yet if you go with an SMP solution, you still only get 2.1 GB/second for both cpus. It's just not an ideal solution.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
  16. Hey don't knock the STL :-) by Anonymous Coward · · Score: 0

    It has performance as a key objective. With a good compiler on a decent machine (i.e. not x86) it has a fair chance to produce reasonable code. Java on the other hand...

    1. Re:Hey don't knock the STL :-) by Anonymous Coward · · Score: 0

      Learning to use STL without knowing how to implement it yourself is risky. It's like learning to use a calculator without knowing arithmetic. You can do some impressive things, but it can be hard to avoid making elementary mistakes.

    2. Re:Hey don't knock the STL :-) by smagoun · · Score: 1

      Java can be pretty darn quick these days, too. While it's not as fast as hand-tuned assembler yet, the newest JVMs (like Sun's Hotspot JVM) can really fly. Factor in the time it takes to develop in C/C++ and the time it takes to develop in Java, and you'll find that by implementing in Java you have an awful lot of time left over to optimize your code/develop better algorithms, etc. A better algorithm will always beat out a bad algorithm written in a "faster" language on a faster computer.

    3. Re:Hey don't knock the STL :-) by sketerpot · · Score: 2
      A better algorithm will always beat out a bad algorithm written in a "faster" language on a faster computer.

      This is nitpicking, but have you tried comparing something written in fortran on an old PDP-something to something using a less efficient algorithm on an Athlon box in assembly?

      Point made, though.

    4. Re:Hey don't knock the STL :-) by PrismaticBooger · · Score: 1
      A better algorithm will always beat out a bad algorithm written in a "faster" language on a faster computer.

      That assumes that your program is limited by the algorithm it's using to perform a task, as opposed to limitations in the system. Unfortunately, with Java, it's those limitations built into the system that tend to bite you in the ass.

      Java relies heavily on dynamic binding. That's a double edged sword. It makes Java a great RAD tool, but a poor performer. Toy benchmarks aside, Java apps run slower than their C++ equivalents. And that's not something you can fix by optimizing the VM. Java itself is designed to rely on that degree of dynamic binding, and you can't optimize all of that away without changing the language itself.

    5. Re:Hey don't knock the STL :-) by Tony-A · · Score: 2

      I think there was a comparison (long ago) between the Radio Shack TRS-80 running the best known algorithm and a Cray solving the 9-body problem straightforwardly, with the Trash80 winning.

      For FORTRAN on an old PDP to assembly on an Athlon, a few million record sort should do the trick.

    6. Re:Hey don't knock the STL :-) by sv0f · · Score: 2

      Java relies heavily on dynamic binding. That's a double edged sword. It makes Java a great RAD tool, but a poor performer. Toy benchmarks aside, Java apps run slower than their C++ equivalents.

      And Common Lisp delivers the best of both worlds. Dynamic binding during rapid prototyping and development. As hot-spots creep-up, simply add OPTIONAL declarations that inform the compiler of the types of critical variables, and the speed benefits of knowing variable types at compile time obtain.

  17. Surely APL by Anonymous Coward · · Score: 0

    is better for write-only code :-)

    1. Re:Surely APL by Tony-A · · Score: 2

      Except that Lisp can define an APL interpreter and EVAL APL expressions. It can do this for several APL-like languages. Simultaneously. This is BEFORE it starts to get vile.
      Disclaimer. I am no way anything like an expert is Lisp, but using things like ATOM, LIST, CAR, CDR as variable or function names, and getting away with it, is child's play.

  18. This is talking about Orbitz, not SABRE itself by Ryu2 · · Score: 5, Informative

    SABRE != Orbitz. The author's company ITA software writes software that the ORBITZ site uses to answer queries against the same flight/fare dataset that SABRE and the other CRSes use, provided by the airlines.

    Think of the various systems, SABRE, etc. as just different systems that are using more or less the same amalgamation of airline-provided data.

    SABRE, and the other CRSes themselves are still running the big iron mainframe stuff, not LISP or Linux, and will likely remain so for a long time.

    --
    There's 10 types of people in this world, those who understand binary and those who don't.
    1. Re:This is talking about Orbitz, not SABRE itself by Detritus · · Score: 2
      Mod the parent up!

      SABRE is a real-time database system with insane storage, speed and reliability requirements. It runs on the biggest, baddest mainframes money can buy, with an enormous disk storage farm. It doesn't run on a normal mainframe operating system like MVS.

      --
      Mea navis aericumbens anguillis abundat
    2. Re:This is talking about Orbitz, not SABRE itself by Anonymous Coward · · Score: 0

      SABRE has signed a contract with EDS for a replacement to the mainframe. The new system will start with 1,000 Compaq Nonstop processors and final configuration will have 4,000 processors.

    3. Re:This is talking about Orbitz, not SABRE itself by Anonymous Coward · · Score: 0

      (_!_)

      See http://nonstop.compaq.com/view.asp?IO=SABREPL for details.

      Anyone know of a stock exchange written in LISP ;-)

    4. Re:This is talking about Orbitz, not SABRE itself by trongey · · Score: 2, Informative

      a replacement to the mainframe. The new system will start with 1,000 Compaq Nonstop processors

      Supplement would probably be a better word than replacement. The Compaq release talks about the fare shopping feature. It is actually a small part of the whole Sabre system; and one that they have never liked having on the same hardware that runs flight management, crew scheduling, pricing, yield managment, booking, ticketing, etc.

      --
      You never really know how close to the edge you can go until you fall off.
    5. Re:This is talking about Orbitz, not SABRE itself by Anonymous Coward · · Score: 0

      Actually, only a piece of the processing will be done on the Tandems (Compaq Nonstop). The mainframes are here to stay for a very long time. The main issue is there are so many applications that feed off the same data (Flight Ops, Crew Scheduling, RES, Catering, Baggage, Check-in, Ticketing) that you can't remove one completely and it's too big to replace all at once. The piece that's moving on to the Tandem is the Fare Search and some of the historical analysis that's better done in that environment. The core day to day operations will remain on the mainframe.

      Things like what Orbitz did are the low hanging fruit of the Airline biz. Each of the airlines and their service providers in Orbitz still has all their core processing on mainframes and the main impetus is to outsource to others that will still run it on mainframes, not replace it with Client/Server apps. The existing applications work and the cost justification to move them just to be trendy isn't there. As interconnect speeds increase, the applications will gradually be parsed into a series of data providers/consumers. Remember that this all must be done while everything is still running and no interuption of existing functionality.

      I'm in the middle of a project now to kill off some desktop applications and replace them with Intranet thin client applications. It was costing too much money to roll-out changes to hundreds of desktops. Existing servers are being consolidated on to fewer boxes to ease management.

      Funny, but I did the same thing about 12-15 years ago. Consolidated disparate departmental systems onto the mainframe to save maintenance. (Which we split out to numberous client/server apps a few years later to save maintenance).

      Oh well.

    6. Re:This is talking about Orbitz, not SABRE itself by MrBoring · · Score: 1

      Which OS were you refering to then? z/OS?

    7. Re:This is talking about Orbitz, not SABRE itself by Fredge · · Score: 2, Informative

      The GDS/CRS companies use IBM's TPF OS for their online reservations stuff.

    8. Re:This is talking about Orbitz, not SABRE itself by Tony-A · · Score: 1

      Standard tactics for new upper management. If it's centralized, then decentralize it. If it's spread out, then centralize it. It's really more of a spring cleaning type of thing. It's drastic enough so that some necessary changes can be made because the status quo in "not" an option. The "saving maintenance" sounds more like an excuse than a reason.

  19. And I thought I'd never... by Andorion · · Score: 2, Insightful

    I just finished CS161 (Artificial Intelligence) at UCLA last quarter.... nice to see some applications for the stuff they teach us here, as most of it seems like garbage. -Berj

  20. Check out there Careers/Programming page by Anonymous Coward · · Score: 2, Interesting

    Located here.

  21. ODBMS by countach · · Score: 1

    I was also under the impression that Sabre make a lot of use of the Versant ODBMS. Pretty advanced stuff.

    1. Re:ODBMS by sabi · · Score: 1

      Ugh. Versant blows. It's the very opposite of efficiency.

      (yes, there's a story and actual experience behind this, I'm just too
      exhausted to write right now, but not too exhausted to post my opinion
      to slashdot. :)

    2. Re:ODBMS by countach · · Score: 1

      Nonsense. You must just be too clueless
      to know how to use it. I'd put it up
      against any other DBMS any day of the
      week when used properly.

  22. Impressed, but... by Bazzargh · · Score: 3, Interesting

    The description of the inner workings of SABRE impresses the hell out of me. However, I've used sabre a lot for getting iternational flights in the past, and I can only recall _one_ occasion when I've not been able to find better/cheaper fares by messing with the search process - kidding the system on that I was going on a single hop flight on each leg that I knew was sensible, for example.

    However it usually does do a reasonable job, the savings I can get by extra typing are minimal. My biggest gripe against such systems is that they havent got a clue about what it is travellers actually want to do. I hardly ever want to travel 'from LHR to CDG' (ie specific airports). I'm usually able to get to any airport with in 50 miles using public transport. So in the UK I would usually like to be able to propose Glasgow and Edinburgh as alternates, or Manchester and Leeds/Bradford, etc. But what I really want is not these simple choices but... I'll tell you where I am, and where I want to get to, now tell me about through fares on buses trains and planes from here to there.

    Given the description they give of the problem it sounds way too hard. But....

    They describe what they're doing as basically enumeration of the graph of all routes between destinations. Once again, this does not mimic what a traveller will do when figuring out how to get from place to place. We construct routes using waypoints - going from one regional aiport to another usually involves connections via hub airports; travelling by train from eg Auchtermuchty to Reading means going via Edinburgh and London. By thinking this way we reduce the number of routes under consideration to a manageable size. (this is also how game ai works. I would include a link to an article on this at http://www.gamasutra.com/ but all their articles are now members only)

    Hell I'm sure they know what they're doing - sound like smart guys...

    1. Re:Impressed, but... by Anonymous Coward · · Score: 0

      and I can only recall _one_ occasion when I've not been able to find better/cheaper fares by messing with the search process - kidding the system on that I was going on a single hop flight on each leg that I knew was sensible, for example.

      Depending on how complicated fare rules are, it seems like what you are asking of it is as bad as the travelling salesman problem.

      It is designed for looking at one-way and round-trip routes, using only "connections" that are officially sanctioned by the airlines. This is probably just as well. Most people require a convenient schedule, where the stops are few and brief.

    2. Re:Impressed, but... by Phillip2 · · Score: 2

      I think the fundamental problem is here, is that the travel companies make things so complex, in terms of fairs, and the various restrictions they place on you. If you combine several forms of transport, and worse international travel things multiple towards madness rapidly.

      So for instance I got a ticket from a travel agent the other day, for a train from Manchester to Cambridge. Total cost...over 200 pounds! Madness. Obviously I sent it back. The insanity is such that even the travel agents get confused.

      Consumer choice sounds like a good thing, and it is in some ways. But choosing can be very difficult. And when its NP-complete choosing with knowledge can be nearly impossible.

      Phil

    3. Re:Impressed, but... by sql*kitten · · Score: 2

      I hardly ever want to travel 'from LHR to CDG' (ie specific airports). I'm usually able to get to any airport with in 50 miles using public transport.

      You can say LON (London Any) which covers Heathrow, Gatwick, City and Luton, IIRC. There are similar codes for New York, Toyko etc. Obviously, BOS is only Logan and AMS is only Schiphol.

      CDG is fairly crap as airports go, I'd rather go via Orly or Eurostar to Gare du Nord :0)

    4. Re:Impressed, but... by jea6 · · Score: 3, Informative

      From the FAA (http://www.faa.gov/aircodeinfo.htm#multiple):

      Metropolitan Areas with Multiple Airports

      These codes don't specify single airports but whole areas where more than one airport is situated.

      BER Berlin, Germany
      BGT Baghdad, Iraq
      BHZ Belo Horizonte, MG, Brazil
      BUE Buenos Aires, Argentina
      BUH Bucharest, Romania
      CHI Chicago, IL, USA
      DTT Detroit, MI, USA
      JKT Jakarta, Indonesia
      KCK Kansas City, KS
      LON London, United Kingdom
      MFW Miami, Ft. Lauderdale and West Palm Beach, FL, USA
      MIL Milano, Italy
      MOW Moskva, Russia
      NRW airports in Nordrhein-Westfalen, Germany
      NYC New York, NY, USA
      PAR Paris, France
      OSA Osaka, Japan
      OSL Oslo, Norway
      QDV Denver, CO, USA
      QLA Los Angeles, CA, USA
      QSF San Fransisco, CA, USA
      RIO Rio de Janeiro, RJ, Brazil
      ROM Roma, Italy
      SAO Sao Paulo, SP, Brazil
      STO Stockholm, Sweden
      TYO Tokyo, Japan
      WAS Washington, DC, USA
      YEA Edmonton, AB, Canada
      YMQ Montreal, QC, Canada
      YTO Toronto, ON, Canada

      --

      sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.
    5. Re:Impressed, but... by Marillion · · Score: 3, Interesting

      I highly recommend a book by Robert Cross. ISBN 0-7679-0033-2. He used to work for Delta Airlines and developed some of the industries priceing practices.

      The airlines tries to segregate customers into different categories by their ability and willingness to pay. They want to make sure that the business traveler who "must fly now" pays more than the vacation traveler. They regulate the inventory to sell enough cheap seats to ensure the inventory doesn't spoil (airline lingo for a flight with empty seats), yet keep enough for travelers with the need to fly and the ability to pay more. The dream is to make sure that every passenger on board a full flight paid as much as their situation supports.

      --
      This is a boring sig
  23. it's probably a toss-up by markj02 · · Score: 3, Interesting
    I think it's pretty much a toss-up whether using Lisp in this kind of system helps. While using Lisp makes initial development and testing much nicer, once you start mixing Lisp and C, debugging gets much harder and you may get very subtle and time consuming bugs in the Lisp/C interface. Note also that Carl also says that, for performance reasons, they have really limited the Lisp features they use.

    Most people who have tried developing these kinds of systems seem to move away from them over time and end up developing a single-language solution--it's simpler to maintain and debug in the long run.

    1. Re:it's probably a toss-up by marcovje · · Score: 1


      It is (afaik) also not clear what the Lisp code competes against on a software level.

      A large part of the article is about the cluster mainframe difference, the rest just says things like Lisp code "WITH BETTER ALGORITMS" vs old mainframe assembler.

      It seems to get the job done, but doesn't reveal if that is because someone sat down, and did his math
      homework properly, or because LISP is great.

      (And I think it is the math thing :-)

    2. Re:it's probably a toss-up by Anonymous Coward · · Score: 0

      It seems to get the job done, but doesn't reveal if that is because someone sat down, and did his math
      homework properly, or because LISP is great.

      (And I think it is the math thing :-)


      The benfit is that Lisp lets you more easily express and test and optimize complex algorithms. Probably more easy for a programmer experienced in both C and Lisp to write an optimized algorithm in Lisp than a naive one in C assuming he's already figured out what the optimized algorithm should do, and to do that he'd be using Lisp anyway. :)

      --
      Rahul Jain
    3. Re:it's probably a toss-up by Anonymous Coward · · Score: 0
      I disagree. Lisp is better than many languages for expressing and testing complex algorithms, but it is also messier than others. But when it comes to optimizing, Lisp is a pain: type declarations don't work the same way across implementations and some crucial aspects of representations, you don't have any control over. And the lack of static type checking means that you need to do a lot more testing than in some other languages.

      Some of the best languages I have found for expressing complex algorithms are in the ML family: they are interactive, safe, and actually reasonably efficient. For more optimizability, Sather and Modula-3 are good languages for expressing complex algorithms.

    4. Re:it's probably a toss-up by mrdlinux · · Score: 1

      Expressing complex algorithms, perhaps, but it's a pain for RAD. Having to determine all the types while you code puts quite a burden on the programmer; it's often orthogonal to the problem and just wastes your time which should be spent working out the algorithm. Also it sucks when you want to express more complicated types such as (or fixnum string) or a type that is selected by a predicate function.

      Also the CMUCL compiler "Python" will do static type inferencing with as much as it can. I believe other implementations are starting to catch on to this, but it's mostly for optimization purposes not for enforcement of type-safety (though warnings will be emitted if a conflict is found). To enforce the matter would be to lose the Lisp dynamicism that we Lisp coders have come to like. The ML compilers will refuse to compile functions that don't typecheck but Python will simply insert a run-time type-check and let it go.

      --
      Those who do not know the past are doomed to reimplement it, poorly.
  24. Is there some better statement of the problem? by markj02 · · Score: 2

    The airline trip planning problem sounds very similar to constrained graph search problems in speech recognition (which are now routinely carried out in real time on graphs with millions of nodes). It would be interesting to see a more detailed statement of what the problem actually is.

  25. confused? by m_evanchik · · Score: 2

    If some of the terminology in this article gets too daunting, check out this online Dictionary of Algorithms, Data Structures, and Problems

  26. I have known about this for a bit by Anonymous Coward · · Score: 1, Interesting

    As Paul Graham said at Beating The Averages, anyone who wants to run a business can say whatever they want in publicity, but they have to tell you their technology in their job ads.

  27. Best pronunciation of "Lisp" by doctor_oktagon · · Score: 1

    Surely it's "Lithp"?

    Yeah Yeah Yeah I know it's poor too ;-)

  28. ITA Software by sinserve · · Score: 1

    Was recruiting Lisp programmers from an Slashdot ad! :-)

    Am I the only one who was busy solving those puzzles they posted? (I know some people like Kaz
    solved it, and posted hints on usenet.)

    1. Re:ITA Software by Anonymous Coward · · Score: 0

      You weren't the only guy... I whipped up some python code to solve their challenge.

    2. Re:ITA Software by J.Random+Hacker · · Score: 2

      don't tell me the answer -- i don't have enough spare cycles to answer quickly, and i'm not done yet... :)

  29. Good lessons by f00zbll · · Score: 3, Insightful
    The post had some valuable lessons:

    1. use the right tool. As the post stated, they chose to use C when LISP would incure a performance hit. Loading all the data into memory statically makes a lot of sense, considering how many searches it has to support.
    2. advanced topics like algorithms are good tools for solving challenging problems
    3. try to maximize your knowledge of the system. This is probably one of the hardest, since most projects are under "I want it yesterday" schedules. When it was necessary, they looked at how LISP compiles the code and weighed the benefit of optimization or using C. Realistically, most projects don't have the time for this step, but it is still worth while to attempt it.

    Reguardless of the language, I found the post insightful and informative. All of the techniques and decisions described in the post can be applied to most projects. Sure, most websites don't need to support the massive number of searches like Sabre, but programmers can apply those principles. Keeping a balanced foot isn't easy and there's always politics added to the brew, but with perseverance, programming can be something that provides a great service and tremendous personal pride.

  30. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by gmarceau · · Score: 1
    For that matter, you can program C in a very functional style, using the trinary ?: operator and recursion, if you like. In either language, though, sticking to functional style as strictly as possible will hurt your performance.

    Well, not really. The lack of higher-order function will eventually force you to use imperativeness. Then, the missing 'const' keyword won't be there to help you mesure the spread of your imperativness. The two togheter makes it rather useless to attempt coding in fn-style in C.

    With C++ however, I'll agree you can enjoy some of the befinits of fn-style. In fact, I posted a little piece about it.

    --
    This post was compiled with `% gec -O`. email me if you need the sources
  31. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by martinflack · · Score: 2

    Some tasks are naturally functional, some are inherently imperative, and any large project (even most small projects!) will include both. A good language for large projects provides support for both, as it is foolish to fight the nature of the problem.

    I'd like to see somone post a couple of brief examples of things that were well-suited to Lisp (and would be much more difficult in C) - anyone have anything handy?

  32. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by redhog · · Score: 3, Informative

    Functional programming vs. imperative programming have nothing to do with efficiency. At least not run-time efficiency.

    For an example of an (very basic, and done by all LISP implementations, and even partly by some C compilers, e.g. gcc) optimization, see "tail recursion optimization" in your nearest LISP-implementation documentation.

    As yoy state, some problems are "inherently" imperative, and some are functional, to their nature, but that has more to do with how easily their solution is formalised in either formalism, not how well that solution is then executed.

    But I think one should not emphasis that property as much as that LISP does have a garbage collector, which C does not have. It does not _allow_ for you to have neither memory leaks, nor crashes due to multiple free()'s of the same location. And it doesn't have any sprintf() that can produce buffer overruns. But OK, then you could use Java :) Java is just LISP with objects and fancier syntax...

    Also, as you state, lambdas and higher-order-functions are central to what's good about LISP.

    --
    --The knowledge that you are an idiot, is what distinguishes you from one.
  33. Lisp is perfect for this by kzadot · · Score: 1
    We used Allegro CL and the cl-http web server to implement very rapidly a web based sql-tutor, it used threads, integrated perfectly with ODBC, JavaScript, and even functions contained in a windows dll.

    http://ictg.canterbury.ac.nz:8000/sql-tutor/

    Dont know if this link still works from everywhere.

  34. Lisp on TPF? by SpiritusSpatium · · Score: 1

    Sabre runs on a highly specialized operating system (not really but that is the closest analogy) called TPF (Transaction Processing Facility). The majority of the system is written in macro based 370 Assembly. Just now, there has been some C development deployed comercially. Sabre handles sustained message arrival rates that are insane (on the order of 6000 messages per second)! In order to do that with 1970's technology, you have to write down to the metal!

  35. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by jandrese · · Score: 2

    An RPN calculator? Back when I used to play with Scheme in school (Scheme is the toy version of Lisp), I noticed that anything with a stack based logic was natural in Scheme. The C implementation was considerably less elegant in the end.

    --

    I read the internet for the articles.
  36. Correct Title - Common LISP: Outside Sabre by trongey · · Score: 1

    The article is talking about front-end software that could do fare shopping. These guys aren't replacing the mainframes that run the airline industry - they're providing a nice interface to use the data managed by the mainframes.

    Based on the line claiming that they work with 2Gb of static data this sounds like the original message referred to a prototype. The reservation systems measure their data in Tb, and it's very dynamic.

    Looks like /. just ran a nice ad for some folks who are trying to get some work building software for online travel sites.

    (Note: The Sabre bomb-proof bunker isn't located in any of the cities listed. I know because I can look out the window and see the top of it. See this.)

    --
    You never really know how close to the edge you can go until you fall off.
    1. Re:Correct Title - Common LISP: Outside Sabre by RatOmeter · · Score: 1

      " (Note: The Sabre bomb-proof bunker isn't located in any of the cities listed. I know because I can look out the window and see the top of it. See this [sabre.com].)
      "

      My brother say's it's underground, at/near the end of a runway at TUL. He's an HP guy and has been there on American Airlines account(s). That ring true? And does Sabre use much HP gear?

  37. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by NoOneInParticular · · Score: 1

    Looking at your page, maybe you might want to try
    out another level of functional (but very inflexible) computing
    possible with C++.
    It's a bit extreme and completely offtopic, but more efficient
    than this (save for pre-calculating) I cannot imagine:

    #include &lt iostream&gt

    template &lt int N &gt int factorial() { return N * factorial &lt N-1 &gt(); }

    template &lt&gt
    int factorial&lt 1 &gt() { return 1; }

    int main()
    {
    std::cout &lt&lt factorial&lt 10 &gt() &lt&lt std::endl;
    }

  38. ITA is Hiring! by bingeldac · · Score: 1

    ITA is currently hiring for a variety of positions.

    Here is the link.

    1. Re:ITA is Hiring! by ajs · · Score: 2

      Actually, since Bing and I are across the hall from eachother, here are ITA, let me point out that the really interesting story is that we have the best programming puzzles in the industry.

      The goal is to get candidates to submit code samples of their work that actually address the kinds of problems that we work on, so if you can do the puzzles, send us your code and a resume, and there's a great chance you'll be hauled in for an interview at one of the best tech companies in the country!

      Keep in mind that we're not just a LISP shop. I'm in the operations group, and I do a lot of Perl and C++ work. Submit code in any language you like!

  39. Sabre is its own interesting case study by Ars-Fartsica · · Score: 2
    If memory serves me correct, the application (which is quite old) sits directly on hardware, no OS in between. Correct me if I am wrong on this, as this may be true for an older version of Sabre.

    The Sabre system is maybe the more interesting case study - how engineers kept an ancient and likely antiquated system up and running in the face of massive industry/technological change.

    1. Re:Sabre is its own interesting case study by M_Talon · · Score: 3, Funny

      It used to. I still remember the old nasty green screen dumb terminals that every airport and agency had. Nowadays, they use an emulator on a PC to get the same functionality.

      --
      Electronic Frontier Foundation for online civil rights information
    2. Re:Sabre is its own interesting case study by SpiritusSpatium · · Score: 1

      Don't let the window dressing fool you. It still is essentially the same system it was in the 70's. The emulators are talking to the same front ends that the dumb terminals were. If you ever had to "Ride the Wild Sabre", you would know that the emulator is as dumb as the terminals.

    3. Re:Sabre is its own interesting case study by Anonymous Coward · · Score: 0

      Not only that...but they manage to keep SABRE up with less than 8 minutes(scheduled + unsheduled) of downtime per year. Throw in a guarenteed 7 seconds response time world-wide and average of 5,000 transactions per second and its pretty darn amazing. Not even Linux can come close(unless maybe Linux on a 390...)

      The next gen SABRE is supposed to run Stratus' Non-Stop Unix(swallowed up by Compaq maybe HP soon)if it isn't killed off.

      Its also amazing that American, USAir, and Southwest all run out of the same facility in Tulsa.

    4. Re:Sabre is its own interesting case study by M_Talon · · Score: 2

      LOL...been there, did that, got a few t-shirts to show for it. My wife still works with it on a daily basis. I know EXACTLY how "dumb" that emulator actually is. Yeah, it's got a few nice perks, but for the most part it's still the same thing as it always was. Now it just comes with pretty colors.

      Point was that the hardwired dumb terminals themselves went the way of the dodo about 8 years ago. There are still a few locations with them, but it's mostly a PC world now. They just came up with a nifty bit of programming to make the PC act and talk like one of those terminals within the confines of the program. Amazingly enough, it still gets the same 4 second request to response time anywhere on the network in normal conditions. Considering how many requests go over that system in an hourly basis, that's pretty darn impressive.

      --
      Electronic Frontier Foundation for online civil rights information
    5. Re:Sabre is its own interesting case study by Anonymous Coward · · Score: 0

      It is even older than the 70's. TPF was developed from ACP (Airline Control Program) in the 60's. As old as it is, there really isn't anything to compete with it when speed is the ultimate requirement matched with a huge database. Most work is still done in 360/370 assembler but C and C++ use is increasing.

    6. Re:Sabre is its own interesting case study by pdrome4robert · · Score: 1

      Sabre and other CRSs (aka GDSs) are pushing their processing out to the vendors (airlines, hotels, cruise lines, rental cars). My employer, a vendor, is implementing this new Seamless initiative. Requests from Sabre terminals for rates and reservations are redirected to vendor computer systems. Sabre requires subsecond response time for rates and 7 second response for reservations. Sabre only has to control the distributed transaction. Other CRSs have similar project too.

  40. Original Title: Inside Orbitz by bugbear · · Score: 2, Informative

    You are right. The original title of this article was "Inside Orbitz", but within slashdot they edit the title and description you submit, and in the process all the references to Orbitz got changed to Sabre. They are different programs. Sorry if this has confused anyone.

    --pg

  41. 200 boxes at $3000 is not cheaper than big iron by Great_Geek · · Score: 2, Interesting

    Just to point out that this is another case of the mainframe big iron being more cost effective. Take 200 boxes, add networking, admin cost, and the mainframe looks pretty cheap.

    Also, ignoring whether Lisp may or may not be better suited for this problem, the algorithms described can be implemented in many languages with. Indeed, many program use all those tricks.

  42. Dual processors and GC? by Midnight+Thunder · · Score: 1

    Not knowing too much about GC, could someone tell me whether it would be possible to implement a solution , using a dual processor computer, where one CPU does the work, while the other handles the garbage collection. Would it work and would this be one way of dealing with the performance issues?

    --
    Jumpstart the tartan drive.
    1. Re:Dual processors and GC? by drj11 · · Score: 2, Informative

      It is certainly _a_ way. More on GC? See The Memory Management Reference.

      IIRC the following paper details it being done on DEC Firefly processors:

      Andrew W. Appel, John R. Ellis, and Kai Li. Real-time concurrent garbage collection on stock multiprocessors. In Proceedings of the 1988 SIGPLAN Conference on Programming Language Design and Implementation, pages 11--20, Atlanta, Georgia, June 1988. ACM Press.

    2. Re:Dual processors and GC? by kinga · · Score: 2, Informative

      Have a look at an article on IBM's concurrent collector

    3. Re:Dual processors and GC? by Doctor+Memory · · Score: 1

      It probably could, but in this case they want the absolute top performance from the box. That means they're already using both processors to handle incoming requests. Temporarily repurposing one to handle GC would result in a performance hit.

      Given a less time-critical application, though, running GC on a separate processor would be a good option. Java runs the GC in a separate thread, which could (depending on the OS) be run on a separate processor, but I don't know if that happens IRL.

      --
      Just junk food for thought...
    4. Re:Dual processors and GC? by RockyJSquirel · · Score: 1

      I work on multiprocessor projects... There's a significant performance hit when one processor tries to change memory that's dirty in another processor's cache, and on some processors, such as SPARC, it's fatally slow. I have a vague memory that on SPARC, the processors can stop for hundreds of microseconds as memory gets shipped around, as impossible as that sounds.

      Rocket J. Squirrel

    5. Re:Dual processors and GC? by Midnight+Thunder · · Score: 1

      Maybe one solutuion would to be have processors with a co-processor that has access to the same cache who's only role is to deal with garbage collection?

      --
      Jumpstart the tartan drive.
  43. More about ITA Software and Lisp by lfettner · · Score: 1

    Franz Inc. interviewed Jeremy Wertheimer, founder of ITA Software, about why he used Lisp to build their software. The story can be found here:
    http://www.franz.com/success/customer_apps/data_ mi ning/itastory.lhtml

    1. Re:More about ITA Software and Lisp by ep385 · · Score: 1

      you have an extra space in that url... here's the correct one

  44. Math by slashdot2.2sucks · · Score: 1

    functions that have multivariable output

    in C I have to do tricks

    in LISP it is natural

    1. Re:Math by ahde · · Score: 2

      struct

    2. Re:Math by RevAaron · · Score: 2

      ...and using a struct where it really doesn't belong is a "trick."

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    3. Re:Math by slashdot2.2sucks · · Score: 1

      I program in C far more than LISP ... do not take me for an idiot. (not that returning a struct is a good solution)

      Try this, have a function that takes an n-dimensional vector as input and an f(n)-dimensional vector as the output.

      Yes, I could do this in C, but it would be a "trick".

    4. Re:Math by jaoswald · · Score: 2

      "struct": obviously, you've never experienced real multiple value returns. As if Lisp doesn't have structures also.

      Multiple value returns in Lisp are more flexible than structs because the caller does not have to accept all of the values that are being returned. If you just want the first value returned, simply call the function. If you want to capture multiple values, do so. Furthermore, multiple values propagate painlessly through the function call chain.

      With structs, you have only a single return value, the type of which has to be recognized by every function in the call chain in order for the values to be captured.

      Primary example: getting a value from a hash table. There are really two things you want back: the value corresponding to your key, and whether the key actually had an associated value.

      Lisp: "return two values: the value, and whether the key was present in the table" No call by reference needed. No pointers.

      Other useful examples: the Lisp floor and ceiling function return two values: the integer part and the fractional part that was truncated. Usually, you ignore the fractional part, but sometimes, it is convenient to have.

  45. Scheme and COM by Anonymous Coward · · Score: 1, Interesting

    See http://www.cs.rice.edu/CS/PLT/packages/mzcom/index .html for a way to embed scheme in your Windows apps...support the rebellion! Write VB apps that do all the processing in Scheme! It will improve your sanity, promise.

  46. Orbitz has cool technology, but a crappy web site. by dbuttric · · Score: 1

    I think its great that Orbitz has such cool software. But there web site is abismal. I've spent more money than I had to on flights there. Well, no more...

    Unfortunately, I still think that the ease of use award goes to -- Ugghhh -- Expedia. The expedia site is simple, clear, does not flood you with data. Itineraries are presented in simple concise ways that people can understand.

    I got stuck with a night lay-over in Baltimore in an itinerary, in a flight from Boston to Saint Louis. Somehow, Orbitz thiught that it could present me with that, Well, I didn't see a night layover in the itinerary until I had printed it out... Expedia makes it easy to see that sort of problem with a flight up front.

    All the software in the world cant fix a bad user experience.

  47. My experience with Common Lisp by Jon+Howard · · Score: 4, Interesting

    Since the day I joined Franz Inc. as the new Webmaster, I have been writing more code than at any previous point in my career. I have become immersed in Lisp programming, specifically AllegroCL, which I found to be a stimulating challenge to learn. I discovered that writing Lisp is sheer joy to anyone who has ever been frustrated out of programming by the tedium of obligatory declaration of data types, allocation and de-allocation of memory and the like, or simply by the time they take to learn. To finalize my education in AllegroCL, I was tasked with replacing the Franz webserver with AllegroServe. Though I am not a slow student, I made many mistakes and found that the simplified testing of code via the AllegroCL debugger and the ability to modify a program while it is running were indispensable tools both in my education and software troubleshooting. Making use of these features, I have found that adding new code to a program is remarkably easy to do, even when that new code requires making significant structural changes. In the end, I'm always left with a program which runs as quickly as any others I use and exhibits enhanced stability and security features while maintaining a reasonable memory footprint.

    Among my first tasks at Franz was familiarizing myself with Allegro Common Lisp. My interest in Lisp's long, rich and diverse history was one of the chief reasons I applied for the job, so I was happy to oblige. I've always found the history of computing to be of great interest, and Lisp has been there throughout most of the last 50 years (of currently-used languages, only Fortran predates its nativity), so I find its endurance of especial interest. Lisp has undergone a process of evolution during its lifetime spawning several dialects, one of which is Common Lisp; AllegroCL is an implementation of Common Lisp.

    The aspects which I find most satisfying in AllegroCL include automatic memory management and dynamic typing of data. Both of these features eliminate a tremendous amount of tedium from coding and allow me to get more work done in less time. I was never a serious programmer before I was introduced to Lisp, but now I've found a passion which outweighs my penchant for computer gaming. In the past, I would frequently spend much of my free time mastering the newest reason to own a 3d-accelerated video card, but recently I've found that I have more to show afterwards if I write code for fun, as evidenced by the chatroom software I wrote as an educational exercise which can be seen in production on my server at home, here (running on AllegroServe). It took a little longer to write the chat software than it usually takes me to master a new game, but at a total of 16 hours, it was less than half the time that most games take to complete. I began working more and producing a tremendously increased level of output, all without the slightest increase in my stress level.

    After spending a couple of months with Franz, familiarizing myself with my responsibilities as Webmaster while learning Allegro Common Lisp, I was tasked with converting the Franz website from Apache webserver to an AllegroServe-based solution, which entailed writing a webserver which used AllegroServe at its core and provided all of the features which I found in Apache, while adding a few site-specific features. AllegroServe's chief developer, John Foderaro, and I were able to complete this task in time for the recent release of AllegroCL 6.1. The speed of development under AllegroCL was due in no small part to the ACL debugger of which I made prodigious use early-on. The ability to inspect running code and make modifications at the point of failure not only made it a simple matter to identify and fix bugs, but it was also an invaluable educational tool. Initially, I wrote bad code - lots of bad code - but every mistake I made was immediately obviated and resolved through liberal application of this handy tool. The ability to directly interact with data in a running program provided education that extended beyond the scope of any single programming language, my ability to visualize software structure and the flow of data was greatly enhanced.

    After a few weeks of use, I began to realize that I wasn't having more than one bug in my code every few days - needless to say, I was elated. Until this point, I was working on relatively simple aspects of the webserver, such as the Franz menu generation, customer survey, and trial download sections. This accelerated rate of learning gave me enough positive feedback that I felt comfortable taking on more ambitious segments of the project. After I progressed through the header, menu, and footer-wrapping code which provides the interface to my earlier menu generator's output on Franz' "lhtml" pages, I came to the logging facility. By far, writing the code to manage the log handling was the most challenging aspect of the webserver's design so far. It was at this point that John and I came to realize that we would need to significantly enhance the virtual-host capabilities of AllegroServe to provide such services as separate access and error log streams for each individual virtual host. Despite the challenge, John managed to implement these changes in less time than it took me to write the code to handle formatting the logfiles in a manner compatible with Apache's output, which Franz especially required to enable the continued use of certain website log analysis tools. The two of us had completely changed the manner in which AllegroServe handled logging in a mere two days. John also eventually added excellent support for running standard CGI programs which would have their own log streams, and I made use of the added functionality to support a "cgiroot" which allows the Apache-like feature of being able to specify a path in which cgi programs will reside while sending any cgi log output to the vhost error log. I would encourage any current Apache users who wish to try-out AllegroServe to make use of this feature when configuring a server, it makes CGI installation and use a snap. After I'd written the bulk of my contribution to our system, I hit upon another necessary feature, the ability to include in-tree access control files akin to ".htaccess" files under Apache. This was a significantly more complex challenge than the logging and virtual host modifications John and I had previously added, due to the depth of the AllegroServe feature-set we would have to make available for modification within these files, and the associated security concerns. This obstacle took a fair amount of time to surmount, John made significant changes throughout AllegroServe, and we went through a great deal of testing to ensure that no security risks had been created. In the end, we were satisfied that we had made a very worthwhile addition to the webserver.

    I continued writing interface and configuration code and enlisted John's expert help whenever I would find a feature AllegroServe lacked, and we concluded the conversion with a version of the Franz webserver that has only required minor modifications since. When I had ironed-out any remaining bugs, of which there were fortunately very few, John assisted me in profiling our code to assess its speed bottlenecks. After heavily load-testing the server, we discovered that the slowest part of the code was that used to check the timestamps on files for the purposes of updating our cache. This was greatly satisfying because the speed of this code was so fast that we could not consider this to be a problem. We also discovered that there was an excessive memory waste within a few seemingly clean segments of code, we were using a dynamically-sized string creation function which relies upon the multiple different data types for the sake of convenience. We converted this to make use of a large fixed-size array which would contain the string, even if it grew as long as it possibly could, and halved the server's memory usage. Bandwidth load testing showed that we had an extremely fast server - we were able to utilize around 850-900KB/sec. across a 10 megabit network when running the system on an Intel Celeron 533. Additionally, thanks to our prior memory-usage enhancement which came-up during profiling, we were only using a total of 30MB of RAM for the webserver, cache and all.

    I am very satisfied to have had a hand in such a successful project, especially successful considering that I was a rank novice programmer when I began work on it. The speed with which I learned to program in AllegroCL was an entirely new phenomenon to me, one which has enriched my computer usage and allowed me to express my ideas for software in code, something I never had the capability of doing in the past due to my unwillingness to suffer through the tedium programming had historically presented me with. When I found myself attaining a satisfactory level of programming ability, I was struck by the ease of writing clean and modular code on the first attempt. Augmenting that ability, the ease of adding and restructuring AllegroCL code to a running or non-running program, especially with the aid of the ACL debugger, greatly decreased both my development time and my frustration while further enhancing my level of programming skill. I have learned a great deal about Lisp, AllegroCL, and programming in general over the course of this project, and without it I would not have had the chance to make such a satisfying acquaintance with Allegro Common Lisp, which has become my programming language of choice.

    1. Re:My experience with Common Lisp by owenomalley · · Score: 1

      I'm a big fan of Franz lisp, I used it extensively in my work a couple of years ago. The debugger is very nice (recompiling a function in emacs with a keystroke into the currently running executable!!). The commerical compilers also are much better optimized than the free ones. My big problem with Franz is how expensive their compilers are. $60k/user is just a little insane...

    2. Re:My experience with Common Lisp by e40 · · Score: 1

      $60k/user... no, you are insane. What are you talking about?? Now, if you meant $6k/user that would be more in the ballpark, though it doesn't take into account site licenses, which could be significantly lower than that.

    3. Re:My experience with Common Lisp by Jon+Howard · · Score: 1

      I think you've got your numbers wrong there, perhaps you're talking about a site-license deal or a VAR. I could be wrong, but I haven't heard of any single deals of that magnitude around here.

    4. Re:My experience with Common Lisp by Jon+Howard · · Score: 1

      correction - make that a non-site-license deal or a VAR... but I don't do sales work, so I don't really know what I'm talking about. I know you've got way too high a number for anything I have seen, though.

    5. Re:My experience with Common Lisp by e40 · · Score: 1

      Also, "Franz Lisp" is something else. You meant "Franz' Lisp", or Allegro Common Lisp.

      Franz Lisp was a dialect of Lisp that predates Common Lisp, born at UC Berkeley in the late 70's. It was distributed with BSD (on the VAX).

    6. Re:My experience with Common Lisp by foote · · Score: 1

      Your story, and the Paul Graham article, are fascinating. But what does it mean when a Slashdot reader says: "I was never a serious programmer before I was introduced to Lisp..."

      Were you low level like me, in that you know a bit of C and spend most of your time with Perl and Javascript? Or are you like a professor of mine, who said he was not much of a programmer, really, but who turned out to have a Master's from the University of Pennsylvania in computer language development, and a PhD from Georgia Tech in computer science (with an emphasis on databases, so maybe that's why he said he's not much of a programmer and more of a theorist.)

      I'm going to start experimenting with Lisp, but I would like to know what kind of education and experience you had that helped you pick it up so quickly.

    7. Re:My experience with Common Lisp by Jon+Howard · · Score: 1

      Glad to answer, I hope this help clarify my former level of programming skill to you.

      Prior to joining franz and learning Lisp, I was much more "high-level" in the sense that I would often make use of several programs that other people wrote to accomplish a task which I would now (much more efficiently) program my own solution to. I tinkered in C, C++, PHP, and Perl, and a few others, but the most I did with those was web-related simplistic CGI software and a few minor administrative tools and shell scripts. Nothing fancy, not even any socket programming. No, I wasn't totally new to programming, but I was far less skilled than most programmers I'd met.

  48. Some "semi-official" comments by cracauer · · Score: 5, Informative

    Hi,

    I am working for ITA and like to comment on some issue brought up here:

    1) As said, we talk Orbitz here, and not SABRE. Currently, Orbitz
    uses our software for domestic US flights, not for international.

    2) Our engine does not use a functional programming style, rather the
    opposite. Still, we found that Lisp is a great advantage. While
    each hacker here has own preferences why he/she likes Lisp, key
    elements (I see) are:

    2a) macros, especiallly macros that allow us to define new iteration
    constructs. C programmers can thing of being able to write their own
    for/while/if as seem appropriate for the task as hand. Especially
    with-[whatever] constructs, but also nice tricks with
    destructuring-bind.

    2b) scope, working annonymous functions with static scope. Kind of
    Java's inner classes but in 1/10 of the codelines.

    2c) said destructuring-bind which frees your from a lot of boring and
    error-prone tasks of tree parsing with a snap.

    2d) compile-time computing, a key element to make our software fast
    without cluttering it up by expensing manually written source code by
    a factor of 100 or by inventing ad-hoc code generators which need to
    be debugged after they broke your system for weeks. Macros that can
    use the full language at compile time and macros that can "walk" their
    argument when passed at compile-time to find interesting things to do
    with them. Also see define-compiler-macro to get an idea what makes
    Lisp code fast while maintaining elegance (use with care, though).

    2e) safety. A language without optional overflow checking of integers
    is a toy at best and dangerous at worst.

    2f) debugging and testing with the read-eval-print-loop (REPL). Like
    the gdb prompt for evaluating code, but you can use the native
    language and you have the full language. Or better like a shell where
    thing's aren't echoed in ASCII and need to be re-parsed, but you get
    the real objects you can play with (send message as defined in your
    system). The debuggers in Allegro and CMUCL are rather crappy, IMHO,
    but the REPL and ultra-fast re-compilation and loading of single
    functions (standard feature of every Lisp) -used for debugging print
    statements- make more than up for that.

    Keep in mind that everyone of our Lisp hackers can contribute a Lisp
    of similar length, this is just what *I* like.

    For the record, I like C++, but I couldn't absord all the application--specific knowledge I need while spending my day figuring out C++ specialities and keeping them swapped in. C++ is for full-time C++ coders only.

    1. Re:Some "semi-official" comments by tracktwo · · Score: 1
      2f) debugging and testing with the read-eval-print-loop (REPL).


      Ok, perhaps someone can clarify this for me. I really like the features of lisp & derivatives, and some other higher level languages (python comes to mind) for debugging "on the spot", and not getting core dumps. But, my question is, what about when you *want* a core dump? I'm talking a program that is "allowed" to crash (ie people won't die) but shouldn't be "down", sitting at a interpreter/debug prompt waiting for you to figure out what caused the crash. Something like a web server or other network service that may crash at 3am and be down for several hours, or automatically restarted, but then you lose the "core" -- the complete image of the system at the tmie of the crash. The nice things about coredumps in this situation is that you can restart your service automatically, and still have a complete memory image of the problem for post-mortem debugging. Can lisp/scheme/python/whatever mimic this system? Or, am I just thinking in C mode and is it a non-issue?

    2. Re:Some "semi-official" comments by Anonymous Coward · · Score: 0

      Surely coredumps are a feature of the OS, not the language. Analyzing the coredump easily is what requires a debugger knowledgable about the compiled form of the language.

    3. Re:Some "semi-official" comments by e40 · · Score: 1

      How about instead of a coredump a stack trace? You can install a general error handler around any application that does this, or anything else for that matter. You can write application specific data dumps at the time of unknown errors.

      Then, when the program exits, something else (a shell script, or whatever) can restart it.

    4. Re:Some "semi-official" comments by jaoswald · · Score: 2

      That is a fascinating question. You might try to ask it on comp.lang.lisp to get the response of people who have built long-lived Lisp systems, but you might just cause a ruckus.

      Obviously, for errors that are foreseen, you can set up proper error-handlers in a robust, flexible way, as usual for Common Lisp. The problem is unforeseen errors, such as stupid typos in code that were never exercised, and cause run-time type errors. The default action in Lisp is to present the debugger prompt.

      A "core dump" is an OS-dependent concept--a C program does not know what to do when it dumps core, the OS does. However, you can typically "save" an executable image of a Lisp session.

      One can provide a value for *debugger-hook*, a special variable that contains a function which will be called before the debugger is entered. In that handler function, one could include a "save image" command, then a jump to some "reset" point in the main program loop, to start from scratch.

      Then, one can probably debug the saved image at your leisure. I have never tried this, so I don't know if most vendors' Common Lisp implementations can get you to the debugger in the error condition , preserving the call stack so that you know where the error occured.

      Alternatively, you could call a system command to dump your core for you. What your debugger does with such a core file is a good question.

    5. Re:Some "semi-official" comments by tracktwo · · Score: 1

      I have tried the save image method (that was the first thing that sprang to mind for me) but on the implementations I tried (CMUCL & CLisp) it is exactly as you say: the image is there, but the traceback info is not. Even simply printing the traceback to a file is better than nothing, but its a read-only solution. I tried with python as well, with pickling the actual traceback object and writing that to disk, but I also ran into problems.

      I hadn't thought of forcing the OS to dump core for me, but unfortunately the problems with this would be twofold: First, as you say, finding a debugger that can make any sort of sense out of the core may be tricky. Secondly, you wouldn't just get an image of the running system (as you would in C) but rather an image of the interpreter + system.

    6. Re:Some "semi-official" comments by jaoswald · · Score: 2

      This is an interesting problem.

      I wonder if any systems have enough introspection that you can capture the call stack in a variable before dumping, for later inspection in the image?

      The problem of the OS core dump that I was thinking about is somewhat more subtle: when you dump core, the PC is at the point where you are making the system call. When you bring the core image up in the debugger, can you continue executing machine code where that system call *would have* returned? Because then, in your code, you could have something like


      ;;; this is my runtime error handler
      (progn (dump-core) (invoke-debugger))

      of course, dump-core doesn't return in the normal execution flow, but later in the core debugger, can you simply continue execution into the Lisp debugger, and then get full access to the backtrace inspection, etc.?

  49. This problem isn't as hard as they make it sound by ahde · · Score: 2

    While it may be possible to create 5000 connecting flights between Boston & LA with a maximum of 3 hops in a 24 hour period, you'll have to include flights like:

    LAX -> JFK
    JFK -> SFO
    SFO -> BOS

    It shouldn't take a smart computer to rule those out. Also, the possibility of 5000 (going) x 5000 (returning) x 100000 (fares) is ludicrous. Plus, airlines use hubs airports, so there are only a limited number of logical flights.

    And to top it all off, you don't have to consider every combination. You can start with a list of (arbitrary number) 50 likely flights for price, time, speed, etc. and try their connections. You just do a simple query, pull up the 5000, and before even eliminating illogical and conflicting ones, pull a few the top of the list.

  50. It's the flexibility... by frank_adrian314159 · · Score: 2
    ...very similar to constrained graph search problems in speech recognition...

    Not really. The objects searched over (phonemes) come from a relatively unchanging set having relatively unchanging attributes (frequency, duration, level, etc.) and are mapped to a relatively unchanging set of objects (vocabulary doesn't change that fast). New service levels, attribute changes, and itineraries need to be taken into count in the airline booking issue.

    In the end, it's the flexibility in adding new models and code to handle new models in a seamless manner that makes Lisp (and other dynamic languages - e.g., Smalltalk for finance, Erlang for multiprocessing phone switches) so appealing for this type of problem.

    --
    That is all.
    1. Re:It's the flexibility... by markj02 · · Score: 2

      Your idea of speech recognition is about 10 years out of date. Language models these days are huge and take into account syntax and semantics (not just vocabulary). Systems adapt to individual speakers, whose pronunciation differs systematically, and their language models adjust dynamically to the conversation. You update these systems not by hacking around with the code, but by adding new models and rules.

  51. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by mrdlinux · · Score: 2, Interesting
    A few notes:
    • Common Lisp does not guarantee tail call optimization, but most decent implementations do it.
    • Common Lisp does not guarantee a garbage collector either, but again, most implementations gotta do it ;)
    • Tail-recursion is nice, but macros like LOOP with the extended syntax are quite powerful. I would say that Common Lisp is better at iteration than most other languages.
    • Your implication that Lisp lacks objects is false. In fact you are wrong: not every type in Java is an object (int, char, etc..). In Common Lisp, every type is an object that has its own identity. You should read Kent Pitman's article on the misappropriation of the term "Object- oriented"
    • Also you should read the section of the CLHS that discusses CLOS: The Common Lisp Object System, which is far more powerful object-system than the pathetic Java/C++ one: with multimethod dispatch, method combination, and multiple inheritance. If you feel adventurous, read the Art of the Meta Object Protocol (AMOP) which you can buy for ~ $40, which discusses how to implement CLOS while exposing the internals in a controlled fashion; which allows you to modify the behavior of CLOS easily.
    • Yes, Common Lisp is not all there is to Lisp but it is the most widely used one today. Consult the Common Lisp HyperSpec for more information: CLHS
    --
    Those who do not know the past are doomed to reimplement it, poorly.
  52. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by gmarceau · · Score: 1

    oh men, we realy shouldn't make fun of poor C++'s limping after-thought compile-time computation facilities. Think of its fellings!

    But when you think the equivalent elisp code is:

    (defun fact (n) (if (= n 1) 1 (* n (fact (- n 1)))))
    ((insert (number-to-string (eval-when-compile (fact 10)))))

    I can't help to think : So many code generator could have been avoided if C++ had included something like eval-when-compile. So many it makes me weep. :'-)

    --
    This post was compiled with `% gec -O`. email me if you need the sources
  53. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by ToLu+the+Happy+Furby · · Score: 5, Informative

    I'd like to see somone post a couple of brief examples of things that were well-suited to Lisp (and would be much more difficult in C) - anyone have anything handy?

    If you're interested is LISP, you should take a look at Paul Graham's excellent ANSI Common LISP, a wonderfully written introduction to LISP which is nonetheless a decent resource which can almost replace the much heftier Steele. If you're not sure you want to spend the cash, the first couple chapters are online.

    In this very small, very chatty book for beginners with not too much code, Graham nonetheless manages to include examples such as a ray tracer (90 lines of code); a program to dynamically generate HTML pages (119 lines of code; this program (very much expanded, but without a single rewrite) now powers Yahoo! Stores); and a complete, seperate object-oriented language with multiple inheritence (89 lines; but a much more powerful OO language, CLOS, is already included with Common LISP). The last two in particular would be impossible to do as quickly or easily in C.

    A much bigger LISP book I happen to have at the moment is Peter Norvig's Paradigms of Artificial Intelligence Programming : Case Studies in Common Lisp, which includes a whole lot of impressive and/or historically interesting examples, including ELIZA, STUDENT (solves algebraic word problems) MACSYMA (symbolic integration ala Mathematica), a Prolog interpreter and compiler, a Scheme interpreter, an optimizing LISP compiler, a natural language grammar parser, and a couple other things. I just finished (well, turned in...) a project which extended Norvig's code to play the game Othello, also from this book, to use trained neural nets (which unfortunately didn't train all that well). The coding part of this was made darn easy by the fact that Norvig's Othello function takes as inputs two functions which provide the move-selection strategies for black and white respectively--something that can't be done in a language without functional closures.

    I certainly wouldn't want to do any of these in C; although all of them could be so done, it would only be at the cost of a good deal of length, functionality and elegence.

    In general, LISP is great for anything involving GOFAI (good old fasioned AI, i.e. non-stochastic), anything that needs to generate hierarchically nested text (e.g. HTML, XML, or LISP programs), anything that needs to be written quickly (or LISP can be used as a rapid-prototyping language), any sort of interpreter, or for any time you wished you could modify the available programming languages to build one that really suits your problem. LISP is also great for extending existing programs, which is why almost every user-extensible application uses a dialect of LISP to do the job. (e.g. emacs, AutoCAD, etc. No, VB macros for Word don't count, although it is noteworthy that LISP is useful over such a wide range of programming tasks as to be a replacement for VB and C.)

    What is LISP bad at? Well, its libraries can be rather weak and nonstandard (although ANSI Common LISP itself comes with a large array of useful functions); GUI stuff, multithreading, and networking all fit in this category and are often implementation specific. (Of course, this is nothing to do with the language itself but just with what tools are available.) Its use for really low level bit-twiddling stuff is somewhat awkward. Iteration in LISP suffers somewhat from being only a little bit more powerful than iteration in C; the upside is you can still combine it with all the other great stuff in LISP, but the downside is that the parenthisis-style syntax, which is so much better for writing macros and functional code, only clutters up iterative code.

    And, certain of the most powerful features of LISP, like macros and closures-as-first-level-objects, take a bit of experience to wrap your mind around, as does the functional programming paradigm. (LISP does not in any way require functional programming; it's just that while there are other languages as good as LISP at iterative code and arguably as good as LISP at OO code, there is nothing as good for functional code.) This is usually taken to mean that LISP is only suitable for CS students and AI researchers, because ordinary programmers are too dumb to get this stuff. I'm just a CS student, and I haven't had much experience with how dumb ordinary programmers are or aren't, but intuitively I think this argument is bunk.

    Personally I think these techniques are just new things to learn; subtle and powerful, sure, but so is simple recursion the first time you learn it and every programmer knows how to use that. Indeed, once you understand recursion well, functional programming and function closures are not very large conceptual leaps at all. Sometimes the mechanics of lambda closures can be slightly tricky, but no more so than referencing and dereferencing pointers in C, and with a lot greater payoff. Hell, the most complicated uses of functions as objects in LISP are a lot easier to get right IMO than even simple uses of templates in C++, and "templates" (i.e. generic funcions) come for free in LISP, due to runtime type checking. (Of course, this is why no one uses C++ templates, but whatever.)

    Macros are difficult to write. But then again, they are incredibly powerful, and not "necessary" very often. And it's usually *extremely* easy to understand someone else's macro code, which is all a novice would have to do anyways.

    Plus there are lots of features of LISP which make it incredibly easy for beginners. Debugging in LISP is ridiculously easy, at least for programs which don't use too many functional closures or complex objects. Instead of the C paradigm where you only have one big executable main(), LISP programs are made up of lots of little functions, all of which are callable (and thus extraordinarily easily debuggable) from the top-level evaluator. There's no write-save-compile-test-debug loop; it's all together, and all very fast. Immediate feedback means more willingness to take chances, try out things, and make mistakes.

    Plus, because there's no main(), your programs are always extensible. If you want to, once you're done with a function it's trivial to make a larger function which calls the other function, takes it as an input, etc.

    There is no need to manage memory, no need to futz around with pointers, and no way to cause a segfault until you start optimizing. Buffer overflows are impossible. You can start with a skeleton of a program, gradually add functionality, and only add optimizations at the end when you have tested your code; and you can test every new function or optimization, so you know exactly what goes wrong when something does.

    And it's fast: once you put in proper optimizations, compiled LISP is nearly as fast as C. Of course this wasn't always the case, and it's not the case for LISP before you put in type declarations. And a compiled LISP file will probably be bigger than compiled C code, especially when you add the LISP top-level eval to it. On the other hand, C is usually not as fast or small as well optimized assembly code, but there is a good reason very few people program in that anymore: because programming in C makes your code less buggy and much faster to develop. Similarly, programming LISP will almost always make your code less buggy and much faster to develop than using C. Now that compiler technology and computer hardware have made those differences almost moot, it probably makes much more sense to use LISP than C.

    Of course, the result of this change has not been to drive more people to LISP, but instead to drive LISP's features into other languages. Thus we have C++ with attempts at generic functions; Java with decent OO and automatic garbage collection; Python showing the usefullness of an interactive top-level. Nowadays Perl and Python are getting functional closures and the list datastructure, although their functions are not quite first-level objects and so not quite as powerful. Plus it will probably take another prefix-syntax language for macros to be copied properly.

    Whether the world will realize that LISP already exists (and indeed has since the late 50's) or continue to reinvent it, I dunno. Probably the latter so long as LISP remains short of libraries that tie it down to modern computers. (Again, GUIs, multithreading, networking.) Still, it's probably worth learning LISP just so that when the same ideas come out in more "mainstream" languages years from now you'll already know and understand them.

  54. Re:This problem isn't as hard as they make it soun by frank_adrian314159 · · Score: 2
    No offense, but if any bozo with a P3 and a crappy SQL/Perl system can do it, why haven't they? Why doesn't someone start an open-source travel planner? I'm sure the travel agencies and booking agencies would be happy to use it. And the airlines would provide flight data, as long as they get their cut.

    The real reason why people haven't done this "simple" task is that it ISN'T as simple as it sounds and that "simple" solutions turn out to be woefully inadequate when confronted with "real-world" data and problems.

    --
    That is all.
  55. Re:This problem isn't as hard as they make it soun by MilTan · · Score: 1

    That's just the point, actually. It is the job of the search process which does eliminate possible, yet very inefficient flights like that.

  56. TPC-C by Anonymous Coward · · Score: 0

    So they should have written the code in SQL Server 2000 with a COM+ TCP monitor -- Microsoft rules the TPC-C measure having overtaken the big guns there some time ago. Or should I say "STOMPED ON IBM AND ORACLE". Notice that Linux is not a player in TPC-C. Not on the radar screen..

  57. Iteration in Lisp by Anonymous Coward · · Score: 0

    Common Lisp contains the most advanced iteration constructs I've ever seen in any lanugage, including C, Perl, Python, and others. It's called extended loop, and it doesn't need lots of parens. It's not used by by Graham or Norvig, since Graham despises loop and OO and Norvig uses applicative style since that fits most AI problems extremely well.

    Also, there's series, which gives you lazy-functional list operations which compile directly to an iterative form when they can be. This makes for very elegant-looking code while maintaining maximum performance. It's also extremely extendable, as you can define your own functions which operate on series objects and get compiled into the iterative form just like the functions that series comes with.

    --
    Rahul Jain

    1. Re:Iteration in Lisp by ToLu+the+Happy+Furby · · Score: 1

      Common Lisp contains the most advanced iteration constructs I've ever seen in any lanugage, including C, Perl, Python, and others. It's called extended loop, and it doesn't need lots of parens. It's not used by by Graham or Norvig, since Graham despises loop and OO and Norvig uses applicative style since that fits most AI problems extremely well.

      Interesting point. I must confess to being scared off of loop by Graham (and by my professors) as being incredibly intuitive to read but incredibly difficult to pin down exactly what it's going to do. (Graham claims that certain implementation details which determine the order functions are executed in a loop are left unspecified in the ANSI CL specs, and thus differ from implementation to implementaiton.)

      I can certainly say that I appreciated the times Norvig used loop in his code, because it sure does cut through the clutter of a complicated do expression.

  58. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by Tony-A · · Score: 2

    Here's one.

    Read two numbers.
    Add them together.
    Print the result.

    (No restriction on size other than assuming that you have enough memory)

  59. Re:bit-twiddling in Lisp by jaoswald · · Score: 2

    I find the bit-twiddling abilities of Common Lisp to be pretty advanced compared to C.

    Granted, this depends on what you mean by "bit-twiddling"--smashing memory based on a pointer given to you by the OS is going to be implementation-dependent.

    However, for actually pulling bits out of data and re-arranging them, I find the Common Lisp routines to be great. You can assign/extract integer values to/from any consecutive block of bits, without having to compute the masks and shifts yourself. I've found this quite nice in creating code that converts to/from native IEEE floats from/to other floating-point formats.

  60. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by ahde · · Score: 2

    you can write functions in C!

    you can even do stuff like:

    do(something(else(again(and(again()))));

    but the reason you don't is because people realized that it isn't maintainable, any you'll probably lose count of the parentheses. Of course a LISP guru would probably complain about the semi colon. Before they get to excited about their own superiority and job security, they should realize most VB types will pick up LISP very quickly, thanks to their experience with *gasp* Excel.

  61. Re:This problem isn't as hard as they make it soun by cracauer · · Score: 2, Insightful

    You are abolutely right, it's easy.

    Unfortunately you're just talking flights and not fares. [Hint: if you think you pay a price for a flight you board like you do in a Bus, you're wrong].

  62. Look for this to be used in anti-terrorism by Anonymous Coward · · Score: 0

    In the wake of 9-11, there will be a new need arising for similar software applications involving massive computations and selections of data in the realm of graph theory, etc.

    Not for finding the cheapest of a set of flight segments, but instead for finding connections between people-to-people relationships in the search for hidden, secret connections between terrorists and their organisations. That's how the law enforcement investigative process works: you map out all the relationships that one person has with other people, then all the relationships those people have with others, etc, until you have a huge network of "connections" and related parties.

    Software of the type used in SABRE/Orbitz/whatever for the traversal of these huge trees and graphs databases will one day be employed against the coming database that will be filled with data on every person in the nation and all their relationships (family, friends, co-workers, etc) to others.

  63. Flights from "nearby" airports by Anonymous Coward · · Score: 0

    ITA's software allows you to specify that you'll also accept airports within X miles of your source and destination cities (you can specify the distances separately). Check the link on their main page on the right side to try out their software.
    The huge explosion of possibilities doesn't come from the possible routes (note that their software can search multiple airlines and do mixed-airline trips, too, so the number of hub cities is quite large) but from the number of different fares and restrictions on those fares, as the email from Carl explains.

    --
    Rahul Jain

  64. Lisp partly derived from 370 assembly by Anonymous Coward · · Score: 0

    Even though ITA doesn't use any mainframes, the original Lisp was developed on the IBM 370, IIRC. The names CAR and CDR came from the assembly language of the 370, since John McCarthy couldn't think of anything better to call them. Since then, he's come up with FIRST and REST, but they only make sense when you're assuming that the cons cell is a list, so CAR and CDR are still used (for raisins other than the hysterical).

    --
    Rahul Jain

  65. We had a code like this in C by Daemon_az · · Score: 0

    I wasn't directly on the team, but I was in close contacts with developers (4 guys at best time, 2 at worst), so I'm pretty aware of what's involved. It's one hell of a task. It's not clear if ITA guys do a real-time verification of flights availability which adds extra 5-10 sec per flight (at least). But as a note it seems like a lots of hardware and code. Our code was written in C and was using one 4-way IBM H80 to do the algorithm and one E30 to communicate to the Sabre/Galileo/Worldspan. It was guaranteed to give at least answer withing 50 sec and it worked about 90-95% of the time... And there wasn't ever single mathematician on the team. Unfortunately project was closed month ago (damn big bosses - don't know cool thing when they see one).

  66. Things that Lisp is good at by jde123 · · Score: 1

    ----
    I'd like to see somone post a couple of brief examples of things that were well-suited to Lisp (and would be much more difficult in C) - anyone have anything handy?
    ----

    One of the things that Lisp/Scheme is good at is as a tool for creating so-called "little languages" - miniature programming languages that are specific to a single problem domain.

    Consider, for example, a computer game that had a "modding" API, allowing players to create their own levels and missions. The API would need to provide, amongst other things, a mechanism by which events could be trapped and bound to actions.

    A Lisp/Scheme programmer might decide to tackle this problem by defining a little language that understood the concepts of events and actions.

    For example, the "language" could provide a set of primitive events like this:

    (item-taken <item>)
    (item-destroyed <item>)
    (item-activated <item>)
    (item-proximity <item>)
    (and <event1> <event2> ... <eventn>)
    (or <event1> <event2> ... <eventn>)
    (not <event>)

    Using these primitives, we could trap more complex events such as:

    (and (item-taken documents)
    (item-destroyed generator)
    (or (item-activated homing-beacon)
    (item-activated cable-car)))

    There would also be a list of primitive actions:

    (play-sound <clipname>)
    (display <string>)
    (restart-level)
    (skip-to-next-level)
    (do-nothing <seconds>)
    (activate <object>)
    (destroy <object>)
    (then <action1> <action2> ... <actionn>)

    Compound actions could be specified like so:

    (then (display "The reactor is going critical!")
    (do-nothing 10)
    (play-sound whine)
    (do-nothing 5)
    (play-sound explosion)
    (display "The reactor has been destroyed"))

    Putting all this together, we could bind actions to events in the following way:

    (define-event rocket-launch
    (and (item-taken key-card)
    (item-activated control-panel))
    (then (play-sound rumble)
    (pause 3)
    (activate-object rocket)
    (destroy-object hanger)))

    All that remains is to create a compiler for this language that will translate these expressions into a lower-level form suitable for use in the game engine. E.g. the compiler could output C code suitable for inclusion in a DLL.

  67. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by mrdlinux · · Score: 2, Informative

    What is LISP bad at? Well, its libraries can be rather weak and nonstandard (although ANSI Common LISP itself comes with a large array of useful functions); GUI stuff, multithreading, and networking all fit in this category and are often implementation specific. (Of course, this is nothing to do with the language itself but just with what tools are available.) Its use for really low level bit-twiddling stuff is somewhat awkward. Iteration in LISP suffers somewhat from being only a little bit more powerful than iteration in C; the upside is you can still combine it with all the other great stuff in LISP, but the downside is that the parenthisis-style syntax, which is so much better for writing macros and functional code, only clutters up iterative code.

    Multithreading is found in the commercial Common Lisp environments and in the CMUCL/x86 port. CLOCC maintains several libraries for cross-implementation usage of non-standard features such as networking. CLIM solves the GUI problem, the problem is that there was no free CLIM implementation for a long time due to legal issues. Finally, a free CLIM is being developed: McCLIM and I'm sure they can use help. As for iteration, perhaps your mind has been clouded by Paul Graham; who has an irrational fear of the LOOP macro. The LOOP macro, however, provides one of the most powerful iteration constructs I've seen; and it's not parenthesized like the DO macro is. Example:

    (loop for x from 1 to 10 summing x do (format t "~&~A" x))

    Prints out a list of numbers from 1 to 10 and the sum of them all at the end.
    The equivalent DO:

    (let ((sum 0))
    (do ((x 1 (1+ x)))
    ((> x 10) sum)
    (incf sum x)
    (format t "~&~A" x)))

    Also the LOOP macro provides yet more keywords for all sorts of handy features which aren't so easy to do with DO; collecting, appending, finally, initially, if/else, etc... Please read the section in the HyperSpec about LOOP, Section 6.1
    I even once wrote a finite-state-machine entirely within a single LOOP macro that processed the Unix mbox format. It's quite nearly a language in itself (speaking of which, FORMAT is in a similar category, except for formatted output instead).

    I would argue that CL is better at bit-twiddling than C is. Take a look at the CLHS Section 12.1.1.3.2 and the functions BYTE, LDB, and DPB. It's a different perspective than the C view, but more interesting since you can extract and replace any number of bits that you want. Also it's not dependent on 8 bits per byte.

    Still, there are many areas where CL just doesn't have the sheer effort put into the libraries, likely due to the lack of manpower. Particularly in the Free-software category; Lisp has a tradition extending long before the current wave of Free-software and while many commercial vendors will provide good support and lots of libraries, the Free implementations often lack this. Many Lisp programmers use the commercial Lisps and have the features they want; if not they ask/pay the vendor to implement them. Another issue is that Common Lisp is not Unix-centric, unlike *ahem* most popular languages today. CL was designed to be workable in any environment, so the designers could not take shortcuts with things like pathnames, executable formats, system libraries, or other system-dependent issues. After all; Common Lisp was conceived in the era of the Lisp Machine. Unix was just another OS in the vast array. Finally, it is unfair to compare the Common Lisp standard against a single-implementation language such as Perl. Standards cost $$$$$ and require a great deal of effort and responsibility. If a Common Lisp implementation does not comply with the standard then it is at fault. But with Perl, whatever Larry Wall does goes. Even if it breaks all your code; too bad.

    Some interesting sites with regard to libraries:

    (Back to the OP's topic) Franz's Success Stories has plenty of examples of Lisp applications. Franz develops Allegro Common Lisp, a popular commercial CL.

    --
    Those who do not know the past are doomed to reimplement it, poorly.
  68. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by mrdlinux · · Score: 1

    The functional style is far more maintainable than the imperative style, for any intelligent person (being able to program in Perl, VB, etc does not make you intelligent). It's so maintainable that you can prove its correctness using formal logic. If that's not an argument for functional-style programming then I don't know what is.

    If you still count parenthesis you are a fool, plain and simple. There are many editors out there which count parenthesis for you, amazingly enough, and some go beyond by providing navigation commands based on S-expressions and automatic indentation. If you're still in the stone age, I'm sorry for you; stop using your crappy line-editors and join the modern world.

    And the semi-colon would indicate a comment, btw

    The bit about Excel is interesting. Care to elaborate?

    --
    Those who do not know the past are doomed to reimplement it, poorly.
  69. Containing functions doesn't mean functional by jrstewart · · Score: 1

    >you can write functions in C!

    >you can even do stuff like:

    >do(something(else(again(and(again()))));

    Don't embarass yourself. Being functional isn't about calling lots of functions. It's about being able to create functional closures. To wit:

    (lambda ()
    (let ((foo 3))
    (lambda ()
    (set! foo (+ foo 1))
    foo)))

    Is a function which returns a function which increments and returns a counter value. Each time you call the outside function you get a new distinct counter and increment function.

    Functional closures can be really handy. You even see poor man's closures in some C programs. Ever notice how many library callbacks in C have an extra void pointer argument?

    Something like:
    typedef void (*callback_t)(int, void *);
    void do_something(some_data_struct *t, callback_t cb, void *opaque);

    You call do_something which eventually calls the callback function a bunch of times with an int argument derived from elsewhere and the void *opaque passed into the do_something call. This way you can pass in whatever extra state your callback needs to do its processing.

    In Lisp, you don't need to monkey around with all of this void * cruft. You can just create a function inside of a let which declares the variables you need to share in your callback. Most often the variables you want to share are already locals so you just write your callback function in place and get on with your life.

    Excel doesn't teach you anything about this, nor does VB.

    1. Re:Containing functions doesn't mean functional by battjt · · Score: 1

      Do I call these Anonymous Classes and interfaces in Java?

      To use your example...

      interface Counter {
      int getValue();
      }
      class MyClass {
      Counter newCounter() {
      return new Counter() {
      int i = 3;
      int getValue() { return i++; }
      }
      }
      }

      Very often the Interface is defined by the library and the anonymous implementation of the interface is written by the application programmer.

      The above is type checked at compile time, so it is more difficult to abuse.

      Am I missing something? This seems more obvious and less error prone than the lisp way.

      Joe

      --
      Joe Batt Solid Design
    2. Re:Containing functions doesn't mean functional by jrstewart · · Score: 1

      > Do I call these Anonymous Classes and interfaces in Java?

      No, but you do call them inner classes (anonymous or not).

      My trivial example was the sort of thing lisp people tend to use to show that you can do objects as a subset of functional programming (albeit in a somewhat ugly way -- Lisp and [some dialects of] Scheme have real object systems which are much, much nicer). It's sort of like using structs and functions in C to approximate objects.

      > Am I missing something? This seems more obvious and less error prone than the lisp way.

      Your example is more obvious and less error prone because you're using OO mechanisms to do OO stuff, whereas I was using functional mechanisms to do OO stuff. In hindsight it wasn't the best example.

    3. Re:Containing functions doesn't mean functional by battjt · · Score: 1

      I guess my real question is, why would you ever use a closure in OO programming? Or do closures get replaced by anonymous classes? (anonymous because our implementation of Counter didn't have a name just like your lambda expression; inner is redundant)

      I tried to describe the power of closures to a very OO orient IT developer and lost the battle. Every example I used was handled faster at runtime and safer in development with an OO construct.

      Joe

      --
      Joe Batt Solid Design
    4. Re:Containing functions doesn't mean functional by Lord+Vipor+Scorpion · · Score: 1

      I read Bruce Eckel's explanation in Thinking in Java. He shows that inner classes allow for multiple inheritance of implementations rather than just interfaces, while closures provide a means for callbacks. Somewhat of a hack job on both accounts, but if you can use them then it's a good thing.

  70. Language chauvinism by epepke · · Score: 4, Insightful

    The vast majority of language preferences reduce to religion, and of those the vast majority are dilettantes who know a dozen languages or fewer.

    In reality, LISP isn't slow, and it really never was, compared to the alternatives. About 20 years ago, some deluded souls converted some heavily numerical FORTRAN code to LISP and found out it ran about 20% faster on LISP. I call them deluded because they were under the false impression that any of the detractors of LISP would care. They don't.

    People prefer languages primarily for cultural reasons. LISP fits certain cultures and doesn't fit others. You can say the same about FORTRAN, C++, Java, Visual Basic, or any other language you like. Pseudo-quantitative arguments come later as justifications to be used in arguments.

    Beyond that, different languages are good for different things, but it's almost impossible to have a discussion about it. If we were to have such a discussion, I would say that LISP is a great choice for anything involving graph theory, which a reservation system obviously does.

    Me, I'm in the middle of writing a game engine and editor that's built in C and C++, does the plotting in an embedded Scheme, uses a Postscript-like code for run-time, interfaced with the Scheme, and under OSX uses Objective C for the user interface layer. So, what do I know anyway?

    1. Re:Language chauvinism by caesarsgarten · · Score: 1

      Remember Scott Meyer's books? In one chapter he presented a C++ implementation of the "generic-function"-concept of CLOS. He closed the chapter (an extreme passage through the dark sides of C++) using the words "It has been clearly worth the effort, or..?" If your problem heavyly relies on concepts that are poorly supported by the language your currently use, you have to investigate alternatives. It is nice to see that some people are still that open-minded that they try tools that seem to have a bad rumour instead of leaving it all to "industrial-standards" tools.

  71. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by RevAaron · · Score: 2

    > Tail-recursion is nice, but macros like LOOP
    > with the extended syntax are quite powerful. I
    > would say that Common Lisp is better at iteration than
    > most other languages.

    I totally agree. The LOOP macro isn't just a way to do for, while, and foreach like we find in most primitive languages- LOOP is an entire language in and of itself. Immensely powerful.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  72. Re:This problem isn't as hard as they make it soun by SpiritusSpatium · · Score: 1

    Actually, it is usually much harder. While it seems simple enough, the fact of the matter is when you are doing a deep recursive search through the schedule, it gets (almost) expotentially more complex. First of all, you are assuming some intelligent database structure. Allow me to assure you, there isn't one. ATPCO issues mulitple fare and schedule updates a day and they are simply too huge to get into any kind of elegant relational order before they become stale. Additionally, all World Class CRS' (Computer Reservation Systems) which descend from the original IBM/AA development (ACS?) must answer this question first: Do you fly there? All of the data structures within the system are modelled around this one question (which nobody asks anymore)! While we humans now take for granted that air travel between two points is possible (regardless of direct flights or hub and spoke systems), the computer cannot. So, it begins it's search with LAX->BOS. Then, it moves to ???->BOS. Then it moves to LAX->???. Then it goes to ???->???(1) and so on and so on. Once it has determined the available routes, it then applies fare rules and tariffs on each segment. Walla-Kazam! 50 seconds has passed. All of this to answer the questions which are being asked:
    What is the way to get there? (Cheapest, fastest, least number of connections, etc.) The deal is if the WC-CRS (Again, World Class CRS) cannot provide consistency in it's results, then the government starts coming down on them big time. Also, now WC-CRS companies are content providers to the general public. This means they are held to much higher degrees of scrutiny by the average consumer.
    Travel agents used to fill the gap between the limitations of the WC-CRS and the consumer's needs. The fact that they may know alternate candidate routes which do not routinely show up in searches is one area where they add value in the travel marketplace. However, as the systems surrounding the WC-CRS become more sophisticated, the agents are finding that the general public would rather reduce their cost by not paying the higher price for their involvement.

  73. Re:This problem isn't as hard as they make it soun by SpiritusSpatium · · Score: 1

    Sorry, I formatted the question which is being asked incorrectly. It should be:
    What is the [Fill in the blank] way of getting there? This question is incredibly difficult to answer given the current system's architecture and data models.

  74. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by RevAaron · · Score: 3, Interesting

    Uh... Scheme isn't a toy. It doesn't have the super-expansive libraries of Common Lisp, but it's used in real world applications all the time. Hell, a month or so back, Transmeta posted to comp.lang.lisp, looking for someone to continue working on some huge Scheme app that they used for design.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  75. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by NoOneInParticular · · Score: 1

    A simple eval would have done nicely as well, but then again, strong typing is for weak minds.

    Have a nice day.

  76. Another large Lisp project by Syre · · Score: 3, Interesting

    Yahoo shopping, was mainly written in Lisp too, as this article by one of the original authors of Viaweb (which is now Yahoo Shopping) details.

  77. Anyone have info on SABRE? by Anonymous Coward · · Score: 0

    OK, the usual /. banter. Lot's of flames on languages, but nothing on-topic. Any of you guys have a good link to info on SABRE?

    1. Re:Anyone have info on SABRE? by bunyip · · Score: 1

      What do you want to know?

      Sabre runs on a cluster of 8 IBM-compatible mainframes, running IBM's TPF operating system. It's about a dozen TB, handling >13,000 TPS. The system has to run 7*24 with zero planned downtime.

      Pricing and ticketing functions are handled by a separate cluster, it will be migrated to open systems, first implementation is within weeks. The code is C++ & Java, not Lisp. Can't say more, but there's a lot of detail in Sabre press releases, interviews and public presentations if anybody cares to look.

      The current fare searching is based on some advanced algorithms, written in C. The design team features a number of CS and math PhDs that did the algorithm design.

      One major difference between ITA/Orbitz and Sabre/Expedia/etc is that Orbitz does *not* use the indsutry's standard seamless availability protocol to check for seat availability in real time. ie. Orbitz caches stale data and you take your chances if the seat is really available. Generating a shitload of irrelevant and/or unavabilable options is actually not that difficult. Most of the major computer reservation systems have contracts with the airlines specifying last-seat availability, hence the limitation on the number of options displayed.

      Another difference is having to deal with all the complexity of the airline industry. Another posting on this site mentioned "state". ITA doesn't print tickets, doesn't handle international fares and doesn't take the debit-memo risk. If you mess up a fare rule, price a ticket too low and the airline notices, you pay the difference. Guess what? ITA relies on the Worldspan (mainframe!) systems to handle ticketing, accounting and all the other functions.

      BTW - if it's not already obvious, I work for Sabre and am very familiar with the subject matter.

      Suggestion time - might Slashdot readers be interested in an interview with one of our senior techies? I'd be happy to help set it up. The legacy assembler stuff is a small part of our business and there's a lot of interesting technology.

  78. We travel folks pick the strangest languages... ;) by dbirchall · · Score: 3, Interesting
    Although SABRE (as others have pointed out) doesn't build their stuff in common LISP like ITA, they're not exactly using the fashionable language of the week for everything, either. Their web-based stuff (Travelocity, and transactional sites they've built for other people) has at least at times used the Vignette framework, which is heavy on... you got it, Tcl! And Vignette also shows up on various other travel sites. So being a developer in one of the few dot-com segments that's actually widely viewed as sustainable, when one runs into a developer from a more "normal" place, the inevitable discussion goes something like this:

    Other guy: So, what's your system coded in?
    Travel guy: Well, there's a little C for API glue, but about 99% of it is in (LISP, Tcl, etc).

    The reactions are lots of fun, from confusion to disbelief to horror.

  79. Re:bit-twiddling in Lisp by ToLu+the+Happy+Furby · · Score: 1


    I find the bit-twiddling abilities of Common Lisp to be pretty advanced compared to C.

    Granted, this depends on what you mean by "bit-twiddling"--smashing memory based on a pointer given to you by the OS is going to be implementation-dependent.

    However, for actually pulling bits out of data and re-arranging them, I find the Common Lisp routines to be great. You can assign/extract integer values to/from any consecutive block of bits, without having to compute the masks and shifts yourself. I've found this quite nice in creating code that converts to/from native IEEE floats from/to other floating-point formats.


    Interesting comment. I should have said that it was my *impression* that LISP wasn't particularly suited for bit-twiddling; I haven't had much experience with that aspect of it myself. Glad (and not terribly surprised) to hear that it's better than I reported. :)

  80. Re:examples of problems well-suited to Lisp by jaoswald · · Score: 1

    uhhh....Orbitz? As in the topic of the article?

    More seriously, the people who wrote Orbitz didn't pick Lisp just to make a theoretical point. They picked Lisp because they did not want to face the daunting task of solving their problem in C/C++. You might not believe it, but they did---and they are the ones making big bucks from it.

    Visit the sites of major Lisp vendors (Xanalys.com, allegro.com) and they have many examples, often involving heavy-duty logistics or information management. Basically, everyone who can solve their problem using C++ uses C++. Anyone who has problems that can't be solved using C++, uses Lisp, decides to live with their problem, or creates more of a problem by trying to create a C++ solution.

    There are many capabilities of Lisp that let it solve daunting problems; the fact that macros can manipulate code using code written in Lisp is a big one.

  81. Sabre ending mainframe era by Mittermeyer · · Score: 1

    The previous comments that Sabre is not moving off the mainframe is inherently false. The relase definitely says migrate, and that's not supplement.

    Perfectly understandable in a way, Sabre is some honking old code and many of the apps programmers must be reaching the retirement/consultant stage of their career.

    IBM is also moving to 64-bit machines and ran off it's competitors with the horrid firmware clean-room reengineering compatibility would require. IBM is celebrating victory in the 30-Year Mainframe War by increasing costs of the high-end mainframes for deep-pocket companies. I'm guessing Sabre got the bill for the next few mainframe years and decided to get out while the getting is good.

    --
    ________________________________________ History Must Not Fall Into The Wrong Hands ___________________________________
  82. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by rmstar · · Score: 1

    Well - I think the single most important feature are macros. They are a quite powerfull resource because they can really transform code before it gets compiled. I can give you an example that is quite concrete: evaluation of polynomials.

    I wrote a small macro that takes as its first arument a list of coeficients and as a second arument a number. The code that ends up being executed is the evaluation of the polynomial using the horner scheme. That is, instead of

    1 + 3 x + x^2 + 7 x^3

    the code executes

    1 + x*(3 +x*(1 + x*7))

    and the invocation is

    (horner-eval (1 3 1 7) x)

    The point is that all the coficients end up as immediates.

    Another example is a transformation of notation. If the prefix notation pisses you off, you can write a macro that evaluates infix notation. So insted of writing

    (+ (* a b c (- 5 (/ d 2))) 4)

    you write

    (infix (a * b * c * (5 - d / 2) + 4))

    Now try to mess with the syntax in C.

    Another thing that is quite interesting is the posibility to change running code. You stop (with contol-C) the simulation that has been running for a week and substitute the function darn-inner-loop (compiled, mind you) with the faster version you've been working on. Then you let it continue. I think hot-swappable code is a nice way to describe this.

    Now do *that* in C.

    Last but not least, I can write a program that writes the code for a function (for example, the evluation of N5(x), the 5th order b-spline at x), with all the constants that would usually depend on the parameter (order), as immediates, compile it, and return it as a value to be used in the rest of the program (the compiled & optimized function!).

    Just some examples.

    Cheers

    rmstar

  83. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by redhog · · Score: 2

    I must admit it was some time since I hacked CL, and that I am biased towards Scheme. Scheme does require a GC, aswell as certain constructs of the language to be tail-recursion-optimized.

    Okay, LISP doesn't lack objects, but it does lack (automatic) function dispatching depending on the type of an object. But this could easily be hacked into it, if someone wanted to :)

    I have read some about MOP, and am really impressed. That is probably one of LISPs biggest strengths - introspection. All aspects of a program, and the language, can be determined, and controlled, by the progrram itself.

    I have read some of the CL HyperSpec. But as I said before, I'm blinded by Scheme after reading too much of r5rs and the SRFIs :)

    --
    --The knowledge that you are an idiot, is what distinguishes you from one.
  84. Excel IS strictly Functional? by namespan · · Score: 2

    Disclaimer: the closest thing I've done to any real functional programming is a weird mix of logical and imperative programming in Prolog, so I may have a warped idea of what functional programming is.

    But... a curious observation.... this last semester I was encouraged for a "Teaching with Technology Class" to develop an application using Excel with a limited number of Visual Basic macros thrown in. As I spent time working with the system, it occured to me I was actually doing functional programming. Each cell was a function call, which could only be fed results of other cells/function calls.... (any comments on whether this is actually true?)

    It turned out to be a bit confining; iteration was a bit painful, and I ended up with a big state table that I was proud to simply have come up with, messy as it was. But it was also interesting to see what you can/have to come up with when confined. In the end, the application worked.

    --
    Libertarianism is rich wolves and poor sheep playing gambler's ruin for dinner.
  85. Re:We travel folks pick the strangest languages... by Dahan · · Score: 1

    Isn't there also some stuff written in a Qix or something like that... ISTR it came from Qantas, hence the Q.

  86. My favourite LISP joke: by jilbert · · Score: 1

    What does "LISP" stand for?

    "Lost In Superfluous Parentheses"

  87. Re:This problem isn't as hard as they make it soun by Anonymous Coward · · Score: 0

    If any bozo with a P3 COULD do it, they would have. Scheduling and fare rules are infinitely complicated beasts. The access methods used by Sabre and other CRSs may seem arcane, but they are VERY efficient. I work in this every day and the volume of data is overwhelming for many SQL based systems with wholesale changes happening every day. The Sabre CRS gets more requests per second than many systems get in a day. Other CRSs are in the same boat. They certainly aren't pretty (but hey, Perl wins no beauty contests either) but it gets the job done. To replace it, you need something better and faster to justify the costs, not just something that does the same thing on another platform. Travel agencies would have to own huge servers to host their own systems even if the software were free and it would be highly inefficient tranfer all the data to hundreds of travel agencies.

  88. Re:Rule 1 of Efficient Lisp: Lisp is not functiona by hding · · Score: 2

    Okay, LISP doesn't lack objects, but it does lack (automatic) function dispatching depending on the type of an object. But this could easily be hacked into it, if someone wanted to :)

    I'm not sure what you mean by this? What do you think having various methods for a generic function does if not dispatch based on the types of the arguments? Perhaps you ought to make section 7.6 one of the sections of the CLHS that you read. :-)

  89. Re:This problem isn't as hard as they make it soun by ahde · · Score: 2

    Proprietary data.

    bozo and me can't get access to it, no matter how much we pay, on account of the airlines (and travel services) don't want me to know what possible prices are available. They're business depends on it. If everyone knew there were a dozen open seats in first class and 50 in coach on the flight I wanted to take from LA to Boston, they couldn't get away with their pricing scheme.