Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0

    Can this really be done in Scheme?


    Introduction
    In an emergency room, arriving patients are first seen by a doctor, called the triage officer, whose responsibility it is to assess the degree of urgency for medical attention. The assessment of the triage officer determines when the patient will be seen by a medical team within the emergency room. Patients with the highest urgency are given the highest priority and therefore get into the emergency room the soonest. The triage officer must also make judgements on the likelihood of treatment being successful. In some cases, a triage officer may decide that it would be futile to treat a patient, in which case that patient never sees the inside of the emergency room at all. These decisions, though diffcult to make, are important to ensuring effective dispensation of medical resources and are usually made only when other lives can be saved instead of the one to be ignored. This approach to medical care is used not only in hospital emergency rooms, but also in treating victims of war on or near the battlefield.
    This challenge explores a model of the system in an emergency room, with a primary focus on the triage officer and his/her role of prioritising patients according to their need. In this system, we differentiate between an arriving case and a patient. An arriving case represents what is presented to the triage officer. His assessment determines whether or not that case becomes a patient for the emergency room, and if so, with what priority.
    A number of data structures are used to implement the system. Executing certain operations on these data structures cause the model to count of time on a simulated clock. Patients who are not seen by the emergency room doctor in time will perish, so it is important to use efficient implementations of these data structures.
    The primary objective of this challenge is to explore the tradeoffs of three different implementations of a priority queue: one using a linked list, one using a binary heap implemented as a binary tree, and the third using a binary heap implemented in an array.

    Implementation Overview
    The system models three parallel activities: the generation of cases (to become patients), their handling by the triage officer, and the treatment of patients by the emergency room doctors (in our model, there is only one). Two queueing structures provide central support to these two activities. The schedule of arriving patients is maintained as a FIFO queue. On the other hand the queue of patients waiting to be treated in the emergency room is maintained as a priority queue; by default, patients who are dying fastest are given highest priority in the queue.
    Simulating Parallelism
    In order to simulate the three simultaneous activities, we step each one in round-robin fashion. The patient generator creates patient-cases according to a Bernoulli process (i.e. imagine a flip of a coin, say heads implies a new patient arrives, but tails means none, and the coin is not fair). Each new arriving patient is placed on the FIFO queue. The triage routine examines the FIFO queue, removes the first patient from it, adjusts the patient’s life force to account for the time between when the patient first arrived and the current time, and places it onto a priority queue. Patients are removed from the priority queue by the doctor routine. Each time a patient is removed from the priority queue, treatment is administered. If the patient survives the treatment, but is still not fully recovered, then the doctor routine places the patient back into the priority queue. On the other hand, if the patient is fully recovered, then it is removed from the system completely, and a statistic maintaining the number of survivors is updated. Whenever a patient’s life force dips to zero or lower, that patient dies and is completely removed from the system.
    The scheduler steps each process up to the local time of the process that is farthest ahead. Since executing basic operations causes the clock to tick, then most ADT operations actually use up multiple ticks. The scheduler does not interrupt these operations, so at the end of each round, there may be small discrepancies in the local clocks on each process.
    When the simulation runs, it prints a list indicating, up to that point, the number of survivors, the total number of patients, the maximum size of the FIFO queue so far, the current size of the priority queue, as well as the time stamps of all the clocks. In the end, the result returned from the simulation run is the number of surviving patients, the total number of patients and the maximum length of the FIFO queue during the simulation.
    Life Loss and Treatment Computations
    The patient generator generates a random case by selecting a condition (randomly) from the conditions knowledge base, and associating with it two randomly selected numbers from 1 to 10. These numbers are the severity index and the treatment effectiveness respectively. The severity index is a measure of how seriously afflicted the patient is with the selected condition, the rate of life loss (damage) grows quadratically with the severity index. When treatment is administered (by the doctor routine) the severity index is reduced by the difference between the treatment effectiveness and the treatment handicap, except when that difference would be less than 1, in which case the reduction in the severity index is set to 1. When a case is moved from the FIFO queue to the priority queue, or when it receives attention from the doctor routine, damage is assessed, and the patient’s life force adjusted (usually decreased) by the amount of damage assessed. It should be clear that the more efficient ADT operations are, the more likely this simulation will be to have a higher number of survivors.



    >>>> [ FIFO Queues ] <<<<

    ?. Implement the queue ADT using a naive list implementation.
    ?. Implement the queue ADT using an implementation that has constant time performance for each queue operation.

    ?. Test the queue ADT by creating an instance and then performing a sequence of queue operations on it. Use the queue:front and queue:list operations to see the contents of the queue and verify that the implementation is operating as it should.



    >>> [ Comparing Binary Heaps ] <<<

    ?. Write a procedure called (measure-stats arrival-period avg-life n) that takes the results of running N simulations each of which has the given inter-order arrival time for patients and the given average life, and returns the average and standard deviation of the survival rate and the largest queue length (as two pairs).
    Each experiment is an execution of the simulation for approximately 1000 ticks with the given arrival-period and average life. For example, (measure-stats run 5 100 20) performs 20 executions of (run 1000 5 100) and reports on the statistical results.
    ?. Measure the average survival rate of the given implementation for average arrival periods of 2, 5, 10, and 20 ticks, and an average life of 1000.



    The Emergency Room Queue
    As already mentioned, the emergency room queue is implemented as a priority queue, in which the rate of life loss of patients is used as the key in the queue.


    >>> [ Priority Queues ] <<<

    ?. Implement a priority queue, using a linked list to maintain the elements in the queue.

    ?. Test the implementation by creating a priority queue, performing a sequence of operations on it.

    ?. Measure the performance of this implementation of the priority queue by computing the average survival rate for each of the average arrival periods investigated in a Problem.



    >>> [ Binary Heaps ] <<<
    ?. Implement a binary heap embedded in a vector.

    ?. Test the implementation.

    ?. Measure the performance of this implementation.
  2. #2
  3. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    We don't do homework.

    --Simon
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0
    Tis not homework. It's a practice problem from a scan book that i am using to learn Scheme. And i am not familiar with the language.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by Mochi
    Tis not homework. It's a practice problem from a scan book that i am using to learn Scheme. And i am not familiar with the language.
    Fair enough. To answer your original question, yes it can be done in scheme (or any other language).

    Dave
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0
    Okay, thanks Dave. It seems like a very difficult thing to simulate.

    Can someone show how this can be achieved in C/C++ or even Haskell? Cause i don't understand this Scheme thing. :-/
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Originally Posted by Mochi
    Tis not homework. It's a practice problem from a scan book that i am using to learn Scheme. And i am not familiar with the language.
    Erm, without doing it for you what you need to do is define some functions to produce the data structures and utilities for acting on it. I don't think its the kind of task you want to attempt as a new user to be fair.

    Especially if you want to produce things like generators etc. which requires an understanding of continuations.

    Mark.
    programming language development: www.netytan.com Hula

  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0
    Originally Posted by netytan
    Erm, without doing it for you what you need to do is define some functions to produce the data structures and utilities for acting on it. I don't think its the kind of task you want to attempt as a new user to be fair.

    Especially if you want to produce things like generators etc. which requires an understanding of continuations.

    Mark.
    Oh okay. Thanks Netytan. What language should i do it in? Can someone relate it to me in Haskell? That should be simple enought right? I just want to see and have some understanding of how it would work. :-|
  14. #8
  15. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Originally Posted by Mochi
    Oh okay. Thanks Netytan. What language should i do it in? Can someone relate it to me in Haskell? That should be simple enought right? I just want to see and have some understanding of how it would work. :-|
    I'd suggest you do this in Scheme, but that's just my opinion. This task should be able to be able to be performed in either language as long as you know the language well enough. This isn't exactly an easy task for beginners.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0
    That's just it... I dunno Scheme at all. Hence i was wondering if this can be done in any other functional programming language. Maybe C/C++ as a substitue for the time, until Scheme is more clear.
  18. #10
  19. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Location
    Alpharetta, GA
    Posts
    1,806
    Rep Power
    1570
    The implementation language in and of itself isn't relevant; in principle, all Turing-complete languages are capable of making the same set of computations. While practical issues (runtime requirements, support for specific language or library constructs such as threads or continuations) may make various algorithms easier or harder (or even impractical), it is always possible to accomplish a task even in, say, Befunge, or INTERCAL, or Unlambda.

    What matters most is how familiar and comfortable you are with the language you are using. How 'expressive' a language is is irrelevant if you dislike it or don't understand it.

    That having been said, Scheme is a particularly easy language to learn, at least WRT the core language; the current language standard, called Revised( 5) Report on the Algorithmic Language Scheme is only 50 printed pages long, including the formal syntax and semantics. If you are familiar with other languages, then even a simple overview such as my own Scheme in Short should be enough to give you some feeling for the language (BTW, constructive criticism on that is always welcome). Scheme is like Go or Chess - the basic rules are easy to learn, but true mastery is a lifetime process.

    (The larger libraries are another matter; while the SRFI quasi-standard have helped things considerably, and R6RS should fix a lot of current problems, at the moment things are still rather hairy).

    I should add that some textbooks which use Scheme (most notably the otherwise extraordinary Structure and Interpretation of Computer Programs) intentionally avoid teaching anything but the barest essentials of the language, so that they can focus on theoretical considerations without having the language get in the way, and to show how the language constructs can be implemented within the language itself. WHile this approach works well in the hands of a particularly skilled instructor, it usually falls flat with less inspired teaching, and also has the effect of convincing many students that Scheme (and Lisps in general) are crippled languages without even such basic facilities as file I/O - something which is patently untrue. OTOH, other books (e.g., Simply Scheme, How to Design Programs) use a unique library that can cause confusion for students who then try to use an implementation of the language which doesn't support it.

    As for the problem at hand, I'll need to take a closer look at it first, and if I can make any recommendations (aside from learning Scheme first) later on. HTH.
    Last edited by Schol-R-LEA; April 3rd, 2006 at 01:53 PM.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in ShortUnderstanding the C/C++ Preprocessor
    Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0
    A breakdown/guideline of how this can be achieved in Scheme language will be appreciated Schol-R-LEA (or anyone who wishes to help). Thanks.
  22. #12
  23. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Location
    Alpharetta, GA
    Posts
    1,806
    Rep Power
    1570
    That's going to depend on a number of factors. I'm assuming here that you are using plain-vanilla R5RS Scheme with no libraries; if you can use the SRFI or SLIB forms, then a lot of this would be simplified, really.

    Also, how much detail I need to go into will depend in what you already know of the language; from what you said, I'd have to start absolutely from scratch, which might not be appropriate.

    Which interpreter or compiler are you using also can make a difference, especially as a total novice. I'll assume for now that you're using Dr Scheme 3.01, and a lot of what I'll say below is specific to it, but if you aren't please let me know. If you are, you'll want to make sure that it's set to the right dialect; in the main menu, go to Language: Choose Language... and select 'Standard (R4RS)', hit 'Ok', then in the main editor hit the 'Run'.

    OK, a few basics. Scheme is designed to be effectively compiled, but it is more often used through an interpreter, especially during development. Usually, the main interface is the Listener (and immediate interpreter prompt where you can enter smippets of Scheme code directly). In Dr Scheme, the main window is split into two sections, with (by default) the editor window at the top and the listener at the bottom. (This contrasts with most other Schemes, such as the MIT interpreter, which just give you the text-only listener; you need to invoke the editor for the listener, and it runs as a separate program. Some others work like the eLisp interpreter buffer, where you edit the code free-form, select the snippet to run, and then use a keystroke command to invoke the interpreter).

    When you run code in the listener, it runs in a global environment known as the workspace; functions and variables created at the listener will last through the session, but get cleared when a new session is begun or the interpreter is closed. Using File: Log Definitions and Interactions, you can create a transcript of everything you are doing in the Listener for the rest of the current session. You can also save the current workspace definitions using File:Save Definitions as....

    To create a separate program, you would enter the code into the edit window and save it as a normal source file. When you hit the 'Run' button, it creates flushes the existing session, creates a new session, and runs the code currently in the editor window.

    If you haven't already, try typing in snippets of code like the ones below at the listener, to get a feel for the results:

    Code:
    (+ 2 2)
    
    (define pi 3.14)
    
    pi
    
    (define (square x) (* x x)) 
    
    (square 4)
    
    (define (area-of-circle r) (* pi (square r)))
    I've got to go right now, but I'll get back to you once you've replied on this; as I said, some idea of how much you know would help. If you haven't already looked at it, take a look at my tutorial, and maybe at some of the other oens linked to at Schemers.org.

    For a taste of some more advanced Scheme: it is important the to remember is that in Lisp languages, most data structures are built out of the basic lists. For example, a binary tree
    Code:
           4
        /     \
       2       6
     /   \    /  \
    1     3  5    7
    might look like:

    (4 (2 (1 3)) (6 (5 7)))

    You can use lists to create most abstract data types, and the language even has built in support for certain ones (sets and associative lists in particular). However, you would not define a data structure type the way you might in C or Java (in basic Scheme at least; see SRFI 9 for one library implementation of data structure types). Rather, you would define a series of functions that build the data structures from primitive lists, and populate, update, delete, etc. the data in them. This means that data manipulation has a somewhat higher overhead; however, it also gives a tremendous amount of flexibility in how you can manipulate data dynamically.
    Last edited by Schol-R-LEA; April 4th, 2006 at 03:48 PM.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in ShortUnderstanding the C/C++ Preprocessor
    Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Jamaica
    Posts
    20
    Rep Power
    0
    I'm using DrScheme, version 301 by PLT. It's configured as your suggested. I understand definitions, syntax and the naming conventions. I also know how to do some simple expressions and variable bindings.
  26. #14
  27. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Location
    Alpharetta, GA
    Posts
    1,806
    Rep Power
    1570
    Originally Posted by Mochi
    I'm using DrScheme, version 301 by PLT. It's configured as your suggested. I understand definitions, syntax and the naming conventions. I also know how to do some simple expressions and variable bindings.
    Ah, OK, good. Let's see then:

    For a FIFO queue type, you have a number of possible approaches, depending on how you want it to work. Basically, we need to write a set of functions which will manipulate create the queue, add new items to it, or remove a value from it and return the value in question.

    Now, in Scheme as it's usually taught, the preferred approach is functional; the functions for creating the queue and adding new values to it can be done by simply creating new queues with the desired values:
    Code:
    (define (queue:new top) (list top))
    
    (define (queue:add queue new-item)
      (append queue (list new-item)))
    
    (define (queue:next queue)
      (if (null? queue)
          nil
          (car queue)))
    This has the disadvantage that the client-programmer would have to capture the returned value explicitly, rather than having a persistent variable which gets changed by the functions. More seriously, the function (queue:next) returns the value of the current top item, but doesn't actually remove it; for that you would need another function, which returns a the remainder of the queue:
    Code:
    (define (queue:remove queue)
      (if (pair? queue)
          (cdr queue)
          nil))
    To see that this code works (after a fashion), try these tests:
    Code:
    (define q (queue:new 1))
    q
    (define q (queue:add q 2))
    q
    (queue:next q)
    q
    (define q (queue:remove q))
    q
    While this is usable after a fashion, it is rather clumsy to use, and the fact that we are redefining q each time makes a functional approach less valuable - it simply puts the burden of handling re-assignment on the client-programmer. It would make more sense to use a true mutable data structure - that is, one where the variable itself gets changed by the functions, rather than having to

    If you only need a single global queue, it would be quite easy; you could simply have the functions implicitly reference the global:
    Code:
    (define queue '())
    
    (define (queue:new! top)
      (set! queue (list top)))
    
    (define (queue:add! new-item)
      (set! queue (append queue (list new-item))))
    
    (define (queue:next!)
      (if (null? queue)
          '()
          (let ((next (car queue)))
            (set! queue (cdr queue))
            next)))
    
    ;; test code
    (queue:new! 1)
    queue
    (queue:add! 2)
    queue
    (queue:next!)
    queue
    However, this only creates and works on a single variable, rather than defining an abstract data type; it is too limiting for most purposes. One could try redefining these functions so that they take a queue variable as an argument:
    Code:
    (define (queue:new! queue top)
      (set! queue (list top)))
    
    (define (queue:add! queue new-item)
      (set! queue (append queue (list new-item))))
    
    (define (queue:next! queue)
      (if (null? queue)
          '()
          (let ((next (car queue)))
            (set! queue (cdr queue))
            next)))
    
    ;; test code
    (define q '())
    (queue:new! q 1)
    q
    (queue:add! q 2)
    q
    (queue:next! q)
    q
    Unfortunately, as you will see if you run this, it won't work; this is because parameters are passed by value in Scheme, so the value altered by (set!) is local to the function. In order to alter the actual value of a variable, you would need to define these as macros instead:
    Code:
     (define-syntax queue:new!
       (syntax-rules ()
         ((queue:new! queue top)
          (define queue (list top)))))
     
     (define-syntax queue:add!
       (syntax-rules ()
         ((queue:add! queue new-item)
          (set! queue (append queue (list new-item))))))
     
     (define-syntax queue:next!
       (syntax-rules ()
         ((queue:next! queue)
          (if (null? queue)
              nil          
              (let ((next (car queue)))
                (set! queue (cdr queue))
                next)))))
     
     ;; test code
     (queue:new! q 1)
     q
     (queue:add! q 2)
     q
     (queue:next! q)
     q
    There is still one problem with this, in that these functions are not actually part of the type per se; they define the behavior of the queue variables, but there's nothing preventing you from accidentally applying them to a different kind of variable entirely. What you really want is something similar to objects in languages such as Smalltalk, C++ or Java. While base Scheme does not have a preexisting syntax for OOP classes, it does have an equivalent construct that can be created with ordinary nested functions: a closure. A closure a function defined within another function, which then passes a link to the nested function as it's return value. Doing this causes the local function environment of the outer function to be retained, including any variables which are in local scope. This can be used to create persistent objects which can be used as if they were the inner function themselves; if that function is defined to accept arguments which indicate an operation to perform, it can be used to act like method dispatch. thus, you can define a queue 'class' as:
    Code:
     (define (make-queue top)
       (define queue (list top))
       (define (add! new-item)
         (set! queue (append queue (list new-item))))
       (define (value)
         queue)
       (define (next!)
         (if (null? queue)
             '()
             (let ((next (car queue)))
               (set! queue (cdr queue))
               next)))
       (define (dispatch method . parameters)
         (case method
           ('add! (if (null? parameters) 
                      queue 
                      (add! (car parameters))))
           ('value (value))
    
           ('next! (next!))
           (else 'invalid-method)))
       dispatch)
     
     (define q (make-queue 1))
     (q 'value)
     (q 'add! 2)
     (q 'value)
     (q 'next!)
     (q 'value)
    q
    (Note that you now need the (value) method for returning the value of the queue; the variable itself is a function, not a list, as shown by the last item in the test code.)

    Of course, this involves a lot of extra work, which you would need to do over again every time you created a new object class. Clearly, it would make sense to have a special form - a macro, perhaps - to automatically handle the bookkeeping details. Fortunately, such forms do exist - several different ones, in fact; there are several different type and object types for Scheme. Unfortunately, at this time none of these is standard, so how you would create to classes would depend on which library you use.

    I expect that I've lost you by now ; if not, then all the better. Feel free to ask any questions you need to. For now, I'll leave the rest of the problem to you.
    Last edited by Schol-R-LEA; April 5th, 2006 at 04:43 AM.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in ShortUnderstanding the C/C++ Preprocessor
    Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
  28. #15
  29. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Location
    Alpharetta, GA
    Posts
    1,806
    Rep Power
    1570
    Oh, for further Illumination fnord about Scheme in general, see The Schemer's Way (or consult your pineal gland).

    As a bit of trivia, I should mention that the original design of Scheme was object-oriented, even before Smalltalk in fact; it was originally intended as an experiment in an early form of OO called the 'actor model'. As the language was being developed, however, the designers realized that the code supporting actors was identical to the code for closures, and eventually, they did a formal analysis that demonstrated that actors and closures were equivalent. Thus, they removed the actor-specific parts of the language, and showed that the same actor support could be coded in the language itself using the macro system (the language has changed considerably since then, but the principle remains the same).

    Also, because Scheme is designed with a heavy emphasis on recursion, the language standard mandates that Scheme compilers use a technique called 'tail-recursion elimination' to improve the efficiency of simple tail recursive functions. How tail recursion elimination works is this: in functions that are tail recursive, the last thing the function does is call itself. Since the function environment isn't needed any more, the compiler can reuse it for the new function, which means that the stack space is saved. Thus, all the compiler has to do is replace the final call with a jump, and the function is in effect transformed from a recursive one into an iterative one. This allows programmers to use tail recursive functions for general loops without the overhead that recursion usually has. Most Scheme compilers have even more elaborate tail-call optimization techniques, ones which take advantage of the highly regular structure of the language; in fact, there are several kinds of optimization which are more or less unique to the Lisp-family languages, because they wouldn't be practical to perform in most other languages. This is why, while Scheme code normally isn't very efficient when compiled naively, it is in some cases possible to generate highly-optimized Scheme programs which are comparable to C in performance.
    Last edited by Schol-R-LEA; April 5th, 2006 at 05:13 AM.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in ShortUnderstanding the C/C++ Preprocessor
    Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo