10.20.2010

Learning

So I decided to use CLISP, since it is avaible for a shitload of platforms (there's no point of limiting your game to one platform). It's interesting to read more and more about Lisp systems. At first I was a bit confused were to start, but the wiki I linked has some helpful pages to get started. Most tutorials you'll find are pretty old (for example, stating that your list interpreter could take a minute to start depending on your computer speed... bullshit, if not ancient). But they really work for modern systems, too - standard is standard, I guess.
Well, first thing popped in my mind was one of the reasons programmers may find lisp environments weird: after starting it, it gives you some kind of interactive machine you can feed with commands. These commands seems to control every a common list environment can do: compilation, calculation, file loading etc.. It's like you could program the compilation of your program. It's quite different compared to the usual code->compiler->linker->executable chain. You can input commands directly and define functions and stuff interactively. You can do all in a dynamic way and use your functions you specified in another file after loading it. That brings up some complete new possibilities! I mean you can actually use your one code components anytime in this interpreter. That's cool. Seriously. I always had to code test applications to see what happens with my typed code, now I can test it interactively! I can imagine a lot of cases were this could be useful, most notably while developing or when creating test data for game map or so. I always integrated functions to fill my maps with special shapes and blocks, so I could simply generate them before any code got executed. This way is much interesting, especially when testing new features on different map arrangements: simply call a function to fill a map with new, different data and you just need to start your game loop again with the created map without any annoying recompilation. Effin awesome. It's also cool to learn the language itself, I think. You can hack in your stuff and test random lines as you wish without screwin too much in the code itself. Interesting, really interesting.

No comments: