Last night I went through the old Poincare Project posts from before Leonardo had categories, and put them in the right category. I then patched Leonardo to sort them by path.
The end result is the the Poincare Project page now lists all my posts to date, in order.
I'll get back to posting on the topic real soon now.
by : Created on May 29, 2006 : Last modified May 29, 2006 : (permalink)
Energy drinks reduce the ability to sleep but not the desire. So you still feel tired but there's nothing you can do about it.
by : Created on May 29, 2006 : Last modified May 29, 2006 : (permalink)
I just noticed I have 3 of the top 10 most popular python links on del.icio.us. Woohoo! If only I'd posted my Sudoku solver as well :-)
Funny thing is, one of them calls me Joshua Tauber—I guess because of Joshua Tauberer.
UPDATE (2006-05-29): 3 in top 5 now :-)
by : Created on May 29, 2006 : Last modified May 29, 2006 : (permalink)
Making good progress with pyjamas
As of @32 it now is possible to cd into examples/helloworld where there is a lone Hello.py:
import ui class Hello: def onModuleLoad(self): b = ui.Button("Click me") ui.RootPanel().add(b)
and type:
python ../../builder/build.py Hello
and have all the Javascript and HTML be generated in the output directory.
Also, the mailing list hit the 50 mark today! And I'm on a #pyjamas channel on irc.freenode.net
by : Created on May 27, 2006 : Last modified May 27, 2006 : (permalink)
I'm delighted to announce that Ryan Forsythe's project to port Kenny Tilton's Cells to Python was accepted for the Google Summer of Code 2006 and I'll have the pleasure of mentoring it with Kenny's help.
I think Cells will be a wonderful contribution to Python.
Picking the projects for Python was very difficult as we ended up with only 25 slots to fill from 186 valid submissions. You can see the list of PSF SoC projects on python.org. Note that some individual open source projects in Python were mentor organizations in their own right so there are more Python-related projects being done.
I think next year, I might apply for one of my projects to be a mentoring organization because there was some post-voting discussion that really PSF should focus on projects that directly relate to Python the language rather than projects that just happen to be written in Python.
by : Created on May 25, 2006 : Last modified May 25, 2006 : (permalink)
I'm pleased to announce that, after a very busy weekend and one or two weeknights, I've successfully built a Python equivalent to the Google Web Toolkit (GWT) that can handle half the Hello World example.
It sounds small but the pieces are largely all there in a primitive state:
Now it's just a case of incrementally improving each of these areas.
You can see the result in revision 19 at:
http://pyworks.org/svn/py-gwt/hello-experiment/
Join the mailing list if you want to get involved in any way.
UPDATE (2006-05-26): The project now has a name and a website: pyjamas
by : Created on May 24, 2006 : Last modified May 26, 2006 : (permalink)
Version 2.5 of SubEthaEdit, my favourite non-Emacs text editor on OS X, has just been released.
I found out because their bug tracking system emailed me to let me know they'd fixed a bug I submitted.
Cleverly, the bug tracking system didn't email me when it was actually marked as fixed (which wouldn't help me as it's a commercial product and I don't have access to nightly builds) but rather it emailed me when the first release that fixed the problem came out—a nice email saying there's a new release and that it fixes my bug.
I think that's a cool feature for a bug tracking system.
by : Created on May 23, 2006 : Last modified May 23, 2006 : (permalink)
The Google Web Toolkit looks cool. Now we know how they do it.
You write your front end in the Java programming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.
A couple of weeks ago I was thinking about a similar (at a very high level) approach in Python. But now that we have something to imitate, anyone interested in trying to build a more specific Python equivalent? Portions of the GWT are open source and nothing in the license prohibits reverse engineering as far as I can tell.
I'll set up a mailing list for interested people.
UPDATE: Mailing list available at http://pyworks.org/mailman/listinfo/py-gwt
UPDATE (2006-05-23): Now see Primitive Python Version of GWT Working
by : Created on May 17, 2006 : Last modified May 24, 2006 : (permalink)
For a while, I've been defining functions in Python that define other functions and return them, taking advantage of lexical scoping and the first-class status of functions:
def foo(x): def bar(y): return x + y return bar
(yes, I realise you can also do this with a lambda expression)
But it all of a sudden occurred to me that you can probably define parameterised classes within functions and return them. Sure, enough, you can:
def foo(x): class bar: def __init__(self, y): self.z = x + y return bar
So foo isn't a factory producing objects, it's a factory producing classes.
This probably isn't news to most of you, but I think it's pretty cool that this works! Looking back, I can think of heaps of times I've wanted to parameterise classes and this would have been perfect.
by : Created on May 14, 2006 : Last modified May 14, 2006 : (permalink)
Back in 2003, I was playing around with building templates in Python by taking advantage of a combination of dictionary-based string substitution and the ability to late bind dictionary values using __getitem__.
I posted some graded examples to the Python Web SIG at the time and tonight I dug them up and formatted them into HTML with colour syntax highlighting:
http://jtauber.com/2006/05/templates.html
UPDATE (2006-05-19): One of my Pythonista heros, Ian Bicking, suggests an alternative approach which I like a lot.
by : Created on May 13, 2006 : Last modified May 19, 2006 : (permalink)
There were no applications for Leonardo or Demokritos projects but it looks like I'll get to mentor a new project that I'm very excited about. I don't want to say anything specific until it's officially announced but it should be a great new addition to Python.
If people are still interested in doing a Leonardo or Demokritos project, independent of SoC, just let me know - there's plenty of cool stuff to do.
by : Created on May 12, 2006 : Last modified May 12, 2006 : (permalink)
Last night's Greek Lesson went well. We went through the 24 individual letters of the Greek alphabet and the combinations ει and ου.
To prepare the lesson, I ordered the letters into 5 categories of roughly increasing difficulty for readers of the Latin alphabet. I then wrote a program that, for each category, generated up to twenty word forms in John's Gospel that (a) had a letter from the category being taught; and (b) only had letters from that category or a previous one.
I think it turned out to be a great way to learn the letters because it didn't overwhelm them too much at the beginning. It still wasn't easy, though. It's sometimes hard to remember just how "foreign" some of the letters seem when you first learn them and in some cases how misleading.
One thing I learnt last night is that Americans (or at least the ones I was teaching) don't use 'revise' and 'revision' to refer to reviewing material, for example before a test. In Britain and Australia one would say 'have you revised for the test yet' or 'I have a test tomorrow so I need to go home and do some revision'. In America, it appears those terms only mean their other sense of making a change/improvement.
Of course, one might argue that a Brit or Australia means 'change/improve my understanding of the subject' but it was still interesting that my use of the term was odd to the Americans.
Oh, and thanks to Tim Wegener, who, although not part of my course, read through the material for last night's lesson beforehand and had a wealth of wonderful questions about the history of the Greek language.
by : Created on May 10, 2006 : Last modified May 10, 2006 : (permalink)
I recently bought The Reasoned Schemer by Daniel Friedman, et al, being a big fan of The Little Schemer and The Seasoned Schemer (A Little Java, A Few Patterns didn't grab me in the same way).
The Reasoned Schemer teaches logical programming in a functional programming paradigm. Of course, it's written in the same question / answer style as the other books—the book asks you a question that you may or may not know the answer to and then gives you the answer. It then asks another question and gives the answer and so on. There's no other content than these question / answer pairs other than a handful of "laws" and "commandments".
The questions cover a range of cases to make sure you understand the subtleties and edge-cases. You have to mold your mind so that it gets the right answer to one question and then refine your thinking further if you can't then handle the question that follows. Eventually, the questions have handled enough cases that you really grok what's going on.
It occurs to me that this style is basically a set of Unit Tests for the Brain.
As a really simple example, here are the first three pairs from chapter 7 which define what a 'bit' is in the context of the rest of the chapter:
That's just a unit test for your brain's concept of what a bit is. It's Test-Driven (Brain) Development.
by : Created on May 6, 2006 : Last modified May 6, 2006 : (permalink)
I'm teaching New Testament Greek to a small group and tonight was our first lesson. I just talked about the history of the Greek language and outlined the (I think) novel approach I'm taking to this course.
Basically, we'll be learning inductively but with a graded series of text fragments from John's Gospel generated algorithmically to prioritize learning the words and word forms that will, in turn, mostly quickly enable reading of more text fragments (similar to the problem posed in my programming competition).
We'll still be covering traditional grammar but it will come after the grammar points have been seen in real texts a few times. There'll be a focus on reading and learning inflected forms first (and always in the context of a clause) and only abstracting lemmas and paradigms after the fact. This far more closely resembles how first language acquisition works and should lead to much quicker intuitive understanding of the language.
This is essentially an alpha test but, as a couple of the guys are remote, I'm trying to do as much via email and Web as possible and so, if all goes well, I might offer this to a broader audience online at some stage.
I'll post updates as things progress.
by : Created on May 5, 2006 : Last modified May 5, 2006 : (permalink)