Parrot Updates
BorrisYeltsin writes: "A couple of updates for Parrot are in a recent This Week on Perl 6, most imporantly Parrot 0.03 is out! Get it here , the release notes are here. Also Adam Turoff has got together the Parrot FAQ version 0.2 which addresses some of the more common questions about Parrot and Perl 6."
On a different topic, what about compatibility? Their FAQ says that, for instance, localtime will no longer return year-1900. Doesn't this break old code? They say there will be an automated Perl 5->Perl 6 converter, but it isn't going to fix stuff like year-1900...or is it?
Find free books.
- Java is not the only stack based interpreter out there - and is far from being a good example of one. Even ignoring FORTH which is a full blown language based around the idea, there's the UCSD p-System, and many propriety systems based on the same concept, most 8 bit computers during the eighties where implementations of other languages existed ran versions based on VMs because of processor limitations. Virtual machines are not that popular, so it's relatively rare to see them, and even rarer to see them entirely open.
- A stack based system has architectural advantages over a register based system. It may be the FAQ author considered them, but it'd be nice to actually see acknowledgement rather than an assumption that such advantages are easily explained away. Register systems have a finite structure which, ultimately, will limit the overall design of the end product and intrude into how efficient it can be. Stack based systems have no such limitations - a stack is a stack.
-
The 68000 emulator on the Mac is somehow proof that register based VMs are the way to go? I'd make a sentence involving the words "Smoking", "Guy", "Is", "Crack" and "This" but I suspect it'd get modded down as flamebait. Look, the 68000 emulator is nice but it's designed like that because it had to emulate another real world machine, not because that's the best way of doing a VM. And it had the considerable advantage that the PowerPC was designed to make such emulation fast anyway, Motorola/Apple/IBM put it together as a replacement for the 68000 and emulation of 68000 instructions without crippling the CPU itself was high on their agenda. Ever run UAE on an Intel CPU? You need to get into Pentium territory to get it to look like a damned A500 (7.1MHz 16-bit external data bus 68000). And yeah, the custom chip emulation is half the trouble, but it's not the whole story. It's slow. Dreadfully, painfully, slow.
Maybe all these issues were answered, but if you're going to put together a FAQ, a "Yeah, I thought of it, but those ideas suck, mine's much better, but I'm not telling you why, indeed, I'm going to use the worst possible examples to demonstrate how little research I did into this" answer isn't terribly inspiring.Adam might want to have a gander at gForth, which is a stack based system written in C, and runs a hell of a lot faster, in my experience, than any CPU emulator I've seen, 68000 or anything else.
You are not alone. This is not normal. None of this is normal.
First, let me admit a bias: I am madly in love with an APL like language called K. It has destroyed some unreasonable language biases I had in the past by being simply an amazing language. I have become used to the hyper operator concept, even though in K functions are called verbs and the hyper decorations are called adverbs.
/: is read each right
/ is read over and +/x is 6, or ': is read each pair and +': is 3 5.
My question is about how hyperness is applied to hyperness and how you make hyperness apply to only one side of the operator. Here are how you do things like this in K; are these possible in the new Perl? If not, these would be monumental omissions.
' is read each
\: is read each left
Given the lists x:1 2 3 and y:10 20 30 and value z:100
x+'y is 11 22 33
x+\:z is 101 102 103
z+/:y is 110 120 130
but these can all be done implicitly, so you really do not need the decorations: x+y, x+z, and z+y are fine. This allows you walk down only a single list, while aggregating results.
x+\:y is (11 21 31; 12 22 32; 13; 23 33)
x+/:y is (11 12 13; 21 22 23; 31 32 33)
Then you can also walk down the left then right sides of list by \:/:(left each right each).
You can walk down a list unarily:
There are other adverbs and they can be combined to modify each other arbitrarily. This winds up being an incredibly powerway to write programs. It removes the programer from the burden of flow control and compacts code enormously. Think of removing all the loops from your code and replacing them with a couple charcters, instead.