Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-27

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:00 timotimo m: multi sub f($target, @outers) { "<apply>" ~ f($target, @outers[1..]) ~ "</apply>" }; multi sub f($target, @($a)) { "<apply>" ~ $a ~ $target ~ "</apply>" }; say f("yippie", <foo bar baz quux>);
00:00 camelia rakudo-moar cd9001: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3vKwgWX1d9�Please use ..* for indefinite range�at /tmp/3vKwgWX1d9:1�------> [32mrs) { "<apply>" ~ f($target, @outers[1..[33m�[31m]) ~ "</apply>" }; multi sub f($target, [0m�»
00:00 timotimo m: multi sub f($target, @outers) { "<apply>" ~ f($target, @outers[1..*]) ~ "</apply>" }; multi sub f($target, @($a)) { "<apply>" ~ $a ~ $target ~ "</apply>" }; say f("yippie", <foo bar baz quux>);
00:00 camelia rakudo-moar cd9001: OUTPUT«<apply><apply><apply><apply>quuxy​ippie</apply></apply></apply></apply>␤»
00:01 timotimo oh, i missed something
00:01 timotimo m: multi sub f($target, @outers) { "<apply>" ~ @outers[0] ~ f($target, @outers[1..*]) ~ "</apply>" }; multi sub f($target, @($a)) { "<apply>" ~ $a ~ $target ~ "</apply>" }; say f("yippie", <foo bar baz quux>);
00:01 camelia rakudo-moar cd9001: OUTPUT«<apply>foo<apply>bar<apply>baz<apply>​quuxyippie</apply></apply></apply></apply>␤»
00:01 adu its not a traditional FP combinator
00:01 timotimo this one's recursive, if you like that
00:02 adu ok
00:02 adu that's good
00:04 adu hanks timo
00:04 adu *thanks
00:05 raydiak timotimo++ # not completely misunderstanding the question like me :)
00:10 smls Why not just:
00:10 smls m: sub f($target, @outers) { [~] @outers.map("<apply>" ~ *), $target, ("</apply>" xx @outers) };   say f("foo", [1, 2, 3]);
00:10 camelia rakudo-moar cd9001: OUTPUT«<apply>1<apply>2<apply>​3foo</apply></apply></apply>␤»
00:24 timotimo yeah, that's much better
00:33 timotimo TimToady: replacing @!neighbours[$x;$y].any === Burning with .grep( Burning ) makes rc-forest-fire a bit faster; does that sound like an acceptable optimization?
00:33 raydiak m: sub foo ($x is copy, @a) { $x = "<apply>$_$x\</apply>" for @a.reverse; $x }; foo("x", <a b c>).say
00:33 camelia rakudo-moar cd9001: OUTPUT«<apply>a<apply>b<apply​>cx</apply></apply></apply>␤»
00:34 timotimo hm. i need to control for randomness
00:34 TimToady you mean in the benchmark?
00:35 timotimo yes
00:35 TimToady the purpose of the benchmark is to measure what's slow, not to cheat around it :)
00:35 timotimo haha! i can just use bench to run the benchmark multiple times!
00:36 timotimo well, i have no clue how to further optimize junctions for now
00:36 TimToady then, er, do it later... :)
00:37 timotimo i guess i had that coming :)
00:37 TimToady the best thing to do here is probably wait for the GLR
00:38 TimToady which may give you a better iterator for any to use
00:39 adu timotimo: sweet!
00:39 adu timotimo++
00:39 timotimo hm?
00:40 TimToady m: say any(1,2,3) == 2
00:40 camelia rakudo-moar cd9001: OUTPUT«any(False, True, False)␤»
00:40 timotimo TimToady: aye. i'm a bit annoyed by how often i reach a point where i go "well, better wait for the GLR to land for this one"
00:40 adu timotimo: smls's improvement
00:40 timotimo but why do i get a ++ for smls' work? :)
00:41 TimToady you'll note that an any with two False's in it has done some extra work it didn't really need to
00:41 adu generalized left-to-right right-most derivation?
00:42 adu smls++
00:42 adu timotimo: you write the first draft
00:47 * raydiak was wondering if multiple instances of the same object should collapse to one in a junction
00:48 timotimo it was also the worst draft :)
00:51 timotimo bench claims with .grep it's 32x per second and with any it's 22x
01:03 adu joined #perl6
01:06 rurban joined #perl6
01:13 raiph joined #perl6
01:15 Mouq joined #perl6
01:21 timotimo m: say "building the core setting generates { 9307097 / 1024 } kilobytes of jitted bytecode (that is { 9307097 / 1024 / 1024 } megabytes)"
01:21 camelia rakudo-moar cd9001: OUTPUT«building the core setting generates 9088.961914 kilobytes of jitted bytecode (that is 8.87593937 megabytes)␤»
01:22 timotimo m: "it's an average of { 9088.961914 / 1725 } kilobytes per frame"
01:22 camelia rakudo-moar cd9001: ( no output )
01:22 timotimo m: say "it's an average of { 9088.961914 / 1725 } kilobytes per frame"
01:22 camelia rakudo-moar cd9001: OUTPUT«it's an average of 5.2689634284 kilobytes per frame␤»
01:24 timotimo biggest frame is 115834 bytes big, smallest are 152 big
01:25 timotimo that huge frame comes from package_def
01:31 alexghacker joined #perl6
01:35 jimmy__ joined #perl6
01:41 jimmy__ .tell timotimo perl6 --profile -e 'my $n = 0; loop { $n = $n +1; if $n == 10000000 { last; } }'  also will be nice to inline infix:<+> and infix:<==>, change assign to bind and it also call infix:<==>, I don't know why...
01:41 yoleaux jimmy__: I'll pass your message to timotimo.
01:50 dayangkun joined #perl6
02:03 timotimo er, are you sure the + and == are not being inlined?
02:03 yoleaux 01:41Z <jimmy__> timotimo: perl6 --profile -e 'my $n = 0; loop { $n = $n +1; if $n == 10000000 { last; } }'  also will be nice to inline infix:<+> and infix:<==>, change assign to bind and it also call infix:<==>, I don't know why...
02:03 timotimo looking at the spesh output it seemed to be inlined, tbh
02:32 baest joined #perl6
02:35 JimmyZ timotimo: I'm not very sure, but routines TAB shows them have 10000000 Entries, maybe I'm wrong
02:36 JimmyZ and have 10000000 alloctions, I think esc will help it
02:40 adu *sigh*
02:40 JimmyZ why ;)
02:40 adu should I write my next blog post about why PHP sucks?
02:41 JimmyZ oh, there is already too much
02:42 JimmyZ adu: http://eev.ee/blog/2012/04/09​/php-a-fractal-of-bad-design/
02:45 adu JimmyZ: I just read it
02:45 JimmyZ A language without complains means nobody have ever use it, except the author :)
02:45 adu I'm just thinking, it people were somehow forced to rewrite wikipedia, wordpress, joomla, etc. I'm sure someone would surely pick perl6 as the implementation language for something
02:45 adu s/it/if/
02:45 JimmyZ m: if
02:45 camelia rakudo-moar cd9001: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JJTJswExhYâ�¤Undeclared routine:â�¤    if used at line 1â�¤â�¤Â»
02:45 JimmyZ m: sub if() {}; if
02:45 camelia rakudo-moar cd9001: ( no output )
02:46 adu I think one reason why PHP is so popular is that it has 50,000 builtins
02:47 adu or, if I don't write my next blog entry about PHP, then all the stupid people will be programming in PHP, and all the smart people will use perl6
02:48 JimmyZ well, PHP does have a well enough manual ;)
02:49 adu I've been revisiting my C parser lately
02:49 sunnavy joined #perl6
02:50 adu my first two attemps was with clang's API and Haskell's lanugage-c package, both failed
02:50 JimmyZ most people like stupid camera
02:50 adu but for some reason my perl6 implementation has been the most successful
02:50 adu camera?
02:50 JimmyZ yeah
02:51 adu what are you talking about?
02:51 JimmyZ I meant most people like stupid things :P
02:57 adu I think the world would be a better place without PHP
02:58 adu or maybe everyone would switch to VB, which would probably be worse
02:59 KCL_ joined #perl6
03:00 chenryn joined #perl6
03:01 JimmyZ since PHP is on the top of 10 popular lang, I think it's well enough to get the work done
03:01 JimmyZ :)
03:04 silug joined #perl6
03:09 raydiak kinda like burning fossil fuels is well enough to provide some obscenely huge % of the world's energy...even if it is killing us :)
03:18 timotimo JimmyZ: are you sure you're on the very latest moarvm master?
03:19 Mso150 joined #perl6
03:20 noganex joined #perl6
03:20 JimmyZ timotimo: yeah
03:20 timotimo VB has "on error resume next" which means far less crashes, which makes software much more stable
03:20 JimmyZ This is perl6 version 2014.11-34-gcd9001e built on MoarVM version 2014.11-52-gf94d036
03:21 timotimo you're right, there's allocations and the profiler doesn't show inlines for + and ==
03:23 JimmyZ and JIT-Compiled Frames show 19999985, which is pretty big
03:25 timotimo i ought to go to bed
03:25 timotimo feel free to work on this, though :)
03:26 JimmyZ good night
03:31 timotimo oh
03:31 raiph joined #perl6
03:31 timotimo if you look at the speshlog, you'll see that infix:<==> is indeed inlined
03:31 timotimo (it's block 21 in my case)
03:32 timotimo and it looks like infix:<+> is BB 19
03:33 timotimo it's probable that the inliner just straight up inlines the "profiler entered frame" and "profiler exited frame" along with the rest of the code and some flag needs to be updated to set the type of "frame enter" as "jit inlined"
03:33 timotimo o/
03:36 konsolebox joined #perl6
04:06 sjn_ joined #perl6
04:07 vendethiel- joined #perl6
04:07 kshannon_ joined #perl6
04:09 prime joined #perl6
04:09 nine joined #perl6
04:10 hugme joined #perl6
04:10 kaare_ joined #perl6
04:11 nine joined #perl6
04:11 rmgk joined #perl6
04:19 cognominal joined #perl6
04:24 anaeem1 joined #perl6
04:26 anaeem1 joined #perl6
04:58 prime joined #perl6
05:00 kaleem joined #perl6
05:17 chenryn joined #perl6
05:21 PZt joined #perl6
05:34 kaare_ joined #perl6
05:37 silug joined #perl6
05:58 telex joined #perl6
06:01 JimmyZ joined #perl6
06:08 chenryn joined #perl6
06:41 kurahaupo joined #perl6
06:41 alexghacker joined #perl6
06:45 masak mornings, #perl6
06:49 TimToady o/
07:02 JimmyZ_ \o
07:06 gfldex joined #perl6
07:07 kaleem joined #perl6
07:46 jluis joined #perl6
07:59 FROGGS joined #perl6
08:12 jnthn Note that inlined entries to a routien still count as entries
08:12 jnthn But it should say they were inlined too
08:12 jnthn (e.g. it counts the separately)
08:16 darutoko joined #perl6
08:20 moritz \o
08:21 zakharyas joined #perl6
08:21 masak o/, moritz
08:24 jnthn timotimo: See https://github.com/MoarVM/MoarVM/b​lob/master/src/spesh/inline.c#L695
08:31 ptc_p6 joined #perl6
08:33 rurban joined #perl6
08:44 Ugator joined #perl6
08:46 virtualsue joined #perl6
08:54 bjz joined #perl6
08:55 [Sno] joined #perl6
08:57 lizmat joined #perl6
09:02 timotimo jnthn: the profenter happens before any phi nodes?
09:02 Akagi201 joined #perl6
09:03 timotimo or do inlines never end up beginning with phi nodes?
09:04 lizmat good *, #perl6 from the Patch -p2 Hackathon in Lyon
09:05 moritz \o lizmat, have fun stripping two slashes :-)
09:06 * lizmat assumes she has to backlog ?
09:06 moritz lizmat: nope :-)
09:06 anaeem___ joined #perl6
09:06 moritz lizmat: patch -p1 strips one directory and slash from the path to find the file to patch
09:06 lizmat -p2  I guess
09:06 moritz yes
09:06 lizmat aha
09:06 lizmat ok, gotcha
09:07 lizmat fwiw, this is the 3rd Patch Hackathon, hence -p2  :-)
09:07 anaeem___ joined #perl6
09:07 moritz the know that counting starts at 0 \o/
09:10 moritz *they
09:13 lizmat_ joined #perl6
09:13 lizmat_ (local wifi not reliable, switched to 3G backup)
09:14 sjn lizmat_: mine's a bit spotty, but not too horrible
09:14 lizmat_ well, I'm not going to be in the way anymore...  :-)
09:17 lizmat joined #perl6
09:19 raydiak m: say ~dir '/'
09:19 camelia rakudo-moar cd9001: OUTPUT«//opt //sys //lost+found //success //run //sbin //lib //home //backup //bin //.readahead //usr //srv //etc //media //lib64 //boot //selinux //tmp //mnt //dev //var //root //proc␤»
09:20 raydiak ^ "//"?
09:20 lizmat ah... intriguing
09:20 * lizmat checks
09:21 JimmyZ_ m: say dir '/'
09:21 camelia rakudo-moar cd9001: OUTPUT«"//opt".IO "//sys".IO "//lost+found".IO "//success".IO "//run".IO "//sbin".IO "//lib".IO "//home".IO "//backup".IO "//bin".IO "//.readahead".IO "//usr".IO "//srv".IO "//etc".IO "//media".IO "//lib64".IO "//boot".IO "//selinux".IO "//tmp".IO "//mnt".IO "//d…»
09:21 raydiak also..."dir '/'" in restricted setting?
09:21 JimmyZ_ m: say dir '/tmp'
09:21 camelia rakudo-moar cd9001: OUTPUT«"/tmp/snagnTkxj3".IO "/tmp/DbuAo6RGPk".IO "/tmp/JFc_J7THcQ".IO "/tmp/DFYMfbFSny".IO "/tmp/m376NsGWCC".IO "/tmp/uBy0gsXhli".IO "/tmp/PKK8IPgdEf".IO "/tmp/KeRJUfYHwI".IO "/tmp/aWxLmWIQfn".IO "/tmp/9SrcxE6K07".IO "/tmp/t_7DrhIter".IO "/tmp/S_zGqXwlar".IO "/tm…»
09:21 salv0 joined #perl6
09:23 lizmat moritz: seems I do need to strip two slashes
09:24 lizmat :-(
09:24 lizmat checking what the newio branch does
09:24 lizmat raydiak: could you rakudobug this ?
09:25 raydiak lizmat: sure, on it
09:25 lizmat hmmm..... newio has the same issue  :-(
09:26 timotimo m: say dir " "
09:26 camelia rakudo-moar cd9001: OUTPUT«Failed to get the directory contents of '/home/camelia/ ': chdir failed: Unknown system error␤  in method gist at src/gen/m-CORE.setting:13776␤  in sub say at src/gen/m-CORE.setting:16516␤  in block <unit> at /tmp/9aWM8Xgo39:1␤␤»
09:26 timotimo m: say dir ""
09:26 camelia rakudo-moar cd9001: OUTPUT«"/home/camelia/rakudo-inst-2".IO "/home/camelia/evalbot".IO "/home/camelia/.viminfo".IO "/home/camelia/rakudo-inst-1".IO "/home/camelia/.bashrc".IO "/home/camelia/.ssh".IO "/home/camelia/std".IO "/home/camelia/rakudo-star-2014.09.tar.gz".IO "/home/camelia/…»
09:26 huf that's a bit odd...
09:31 raydiak #123308
09:31 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123308
09:31 huf link also has two slashes :D
09:32 raydiak hah true
09:32 Mso150 joined #perl6
09:34 lizmat joined #perl6
09:35 raydiak lizmat: in case your spotty connection caused you to miss it: #123308
09:35 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123308
09:37 JimmyZ_ timotimo: I saw a spesh log, some BBs only has a return, but has a lot of phi.
09:37 JimmyZ_ IIRC
09:38 JimmyZ_ and perl6 tools/graph_spesh.p6 test.log  > test.svg doesn't work :(
09:39 Ven joined #perl6
09:39 Ven o/, #perl6
09:40 raydiak \o Ven
09:46 lizmat joined #perl6
09:47 jnthn timotimo: Yeah, think it should...
09:50 lizmat p: say dir " "
09:50 camelia rakudo-parrot cd9001: OUTPUT«Failed to get the directory contents of '/home/camelia/ ': readdir failed: No such file or directory␤  in method gist at gen/parrot/CORE.setting:13715␤  in method gist at gen/parrot/CORE.setting:1150␤  in sub say at gen/parrot/CORE.setting:16424␤…»
09:50 jnthn timotimo: Typically the first BB starts with parameter handling, and you'd not end up with a branch into that..
09:50 lizmat j: say dir " "
09:50 camelia rakudo-jvm cd9001: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
09:51 lizmat (different code paths for different backend  :-(  )
09:51 jnthn If you think it may be happening, easy to add a check into the inline code, then build stuff and see if it's hit.
09:52 dakkar joined #perl6
09:58 raydiak \o good night #perl6
09:58 kjs_ joined #perl6
10:06 lizmat raydiak o/
10:11 lizmat hmmm..... t/spec/S17-procasync.kill.t is reliably hanging for me now   :-(
10:12 lizmat ah no, it just got unbelievably slow
10:13 lizmat ah, I realize now: many more signals to check than before   ....
10:13 lizmat and all timing out because they fail  :-(
10:14 dalek rakudo/nom: 456d8f0 | (Elizabeth Mattijsen)++ | t/spectest.data:
10:14 dalek rakudo/nom: Remove t/spec/S17-procasync/kill.t for now  :-(
10:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/456d8f0d48
10:22 woolfy joined #perl6
10:25 dalek rakudo/nom: 482cc32 | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm:
10:25 dalek rakudo/nom: Fix for #123308, raydiak++ for spotting
10:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/482cc32e89
10:25 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123308
10:28 pecastro joined #perl6
10:30 dalek rakudo/newio: cd9001e | (Timo Paulssen)++ | src/Perl6/Actions.nqp:
10:30 dalek rakudo/newio: loop { } doesn't need to inspect lexical "True" each iteration
10:30 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/cd9001efc8
10:30 dalek rakudo/newio: 456d8f0 | (Elizabeth Mattijsen)++ | t/spectest.data:
10:30 dalek rakudo/newio: Remove t/spec/S17-procasync/kill.t for now  :-(
10:30 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/456d8f0d48
10:30 dalek rakudo/newio: 482cc32 | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm:
10:30 dalek rakudo/newio: Fix for #123308, raydiak++ for spotting
10:30 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/482cc32e89
10:30 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123308
10:30 dalek rakudo/newio: 6c09d1e | (Elizabeth Mattijsen)++ | / (3 files):
10:30 dalek rakudo/newio: Merge branch 'nom' into newio
10:30 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6c09d1e8cf
10:33 Ven Erm, do we have some kind of WSDL client?
10:33 * Ven would very much rather use p6...
10:34 moritz Ven: my experience with WSDL and SOAP is that most libraries suck so much that you want to select your language by library, not by language preference
10:34 moritz Ven: and no, I don't think we have WSDL stuff for p6 yet
10:34 Ven moritz: and to that you can add the fact that people suck at making nice external APIs.
10:35 Ven "hey, you're always sending us an array of values, but we'll give you a different result type depending if you sent us 0, 1 or more IDs to query"
10:35 moritz What's an array? it's all XML! :-)
10:35 Ven <foo></foo><foo></foo> is an array of foo. But yeah.
10:35 Alina-malina joined #perl6
10:36 Ven this is why we can't have nice things.
10:36 moritz and how do you make an XML array of one element?
10:36 * moritz loves JSON
10:37 Ven you just *know* you want an array.
10:37 Ven Describe your effin' protocol and stick to it.
10:40 moritz sounds like work :-)
10:41 FROGGS sounds like $work
10:41 huf you can always stuff json into xml :D
10:43 Ven right, it's $work. and it's terrible
10:43 Ven why do I have to feel so miserable every single time I want to transfer data over networks
10:44 tadzik sounds like your tools make it painful
10:44 * tadzik reminds #perl6 about https://github.com/perl6/mu/blob/ma​ster/misc/perl6advent-2014/schedule
10:45 lucas_ joined #perl6
10:46 moritz Ven: fwiw we're now experimenting with rabbitmq at work. Currently it doesn't feel very painful; will see how it pans out
10:47 lucas_ lizmat: Hi. What about rootdir instead of dir-sep? I know that in the end it means the same thing...
10:48 moritz do multi-volume path schemes have a root dir?
10:48 lizmat lucas_: that was just a quick fix...  that part of the code I hope to have obsoleted soon
10:48 lizmat moritz: what do you mean with multi-volume path schemes ?
10:49 moritz lizmat: windows for example, where paths start with a volume
10:49 Ven moritz: right, rabbitmq is pretty okay. The issue is – I don't have a choice here.
10:49 lizmat C:/foo
10:49 lizmat moritz:  is what you mean ?
10:49 moritz lizmat: yes
10:49 lizmat should have that covered
10:52 * FROGGS guesses that the use of mro::invalidate_all_method_caches() points to a bad design...
10:53 erkan joined #perl6
10:53 erkan joined #perl6
11:01 * Ven reads the p6-one-liners PR and *g*s
11:02 denis_boyun_ joined #perl6
11:32 bjz joined #perl6
11:39 anaeem1 joined #perl6
11:46 rindolf joined #perl6
11:52 [Sno]_ joined #perl6
11:52 anaeem1 joined #perl6
11:55 anaeem1 joined #perl6
11:56 fhelmberger joined #perl6
12:02 Alina-malina joined #perl6
12:03 pmurias joined #perl6
12:03 pmurias arnsholt: ping
12:07 lucas_ Do you people like wikis or are averse to the idea? What is your opinion about having a MediaWiki instance installed on wiki.perl6.org? Do you think it would get abandoned and spam-filled? I know about the Socialtext wiki, and I remember existing a git-based wiki also. There's even a Perl 6 wiki on Wikia. But it's not the same experience of having a... MediaWiki. It could get used for project management, sorting out ideas, etc.
12:07 tadzik hmm, we had a wiki somewhere
12:08 tadzik not sure what happened to it
12:08 jnthn Wikis have always tended to fall into disrepair
12:09 lucas_ jnthn: I understand this is a concern...
12:09 jnthn For project management things, it's about the folks being managed.
12:10 jnthn And markdown files or similar kept in the Git repo alongside the project have tended to work out better.
12:11 moritz lucas_: I agree with jnthn. We had a gitit wiki on wiki.perl6.org, it became abandonded and technical debt to run
12:13 smls joined #perl6
12:14 dalek rakudo/nom: 1e4fe4a | (Elizabeth Mattijsen)++ | src/core/Failure.pm:
12:14 dalek rakudo/nom: Simplify Failure creation
12:14 dalek rakudo/nom:
12:14 dalek rakudo/nom: I assume the original code is very old and predates any implicit BUILD
12:14 dalek rakudo/nom: functionality.
12:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e4fe4ab76
12:14 lizmat moritz: any comments on ^^^ ?
12:15 jnthn Yeah. It's not even that I dislike wikis...I have one to keep personal planning etc in and other such things... But to be useful they need a purpose and target audience who actually want to use it to get something done. And we've not found a niche so far where a wiki filled that.
12:15 moritz lizmat: looks sane
12:16 smls On my system, «perl6 -e '[*] 1..10000'» takes 0.5 seconds, and «perl6 -e 'say [*] 1..10000'» takes 2.7 seconds.
12:16 smls y u so slow, `say`?
12:16 jnthn I/O bound? :)
12:16 jnthn lizmat: It'll just be slower, that's all.
12:17 jnthn lizmat: A lot of our custom BUILD things are hot-path.
12:17 jnthn But if y ou're greating a gazillion failures, well, that's probably a bit of a design failure... :P
12:17 lizmat well, that was my thought also
12:17 moritz smls: maybe the [*] in sink context is optimized out?
12:18 lizmat warnings, are they failures ?
12:18 moritz nope
12:18 smls moritz: I don't think so... it's still faster/slower for smaller/bigger numbers...
12:19 moritz smls: maybe the stringification of the result?
12:19 Timbus its the .gist
12:19 moritz m: say $before = now; [*] 1..10000; say now - $before
12:19 camelia rakudo-moar 482cc3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NeHF3xniZrâ�¤Variable '$before' is not declaredâ�¤at /tmp/NeHF3xniZr:1â�¤------> [32msay $before[33mâ��[31m = now; [*] 1..10000; say now - $before[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
12:19 moritz m: my $before = now; [*] 1..10000; say now - $before
12:19 camelia rakudo-moar 482cc3: OUTPUT«0.14780099␤»
12:19 moritz m: my $before = now; ~[*] 1..10000; say now - $before
12:19 camelia rakudo-moar 482cc3: OUTPUT«WARNINGS:␤Useless use of "~" in expression "~[*] 1..10000" in sink context (line 1)␤1.83699402␤»
12:19 moritz m: my $before = now; ([*] 1..10000).gist; say now - $before
12:20 camelia rakudo-moar 482cc3: OUTPUT«1.8439231␤»
12:20 Timbus neat warning
12:20 moritz aye
12:20 moritz thanks :-)
12:21 jnthn Hm, so it's not say so much as the stringification
12:21 jnthn I wonder what makes that slow...
12:21 smls Ok to be fair, it looks like that number has 35661 digits... :P
12:22 moritz m: say ([*] 1..10000).chars
12:22 camelia rakudo-moar 482cc3: OUTPUT«35660␤»
12:22 moritz p: my $before = now; ([*] 1..10000).gist; say now - $before
12:22 camelia rakudo-parrot 482cc3: OUTPUT«2.0447831␤»
12:22 jnthn Sure, but I wonder if it's spending the time in libtommath producing the chars, or in something else that is just overhead.
12:22 FROGGS p: my $before = now; ([*] 1..10000).Str; say now - $before
12:22 camelia rakudo-parrot 482cc3: OUTPUT«2.0437427␤»
12:22 dalek rakudo/newio: 1e4fe4a | (Elizabeth Mattijsen)++ | src/core/Failure.pm:
12:22 dalek rakudo/newio: Simplify Failure creation
12:22 dalek rakudo/newio:
12:22 dalek rakudo/newio: I assume the original code is very old and predates any implicit BUILD
12:22 dalek rakudo/newio: functionality.
12:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/1e4fe4ab76
12:23 dalek rakudo/newio: 942ffba | (Elizabeth Mattijsen)++ | src/core/Failure.pm:
12:23 dalek rakudo/newio: Merge branch 'nom' into newio
12:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/942ffba1d9
12:23 FROGGS m: my $before = now; ([*] 1..10000).Str; say now - $before
12:23 camelia rakudo-moar 482cc3: OUTPUT«1.8593922␤»
12:23 jnthn m: my $before = now; (INIT [*] 1..10000).Str; say now - $before
12:23 camelia rakudo-moar 482cc3: OUTPUT«1.64522877␤»
12:23 KCL joined #perl6
12:24 SteppenII joined #perl6
12:24 jnthn m: my $before = now; nqp::tostr_I(INIT [*] 1..10000); say now - $before
12:24 camelia rakudo-moar 482cc3: OUTPUT«1.6463615␤»
12:24 jnthn yowser :)
12:24 jnthn Well, no silly Rakudo overhead to blame then.
12:25 jnthn I need a C level profile to see deeper, I think.
12:25 jnthn And I'm on $teaching-center machine at the moment, so no tools for that :)
12:25 jnthn Well, or tools but no Rakudo build :)
12:25 FROGGS so you need to C through the surface of the C.... I C
12:26 FROGGS and I have a quite pressing project to finish at $work... so I can't be that active these days :o(
12:27 colomon smoker run hung on 05_laggyrequest.t
12:28 JimmyZ joined #perl6
12:28 lizmat joined #perl6
12:32 moritz m: my $i = [*] 1..10000; say log($i) / log(2)
12:32 camelia rakudo-moar 482cc3: OUTPUT«Inf␤»
12:33 moritz m: my $i = [*] 1..10000; $i.Str.chars / log(2) * log(10)
12:33 camelia rakudo-moar 482cc3: ( no output )
12:33 moritz m: my $i = [*] 1..10000; say $i.Str.chars / log(2) * log(10)
12:33 camelia rakudo-moar 482cc3: OUTPUT«118459.955863683␤»
12:36 jnthn colomon: hah, laggy indeed...
12:39 woolfy joined #perl6
12:45 arnsholt pmurias++ # Snake stuff
12:45 arnsholt jnthn: What're the cases where you need nqp::takeclosure?
12:48 SteppenII left #perl6
13:00 jnthn arnsholt: When you need to manually control taking closure clones
13:01 jnthn arnsholt: Taht is, making a copy of a code-ref that closes over teh curent context
13:01 prime joined #perl6
13:01 jnthn arnsholt: But if you are using the blocktypes declaration and immediate, code-gen inserts things for you pretty neatly
13:01 jnthn So it's only if you're using immediatestatic/declarationstatic that you need to manually manage it.
13:03 dalek rakudo/newio: 8bbcb2f | (Elizabeth Mattijsen)++ | src/core/IO.pm:
13:03 dalek rakudo/newio: Fix dir "/" (for new code)
13:03 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8bbcb2f1ac
13:03 arnsholt Ah, right. I only have immediate and declaration blocks, so I should be good then. Cheers!
13:07 torbjorn joined #perl6
13:10 lizmat FROGGS: am I correct in seeing that PIO doesn't have an accessor for nqp::setinputlinesep ?
13:11 lizmat there is no PIO.inputlinesep?
13:11 lizmat (like there appears to be a PIO.encoding ?)
13:11 pmurias arnsholt: having print would be great for writing tests that can be run both on snake and python3
13:16 FROGGS lizmat: I'm not sure... but you should be able to see what nqp::setinputlinesep does in nqp/srv/vm/parrot/...Ops
13:17 FROGGS lizmat: maybe it maps to PIO.something
13:20 jnthn arnsholt: Yeah, trust it until it busts :)
13:20 lizmat FROGGS: not just talking about parrot
13:20 lizmat I'll just keep it as an attribute in P6 space for now
13:20 lizmat (like it is now)
13:21 arnsholt pmurias: Yeah, that's percolating to the top of my queue now, getting a setting library started
13:21 dalek snake: c3ba195 | (Pawel Murias)++ | / (3 files):
13:21 dalek snake: Support defining functions with zero parameters.
13:21 dalek snake:
13:21 dalek snake: Add a simple test for that.
13:21 dalek snake: review: https://github.com/arnshol​t/snake/commit/c3ba19596f
13:22 arnsholt Also, that commit you just pushed =D
13:22 arnsholt pmurias++
13:24 masak arnsholt: I'm surprised you extend Python's grammar just to be able to do `nqp::print(a)`. why not just `nqp.print(a)`?
13:25 arnsholt Specifically because it's invalid syntax, actually
13:26 gtodd joined #perl6
13:27 arnsholt An object nqp is probably not likely, but I wanted to mark it as clearly non-standard Python
13:29 guru joined #perl6
13:30 rindolf joined #perl6
13:32 virtualsue_ joined #perl6
13:33 pmurias masak: and nqp.print(a) could conflict with a nqp object
13:33 torbjorn how do you match a literal # in a token in a grammar?
13:33 arnsholt '#'
13:34 torbjorn ah, thanks
13:34 arnsholt \# should work too I think, but I prefer quoting
13:34 torbjorn \# doesnt seem to work
13:35 masak arnsholt, pmurias: I guess what I'm saying is why the non-standard syntax *for something that already has syntax support in Python* (package lookup) was felt to be necessary. to me, it feels like a nonstandard extension made lightly.
13:36 masak in NQP, the syntax is not special.
13:36 masak nor in Perl 6.
13:36 arnsholt That's true, I guess. But when I implemented this, my parser didn't even know about objects
13:40 masak it would be a bit like having the syntax be `nqp->print(a)` in Perl 6 code :)
13:41 lizmat Q: would it make sense to consider STDIN/STDOUT/STDERR pipes?
13:42 masak lizmat: no, I don't think so. because pipes are defined in terms of those.
13:42 masak lizmat: STDIN/STDOUT/STDERR are what Unix pipes use to connect to each other.
13:43 lizmat let me rephrase the question:
13:43 masak :)
13:43 lizmat if we would have an IO::Pipe object, would STDIN/STDOUT/STDERR be an IO::Pipe or an IO::Handle ?
13:43 arnsholt masak: I dunno. It'll be magic under the hood either way, and I do think I want it to be apparent that it is magical
13:44 arnsholt (Magical in the sense that the symbols aren't looked up via a package or object)
13:44 masak arnsholt: it's fine, we can agree to disagree on this. to me it's more elegant to use a language's own constructs to express something if that construct is sufficient.
13:45 masak lizmat: what else would be an IO::Pipe object?
13:45 lizmat what pipe() returns
13:46 lizmat if you want to be deprecatable: what open( :p ... ) returns
13:46 * masak `man pipe`
13:46 lizmat I think they share the same functionality
13:47 * masak `perldoc -f pipe`
13:49 nine What differentiates an IO::Pipe from any other handle?
13:49 masak way I read those pages, a pipe has two ends, each of which is a filehandle.
13:50 masak and in my view, $*IN and $*OUT are filehandles, not pipes.
13:50 nine masak: that's exactly what a pipe is
13:50 masak so I would definitely have $*IN/$*OUT as IO::Handle.
13:50 lizmat nine: well, I don't think pipes are seekable
13:51 * Mouq wishes a happy Thanksgiving to other Americans in #perl6
13:51 nine lizmat: that's true for many handles, including file handles that for example point to special block devices
13:52 lizmat nine: good point
13:55 Alula joined #perl6
13:56 masak m: say ""
13:56 camelia rakudo-moar 1e4fe4: OUTPUT«␤»
13:56 masak m: sub MAIN():␤say "OH HAI"
13:56 camelia rakudo-moar 1e4fe4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/x4BTSn_BcWâ�¤Missing blockâ�¤at /tmp/x4BTSn_BcW:1â�¤------> [32msub MAIN():[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        colon pairâ�¤Â»
13:56 masak m: sub MAIN();␤say "OH HAI"
13:56 camelia rakudo-moar 1e4fe4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/A5naXHrUhHâ�¤Missing blockâ�¤at /tmp/A5naXHrUhH:1â�¤------> [32msub MAIN()[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefi…»
13:57 carlin accessing a perl6 cgi script is putting "use of uninitialized value %ENV of type Any in string contenxt in any  at sec/gen/m-ModuleLoader.nqp:363" in the webserver error log
13:57 * masak submits NYI rakudobug
13:57 Mouq masak: What's that supposed to do?
13:58 masak Mouq: whole-file MAIN only sub.
13:58 Mouq Ooo
13:58 masak S06:3408
13:58 synopsebot Link: http://perlcabal.org/syn/S06.html#line_3408
13:59 Mouq Could be useful for one-liners too...
14:01 timotimo how do you pass already-opened file descriptors to a child process in perl5?
14:01 timotimo we don't have that feature in perl6 yet, i believe
14:01 timotimo also, creating an IO handle from an already opened file descriptor is missing
14:02 torbjorn im writing a grammar to parse this text: http://fpaste.scsys.co.uk/447383 # ive written this: http://fpaste.scsys.co.uk/447385 # for some reason i can't get ^^ .+ \n to match a random line
14:03 FROGGS timotimo: OpenSSL would also make use of passing file descriptors to it...
14:03 torbjorn also judging from Grammar::Tracer it only finds the first card
14:03 oetiker joined #perl6
14:03 FROGGS timotimo: so it would be awesome to retrieve the fd from an IO::Socket...
14:05 masak re #117161, I think we could just trigger an error message if the number has more than 5 digits. and then we can revisit that decision once someone comes to us *complaining* about their *legitimate* use of a million numbered capture groups.
14:05 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=117161
14:05 masak ;)
14:05 masak I know we don't do arbitrary limits, but... come on.
14:06 masak at least do a million named captures.
14:07 carlin when rakudo gives a warning about something in generated nqp are the linenumbers usually accurate?
14:07 dalek features: 4ccfddd | Matt++ | features.json:
14:07 dalek features: Matching streams link to spec
14:07 dalek features:
14:07 dalek features: I wondered what "Matching streams" meant and found it in the spec
14:07 dalek features: review: https://github.com/perl6/f​eatures/commit/4ccfdddab2
14:08 smls pmichaud's blog post last month said that the GLR roadmap was, to complete most of it by Thanksgiving.
14:08 smls Any update? Was it postponed?
14:08 Ulti erk who gave me commit :S though that is probably harmless enough
14:10 FROGGS carlin: we used to have an off-by-one, but nowadays it should be correct
14:10 timotimo torbjorn: did you know that . also matches newlines in perl6 regexes?
14:11 FROGGS carlin: though, some numbers of the backtrace are instructions, not lines
14:12 lizmat smls: pmichaud has stated he would work on it this week
14:12 timotimo torbjorn: and "token" implies "no backtracking", so the greedy .+ will end up swallowing all stuff until the end and then might not find a \n
14:12 FROGGS torbjorn: you can try /\N+ \n/ for example
14:12 timotimo i suggest first replacing the "token" declaratios with "regex" and seeing what it behaves like then
14:12 torbjorn ah i see how that would change things
14:13 prime joined #perl6
14:13 JimmyZ_ timotimo: http://irclog.perlgeek.de/​perl6/2014-11-27#i_9728011  # in case you miss it :)
14:13 JimmyZ_ it use nqp code as perl 6 module, look like
14:14 timotimo JimmyZ_: you have to spesh_log.p6 excerpt | dot -Tsvg > foobar.svg
14:14 JimmyZ_ oh, so what does graph_spesh.p6 do?
14:14 timotimo it turns a piece of spesh log into graphviz' dot language
14:15 JimmyZ_ where is spesh_log.p6?
14:16 timotimo in moarvm/tools
14:16 timotimo sorry, spesh_log.p6 was a type
14:16 timotimo typo
14:16 timotimo i meant graph_spesh
14:16 timotimo i suppose it ought to get a MAIN and usage as well as helpful comments
14:17 masak are we optimizing away routine-ending `return`s yet in Rakudo?
14:17 colomon now /07_chunkedrequestecho.t hung
14:18 JimmyZ_ timotimo: but `spesh_log.p6 excerpt` outputs errors :(
14:18 timotimo yeah. like "register blah blah has no writer!"?
14:19 JimmyZ_ it said it can't find MAST::Ops ..
14:19 timotimo oh, yeah
14:19 timotimo you may need to run Configure.pl again
14:19 timotimo er ... actually it's update_oplist or what it's called
14:19 JimmyZ_ yeah, I ran it
14:20 timotimo update_ops.p6
14:20 chenryn joined #perl6
14:21 sorear joined #perl6
14:21 carlin what's the easiest way to print a string to stderr in nqp?
14:22 JimmyZ_ but Mast::Ops is a nqp module?
14:23 timotimo JimmyZ_: it's a perl6 module that gets created in tools/lib
14:23 timotimo i found it very hard to get at the symbols in the actual nqp module MASTOps
14:24 timotimo so i decided it'd be easier to just generate a perl6 module in addition to all the other files from update_ops.p6
14:25 JimmyZ_ so I need to run update_ops.p6 manually  before I run graph_spesh.p6
14:25 timotimo yes, but only once ever
14:25 JimmyZ_ ok
14:26 timotimo and if you have a fresh checkout of moarvm, i think it'll be done for you
14:26 JimmyZ_ I does have a lastest moarvm
14:27 carlin ah, getstderr and sayfh worked
14:27 timotimo "fresh checkout" means the oplist.txt exists, but not the files generated from it
14:27 timotimo so the makefile would call update_ops for you ... i think?
14:28 timotimo actually, that makes no sense
14:28 colomon guessing the hangs were either Coro::Simple or HTTP::Server::Async (both new fails today)
14:28 timotimo since update_ops.p6 is a perl6 script
14:28 JimmyZ_ oh, so I didn't have perl6 in tha PATH
14:28 JimmyZ_ *the
14:30 JimmyZ_ .\install\bin\perl6.bat tools\update_ops.p6
14:30 Mouq Oh, lizmat, did you see http://irclog.perlgeek.de/​perl6/2014-11-26#i_9721007 ?
14:30 JimmyZ_ use of uninitialized value of type Any in string context  in any !cursor_init at gen\moar\stage2\QRegex.nqp:678
14:31 lizmat Mouq: missed that
14:31 timotimo should that be slurp-rest?
14:32 lizmat will look at it now
14:33 Mouq lizmat++
14:33 * Mouq &
14:36 JimmyZ_ I think it is missing unbox_s in gen\moar\stage2\QRegex.nqp:678?
14:36 chenryn joined #perl6
14:44 kaare_ joined #perl6
14:45 JimmyZ_ looks like not :(
14:52 [Sno]_ joined #perl6
15:00 telex joined #perl6
15:04 Mouq joined #perl6
15:04 virtualsue_ joined #perl6
15:16 chenryn joined #perl6
15:26 chenryn joined #perl6
15:31 pecastro joined #perl6
15:35 rindolf joined #perl6
15:38 lizmat joined #perl6
15:39 dalek rakudo/nom: 5823369 | (Elizabeth Mattijsen)++ | src/core/IO/ArgFiles.pm:
15:39 dalek rakudo/nom: Fix deprecation warnings
15:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/582336997f
15:39 dalek rakudo/nom: 70df096 | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
15:39 dalek rakudo/nom: Fix "slurp", spotted by Mouq++
15:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/70df096d6b
15:39 lizmat Mouq: ^^^
15:39 jnthn .win 11
15:39 jnthn oops :)
15:40 FROGGS wow, jnthn++'s secret project is Win11!!
15:40 ugexe i've got a fork of panda that will run a second test on a module 'without' blib *if* the tests fail 'with' blib. this means you can create a list of modules that pass their tests but have compilation problems. should this data be sent with reporter, and if so should it just be like $bone.test-passed-precomp = True?
15:41 jnthn FROGGS: Shhhhh!
15:41 FROGGS :P
15:41 jnthn Or I'll need a new secret project for FOSDEM!
15:41 jnthn :P
15:42 FROGGS *g*
15:42 colomon lizmat++
15:44 dalek rakudo/newio: 73b2124 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
15:44 dalek rakudo/newio: Adapted merge
15:44 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/73b2124a8c
15:45 dalek roast: 3c44a25 | (Elizabeth Mattijsen)++ | S32-io/slurp.t:
15:45 dalek roast: Fix one deprecation warning
15:45 dalek roast: review: https://github.com/perl6/roast/commit/3c44a25527
15:50 smls lizmat: I remember a few months ago, you were trying to come up with a good way to re-use the same `stat` system call for multiple file test operations. What system did you end up designing/implementing?
15:50 pecastro joined #perl6
15:50 lizmat none...
15:51 lizmat the stat buffer is not available to Perl6  or nqp at the moment (afaik)
15:51 alexghacker joined #perl6
15:52 smls Did you consider adding a (IO, Mu) overload for ~~ that caches a `stat`, then dispatches to normal ~~, and then invalidates the cache?
15:53 smls That would allow things like  «"foo".IO ~~ :r & :w» to use the same `stat`, since Mu would take the junction as one thing, right?
15:55 smls It might be slightly too magical for some people's tastes, but I think "a single ~~ on an IO reuses the same stat" would be a more contained & predictable rule than "file tests within n milliseconds of each other use the same stat", which is just a race condition waiting to happen.
15:56 lizmat smls: I added the .rw and .rwx methods instead
15:57 lizmat but even then they don't share the same stat buffer (well, not yet anyway)
15:58 rurban I'm implementing now the qrpa optimizations into parrot rpa proper. so that qrpa can be removed. and sorting parent PMC (from threads) will also work better.
16:06 pecastro joined #perl6
16:09 [Sno]_ joined #perl6
16:10 kaleem joined #perl6
16:11 dalek rakudo/nom: 2b2857d | (Elizabeth Mattijsen)++ | src/core/IO.pm:
16:11 dalek rakudo/nom: We don't need no Junctions  :-)
16:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2b2857de74
16:14 [Sno]_ joined #perl6
16:24 TimToady at the precaffeine moment, I'm thinking an IO should just stat once implicitly, then never again; subsequent stats would be done with a .stat mutator or so that just returns the same IO with a new statbuffer
16:24 TimToady which you could use explicitly the first time too, if you're nervous
16:25 TimToady this assumes that most uses of a given statbuf are one-shot
16:26 * TimToady is not sure how to work lstat into the picture though
16:26 * TimToady tries caffeine
16:42 gfldex joined #perl6
16:42 lizmat TimToady: I would be in favour of that, but I don't see a way to make this work with the current state of nqp ops
16:44 TimToady you can't call the POSIX library with nqp? :)
16:44 TimToady not everything has to be an nqp op...
16:46 lizmat I'll leave that discussion up to you and jnthn   :-)
16:56 lizmat timotimo might know this:
16:57 lizmat if I pass a uncontainered nqp object from nqp::open e.g
16:57 lizmat as a named parameter to a sub/method
16:57 lizmat is there something special I should do?
16:57 lizmat seems like I need to decont it on the receiving end
16:58 lizmat (as passing it will automatically put a container around it, no?)
16:59 anaeem1_ joined #perl6
17:05 dalek rakudo/newio: 5823369 | (Elizabeth Mattijsen)++ | src/core/IO/ArgFiles.pm:
17:05 dalek rakudo/newio: Fix deprecation warnings
17:05 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/582336997f
17:05 dalek rakudo/newio: 70df096 | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
17:05 dalek rakudo/newio: Fix "slurp", spotted by Mouq++
17:05 dalek joined #perl6
17:06 lizmat sorry, dalek
17:08 * lizmat just did https://github.com/rakudo/rak​udo/commit/86fb968c23f6c698d
17:09 lizmat and https://github.com/rakudo/rak​udo/commit/5675210ca6df5467ba
17:09 * lizmat hopes that these two commits will be helpful to jnthn in his quest for OS X fixings
17:31 spider-mario joined #perl6
17:39 lizmat Patch -p2 day 1 shutting down&
17:41 woolfy left #perl6
17:44 netstar joined #perl6
17:49 guru joined #perl6
17:52 vendethiel- oh, is it patch -p2?
17:54 kurahaupo joined #perl6
17:54 mr-foobar joined #perl6
17:55 Sqirrel joined #perl6
17:59 ajr joined #perl6
18:08 bjz_ joined #perl6
18:09 alexghacker joined #perl6
18:11 rurban That's about act, not p2, right?
18:19 Mouq joined #perl6
18:21 torbjorn how do you match a literal colon?
18:21 torbjorn ie in a case like this: perl6 -e 'say "foo:bar" ~~ token { $<var>=[\N+] \: }'
18:21 torbjorn trying to get var to match foo
18:21 torbjorn delimited by that colon
18:22 ugexe quote it?
18:24 torbjorn doesnt help
18:31 smls m: say "foo:bar" ~~ / [\N+] \: /
18:31 camelia rakudo-moar 2b2857: OUTPUT«「foo:」␤␤»
18:32 Alina-malina joined #perl6
18:32 smls m: say "foo:bar" ~~ / $<var>=[\N+] \: /
18:32 camelia rakudo-moar 2b2857: OUTPUT«「foo:」␤ var => 「foo」␤␤»
18:33 torbjorn m: say "foo:bar" ~~ token { $<var>=[\N+] \: }
18:33 camelia rakudo-moar 2b2857: OUTPUT«Nil␤»
18:33 torbjorn hm its the token that does it
18:33 TimToady token won't backtrack
18:34 arnsholt token doesn't backtrack
18:34 FROGGS joined #perl6
18:34 TimToady m: say "foo:bar" ~~ token { $<var>=[\N+?] \: }
18:34 camelia rakudo-moar 2b2857: OUTPUT«「foo:」␤ var => 「foo」␤␤»
18:34 arnsholt So \N+ will eat all the way to EOS, and there's no colon there
18:34 torbjorn right
18:35 TimToady m: say "foo:bar" ~~ token { $<var>=[<-[:]>+] \: }
18:35 arnsholt m: say "foo:bar" ~~ token { $<var>=[<-[:]>+] \: } # Should work too, I think
18:35 camelia rakudo-moar 2b2857: OUTPUT«「foo:」␤ var => 「foo」␤␤»
18:35 camelia rakudo-moar 2b2857: OUTPUT«「foo:」␤ var => 「foo」␤␤»
18:35 arnsholt Heh. Synchronized
18:35 TimToady jinx
18:35 TimToady if you hadn't typed the comment, you'd've won :)
18:36 torbjorn real question is, which reply from camelia was ment for whom
18:36 FROGGS m: say "foo:bar" ~~ token { <var=-[:]>+ \: }
18:36 camelia rakudo-moar 2b2857: OUTPUT«「foo:」␤ var => 「f」␤ var => 「o」␤ var => 「o」␤␤»
18:36 FROGGS ahh, well
18:37 guru joined #perl6
18:39 ajr_ joined #perl6
18:42 bcode joined #perl6
18:45 Mso150 joined #perl6
18:45 denis_boyun joined #perl6
19:00 raydiak g'morning #perl6...happy thanksgiving, whether or not it is observed in your respective locales :)
19:01 cognominal joined #perl6
19:04 ugexe m: my &code = { ENTER {say "original ENTER"}; say "work"; }; my &start = {say "phaser-ENTER"}; my &done = {say "phaser-LEAVE"}; &code.add_phaser("ENTER", &start); &code.add_phaser("LEAVE", &done); &code();
19:04 camelia rakudo-moar 2b2857: OUTPUT«original ENTER␤phaser-ENTER␤work␤»
19:04 ugexe is there a better way to add a new phaser type to a code block without declaring it in the code block, i.e. `LEAVE {}`?
19:06 ugexe m: my &code = { ENTER {say "original ENTER"}; say "work"; LEAVE {}; }; my &start = {say "phaser-ENTER"}; my &done = {say "phaser-LEAVE"}; &code.add_phaser("ENTER", &start); &code.add_phaser("LEAVE", &done); &code();
19:06 camelia rakudo-moar 2b2857: OUTPUT«original ENTER␤phaser-ENTER␤work␤phaser-LEAVE␤»
19:09 ajr joined #perl6
19:11 [Sno] joined #perl6
19:12 TimToady in theory a block is immutable, though making it into a sub doesn't seem to help with this
19:13 TimToady unfortunately, you'd probably need a pragma to pessimize all your blocks
19:14 TimToady if you're inlining blocks, you don't really want to put a test for a LEAVE list everywhere
19:14 TimToady on the off chance that someone might add one later
19:18 ajr__ joined #perl6
19:18 spider-mario joined #perl6
19:20 raydiak how do you type ∈ outside of vim?
19:21 anaeem1_ joined #perl6
19:22 TimToady what os?
19:23 raydiak linux
19:24 TimToady under gnome you can type ctrl-shift-u 2208
19:24 TimToady dunno if the compose keys have anything
19:24 raydiak kde w/altgr and compose key enabled
19:24 raydiak yeah haven't found anything helpful
19:25 raydiak all the top search results for '"compose key" "set operators"' are perl 6 blogs and clog
19:26 raydiak perhaps there just isn't an easy way for this one w/o custom mappings of some sort
19:26 TimToady funny, my compose keys support typing ∉ if you happen to have a ∈ key already :D
19:26 TimToady yes, there are custome compose keys that'll do that
19:26 TimToady I haven't been able to get them to work under anthy, and I'd rather be able to type japanese :)
19:27 TimToady haven't tried recently though
19:28 raydiak heh I wonder how polyglots can keep it all straight...just trying to be able to type english and perl 6 is a lofty enough goal for me to run in to problems :)
19:29 * TimToady has always wanted a compose key that used vim sequences
19:34 kurahaupo if one has a working compose key, what does one need vim's ^K sequences for? (maybe better mnemonics, I suppose)
19:37 TimToady and only having to learn one system of them
19:37 TimToady maybe they should all be added as compose sequences starting with ^K  :)
19:38 raydiak still can't type ∈ (or probably some other vim digraphs) via compose key w/o custom stuff
19:39 ajr__ Damian's probably got  keybinding or vim macro, TimToady. :-)*
19:44 ggoebel111111113 joined #perl6
19:45 btyler tony-o: I was using 'wrk', which had a habit of consistently segfaulting MVM or otherwise making things blow up when run using default settings against perl6-http-async
19:46 btyler tony-o: running it against the recent p6-http-async changes it seems a -lot- more stable! and hitting ~175 requests/second, which is awesome (JVM was more like 15-40, depending on how warmed up the JIT was)
19:47 ggoebel111111113 joined #perl6
19:53 denis_boyun_ joined #perl6
19:59 virtualsue joined #perl6
20:02 lucas_ joined #perl6
20:08 lucas_ Back to the Range "excludes" methods... Having deprecated excludes_{min,max} only work if called as methods, but not if passed as arguments to the constructor. I don't know how to fix this without changing all constructors. Since, normally, range objects will be created with operators, I think this may be a minor issue, but it can break stuff. BTW, I think roast should also check for ranges constructed explicity with Range.new(..., :excludes-
20:08 lucas_ ... constructed  explicity with Range.new(..., :excludes-mins, :excludes-max). It seems to only test  ranges constructed with operators.
20:21 Mouq joined #perl6
20:23 liztormato joined #perl6
20:23 liztormato lucas_: Well volunteered ;-)
20:44 TimToady smls: coercers don't *think* they take multiple arguments, but if you pass a parcel or a list, that will be coerced as an object
20:46 TimToady also, functional cursors can be bound earlier than methods
20:46 TimToady *coercers
20:50 TimToady masak: yes, <*...> should probably count for both LTM and longest literal, to the extent it actually matches and is literal
21:02 virtualsue joined #perl6
21:15 ggoebel111111113 joined #perl6
21:18 timotimo o/
21:18 masak \o
21:19 colomon o/
21:20 bcode joined #perl6
21:20 pecastro joined #perl6
21:26 virtualsue joined #perl6
21:30 kjs_ joined #perl6
21:32 liztormato joined #perl6
21:32 liztormato timotimo: masak colomon /o
21:32 colomon \o
21:34 timotimo heyo liz
21:34 timotimo i don't think i can help you alot with what you asked me in the backlog :(
21:36 liztormato joined #perl6
21:36 liztormato timotimo: Thanks for looking at it anyway
21:49 pmurias joined #perl6
21:50 pmurias masak: nqp::print("hi") doesn't call a func from the nqp package it inserts an op
21:55 masak pmurias: I know.
21:56 masak pmurias: my point isn't about that at all. my point is that (a) it's illegal Python, and (b) the syntax it introduces is Perl 6-think for "package lookup", which already has syntax in Python.
21:56 masak 'night, #perl6
21:56 pmurias illegal Python is a benefit
21:57 pmurias we could use the python syntax and require a pragma
22:05 Ugator So how comes there is so much python talk in here?
22:15 virtualsue joined #perl6
22:17 liztormato joined #perl6
22:18 liztormato Perhaps because of Inline::Python?
22:20 jnthn Or maybe because of Snake :)
22:20 liztormato Badger xx 26
22:31 lizmat joined #perl6
22:33 liztormato left #perl6
22:36 telex joined #perl6
22:53 cognominal joined #perl6
23:13 chenryn joined #perl6
23:18 cognominal joined #perl6
23:24 lizmat_ joined #perl6
23:24 lizmat_ joined #perl6
23:35 lizmat_ joined #perl6
23:37 rmgk joined #perl6
23:45 kjs_ joined #perl6
23:52 rmgk joined #perl6
23:54 timotimo yup, inline::python is a thing, but i think today all that was talked about was snake
23:58 TimToady so...can the python libraries we want to take over be considered thread safe?
23:59 lizmat_ as long as you run in one thread, I guess  :-)
23:59 timotimo no, you can run inline::python from as many threads as you like, but there'll be a single GIL that'll govern how your python code runs

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

Perl 6 | Reference Documentation | Rakudo