Search found 98 matches

by JamesF
Mon Oct 11, 2010 6:46 pm
Forum: Common Lisp
Topic: How to handle large prgrams in LISP
Replies: 6
Views: 8970

Re: How to handle large prgrams in LISP

There's not really a canonical way of doing it. Personally, I tend to start with a single file, then ASDF-ify it when it starts looking like a real application. Once things get to the point where a single file is unwieldy, I split it into two or more files along whatever lines appear most logical at...
by JamesF
Tue Oct 05, 2010 9:20 pm
Forum: Common Lisp
Topic: Assign values to multiple variables
Replies: 4
Views: 4785

Re: Assign values to multiple variables

Nomiz, Your formatting suggests you're trying to apply a C-style solution in lisp, which can be done, but isn't such a good idea. When on ice, you're better off with skates :) Rather than try to debug what may be a valiant struggle in the wrong direction, what problem are you actually trying to solv...
by JamesF
Tue Jul 27, 2010 12:58 am
Forum: Common Lisp
Topic: Image-based development in Lisp
Replies: 5
Views: 5313

Re: Image-based development in Lisp

From the little I've had to do with Smalltalk, I think they have very different models. Lisp isn't really image-oriented; you compile and load source files. You can dump an image to disk and reload it later, but (at least in SBCL) that's more of an interesting artefact and a delivery mechanism than ...
by JamesF
Mon Mar 22, 2010 4:10 pm
Forum: Common Lisp
Topic: CL-USER> is unbound
Replies: 8
Views: 22171

Re: CL-USER> is unbound

It tells me that the CL-USER> variable is unbound. I'm not sure how to make the variable...bound? Can anyone tell me how to fix this? Thanks. It would help if you posted the code in question, so that we can see what CL is trying to evaluate. At a guess, you've taken the example a bit too literally ...
by JamesF
Mon Mar 22, 2010 4:04 pm
Forum: Common Lisp
Topic: include, kinda C style?
Replies: 8
Views: 7412

Re: include, kinda C style?

Sorry if this sounds obvious, but isn't this the problem that ASDF solves? It may not be a perfect solution, but it does a pretty good job.
by JamesF
Tue Mar 16, 2010 8:06 pm
Forum: Common Lisp
Topic: Get a column as a list
Replies: 6
Views: 5877

Re: Get a column as a list

MrCode wrote:How can I get a list with the contents of the nth column?
With a cunning combination of mapcar and nth :)
by JamesF
Tue Mar 16, 2010 8:05 pm
Forum: Common Lisp
Topic: Compiling to binary
Replies: 10
Views: 10917

Re: Compiling to binary

From this, my conclusion is that the lisp programs most of the time are runned from inside the lisp enviroment/repl and that if i don't have any very specific reason to create a standalone executable it's not worth doing/no need. This is exactly correct: think of it as being like a JVM that you can...
by JamesF
Sun Feb 21, 2010 9:25 pm
Forum: Common Lisp
Topic: How to write one's own remove-duplicates?
Replies: 4
Views: 4390

Re: How to write one's own remove-duplicates?

To add a late hint or two: as smithzv pointed out, remove-duplicates should return a new list. While strict functional style discourages you from destructively modifying data structures, in practice there's no problem with a function modifying a structure that it has created and that won't be modifi...
by JamesF
Mon Feb 15, 2010 4:50 am
Forum: Common Lisp
Topic: I dont get Macros
Replies: 31
Views: 40786

Re: I dont get Macros

The more important point is that I dont mind writing extra code as long as I dont need to think. This is the point at which I channel the late Erik Naggum and politely suggest that Lisp probably isn't for you. The value of Lisp (macros, first-class functions and all the rest) is precisely in invest...
by JamesF
Thu Feb 11, 2010 11:06 pm
Forum: Common Lisp
Topic: Defining a lexically scoped function.
Replies: 12
Views: 9157

Re: Defining a lexically scoped function.

It might be best to back up a bit: this whole discussion has been about implementation details. What is it that you're trying to do? It may be that you're unwittingly trying to write Javascript in Lisp; while that can be done if you really must, the languages are pretty wildly different - the JS app...