Search found 20 matches

by jstoddard
Mon Apr 11, 2011 4:21 pm
Forum: Other Dialects
Topic: Which Lisp?
Replies: 3
Views: 13036

Re: Which Lisp?

Pick one and run with it; if you don't like it you can always switch later, and a lot of what you learned will still apply. I've been focusing my learning efforts on Common Lisp because it's big and flexible. It lets me program how I like. I do like recursion and elegant code, but I don't worship th...
by jstoddard
Fri Apr 01, 2011 8:32 am
Forum: The Lounge
Topic: Content Management System
Replies: 4
Views: 10994

Re: Content Management System

Emacs with SLIME, which is the same thing Lispbox gives you, I guess. As far as needing to learn Emacs better, I've been using Emacs for at least 13 years and I still need to learn it better. :D You can learn just what you need to get your work done, or you can try to experience more of what it has ...
by jstoddard
Thu Mar 31, 2011 7:37 am
Forum: The Lounge
Topic: What has Lisp done for you?
Replies: 3
Views: 8838

Re: What has Lisp done for you?

Lisp has reinvigorated my interest in programming. It has caused a "paradigm shift" in the way I look at programming. To get away from fancy terminology and into actual substance: Are you a better programmer? Yes, I think so. I don't think my programming style was bad, at least until I sta...
by jstoddard
Tue Mar 22, 2011 2:17 pm
Forum: Common Lisp
Topic: checking item from input list
Replies: 6
Views: 5979

Re: checking item from input list

[8]> (defun getInputTypeRead () (let ((inputSeq (read))) (cond ((EQ inputSeq nil) 0) ((not (eq (first inputSeq) 'bees)) 0) (T 1)))) GETINPUTTYPEREAD [9]> (getInputTypeRead) (bees are nice) 1 [10]> (getInputTypeRead) ("bees" are nice) 0 [11]> (getInputTypeRead) (hello world) 0 [12]> Odd; t...
by jstoddard
Tue Mar 22, 2011 12:16 pm
Forum: The Lounge
Topic: Content Management System
Replies: 4
Views: 10994

Content Management System

I threw together a minimalist content management system in Common Lisp using Hunchentoot and CLSQL. If interested you can find it at http://www.jeremiahstoddard.com/Projects/microcontent.html . It consists of a few hundred lines of not-so-elegant Lisp code -- give me a bit of a break there: It takes...
by jstoddard
Sun Mar 13, 2011 8:33 pm
Forum: Common Lisp
Topic: Please, I need some help
Replies: 2
Views: 3664

Re: Please, I need some help

I don't think anybody here will write the function for you (see the board's FAQ http://www.lispforum.com/viewtopic.php?f=2&t=869 ), but we can point you to what you need to know to write it. An association list is a list of conses -- see http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node153.html...
by jstoddard
Sun Mar 13, 2011 8:17 pm
Forum: Common Lisp
Topic: a very simple function
Replies: 3
Views: 4705

Re: a very simple function

One possible way to go about it would be to use reverse and push. Here's the descriptions of those:

http://www.lispworks.com/documentation/ ... revers.htm
http://www.lispworks.com/documentation/ ... m_push.htm

It shouldn't be too hard to work out the details...
by jstoddard
Sat Mar 12, 2011 8:25 am
Forum: Common Lisp
Topic: Escaping a string
Replies: 2
Views: 3250

Re: Escaping a string

Thanks; I guess it's a matter of I need to read more carefully. The "weird" behaviors are explained for each case -- or at least more or less (it doesn't entirely make sense that "\\0" is picked up since 0 is not a positive integer). Anyway, as long as I don't need to use any of ...
by jstoddard
Fri Mar 11, 2011 5:02 pm
Forum: Common Lisp
Topic: Escaping a string
Replies: 2
Views: 3250

Escaping a string

I've put together a function using the cl-ppcre package that escapes a string for insertion into a MySQL database. The function works perfectly, but I'd like to figure out why -- I had to place in more backslashes than I would have intuitively guessed. Since my head starts spinning when I try and tr...
by jstoddard
Wed Mar 09, 2011 3:31 pm
Forum: Emacs Lisp
Topic: Whats with the dot notation?
Replies: 2
Views: 10858

Re: Whats with the dot notation?

See http://www.gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html It's a Common Lisp book, not an Emacs Lisp book, but I think the concepts more or less apply. Basically (a . b) is called a cons cell -- a is the "car" and b is the "cdr". The cdr tends to b...