Earlier quoted context omitted.
Well, Python and Pascal were designed as a teaching language, and ended up being remarkably good for actual programming.
I didn't know this regarding Pascal, do you have any source ref on this?
TinyCompiler: A compiler in a week-end
41–50 of 120 posts
Re: TinyCompiler: A compiler in a week-end
#42Earlier quoted context omitted.
> javac (or any compiler targeting the JVM) is not a real compiler according to it I think it depends on how you interpret my "non-trivial transformation into or out of an intermediate and/or target representation". For example if javac involves IR, SSA based analysis and transformation (which I assume it does) then that would be a non-trivial transformation and I'd call it a compiler. If on the other hand it was a d…
> if javac involves IR, SSA based analysis and transformation (which I assume it does) https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/... I am fairly certain that it does not. The JVM is a stack-machine. I wrote a compiler for a simple programming language that compiled down to JVM bytecode for a project in the early 2010s. Its output for test programs was as fast as the comparative Java ones because the…
Re: TinyCompiler: A compiler in a week-end
#43Earlier quoted context omitted.
I didn't know this regarding Pascal, do you have any source ref on this?
From wikipedia: "Pascal was influenced by the ALGOL W efforts, with the explicit goals of teaching programming in a structured fashion and for the development of system software.[5] A generation of students used Pascal as an introductory language in undergraduate courses." Its grammar made it relatively easy to write compilers for the language, which could be done as undergraduate exercises. Of course, this did not m…
Turbo Pascal's successor, Delphi, was a successful rapid application development environment, and still being used today. Pascal was used extensively at Apple for the Apple III and Lisa, and was also the original development environment for Mac apps.[1]
But he was probably right about Ada, which has survived and may even be enjoying something of a renaissance as a fix for the sins of C (and C++) that isn't as alienating as Rust.
[1] https://archive.org/details/bitsavers_applelisapriefHistoryo...
Re: TinyCompiler: A compiler in a week-end
#44Earlier quoted context omitted.
From wikipedia: "Pascal was influenced by the ALGOL W efforts, with the explicit goals of teaching programming in a structured fashion and for the development of system software.[5] A generation of students used Pascal as an introductory language in undergraduate courses." Its grammar made it relatively easy to write compilers for the language, which could be done as undergraduate exercises. Of course, this did not m…
I have the greatest respect for Prof. Kernighan, but history hasn't been kind to C's unbounded arrays and strings, however convenient they may be for the programmer. Moreover, just two years after his critique, Turbo Pascal would come out with an environment that is still revered as a pioneering and exceptionally productive IDE. It outsold C compilers by multiple orders of magnitude in the mid-1980s. (And that's igno…
Re: TinyCompiler: A compiler in a week-end
#45Re: TinyCompiler: A compiler in a week-end
#46Earlier quoted context omitted.
I didn't know this regarding Pascal, do you have any source ref on this?
From wikipedia: "Pascal was influenced by the ALGOL W efforts, with the explicit goals of teaching programming in a structured fashion and for the development of system software.[5] A generation of students used Pascal as an introductory language in undergraduate courses." Its grammar made it relatively easy to write compilers for the language, which could be done as undergraduate exercises. Of course, this did not m…
Re: TinyCompiler: A compiler in a week-end
#47Earlier quoted context omitted.
I have the greatest respect for Prof. Kernighan, but history hasn't been kind to C's unbounded arrays and strings, however convenient they may be for the programmer. Moreover, just two years after his critique, Turbo Pascal would come out with an environment that is still revered as a pioneering and exceptionally productive IDE. It outsold C compilers by multiple orders of magnitude in the mid-1980s. (And that's igno…
I used to be a professional Delphi programmer, but I would not have described Delphi as "extremely successful", partially due to its mismanagement by the various owners of the IP. Its noticeable that Delphi's inventor went on to far greater success with a C-like language - C#.
Re: TinyCompiler: A compiler in a week-end
#48I don't think one can understand compilers in a "week-end".
Re: TinyCompiler: A compiler in a week-end
#49I don't think one can understand compilers in a "week-end".
The "week-end" part refers to the fact that I wrote it in one week-end with little to no experience in compiler design. You can check the commit history, 12 to 14 Jan, 2024 :)
Not to take away from this awesome sharing.
Re: TinyCompiler: A compiler in a week-end
#50I appreciate how wonderfully simple and dependency free this is. More often than not people just want to write a compiler of sorts without bison or yacc, or LLVM, and just convert expressions into assembler or vm-like instructions that _just run_. This is a great starting point for that, and I wish I had something like it 10 years ago. (Crenshaw's Let's Build a Compiler is an excellent source too if you want to go on…