StuChat 33...
Ok, so ijiut of the week award goes to moi for the following (as pseudo code):
if mouse over close/open status bar button
AND status bar is open,then print in status bar "Close Status bar"
break
if mouse over close/open status bar button
AND status bar is closed,then print in status bar "Open Status bar"
break
Doh! ( You may have to read it more than once to see why it's funny).True story folks. I coded it, ran it, then slapped myself hard on the forehead. Rob also did a funny this week, but I'm not allowed to talk about it lest he gets too upset. He's also like a fifth platinum belt in Kung Foo (or something equally similar) and I'm not.
Cats: We now have four, which is probably a little excessive, but that's life. We inherited two more, both girls. Patch is the only boy cat in the house, which has been fine up until now. Unfortunately he's just realized he is surrounded by three girl cats and now insist on being rather Ramboesque about everything. The funniest is when he goes to the toilet. He used to just wander out the garden, tooty down, have a quick wee and rush back into the house, cause it is a bit cold. Now it has to be this big dancy, macho, spraying affair which he hasn't quite perfected, 'specially whilst standing on the fence, the top of which is about an inch wide. Falling mid-spray really isn't very cool at all. Pretty funny though :)
I wonder how long he's going to keep it up? "The girls", lead by Fluffy, just treat him with contempt.
Quickly on to more sensible things me thinks...
OS8.5
I was going to have a complete and utter rant about the major
slow down in graphics primitives in this update, but I won't.
Life is too short. I won't be running it. I'll stick with my speedy
8.1 even if the file copy is slower. And on top of that, they've
removed what could have been my favorite addition - the Techno
theme, which I think is the greatest thing since the ZX81. Considering
8.5's QD is native, how come DrawChar and related functions is
some 50% slower than 8.1 on both my vid cards?
Bit Clearing
Someone asked, just recently, how to do a bit clear. Below is
a macro, bitclr, you can use that assumes that bit 31 of the register
is the leftmost bit and bit zero is the right hand bit. It works
by creating a negative AND mask, so that the bit to be cleared
is zero, and all the other bits are set to 1. The rotate count
is zero. There are two special cases, clearing bit zero and clearing
bit 31 taken care of by the conditionals.
bitclr: macro bit2: set 31-\2 ifne bit2 ; not bit 31 ifne \2 rlwinm \1,\1,0,bit2+1,bit2-1 else rlwinm \1,\1,0,0,30 ; special case - bit 31 cleared endif else **clear bit 31 rlwinm \1,\1,0,1,31 ; special case - bit 0 cleared endif endm
Usage example:
bitclr r3,1
So, what's been happening then?
Fant 6 and Anvil 3 are coming on nicely, indeed it's probably
fair to say that all the major work is done. The main aim with
Fant 6 is to get it working faster, so it's got it's new memory
manager and doesn't use any system memory anymore. Haven't got
the new evaluator in yet, but as it's all written (and has been
for a while) it isn't a problem - just a matter of finding a spare
day somewhere to plug it in.
Most of the changes have occured in Anvil and Build. Build has gone three stage so it can control up to three build phases, like a compiler, assembler and linker. The tool architecture has changed, so old Anvil 1 & 2 tools are not compatible, and the layout on disk has changed, so what was "Anvil Project Binaries" is now "Anvil Project Bits". All transparent to the user of course.
A largish new bit is "universal language support" - whereby Anvil can work with any language via what are called LDF's, or language definition files which are compiled by Anvil at boot time. These tell Anvil how to deal with a given file, how to syntax colour it, and where it can go in a project etc. It also means users can tweak the syntax colouring to a great extent, or create their own from scratch. We currently have PPC and 68K assm, C, HTML and ECL defined. Believe me, when I say a simple HTML definition took all of 1 minute to write and gives basic tag based colouring. This also means the chroma engine is completely new, and as such runs a lot leaner than the old version, even though it now has to deal with obscure commenting conventions (i.e. any in the world, not just assembly language).
Themes are also fully supported - not much help in the way of programming usefulness, but very nice nonetheless, and drag and drop is poking it's nose in - for example you can now drag a bunch of files from the Finder onto a project window and Anvil does the right thing. The prefs have been rewritten and grouped into panes and there are now lots more of them.
On the tool front, there are two versions of ECL, one outputs a source file and the other an object file. The source file from the text version can be added to the project for hand tweaking/further work and Anvil does the right thing when building with regards the state of the source. ECL is just a test compiler so don't take it too seriously :)
Here's a picture:
This is an assembly language project, indeed it's the venerable Eclipse. Some new stuff here; first note the syntax colouring, it's now much easier to identify instructions by execution unit, so all FPU instructions are one colour, branch unit another, AltiVec another etc. It's also easy to add colouring for your own macros and things. Another nicety is the blue line down the side of the project window - this indicates the active project, which helps a lot when you have five or six open simultaneaously. The bottom left of the source window shows the language of the file, which is useful when mixing languages in a project, and whether the file is locked or not. Areas in a project are now colour coded to make differentiation easier, and files that are open from the project are indicated by a small blue arrow. You can now search for files in a project by pressing the first letter of the name, but unfortunately you still need to click the mouse to open them (the double flash is gone), but I hope to fix this soon enough, so you can use the open command from a project window.
The status bar has gained a new area, the three little buttons; these are plugs. In Anvil 3 a plug can define an icon and get itself loaded into a plug "stack". The top plug on each stack are shown as buttons and can be either clicked (or modifier clicked to move them about and set their prefs) or can be operated by function keys 1 to 3.
The button with the green square is interesting. There are a few of these (three at the moment). They are "menu plugs" and can be configured to activate any Anvil menu command, so you can assign one to comment out text, or bring up a file's preferences or flick the CD forward a track. Usefully they can also select stuff out of the Apple menu, so your calculator or Think Ref. (or anything else in the top level of the Apple Menu) is just a function key or mouse click away.
The next picture shows a project window never before seen - one with high level areas:
This also shows Anvil running under a theme (just for kicks). In this project, the output of the compiler (ECL in this case) is as a source file, which is then assembled by Fantasm, with possibly other assm file, before being linked. You could add the file output from the compiler to the project and tweak it. If the HL file that generated the assm was retranslated whilst you had the assm open, Anvil would tell you you've blown it and maybe you'd like to save your assm file somewhere as it's out of date :)
Another major change is the availability of AIT's, or Anvil Interface Tools. These translate Anvil commands and pretend they are something different. Uh? OK, how about a MrC project being built by Anvil - the AIT translates from Anvil to MrC and back again and of course deals with all the dependencies and other niff-naff and trivia that needs to be dealt with, automatically. MPW's great, but yucky on large projects, so we let Anvil do it for us. You just hit Build and it gets done. MrC is pretty much fully integrated. This is a great way for us to test the new build manager. There are AIT's for MrC and PPCLink. SC and the MPW's 68K linker also have AIT's but they are not supported.
Scary huh? In this case, Anvil
is using Apple's MrC and PPCLink to build the project via the
AIT's and ToolServer. The project is controlled and managed just
like a normal Anvil project. The prefs are also handled by
the AIT, so it's pretty easy to use - MrC looks just like a normal
Anvil tool. Errors are handled in the normal fashion, with the
AIT translating to Anvil format. This actually requires some heavy
duty file manipulation as MPW is file based, whereas Anvil is
memory based, but hey, who said life was easy.
With regards to the general things, Anvil 3, whilst generally
more busy, is usually faster than Anvil 2, thanks mainly to a
new command processor which is far more efficient than previous
versions. So, not only is building faster, but Anvil too gains
a beneficial speed up in many areas as it too calls the command
processor.
Some hard speed figures for a project that produces about 52K
of code (best of three runs):
Anvil 2 / F5.2x (10 Meg partition): Rebuild Eclipse - 7.48secs
Anvil 3 / F6 (10 Meg partition): Rebuild Eclipse - 4.82 secs
I expect Fant 6 to get faster over the next few weeks.
There are many features that make life easier, for example remembering the last project open (this is better than it sounds), easily retargeting a project, build info in the status bar, source file out of date warnings, better (and more whizzy) project verification, better at finding files when opening a moved project, yada yada yada.
Because the build management in Anvil 3 is rather complicated, and we want to make something that's nice to use, this will be going out for test much earlier than normal and you can probably expect to see many beta versions, indeed, even before development has finished, which it hasn''t yet. Still to do is more drag manager stuff, some AE bits, change the project templates and some minor patch throughs and tidy ups. All relatively trivial.
(Oh, and don't worry, the Stress-o-meter isn't gone, just turned off in these pictures).
If you have any comments, or questions, just let me know.
Till the next time,
Code on!
Stu.
©Lightsoft/Stuart Ball 1998.