Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
raiph
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
151.
▲
by
raiph
9y ago
> How is "opt-out option types" different from, say, Java, where everything is nullable and all the problems that come with that? Aiui the Java compiler and language constructs generally don't know the difference. The P6 N
152.
▲
by
raiph
9y ago
Many P5 folk claim that it remains fun if the P5 code is well written. But regardless, having fun with P6, which is specifically designed to be readable, maintainable, composable, refactorable, etc. is fundamentally different from having f
153.
▲
by
raiph
9y ago
Another way to look at it is that it's designed to be a great "babytalk" language, the idea that everyone should be able to relatively easily learn enough of the language to easily get done what they need to easily get done.
154.
▲
by
raiph
9y ago
Right. In P6 (potential) parallelism is explicit. You have to use an explicit construct such as the `<<` or `>>` meta operators. I used a simple arithmetic operation but it can be any code. Of course, it had better be parallel s
155.
▲
by
raiph
9y ago
> It turns out that `grammar` keyword generates recursive descent parsers Yes, P6 grammars generate recursive ascent/descent parsers. (It allows arbitrary mixes of ordinary P6 closures, using the 'Main' DSL's syntax,
156.
▲
by
raiph
9y ago
> I highly recommend that you try out a language with good support for option/maybe types Right. Like Perl 6. > Very often, your error handling through a chain of operations will be to use a slightly different operator (say '
157.
▲
by
raiph
9y ago
> Reuse was overshadowed by incompatible versions, or API changes between versions that became the stuff of legends. The Perl community has spent a couple decades "enjoying" taking (or being forced to take) a long hard look at
158.
▲
by
raiph
9y ago
i.e. SIMD i.e. something like: @array = 1, 2 ... 1,000,000 ; @array>>++ ; where the `>>++` operation increments each of a million integers with the workload distributed across multiple real CPUs?
159.
▲
by
raiph
9y ago
What do you mean? Perhaps you mean "how" rather than "why". Others have answered with the gory "how" details. Perhaps you mean "why would anyone think to make this work?" To the degree anyone thought
160.
▲
by
raiph
9y ago
I hear your basic points, and this is a tangent on a tangent, but: Rakudo, the existing implementation of standard Perl 6, is a compiler. (I wouldn't be surprised if the code currently generated by Rakudo for this algorithm is far slow
161.
▲
by
raiph
9y ago
> making Perl 6 not be compatible with Perl 5. Imo that's either inaccurate or misleading. In Perl 6, `use` followed by a module name followed by a `:from` adverb leads Perl 6 to load the module, initialize it, and import its public
162.
▲
by
raiph
9y ago
I've always loved that post but the truth is that while you can not parse [X]HTML with what I'll call a "regular expression", by which I mean the formal CS definition [1], you can with a suitable "regex", by
163.
▲
by
raiph
10y ago
> I fail to see how the GIL stops you from creating concurrent code. I misread what you wrote. My apologies. > concurrency is ... not about multi-threading Agreed. (Fwiw, I think part of what threw me is that almost all proglangs ca
164.
▲
by
raiph
10y ago
> Speaking of stuff like concurrency Hang on. Python 3.x is an interpreter with a GIL. So, strike one lang from your list. > C3 resolution Perl 6 uses C3 by default for its own default object model but it's carefully designed to
165.
▲
by
raiph
10y ago
Perl 6 makes careful use of letter case to convey useful information. If it's in ALL CAPS then it's drawing some attention to the fact that something VERY UNUSUAL is going on. For example, `WHAT`, `HOW` etc. are special compiler m
166.
▲
by
raiph
10y ago
> lets you marshall data between the interpreters. To be clear, Inline::Perl5 (and the other inlines like Inline::Python) automatically marshal data. And exceptions. And classes (so you can sub-class a Perl 5 or Python etc. class in P
167.
▲
by
raiph
10y ago
> Are Perl 6 "regexes" as powerful as a context-free grammar? TL;DR If you can code it, you can code it using Perl 6 grammars. Perl 6 is designed as a collection of "slangs" (short for sub-languages) that recursively
168.
▲
by
raiph
10y ago
> as many features as he could pack in Aiui there's some merit to the notion of The Lisp Curse[1] and he wanted to avoid it. Do you reject the notion of the curse, or think it doesn't apply to P6, or think he overdid it, or...?
169.
▲
by
raiph
10y ago
> Perl 6 depends upon the continued vibrancy of the CPAN community. Why do you say that? Is this a theoretical point, a reasonable conclusion based on reading about Perl 6, or something based on trying and failing to do something with Pe
170.
▲
Perl 6 compiler, Release #107 (2017.01)
(nntp.perl.org)
4 points
by
raiph
10y ago
|
2 comments
171.
▲
by
raiph
10y ago
Cross language marshaling of data and exceptions: my $mech = WWW::Mechanize.new; try { $mech.get("xmas://perl6.org"); CATCH { default { say $_.perl; }
172.
▲
by
raiph
10y ago
> it doesn't appear there is any other "serious" meta-language for top-down parsers other than ANTLR? Have you explored Perl 6 and its Rules sub-language and engine?[1] The Rakudo Perl 6 compiler is written in Perl 6 using
173.
▲
by
raiph
10y ago
> I wouldn't call a language incorrect for working only with Unicode codepoints. I didn't call Python incorrect. I'll footnote another attempt to communicate the point I was trying to make.^1 > for most programmers this
174.
▲
by
raiph
10y ago
Did you know you can use your Perl 5 code in Perl 6 and vice-versa? For example, if you've installed the Perl 5 DBI from CPAN then you can use that in Perl 6 code like this: use DBI:from<Perl5>; my $dbh = DBI.connect(&
175.
▲
by
raiph
10y ago
I've got a dozen wildly different ideas of what you mean...
176.
▲
by
raiph
10y ago
Some translations: Bulgarian: http://bg.perl6intro.com Dutch: http://nl.perl6intro.com French: http://fr.perl6intro.com German: http://de.perl6intro.com Japanese: http://ja.perl6int
177.
▲
by
raiph
10y ago
> So why, why, why should I switch? What's the promise now? What problem am I having with Ruby that it can solve? All good questions. My personal answers boil down to "no need" (to switch), "see the rest of this threa
178.
▲
by
raiph
10y ago
> Python 3 was released in 2008 which changed to use Unicode by default. Sure, but Python 3 only took on correct handling at the whole string level. It ignored correct handling at the character and sub-string level. Something similar app
179.
▲
by
raiph
10y ago
Larry has talked of this[1] as Clean Golf: > one should do token golf, not keystroke golf > would be a nice cultural hack to start the Clean Golf meme http://irclog.perlgeek.de/perl6/2014-03-11#i_8417918
180.
▲
by
raiph
10y ago
You are speaking of the 22 year old Perl 5. This HN thread is about Perl 6. Larry Wall (primary author of record for both Perl 5 and Perl 6) noted in an article[1] that: "Perl 6 is also a completely different language ... [that specifi
More ›