Search found 96 matches

by dmitry_vk
Wed Jan 07, 2009 12:46 am
Forum: Common Lisp
Topic: Problems with allegro express and slime
Replies: 7
Views: 4687

Re: Problems with allegro express and slime

Paul Donnelly wrote:
janders468 wrote:Thanks, Out of curiosity what is clc (evil or otherwise)?
It's common-lisp-controller, a tool for installing packages on Debian and Gentoo systems. The idea is to make things easier, but I guess it's not as easy as all that.
Gentoo has not been using clc for a long time. It's using only asdf now.
by dmitry_vk
Tue Dec 30, 2008 5:33 am
Forum: Common Lisp
Topic: A "declare" form returned by macro
Replies: 19
Views: 12771

Re: A "declare" form returned by macro

TPJ wrote:how can I define syntax for (decltype (fixnum var*))?
The thing is that you do not need define this syntax. You can just use (declare (type fixnum var*)) (details at http://www.lispworks.com/documentation/ ... d_type.htm).
by dmitry_vk
Mon Dec 29, 2008 11:06 pm
Forum: Common Lisp
Topic: Optimizing simple integer-arithmetic
Replies: 3
Views: 4531

Re: Optimizing simple integer-arithmetic

As far as I know, most processors are calculating sums and products directly modulo 2^n for some n, i.e. x86 modulo 2^32. This would be sufficient for my purposes (and it would certainly be faster). Specifying (integer -10000 10000) or fixnum seems not to be enough. I read http://www.sbcl.org/manua...
by dmitry_vk
Sat Dec 13, 2008 12:11 am
Forum: Common Lisp
Topic: Looking for good examples of Lisp macros
Replies: 6
Views: 6864

Re: Looking for good examples of Lisp macros

There is an ITERATE macro that adds powerful looping capability into the language. If audience is familiar with .NET, it may be interesting to show how LINQ-like language may be implemented with macros. Small usages are CFFI that has macros to define some C type and means to access them. In a hypoth...
by dmitry_vk
Mon Dec 08, 2008 6:41 am
Forum: Common Lisp
Topic: Choose numbers at random
Replies: 14
Views: 11082

Re: Choose numbers at random

Keep in mind, that one will have to iterate over the list twice, once to get its length, and once to get the random element (apologies if you know this already). It's probably fine for your purposes, but if it seems slower than it should be, consider either not using a list or storing the list leng...
by dmitry_vk
Mon Dec 01, 2008 10:28 pm
Forum: Common Lisp
Topic: changing argument variables
Replies: 10
Views: 9015

Re: changing argument variables

And what if the argument you pass to HELLO isn't a variable? The most intuitive thing to do is to treat the argument as the «place» (generalized reference, see http://www.lispworks.com/documentation/HyperSpec/Body/05_aa.htm). E.g., (hello (car x)) should change the car of x, (hello (slot-value so...
by dmitry_vk
Mon Dec 01, 2008 8:06 am
Forum: Common Lisp
Topic: changing argument variables
Replies: 10
Views: 9015

Re: changing argument variables

if I have a function like.... (defun hello (x) (setf x 6) ) and then I ran... (setf y 3) (hello y) How can I make it so that so that the value of y is changed to 6??? In Lisp, you can't pass the variable by reference, you can only pass the value (which might itself be a reference). You can wrap the...
by dmitry_vk
Mon Nov 24, 2008 10:40 am
Forum: Common Lisp
Topic: Dll Files
Replies: 2
Views: 3579

Re: Dll Files

I don't know if this belongs in this section, but does anyone know how to access the functions associated with a dll file imported using cffi? Is there a lisp package to do that, or would i have to write a program to parse the dll format automatically, or what? Thx! 8-) There are some options. Firs...
by dmitry_vk
Mon Nov 10, 2008 1:03 pm
Forum: Common Lisp
Topic: Is there any Library for Feed-Parsing
Replies: 6
Views: 5274

Re: Is there any Library for Feed-Parsing

There is a cl-rss package in gentoo and debian.
by dmitry_vk
Sun Nov 09, 2008 12:25 pm
Forum: Common Lisp
Topic: Labyrinth:how to find the path?
Replies: 6
Views: 7092

Re: Labyrinth:how to find the exit?

yep you are right ....I need a path ... Could you explaine how to build from this list:((1 2) (2 4) (IN 1) (IN 3) (1 3) (4 5) (5 OUT)) correct graph? In this list you have all the edges of a graph. So this list one of the ways to represent the graph. When you do a breadth-first search, the only thi...