First Perl 6 Book is Out
prostoalex writes "O'Reilly Publishing presented Perl 6 Essentials, the first book to be dedicated to Perl 6, at the beginning of this month. Looking at the table of contents, it hardly looks like a valid replacement for Llama or Camel books. Chapter 1 is available online. The whole book is available to Safari subscribers." I'm sure we'll review it sooner or later.
PERL is dying, just like BSD. That is why no one is posting on this thread.
Perl 6 aint even out yet. Of course its no camel yet. This is just for those people who HAVE to know what's going on in perl 6 dev.
Photos.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goatse. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD ^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.
Wouldn't you instead need to see the cover to determine that?
"it hardly looks like a valid replacement for Llama or Camel books"
..." is a discussion and tutorial on a topic, intended for beginners ..." is the same, but for intermediate and advanced users
It's not supposed to be. Just as they have conventions for the books' color (e.g. Perl blue), O'Reilly and Associates has conventions for the titles.
* "... Essentials" means an overview of what's new.
* "Learning
* "Programming
* "... Cookbook" is a series of problems and their solutions
* "... in a Nutshell" is like a language reference
* "...: The Definitive Guide" is a combination of all four
* "... Pocket Reference" is a shorter version of the above
Joe
http://www.joegrossberg.com
That's not a "design mistake", it's just a major feature that hasn't been added yet. This will be remedied in a future version of Ruby.
A "design mistake" would be something error-prone and impossible to fix, like Python using indentation as part of the syntax.
No, it's more like "show how the cart is being designed so you can help build it and/or begin to use it with the perl6ish pragma in perl5".
Mark Erikson
I had a look at it and found that this book deals way too much with Perl 6 assembly (somewhat like the IL code from .NET) rather than concentrate on what's interesting: OOP and new syntax.
Seriously, wo is going to use Perl to program bytecode assembly.
Homepage
is there...
-- search the web
Maybe there'd be more women around if you showed them a little respect.
how to invest, a novice's guide
But why? Are there really enough interested
people to justify a book about ~planned~ changes
to Perl? Yikes. I really don't understand most programmers.
Why not print the O'caml book: Developing Applications with Objective Caml
(the ICFP contest champ).
-> Ron Legere I can never think of anything clever to put here.
That's not a "design mistake", it's just a major feature that hasn't been added yet. This will be remedied in a future version of Ruby.
First, it hardly matters whether it is "just" a design mistake or a missing feature. If he needs the feature and it isn't available, he can't use the language. Second, Unicode tends to have all kinds of implications deep into the implementation of a language. They touch reflection, language syntax, regular expressions, file system, pickling, I/O etc. You can call it "just" a "missing feature" but it is one big feature. I would be surprised if Ruby got proper (i.e. integrated) Unicode support before the pretty major rewrite that will also add native threads.
A "design mistake" would be something error-prone and impossible to fix, like Python using indentation as part of the syntax.
Yeah, many people who have not tried it say that. Turns out that it is less error-prone because it eliminates a whole class of bugs that result from parens that do not follow the indentation.
It is nice to see a language designed by linguists rather than mathematicians or engineers. Typical Slashdotters will scoff, but suffice it to say that Shakespeare did not write in Scheme :)
A deep unwavering belief is a sure sign you're missing something...
The problem with that is that a lot of developers like myself have grown up with Fortran -> C -> C++ -> Perl -> Java, or some similar progression. We don't have a problem matching parenthesis. In fact, any decent text editor or IDE will help us match parens and get the indents looking the way we want them to. Hell, even vi can do that if used correctly!!
It's not like there is nothing else in modern scripting languages that the python folks could have tried to fix. Why go back to the archaic practice of giving whitespace semantic meaning??
From the abstract it is clear that this book is intended to describe the Perl 6 project including the reasons for rewriting the language, the desing philosophy, some of the roadblocks along the way, etc. It sounds like a real interesting read for those who are interested in the process of designing and implementing a full scale computer language, regardless of how you feel about the particular results.
When I pick up some Python code that's space-indented and edit it in my text editor with 3-space tabs, the Python compiler's going to magically guess that my tab-tab is equivalent to 6 spaces, is it?
If you use tabs consistently for indentation, then it doesn't matter what you set them to, the Python code will remain valid and its meaning won't be affected.
If you mix tabs and spaces, you need to use the same tab setting as the original author anyway or the code will look like garbage.
The flip side of your problem is: what if changing the tab setting makes you misinterpret your code by changing the indentation to be inconsistent with your actual block structure?
The short answer is: you shouldn't change the meaning of hard tabs--it causes lots of other problems. Just use a decent text editor that indents correctly with spaces and standard tabs. Almost all of them do these days.
And, no, this just isn't a problem with Python. Space-based block structure may seem weird, but it works quite well.
Everyone knows Perl is just for poetry...
o et ry
http://www.perlmonks.org/index.pl?node=Perl%20P
for(1): # indented three spaces
for(2): # indented two tabs
for(3): # indented six spaces
for(4): # indented one tab
Quick quiz: Which lines are in which blocks?
Followup: How was I supposed to know that looking at the screen?
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
That's the problem, though. There's no such thing as "standard" tabs.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
In a year, a woman goes from being virtually unknown to a core member of the Perl 6 design team, president of the Perl Foundation, a speaker at several conferences, and an author.
This news goes public, and the first thing a few people want to talk about is her breasts. When confronted about this, the excuses are "Oh, you're just being too sensitive", "Women like being noticed", and "If she doesn't like it, she shouldn't hang around here."
I'm sorry, but I really don't see any appreciation for Allison's abilities or for her as a person in those comments.
how to invest, a novice's guide
Actually, I believe that as long as all the lines at a given level are indented the same, the actual amount of indenting is irrelevant.
Unless it's new, that's not true. My first experience with python was copying a script from a webpage, putting it in a file, and getting a runtime error.
Turned out the browser had stuck five spaces in front of each line. I went through and pulled the whole text block to the left so that the leftmost line was in column 0 and it worked properly.
Maybe it has been fixed and there's just alot of animosity from people who tried it too early.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Parrot (the Perl 6 VM) is a classic case of Second System Syndrome.
1. Develop VM before knowing what Perl 6 language will look like or what it requirements will be.
2. Claim VM will support all interpreted languages known to man, yet the only language that runs on it is a crippled version of Basic. The other (non Perl) languages will require custom C code defeating the point of having a VM in the first place.
3. Piss away $200K in grant money and have nothing to show for it 3 years later. Gee, why isn't anyone contributing anymore?
4. Threads? We'll worry about it later.
5. Objects? Too tricky for now.
6. Function calling convention - we'll get it right one of these years.
Guys, time to put the horse in front of the cart and get back to the business of writing Perl 6 or Topaz or whatever it is called these days instead of trying to rule the world with Parrot.
And if Allison doesn't post in this thread, it's not because she's thinking "great, men are finally noticing women's bodies and commenting publicly on them". It's because she's off working on open source.
If anyone wants to talk to me about this at OSCON, I'd be happy to explain more forcefully just how much this coward's comment pisses me off.
--Nat
you're right. However, tab size is taken as 8 spaces, but your example works (except for(1) in python isn't right, it works the same).
Besides, python supports both indentation block delimitation AND parentheses-like block delimiters.
just use #{ and #} (should be at the end of a line)
or you might use #[ and #]
or even # and #
You can in fact do this with plain old Perl 5 regexes, as follows - to quote from Jeffrey Friedl's excellent Mastering Regular Expressions, 2nd Edition, p. 328-331:
This dynamic regex matches text within an arbitrarily-nested set of nested parentheses, by recursively 'calling' the compiled regex $LevelN from within itself - the left hand condition of the alternation is the exit condition. It works in Perl 5.6 or higher, maybe even earlier - just tested it.
Of course, Perl 6 makes this sort of thing much easier and has a built-in Parse::RecDescent feature within regexes, but the overall complexity of the language is quite scary. I'm looking at OCaml, which is higher level than Perl (though with some features in modules and less syntactic sugar) and almost as fast as C/C++. It's also functional and OO, more details on my OCaml page
A "design mistake" would be something error-prone and impossible to fix, like Python using indentation as part of the syntax.
That is not a "design mistake." Python was not originally meant to be a production language, it was meant as a teaching tool and as a teaching tool it used the whitespace block delimiters/quantifiers as a way to force programming newbies to learn to write readable code.
Dear sir, you are sad
remove your hands from your pants
and grow the fuck up
Don't give me none of this "nature theme" business.
Actually, this is one place where I think ruby is ahead of your average scripting language currently in the not-yet-supporting-Unicode state. The whole reason that Ruby exists (as in, the original itch the creator was scratching) is that when it was created, existing scripting languages handled Japanese exceedingly poorly. As a consequence, ruby has never been developed in a "all the world is ASCII, and what isn't is latin1" environment. This gives me hope that it will be much easier to add unicode support to ruby than you might think.
Actually, this is one place where I think ruby is ahead of your average scripting language currently in the not-yet-supporting-Unicode state.
What scripting language doesn't support Unicode? BASH? Python, Perl and JavaScript all do.