Unless things have changed since I was last active, only modules are
precompiled. `?` Twigilled variables are set at compile time.
So if it had any values, they wouldn't be useful, because they would be
created anew every time.
On Mon, Apr 17, 2023, 11:48 AM David Santiago wrote:
>
> Hi Polgár
>
Raku removed all of the regex cruft that has accumulated over the years.
(Much of that cruft was added by Perl.)
I'm not going to respond to the first part of your email, as I think it is
an implementation artifact.
On Mon, Sep 12, 2022 at 3:06 PM Sean McAfee wrote:
> Hello--
>
> I stumbled acr
<
perl6-us...@perl.org> wrote:
> On 8/29/22 11:50, Brad Gilbert wrote:
> > Actually Raku is faster to compile than Perl5. If you consider all of
> > the features it comes with.
> >
> > For example, in Raku everything is an object with meta features. If you
> > add
Actually Raku is faster to compile than Perl5. If you consider all of the
features it comes with.
For example, in Raku everything is an object with meta features. If you add
Moose or similar to Perl5 then the compile times will often take longer
than the equivalent Raku times.
That's not the only
After thinking on it, :auth<> is sort of an authentication chain. Just a
really short one.
To authenticate a module with :auth you have to first
authenticate zef.
On Wed, May 11, 2022 at 4:02 PM Darren Duncan
wrote:
> This discussion thread has excellent timing, because I was otherwise about
>
There could be a way for one of them to only act as a middle man. Basically
have fez defer to CPAN and just host a copy of it.
On Tue, May 3, 2022, 10:59 AM Marcel Timmerman wrote:
> Hi Brad,
>
> Auth is for more than just the author. It is for author, authority, and
> authentication.
>
> There
Auth is for more than just the author. It is for author, authority, and
authentication. CPAN can't authenticate github or fez modules, and vice
versa. There is a reason the field is only the first four letters.
That they are seen as different modules is an intended feature, not a bug.
I would lik
I'm on mobile, but without checking, I think the problem is here
rule pairlist { * % \; }
Specifically it's the missing %
rule pairlist { * %% \; }
JSON doesn't allow trailing commas or semicolons, so JSON::Tiny uses just %.
Your data does have trailing semicolons, so you want t
( 1 --> 1 ){}
multi factorial ( UInt \n ){ factorial(n - 1) * n }
say factorial( 1 );
# ERROR: both UInt and 1 subsets match.
You could modify the general case, but that is tedious and error prone.
multi factorial ( Int \n where {$_ >= 0 && $_ != 0 && $_ != 1
This is intended behavior.
Since subsets are just code it would be difficult to impossible to
determine all of the ones that can match without actually running them all.
This would slow down every call that uses multiple subsets.
By most narrow candidate, it means by type. All subsets "of" the sa
The multi infix:<+>( \a, \b ) candidate is the one that accepts non Numeric
values.
What it does is try to convert the two values into Numeric ones, and then
redispatch using those values.
If either one produces an error instead of a Numeric, that error is passed
along.
On Mon, Aug 30, 2021 at 9
Honestly I would advise against using ==> at the moment.
For one thing it doesn't even work like it is intended.
Each side of it is supposed to act like a separate process.
There are also issues with the syntax that are LTA.
The fact that you have to tell it the left side is actually a list is on
A Hash either takes some number of pairs
my %h = a => 1, b => 2;
or an even number of elements, which become key value pairs
my %h = 'a', 1, 'b', 2;
`eager` returns an eager Sequence/List etc
(eager a => 1).raku # (:a(1),)
A Sequence/List is itself a thing. Which means that it can
Ralph, the last value in all functions are not sunk by default, so of
course the last one in `TWEAK` is not sunk by default.
This is intended behaviour.
It is up to the code that calls a function to sink the result if that is
the desired behaviour.
sub foo {
'a b c'.words».uc.map: *.s
I think that this is caused because it is returning a 「Sequence」 that is
not getting sunk.
This is because the last value from a function is never sunk in that
function.
You could also use 「eager」 「sink」 or follow it with 「Nil」 or some other
value (instead of 「return」)
eager $!filelist.lines»
ests such a change, I will vehemently fight to
prevent it from happening.
I would be more likely to accept <=$pattern> being added as a synonym to
.
On Sat, Mar 13, 2021 at 3:30 PM Joseph Brenner wrote:
> Thanks much for your answer on this. I think this is the sort of
> trick I
If you interpolate a regex, it is a sub regex.
If you have something like a sigil, then the match data structure gets
thrown away.
You can put it back in as a named
> $input ~~ /
「9 million」
pattern => 「9 million」
0 => 「9」
1 => 「million」
Or as a numbered:
> $input
There is a reason that you can't just ask for the dimensions of an
unspecified multidimensional array.
It may be multiple dimensions.
[[1,2,3],
[4,5,6,7,8,9,10]].shape
If it gave a result it would be something like:
(2,3|7)
On Fri, Feb 5, 2021 at 8:50 AM Theo van den Heuvel
wrote:
There really shouldn't be that much difference between what the
documentation says and how your version works.
The biggest thing would be new functions that you don't have yet.
(Which you could just copy the code from the sources into your program if
you need them.)
Even if rakudoc did install, i
What is happening is that the `start` happens on another thread.
That thread is not the main thread.
The program exits when the main thread is done.
Since the main thread doesn't have anything else to do it exits before that
`sleep` is done.
The more correct way to handle it would be to wait for
You've already asked a similar question.
https://stackoverflow.com/questions/54033524/perl6-correctly-passing-a-routine-into-an-object-variable
When you call $a.f() you are getting the value in &!f which is a function.
When you call $a.f().() you are getting the value in &!f, and then also
calli
I think the simplest way to turn that into a Supply is to use the `supply`
keyword
my $pm = Audio::PortMIDI.new;
my $input = supply {
my $stream = $pm.open-input($input-device-number, 32);
DONE {
$stream.close;
}
loop {
emit $
It does not look like an array from 0 to ($nCount - 1). It only iterates
like that.
It is a Range object from 0 to $nCount excluding $nCount.
^9 === Range.new( 0, 9, :excludes-max ) # True
0 ~~ ^9 # True
1 ~~ ^9 # True
0.5 ~~ ^9 # True
8 ~~ ^9 # True
8.9 ~~ ^9 # True
t; specifically Nil and not its Failure descendents?
>
> This example under https://docs.raku.org/type/Nil shows what I think is a
> less-than-awesome specification, and I am curious about the reasoning
> behind it being defined as valid
>
> sub a( --> Int:D ) { return Nil }
>
>
It doesn't matter if it is a C pointer.
Unless you are working on Moarvm, you should consider them arbitrary unique
numbers. Like GUID.
That said, yes I'm sure that they represent a location in memory.
On Sun, Dec 20, 2020, 6:45 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> H
Nil is always a valid return value regardless of any check.
This is because it is the base of all failures.
On Sat, Dec 19, 2020, 8:17 PM yary wrote:
> Is this a known issue, or my misunderstanding?
>
> > subset non-Nil where * !=== Nil;
> (non-Nil)
> > sub out-check($out) returns non-Nil { ret
You can interpolate a method call in a string, but you need the parens.
say "$FruitStand.location() has $FruitStand.apples() apples in stock";
On Sat, Dec 19, 2020 at 4:28 AM Laurent Rosenfeld via perl6-users <
perl6-us...@perl.org> wrote:
> Yeah, right. $FruitStand.apples is not a direct ac
with $drone.engine {
.start;
say "engine started";
}
On Tue, Dec 15, 2020, 11:10 PM Konrad Bucheli via perl6-users <
perl6-us...@perl.org> wrote:
>
> Hi Ralph
>
> Thanks a lot for the extensive answer.
>
> I still consider it a trap because it does not do what it tells it
I suspect that the right way to do this may be to do something like having
a subclass of
CompUnit::* which does things the Gentoo way.
I would assume that the lock is so that only one copy of Rakudo is changing
the repository at a time.
Presumably Gentoo already prevents more than one thing instal
is the same as
Q :single :words < a b c >
Note that :single means it acts like single quotes.
Single quotes don't do anything to convert '\n' into anything other than a
literal '\n'.
If you want that to be converted to a linefeed you need to use double quote
semantics (or at least tur
{
.put for @LeafpadrcNew;
}
On Sat, Nov 14, 2020 at 1:07 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2020-11-14 06:00, Brad Gilbert wrote:
> > The purpose of `spurt` is to:
> > 1. open a NEW file to write to
> > 2. print a single string
&
The purpose of `spurt` is to:
1. open a NEW file to write to
2. print a single string
3. close the file
If you are calling `spurt` more than once on a given file, you are doing it
wrong.
If you give `spurt` an array, you are probably doing it wrong; unless you
want the array turned into a single s
I'm pretty sure you need to use single quotes for your example, as Raku
will replace the @_[0] before Perl has a chance to do anything with it.
On Thu, Nov 5, 2020, 10:23 PM Paul Procacci wrote:
> https://github.com/niner/Inline-Perl5
>
> use Inline::Perl5;
>
> subset test of Str where EVAL "sub
I believe this is what you were looking for
sum 46, 20, 26, 87, 11 Z* (1, 101, 101² … *)
sum 1234567890.polymod(101 xx *) Z* (1, 101, 101² … *)
On Mon, Nov 2, 2020 at 2:12 PM Sean McAfee wrote:
> On Fri, Oct 30, 2020 at 2:19 PM Elizabeth Mattijsen
> wrote:
>
>> > On 30 Oct 2020, at 22
Functions in Raku tend to have one job and one job only.
`split` splits a string.
So if you call `split` on something that is not a string it gets turned
into one if it can.
This happens for most functions.
Having `split` be the only function that auto-vectorizes against an array
would be very
Rakudo does not use ICU
It used to though.
Rakudo used to run on Parrot.
Parrot used ICU for its Unicode features.
(Well maybe the JVM backend does currently, I don't actually know.)
MoarVM just has Unicode as one of its features.
Basically it has something similar to ICU already.
---
The pur
$file.IO.lines( :nl-in(…), :chomp, … )
is actually short for
$file.IO.open( :nl-in(…), :chomp ).lines( … )
On Sun, Aug 30, 2020 at 10:43 AM yary wrote:
> You were close!
>
> First, you were looking at the docs for Path's "lines", but you are using
> a string "lines" and those docs say
Invocant is in the dictionary though.
In fact it is from Latin.
Origin & history:
Derived from in- + vocō ("I call").
Verb:
I invoke
I call (by name)
In fact that is pretty close to the same meaning as it is used in the Raku
docs.
It is the object that we are calling (aka invoking) a met
There are no variables that begin with :
There are variable declarations in signatures that begin with :
:$foo is exactly the same as :foo($foo)
sub bar ( :$foo ) {…}
sub bar ( :foo($foo) ){…}
:$foo in a signature is a shortcut for declaring a named argument :foo()
and a variable with t
Daniel, the thing about Todd is that his brain doesn't process the written
word the way most people do.
That is according to him by the way.
He is under the assumption that it is because of how he was taught to read.
I think the issue is different.
I think that he might be on the Autistic Spectru
On Wed, Aug 26, 2020 at 9:56 PM yary wrote:
> Map and its descendants like Hash relate "from *string* keys to values of
> *arbitrary* types"
> QuantHash and its descendants like Mix, Bag, Set "provide *object* hashes
> whose values are *limited* in some way"
>
> Is there an associative class wher
The problem is that often adverbs are chained without a comma.
my %h = (a => 1);
%h{'a'}:exists:delete # True
say %h.keys; # ()
---
my %h = (a => 1);
postcircumfix:< { } >( %h{'a'}, :exists:delete ) # True
say %h.keys; # ()
On Wed, Aug 26, 2020 at 7:31 AM Marcel Timmer
There doesn't need to be an ASCII equivalent of ≢, because you can combine
(==) with the ! metaop to come up with !(==)
On Sat, Aug 1, 2020 at 4:58 PM yary wrote:
> For every Unicode operator, there's a "Texas" ASCII equivalent
> (==) for ≡
> but... none that I can find for ≢
> is this an overs
tli
> startlin
> startling
> user@mbook:~$ raku -ne '.put if "star" ff "start" ;' startling.txt
> star
> start
> user@mbook:~$ raku -ne '.put if /"star"/ ff /"start"/ ;' startling.txt
> star
> start
> startl
> star
There's the ff operator and the fff operator.
The ff operator allows both endpoints to match at the same time.
The fff operator doesn't.
On Sat, Jul 25, 2020 at 3:16 PM William Michels via perl6-users <
perl6-us...@perl.org> wrote:
> Hello,
>
> I'm trying to learn the "ff" (flipflop) infix opera
If you really want a streaming framework for Perl, the mailing list for
Raku users might not be the best place to ask.
(Raku used to be known as Perl6, and we haven't done anything to change the
name of this mailing list.)
Raku has a very similar syntax to Perl. (It used to be called Perl6 after
a
Subset types are not object types.
A subset is basically a bit of checking code and base type associated with
a new type name.
In something like:
my ABC $a .= new;
That is exactly the same as:
my ABC $a = ABC.new;
Well there is no functional `.new` method on any subset types, so
`DEF.
I don't know why you are getting an error.
But I think that this is one case where you should be writing `BUILD`
instead of `TWEAK`.
Note though that you can only have one `BUILD` or `TWEAK` per class.
---
Or maybe you want a multi method `new` instead?
multi method new ( :$native-object! )
gmail.com> wrote:
> On Thu, Jun 25, 2020 at 8:10 PM Brad Gilbert wrote:
>
>> {*} is specially handled by the compiler as a term.
>>
>
> Thank you!
>
> I guess that handling is peculiar to proto, and maybe it's worth
> documenting it.
>
> --
> Fernando Santagata
>
{*} is specially handled by the compiler as a term.
Let's say you have a class named Foo:
class Foo {…}
You wouldn't expect to be able to use it like this:
F o o.new()
It is the same thing with {*}.
The only difference is that {*} is meant to look like a Block { } combined
with a Whate
It does actually make sense to call any on any
say (1, 2, 3).any + (4, 5, 6).any
# any(any(5, 6, 7), any(6, 7, 8), any(7, 8, 9))
On Wed, Jun 24, 2020 at 6:22 PM William Michels via perl6-users <
perl6-us...@perl.org> wrote:
> I evaluated Joe's code using Patrick's explanation of parenthe
You don't want to use <{…}>, you want to use ""
if $line ~~ / (^P\d+) \s+ {} "%products{$0}" / {
Note that {} is there to update $/ so that $0 works the way you would expect
Although I would do something like this instead:
my ($code,$desc) = $line.split( /\s+/, 2 );
if %products{$co
On Sat, Jun 13, 2020 at 1:27 PM Sean McAfee wrote:
> On Sat, Jun 13, 2020 at 10:21 AM Brad Gilbert wrote:
>
>> That was just a dumb example.
>> An incredibly dumb example.
>>
>> So what happens is that `Bool.pick` chooses The Bool values of either
>> `True`
atures
> match:
> (Match: Associative:D, $, $, $, $, $, *%_)
> (Match: Iterable:D \var, int \im, int \monkey, int \s, $, \context,
> *%_)
> (Match: Mu:D \var, int \im, int \monkey, $, $, \context, *%_)
> in block at line 1
>
> > 'TrueFalse' ~
Inside of a regex `{…}` will just run some regular Raku code.
Code inside of it will most likely have no effect on what the regex matches.
What you should have written was:
$ = "@W[3]"
The thing you were thinking of was:
$ = <{ @W[3] }>
Which could have been written as:
---
To
There are four different types of a function. (both method and sub)
- `multi`
- `proto`
- `only`
- `anon`
A `proto` function is mainly just to declare there will be multiple
functions with same name.
`multi` is short for "multiple", meaning more than one.
`only` is the default, it means there is
The point was that 「say」 will print undefined values without complaining.
Really debug statements should be more like:
$*STDERR.put: 「%CommandLine = 」, %CommandLine;
Or more succinctly:
dd %CommandLine;
On Wed, May 27, 2020 at 1:39 AM Peter Pentchev wrote:
> On Tue, May 26, 2020 at 0
gt;>
> >> into a test?
> >>
> >> $ raku -e 'my $x="abc"; if $x.index( "q" ) eq Nil {say
> "Nil"}else{say
> >> "Exists";}'
> >> Use of Nil in string context
> >> in block
I'm not sure that is the best way to look at 「」 and 「」.
> 'abcd123abcd' ~~ / > .+ > /
「123」
In the above code 「>」 makes sure that the first thing that
「.+」 matches is a 「」
And 「>」 makes sure that the last thing 「.+」 matches is also
a 「」
The 「>」 is written in front of the 「.+」 so it start
This is more of how I would structure it
with %CommandLine {
.say;
# if /^ '[' .*? ']' / {
if .starts-with('[') && .contains(']') {
...
}
} else {
say 'no backup path given'
}
We can skip checking 「.starts-with」 and 「.contains」 if th
Generally you don't need to test for 「Nil」.
You can just test for defined-ness.
$ raku -e 'my $x="abc"; with $x.index( "q" ) {say "Exists"} else {say
"Nil";}'
Also 「Nil」 is not a 「Str」, so why would you use 「eq」?
$ raku -e 'Nil.Str'
Use of Nil in string context
If you really need to
a2.3
> >> a5.1
> >> b1a23
> >>
> >> Other than not quite getting the alpha, beta, and
> >> release candidate thing down, I do not understand:
> >>
> >> .sort: *.Version
> >>
> >> 1) What does
In the following the 「:」 makes it so you don't need parenthesis
(…).sort: …
(…).sort(…)
The reason there needs to be a space is so it isn't confused for an adverb.
「*.Version」 is a method call turned into a lambda.
Basically it creates a lambda where the only thing it does is call a met
You are misunderstanding what `put` does.
It does not print the internal representation.
What it does do is turn the value into a `Str` object, then print it with a
trailing newline.
It just so happens that objects will by default return something that looks
like an internal representation when
Why do you have `.Bool` on all of the `.e` tests?
A file or directory either exists or it doesn't. So `.e` always returns a
Bool.
So there is zero reason to try to coerce it to a Bool.
You can look at the return value of `.e`.
> say '.'.IO.can('e').head.signature
(IO::Path:D: *%_ --> Boo
The 「@i」 is defined within the 「BEGIN」 block, so it is scoped to the
「BEGIN」 block.
If you didn't want that, don't use a *block* with 「BEGIN」.
BEGIN my @i;
Also you wrote the 「if」 wrong.
There shouldn't be a 「;」 before the 「if」.
You also don't need to use 「$_ ~~ 」 with 「/^WARN/」 as that woul
In UTF8 characters can be 1 to 4 bytes long.
UTF8 was designed so that 7-bit ASCII is a subset of it.
Any 8bit byte that has its most significant bit set cannot be ASCII.
So multi-byte codepoints have the most significant bit set for all of the
bytes.
The first byte can tell you the number of byt
Run code once an hour:
react whenever Supply.interval(60 * 60) {
say "it's been an hour"
}
Right now that gets about 0.01 seconds slower every time the interval runs.
(At least on my computer.)
So it will get 1 second later every 4 days.
Or if you want more precise control, you
Of course %*ENV is case sensitive, hashes are case sensitive.
say %*ENV.^name; # Hash
%*ENV gets populated with the values before your code runs.
Other than that it is fairly ordinary.
On Tue, Apr 7, 2020 at 7:20 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> >> On Tue, Ap
You do NOT want to use `fork`.
MoarVM has several threads that are running, and `fork` doesn't handle that.
A simple way is to just use the `start` statement prefix
sub child-process () {
sleep 2;
say 'child says hi'
}
say 'starting child';
start child-process();
[*] is also a meta prefix op
say [*] 4, 3, 2; # 24
But it also looks exactly the same as the [*] postfix combination of
operators
my @a = 1,2,3;
say @a[*]; # (1 2 3)
There is supposed to be one that looks like [**]
my @b = [1,], [1,2], [1,2,3];
say @b[**]; # (1 1 2 1 2 3)
There is a bit in the executable that tells windows to open a terminal.
If you copy the executable to say rakudo_no_terminal.exe and change that
bit in the copy, then Windows won't show you a terminal.
On Mon, Mar 30, 2020 at 8:14 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
>
There isn't currently a way to compile to a single file, but there was a
GSOC project that started on it.
On Thu, Mar 5, 2020, 7:17 AM Aureliano Guedes
wrote:
> I have another question for you. Maybe it must be better done in another
> thread...
> But, there is a way to compile Raku code in a bi
The \p{L} syntax is done by using :L inside of <> instead
/\p{L}/
/<:L>/
You can combine them
/[\p{L}\p{Z}\p{N}]/
/<:L + :Z + :N>/
Character classes are also done inside of <>
/[_.:/=+\-@]/
/<[_.:/=+\-@]>/
They of course can also be combined with the previous discussed
If you want to find out if two variables are bound to the same data, there
is an operator for that
my $a = 3;
my $b = 3;
say $a =:= $b; # False
my $c := $b;
say $b =:= $c; # True
On Wed, Feb 12, 2020 at 7:27 AM Aureliano Guedes
wrote:
> Thank you.
>
> So, I'd like to find a
The problem is that you are using ~ with an uninitialized Buf/Blob
my Buf $read;
$read ~ Buf.new;
# Use of uninitialized value element of type Buf in string context.
Note that it is not complaining about it being a Buf. It is complaining
about it being uninitialized.
If you initializ
I wouldn't use a subset like this:
subset PhoneBook of Hash[Int, Str];
I would instead use a constant:
constant PhoneBook = Hash[Int, Str];
Then you can use that for creating new instances.
PhoneBook.new(); # Hash[Int, Str].new()
# or
my %pb is PhoneBook; # my Int %pb{Str};
Why would you think that?
The numeric binary xor operator is +^.
my $v = 0b00101101 +^ 0b1001; say $v.base(2);
# 100100
^ is the junctive xor operator.
my $v = 1 ^ 2 ^ 'a';
$v eq 'a'; # True
$v == 1; # True
$v == 2; # True
$v == 3; # False
There is also the stringy binar
.say for lines
On Mon, Jan 20, 2020 at 1:59 AM William Michels via perl6-users <
perl6-us...@perl.org> wrote:
> Hi Yary (and Todd),
>
> Thank you both for your responses. Yary, the problem seems to be with
> "get". I can change 'while' to 'for' below, but using 'get' raku/perl6
> actually ret
Most operators in Raku are subroutines.
1 + 2
infix:<+>( 1, 2 )
-1
prefix:<->( 1 )
You can add your own operators by creating such a subroutine.
sub postfix: ( UInt \n ) { [×] 2..n }
say 5!; # 120
Because it is so easy to add operators. Operators only do one thing.
Ok looking into it, zero is inside of the set of cardinal numbers.
It is still wrong to call a uint a cardinal number.
It's just wrong for a different reason.
Looking through various definitions, a cardinal number is a number which
represents a count of sets.
So a uint could be used to represent
According to the description you copied, a cardinal can never be zero.
any of the numbers
that express amount, as one, two, three, etc.
So it is more accurate to call it an integer.
On Mon, Jan 13, 2020 at 1:32 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2020-01-
my int16 $x = 0xABCD;
my uint16 $y = $x;
say $x.base(16);
say $y.base(16)
-5433
ABCD
If you just want to coerce to uint16
(my uint16 $ = $x)
say (my uint16 $ = $x).base(16)
On Tue, Jan 7, 2020 at 10:20 AM ToddAndMargo via perl6-users <
perl6-us...@p
A Null pointer is just a pointer that points to the address 0.
So if you are dealing with it as an integer it will be 0.
On Fri, Dec 27, 2019 at 6:06 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Hi All,
>
> https://docs.perl6.org/language/nativecall
>
> "As you may have
There should probably be a way to require a minimum version of the compiler.
use rakudo v2019.07;
On Fri, Dec 13, 2019, 3:14 AM MT wrote:
> Hello all,
>
> In the light of renaming to Raku I was wondering if the statement 'use
> v6.*' is still useful.
>
> First there is no version 6 of Raku
valuates to TRUE match from above gets assigned
> to $/ and LHS "probe" gets overwritten with appropriate "substitution"
> characters between second two solidi of s/// or S/// :
> ( "match" --> $/ ) ; ( RHS_"substitution" --> "probe"
I like to use them, but I am not you.
On Sun, Dec 8, 2019 at 8:19 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2019-12-08 18:04, Brad Gilbert wrote:
> > I do not quite understand the question.
> >
> > I told you how to directly enter unicode b
n Sun, Dec 8, 2019 at 6:46 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2019-12-08 06:22, Brad Gilbert wrote:
> > Personally though I just use 「Ctrl+Shift+u f f 6 2 Space」 and
> > 「Ctrl+Shift+u f f 6 3 Space」
> >
>
> Hi Brad,
>
&
Either use `rw` or `raw`
Use `rw` if you need it to be mutable.
Use `raw` if you just want to make sure you are getting the actual variable.
That really only applies to `$` parameters though.
---
`@` and `%` parameters are `raw` already.
sub pop-random( @_ ) {
@_.splice( (0..@_.el
>> The belief that Yet Another Programming Language is the answer to the
>> world's problems is a persistent, but (IMNSHO) a naive one.
Some people might think that applies to Raku.
Not me, but some people.
On Sun, Dec 8, 2019 at 2:09 PM Parrot Raiser <1parr...@gmail.com> wrote:
> Who initiated
ch construct that is useless (i.e. disallowed):
> >
> > > my $r = 'abc' ~~ { S/b/./ }
> > a.c
> > > my $s = 'abc' ~~ { s/b/./ }
> > Cannot modify an immutable Str (abc)
> > in block at line 1
> > >
> >
> > No matter
gt; my $x = Q[\:\\::]; ( my $y = $x ) ~~ s/ Q[\\] /x/; say $y
> > \:\\::
> >
> > Nor does this:
> > my $x = Q[\:\\::]; ( my $y = $x ) ~~ s/ [\\] /x/; say $y
> > x:\\::
> >
> > Many thanks,
> >
The return value of s/// is the same as $/
If you want the resulting string instead you can use S/// instead.
> $_ = 'abc'
> my $r = S/b/./
> say $r
a.c
Note that it warns you try to use S/// with ~~
> my $r = 'abc' ~~ S/b/./
Potential difficulties:
Smartmatch wi
The shortcut spelling of Q[…] is to use 「 and 」 (U+FF62 and U+FF63)
my $x = 「\:\\::」; ( my $y = $x ) ~~ s/ 「\\」 /x/; say $y
\:\\::
The case could be made that \Q[\\] should work as well. (It would need to
be added).
(Along with \q[…] and \qq[…])
Note that \Q[…] doesn't work in string li
History lesson:
Rakudo is short for Rakuda Do
Rakuda Do is supposed to have meant "the way of the camel"
The first book about Perl was Learning Perl. It had a Camel on the front
cover.
(Note also that the name of the butterfly logo is named Camelia, and that
the first 5 characters spell Camel.)
Windows before Windows 10 had different internal and external numbers.
https://www.gaijin.at/en/infos/windows-version-numbers
On Sat, Nov 23, 2019, 2:03 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2019-11-22 23:41, ToddAndMargo via perl6-users wrote:
> > Hi All,
> >
> > I
$ by itself is a an anonymous state variable.
So these two lines would be exactly the same.
$.foo
(state $).foo
A feature was added where $.foo would instead be used for public attributes.
Since a public attribute just adds a method, it was allowed to use it to
call any method.
Which pro
CatHandle is the mechanism behind $*ARGFILES.
If you want to read several files as it they were one, you can use
IO::CatHandle.
my $combined-file = IO::CatHandle.new( 'example_000.txt', *.succ ...
'example_010.txt' );
Basically it works similar to the `cat` command-line utility. (Hence its
n
The optimizer can lower lexical variables into local variables.
When it does so, it keeps track of this so that it can give you this error
message.
The `given` block and the `when` blocks are optimized away.
If you move the first `$a` declaration to inside the `given` block the
error goes away.
Programs are compiled in memory, it just isn't written out to disk.
On Mon, Oct 21, 2019 at 3:33 AM Marcel Timmerman wrote:
> @yary
>
> Thanks for your answer. I've done it too and saw the same kind of result.
> But then I thought I've read it somewhere that programs are not compiled,
> only mod
1 - 100 of 228 matches
Mail list logo