Search found 98 matches

by JamesF
Thu Feb 11, 2010 10:53 pm
Forum: Common Lisp
Topic: Lisp newbie: deck of cards in Lisp
Replies: 17
Views: 17088

Re: Lisp newbie: deck of cards in Lisp

I don't want to write java in Lisp. :) Excellent! Prepare to have your head turned around a bit when you get into CLOS (the Common Lisp Object System), because it's a total inversion from the Java approach. How do I go about making a deck of cards in lisp? Ramarren's question is probably the most a...
by JamesF
Wed Feb 10, 2010 6:19 pm
Forum: Common Lisp
Topic: I dont get Macros
Replies: 31
Views: 40774

Re: I dont get Macros

While technically every macro is just a search-and-replace texteditor, many example macros are used the same as c-Macros. They are used to abbreviate syntax, but have no deeper functionality. This just isn't the case but, as has been mentioned, it's difficult to demonstrate real-world use of a macr...
by JamesF
Sun Feb 07, 2010 12:07 am
Forum: Common Lisp
Topic: call function on all combinations of a list
Replies: 4
Views: 5163

Re: call function on all combinations of a list

to avoid NxN checks i want to take the first element and check it against the rest, take the next and check it against the rest and so on. the result should be a "collision list" of collision pairs: ((box1 circle3) (circle7 circle3) (box2 circle7)). is there a existing function or idiom w...
by JamesF
Sat Feb 06, 2010 11:42 pm
Forum: Common Lisp
Topic: Ubuntu VM for Lisp exploration and experimentation
Replies: 9
Views: 7868

Re: Ubuntu VM for Lisp exploration and experimentation

Question though: what are the limits of X's network transparency? For example, if someone wanted to write a graphical game in Lisp, could they run into problems? Depends on what you mean by "limits." X is network-based by design. This is mostly invisible on *nix platforms because it defau...
by JamesF
Sat Feb 06, 2010 6:34 pm
Forum: The Lounge
Topic: LISP for beginners
Replies: 3
Views: 9123

Re: LISP for beginners

I actually found Practical Common Lisp to be very useful. Prior to that, I'd done various bits of scripting and programming in unix shell, SQL, Perl and PHP, so I wasn't a total beginner to programming. However, it's the best introduction to Lisp itself I've found. After that, it'll be worth looking...
by JamesF
Thu Feb 04, 2010 3:01 pm
Forum: Common Lisp
Topic: HTML and LISP
Replies: 5
Views: 5341

Re: HTML and LISP

Welcome! If you do this in lisp, you'll want to use a couple of Edi Weitz' libraries: http://weitz.de/drakma/ and http://weitz.de/cl-ppcre/ . A couple of bits of advice: - first, get it working in a language you already know. Then you at least have a result that you can provide for assessment, even ...
by JamesF
Mon Feb 01, 2010 3:03 pm
Forum: Common Lisp
Topic: I dont get Macros
Replies: 31
Views: 40774

Re: I dont get Macros

You know how sometimes you find yourself writing the same pattern of code for the nth time, and think, "man, I should really write a programme that would write this code for me"? That's what they do. The main point is: What is the difference between a function and a macro. What is so spec...
by JamesF
Sun Jan 31, 2010 6:30 pm
Forum: Common Lisp
Topic: I dont get Macros
Replies: 31
Views: 40774

Re: I dont get Macros

I'll pitch in with my bit of input, because you haven't already been deluged enough :) Macros are evaluated at compile-time, and are never seen at runtime (unless the application itself writes and compiles code that calls on them). When the compiler is reading the source-code and encounters a call t...
by JamesF
Tue Jan 12, 2010 6:50 pm
Forum: Common Lisp
Topic: Initialization of variables
Replies: 5
Views: 6600

Re: Initialization of variables

Let me guess: you're coming to Lisp from C, Perl or Java? :) There are two giveaways: the indentation of the closing parentheses, and the way you're using variables. While you can write C in Lisp, you're setting yourself up to fight the language instead of getting it to work with you. This is where ...
by JamesF
Mon Jun 15, 2009 8:41 pm
Forum: Common Lisp
Topic: Which HTTP Server?
Replies: 10
Views: 13258

Re: Which HTTP Server?

Yup. Virtuozzo isn't "real" virtualization. It's a half-way hack where everybody is really just running processes on the same Linux kernel, with some magic to hide everybody else's processes from you and make you think your context is the only one on the machine.. Thankyou! Suddenly this ...