Search found 7 matches

by titanium_geek
Fri Aug 13, 2010 8:37 pm
Forum: Common Lisp
Topic: can print from dotimes (nth...) but that's all
Replies: 4
Views: 4209

Re: can print from dotimes (nth...) but that's all

Thank you so much. I was really struggling because I didn't know what I needed to be learning how to do. Thanks for telling me about flet, and how to return the list at the end! Also thanks for explaining to me about append versus push. It's really hard to google LISP stuff sometimes because you tur...
by titanium_geek
Fri Aug 13, 2010 6:27 pm
Forum: Common Lisp
Topic: can print from dotimes (nth...) but that's all
Replies: 4
Views: 4209

can print from dotimes (nth...) but that's all

Hi there. This is my code: (defun cartesian-product (m n) (defun helper (x) (setf k n) (dotimes (i (length n)) (setq j (nth i k)) (print (cons x (cons j nil))))) (mapcar #'helper m)) The output for '(a b) and '(c d) is (A C) (A D) (B C) (B D) (NIL NIL) After much wrestling, it does make a Cartesian ...
by titanium_geek
Sun Feb 14, 2010 4:46 am
Forum: Common Lisp
Topic: Lisp newbie: deck of cards in Lisp
Replies: 17
Views: 17151

Re: Lisp newbie: deck of cards in Lisp

Good point about just number comparing being necessary, but I guess I'd like to write a proper gui for this eventually, so starting with a proper deck would be handy.

Thanks everyone, I can now see the next steps! :)

TG
by titanium_geek
Fri Feb 12, 2010 3:12 am
Forum: Common Lisp
Topic: Lisp newbie: deck of cards in Lisp
Replies: 17
Views: 17151

Re: Lisp newbie: deck of cards in Lisp

I guess I'm thinking too real world (like java). I'm really hesitant about posting the whole problem because I have had a bad experience before where someone wrote the whole code for me, said "here" and killed all the joy in solving the problem. (I haven't learnt to learn well from code.) ...
by titanium_geek
Wed Feb 10, 2010 11:10 pm
Forum: Common Lisp
Topic: Lisp newbie: deck of cards in Lisp
Replies: 17
Views: 17151

Lisp newbie: deck of cards in Lisp

Hi everyone, I'm learning Lisp this year. I'm trying to learn it by writing a simple card game ( with the possibility of writing some AI to help me prepare for an AI course next semester.) So, I'm very new to lisp and really don't have much idea what to do! I come from a java background so think in ...
by titanium_geek
Sun Feb 07, 2010 3:41 pm
Forum: Common Lisp
Topic: Weblocks demo application styles
Replies: 3
Views: 4038

Re: Weblocks demo application styles

just checking that you know that localhost isn't accessible by other people, but just you, right?
by titanium_geek
Tue Feb 02, 2010 6:11 pm
Forum: Common Lisp
Topic: I dont get Macros
Replies: 31
Views: 40884

Re: I dont get Macros

Conrad Barski calls macros "SPELS"
http://www.lisperati.com/casting.html

A more direct link: http://www.lisperati.com/no_macros.html

I found it an easy to understand read.