Hello, I'm Nick Fitzgerald. This is my weblog. You can also check out my shared items from Reader and code on GitHub. Feel free to contact me about whatever.
January 12th, 2010
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!
On July 23rd, 2010
On July 19th, 2010
On July 5th, 2010
On June 29th, 2010
On June 25th, 2010
On June 21st, 2010
On June 2nd, 2010
On May 20th, 2010
On May 19th, 2010
On May 2nd, 2010
blog comments powered by Disqus