4 ms·
> None of those were in any way 'similar' to Lisp Machines It seems you misinterpreted my sentences. Read the linked Wikipedia. Basically not ASM/Assembler co
by frik 12y ago
> None of those were in any way 'similar' to Lisp Machines
It seems you misinterpreted my sentences. Read the linked Wikipedia. Basically not ASM/Assembler code (0, 1 form) is executed on the CPU but a specific higher level language like Lisp/Ada/Pascal/Java/etc. directly.
- lispm 12y agoLisp Machines did not run Lisp 'directly'. Lisp code was either running interpreted or usually compiled to machine code. This is an example from a Symbolics Lisp Machine with an Ivory CPU. (defun example-count (predicate list) (let ((count 0)) (dolist (i list count) (when (funcall predicate i) (incf count))))) The disassembled machine code for above function (for the Ivory microprocessor from Symbolics): Command: (disassemble (compile #'example-count)) 0 ENTRY: 2 REQUIRED, 0 OPTIONAL ;Creating PREDICATE and LIST 2 PUSH 0 ;Creating COUNT 3 PUSH FP|3 ;LIST 4 PUSH NIL ;Creating I 5 BRANCH 15 6 SET-TO-CDR-PUSH-CAR FP|5 7 SET-SP-TO-ADDRESS-SAVE-TOS SP|-1 10 START-CALL FP|2 ;PREDICATE 11 PUSH FP|6 ;I 12 FINISH-CALL-1-VALUE 13 BRANCH-FALSE 15 14 INCREMENT FP|4 ;COUNT 15 ENDP FP|5 16 BRANCH-FALSE 6 17 SET-SP-TO-ADDRESS SP|-2 20 RETURN-SINGLE-STACK This machine also had C, Pascal, Fortran, Ada and Prolog compilers.
- crististm 12y agoI was reading these days the Symbolics C manual to find some details about the compiler's output. I know that the hw had assembly instructions that mapped almost one-to-one to Lisp primitives. However, what was the output of the C compiler and how did they integrate it with the Lisp code? For that matter, what was the output of the Pascal or ADA compilers? In one of K. Reti's videos there's a blend of stack traces of Lisp and C code. What makes that possible?
- lispm 12y ago> I know that the hw had assembly instructions that mapped almost one-to-one to Lisp primitives. In my example you see the assembly. You can see how much 'one-to-one' it was... The C compiler compiled to Lisp and then to machine code. Same for Pascal. For Ada, I don't know.
- DonHopkins 12y agoI once visited a Washington DC Beltway Bandit government contractor's office who had a Symbolics Lisp Machine that they used exclusively to develop Fortran code, which they compiled into Lisp and debugged with the awesome programming tools. And of course there was Gyro's Zeta-C compiler, with an interactive C listener.
- mietek 12y agoArtefacts of a future past…
- psandersen 12y agoYou sound knowledgable so thought I'd ask here :) ... Would there be any logic/benefit in a modern lisp machine? e.g. if intel decided they'd put the same engineering effort into a 'lisp machine' as they did Haswell, would there be any inherent advantages or things that could be done differently?
- lispm 12y agoActually a Lisp Machine is much more than just a CPU. It's a whole computer architecture, language implementation, operating system, user interface and a computer design. You think of it as it were just a CPU. But it was much more. Does a Lisp CPU make sense? Economically not, since there is no market for it and no innovation driver. You have seen what happened to Java CPUs... Technically? Could be. Instructions were probably a lot smaller. Memory would be tagged. The CPU would know more about data structures (which in many cases would get rid of buffer overflow exploits). Generally compiled Lisp runs quite nicely on 64bit Haswell machines.
- cmrdporcupine 12y agoI'm no CPU designer, but I gotta think there would be some advantage to designing a CPU architecture explicitly around optimizing garbage collection at least. That is keeping the tree of references in cache at all times to minimize collection scan times and avoid thrashing the cache during marking phases. And dynamic languages would benefit from having tagged pointers. These days I really feel like I/O is most often my bottleneck, not CPU execution. That said, when I was doing things in Java a lot that I should have been doing in C/C++ (or something like Rust now) I fought with the garbage collector and the latencies it introduced.
- gumby 12y ago> I gotta think there would be some advantage to designing a CPU architecture explicitly around optimizing garbage collection at least. That's what we all thought in those days but Pat Solvobarro killed it by using the MMU on a Sun Machine to implement a write barrier. I don't know how great that is these days (since you get a fault and a cache miss) but the principle was that the conventional hardware could get better faster than the specialized hardware could, and so general would overwhelm any local advantages of the specific.
- mietek 12y agoIs there any documentation available for the Symbolics instruction set and/or machine architecture?