🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 25 August 2021. |
|||
00:02
reportable6 left
00:05
gordonfish- joined
00:06
Skarsnik_ left,
gordonfish left
00:10
gordonfish- left,
gordonfish joined
|
|||
Ergo444 | hi | 00:21 | |
00:21
Ergo444 left
00:29
gordonfish left
00:32
gordonfish joined
|
|||
[Coke] | hi | 00:35 | |
m: say (3/99).nude | 00:36 | ||
camelia | (1 33) | ||
[Coke] | ^^ is there a way to make that work without parens? some other way to force the precedence? | ||
moon-child | m: say .nude given 3/99 | 00:37 | |
camelia | (1 33) | ||
moon-child | ideally you would be able to say '3/99 .nude'. It works for negatives and complex numbers, but not fractions apparently | ||
[Coke] | heh. I literally had that typed out and was going to send it. :) | 00:38 | |
moon-child | :) | ||
japhb | m: say 3/99\.nude # Curious | 01:27 | |
camelia | No such method 'nude' for invocant of type 'Int'. Did you mean any of these: 'NFD', 'Num', 'none', 'note'? in block <unit> at <tmp> line 1 |
||
japhb | Ah well | ||
m: say 3/99\ .nude # Curious | |||
camelia | No such method 'nude' for invocant of type 'Int'. Did you mean any of these: 'NFD', 'Num', 'none', 'note'? in block <unit> at <tmp> line 1 |
||
japhb | Well, so much for that idea | ||
moon-child | if you find angle brackets more to your liking than parenthesis, you can do | 01:28 | |
m: say <3/99>.nude | |||
camelia | (1 33) | ||
moon-child | (imo angle brackets are easier to parse, because their contents have limited lexical complexity; YMMV) | ||
01:32
linkable6 left,
evalable6 left
01:34
evalable6 joined
01:35
linkable6 joined
|
|||
japhb | m: say <3/99>.WHAT | 01:37 | |
camelia | (Rat) | ||
japhb | m: say < 3/99 >.WHAT | ||
camelia | (RatStr) | ||
japhb | But be careful of that difference ^^ | ||
One is a Rat literal, the other is a string converted by val() to a RatStr | |||
02:05
reportable6 joined
02:18
mcmillhj joined
03:06
mcmillhj left
04:06
reportable6 left,
unicodable6 left,
greppable6 left,
notable6 left,
linkable6 left,
quotable6 left,
coverable6 left,
benchable6 left,
statisfiable6 left,
bloatable6 left,
bisectable6 left,
tellable6 left,
evalable6 left,
committable6 left,
squashable6 left,
releasable6 left,
nativecallable6 left,
shareable6 left,
sourceable6 left
04:07
benchable6 joined,
sourceable6 joined,
nativecallable6 joined
04:08
bloatable6 joined,
linkable6 joined
04:09
evalable6 joined,
statisfiable6 joined
04:44
mcmillhj joined
|
|||
mcmillhj | A bit confused about set operations, specifically inequality. In this gist, why is `$last` `(Any)`: gist.github.com/mcmillhj/a54ea1515...ae81218f74 | 04:46 | |
moon-child | != is numeric inequality, which I expect is not what you want | 04:48 | |
mcmillhj | Both inputs are Sets so I thought it would use the Set inequality operator. It there some way that I need to indicate that I want that operator used? | 04:50 | |
moon-child | !(==) is the set inequality operator | 04:51 | |
(or, really it is (==) that is the set equality operator, to which the ! metaoperator can be applied. But, potato potato) | 04:52 | ||
mcmillhj | ah whoops, I was misreading ≢ in the docs as != ... That's my mistake. Thanks for the help! | 04:53 | |
moon-child | np | ||
04:56
colemanx left
05:02
mcmillhj left
05:04
frost joined
05:06
notable6 joined,
unicodable6 joined
05:07
committable6 joined
05:08
greppable6 joined
05:09
coverable6 joined,
shareable6 joined,
reportable6 joined
05:36
b2gills joined
06:02
reportable6 left
06:06
tellable6 joined
06:07
releasable6 joined
06:08
bisectable6 joined
06:49
euandreh left
07:04
reportable6 joined
07:07
quotable6 joined
07:11
vrurg_ joined,
frost left,
MasterDuke left
07:12
vrurg left,
frost joined
07:26
seednode left
07:27
seednode joined
07:28
abraxxa joined
07:31
ugexe left,
ugexe joined
07:35
abraxxa left
07:36
abraxxa joined
07:50
TheAthlete joined
07:52
Ergo444 joined
|
|||
Ergo444 | hi | 07:52 | |
TheAthlete | Hello! | ||
Ergo444 | I have this problem... stackoverflow.com/questions/702864...-correctly | 08:00 | |
08:03
Sgeo left
08:06
squashable6 joined
|
|||
moritz_ | I've answered on SO, hope it helps | 08:09 | |
Ergo444 | I added more information | 08:11 | |
It is not that simple. | |||
The program keeps running, doing stuff | |||
The full output is printed when the program ends.. with a considerable delay. | 08:12 | ||
08:12
jjido joined
|
|||
Ergo444 | I think it buffers the output.....for a while before printing | 08:18 | |
how to make it print more often? | |||
moritz_ | see my updated answer | 08:19 | |
Ergo444 | ok | 08:21 | |
but if I run the program in itself... it does not delay that much. | 08:22 | ||
moritz_ | (having the discussion in two different places in parallel doesn't work well) | ||
SmokeMachine | m: say 3/99 .nude | 08:23 | |
camelia | No such method 'nude' for invocant of type 'Int'. Did you mean any of these: 'NFD', 'Num', 'none', 'note'? in block <unit> at <tmp> line 1 |
||
moritz_ | I don't think that the space lowers the precedence | 08:25 | |
Ergo444 | saying the same thing everywhere | 08:27 | |
08:34
jjido left
08:44
Oshawott left
08:50
MasterDuke joined
09:10
synthmeat left
09:12
dakkar joined
09:16
archenoth joined
09:20
TempIRCLogger left
09:21
TempIRCLogger joined
09:22
archenoth left
|
|||
SmokeMachine | moritz_: shouldn't it? it works for ^10 .max (or am I misremembering it?) | 09:28 | |
m: say ^10 .max | 09:29 | ||
camelia | 10 | ||
SmokeMachine | m: say ^10 .min | ||
camelia | 0 | ||
SmokeMachine | m: say ^10.min | ||
camelia | Potential difficulties: Precedence of ^ is looser than method call; please parenthesize at <tmp>:1 ------> 3say ^107⏏5.min ^10 |
||
09:30
Skarsnik_ joined
09:34
frost left,
MasterDuke left
09:39
frost joined
09:44
MasterDuke joined
09:47
jjido joined
10:07
Merfont left
10:12
TempIRCLogger left,
TempIRCLogger joined
10:25
synthmeat joined
10:29
RakuIRCLogger left,
RakuIRCLogger joined
10:31
Geth left
10:36
Geth joined
10:37
patrickb joined
11:25
ab5tract joined
11:30
jjido left
11:39
gordonfish- joined
11:41
gordonfish left
11:51
Skarsnik_ left
12:02
reportable6 left
12:06
archenoth joined
12:09
Kaiepi joined
12:20
Guest85 joined
|
|||
ab5tract | hmm... is it curious that Bags don't have a median method? | 12:25 | |
12:26
b2gills left
|
|||
Guest85 | Hi All, | 12:27 | |
How would you solve this? | 12:28 | ||
blogger.googleusercontent.com/img/...=w640-h370 | |||
m: <25 2 10 3 20 5 15 0>.combinations(3).grep: *.sum == 35; | |||
camelia | ( no output ) | ||
Guest85 | That does not count multiple throws at the same dart board score. | 12:29 | |
12:29
synthmeat left
|
|||
Guest85 | I got as far as: | 12:29 | |
m: say sort gather { | 12:30 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3say sort gather {7⏏5<EOL> |
||
Guest85 | for ([X,] <25 2 10 3 20 5 15 0> xx 3) { | ||
take sort $_ if (sum $_) == 35; | |||
} | |||
} | |||
But that does not make the list unique and I'm struggling with 'with'. | |||
ab5tract | m: 34.5 .ceil | 12:34 | |
camelia | No such method 'ceil' for invocant of type 'Rat'. Did you mean any of these: 'Real', 'cis', 'perl', 'tail'? in block <unit> at <tmp> line 1 |
||
ab5tract | ^^^ LTA bug: .ceil should mention .ceiling :) | ||
El_Che | cis | 12:35 | |
lol | |||
12:52
Kaiepi left,
Kaiepi joined
|
|||
lizmat | github.com/rakudo/rakudo/commit/57adbb1ef0 # ab5tract | 12:55 | |
aaah... it *is* | 13:00 | ||
oops, ww | |||
Geth | ecosystem: c68d532e11 | (Elizabeth Mattijsen)++ | META.list Text::Markdown now lives in the zef ecosystem |
13:02 | |
13:04
euandreh joined
|
|||
ab5tract | lizmat: I had a feeling it wouldn't last too long :D | 13:04 | |
13:05
jgaz joined,
reportable6 joined
|
|||
lizmat | ab5tract: I wonder if there are many more of these false friends | 13:06 | |
do you know of any offhand that wouldn't be caught already ? | |||
ab5tract | lizmat not off the top of my head, no | 13:25 | |
13:38
patrickb left
13:41
kostas joined
13:47
kostas left,
kostas joined
13:52
Guest85 left
|
|||
Ergo444 | Are threads safe to use with perl5 modules? | 13:57 | |
14:00
lucs left,
tonyo left
|
|||
MasterDuke | Ergo444: i believe so, but nine would know for sure | 14:00 | |
14:01
lucs joined
|
|||
Ergo444 | I encountered some problems | 14:01 | |
14:01
tonyo joined
14:05
Zero_Dogg left,
Zero_Dogg joined
14:24
lizmat_ joined
14:27
lizmat left
14:39
synthmeat joined
14:44
monkey_ joined
15:00
Guest85 joined
15:12
frost left
15:16
euandreh left
15:39
ab5tract left
15:45
euandreh joined,
xinming joined
15:48
ab5tract joined
|
|||
ab5tract | Ergo444: IIRC you need to have Perl compiled with support for having more than one interpreter in memory | 15:49 | |
I forget the specific flag | |||
El_Che | -Dusethreads | 15:52 | |
ab5tract | El_Che: I think it is actually separate from that flag, though the use of -Dusethreads implies/enforces the flag I'm thinking of. | 15:54 | |
I'm relatively confident that it is -Duseshrplib | 15:56 | ||
15:59
synthmeat left
16:00
synthmeat joined
|
|||
ab5tract | though looking at the docs here makes me question whether that is correct.. metacpan.org/dist/perl/view/INSTAL...rl-library | 16:02 | |
16:02
synthmeat left
|
|||
ab5tract | as -Dusethreads doesn't mention anything about an associated performance penalty | 16:02 | |
16:07
[Coke] left
16:09
synthmeat joined,
lizmat_ left
16:10
lizmat joined
|
|||
ab5tract | m: my @a = [[1,2,3],[4,5,6]]; @a.unshift: [0,0,0]; @a.append: [0,0,0]; dd @a | 16:10 | |
camelia | Array @a = [[0, 0, 0], [1, 2, 3], [4, 5, 6], 0, 0, 0] | ||
ab5tract | why does append "un-array" my value? | ||
m: my @a = [[1,2,3],[4,5,6]]; @a.unshift: [0,0,0]; @a.append: $[0,0,0]; dd @a | 16:11 | ||
camelia | Array @a = [[0, 0, 0], [1, 2, 3], [4, 5, 6], [0, 0, 0]] | ||
16:11
synthmeat left
|
|||
ab5tract | ok, so there is the solution.. but it feels like a WAT to me | 16:11 | |
16:12
[Coke] joined
|
|||
[Coke] | . | 16:12 | |
lizmat | ab5tract: why use .append and not .push ?? | 16:14 | |
m: my @a; @a.push: [1,2,3]; dd @a | 16:15 | ||
camelia | Array @a = [[1, 2, 3],] | ||
lizmat | .append and .prepend where specifically created for their flattening behaviour | ||
16:17
seednode left
16:19
seednode joined
16:21
synthmeat joined
|
|||
ab5tract | lizmat: doh! that was a total thinko on my part. of course .push is the corresponding method for .unshift | 16:21 | |
lizmat | ok, glad to be able to clear that up :-) | ||
ab5tract | lizmat: much appreciated :D | 16:22 | |
lizmat | the reason that .push doesn't have single arg semantics | ||
is whether @array.push(@array.pop) should restore the array in the original state regardless of the contents of the last elemen | 16:23 | ||
t | |||
16:30
lichtkind joined
16:32
gordonfish- is now known as gordonfish
16:40
dextercd joined
16:41
monkey_ left
16:53
lichtkind left
16:54
lichtkind joined
16:55
lichtkind left,
lichtkind joined
|
|||
ab5tract | lizmat++ thanks for the explanation | 17:01 | |
17:02
monkey_ joined
17:03
kostas left
17:09
xinming left
17:17
synthmeat left
17:23
[Coke]_ joined
17:26
[Coke] left
17:27
linkable6 left
17:28
seednode left
17:33
seednode joined
17:36
synthmeat joined,
dakkar left
|
|||
merryprog | Hey lizmat, do you know where the regex engine is implemented? Looking to make a bugfix or positive lookbehinds | 17:43 | |
my code search-fu isn't turning up where the main logic happens | 17:44 | ||
moon-child | merryprog: github.com/Raku/nqp/tree/master/src/QRegex | 17:45 | |
merryprog | ah that'd be why :P was looking in Rakudo | ||
thank you! | |||
18:00
monkey_ left
18:02
reportable6 left
18:05
reportable6 joined
18:06
gcd left
18:12
ab5tract left
18:15
abraxxa left
18:26
Guest85 left
18:28
linkable6 joined
19:09
jjido joined
19:14
linkable6 left
19:38
[Coke]_ is now known as [Coke]
20:32
Skarsnik_ joined
20:47
happy-dude left,
sienet_ja_LSD[m] left,
AlexDaniel left
20:48
Manifest0 left
20:49
andrea[m] left,
demostanis[m] left
20:51
CIAvash left,
mathias[m]12 left,
Arathorn left
20:56
vrurg_ is now known as vrurg
|
|||
merryprog | yay my rakudo installation is broken 🙃 | 20:58 | |
raku repl wasn't working, homebrew uninstalled rakudo-star, homebrew installed rakudo, now errors with "Unhandled exception: Missing or wrong version of dependency 'gen/moar/stage2/MASTNodes.nqp' (from 'gen/moar/Pod.nqp')" | 20:59 | ||
(Raku repl wasn't working = no prompt would ever appear and didn't respond to input) | |||
tonyo | merryprog: what is the bug with positive lookbehinds? | 21:01 | |
merryprog | tonyo variable interpolation in a positive lookbehind will effectively reverse the argument | 21:02 | |
m: my $num = 12; say S:g/<?after $num>/!/ with "12 21"; say S:g/<?after 12>/!/ with "12 21" | |||
camelia | 12 21! 12! 21 |
||
merryprog | what seems to be happening is it reverses the ast (or something magical, I don't really know) when doing a lookbehind but for some reason it doesn't compare the interpolated reversed during that comparison | 21:03 | |
21:03
Arathorn joined
|
|||
lizmat | merryprog: that feels like a known issue, fwiw | 21:08 | |
merryprog | oh. Checked the issue tracker but didn't see it. | ||
lizmat | maybe in nqp ? | ||
merryprog | yeah | ||
Looks like the lookbehind stuff is a bit WIP considering its test suite is commented out :P | |||
lizmat | could very well be | ||
21:08
CIAvash joined
21:09
mathias[m]12 joined
|
|||
merryprog | If it is known/WIP then I won't bother looking into this more—I underestimated how scary AST combined with Regex parsing would be... | 21:11 | |
[Coke] | We should make sure there's a bug open, probably | 21:12 | |
anyone else having issues with AOC Day 8, Part 2 (no spoilers) | 21:13 | ||
(I solve the sample data, but not the real data) | |||
21:14
Manifest0 joined
21:16
AlexDaniel joined,
sienet_ja_LSD[m] joined
21:17
linkable6 joined
|
|||
MasterDuke | merryprog: there was some chat about that bug over in #moarvm last night logs.liz.nl/moarvm/2021-12-08.html#21:25 | 21:21 | |
merryprog | oh nice, you beat me to it :) | ||
MasterDuke | well, i haven't fixed anything | ||
feel completely free to beat me to that | 21:22 | ||
merryprog | well you actually know what you're doing... | ||
MasterDuke | ha, almost entirely untrue when it comes to the grammar/regex implementation | 21:23 | |
merryprog | pfft | ||
21:24
gcd joined
|
|||
japhb | I knew MasterDuke was going to say something like that, but it ruins the humble if someone else says it for them. ;-) | 21:28 | |
MasterDuke | heh. wish i was exaggerating the humbleness, but not the case this time | 21:29 | |
tonyo | m: m: my $num = 12; say S:g/<?after "$num">/!/ with "12 21"; | 21:31 | |
camelia | 12 21! | ||
tonyo | oop | ||
21:41
TheAthlete left
21:48
lichtkind_ joined
21:51
demostanis[m] joined,
lichtkind left
21:52
andrea[m] joined
21:55
ggoebel joined
|
|||
ggoebel | coke: I was able to solve AOC day 8 part 2. can you share your input? and answer? I'll run code against it and let you know if I get the same result (no spoilers) | 21:58 | |
22:22
andrea[m] left,
AlexDaniel left,
CIAvash left,
Arathorn left,
mathias[m]12 left,
demostanis[m] left,
sienet_ja_LSD[m] left,
hobbs joined
|
|||
hobbs | gist.github.com/arodland/b433602c1...e295e0374a -- advent of code day 8 (yesterday) in raku. Mildly untidy but Raku made a decent fit | 22:23 | |
22:24
CIAvash joined
|
|||
elcaro | OH! When was slippy semilist (`@m[||@xy]`) added to v6.e.PREVIEW ?! I'm sure it didn't work last time I tried | 22:26 | |
22:26
AlexDaniel joined,
happy-dude joined,
Arathorn joined,
demostanis[m] joined,
andrea[m] joined,
mathias[m] joined
|
|||
elcaro | Which admittedly was probably 12 months ago | 22:26 | |
22:26
sienet_ja_LSD[m] joined
|
|||
elcaro | To which I mean... I know it was added to Associatives a while back (`.{||@keys}`), but I'm sure I tried it on an Array at the time and it didn't work | 22:28 | |
22:31
hobbs left
22:42
Ergo444 left
22:43
euandreh left
22:46
happy-dude left
22:47
Arathorn left,
happy-dude joined,
AlexDaniel left
22:48
CIAvash left
22:52
demostanis[m] left
23:14
andrea[m] left,
lichtkind_ left
23:16
Sgeo joined
23:19
jjido left
|
|||
[Coke] | ggoebel: found the bug in my algo. Just got lucky on the sample data. | 23:29 | |
23:29
CIAvash joined
23:30
AlexDaniel joined,
Arathorn joined,
demostanis[m] joined,
andrea[m] joined
23:45
euandreh joined
|
|||
[Coke] | (my bug depended on the order of digits on the LHS) | 23:46 | |
23:56
Skarsnik_ left
|