pelevesque | Ya, they totally could be. | 00:36 | |
That has been my problem since I started working on that algorithm. | |||
scullucs | I think I have something. | 00:37 | |
Gimme a couple of minutes. | |||
It works! | 00:39 | ||
After fighting for the last hour with s:pos(...), I finally figured out I needed s:continue(...). | 00:40 | ||
I'll put it in a gist (another few minutes). | 00:41 | ||
gist.github.com/lucs/aa34b9a6d6058...c0fd9b6138 | 00:44 | ||
pelevesque | Geez lucs, I feel bad you spent so much time on this. | 00:45 | |
scullucs | Don't, because again, I learned something. | ||
pelevesque | I'm gonna test it now, with repeating numbers too ( I noticed your test does not cover that case ). BTW, beautiful code as always. | 00:46 | |
scullucs | I'm pretty confident it'll be fine. (uh oh, setting myself up for "famous last words"?) | 00:47 | |
pelevesque | I didn't know about that c/continue adverb. Pretty sweet. | 00:48 | |
scullucs | Me neither š | 00:50 | |
pelevesque | It works. I just need to modify it to accept negative digits, but that is easy, just change the regex. I'm good to go. | 00:51 | |
I tried with the A.I. a bunch of questions, but it never brought up c/continue at all. | |||
scullucs | AI, shma-i. | ||
pelevesque | It ain't all that smart. | 00:52 | |
The A.I. Just told me Larry Wall is working on Perl 11 | 00:54 | ||
scullucs | Heh. | 00:55 | |
pelevesque | An experimental language... 5 + 6 = 11 | ||
perl11.github.io | 00:56 | ||
scullucs | They even have SPVM in there š | 00:59 | |
pelevesque | Ah, I had not noticed. It's a language. | 01:03 | |
wambash | m: my $orig-text = q:to{---} My number is 4, and another 3.2 and 4 again, and also 0 2 and 1.3 --- ; $orig-text.subst: /\d+[.\d+]? /, q{%s},:g andthen printf $_, (2.2, 0, 4, 4.4, 2, 0) | 05:02 | |
Raku eval | My number is 2.2, and another 0 and 4 again, and also 4.4 2 and 0 | ||
ab5tract | Nice!! I was going to point out that you could do the for loop using substitutions (replace 4 with Aā, then Aā with 2.2 in another pass) | 08:27 | |
But TIL you can use a whole hash :) | 08:28 | ||
m: say "4.88 -4" ~~ m:g/ ("-"? [\d+ | \d+ "." \d+]) / | 09:05 | ||
camelia | (ļ½¢4.88ļ½£ 0 => ļ½¢4.88ļ½£ ļ½¢-4ļ½£ 0 => ļ½¢-4ļ½£) |
||
librasteve | my regex number { \S+ #grab chars <?{ +"$/" ~~ Real }> #assert coerces via '+' to Real } | 11:14 | |
fwiw I like this look ahead with coercion to Real that way you get to leverage the Raku parser to pick number literals and you can adjust to Int, Rat and so on | 11:16 | ||
ab5tract | the output format is Str in this case, but that's definitely useful | 12:01 | |
winfredraj | hi | 12:09 | |
Im trying the comma 2 plugin | |||
Do we have some documentation explaining how we can set up the run configurations | 12:10 | ||
it keeps saying Invalid Data:Main script path in incorrect | 12:11 | ||
antononcube | I have not tried configuring run configuration yet ā only test running with Ctrl-R. | 12:26 | |
winfredraj | Ctrl+r -> its ropening stuff and Ctrl+R refactor | 12:31 | |
ab5tract | winfredaj: sorry to hear you are having trouble. | 12:37 | |
what are you putting for the script path? | 12:38 | ||
winfredraj | the absolute path for the script I want to run | ||
ab5tract | I've made it so that path should work relative to the working directory | ||
winfredraj | Im in Windows | 12:39 | |
ab5tract | ah, that should also be supported | ||
(absolute path) | |||
winfredraj | Im wondering if that has something to do with it | ||
ab5tract | can you try a relative path and see if it works? | ||
winfredraj | ok a minute | ||
relative path works | 12:40 | ||
but now I have Raku SDk is not set for the project -> I remember adding | 12:41 | ||
seems to work now, just complaining about the modules which I need to install | 12:49 | ||
<ab5tract> A big thank you for reviving comma | 12:50 | ||
ab5tract | winfredaj: you're welcome! | ||
there's still a bit of silliness with the SDK | 12:51 | ||
we need to avoid setting it as the "JDK" of the project, the way that Comma standalone used to do | 12:52 | ||
but it seems there are still some missing parts regarding the secondary SDK approach :/ | |||
winfredaj: would you mind filling an issue for the absolute path bug? | |||
winfredraj | I dont know how to do it but ill look up and get it done | 12:53 | |
the least I can do | 12:54 | ||
ab5tract | github.com/ab5tract/comma-plugin/issues | 13:03 | |
just an example path that didn't work would be great | 13:04 | ||
winfredraj | done | 13:16 | |
ab5tract | thanks :) | 13:40 | |
scullucs | Wow, that's great! I don't quite understand it, but I love it! | 13:47 | |
ab5tract | yeah, it's definitely edging into arcane techniques :) | 13:59 | |
winfredaj: can you try the absolute path again with github.com/ab5tract/comma-plugin/r...2.0-beta.9 | 14:03 | ||
it works for me in macOS but it would be great to have confirmation for Windows as well | |||
winfredraj | ill try it now | 17:51 | |
hi its working now | 17:52 | ||
in Windows | |||
thanks | |||
ab5tract | \o/ | 18:48 |