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

Pages: 1-4041-8081-

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/

Name: Anonymous 2011-02-20 6:14

Name: Anonymous 2011-02-20 18:16

I don't give a shit about Perl. I can use Python, Ruby, Common Lisp, Scheme, Haskell, even JavaScript, if I want to script. People building real applications (not scripts -- what does ``script'' mean? It's one of those we all understand but can't directly define...) will use a decent high level language, not that steaming pile of shit. Apart from the grammar needing an AI to be parsed, generally being a big stack of special cases that a well-defined core could make trivial, it breeds write-only programming.

I hope that Perl and PHP will be replaced in web development and sysadmin scripting in the next ten years. It seems the failings of Perl 6 will help it along out the door and it will become irrelevant. It has metaprogramming capabilities but so do most languages. I don't even know why they are bothering.

Name: Anonymous 2011-02-20 18:29

>>42
Alright, we get that you're dumb.  That's fine, there are plenty of dumb people and they get along alright.  The question is: why do you want to hang out in a programming community when you don't have the intellect for it?

Name: Anonymous 2011-02-20 18:29

<-- that's cool and all, but check 'em

Name: Anonymous 2011-02-20 18:34

>>42
has metaprogramming capabilities but so do most languages.
Like Ruby, JavaScript and FIOC? No.

Name: Anonymous 2011-02-20 19:33

>>43
Do you have something more interesting to say than "you're dumb"?

Name: >>46 2011-02-20 20:10

>>43
Or is that your way to say ``I haven't read SICP''?

Name: Anonymous 2011-02-20 22:14

>>42
I don't give a shit about Python. I can use Perl, Ruby, Common Lisp, Scheme, Haskell, even JavaScript, if I want to script.
I don't give a shit about Ruby. I can use Python, Perl, Common Lisp, Scheme, Haskell, even JavaScript, if I want to script.
I don't give a shit about Common Lisp. I can use Python, Ruby, Perl, Scheme, Haskell, even JavaScript, if I want to script.
I don't give a shit about Scheme. I can use Python, Ruby, Common Lisp, Perl, Haskell, even JavaScript, if I want to script.
I don't give a shit about Javascript. I can use Python, Ruby, Common Lisp, Scheme, Haskell, even Perl, if I want to script.

<3 Haskell

Name: Anonymous 2011-02-20 22:40

>>42
(not scripts -- what does ``script'' mean? It's one of those we all understand but can't directly define...)
When a (usually interactive) program had a bundled (also usually interactive) programming language that allowed the user to automate tasks to be done with/in that program, those task automations came to be called ``scripts'', and the bundled language a ``scripting language''. Since scripting languages tended to be lightweight (as in having simple interpreters/compilers, not as in being frugal in usage of computing power), dynamic and interactive, over time any interactive, dynamic and lightweight language also came to be called a scripting language.

Name: Anonymous 2011-02-20 23:05

>>40
VALID PERL PERL

Name: Anonymous 2011-02-21 0:32

>>42
What exactly do you think are Perl 6's failings? In a big way it's Haskell-but-really-Lisp with a more convenient syntax.

If people decide they've done that wrong, then it will be a small amount of time before someone gives it a new Setting, and/or grammar. At the very least the Perl 6 grammar system (or something very much like it) is a real need that nothing else is filling. (On a few PL-development mailing lists I'm on, they still talk of keeping the grammar simple so it can be parsed with prehistoric tools.)

Name: Anonymous 2011-02-21 2:29

>>51
I think the time spent developing it is a big problem. The new features are still informally specified or incomplete. Technically it is just starting from scratch with something Perlesque and adding features we all like but in an ad-hoc fashion, but this seems to be the Perl way. Throwing backwards compatibility away is convenient for them but I suspect a large part of reason for using Perl is because there's a lot of code in it already (CPAN), not because it's such a great language. It supports a trivial type system (that is optional, which defies the point if you ask me). Junctions are a curiosity that can be implemented with mere lists or classes in the rare case that one needed such a thing. Again, ad-hoc special cases. Aiming at multiple implementations is disregarding Perl 5's single-implementation strength. The Lisps aimed at mulitple implementations and look at the state of them.

Name: Anonymous 2011-02-21 2:36

>>51
And if it was Haskell it would have a proper, static, powerful type system. Having some ad-hoc lazy constructs doesn't really matter. Clojure has the same.

Name: Anonymous 2011-02-21 3:45

>>52
I think the time spent developing it is a big problem.
That is a problem for using it today but I don't see how it's going to kill it in the end. JavaScript didn't exist when I started programming, yet I enjoy using it today.

Throwing backwards compatibility away
Perl 6 defines a new language, not a new version Perl 5 (which is still being developed, expanded, and getting backported features--if you want a shinier Perl 5 get a new version of Perl 5.) Also, you could make the same argument to some degree about Python 2 vs Python 3.

Not only that, but backwards compatibility is being maintained. There's a means of loading Perl 5 modules, and the spec says (and has always said) any conforming 6 implementation will also execute unmodified Perl 5 sources.

The "gradual" type system is there to permit optimization/analysis, overloading/constraints and type checking to whatever degree is desired. It's optional, sure, but I reflexively use it as much as I can. A lot of others do too. It's a good thing.

Junctions autothread and will dispatch individually in parallel where appropriate. What you say about them makes it obvious you don't know how they work underneath. I don't think they're very important (I don't blame you for not caring or knowing much about them), but the implementation is impressive.

multiple implementations
Nothing wrong with that. C, JavaScript (the weakness here is different amounts and kinds of conformity--not implementations), Python, every successful CLR/DLR language, and so on all have multiple implementations. The Lisp problem is the same as the JavaScript problem, but it's a slightly different world now. JavaScript is successful anyway. As long as implementations keep to the spec (or people can at least write portable code between them without jumping through flaming hoops) it will work out in the end. CPAN incentivizes conformity among implementations anyway. (One thing Perl taught the world: community as technology.)

>>53
The important part to take away from the Haskell comment is the "but-really." It will look like Haskell if you squint from a distance. If you take a really close look you'll find it's more like Lisp. It's not really like either if you look at it too hard. Uh... try not to stare?

Name: Anonymous 2011-02-21 3:45

<-- check 'em dubz

Name: Anonymous 2011-02-21 9:52

(<*>)((<|>)<$>((<|>)<$>(!!0)<*>(!!1)))(!!2)[x<|>y|x<-["om"],y<-(<*>)(:)(:[[]])"-n"]

Valid Haskell code.

Name: Anonymous 2011-02-21 10:52

>>56
U `MENA` Perl6

Name: VIPPER 2011-02-21 13:18

There's a means of loading Perl 5 modules, and the spec says (and has always said) any conforming 6 implementation will also execute unmodified Perl 5 sources.

Im not a language expert, but doesnt this contradict the idea of making a ``new'' language which ``supposedly'' is not backwards compatible and even add up the fact that perl6 is meant to fix the mess that perl5 is?

Name: Anonymous 2011-02-21 13:31

>>58
Any code is valid Perl 6 code.

Name: Anonymous 2011-02-21 14:24

>>58
It would, if any of those things were remotely like the goals of Perl6.  And if there were anything wrong with Perl.

Name: Anonymous 2011-02-21 22:29

>>58
The Perl 6 language does not include Perl 5. The conforming Perl 6 compiler/interpreter will recognize and execute Perl 5 code by some means (emulation, or a Perl 5 grammar or whatever) as Perl 5 code, not as Perl 6 code. You can't just switch to Perl 5 without ceremony for a couple of lines or anything like that.

Loading modules is just a kind of feature like FFI but taken to Perl extremes and should surprise no one, really.

Name: Anonymous 2011-02-21 22:44

>>61
blizkost is the name of the Perl 5 module loader.

Name: Anonymous 2011-02-22 4:18

>>54

That is a problem for using it today but I don't see how it's going to kill it in the end. JavaScript didn't exist when I started programming, yet I enjoy using it today.

I meant that when they're finished coming up with crackpot ideas people it'll be too little too late.

Junctions autothread and will dispatch individually in parallel where appropriate. What you say about them makes it obvious you don't know how they work underneath. I don't think they're very important (I don't blame you for not caring or knowing much about them), but the implementation is impressive.

I had a look at them before writing the post. The data structure as itself is kind of boring. The autothreading is good, of course. There are similar efforts in the Haskell world (DPH). I wouldn't be surprised if there was some overlap there.

multiple implementations
Nothing wrong with that.

We'll see, I suppose. C and JS had the advantage of having inertia already. C was already popular before it had many implementations. JavaScript rode on the back of browsers which were already popular -- it's not like people had a choice to use it. Python, too, has had CPython for a long time. I don't know how long (and I need to get back to work) but I'm pretty sure it was (and still is) the main implementation for a while.

You didn't address the case of Common Lisp, a very old language, which has a standard spec, but which has the shittest implementations ever (though SBCL is getting fairly acceptable these days).

CPAN incentivizes conformity among implementations anyway. (One thing Perl taught the world: community as technology.)

That's a good point -- if it does. How does it do that? Hackage has helped the Haskell community bring its efforts to one place (as I expect Quicklisp will do for CL) but everyone pretty much targets GHC and if it works on Hugs or whatever else then that's nice. I'm with PG that a single implementation that is the default choice is better than an array of choices.

There's a means of loading Perl 5 modules

Doesn't sound great but I'll take your word for it.

Perl 6 has no traction or inertia, no one's using it yet, so how it will overcome the challenges above is a matter of "we'll see", I think.

Name: Anonymous 2011-02-22 11:11

I wonder if there are any operators left that people could want that aren't in perl6

Name: Anonymous 2011-02-22 12:28

>>63
I meant that when they're finished coming up with crackpot ideas people it'll be too little too late.
This argument doesn't really make any sense. It's not like it is hardware that will run too slowly by the time it makes it to market, nor will it be overpriced to pay for all the R&D. As far as PL technology goes, nothing has come along in the past 10 years and filled the niche that Perl 6 is targeting, with the minor exception of some of the feature backports to Perl 5.

I had a look at them before writing the post. The data structure as itself is kind of boring. The autothreading is good, of course. There are similar efforts in the Haskell world (DPH). I wouldn't be surprised if there was some overlap there.
So, you know that they're a lot more than 'just' lists. (It's not the representation which probably isn't even spec'd, it's the implementation.) Few languages could implement them in the same seamless manner without building them in. I wouldn't be surprised about Haskell having them either. I don't think anyone who says "junctions are a must-have feature" without qualification is to be taken seriously so it's not really an important point either way.

You didn't address the case of Common Lisp,
I sort of did: basically the world is different now. I think we could have invented Common Lisp today and gotten different results. The comment about CPAN comes in here, Common Lisp didn't have that...

That's a good point -- if it does. How does it do that?
The short version is Perl needs CPAN. If you can't run the same code (modules) as everyone else your implementation is not going anywhere. On the other hand, the various implementers are all working together. Everyone seems to expect that one implementation or another will take the lead, presently Rakudo seems to be doing that, in a scenario much like GHC. But betting is still open.

Name: Anonymous 2011-02-22 15:00

poo poo dubs

Name: Anonymous 2011-02-22 15:35

>>63
but which has the shittest implementations ever
Really? I've got a handful installed and they're pretty decent. There's so many choices that it's hard not to find what you're looking for.

Name: Anonymous 2011-02-22 17:54

>>67
How do you do sockets and threading in your "decent" implementations?

Name: Anonymous 2011-02-22 18:20

>>68
That's not part of standard CL, however when I do need sockets and threading, I use usocket, iolib (trivial-sockets also works) for sockets and bordeaux-threads for threading, also CFFI and UFFI for any FFI needs. Implementations also provide their own internal FFIs, sockets and threading packages if you don't want to write portable code (which works in the majority of implementations) using the libraries I listed before.

The CL code I've written works on all implementations I use (SBCL, ClozureCL, Lisp-Works and sometimes ECL; on bad days, CLISP). I can't say the same thing about the C code I write (usually either compatible with MSVS or gcc, and tends to have the usual OS-specific #define mess if I want portability, not that I don't use #+/#- reader macros in CL to implement things differently(for example, I could write some SBCL specific optimizations and use a #+sbcl for the SBCL code and #-sbcl for the generally portable version)).

Name: Anonymous 2011-02-23 3:14

That's not part of standard CL

Language of the future amirite?

Name: Anonymous 2011-02-23 4:05

>>70
At the time CL was standardized *nix wasn't even big enough for them to implement unix sockets, and threading was too experimental and platform specific to implement (even though specific platforms did have their implementations). I think it's pointless to argue about this today as long as you have de-facto portable libraries for anything you want, and in the rare event that you don't, making one yourself isn't that hard ( I wrote a smallish one myself, it involved having some macros generate optimized inline asm for certain supported platforms and standard CL for everything else. Perfectly portable, very fast in a few implementations, average/slow in the rest. )

Name: noko 2011-02-23 9:10

OMG!!!!![b][i][u]5+34-23+56*2-54-2 GET!!!!!![/u][/i][/b]

Name: Anonymous 2011-02-23 13:06

>>69,71
TOO LISP; DIDN'T READ

Name: Anonymous 2011-02-23 20:14

>>69
pthreads and UNIX sockets are not in the C standard library. Or regexp. Or anything.

Name: Anonymous 2012-07-29 23:57

>>77

Nice lucky dubs!!!!

Name: Anonymous 2012-07-30 0:10

dubz incombing

Name: Anonymous 2012-07-30 0:18

>>74
threads are in the C standard library.

Name: Anonymous 2012-07-30 0:42

PHP CRITICAL: dubz capture failed. halting thread.

Name: Anonymous 2012-07-30 11:23

5) faggot

Name: Anonymous 2012-07-30 11:27

Name: Anonymous 2012-07-30 12:02

If you didn't try Perl6 yet you should: is like perl5 but well done!

Name: Anonymous 2012-07-31 2:22

Perl6 for Winblows
MSI Installer

https://github.com/downloads/rakudo/star/rakudo-star-2012.07.msi

After install, go to c:\rakudo

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