As a part of a Tic Tac Toe playing bot, I need a function that evaluates combinations of tiles to points. The code would look something like this:
Generics seem to offer a nice facility for pulling out a common word and letting it act on things according to the types you pass it, with extensibility after-the-fact.
So I performed macroexpand-1 on this function and I understand generally how this macro works, but I'm super confused of how Graham nest the backquote `, and how he uses ,@ to expand the cases.
I am trying to practise creating macros in Common Lisp by creating a simple += macro and an iterate macro. I have managed to create the += macro easily enough and I am using it within my iterate macro, which I am having a couple of issues with. When I...
I'm really new to common Lisp and having some struggles. I'm working on a function that given x, y and an array with the index for vertical value returns NIL if there's any element diagonal from (x y).
I want to open a file and read the contents, or do something else if the file does not exist.The former can be accomplished easily enough: with-open-file.
I am wondering if there is a way to get Linux's PID (Process ID) from Common Lisp's REPL. That is, I would like to know the ID of the SBCL or Allegro process from the REPL of the process itself.
Why happen this in sbcl? Maybe a bug?But if change :initform to :The problem disappearsI test this in sbcl 1.4.3 and 1.4.11. In clisp it seems that the problem does not arise.
Recently, I started to learn cuis-smalltalk, and no I realize how profound and deep OOP with Smalltalk is compared to CLOS (I'm using Ruby). I learned the great idea of that Smalltalk is a reflective system implemented in itself. I found that Ruby has Rubinius, but when I looked for...
How do I know whether I'm calling an anaphoric macro? If I do so without knowing it, some seemingly unbound symbols might behave quite different from what one would expect.