Re: just curious to know

2020-06-14 Thread William Michels via perl6-users
Hi Radhakrishnan, I think the question you are asking directly relates to your experience as a programmer. If you have a lot of experience and a "systems programming toolkit" under your belt (classic bash shell scripting, sed, awk, and perl_5 ), what does Raku/Perl6 add? The short answer is:

Re: interpolating the return from embedded code in a regexp

2020-06-14 Thread yary
True, and I am well and truly baffled by my example where the 1st bad line incorrectly is labelled good, the 2nd bad line is correctly labelled bad, and the 3rd good like is correctly labelled good. -y On Sun, Jun 14, 2020 at 6:04 PM Joseph Brenner wrote: > > Just to be be clear, my idea is

Re: interpolating the return from embedded code in a regexp

2020-06-14 Thread Joseph Brenner
> Just to be be clear, my idea is the second line is wrong, and it should flag that one as a problem Oh, but if you go literally with the code I posted, *both* the first and second lines have incorrect descriptions, and only the third line ("corn dogs") matches. (That was a mistake when I

Re: interpolating the return from embedded code in a regexp

2020-06-14 Thread Joseph Brenner
Getting correct behavior is an improvement over my try like so, which gets the same warning but fails all the lines: / (^P\d+) \s+ $(%products{$0}) / On 6/14/20, yary wrote: > I should have read the output! > > This one gives the right answers but with lots of warnings > / (^P\d+) \s+

Re: just curious to know

2020-06-14 Thread Parrot Raiser
There is potentially a place for Raku in education, as a language that can evolve from simple expressions in the REPL to one-liners, basic scripts and through to complete CS courses with the various programming paradigms (procedural, O-O, functional) and into language design with grammars. The

Code assertions to spy on regexps behavior

2020-06-14 Thread Joseph Brenner
By the way, I've been finding code assertions are a fun way of spying on what's going on with your regexps: $_ = "Alpha beta gamma"; my @matches = m:g/(a) /; # 5 # 10 # 13 # 16

Re: interpolating the return from embedded code in a regexp

2020-06-14 Thread yary
I should have read the output! This one gives the right answers but with lots of warnings / (^P\d+) \s+ $("%products{$0}") / checking line: P123 Viridian Green Label Saying Magenta Use of Nil in string context in regex at regex-loop.p6 line 18 Use of Nil in string context in regex at

Re: interpolating the return from embedded code in a regexp

2020-06-14 Thread Joseph Brenner
Well, with the first one it rejects all of my lines, and with the second one it passes all of them. Just to be be clear, my idea is the second line is wrong, and it should flag that one as a problem On 6/14/20, yary wrote: > https://docs.raku.org/language/regexes#Regex_interpolation gave

Re: interpolating the return from embedded code in a regexp

2020-06-14 Thread yary
https://docs.raku.org/language/regexes#Regex_interpolation gave me some ideas Try matching against / (^P\d+) \s+ %products{$0} / This one also works, in a roundabout way / (^P\d+) \s+ {"%products{$0}"} / -y On Sun, Jun 14, 2020 at 4:44 PM Joseph Brenner wrote: > In part because of the

interpolating the return from embedded code in a regexp

2020-06-14 Thread Joseph Brenner
In part because of the recent discussion here, I decided to play around with using Raku code embedded in a regexp. I came up with a contrived example where I was going to examine a product listing in a text block to see if the product descriptions matched the product codes. The valid associations

Re: just curious to know

2020-06-14 Thread ToddAndMargo via perl6-users
On 2020-06-14 08:04, Radhakrishnan Venkataraman wrote: Hi, I had been a perl 5.0 user in the past.  Ever since perl 6.0 was announced, I waited, like many, indefinitely.  At last perl 6.0 has just started from its starting block and is also in the race.  I am happy about that. Hi

Re: just curious to know

2020-06-14 Thread Aureliano Guedes
I'd like to contribute with m 1 cent. Perhaps I read an interesting point mentioned by Richard: "- Perl regular expressions (regexes) are copied (badly??) by every !!! other language. But Raku takes them much further, and more flexibilty. After getting used to Raku regexes, I tear my hair out

RE: just curious to know

2020-06-14 Thread Mark Devine
Radhakrishnan, I would be considered a non-developer and more of a system admin/architect. I’ve used Perl 4/5 since the 1990s with success. My opinion of Python is not particularly high, except that it is ubiquitous (like Perl 5). Ruby was not unpleasant. I’ve sampled a few others, but

Re: just curious to know

2020-06-14 Thread Joseph Brenner
No particular "killer app" has emerged for Raku as of yet, there's no task that's going to make you go "Aha, this is a job for Raku!". But you know, it's not as though the original perl was designed to be the Web 1.0 server-side scripting language or the saviour of the human genome project...

Re: just curious to know

2020-06-14 Thread Theo van den Heuvel
Hi, If you allow me to jump in. I have used scores of programming languages. For me, raku (as it is now called) is the language to go to if I need a serious textual analysis of any kind. The design aspect of the language that I rely on heavily is the Grammar class, which so fundamentally

Re: just curious to know

2020-06-14 Thread Tom Browder
On Sun, Jun 14, 2020 at 10:56 Richard Hainsworth wrote: > Hi Radhakrishnan, > > If 'spreading wings over the information technology field' were to mean > anything other than what is fashionable today, then C still reigns. Richard, excellently said! I would like to see that on our Raku.org

Re: just curious to know

2020-06-14 Thread Richard Hainsworth
Hi Radhakrishnan, If 'spreading wings over the information technology field' were to mean anything other than what is fashionable today, then C still reigns. And if anything, COBOL still is so important in big financial institutions that COBOL programmers earn more than Java programmers - if

just curious to know

2020-06-14 Thread Radhakrishnan Venkataraman
Hi, I had been a perl 5.0 user in the past. Ever since perl 6.0 was announced, I waited, like many, indefinitely. At last perl 6.0 has just started from its starting block and is also in the race. I am happy about that. Perl 5.0 was generally termed to be good at CGI scripting, system