[hashcash] Re: Pure Python implementation of hashcash v.1

  • From: "David Mertz, Ph.D." <mertz@xxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Fri, 24 Sep 2004 11:29:51 -0400

David Mertz, Ph.D. wrote:
In any case, it's a lot slower than the C version. It's even more slower than the *amazingly* good G4/Altivec version, which just screams on my Powerbook.

On Sep 24, 2004, at 9:29 AM, Eric S. Johansson wrote:
seems like a good next step would be to create a python to compiled library implementation. I'm still using the hashcash via commands route in Camram.

I suppose. But my goal was to make a pure Python version. If someone has access to a C compiler, they might as well compile the standard C version. Or if they don't have a C compiler, but someone else has built a command-line binary, passing flags and reading STDIN (as Eric does) is simple enough in Python--or in any scripting language, for that matter.


FWIW, the desktop machine on which I permanently archive my email is OS/2. Sadly, I couldn't find a compiled binary of haschcash (.c) for that platform. And also unfortunately, I haven't installed GCC and all its dependencies there either--though I should do that, for lots of reasons. Psyco works nicely there though.

But on the happy side, I found that the Windows command-line executable runs perfectly happily under Odin ('pec hashcash.exe <options>'; hmm... I should try pe2lx.exe for static conversion). I imagine the speed is pretty much exactly the same as it would be under Windows (Odin isn't an emulator, it's an API translator; i.e. it's cross-seeded with Wine). 'course, it's a relatively slow machine nowadays, either way (733Mhz P3). Anyway, I'll rig up hashcash filters for incoming and outgoing email using that (unless someone compiles a native OS/2 EXE, by chance).

I also check and write email on my Powerbook, with OSX and using Mail.app. Anyone know if anyone has figured out how to interface with Mail.app, it would certainly be nice to get hashcash integration there. I imagine it must be possible--maybe in Applescript. But I don't have any idea now how you would go about that.

Yours, David...


Other related posts: