Embrace change

«The best way to predict the future is to invent it» — Alan Kay 
Filed under

scheme

 

Another effect of playing with Scheme

Since I've tested PLT Scheme and started to re-develop the Tideland Dynamic Content Processor with it - the document node tree, navigation on it, and parsing SML text documents are allready working - I've done almost nothing in Smalltalk. So now I've thought a bit about the reason and I think I've got the answer.

I've started programming in Smalltalk with Squeak which is a full featured and innovative environment with a strange look'n'feel *scnr* and a motley community. After a while I switched to VisualWorks which is more professional and straight. I would really like to realize a professional project with VW. But it is also huge (not compared to Eclipse or Visual Studio *smile*), in some parts complex (e.g. Store vs Monticello), and - what counts most - not open source. Don't understand me wrong, I've got nothing against commercial software. I've bought lots of software for my Mac. But when developing my private software I use open source. So I want to give my applications and libraries back to the community. And I want to use them commercially and allow all others to do the same. Beside that I like that all together in a small and handy tool - like Squeak and PLT Scheme.

So I've allready started the porting of my sources back to Squeak. The export from VW is done, the Squeak development environment is set up, and first file-in tests leading to changes directly in the Smalltalk source file have been done. The only thing I've still got to change externally are the line endings. After that the file-in should work without problems and I can start to find needed code changes via the unit tests which cover most of my code. I hope I soon can provide the betas of the Common Smalltalk Library, the Smalltalk Object Store, and the Lightweight Application Server (take a look at the features). Additionally I can re-integrate the RDBMS strategies allowing the SOS to store objects in SQLite and PostgreSQL. Only the handling of large objects has changed and has to be adapted. The future development of the Net Business Framework - which is intended to have a REST interface - depends on some evaluations I'll do after the porting.

Loading mentions Retweet
Filed under  //   development   scheme  

Comments [0]

Keep it simple in Scheme

One features of the new Tideland Dynamic Content Processor - and also of the Tideland Train of Thoughts - will be the usage of a simple markup language, which is a kind of XML, but without attributes and less bloated through the usage of a Lisp-like style.
{document
{table-of-contents}
{section Introduction
{p The new {strong Tideland Dynamic Content Processor} is a
lightweight content management system developed in Scheme. The data
is stored in SML files.
}
}
}
My first approach in Ruby some time ago ended in a DOM-like implementation with classes for the document, for elements, and for text. The first reimplementation in Scheme used the same approach based on the class system of PLT Scheme. But I soon discoverd that this way isn't natural for Scheme. It works, yes, but Scheme OOP isn't as simple and straight as in Smalltalk.

So I switch to a simple structure, a kind of a list with fields for tag, id, parent, and childs, together with a set of procedures. They allow to easily create a document tree, navigate through it, or search nodes. What astonished me most was how small this solution is. I'm doing OO for over 20 years now. This formed my development style to think in frameworks immediately. Scheme now refocusses my mind to always look for possible simpler solutions.

Loading mentions Retweet
Filed under  //   development   scheme  

Comments [0]

Fun using Scheme

Since about a month I'm playing with Scheme. I've first learned it during my studies, now I'm using it just for fun. First I've just wanted to know if my remembrance has been right but now I've discovered Scheme as a nice language for my smaller projects, like the successor of the Tideland Dynamic Content Processor (DCP), currently written in Python.

I've decided to use PLT Scheme. It is portable and works really fine on OS X, Linux and Windows. Also the development environment DrScheme has nice features, even if it can't compare to a typical Smalltalk environment. One example is the highlighting of the usage of variables, functions, and returns through arrows when you mark them with your mouse. You can follow them and trace their scopes. Also the code navigation, the very flexible editor, the debugger, and the profiler are pleasing. It suits for my current small projects.

Scheme as a language is also really interesting. Alan Kay told about Lisp, the big brother of Scheme: "Lisp isn't a language, it's a buildings material.". Right now I'm just using Scheme just as a language. But I'm also using the object-oriented class extension, which shows how Scheme can be extended providing an additional paradigm. The macro system of Scheme isn't just a string replacement. It is a full feature that works in the program context and the lexical scope. So powerful procedures can be build to extend the base language and automaticly create even more useful procedures in one step for the given context if needed.

Right now I develop a simple markup language for the DCP. Maybe I can show some nice example of how Scheme supports me here soon.

Loading mentions Retweet
Filed under  //   development   scheme  

Comments [0]

Reactivating Scheme

I've been a fan of dynamic typed languages since a long time. Even if my professional development has been in Pascal and during the last eight years in Java and now additionally in a .NET environment I can look back on a positive history using dynamic languages. This history started in the mid 90s with ReXX on OS/2 and TSO. I've used it for scripting and GUI applications with Watcoms VX-ReXX. This tool together with the clear OS/2 API have been a very powerful combination. I've even wrote a book about it, but with the dying of OS/2 the publisher canceled our deal. *sigh* The next step has been the usage of Perl for the automation of administrative tasks in a high-available Solaris environment and the development of a trouble ticket system with a web frontend and PostgreSQL as database. OK, Perl is a bit strange, but it is also no problem to write well structured software with it.

After Perl Python has been my long time companion. I've choosed it due to the object-orientation and the clear syntax. It may be confusing, that indentation is used for the structure, but it works. *smile* I've used it for my dynamic content processor, for automation tasks and for the prototype of an aspect-oriented web application framework. It has been really simple to build this framework fast and to evaluate if it behaves as required. It took a by far larger effort to rebuild this framework in Java. Beside some simple and powerful Python constructs - e.g. the native usage of lists and maps - and the fact that their is no need for type handling the missing of long lasting compile, link, and deploy cycles has been a very important reason.

Since a long time during my study of computer science and my deeper interest in object-oriented development I've been watching Smalltalk. But in the 90s all implementations have had very high hardware requirements and also a very high price. Today it's different. With Squeak or VisualWorks Non-Commercial - and also others - it's no problem to learn and develop in Smalltalk. You can read about my current results here, the Tideland Application Stack with an object-oriented database, an application server and a web framework. I really love it and it is fun to work with such a high-capable language in an also high-capable environment.

During my study of computer science I've also had the chance to get a first impression of Scheme. This nice programming language impressed me from the beginning. It has a very clear syntax, maybe a bit unfamiliar in the beginning, but always comprehensible. But this first contact has been almost 15 years ago. I've often asked myself how far Scheme has been developed today. This time I've started to google for implementations and documentation and found the community alive and well. And to test if my memories are right I've downloaded PLT Scheme and started to code. OK, my first steps haven been slow and maybe not very nifty, but again it's just fun. More fun than I've had with Ruby, I don't know why. *smile*

One smaller app, the good old Tideland Dynamic Content Processor, which is developed in Python and is now frozen since Febuary 2006, needs a reimplementation to add some needed features. It seems that I'll reimplement it in Scheme.

Loading mentions Retweet
Filed under  //   development   scheme  

Comments [0]