Search found 9 matches

by slobodan.blazeski
Wed Feb 03, 2010 1:17 pm
Forum: Common Lisp
Topic: I dont get Macros
Replies: 31
Views: 40986

Re: I dont get Macros

Can somebody show me either a) examples where macros are desperatly needed b) some patterns where macros are used c) explain how to build an embedded language on top of lisp like I heard so many times Example 1 : Ever heard of Paul Graham new language Arc. It has a very nice conditional operator th...
by slobodan.blazeski
Thu Jun 11, 2009 6:18 am
Forum: Common Lisp
Topic: Which HTTP Server?
Replies: 10
Views: 14155

Re: Which HTTP Server?

What Slobodan said: Hunchentoot unless you're using ACL, and possibly even then. Edi code is good but I doubt that general purpose server could beat Aserve on dedicated implementation with commercial backing. Two more suggestions that I didn't tried myself: Anti web http://hoytech.com/antiweb/ I ha...
by slobodan.blazeski
Wed Jun 10, 2009 3:46 pm
Forum: Common Lisp
Topic: Which HTTP Server?
Replies: 10
Views: 14155

Re: Which HTTP Server?

AllegroServe if you are ACL user, hunchentoot for everything else.
by slobodan.blazeski
Wed Jun 10, 2009 3:42 pm
Forum: Common Lisp
Topic: Extending a simple array dynamically
Replies: 4
Views: 5733

Re: Extending a simple array dynamically

VECTOR-PUSH-EXTEND is what you want but array must be adjustable. http://www.lispworks.com/documentation/HyperSpec/Body/f_vec_ps.htm Arrays are continuous blocks of memory I really doubt you will gain much if at all by using simple array especially in accesing elements. Maybe it would be better if y...
by slobodan.blazeski
Tue Jun 09, 2009 12:04 pm
Forum: Common Lisp
Topic: Replacing elements in a list
Replies: 22
Views: 25517

Re: Replacing elements in a list

Yeea! Solved. Nice working. Code: Select all (defun add (number) (intern (format nil "*~a" number))) (defun myfunc (x) (cond ((null x) nil) ((< (car x) 0) (cons (add (car x)) (myfunc (cdr x)))) (T (cons (car x) (myfunc (cdr x)))))) Thanks Now the question can lisp differ even and odd numb...
by slobodan.blazeski
Tue Jun 09, 2009 11:48 am
Forum: Common Lisp
Topic: Need help with lambda function
Replies: 7
Views: 9627

Re: Need help with lambda function

Do you need something like below?

(defun foo (l high low)
(mapcar #'(lambda (e) (and (> e low) (< e high))) l))
FOO

(foo '(4 7 2) 7 3)
(T NIL NIL)
by slobodan.blazeski
Fri May 29, 2009 8:54 am
Forum: Common Lisp
Topic: Combining digits to make a string
Replies: 18
Views: 21596

Re: Combining digits to make a string

If you want string representation: (concatenate 'string (princ-to-string (random 3)) (princ-to-string (random 3)) (princ-to-string (random 3))) ->"112" Else I don't know how to present for example 012 as number as starting zeros will be removed. 012 ->12 bobi http://www.linkedin.com/pub/di...
by slobodan.blazeski
Fri May 29, 2009 12:46 am
Forum: Common Lisp
Topic: Interest in a Lisp CMS?
Replies: 16
Views: 21839

Re: Interest in a Lisp CMS?

As I'm doing essentially the same, I can say it would be very great to have such a beast ready off-the-shelf! Just please beware of UCW/Weblocks plague: if you release something, make its examples work straight out of .tar.gz, and make them easy to adapt. I wrote about hackbraries (*) and there was...
by slobodan.blazeski
Fri May 29, 2009 12:34 am
Forum: Common Lisp
Topic: New to programming: Advice
Replies: 6
Views: 8293

Re: New to programming: Advice

It might be better to decide which language do you want to learn first common lisp or scheme, going through both of them in a same time would only confuse you. If you decide to fallow the common lisp way Practical common lisp is a great book though for a complete beginner to programming Gentle intro...