load and autoload fails when ibase # 10



>>>>> "Rupert" == Rupert Swarbrick <rswarbrick at gmail.com> writes:

    Rupert> Raymond Toy <toy.raymond at gmail.com> writes:
    Rupert> Yeah, but my question is why we clobber *READ-BASE* when
    Rupert> loading lisp files. I genuinely can't think of any situation
    Rupert> where I would want to do that... Frankly, I'm struggling to
    Rupert> think of a situation where I'd want it when load()ing .mac
    Rupert> files either.
    >> 
    >> Because the numerical constants are easier to interpret when written
    >> in a certain base?  Like 0x3fffffff is (sometimes) easier to interpret
    >> than 1073741823.
    >> 
    >> Ray

    Rupert> I think I wasn't clear. In Lisp, you can get that behaviour by #16r or
    Rupert> #x. In Maxima, admittedly I don't think you can do that sort of
    Rupert> trick. However, at the moment, the meaning of the code you write is

I've considered adding that such a feature to maxima, but I don't know
what would be a good way to denote that that also doesn't interfere
with other things.

    Rupert> changed by the value of ibase when your code is loaded. What I intended
    Rupert> to ask was whether there was any situation where I wanted:

    Rupert>   ibase: 10;
    Rupert>   load(foo);

    Rupert> and

    Rupert>   ibase: 16;
    Rupert>   load(foo);

    Rupert> To have different effects.

You didn't ask if it was a good idea or not, just why someone might
want to do that. :-)

But I was thinking that anyone who did this would have a main file to
load which would load the remaining files with ibase set
appropriately.  And if foo contained ibase:16, would the rest of the
file be read with ibase set to 16?  That's reasonable, provided that
ibase is returned to the original value after the file is loaded.

Ray