I did decide to follow along with Peter Michaux's Scheme from Scratch series in Ada, and I just finished v0.1 (Integers), which you can find on GitHub.

$ gnatmake scheme.adb
gcc-4.3 -c -gnatVa -gnatwa -g -gnato -fstack-check -gnat05 scheme.adb
scheme.adb:131:15: warning: "others" choice is redundant
scheme.adb:131:15: warning: previous choices cover all values
gnatbind -x scheme.ali
gnatlink scheme.ali -g -fstack-check
$ ./scheme
Welcome to Bootstrap Scheme -- Ada version.
> 34
34
> 235
235
> 23543
23543
> ^C

Surprisingly, my v0.1 Ada implementation is only 119 LOC, while Peter's v0.1 C implementation was 126 LOC1. I expect this to reverse very soon because I feel that string manipulation in Ada is more obtuse than within C and the Read function which handles parsing will quickly become the most unwieldy part of the code. How did I end up with a marginally shorter number of lines this round, though? My guess is that all the brackets is what racked up the LOC for Peter since my code is pretty much a straight one-to-one, C-to-Ada port of his original code.

I'm having fun learning a lot about language implementations, Ada, and C too. I look forward to getting some free time to play catch up with Peter who is already at v0.8!

  1. According to GitHub's count for LOC.