Search found 8 matches

by indianerrostock
Wed Nov 24, 2010 3:31 pm
Forum: Common Lisp
Topic: Newb needs help with many things.
Replies: 6
Views: 14273

Re: Newb needs help with many things.

Hello,

Can you explain how you produced the executable file?
by indianerrostock
Wed Nov 24, 2010 3:02 pm
Forum: Common Lisp
Topic: Tips to improve my program
Replies: 1
Views: 2934

Tips to improve my program

Hello, I am new to Lisp and wrote a little program that: (1) Load a file with sports. (One sport per line.) (2) Load a Java file as template. (3) Clean the single sport word. (4) Replace a placeholder (*template-holder*) in the template file with the sport word. (5) Store the template in a new file ...
by indianerrostock
Sat Nov 13, 2010 2:42 pm
Forum: Common Lisp
Topic: Classes as slots in other classes and package definition
Replies: 3
Views: 6867

Re: Classes as slots in other classes and package definition

Thank you for these interesting answers.
by indianerrostock
Tue Nov 02, 2010 2:35 pm
Forum: Common Lisp
Topic: Classes as slots in other classes and package definition
Replies: 3
Views: 6867

Classes as slots in other classes and package definition

Hello, I wrote three classes (each in a single file) and wanted to use two of the classes as slots in the first class. Two of the slots in the unit class are the unit-type and the unit-attributes class. The unit class: (defclass unit() ((unit-name :initarg :unit-name :initform (error "Must supp...
by indianerrostock
Tue Mar 23, 2010 3:20 pm
Forum: Common Lisp
Topic: Please help for the beginner
Replies: 9
Views: 8731

Re: Please help for the beginner

Hello, I read some helpful articles and tried another approach to solve it. Here is my result: (defun rcsort (myl) (if (not (atom myl)) (let ((x (smallest myl))) (cons x (rcsort (delete-smallest x myl))) ))) (defun smallest (myl) (if (not (null myl)) (let ((x (car myl))) (dolist (elem myl) (if (and ...
by indianerrostock
Mon Mar 22, 2010 1:41 pm
Forum: Common Lisp
Topic: Please help for the beginner
Replies: 9
Views: 8731

Re: Please help for the beginner

Hello, thanks for the many really helpful answers. I currently read the Practical Common Lisp book and try to familiarize myself with Lisp. I change the function call to "(setq nlist (sort-insert x nlist)))" but the result simply end in NIL. Could anybody show me a result. Mostly, it is ve...
by indianerrostock
Sun Mar 21, 2010 8:48 am
Forum: Common Lisp
Topic: Please help for the beginner
Replies: 9
Views: 8731

Re: Please help for the beginner

Hi, thanks for the answers. I changed the setq variable to a defparameter, checked for nil of the ulist and replaced the 0/1 with T/NIL for the filled variable. But there's still one problem. I call the "sort-list" function with the defparameter: (sort-list test-list) The result looks like...
by indianerrostock
Sat Mar 20, 2010 11:42 am
Forum: Common Lisp
Topic: Please help for the beginner
Replies: 9
Views: 8731

Please help for the beginner

Hello, I tried to write a little storting program, but I make a mistake in calling the function "sort-insert". Can anybody tell me my mistake? (setq test-list (list 3 5 1 2 9 4 7 8 6)) (defun sort-list(ulist) (let ((nlist (list))) (dolist (x ulist) (setq nlist `(sort-insert ,x ,nlist)) ) (...