Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
raiph
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
51 ms
·
361.
▲
by
raiph
12y ago
> lack of static typing A key feature of Perl 6 is optional static nominal typing: http://www.reddit.com/r/perl6/wiki/gradualtyping
362.
▲
by
raiph
12y ago
As I said elsewhere in this thread, Inline::Perl5 hasn't been tested against all 130,000 modules on CPAN to my knowledge, but, based on what I know of the tech and its 100% success rate so far, I'm going to assume until I hear ot
363.
▲
by
raiph
12y ago
Yes, that works in Perl 6 too. So, to recap: > Can one even use CPAN with Perl6? Yes. A Perl 5 coder might write: use Data::Dumper; print Data::Dumper->Dump([1]); A Perl 6 coder can now use the same Perl 5 module, eg:
364.
▲
by
raiph
12y ago
One way to look at things is that Perl 6 breaks backwards compatibility with Perl 5. Another is that Perl 6 has well designed language interop and evolution features that make it so easy to nicely use code and libs from other languages that
365.
▲
by
raiph
12y ago
Yes. v5, a Perl 5 compiler written in Perl 6, is promising tech with potentially huge long term (10 years) strategic consequences for Perl 5 and Perl. But it's very early days and it correctly handles only the simplest of modules. I&#x
366.
▲
by
raiph
12y ago
> Not at all [can one use CPAN] You are mistaken. See my nearby comment about Inline::Perl5. > not without major contortions [can one convert]. One doesn't need to convert (due to Inline::Perl5). That said there can be valid reas
367.
▲
by
raiph
12y ago
> Can one even use CPAN with Perl6? Yes. At a Perl conference in October last year Stefan Seifert decided it was time for him to have a go at something Perl 6 related. He had never written Perl 6 code before, let alone participated in th
368.
▲
by
raiph
12y ago
> Has the situation gotten better since 2010? Not really. Startup uses about the same RAM. It's about 10x faster. The best docs I know about performance would be http://pmichaud.com/2012/pres/yapcna-perflt&
369.
▲
by
raiph
12y ago
The Rakudo Perl 6 compiler is still immature and slow, and the -i option (in-place edit) hasn't yet been implemented, but, at least for comparison's sake: $ perl6 -pe 'next if ++$ == 2' example.txt ... prints all lines e
370.
▲
by
raiph
12y ago
Thank you for your clear and concise answer. I am now really curious about building an image-based edition of Rakudo Perl 6. I'm going to ask about this on #perl6 and reply here if anything comes of it. Thanks again. May the eggnog sea
371.
▲
by
raiph
12y ago
Hi Brian, I've only read a few pages of the Slate site so far but it's brought back fond memories of image based systems I played with in the 80s. (I've done a total of about 5 years worth of professional programming over the
372.
▲
On the x64 JIT compiler for MoarVM
(perl6advent.wordpress.com)
2 points
by
raiph
12y ago
|
0 comments
373.
▲
by
raiph
12y ago
> my point is that it's much harder to resynchronize with a context-free grammar. So, don't use a context free grammar. [1] Use something else, eg a PEG. [2] Not only are Perl 6 grammars PEGs, not CFGs, but individual rules are
374.
▲
by
raiph
12y ago
> > regex parsing implementation when optimized sufficiently is very close in implementation to C code > I used to think that, but it is really not true unless your regex engine contains a JIT compiler. The P6 Rules engine is writt
375.
▲
by
raiph
12y ago
http://moarvm.com/contributing.html Hope to see you on #moarvm. :)
376.
▲
by
raiph
12y ago
An equivalent in P6: [1,2,3,4,5] X* 2 This (theoretically) parallel processes and then puts the results back in order. The X is the cross metaoperator; it applies the following operator (the * symbol which is the multiply operator) t
377.
▲
by
raiph
12y ago
> Nim supports direct access to the AST so macros can be used to define new programming constructs like in Lisp. Nim macros can't modify Nim's syntax. That constraint makes perfect sense for Nim but not Perl 6. > ANTLR ANTLR
378.
▲
by
raiph
12y ago
Hopefully better formatting: proto A(Int \𝑚, Int \𝑛) { @[𝑚][𝑛] //= {} } multi A(0, Int \𝑛) { 𝑛 + 1 } multi A(1, Int \𝑛) { 𝑛 + 2 } multi A(2, Int \𝑛) { 3 + 2 𝑛 } multi A(3, Int \𝑛) { 5 + 8 * (2 𝑛 - 1) } multi A(In…
379.
▲
by
raiph
12y ago
Repeat post with better formatting: Standard Perl 6 has just these non-English variables: - $_ means "it" - @_ means "args" - $! means "current exception/error" - $/ means "last match" - $0
380.
▲
by
raiph
12y ago
If I had to pick one thing it would be practical Unicode for the rest of the world. Most English devs have no idea just how bad things are with current langs. A quick experiment. First, translate "Practical" in to Thai: ปฏิบัติจริ
381.
▲
by
raiph
12y ago
> overuse of sigils "Overuse" is subjective. If you are you suggesting that some use is good, can you give an example of usage you think is good and usage you think represents overuse? That said, I didn't like some specifi
382.
▲
by
raiph
12y ago
> Perl 6 may have been an effort to fix this, but went too far in the opposite direction; overly formalized, with a premature separation between VM and language that massively slowed development. I also think the Parrot VM project added
383.
▲
by
raiph
12y ago
> The problem I always saw was that libraries would follow their own styles, so once you had a project that depended closely on several different libraries you'd be forced to cut against the grain of several of them. It's a pro
384.
▲
by
raiph
12y ago
Standard Perl 6 has just these non-English variables: * $_ means "it" * @_ means "args" * $! means "current exception/error" * $/ means "last match" * $0 means $/[0], the first captured
385.
▲
by
raiph
12y ago
The Perl 6 design has directly addressed that very problem from the start. Aiui Larry Wall believes it will be significantly easier for Perl 6 to evolve than for Lisp to do so, without falling in to the Lisp Curse trap.
386.
▲
by
raiph
12y ago
Perl 6 claims saner defaults. For the strict pragma, it's off by default for one liners and on by default for everything else. A much bigger relevant change is Perl 6's support for hygienic lexically scoped "slangs". The
387.
▲
by
raiph
12y ago
Fwiw most Rakudo devs now prefer MoarVM for most things because it's generally the fastest, leanest, least buggy and most specification compliant of the currently available backends (MoarVM, JVM, Parrot). MoarVM is definitely the righ
388.
▲
by
raiph
12y ago
Gotchya. Just to be clear for any others reading along: * One can run (a subset of) Perl 5 code directly on any of the Rakudo backends (thus even on the JVM) by using v5, a Perl 5 compiler written in Perl 6.[1] I think it will be many years
389.
▲
by
raiph
12y ago
PCRE wrappers like the module you linked don't give other langs the nice regex integration available in Perl 5, they just give them support for "Perl Compatible Regular Expressions" (hence PCRE), a rough equivalent of P5'
390.
▲
by
raiph
12y ago
What startup delay and RAM usage do you think is just too large to be acceptable for a small script, no matter how good a language/compiler is in other respects?
More ›