Earlier quoted context omitted.
That's really cute. I hope, however, that you can understand from the POV of somebody who keeps being driven off ruby by ruby being too much work, that "you could make it less work by first porting all the perl5 libraries that make perl5 OO more pleasant" isn't really a convincing solution :)
For what it's worth, the `prepend` API in Ruby, which I advocated for back when I was working on Rails, works pretty nicely: https://gist.github.com/wycats/0a354a96d00d47fa4e04
Larry Wall Unveils Perl 6.0.0
321–330 of 336 posts
Re: Larry Wall Unveils Perl 6.0.0
#322Earlier quoted context omitted.
Wut? I just complimented the code you posted, and changed my mind from "the unconstructive guy upthread said trivial, which it isn't, but steve's been kind enough to give me enough information to see it's trivial if I write a port of CMM, and said port is basically identical rather than requiring the crappy alias approach". I've genuinely no idea why you think I was being condescending.
Hey! Just woke up to this. Sorry, it seems as someone else mentioned, That's cute, but $FOO. is seen as really condescending here. It's literally diminutive, suggesting that something might be small and pretty, but not worth adult consideration for Real Stuff. Anyway, if that's not how you meant it, I completely understand. Text is hard. No harm, no foul. Sorry for misunderstanding.
On the other hand, the thread started off with "I've already got stuff in perl that does X and it looks like I'd have to write it myself in ruby", then somebody replied with "this already works in ruby, just use alias" then when I provided an example that wouldn't you showed me how to write a library to support said example in ruby.
So I now know much better 'how to write it myself in ruby', and I am genuinely grateful for that, but it still wasn't an answer to the original question so 'cute' seemed like the appropriate compliment.
The actual answer I was looking for seems to be "people who're bad at ruby will always suggest alias, prepend will handle some cases, and then you can write not that much code if you want the other cases, but there's no perl5+Moo quality experience to be had without implementing at least part of it yourself".
Which is totally fine by me, I just need to talk somebody better than me at ruby into implementing it and then try and convince everybody to upgrade :D
(also, if you have a suggestion for a word other than cute that would express "really pretty even though it doesn't answer the question" while seeming positive rather than negative about this fact I'm all ears)
Re: Larry Wall Unveils Perl 6.0.0
#323I haven't looked, but I really hope Perl 6 held on to the 50 different ways to do any one thing. Pulling out my hair in frustration from trying to deal with Perl written by other people saved me all manner of haircut money in the 90s.
Re: Larry Wall Unveils Perl 6.0.0
#324Earlier quoted context omitted.
So what is the advantage of using a language that is hard to learn and hard to understand?
It's hard to learn, but not necessarily hard to understand. That hard learning experience theoretically pays dividends in productivity later as you and more succinctly and quickly express your intent.
Re: Larry Wall Unveils Perl 6.0.0
#325Earlier quoted context omitted.
If you have globals, nulls, gotos, or whatever dangerous (but sometimes useful) features (e.g. states); surprise surprise people will end up using them at one time or another. Perl is not the first nor will it be the last (imperative) programming language helps people fail too easy.
Double check me on this, but Perl 6 doesn't yet have a goto statement, nor does it have globals.
Re: Larry Wall Unveils Perl 6.0.0
#326Earlier quoted context omitted.
Regexes are really easy in Ruby as well (which cribbed a lot from Perl). There's an OO syntax, but also support for the Perl built-ins so this works fine in Ruby: print "match" if something =~ /thing/i Captures with $1 etc. are there as are named captures using the same syntax in the regex.
The regex sublanguages and engines in Ruby and Python are knockoffs of the equivalents in earlier Perls. But this thread really ought to be focused on Perl 6. In Perl 6 one can write: print "match" if something ~~ / / It looks superficially similar. But it's a scalable parsing feature, not a mere regex. That line of code will work when `something` is ten thousand lines of complex Perl 6 code and `thing` is the top ru…
Re: Larry Wall Unveils Perl 6.0.0
#327Earlier quoted context omitted.
The regex sublanguages and engines in Ruby and Python are knockoffs of the equivalents in earlier Perls. But this thread really ought to be focused on Perl 6. In Perl 6 one can write: print "match" if something ~~ / / It looks superficially similar. But it's a scalable parsing feature, not a mere regex. That line of code will work when `something` is ten thousand lines of complex Perl 6 code and `thing` is the top ru…
I was showing Ruby code to show how its regex handling is much like Perl 5 - Perl 5 would use a sigil on 'something'. Ruby is less like Perl 6 regex-wise due to the smart match (among many other things).
In both Perl 5 and Perl 6, smart match (`~~`) with a regex on the right hand side is just an alternate spelling (Perl 5) or correct spelling (Perl 6) for `=~`. It's a tiny, trivial difference.
But a Perl 6 "regex" can be an arbitrary full blown parser or compiler. And it assumes character=grapheme. In these two regards, as in several others, Perl 6 is quite unlike Perl 5 and other langs that adopted Perl 5 regexes and/or that adopted Unicode codepoints (or worse) rather than graphemes as their fundamental "character" unit.
Re: Larry Wall Unveils Perl 6.0.0
#328Earlier quoted context omitted.
Hey! Just woke up to this. Sorry, it seems as someone else mentioned, That's cute, but $FOO. is seen as really condescending here. It's literally diminutive, suggesting that something might be small and pretty, but not worth adult consideration for Real Stuff. Anyway, if that's not how you meant it, I completely understand. Text is hard. No harm, no foul. Sorry for misunderstanding.
Ok, so, on the one hand, I wasn't trying to be condescending, which is why I didn't say 'but' after 'cute' - the 'cute' was a genuine compliment. On the other hand, the thread started off with "I've already got stuff in perl that does X and it looks like I'd have to write it myself in ruby", then somebody replied with "this already works in ruby, just use alias" then when I provided an example that wouldn't you showe…
I sat on it for another evening, but I'm not sure of the best word for you, to be honest.
Re: Larry Wall Unveils Perl 6.0.0
#329"If that's what it takes to make Ruby programmers happy..." Completely brilliant.
It's unnecessarily condescending, especially given that Ruby got `?` and `!` suffixes from Lisp, which far predates Ruby, and that Ruby itself is in many ways a descendent of Perl.
The "worst" I could imagine is that he was poking a little fun at Ruby programmers. I'm sure he was just trying to be funny, but sometimes it's easy to misinterpret what people mean when you don't actually hear them say it, but only read it in print.
I'd be very surprised if the comment was at all malicious.
Re: Larry Wall Unveils Perl 6.0.0
#330I honestly did not expect to see the day Perl 6 gets finished. This must have been one of the most difficult - if not the most difficult - births in the history of programming languages. At work, I have been using Perl 5 increasingly often over the past two years, mainly because handling unicode in Python 2 is not a lot of fun (and I still haven't come around to learning Python 3), and I have rediscovered why I used…
Unfortunately unicode in Python 3 is not necessarily better. See http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ .
Even in Perl's supposedly superior support has issues. See how deep the rabbit hole goes by reading the first response to the question here:
https://stackoverflow.com/questions/6162484/why-does-modern-...
There is really no way for a simple program to account for all of those possible edge cases. Something as simple as a print of a string can be a minefield depending on what is in those characters. And it's not like the old days where you could safely filter out all non-printable characters to avoid most problems. Have you considered how your formatting is going to look when people intersperse Right to Left words in your output for example?