Search found 98 matches

by JamesF
Fri Oct 12, 2012 12:39 am
Forum: Common Lisp
Topic: replace string with another
Replies: 2
Views: 3086

Re: replace string with another

You seem to be a little confused about the datatypes you're handling here. Those are lists of symbols, with no strings involved (strings are delimited by double-quotes), and you really should read the note in the hyperspec (http://www.lispworks.com/documentation/HyperSpec/Body/s_quote.htm#quote) abo...
by JamesF
Thu Sep 13, 2012 1:01 am
Forum: Common Lisp
Topic: Antireader macros
Replies: 14
Views: 15795

Re: Antireader macros

Just spinning my wheels here, what about defining a type or class that's instantiated when the reader encounters curly-braces, possibly a subclass/subtype of list, and specialising print-object on that type/class? Note: this is based on exactly zero fact-checking, combined with a sketchy grasp of CL...
by JamesF
Thu Jul 05, 2012 1:29 am
Forum: Common Lisp
Topic: OR between list elements
Replies: 13
Views: 10781

Re: OR between list elements

Sorry if I gave offense; we do get a small but regular stream of people trying to outsource their homework assignments, and it's pretty unusual that a problem requires a specific function or operator, so I may have leapt to a conclusion. You've explained the solution that you're trying to apply and ...
by JamesF
Thu Jul 05, 2012 12:36 am
Forum: Common Lisp
Topic: OR between list elements
Replies: 13
Views: 10781

Re: OR between list elements

Sorry, I should have been clearer. It looks like you've settled on this as the solution to whatever problem you're solving, and you're now asking for help with implementing it. We can see that you're having trouble with the use of #'or, but I'm asking what higher problem you're trying to solve by ap...
by JamesF
Wed Jul 04, 2012 5:59 am
Forum: Common Lisp
Topic: OR between list elements
Replies: 13
Views: 10781

Re: OR between list elements

What's the actual problem you're trying to solve? There may be a better tool for the job; CL is like Unix - it's been around for long enough that there's usually something built-in that does what you need.
by JamesF
Tue Jun 26, 2012 12:49 am
Forum: Common Lisp
Topic: Problem in COND
Replies: 5
Views: 2552

Re: Problem in COND

The problem is that you're using the wrong comparator. Try 'equal' or 'equalp' instead of '='.
by JamesF
Fri May 18, 2012 8:26 am
Forum: Common Lisp
Topic: Interest in a Lisp CMS?
Replies: 16
Views: 8782

Re: Interest in a Lisp CMS?

How is this project coming? I am very interested in trying it out, even as just a jumping off point for my own work. Unfortunately, it got slightly derailed by a few factors. I had to drastically cut the scope of the online stores a while ago, because other commitments limited the amount of time I ...
by JamesF
Thu Dec 15, 2011 9:15 pm
Forum: Common Lisp
Topic: Lisp
Replies: 9
Views: 9197

Re: Lisp

OK. The answer to your first question is yes. The answer to the second question is also yes, though it's entirely possible that asm would allow you to hand-optimise things a little more tightly than any of the other three. The third is a matter of opinion, and I personally haven't tried C++ or asm, ...
by JamesF
Wed Aug 31, 2011 1:17 am
Forum: Common Lisp
Topic: Mapping a different syntax to Lisp
Replies: 10
Views: 5350

Re: Mapping a different syntax to Lisp

Your enthusiasm is commendable, but the quiet reception is because this is a recurrent meme: newcomers regularly try to "fix" what they see as a shortcoming in the language. Unfortunately, it ultimately makes about as much sense as "fixing" C by grafting on a prefix notation layer to make it more fa...
by JamesF
Tue Jun 21, 2011 11:04 pm
Forum: Common Lisp
Topic: Reading formatted data
Replies: 13
Views: 4455

Re: Reading formatted data

You're correct that there's no "standard" system or library for doing this in Common Lisp, which suggests that it's not a problem to which the language is often applied. I'm afraid that the best way I can suggest is to use read-line, then split the lines into their columns with something like cl-ppc...