HackerTrans
TopNewTrendsCommentsPastAskShowJobs

lizmat

1,150 karmajoined 8년 전

Submissions

Official announcement of the start of The Raku Foundation

dev.to
5 points·by lizmat·28일 전·2 comments

Making your JITted Code known: Let me count the ways

wakelift.de
9 points·by lizmat·4개월 전·1 comments

[untitled]

1 points·by lizmat·6개월 전·0 comments

comments

lizmat
·5일 전·discuss
or

raku -e 'say "etbjxntqrdke".comb.map(*.succ).join'
lizmat
·23일 전·discuss
* No separate types of bytestrings versus sequences of unicode codepoints.

Fixed in Raku. You either have a string (Str) or a bytestream (Blob).

* Wherever there's strings in any non-trivially-sized real-word Perl 5 project, there is utter irreversible and irredeemable mojibake.

No mojibake in Raku.

* No canonical way to do object-orientation. (cf. blessed objects, Moo in different versions, and different conventions around how to use them) -- This stuff should be easy in 2026. Perl makes this easy thing really hard.

Raku has single object / type system.

* Regexes suck. Their brevity is a nice circus stunt for a computer science audience, but unless you follow very particular patterns for composing them from ergonomically named constants, etc. etc. (which "in the wild" I rarely see), they are very unergonomic.

Raku regexes allow arbitrary whitespace, can contain comments and are composable.

Grammars are collections of tokens / rules / regexes that can be used to build an AST, and actions that can take that AST and build another data structure of it. A grammar is used to parse Raku itself.

Grammars can be subclassed or have rules / regexes mixed in (slangs).

* The Perl 5/CPAN ecosystem has been left to rot and is no longer safe for consumption.

The Raku ecosystem, albeit much smaller, is growing and actively maintained: https://raku.land
lizmat
·28일 전·discuss
And the original blog post from almost a year ago: https://dev.to/lizmat/towards-a-raku-foundation-3ne2
lizmat
·28일 전·discuss
From a blog post, to a problem solving issues, to passing a lot of hurdles: The Raku Foundation is here!

https://dev.to/lizmat/a-year-later-a-trf-1lh0
lizmat
·4개월 전·discuss
The Rakudo implementation of the Raku Programming Language uses the MoarVM, which is pretty much a generic VM. All you need to do(TM) is write a grammar and associated actions to build the right bytecode out of the given Python source.
lizmat
·5개월 전·discuss
It also goes from source code to AST:

  $ raku -e 'say Q|say "Hello World!"|.AST'
  RakuAST::StatementList.new(
    RakuAST::Statement::Expression.new(
      expression => RakuAST::Call::Name::WithoutParentheses.new(
        name => RakuAST::Name.from-identifier("say"),
        args => RakuAST::ArgList.new(
          RakuAST::QuotedString.new(
            segments   => (
              RakuAST::StrLiteral.new("Hello World!"),
            )
          )
        )
      )
    )
  )
lizmat
·5개월 전·discuss
> In the raku example, what if the elements were to be multiplied?

$ raku -e 'say (0, 1, 2, * × * ... )[^10]' # for readability (0 1 2 2 4 8 32 256 8192 2097152)

$ raku -e 'say (0, 1, 2,
* * ... *)[^10]' # for typeability (0 1 2 2 4 8 32 256 8192 2097152)
lizmat
·6개월 전·discuss
Nothing stopping you from creating a L10N::LA module :-)
lizmat
·6개월 전·discuss
You mean like:

    my $a of Int = 42;
    say $a;  # 42
or

    my $a of Int = "foo";'       
    # Type check failed in assignment to $a; expected Int but got Str ("foo")

?
lizmat
·7개월 전·discuss
FWIW, cannot reproduce on Safari 18.6 on MacOS 15.6.1
lizmat
·7개월 전·discuss
Technically, no. As Rakudo is not a programming language, and Perl6 is a deadname.

But there are indeed plenty of people doing projects with the Raku Programming Language.
lizmat
·8개월 전·discuss
Please, stop deadnaming the Raku Programming Language :-)
lizmat
·7년 전·discuss
Please note that the buzzword "Perl 6" has been replaced by Raku (https://raku.org using the #rakulang tag on social media). And that you can drop the "5" from the "Perl" buzzword :-)
lizmat
·7년 전·discuss
Re "Perl (5 & 5)": if you really want to be buzzword compliant, that should read "Perl, Raku", as Perl 6 has been renamed to Raku (https://raku.org) using the #rakulang tag for social media.
lizmat
·7년 전·discuss
Actually, since the Perl 5 example doesn't chomp (remove newlines), the Raku version would need to be:

    my @output-array = lines(:!chomp).unique;
where the `:!chomp` is a named parameter representing a `False` value for the named parameter `chomp`. AKA, `chomp => False`.