Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl6's future

Name: Anonymous 2011-02-16 12:29

Hai gais

What do you think will happen to perl6 ???

1) Will have the same fate as Haskell...
2) Python3's snake will eat the Perl6 butterfly
3) Only ParrotVM will be succesfull
4) Perl6 will become the new Java
5) faggot

Name: Anonymous 2011-02-16 12:30

FAGGOT. NO EXCEPTIONS

Name: Anonymous 2011-02-16 12:31

Will get more operators.

Name: Anonymous 2011-02-16 12:31

Perl is a joke language.

Name: Anonymous 2011-02-16 12:39

>>4
I use it everyday and i seldom laugh

Name: Anonymous 2011-02-16 12:42

>>5
Then you have no humor. Maybe you should get an operator for that

Name: VIPPER 2011-02-16 12:43

I have to go with 5.
Also i like perl fuck your shit.

Name: Anonymous 2011-02-16 12:48

>>5
Don't worry... it's not your fault, is just y'our /autism/

Name: Anonymous 2011-02-16 12:51

Future?

Version 1.0 will be released in 2020.

Name: Anonymous 2011-02-16 13:18

I've seen some horrible code in perl6. Nastier that perl5 line noise.


perl6 -e 'my @g = 0, 0; print "0.0"; loop { my %set;
            ++%set{@g[$_] +^ @g[* - $_ - 2]} for 0 .. @g/2 - 1;
            my $mex = first { !%set.exists($_) }, 0..*;
            print $mex; push @g, $mex }'


Took that from a perl6 blog aggregator

Of course, you can write it in a much clearer way, but we know that this profession is filled with smart asses that like to write code only they understand.

Name: Anonymous 2011-02-16 13:20

i vote for

5)faggot

Name: Anonymous 2011-02-16 13:26

>>10
It's actually not that bad, you can easily figure out what's going on.

Name: Anonymous 2011-02-16 13:35

>>13
I am criticizing it from the ENTERPRISE perspective. I am not saying the code is inneficient or that it does not work. But you should be able to say what it does just looking at it a few seconds....

This mess is one of the reasons why Perl5 is rejected on enterprise projects. I have seen project managers saying "No, perl is not allowed. Use something easier to read".

And lets face it. The enterprise is where programming languages reach their full potential. Of course they might be exceptions.

I would really like to see Perl6 reach the enterprise, big time. I like Perl5 a lot, but i had little luck using it into new projects.

Perl6 is just a specification. Maybe someone will come with some ENTERPRISE flavor, forcing some coding styles (or forbidding some stuff like +^)

Name: Anonymous 2011-02-16 13:37

(...continued)

Just one example

: replacing () ?

Why not stick with () ???

Name: Anonymous 2011-02-16 13:40

>>14
Maybe start enterprise programs with "use Enterprise" (for example) ?

Some kind of "use strict" that restrict certain language constructs...

Name: Anonymous 2011-02-16 13:43

2^4 GET

Name: Anonymous 2011-02-16 13:44

>>13
That code was not meant to be enterprise, we both know that. And project managers, well, I won't get into that, but it is not hard to write easy to read Perl.

Name: Anonymous 2011-02-16 13:47

>>13
+^
Is one of the best things about Perl6. It's clever and innovative. If you want to trend towards ENTERPRISE you will always end up with something strangely similar to Java. NO EXCEPTIONS. So why even to try?

Name: Anonymous 2011-02-16 13:48

>>15
Nothing is stopping anyone from making a module for that. You won't get it as a normal pragma but then again, who wants to have enterprise coding practices shoved up is rear? We have Java and Sepples for that and they do it well.

Name: Anonymous 2011-02-16 13:52

Newbie here

WTF is +^ supposed to do???

Name: Anonymous 2011-02-16 13:53

>>20
I have no fucking idea. I also do not code in Perl so that's why, but still.

Name: Anonymous 2011-02-16 13:56

>>20
Also, sage is considered poilte on /prog/.

Name: Anonymous 2011-02-16 14:48

>>20
The point is there are tons of operators in Perl6. And I mean TONS. For everything.

http://perlcabal.org/syn/S03.html

Name: Anonymous 2011-02-16 14:54

>>23
Perhaps the Periodic Table of Operators should be updated?

Name: Anonymous 2011-02-16 14:58

Perl6 even has the kawaii operator: ^..^. Can your toy language be as kawaii as that?

Name: Anonymous 2011-02-16 15:07

>>25
Ore no rispu ga konna ni kawaii wake ga nai.

Name: Anonymous 2011-02-16 17:09

Seriously, who the fuck can read Perl. I'm not even joking. People just like it so they can show how OMG clever they are. Enterprise programmers laugh at YOU.

Name: Anonymous 2011-02-16 17:23

Perl - Write once Read never
Perl 6 - Write once Read operators!!!

Name: Anonymous 2011-02-16 17:43

It certainly has lots of operators, but Perl6 is a necessity for any "Modern Perl" developer. In my opinion, the amount of operators is a little detail compared with the conceptual improvements of Perl6. The type system, roles, junctions, etc can't be bad for any programmer.

Moose did a great job giving Perl a good OOP syntax, but something better is needed.

So, Perl6 as a replacement for Perl5+Moose is very good, IMO.

I can't wait to have a 1.0 version. I'm still playing with Rakudo Star, though

Name: Anonymous 2011-02-16 18:13

Perl 6's idea is almost perfect: It's Lisp with braces. You can do what the fuck you want with the language, define new operators, it has macros and other ``abstract bullshite''.
Perl 6 fails for being FUCKING BLOATED. It should be a ``small'' core: macros, a way to define operators, some basic data types and some basic operations to use them, classes, junctions, pattern matching and the Perly stuff (regexen, grammars, etc). Then let the user build on top of that core.

Name: Anonymous 2011-02-16 18:56

>>10
In most languages you can put more than one instruction on a line and ignore indentation and the code will look exactly the same as the snippet you posted.

Name: Anonymous 2011-02-17 0:30

>>10,13
All bets are off when it comes to -e. The only virtue here is you can cram it all in. The formatting provided is terrible, but it has nothing on your average IOCCC loser. See >>31.

>>14
You can use either. There's a good reason to use colons though:
@list.reduce: {
    #comlex multiline recucer function
}


Seeing the likes of ({ ... }) in javascript is so bad and so common I had to change my font.

>>20
It's just bitwise negation, but with arguments explicitly coerced to Int first. It's not too hard to remember, since prefix + explicitly numifies objects and is generally used for numeric context.

>>29
I'm still playing with Rakudo Star, though
You'll be a lot better off in April. A new GC is coming with serious improvements. My tests show it's much faster for real programs and is much better at keeping memory usage low. A program I had which triggered a degenerate case in the old GC consuming ~3 gigs, now seems to level off at about 130MB.

There's also improvements to the object model which will apparently speed up just about everything by a great deal.

>>30
What exactly would you take out? The setting? If so: what do you think is stopping you? Still too much stuff in? Try nqp maybe?

Name: Anonymous 2011-02-17 3:09

>>32
Tell me more about your experimental programs.

Name: Anonymous 2011-02-17 3:24

>>33
The one that caused massive memory usage? It was just doing a lot of recursion. It wasn't tail-recursive, and it was not all that well written anyway. I kept it around for benchmarking purposes, since it made such a lovely mess of the GC in a way that shouldn't have been nearly such a problem.

Name: Anonymous 2011-02-17 7:23


1: my @g = 0, 0;
2: print "0.0";
3: loop {
4:   my %set;
5:   ++%set{@g[$_] +^ @g[* - $_ - 2]} for 0 .. @g/2 - 1;
6:   my $mex = first { !%set.exists($_) }, 0..*;
7:   print $mex;
8:   push @g, $mex
9: }


I'm just joining this thread.... I've ordered the example in >>10... and i think it's still a little complicated. For example, what happens in line 5 ? I've read the answer about +^ but the @g[* - $_ - 2]} got me. How can you write it in a more C-like way?
Line 6 is too a mystery for me... Is the "first element that ???? in the range 0 .. Infinity" ?

Please perl6 fans, enlighten me.

Cool to see interesting threads like this in /prog/ once in a while

Name: Anonymous 2011-02-17 7:26

bump this shit

Name: Anonymous 2011-02-17 7:46

"PERL" is an acronym for "Job Security Through Obscurity".

Name: Anonymous 2011-02-17 9:02

>>35
I'm not by any means a proficient Perl programmer, so take it with a grain of salt.

$_ is like a shortcut for an unary anonymous function:


>(1,2,3).map: sub ($x) {$x + 2};
3 4 5

sub ($x) {$x + 2}; -> sub ($_) {$_ + 2}; -> {$_ + 2};

>(1,2,3).map: {$_ + 2};
3 4 5


{$_} for 0..*; is just an iteration:

>{say $_} for 0..10;
0
1
2
3
4
5
6
7
8
9
10


@g[* - 1] is a ``reverse" indexing:

>my @g = 1,2,3,4;
1 2 3 4
>@g[* - 1];
4
>@g[* - 2];
3


So in line 5 we are doing a lookup on the %set hash and incrementing values:


>my %set = {1 => 1};
1    1

>++%set<1>;
2

>%set
1    2


Line 6 is simple. first takes a block and an array or a sequence and returns the first element from the sequence for which the block evaluates to true:

>first {$_ == 10}, 3..*;
10

>first {$_ % 2 == 0}, 3..*;
4


%set.exists($_) tests if hash has the given key. ! is negation, so first { !%set.exists($_) }, 0..*; means return the first number from the 0..* sequence that is not the key in the %set hash.

Hope it was clear.

Name: Anonymous 2011-02-17 23:41

>>38
To be clearer, $_ is a topical variable, in this case containing each of 0 .. @g/2 - 1 in each pass of the for loop; where @g/2 is half the length of the array.

@g[* - $_ - 2] is an index into @g, $_ elements prior to the second last element (i.e. @g[* - x] counts back from the end of the array), for each $_ in the for list. The code is easy to understand (if you know Perl 6) but slow to follow.

You got the first/.exists stuff right on.

Name: Anonymous 2011-02-20 6:13

Perl 6 fails for being FUCKING BLOATED. It should be a ``small'' core: macros, a way to define operators, some basic data types and some basic operations to use them, classes, junctions, pattern matching and the Perly stuff (regexen, grammars, etc). Then let the user build on top of that core.
There is such Perl. It's called Not Quite Perl: https://github.com/perl6/nqp/

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List