(*.is-prime);
take $f;
$n = $n div $f
}
}
}
On Fri, 17 Jun 2022 at 03:51, Simon Proctor wrote:
> This is because if there isn't an explicit return the last statement
> evaluated is the implied return value.
>
> So the last call (which returns N
ve not called a recursion
> > from anywhere other than the end of a routine, so haven't run into this
> > issue before. Learned something today!
> >
> > Thanks to Simon, William and Andinus for your assistance!
> >
> > - Rick
> >
> > On 6/16/22 11:07
I think, and I don't have my computer to hand to double check but I think
you want a return before your recursive.call to factors passing in @f.
When dealing with recursive functions you need to make sure what you're
returning back up the stack.
On Thu, 16 Jun 2022, 18:10 Rick Bychowski, wrote
Buf.new(0x2A, 0x54, 0xFF, 0x53);
> Buf:0x<2A 54 FF 53>
>
> I would like to do it on one big blast:
>
> my Buf $b=Buf.new(0x2A54FF53A5F1D36F1CEA7E61FC37A20D54A77FE7B78);
> Cannot unbox 170 bit wide bigint into native integer
>
> But do not know the proper syntax.
&
message (which is a bit LTA) refers to the `$0`. As
> > https://docs.raku.org/routine/subst#Callable shows, you need to write:
> >
> > $s.subst( / \' ~ \' (.+) /, { $0 })
> >
> >> > my $t = '{}'
> >> {}
> >> >
Still waking up but I think the issue is your pairlist has a semi colon
divider but this should be after each pair.
So the trailing semi colon after b is causing it to fail.
On Sun, 26 Dec 2021, 06:01 Paul Procacci, wrote:
> Hey all,
>
> Twas the night of Christmas, when all through the house,
also use R, which has the similar usage.
>> > When we face very large data, we change to Apache Spark for distributed
>> computing.
>> > Spark's interface languages (python, scala, even ruby) are not
>> flexible, but their computing capability is amazing, due to the whole
>> cluster contributing the computing powers.
>> > Yes I know perl5 is somewhat old, but in perl6 why won't we make that a
>> distributed computing framework like Spark? Then it will help a lot to the
>> data programmer who already knows perl.
>> > I expect a lot from this project.
>> >
>> > Thanks.
>> > Piper
>>
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
hon process and set
> breakpoints on the C++ code, then step through the suspicious code path.
>
> Haskell is far from on par w.r.t. stepping debuggers, but bugs are
> interestingly less with it, for unutterable reasons.
>
> Best regards,
> Compl
>
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
>raku -e "say 3602879701896397/36028797018963968*1e0 eqv 0.1e0"
> True
>
> C:\>raku -e "say 1/10*1e0 eqv 0.1e0"
> True
>
> seems to be essentially the same as doing:
> C:\_32>raku -e "say 3602879701896397/36028797018963968 == 0.1e0"
> True
>
> C:\_32>raku -e "say 1/10 == 0.1e0"
> True
>
> Cheers,
> Rob
>
>
>
>
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
I would suggest starting by reading this page in the docs :
https://docs.raku.org/language/create-cli
Covers how $*USAGE is created and the various options you have for
providing help data.
On Tue, 5 May 2020, 06:46 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> Hi All,
>
> Just
environmental variables are not case sensitive in
> >> Windows. And I do not know how Raku interacts with
> >> them.
> >>
> >> >echo %WINDIR%
> >> C:\WINDOWS
> >>
> >> >echo %windir%
> >> C:\WIN
You might want to take a look at Trait::Env, partly because I've not tested
it in Windows and I'd be interested to know if it works well.
On Wed, 8 Apr 2020, 03:25 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> On 2020-04-07 18:25, Brad Gilbert wrote:
> > Of course %*ENV is case
Ok I don't have access to my windows box until this evening. I'm mostly
used to using Dropbox on a Linux box where it's just a folder.
Sorry for my mistake.
On Tue, 7 Apr 2020 at 07:51, Shlomi Fish wrote:
> Hi Simon,
>
> On Tue, 7 Apr 2020 06:55:00 +0100
> Simon Proc
Don't see why not, Dropbox is just a folder that you should be able to
access as normal.
On Tue, 7 Apr 2020, 02:22 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> Hi All,
>
> Do any of you using Windows and Dropbox know
> if Raku's file IO utilities can both read
> and write to a D
f the object needs to be stored in a
> &-sigiled container, is has to implement Callable.
>
> class A does Callable {
> submethod CALL-ME(|c){ 'called' }
> }
> my &a = A;
> say a(); # OUTPUT: «called»
>
> That second "postfix" operator, means
&g
Ok I 100% don't know after trying this out :
my Buf $a = Buf.new(1,2,3);
my Blob $b = Blob.new(4,5,6);
$a ~= $b;
say $a
And it worked fine so... I dunno.
On Tue, 11 Feb 2020 at 11:00, Simon Proctor wrote:
> I think the problem is IO::Socket.read() returns a Blob not a Buf.
>
&g
s also doesn't work:
>>> >
>>> >my Buf $read;
>>> >$read ~= $socket.read(1024);
>>> >
>>> >Dies with the same error as above.
>>> >
>>> >
>>> >But this works?
>>> >
>>> >my Blob $read = Buf.new;
>>> >$read ~= $socket.read(1024);
>>> >
>>> >
>>> >Best regards,
>>> >David Santiago
>>>
>>>
>>> Hi!
>>>
>>> Can someone explain me why this doesn't work:
>>>
>>> my Blob $read;
>>> $read ~= $socket.read(1024);
>>>
>>> Dies with error:
>>>
>>> X::Buf::AsStr: Cannot use a Buf as a string, but you called the Stringy
>>> method on it
>>>
>>> This also doesn't work:
>>>
>>> my Buf $read;
>>> $read ~= $socket.read(1024);
>>>
>>> Dies with the same error as above.
>>>
>>>
>>> But this works?
>>>
>>> my Blob $read = Buf.new;
>>> $read ~= $socket.read(1024);
>>>
>>>
>>> Best regards,
>>> David Santiago
>>>
>>> --
>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>>
>>
>>
>> --
>> JJ
>>
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
ndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Hi All,
>
> Is Larry using his magic powder again?
>
> Can I declare a subroutine as a variable?
>
> my $abc = my sub (UInt $u, Str $s, Int $I) {
>
> How would I use it?
>
> And why would do such
{ not .defined or 1 <= $_ <= 10 };
say OneToTen.Range;
And it gives ...
-Inf^..^Inf
And now I'm a bit confused. The Docs say the UInt is just a subset
https://docs.raku.org/type/UInt
So how does it have it's own Range?
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
I go with one repository per module.
On Sat, 4 Jan 2020, 21:16 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> Hi All,
>
> Over in Git Hub land, would you create a repository
> for each module you place on Git? Or like my modules,
> the all support/import each other, would you pla
https://docs.raku.org/language/optut
This should cover it.
On Sun, 15 Dec 2019, 20:17 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> On 2019-12-15 02:56, Tobias Boege wrote:
> > On Sat, 14 Dec 2019, ToddAndMargo wrote:
> >> What am I doing wrong here?
> >>
> >>> multi prefix:<√>
I saw this issue when I was building Trait::Env, the closest I got to
figuring it out was closure's in phasers in modules seem to get lost in the
compilation process.
But I never figured out a solution I'm afraid.
On Sat, 14 Dec 2019, 22:35 Paul Procacci, wrote:
> Ladies/Gents,
>
> I'm perplexe
I would argue that signatures are great for any command line script
because you can use them with MAIN to get input checking.
On Wed, 11 Dec 2019, 18:07 Veesh Goldman, wrote:
> I believe there's a disparity here between the needs of a sysadmin and
> people who program hardcore with Raku. That's
On Tue, 10 Dec 2019 at 02:40, ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2019-12-09 07:21, Simon Proctor wrote:
> > I think this does highlight something we probably should document more.
> >
> > How to read signatures. Because it's a *very* p
contains(Str:D: Cool:D $needle, Cool:D $pos --> Bool:D)
>
> In the above, it is not real obvious to the Riff-Raff
> (me), who is not have developer level ledge, that the
> "Str:D" in inside the parenthesis, but instead feeding
> the method. You have to get use to the c
I find both the implications of "guard dog" and "gatekeeper" unfair ways to
talk about anyone on the community especially JJ.
On Mon, 9 Dec 2019, 14:38 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> On 2019-12-09 03:47, Elizabeth Mattijsen wrote:
> >> On 9 Dec 2019, at 10:32, Tod
,
> >
> > AFAIK Perl’s culture is not to use so many constants in actual
> > programming. :)
> >
> > Tom
> >
>
> Is there a way to make constants universal inside a module, or
> do I have to declare them inside every sub?
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
quot;my $map = Map.new('a', 1, 'b', 2); say $map{'a'}; say $map{ 'a',
> 'b' };"
> ===SORRY!=== Error while compiling -e
> Malformed my
> at -e:1
> --> my⏏ = Map.new('a', 1, 'b', 2); say {'a'
top pass a value to a sub, but I
> want to restrict what those values are.
>
> For instance, things like
>
> AbortRetryIgnore
> CancelRetryContinue
> Help
> YesNo
> Maybe
>
> And so on and so forth.
>
> If the wrong value is passed, I want the checke
Forgot to reply all this to the list.
In my defence it's first thing in the morning for me.
-- Forwarded message -
From: Simon Proctor
Date: Wed, 27 Nov 2019, 06:59
Subject: Re: for by 3?
To: William Michels
Sorry Bill I was typing that on my phone and didn't ful
If you want to read you lines in groups of 3 then you want batch :
for @x.lines.batch(3) -> @b
If you just want the third line and throw away the first I'd probably do a
tail on that.
for @x.lines.batch(3).map( *.tail ) -> $l
Note you need to map the tail on each batch of three not slap it on t
Using a set would be good but it doesn't give you the matching string from
the original (which is what I thought was required) otherwise Sets would be
my first thought.
On Sun, 1 Sep 2019, 17:57 William Michels, wrote:
> Hi Yary and Paul and Simon,
>
> I ran into the same difficulties as Yary wi
>> From http://docs.perl6.org/language/regexes#Regex_interpolation I'd
>> think that Rakudo would use the literal contents of $chars_to_match,
>> instead it's using the literal chars "$ c h a r s _ t o _ m a t c h" and
>> warning about repeated c, underscore, etc.
>>
>> -y
>>
>
>
> --
> __
>
> :(){ :|:& };:
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
Int, (with any given value) were
> among the values?
>
> Best regards
> Mikkel
>
> On Thu, 15 Aug 2019 at 16:38, Simon Proctor
> wrote:
>
>> The easiest option would be use the set operators. In this case (elem)
>> (or ∈) will coerce your array to a Set and then check
@objects = [1, True, "string", 5, Str.new];
> Containing different kind of objects. It could be Ints, Strs and Bools.
> Is there a nice way of determining if for example a Bool is present in the
> array, returning True or False whether the given object is present or not?
>
Not tried that
On Tue, 30 Apr 2019 at 12:35, Timo Paulssen wrote:
> Doesn't updating zef to the latest version fix everything up nicely?
> - Timo
> On 30/04/2019 12:06, Simon Proctor wrote:
>
> Until the p6c system is fixed here's a short term fix that will at least
ne of them. It's probably
> better to lower the timeout...
>
> El mar., 30 abr. 2019 a las 12:07, Simon Proctor ()
> escribió:
>
>> Until the p6c system is fixed here's a short term fix that will at least
>> let zef install modules from cpan.
>>
>> zef
stop trying to access the ecosystem modules.
It's not perfect as not everything is in CPAN but it should help.
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
> The result I want is 13908
> >> >
> >> > Many thanks,
> >> > -T
> >>
> >> And why do I have a broken pipe here?
> >>
> >> $ ps ax | grep [f]irefox | perl6 -ne 'say
> >> $_.lines.sort.reverse.words
6am here and I'm not at a computer but I think your problem is trying to
use both -n which runs your code on each line of STDIN and lines.
Try one or the other see what happens.
Once I'm ambulant and at a computer I'll poke at it myself.
On Fri, 15 Mar 2019, 05:34 Todd Chester via perl6-users, <
Ooo. Nice.
On Fri, 8 Feb 2019, 17:55 Brad Gilbert If you have a new enough version of Rakudo:
>
> my Buf $x=Buf.new(0xAE,0x5D,0x5C,0x72);
>
> my int32 $i = $x.read-int32(0,LittleEndian);
>
> say $i.base(16);
> # 725C5DAE
>
> On Fri, Feb 8, 2019 at 12:35 AM Todd Chester via per
mber in a buffer to and integer
>
> $ p6 'my Buf $x=Buf.new(0xAE,0x5D,0x5C,0x72); my int32 $i=$x[3] +< 0x18
> + $x[2] +< 0x10 + $x[1] +< 0x08 + $x[0]; say $x; say $i.base(0x10);'
>
> Buf:0x
> 725C5DAE
>
>
> Is there a more "elegant&
I think part of the issue is that fundamentally Roles are intended to be a
way of doing non inheritance based classes. So composing Roles from other
Roles is an anti pattern.
On Tue, 29 Jan 2019, 06:32 yary https://github.com/rakudo/rakudo/issues/2657 - looks like an outright
> bug, to me.
>
> I
Have you tried defining your return values in the signature?
sub AddThree( Int $a, Int $b, Int $c --> Int) {...}
With this the compiler knows what your function is supposed to return and
can earn you in advance.
On Wed, 2 Jan 2019, 20:04 ToddAndMargo via perl6-users Dear Perl 6 Developers,
>
>
; https://github.com/perl6/mu/blob/master/misc/perl6advent-2018/schedule
>
> ... Please!
>
> Cheers
>
> --
> JJ
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
ct 12, 2018 at 7:46 AM Simon Proctor
> wrote:
>
>> Only if the routine has an easily defined return Type. Many do not.
>>
>
> Is there not always a common root, even if it is Mu? Why not explicitly
> mark those
> as Mu for documentation purposes at least? That would d
. This was
>> my question, not whether or not I should write a definition
>> line for my own subs.
>>
>
> I agree. The documentation should always describe the routine with a -->
>
> Curt
>
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
rg_count: 0
> Callsite_1 :
>
>
> Most of the compilation stages don't work with --output, which could be a
> bug. However, --output isn't supposed to change what $*OUT is set to in the
> script.
>
> Hope that helps
> - Timo
>
>
> On 09/10/2018 15:18,
e code.
> On Tue, Oct 9, 2018 at 8:18 AM Simon Proctor
> wrote:
> >
> > So... I'm working through some notes for a talk on Thursday and I am
> trying to work out how the --output flag is supposed to work.
> >
> > I would expect this to create a file called t
printed to the command line and an error :
Use of Nil in string context
in any print at gen/moar/stage2/NQPCORE.setting line 850
Trying use it on a sime file (say "Hi") and it also doesn't do that.
(Note that the test file is created but it's empty).
Any ideas?
-
on Perl 6. If you had made a real effort to read
> > such introductory material, you would probably not have needed to ask
> > about 90% of the questions you asked lately. Do yourself a favor: read
> > good introductory material (tutorials or books).
> >
> > HTH,
> > Laurent.
> >
> >
>
> Hi Laurent,
>
> You already know what to expect. You are an advanced user.
> And I would have to tentatively agree with you. The documentation
> does "seem" to be extraordinarily well written for advanced
> developer level users. Just the sort of reader that does not
> need to use it as they already know what is going on.
>
> When you know how to use a function but can't reverse
> engineer how to do it from the documentation, then you
> are in real trouble.
>
> I am thinking of doing an RFE to place at the front
> of the routines documentation that introduces the reader
> on how to read THAT line in the documentation -- what
> the abbreviations and symbols and the like mean.
>
> If I do, I will post it here first for criticism.
>
> Your thoughts?
>
> -T
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/
On Sun, 30 Sep 2018, 12:05 ToddAndMargo, wrote:
> Hi All,
>
> https://docs.perl6.org/routine/join#(List)_routine_join
>
> method join(List:D: $separator --> Str:D)
>
> $ p6 'say (1, ).join("|");'
> 1|a b c
>
>
> In this instance you have passed in two objects the Int 1 and a list of
> Str's (<>
Just look at Curt's explanation.
On Fri, 14 Sep 2018, 12:22 Todd Chester, wrote:
>
>
> On 09/14/2018 04:18 AM, Simon Proctor wrote:
> > Assigned, created or defined.
> >
> > Basically the object has a value.
>
> Not following. Are there three of them?
>
Assigned, created or defined.
Basically the object has a value.
On Fri, 14 Sep 2018, 12:08 Todd Chester, wrote:
>
>
> On 09/14/2018 04:01 AM, Simon Proctor wrote:
> > :D is a type constraint requiring an instantiated (or defined) object of
> > the given type (or a subtype
gt; >>
> >> The second ":" is the delimiter for what goes in front of the .foo,
> >> meaning it has finished its declaration of what that in front is.
> >> Kind of like a comma.
> >>
> >> "-->List" mean somethi
I think the docs of objects (sorry on my phone no link) describe object
creation and the default new quite well.
Do a search for objects.
On Fri, 14 Sep 2018, 11:30 Todd Chester, wrote:
> Hi All,
>
> What exactly is going on with .new?
>
>https://docs.perl6.org/routine/new
>method new(T
:D means a defined value. So it's when you have an instance. :U is
undefined so it's when you call kv as a classethod.
Pair.kv would be :U.
(A => "b").kv would be :D
On Fri, 14 Sep 2018, 11:22 Todd Chester, wrote:
> Hi All,
>
> I adore the "kv" method:
>
> $ p6 'for "abc\n23\n4.56".lines.kv ->
O learn something new everyday :)
On Wed, 12 Sep 2018 at 08:46 Elizabeth Mattijsen wrote:
> Also:
>
> my $a is default(Nil);
>
> > On 12 Sep 2018, at 09:25, Simon Proctor wrote:
> >
> > If you don't define the type of a Scalar and don't assign t
Nil; if $x =:= Nil { say "Nil" } else { say "Not Nil"; };'
> Not Nil
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
) $pos
> Why "Int(Cool:D)"? Why is type Int being redefined
> as type "Cool" (number or any type or a string).
>
> $pos is the starting position to check for a match,
> start at zero.
>
> Foul!
> $pos is optional. But there is a "D" in its
> 2 : to achieve by force or threat
>> coerce compliance
>> coerce obedience
>>
>> 3 : to restrain or dominate by force
>>
>> And what the heck is a "multi sub" and a "multi method" anyway?
>> AND WHY DO I EVEN CARE? I just what to know how to use the
>> stinking thing! Geepers Creapers !!! (I am trying to avoid
>> swearing.)
>>
>> Perl 5's perldoc just tells you what you need to know to use the
>> stinker. It is concise and to the point. Perl 6 is a nightmare
>> to understand.
>>
>> Thank for putting up with my frustration.
>>
>> -T
>>
> --
Simon Proctor
Cognoscite aliquid novum cotidie
>>>
>>> Sort of like
>>> function: sub add($a, $b){return $a+$b}
>>> routine:sub add($a, $b, rw $c){$c = $a+$b}
>>>
>>> In Perl, what is the proper terminology?
>>>
>>> Many thanks,
>>> -T
>>>
>>> I no longer use "rw $c". I always use "return".
>>> The guys told me this was the best way on the
>>> chat line, so I adopted it.
>>>
>>
>>
> --
Simon Proctor
Cognoscite aliquid novum cotidie
this helps.
Simon
On Tue, 11 Sep 2018 at 13:05 Simon Proctor wrote:
> 1) why is it a "method" and not a "function"?
>
> methods are all on instance of a Class (or Role) they can locally access
> the instances data via self or $ or ... see below.
>
> 1-1/2) wh
i($me:) {
>
> 6) where is @b and %c?
>
> >"Well I'm class $me.^name(), of course!"
>
> 7) why is there a caret in front of "name"?
>
> >}
> > }
> >
> >
> > say Foo.whoami; # OUTPUT: «Well I'm class Foo, of course!»
>
> 8) no clue how they got there
>
>
> JJ, have you ever used Perl 5's perldocs? They are a bazillion
> times easier to understand than Perl 6's.
>
> Thank you for the help with this?
>
> -T
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
(more logical than -1)
> https://docs.perl6.org/routine/index; it's a constant, so you have to use
> =:= to check for equality. https://docs.perl6.org/routine/=:=
> ??!! is the ternary operator in Perl 6
> https://docs.perl6.org/language/operators#index-entry-operator_ternary-ternary_operator
>
>
> JJ
> PS: ObStackOverflow plug.
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
But potential issues are possible
> as it seems that the bug is not only related to method inheritance.
>
>
> Oops, correction: "get_value() is unlikely to be inherited". Sorry.
>
> Best regards,
> Vadim Belman
>
> --
Simon Proctor
Cognoscite aliquid novum cotidie
set to a value at build and if
> not call a block it's given when first read from. This gets round the issue
> of if we want to set it to Any.
> >
> > I *think* this will work. The stuff I've been doing with Trait::Env
> would point that way.
> >
>
> Best regards,
> Vadim Belman
>
> --
Simon Proctor
Cognoscite aliquid novum cotidie
le* about your view of it in this
> sub-thread.)
> >
> > If you haven't tried :from I can't help but wonder if perhaps we
> let you down by not advocating strongly enough for you to explore it.
> >
> > If you have, I can't help but wonder what you made of it and why you
> ruled out using Moo features in P6 via :from.
> >
> > So in summary I'm anxious to hear whether you tried :from and
> found it wanting; or we just failed to adequately bring your attention to
> it; or you rejected it from the get go based on your understanding of its
> relevance (or rather irrelevance) to your situation.
> >
> > --
> > raiph
>
> Best regards,
> Vadim Belman
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
al to
> her vision as P6.
>
> In summary, I believe that if you keep a positive, practical and
> persistent (multi year) focus on bringing P6 into the mix with a P5
> environment, P6 leaders will or at least should have your back.
>
> I'm curious to hear whether this is of interest to you or others.
>
> --
> raiph
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
expecting any of:
> infix
> infix stopper
> postfix
> statement end
> statement modifier
> statement modifier loop
>
>
> thanks,
>
>
> --
> Theo van den Heuvel
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
> Version:*
> >
> >
> >
> > > >9.2.0.92978.3.6.35572
> >
> >
> >
> >
> >
> > $WebPage ~~ s/ . * ''//;
> > $WebPage ~~ s/ '' .* //;
> >
> >
> > Then
> >
> > ( $NewRev = $Webpage ) ~~ s/ .*? ' >
> > I may have to fuss with the escapes.
> >
> > I do so adore Perl!
> >
> > :-)
> >
> > -T
>
>
> I have done this with two web pages already. Perl 6
> eat its lunch!
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
It's 5am and I should be asleep but I think this is a perfect case for ff
then.
Check out the docs for it.
On Sat, 11 Aug 2018, 05:01 ToddAndMargo, wrote:
> On 08/10/2018 08:56 PM, Simon Proctor wrote:
> > If all you are wanting to do is print the lines after a certain point i
initialized value, when all
> >> I did was add quotes around $y, as in the above line.
> >>
> >> $ p6 'my Str $x = "5"; my Int $y = dd +$x; say "$y";'
> >> 5
> >> Use of uninitialized value $y of
$ p6 'my Str $x = "5"; my Int $y = dd +$x; say "$y";'
> 5
> Use of uninitialized value $y of type Int in string context.
> Methods .^name, .perl, .gist, or .say can be used to stringify
> it to something meaningful.
>
>
> Why would I want to use "dd"?
>
> Many thanks,
> -T
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
6 Aug 2018 at 10:38 ToddAndMargo wrote:
> On 08/06/2018 02:07 AM, ToddAndMargo wrote:
> > On 08/06/2018 01:02 AM, Simon Proctor wrote:
> >> Sorry I wrote my earlier email on my phone without a computer to hand.
> >> Here's a quick rundown on what I'm talking about.
&
then you’re probably doing a lot of grammar changes to Perl 6. But
> >> without the actual code, this remains guessing.
> >>
> >>
> >> > Any workaround for this, or is this just growing pains for Perl
> 6?
> >>
> >> Not sure :-)
> &g
r changes to Perl 6. But without the
> actual code, this remains guessing.
>
>
> > Any workaround for this, or is this just growing pains for Perl 6?
>
> Not sure :-)
>
>
>
> Liz
--
Simon Proctor
Cognoscite aliquid novum cotidie
> sub divide($a, $b) { (EA, EB).pick.new.throw if $b == 0; $a / $b }
>
> my $quotient = do { my $q; { $q = divide($a, $b); CATCH { when EA { $q
> = -1 }; when EB { $q = -2 } } }; $q };
>
>
> [1]
> https://stackoverflow.com/questions/51644197/returning-values-from-exception-handlers-in-perl-6/51670573
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
les in it header, not five:
>
> sub IsCurrentRevNewer(
> $Caller, # who called this function
> $LatestRev, # Latest Revision
> $OldRev ) { # Old Revision
>
>
> -T
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
If you're wanting to run a command and have the output go directly to a
file you might want to look at shell?
https://docs.perl6.org/routine/shell
You can still get back a Proc object and specify if you want access to the
input, output of error handles. So if you wanted to call an external
comman
So what you what to match is a followed by zero or more not a's and then
the end of the string.
<[a]> is the perl6 regex for a range comprising of a alone you can negate
that like so <-[a]>
Giving us
perl6 -e 'my $x="abcabcabc"; $x ~~ s/a <-[a]>* $/xyz/; say $x;'
(There's probably a better way,
It's div (lowercase) so 21 div 4 = 5 :)
On Fri, 13 Apr 2018 at 11:07 ToddAndMargo wrote:
> Hi All,
>
> How do I do and integer divide?
>
> By that I mean I want only the whole number and
> not the decimal point or the fraction.
>
> 21 DIV 4 = 5 (not 5.25)
> 21 % 4 = 1 (remainder = 1)
>
>
>
There are also issues with libssl (which I think the IO::Socket::SSL module
calls using Native Call) and threads.
At the moment the only threads safe https client is the Cro one, I believe.
Sorry I can't be more help, 2am insomnia should really be sleeping.
On Wed, 4 Apr 2018, 2:30 am
Looks to me like one of the sites is redirecting to an https page and you
don't have IO::Socket::SSL installed.
On Wed, 4 Apr 2018, 1:42 am brian d foy,
wrote:
> # New Ticket Created by "brian d foy"
> # Please include the string: [perl #133057]
> # in the subject line of all future correspo
There are also issues with libssl (which I think the IO::Socket::SSL module
calls using Native Call) and threads.
At the moment the only threads safe https client is the Cro one, I believe.
Sorry I can't be more help, 2am insomnia should really be sleeping.
On Wed, 4 Apr 2018, 2:30 am
Looks to me like one of the sites is redirecting to an https page and you
don't have IO::Socket::SSL installed.
On Wed, 4 Apr 2018, 1:42 am brian d foy,
wrote:
> # New Ticket Created by "brian d foy"
> # Please include the string: [perl #133057]
> # in the subject line of all future correspo
Where is the wishlist?
On Fri, 29 Dec 2017 at 20:12 Michael Stemle wrote:
> I just finished a module from the wishlist. I’d like to pick up another.
> Is this a good place to discuss priorities for the existing wishlist, or in
> general?
>
> I didn’t see an obvious list for this topic.
>
> Many
t know why they designed that data container that
> way)
>
> On Sat, Oct 28, 2017 at 9:47 PM, Simon Proctor
> wrote:
>
>> Ahhh.. H. Even with the array as a private variable?
>>
>> On Sat, 28 Oct 2017, 8:41 pm Fernando Santagata, <
>> nando.santag...@g
just a CArray.
> Anyway I couldn't add a CArray to the class, because it would change its
> size and I need to pass the reference to that class to a C function.
>
> On Sat, Oct 28, 2017 at 1:58 PM, Simon Proctor
> wrote:
>
>> Here's my very naive way of doing
Here's my very naive way of doing it.
class A does Positional {
has $.a0 is rw;
has $.a1 is rw;
has $.a2 is rw;
has $.a3 is rw;
has $.a4 is rw;
has $.a5 is rw;
has @!arr;
method TWEAK {
@!arr[0] := $.a0;
@!arr[1] := $.a1;
@!a
So
$f = so "eraseme.txt".IO.f;
Would do the trick?
On Fri, 29 Sep 2017, 6:56 am Norman Gaywood, wrote:
> On 29 September 2017 at 15:10, Brandon Allbery
> wrote:
>
>>
>> (And, Norman? It produces a Failure, not a hard exception. You can
>> introspect Failures to keep them from getting thrown.)
So I had a crazy little idea. I've played the odd bit of roleplaying in my
time and wanted to created a 'd' operator.
Quite simple really.
sub infix: ( Int $num, Int $size ) { [+] (1..$size).roll($num) };
sub prefix: ( Int $size ) { 1 d $size }
Gives us 3 d 6 to roll 3 six sided dice or a prefi
>From the perl6 -h response you have the standard Perl command line
switches
-e program one line of program, strict is enabled by default
With this case $*IN has the content from the pipe going into it. Personally
I combine -e with one of the next two
-n run program
See I'm using mi6 to generate my META6.json file from the report and it
picks the version up from the module file. Other options like that seem
sensible to me.
Simon
On Wed, 28 Jun 2017, 13:01 Martin Barth, wrote:
> Hello,
>
> but your approach means you have to state the version in the META6.j
directory auto-cleanup mechanism?
>
>
> https://metacpan.org/pod/distribution/App-cpanminus/lib/App/cpanminus/fatscript.pm#-auto-cleanup
>
> On Thu, May 25, 2017 at 7:20 AM, Simon Proctor
> wrote:
>
>> So I'm playing around with Docker files (Perl 5 ATM) and one thing I
So I'm playing around with Docker files (Perl 5 ATM) and one thing I'm
getting quite into is trying to keep them small. An important part of this
is deleting any extraneous caching info built up during the build,
preferably as part of the RUN step to get intermediate layers small.
(So with Perl5 a
It's a logical test but I'd probably use || instead.
See : https://docs.perl6.org/language/traps#Loose_boolean_operators
On Tue, 21 Mar 2017 at 10:56 ToddAndMargo wrote:
> On 03/21/2017 03:07 AM, Brent Laabs wrote:
> > $PathAndName.IO.f or $PathAndName.IO.open(:w).close;
>
> Is that a coding "
.e checks a path exists.
.f checks it exists AND is a file.
.d checks it exists AND is a directory.
(Perl 5 was the -e, -f and -d tests)
On Tue, 21 Mar 2017 at 10:19 ToddAndMargo wrote:
> On 03/21/2017 03:07 AM, Brent Laabs wrote:
> > You can create a file by opening a filehandle for writing.
>
Just because the file is called "nonexistent_file" doesn't mean is doesn't
exist.
It's a poorly written example really.
if "possibly_existing_file".IO.e {
say "file exists";
}
else {
say "file doesn't exist";
}
Is more intuitive I would say.
On Tue, 21 Mar 2017 at 09:53 ToddAndMargo
Built the JVM Perl6 using rakudobrew and the 2017.02 branch. It builds OK
but gives :
java.nio.file.NoSuchFileException: blib/Perl6/BOOTSTRAP.jar
in (gen/jvm/ModuleLoader.nqp:88)
(And a bunch more stack trace)
Any idea how I can fix it?
Simon
100 matches
Mail list logo