Search found 30 matches

by hewih
Sun Feb 07, 2010 3:00 pm
Forum: Common Lisp
Topic: c-input and with-integrity question (cells)
Replies: 4
Views: 5221

c-input and with-integrity question (cells)

c-input (c-input (&rest args) &optional value) Same as c-in, but it lets specify extra arguments, and value is optional. what are the extra arguments? with-integrity (with-integrity (&optional <opcode> <defer-info>) <body>) Makes sure to run <body> only when the system is in a consisten...
by hewih
Sun Feb 07, 2010 2:50 pm
Forum: Common Lisp
Topic: drifter cell for class types (cells)
Replies: 4
Views: 5265

drifter cell for class types (cells)

i have a vector2d class and a position2d class which stores the position as a vector2d drifter cell called "value". the initial value should be a zero vector and then a vector2d should be added every time the translation value of a mover object is changed. my question is, how do i define i...
by hewih
Sun Feb 07, 2010 3:39 am
Forum: Common Lisp
Topic: Why have the let function when you already have setf?
Replies: 16
Views: 17386

Re: Why have the let function when you already have setf?

i'm just a newbie too and i don't know if this is considered good style but my functions usually start with a lot of let* bindings with function calls to get their values. this is especially true if i need a value more than once. in the actual function body there are usually only very few calculatio...
by hewih
Sat Feb 06, 2010 3:09 pm
Forum: Common Lisp
Topic: call function on all combinations of a list
Replies: 4
Views: 5240

call function on all combinations of a list

i'm creating a little physics engine which manages a list a of collidable objects. in order to calculate all occurring collisions i need to combine every item in the list with each other and check for the collision. to avoid NxN checks i want to take the first element and check it against the rest, ...
by hewih
Sat Feb 06, 2010 2:54 pm
Forum: Common Lisp
Topic: Newbie: How do I print/format?
Replies: 5
Views: 4620

Re: Newbie: How do I print/format?

you might also have a look at the Lisp HyperSpec about format (have fun :))
or the Common Lisp Quick Reference once you know what is possible with format and print
by hewih
Sat Feb 06, 2010 2:49 pm
Forum: Common Lisp
Topic: "what will happen when i do..."
Replies: 9
Views: 13372

Re: "what will happen when i do..."

thx for your responses (btw Ramarren: it takes you an average of 40min to respond... i checked it :)) i'm more interested in the overall performance traps you can walk into. for example in some languages the tell you to be aware of not creating temporary objects all the time, because the have to be ...
by hewih
Tue Feb 02, 2010 9:18 am
Forum: Common Lisp
Topic: "what will happen when i do..."
Replies: 9
Views: 13372

"what will happen when i do..."

i really like Lisp because it allows me to develop everything in the purest way possible. with all this white magic - like higher-order functions and macros - you can to pretty neat stuff. sometimes i wonder however what will happen to memory and performance when i cast some of this spells. in OOP f...
by hewih
Sun Jan 31, 2010 11:13 am
Forum: Common Lisp
Topic: [resolved] access old value in cells
Replies: 2
Views: 3506

Re: access old value in cells

thx! ^^
by hewih
Sun Jan 31, 2010 8:44 am
Forum: Common Lisp
Topic: [resolved] access old value in cells
Replies: 2
Views: 3506

[resolved] access old value in cells

i have a rule evaluated cell which should only change it's value in certain cases and in some it should just stay the same. (in-package :cells) (cells-reset) (defmodel test () ((cell1 :initarg :cell1 :accessor cell1-of) (eph1 :cell :ephemeral :initform (c-in NIL) :accessor eph1-of) )) (defparameter ...
by hewih
Sat Jan 23, 2010 4:15 pm
Forum: Common Lisp
Topic: Why does taking out nil break this code segment?
Replies: 10
Views: 11527

Re: Why does taking out nil break this code segment?

in if you can only have 1 form for then and 1 form for else . the other way around, how would Lisp know which form belongs to then and which to else (if (null lst) (format T "then") (format T "else") ) (if (null lst) (format T "then") (format T "else") (format...