🦋 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.
Nemokosch so yeah, yesterday I managed to get one generated part of the highlighter config right 09:45
there are five parts
is there anyone who comprehends Coffeescript strings? I came across something that looks like a Python docstring (triple apostrophe) and it seems to have comments in it, like wtf 09:46
exp Nemokosch: can you show an example? I'm not aware of anything like that, but boy I haven't heard Coffeescript in a while! 09:49
tellable6 exp, I'll pass your message to Nemokosch
Nemokosch okay, so they are apparently called "block strings" 09:52
moment
exp no need, that's enough for googling, gracias :) 09:53
Nemokosch github.com/Raku/atom-language-perl....raku#L288 09:55
there are similar things in the output as well 09:56
github.com/Raku/atom-language-perl....cson#L813
the way I understand it, these strings keep the linebreaks, they are much like heredoc strings 09:57
however, I cannot comprehend how they can contain comments, and whether that's a language feature of Coffescript or some stupid custom hack in Atom or that Ruby regex processor 09:58
it seems to me that it's NOT Coffeescript that is weird about that comment 10:02
github.com/Alhadis/Regex-Comments#...e-comments goddamnit 10:04
this is indeed an Atom hack
hm, not Atom but PCRE mode of this regex engine 10:06
anyway, I guess I might as well leave these comments there, and see how it works out 10:08
Anton Antonov I have a project in which one of the possible solutions is to construct a grammar from a list of regexes. Should I use RakuAST or the approach given here : perl6advent.wordpress.com/tag/bnf/ ? 13:59
I assume the non-RakuAST is going to always work. Meaning, after RakuAST is finished and "main stream" the ^add_method and EVAL implementation is still going to work. Is this correct? 14:01
I more recent/updated work corresponding to the advent link above is this Raku module repository: github.com/tadzik/Grammar-BNF . 14:10
lizmat Anton Antonov the past week I got regex / rule / token declarations to work in a useful way 14:27
rf Morning folks 14:28
lizmat I haven't written any tests for creating grammars yet, but that *should* be trivial
m: say Q|grammar A { token B { b } }|.AST.statements.head.expression # to give you an idea how that would look 14:29
camelia RakuAST::Package.new(
declarator => "grammar",
name => RakuAST::Name.from-identifier("A"),
body => RakuAST::Block.new(
body => RakuAST::Blockoid.new(
RakuAST::StatementList.new(
RakuAST…
Anton Antonov @lizmat Thanks! 15:11
volare question: can i install rakudo perl using apt-get in debian? 18:51
tonyo m: my Buf[uint8] $x .=new; dd $x; 18:58
camelia Buf[uint8 $x = Buf[uint8].new()
volare is perl6 backward compatible with perl5? 19:02
lucs volare: I believe it is recommended to install rakudo with rakubrew (see rakubrew.org). 19:07
And no, Raku is similar to Perl in many ways, but it is a different language. 19:08
(perl6 is now called Raku)
volare lucs: i managed to install it with sudo apt-get install rakudo 19:23
volare i am converting a simple perl 5 program and the for loop doesn't work 19:24
lucs Oh, that indeed works, but I've seen people
recommend rakubrew
The 'for' syntax may be different in Raku. 19:25
volare: Enter "5to6" in the search box here for clues: docs.raku.org/ 19:27
lucs This one mentions 'for' loops: docs.raku.org/language/5to6-perlsyn.html 19:28
tonyo volare: what is the output of `raku -v` 19:33
volare Welcome to Rakudo(tm) v2020.12. 19:38
Implementing the Raku(tm) programming language v6.d.
lucs Yikes, kind of old.
volare Built on MoarVM version 2020.12.
how do you say a text and variable on the same line? 19:39
lucs rakubrew can get you 2023.02.
volare: Not sure what you mean...
Maybe this?: say "Value is $the-val" 19:40
volare say "\nYou thought of number: ";
say ($count-6);
evalable6
You thought of number:
volare i want to say both lines on one line
lucs m: $num = 42; say "You thought of number ", $num; 19:41
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$num' is not declared. Did you mean any of these: 'Num',
'num'?
at <tmp>:1
------> <BOL>⏏$num = 42; say "You thought of number ",
lucs m: my $num = 42; say "You thought of number ", $num; 19:42
camelia You thought of number 42
lucs volare: I suggest you join the raku-beginner channel instead of this one. 19:43
volare it worked thank you
lucs You're welcome, even more welcome in raku-beginner :-) 19:44
volare magical.ddns.net/software/listings...ads/perl5/ 19:45
the perl6 program is there
lucs Wow, 1-space shiftwidth. Where are my glasses! 19:46
volare lucs: how do i join the developer community? 19:48
lucs Not sure, someone else can answer. 19:49
volare thank you lucs 19:53
lucs Sure thing.
(Now I have that song stuck in my head :-) )
volare lol 19:56
tonyo 2020 is a pretty old version volare 20:02
volare i will look into getting the brew
thank you 20:04
rf I didn't realise how easily you can express quicksort with Raku lol 20:10
rosettacode.org/wiki/Sorting_algor...ksort#Raku
volare lucs: you should watch the one with penolope cruz 20:14
lucs I just watched the original, Domenico Modugno, on Ed Sullivan. 20:15
The song was a big hit when I was a kid (yeah, I'm pretty old.) 20:16
I'll look at the one with MsCruz.
volare alrighty
lucs Oh, she's "just" dancing ;-) 20:19
volare :^)
Nemokosch I don't like that quicksort solution, to be honest. It tries to be very generic but kinda ruins it by using flat 20:20
it would be better to make slips
volare lucs: listen to Pianoholic 2022 on Spotify or Deezer 20:24
tbrowder__ m: say (7 mod 3) 22:11
camelia 1
tbrowder__ m: say (8 div 7) 22:12
camelia 1
tbrowder__ m: say so (8 mod 7) 22:28
camelia True
tonyo tbrowder__: your usaf site makes me a bit nostalgic 23:02