See this wikipedia article:Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
See this wikipedia article:Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
Rear Admiral Grace Hopper would know.Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
So would Wikipedia. ? (Smartass mode, as taught by ZiriasRear Admiral Grace Hopper would know.
Edit: got beaten to this. It is one of my go-to arguments when "women in IT" gets discussed.
Nicklaus Wirth on the first working Pascal compiler (the first attempt was to write the compiler in Fortran and it failed):Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
My one time boss told me he had written a compiler for a Fortran subset and keyed in the code through the front panel switches! This was on a Soviet era Minsk-2 computer with a whopping 4K words of RAM! No assembler either!The second attempt at building a compiler therefore began with its formulation in the source language itself, which by that time had evolved into what was published as Pascal in 1970 [Wirth, 1970], The compiler was to be a single-pass system based on the proven top-down, recursive-descent principle for syntax analysis. We note here that this method was eligible because the ban against recursion had been lifted: recursivity of procedures was to be the normal case. The team of implementors consisted of U. Ammann, E. Marmier, and R. Schild. After the program was completed – a healthy experience in programming in an unimplemented language! – Schild was banished to his home for two weeks, the time it took him to translate the program into an auxiliary, low-level language available on the CDC computer. Thereafter, the bootstrapping process could begin [Wirth, 1971b]. This compiler was completed by mid 1970, and at this time the language definition was published. With the exception of some slight revisions in 1972, it remained stable thereafter.
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
Holy crap!!! ?This is a valid Perl program.Perl:@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{ @p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord ($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&& close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
(It prints "Just another Perl / Unix hacker")
Not really. You are correct. I was just kidding.Well, if that's a quality in itself? ?
Did you use the word "old" as logical equivalence of "wise"?I still like languages that come with a compiler written in that very language…(Yes, I'm old…)
Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
I have that book from my college years. It was the textbook for one of my classes very early in the curriculum. And it was surprisingly useful reference for explaining stuff much later on.Tanenbaum, Structured Computer Organization
Indeed. It helped me to understand the problem which eternal_noob was referring to as the "the chicken or the egg".I have that book from my college years. It was the textbook for one of my classes very early in the curriculum. And it was surprisingly useful reference for explaining stuff much later on.
Except they're not global. They're special, they're globally available, but their value depends on context, thus has limited scope.Perl has 64 global special variables.
(define (fib n ::long) ::long
(if (< n 2)
n
(+ (fib(- n 1)) (fib(- n 2)))
)
)
(display (fib 42))
#lang typed/racket
(define (fib [n : Integer]) : Integer
(if (< n 2)
n
(+ (fib(- n 1)) (fib(- n 2)))
)
)
(display (fib 42))
(: fib (fixnum -> fixnum))
(define (fib n)
(if (< n 2)
n
(+ (fib(- n 1)) (fib(- n 2)))
)
)
(display (fib 42))
I would assume that the times are what it took to run those snippets... is that a correct assumption?I just did a speed comparison of 3 schemes,
1. Kawa-scheme : Time duration : 1.9s
Code:(define (fib n ::long) ::long (if (< n 2) n (+ (fib(- n 1)) (fib(- n 2))) ) ) (display (fib 42))
2.Racket-scheme :Time duration: 4.5s
Code:#lang typed/racket (define (fib [n : Integer]) : Integer (if (< n 2) n (+ (fib(- n 1)) (fib(- n 2))) ) ) (display (fib 42))
3.Chicken-scheme : Time duration 20s
Code:(: fib (fixnum -> fixnum)) (define (fib n) (if (< n 2) n (+ (fib(- n 1)) (fib(- n 2))) ) ) (display (fib 42))