Search found 64 matches

by qbg
Fri Nov 14, 2008 7:40 am
Forum: Common Lisp
Topic: Labyrinth:how to find the path?
Replies: 6
Views: 7160

Re: Labyrinth:how to find the path?

I've wote something .It's working, but I'd like to know how to re-write this code without using setq ? (defun search_room (point labirint) (cond ((null labirint) nil) ((eql (caar labirint) point) (second (car labirint))) (t (search_room point (cdr labirint))))) (setq way '(in)) (defun search_path (...
by qbg
Fri Oct 31, 2008 3:48 pm
Forum: Common Lisp
Topic: Lisp and Regex
Replies: 7
Views: 7609

Re: Lisp and Regex

Perl's regular expressions are not regular expressions in the formal sense. This means that they cannot be implemented be implemented by finite state machines Does that mean they're more flexible than normal regular expressions - they can classify context-free/sensitive languages? Many features fou...
by qbg
Fri Oct 31, 2008 6:43 am
Forum: Common Lisp
Topic: Disabling macro characters in certain macros/reader macros
Replies: 3
Views: 3774

Re: Disabling macro characters in certain macros/reader macros

Couldn't you in your reader macro function make a copy of the current readtable, modify the characters you need, and then dynamically bind it to *readtable* so once your reader macro function exits, the readtable will be returned to what it was before?
by qbg
Thu Oct 30, 2008 1:42 pm
Forum: Common Lisp
Topic: non-linear list conversion to linear
Replies: 14
Views: 18387

Re: non-linear list conversion to linear

If you can't depend on it and you want to be cross-implementation, then it basically isn't supported. This is a whole other can of worms, though. Yup. See also: threading, sockets, unicode, etc. ;) This is why we need to come up with a CLv2. A de facto or community-driven standard composed of compa...
by qbg
Mon Oct 27, 2008 10:43 am
Forum: Common Lisp
Topic: lisp program error
Replies: 8
Views: 11652

Re: lisp program error

@qbg: I'm using uppercase since that's what the examples I've read use.I know it's not really necessary but it adds a bit of readability, since I don't have a good IDE for writing code in LISP. The parantheses are aligned like that to add some more ease in reading the code by trying to order it in ...
by qbg
Sun Oct 26, 2008 10:08 pm
Forum: Common Lisp
Topic: lisp program error
Replies: 8
Views: 11652

Re: lisp program error

First, about the way you are formatting your code: 1) Why are you using uppercase for the symbols? 2) Those closing parens feel lonely on their own line Now, what are you trying to do in incr? Are you wanting a function that is something like: (defun incr (list n) "Increment each element in the list...
by qbg
Fri Oct 24, 2008 9:15 pm
Forum: Common Lisp
Topic: How can I rewrite the function APPLY without using APPLY?
Replies: 12
Views: 13887

Re: How can I rewrite the function APPLY without using APPLY?

If you have ever watched the SICP video lectures, then you might remember the scene where Sussman labels the two hands drawing each other EVAL and APPLY, so apply is a rather basic function. You could write your own apply, but at that point you would probably end up writing a lot of a lisp implement...
by qbg
Wed Oct 22, 2008 10:30 am
Forum: Common Lisp
Topic: Please help my head get around 'deftype'
Replies: 23
Views: 22709

Re: Please help my head get around 'deftype'

I was thinking today, and came up with a better implementation for defun*: (defparameter *%function-types* (make-hash-table :test #'eq)) (defmacro defun* (name limited-lambda-list &body body) "Like defun, but saves type information. Special lambda lists (&optional, &key, etc.) not supported Lambda l...
by qbg
Mon Oct 20, 2008 5:19 pm
Forum: The Lounge
Topic: What's Subversion For?
Replies: 2
Views: 3366

Re: What's Subversion For?

For Clozure CL, you can browse the repository online.

Also, when getting wx86cl.exe, remember to get wx86cl.image and put it in the same directory.
by qbg
Tue Oct 14, 2008 9:57 pm
Forum: Common Lisp
Topic: Tree expression shortener; seperator
Replies: 10
Views: 17139

Re: Tree expression shortener; seperator

I use paredit in Emacs a lot. I'm constantly moving code around using sexpr-level editing commands and I've come to love parens for that. IMO, saving a character here or there, particularly a character that paredit automatically inserts and deletes for me, is not really useful. (:rant "I don't know...