Skip to main content

Ralsina.Me — Roberto Alsina's website

New software project: Stupid Sheet

Adding some­thing else to my plate is prob­a­bly not a very good idea, but what the heck, I can make it sleep an­oth­er three years if I lose in­ter­est.

So: I am writ­ing a re­al spread­sheet in python.

Prob­a­bly nev­er go­ing to be use­ful for cor­po­ra­tions, but it should be at least as fea­ture­ful as Google's and it should be amaz­ing­ly smal­l.

Here are the com­po­nents:

  • Trax­ter: my spread­­sheet-­­for­­mu­la-­­like-lan­guage with de­pen­­den­­cy track­­ing that com­piles to python.

  • PyQt (hey, it has a grid wid­get)

  • Python (Of course)

The sta­tus right now:

  • It's al­­most as func­­tion­al as it was 2.5 years ago

  • Ex­­cept for bro­ken rel­a­­tive cel­l­s.

  • But with the be­gin­n­ing of a re­al for­­mu­la lan­guage.

  • With au­­to­­mat­ic re­­cal­cu­la­­tion and cyclic de­pen­­den­­cy check­­s.

  • Adding things is dead sim­­ple. Here's the im­­ple­­men­­ta­­tion of SUM (not up­­load­­ed yet, though):

def sum(*args):
  for v in args:
  return ac

All the range stuff hap­pens be­hind the scenes (although you may get a func­tion called with thou­sands of args... I won­der how well Python han­dles that).

You can check it at the google code project (Use the SVN).

Paul Giannaros / 2007-05-25 13:36:

why is the function called 'sum' in lowercase? Having it lowercase overwrites the built-in sum which is implemented in C and will hence run a lot faster than that one there. How about

def SUM(*args):
return sum(args)

Roberto Alsina / 2007-05-25 14:31:

Mostly because I had no idea there was a sum() defined ;-)

Paul Giannaros / 2007-05-25 14:35:

Heh, ok. There are many nice built-in ones -- min, max, sum, abs, etc. Check

Contents © 2000-2023 Roberto Alsina