🦋 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:08
oneeggeach left
00:12
neshpion left
00:16
sxmx joined
00:24
abraxxa left
00:25
abraxxa joined
00:38
oneeggeach joined
00:40
squashable6 left,
squashable6 joined
00:42
oneeggeach left,
oneeggeach joined,
monkey__ joined
01:15
monkey__ left
01:18
kvw_5 joined
01:21
kvw_5_ left
01:22
squashable6 left
01:24
Util joined,
mowcat left,
squashable6 joined
01:30
Juerd joined
|
|||
Juerd | put($x) is almost twice as fast as $x.put; is that expected? | 01:32 | |
(And the whole silly benchmark oneliner is still 10x faster in Perl than Raku with the sub put...) | 01:38 | ||
01:51
[Sno] joined
01:53
sno left
02:03
Manifest0 left
02:05
Manifest0 joined
02:23
perigrin left,
perigrin joined
02:27
vike left
02:29
abraxxa left
02:31
abraxxa joined
|
|||
moon-child | Juerd: I guess $x.put will have to do a method lookup. (Though I also think jnthn was working on something to make those faster?) | 02:34 | |
Juerd | Ah, of course. Makes sense | ||
02:34
abraxxa left
02:37
abraxxa joined
|
|||
moon-child | aside: would be cursious to see the benchmark | 02:39 | |
Juerd | time raku -e'for ^10_000_000 { put($_) }' >/dev/null | 02:40 | |
02:51
bdju left,
bdju joined
03:10
parv joined
03:20
oneeggeach left
03:23
oneeggeach joined
|
|||
codesections | with that benchmark, 99% of the difference you're seeing between Raku and Perl is the startup time (Perl's startup time rounds to 0; ours is ~100-120ms) | 03:24 | |
Juerd | Something's really wrong with my raku if the startup time depends heavily on the number of iterations though ;) | ||
codesections | ha, very true it doesn't | 03:25 | |
Juerd | I'm getting <2 seconds for perl, 18 seconds for raku | 03:26 | |
That 100 ms for startup isn't very relevant in that much of a difference, I'd say | |||
03:28
oneeggeach left
|
|||
codesections | yeah, very true. I'm kind of surprised by that, but I was able to reproduce the issue – maybe even more so: I got 19s for $put($_) and 47 for .put | 03:30 | |
03:35
abraxxa left
03:38
abraxxa joined
03:51
oneeggeach joined
03:55
oneeggeach left
04:19
oneeggeach joined,
oneeggeach left
04:55
summerisle left
04:56
summerisle joined
04:58
parabolize left
05:02
nige joined
05:11
softmoth left
05:28
epony left
05:29
epony joined
05:45
abraxxa left
05:48
abraxxa joined
06:00
mtj left
06:03
mtj joined
|
|||
summerisle | before i afk - quick picture from the raku-mode syntaxification rewrite project i'm doing: i.imgur.com/uhlRUvR.png | 06:23 | |
06:32
DiffieHellman left
06:43
rindolf joined
07:04
nige left
07:19
donaldh_ joined
07:21
donaldh left
07:30
DiffieHellman joined
07:31
aborazmeh joined
08:01
mahafyi left
08:11
aluaces left
09:11
benchable6 left,
bloatable6 left,
committable6 left,
shareable6 left,
nativecallable6 left,
sourceable6 left,
quotable6 left,
bisectable6 left,
evalable6 left,
greppable6 left
09:12
coverable6 left,
unicodable6 left,
linkable6 left,
squashable6 left,
notable6 left,
statisfiable6 left,
tellable6 left,
releasable6 left,
bisectable6 joined,
sourceable6 joined,
shareable6 joined
09:13
linkable6 joined,
quotable6 joined,
nativecallable6 joined,
committable6 joined
09:14
greppable6 joined,
statisfiable6 joined,
unicodable6 joined,
coverable6 joined,
releasable6 joined,
notable6 joined,
tellable6 joined,
squashable6 joined,
benchable6 joined,
evalable6 joined
09:15
bloatable6 joined
09:27
Sgeo left
|
|||
lizmat | Juerd codesections put defers to IO::Handle.put | 09:33 | |
Mu.put is much more involved | 09:34 | ||
it first needs to find out if the class of the object actually has its own "print" method, and use that | |||
and I'm pretty sure that currently does not optimize at all | 09:35 | ||
hmmm... actually, it does: wow | 09:38 | ||
but the problem is really the lookup of $*OUT for each .put | |||
that's at the top taking 1/3 of the CPU | |||
encoding takes about 10% | 09:40 | ||
09:41
aborazmeh left
|
|||
lizmat | BTW, you might want to try my unprint module | 09:44 | |
modules.raku.org/dist/unprint:cpan:ELIZABETH | |||
$ time raku -e'for ^10_000_000 { put($_) }' >/dev/null | |||
real0m20.817s | |||
$ time raku -Munprint -e'for ^10_000_000 { put($_) }' >/dev/null | |||
real0m5.583s | |||
09:57
cosimo left
10:01
cosimo joined
|
|||
El_Che | it looks like it should be the default? the 80% rule? | 10:07 | |
lizmat | well, you can't make it the default, because that would break code that modifies $*OUT and friends | 10:09 | |
El_Che | <insert a breake everything meme here> :) | 10:12 | |
10:29
wamba joined
10:30
aborazmeh joined
|
|||
El_Che | maar de beste verbinding in .be is precies 1000/40 ofzo | 10:30 | |
lizmat | El_Che: ww ? | 10:35 | |
El_Che | oops | 10:37 | |
11:18
Black_Ribbon left
12:12
aborazmeh left
12:35
aborazmeh joined
|
|||
Juerd | lizmat: Don't both $_.put and put($_) both need to lookup that $*OUT then? | 12:36 | |
lizmat: unprint is nice! | 12:38 | ||
12:39
thundergnat joined
|
|||
thundergnat | m: say $*VM | 12:40 | |
camelia | moar (2021.03.39.gba.124.ad.12) | ||
thundergnat | m: my ($whole, $frac) = < -1000.1 >.split('.'); say $whole.abs; | ||
camelia | Can only perform big integer operations on concrete objects in block <unit> at <tmp> line 1 |
||
thundergnat | ^^^ This only started failing recently. | 12:41 | |
bisect: old=2021.02 new=HEAD my ($whole, $frac) = < -1000.1 >.split('.'); say $whole.abs; | |||
bisectable6 | thundergnat, Bisecting by exit code (old=2021.02 new=a68d257). Old exit code: 0 | 12:42 | |
thundergnat, bisect log: gist.github.com/b3b9b96e65699227dd...5402b81b44 | |||
thundergnat, (2021-04-10) github.com/rakudo/rakudo/commit/c5...5be3877e87 | |||
thundergnat | lizmat ^^^ | 12:43 | |
See #R4315 | 12:54 | ||
13:03
abraxxa left
13:04
abraxxa joined
13:14
safinaskar joined
|
|||
safinaskar | p6: s/[[:space:]]/a | 13:15 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unrecognized regex modifier :space at <tmp>:1 ------> 3s/[[:7⏏5space:]]/a |
||
safinaskar | why this doesn't work? | ||
p6: s/[[:space:]]/a/ | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unrecognized regex modifier :space at <tmp>:1 ------> 3s/[[:7⏏5space:]]/a/ |
||
thundergnat | safinaskar: For the most part the POSIX regex classes have been replaced with built-in rules. | 13:28 | |
safinaskar | i have a big regex written for "grep -E" and "sed -E". how to use it in raku? that regex contains [[:space:]] | 13:29 | |
p6: s:P5/[[:space:]]/a/ | |||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 |
||
safinaskar | p6: my $a = " "; say "ok" if $a ~~ s:P5/[[:space:]]/b/ | 13:32 | |
camelia | ( no output ) | ||
safinaskar | as you can see there is no "ok" output even with :P5 | ||
so [[:space:]] is not supported even in :P5 mode? | |||
thundergnat | It doesn't appear so. | 13:33 | |
m: my $a = "hello world\ngoodbye world"; $a ~~ s:g/<[\h\v]>/a/; say $a | |||
camelia | helloaworldagoodbyeaworld | ||
thundergnat | You may need to convert it to use a Raku character class. | ||
MasterDuke | P5 mode isn't not 100% feature complete, and it is/was only targeting ~5.10 or something like that | 13:34 | |
safinaskar | ok, thanks | 13:35 | |
13:38
safinaskar left
13:41
patrickas joined
|
|||
patrickas | Hello... when I do the following | 13:42 | |
raku -e '.say for (1..10000)' | head | |||
I get an error Failed to write bytes to filehandle: Broken pipe | |||
in block <unit> at -e line 1 | |||
Unhandled exception: Failed to write bytes to filehandle: Broken pipe | |||
at SETTING::src/core.c/Exception.pm6:568 | |||
Is that something known? Am I doing something wrong? | 13:43 | ||
$ raku -v | |||
Welcome to Rakudo(tm) v2021.03. | |||
Implementing the Raku(tm) programming language v6.d. | |||
Built on MoarVM version 2021.03. | |||
13:43
aborazmeh left
|
|||
MasterDuke | pretty sure that's a known thing | 13:44 | |
github.com/rakudo/rakudo/issues/4214 and github.com/rakudo/rakudo/issues/3004 seem relevant | 13:45 | ||
patrickas | ok cool... Thanks | ||
thundergnat | bisect: old=2021.02 new=HEAD my $r = trim < 4 >; say $r.abs | 13:48 | |
bisectable6 | thundergnat, Bisecting by output (old=2021.02 new=a68d257) because on both starting points the exit code is 0 | ||
thundergnat, bisect log: gist.github.com/84dcdd2ed8d2689b96...5ecb08198b | |||
thundergnat, (2021-04-10) github.com/rakudo/rakudo/commit/ff...c3854308da | |||
thundergnat | Issue filed: github.com/rakudo/rakudo/issues/4316 | 14:01 | |
14:20
MitarashiDango[m joined,
wamba left
14:28
wamba joined
14:33
aborazmeh joined
14:37
parabolize joined
15:08
abraxxa left
15:11
abraxxa joined
15:30
domidumont joined
15:35
aborazmeh left
15:49
aborazmeh joined
16:13
ufobat__ joined,
abraxxa left
16:14
aborazmeh left
16:16
abraxxa joined
16:17
softmoth joined
16:18
abraxxa left
16:24
abraxxa joined
16:36
aluaces joined
16:40
|oLa| left
16:46
neshpion joined
17:06
pecastro joined
17:14
ufobat__ left
17:17
softmoth_ joined
17:19
softmoth left
17:23
domidumont left
17:31
nursery joined
17:33
aborazmeh joined
17:45
nursery left
17:46
mowcat joined
17:47
Sgeo joined,
mowcat left
17:52
patrickas left
18:05
b2gills left
|
|||
demostanis[m] | examples.perl6.org returns Connection timed out, someone should check | 18:12 | |
18:13
wamba left
|
|||
codesections | demostanis[m]: I can reproduce the issue (specifically, I get a cloudflare error with the text: Error 522 Ray ID: 63e630938f9c03ac • 2021-04-11 18:13:35 UTC) | 18:15 | |
18:33
mowcat joined,
finsternis joined
18:34
mowcat left
18:37
mowcat joined
18:41
mowcat left
18:42
webstrand left
18:43
dataangel left
18:45
mowcat joined
18:49
mowcat left
18:52
mowcat joined
18:59
stoned75 joined
19:02
neshpion left,
neshpion joined
|
|||
jdv79 | leont: i'm not sure what you mean in your comment on #4278 | 19:08 | |
leont | jdv79: TBH, I suspect my analysis is wrong, and I should update my comment | 19:09 | |
jdv79 | ok:) i was struggling to understand how using signature defaults and coercions in MAIN like that would be "wrong". | 19:10 | |
if there's a better way to "impedance match" the type system to cli args i'm all ears though | 19:11 | ||
19:25
wamba joined
19:49
parv left
19:54
parabolize left
19:56
parabolize joined
|
|||
Altreus | the PDF::IO::Reader class has only "open" methods, which take either a Str or an IO::Path, but I have a Buf of binary PDF data from an HTTP POST. Can I lie to PDF::IO::Reader by pretending this buf is a file? | 20:05 | |
20:07
tejr joined
|
|||
ugexe | i doubt pretending would be sufficient since its almost certainly expecting to use methods a IO::Path has | 20:20 | |
Altreus | It immediately does $input-path.IO.slurp | ||
ugexe | but does it tomorrow? | 20:21 | |
you get to rely on the type signature, not the implementation details | |||
Altreus | fair enough, but can I make an IO::Path that resolves to a virtual file? :D | ||
ugexe | i dont think so | 20:23 | |
you could use augment but why not just send a PR with a new multi candidate for Bufs | |||
20:28
squashable6 left
20:31
squashable6 joined
20:34
stoned75 left
20:35
b2gills joined
20:56
rindolf left
21:05
abraxxa1 joined
21:09
aborazmeh left,
clarjon1 left
21:10
webstrand joined
21:41
wamba left
21:45
xelxebar left,
xelxebar joined
22:45
evalable6 left
22:48
evalable6 joined
22:54
parv joined
23:12
pecastro left
23:38
abraxxa1 left
23:39
mowcat left
|