Tags related to tag mine
Monday, July 9. 2007
New Selenemacs Packages
For now the Selenemacs main page will be Here. If/when there is more interest, I'll put up a proper SVN repository and a page on bunnywiki.
Wednesday, November 15. 2006
Version 0.3 of the MySQL FFI for Gambit released
Click here to download the tar file
Here is the documentation
I am currently working on a set of macros as a sort of object-relational layer between the DB and scheme. Obviously this not a true object relational... anything, because there are no real (native) objects in scheme. More info forthcoming.
Wednesday, October 25. 2006
Imagine a webserver...
This server, is called zen-garden. zen-garden is my pet project. It is my tilting at a windmill, and it is rapidly approaching a 0.1 release. The fundamental difference between zen-garden and most other webservers is that zen-garden is built, and based around simple rules. You want to log every request to a database table? Write a rule that acts on every request, and writes the request info to the table. You want to run all of your HTML files through Tidy and or gzip to compress them? Write a rule to act on every response that doesn't already have gzip encoding, and has a content-type of text/html. As you can see, the rule-based webserver is a very powerful concept indeed.
Now you might be asking "How do you handle a request for a single page, a single CSS file?" The answer is simple: a rule to output the page or CSS file when the request method is GET, and the URI is /path/to/your/file. But imagine this, instead of making the webserver find the file, load it, and send it across the network, what if you told the webserver it should compile the serving of that file into itself on deploy time? What if part of the deploy is taking a source file in XML and doing some transformations on it, and then compiling the transformations into itself before deploying? But what if all this was developer friendly so that when working in a development environment, you don't have to deal with the daily grind of compile-test-debug, you could make a change to your file, and test it on the spot? zen-gardens host language is Scheme on Gambit, so it is interpreted for a really fast development cycle, but Gambit can also be compiled to C (which of course can be compiled to native code) so when it is time to deploy, your server will be fast.
The crux to zen-garden is the request-chains and request-handlers. A request-handler is a data structure, with 2 important parts: a predicate stating whether or not the handler should execute, and the handler itself. Both of these are functions that return booleans. A request-chain is really just a series of request handlers that are executed in a particular order, split out into 4 convenient phases: initialization, handling, fallback and finalization. A request-handler can be bound to any one of these 4 phases. If a request is not handled during the 'handling' phase, the fallback phase is executed, otherwise it is skipped.
The real interesting thing about this structure is that a request-handler can spawn a new request-chain. So you can have a request-handler that executes when the 'Host' header is set to 'my.foo.domain.com' that spawns a new request-chain. On top of that, there is nothing stopping you from dealing with requests in other ways, in fact, any way you see fit. Don't like my method of predicates and request chains and what have you? Write your own method of doing things. zen-garden is modular in design. Pull out the routine that I use to handle requests, and install your own.
What is in the future of zen-garden? Well, ZSP's, or Zen-Server-Pages, which is a JSP/PHP method of page generation. Unlike these other technologies, I plan on getting the separation of business logic and display logic right. No top-heavy tag libraries with presentational logic getting confused with document structure, yes JSP and the entire J2EE stack, I am looking at you. No business logic tied up with your presentation, dirty, nasty PHP! What else is in the future? My(and other)SQL connection pooling, GD integration, regular expressions, optional continuation based web programming, RESTful resources, specialized preprocessing of CSS and Javascript files (only send the browser the CSS it needs, and you want it to have).
Oh, and it is all under a BSD License.
For now, everything is available in a subversion repository, svn://panda-ba.sanriowasteland.net/zengarden/trunk . You will need the Gambit-C compiler and interpreter as well.
Sunday, September 10. 2006
Burning Man 06 - The Music
Tyler was camping with us and brought his Drum. Joe had his drum too so they shared information back and forth on how to play and taught a little bit to Julie.
One of my favorite moments was when the biggest dust devil ever hit our camp. We were taking turns holding down the shade structure when Tyler started drumming on the top of the uhaul trailer. I joined in from the inside with a kick drum sound. Next thing you know, Dan and Jonnay are playing along. Someone heard one of the neighbors on his bongo playing along with us. It was a ton of fun and a nice reprieve from the stress of the weather.
One night through the tent walls there was a fun round of Row, row, row your boat. I have no idea who we were singing along with.
Before the shade went down, we had a party during the day and dave set up his sound system and turntables. I had a blast spinning there! Hell, when else would I get a chance to spin with my bra showing except there. The only difficult part of the set was when the wind hit and the parachute knocked the monitor onto the turntables. Fortunately I got my hands under there just in time, everything thinks the needle didn't skip at all, but it did a little. I was stuck there yelling until someone finally saw me. Definately a highlight to watch people walking down the street dancing to my tunes and people thanking me for my set.

Spontaneity Rules! U-Haul Drum Circle!
The next day Dave gave me a dj tutorial. It was extremely helpful. I wish we had of had more time to work on it though.
We had a rave camp down the street a block away from us. I loved hearing their music. I loved the music they played, they played everything that I have on vinyl. The problem was that they had 5000 visitors a day. Which meant, we had to go find new porta potties cause they filled up pretty quick. Ewww.
The only bad thing about the music this year is that I missed seeing Freq Nasty yet again. There is always next year...or the warehouse.
![]() | ![]() |
| Me, before the big shade (and monitor) fell | James on the decks | ![]() | ![]() |
| Xim in the Mix | Jonnay on EQ and Volume, Travis on Beatmixing |
Saturday, August 19. 2006
More Gambit MySQL Mana From Heaven, due to Windmill Charging.
I have decided to describe this project as my personal Charging at Windmills because of the sheer Quixotic nature of it all.
I've also decided to embrace my inner Don Quixote, for a few simple reasons:
- If I can really build a kick ass killer-app webserver in scheme I will show the world; Google, Thoughtworks, and Amazon will all be falling all over themselves to hire me
- I will end up building some useful libraries for Gambit Scheme
- I'll be able to erase the sheer suffering caused by such monstrosities as PHP, J2EE, et all. (I pick on those 2 because I know them the best, but others are not exempt).
- It's fun, and I am leaning more about HTTP, functional programming, threads, C programming, parsing and all sorts of great stuff.
Version 0.2 of my MySQL FFI for Gambit Scheme is available. The source is more documented, and there is FINALLY a semi-reasonable test suite. There is still a lot of work to be done, but it is getting to the point where there is at least a reasonable baseline.
Update: See this entry for the latest version!
Download it. Make comments, suggestions, bugreports. Even stuff like "I won't use it because of x, y and z" are helpful.
Enjoy the fruits of my pie-in-the-sky labours.
by the by, the webserver code is unreleaseable, but available at:
svn://panda-ba.sanriowasteland.net/zengarden/trunk
Friday, August 11. 2006
A Gambit MySQL Gambit FFI
You will need to have the mysql client libraries and include file installed somewhere in order to build it, but for those of you on Win32 and Cygwin, I've packaged up a binary as well.
Documentation comes later. Use the source!
Update: See this entry for the latest version!
Source File
Cygwin Gambit Library (binary - statically linked against mysqlclient 5.0)
Tuesday, May 30. 2006
A New Style of Writing Blog Entries
Normally when I write a blog entry, there are 2 ways that I can go about doing it, I can either slam out an entry in a matter of minutes or I can lovingly craft an entry over a period of what can sometimes be months. As you might imagine, there are problems with both styles.
When I am just slamming out an entry there are spelling and grammatical errors, and it is definitely not my best writing. This is usually because I am pressed for time, or I just want to get something out the door, mostly to say "Hello" to my readers, and let them know I am still alive. Something that is very important as I am pressed for time.
If I lovingly craft an entry, it is basically the exact opposite. Some of my best entries in terms of structure, grammar, and clarity have gone through multiple drafts and revisions. In fact, frequently I will start one of these entries and then finish them off 2 months later. They really are the cream of the crop.
The problem is, that neither style is working for me. I want the speed of option one, with the beauty of option 2. Where is my damn cake, and a fork to eat it with?
IDEA! Outlining...
Back in junior high, we were taught to outline our thoughts, before we wrote our paper. Very complex things—these outlines. First you have to make sure everything is indented properly, and your first level of indentation should be in Roman numerals, the next level uppercase letters... oh the structure! The problem with this method of outlining is that it isn't conducive to writing down thoughts as we think them. Mind Mapping is a great technique, but I don't want to pull out a scratch piece of paper every time I want to write a blog entry.
The thing is, that outlining is a really powerful technique of writing a blog entry (or essay, or book, or..) before actually writing it. It provides a focus and a structure. Because there is a clear delimiter of where the end goes, it is easy to write out an entry in a short span of time, and not get lost half way through, or run out of steam. As ideas come and go, the outline can be added to and subtracted, and there is an easily visible road map of what you are doing and where you are going.
Here is an example outline that I did for this entry (how wonderfully meta):
- what i did in past
- slam one out real quick
- spelling errors
- not best writing
- write revise write revise write revise
- good writing, clear
- takes forever, months even
- new idea with outlines
- speed up entry writing
- make writing clearer
- outline using simple text - this one for example
- see how it goes - maybe publish more entries
I've already written this entry in half an hour, which isn't really that bad. Maybe I can end up publishing more entries and still maintain my extremely busy 2 job with family day. I guess we will just have to "see how it goes".










