by Kris Kowal.
Swil, Senior Project Complete
As of last Wednesday, I managed to integrate all of Swil's components. While the Swil interpreter is not ready to create web pages and PDFs, it can now interpret Swil programs.
I finished my Senior Project Paper today. I would require myself to work on it for another week before turning it in, but that's not an option since the quarter ends tomorrow. However, there is some valuable content about Swil's features in the last sections, some entertaining philosophical discussion (previously seen in my proposal for the project) in the middle, and some mostly pedantic discussion about how I wrote it in the beginning.
this entry
was posted on
Thu, 08 Dec 2005
at 16:15 in
Swil
On another note, I didn't finish Swil on time. I'll be working on it over the summer.
My attempt (blind stab) to build the syntax evaluation and apply, especially in the absence of a complete parser, revealed some conceptual problems, including a syntax collision, and ultimately didn't work in many cases.
As for the syntax collision, anonymous functions in Swil will require an additional character. My original concept for the syntax, (parameters): routine, doesn't pan out because it collides with assignment to various kinds of sequences, and even to parenthesized single element evaluations. So, with an added dot, .(parameters): arguments will have to suffice.
As for making the evaluation system work, I'm considering the implications of merging the context and syntax structures, and making sure that application (apply) never directly calls a named function. Rather, apply will look up a context corresponding to the operator, then apply it against the operand.
Another issue I ran into was that function calls cannot inherently be generators. Normal function calls lend a user to believe that the function values evaluate expediently. I may introduce an iterate built-in for iterative evaluation of a function call. I may do something else, but my priority will be to make instantaneous evaluation work first.
I also look forward to implementing types, casting, function overload, pattern matching, and grammar matching eventually.
I hope to have minimal functionality ready for the function programming competition soon.
this entry
was posted on
Thu, 16 Jun 2005
at 02:10 in