Search found 209 matches

by Jasper
Tue May 18, 2010 7:55 am
Forum: The Lounge
Topic: functions and variable?
Replies: 7
Views: 13521

Re: functions and variable?

In Scheme, the namespace of the variables holding functions are the same as that of the regular variables, in CL it isn't. But (define zero-arguments () stuff) zero-arguments won't presumably won't evaluate, just returns the function, as it should, because that is what it is. I think that is what he...
by Jasper
Sat May 15, 2010 8:53 am
Forum: Common Lisp
Topic: Only in Lisp
Replies: 43
Views: 41731

Re: Only in Lisp

Special vars: (let ((*special-variable* something else)) (any-program-using-that)) ;Feeding arguments to a program by non-destructive changing of its variables. You can look at it as adding then as arguments everywhere. Also useful if you have a recursive function and values are passed unchanged a l...
by Jasper
Fri May 14, 2010 8:54 am
Forum: Common Lisp
Topic: Only in Lisp
Replies: 43
Views: 41731

Re: Only in Lisp

Never mind this, but imo 'natural reasoning' doesn't really have too much to do with how you denote it, and how mathematicians denote things isn't always particularly natural. Edit: It's convenient on paper and such, but it remains just notation. One feature that doesn't seem mentioned enough is spe...
by Jasper
Thu May 13, 2010 12:04 pm
Forum: Common Lisp
Topic: play with picture
Replies: 4
Views: 4782

Re: play with picture

You are completely right, by deriving and making an INITIALIZE-INSTANCE which subsequently uses CONFIGURE as needed based on keyword arguments would do it.(This is also very neat to do with the other cl gui libs) Still, if it isn't in some library, one has to wonder if a lot of duplication is being ...
by Jasper
Thu May 13, 2010 6:24 am
Forum: Common Lisp
Topic: play with picture
Replies: 4
Views: 4782

Re: play with picture

You need a library that allows you to make guis or draw/user input. There are lots of bindings for CL that could do this. Which you choose depends on what you want. Personally i prefer CLG for gui, and Lispbuilder-SDL (with cl-opengl) for the other stuff. If you're using Able , Ltk is probably the e...
by Jasper
Wed May 12, 2010 3:09 am
Forum: Common Lisp
Topic: What little functions/macros do you use?
Replies: 23
Views: 31769

Re: What little functions/macros do you use?

Those look like good ones. I am a little annoyed at times by INTERN too, for instance, it is annoying that you cant just re-intern symbols, you have to get symbol-name all the time. Same for the package, you can't just refer to it with a string/symbol, you have to get the actual package. CL sometime...
by Jasper
Sat May 08, 2010 1:43 pm
Forum: Common Lisp
Topic: Multiple ways of doing things
Replies: 4
Views: 6254

Re: Multiple ways of doing things

keyword-macro, should at least be fairly obvious, it does exactly what defmacro does, but binds it after (keyword-macro bound-to ....) (it is useless, it's point it to show how it can vary, there are less useless variations) I didn't specify how the last way, going via a renamed function, works, but...
by Jasper
Fri May 07, 2010 8:20 pm
Forum: Common Lisp
Topic: Multiple ways of doing things
Replies: 4
Views: 6254

Multiple ways of doing things

For some things i noticed multiple ways of doing things: Allowing the user to define 'a type of function' this might be some kind of macro that allows for things inside to be defined you have various approaches: Via methods . (defgeneric keyword-macro-gen (name form)) (defmacro def-keyword-macro (na...
by Jasper
Fri May 07, 2010 7:26 pm
Forum: The Lounge
Topic: Average Lisp age?
Replies: 36
Views: 485822

Re: Average Lisp age?

I am 25. I learned lisp when looking for better languages after feeling restricted with Cs, and C++s compiler whinage. An article about code=data and XML pushed me to learn lisp. However, i do feel that the barrier between languages is often an rather arbitrary one. We can already import C very stra...
by Jasper
Sat May 01, 2010 6:27 pm
Forum: Common Lisp
Topic: Deriving classes from two, both derived from one same class
Replies: 4
Views: 6612

Re: Deriving classes from two, both derived from one same class

Ok, good to know you can do what C wants that way. You mean making the class-C not to have some specific slots from class-A or class-B? Actually i meant that A has some generic functions, and both B and A+ override it for their classes. Then one might want to be able to use both the method for B and...