Boris,
I found that there are some things which make 1.23 MUCH less pleasant to develop such stuff on than v1.18.
You can always ignore the user primitive stuff entirely, and just carry your primitives forward from 1.18 to 1.23 if you prefer. The mechanism for "intrinsic" primitives numbered from 1 to 600 (or 700, I can't remember) has not changed since 1.18.
The UP support is unofficial, unsupported, and (originally) specific to Unix (and maybe some versions of Andreas's Win32 ports -- since I originally did it speficially to help Andreas make faster progress with his GL stuff), and nobody is suggesting that you use it if you don't like it.
User primitive fail code doesn't seem to work.
myMethod <primitive: 1500> ^'hello there!'
If the primitive fails, I get the usual <error: primitiveFailed> instead of hello there.
A bug -- I'll look into it.
- I can pass only 7 parameters to the primitive. This is
completely unacceptable for my tasks.
This is an arbitrary limit that is trivial to increase. Look at the Interpreter method #userPrimitiveResponse and it should be obvious how to increase the number of arguments that can be passed.
- In 1.18, where I write my own primitive code, I can analyse
the arg count myself and thus develop a primitive to take variable number of parameters; can I do anything similar here?
Like I said, the original primitive stuff has not changed. You can still use precisely the same mechanism in 1.23.
For the UPs, the above could only be done by changing the way user primitives expect to receive their arguments. For example, if they were prepared to be passed an argument count and a pointer to the first argument, and then to pick up their arguments by indirecting through this pointer with an index, then yes -- it would be easy.
On the other hand, if the UPs want to receive arguments in a C-like fashion then it's much harder to do in a portable manner.
I'm not particularly attached to the UP facility, implementation, philosphy, or anything else. If it should be done differently, or even not at all, then change it.
P.S.: At the time you will be about to publish the next Unix release, could you send it to me just before announcing it so I can verify if it compiles/runs on OS/2, so you can announce it as a release "for Unix, including OS/2"?
No problem!
Regards,
Ian ------------------------------- projet SOR ------------------------------- Ian Piumarta, INRIA Rocquencourt, Internet: Ian.Piumarta@inria.fr BP105, 78153 Le Chesnay Cedex, FRANCE Voice: +33 1 39 63 52 87 ----------------------- Systemes a Objets Repartis -----------------------
Ian,
User primitive fail code doesn't seem to work.
myMethod <primitive: 1500> ^'hello there!'
If the primitive fails, I get the usual <error: primitiveFailed> instead of hello there.
A bug -- I'll look into it.
The problem is that you pop the arguments before doing the function call. If it fails you don't have any args on the stack left ;-)
Sorry for being that brief and not attaching the fix - I have a *very* slow connection here.
Andreas
Ian,
This is an arbitrary limit that is trivial to increase. Look at the Interpreter method #userPrimitiveResponse and it should be obvious how to increase the number of arguments that can be passed.
I did look there, the reason I asked was I didn't believe it to be this simple so I wanted to be sure I didn't miss something tricky. And now that I know there are no hidden traps to modification, I take my words about UP being less pleasant to deal with than SP back!
The UP support is unofficial, unsupported, and (originally) specific to Unix
WOW!!! Is there anything in Squeak that is supported or official?!!!
Reagrds, Boris
Boris Shingarov wrote...
WOW!!! Is there anything in Squeak that is supported or official?!!!
Of course not. Well, the name is official, and the most recent version runs bit-identical on more platforms than most other software ;-)
Seriously, there is something here that touches on Squeak philosophy. Official standards and product support are the enemies of change. Next to universal access, malleability is the prime figure of merit for Squeak. It is our intention for Squeak to evolve.
I once read a derogatory reference in comp.lang.smalltalk to Squeak's dependence on the whimsical enthusiasm of a couple of wizards. Who could ever make product plans upon such shifting sands?
The answer is simple: A Squeak release includes everything about itself, and probably 25% of the folks on this distribution list could maintain the any given version single-handedly for the next 20 years. It's better than being supported. It's having control over your destiny.
....just couldn't resist...
- Dan
squeak-dev@lists.squeakfoundation.org