Discussion of Common Lisp
Posts: 38
Joined: Sat Oct 17, 2009 10:40 pm

Re: Free, online, all-in-one book recommendations

Post by Duke » Fri Mar 04, 2011 7:57 am

xibalba wrote:I noticed that GNU Common Lisp outputs C code. How would a binary generated from that C code manage garbage collection?
If you mean to ask "how can a non-dynamic language like C do garbage collection", then the answer is that dynamic languages can be implemented in C; all languages are essentially abstractions of ASM. Otherwise, I don't know the particulars of how GCL works.
^From ANSI Common Lisp. How is (x) in the above expression a list when it isn't quoted? Is it a list because it isn't a number or string (no double quotes)? Then how is it also not a symbol? Are all such variables defined by defun lists? Or should I just keep reading as it will be explained to me later on?
It will become clearer after you read about macros, but basically the lambda-list (x) doesn't need to be quoted because it's not evaluated directly. Rather, when it's passed to a macro (i.e., defun) it's transformed into valid s-expressions.

That's my understanding, anyway.
"If you want to improve, be content to be thought foolish and stupid." -Epictetus

Warren Wilkinson
Posts: 117
Joined: Tue Aug 10, 2010 11:24 pm
Location: Calgary, Alberta

Re: Free, online, all-in-one book recommendations

Post by Warren Wilkinson » Fri Mar 04, 2011 1:30 pm

I read through your design document. I have some advice:
  1. Don't worry about making it modular. Its much easier to hardcode things. In particular, hardcode the battle menu options, the character stats, and the spells. You might hardcode the character sprite & animation information.
  2. Code a walk-about first. 1. get your game to load up, setup gfx, and draw some random pixels on the screen. 2. get it to blit a hardcoded land tile all over the place 3. get it so you're arrow keys move the camera around the map 4. draw a 1-frame of a hardcoded sprite where your character is. When you've completed these steps you can start work on loading tile graphics, loading maps, and animating sprites.
  3. You have a pretty good handle on the sort of data that goes into a map. The design document looks good.
Need an online wiki database? My Lisp startup http://www.formlis.com combines a wiki with forms and reports.

Posts: 12
Joined: Thu Feb 24, 2011 2:24 pm


Post by xibalba » Fri Mar 04, 2011 2:21 pm

Last edited by xibalba on Fri Nov 27, 2015 6:15 pm, edited 1 time in total.

Post Reply