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."
The parrot has voomed
The complete developerWorks "Cultured Perl" series:
-
A programmer's Linux-oriented setup
-
Application configuration with Perl
-
Automating UNIX system administration with Perl
-
Debugging Perl with ease
-
The elegance of JAPH
-
Genetic algorithms applied with Perl
-
One-liners 101
-
Parsing with Perl modules
-
Perl 5.6 for C and Java programmers
-
Reading and writing Excel files with Perl
-
Review of Programming Perl, Third Edition
-
Save it with Perl
-
Small observations about the big picture
-
Writing Perl programs that speak English
Another good developerWorks resource is this long list of well-written Linux Tutorials.the faq isnt done yet - click on a link at the top and go no where. the author of it forgot to post link tags throughout the document linking it to the toc at the top
The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
7. What language is Parrot written in?
C
8. For the love of god, man, why?!?!?!?
Because it's the best we've got.
9. That's sad.
So true. Regardless, C's available pretty much everywhere. Perl 5's in C, so we can potentially build any place perl 5 builds.
April Fool's joke can become reality. Remember not to make bad jokes next April. :)
Read more here
:)
Seems like a cool thing, I don't know much about it though.
-Vic
Parrot 0.0.3 was released way back on the 11th of dec, nearly three weeks ago.
If you want *new* news on perl/parrot, the latest parrot in CVS is now "fully-functional" (interpret that however you want.)
Software Wars
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.
A large number of perl web sites have been spammed with this. I consider the manner in which it's been done quite rude, as it has in no way been personalised, and is very "spam" like in appearance (i.e. it's saying that DeveloperWork's articles are of the highest quality - well they would, wouldn't they?).
I'm not disputing the quality of the articles there, just pointing out that this has gone to several places, and even been posted on a few sites. I didn't post it on the one I admin because it was totally impersonal.
Matt. Want XML + Apache + Stylesheets? Get AxKit.
- 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.
Nope. Borrow some of the ideas, certainly, but our JIT's hand-rolled.
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.
A very neat thing would be to support the Parrot interpreter in web browsers.
It would be a nice replacement for Java. I'd just love to write client-side web applications in Perl.
{{.sig}}
The Java VM is not a "stack based interpreter". First of all, it's not an interpreter. More importantly, the Java byte codes are restricted in such a way that they are trivially converted into a register machine. In fact, the "restricted stack" approach that both JVM and CLR take has all the efficiency advantages of register machines and all the compactness and simplicity of stack machines. Perl6's method is likely much inferior.
Moderators -- don't mod somebody flamebait because you disagree with them. The above was offtopic, maybe.
I happen to disagree with a lot of what the writer says, but I think he was making substantive comments, to which I think I can respond.
Perl is emphatically not an object-oriented language.
Perhaps true depending on the criteria you use, but over the years I've come to care a lot less about this kind of taxonomic issue and more about getting things done without a fuss. The question I'd prefer to ask is, does it support object oriented design? Personally, I'd probably go with Python or Java for a project requiring large scale OO design. However, serious Perl hackers get by pretty well in Perl.
Too many simple tasks are pointlessly complicated.
True, but many complex tasks are very easy in Perl too. A lot of language flamewars unconsciously adopt a desert island scenario: if you had to do ALL your work in one language, what would that language be like? Well, you don't have to get by with one language.
Perl is notoriously impossible read and maintain.
This is simply untrue. Speaking as a very occaisional and non-expert Perl user who has had at various points needed to maintain some fairly complex perl CGIs, well structured Perl is quite easy for the non-Perl guru to maintain. This is not to say there aren't subtle issues (e.g. confusing scalar and array contexts) that can't bite a newbie trying to add substantial new functionality to Perl software, but when code has been written by a Perl expert and it is well structured, Perl is in fact very easy to maintain.
If there is a kernel of truth to this myth, it is perhaps that Perl tempts the inexperienced to create obfuscated code. However, an experienced coder with good habits will produce highly maintainable code.
Perl attempts to be all things to all people and ends up being second-rate at everything.
First of all, Perl beats anything else I've tried hands down for doing filter type programs (i.e. transforming input streams). When you do a lot of this kind of thing, it's very convenient to have a tool that spans the range of complexity from things you would do in awk to things you'd use lex and yacc for. If this is the kind of work you do, then Perl is for you. If this kind of work is not what you do or is just a very small part of what you do, then Perl will probably seem somewhat pointless to you. However, you shouldn't expect your experience to be universal.
Secondly, IMO the fact that a language is general purpose (like Perl) doesn't mean it has to be the best, or even a very good solution for every kind of problem you can imagine. There are some languages out there which are fairly good for a wide variety of problems (Java comes to mind); that is an important niche. However there are niches for languages that are excellent at one or two things. These still need to support styles of work that may not be their strongest suit, however, because real world programs have to address a mix of issues.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Perl is emphatically not an object-oriented language.
And the biggest problem with Python is that it is too fundamentally object-oriented. Seriously. Lack of OO features in non-OO languages is a classic newbie complaint.
Too many simple tasks are pointlessly complicated.
You could argue the same for Python. In Perl, you can check for the existence of a file or use regular expressions with built in operators. In Python you have to import a module and work with the supplied API, which is much awkward than the Perl way. Both this argument and the "impossible to read and maintain" one can be leveled against *any* language, depending on the examples chosen.