String Streams

posted by foof on Mon Jun 29 07:06:56 2009

After replacing Boehm with the new GC, I just removed the the final non-standard dependency in chibi-scheme, C string streams, which are used to implement Scheme's string ports. Now if your libc doesn't have C streams, Chibi will provide its own simplistic alternative. The allows Chibi to build and run on Plan 9 (though there are still some bugs to be worked out), and should port fairly easily to Windows.

[Read more...]

Small is Beautiful

posted by foof on Sun Jun 21 13:25:19 2009

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antoine de Saint-Exupéry

[Read more...]

Garbage Collection

posted by foof on Sat Apr 25 02:43:23 2015

I'm taking a break on the Unicode discussion, since it's not a particularly important part of my project. The Google Summer of Code project is really about Plan 9, and I'm only using Chibi-Scheme because it's small and has few dependencies. However, it does have one dependency which is that it uses the Boehm garbage collector. I had initially thought it would be convenient not only for myself but for extension writers, but the size and complexity of the Boehm GC would make it a difficult task to port to Plan 9 - the GC itself is orders of magnitude larger than the rest of the Scheme implementation. [1] So at the advice of my mentors and others, I'm writing my own simple mark&sweep GC. Once that's out of the way, I can move onto the real fun of playing with Plan 9.

[Read more...]

[1]The Boehm GC is nearly a 1MB tarball, whereas the entire rest of the Chibi-Scheme tarball including tests is less than 50kb.

Unicode String Representations - Part 1

posted by foof on Tue May 26 17:05:37 2009

For Google Summer of Code I'm working on porting and customizing a Scheme to Plan 9. I'm using my own chibi-scheme as a basis since it's very small with minimal dependencies, and hope to add support for writing 9P servers. But one of the tasks involved is adding Unicode support, and as Chibi has no dependencies I'm free to explore the best possible string representation. This seems an all-too neglected topic, with different programs and libraries using different representations, [1] but no good comprehensive studies. Indeed, it's difficult to compare because once you choose a representation you tie yourself to its implementation and idioms, so any comparison would be between apples and oranges. But I'm hoping Chibi's simplicity will let me implement and compare several representations using the same programs in the same language. [2]

[Read more...]

[1]GNOME, Perl and vim use UTF-8 internally, Java and .NET use UTF-16, many existing Schemes use UTF-32.

[2]Disclaimer: I've worked with UTF-8 extensively, and UTF-8 is of course a Plan 9 invention, so I have some prior bias here.

introduction

posted by foof on Mon May 25 09:34:21 2009

Well, I've finally succumbed and started a blog. This has been on my todo list for years now, but naturally I didn't want to use any existing blogging software so I had to write my own, which meant I needed to write my own web framework, which meant I needed to rewrite my HTTP server from scratch (again). But I'm happy with the new design, which is even more austere than before, forcing me to focus on the content itself. I'm especially happy with the new margin-based annotations which will make reading and navigation much simpler.[1]

[Read more...]

[1]I have discovered a truly marvellous proof of this, which this margin is too narrow to contain.