Re: [genius-list] Ideas and Docs

From: George <>
Date: Sun, 9 May 1999 02:45:42 -0700

On Sat, May 08, 1999 at 06:49:29PM -0400, Squeak wrote:
> What's docbook? :)

> > BTW: What do you mean by "For speed"?
> I presume I could write c code that would do some things faster than gel
> could, it being interpretted. Perhaps calculating the exponential function
> on a matrix (power series of square matrices) might be an example.
> Finding the first prime larger than n might be another one. In each there
> are lots of known repeated steps on known good values that might be easier
> to do with more powerful data structures, or simply faster due to the lack
> of sanity checking or interpretation. Also adding bitwise and modular
> operators might be nice.
> You don't have modular division (difficult to do, 1/d mod n requires
> gcd(d,n) =1), and you probably don't optimize (a ^ b) % c by repeated
> square and take remainder method. I'd just do those as functions
> add_mod(a,b,c) mul_mod(ab,c) exp_mod(a,b,c) etc.
> Bitwise functions would definately be faster in C than in gel, due to c's
> bitwise operators already existing (along with gmp's).

Of course, this will be done by plugins, (implementation of which is
still not clear of course:)

A lot of things however could go into the main library if you code them if
they are a general thing

> I had to hand in the program to someone who doesn't and won't learn to
> write gel, so I figured the ; made the code easier to read.

heh, yeah, sort of, makes it look a bit more like C I guess and less like
pascal :)

> ";" at the end of a function declaration prevents echo'ing the function.
> That might be nice to note in th README (if its not).

Somewhat of a similiar functionality as matlab, with small semantic
differences. I should mention that.

> > Symbolic math is definately something that I want to add in the long run,
> > though something that I'll probably need someone else to help me in that
> > arena.
> I have some ideas, but I'll wait a week until I finish reading your code
> (and my exams) so I can make my ideas at least sound doable to me :)

I think symbolic math can wait, the priorities should be (in my opinion):

1) cleaning up to lexer/parser so that we can have the command window open
and parse functions from say a file at the same time. It would be much harder
to get execution of multiple executions at once since the engine is NOT

2) making a proper interface for plugins

3) making the gui more friendly and usable

4) integration of corba so that we may control other gui apps (such as guppi)

5) make genius an embeddable language (separate the engine into a library)

But if you are willing to put forth effort on the symbolic calculation front,
I'd be more then happy :)

> I would for instance love my matrices to say sqrt(2) rather than 1.414...
> but I would also eventually want to see the actual numbers.

should be simple, after symbolic calculation you would get back a
tree. So if you reevaluate it without symbolic calculation, you can get the
actual numbers.

Even nicer then sqrt(2) would be to use the gnome canvas say, to display the
equation in real mathematical notation. I would love to one day use a
graphical editor for the input and do it with true mathematical notation and
get back the same.

> Of course simplification would be the biggest deal after you got it
> working. Noone wants to see "1*f(x) + sin(pi/2) - sqrt(2)/2*sqrt(2) -f(x)"
> instead of "0".

and this could be used for speeding up some functions if one knows what one's
doing I'd think. One could do symbolic calculation first before going into
time consuming numerical evaluation (can't think of an example right now:)


George Lebl <>
  The following implements RSA in perl and is illegal to export from the US:
          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
Received on Sun May 09 1999 - 02:45:51 CDT

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:00:02 CDT