Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
b2gills
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
181.
▲
by
b2gills
9y ago
The first version of Perl was basically combining many Unix tools together into one language, along with features from C, so that they are easier to use together. In fact there are two flip-flop operators that exist in Perl 5, one which wor
182.
▲
by
b2gills
9y ago
For those that don't know you can use `「` and `」` to quote anything that does not contain `」` and Perl 6 won't process it in any way other than storing it as a Str. If you needed to have `」` in there you can fall back to `Q{{{{{{…
183.
▲
by
b2gills
9y ago
Unfortunately for Python is that many/most of the modules that are included were written when the language was fairly new, so at a time when nobody was an expert in the language. Which means that perhaps for many of them there is a bet
184.
▲
by
b2gills
9y ago
Perl 5's base object system was based on Python's Ruby has been referred to as Perl 5 with a better object system. Perl 5 also has Moose an object system based on Perl 6's which has been ported to Python and to Ruby twice. Th
185.
▲
by
b2gills
9y ago
I have seen examples where the naive Perl 6 implementation is faster than the equivalent C code. (The one I'm thinking of is probably owing to Spesh and the JIT, but I forget what it was about) Here's an example where a naive Perl
186.
▲
by
b2gills
9y ago
Perl 6 is the spec tests, and is open-source Rakudo is the only currently supported implementation (ignoring several specialized partial implementations), it is also open-source.
187.
▲
by
b2gills
9y ago
I think the difference between Perl 5.10 (2007) and 5.26 (2017) is bigger than difference between the Python 2 of 2007, and Python 3 of 2017 The difference between Perl 5 and Perl 6 is probably about 10x the difference between Perl 5.10 and
188.
▲
by
b2gills
9y ago
You can call Thread.yield() at any time. They are preemptive, and many things you do which will block effectively call Thread.yield() to give other things a chance to run. I once wrote some code which took my 4 core CPU to about 500% utiliz
189.
▲
by
b2gills
9y ago
my %ordered-hash is OrderedHash; my @ordered-hash := %ordered-hash; If you don't care for sigils: my \ordered-hash = OrderedHash.new; say ordered-hash<foo>; for ordered-hash {…} Note that you can o
190.
▲
by
b2gills
10y ago
I can't think of a single capitalized keyword. Unless you mean capitalized built-in classes, or the infix meta operators. Certain parts are faster than Perl 5, for example this finds the sum of a range in less than a millisecond. ( of
191.
▲
by
b2gills
10y ago
The OO part is actually one of the tiniest of changes. You can get basically the same thing in Perl 5 by using Moose. It has signature, and subsignature parsing, built-in concurrency, not to mention over a dozen other features that are not
192.
▲
by
b2gills
10y ago
The design of regular expressions is different than any other version from any other language to improve readability along with other improvements. In Perl 6 regexes are seen as a type of method (that is they are literally implemented as a
193.
▲
by
b2gills
10y ago
It sounds to me like you would like a "batteries included" version of Perl 6. (include JSON/YAML in the runtime) No. We only include things as part of the language where the design of it is immediately obvious, and is useful
194.
▲
by
b2gills
10y ago
The latest version of Perl 5 is almost entirely backwards compatible with every earlier versions of Perl 5. ( There are some features which almost no-one used, that also should never be used that were eventually removed ) Perl 5 is backward
195.
▲
by
b2gills
10y ago
So are you complaining that Perl 6 allows Math majors to use the Unicode operators that they are used to, and that work the way they would expect? Also all of the Set/Bag/Mix ASCII equivalents are fairly easy to remember or to gue
196.
▲
by
b2gills
10y ago
Inline::Perl5 isn't clunky if you are just using it to load modules. use Data::Random:from<Perl5> <:all> Also Perl 6 has several different forms of built-in concurrency.
197.
▲
by
b2gills
10y ago
Perl 6 adds features, and hides complexity. You are right that Perl 6 is more complex, but you will never see the majority of it until you decide you want to dig deeper. If you write equivalent idiomatic code in both versions of Perl, the P
198.
▲
by
b2gills
10y ago
Of course there isn't a current Perl 6 book, the design was only finalized last Christmas. If someone had started before that, they may have had to rewrite large sections to keep up-to-date. Books also take time to write, and the peopl
199.
▲
by
b2gills
10y ago
The only ones like that which exist in Perl 6 are $_ @_ %_ $! $/ The rest were either just abandoned or given names such as $ GROUP or $ PROGRAM-NAME $/ isn't the same as it was in Perl 5 instead it is for storing the result
200.
▲
by
b2gills
10y ago
There definitely are good reasons for a length function to count both codepoints and graphemes. Which is why Perl 6 has a method for both. This is also why neither of them is called `length`. In fact if you ever attempt to call the `length`
201.
▲
by
b2gills
10y ago
There is an operator to check if one number is divisible by another. subset Even of Int where * %% 2; You also don't have to write the where clause as a lambda. subset Even of Int Where $_ %% 2;
202.
▲
by
b2gills
10y ago
The Perl 6 project started only slightly more than a decade and a half ago. Ruby's "DSL" ability is what allowed Rails, in Perl 6 everything is a DSL. Even strings are written a customizable DSL. You can turn on and off strin
203.
▲
by
b2gills
11y ago
Imagine what DSL would look like in a programming language that is itself defined as several DSLs. That is signatures, immediate strings, regular expressions are all separate domain specific languages that share parts of the same grammar bu
204.
▲
by
b2gills
11y ago
I use rlwrap instead. The REPL is one of the features that hasn't gotten as much attention as it should. It was much more important to spend the time getting the rest of the language into shape. That said I use the REPL for 90% of my c
205.
▲
by
b2gills
12y ago
You may be able to get them to update to at least 5.18.0 if you tell them about CVE 2013-1667 and all the mitigations added to 5.18.0 to prevent them. https://duckduckgo.com/?q=CVE+2013-1667&ia=about http://
206.
▲
by
b2gills
12y ago
One feature which I believe is distinctly available only in Perl 6 is it's grammar feature. ( think class/method based regular expressions that look similar to BNF ) As an example look at this Perl 6 grammar for JSON: https:/
207.
▲
by
b2gills
12y ago
I'm actually glad it took this long. If it didn't it would probably be like all these other new languages which only attempt to improve upon the art of programming in one or two aspects. Another good thing about it taking so long
208.
▲
by
b2gills
12y ago
Why would we want to write Python code to get a new Perl6 backend which doesn't have quite the same object system that Perl6 needs? At any rate I think that an implementation of 6model (the basis for Perl6 objects) on PyPy would likely
209.
▲
by
b2gills
12y ago
Why are you pointing to the unicode entry doc in an ancient version of Perl? Also according to perlunifaq the minumum version you should be using is 5.8.1 which the documents for 5.8.0 would of course not mention. Really if you want good un
210.
▲
by
b2gills
12y ago
It would be rather pointless to ship Perl4, as Perl5 is almost completely backwards compatible with Perl4. Most of the parts where backwards compatibility was removed weren't actually used to a large extent. Also Perl5 didn't add
More ›