From: Tim X on
Tamas K Papp <tkpapp(a)gmail.com> writes:

> On Tue, 01 Jun 2010 14:03:35 +1000, Peter Axon wrote:
>
>> I am working my way through ANSI Common Lisp by PG. I am going slowly
>> and working through the exercises on paper and then on the computer as I
>> go. However I would like to write some actual programs to help me learn.
>
> I would just skip the paper part and go straight to the computer.
>
>> My question is: does anyone have any good ideas for some small to medium
>> programming projects that will help me learn CL? For example when I was
>> learning Perl I wrote a simple CLI todo list manager.
>
> Ideally, you should find a project that interests you. For example, I
> am interested in numerical methods, so I started coding them in CL.
> IMO Peter Seibel's Practical Common Lisp is a better into book than
> PG's, and can be found online. I walks you through several small
> projects, which might give you an idea.
>

Another alternative would be to re-implement your CLI todo list manager
in CL. You would be familiar with the functional requirements and
rpobably have some more ideas on how to do it better. It would also give
you a nice comparison. Just concentrate on the functionality and forget
about how you did it in perl.

Tim

--
tcross (at) rapttech dot com dot au
From: Peter Axon on
fortunatus <daniel.eliason(a)excite.com> writes:

> On Jun 1, 4:13 am, p...(a)informatimago.com (Pascal J. Bourguignon)
> wrote:
>> If you cannot imagine a couple of programs you would like to write
>> yourself, I'd be weary of your abilities as a programmer.  Programming
>> requires a certain amount of imagination...
>
> Cut the poor guy some slack! ;-> He did the little personal manager
> for PERL, didn't he?

Thanks fortunatus :) I asked because Lisp is quite foriegn to me and I
was wondering if there were particular projects that would be suited to
learning its peculiarities.

> Besides, the scientific method begins with gathering as many
> possibilities as practical, including the investigator's own thoughts,
> but very importantly including sources external to the investigator,
> to open the door to new ideas!
>
> Project Ideas:
>
> When I was starting to learn CL & Scheme, I wrote some recursive-
> descent parsers to evaluate infix arithmetic expressions. I found the
> "muliple value" capabilities of function returns elegant: the first
> value brought back success/fail of sub-expression parse, the second
> value brought back the numerical result of the sub-expression if
> parsing was successful.
>
> One of the first truly useful programs I did was a simulator of
> mortgage amortization, given starting principal and interest rate, and
> enumerating every day of every month with real leap years in there to
> accurately calculate interest . It wasn't hard, but it turned out far
> more accurate than the online "calculators" you get on web sites - it
> was able to exactly match the loan documents, for instance. My wife
> an I used it to decide when to refinance our house. And I finally
> understood a tiny bit about finance.
>
> (I second the advice to look at Practical Common Lisp - don't miss
> that book if you are in the early stages! A very down-to-earth feel
> on how to write programs.)

Financial programming sounds good because it is well defined. Practical
Common Lisp sounds good too. Thanks for the ideass.
--
Peter
From: Peter Axon on
Thanks everyone for the helpful thoughts. The Sudoku solver idea sounds
good. Also the AI book sounds good to. I am interested in implementing
expert systems and such.

Thanks again. I look forward to getting into a project this weekend.
--
Peter
From: Thomas A. Russ on
Peter Axon <peter(a)canvasbook.com.au> writes:

> fortunatus <daniel.eliason(a)excite.com> writes:
>
> > On Jun 1, 4:13�Ž�am, p...(a)informatimago.com (Pascal J. Bourguignon)
> > wrote:
> >> If you cannot imagine a couple of programs you would like to write
> >> yourself, I'd be weary of your abilities as a programmer. �Ž�Programming
> >> requires a certain amount of imagination...
> >
> > Cut the poor guy some slack! ;-> He did the little personal manager
> > for PERL, didn't he?
>
> Thanks fortunatus :) I asked because Lisp is quite foriegn to me and I
> was wondering if there were particular projects that would be suited to
> learning its peculiarities.

I think that a nice example project involves working on and extending
a symbolic mathematics solver. In particular that is nice because it
exploits a number of features of lisp that make it a whole lot simpler
to do in lisp than in other languages.

By that I mean something that works like:

(differentiate '(+ (* 2 x) 8) 'x) => 2
(differentiate '(+ (* 3 (expt x 2)) (* 2 x) 8) 'x) => (+ (* 6 x) 2)

Here are some links to assignments that delineate such a project. Also
it is Norvigs _Paradigms of AI Programming_ book:

http://userweb.cs.utexas.edu/~novak/asg-symdif.html

also, if you can find Marek Rychlik's home page at the University of
Arizona, he has some items. Unfortunately, their server seems down at
the moment.

And scheme versions:
http://mitpress.mit.edu/sicp/full-text/sicp/book/node39.html
http://nostoc.stanford.edu/jeff/llisp/23.html



--
Thomas A. Russ, USC/Information Sciences Institute

P.S. I also found an odd assignment where the problem set provided lisp
code for solving certain AI programs (to provide hints about how to
solve the problem) and required students to implement solutions in Java:
http://www.cs.sunysb.edu/~liu/cse352/a2.html

From: Tamas K Papp on
On Wed, 02 Jun 2010 10:00:58 -0700, Thomas A. Russ wrote:

> I think that a nice example project involves working on and extending a
> symbolic mathematics solver. In particular that is nice because it
> exploits a number of features of lisp that make it a whole lot simpler
> to do in lisp than in other languages.

I think that is a very good suggestion, if the OP is mathematically
inclined. A related area which I found interesting is automatic
differentiation: Fatemans's AD paper (http://www.eecs.berkeley.edu/
~fateman/papers/overload-AD.pdf) is an excellent into into that, and also
to nice CL techniques.

Tamas