Re: "rule" declarator: Different results for 'unadorned' match vs unnamed/named captures? (in re Grammars...).

2021-03-12 Thread Ralph Mellor
On Thu, Mar 11, 2021 at 8:53 PM William Michels wrote: > > I think there's something going on with the examples below, as I'm > seeing different results when comparing a basic "rule" match vs either > unnamed or named "rule" captures. All your examples are

"rule" declarator: Different results for 'unadorned' match vs unnamed/named captures? (in re Grammars...).

2021-03-11 Thread William Michels via perl6-users
Hello, I've been chatting with raiph on SO regarding Grammar "tokens" vs "rules". The OP is here https://stackoverflow.com/q/62051742 and our discussion is here https://stackoverflow.com/a/62053666 . I think there's something going on with the examples below, as I'm seeing di

Re: Different return values with "say" vs "put" (Nil representation... )

2020-05-18 Thread William Michels via perl6-users
On Mon, May 18, 2020 at 10:18 AM Brad Gilbert wrote: > > 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

Re: Different return values with "say" vs "put" (Nil representation... )

2020-05-18 Thread William Michels via perl6-users
On Mon, May 18, 2020 at 4:03 AM Patrick R. Michaud wrote: > > "say $x" is essentially equivalent to "put $x.gist". > > Since Nil is undefined (roughly equivalent to a type object), Nil.gist has a > string value of "Nil" and can be printed. However, attempting to convert Nil > directly into a

Re: Different return values with "say" vs "put" (Nil representation... )

2020-05-18 Thread Brad Gilbert
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

Re: Different return values with "say" vs "put" (Nil representation... )

2020-05-18 Thread Patrick R. Michaud
"say $x" is essentially equivalent to "put $x.gist". Since Nil is undefined (roughly equivalent to a type object), Nil.gist has a string value of "Nil" and can be printed. However, attempting to convert Nil directly into a Str throws an error because that's attempting to stringify an

Different return values with "say" vs "put" (Nil representation... )

2020-05-18 Thread William Michels via perl6-users
Hello, I'm interested in knowing the differences between the return values when "say" is used compared to "put". My understanding is that "put" returns Raku's internal representation of a value held by a variable, while "say" is merely "put" with the .gist method called on it (a "human readable",

Re: sleep 3600 vs task scheduler

2020-04-08 Thread ToddAndMargo via perl6-users
On 2020-04-07 20:44, ToddAndMargo via perl6-users wrote: On 2020-04-07 20:39, Paul Procacci wrote: What happens when you try it? What impact do you observe? My guess is the impact is exactly the time it takes for your cpu to perform the initial context switch for the syscall, and then another

Re: sleep 3600 vs task scheduler

2020-04-07 Thread ToddAndMargo via perl6-users
On 2020-04-07 20:39, Paul Procacci wrote: What happens when you try it? What impact do you observe? My guess is the impact is exactly the time it takes for your cpu to perform the initial context switch for the syscall, and then another when waking up. Hi Paul, I opened the resource

Re: sleep 3600 vs task scheduler

2020-04-07 Thread Paul Procacci
What happens when you try it? What impact do you observe? My guess is the impact is exactly the time it takes for your cpu to perform the initial context switch for the syscall, and then another when waking up. On Tue, Apr 7, 2020 at 10:28 PM ToddAndMargo via perl6-users < perl6-us...@perl.org>

Re: sleep 3600 vs task scheduler

2020-04-07 Thread ToddAndMargo via perl6-users
On Tue, Apr 7, 2020 at 6:02 AM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote: Hi All, Windows 7/10 Another piece of the puzzle. I want to loop Raku program once an hour. Is it better use `sleep 3600` or let the program die and restart every hour

Re: sleep 3600 vs task scheduler

2020-04-07 Thread Brad Gilbert
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

sleep 3600 vs task scheduler

2020-04-07 Thread ToddAndMargo via perl6-users
Hi All, Windows 7/10 Another piece of the puzzle. I want to loop Raku program once an hour. Is it better use `sleep 3600` or let the program die and restart every hour from the Task Scheduler. By better, I mean less of a CPU footprint. `sleep` would allow the user to cancel the program and

Re: perl6 vs ruby

2020-03-05 Thread Brad Gilbert
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

Re: perl6 vs ruby

2020-03-05 Thread Aureliano Guedes
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 binary capable to run in a system without a Raku installation? On Thu, Mar 5, 2020 at 6:17 AM Elizabeth Mattijsen wrote: > Well, internally many parts still have Perl

Re: perl6 vs ruby

2020-03-05 Thread Elizabeth Mattijsen
Well, internally many parts still have Perl 6 in them. Renaming those is... an interesting task. Online, most resources have been renamed, but some still need to be done. This mailing list being one of them. Unfortunately, it is part of the crumbling Perl infrastructure, so it's unclear

Re: perl6 vs ruby

2020-03-05 Thread Wyatt Chun
Hi Is perl6 totall renamed to raku? regards On Wed, Mar 4, 2020 at 4:15 AM Fields, Christopher J wrote: > A few people had started a port of some BioPerl code to Perl6 a while ago; > I tested this recently and it still passed tests. > > https://github.com/cjfields/bioperl6 > > It should be

Re: perl6 vs ruby

2020-03-03 Thread Fields, Christopher J
A few people had started a port of some BioPerl code to Perl6 a while ago; I tested this recently and it still passed tests. https://github.com/cjfields/bioperl6 It should be renamed to bioraku! Chris Sent from my iPhone On Mar 3, 2020, at 11:41 AM, Parrot Raiser <1parr...@gmail.com> wrote:

Re: perl6 vs ruby

2020-03-03 Thread Parrot Raiser
> we use ruby for Biological data analysis. I wish perl6 should have got that > capability. Would you like to give us a sample problem,, to see if someone can show a potential solution?

Re: perl6 vs ruby

2020-03-01 Thread Kristopher
on 2020/3/2 9:15, Parrot Raiser wrote: If the reference to "BIO" was about bioinformatics, the ability to use Perl 5 code and modules should reduce the amount of necessary re-working, though there are probably opportunities to rework the Perl 5 for more power and coherence in Rakudo. Thanks

Re: perl6 vs ruby

2020-03-01 Thread Kristopher
on 2020/2/29 17:16, Shlomi Fish wrote: do you meanhttps://en.wikipedia.org/wiki/Bioinformatics ? Yes, that's right. thank you.

Re: perl6 vs ruby

2020-03-01 Thread Parrot Raiser
Since Ruby was designed to fix what Matz considered mis-features of Perl 5, and the motivation for Rakudo was much the same, it's hardly surprising they're similar. One feature of any Open Source product to consider when investing any effort in it is the supporting community. Though Ruby was

Re: perl6 vs ruby

2020-02-29 Thread Shlomi Fish
Hi Kristopher, welcome aboard. On Sat, 29 Feb 2020 15:14:15 +0800 Kristopher wrote: > Hello, > > This is Kristopher from Japan. > We have ruby language, which I have been using on work for years. > Now I take a rough watch on perl6 language. > Can you tell me what are the main difference

Re: perl6 vs ruby

2020-02-29 Thread Elizabeth Mattijsen
https://docs.raku.org/language/rb-nutshell > On 29 Feb 2020, at 08:14, Kristopher wrote: > > Hello, > > This is Kristopher from Japan. > We have ruby language, which I have been using on work for years. > Now I take a rough watch on perl6 language. > Can you tell me what are the main

perl6 vs ruby

2020-02-28 Thread Kristopher
Hello, This is Kristopher from Japan. We have ruby language, which I have been using on work for years. Now I take a rough watch on perl6 language. Can you tell me what are the main difference between perl6 and ruby? Is perl6 good at BIO? Thank you.

Re: Precedence: assignment vs smartmatch? (Now--with square brackets... .)

2019-12-11 Thread William Michels via perl6-users
Thank you, Brad. I think I've got it (let me know if below is incorrect): pseudocode: 1. eval(LHS --> $_) 2. eval($_ ~~ RHS) 3. overwrites(LHS <-- Step#2), except for S/// and TR/// [ When I first learned the "~~" smartmatch operator, I only thought it was for testing (e.g. with rx/// and

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-09 Thread Brad Gilbert
I meant that $_ is set to the left value while the right value is being evaluated, and also while .ACCEPTS is called. LEFT ~~ RIGHT (Where LEFT and RIGHT represent some expression to be executed during runtime.) Imagine that underneath the hood, something like this is happening: my

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-09 Thread William Michels via perl6-users
Thank you Brad, for your in-depth reply. There are parts of your reply that make perfect sense to me, and also parts where I am still confused. I feel I understand your first three examples (1,2,3) explaining how the smartmatch operator relates to ACCEPTS(). However in the second three examples

Re: Perl6 vs Julia

2019-12-09 Thread Andrew Kirkpatrick
I think the motivation for Julia was that nothing delivered both the performance and flexibility they wanted for numeric programming. C/C++ are too static and dangerous, Matlab proprietary, (not sure what they don't like about Octave), Java too verbose and lacking in numeric primitives, Common

Re: Perl6 vs Julia

2019-12-09 Thread Parrot Raiser
I agree with you. Improving an existing one is different, even if fixing the original does give turn out to produce what is effectively a new one. Addressing a completely new class of problem would also be different, but that would be moving up the stack.

Re: Perl6 vs Julia

2019-12-08 Thread Brad Gilbert
>> 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

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-08 Thread Brad Gilbert
smartmatch is among the most complex parts of the language. That complexity has to managed or it will be too complex to use effectively. To that end, the rules and order of operations are never altered. 1. The left side is evaluated first, and the resulting value captured > say('left')

Re: Perl6 vs Julia

2019-12-08 Thread Parrot Raiser
Who initiated the project, and why? What deficiencies in existing languages are they trying to address? The belief that Yet Another Programming Language is the answer to the world's problems is a persistent, but (IMNSHO) a naive one. On 12/8/19, Andrew Shitov wrote: > Let’s not hide the fact

Re: Perl6 vs Julia

2019-12-08 Thread Andrew Shitov
Let’s not hide the fact that Julia development raised 4.6 million dollars and the language is production-ready. On Sun, 8 Dec 2019 at 12:46, JJ Merelo wrote: > It might have been, but syntax is more Python-like to the point that in > some cases it's exactly the same. It's got a very extensive

Re: Perl6 vs Julia

2019-12-08 Thread Fernando Santagata
If math is your area of interest, the GSL is interesting *and* humongous: I've been working on it for two weeks writing the raw interface to the C library and I just started to write a Raku-level interface, something that would let programmers use the library without having to learn how to create

Re: Perl6 vs Julia

2019-12-08 Thread Tom Blackwood
Nice! Thanks for letting me know. On Mon, Dec 9, 2019 at 12:21 AM Fernando Santagata < nando.santag...@gmail.com> wrote: > Hi, > I authored an interface to the Fastest Fourier Transform in the West > (libfftw3) as Math::FFT::Libfftw3; I'm working on an interface to the GNU > Scientific Library

Re: Perl6 vs Julia

2019-12-08 Thread Fernando Santagata
Hi, I authored an interface to the Fastest Fourier Transform in the West (libfftw3) as Math::FFT::Libfftw3; I'm working on an interface to the GNU Scientific Library (libgsl). I'm writing this just to avoid duplicating an effort. On Sun, Dec 8, 2019 at 12:18 PM Tom Blackwood wrote: > Thanks

Re: Perl6 vs Julia

2019-12-08 Thread JJ Merelo
El dom., 8 dic. 2019 a las 12:10, Tom Blackwood () escribió: > Thanks JJ. > We know Perl has PDL for data science, > http://pdl.perl.org/ > > We are looking into it and see if it's possible to make a Perl6 version of > Scikit-learn based on PDL. > That would be really great. JJ

Re: Perl6 vs Julia

2019-12-08 Thread Tom Blackwood
Thanks JJ. We know Perl has PDL for data science, http://pdl.perl.org/ We are looking into it and see if it's possible to make a Perl6 version of Scikit-learn based on PDL. regards. Tom On Sun, Dec 8, 2019 at 6:40 PM JJ Merelo wrote: > It might have been, but syntax is more Python-like to

Re: Perl6 vs Julia

2019-12-08 Thread JJ Merelo
It might have been, but syntax is more Python-like to the point that in some cases it's exactly the same. It's got a very extensive macro systems, which enables it to work concurrently, for instance. It's more scientific-computing oriented, which means that there are all sort of mathematical

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-07 Thread William Michels via perl6-users
Apologies, looks like the smartmatch operator is listed in the Operator Precedence table (15th row: under "Chaining infix"): https://docs.raku.org/language/operators#Assignment_operators However, am I correct in stating that the assignment operator ("=") is on the 19th row ("Item assignment")?

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-07 Thread William Michels via perl6-users
Wow Brad, that's interesting and informative. I haven't seen the S/// operator before, so I had to look it up. On the first page I found the docs say (quite informatively): "S/// uses the same semantics as the s/// operator, except it leaves the original string intact and returns the resultant

Perl6 vs Julia

2019-12-07 Thread Tom Blackwood
Hello How do you think of Julia language? https://en.wikipedia.org/wiki/Julia_(programming_language) It says it is also influenced by perl language. Regards

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-07 Thread Brad Gilbert
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

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread ToddAndMargo via perl6-users
On 2019-12-06 23:06, William Michels via perl6-users wrote: On Fri, Dec 6, 2019 at 10:54 PM ToddAndMargo via perl6-users wrote: On 2019-12-06 22:38, ToddAndMargo via perl6-users wrote: On Fri, Dec 6, 2019 at 9:28 PM ToddAndMargo via perl6-users wrote: On 2019-12-06 20:33, William Michels

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread William Michels via perl6-users
On Fri, Dec 6, 2019 at 10:54 PM ToddAndMargo via perl6-users wrote: > > On 2019-12-06 22:38, ToddAndMargo via perl6-users wrote: > >>> On Fri, Dec 6, 2019 at 9:28 PM ToddAndMargo via perl6-users > >>> wrote: > > On 2019-12-06 20:33, William Michels via perl6-users wrote: > > say

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread ToddAndMargo via perl6-users
On 2019-12-06 22:38, ToddAndMargo via perl6-users wrote: On Fri, Dec 6, 2019 at 9:28 PM ToddAndMargo via perl6-users wrote: On 2019-12-06 20:33, William Michels via perl6-users wrote: say $/; First I have seen of `$/`.  Is it any relation to `$_`? On 2019-12-06 22:11, William Michels via

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread ToddAndMargo via perl6-users
On Fri, Dec 6, 2019 at 9:28 PM ToddAndMargo via perl6-users wrote: On 2019-12-06 20:33, William Michels via perl6-users wrote: say $/; First I have seen of `$/`. Is it any relation to `$_`? On 2019-12-06 22:11, William Michels via perl6-users wrote: Hi Todd, yes in a sense "$/" is

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread William Michels via perl6-users
Hi Todd, yes in a sense "$/" is related to "$_" in that they're both variables that get filled with values behind the scenes by Raku/Perl6. You already know that "$_" is the general default 'topic' variable (same as in Perl 5, see Ref#1 below). >From Ref#2 below: " $/ is the match variable. It

Re: Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread ToddAndMargo via perl6-users
On 2019-12-06 20:33, William Michels via perl6-users wrote: say $/; First I have seen of `$/`. Is it any relation to `$_`?

Precedence: assignment vs smartmatch? (...was Re: where is my map typo)

2019-12-06 Thread William Michels via perl6-users
Hello All, Todd put up some interesting code yesterday using the Raku/Perl6 REPL, which I reproduced with no problem. Additionally I tried some variations removing and/or moving parentheses to a different location, and have numbered the relevant REPL lines 1 through 6: mbook:~ homedir$ perl6 To

Re: comment: Perl6 vs batch

2019-11-23 Thread Veesh Goldman
There are other indications that Windows was designed by the devil, like the line ending format and the fact that they use UTF-16LE instead of UTF-8 in excel. Who the heck uses utf16! On Sat, Nov 23, 2019 at 10:12 AM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi All, > > I

comment: Perl6 vs batch

2019-11-23 Thread ToddAndMargo via perl6-users
Hi All, I broke down and installed Perl6 on my two Windows Virtual Machine: w7 and w-Nein (w10). OH HOLY MOLLY it is easier to program in Perl6 than batch!!! I think batch may have been designed by the devil himself! Okay, maybe not, but I feel stupid I did not do it years ago! -T

[perl #125690] [BUG] Rakudo has stopped matching a regex, related to | vs. ||

2019-02-14 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
gt; use to match successfully (and presumably did with 2015.06, otherwise > > we'd have had rakudo star test failures), but doesn't match anymore > > with > > rakudo 2015.07. > > > > If one changes the || to | in single_quote_escape, it matches again. > > > &

Re: "put" vs "say"

2018-10-21 Thread Parrot Raiser
Thanks for the suggestions. I ran a couple of tests: my $data_list = 1..1001; say $data_list; produces 1..1000 real0m0.357s user0m0.435s sys 0m0.048s my $data_list = 1..1001; put $data_list; produces the list of integers from 1 to 1001 (obviously a single string). real

Re: "put" vs "say"

2018-10-21 Thread Timo Paulssen
put is meant for machines, while say is meant for humans. this is implemented by having say call the .gist method and put calling the .Str method. Try using say and put on a list of a thousand elements or more and you'll see what I mean. HTH   - Timo On 21/10/2018 18:29, Parrot Raiser wrote: >

"put" vs "say"

2018-10-21 Thread Parrot Raiser
"put" and "say" seem to be redundant, but I'm sure there's a good reason for having 2 output commands. Would anyone care to comment on how they differ and why, or point to an explanation?

Re: "temp" vs "my"

2018-10-05 Thread Jonathan Scott Duff
What you want is OUTER ... my $v = "original"; > { > my $v = OUTER::<$v>; > say $v; > $v = "new one"; > say $v; > } > say $v; It's how you access the outer scope from an inner scope. -Scott On Wed, Oct 3, 2018 at 1:10 AM yary wrote: > Reading and playing with

Re: "temp" vs "my"

2018-10-03 Thread Brad Gilbert
Note that OUTER::<$v> only goes up one level. So to go up two levels OUTER::OUTER::<$v> There is also OUTERS::<$v> which will go up as many levels as it needs to find the variable { my $a = 1; my $b = 2; { my $a = 3; { say

Re: "temp" vs "my"

2018-10-03 Thread yary
Thanks! Knew I'd seen the concept of OUTER but couldn't remember the keyword. -y On Wed, Oct 3, 2018 at 5:51 AM, Timo Paulssen wrote: > you can refer to the outer $v as OUTER::('$v'), that ought to help :) > On 03/10/2018 08:10, yary wrote: > > Reading and playing with

Re: "temp" vs "my"

2018-10-03 Thread Timo Paulssen
you can refer to the outer $v as OUTER::('$v'), that ought to help :) On 03/10/2018 08:10, yary wrote: > Reading and playing with https://docs.perl6.org/routine/temp > > There's an example showing how temp is "dynamic" - that any jump > outside a block restores the value. All well and good. > >

"temp" vs "my"

2018-10-03 Thread yary
Reading and playing with https://docs.perl6.org/routine/temp There's an example showing how temp is "dynamic" - that any jump outside a block restores the value. All well and good. Then I thought, what if I want a lexical temporary value- then use "my"- and this is all well and good: my $v =

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Brent Laabs via RT
Actually, if you change it to .*| -- this will work as you expect. It's a bug that your version doesn't work, of course. It does seem to involve tangentially, but it is unrelated to underscore. On Mon, Oct 1, 2018 at 6:17 PM Vijayvithal via RT < perl6-bugs-follo...@perl.org> wrote: > This

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Brent Laabs
Actually, if you change it to .*| -- this will work as you expect. It's a bug that your version doesn't work, of course. It does seem to involve tangentially, but it is unrelated to underscore. On Mon, Oct 1, 2018 at 6:17 PM Vijayvithal via RT < perl6-bugs-follo...@perl.org> wrote: > This

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Vijayvithal via RT
This issue surfaces because of the token TOP line. If instead of | only ruport was used the testcase works for both cases. So it is quite possible that the bug is elsewhere but shows up as a difference between alpha and alnum. Regards Vijay On Fri, Sep 28, 2018 at 07:18:49AM -0700, Patrick R.

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Vijayvithal via RT
This is in conflict with the documentation at https://docs.perl6.org/language/regexes which states Alphabetic characters including _ And \w. plus In my example. '_' matches the alpha regex. As per specifications, Everything that matches alpha should match alnum. Which in the given

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread vijayvithal jahagirdar
This is in conflict with the documentation at https://docs.perl6.org/language/regexes which states Alphabetic characters including _ And \w. plus In my example. '_' matches the alpha regex. As per specifications, Everything that matches alpha should match alnum. Which in the given

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Vijayvithal
This issue surfaces because of the token TOP line. If instead of | only ruport was used the testcase works for both cases. So it is quite possible that the bug is elsewhere but shows up as a difference between alpha and alnum. Regards Vijay On Fri, Sep 28, 2018 at 07:18:49AM -0700, Patrick R.

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs via RT
Golfs to just the top grammar, which is the only one that returns Nil. grammar Alnum1 { token TOP {|.*} } grammar AlnumReversed { token TOP {.*|} } grammar Alpha1 { token TOP {|.*} } my $rx = rx/^ [|.*] $/; my $str="n~"; .say for "=== ==", Alnum1.parse($str),

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs
Golfs to just the top grammar, which is the only one that returns Nil. grammar Alnum1 { token TOP {|.*} } grammar AlnumReversed { token TOP {.*|} } grammar Alpha1 { token TOP {|.*} } my $rx = rx/^ [|.*] $/; my $str="n~"; .say for "=== ==", Alnum1.parse($str),

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Patrick R. Michaud via RT
The issue doesn't seem to be the underscore, because I get the same result even when converting the underscore into a letter ('b'): $ cat gentb.p6 grammar G0 { token TOP {|.*} regex rport { } rule ruport { } #token type {+} token type {+} } grammar G1 {

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Patrick R. Michaud
The issue doesn't seem to be the underscore, because I get the same result even when converting the underscore into a letter ('b'): $ cat gentb.p6 grammar G0 { token TOP {|.*} regex rport { } rule ruport { } #token type {+} token type {+} } grammar G1 {

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs via RT
Are you sure about that? Underscore has been part of the specs (synopses) for for at least 10 years, probably longer. > "_" ~~ // 「_」 alpha => 「_」 On Thu, Sep 27, 2018 at 7:52 PM Brandon Allbery wrote: > "_" is not an alphabetic character. It's allowed in "alnum" because that > is by

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs
Are you sure about that? Underscore has been part of the specs (synopses) for for at least 10 years, probably longer. > "_" ~~ // 「_」 alpha => 「_」 On Thu, Sep 27, 2018 at 7:52 PM Brandon Allbery wrote: > "_" is not an alphabetic character. It's allowed in "alnum" because that > is by

Re: [perl #133541] Grammer bug vs

2018-09-27 Thread Brandon Allbery
"_" is not an alphabetic character. It's allowed in "alnum" because that is by intent what is \w in other regex implementations, which includes "_". On Thu, Sep 27, 2018 at 10:47 PM Vijayvithal wrote: > # New Ticket Created by Vijayvithal > # Please include the string: [perl #133541] > # in

Re: [perl #133541] Grammer bug vs

2018-09-27 Thread Brandon Allbery via RT
"_" is not an alphabetic character. It's allowed in "alnum" because that is by intent what is \w in other regex implementations, which includes "_". On Thu, Sep 27, 2018 at 10:47 PM Vijayvithal wrote: > # New Ticket Created by Vijayvithal > # Please include the string: [perl #133541] > # in

[perl #133541] Grammer bug vs

2018-09-27 Thread via RT
# New Ticket Created by Vijayvithal # Please include the string: [perl #133541] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=133541 > In the attached code, the only difference between the Grammars G0 and G1 is the

Re: method vs multi method

2018-09-14 Thread ToddAndMargo
On 09/14/2018 04:33 PM, Ralph Mellor wrote:      multi method kv ... Use of `multi` means there *may* be more than one *declaration* using the same declared routine name (`kv` in this case). There usually *will* be more than one. (Otherwise, why was it declared `multi`?) The normal

Re: method vs multi method

2018-09-14 Thread Ralph Mellor
> multi method kv ... Use of `multi` means there *may* be more than one *declaration* using the same declared routine name (`kv` in this case). There usually *will* be more than one. (Otherwise, why was it declared `multi`?) The normal way to *use* a routine is to call it. If you declare

method vs multi method

2018-09-14 Thread ToddAndMargo
Hi All, In the following: https://docs.perl6.org/routine/kv multi method kv(Any:U: -->List) multi method kv(Any:D: -->List) Does the "multi" mean ther are moe than one way to use the method, as in see the two instances above? Or something else? Also, it there was only one way to use

Re: WATs (Array[Str] vs Array and list vs scalar assignment)

2018-09-05 Thread Vadim Belman
applicable here. To my view the whole problem of understanding is understanding the difference of essentially $a = [...] vs @a.append([...]) which are happening under the hood. In the case of my module variance kicks me at the point where I'm trying to mimic Perl6 type checking. I can't know about wh

WATs (Array[Str] vs Array and list vs scalar assignment)

2018-09-05 Thread Ralph Mellor
ce_(computer_science) introduces this issue well imo. There's no way to avoid this issue it if you want to use a language that supports both sub-types (like a Cat is an Animal) and lists. In regard to co/contra variance Perl 6 actually delays the tougher WTFs that will come with time. You

Re: > vs gt

2018-07-28 Thread Brandon Allbery
ctly? That said, comparison of version numbers is a bit of a > > minefield for exactly this reason: not everyone agrees on when to use > > string vs. numeric comparison, or what to do when one is numeric and > > the other isn't. > > Hi Brandon, > > I wrote my own routine to

Re: > vs gt

2018-07-28 Thread ToddAndMargo
On 07/28/2018 08:26 AM, Brandon Allbery wrote: I think you can use Version.new on that and compare them reasonably directly? That said, comparison of version numbers is a bit of a minefield for exactly this reason: not everyone agrees on when to use string vs.  numeric comparison, or what

Re: > vs gt

2018-07-28 Thread Brandon Allbery
I think you can use Version.new on that and compare them reasonably directly? That said, comparison of version numbers is a bit of a minefield for exactly this reason: not everyone agrees on when to use string vs. numeric comparison, or what to do when one is numeric and the other isn't. On Sat

Re: > vs gt

2018-07-28 Thread ToddAndMargo
On 07/27/2018 11:27 PM, ToddAndMargo wrote: On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo > wrote:     Hi All,     Why does this work: if $CurlStr.chars > 200 {     But this does not? if $CurlStr.chars gt 200 {     79 was not larger than 200

Re: > vs gt

2018-07-28 Thread ToddAndMargo
On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo > wrote: Hi All, Why does this work: if $CurlStr.chars > 200 { But this does not? if $CurlStr.chars gt 200 { 79 was not larger than 200 Many thanks, -T On

Re: > vs gt

2018-07-27 Thread Brandon Allbery
> is numeric comparison: (79 > 200) is false. gt is string comparison: ("79" > "200") is true because "7" is lexically larger than "2". On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo wrote: > Hi All, > > Why does this work: > > if $CurlStr.chars > 200 { > > But this does not? > > if

> vs gt

2018-07-27 Thread ToddAndMargo
Hi All, Why does this work: if $CurlStr.chars > 200 { But this does not? if $CurlStr.chars gt 200 { 79 was not larger than 200 Many thanks, -T

Re: Bailador vs. Cro

2018-07-09 Thread Brad Gilbert
Bailador is based on Perl 5's Dancer which is based on Sinatra (Ruby). (bailador is spanish for dancer) Cro on the other hand was designed specifically around the features that are in Perl 6. This can make things more intuitive for someone proficient in Perl 6. It might also make it easier to

Re: Bailador vs. Cro

2018-07-09 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I've only done some very basic stuff with both Cro and Bailador. From what I can tell, Cro requires less code to get something going in, but Bailador is easier to get a regular MVC model working in. Have you read through the Cro SPA tutorial?

Bailador vs. Cro

2018-07-08 Thread mimosinnet
Hi all, Appart from pure hobbyist pleasure, I use Perl for some personal web development. I have (solely) used Mojolicious, really had fun, and learned Perl using it. I have been for some time looking for a Perl6 framework for web development (Perl6 bewitched me), and Bailador looks like an

Re: stackoverflow vs the world (and perl6-users)

2018-06-12 Thread Richard Hainsworth
Here's my experience: when I'm learning a new language or software, eg., php or css or recently GRAV CMS, and I have a problem, my first action is google: . I'm sure everyone does something like this. Whenever I see a response that includes Stackoverflow, I look there first because for over

Re: mixin syntax: does vs but

2018-06-12 Thread Timo Paulssen
You can override WHAT with a method, you just have to use a syntax that's not literally .WHAT, like this:     class Test { method WHAT() { say "i'm here" } }; Test."WHAT"();     # → i'm here

Re: stackoverflow vs the world (and perl6-users)

2018-06-12 Thread Brad Gilbert
On Tue, Jun 12, 2018 at 3:57 PM, Brandon Allbery wrote: > I replied to this one in private, but I want to make a point in public as > well. > > On Tue, Jun 12, 2018 at 4:24 PM Brad Gilbert wrote: >> >> The barrier is not with Stack Overflow. (←What I obviously meant) >> The barrier is within

Re: stackoverflow vs the world (and perl6-users)

2018-06-12 Thread Brandon Allbery
I replied to this one in private, but I want to make a point in public as well. On Tue, Jun 12, 2018 at 4:24 PM Brad Gilbert wrote: > The barrier is not with Stack Overflow. (←What I obviously meant) > The barrier is within you. > There's an insidious assumption hidden in here: that "the

Re: stackoverflow vs the world (and perl6-users)

2018-06-12 Thread Brad Gilbert
On Tue, Jun 12, 2018 at 2:42 PM, Brandon Allbery wrote: > On Tue, Jun 12, 2018 at 3:38 PM Brad Gilbert wrote: >> >> > The barrier is non-existent. >> >> I have only ever heard about speculated and imagined barriers. > > > This is not proof that such barriers don't exist. I hit the magic 2

Re: mixin syntax: does vs but

2018-06-12 Thread JJ Merelo
Ah, OK, you didn't mean override WHAT itself, but get an ersatz what in some other way. Got it. Thanks. El mar., 12 jun. 2018 a las 21:32, Brad Gilbert () escribió: > On Tue, Jun 12, 2018 at 2:16 PM, JJ Merelo wrote: > > This is what the documentation says: https://docs.perl6.org/syntax/WHAT >

Re: stackoverflow vs the world (and perl6-users)

2018-06-12 Thread JJ Merelo
As I said, all and any reason to not post in StackOverflow are valid. Just add a few points here El mar., 12 jun. 2018 a las 21:19, Brad Gilbert () escribió: > Stack Overflow is from Fog Creek Software. > See https://stackoverflow.com/company > > They also regularly provide bulk downloads of all

Re: stackoverflow vs the world (and perl6-users)

2018-06-12 Thread Brandon Allbery
On Tue, Jun 12, 2018 at 3:38 PM Brad Gilbert wrote: > > The barrier is non-existent. > > I have only ever heard about speculated and imagined barriers. > This is not proof that such barriers don't exist. I hit the magic 2 mark and lasted less than a week afterward because the rules suddenly

  1   2   3   4   5   6   7   8   9   10   >