Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-03-19

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:07 dalek ecosystem: f31aa9e | (Andrew Egeler)++ | META.list:
00:07 dalek ecosystem: Add Compress::Zlib
00:07 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f31aa9e37a
00:08 segomos raiph: if you have a back up somewhere i can throw it up on a site
00:08 segomos building jvm p6, panda doesn't like moar yet i guess :-)
00:20 dayangkun joined #perl6
00:22 dalek perl6-most-wanted: c98cda9 | (Andrew Egeler)++ | most-wanted/bindings.md:
00:22 dalek perl6-most-wanted: Add Compress::Zlib WIP
00:22 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/c98cda97b6
00:23 kbaker joined #perl6
00:23 TimToady r: my \m = 1000; say m;  # oops
00:23 camelia rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Regex not terminatedâ�¤at /tmp/tmpfile:1â�¤------> [32mmy \m = 1000; say m;  # oops[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        argume…»
00:23 TimToady this discussion reminds me we need to do something about that
00:24 segomos r: my \m = 1000; m.say;
00:24 camelia rakudo-jvm 934c48, rakudo-moar 934c48: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter ; (must be quoted to match literally)�at /tmp/tmpfile:1�------> [32mmy \m = 1000; m.say[33m�[31m;[0m�Couldn't find terminator .�at /tmp/tmpfile:1�------> …»
00:24 camelia ..rakudo-parrot 934c48: OUTPUT«â�€â�€â�€[â�€â�€â�€3â�€â�€â�€1â�€â�€​â�€mâ�€â�€â�€=â�€â�€â�€=â�€â�€â�€=â�€â�€â�€â​�€â�€â�€[â�€â�€â�€0â�€â�€â�€mâ�€â�€â�€Sâ�€â�​€â�€Oâ�€â�€â�€Râ�€â�€â�€Râ�€â�€â�€Yâ�€â�€â�€​!â�€â�€â�€â�€â�€â�€[â�€â�€â�€3â�€â�€â�€1â�€â​�€â�€mâ�€â�€â�€=â�€â�€â�€=â�€â�€â�€=â�€â€¦Â»
00:24 TimToady there are a number of keywords that ought to be demoted to macro names
00:24 segomos cool error message
00:46 hoverboard joined #perl6
00:56 woosley joined #perl6
01:30 TimToady hi guys, you're on screen a De Anza College in Cupertino :)
01:30 fridim__ joined #perl6
01:48 JimmyZ std: my \m = 1000; m.say;
01:48 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Regex missing terminator (or semicolon must be quoted?) at /tmp/grUz9n_zx2 line 1 (EOF):�------> [32mmy \m = 1000; m.say;[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 124m�»
01:49 JimmyZ std: my \m = 1000; say m;
01:49 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Regex not terminated at /tmp/cjk9tn3dSF line 1 (EOF):�------> [32mmy \m = 1000; say m;[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 122m�»
01:49 [Coke] aaahaahahah. I checked the whois, found a name, checked on linkedin... twgil dude has 2 recommendations for perl. :)
01:52 erdic joined #perl6
01:56 iolympian1 joined #perl6
01:59 cooper joined #perl6
02:02 lue TimToady: really?
02:03 TimToady yes, really
02:03 TimToady run something to show it off :)
02:04 TimToady like maybe
02:04 TimToady m: say [*] 1..10
02:04 camelia rakudo-moar 934c48: OUTPUT«3628800␤»
02:04 lue r: sub postfix:<!>($a) { [*] 1..$a }; say 5!;
02:04 camelia rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48: OUTPUT«120␤»
02:05 lue hey look, we picked the same reduction op :P
02:05 TimToady why did we multiply by 1?
02:05 lue TimToady: that's just the canonical definition of factorial, I didn't make it up. :)
02:06 TimToady j: say [*] 1..10
02:06 camelia rakudo-jvm 934c48: OUTPUT«3628800␤»
02:06 TimToady p: say [*] 1..10
02:06 camelia rakudo-parrot 934c48: OUTPUT«3628800␤»
02:06 JimmyZ r: say [*] 1..30
02:06 camelia rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48: OUTPUT«265252859812191058636308480000000␤»
02:07 skids https://gist.github.com/skids/9634210 # this something that's RTed yet?
02:07 * lue hopes there's a way to check for invalid var names without maintaining a list of keywords for at least part of it :/
02:07 TimToady p6: say 42
02:07 camelia rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48, niecza v24-109-g48a8de3: OUTPUT«42␤»
02:08 JimmyZ r: my $time = time; say [*] 1..32; say $time - time
02:08 camelia rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48: OUTPUT«263130836933693530167218012160000000␤0␤»
02:08 lue r: say [*] 1..32; say now - BEGIN now
02:08 camelia rakudo-moar 934c48: OUTPUT«263130836933693530167​218012160000000␤0.04657962␤»
02:08 camelia ..rakudo-parrot 934c48: OUTPUT«263130836933693530167​218012160000000␤0.05436981␤»
02:08 camelia ..rakudo-jvm 934c48: OUTPUT«2631308369336935301​67218012160000000␤0.077␤»
02:08 JimmyZ :)
02:11 lue r: say (1,2,3) ∪ (2,3,4);    say (1,2,3) ∩ (2,3,4);    say (1,2,3) ∖ (2,3,4);    say (1,2,3) ⊖ (2,3,4)
02:12 camelia rakudo-jvm 934c48: OUTPUT«set(2, 1, 4, 3)␤set(2, 3)␤set(1)␤set(1, 4)␤»
02:12 camelia ..rakudo-parrot 934c48, rakudo-moar 934c48: OUTPUT«set(1, 2, 3, 4)␤set(2, 3)␤set(1)␤set(1, 4)␤»
02:12 TimToady r: say (1,2,3) (|) (2,3,4)
02:13 camelia rakudo-parrot 934c48, rakudo-moar 934c48: OUTPUT«set(1, 2, 3, 4)␤»
02:13 camelia ..rakudo-jvm 934c48: OUTPUT«set(2, 1, 4, 3)␤»
02:13 lue ... and just now I realize that script I wrote a couple days ago could have used ⊖ instead of putting two lists into a Bag and finding the unique ones. :P
02:16 TimToady eval: say
02:16 TimToady do we have a P5 here?
02:16 lue also, TimToady: think the set operators for regex assertions should 1) follow the (^) etc. form for the texas versions, instead of the ()-less versions they are now, and 2) have Unicode versions?
02:16 lue p5: say
02:17 TimToady p6: say
02:17 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/tmpfile line 1 (EOF):â�¤------> [32msay[33mâ��[31m<EOL>[0mâ�¤â�¤Unhandled exception: Chec…»
02:17 camelia ..rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48: OUTPUT«␤»
02:17 lue ( that is, <rule1 ∪ rule2> and <rule1 (|) rule2> instead of what it is now, <rule1 | rule2> )
02:17 TimToady p6: $_ = 'foo'; .say
02:17 camelia rakudo-parrot 934c48, rakudo-jvm 934c48, rakudo-moar 934c48, niecza v24-109-g48a8de3: OUTPUT«foo␤»
02:19 TimToady m: for my $x (@_) {...}
02:19 camelia rakudo-moar 934c48: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2xMfoWrng7â�¤This appears to be Perl 5 codeâ�¤at /tmp/2xMfoWrng7:1â�¤------> [32mfor [33mâ��[31mmy $x (@_) {...}[0mâ�¤    expecting any of:â�¤        statement listâ�¤Â»
02:21 TimToady m: 42.chars.say
02:21 camelia rakudo-moar 934c48: OUTPUT«2␤»
02:24 xragnar joined #perl6
02:29 TimToady m: say <a b c> ~ 1,2,3;
02:29 camelia rakudo-moar 934c48: OUTPUT«a b c123␤»
02:29 TimToady m: say <a b c> Z 1,2,3;
02:29 camelia rakudo-moar 934c48: OUTPUT«a 1 b 2 c 3␤»
02:29 iolympian1 left #perl6
02:29 TimToady m: say <a b c> Z~ 1,2,3;
02:29 camelia rakudo-moar 934c48: OUTPUT«a1 b2 c3␤»
02:31 TimToady m: say <a b c> X~ 1,2,3;
02:31 camelia rakudo-moar 934c48: OUTPUT«a1 a2 a3 b1 b2 b3 c1 c2 c3␤»
02:32 TimToady m: say 5 / 3
02:32 camelia rakudo-moar 934c48: OUTPUT«1.666667␤»
02:32 TimToady m: say 5 R/ 3
02:32 camelia rakudo-moar 934c48: OUTPUT«0.6␤»
02:34 TimToady m: say <a b c> XR~ 1,2,3;
02:34 camelia rakudo-moar 934c48: OUTPUT«1a 2a 3a 1b 2b 3b 1c 2c 3c␤»
02:54 klapperl joined #perl6
02:56 FROGGS_ joined #perl6
03:09 BenGoldberg p6: say [R,] 1..4
03:09 camelia rakudo-parrot 934c48: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤  in block  at gen/parrot/CORE.setting:17009␤  in sub  at gen/parrot/CORE.setting:17151␤  in block  at /tmp/tmpfile:1␤␤»
03:09 camelia ..rakudo-moar 934c48: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤  in block  at src/gen/m-CORE.setting:16808␤  in sub  at src/gen/m-CORE.setting:16950␤  in block  at /tmp/tmpfile:1␤␤»
03:09 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Excess arguments to ANON, used 2 of 4 positionals␤  at /tmp/tmpfile line 0 (ANON @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2767 (reduceop @ 12) ␤  at /tmp/tmpfile line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/…»
03:09 camelia ..rakudo-jvm 934c48: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤  in block  at gen/jvm/CORE.setting:16754␤  in sub  at gen/jvm/CORE.setting:16896␤  in block  at /tmp/tmpfile:1␤␤»
03:14 SamuraiJack joined #perl6
03:23 perigrin_ joined #perl6
03:24 perigrin_ joined #perl6
03:59 yoleaux joined #perl6
04:13 segomos perl6 is awesome
04:40 xybre joined #perl6
04:42 xybre Whats the proper syntax to use the "continue" modifier in a rule block? I've tried a few combinations, but the only one that parsed said :c wasn't a modifier. Is it not implemented yet?
04:46 TimToady :c is mostly for bare regex; once you're in a grammar things automatically continue where they're supposed to, generally speaking
04:46 TimToady so I don't think anyone has ever tried to use :c in a rule, offhand
04:49 xybre Interesting, I'll look more into the grammar documentation then. Thanks.
04:50 TimToady well, it's documented that you can use it internally, but I guess nobody's tried it yet
04:50 TimToady everyone thinks of it as a modifier to m// or s///
04:51 TimToady I'm not sure <at()> is impleented either
04:51 TimToady m: 'foo' ~~ /...<at(3)>/
04:51 camelia rakudo-moar 934c48: ( no output )
04:51 TimToady m: say 'foo' ~~ /...<at(3)>/
04:51 camelia rakudo-moar 934c48: OUTPUT«「foo」␤ at => 「」␤␤»
04:52 TimToady I guess it is
04:52 TimToady m: say 'foo' ~~ /.*?<at(3)>/
04:52 camelia rakudo-moar 934c48: OUTPUT«「foo」␤ at => 「」␤␤»
04:53 TimToady I guess there aren't a lot of parsing problems where you have to go jumping around in the string
04:54 TimToady that feels more like SNOBOL-think to me...
04:56 TimToady certainly we have the capability of setting the current position, but :c is perhaps not the best interface for that
04:56 TimToady I don't think the current position setter is going to be found in S05 though
04:58 TimToady and now that I grep for it, it looks like primarily an nqp operation, so dunno if it's visible in P6-land
04:59 TimToady m: say 'foo' ~~ /<.cursor_pos(3)>$/
04:59 camelia rakudo-moar 934c48: OUTPUT«No such method 'cursor_pos' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:12825␤  in method ACCEPTS at src/gen/m-CORE.setting:798␤  in block  at /tmp/A05w87Om41:1␤␤»
04:59 TimToady it would be something resembling that
04:59 TimToady m: say Cursor.^methods
04:59 camelia rakudo-moar 934c48: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/m-CORE.setting:7022␤  in method gist at src/gen/m-CORE.setting:1053␤  in sub say at src/gen/m-CORE.setting:13366␤  in block  at /tmp/4FJ1Kdr0np:1␤␤»
04:59 TimToady heh
05:00 TimToady grammars aren't quite HLLized completely in rakudo yet
05:00 kaare_ joined #perl6
05:01 TimToady m: say Cursor.^methods».name
05:01 camelia rakudo-moar 934c48: OUTPUT«MATCH MATCH_SAVE INTERPOLATE OTHERGRAMMAR INDRULE RECURSE orig target from pos CAPHASH !cursor_init !cursor_start_all !cursor_start !cursor_start_cur !cursor_start_fail !cursor_start_subcapture !cursor_capture !cursor_push_cstack !cursor_pass !cursor_fail …»
05:02 TimToady m: say 'foo' ~~ /<.'!cursor_pos'(3)>$/
05:02 camelia rakudo-moar 934c48: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized regex metacharacter < (must be quoted to match literally)â�¤at /tmp/bVOGMsVHSu:1â�¤------> [32msay 'foo' ~~ /<.[33mâ��[31m'!cursor_pos​'(3)>$/[0mâ�¤Unrecognized regex metacharacter . (must be quoted to match…»
05:03 TimToady m: say 'foo' ~~ /<."!cursor_pos"(3)>$/
05:03 camelia rakudo-moar 934c48: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized regex metacharacter < (must be quoted to match literally)â�¤at /tmp/PsYa6Z1Sd1:1â�¤------> [32msay 'foo' ~~ /<.[33mâ��[31m"!cursor_pos​"(3)>$/[0mâ�¤Unrecognized regex metacharacter . (must be quoted to match…»
05:04 TimToady well, might have to write it more nqp-ish than that, I guess
05:04 TimToady anyhoo, the functionality is certainly there somewhere hiding
05:05 * TimToady hides
05:06 JimmyZ Cursor.pm needs some love, me thinks
05:26 [Sno] joined #perl6
05:27 [Sno] joined #perl6
05:39 moritz \o
05:49 pdcawley joined #perl6
06:09 kaare_ joined #perl6
06:16 logie_ joined #perl6
06:20 kaare_ joined #perl6
06:27 [Sno] joined #perl6
06:56 Khisanth joined #perl6
06:59 sftp joined #perl6
07:09 hoverboard joined #perl6
07:15 darutoko joined #perl6
07:30 kaleem joined #perl6
07:38 FROGGS joined #perl6
07:41 Khisanth joined #perl6
07:46 rindolf joined #perl6
07:49 arnsholt joined #perl6
07:56 zakharyas joined #perl6
08:14 arnsholt nqp: say(nqp::reprname(+[]))
08:14 camelia nqp-parrot: OUTPUT«Can only use repr_name with a SixModelObject␤current instr.: '' pc 49 ((file unknown):57503018) (/tmp/tmpfile:1)␤»
08:14 camelia ..nqp-moarvm, nqp-jvm: OUTPUT«P6num␤»
08:15 arnsholt jnthn: Do we consider that a bug, or merely unexpected?
08:16 JimmyZ nqp: say(nqp::reprname((+[])).WHAT)
08:16 camelia nqp-parrot: OUTPUT«Can only use repr_name with a SixModelObject␤current instr.: '' pc 49 ((file unknown):48512506) (/tmp/tmpfile:1)␤»
08:16 camelia ..nqp-moarvm, nqp-jvm: OUTPUT«␤»
08:17 FROGGS arnsholt: it is the "that happens when 6model is not fully supported/implemented" thing
08:17 FROGGS arnsholt: but when you glance at #parrot, then you see commits from rurban++ about implementing 6model
08:18 arnsholt Oh, the problem isn't that it doesn't work on Parrot
08:18 arnsholt Sorry, that wasn't entirely clear
08:18 arnsholt The +@thing returns the length of the array, which we'd normally expect to be a P6int
08:19 arnsholt But prefix:<+> only returns nums
08:19 xinming_ joined #perl6
08:19 dmol joined #perl6
08:22 FROGGS arnsholt: that is known
08:23 FROGGS and for some reason we were unable to just change it
08:23 FROGGS but I can't remember why
08:30 arnsholt It's because the op driving prefix:<+> has to return a num in some other contexts, so it has to do that for everything
08:54 kivutar joined #perl6
09:03 timotimo o/
09:15 arnsholt 'lo \o
09:23 pecastro joined #perl6
09:28 fhelmberger joined #perl6
09:29 virtualsue joined #perl6
09:35 SamuraiJack joined #perl6
09:52 arnsholt Oh fun. infix:<+> of two ints produces a num too
09:54 timotimo it always does? oops.
09:54 timotimo in nqp we already have an optimization that turns num additions into int additions if it's obvious
09:55 timotimo on rakudo itself, that may be harder, because the additions aren't always inlined (or are they?)
09:56 arnsholt Looks like from what I'm seeing
09:56 arnsholt nqp: my $a := 1; my $b := 2; say(nqp::reprname($a)); say(nqp::reprname($b)); say(nqp::reprname($a+$b))
09:57 camelia nqp-moarvm, nqp-jvm: OUTPUT«P6int␤P6int␤P6num␤»
09:57 camelia ..nqp-parrot: OUTPUT«Can only use repr_name with a SixModelObject␤current instr.: '' pc 52 ((file unknown):45) (/tmp/tmpfile:1)␤»
09:57 arnsholt Yup
09:57 timotimo o_O
09:57 tadzik o:
09:57 moritz nqp: say(nqp::reprname(1+2))
09:57 camelia nqp-moarvm, nqp-jvm: OUTPUT«P6int␤»
09:57 camelia ..nqp-parrot: OUTPUT«Can only use repr_name with a SixModelObject␤current instr.: '' pc 46 ((file unknown):62151977) (/tmp/tmpfile:1)␤»
09:57 timotimo well, at least that works.
09:57 arnsholt I could fix it by doing +| instead (since that's what it actually wanted to do), thankfully
09:58 timotimo nqp: my int $a := 1; my int $b := 2; say(nqp::reprname($a+$b))
09:58 camelia nqp-moarvm, nqp-jvm: OUTPUT«P6int␤»
09:58 camelia ..nqp-parrot: OUTPUT«Can only use repr_name with a SixModelObject␤current instr.: '' pc 53 ((file unknown):45) (/tmp/tmpfile:1)␤»
09:58 timotimo ^
09:59 arnsholt \o/
09:59 arnsholt Direct JAST compilation stage1 compiler now manages to compile the stage2 compiler
09:59 arnsholt I wonder what hilarious bugs the stage2 compiler now has =D
09:59 timotimo \o/
10:00 timotimo this will decrease startup time measurably, aye?
10:00 timotimo well, at least compile-time?
10:00 arnsholt Wait, what? It didn't explode...
10:00 timotimo well, stage JAST only, really
10:00 arnsholt Hoping it'll cut down on compile time a bit yeah
10:01 moritz arnsholt: when it gets as far as building stage2, chances are good that it's not all that messed up :-)
10:02 arnsholt Apparently =D
10:03 arnsholt Let's see what happens if I make j-test
10:05 timotimo oooh, if all is well, this could go in this month's release!
10:05 moritz timotimo: you do realize that that's tomorrow already?
10:06 moritz I'm not a fan of rushing things into releases
10:06 moritz after all, the next one is only a month away :-)
10:06 timotimo hehe.
10:06 timotimo we've had holes in the Star releases recently, though
10:06 arnsholt I'd like to at least get jnthn to review it first
10:06 timotimo that's fine
10:06 timotimo i always get a bit too excited about these things that happen immediately before a release
10:07 arnsholt All tests passing so far though
10:08 arnsholt "All tests successful." =D
10:10 timotimo well, i like the sound of that :)
10:24 telex joined #perl6
11:25 denis_boyun joined #perl6
11:40 fhelmberger_ joined #perl6
12:12 timotimo how much work would it be to make rakudo-moar capable of running STD?
12:12 nwc10 what does STD currently run on?
12:12 timotimo viv
12:12 timotimo and thus, perl5
12:13 jnthn o/
12:13 brrt joined #perl6
12:14 timotimo o/ jnthn
12:14 timotimo how's the tuit supply today?
12:14 nwc10 hey, can we have 12 sided tuits soon? :-)
12:15 jnthn Tuit supply a bit disrupted by internet access failure
12:15 jnthn But it's OK; I needed to do a run to the office sometimes today or tomorrow, so I did it today :)
12:17 timotimo arnsholt: were you able to compile a full rakudo with the new jast compiler yet?
12:18 jnthn On NQP, it basically resorts to floating point most of the time.
12:18 jnthn Unless you give it things typed as int.
12:19 arnsholt timotimo: Compiles, but for some reason weird things happen if I try to make j-test
12:19 arnsholt Gonna recompile NQP to master and see what happens
12:19 timotimo okay
12:20 arnsholt O hai, jnthn!
12:20 jnthn arnsholt++ # awesome progress
12:20 jnthn I'm too risk averse to have it in the monthly :)
12:20 jnthn I'll bet it saves some off setting compilation time on JVM. :)
12:21 arnsholt Hopefully. As long as it's not broken in some subtle way
12:21 arnsholt Had weirdness with the test suite
12:21 jnthn For such a big change, I expect there'll be a few things to work through :)
12:21 arnsholt make j-test gets me "no tests run" errors, but ./perl6-j t/$a_test_file seemed to work fine
12:22 arnsholt Recompiling NQP right now, but once the compilations are done I'll push what I have so far
12:22 timotimo you should try it on master, see if it's supposed to work at all in a vanilla state
12:22 timotimo because "no tests run" is what i get most of the time for the j-spectest
12:22 arnsholt Aha
12:23 jnthn Yeah, that seems to happen on some JVM versions :S
12:23 arnsholt From a skim of the harness script, it looks like it might not be running ./perl6-j on JVM
12:23 jnthn Yeah, it uses the evalserver for spectest
12:23 timotimo yeah, it may be running the ... yes
12:25 timotimo hmm. a huge piece of slowness for the perl6-j benchmarks is attributed to stage parse, at least if --stagestats is to be believed
12:25 timotimo does that also contain loading and deserializing the setting?
12:25 jnthn Yes.
12:26 jnthn Happens for the fist thing you parse
12:26 jnthn uh, first
12:26 timotimo hmm. that won't get any benefit from the jast speed improvements
12:27 timotimo it would seem like loading the setting is to blame for by far the biggest chunk of time wasted on startup for rakudo-jvm benchmarks
12:29 jnthn Well, it's not waste if you gotta do it :P
12:29 jnthn Question is what exactly takes time, and what aspects of it re slow.
12:29 timotimo i'm assuming that there's something to be gained there ;)
12:31 jnthn Me too :)
12:32 timotimo which tool would give me help with that? jvisualvm?
12:33 jnthn maybe that, or maybe there are some profiling options that can be passed to the JVM invocation too
12:34 arnsholt Hmm, looks like it works with plain perl6-j
12:34 fhelmberger joined #perl6
12:34 dalek nqp/jastcompiler: 7e6d19f | (Arne Skjærholt)++ | src/vm/jvm/QAST/Compiler.nqp:
12:34 dalek nqp/jastcompiler: Make sure all handler indices are ints.
12:34 dalek nqp/jastcompiler:
12:34 dalek nqp/jastcompiler: Prior to this, some indices would be nums; one because the construct "$a+$b"
12:34 dalek nqp/jastcompiler: returns a num, even if both variables are ints (fixed by using logical or
12:34 dalek nqp/jastcompiler: instead, since those are the semantics we actually wanted anyways), and one
12:34 dalek nqp/jastcompiler: because "+@array" also returns a num (fixed by using nqp::elems instead).
12:34 dalek nqp/jastcompiler: review: https://github.com/perl6/nqp/commit/7e6d19fb80
12:34 dalek nqp/jastcompiler: fe4a4ac | (Arne Skjærholt)++ | / (18 files):
12:34 dalek nqp/jastcompiler: Direct compilation of JAST nodes to bytecode.
12:34 dalek nqp/jastcompiler: review: https://github.com/perl6/nqp/commit/fe4a4ac3e8
12:35 arnsholt That's the branch, at any rate
12:35 arnsholt Should probably do some $dayjob things today, too =)
12:35 JimmyZ timotimo: http://java.dzone.com/arti​cles/java-profiling-dtrace
12:36 timotimo thank you :)
12:36 JimmyZ I know the oracle dbas is using it
12:36 timotimo so all i need to do is install a solaris and build rakudo-j on that!
12:36 arnsholt You can get dtrace on Linux as well, I think
12:37 JimmyZ http://docs.oracle.com/javase/6/do​cs/technotes/guides/vm/dtrace.html
12:37 arnsholt But it's not in the mainline kernel because the dtrace licence isn't compatible with the GPL
12:37 timotimo right
12:37 JimmyZ yeah, https://github.com/dtrace4linux/linux
12:38 timotimo did i mention i can't profile perl6-j because the jvm segfaults when i click the "profile" button?
12:41 timotimo i can only let it sample every 20ms
12:42 jnthn wow
12:42 jnthn Try a newer/different version?
12:42 timotimo it also spews a bunch of warnings before that
12:42 timotimo probably related to the way we create lots of classes at run-time
12:43 timotimo https://gist.github.com/timo/0c08d358a2357e098da7
12:44 jnthn wow
12:44 jnthn fail
12:46 moritz timotimo: do submit a bug report to the JVM devs :-)
12:47 timotimo i'm afraid they'll tell me it's a DIHWIDT
12:53 guru joined #perl6
12:59 kbaker_ joined #perl6
13:01 dalek rakudo/nom: 4869942 | rurban++ | src/vm/parrot/ops/perl6.ops:
13:01 dalek rakudo/nom: parrot/ops/perl6.ops: add missing prototype decl for Parrot_lib_perl6_ops_init
13:01 dalek rakudo/nom:
13:01 dalek rakudo/nom: required for parrot-6.1.0 which fatalizes missing prototype declarations
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4869942a7d
13:01 dalek rakudo/nom: 01d16c2 | (Tobias Leich)++ | src/vm/parrot/ops/perl6.ops:
13:01 dalek rakudo/nom: Merge pull request #252 from rurban/nom
13:01 dalek rakudo/nom:
13:01 dalek rakudo/nom: parrot/ops/perl6.ops: add missing prototype decl for Parrot_lib_perl6_op...
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01d16c2d93
13:12 Sqirrel joined #perl6
13:22 lowpro30 joined #perl6
13:23 timotimo i'm wondering if it would be wise to let int + int give int given ints range limitations; but that might be what the user wants anyway, since nqp doesn't give you bigint semantics for int
13:25 FROGGS that sounds pretty sane for nqp me thinks
13:25 jnthn NQP does not have to be a general purpose language. It just needs to be good for writing compilers. :)
13:25 JimmyZ and for C :P
13:25 jnthn To be honest, it's floating point we should probably make cost.
13:25 jnthn And assume int in general.
13:26 jnthn Since compilers rarely need to do scientific math :)
13:26 JimmyZ there is XXX in the nqp that is nqp really wants constants
13:26 timotimo aye; but for now we can probably teach prefix:<+> before an @-variable to return an int
13:26 jnthn Yeah, that's a todo :)
13:26 jnthn timotimo: yes, that is an acceptable thing to do for now.
13:27 jnthn timotimo: In fact, we can even re-write it directly to an elems call
13:27 timotimo not 100% sure where that goes, though
13:31 lowpro30_ joined #perl6
13:43 arnsholt timotimo: The grammar bit handling prefix:<+> probably
13:43 timotimo yeah, probably
13:44 arnsholt Then it can special-case if its argument is a variable with the @ sigil and compile to the elems op, instead of numify
13:44 arnsholt Er Actions, not grammar, really
13:44 timotimo yes
13:47 AW3i joined #perl6
13:48 jnthn I think maybe in NQP::Ops, which is backend-specific.
13:49 arnsholt Oh, you mean fiddling with the AST directly in QAST::Compiler?
13:49 jnthn No, it's that the numify thing is implemented differnetly by backend.
13:49 jnthn iirc
13:50 arnsholt Oh, that
13:50 arnsholt But at least on JVM the return type of the numify op is Double
13:51 arnsholt I was thinking that the grammar would just emit an elems op when the argument is a literal variable whose sigil is @
13:53 jnthn Well, it's not the grammars jot to emit anything
13:53 rurban1 joined #perl6
13:53 jnthn It'd be in the actions if anywhere
13:53 FROGGS <arnsholt> Er Actions, not grammar, really
13:54 arnsholt Yeah, I keep saying grammar, but it's the actions of course >.<
13:54 arnsholt I think my brain just doesn't want to separate the actions and the grammar =)
13:54 timotimo worst case, the optimizer can do it.
13:55 timotimo because the important point is that everything downstream from the optimizer gets to know that it returns int.
13:55 * FROGGS .oO( worst case, the timotimo can do it )
13:55 jnthn optimizer feels wrong
13:55 jnthn Actions can work.
13:55 FROGGS I always think "timotimo" when I read "optimizer" for some reason :o)
13:55 timotimo fair enough, i'll have a look
13:56 arnsholt timotimo: I took a peek at the code, and prefix:sym<+> in NQP::Grammar sets the op via the <O()> directive
13:57 moritz IMHO it's not a job for the grammar
13:57 moritz but rather for the code-gen or the optimizer
13:57 timotimo i see that
13:57 timotimo in theory, the prefix:<+> rule could do a lookahead for an @ character
13:58 timotimo and generate a nqp::elems instead
13:58 btyler joined #perl6
13:58 guru joined #perl6
13:58 arnsholt Don't even have to touch the grammar. The action can just make a different AST based on the type of the AST of its argument
13:59 arnsholt moritz: That's true too, but then we'll have needlessly duplicated code to handle this
14:00 timotimo arnsholt: but then i'd have to replace the functionality of the O in that case :)
14:00 timotimo probably would just have to remove the :op piece, though
14:01 FROGGS -    token prefix:sym<+>   { <sym>  <O('%symbolic_unary, :op<numify>')> }
14:01 FROGGS +    token prefix:sym<+>   { <sym> [ <?[@]> <O('%symbolic_unary, :op<elems>')> || <O('%symbolic_unary, :op<numify>')> ] }
14:01 FROGGS won't that work?
14:01 timotimo that's pretty much the change i have ,except i put a <![@]> in there for good measure
14:01 timotimo so that failure won't be weird
14:02 arnsholt Does token have sigspace? I can't remember...
14:04 jnap joined #perl6
14:05 treehug88 joined #perl6
14:05 timotimo no, that's rule
14:05 timotimo with that change, tests still pass apparently. i'll try rakudo now.
14:05 arnsholt Right. In that case, that grammar tweak will fail on "+ @array" I think
14:06 timotimo 41 wallclock seconds on parrot, 14 on moar ♥
14:06 timotimo that's not prefix:<+>, though
14:10 jnap joined #perl6
14:13 moritz <?before \s*\@>  <O('%symbolic_unary, :op<elems>')> || <!before \s*\@> <O('%symbolic_unary, :op<numify>')>
14:14 timotimo nqp: my @foo; say(+ @foo);
14:14 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«0␤»
14:14 FROGGS nqp-p -e 'my @array; say(nqp::objprimspec(+@array))' # gives 1, which might be correct
14:14 timotimo oh, huh.
14:14 FROGGS moritz: prefix '+' has no whitespace afterwards
14:15 timotimo FROGGS: apparently it does, though
14:15 timotimo see my eval above
14:15 moritz FROGGS: the OPP eats that, iirc
14:15 FROGGS true, --target=ast shows it delegates to prefix:<+>
14:16 timotimo i'll add the whitespace then.
14:16 timotimo and now it would be nice to teach the optimizer that infix:<+> will turn a list into an int.
14:17 FROGGS but I would not add a <!before in the second branch when using a sequential alternation
14:17 timotimo OK
14:21 * moritz hopes that terminating LTM doens't cause any extra warts
14:21 kaleem joined #perl6
14:22 hoelzro o/ #perl6
14:22 FROGGS hi hoelzro
14:22 moritz does NQP need floating point numbers at all?
14:23 timotimo sometimes they're nice to have
14:23 FROGGS moritz: at least for --stagestats :o)
14:27 moritz FROGGS: well, that could be done with nqp::div_n ops etc.
14:27 moritz FROGGS: so more on the "library" level than on the "language" level
14:28 FROGGS yeah
14:28 FROGGS I don't need nums in nqp fwiw
14:28 FROGGS at least not as a result of an expression
14:28 timotimo hm
14:34 Alula joined #perl6
14:41 jnap1 joined #perl6
14:41 salv0 joined #perl6
14:41 [Coke] I would like to start keeping something very vaguely resembling a project plan. We've talked about what has to be done for "6.0", I'd like to get a list, not to set anything in stone, but to help communicate to people looking for impactful things to help with, or people asking "how soon?". If you have anything you're working on that might go on such a thing, or know of tasks that are currently not claimed (like a syn that's been in draft for a while), feel fr
14:42 FROGGS diakopter created such a list
14:42 FROGGS perhaps I am able to find it
14:43 timotimo we still have the roadmap in rakudo's repository i believe
14:43 colomon item for list: ecosystem fully functional on all three backends.
14:43 timotimo now the optimizer turns 10 + @list into an add_i, too
14:43 FROGGS [Coke]: https://ethercalc.org/i982ooyabg.html
14:44 FROGGS [Coke]: this list is not complete
14:45 FROGGS [Coke]: if a synopsis is missing there, it is more likely that one needs to record issues rather than beeing implemented fully
14:48 timotimo FROGGS: do you have a date with that?
14:48 colomon FROGGS: It seems to me that list is too detailed … at least for what I'd imagined [Coke]++ meant
14:49 [Coke] yah. I could see drilling down to something like that, though.
14:50 [Coke] colomon: you're a  music guy: share and enjoy my son's arrangement of this song: https://www.youtube.com/watch?v=i6ZOAQU44es
14:50 FROGGS timotimo: around May 2013
14:51 FROGGS colomon: true, but you only can record the details, and then put it in boxes labeled with a nice task description
14:51 timotimo oh, not terribly old then
14:53 colomon [Coke]: nice job he did!
14:54 guru joined #perl6
14:55 timotimo aye, not bad!
14:57 [Coke] colomon: danke.
15:06 pmichaud what's going on with issue #253  ("add env handling to parrot qx") ?
15:07 timotimo it seems like a non-negligible amount of people visit my blog, but none are interested in the LHF i'm posting
15:07 timotimo i wonder if i should continue digging for LHF to post on my blog
15:07 pmichaud good morning, #perl6
15:07 timotimo pmichaud: currently parrot will not propagate changes to %*ENV when using qx to execute stuff
15:07 pmichaud I understand the problem, I don't understand the proposed solutions.
15:07 timotimo reini made changes to parrot and rakudo to make it work again
15:07 pmichaud ...except that reini keeps posting failing tests
15:08 timotimo i haven't a clue what exactly is going on
15:08 timotimo that branch will have to wait another month anyway, though
15:09 FROGGS pmichaud: yes, there is some sort of confusion going on
15:09 FROGGS I commented again right now
15:10 pmichaud also, reini's proposed patch (c87126f2) is going absolutely in the wrong direction... replacing nqp:: calls with pir:: calls
15:10 timotimo only inside the #?if parrot block, though
15:11 pmichaud I'm not ever a fan of putting more pir:: into the rakudo codebase
15:11 pmichaud whether it's in an #?if parrot or not
15:11 pmichaud beyond that, #?if parrot should be a rarity, not the norm
15:11 timotimo fair enough
15:11 FROGGS pmichaud: I think we can replace that with an nqp::open(... 'rp')
15:11 timotimo that block was there all along ;)
15:12 pmichaud well, all of these #?if thingies have been added since I was last active.  I agree we'll need some... but they should be rare
15:12 FROGGS true
15:12 pmichaud having the ability to shell out with an environment in place should be an nqp-feature, not a rakudo one.
15:12 timotimo mhm
15:12 timotimo that makes sense, yeah
15:12 pmichaud or, at least, we should be solving it at the nqp level
15:13 FROGGS pmichaud: when the code in parrot works, we can make the nqp::openpipe op do all the work, like on moar and jvm
15:14 pmichaud switching VTABLE void set_pmc_keyed(...) to be METHOD void set_pmc_keyed() is almost certainly wrong.
15:16 pmichaud for that matter, $pipe.set_keyed('env', $env);  is almost certainly wrong also.
15:17 jnthn That looks odd to me too
15:17 hoverboard joined #perl6
15:17 FROGGS I am all ears
15:17 jnthn I thought nqp::openpipe was the thing we were putting this behind?
15:17 pmichaud jnthn: yes, I agree it should go somewhere like that
15:17 FROGGS jnthn: still, parrot should support the env handling first (unless we do that on our own like we do for shell/run)
15:17 pmichaud but I don't quite understand Parrot's patch either.... it seems odd to put the environment into the filehandle
15:18 jnthn Are we looking at something that never worked on Parrot here, or are we dealing with a regression of some kind?
15:19 FROGGS jnthn: env handling in qx{} never worked
15:19 jnthn OK.
15:19 jnthn But does on Moar/JVM?
15:19 FROGGS yes
15:19 tadzik problem solved :P
15:19 jnthn OK, then it's not a regression, so we needn't hurry on this ahead of release.
15:19 FROGGS true
15:19 pmichaud I'm more worried that a parrot misfeature is starting to turn into a rakudo misfeature
15:20 jnthn Yeah
15:20 jnthn My expectation is that April's Star release will suggest Moar as the default thing.
15:20 brrt pmichaud, i think i can think of a reason for that
15:20 pmichaud and the comments I'm seeing betray an unfamiliarity with Parrot internals
15:20 FROGGS jnthn: that seems reasonable
15:20 brrt just wait until i renember
15:20 brrt :-)
15:21 FROGGS pmichaud: I am here! you can say that my comments prove that :o)
15:21 brrt nope, forgotten
15:21 FROGGS heh
15:22 pmichaud the whole pipe['env'] = env approach seems very wrong to me.  it seems to me that opening a pipe in parrot should automatically accept the current environment... there shouldn't need to be an explicit pipe['env'] = env step
15:22 FROGGS pmichaud: the current env ist just a hash from rakudo
15:23 pmichaud FROGGS: that's an imprecise statement.
15:23 pmichaud regardless, I reject the patch proposed in #253
15:23 FROGGS m: %*ENV<foo> = "bar" # we do not call setenv here
15:23 camelia rakudo-moar 01d16c: ( no output )
15:24 pmichaud FROGGS: I understand what you're saying.
15:24 FROGGS (or putenv or whatever)
15:24 pmichaud FROGGS: the %*ENV hash is not the current environment... it's rakudo conception of what the current environment ought to be
15:24 pmichaud so saying "the current env is just a hash from rakudo" is imprecise.
15:24 FROGGS so we need to pass %*ENV around, like here to a CreateProcess or spawn or so
15:24 xenoterracide joined #perl6
15:25 pmichaud FROGGS: yes, I know that.  I'm the one that created that approach.
15:25 FROGGS pmichaud: %*ENV is our understanding of the current environment
15:25 arnsholt joined #perl6
15:25 pmichaud I'm saying that passing the environment through Parrot's FileHandle object is not the way we should be doing it.
15:25 FROGGS so I say "current environment" of the viewpoint of a Perl 6 hacker
15:26 moritz what does FileHandle have to do with it?
15:26 FROGGS yes, passing it to the thing that spawns the process might be saner
15:26 FROGGS moritz: opening a pipe seems to be a method on a filehandle
15:26 moritz aaaarrg
15:26 FROGGS :o)
15:26 pmichaud again, imprecise
15:27 FROGGS meh
15:27 pmichaud well, not too bad
15:27 FROGGS meh!
15:27 jnthn As I understand it, nqp::openpipe should take the environment to use for the created process as one of its arguments. Exactly what that boils down to at the Parrot level is up for debate, but Rakudo should absolutely be using nqp::openpipe, meaning that it's NQP that should have any funky code-gen-y things.
15:27 kaare_ joined #perl6
15:27 pmichaud in Parrot, the way one opens a pipe is to create a FileHandle PMC, then invoke the 'open' method using 'rp' as one of the arguments
15:27 pmichaud jnthn: I agree, except I suspect that at some level NQP ought to be environment-aware.
15:28 pmichaud and should provide an API that rakudo could use that more smartly handles things like %*ENV
15:28 pmichaud i.e., we need to push more of Rakudo's environment-handling down into NQP
15:28 jnthn pmichaud: It's not clear to me that'd be better, nor worse. :)
15:28 jnthn pmichaud: That is, "I think you might be right but I don't see it right away" :)
15:28 pmichaud jnthn: well, if spawning and openpipe are at the nqp level, then environment handling probably need to be there also
15:28 jnthn Since %*ENV is contextual in nature.
15:30 pmichaud well, it could be contextual in nqp, too :)
15:30 jnthn :)
15:30 jnthn Point.
15:30 rindolf joined #perl6
15:30 pmichaud anyway, we're in agreement that nqp needs to know more about the environment, whether nqp manages it or lets the hll manage it is open for discussion
15:30 jnthn I'm happy with such a factoring, anyway. Fully agree that we shouldn't be doing more pir::'ing in Rakudo.
15:31 jnthn And yes, #?if mechanism is an escape hatch.
15:31 jnthn The goal is to need them less.
15:31 jnthn JVM and Moar often have the same ideas about things.
15:34 pmichaud I just added my summary/comments to #253
15:35 FROGGS and since nqp should be the glue language for backend specificas, we should be able to factore stuff there (src/vm/...)
15:38 sqirrel_ joined #perl6
15:46 japhb__ FWIW, I believe this *is* a regression, I just don't know when it happened -- because perl6-bench has some code that depends on it, but since last June it's mostly been timotimo++ working on it, so he may have been lucky and not run into the bug before now.
15:48 FROGGS japhb: well, there was a time when we actually changed the environment of our own process
15:50 japhb__ FROGGS: Ah, interesting.  That would certainly explain it.  But it does mean it's a regression from the end-user's point of view, just not a regression in parrot per se.
15:51 FROGGS japhb__: yes, but not a regression happened since the last releases (I know, that does not help much)
15:52 japhb__ FROGGS: Sure -- as I said, I've about a 9 month window when it could have happened.  :-/
15:54 xinming__ joined #perl6
15:56 pmichaud if it's a regression, then that would indicate that rurban's parrot branch isn't needed.
15:57 pmichaud unless something regressed in parrot also
15:57 pmichaud that's pretty easy to check, actually.
15:57 pmichaud I have to run an errand now but might write a short test program when I return.
15:57 FROGGS it is a regression caused by rakudo
15:57 pmichaud so a parrot change isn't needed, right?
15:58 FROGGS because, IIRC, we used to have a proxy in %*ENV that does a setenv/putenv of our process
15:58 FROGGS a parrot change is needed to cope with our %*ENV hash
15:59 pmichaud that's the wrong approach.
15:59 FROGGS either that or we move the entire openpipe code to nqp, as we did with run() and shell()
15:59 pmichaud I suspect that parrot's openpipe already properly handles the environment.
15:59 pmichaud because it apparently used to do so.
16:00 FROGGS the question is: which environment
16:00 pmichaud *the* environment -- the process' environment.
16:00 FROGGS yeah, but we do not touch it enymore, which is a good thing
16:00 pmichaud the fact that rakudo has a separate %*ENV hash is not something that parrot should be considering.
16:01 pmichaud in particular, let's just establish up front that Rakudo's %*ENV is not "the environment".
16:01 pmichaud so, if I say "the environment", I'm not talking about %*ENV
16:01 pmichaud (if I want to talk about %*ENV, I'll say "%*ENV")
16:01 FROGGS k
16:01 pmichaud anyway, I have to run my errand, I'm back in 20.
16:02 FROGGS k
16:02 japhb__ .oO( Do not try to unconfuse Professor Michaud.  He is not confused. )
16:02 moritz so, nqp should call setenv before launching stuff?
16:04 japhb__ moritz: Yeah, I think we're generally agreed that nqp is the right layer for abstracting the VM's env handling.  Unless I misunderstood the backlog.
16:06 FROGGS moritz: that might be a solution, except on machines where you are not allowed to setenv at all
16:06 moritz and there seem to be two general methods: setenv before doing stuff, and passing an env hash to operations
16:06 FROGGS moritz: I am currently searching for informations about that, since I hit that problem back in 2008 or so
16:06 segomos is there a good write up on how to write better modules using roles and "new" stuff now or is it still kind of in an infancy stage?  i'm wanting to write something similar to dbix and i want to use cool new shiny stuff
16:11 lembark joined #perl6
16:19 spider-mario joined #perl6
16:19 isBEKaml joined #perl6
16:20 pmichaud I propose we create nqp::setenvhash(hash)   which updates the current process environment to match 'hash'
16:20 pmichaud openpipe should continue to assume the current process environment is to be passed to the pipe process
16:23 rurban well, it should restore the old env on openpipe exit, I assume
16:24 rurban and it should do nothing on empty cwd and env args
16:24 pmichaud https://gist.github.com/pmichaud/9645412   # parrot already properly passes its environment to child pipe subprocesses
16:28 pmichaud I've updated Parrot issue #1065 with this gist.
16:28 synopsebot Link: https://rt.perl.org/rt3//Pub​lic/Bug/Display.html?id=1065
16:30 pmurias joined #perl6
16:30 pmurias left #perl6
16:30 pmurias joined #perl6
16:31 pmurias pmichaud: so shell shouldn't take the env as an argument anymore?
16:31 pmichaud pmurias: I'm not sure about that coupling.  It seems to me as though "set the environment" ought to be decoupled from shell
16:32 FROGGS pmurias: are you talking about nqp::shell or rakudo's shell() ?
16:32 pmichaud because there are many places where we might want to set the process environment -- it should be factored out.
16:32 TimToady seems like the general idea is that we either pass the proto-environment via dynamic %*ENV, or we pass it via an actual set environment, but rarely/never as an argument
16:33 pmichaud TimToady +1
16:33 FROGGS ahh, hmmm, for some reason I thought rakudo's shell() would take an optional env hash... but it does not
16:33 pmichaud passing it as an argument certainly has precedence in C, though
16:33 TimToady yup
16:33 pmichaud still, I think I prefer to keep "set environment" as its own separate operation
16:34 pmichaud or, put another way:  we should definitely have an nqp:: set environment operation.  Given that, I'd tend to not want another way to do it via nqp::shell().
16:34 pmichaud (i.e., DRY)
16:35 pmichaud I might reconsider if JVM expects an environment as an argument to however it does the shell equivalent
16:36 TimToady it's a bit like the boundary enforcement for NFG--we let our semantic model drift from what the world expects in the interests of better internal consistency, but then enforce the world's view at the edges of the process
16:36 pmichaud correct.
16:36 pmichaud similarly, I don't know that nqp::shell() should have a separate $cwd argument; it should use the process cwd.  But I'm less certain about that one.
16:37 TimToady there maybe trapdoor functions hiding there, if it ever tries to relocate itself relatively, or we can't find an absolute path that works
16:38 TimToady the environment is a bit better behaved that way
16:38 FROGGS pmichaud: the jvm does not provide a way to chdir, so you have to keep what the user thinks is the cwd, and pass that along
16:38 pmurias pmichaud: JVM expecting an argument to the internal shell thing is the reason we pass the env as an argument currently
16:39 TimToady the chdir semantics get excercised at the boundary much more frequenetly than spawning does, I think
16:39 pmichaud FROGGS:  I agree except with the "you have to pass that along" part.  There are other ways to do that.
16:39 guru joined #perl6
16:39 pmichaud pmurias: what's the JVM command for a shell (i.e., where can I see the API/docs for it?)
16:39 FROGGS pmichaud: "you have to feed it to the jvm when invoking a shell" to be more clear
16:40 pmichaud I'd like to see the actual code or API
16:40 FROGGS nqp/src/vm/jvm/runtime/org/pe​rl6/nqp/runtime/Ops.java:877:    public static long shell3(String cmd, String dir, SixModelObject envObj, ThreadContext tc) {
16:40 pmichaud looking.
16:40 pmurias it uses ProcessBuilder
16:41 FROGGS ProcessBuilder pb = new ProcessBuilder(args);
16:41 FROGGS pb.directory(new File(dir));
16:41 FROGGS Map<String, String> pbEnv = pb.environment();
16:41 FROGGS [...]
16:42 TimToady well, if a VM requires it as an argument, then that's one of those process boundaries at which we have to do what the world expects
16:42 pmichaud okay, so it's not JVM that expects it as an argument -- that's an API we created.
16:42 TimToady but if, yeah, that
16:42 pmichaud I'm saying there's a different refactoring that doesn't require env/cwd as an argument.
16:43 SamuraiJack joined #perl6
16:43 jeffreykegler joined #perl6
16:43 pmichaud what JVM is doing seems much closer to POSIX than what we're using as an API
16:43 TimToady does ProcessBuild default to the current envinronment?
16:43 TimToady *er
16:43 pmichaud TimToady: it appears so
16:44 TimToady then really we can decide one way or the other based on which is more efficient or "safer"
16:44 pmichaud but ProcessBuilder appears to allow you to set the cwd of the new process
16:44 TimToady specified as a race condition^W^Wstring?
16:45 FROGGS so we should call nqp::getlexdyn('$*CWD') at that point instead of getting it passed to, say, shell()? Is that what we want?
16:46 pmichaud FROGGS: that's not exactly what I'm proposing, now.
16:46 pmichaud *no
16:46 FROGGS k
16:47 pmichaud I'm proposing that creating a HLL shell operation should be some combination of:   nqp::setcwd($*CWD);  nqp::setenv(%*ENV);  nqp::shell(cmd);
16:47 timotimo the good thing about enforcing environment and cwd at boundaries only is that we can have "my $*CWD" and friends work out naturally
16:47 pmurias nqp::setenv will have to be emulated on the jvm
16:48 pmichaud it has to be emulated pretty much anywhere
16:48 pmichaud and it should be nqp::setenvhash(%*ENV)
16:48 pmichaud (typo in my original -- "setenv" actually has another meaning to folks)
16:48 pmichaud but it seems to me that nqp::setenvhash() is just
16:49 pmichaud Map<String, String> pbEnv = pb.environment();
16:49 pmichaud pbEnv.clear();
16:49 pmichaud pbEnv.putAll(env);
16:49 pmichaud with some slight variation to handle the different forms that env might take
16:50 pmurias but that sets the env variables for the new process but doesn't change the env variables in the current one
16:50 pmichaud it doesn't?
16:50 timotimo no, the pb will be recreated for each invocation of nqp::shell
16:51 pmichaud huh?
16:51 pmurias it seems to be impossible to change the current env variables
16:51 timotimo there has to be some internal variable that carries the data from nqp::setenvhash to nqp::shell
16:51 timotimo on the java side, that is
16:51 pmichaud that's not how I'm reading the code
16:51 isBEKaml pmichaud: that's from processbuilder. That's only if you're planning to execute any programs off the current shell. If you want to access env variables, you can use System.getenv("prop name")
16:51 timotimo i should look closer
16:51 FROGGS timotimo: that is what we currently have in the HLL :o)
16:51 isBEKaml pmichaud: That said, it's good to see you back here. :-)
16:52 pmichaud I'm looking at the code now, and the way that the environment is being set is by simply modifyinb pbEnv.  I don't see anywhere that pbEnv is being linked up with the ProcessBuilder object.
16:52 isBEKaml pmichaud: Can you post link?
16:52 pmurias pbEnv = pb.environment()
16:53 timotimo ah
16:53 isBEKaml pmurias: pb --> ProcessBuilder
16:53 pmichaud https://github.com/perl6/nqp/blob/master/src/vm/​jvm/runtime/org/perl6/nqp/runtime/Ops.java#L931
16:53 timotimo now i see where your confusion comes from
16:53 pmichaud oh, I get it.
16:53 timotimo note that th ebeginning of the "private" spawn method is to create a new ProcessBuilder
16:53 pmichaud yes, I see the link now.
16:53 pmichaud pbEnv is the pb's environment
16:53 pmichaud okay.
16:53 isBEKaml pmichaud: yes. exactly.
16:54 FROGGS so we have exactly the same problem for cwd and env, which is not a bad thing
16:54 FROGGS (on jvm)
16:54 pmichaud well, not necessarily
16:54 pmichaud because pb.environment() defaults to the current process environment
16:55 FROGGS in kinda inherits from it, yes
16:55 FROGGS if we had a way to change the current env...
16:56 timotimo sadly, my optimizer changes to nqp to make +@foo and 1 + @foo give integer operations caused S03-operators/identity.rakudo.moar to regress
16:56 FROGGS pmichaud: http://stackoverflow.com/questions/318239/h​ow-do-i-set-environment-variables-from-java
16:56 pmichaud and yes, it appears that jvm doesn't provide a clean way to change the current process' environment.  I'm not necessarily sad about that, but I do want to rethink the API a bit
16:58 jeffreykegler left #perl6
16:58 myfree joined #perl6
16:59 pmichaud what's the JVM equivalent of exec(), ooc?
17:00 pmichaud or is there no such animal?
17:00 isBEKaml awkward animals.
17:01 FROGGS http://www.javaworld.com/article/2071275/​core-java/when-runtime-exec---won-t.html
17:01 isBEKaml pmichaud: ProcessBuilder and Runtime.exec were meant for that. It turned out that inheriting environments isn't always quite feasible.
17:02 isBEKaml pmichaud: so you end up building your own set of properties to use and importing them into spawned processes.
17:02 pmichaud isBEKaml: in other words, there's not an exec() exact equivalent
17:02 pmichaud i.e., one that replaces the current process with a new command
17:02 isBEKaml pmichaud: that's where we use Map<String, Object> objects.
17:02 masak Util++ # Parrot release mail quote
17:03 pmichaud isBEKaml: those all sound as though they're creating new processes, though
17:03 isBEKaml pmichaud: Nothing exactly same as system() or backticks. No.
17:03 pmichaud system() creates a new process.  backticks create a new process.   exec() replaces the current process image with a new image.
17:04 pmichaud so, I'm not looking for a system() or backtick equivalent, I'm looking for an exec() one.
17:04 isBEKaml pmichaud: No, we don't have one on the JVM side of things.
17:05 dalek doc: 8535ec3 | Mouq++ | lib/modules.pod:
17:05 dalek doc: Blindly copy module information from archived wiki
17:05 dalek doc:
17:05 dalek doc: (This will need to be updated)
17:05 dalek doc: review: https://github.com/perl6/doc/commit/8535ec3b08
17:05 pmichaud okay.  so that's something we'll only be able to emulate (badly) or declare is not supported
17:06 treehug8_ joined #perl6
17:07 isBEKaml pmichaud: well, if you understand that JVM by itself is a sandboxed environment, you'll see that it's meant to not execute off its current environment. So out goes exec() -- though I remember seeing something like that somewhere. Let me do some searching to see if there's one.
17:07 pmichaud isBEKaml: yes, I understand it -- just needed some confirmation that this is the case
17:07 pmichaud exec() is the only place where I can think of that it'd be important to get the process environment to match %*ENV
17:07 pmichaud although TimToday++ undoubtedly will know if there are others :)
17:07 timotimo and jvm doesn't have exec()
17:08 timotimo so we can probably safely emulate %*ENV for everything on jvm
17:08 pmichaud well, I think we have to emulate %*ENV everywhere
17:08 timotimo if someone choses to exec using NativeCall ...
17:08 timotimo they'll likely run into other problems :)
17:08 pmichaud well, via NativeCall we'd be able to modify the current process environment, yes?
17:08 pmichaud (I'm not familiar with how NativeCall works either... I'm about a year out of date)
17:09 arnsholt jnthn: Could you try nqp/jastcompiler and Rakudo a whirl, BTW?
17:09 arnsholt I suspect I've broken something, but I'm not entirely sure =)
17:09 timotimo oh, yeah, with NativeCall the user probably could
17:09 timotimo wouldn't be terribly surprised if the JVM laid some more stones in our way for that, though >_>
17:10 masak feature request for Rakudo: make it impossible to build Rakudo on an outdated NQP or Moar.
17:10 timotimo masak: well, if you constantly Configure.pl like any sensible person ... ;)
17:10 pmichaud masak: ???   Doesn't rakudo already do that check?
17:11 pmichaud I don't believe in making it "impossible".
17:12 pmichaud I would be okay with having a check done at each 'make' invocation, instead of only at Configure.pl time
17:12 timotimo oh, whoops
17:12 FROGGS it only croaks if you reconfigure
17:12 FROGGS err, yes
17:12 timotimo letting prefix:<+> look ahead for a @ can easily break down
17:12 timotimo for example in this line: return +@!BLOCKS[$i].symbol($symbol)
17:13 timotimo (this type doesn't support elems)
17:13 pmichaud doing a lookahead for syntax is almost certainly wrong
17:13 masak ok, "impossible" is a strong word.
17:13 timotimo aye.
17:13 masak I meant, used to be with Parrot the `make` invocation told me if the dependencies were too old, and refused to build.
17:13 timotimo should have realized that earlier :)
17:13 masak I'd like that.
17:14 timotimo masak: are you sure you're not thinking of having an older Makefile than Makefile-Parrot.in?
17:14 pmichaud we can easily come up with a build tool that checks dependencies
17:15 pmichaud does Parrot no longer check the dependencies?
17:15 pmichaud er
17:15 masak timotimo: I don't know the exact circumstances.
17:15 pmichaud do we no longer check the dependencies even for Parrot builds?
17:15 masak timotimo: but I know this: I git `git pull`, `make`, and then the build failed.
17:15 timotimo Configure.pl will loudly complain if the *_VERSION files are not met
17:15 SamuraiJack_ joined #perl6
17:15 timotimo but make alone will never do thtat
17:15 pmichaud timotimo: make used to do that
17:15 masak timotimo: it was *fixed* when I re-configured, but I think `make` should be clever enough to not waste time building something that won't build.
17:16 kaare__ joined #perl6
17:16 masak yes, make used to do that.
17:16 masak it was nice.
17:16 timotimo oh, ok
17:16 pmichaud geez, so many absolutes in this channel now!   "impossible"  "never"
17:16 timotimo must have been before my time :P
17:16 masak pmichaud: :P
17:16 masak why *shouldn't* make do that?
17:16 isBEKaml pmichaud: we even have P6BP! :P
17:16 timotimo (which obviously doesn't mean "make will never do that" is wrong. because if it ever did, it did so before my time! which, you see ...)
17:16 masak isBEKaml: we do!?
17:17 isBEKaml masak: well, there you are. :P
17:17 pmichaud maybe I should just crawl back under a rock for another year :)
17:17 masak no please stay
17:17 timotimo oh, btw, who am i going to see at the GPW?
17:18 pmichaud I'm still working out my schedule after having had my spring/summer completely jumbled around for a couple of weeks.
17:18 FROGGS <---
17:18 isBEKaml pmichaud: No -- please don't ! It's fun to see someone who says "OMG, where has the world gone to??!!" :D
17:19 pmichaud well, I have to take a break for a bit... bbl
17:19 myfree left #perl6
17:19 FROGGS soup &
17:23 [Coke] masak: yes, that should be doable. Please open a ticket. We can figure out that dependancy.
17:24 * masak submits rakudobug
17:25 denisboyun joined #perl6
17:27 [Coke] very excited to see progress on parrot #582
17:27 [Coke] (Add 6model to Parrot)
17:31 isBEKaml [Coke]: how goes mojo port to perl6? :-)
17:46 guru joined #perl6
17:46 [Sno] joined #perl6
17:50 [Coke] isBEKaml: work is interfering. haven't had a lot of cycles.
17:52 SamuraiJack_ joined #perl6
17:53 masak [Coke]: here you go: 🚲
17:53 [Coke] ooh, a diamond with a question mark.
17:53 [Coke] sweet.
17:54 masak :P
17:55 * masak .oO( clearly it's an empty rectangle, not a diamond with a question mark )
17:59 FROGGS joined #perl6
18:01 rylinaux joined #perl6
18:06 Ryan_ joined #perl6
18:14 [Coke] masak: as someone who is about to try to convince a PM to use stylized unicode numbers rather than going out to find an icon set of numbers, I sympathize.
18:15 timotimo a perl monger?
18:15 timotimo prime minister?
18:16 arnsholt Project Manager, probably
18:16 timotimo ah
18:16 timotimo that makes more sense
18:17 TimToady someone should rewrite irssi in Perl 6, and fix everything that's wrong with it :)
18:17 vendethiel Does somebody have a graph for perl6-jvm perfs when the JIT is hot ?
18:18 arnsholt I must confess I don't really have any things that really annoy me with irssi
18:18 TimToady yes, somebody does :)
18:18 vendethiel Trying to get somebody interested in perl6 :p.
18:19 TimToady arnsholt: well, not rendering characters that I have the fonts for, for one
18:19 timotimo vendethiel: http://t.h8.lv/p6bench/2014-03-09-every_perl.html
18:19 timotimo (but please mention that the microbenchmarks are not very good)
18:19 vendethiel timotimo++ # which ones are the least-micro ?
18:20 arnsholt TimToady: Oh, that does sound annoying. OTOH, it does sound like a bug in your terminal emulator rather than irssi =)
18:20 timotimo vendethiel: at the very very bottom
18:21 arnsholt rc-forestfire shows the JIT at work
18:21 TimToady arnsholt: yes, that's certainly possible
18:21 timotimo aye, the forestfire benchmark is a good one for seeing how the jit warms up
18:21 vendethiel arnsholt: yeah, I took this one :-)
18:21 arnsholt Rakudo doesn't do very well on it, but the graph for nqp-jvm is nice
18:21 TimToady perhaps the most important thing to point out is that the performance of Perl 6 will approach the performance of nqp as our optimizer gets better
18:22 arnsholt Starts out pretty slow, but as the JIT heats up it actually ends up faster than Perl 5
18:22 vendethiel timotimo: need to do it again with jdk 1.8 :-)
18:22 timotimo will have to, yeah
18:22 timotimo also point out by how much the rakudos and nqps get faster between the regular and _native variants of some of the microbenchmarks
18:22 TimToady in particular, forest-fire uses 2-D arrays that will be much, much faster someday soon
18:23 TimToady once we have shaped arrays of known, preallocated sizes
18:23 timotimo and when the type specializer (perhaps) starts removing bounds checks
18:23 TimToady of native values
18:24 timotimo when we have very fast, shaped native arrays, that'll give us something nice for Modern OpenGL™
18:24 TimToady not so much the bounds checks as it is all the redispatch to at_pos, and the checking for element existence for autoviv
18:24 timotimo ah, yes, shaped arrays of natives won't ever do autoviv
18:24 timotimo right?
18:25 TimToady no, but we need to teach the compiler about lvalues, which it's pretty ignorant of currently
18:25 TimToady same problem as doing $a++ on a native, basically
18:25 timotimo ah, that one
18:25 timotimo that keeps cropping up more and more often
18:26 hoverboard joined #perl6
18:26 TimToady we need something like C's pointer to native types to be able to talk about lvalues
18:27 TimToady though one can fake it up to a point
18:27 TimToady and indeed JVM kinda forces you to fake it
18:27 vendethiel Also -- I'm trying to get the post of perl6advent that adds custom operators, like the exponential one, describes a macro `/* */` but my search do'nt bring anything up
18:28 TimToady so our "pointers" are likely to be array/hash refs with precalculated sublocations when we can't use C pionters
18:28 TimToady *oi
18:29 TimToady vendethiel: need a link to understand what yer askin'
18:30 vendethiel TimToady: I need a link myself, actually ;-)
18:31 vendethiel TimToady: There's a really cool perl6advent post that got me interested in perl6 in the first place, creating custom operators to deal with error percents
18:32 vendethiel and some other mathematical notations (basically introduces sub infix:...) and also has, IIRc, an example of a macro that could parse `/* */` comments
18:32 timotimo http://perlgeek.de/blog-en/perl-​5-to-6/13-custom-operators.html ?
18:32 timotimo oh, actually notd
18:33 vendethiel timotimo: I do believe it was a perl6advent blog post
18:33 TimToady actually, to do /* */ correctly requires not a macro, but a tweak to the definition of whitespace
18:34 vendethiel TimToady: it was maybe a "fake" example in that it didn't actually really work, but demonstrated a possibility
18:35 TimToady our current macros can only replace a term, really
18:35 TimToady once we generalize that to replacing any syntactic category, then you could put a macro into the comment: space instead
18:36 timotimo http://perl6advent.wordpress.com/2012/12/​18/day-18-formulas-resistance-is-futile/ ?
18:36 TimToady it's vaguely possible it could be forced to work currently somehow
18:36 vendethiel timotimo++ # thanks ! I believe that's it !
18:38 vendethiel Definitely :-)
18:38 vendethiel I'll try to look for the macro and stuff one later, though.
18:38 TimToady m: macro comment:</* */> () { '' }; say 1 /* phooey */ + 41
18:38 camelia rakudo-moar 01d16c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RURkzDIp31â�¤Cannot add tokens of category 'comment'â�¤at /tmp/RURkzDIp31:1â�¤------> [32mmacro comment:</* */> [33mâ��[31m() { '' }; say 1 /* phooey */ + 41[0mâ�¤    expecting any of:â�¤       …»
18:38 TimToady yeah, not supported yet
18:39 TimToady or augment slang might work someday too
18:40 TimToady but that all probably depends more on the HLLization of the P6 parser that I mentioned yesterday
18:40 TimToady we can't really claim that all other languages are just dialects of Perl 6 till that happens :)
18:40 * vendethiel .oO(Perl6 is getting slower yet) :p
18:42 TimToady well, we can pessimize it lazily at the point where you try to make it do something fancy :)
18:44 TimToady it would be fun to try to write a yacc grammar for the subset of Perl 6 that people usually use, and switch out to the recursive descent when yacc isn't suitable, for instance
18:46 TimToady there are also probably ways to cheat on how often we have to generate a new lexer, which slows things down when you define new operators
18:47 TimToady or to remember the lexer you generated last time you were here
18:48 TimToady at some point it starts looking more like an incremental compiler if you do that
18:50 TimToady but obviously there's still lots of room for improvement, and we hope that we're not locking anything into the design that precludes such improvements
18:52 tgt joined #perl6
18:55 TimToady another way to cheat is to keep short exception lists in grammatical categories, so, for instance, a few unambiguous postfixes might just be added to an exception list rather than being immediately compiled into a new lexer, especially if it's easy to recognize the exceptions based, say, on their first character
18:56 TimToady there are no other postfixes that start with ! for instance, so it's really easy to look up a ! postfix as an exception to the current postfix lexer
18:56 TimToady likewise most unicode symbols will be unique in the first char
18:57 TimToady so basically you install a 1-level trie in front of the lexer for the category in question
18:59 TimToady you could add all the operators in that advent post without ever recalculating a new lexer
19:01 PerlJam hmm.
19:01 TimToady or another way to view it would be to say that the lexer is really allowed to decide when it needs to redo the FSA
19:02 PerlJam TimToady: you seem to be feeling much better; is this true?  :)
19:02 TimToady or perhaps more importantly, the distinction might be whether the lexer is allowed to mutate itself in place
19:03 TimToady PerlJam: well, considering I hacked in all the Unicode stuff while I was having pneumonia, I dunno how you'd tell the difference :)
19:04 PerlJam volumetric analysis of your text + cogency  ;)
19:05 nwc10 pmichaud: this blog post about how JRuby fights the JVM to do fork, exec, etc might be relevant: http://blog.headius.com/2013/06/t​he-pain-of-broken-subprocess.html
19:05 nwc10 timotimo: I'm going to the German Perl Workshop
19:06 TimToady { Language A .... mutate-to-lang(B) .... Language B }; as long as there's no need for Language B to ever refer to Language A as a subset, you can just mutate the current Language A lexer into Language B
19:06 TimToady and you just throw away the mutated lexer at the end of the block anyway
19:06 TimToady but that's assuming Langauge A didn't come from outside the block
19:07 TimToady so you have to clone the langauge at least once, but after that you can just mutate in place
19:08 TimToady s:g/gauge/guage/
19:09 timotimo nwc10: cool :)
19:10 TimToady you can do the same sort of cheating with Cursors when you know the old Cursor isn't going to be reused to backtrack with, for instance
19:10 nwc10 I assume that FROGGS is, given that he's speaking: http://act.yapc.eu/gpw2014/talk/5252
19:11 FROGGS nwc10: \o/
19:12 nwc10 wendy and Liz are "confirmed" according to act
19:25 kivutar joined #perl6
19:31 TimToady .oO(The JVM interprets sanity as damage and routes around it.)
19:34 geekosaur ain't that the truth
19:35 Rotwang joined #perl6
19:50 lizmat nwc10: indeed
19:51 lizmat Sex and Violence: Social and Technical Lessons from the Perl 6 Project ( http://www.linux-gull.ch/GestionActiv​iteDocumentDamianConway20140401.html )
19:51 lizmat another TheDamian presentation
19:52 nwc10 PHP 353, Perl 12. We lose
19:52 nwc10 http://www.cvedetails.com/produc​t/128/PHP-PHP.html?vendor_id=74 vs http://www.cvedetails.com/product/13​5/Larry-Wall-Perl.html?vendor_id=81
19:52 nwc10 that really is quite a spectacular difference. :-/
19:54 brrt joined #perl6
19:57 PerlJam Why does the perl data stop at 2007?
19:57 nwc10 yes, good question.
19:58 nwc10 OK, 353 vs 15: http://www.cvedetails.com/product/1​3879/Perl-Perl.html?vendor_id=1885
19:58 nwc10 The[ir] data is crap
19:58 PerlJam clearly
19:59 PerlJam But if people are going to use TIOBE to say that Perl is dying, we can use this to say Perl is secure  ;)
20:02 btyler_ joined #perl6
20:03 * masak .oO( Eskimoes interpret fifty words for snow as damage, and route around them )
20:07 rjbs PHP interprets security as damage and routes around it?
20:07 FROGGS_ joined #perl6
20:08 lizmat .oO( 353 shades of grey? )
20:08 treehug88 joined #perl6
20:10 nwc10 I wonder whether their data cleaned up could be made into a graph that superficially looks like usage
20:10 nwc10 (with Perl really low)
20:10 nwc10 but then the punchline is that it's CVEs
20:11 rjbs haha
20:11 brrt easy shots at php again :-)
20:11 brrt i think the CVE-count is pretty low for perl6 as well
20:11 rjbs of course, the counter-snipe is that it IS about usage
20:12 rjbs "perl has so few CVEs because nobody targets it"
20:12 nwc10 Python is split between http://www.cvedetails.com/product/182​30/Python-Python.html?vendor_id=10210 and http://www.cvedetails.com/product/2147/Python-​Software-Foundation-Python.html?vendor_id=1238
20:12 rjbs bunk, but would get airplay
20:12 nwc10 Python and Ruby are (also) much lower than PHP
20:12 brrt php has lots of bugs, surprising no one
20:12 nwc10 so would need some data cleanup to try to be fair
20:13 nwc10 PHP manages to have CVEs on its CVE fixes
20:13 rjbs hah
20:13 nwc10 and create CVEs due to shipping a version with failing tests
20:13 rjbs strikes me as useful to discredit PHP, which nobody needs to do
20:13 rjbs publicizing it would be a bit like kicking a guy while he's down
20:14 vendethiel php contributors are known not to update related tests, though ... At least they used to
20:14 nwc10 yes, agree
20:15 PerlJam Better that we not bash on any other language, but rather tout the merits of the language(s) we love.
20:15 xinming_ joined #perl6
20:16 nwc10 yes, agree.
20:16 nwc10 This was partly a thought experiment, and partly shock at *how* big the difference is
20:17 masak everything about PHP is depressing. even its lack of security.
20:18 masak it's as if someone deliberately designed a language for people who just plain don't care.
20:20 nwc10 implemented by people who don't care (too lazy to look up "Paamayim Nekudotayim") with code review that didn't care either
20:21 perigrin masak: actually I think basedon the quotes I've heard ... that *is* the design principle behind PHP.
20:21 PerlJam That's close to factual I think.
20:22 PerlJam Didn't petdance offer to help clean up the PHP codebase (by providing patches) and got a "thanks, but no thanks" ?
20:22 huf they did basically fire the one guy who seemed to care about security :D
20:22 huf years and years ago
20:23 perigrin "I really don't like programming. I built this tool to program less so that I could just reuse code." - Rasmus
20:23 bjz joined #perl6
20:24 masak nwc10: "Although it has been confusing to many developers who do not speak Hebrew, it is still being used in PHP 5" -- what. the. phaamayim.
20:24 masak to be fair, that's the first thing about PHP where I crack a reluctant smile, rather than putting my head in my hands or banging it against a wall.
20:25 huf that's honestly the least of the problems, yeah
20:25 masak it's just so... inept.
20:25 huf not even that, it's just a quirk
20:25 huf "0e8217321" == "0e171717" is the really inept thing.
20:25 huf much more "representative" of a fuckup than the ivrit token name
20:26 masak yep.
20:26 masak that puts me back to "depressed" again.
20:27 huf and this isnt even an implementation bug, it's a "spec" bug :D js has similar ones.
20:27 PerlJam So ... how about those awesome feed operators in Perl 6?  And the neat-o asynchrony?
20:27 huf probably not *quite* as bad, but if you treat types as suggestions AND have operator overloading, you're gonna have these
20:28 masak PerlJam: yeah. we should all build awesome indespensible apps on top of that.
20:29 vendethiel huf: don't make me more sad hahaha
20:29 huf vendethiel: sorry, i'm a cloud of depression.
20:32 stevan_ joined #perl6
20:45 kbaker_ joined #perl6
20:55 BenGoldberg joined #perl6
21:04 kbaker_ joined #perl6
21:17 dayangkun joined #perl6
21:35 moritz std:
21:35 moritz eeks
21:35 moritz std: my Int|Str $foo
21:35 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Multiple prefix constraints not yet supported at /tmp/35yFfqrnUQ line 1:â�¤------> [32mmy Int[33mâ��[31m|Str $foo[0mâ�¤Malformed my at /tmp/35yFfqrnUQ line 1:â�¤------> [32mmy Int[33mâ��[31m|Str $foo[0mâ�¤    expecting any…»
21:35 lizmat std: my IntStr $foo
21:35 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�In my declaration, typename 'IntStr' must be predeclared (or marked as declarative with :: prefix) at /tmp/QfVsFl253U line 1:�------> [32mmy IntStr[33m�[31m $foo[0m�Malformed my at /tmp/QfVsFl253U line 1:�------> [32m…»
21:36 lizmat weren't there some dual types specced but not implemented yet ?
21:36 vendethiel std: subset IntStr where Int | Str; my IntStr $a;
21:36 camelia std 09dda5b: OUTPUT«ok 00:01 124m␤»
21:37 vendethiel lizmat: Int|Str and Int&Str are speced
21:39 brrt folks, help me out here
21:40 brrt somebody claims that to sum numbers from 1 to N, you'd need O(N^2)
21:40 brrt not sure of space or memory, but whatever
21:40 brrt i can sum numbers from 1 to n in constant time
21:40 tadzik somebody is wrong :)
21:41 tadzik you can do that in constant time and space alright
21:41 brrt i'd think so
21:41 brrt maybe he means the solution is on the order of n^2, which is true
21:42 brrt but that is not the right way to use O
21:42 moritz tadzik: that's not true
21:43 moritz tadzik: the result needs O(log(N)) bytes, which you can't compute in O(1)
21:43 tadzik oh, heh
21:43 brrt .... such truth
21:43 * brrt tends to take integer arithmetic as constant-time-always
21:43 brrt especially with 64 bit
21:43 moritz I'm not sure about the time complexity of multiplying numbers, but it's not O(1)
21:44 brrt 64 bit ought to be enough for everybody
21:44 tadzik yeah, I wanted to say "unless you jump into bigints", but found that to be bikeshedding :Y
21:44 brrt you can do multiplication in O(1) if you have enough transistors
21:44 moritz well, that kind of bikeshedding is what complexity theory is all about
21:44 PerlJam masak: He didn't say O(1), he said O(C)  ;)
21:44 PerlJam er, moritz
21:44 moritz PerlJam: and C = log(N) ? :-)
21:44 tadzik I assumed int operations being all O(1) in a hypothetical tool used to compute that
21:45 tadzik which is not true in a general case :)
21:45 PerlJam If you have a quantum computer, all algorithms are O(C)  :)
21:45 brrt i still don't actually believe that
21:45 flussence rakudo-m: https://gist.github.com/flussence/3007551
21:46 flussence does... that not work?
21:46 flussence perl6: https://gist.github.com/flussence/3007551
21:46 flussence huh.
21:46 flussence it used to.
21:46 camelia rakudo-parrot 01d16c, rakudo-jvm 01d16c, rakudo-moar 01d16c, niecza v24-109-g48a8de3: OUTPUT«125000250000␤»
21:46 flussence -ENOPATIENCE
21:47 moritz ECAMELIASLOW
21:48 * brrt sometimes forgets p6 can be quite nice and readable
21:49 dalek specs: 57750d0 | (Elizabeth Mattijsen)++ | S22-package-format.pod:
21:49 dalek specs: Some more clarifications, especially with provides
21:49 dalek specs: review: https://github.com/perl6/specs/commit/57750d03f2
21:49 lue Int|Str doesn't exist anymore IIRC
21:49 moritz correct
21:49 moritz it never really existed
21:49 moritz just as a vague, unimplementable idea in the specs
21:50 geekosaur the specs used to include a lot of pie in the sky ideas
21:50 geekosaur they probably still do in places
21:53 PerlJam b: say "hi"
21:53 camelia b : OUTPUT«sh: 1: install/bin/perl6: not found␤»
21:53 PerlJam IS that meant to still work?
21:53 tadzik what's b?
21:54 PerlJam beta
21:54 tadzik oh
21:54 tadzik right, pre-nom :)
21:54 PerlJam and old incarnation of rakudo
21:58 moritz bejing, actually
21:59 PerlJam oh. that's right.
21:59 moritz it's meant to work, but I don't think I can be bothered to fix it
21:59 PerlJam .oO( so many old things )
22:11 woolfy joined #perl6
22:12 lue heh, on a wiki page listing reasons various languages suck, for Perl: "what's with all the $,@,%,& things in front of variables? It takes a lot of effort to type those redundancies every single time"
22:16 stevan_ joined #perl6
22:18 perigrin PerlJam: are you commenting on the code? or the channel's participants ...
22:19 bjz joined #perl6
22:27 * brrt off
22:27 brrt left #perl6
22:33 stevan_ joined #perl6
22:40 treehug88 joined #perl6
22:41 treehug88 joined #perl6
23:06 skids joined #perl6
23:10 masak moritz++ # "You can't just slap on union types onto an existing type system, and have it magically work out."
23:10 masak as I mentioned the other day, sum types are weird.
23:10 masak they basically represent runtime indecision.
23:11 masak (whereas product types only represent combination)
23:11 masak 'night, #perl6
23:25 japhb__ .tell jnthn Segfault and oddness in perl6-debug-m; see http://irclog.perlgeek.de/m​oarvm/2014-03-19#i_8463775
23:25 yoleaux japhb__: I'll pass your message to jnthn.
23:27 jnthn Hurrah intrenets again...
23:27 yoleaux 23:25Z <japhb__> jnthn: Segfault and oddness in perl6-debug-m; see http://irclog.perlgeek.de/m​oarvm/2014-03-19#i_8463775
23:28 rurban1 joined #perl6
23:28 * jnthn is relieved Plan C to fix this worked out, after Plan A and Plan B to fix the lack of it failed...
23:31 japhb__ yipes
23:31 jnthn Yeah. Having 2 ways of getting connectivity should cover you...unless they fail for the first time in O(years) for entirely different reasons within days of each other.
23:32 japhb__ Nodnod
23:32 japhb__ (employer-paid) cell phone tethering for the win
23:32 jnthn Well, that's what I'd fallen back on when my wired connection failed recently
23:33 jnthn Since I had a bunch of travel/teaching of late I figured I needn't rush to solve it the next day.
23:33 jnthn Then the fallback got busted too, in a well-meaning "give jnthn a better/faster 3G plan" failure.
23:34 japhb__ Ouch.
23:35 jnthn Plan A was a simcard swap with $other-employee, until we realized our phones had different sizes of SIM card. o.O Plan B was pick up a new ADSL model, which I thought was what had failed. Alas, the new one can't actually get a connection either.
23:35 jnthn s/model/modem
23:35 jnthn So it's probably not that bit that's failed anyway.
23:37 japhb__ Depending on how far you are from your CO (telco central office), it could be the equipment there, or the RT (telco "remote terminal", neighborhood DSL concentrator), or the wiring between ....
23:37 ilogger2 joined #perl6
23:37 jnthn Yeah. I'll ahve to get 'em to have a look.
23:40 japhb__ Depending on the quality of your telco/ISP, they can run tests relatively easily that can tell them not just what the failure is likely to be, but where it is (how many virtual meters from the CO equipment, where the "virtual" part comes from equipment latency masquerading as distance)
23:41 pecastro joined #perl6
23:42 japhb__ One of the DSL testers at my previous company used to say "If the answer is less than 100 feet, it's inside the CO building -- which generally means the telco accidentally disconnected or misconnected the wires."
23:42 japhb__ Happens surprisingly often.
23:44 slavik joined #perl6
23:46 jnthn Yeah, I had an incident like that happen to be back in Slovakia. Came to fix/install something for somebody else, and accidentally knocked mine out while there.
23:54 stevan_ joined #perl6
23:57 guest93 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo