Re: merits of Lisp vs Python

2006-12-11 Thread Greg Johnston

Stephen Eilert wrote:
> So, let's suppose I now want to learn LISP (I did try, on several
> occasions). What I would like to do would be to replace Python and code
> GUI applications. Yes, those boring business-like applications that
> have to access databases and consume those new-fangled web-services and
> whatnot. Heck, maybe even code games using DirectX.

DrScheme for the first. Oh...well, there's loads of OpenGL support if
you can bear using that instead of DirectX. If you want CL, cl-opengl
and cells-gtk seem to work well.

> So, how would I do that? For Python, that was simple. I learned the
> basics, then moved to the libraries, learning as I went. Python has
> some excelent online resources.

http://www.gigamonkeys.com/book/ (Practical Common Lisp)
http://www.paulgraham.com/onlisp.html (On Lisp)
http://www.htdp.org/ (HTDP)
http://mitpress.mit.edu/sicp/ (SICP)
http://schemecookbook.org/
http://www.cliki.net/index
(Note: I mixed Scheme and CL pages above)

Not sure what other online resources you want.

> No, I don't want to see yet another Fibonacci example. No, console
> output is not fun. And yes, I know about this list processing stuff.
> All I can find are introductions to LISP written for computer science
> courses. I can't seem to put together all those mnemonics into a
> working program. LISP is full of primitives with 3-4 characters, chosen
> for historical reasons.

You're welcome to use things like first, rest, or second instead of
car, cdr, or cadr, but I always find the latter easier (car and cdr are
composable, and remind you that you're using cons cells). What other
mnemonics are there? I guess cons, but that shouldn't be hard...

On the other hand, Python has no 3-letter words. *struck dead by a
flying "def"*

-- 
http://mail.python.org/mailman/listinfo/python-list


PyGTK, Glade, and ComboBoxEntry.append_text()

2008-01-21 Thread Greg Johnston
Hey all,

I'm a relative newbie to Python (switched over from Scheme fairly
recently) but I've been using PyGTK and Glade to create an interface,
which is a combo I'm very impressed with.

There is, however, one thing I've been wondering about. It doesn't
seem possible to modify ComboBoxEntry choice options on the fly--at
least with append_text(), etc--because they were not created with
gtk.combo_box_entry_new_text(). Basically, I'm wondering if there's
any way around this.

Thank you,
Greg Johnston
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK, Glade, and ComboBoxEntry.append_text()

2008-01-23 Thread Greg Johnston
On Jan 21, 5:44 pm, Greg Johnston <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I'm a relative newbie to Python (switched over from Scheme fairly
> recently) but I've been usingPyGTKand Glade to create an interface,
> which is a combo I'm very impressed with.
>
> There is, however, one thing I've been wondering about. It doesn't
> seem possible to modifyComboBoxEntrychoice options on the fly--at
> least with append_text(), etc--because they were not created with
> gtk.combo_box_entry_new_text(). Basically, I'm wondering if there's
> any way around this.
>
> Thank you,
> Greg Johnston

P.S. If anyone reads this later wondering how to do it, all you need
to do is "prime" the ComboBoxEntry with a blank entry in Glade. You
can then use append_text(), insert_text(), etc. on the object, as well
as remove_text(0) to get rid of your blank entry.
-- 
http://mail.python.org/mailman/listinfo/python-list