Recent blog entries for moshez

sisob: You could, of course, compare to the Python version. This is for Gtk+ 1, but I gather that the interface for 2 is even cleaner (I just couldn't easily find a tutorial with an example I can hack). This example is straight from the tutorial, except hacked to do what your version does.

Some concessions to the Advogato/HTML limitations: I usually prefer to indent functions, even those with one statement. However, I wasn't sure how to get it to look right, so "def hello" is not idiomatic :( [but still works!].

Note how Python didn't make me define a class or even a top-level function. Of course, I could, and the earlier versions of this hack actually this have this. But I really want to make the GUI answer to <code>print "Hello World"</code> (which is a valid Python program that...well...).

import gtk

window = gtk.GtkWindow(gtk.WINDOW_TOPLEVEL)
button = gtk.GtkButton("Hello World")
def hello(*_): print "Hello world"
button.connect("clicked", hello, None)
window.add(button)
window.connect("destroy", lambda *_: gtk.mainquit())
window.show_all()
gtk.mainloop()

shlomif: I easily found a version that has been posted in '99: Here. Enjoy!

They have excellent quotes from the Neo-Tech pages there.

(And no, it is not OK to cheat at poker. It is ok to "bluff" at poker -- bet higher than it would be strictly rational to bet according to the odds. Do you really think it is ok to pretend to be people's friend, get them to play late into the night when they are too tired to think coherently, and then take advantage of them? Read the book about how to win at poker, or at least skim it, before trivialize its existence.)

raph: That's not even the beginning of it (as long as you're not too attached to "reverse chronological"). Some use it to write random rants about thoughts, others use it for purposes as varied as recommending commercial products to ranting about free software, while, and this has been a recent discovery for me, still others use it to create interactive fan-fiction. Of course, the non-personal blogs also vary: from free software, through geek community and ending in elitistic discussion sites, they cover all areas. However, you nailed one fact very accurately, and I thought it might bear repeating: Blogs are inherently webby: they are fun and useful because the web has, for all its limitations one advantage: however many links one puts, it does not disturb the stream of reading. Like in a certain horrible movie, they sit quietly, blued, asking us if we "want to find out more". They allow us to say what we mean by words like free without needing to launch the user into an argument he already knows. It even lets us inform the user how we feel about technical issues, such as threads without reiterating age-old arguments. Blogs fit the web naturally: the sponteneously create links. Google uses the web as an intelligent network of links. Thus, Blogs enhance the web in a way that Google is uniquely equipped to use to its fullest.

Like I said, I'm not saying anything that raph did not, but I hope I put an interesting enough twist on it :)

24 Dec 2002 (updated 24 Dec 2002 at 07:38 UTC) »

Writing Advogato Diaries

The next version of Twisted will come out of the box with an example that lets you write advogato diaries locally and send them to advogato. If you see this diary entry, this means that this example works :)

XML-RPC seems to be useful, for some things, after all.

Update!

The code is here

raph: thanks. The link you gave does give an explanation, but an incorrect one, I'm adraid :) Think about what you know: going from the design (even a fairly specific one) to a fully working program is, at the very least, a factor of 20 in length. Let's treble it for non-trivial proofs like Jordan, in which many techniques which are hard to formalize as stand-alone lemmas are assumed as trivial, and we have a factor of 60. So, basically, if we assume the "classical" Jordan proof is on the order of a 200k, then we estimate the formal proof to be 60*200k = 3MB. That's 3MB of no-comments, "assembly" level math. Now, sure, the checker will find bugs in that proof. How long do you think it would take to completely debug that insane amount of mathematical proof? Uniquifying names, proving each non-trivial set operation usage, and so on.

Yes, it is embarassing to have a referee find an error in your paper. I doubt it happens very often: mathematicians, before submitting papers, go over them with a comb looking for errors. Then they ask colleagues to look at them. Then they give talks about them. This is a much more efficient use of the time then translating it to assembly so the proof checker can verify it.

The author of the link you gave seems to argue that the proof checker will be able to fill in the missing details, because "computers are good at boring details". This is about equivalent to a statement that computers will be good at auto-debugging, because they're good at boring details. Computers are good at repetitive details, not mere boring ones. Significant AI increase has to happen before computers can fill in the missing details, even those which would be easy for first-year students.

Now, on the question of correctness proof, my skepticallity has no strict basis in experience, so I cannot argue as strongly. However, I do tend to think that in non-trivial programs, specifying the correctness correctly will be almost as non-trivial as writing the program.

raph: May I ask what the point of all these computer-verified proof systems? I mean, yes, we all proved in Logic 101 that it is theoretically possible, but seriously, what's the point?

Let me first clarify some things.

Mathematicians do have mistakes in their proofs, many times. However, I seriously doubt such a system will actually help solving that problem. I can speak with some authority, having a little experience in writing papers, that writing a complete proof of a non-trivial statement would quickly become onerous, and more bugs would be made in the translation.

I have learned, and taught, advanced math. Teaching math is about giving intuition through proofs. Proofs written up as formal list of statements give no intuition, nor an idea of how to solve similar problems, which is what teaching mathematics is all about.

It is a nice toy. It is even fun to enter a few simple proofs. But, having done some formal proofs, my experience is that the novelty wears off and it becomes a mechanical boring process (and I like this stuff, basically!).

So, I think I've discounted "helping mathematicians", "improving math teaching" and "having fun" as possible motivations. Either my logic is wrong (pun not intended) or I have not listed all possible motivations: which is it?

Thanks

kilmo: FYI, this characterisation of the Cantor group is awkward compared to the following characterisation. Take all infinite binary sequences. This is an additive group with the xor operation. Define the topology as the smallest one such that the set of all sequences which have 0 in the i'th place is both closed and open.

With this chracterisation you don't get an embedding the Cantor group on the line, but you do get an easy way to show all kinds of nice things.

Exercise: can you give this set another continuous group structure such that each element has order 0?

Hint: Can you give the set of all binary sequences of length n a group structure such that there are elements of order 2^n?

Thoughts About Legality

Yes, this has been done to death.

Background: I wrote the Twisted web client stuff (well, a lot of it, anyway). Playing around with some of the features, I came up with a simple script which downloads the Dilbert home page, parses it for the image name, and puts it in an IMG tag. Naturally, I wanted to put this example in the Twisted examples directory, because doing this in an async is a bit tricky, and it would be nice if newbies could see this stuff done.

glyph, the Twisted lead developer, vetoed it, for what seems to be a good reason: he claims it violates the DMCA. I certainly do not want to place my friends in legal jeopardy, so I refrained from adding it.

The script can now be gotten from my site. Please, download it and have fun with it. I hereby place it in the public domain, but it's more a toy than anything production-grade anyway.

It is annoying that this small hunk of cute Python code is illegal in the USA.

Thoughts About Usability

I am a very introspective person. When I feel a certain way, I would like to understand why I feel that way. I have wondered why I am so often irritated by people talking about usability in free software. An example of such an article (and a fairly good one, at that) is available from the GNOME Usability Project. I was trying to understand what the core of my irritation with the article. Then I stumbled on this gem:

Most of us probably want people to operate our programs, we desire "users"

And then it hit me. I don't.

I honestly don't care whether people use my programs. I write them to solve a problem. If the problem later comes up for someone else, I will point them at the solution I wrote (or helped write). Then, if it works for them, fine. If it doesn't, they're free to hack on it until it does solve their problem. They can, of course, not use it at all -- in which case I will usualy dismiss them as idiots, because I've already solved the problem, and move on with my life.

The only usability I care about is mine. I want to be able to use the programs I write. If nobody else can use it, that's perfectly fine -- as Franky says in Rocky Horror Picture Show: "I didn't make him.... for you!" [and the callback: "but she gets him anyway"]. This sums up my feelings. I don't make programs for others -- but they get them anyway, because I am careful to license them freely.

All this, of course, doesn't mean I don't care about bug reports. I try to keep my code clean and bug-free as I can. But, if there is a disagreement about what the program should do, at that point I will turn a deaf ear towards my users.

movement: I hoped it was obvious my lynx comment was somewhat tongue in cheek. Lynx is, of course, my browser of choice. Actually, I am not sure what "usability" problems lynx has, but hell, I am sure it has.

But I am quite certain it would be amusing to see MichaelCrawford submitting bugs to the lynx project along the same lines (I'm starting to think that his reports are being extremely unfair to his wife by portraying her in a classical sexist way as the "helpless female". One must wonder if she actually reads these bug reports, and if she does, what she thinks of her husband publically announces to the world that she is in tears.) Anyway, I use mozilla on my work machine, and I think I had one crash in a few months of using it, so as far as stability goes, I really can't complain -- my vague memories from my IE on Windows using time seem to indicate that this IE crashes more, so if we limit ourself to defining "qualities" by "number of crashes on preferred platform", Mozilla would get the upper hand. I also think mozilla is usable, but since I think vi, screen, zwm and differential topology are all perfectly usable and intuitive, you may freely disregard my opinion as someone whose mind is so Twisted to be actually sprained.

28 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!