🦋 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. |
|||
00:00
tejr left,
xelxebar left,
xelxebar joined
00:01
tejr joined
00:02
sena_kun joined
00:03
Altai-man_ left
00:07
nebuchadnezzar left
00:21
rbt left
00:23
skids left
00:25
[Coke] left
00:27
[Coke] joined,
[Coke] left,
[Coke] joined
00:28
sjm_uk left,
sjm_uk joined
00:55
lainon left
01:09
softmoth_ joined
01:10
MasterDuke left
01:17
oddp left,
Noisytoot left
01:18
Noisytoot joined
01:41
rbt joined
01:46
HarmtH left
01:47
HarmtH joined
01:55
Kaiepi left
01:57
Guest43 joined
01:58
Kaiepi joined
02:01
molaf left,
Altai-man_ joined
02:03
sena_kun left
02:10
hungrydonkey joined,
hungryd56 joined,
rbt left
02:11
rbt joined
02:12
hungryd56 left
02:13
molaf joined
02:22
hungryd22 joined,
hungrydonkey left
02:23
hungryd22 left,
hungrydonkey joined,
Guest43 left
02:42
uu joined
02:44
dataangel joined
02:47
uu left
02:49
uu joined
02:50
uu left,
hungrydonkey left,
hungrydonkey joined
02:57
hungrydonkey left,
hungrydonkey joined,
hungrydonkey left
03:03
Guest43 joined,
Guest43 left
03:32
hungrydonkey joined
03:34
hungrydonkey left
04:02
sena_kun joined
04:03
Altai-man_ left
04:15
hungrydonkey joined
04:18
hungrydonkey left
04:23
softmoth_ is now known as softmoth,
hungrydonkey joined
04:35
zacts joined
04:42
xinming_ left
04:43
xinming_ joined
04:53
zacts left
04:54
zacts joined
05:03
hungrydonkey left
05:06
hungrydonkey joined
|
|||
Geth | ¦ problem-solving: Xliff assigned to jnthn Issue Could Raku benefit from a Flags type? github.com/Raku/problem-solving/issues/208 | 05:08 | |
05:09
nebuchadnezzar joined
05:11
xinming_ left
05:12
xinming_ joined
05:17
OpenZen left
05:39
skyl4rk left
05:42
aindilis` joined,
aindilis left
05:45
xinming_ left
05:46
xinming_ joined
05:55
skyl4rk joined
05:59
phogg left
06:01
Altai-man_ joined
06:03
sena_kun left
06:04
phogg joined,
phogg left,
phogg joined
06:06
bocaneri joined
06:07
xinming_ left,
xinming_ joined
06:12
squashable6 left,
Black_Ribbon left
06:13
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
squashable6 joined
06:40
dolmen joined
06:58
aborazmeh left
07:02
brtastic joined
07:04
finanalyst joined
07:14
zacts left
07:15
zacts joined
07:19
cpan-raku left
07:20
cpan-raku joined,
cpan-raku left,
cpan-raku joined
07:27
dolmen left,
kensanata joined
07:32
dolmen joined
07:36
dakkar joined
07:39
ukine left
07:43
zacts left
|
|||
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 | ||
08:02
sena_kun joined
08:04
Altai-man_ left
|
|||
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 | ||
08:07
pecastro joined
|
|||
SmokeMachine | .ask jnthn the same for RakuAST::Statement::Elsif and RakuAST::Statement::Orwith | 08:10 | |
tellable6 | SmokeMachine, I'll pass your message to jnthn | ||
08:11
sarna joined
08:28
rindolf joined
08:51
nebuchadnezzar left
08:54
oddp joined
09:08
antoniogamiz joined
09:12
nebuchadnezzar joined
|
|||
antoniogamiz | o/ | 09:12 | |
09:20
aborazmeh joined,
aborazmeh left,
aborazmeh joined
09:30
rawr is now known as grumble
|
|||
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 | |
09:47
nebuchadnezzar left
|
|||
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 | |
09:53
nebuchadnezzar joined
|
|||
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 | |||
10:01
Altai-man_ joined
10:04
sena_kun left
10:10
softmoth left
10:12
MasterDuke joined
10:16
aborazmeh left
10:31
dolmen left
10:50
chloekek joined,
chloekek left
11:00
hungrydonkey left
11:05
antoniogamiz left
11:14
antoniogamiz joined
11:15
finanalyst left
11:18
JJMerelo joined
11:23
lichtkind joined
11:30
dataangel left
11:31
antoniogamiz left
11:38
vike left
11:43
JJMerelo left
11:49
JJMerelo joined
|
|||
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 | |||
11:53
stoned75 left
11:57
samebchase left
11:58
stoned75 joined
11:59
vike joined
12:07
tejr left
12:10
mst left,
mst joined
12:15
xelxebar left
12:16
bartolin_ left
12:29
sena_kun joined,
Altai-man_ left,
bartolin joined
12:31
samebchase joined
12:43
MasterDuke left
12:56
xelxebar joined,
sno left
13:02
antoniogamiz joined,
hungrydonkey joined
13:07
antoniogamiz left,
JJMerelo left
13:16
hungrydonkey left,
hungrydonkey joined
13:24
toddr joined
13:39
tejr joined
|
|||
cpan-raku | New module released to CPAN! Uzu (0.3.6) by 03SACOMO | 13:51 | |
13:54
rbt left,
rbt joined
14:01
Altai-man_ joined
14:03
antoniogamiz joined
14:04
sena_kun left
14:09
skids joined
14:10
OpenZen joined,
orinthe8 joined
14:12
orinthe left
14:13
orinthe joined
14:14
antoniogamiz left,
antoniogamiz joined,
orinthe8 left
14:39
aindilis` left,
MasterDuke joined
14:40
aindilis joined
14:43
xinming_ left,
rindolf left
14:44
xinming_ joined,
cpan-raku left
14:46
cpan-raku joined,
cpan-raku left,
cpan-raku joined
14:58
rindolf joined,
brtastic left
14:59
mniip left
15:01
mniip joined
15:03
sno joined
15:05
sarna left
15:17
MilkmanDan left
15:20
MilkmanDan joined,
zacts joined
15:39
melezhik joined
15:41
moony left
15:43
Kiki23 joined
15:47
zacts left
|
|||
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". | ||
15:48
zacts joined
|
|||
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 | ||
15:53
Kiki23 left,
zacts left
16:02
sena_kun joined
16:04
cpage_ joined,
Altai-man_ left
16:06
dolmen joined,
cpage left,
cpage_ is now known as cpage
16:07
antoniogamiz left
16:24
hungrydonkey left
16:25
hungrydonkey joined
16:33
rindolf left
16:37
sno left
16:39
dakkar left
16:42
dataangel joined
|
|||
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 | ||
16:49
gordonfish left,
kensanata left
16:50
gordonfish joined
|
|||
AlexDaniel | by the end of the post I can kinda see the benefit of specifying dependencies in a generic way | 16:51 | |
17:02
dataangel left
|
|||
melezhik | AlexDaniel thanks, will fix a typo | 17:05 | |
17:15
e left,
a3r0_ left,
El_Che left,
dpk left,
tomaw left,
renormalist left,
xi left,
Mithaldu left,
nine left,
jdv79 left,
xfix left,
skids left,
leont_ left,
APic left,
AlexDaniel left,
dogbert17 left,
japhb left,
Zero_Dogg left,
fling left,
perlbot left,
kybr left,
gugod left,
marcusr left,
tejr left,
xelxebar left,
melezhik left,
MasterDuke left,
matiaslina left,
vike left,
epony left,
stux|RC left,
lucs left,
poga left,
ensamvarg left,
kst left,
veesh left,
xxpor left,
cj left,
ambs_ left,
camelia left,
ribasushi left,
a6502 left,
avar left,
tadzik left,
mojca left,
fvox left,
broquaint left,
protium left,
MilkmanDan left,
ShimmerFairy left,
mithaldu_ left,
nativecallable6 left,
linkable6 left,
releasable6 left,
unicodable6 left,
kent\n left,
neheist2 left,
kawaii left,
zostay left,
peteretep left,
tbrowder left,
cooper left,
roguelazer left,
a3f left,
dudz left,
domm left,
isacl___ left,
BinGOs left,
mtj_ left,
Grrrr left,
perlmaros left,
cpage left,
reportable6 left,
tellable6 left,
bisectable6 left,
Hotbees left,
Nasrudin left,
BlackChaosNL[m] left,
evalable6 left,
committable6 left,
statisfiable6 left,
Grinnz left,
PotatoGim left,
jhill left,
smash left,
oddp left,
Geth left,
hoelzro left,
Altreus left,
moon-child left,
Grauwolf left,
wbn left,
eiro left,
jcallen left,
jnthn left,
mniip left,
rbt left,
nebuchadnezzar left,
pecastro left,
squashable6 left,
Noisytoot left,
Maylay left,
finsternis left,
schlaftier left,
greppable6 left,
bloatable6 left,
shareable6 left,
benchable6 left,
sourceable6 left,
notable6 left,
quotable6 left,
coverable6 left,
x[LGWs4x4i]uG2N0 left,
lizmat left,
raku-bridge left,
eery left,
TimToady left,
Voldenet left,
pierrot left,
TreyHarris left,
go|dfish left,
karupanerura left,
shadowpaste left,
robertle left,
cibs left,
AlexDaniel` left,
Benett left,
Roamer` left,
gordonfish left,
phogg left,
vrurg left,
bdju left,
telex left,
jjatria left,
pepe70 left,
gabiruh left,
helit left,
gfldex left,
grumble left,
SmokeMachine left,
Util left,
astronavt left,
ingy left,
dg left,
Ulti left,
masak left,
autarch left,
moritz left,
cxreg left,
tailgate left,
perryprog left,
tardisx left,
hungrydonkey left,
cpan-raku left,
aindilis left,
OpenZen left,
toddr left,
skyl4rk left,
[Coke] left,
samcv left,
notandinus left,
libertas left,
sftp left,
synthmeat left,
spacebat1 left,
elcaro left,
jast left
17:16
samebchase left,
molaf left,
pnu__ left,
CIAvash left,
unclechu left,
timeless left,
robinsmidsrod left,
ChoppedBacon left,
stux|RC-only left,
webstrand left,
ecocode left,
skaji_ left,
dolmen left,
sena_kun left,
xinming_ left,
mst left,
Kaiepi left,
sjm_uk left,
eseyman left,
k-man left,
guifa left,
riatre left,
sivoais left,
timotimo left,
Ekho left,
dustinm` left,
jmcgnh left,
lnx left,
stoned75 left,
HarmtH left,
krunen left,
Woodi left,
Manifest0 left,
abraxxa left,
rjbs left,
kini left,
literal left,
samebchase- left,
perigrin left,
ptrcmd left,
freezing_ left,
brass left,
lichtkind left,
silug left,
Summertime left,
Celelibi left,
hobbs left,
eater left,
nekomune left,
caasih left,
rypervenche left,
BuildTheRobots left,
charsbar left,
simcop2387 left,
oodani left,
mrsolo left,
daxim left,
DarthGandalf left,
xq left,
albino left,
esh left,
rba left,
orinthe left,
bartolin left,
bocaneri left,
reach_satori_ left,
ssm left,
leah2 left,
erdic left,
cgfbee left,
camelCaser left,
b2gills left,
atta left,
m_athias left,
aluaces left,
klapperl left,
gdonald left,
sjn left,
agentzh left,
afresh1 left,
polettix1 left,
timlegge left,
[ptc] left,
Bucciarati left,
KotH left
17:18
ilogger2 joined,
tobs joined
17:23
sergot_ joined
17:29
tinita joined,
m0ltar joined,
skids joined,
leont_ joined,
APic joined,
AlexDaniel joined,
dogbert17 joined,
japhb joined,
Zero_Dogg joined,
fling joined,
perlbot joined,
kybr joined,
gugod joined,
marcusr joined
17:36
Kiki24 joined
|
|||
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 :) | ||
17:39
Cabanossi joined
|
|||
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 | |
17:43
sno joined
|
|||
AlexDaniel | SVG::Plot is not very useful, maybe other modules are nicer | 17:44 | |
17:45
reach_satori_ joined
|
|||
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 | |
17:58
rbt joined,
sno left
18:02
Altai-man_ joined
18:13
cpan-raku joined,
cpan-raku left,
cpan-raku joined
18:15
MasterDuke joined
18:16
bdju joined
18:37
MasterDuke left
18:49
bdju left
18:50
bdju joined
19:03
sno joined,
Kiki24 left
|
|||
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 | ||
19:11
mowcat joined
|
|||
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 |
||
19:15
[Sno] joined
|
|||
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 | ||
19:18
sno left
19:20
xinming_ joined
|
|||
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 | |||
19:28
Black_Ribbon joined
19:38
Benett- joined
19:41
Roamer`_ joined
19:45
Benett- is now known as Benett
19:50
AlexDaniel` joined
|
|||
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 | |
19:52
wamba joined
19:58
aborazmeh joined,
aborazmeh left,
aborazmeh joined
20:03
sena_kun joined
20:04
Altai-man_ left
|
|||
timotimo | roflblog: wakelift.de/how-would-you-like-a-1...-increase/ | 20:09 | |
20:18
finanalyst joined
|
|||
oddp | Yes, please! Thanks for sharing. | 20:23 | |
20:27
molaf joined
|
|||
lizmat | hmmm... maybe we should start a summer blogathon | 20:27 | |
20:53
Xliff joined
|
|||
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 | |
21:11
rbt left
|
|||
camelia | ("foo", "bar") | 21:11 | |
jnthn | Discovered while I work out how to model these things in QAST :) | ||
21:11
rbt joined
|
|||
jnthn | uh, in RakuAST :P | 21:12 | |
The evening warmth isn't helping much | |||
21:16
kensanata joined
21:26
leah2 joined
|
|||
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 |
|||
21:46
kensanata left
22:00
rbt left
22:01
rbt joined,
hungrydonkey joined
22:02
Altai-man_ joined
22:04
sena_kun left
22:18
mowcat left
|
|||
cpan-raku | New module released to CPAN! LibXML (0.5.3) by 03WARRINGD | 22:43 | |
22:50
TreyHarris joined
23:09
finanalyst left
23:10
AlexDani` joined
23:12
AlexDaniel left,
reach_satori_ left,
reach_satori_ joined
23:14
aborazmeh left
23:35
hungrydonkey left
23:36
hungrydonkey joined
23:39
aleksb joined
23:41
lainon joined
23:43
faiface joined
23:44
aleksb left
|
|||
[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 |