Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
masak
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
masak
16y ago
Frankly, so was I. I'll get back to you on that.
32.
▲
by
masak
16y ago
No, that's too easy a cop-out. :-) How would you stop at the right number in Python code? Would you compute 100 numbers and then inspect/truncate afterwards?
33.
▲
by
masak
16y ago
I could manipulate physical nature if I only learn mathematical notation, but at what cost? Here's the thing: I like Perl 6 because of the abstractions it gives me. In fact, I like learning new programming languages because of what I learn
34.
▲
by
masak
16y ago
Correct me if I'm wrong, but that code prints 100 fibonacci numbers, whereas the Perl 6 code prints all fibonacci numbers up to, but not including, 100.
35.
▲
by
masak
16y ago
By all means. my @fib := ...; Bind something to an array variable. Assignment tends to follow infinite lists into the abyss. (But would also work, in this case, since the list is lazily evaluated.) 1, 2, *+* ...^ * >= 100
36.
▲
by
masak
16y ago
One post like yours, sir, makes it worth trawling through a hundred posts by churlish detractors. Thank you.
37.
▲
by
masak
16y ago
The difference isn't more subtle than the difference between $x + $y and $x - $y.
38.
▲
by
masak
16y ago
Yes; just go to the #perl6 channel on freenode, request a commit bit, and edit it out of the spec. For this particular change though, I think you will meet a bit of resistance. Many people might agree that the feature is goofy, but few will
39.
▲
by
masak
17y ago
Perl 5 has many other sides apart from the context-dependence. To mention a few, the regex sublanguage is deeply integrated into the rest of the language, there's an active and versatile testing culture, and CPAN hosts 17k modules for count
40.
▲
by
masak
17y ago
Ah, I see. Thank you. No, the reason for the word 'flip' being used is not due to a bizzarre Perl idiosyncrasy about context-based evaluation -- quite the opposite. Note that the change to using 'flip' is in Perl 6 only (this is not one of
41.
▲
by
masak
17y ago
I think you're right. My comment would probably have been better served without that last sentence. Allow me to apologise for that one, rather than stand by it. But even regardless of the HN guidelines, I am curious: why does tptacek cons
42.
▲
by
masak
17y ago
> At least "flip" is just a very dumb name. It's funny. I just registered on HN, and on my way in I took the time to read http://ycombinator.com/newswelcome.html where the expectations on comments are outlined: "What we especially dis
43.
▲
by
masak
17y ago
Hah, then I grok your initial reaction better. :) There is actually a class in Perl 6, called Buf, for when you want to talk about a sequence of bytes rather than a sequence of characters/graphemes. Buf is array-indexable; in fact it works
44.
▲
by
masak
17y ago
Sir, I have a frivolous data point for you. It's from a blog post I wrote shortly after the change from 'reverse' to 'flip' for strings (< http://use.perl.org/~masak/journal/38800 >): "Strangely enough, nothing happened when clicki
45.
▲
by
masak
17y ago
Oh, believe me, constructs in Perl (both Perl 5 and Perl 6) mean different things depending on context, too. :) As a simple example, which you'll find in various languages, not just Perl: brackets ('[ ]') construct list objects when standin
46.
▲
by
masak
17y ago
If I may try to briefly explain/defend the naming as well as expand on the need for it... In Perl 5, 'reverse' did all of the three things: it reversed strings (in scalar context), or lists/hashes (in list context). The latter two weren't r