Search found 271 matches

by Goheeca
Fri Aug 21, 2015 11:37 am
Forum: Common Lisp
Topic: Variable reference in structures
Replies: 18
Views: 46000

Re: Variable reference in structures

There are other possibilities, you can write a macro which would cover the combinations or create your own subclass of generic-function * which would deal with the arguments by sorting of those or whatever. I'd like just to point out another angle of view. * With the help of MOP and closer-mop is th...
by Goheeca
Fri Aug 21, 2015 3:49 am
Forum: Common Lisp
Topic: Variable reference in structures
Replies: 18
Views: 46000

Re: Variable reference in structures

Well, don't avoid anything, you'll just use it anyway in a limited way (as "singlemethods") most of the time so let yourself make a decision later on (per project/module). The thing is that Java implements OOP in its own way and from it follows that there are Java specific design patterns,...
by Goheeca
Fri Aug 21, 2015 1:09 am
Forum: Common Lisp
Topic: Overriding describe
Replies: 4
Views: 11947

Re: Overriding describe

You are looking for describe-object.
by Goheeca
Wed Aug 19, 2015 5:37 am
Forum: Common Lisp
Topic: Variable reference in structures
Replies: 18
Views: 46000

Re: Variable reference in structures

Well, look at this wiki page to differentiate the Java methods and CLOS methods. And look at this manifestation of CLOS flexibility.
by Goheeca
Wed Aug 19, 2015 5:20 am
Forum: Common Lisp
Topic: To merge new symbols in macros
Replies: 6
Views: 14923

Re: To merge new symbols in macros

That can be simplified to: (defun symbol-from-items (&rest items) (intern (format nil "~:@(~{~a~^-~}~)" items))) (symbol-from-items 1 2 3 'hello "kitty") => 1-2-3-HELLO-KITTY I've created an read-time template library and with that it should be straightforward to do this symb...
by Goheeca
Sat Aug 15, 2015 2:10 pm
Forum: Common Lisp
Topic: how use libraries without QL
Replies: 3
Views: 10014

Re: how use libraries without QL

Well, back in the day I was using: (asdf:oos 'asdf:load-op :system) ;or (asdf:operate 'asdf:load-op :system) because of this site (I'm going to fix that and add the load-system option). When I was writing that gist I didn't like the tardiness of writing the aferomentioned asdf part and used require ...
by Goheeca
Fri Aug 14, 2015 10:38 am
Forum: Common Lisp
Topic: how use libraries without QL
Replies: 3
Views: 10014

Re: how use libraries without QL

You can load Quicklisp by yourself and then load the given library: ;;; The following lines added by ql:add-to-init-file: #-quicklisp (let ((quicklisp-init (merge-pathnames "qkcl/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) Looking to my ...
by Goheeca
Sat Jul 25, 2015 2:31 am
Forum: Common Lisp
Topic: correct behaviour of nconc
Replies: 2
Views: 8370

Re: correct behaviour of nconc

By the description section in CLHS you apply 2nd and 3rd rules. [2] (nconc nil . lists) == (nconc . lists) [3] (nconc list) => list For your first code you apply the 3rd rule and The last list may be any object . That's: (nconc 1) => 1 For your second code you apply the 2nd rule then the 3rd one: (n...
by Goheeca
Thu Jul 02, 2015 8:38 am
Forum: Common Lisp
Topic: Creating a hash of hashes
Replies: 6
Views: 17506

Re: Creating a hash of hashes

There is another possibility: using a single hash-table and a multidimensional key. Having string keys, the default eql test is probably insufficient, you'd like to upgrade test function to equal and then you can reasonably use cons pairs as key as well. Or write own test function tailored to your k...
by Goheeca
Thu Jun 25, 2015 9:32 am
Forum: Common Lisp
Topic: Is there any decent GUI toolkit for MS Windows?
Replies: 13
Views: 37642

Re: Is there any decent GUI toolkit for MS Windows?

I can't tell, I've only used CommonQt. But after one brief glimpse, the CAPI is lacking native dialogs (eg. file chooser) and simple-tk has it.