Search found 96 matches

by dmitry_vk
Thu Jul 02, 2009 12:02 pm
Forum: The Lounge
Topic: Scientific Computing in Lisp
Replies: 1
Views: 3624

Re: Scientific Computing in Lisp

For number crunching, SBCL is the best choice, as far as I know. It has good compiler that optimizes away a lot of overhead (mostly because SBCL does fair amount of static analysis of code including type inference) and (with proper declarations) can approach the level of hand-written C code. The bes...
by dmitry_vk
Fri Jun 19, 2009 5:06 am
Forum: The Lounge
Topic: RSS feed
Replies: 25
Views: 24000

Re: RSS feed

Harleqin wrote: - Reading a page into a string should be possible much easier.
The easy way is to use DRAKMA.

Code: Select all

(drakma:http-request uri)
will return you a string (http-request has _a lot_ of options, it can return not just strings).
by dmitry_vk
Fri May 15, 2009 1:03 pm
Forum: Common Lisp
Topic: thoughts on CL project organization
Replies: 4
Views: 3929

Re: thoughts on CL project organization

Some function grovels over all folders, collection *.asd and adding each folder that has a *.asd on the asdf:*central-registry*. It is possible to write custom system-definition search function (function that takes system name and returns the file), and then push it into asdf:*system-definition-sea...
by dmitry_vk
Tue May 12, 2009 4:13 am
Forum: Common Lisp
Topic: Clozure Lisp CGI Programming
Replies: 19
Views: 27491

Re: Clozure Lisp CGI Programming

To check that you have permission issuses or not, you can run ccl under the www-data user:

Code: Select all

sudo -u www-data /path/to/index.cgi
by dmitry_vk
Fri May 08, 2009 8:43 am
Forum: Common Lisp
Topic: Archaic Code Contest in Common Lisp
Replies: 14
Views: 10530

Re: Archaic Code Contest in Common Lisp

As an idea for a secure interpreter, how about create a checking program/function/macro that checks to see if the submitted code contains any 'non-secure' function/macro calls? That might :?: be easier than trying to saw off big chunks of lisp. How about that? (let ((x "SOME-UNAUTHORIZED-FUNCTION")...
by dmitry_vk
Mon May 04, 2009 12:58 pm
Forum: Common Lisp
Topic: Coerce bidimensional array into list
Replies: 2
Views: 2062

Re: Coerce bidimensional array into list

I know I can use the coerce function to make a list from a given array, However, when I give it a multidimensional array I get a list of all elements. Is there any "easy way" to get ((1 2) (3 4)) from #((1 2) (3 4))? Thanks in advance. ;) You can use :initial-contents keyword argument for make-arra...
by dmitry_vk
Mon Apr 20, 2009 1:18 pm
Forum: Common Lisp
Topic: Get source of a website
Replies: 4
Views: 1750

Re: Get source of a website

There is a simpler way to get the data out of wikipedia: 1) There are dumps of database available for download at http://download.wikimedia.org/ . You can import them into database and query the database. As a benefit, it will be simpler to parse, because text is in wiki markup, not in html markup 2...
by dmitry_vk
Mon Apr 20, 2009 1:10 pm
Forum: Common Lisp
Topic: Get source of a website
Replies: 4
Views: 1750

Re: Get source of a website

You could use http://www.weitz.de/drakma/ . Example: (defvar *wiki-main-page* (drakma:http-request "http://en.wikipedia.org/")) (subseq *wiki-main-page 0 1000) => "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html xmln...
by dmitry_vk
Mon Apr 13, 2009 9:33 pm
Forum: Common Lisp
Topic: The Future of Lisp
Replies: 25
Views: 19576

Re: The Future of Lisp

Does anyone here know enough about C# and LINQ to know whether the syntactic sugar that they added was something that anyone could add in their own back yard (a la using Lisp macros), or whether the C# designers had to add it as a specific new feature in the C# compiler? LINQ is a compiler feature....
by dmitry_vk
Mon Mar 30, 2009 9:34 am
Forum: Common Lisp
Topic: newbie help
Replies: 2
Views: 2605

Re: newbie help

Write it like this:

Code: Select all

(defun it (n &rest values)
  (loop
     for y in values
     repeat n
     do (print y)))