🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
japhb [Coke]: Proof of concept to see if I'm going in the right direction: gist.github.com/japhb/e146da8b3cfb...a7e1f14ada 02:34
Marelle Hello *waves*. 03:31
lucs m: class Baz { class Foo::Jub { } }; class Foo { }; Baz::Foo::Jub.new; 03:45
Raku eval
lucs m: class Baz { class Foo::Jub { } }; class Foo { }; Baz::Foo::Jub.new; 03:46
@lucs
m: class Baz { class Foo::Jub { } }; class Foo { }; Baz::Foo::Jub.new;
camelia ( no output )
lucs (sorry about the IRC-Discord mixup) 03:47
pelevesque Is there an official way in the Perl universe to create a To-Do list? Like Changes is usually the Changes file with capital C and no extension. Should I create a ToDo file, or maybe have it in my README.md? 05:00
moritz nothing official, many projects link to github/gitlab repo, and have issues for the TODOs there 07:41
pelevesque Thanks @moritz. Thanks for your book too on Regexes and Grammars, it really helped me. 08:14
moritz you're welcome, I'm glad you liked it :-) 08:15
Anton Antonov Is there a translator of Perl5 regexes into Raku regexes. (RakuAST solutions are of interest too...) 16:08
(Also, I aware that one can use the adverb :Perl5 in Raku regex applications.) 16:09
grondilu Even cooler would be a translator from raku's regexes to P5's. 16:11
lizmat not that I know of: also which version of Perl regexes?
tellable6 2023-04-04T13:04:33Z #raku <Nemokosch> grondilu: I suspect this has something to do with which operations copy and which do not
Anton Antonov @lizmat The version of regexes is Perl5 -- maybe this is not specific enough. (I do not know...) 16:13
lizmat Perl's regexes have gone through some changes since the Raku branch of :Perl5 was mad 16:14
e
Anton Antonov @lizmat Ok. I have to experiment with regexes I want to translate first and see which Perl5 version they adhere to. 16:16
lizmat of note: I think :k isn't supported in :Perl5
Anton Antonov @grondilu "Even cooler would be a translator from raku's regexes to P5's." -- Yes, I agree.
lizmat why?
1. Raku's regexes have features that cannot be supported by Perl 16:17
2. why first write Raku code to generate Perl ?
Anton Antonov @lizmat On the subject of Raku and Perl5 regexes from- and to-translations, I am mostly interested in: 1) speed comparisons, and 2) communicating solutions to others. (For example, Perl5 regexes is something I can bravely give to Java and Python programmers.) 16:20
lizmat "Perl5 regexes is something I can bravely give to Java and Python programmers" colour me surprised
grondilu lizmat: because that would allow to write regexes for other languages. 16:21
lizmat I thought the Perl regex linenoise was something that Python programmers really hate ?
grondilu bash/python/javascript etc
Anton Antonov @lizmat 🙂 yeah, but they should be able to experiment with those... and come up with their own solutions.
grondilu a compatibility layer of sort 16:22
Anton Antonov I have module / package naming question. (Again)
lizmat grondilu: compatibility layers generally are the lowest common denominator
Raku regexes are not that
grondilu well in my mind the layer would be the P5 regexes 16:23
perryprog What exactly is the necessity, though? 16:24
grondilu writing a P5 regex is no fun, but it's typically the only one available in many progr lang
perryprog (Ironically I was reading through the whole regex documentation page for the last two days, since I hadn't yet familiarized myself with them. I'm quite proficient in POSIX regex.)
grondilu so the idea would be you write the raku grammar and translate it into Perl regexes 16:25
lizmat grondilu: but even Perl regexes aren't standard ?
grondilu aren't they?
japhb [Coke]: Was the proof of concept I posted last night close to what you were looking for?
grondilu I mean there is a POSIX standard for regexes 16:26
perryprog There's POSIX Regex (what you get with grep), POSIX extended regex (what you get with grep -e... I think), and then there's PCRE which isn't POSIX compliant 16:27
(I think)
Anton Antonov I want to reprogram this WL package "NLP-Template-Engine" (github.com/antononcube/NLP-Template-Engine) into Raku. "NLP-Template-Engine" generates code based in different computational specifications, using different Machine Learning (ML) algorithms. What would be a good Raku module name for that? Here are my current variants: (1) "ML::NLP::TemplateEngine", (2) "DSL::NLPTemplateEngine".
lizmat check the perldeltas: 5.10 added support for recursive patterns and named capture buffers 16:28
perldoc.perl.org/5.10.0/perldelta#...xpressions
grondilu point taken
lizmat grondilu: and that was just the start
perldoc.perl.org/5.14.0/perldelta#...xpressions 16:29
etc. etc. etc
Anton Antonov @lizmat Thanks!
lizmat that was one of the reason the "use v5" project failed: there was no clear target anymore
Anton Antonov LOL 16:30
@lizmat I experimented with the code you provided for my rule-to-regex conversion question. It worked on "moar-blead" only, so I had to program special converter. (Fairly ad hoc / naive at this point, but "does the job.") 16:34
lizmat cool :-) 16:36
pelevesque fez question: When I run fez review, I see a bunch of .DS_Store files in my Bundle Manifest. I have not committed these in Git. They are Apple made files. I guess when fez creates the bundle my Mac adds them? Does this mean I should include a line for them in my .gitignore? 19:52
cdn.discordapp.com/attachments/633....39_PM.png 19:53
tonyo pelevesque: the mac finder creates those (includes the file dialogs, not fez), they contain info about how to display the folder. you should just add a `.DS_Store` to your .gitignore and fez will ignore those 19:59
fez also bundles what's on disk and not what's committed 20:00
pelevesque I see. Normally, it is not recommended to add .DS_Store to the repo itself, I guess I can add it to my global .gitignore file? 20:01
lucs Would listing them in .git/info/exclude work?
tonyo that would also work 20:31
a lot of modules list .DS_Store in their git ignore
the exclude file also works locally but fez doesn't read from it 20:32
lucs Hmm... So fez would pick up those files, unfortunate. 20:36
tonyo yea, adding those to the .gitignore would be better. particularly for forks and other people debugging
[Coke] japhb: see the gist, will have to review it 21:47
japhb: sorry, was at jury duty all day 21:48
japhb [Coke]: Should be runnable standalone (delta having the two modules at the top, of course). It will just run a simulation.
I'm pretty sure that's a valid excuse for not paying attention to the outside world. :-D 21:49
The idea was to have a class that can accept commands to run, queue them up to limit excessive parallelism, and then run through them showing output, coloring errors, and keeping a status bar 21:50
guifa Anton Antonov / grondilu / lizmat : I'm working on a module that allows inline use of various regex flavors 21:51
it's actually fairly easy to create a parser for regex (minus code blocks) and then do a superficial translation. the question is how perfect you want it to be (did you know that . doesn't mean the same thing in all regex? ha) 21:52
Anton Antonov @guifa Hmm... yeah, I also have a parser of some regex expressions in "Grammar::TokenProcessing" (raku.land/zef:antononcube/Grammar:...ocessing). But -- as you say -- making the details and flavors parsed takes some time develop (and devotion to testing.) 22:00
guifa I've got ecma mostly all finished
Anton Antonov Great -- I anxious, eager, willing to try it! 22:01
guifa but the idea for mine is ecma/python/p5/java --> raku, not the other way around
Anton Antonov That would be great. 22:12
... for me. (grondilu wants it in the other direction.) 22:13
@guifa Is your current version in a GitHub repository? 22:17
guifa probably 95% current version yeah
guifa github.com/alabamenhu/PolyglotRegexen 22:18
ight now unfortunately it transplites to Raku regex-as-string, because when I wrote it RakuAST::Regex::* wasn't yet available 22:19
Anton Antonov That is fine (and what I need right now.)
@guifa Actually, I remember seeing the PolyglotRegexen repository before -- somehow I forgot about it... 22:23
guifa I need to go back and revisit it soon 22:35