This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
Guest68 Hi folks sry but I have a stupid question - How do I run the bytecode using moar? I compiled the script using `perl6 -o hello --target mbc hello.raku` but seems like moar could not recognise the compiled file... 04:50
lizmat Guest68: that's hardly a beginner question? 08:35
Nemokosch Depends. In Java, this would be basic. 10:28
[Coke] If this is related to the recent post I saw on the RSS feed, the easiest way to get this benefit is to hoist the guts of your script into a module and use it from the script - the lib will get precompiled automatically. 12:44
(it's not answer the exact question here, ofc.) 12:45
I don't think we can do what you're attempting there. (e.g. run "moar hello") 12:46
(also, it's 'raku' these days) 12:48
lizmat also: www.reddit.com/r/rakulang/comments...code_file/ :-( 13:15
[Coke] that's the one I saw on the feed, thanks1 13:37
also github.com/rakudo/rakudo/issues/5081 13:39
lizmat ack 13:44
Nemokosch okay but... what's the problem? 13:52
Like, is it a bad question? Or unworth of answering? 13:56
[Coke] no, it's not intended to work (yet), and doesn't. 13:57
[Coke] so to get a similar result (precompiling your script), you can do the trick mentioned above. you're not running the bytecode directly, but most of your code is now compiled once and then run as bytecode. 13:59
It's a great question.
Nemokosch That's fair I think 14:00
something else: does the double colon in ::?CLASS have a name? 14:04
[Coke] I don't think it has a special name. it's a package separator - same thing as ::("foo"), I think. it's the top most, indicating the root. 14:34
Though if it were exactly identical, I might expect ?CLASS to work by itself, which it doesn't. 14:36
Nemokosch This helps. I didn't know this was meant to be a package separator in the first place. 14:40
[Coke] m: dd ::Rat.new 14:54
camelia 0.0
guifa_ "If the name part before :: is null, it means the package is unspecified and must be searched for. Generally this means that an initial :: following the main sigil is a no-op on names that are known at compile time, though ::() can also be used to introduce an interpolation. Also, in the absence of another sigil, :: can serve as its own sigil indicating intentional use of a not-yet-declared package name" 23:48