Search found 538 matches

by nuntius
Sun Jun 08, 2014 5:08 pm
Forum: Common Lisp
Topic: Disable compiler warnings for special variables
Replies: 3
Views: 5152

Re: Disable compiler warnings for special variables

Just be careful. SBCL warnings are generally quite helpful.

Given your goals, the best way to clear the warnings is to declare the variables in the function definition.

Code: Select all

(defun some-special-function ()
  (declare (special *special-variable*))
  (do-something-with *special-variable*))
by nuntius
Thu Apr 10, 2014 3:52 pm
Forum: Common Lisp
Topic: Best way to do GC in Lisp/CFFI
Replies: 3
Views: 4273

Re: Best way to do GC in Lisp/CFFI

You probably heard about "finalizers". Here's a couple top links on the subject. http://pinterface.livejournal.com/40614.html https://github.com/Balooga/Simple-Finalizer Finalizers involve some interesting tradeoffs. C/C++ libraries are often written assuming strict, often lexically-scoped object li...
by nuntius
Wed Apr 02, 2014 8:00 am
Forum: Common Lisp
Topic: Creating 2D array in CFFI and Lisp
Replies: 2
Views: 3856

Re: Creating 2D array in CFFI and Lisp

You may have a misunderstanding about how arrays work in C/C++. Consider the following example. int32_t x[2][3][4]; int32_t *y=&x[0][0][0]; When the compiler sees "int32_t x[2][3][4];", it allocates a single block of memory for 2*3*4*sizeof(int32_t)=96 bytes. The integer at x[0][0][1] is at address ...
by nuntius
Sun Mar 30, 2014 9:30 am
Forum: Common Lisp
Topic: defining a variable inside a Defun
Replies: 2
Views: 3761

Re: defining a variable inside a Defun

It sounds like you are measuring the time to allocate, initialize, and free the "val" parameter a million times. Is the following what you are looking for? (defun test () (let ((arr (foreign-alloc :float :initial-contents '(1 2 3)))) (dotimes (i 1000000) (%c-arr-to-vector-float arr 3))))
by nuntius
Sat Mar 22, 2014 5:02 pm
Forum: Common Lisp
Topic: Preserve the case of cons cell data
Replies: 6
Views: 7483

Re: Preserve the case of cons cell data

nuntius: Lingua Romana, http://en.wiktionary.org/wiki/nuntius

Please don't shoot me. ;)
by nuntius
Sat Mar 22, 2014 4:03 pm
Forum: The Lounge
Topic: Lisp in erlang or erlang in lisp?
Replies: 1
Views: 5115

Re: Lisp in erlang or erlang in lisp?

All languages can be made slow, and many languages can be made fast. Algorithm selection, overall structure, attention to general efficiency and special-case optimization (both CPU and memory) make a much bigger difference. Both fast and slow programs can be made in either C or CL. It sounds like yo...
by nuntius
Thu Mar 20, 2014 8:57 pm
Forum: Common Lisp
Topic: Preserve the case of cons cell data
Replies: 6
Views: 7483

Re: Preserve the case of cons cell data

What was the value of readtable-case when the symbols in the cons cells were read? Case changes happen early in the reader algorithm. The string handed to INTERN has already had case modifications. http://www.lispworks.com/documentation/HyperSpec/Body/02_b.htm If you don't want to modify the readtab...
by nuntius
Sun Mar 02, 2014 8:54 pm
Forum: The Lounge
Topic: Moderated Postings
Replies: 1
Views: 4413

Re: Moderated Postings

Hi janeTA, As the most active moderator on this board, I apologize for the problems you have had. (I also apologize to everyone else who was stuck in the moderation queue for the past week or two.) I rejected your original post because it seemed to fit squarely in the "advertising for another site" ...
by nuntius
Sun Mar 02, 2014 8:44 pm
Forum: Common Lisp
Topic: First Posting Is Moderated for Spam Control
Replies: 1
Views: 249324

Re: First Posting Is Moderated for Spam Control

Here are some guidelines for a good first post. * Follow general netiquette. (e.g. other forum guidelines and stuff like http://www.catb.org/~esr/faqs/smart-questions.html) * Demonstrate either knowledge of or interest in learning Lisp. (i.e. not "I like X. Oh, and Lisp!") * Try to establish credibi...
by nuntius
Mon Feb 17, 2014 6:59 am
Forum: Emacs
Topic: Off-the-shelf CL literate programming setup
Replies: 1
Views: 6270

Re: Off-the-shelf CL literate programming setup

Send an email to Alex Plotnick. He has been exploring LP for a good while and even wrote CLWEB.

Tim Daly is the other champion of LP that I can think of (visit axiom-developer.org).