Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-30

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 HelpBot[perl6] tbrowder: on my box .lines vs .split for 1 mil-line file shows .split to be 1.590551x faster. If you saw no difference, the way you were measuring is flawed.
00:01 HelpBot[perl6] Probably drowned by all those regex option parsing, unless you're excluding those times.
00:03 HelpBot[perl6] tbrowder: and in this investigation, telling perl 5 to perform encoding made it 1.5x slower. So again, you should be able to see the differences in timing very clearly if you're measuring just the IO: https://www.reddit.com/r/perl6/comments/6hagwm/performance_concern_with_respect_to_gnu_yes/dixps6s/
00:03 astj joined #perl6
00:07 dubi0us joined #perl6
00:07 zapwai joined #perl6
00:08 tbrowder my test times are user times as reported by the GNU system 'time' command. they are averaged over three trials, and they are supposed to reflect a real environment shared with other processes. but i'll look at your suggestions, thnx
00:15 HelpBot[perl6] But the user times includes all the other bits.
00:16 HelpBot[perl6] So the comparison is very lopsided. Even if you rename the timings from IO to "some programs", they'd still be lopsided because, excluding IO, you're doing very different things in the two programs. You should measure the time inside the test scripts and print out the times and parse them out of the output instead of using `time`
00:20 * HelpBot[perl6] was contemplating a benching system for core recently
00:21 HelpBot[perl6] You just create a small file that has some code in it and it becomes part of the bench suite. Make enough of these and you can bench the entire Perl 6. Make a reliable-enough ruler and you can also add tests to watch for regressions.
00:22 timotimo HelpBot[perl6]: maybe there's a bit of stuff you can steal from japhb's perl6-bench?
00:23 HelpBot[perl6] Where is it?
00:23 Cabanossi joined #perl6
00:23 buggable joined #perl6
00:24 HelpBot[perl6] huggable: bench
00:24 huggable HelpBot[perl6], nothing found
00:24 HelpBot[perl6] huggable: bench :is: https://github.com/japhb/perl6-bench
00:24 huggable HelpBot[perl6], Added bench as https://github.com/japhb/perl6-bench
00:24 HelpBot[perl6] Thanks.
00:25 literal_ joined #perl6
00:26 lookatme joined #perl6
00:26 timotimo it has a bunch of microbenchmarks already built-in
00:26 timotimo and we used to run them daily on moarvm.org/measurements/
00:26 lookatme morning
00:28 HelpBot[perl6] \o
00:30 BenGoldberg joined #perl6
00:33 lookatme ^_<
00:48 literal_ Is there a way to know the callee of a sub without needing to pass any information?
01:01 cdg joined #perl6
01:03 HelpBot[perl6] m: sub foo { bar }; sub bar { callframe(1).code.name.say }
01:03 camelia rakudo-moar e2517f: ( no output )
01:03 HelpBot[perl6] m: sub foo { bar }; sub bar { callframe(1).code.name.say }; foo
01:03 camelia rakudo-moar e2517f: OUTPUT: «foo␤»
01:10 Actualeyes joined #perl6
01:10 Actualeyes left #perl6
01:12 dubi0us joined #perl6
01:13 zengargoyle m: sub f { !!! X::NYI.new: feature => &?ROUTINE.name }; f();
01:13 camelia rakudo-moar e2517f: OUTPUT: «f not yet implemented. Sorry.␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:14 zengargoyle an, nm, one level down.
01:15 * zengargoyle thinks it must be bedtime.
01:18 nullcone_ left #perl6
01:22 dubi0us joined #perl6
01:22 astj joined #perl6
01:38 reino4477 joined #perl6
01:39 reino4477 hi, how can I use a reserved word as a name of a method?
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:50 awwaiid reino4477: what's an example of a reserved word that doesn't work?
01:51 BenGoldberg m: class Foo { method my { 42 } }; say Foo.my;
01:51 camelia rakudo-moar e2517f: OUTPUT: «42␤»
01:51 BenGoldberg m: class Foo { method self { 42 } }; say Foo.self;
01:51 camelia rakudo-moar e2517f: OUTPUT: «42␤»
01:52 BenGoldberg m: class Foo { method ^strange { 42 } }; say Foo.^strange;
01:52 camelia rakudo-moar e2517f: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤  in method strange at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:53 BenGoldberg m: class Foo { method ^strange(|) { 42 } }; say Foo.^strange;
01:53 camelia rakudo-moar e2517f: OUTPUT: «42␤»
01:54 mcmillhj joined #perl6
01:55 dubi0us joined #perl6
01:57 Actualeyes joined #perl6
01:57 Actualeyes left #perl6
02:04 cog_ joined #perl6
02:05 dubi0us joined #perl6
02:19 noganex_ joined #perl6
02:30 mcmillhj joined #perl6
02:33 ggoebel joined #perl6
02:38 mcmillhj joined #perl6
02:46 astj joined #perl6
02:51 Actualeyes1 joined #perl6
02:57 pompomcrab joined #perl6
03:06 Actualeyes joined #perl6
03:06 dubi0us joined #perl6
03:07 Cabanossi joined #perl6
03:18 geekosaur joined #perl6
03:25 grondilu_ joined #perl6
03:35 dubi0us joined #perl6
03:39 kurahaupo joined #perl6
03:44 dubi0us joined #perl6
03:47 fatguy joined #perl6
03:59 dubi0us joined #perl6
04:08 dubi0us joined #perl6
04:17 astj joined #perl6
04:22 Cabanossi joined #perl6
04:31 Actualeyes joined #perl6
04:51 dubi0us joined #perl6
04:52 lookatme How can I write action for token like this: `token target { <style1> | <style2> | <style3> }`
04:52 lookatme s/action/actions/
04:59 wamba joined #perl6
05:00 dubi0us joined #perl6
05:10 dubi0us joined #perl6
05:10 Ben_Goldberg joined #perl6
05:19 dubi0us joined #perl6
05:20 ufobat joined #perl6
05:27 ufobat https://github.com/rakudo/rakudo/commit/40b0169d0846fa990e61be1683180d3adec180bf  Zoffix++
05:27 raiph joined #perl6
05:29 dubi0us joined #perl6
05:52 stmuk_ joined #perl6
06:01 seatek You know, whoever put those matching guesses in error messages in... the ones that say, hey, dummy, maybe you really meant to say "this thing" ... they're a real smart alec. ;) I love those though. The guesses are really good too.
06:03 titsuki_ joined #perl6
06:12 dubi0us joined #perl6
06:15 astj joined #perl6
06:15 |oLa| joined #perl6
06:16 astj joined #perl6
06:17 astj joined #perl6
06:20 Bucciarati joined #perl6
06:21 |oLa|1 joined #perl6
06:25 domidumont joined #perl6
06:28 astj_ joined #perl6
06:30 |oLa| joined #perl6
06:31 dubi0us joined #perl6
06:31 domidumont joined #perl6
06:42 linuksz joined #perl6
06:45 dubi0us joined #perl6
06:51 reino4477 joined #perl6
06:59 dubi0us joined #perl6
07:04 abraxxa joined #perl6
07:08 melezhik joined #perl6
07:09 dubi0us joined #perl6
07:14 jamesaxl joined #perl6
07:14 cschwenz joined #perl6
07:18 dubi0us joined #perl6
07:22 Cabanossi joined #perl6
07:25 cosimo joined #perl6
07:28 dubi0us joined #perl6
07:31 Geth ¦ ecosystem: 52ba465c8d | seatek++ (committed using GitHub Web editor) | META.list
07:31 Geth ¦ ecosystem: Update META.list
07:31 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/52ba465c8d
07:35 wamba joined #perl6
07:35 parv joined #perl6
07:42 dubi0us joined #perl6
07:44 reino4477 joined #perl6
07:44 reino4477 how can I create my own exception?
07:47 parv reino4477 is Exceptional
07:48 reino4477 parv: tnx
07:49 lookatme m: my class FE is Exception { }; FE.new(message => "123").throw
07:49 camelia rakudo-moar e2517f: OUTPUT: «FE exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
07:49 lookatme m: my class FE is Exception { }; FE.new("123").throw
07:49 camelia rakudo-moar e2517f: OUTPUT: «Default constructor for 'FE' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»
07:49 lookatme m: my class FE is Exception { }; FE.new(msg => "123").throw
07:49 camelia rakudo-moar e2517f: OUTPUT: «FE exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
07:50 lookatme m: my class FE is Exception { has $.message; }; FE.new(message => "123").throw
07:50 camelia rakudo-moar e2517f: OUTPUT: «123␤  in block <unit> at <tmp> line 1␤␤»
07:53 reino4477 joined #perl6
07:57 parv Does #perl6 get rakudo build (nearly?) everyday?
08:04 alnewkirk joined #perl6
08:06 lookatme IDK :)
08:06 lookatme probably not
08:07 rindolf joined #perl6
08:14 lowbro_ joined #perl6
08:15 parv hunh. everytime i notice the revision in rakudo-moar output, it /seems/ to be the new one i had installed some days/weeks/months ago.
08:15 dubi0us joined #perl6
08:18 g3 joined #perl6
08:25 dubi0us joined #perl6
08:30 zakharyas joined #perl6
08:34 reino4477 joined #perl6
08:34 reino4477 I can't find any info about the difference between subroutines and methods, where can I find it?
08:35 dubi0us joined #perl6
08:43 lookatme reino4477, check out method document :https://docs.perl6.org/type/Method
08:44 melezhik Hi! How to declare mandatory parameter in sub MAIN ?
08:44 lookatme and also sub: https://docs.perl6.org/type/Sub
08:44 lookatme melezhik, add ! after parameter
08:45 melezhik thanks. lookatme:
08:45 melezhik always forget the syntax ))
08:45 lookatme more practice :)
08:45 melezhik sure
08:46 melezhik and the syntax will be "in fingers"
08:51 Geth ¦ doc: 9e46c5c274 | (Jan-Olof Hendig)++ | 3 files
08:51 Geth ¦ doc: Fixed a few broken links. AlexDaniel++
08:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9e46c5c274
08:54 reino4477 tnx
08:59 pmurias joined #perl6
09:01 rindolf joined #perl6
09:03 reino4477 joined #perl6
09:04 reino4477 how can I specify a variable of type  Hash <Str Str>?
09:04 reino4477 or a return type of a method
09:05 reino4477 my Hash<Str Str> a; ----> doesn't work
09:05 moritz m: Hash{Str, Str}
09:05 camelia rakudo-moar e2517f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Autovivifying object closures not yet implemented. Sorry.␤at <tmp>:1␤------> 3Hash{Str, Str}7⏏5<EOL>␤»
09:06 moritz hmm
09:06 moritz m: my Str %h; say %h.^name
09:06 camelia rakudo-moar e2517f: OUTPUT: «Hash[Str]␤»
09:06 moritz oh
09:06 moritz m: say Hash[Str, Str]
09:06 camelia rakudo-moar e2517f: OUTPUT: «(Hash[Str,Str])␤»
09:08 lookatme reino4477, perl6 use `[]` for type parameter
09:09 reino4477 tnx
09:12 lookatme There are many perl6 tutorial : https://perl6.org/resources/
09:12 lookatme reino4477
09:12 reino4477 by the way, what's the most common way to specify a return value syntax a) --> b) of c) returns ?
09:13 dubi0us joined #perl6
09:13 reino4477 there're 4, which is usually used?
09:13 geekosaur "returns" is deprecated
09:13 geekosaur --> is the preferred one
09:13 lookatme I prefer `-->`
09:14 reino4477 it works without a comma before it and with it too, should a command be used?
09:14 geekosaur I still think --> is in the wrong place especially since it's visually claiming to take part in MRO when in fact it doesn't
09:15 reino4477 sub s1(Str --> Int) {};             and             sub s2(Str, --> Int) {};
09:16 reino4477 geekosaur: what do you use instead of the -->?
09:16 geekosaur we don;t use the comma and I would be wary of that syntax being used for something else in the future
09:16 bjz joined #perl6
09:17 lookatme m: say (Str, --> Int) ~~ (Str --> Int)
09:17 camelia rakudo-moar e2517f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say (Str,7⏏5 --> Int) ~~ (Str --> Int)␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
09:17 geekosaur I did not say I don't use --> since --> has been legislated as The Way. I just think that was the wrong decision'
09:17 lookatme m: say :(Str, --> Int) ~~ :(Str --> Int)
09:17 camelia rakudo-moar e2517f: OUTPUT: «True␤»
09:18 lookatme current they are equivalent
09:22 dubi0us joined #perl6
09:23 lizmat joined #perl6
09:32 dubi0us joined #perl6
09:41 dubi0us joined #perl6
09:52 Cabanossi joined #perl6
09:55 dubi0us joined #perl6
09:56 bjz joined #perl6
09:59 Geth ¦ doc: 88cd831a92 | (Jan-Olof Hendig)++ | doc/Type/IO.pod6
09:59 Geth ¦ doc: Fixed broken link
09:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/88cd831a92
09:59 Geth ¦ doc: 9baa6797ae | (Jan-Olof Hendig)++ | 2 files
09:59 Geth ¦ doc: Fixed a few indentation problems
09:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9baa6797ae
10:05 dubi0us joined #perl6
10:08 HelpBot[perl6] "returns" isn't deprecated. TimToady wanted to deprecate it in 6.d, but there's resistance to that.
10:16 Geth ¦ doc: a5904cb70e | (Jan-Olof Hendig)++ | 2 files
10:16 Geth ¦ doc: Fixed a bunch of broken links. AlexDaniel++
10:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a5904cb70e
10:19 HelpBot[perl6] .tell parv you should only ever use releases and not "build every day" off a random commit. Non-release commits aren't as thoroughly tested and it isn't uncommon for them to have some regressions. People who build them are like people who do 30 over speed limit: they think they know better and would like to get (bugfixes) fast, but eventually they'll come across a untested pothole that wipes all their data.
10:19 yoleaux HelpBot[perl6]: I'll pass your message to parv.
10:19 dubi0us joined #perl6
10:22 timotimo i ... i'm like that :o
10:27 broquaint joined #perl6
10:31 Ulti https://gist.github.com/MattOates/0c051cb36d152bd20f1e23a42ef96b78 <--- is the difference in perf here simply the number of assignments required?
10:32 Ulti I assume P5 is doing some kind of gross direct writing to the same SV with low level C style block memcpy and P6 is creating whole new Buf objects?
10:33 HelpBot[perl6] Ulti: I'd guess assignments are the least expensive thing there. It's fewer going out to the file and reading chunks from it.
10:33 Ulti that would explain the very minimal difference between the read buffer size on P5 and the almost linear relationship in time with P6
10:33 dubi0us joined #perl6
10:34 Ulti HelpBot[perl6]: P5 is barely affected though with what is logically the same "speed up"
10:34 HelpBot[perl6] timotimo: at least you hang in #perl6-dev. I've seen people rock a 2017.04.02-\d+ rakudo so they definitely had some sort of bug there.
10:35 HelpBot[perl6] Ulti: it gets 30% faster
10:35 * HelpBot[perl6] would like to see such "barely" in Rakudo :)
10:36 timotimo moar definitely does create new Buf objects for each read there
10:37 Ulti the Rakudo relationship is the multiplier for difference in length /8 in a linear relationship o____O
10:38 HelpBot[perl6] It's worse than that. $*IN by default is in utf8 mode, so you're also filling up the decoder for no reason
10:38 HelpBot[perl6] Ulti: but your code is not a 1-to-1 relationship to Perl 5's version
10:38 Ulti well its as close as you can get without NQP
10:39 Ulti afaik?
10:39 HelpBot[perl6] No
10:39 Ulti orly
10:39 HelpBot[perl6] You're reading in char mode basically. Also you have phaser support on that while
10:39 jnthn Pretty sure it can see there's not phasers, though. :)
10:39 Ulti surely the phaser support is a constant not linearly worse
10:40 HelpBot[perl6] Ulti: try: perl6 -e '$*IN.encoding: Nil; $ while my $buf = $*IN.read: 1024'
10:40 HelpBot[perl6] Yes, your major loss is in filling decode
10:40 HelpBot[perl6] r
10:40 Ulti k k
10:40 jnthn It's assuming you might do mixed mode binary/text because the encoding is set by default, though, as HelpBot[perl6] said
10:40 jnthn And that implies 2 extra copies/allocations each time
10:41 HelpBot[perl6] Ulti: ok, never mind the `$ while` bit, but set $*IN.encoding
10:41 Ulti HelpBot[perl6]: even worse real 0m20.516s
10:41 HelpBot[perl6] Ulti: what perl6 version are you using?
10:41 Ulti did it a second time for IO cache effects and it went up to 21.8
10:42 Ulti Rakudo version 2017.06-103-g2a8d1e7ce built on MoarVM version 2017.06-29-ga51ba620
10:42 Ulti also Im not saying this is suddenly slower
10:42 HelpBot[perl6] Ulti: this one time perl6 -e '$*IN.encoding: Nil; while ( my $buf = $*IN.read(1024) ) {}'
10:42 HelpBot[perl6] Ulti: is that the one you tried?
10:42 HelpBot[perl6] Hard to believe it's slower, considering it should bypassing doing a whole ton of work :/
10:43 jnthn It bypasses work, but note that it also does no buffering
10:43 HelpBot[perl6] ah
10:43 Ulti HelpBot[perl6]: that last one 18.774
10:43 HelpBot[perl6] right
10:43 Ulti which is still slower than my original while :S
10:44 jnthn In binary mode, the .read and .write you get are basically going straight down to read/write calls
10:44 jnthn It's not unlikely that a profile would show up some more useful info
10:45 jnthn And probably some optimization opportunities
10:45 HelpBot[perl6] Ulti: you should get better perf with switched encoding when reading 0x100000 and larger chunks :)
10:45 Ulti oh adding the profiler made the one liner wig out
10:46 Ulti HelpBot[perl6]: yeah I mean 1024 is like 1980s level OS buffer sizes
10:47 HelpBot[perl6] As for seeing phasers. I just went off this: https://www.reddit.com/r/perl6/comments/6hagwm/performance_concern_with_respect_to_gnu_yes/dixps6s/
10:47 HelpBot[perl6] Where `$ while 1` is much faster than `loop {}`1
10:47 HelpBot[perl6] well a bit faster
10:48 HelpBot[perl6] Ulti: how come you're benching IO BTW?
10:48 HelpBot[perl6] You're like the 3rd or 4th person I see doing it this week. Comparing to Perl 5 in all cases.
10:48 Ulti because everything else is fast enough >;3
10:49 Ulti P5 has unreasonably fast IO for a scripting language is the main problem with that comparisson too
10:49 jnthn True, though we're already about matching it in at least the case of reading lines in UTF-8
10:49 travis-ci joined #perl6
10:49 travis-ci Doc build errored. Jan-Olof Hendig 'Fixed a few indentation problems'
10:49 travis-ci https://travis-ci.org/perl6/doc/builds/248718962 https://github.com/perl6/doc/compare/9e46c5c274bb...9baa6797ae0a
10:49 travis-ci left #perl6
10:52 Ulti Ruby for example takes Pi seconds :D to 3 sigfig anyway
10:53 Geth ¦ doc: 1f2799d524 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/functions.pod6
10:53 Geth ¦ doc: Amend %*SUB-MAIN-OPTS docs
10:53 Geth ¦ doc:
10:53 Geth ¦ doc: Since the dynamic no longer exists by default and needs a `my`ing
10:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1f2799d524
10:54 travis-ci joined #perl6
10:54 travis-ci Doc build passed. Jan-Olof Hendig 'Fixed a bunch of broken links. AlexDaniel++'
10:54 travis-ci https://travis-ci.org/perl6/doc/builds/248723785 https://github.com/perl6/doc/compare/9baa6797ae0a...a5904cb70e11
10:54 travis-ci left #perl6
10:56 Ulti so yeah 5x slower than the latest Ruby in a contrived weird IO use case, that really is not that bad given Ruby itself was probably at that level not long ago at all certainly whilst everyone was doing Rails
10:57 Geth ¦ specs: 2eb5cd1e7a | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
10:57 Geth ¦ specs: Add reminder to toss $*MAIN-ALLOW-NAMED-ANYWHERE
10:57 Geth ¦ specs:
10:57 Geth ¦ specs: backwards compat support in 6.d
10:57 Geth ¦ specs: review: https://github.com/perl6/specs/commit/2eb5cd1e7a
10:57 araraloren joined #perl6
10:58 araraloren evening
10:58 HelpBot[perl6] morning
10:58 donaldh joined #perl6
11:03 Ulti HelpBot[perl6] but to more directly answer your question the sorts of files that are routine size for me are about 100GB, so a factor of 45x just to shovle that through a script is unfortunately for my professional use case almost the only thing that matters. The correct solution is for me to write some P6 bindings to bioinformatics IO libraries, which is the solution all other languages really have. I just wanted to know if its feasible to write these s
11:04 Ulti like even in P5 its all XS to libraries that manage the major binary formats
11:05 Ulti I think thats kind of correct anyway it means you have code with a similar API across languages which is better for the user anyway
11:07 * lizmat just committed https://github.com/perl6/doc/commit/a72b1528684e6685f98d8
11:13 dubi0us joined #perl6
11:13 HelpBot[perl6] lizmat++ # I didn't even thing about using assignment doh
11:16 HelpBot[perl6] weird. geth receivwd that commit but there's no more output in the log. it just exited :/
11:17 HelpBot[perl6] .o( killed by OS? )
11:17 Geth joined #perl6
11:18 * HelpBot[perl6] feels like a l337 haxor shelling into the bot's server and restarting it from a phone while riding on the bus :)
11:19 tbrowder ref my r/w tests, i should rename them something like "real world" tests. i made them because reading and processing large data files is a large part of the work fllow for such things as fea and genomics among other things. real world perl users want to see how p6 is stacking up to p5. but i will refine them to show ascii vs utf8 for each of p5 and p6.
11:19 Geth ¦ doc: a72b152868 | (Elizabeth Mattijsen)++ | doc/Language/functions.pod6
11:19 Geth ¦ doc: Hopefully improve SUB-MAIN-OPTS doc
11:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a72b152868
11:21 HelpBot[perl6] tbrowder: a better refinement would be testing equivalnt programs :/
11:21 Khisanth joined #perl6
11:22 tbrowder why are they not equivalent?
11:22 HelpBot[perl6] It's fine to publish data that shows P6 is 30x slower than Perl 5, but not if your Perl 6 script is doing different work
11:23 tbrowder ok, i'm not smart enough to see what you mean, please elucidate
11:23 HelpBot[perl6] tbrowder: from what I recall yesterday, you were also measuring a bunch of options parsing using regexes in perl 6 (where "real world" code would likely use .starts-with/.contains) and I didn't see any option handling in your Perl 5 script at all
11:24 dubi0us joined #perl6
11:25 tbrowder the option handling was only to decide which read method is to be used. it
11:25 HelpBot[perl6] Yes, but you're still including the time to run it in your measurementd
11:25 * HelpBot[perl6] gives up trying to explain the issue with that bench setup
11:26 tbrowder it is only used once. liz and timotimo suggested that early on. i can't believe it is significant, but it is easily removed.
11:27 * [Coke] sums up: 'everything takes time' and 'only compare like to like'.
11:27 [Coke] "can't believe" doesn't enter into benchmarking.
11:27 [Coke] that's the whole point of benchmarking.
11:27 [Coke] to measure the actual thing.
11:29 HelpBot[perl6] tbrowder: yesterday you said .split vs .lines and making Perl 5 do encoding had no difference too, yet I showed you 1.5x-2.1x differences. Why measure anything if you "can't believe" and think a 1.5x diff is not significant :/
11:29 AlexDaniel dogbert2: I think solving the <a><a> issue will get rid of most of the warnings
11:30 El_Che In case someone missed it: http://fayerplay.com/perl-is-schrodinger_state/ <- kind of harsh
11:30 HelpBot[perl6] And I also quoted jnthn++'s measurements for the same task you're benching and his results are 1.24x slower, whike yours show 20x slowr
11:31 HelpBot[perl6] El_Che good timing!
11:31 tbrowder you showed me results of yours or jnthn's tests, i still maintain mine are valid rw tests, not micro-statement measurements
11:31 HelpBot[perl6] *sigh*
11:32 dubi0us joined #perl6
11:32 tbrowder don't sigh, show me the code
11:32 HelpBot[perl6] What code?
11:32 tbrowder his tests
11:33 HelpBot[perl6] I told you you're testing non-equivalent scripts amd you dismiss the differences as not mattering
11:33 tbrowder ok, fix my code
11:33 [Coke] he's given you several concrete items that can be fixed.
11:33 HelpBot[perl6] ok, hire me. $150/hour
11:34 [Coke] well, s/fixed/changed/
11:34 El_Che HelpBot[perl6]: I see your point reading the backlog
11:35 HelpBot[perl6] El_Che: more precise, my point is we shouldn't give more ammunition to people who articles you just posted who scream Perl 6 is non-optimizeable.
11:35 tbrowder i don't think i could change anything to satisfy him, but i'll tweak a bit...
11:36 HelpBot[perl6] And it's fine if the 20x slower mark is the real data, not wildly different scripts
11:36 El_Che HelpBot[perl6]: It's not about that. People will read it anyway, so it's good to know what was written
11:36 tbrowder i don't agree with "wildly"
11:37 HelpBot[perl6] tbrowder: you also say 2.1x speed difference is not significant, so what does it matter?
11:38 HelpBot[perl6] Hell, show data that says we're 100x slower. I won't have beef with that, but show accurate data
11:38 tbrowder i didn't say that, i don't use that way of comparing times
11:40 tbrowder ok, no more wasted bandwidth, PRs welcome
11:40 tbrowder bye
11:40 tbrowder left #perl6
11:43 travis-ci joined #perl6
11:43 travis-ci Doc build errored. Zoffix Znet 'Amend %*SUB-MAIN-OPTS docs
11:43 travis-ci https://travis-ci.org/perl6/doc/builds/248733623 https://github.com/perl6/doc/compare/a5904cb70e11...1f2799d524c1
11:43 travis-ci left #perl6
11:45 HelpBot[perl6] left #perl6
11:46 robertle joined #perl6
11:47 dubi0us joined #perl6
11:52 dogbert2 AlexDaniel: all ACCEPTS links here are broken, wonder where the author intended them to point: https://docs.perl6.org/type/ComplexStr#method_ACCEPTS
11:52 yoleaux 00:45Z <AlexDaniel> dogbert2: I've updated everything. https://github.com/perl6/doc/issues/561
11:52 Cabanossi joined #perl6
11:52 dogbert2 yeah, have removed a bunch of broken links already
11:53 AlexDaniel dogbert2: Numeric#ACCEPTS, Str#ACCEPTS and no link respectively
11:54 dogbert2 AlexDaniel: cool, all Allmorphs have this problem
11:54 travis-ci joined #perl6
11:54 travis-ci Doc build errored. Elizabeth Mattijsen 'Hopefully improve SUB-MAIN-OPTS doc'
11:54 travis-ci https://travis-ci.org/perl6/doc/builds/248736639 https://github.com/perl6/doc/compare/1f2799d524c1...a72b1528684e
11:54 travis-ci left #perl6
11:55 rindolf joined #perl6
11:56 AlexDaniel well, it's #method_ACCEPTS, but you get the point :)
11:57 dubi0us joined #perl6
12:00 cschwenz left #perl6
12:04 Geth ¦ doc: 32b2ebcba5 | (Jan-Olof Hendig)++ | 4 files
12:04 Geth ¦ doc: Fixed even more broken links. AlexDaniel++
12:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/32b2ebcba5
12:17 lambd0x joined #perl6
12:17 raschipi joined #perl6
12:21 timotimo at least the create-large-file.p6 thing doesn't actually get faster when changing the encoding to ascii, which means that the utf8 encoder fast path (if there is one) is rather good!
12:23 lambd0x Hi there everyone! I wanted to know wether someone has already tried to extract in xml, txt, obj and pdf file in perl6. I was looking for it yesterday in Perl6 and could only find a way to create PDF files, not to parse it. In addition, in Perl, there are some modules, but articles regarding it are from 7 years ago and even back then, the authors reported not been able to achieve what they wanted (parsing
12:23 lambd0x txt from a pdf). Nevertheless I was looking for a pure perl6 solution, would anyone have some experience with this? Thx in advance.
12:23 araujo joined #perl6
12:25 * zengargoyle notes after backloging that all 3 of my modules are probably subtly broken re encoding and probably only work on ascii data. :/
12:26 timotimo which modules are those?
12:27 timotimo FWIW, when i encode $str x 50 and only call write 1/50th of the time instead, the whole program finishes in 0.5s
12:27 zengargoyle Search::Dict (binary search on dictionary files), Text::Fortune (fortune files), and Algorithm::Trie::libdatrie (a trie library binding).
12:27 timotimo this is for a 382 megabytes big file
12:28 timotimo ah, hmm
12:28 zengargoyle the first two were mostly 'ports' from p5 modules as inspiration.
12:29 zengargoyle the third was just playing with NativeCall and library building in a dist.
12:29 Ulti lambd0x: and you've checked out the ecosystem modules related? https://github.com/p6-pdf/PDF-p6
12:33 lambd0x Ulti: yes, but it looks like a pdf management only module (create, update, etc..)
12:33 wamba joined #perl6
12:35 timotimo it looks like it can parse, too, though?
12:36 timotimo like, you open the file and you get something vaguely object-graph-y out of it?
12:36 timotimo > $doc<Root><Pages><Kids>[0]<Contents>.decoded
12:36 timotimo BT /F1 24 Tf  100 250 Td (Hello, world!) Tj ET
12:38 araraloren_ joined #perl6
12:39 Geth ¦ DBIish: melezhik++ created pull request #94: An example how to pass dbname as file for qqlite
12:39 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/pull/94
12:45 linuksz joined #perl6
12:45 linuksz is here someone using Arch Linux?
12:46 raschipi Many people use ARCH LINUX too.
12:47 linuksz how do you install modules? from AUR? of using zef?
12:47 raschipi No idea.
12:47 zengargoyle probably zef. :)
12:48 travis-ci joined #perl6
12:48 travis-ci Doc build passed. Jan-Olof Hendig 'Fixed even more broken links. AlexDaniel++'
12:48 travis-ci https://travis-ci.org/perl6/doc/builds/248754850 https://github.com/perl6/doc/compare/a72b1528684e...32b2ebcba50c
12:48 travis-ci left #perl6
12:49 zengargoyle i think there are some debian people still trying to figure out how to manage packaging of modules.
12:50 lambd0x what's the diff between moar and moar-blead as vm?
12:50 timotimo the arch people have this tool that's supposed to install perl6 packages (maybe by creating an arch package for them first?) but it's not up to date with the latest module API
12:50 timotimo lambd0x: with moar-blead you're running an untested version that can have bugs nobody has found yet
12:50 lambd0x timotimo: thx :D
12:51 linuksz there are many packages in AUR, which use alacryd for installing the module to the packaging directory, but alacryd don't work
12:51 timotimo right
12:52 Cabanossi joined #perl6
13:00 mcmillhj joined #perl6
13:02 donaldh_ joined #perl6
13:12 jamesaxl joined #perl6
13:20 skids joined #perl6
13:27 cschwenz joined #perl6
13:29 cschwenz left #perl6
13:36 astj joined #perl6
13:40 nicq20 joined #perl6
13:47 lucasb joined #perl6
13:52 Cabanossi joined #perl6
13:56 abraxxa joined #perl6
14:22 Cabanossi joined #perl6
14:24 bjz joined #perl6
14:34 Exodist joined #perl6
14:40 DrForr_ I'll ask over here as well just in case - --profile seems to be dumping core on a 4GB Ubuntu Linux VM.
14:48 AlexDaniel wasn't it fixed recently?
14:50 DrForr_ This was on rakudobrew from yeterday, doesn't get much more "recently" :)
14:50 jnthn Believe it was fixed in https://github.com/MoarVM/MoarVM/commit/3d3d0d05df
14:51 DrForr_ So it may not have propagated. I was just hoping to get some profile data so I can see when a major slowdown occurred.
14:52 DrForr_ Rebuilding.
14:53 araraloren_ Quick question: How to create actions for token like : `token pair { <style1> | <style2> | <style3> }
14:54 jnthn make ($<style1> // $<style2> // $<style3>).ast
14:54 araraloren_ jnthn, thanks
14:54 jnthn Though it might well have been cleaner to use protoregexes instead :)
14:55 jnthn Another alternative is
14:55 jnthn token pair { <style=.style1> | <style=.style2> ... } and then the action is just make $<style>.ast
14:56 araraloren_ em, thanks
14:56 dubi0us joined #perl6
14:58 araraloren_ I will try to make a protoregex.
14:58 DrForr_ Rebuilt, testing.
14:59 committable6 joined #perl6
15:00 dubi0us joined #perl6
15:07 Cabanossi joined #perl6
15:07 DrForr_ Dumping core after about 3 lines, just like last time. May not have actually picked up moarVM changes...
15:08 dubi0us joined #perl6
15:32 ufobat in perl5 / Moose there is a around 'methodname' => sub { $orig = shift; $self = shift; ... } is there something similar in perl6?
15:33 ugexe m: proto method foo(|) { say "before"; {*}; say "after" }; multi method foo($a) { say $a }; foo(100) # kinda the same
15:33 camelia rakudo-moar 385092: OUTPUT: «5===SORRY!5===␤Undeclared routine:␤    foo used at line 1␤␤Other potential difficulties:␤    Useless declaration of a has-scoped method in mainline (did you mean 'my method foo'?)␤    at <tmp>:1␤    ------> 3proto method7⏏5 foo(|) …»
15:33 ugexe m: proto sub foo(|) { say "before"; {*}; say "after" }; multi sub foo($a) { say $a }; foo(100) # kinda the same
15:33 camelia rakudo-moar 385092: OUTPUT: «before␤100␤after␤»
15:34 ufobat i want do to this in a role that i add with does at runtime
15:34 ufobat will try it :D thx ugexe
15:34 ugexe you could probably use something like `multi whatever(|c) { ...; nextsame(|c) }`
15:35 cdg_ joined #perl6
15:35 ugexe `multi whatever(|c) { ...; my $val = [next|call]same(|c); say $val; ...; }`
15:40 domidumont joined #perl6
15:42 ptolemarch joined #perl6
15:56 Geth ¦ doc: d75b0ea6d5 | (Jan-Olof Hendig)++ | doc/Language/unicode.pod6
15:56 Geth ¦ doc: Fixed broken link
15:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d75b0ea6d5
15:58 ufobat ugexe, what is c in this example? a constant? could i retrive values from this c?
16:02 Geth ¦ doc: 6372a29881 | (Jan-Olof Hendig)++ | doc/Language/quoting.pod6
16:02 Geth ¦ doc: Fix more broken links
16:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6372a29881
16:03 khw joined #perl6
16:07 Cabanossi joined #perl6
16:09 lichtkind joined #perl6
16:14 DrForr_ Maybe the emulation bit has flipped on my laptop... 3 minutes for a test suite is annoying.
16:14 pompomcrab joined #perl6
16:19 raschipi ufobat: It's a capture
16:28 cosimo joined #perl6
16:28 ramortegui joined #perl6
16:32 ufobat raschipi: thank you!
16:34 domidumont joined #perl6
16:35 dubi0us joined #perl6
16:41 dubi0us joined #perl6
16:42 raschipi ufobat: The 'signature' and 'capture' docs are required reading.
16:47 dubi0us joined #perl6
16:52 travis-ci joined #perl6
16:52 travis-ci Doc build errored. Jan-Olof Hendig 'Fix more broken links'
16:52 travis-ci https://travis-ci.org/perl6/doc/builds/248844773 https://github.com/perl6/doc/compare/d75b0ea6d537...6372a29881fe
16:52 travis-ci left #perl6
17:01 cdg joined #perl6
17:02 cdg joined #perl6
17:03 araraloren_ m: my $c = \(a => 4, "z" => "bcd"); say $c.[0]; say $c.[1]; say $c.<z>; say $c.<a>;
17:03 camelia rakudo-moar 385092: OUTPUT: «z => bcd␤Nil␤Nil␤4␤»
17:03 cdg_ joined #perl6
17:08 araraloren_ What's difference between `a => 4` and `"z" => "bcd"` in a Capture ??
17:09 raschipi One is a named argument and the other is a pair in a positional parameter
17:09 mr-fooba_ joined #perl6
17:10 raschipi the bareword/string as key is significant in this case
17:11 araraloren_ so  If  I want capture all Pair parameter, should I use *@ instead of *% ?
17:11 raschipi m: my $c = \("a" => 4, z => "bcd"); say $c.[0]; say $c.[1]; say $c.<z>; say $c.<a>;
17:11 camelia rakudo-moar 385092: OUTPUT: «a => 4␤Nil␤bcd␤Nil␤»
17:11 araraloren_ like "a" => "c"
17:12 timotimo DrForr_: but profiling works now?
17:12 araraloren_ m: sub f (*%args) { say %args; }; f("a" => "c")
17:12 raschipi Now you're talking about signature binding, which is something else
17:12 camelia rakudo-moar 385092: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:12 DrForr_ timotimo: Nope.
17:12 araraloren_ m: sub f (*@args) { say @args; }; f("a" => "c")
17:12 camelia rakudo-moar 385092: OUTPUT: «[a => c]␤»
17:12 araraloren_ raschipi, thanks
17:13 raschipi np
17:13 timotimo were you able to update your moar sufficiently?
17:13 DrForr_ Unknown...
17:13 raschipi m: sub f (*%args) { say %args; }; f(a => "c")
17:13 camelia rakudo-moar 385092: OUTPUT: «{a => c}␤»
17:14 araraloren_ I can not use named parameter, they are contain some special letter
17:15 timotimo well, perl6 --version could tell us
17:15 * [Coke] whips up a perl 6 script to help figure out various weight goals based on bmi, kilo/stone/pounds, etc.
17:15 DrForr_ It's the latest - 'empty out bbs that were killed' is the latest log entry for MoarVM.
17:15 raschipi right, I was testing for myself in this case.
17:15 timotimo that's the one that fixes profiling, in theory
17:15 pompomcrab so i worked as a perl dev 2004-2009 and loved it, moved on to ruby/js, but have been playing with perl6 for the past 6 months. i love it. kudos to everyone involved in the 6 community. p6 dings all my linguistic autistic buttons. tbh i hope p6 could be The Next Big Language. that is all. k thx bai
17:16 [Coke] pompomcrab: thanks!
17:16 timotimo cool
17:16 DrForr_ No luck so far.
17:16 araraloren_ another short question.Can I add a type constraint for `*@` ?
17:16 raschipi If you want each pair as a positional, *@ will contain them all. But you should also test **@ and see which one do you prefer when you give it a single list.
17:17 timotimo and also +@
17:17 araraloren_ em, ok
17:18 raschipi araraloren_: no, you'll have to test them yourself. But it's possible to throw the "wrong parameter type" exception yourself and people that will use will never know.
17:18 araraloren_ raschipi, em, I got it.
17:20 raschipi For people used to perl5, testing a parameter list feels natural
17:21 pilne joined #perl6
17:21 araraloren_ raschipi, I am not familiar with perl5
17:22 araraloren_ When I saw perl6, I stopped learn perl5 :)
17:24 jnthn m: sub foo(*@a where all(@a) ~~ Int) { }; foo(1,2,3)
17:24 camelia rakudo-moar 385092: ( no output )
17:24 jnthn m: sub foo(*@a where all(@a) ~~ Int) { }; foo(1,"2",3)
17:24 camelia rakudo-moar 385092: OUTPUT: «Constraint type check failed in binding to parameter '@a'; expected anonymous constraint to be met but got Array ($[1, "2", 3])␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:25 araraloren_ jnthn++
17:29 samcv interestingly i've actually used my Font::QueryInfo a few times to find out what characters a font supports. it's pretty nice
17:30 DrForr_ I need to have someone else run this test suite to see if 3min is just me...
17:31 samcv font-query-all("FantasqueSansMono-Regular.ttf".IO)<charset>.grep({'a'.ord ~~ $_ })
17:31 samcv maybe i should add a convenience function to query if a font supports a certain character though i should probably cache the results maybe so i don't have to query the font a tons of times. though that's simple enough
17:34 timotimo DrForr_: linky please?
17:34 timotimo is this the perl6 parser one?
17:36 mr-foobar joined #perl6
17:37 DrForr_ I don't have it up yet.
17:37 DrForr_ No, it's not.
17:39 cdg joined #perl6
17:41 domidumont joined #perl6
17:43 DrForr_ https://github.com/drforr/perl6-Format-Lisp
17:44 |oLa| joined #perl6
17:52 Cabanossi joined #perl6
17:54 timotimo oh, you implemented a complete programming language in perl6
17:56 timotimo how do you run the tests?
17:58 DrForr_ perl6 -Ilib t/01-parse-text.t # that's it.
17:58 DrForr_ And there's no language backing it yet, I'm just on the parser stage.
17:59 DrForr_ It's very much unoptimized, but having to wait for 3 minutes for a test suite to run is really cramping my style.
17:59 mr-foobar joined #perl6
18:00 mr-fooba_ joined #perl6
18:04 robertle joined #perl6
18:05 seatek joined #perl6
18:06 astj joined #perl6
18:06 bjz joined #perl6
18:10 dubi0us joined #perl6
18:30 AlexDaniel joined #perl6
18:39 literal_ joined #perl6
18:43 domidumont joined #perl6
18:43 setty1 joined #perl6
18:51 linuksz joined #perl6
18:52 linuksz i have an array of objects. all objects has a $.time variable. i want to sort the array by the objects' $.time variable. is there any way to do that?
18:53 wamba joined #perl6
18:53 Cabanossi joined #perl6
18:54 geekosaur @a.sort( { $^a.time cmp $^b.time } )    ?
18:54 AlexDaniel hm, what about .sort: { .time }
18:56 raschipi I suggest .sort({ .time }) to bridge this divide.
18:57 geekosaur looks like it should work, yes
18:57 linuksz now trying them.
18:57 geekosaur checking arity might be a bit of a surprise...
18:57 * jnthn tends to write it .sort(*.time)
18:57 AlexDaniel yea
18:57 jnthn Note that it returns the sorted elements
18:58 jnthn Use @a.=sort(*.item) to do it in place
18:58 dubi0us joined #perl6
18:59 raschipi geekosaur: are you aware of other languages that check arity like this?
19:01 geekosaur most distinguish them by something more than arity in my experience
19:04 geekosaur it has the feel of ancient C varargs abuse, but (a) I'm not sure moderns know stuff that ancient to be worried about it (b) it was (K&R, even) C, so "arity" wasn't really a thing, making it much more fragile than it might otherwise be
19:06 raschipi It's overloaded on the arity of the first argument. It's a well stablished pattern.
19:08 MasterDuke joined #perl6
19:12 sena_kun joined #perl6
19:13 sjn o/
19:13 sena_kun o/
19:13 raschipi oi, sjn
19:13 sena_kun m: my @a = 1,2,3; say (@a xx 3).flat;
19:13 camelia rakudo-moar 385092: OUTPUT: «(1 2 3 1 2 3 1 2 3)␤»
19:14 kybr joined #perl6
19:15 moritz I really enjoyed this rant on (among other things) message brokers: http://programmingisterrible.com/post/162346490883/how-do-you-cut-a-monolith-in-half
19:16 sena_kun m: my @a = 1,2,3; (6,6,6,6,6) Z~ (@a xx *).flat;
19:16 camelia rakudo-moar 385092: OUTPUT: «Potential difficulties:␤    Useless use of Z~ in sink context␤    at <tmp>:1␤    ------> 3my @a = 1,2,3; (6,6,6,6,6) 7⏏5Z~ (@a xx *).flat;␤»
19:16 sena_kun Wow.
19:16 AlexDaniel wow what?
19:17 sena_kun I thought (@a xx *).flat should fail, but it just did what I wanted.
19:17 sjn m: subset Filename of Str where { *.IO.e // die "file $_ not found in $*CWD" }; sub MAIN (Filename $in = "in.txt") { ... }; # does not work
19:17 camelia rakudo-moar 385092: OUTPUT: «Stub code executed␤  in sub MAIN at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:17 sena_kun Perl 6 is "Wow, cool". :)
19:17 timotimo DrForr_: 7.57user 0.56system 0:08.17elapsed 99%CPU (0avgtext+0avgdata 2640112maxresident)k
19:17 AlexDaniel what did it do for you, by the way…
19:17 AlexDaniel m: my @a = 1,2,3; say (6,6,6,6,6) Z~ (@a xx *).flat
19:17 camelia rakudo-moar 385092: OUTPUT: «(61 62 63 61 62)␤»
19:17 timotimo DrForr_: maybe your system is swapping?
19:17 AlexDaniel why does it stop on 62?
19:18 AlexDaniel ah, oops
19:18 * zengargoyle goes OH GAWD again as people are still trying to use an app I stopped developing in 2010.
19:18 AlexDaniel there are five 6-es… oops…
19:18 sena_kun AlexDaniel, I mean the cycling of list.
19:18 AlexDaniel sena_kun: how dare you put five 6s, not 6!
19:18 sjn Am I being too ambitious with subtypes in my code? ^^
19:18 AlexDaniel :)
19:18 sena_kun AlexDaniel, ;)
19:18 timotimo zengargoyle: people are still trying to use apps development stopped for in 1980 :)
19:19 Xliff__ joined #perl6
19:19 baest_ joined #perl6
19:20 zengargoyle not when the README says: WARNING:  You probably shouldn't use this.
19:21 timotimo haha, "probably shouldn't"
19:21 raschipi Haha
19:22 Spot___ joined #perl6
19:22 nicq20 fire
19:22 FROGGS joined #perl6
19:22 seatek moritz: that was a great read :) full circle, really ;)
19:22 timotimo a full-circle developer? :D
19:22 PotatoGim joined #perl6
19:22 zengargoyle still works on Debian. only Ubuntu f'd thing up enough to break it on and off.  but it's also Gtk2 ....
19:22 avalenn joined #perl6
19:22 dubi0us joined #perl6
19:23 timotimo DrForr_: i'd wager the vast majority of time is spent precompiling Grammar.pm6
19:23 timotimo i'm profiling the compile thereof now
19:23 zengargoyle and GNOME.  i should have never ever gotten into making a GUI app.
19:24 zengargoyle it's trickled down to about one burst of emails every 6 months or so.
19:25 timotimo cool, only 1.7 megs of profile html file :S
19:26 pilne my quandry lies in that my interests lie in game logic/ai (as a hobbyist programmer) and would like to deploy to the android store, or as a webapp, but i smeggin hate gui stuffs... and i hate having to work outside of perl6, like, i go and work on rosetta code for perl6 to remind myself how fun coding is these days, everything else feels so... akward now lol.
19:26 timotimo fascinating, 50% time spent in GC
19:27 timotimo 77% of inclusive time spent in mergesubstates
19:28 zengargoyle pilne: have you tried /r/dailyprogrammer?  i should start doing that again.
19:28 pilne i haven't run outta fun on rosetta yet, but i'll definitely check it out zengargoyle
19:29 timotimo the program spends most of its time freeing up almost exactly half the nursery for the next run, then it shifts its behavior by going up from 7.5k gen2 roots to 44k gen2 roots and freeing 0% of the nursery each GC run
19:29 pilne as someone who used to love python's readability, ruby's "magic", and is always (usually unecesarily) worrying about multi-core-capable, perl6 just "gets it right"
19:29 dubi0us joined #perl6
19:29 timotimo i.e. catastrophic behavior
19:29 timotimo full GCs go up to about 1 second
19:29 pilne that does sound like something went charlie-foxtrot on your
19:30 pilne s/your/you
19:30 timotimo coldfusion?
19:30 pilne cluster fuck (:
19:30 pilne anyone ever built perl6 in termux?
19:31 timotimo termux? i only know tmux
19:33 pilne it is nifty, it's a little distro within an app.. that doesn't require a rooted phone
19:33 pilne also have gnuroot-debian to mess with too
19:39 dubi0us joined #perl6
19:42 timotimo DrForr_: you read my stuff?
19:44 konsolebox joined #perl6
19:45 user3 joined #perl6
19:46 user3 I'm new to perl 6. Someone gave me this code to print all files recursively in the current directory. How can I modify it to print only the files with the extension .txt
19:46 user3 say -> $p = $*CWD { $p.f ?? $p !! dir($p)>>.&?BLOCK.Slip }()
19:46 evalable6 user3, rakudo-moar 385092270: OUTPUT: «(exit code 1) Failed to get the directory contents of '/home/bisectable/git/whateverable/all-modules/Tux/CSV/csv-rust-qckrdr': Failed to open dir: 2␤  in block <unit> at /tmp/6Q5N6Oz9GX line 1␤»
19:47 user3 Other question: how can I post code without having it evaluated automatically?
19:48 raschipi user3, evalable6 will detect Perl6 code and run it, so you can't avoid it.
19:48 user3 # say -> $p = $*CWD { $p.f ?? $p !! dir($p)>>.&?BLOCK.Slip }()
19:48 user3 ahah i just defeated evalable6 :-P
19:48 rindolf joined #perl6
19:49 user3 :-P :-P :-P
19:49 user3 :)
19:50 user3 by the way, the code above works just fine
19:50 raschipi Then we need to go and run code evalable6 could run for us.
19:50 AlexDaniel well, evalable does this only if you start your message with “say” :)
19:51 timotimo say so if True
19:51 user3 I tried to add test => / txt$ / in the code above but that did no good
19:51 lucasb say it isn't so
19:51 raschipi say {it isn't so}
19:51 evalable6 raschipi, Full output: https://gist.github.com/d945ffca0c07fe40e4d22cf49093ceca
19:51 evalable6 raschipi, rakudo-moar 385092270: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/bEo3rZnNQW␤Prefix …»
19:52 raschipi user3: you need grep
19:52 user3 in particular i tried to replace $p.f by ($p.f && !~~ /\.txt$/)
19:52 Cabanossi joined #perl6
19:53 moritz $p.f && $p !~~ /.../
19:53 user3 i also tried ($p.f && $p.extension !eq '.txt')
19:53 AlexDaniel yeah, and only if your message looks like code… :)
19:53 FROGGS I thought you need to filter the result of dir($p)
19:54 user3 yes
19:54 dubi0us joined #perl6
19:54 user3 but I dont quite understand the code above
19:54 user3 it's too advanced for me at this stage
19:54 FROGGS your own or the suggestions?
19:54 user3 someone gave me this code
19:55 FROGGS -> $p { $p.f ?? $p !! dir($p)>>.&?BLOCK.Slip }($*CWD)
19:55 timotimo DrForr_: it'd probably cause the code to be wrong, but if i replace all | with || in token TOP Grammar.pm6 will finish compiling in about 15 seconds rather than 95
19:55 FROGGS this is the same
19:55 FROGGS (basically)
19:55 timotimo well, 97 really
19:55 timotimo ohai FROGGS
19:55 FROGGS also this: sub foo ($p) { $p.f ?? $p !! dir($p)>>.&?BLOCK.Slip }; say foo($*CWD)
19:56 FROGGS hi timotimo
19:56 FROGGS user3: do you get what the last shown example does?
19:56 user3 FROGGS: i tried it, prints nothing
19:57 FROGGS it print a lot for me...
19:57 FROGGS prints*
19:57 FROGGS user3: I'm talking about the example with the foo subroutine
19:57 user3 oops it works now
19:58 * AlexDaniel whispers “Rakudo::Internals.DIR-RECURSE”
19:58 user3 but how to I clean lyfilter out .txt
19:58 FROGGS -> $p { } # <--- this is an anonymous sub btw, with a parameter $p
19:58 user3 cleanly
19:59 user3 * cleanly filter out .txt
19:59 user3 yes
19:59 Geth ¦ doc: 9a369c76c8 | (Moritz Lenz)++ | doc/Language/regexes.pod6
19:59 Geth ¦ doc: Explain s[...] = replacement form of substitution
19:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9a369c76c8
20:00 lucasb m: say < 1.foo 2.txt 3.bar 4.txt >.grep(*.ends-with('.txt'))
20:00 camelia rakudo-moar 385092: OUTPUT: «(2.txt 4.txt)␤»
20:01 DrForr_ timotimo: Thank you very much for the comment, doing tat shortly.
20:02 FROGGS this seems to work: sub foo ($p) { $p.f ?? $p !! dir($p)>>.&?BLOCK.Slip }; say foo($*CWD).grep(*.ends-with(".txt")
20:03 FROGGS does .&?BLOCK make it recurse?
20:04 dubi0us joined #perl6
20:04 user3 i've lots of name of the user who gave me this great code
20:04 user3 lol
20:04 user3 lost
20:04 user3 the name
20:04 FROGGS hehe
20:10 user3 moritz, i just noticed your suggestion. it works. thx
20:13 dubi0us joined #perl6
20:15 raschipi moritz: What he talks about in the end of the blogpost, a solution for discovery would something like mDNS, right? The problem with mDNS is that it doesn't work across subnets?
20:18 ugexe m: my $files = -> *@_ { my @d = @_.grep(*.d); grep *.defined, (&?BLOCK(@d.map(*.&dir)) if @d).Slip, @_.grep(*.f).Slip; }; say $files($*CWD).grep(*.extension eq "txt");
20:19 camelia rakudo-moar 385092: OUTPUT: «("/home/camelia/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/auto/share/dist/File-ShareDir/subdir/sample.txt".IO "/home/camelia/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/auto/share/dist/File-ShareDir/sample.txt".IO "/home/camelia/per…»
20:19 timotimo DrForr_: you're a tattoo artist?
20:19 user3 ugexe, i think you're the one who gave me this code
20:19 moritz raschipi: there are many approaches to service discovery
20:19 moritz raschipi: I don't know which one(s) the author tried
20:20 noganex joined #perl6
20:20 ugexe that could be written better but `... with @whatever` gives &?BLOCK the wrong block
20:20 ufobat i want to have a $object as a key of hash, i dont need to retreive the object anymore so its okay thats it is being stringified
20:20 ufobat i am just afraid that $obj.perl doesnt allway get the same result
20:20 moritz but I can really understand his point about the convenience about using a message broker for service discovery; we do that at $work too
20:20 ufobat order of a hash or something..
20:21 ugexe make your own .perl method?
20:21 ufobat in perl5 i would do refaddr() from Scalar::Util
20:21 ugexe i think WHICH is for that
20:22 moritz ufobat: you could use an object hash for that, no?
20:22 ufobat moritz, I dont know them :(
20:22 ufobat but i think .WHICH is faster?
20:23 dubi0us joined #perl6
20:23 ugexe you would implement .WHICH doing something like hashing all the key/values you want to normalize
20:23 ufobat just reading https://docs.perl6.org/type/Hash#index-entry-object_hash
20:24 El_Che raschipi: consul is also DNS based and not limited to a subnet
20:24 ufobat i think for my case the provied .WHICH is sufficient :) a different object instance shoud be a different key in the hash
20:25 raschipi DNS-SD too.
20:26 cpage__ joined #perl6
20:27 ufobat i think a object SetHash would be cool, but thats not possible, right?
20:27 moritz my: my %h{Any}; my $key = []; %h{ $key } = 42; say %h.keys[0].perl; # for ufobat
20:27 moritz m: my %h{Any}; my $key = []; %h{ $key } = 42; say %h.keys[0].perl; # for ufobat
20:28 camelia rakudo-moar 385092: OUTPUT: «[]␤»
20:29 dubi0us joined #perl6
20:30 ufobat thanks for the help :) i know what to do now :)
20:30 shadowpaste joined #perl6
20:35 travis-ci joined #perl6
20:35 travis-ci Doc build passed. Moritz Lenz 'Explain s[...] = replacement form of substitution'
20:35 travis-ci https://travis-ci.org/perl6/doc/builds/248920240 https://github.com/perl6/doc/compare/6372a29881fe...9a369c76c881
20:35 travis-ci left #perl6
20:44 awwaiid dear lazyweb: is there a regex replace that returns the value without modifying the var?
20:45 awwaiid ah, maybe .subst
20:46 user3 left #perl6
20:48 FROGGS r: my $a = 'abc'; say S/b/d/ given $a; say $a # awwaiid
20:48 camelia rakudo-{moar,jvm} 385092: OUTPUT: «adc␤abc␤»
20:48 awwaiid fancy
20:52 Cabanossi joined #perl6
20:57 mcmillhj joined #perl6
21:01 dubi0us joined #perl6
21:03 literal_ joined #perl6
21:10 cpage__ joined #perl6
21:12 mcmillhj joined #perl6
21:16 dubi0us joined #perl6
21:22 Cabanossi joined #perl6
21:23 TEttinger joined #perl6
21:24 epony joined #perl6
21:29 mcmillhj joined #perl6
21:43 mcmillhj joined #perl6
21:47 tbrowder joined #perl6
21:48 mcmillhj_ joined #perl6
22:01 AlexDaniel .tell moritz clog handles unicode rather poorly nowadays… ¦ appears as ¦ and I don't think this issue existed previously
22:01 yoleaux AlexDaniel: I'll pass your message to moritz.
22:05 dubi0us joined #perl6
22:20 dubi0us joined #perl6
22:29 mcmillhj joined #perl6
22:30 dubi0us joined #perl6
22:44 BenGoldberg joined #perl6
22:46 Geth ¦ doc: e2754690c9 | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod6
22:46 Geth ¦ doc: Some formatting adjustments
22:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e2754690c9
22:52 Cabanossi joined #perl6
23:22 Cabanossi joined #perl6
23:37 travis-ci joined #perl6
23:37 travis-ci Doc build errored. Jan-Olof Hendig 'Some formatting adjustments'
23:37 travis-ci https://travis-ci.org/perl6/doc/builds/248971385 https://github.com/perl6/doc/compare/9a369c76c881...e2754690c9ba
23:37 travis-ci left #perl6
23:52 Cabanossi joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo