Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xisukar
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
xisukar
8y ago
Perl 6 (Raku) takes it a little further with what's known as the Q lang[1]. In their most literal form possible, strings are created by using a Q followed by any pair delimiting surrounding the text. Q[This is a literal string.]
62.
▲
by
xisukar
8y ago
> ...the several big or small mistakes I am about to make in the following. Everything you wrote seems fine to me and you even expounded on what I wrote! However, even if it wasn't, I'd be hardly pressed to come up with a respo
63.
▲
by
xisukar
8y ago
You're totally right! I always get them confused. So `∈` is `(elem)` and `⊆` is `(<=)`. Thanks for pointing it out!
64.
▲
by
xisukar
8y ago
> In P6, every type that's created using any of its type constructors is a sum type with two sub-types. > This includes types defined in the standard language such as Int. The sub-types are named D and U. > For example, to ref
65.
▲
by
xisukar
8y ago
From https://docs.perl6.org/routine/contains , `contains` coerces its invocant to a string and searches for a substring starting from a certain position (index 0 by default): # Let's drop `<>` (quote-wo
66.
▲
by
xisukar
8y ago
> It is true that one can easily write unmaintainable spaghetti in Perl5. This was something that surprised me when I first learned about Perl 5 in college. Most people in the internet would parrot it as a "write-only" language
67.
▲
by
xisukar
8y ago
This would be one way to write in Perl 6: for @numbers -> $number { next unless $number > 10; next if $number %% 2; work($number); }
68.
▲
by
xisukar
8y ago
As pointed out by others, Mu is the most undefined value there is in Perl 6 and the base root for the immediate child classes ( https://docs.perl6.org/images/type-graph-Mu.svg ). However, most classes (both built-in an
69.
▲
by
xisukar
8y ago
If I went on to learn about "Functors, Applicative Functors and Monoids" (which I'm completely ignorant about) in Haskell without having first learned Haskell's basic building blocks, then I would be disingenuous myself
70.
▲
by
xisukar
8y ago
As for the say function, it's also supposed to output text in a more human readable format. It calls the `.gist` of its argument, which you can override in user-defined classes. Take for example the following code snippet from Perl 6 D