2012-05-07

Forth4JavaScript

I have ported my Forth implementation from Awk to JavaScript.

It was a fairly easy port, which gives me hope that my desired project to write a version of Awk (or an Awk like language) in JavaScript which extends Awk with some of the higher-order concepts in JavaScript may not be out of the realm of possibility.


Assembly Language Books

GAS Syntax

Intel Syntax

  • Assembly Language Step-By-Step (NASM)

I really like this one. It has one of the best explanations of different numerical bases that I’ve seen. However, it uses NASM as the assembler and I’m concentrating on GAS syntax for the moment.


Compilers

My goal with learning Assembly is to be able to go through Jack Crenshaw’s Let’s Build a Compiler series porting the code samples to use x86 assembly.

Reformatted PDF of tutorial here.

Jack Crenshaw writes his compiler using Pascal and 68000 assembly. It doesn’t look like it will be to difficult to use Gnu Assembler (GAS) syntax in place of the 68000 assembly instructions.

Also, Free Pascal seems to compile his Pascal programs without requiring changes.


Curly Brace Languages Reconsidered

Realized today that Scala might qualify as a curly brace language, which would bring the list of possible curly brace languages to …

  • C
  • C++
  • Java
  • C#
  • Awk
  • PHP
  • JavaScript
  • Go
  • Scala
  • Perl

That seems like an overly long list of languages to concentrate on, especially since there are a number of languages on the list that have non-trivial semantic divergences from C.

So, I’m thinking again about restricting myself to what I’m calling C-derived syntax languages, which would be possibly the following list:

  • C
  • C++
  • Awk
  • PHP
  • JavaScript

and possibly

  • Java
  • C#

That seems like a more manageable list. There are less real oddities to work around in the differences in those languages, whereas the earlier list had enough languages with real semantic differences that it would be hard to learn them all and keep them straight in the time remaining in this year.


Major Differences in C, C++, Java, and C

The primary places that the syntax of these languages differ from C or each other is in their handling of the following:

  • Objects
  • Generics / Templates
  • Lambda Expressions (anonymous functions / objects)
  • Inner Functions / Classes
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s