Search found 10 matches

by metageek
Thu Dec 18, 2008 7:22 am
Forum: Common Lisp
Topic: changing argument variables
Replies: 10
Views: 11147

Re: changing argument variables

LispProgrammer wrote:How can I make it so that so that the value of y is changed to 6???
If you're doing this because you want to return multiple values (that being a common use case for pass-by-reference in C++), try (values) instead.
by metageek
Fri Oct 31, 2008 6:31 am
Forum: Common Lisp
Topic: Lisp and Regex
Replies: 7
Views: 8916

Re: Lisp and Regex

you can use cl-ppcre, a portable regexp library for lisp: http://www.weitz.de/cl-ppcre/ It probably won't matter for this usage, but it's important to note that PCRE stands for Perl-Compatible Regular Expression, and Perl's regular expressions are not regular expressions in the formal sense. This m...
by metageek
Mon Oct 27, 2008 5:42 am
Forum: Common Lisp
Topic: How can I rewrite the function APPLY without using APPLY?
Replies: 12
Views: 16236

Re: How can I rewrite the function APPLY without using APPLY?

smithzv wrote:If it is not a special operator, doesn't that mean that it should be representable in terms of special operators?
No. There's nothing that says that builtins have to be special forms. Being a special form just means it doesn't use the default evaluation rule.
by metageek
Wed Oct 08, 2008 11:46 am
Forum: The Lounge
Topic: What feature would you most like to see in Lisp?
Replies: 43
Views: 48114

Re: What feature would you most like to see in Lisp?

Certainly not a pipe-dream. You need a C header parser like cparse (http://common-lisp.net/project/cparse/), and the FFI ofcourse. From there you should be able to do something like (printf ...). Another approach might to load a DSO and look for C++ functions; with C++ name mangling, you could prob...
by metageek
Thu Sep 18, 2008 11:47 am
Forum: Common Lisp
Topic: The Future of Lisp
Replies: 25
Views: 23004

Re: The Future of Lisp

Intel has already shown 80-core test chips, albeit not with full x86 cores. But I have had personal discussions with Intel architects that say that tens of cores is certainly right around the corner. You don't need personal discussions for that: Larrabee is tentatively expected to have 24 x86-64 co...
by metageek
Thu Aug 28, 2008 6:38 am
Forum: Common Lisp
Topic: with-open-file problem of sbcl
Replies: 12
Views: 14528

Re: with-open-file problem of sbcl

A simpler test case:

Code: Select all

(let
    ((f (open #P"/sys/class/net/eth0/statistics/rx_bytes" :direction :input)))
  (read-char f))
This hangs for me, which shows that the bug isn't tied specifically to (with-open-file) or (read).
by metageek
Fri Aug 22, 2008 7:43 am
Forum: Common Lisp
Topic: Multi-core utilization in SBCL
Replies: 7
Views: 10149

Re: Multi-core utilization in SBCL

I don't know SBCL threading specifically, but here's some sorts of things that you could run into in any threading environment: Your task may be I/O-bound instead of CPU-bound (that is, it spends most of its time waiting for, say, disk access). You may have too-large locks, which wind up serializing...
by metageek
Mon Aug 04, 2008 8:41 am
Forum: Common Lisp
Topic: Best program to use lisp on?
Replies: 17
Views: 22560

Re: Best program to use lisp on?

Or, for a more functional approach, there's:

Code: Select all

(defun price-order-total (item-list)
(apply #'+ (mapcar #'third item-list)))
by metageek
Fri Jul 25, 2008 8:57 am
Forum: Common Lisp
Topic: Does Common Lisp need a better type system?
Replies: 14
Views: 25253

Re: Does Common Lisp need a better type system?

Whenever I read anything about type systems on Lambda the Ultimate or other more theoretically-oriented sites, my eyes just glaze over and and I start drooling. Well, yeah. That's because LtU people are off in the future, working on type systems that have powerful capabilities, but haven't yet been...
by metageek
Fri Jul 25, 2008 8:43 am
Forum: Common Lisp
Topic: Programming Style & (eval ...)
Replies: 17
Views: 22915

Re: Programming Style & (eval ...)

And quite possibly on 64 bit systems this would be even higher Yes: it's 1152921504606846975 (still in SBCL). That's (2^60)-1, a little over 1 quintillion. I suppose a 64-bit machine could have enough memory to have that many arguments...but not this year. (Let's see, assume each argument takes one...