freenode/#lisp - IRC Chatlog
Search
21:14:41
aeth
cqs: the let creates a new binding, but setf in this context (or setq in general) sets an existing binding
21:15:27
aeth
cqs: so the let is basically "int foo;" or "int foo = 42;" and the setf is basically "foo = 42;"
21:15:53
aeth
except there's no type there so it's more like a language that uses "var" or "local" or even "let" rather than "int"
22:41:38
minion
cqs: please see PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
8:51:39
zerobaud
Does anybody have a good overview / tutorial showing how metaprograming can be done in lisp? For example in C you want a enum of errors that indexes an array of strings (char arrays) corresponding to the error message so that; res = do_something(); if res != ERR_NONE { strerror(res);
8:53:11
zerobaud
There are better examples, but anyways... any good documentation about metaprogramming?
8:58:00
zerobaud
shrdlu68: sorry, I left information out.. I want a single place to add a error message and automatically add a enum. I can keep a enum with error names like ERROR_NONE, ERROR_THIS, then create a char array pointer to a char array with "strings" corresponding to the errors.
8:58:40
zerobaud
X macros allow you to add them in one place only trough metaprogramming (using the preprocessor)
9:01:50
zerobaud
shrdlu68: or for example, I want to call a error handling function strerror for libc, and also want to handle libelf erros with elf_errmsg, and errors from intel xed dissasembler using xed_error_enum_t2str.