Tao of the Machine

Programming, Python, my projects, card games, books, music, Zoids, bettas, manga, cool stuff, and whatever comes to mind.

Howdy, neighbor

Some links...

Posted by Hans Nowak on 2004-02-20 14:16:59   {link} (see old comments)
Categories: linkstuffs

Codeville

Bram Cohen releases a new Codeville build. A version control system written in Python.

Posted by Hans Nowak on 2004-02-19 09:45:05   {link} (see old comments)
Categories: Python, linkstuffs

Boek

One of my resolutions for 2004 was to start writing a book. An ambitious project, and before I begin, I better make solid preparations.

Some things to ponder:

  • What will the book be about? Obviously I want to write about Python. I don't want to write yet another tutorial or language reference though; others have done that before, and probably did a better job at it than I can.

    I'm considering to write a Wax book, which would be useful, but Wax isn't really mature enough yet.

    It's very well possible that it's too early for me to write a book. We'll see.

  • What format do people use to write books (or long documents)? Do they use a "simple" format like REST? DocBook XML? TeX? Straight HTML? Their own XML format? Plain ASCII, even? Something else? I have no clue. 'Twould be useful if the chosen format could easily be converted to HTML, PDF, etc.

    I will probably not use Firedrop for it; it does not seem up to the task. For one thing, its editor is very simple (just a TextBox instance, after all), probably *too* simple to write long reams of text.

[Update #1] I just read the comments. Let's get a few misunderstandings out of the way:

  • The book will not be about wxPython. I simply don't know enough about it. (To write a toolkit like Wax, you don't need to be a wxPython guru... anybody can make it.) I understand that there might be significant demand for such a book, but I am not the person to write it.

  • *If* the book will be about Wax (which I am still considering), it will be about building GUI apps with "pure Wax". Of course I would mention wxPython here and there, since Wax is based on it, but I will not focus on building apps with wxPython.

  • This will be an online book, kind of like Dive Into Python when it first started. At this moment, I don't even want to consider the possibility of a paper version.

Posted by Hans Nowak on 2004-02-17 23:15:08   {link} (see old comments)
Categories: general

The stars, a new way to see them

I read the Dutch translation of this book in the early 80s... I got it from the library over and over and over again. Eventually I "graduated" to the adult section of the library, with all their boring books emoticon:smile, and wasn't able to get it anymore.

After that, I was unable to find the book in Dutch stores. Eventually I got my Internet connection in 1997, and found it on the Net. It didn't take long before I had an American copy of it.

At first this may seem like a simple book. If, as a child, you're interested in "the stars", it's easy to get fed up with the way constellations are displayed. They have names like Lion, Dragon, Bull, etc, but they don't look like anything, due to the unimaginative way the lines between the stars are drawn. This book fixes that problem. It introduces a new way of displaying the constellations, making it easy to find them in the night sky. You can go out in the evening and actually find these constellations, and (most of the time) they *will* look like something resembling their name.

To aid you in your constellation spotting, the book has maps for various dates and times, compensating for latitude, or offering different sets of maps altogether for areas that do not share the USA's latitude (around 30°-50° N). 1) It also tells you a bit about the backgrounds of the constellations, bright or peculiar stars, and how to find them.

"Real" astronomers may not think that constellations are very important; after all, they don't have real meaning. But there's more. The book also gives you a solid basis about the solar system, stars, galaxies, etc. This is presented in such a way that children can understand it (at least I did :-), but it's by no means for children only.

I would recommend this book to anyone who has an interest in astronomy or who is just curious about the night sky, stars and planets.

1) 10° difference in latitude is significant. Moving from the Netherlands (~51°) to Florida (~30°), I was pleasantly surprised by the fact that I could now see certain constellations that never rose above the Dutch horizon. The Crane and the Phoenix, for example; I've also seen Canopus and parts of the Centaur. Others, like the Scorpion and the Big Dog, rise much higher than in the Netherlands, and can be seen whole.

Posted by Hans Nowak on 2004-02-16 12:57:25   {link} (see old comments)
Categories: books, nostalgia

More links and stuff

More on the NADD thing: In defense of NADD. Also, here are some links that are cruel traps to those afflicted:

Posted by Hans Nowak on 2004-02-15 23:28:57   {link} (see old comments)
Categories: general, linkstuffs

Lispy links

Some links that might help get the Python and Parentheses thingy going...

  • Successful Lisp: Seems like a good place to start. One day I want to work through this book and actually start *doing* something with Lisp rather than experimenting.

  • Lisp500: Lisp in 500 lines of C. (Don't try to look at the code. emoticon:smile)

  • Lython: A Lisp front-end for Python. Much like a Lisp interpreter in Python, except that it compiles to Python bytecode. Given this fact, it's unsurprising that it integrates smoothly with Python (and its functions, classes, modules, etc), allowing for code like:

(import os)

(:= out "/tmp/lythontest")
(if (os.path.exists out)
    (os.unlink out)
  (print "target file does not exist"))

(:= f (open "/tmp/lythontest" "w+"))
(f.write "Hello World from Lython!")
(f.close)

(Lython's integration is a lot better than my PyZetaLisp interpreter's, but then again, PyZetaLisp was really meant as a prototype for a later implementation in C or OCaml or something; integration with Python was more of an afterthought. That's why PyZetaLisp has separate classes for integers, strings, etc, rather than using Python's built-in types directly.)

Posted by Hans Nowak on 2004-02-14 23:14:47   {link} (see old comments)
Categories: Lisp

Python and Parentheses TopicExchange

http://topicexchange.com/t/python_and_parentheses/

Aaron Brady: "Given that Python & Scheme, and Python & Lisp have been recurring memes lately, I thought it would be good to group all of these posts tegether in one place. To that end, I've created a new topic on Phillip Pearson's *excellent* TopicExchange, for people to trackback when posting about it. It's like a manual "Buzz"."

Funny this should come up... lately I've been wondering what it would be like to have a language that's a mixture of Lisp and Python. A Pythonic Lisp. A Lispy Python. A Lisp designed with Pythonic principles in mind. It could have goodies like modules and objects.

(import 'foo)   ;; or maybe: (import foo) ...?

Maybe it could have special syntax for dicts, lists and object access.

(foo.bar 42)             ;; sugar for: (getattr foo 'bar)
(define a (range 10))    ;; a list
(print a[2])             ;; sugar for: (getitem a 2)
(define b sys.modules)   ;; a dict
(print b["os"])          ;; sugar for: (getitem a "os")
(define c (create-instance Point))
(print c.x c.y)          ;; sugar for: (getattr c 'x)

Maybe it could be very Pythonic. TOOWTDI, explicit is better than implicit, and all that jazz.

The language that I envision would be an independent implementation. It would not be a Lisp interpreter written in Python, or Pythonic syntax and libraries tacked onto Lisp. No, I think it should be designed from scratch, critically looking at the Lisp-vs-Python balance every step of the way.

Aside from the actual implementation, I think that the most difficult part would be, making it so that it would actually seem useful, natural, and a joy to program in... for people coming from Lisp, Python, and other languages. I'm not sure if that's possible. Sometimes I wonder if Lisp and Python, in spite of their similarities, are really based on vastly incompatible principles.

(Aside: The TopicExchange uses trackback. To make things easier, the development version of Firedrop is now capable of sending trackback pings. No, it's not available yet. emoticon:devil)

Posted by Hans "just a trial balloon..." Nowak on 2004-02-14 01:25:32   {link} (see old comments)
Categories: Python, Lisp

--
Generated by Firedrop2.