2003-10-16 21:39

Blogger API sucks

Or I am missing something. I mean:

  • No way to list the posts?
  • No way to fetch a post text?

So, if you migrate to another server... you are screwed? If you lose your client's local version, you are screwed?

Well, at least it's easy to write ;-)

I opened a blogspot account to test:

http://bartleblog-test.blogspot.com/

2003-10-16 20:26

Code cleanup

I did some small code cleanup in bartleblog, the advogato plugin now works ok, I will start work in a blogger plugin.

After that:

  • A semi-decent editor. Maybe HTML, maybe structured-text, who knows
  • GUI cleanup and prettifycation
  • Plugins for a few more PyDS tools
  • Public annoucement? Who knows.

2003-10-15 12:58

Stuff distros don't include

For different clients, I am having to install programs that for some reason distros don't include.

Courier-imap, a dozen perl modules, netatalk... why aren't they in Red Hat or other mainstream distros? Sure, Debian has them, but I don't like Debian.

Oh, well. They are easy to rpm-ize, so I just do it myself. But then I have no place to put them so others can use it.

Does it mean I should become part of something like fedora or somesuch? I don't want to maintain them forever!

2003-10-15 01:00

Advogato post for 2003-10-15 01:00:42

Now, if this appears in the site, bartleblog has advogato support..

And you, readers, if you want a slow, not fully functional PyQt based advogato (and other blogs) editor, then you can use it too, just search for bartleblog in sf.net.

Now, if I implemented caching, and correct date formatting, and a decent HTML editing interface, this could even be a decent app.

2003-10-14 17:11

Amazed at some reactions

Found a few references to the trick question I posted a few days ago, and I really don't understand them.

I mean, some guys say "you throw the box away" or "you are a masochist". Well, as it turns out, I had good reasons not to throw it away, and good reason why those constraints were in place.

The good reason not to throw it away is, of course, that it's a sweet computer. It's smaller than almost any other notebook sold nowadays, rugged and it works just fine. And it can be useful. So why throw it away?

As for masochism... I have no licenses for DOS, so I couldn't use DOS floppies. I had no PCMCIA gadgets and no money, so I didn't use a PCMCIA CD, or USB or flash disk.

Finally, I didn't open it and move the HD to another box because it's a notebook. They are quite tricky to open, and the Libretto more than most. I had just got it, if there was any chance of not breaking it, I wanted not to break it.

And of course... I expected most readers to be, well, hackers, in the old sense. You know, complication for complication's sake is the basis for technical fun sometimes, as long as it's not overdone. Since I did this in one afternoon, I just had fun for a few hours.

Saying that this is masochism is about as stupid as complaining that basketball is masochism beacuse it would be easier if you built a conveyor belt to drop the balls in the basket!

It's a game, folks! Part of the game is that rules restrict you!

The rules I gave were the constraints I faced. Of course other situations would make it easier.

And if the San Antonio Spurs were allowed to use a conveyor belt, they would have won the NBA finals in 4 games!

2003-10-14 04:25

Ok, so it wasn't that hard!

I expected the trick install question to be harder, so next time I am going to try something really tricky!

Well, someone got it right already, so no point in waiting a week :-)

See the answers here.

2003-10-09 22:43

Trick question!

Just to see if anyone can figure this out:

How do you install Linux on a box with the following handicaps:

  • No ethernet (or token ring or arcnet, etc)
  • No CD (or DVD)
  • A pcmcia floppy that has no Linux driver
  • No other OS installed
  • You can't add any hardware
  • You can't move the HD to another box or open the box at all.
  • It must be a real distro, like Red Hat, SuSE or Debian, not a toy or floppy distro.
  • Available hardware in the box: keyboard, mouse, serial port, parallel port, monitor, a toshiba libretto floppy drive (assume it doesn't work with linux, yes, I know there's a "driver", if you can make it work, I want a copy ;-)
  • Use of another PC with whatever software or hardware you want is allowed, except the software must all be Linux (no DOS floppies or stuff like that)
  • Any cables you want can be used.
  • Any media you want can be used for the install.

I will give the answer in a week, hopefully someone will answer first.

Yes, it can be done. In fact, I have already done it, a while ago (see the "Small Linux" article in ths very site)

2003-10-09 19:41

Nifty python/xmlrpc thing

Using python, it's trivial to turn any module into a XMLRPC server. So, if you are careful writing your app in a modular way, you can move the backend elsewhere in very little code.

For example, if I had a module that has some functionality, like this (module.py):

#Stupid simple module

def add(a,b):
        return a+b

A program would use it like this:

import module
print module.add(2,4)

Now, if I move the module to a remote box (server), create this xmlrpc server program in the server (and run it ;-):

#!/usr/bin/env python

#Simple generic XML-RPC server

import module

import SimpleXMLRPCServer

server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 800
0))

server.register_instance(module)
server.serve_forever()

And this bridge module in the client (clientmodule.py):

import xmlrpclib

server = xmlrpclib.Server('http://remotserver.com:8000')

Now this very slightly modified version of our program works in exactly the same way as the original:

from clientmodule import server as module

print module.add(2,4)

Of course this has issues:

  • It has no security
  • XMLRPC could introduce errors and the program doesn't catch them.
  • It could be made even more transparent with some more pythoning

But anyway, I think it's cute.

Contents © 2000-2019 Roberto Alsina