<$BlogRSDUrl$>

Thursday, May 29, 2008

Lisp for games


I decided that Python sucks too bad to be useful. I just can't get over that awful idea of using whitespace to delimit blocks.

Anyhow. I need to choose an alternate scripting language. I like perl a lot, but that is not a language I want to program outside of a work environment. I like lisp too. Maybe its OK for games but need to investigate.

The main issue with lisp is I'm not too clear on the best way to package it. For example, on Windows I need to compile or bundle an interpreter or some such. Also I need to figure out SDL bindings. Etc. These details always take some effort to figure out.

Which lisp interpreter/compiler to use?

http://www.cliki.net/Common%20Lisp%20implementation
http://www.lisp.org/table/systems.htm
http://common-lisp.net/~dlw/LispSurvey.html

My debian system seems to have packages for clisp, gcl, cmucl, ecl, and sbcl. Also for slime. However, no ilisp pacakge. There is a cl-clim as well as cl-uffi and cl-sdl packages.

Here is how to invoke them:


sbcl --noinform --load <file>
clisp <file>
cmucl -quiet -load <file>
gcl
-f -load <file>

Next, on to slime. It loads up just fine in emacs, which is comforting. When I do a "m-x slime", it fires up cmucl. I wonder how I might make use sbcl instead? Anyway, cruise on over to the slime tutorial:

http://bc.tech.coop/blog/050501.html

For reference, of course I need Guy Steele's book:

http://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html

And Peter Seibel's tutorial:

http://www.gigamonkeys.com/book/

Tuesday, May 20, 2008

Vista 102


OK. I want to figure out how to improve streamripper's behavior on XP when not run as administrator. To start with I'll be testing on Vista instead. This is somewhat easier because I don't actually have an XP system.

I have some residual questions regarding how UAC & Vista security works. For examnple:

Q: I'm Administrator, but why can't I view the contents of C:\Users\[User Name]\Application Data in cmd.exe or Explorer? [This statement isn't strictly true. I can view it in cygwin if I run as Administrator.]

Sunday, May 11, 2008

PATH_MAX madness


I never knew it was so difficult to create files. Streamripper needs a platform independent method to create directory and file names that won't overflow. This means pre-calculating a maximum length for the parent directory based on the maximum length of the final file name.

A quick web search on PATH_MAX (the posix define) gives several interesting web sites in the first page. Here are a few to get you started:

http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
http://rentzsch.com/macosx/pathmaxBlackholing
http://www.cygwin.com/ml/cygwin-patches/2005-q1/msg00084.html

Now there is another constant called FILENAME_MAX. This is not reliable either. You can read an interesting tidbit about it here:

http://unix.derkeiler.com/Newsgroups/comp.sys.hp.hpux/2003-05/0232.html

OK, lets go on. We're not supposed to be using these defines anyway, because they are filesystem dependent, not OS dependent.

http://osdir.com/ml/lisp.guile.devel/2004-03/msg00104.html


What about MAXPATHLEN? That also seems to be problematic, as it refers to system-wide limit, which some systems do not have.
http://lists.debian.org/debian-hurd/2000/09/msg00482.html

What about pathconf()? Or sysconf(_SC_PATH_MAX)? Well, pathconf() is defined in posix 88 standard. It seems to return PATH_MAX.

Tuesday, May 06, 2008

News aggregators



reddit.com
ycombinator

This page is powered by Blogger. Isn't yours?