🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Geth ¦ problem-solving: Xliff assigned to jnthn Issue Could Raku benefit from a Flags type? github.com/Raku/problem-solving/issues/208 05:08
SmokeMachine .ask jnthn Hi! I was reading some RakuAST classes and wondering, if I do that walk with a multi on a custom parser, if I search for RakuAST::Statement::If will it find a RakuAST::Statement::With? is that expected? To match an if, will someone have to `RakuAST::Statement::If $ where * !~~ RakuAST::Statement::With`? 08:01
tellable6 SmokeMachine, I'll pass your message to jnthn
SmokeMachine .ask jnthn I'm still just wondering, sorry if interrupting, but would it make sense if there was something like RakuAST::Statement::Conditional that RakuAST::Statement::If and RakuAST::Statement::With would extend that? 08:05
tellable6 SmokeMachine, I'll pass your message to jnthn
SmokeMachine .ask jnthn the same for RakuAST::Statement::Elsif and RakuAST::Statement::Orwith 08:10
tellable6 SmokeMachine, I'll pass your message to jnthn
antoniogamiz o/ 09:12
jnthn SmokeMachine: I went through a design ideas on that construct; the thing is that one can freely mix if/with with orwith/elsif in any combination whatsoever 09:36
*a few design ideas 09:37
e.g. if $foo { } orwith $bar { }
Or with $foo { } elsif $bar { }
So there's no real sense that they're a different construct.
The grammar is equally telling; it's one production rule for the lot
Geth ¦ problem-solving: lizmat unassigned from jnthn Issue Could Raku benefit from a Flags type? github.com/Raku/problem-solving/issues/208 09:40
SmokeMachine jnthn: but if we had a common ancestor of if and with and that had the elsif and orwith, wouldn't it do that? and wouldn't it be differentiable on walk? 09:42
jnthn Hm, I guess it is a tad harder to find only `if`s if you don't want `with` as well 09:47
I don't really know what to call the common ancestor, though...Conditional is odd because unless and without are also conditionals
But they don't really fit into the pattern that the others do 09:48
Could be Iffy or some such :)
SmokeMachine www.irccloud.com/pastebin/br25lyWp/ 09:49
iffy and elsy? 09:50
jnthn It's more elsiffy :P 09:53
SmokeMachine yes, sorry, my English doesn't help... 09:53
jnthn
.oO( it's fine, just a bit iffy... :) )
09:56
SmokeMachine jnthn: is there a AST for metamethods? I mean, `Bla.^all`, how would that new translated? 09:57
jnthn Perhaps a property on method call
Or perhaps its own node time
I'm undecided
*node type
SmokeMachine if it's a method call, the obj would be the metaclass? I mean, would it represent `Bla.HOW.all(Bla)`? 09:59
jnthn It won't be desugared in RakuAST, no. 10:00
So Bla.^all and Bla.HOW.all(Bla) will look different in the AST
JJMerelo releasable6: status 11:49
releasable6 JJMerelo, Next release in ≈17 days and ≈7 hours. There are no known blockers. Changelog for this release was not started yet
JJMerelo, Details: gist.github.com/90a2a75ffe3d952aa8...2f0f3472c4
cpan-raku New module released to CPAN! Uzu (0.3.6) by 03SACOMO 13:51
melezhik Here is the fitst post from RakuOps (Raku + DevOps) series - sparrowdo.wordpress.com/2020/06/30...d-sparrow/ 15:48
tellable6 2020-06-29T22:51:39Z #raku-dev <Altai-man_> melezhik I honestly think a blog post should tell a story or something, "why" is sometimes even more important than "How".
melezhik I'd like to hear some feedback before announce it publicly 15:48
Altai-man_ I belive there is some _why_ here ... however I see your point ..., maybe I'll add some more thoughts on that later 15:49
you saw a draft, but here is the wordpress version with some details for none devops people ... 15:50
it always hard to have a balance between why and how / abstraction and implemation details ... 15:51
AlexDaniel melezhik: I agree with sena_kun, for a regular user why's are very unclear 16:46
melezhik: also I think there's a typo: `RUN raku -M Sparrow6::DSL sparrwofile` (should be sparrowfile) 16:48
AlexDaniel by the end of the post I can kinda see the benefit of specifying dependencies in a generic way 16:51
melezhik AlexDaniel thanks, will fix a typo 17:05
Kiki24 Hi !!! 17:36
Im new to the lenguaje Raku, i'm come from scientific background with R
i'm want to learn raku but before i want to know some things 17:38
AlexDaniel Kiki24: great! Feel free to ask :) 17:39
El_Che Kiki24: feel free to ask, there are probably people around that can aswer your questio or we can ping them :)
Kiki24 raku has stats libraries already ? 17:39
it it's possible plotting information ?
El_Che modules.raku.org/search/?q=PLOT 17:40
AlexDaniel actually modules.raku.org/search/?q=stats 17:41
AlexDaniel SVG::Plot is not very useful, maybe other modules are nicer 17:44
Kiki24 AlexDaniel you known grammar of graphics (ggplot in R) ? 17:46
AlexDaniel Kiki24: no
Kiki24 its a package very simple for design plots in 2d 17:47
it's something like i search, something simple for plot
and possibily change the colors 17:48
nothing fancy, but nothing something hard to learn
for simple i mean easy to learn 17:50
AlexDaniel Kiki24: I'm not sure. There's Chart::Gnuplot which looks promising 17:57
timotimo microsoft.github.io/chart-parts/ - i'd imagine something like this for raku could be neato 19:10
(also based on the Grammar of Graphics 19:11
AlexDaniel m: say 4 !≠ 4
camelia True
AlexDaniel heh
timotimo m: say !!!!!!!!!!!!!!!!!!!!!!!!!!!!"dog"
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3say !!!7⏏5!!!!!!!!!!!!!!!!!!!!!!!!!"dog"
expecting any of:
infix
infix stopper
postfix
statement end
s…
timotimo aww
timotimo m: say ??????????????????"dog" 19:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say ??????????????????7⏏5"dog"
expecting any of:
infix
infix stopper
timotimo neither of those? :D
m: say ?!?!?!?!?!?!?!?!?!?!?"yo" 19:12
camelia True
AlexDaniel yea you can do that
timotimo grammar of graphics, from 2005, ebook for 110 us dollars
AlexDaniel evalable6: gist.github.com/AlexDaniel/7060f6c...1596d24aaa 19:14
evalable6 True
AlexDaniel slow
timotimo reminds me of that other one we had recently
AlexDaniel which one?
timotimo i forgot
AlexDaniel :|
timotimo deeply nested sub calls perhaps?
m: say(say(say(say(say(say(say(say(say(say(say(say(say(True))))))))))))) 19:15
camelia True
True
True
True
True
True
True
True
True
True
True
True
True
timotimo hmm, maybe not 19:15
AlexDaniel oooh that thing
it was one of my tickets maybe?
timotimo think so
AlexDaniel there's also R#3648 19:16
linkable6 R#3648 [open]: github.com/rakudo/rakudo/issues/3648 [MoarVM] Gradual performance slowdown when pushing into a Channel
AlexDaniel hmm is it fixed now? 19:21
I'm not sure
don't want to test it right now…
but I think it should be fixed
raku-bridge <tmtvl> In case any students or teachers present find themselves facing a bit of boredom in the spare time that July and August brings, I would like to point you to the Advent Calendar, which can always use more articles. github.com/Raku/advent 19:51
timotimo roflblog: wakelift.de/how-would-you-like-a-1...-increase/ 20:09
oddp Yes, please! Thanks for sharing. 20:23
lizmat hmmm... maybe we should start a summer blogathon 20:27
Geth ecosystem/Raku: 8865399477 | Coke++ | 4 files
some Perl6 -> Raku updates
20:54
Xliff m: sub a { say .substr-eq('Gee' | 'ge', 0) }; $_ = 'Geeky'; a; $_ = 'gecko'; a; $_ = 'Godzilla'; a; 20:55
camelia No such method 'substr-eq' for invocant of type 'Any'
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub a($_) { say .substr-eq('Gee' | 'ge', 0) }; $_ = 'Geeky'; a; $_ = 'gecko'; a; $_ = 'Godzilla'; a;
camelia 5===SORRY!5===
Calling a() will never work with declared signature ($_)
at <tmp>:1
------> 3tr-eq('Gee' | 'ge', 0) }; $_ = 'Geeky'; 7⏏5a; $_ = 'gecko'; a; $_ = 'Godzilla'; a;
Calling a() will never work with declared signature ($_)…
Xliff m: sub a { say $*a.substr-eq('Gee' | 'ge', 0) }; my $*a_ = 'Geeky'; a; $*a = 'gecko'; a; $*a = 'Godzilla'; a;
camelia Dynamic variable $*a not found
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub a { say $*a.substr-eq('Gee' | 'ge', 0) }; my $*a = 'Geeky'; a; $*a = 'gecko'; a; $*a = 'Godzilla'; a; 20:56
camelia any(True, False)
any(False, True)
any(False, False)
Xliff m: sub a { say $*a.substr-eq('Gee' | 'ge', 0).so }; my $*a = 'Geeky'; a; $*a = 'gecko'; a; $*a = 'Godzilla'; a;
camelia True
True
False
Xliff O I ♥ Junctions, now 20:58
timotimo heck yea
[Coke] ponders doing a SPA local app with rakudo-js instead of cro 21:04
timotimo do let us know how it works out 21:09
last i checked i think rakudo-js will give you quite a big program as a result
nqp-js is probably not going to be amazing enough :)
jnthn m: dd q:x:v/echo -n 42/ # who knew? :) 21:10
camelia IntStr.new(42, "42")
timotimo neato
jnthn m: dd q:x:w/echo -n "foo bar"/ # this one too 21:11
camelia ("foo", "bar") 21:11
jnthn Discovered while I work out how to model these things in QAST :)
jnthn uh, in RakuAST :P 21:12
The evening warmth isn't helping much
Geth ecosystem: 8865399477 | Coke++ | 4 files
some Perl6 -> Raku updates
21:34
ecosystem: 707eb41387 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | 4 files
Merge pull request #513 from Raku/Raku

some Perl6 -> Raku updates
cpan-raku New module released to CPAN! LibXML (0.5.3) by 03WARRINGD 22:43
[Coke] m: sub off-by-one { ($^a-$^b).abs == 1 }; say [[&off-by-one]] <1 2 3 4> # should this work? 23:51
camelia False
[Coke] I assume I'm doing something dumb here.
timotimo you'll want to return $b from the block 23:53
m: sub off-by-one { ($^a-$^b).abs == 1; $b }; say [[&off-by-one]] <1 2 3 4>
camelia WARNINGS for <tmp>:
4
Useless use of "==" in expression ".abs == 1" in sink context (line 1)
timotimo oh, not quite
[Coke] I wanted the boolean comparison chained.
timotimo m: say [\-] <1 2 3 4>
camelia (1 -1 -4 -8)
timotimo that's also not how
i think you'll have to go with a rotor rather than just a reduce 23:54
since reduce will turn two values into one by design
[Coke] ... I do actually want them increasing, so the sub is too forgiving, anyway
timotimo ah, ok
in that case let me try another
m: say <1 2 3 4>.rotor(2 => 1).map({ $^a - $^b == 1 }).all 23:56
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
timotimo m: say <1 2 3 4>.rotor(2 => 1).map(-> ($a, $b) { $a - $b == 1 }).all
camelia all(False)
timotimo m: say <1 2 3 4>.rotor(2 => 1).map(-> ($a, $b) { $a - $b == 1 })
camelia (False)
timotimo m: say <1 2 3 4>.rotor(2 => -1).map(-> ($a, $b) { $a - $b == 1 })
camelia (False False False)
timotimo m: say <1 2 3 4>.rotor(2 => -1).map(-> ($a, $b) { $b - $a == 1 })
camelia (True True True)
SmokeMachine [Coke]: for you spa, maybe this could help: github.com/FCO/MemoizedDOM 23:58
[Coke] SmokeMachine: what is it? 23:59