Search found 85 matches

by marcoxa
Fri May 16, 2014 1:31 am
Forum: Common Lisp
Topic: How do I define a keyword as a integer constant?
Replies: 14
Views: 26308

Re: How do I define a keyword as a integer constant?

How would I fix emacs highlighting to see constants highlighted...also the package prefixes aren't getting highlighted e.g. gc:test, the gc: is the same color as "test" Well, well, well... I don't know. I just know it is possible. The only enlightened and wise answer is thus: RTFM (either...
by marcoxa
Mon May 12, 2014 5:13 am
Forum: Common Lisp
Topic: How do I define a keyword as a integer constant?
Replies: 14
Views: 26308

Re: How do I define a keyword as a integer constant?

You mentioned "You cannot. There is no "direct" way to associate a "value" to a keyword without some indirection" is there a way inolving redirection that would be under .10 seconds per million iterations...I could sure use an example I go by the maxim "first get ...
by marcoxa
Mon May 12, 2014 12:48 am
Forum: Common Lisp
Topic: How do I define a keyword as a integer constant?
Replies: 14
Views: 26308

Re: How do I define a keyword as a integer constant?

I just like the way the keywords look(:char-max) as opposed to this +char-max+. Especially since they are highlighted. I'm not sure I understood this " What is the problem of using a constant that you initialized at the proper value throughout your code?" "Looks" are deceiving. ...
by marcoxa
Sun May 11, 2014 1:18 pm
Forum: Common Lisp
Topic: How do I define a keyword as a integer constant?
Replies: 14
Views: 26308

Re: How do I define a keyword as a integer constant?

Well, by now we all know that you are wrapping a C++ library. What is the problem of using a constant that you initialized at the proper value throughout your code?

Cheers
--
MA
by marcoxa
Sun May 11, 2014 1:21 am
Forum: Common Lisp
Topic: How do I define a keyword as a integer constant?
Replies: 14
Views: 26308

Re: How do I define a keyword as a integer constant?

You cannot. There is no "direct" way to associate a "value" to a keyword without some indirection.

Keywords are keywords. Period.

The question is what are you trying to do.

Cheers
--
MA
by marcoxa
Sat May 10, 2014 12:21 pm
Forum: Common Lisp
Topic: How do I define a keyword as a integer constant?
Replies: 14
Views: 26308

Re: How do I define a keyword as a integer constant?

You want..... shameless plug....

http://defenum.sourceforge.net

Cheers

MA
by marcoxa
Sat May 10, 2014 12:18 pm
Forum: Common Lisp
Topic: What is the fastest way to convert a Lisp vector to a list
Replies: 2
Views: 6231

Re: What is the fastest way to convert a Lisp vector to a li

I would just use COERCE. But then.... why do you need this? I presume not for performance....

Cheers
--
MA
by marcoxa
Thu Apr 10, 2014 12:11 pm
Forum: Common Lisp
Topic: Best way to do GC in Lisp/CFFI
Replies: 3
Views: 6934

Re: Best way to do GC in Lisp/CFFI

Another way to do it (gc on the C++ side) is to link in the Bohem GC and stop worrying. http://www.hboehm.info/gc/

Cheers
--
MA
by marcoxa
Fri Apr 04, 2014 3:00 am
Forum: Common Lisp
Topic: ASDF: How do I choose which nicknames is displayed on REPL
Replies: 2
Views: 5330

Re: ASDF: How do I choose which nicknames is displayed on RE

This is not an ASDF issue. It is a package and implementation dependent issue.

It appears that some implementations prefer the shortest package nickname to use in the prompt. You just have to dig out the relevant configuration bit for your implementation(s). In any case YMMV.

Cheers

MA
by marcoxa
Sun Jan 05, 2014 7:46 am
Forum: Common Lisp
Topic: Structs pointing to each other, stack overflow
Replies: 5
Views: 9696

Re: Structs pointing to each other, stack overflow

You do all ok, stack overflow is just as lisp tries to print your circular graph of structures. Set *print-circle* to t and all would work. Answer by edgar-rft is wrong. Yep. budden73 is perfectly right. The problem is the "printing". Nothing to do with the structures setup. Doing cl-prom...