Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-07-07

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 augustus i mean when writing the slangs, you must do it in NQP?
00:00 sorear oo, jsp
00:00 lizmat r: my $a=1; say $a; $a=Nil; say $a  # should say 1 (Any)
00:00 camelia rakudo 516d49: OUTPUT«1␤Nil␤»
00:01 FROGGS augustus: I only know that one can do it in nqp, I'm not sure if it is possible or not in rakudo/Perl 6
00:01 lizmat I've fixed src/vm/parrot/guts/container.c to always check for Nil and put the default value instead if Nil was the value to be assigned
00:02 lizmat A number of spectests fail because of this specced behaviour
00:02 lizmat I've listed them at https://gist.github.com/lizmat/5941715
00:02 augustus froggs: I see. I'm not clear on how much it matters.  I expect that 95% of the work is just translating the grammars, the actual actions are probably quite simple.
00:02 lizmat along with the diff
00:03 lizmat I will look at the failing tests more deeply tomorrow
00:03 lizmat of course, if anybody wants to beat me to it, feel free!
00:06 labster I'll try to fix the io tests at the end of that list
00:07 augustus froggs: also, I understand it should be theoretically possible to load an XML schema, have it generate a new grammar, which can then be used, all at compile time, right?
00:07 colomon test finished.
00:08 colomon 18 mins on the MBP (for JVM spectest)
00:08 FROGGS augustus: should be possible, yes
00:08 colomon Is that really 900+ more passing tests than this morning?!?
00:09 augustus froggs: is there any documentation about grammars that would help me understand how to dynamically build one, or is that something I kinda have to trial-and-error?
00:10 BenGoldberg joined #perl6
00:10 FROGGS augustus: are you familiar with Perl 6 grammars in general?
00:11 augustus froggs: i have read through the synposises (sp?) I guess, but I have not done a serious one yet
00:11 augustus froggs: so generally yes, but not in a detailed way
00:12 FROGGS augustus: this is a good start: http://www.youtube.com/watch?v=oo-gA9Z9SaA
00:12 FROGGS but I'm not sure what the best way is to build a grammar by a given schema
00:12 augustus froggs: ok cool, I will check it out.  As a general thing, are the synpsosises still current?  i'm having trouble telling what documentation has been superceded
00:12 lizmat TimToady: I got a working rakudo that always sets the default on a container when Nil is assigned to it
00:13 FROGGS augustus: the synopsis are usually up-to-date, yes... but you cant be sure that everything is implemented what you read there
00:13 lizmat as a side effect, this makes $/ to be (Any), and causes things such as $/.chars to fail, as Any does not have a .chars
00:14 lizmat e.g.  perl6 -e "'abcdefghij'.trans(/<[aeiou]> \w/ => '')"
00:14 lizmat No such method 'chars' for invocant of type 'Any'
00:14 lizmat in method increment_index at src/gen/CORE.setting:5140
00:14 lizmat in method increment_index at src/gen/CORE.setting:5137
00:14 lizmat in method next_substitution at src/gen/CORE.setting:5160
00:14 lizmat in method trans at src/gen/CORE.setting:5202
00:14 lizmat the code that fails is " $!index = $!next_match + $/.chars;"
00:14 augustus froggs: is there any better place for documentation?
00:15 lizmat TimToady: I guess this indicates a more general problem with Nil.  Perhaps this can be solved by making $/ to be an Iterator by default, just like Nil now is?
00:16 FROGGS augustus: http://doc.perl6.org/ and the test suite here: https://github.com/perl6/roast
00:17 lizmat calling it a day now, gnight #perl6!
00:17 colomon \o
00:17 FROGGS gnight lizmat
00:17 augustus froggs: ohh excellent thank you.
00:17 FROGGS augustus: you're welcome
00:17 woolfy1 joined #perl6
00:19 augustus on a completely unrelated note, I assume that junctions should work with smart-matching right?  I was having problems with type checking like Int ~~ [&] @list to verify that everything in a list is an Int etc.  The junctions just refused to work with ~~ in any way; but this was Rakudo* from like May 30th.
00:22 colomon augustus: I don't think you can type check like that.
00:22 colomon all(@list) ~~ Int ought to work, I think
00:22 colomon rn: my @list = 1..10; say all(@list) ~~ Int
00:22 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«False␤»
00:22 colomon rn: my @list = 1,10; say all(@list) ~~ Int
00:22 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«False␤»
00:22 colomon or not
00:23 colomon rn: my @list = 1,10; say so all(@list) ~~ Int
00:23 augustus colomon: I think it should work in general
00:23 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«False␤»
00:23 lue r: my @a = 1,2,3; my @b = 5,6,7.89; say ?(@a »~~» Int).all; say ?(@b »~~» Int).all;
00:23 camelia rakudo 516d49: OUTPUT«True␤False␤»
00:23 lue you can also type  ? [&] (@a »~~» Int)  if you prefer the look of [&] :)
00:24 colomon admittedly, my approach of choice would probably be !@list.grep(not Int) (not sure if that is exactly right)
00:24 augustus lue: ok I get hyper-operating the smart match
00:24 colomon rn: my @list = 1,10; say so !@list.grep(not Int)
00:24 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«False␤»
00:24 colomon rn: my @list = 1,10; say so @list.grep(Int)
00:24 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«True␤»
00:25 colomon rn: my @list = 1,10; say @list.grep(Int)
00:25 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«1 10␤»
00:25 colomon rn: my @list = 1,10; say @list.grep(not Int)
00:25 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«1 10␤»
00:25 lue (fwiw, I'm kinda surprised (1&2&3) ~~ Int doesn't dwim.)
00:25 augustus sorry, I should clarify a little, I'm not looking for a work around, I'm just trying to understand if there's a reason smart matching wouldn't work with junctions, or whether it's a bug (I assume it's a bug)
00:26 colomon Actually, I think it might be right
00:26 augustus it's not just type-checking, but any smart matching
00:26 augustus but there's no other way to type check than to smart match
00:26 colomon I have a very impression that junctions only work on the right hand side of smart matches
00:26 colomon s/very/vague/
00:26 lue Even if it worked, the smartmatch would return (True, True, True), which you have to turn into an all junction and test for validity anyway.
00:27 lue ( which is what I do in the end with ? [&] (stuff) )
00:27 augustus hmm, wait, why would it be different between == and ~~ ?
00:27 augustus I would expect them to behave in an analagous fashion
00:28 colomon == is symetrical, ~~ definitely is not
00:28 augustus meaning $a ~~ $b does not imply $b ~~ $a?
00:29 colomon absolutely!
00:29 colomon (I mean, absolutely it is not the same)
00:29 colomon rn: say 1 ~~ 1..10; say 1..10 ~~ 1
00:29 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«True␤False␤»
00:29 augustus well it's not immediately clear why that would be, but ok
00:30 colomon because the right hand side is what you are matching
00:30 augustus I would expect symmetry whenever the types of $a and $b are different
00:31 colomon no, the right hand side determines how the matching is done.
00:31 augustus but I could understand different behavior when $a and $b have the same type
00:31 colomon every class gets to decide / define how it smart matches.
00:31 lue I heard about a time when ~~ was symmetrical, and that didn't go too well.
00:31 raiph joined #perl6
00:32 colomon so for instance, "abc" ~~ /a/ means match the regex against "abc"
00:33 augustus I'm curious then how /a/ ~~ "abc" wouldn't mean the same thing
00:33 sorear /a/ ~~ "abc" stringifies the regex and tests it using * eq "abc"
00:33 * colomon wrote a line that said that, but it disappeared
00:33 sorear smart matching is determined by the type of the right side.  regexes execute, strings do eq, numbers do ==
00:34 colomon ranges check to see if the left hand side is in the range...
00:34 sorear r: say "22.0" ~~ 22; say 22 ~~ "22.0";  # when 22 is in the right we do a numeric equality check, when "22.0" is on the right we do a string check
00:34 camelia rakudo 516d49: OUTPUT«True␤False␤»
00:36 augustus hmm, good to know.  Seems like a different symbol should have been chosen then to indicate the directionality, and there should be another one that is symmetrical, but that's a discussion for another day I guess
00:37 colomon how would a symmetrical one possibly work?
00:37 sorear A ~~ B is approximately sugar for B.ACCEPTS(A)
00:37 sorear (except that ~~ is a topicalizer)
00:37 sorear colomon: Badl?
00:39 augustus I would expect that the smart match was defined for pairs of types
00:40 colomon augustus: think of how given / when would work with that.
00:40 colomon so "when 1" would be == if we were given another Int
00:41 colomon but we were given a type, it's suddenly type matching?
00:41 augustus um, if you say given Int when 1 I would expect it to match
00:42 colomon and if you add a new class, you have to define how it matches with every other type?
00:42 augustus well that's pretty much the case already right?
00:42 colomon not at all
00:44 colomon rn: class MyNewClass { method Str() { "shiny"; }; }; say MyNewClass.new() ~~ "shiny";
00:44 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«True␤»
00:44 colomon rn: class MyNewClass { method Str() { "shiny"; }; }; say MyNewClass.new() ~~ 10;
00:44 camelia rakudo 516d49: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in method Numeric at src/gen/CORE.setting:884␤  in sub infix:<==> at src/gen/CORE.setting:3315␤  in sub infix:<==> at src/gen/CORE.setting:3313␤  in method ACCEPTS at src/gen/CORE.setting:3…
00:44 camelia ..niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Cannot use value like MyNewClass as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 296 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.sett…
00:45 augustus colomon: if you want to implicitly cast your new class to a String and smart match from there, that's fine, but you've still effectively defined a match with every other type.  You just delegated to Str
00:46 colomon smart matching with a string RHS ALWAYS calls eq, which will call .Str under normal conditions
00:47 colomon As you can see above, when I smartmatched with an Int, it didn't work at all, because there is no way to cast my new class to a number
00:47 colomon and the reverse is not defined, either...
00:48 colomon rn: class MyNewClass { method Str() { "shiny"; }; }; say "shiny" ~~ MyNewClass.new();
00:48 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«False␤»
00:49 colomon ah, Any.ACCEPTS calls ===, and that's what MyNewClass gets
00:49 augustus I assume that if you defined method Int then it would work
00:49 colomon yes
00:50 colomon errr, actually not?
00:51 colomon rn: class MyNewClass { method Int() { 42; }; }; say MyNewClass.new() ~~ 42;
00:51 camelia rakudo 516d49: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in method Numeric at src/gen/CORE.setting:884␤  in sub infix:<==> at src/gen/CORE.setting:3315␤  in sub infix:<==> at src/gen/CORE.setting:3313␤  in method ACCEPTS at src/gen/CORE.setting:3…
00:51 camelia ..niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Cannot use value like MyNewClass as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 296 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.sett…
00:51 colomon rn: class MyNewClass { method Numeric() { 42; }; }; say MyNewClass.new() ~~ 42;
00:51 camelia rakudo 516d49, niecza v24-86-g39ab531: OUTPUT«True␤»
00:51 augustus colomon: thank you for the interesting discussion, but I have to go.  hopefully I will see you around again later.
00:51 colomon o/
00:52 colomon have a good weekend!
00:52 augustus :)
00:58 colomon hmmm, I'm still getting sprintf aborting tests?
01:00 FROGGS_ joined #perl6
01:00 dalek nqp: 80e2674 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/​runtime/JavaCallinException.java:
01:00 dalek nqp: Add missed file for interop
01:00 dalek nqp: review: https://github.com/perl6/nqp/commit/80e267428d
01:00 dalek nqp: 661dd1f | sorear++ | / (2 files):
01:00 dalek nqp: Start to document interop stuff
01:00 dalek nqp: review: https://github.com/perl6/nqp/commit/661dd1f866
01:01 sorear I see a couple paths forward at this point:
01:02 sorear 1. add as much nice sugar as possible to BootJavaInterop, and let everyone use that.  (That isn't much, since BootJavaInterop is necessarily HLL-agnostic and can't use native Perl 6 or NQP types).
01:02 sorear 2. add a nice sugary NQPJavaInterop which uses NQP arrays and hashes.  Let Perl 6 use that.
01:02 sorear 3. Go all the way to RakudoJavaInterop, and leave NQP alone.
01:02 sorear 4. Some combination of the above
01:04 colomon is there a way to make the other NQP backends interop with Java?
01:05 sorear you mean Parrot?
01:06 colomon or MoarVM
01:07 colomon Just pondering your options
01:07 colomon thinking about leaving NQP alone.
01:17 sorear colomon: I think *waves hands vigorously* that interfacing with a JVM from outside is going to look very different from interfacing with one from inside
01:18 colomon makes sense
01:19 colomon have you given any thought to calling into jakudo from the JVM?  :)
01:19 sorear we have general callins already
01:19 colomon oh, sweet.
01:19 sorear although they currently have to be set up by jnqp code
01:21 colomon I'm looking forward to the day I can make a Processing app call into my perl6 code.  :)
01:22 sorear although it would only be about 10-20 lines of code to do the equivalent of a nqp::loadbytecode, nqp::gethllglobal and then get references to perl 6 functions that way
01:23 sorear which could then be passed to invokeDirect
01:24 colomon sweet!
02:00 FROGGS__ joined #perl6
02:07 [Coke] r: say 25364 / 26160
02:07 camelia rakudo 516d49: OUTPUT«0.969572␤»
02:08 [Coke] masak++ FROGGS++ jnthn++ sorear++
02:08 colomon amen
02:08 [Coke] r: say 25364 *.97-26160
02:08 camelia rakudo 516d49: OUTPUT«-1556.92␤»
02:09 [Coke] r: say 26160*.97-25364 #oops
02:09 camelia rakudo 516d49: OUTPUT«11.2␤»
02:10 colomon 11 tests to hit 97%?
02:10 [Coke] Yes.
02:13 colomon damn that's tempting...
02:17 [Coke] https://gist.github.com/coke/5879701 - redid the test abort list. 2 new sprintf errors near the bottom
02:18 colomon [Coke]: yes, I've been looking at the 5.2g error this evening.
02:19 [Coke] that's 61 tests.
02:21 colomon yeah, I'm not solving it, though.  :\
02:22 colomon my NQP skills are still pretty weak
02:28 colomon and I need to go to bed soon
02:31 colomon Hmph.  May have just done it, but my solution is gratuitously stupid.  :\
02:37 SamuraiJack joined #perl6
02:40 xilo_ joined #perl6
02:42 xilo joined #perl6
02:44 colomon rn: printf("%e", 10**99)
02:44 camelia niecza v24-86-g39ab531: OUTPUT«1.000000e+099»
02:44 camelia ..rakudo 516d49: OUTPUT«1.000000e+99»
02:44 colomon rn: printf("%e", 10**999)
02:44 camelia niecza v24-86-g39ab531: OUTPUT«Infinity»
02:44 camelia ..rakudo 516d49: OUTPUT«Inf»
02:44 colomon hmmm
02:45 colomon rn: say log(10**99)
02:45 camelia niecza v24-86-g39ab531: OUTPUT«227.95592420641051␤»
02:45 camelia ..rakudo 516d49: OUTPUT«227.955924206411␤»
02:45 colomon rn: say log(10**99) / log(10)
02:45 camelia niecza v24-86-g39ab531: OUTPUT«98.999999999999986␤»
02:45 camelia ..rakudo 516d49: OUTPUT«99␤»
02:45 colomon bedtime
03:06 preflex joined #perl6
03:31 Radvendii joined #perl6
04:01 raiph .tell augustus example of grammar dynamically building grammar: http://rosettacode.org/wiki/Parse_EBNF#Perl_6
04:01 yoleaux raiph: I'll pass your message to augustus.
04:33 SamuraiJack joined #perl6
04:52 _jaldhar joined #perl6
05:12 SamuraiJack joined #perl6
05:18 popl joined #perl6
05:18 popl left #perl6
05:18 dalek rakudo/nom: 2b3dbfb | sorear++ | src/vm/jvm/ (5 files):
05:18 dalek rakudo/nom: s:g/Ops/RakOps/
05:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2b3dbfb2a1
05:19 sorear something jnthn and I talked about a couple weeks ago but never actually happened... cuts down on unsightly org.perl6.nqp.runtime.Ops qualification, and stops jdb from getting confused when it sees two Ops.java files
05:32 JimmyZ \o/
05:32 JimmyZ Good evening, sorear
05:40 sorear hi, JimmyZ
05:41 JimmyZ hello :D
05:50 kaare__ joined #perl6
05:53 amodell joined #perl6
06:06 ztt joined #perl6
06:12 dwoldrich joined #perl6
06:21 kaare__ joined #perl6
06:34 pochi_ joined #perl6
06:35 nebuchad` joined #perl6
06:36 scottp joined #perl6
06:36 kaare_ joined #perl6
06:38 robins joined #perl6
06:38 moritz_ joined #perl6
06:39 pjcj_ joined #perl6
06:46 domidumont joined #perl6
06:48 dalek nqp: 85187bc | sorear++ | src/vm/jvm/runtime/org/perl6/nq​p/runtime/BootJavaInterop.java:
06:48 dalek nqp: For 6model method usability, have adapter functions always take an invocant, even if ignored
06:48 dalek nqp: review: https://github.com/perl6/nqp/commit/85187bcfd0
06:51 dalek nqp: d0fcc5e | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
06:51 dalek nqp: Remove a pointless and warning cast
06:51 dalek nqp: review: https://github.com/perl6/nqp/commit/d0fcc5e1d6
06:52 FROGGS__ joined #perl6
06:52 woolfy joined #perl6
06:53 takesako______ joined #perl6
06:56 xiaoyafeng joined #perl6
07:03 domidumont joined #perl6
07:08 dalek nqp: e1a2ed0 | sorear++ | / (2 files):
07:08 dalek nqp: Systematize interop sub names and add short forms
07:08 dalek nqp: review: https://github.com/perl6/nqp/commit/e1a2ed09ff
07:10 daniel-s joined #perl6
07:17 SamuraiJack joined #perl6
07:28 dalek nqp: 2e10baf | sorear++ | / (2 files):
07:28 dalek nqp: Do a little bit of the dynamic type gen for BootJavaInterop
07:28 dalek nqp: review: https://github.com/perl6/nqp/commit/2e10baf203
07:28 iSlug joined #perl6
07:29 FROGGS morning
07:29 FROGGS morning sorear :o)
07:30 moritz_ good morning
07:30 FROGGS hi moritz_
07:30 sorear morning FROGGS.
07:30 * moritz should name himself a bit more civilized again
07:31 sorear ???
07:31 FROGGS s/_$//
07:32 FROGGS sorear: we are near the point where we fudge things for rakudo-jvm?
07:32 FROGGS it is sort of hard to track regressions...
07:33 FROGGS I record now my spectest output, run two other spectests (with another sprint-patches, one unmodified), and will read then the diff of the test runs
07:34 sorear FROGGS: the fudger handles the syntax #?rakudo.jvm skip, #?rakudo.parrot skip
07:34 sorear I added that the day we started running spectests
07:34 FROGGS maybe I'll add an devtest target to highlight regressions...
07:34 sorear if you think fudging is a good idea, go for it
07:35 FROGGS yeah, but we dont actually use it right now, so you get a ton of fails, and you dont know if it was your fault
07:35 sorear better todo than skip, since then we know when we've fixed it
07:35 sorear we're over 95%, so many fewer fails than when we were 50%ish :)
07:35 FROGGS no, I just wanna see what I have broken by an unstaged patch
07:36 FROGGS sorear: I basically want that when running the tests: http://usev5.files.wordpress.com/2013/07/hack.png
07:37 FROGGS so you can abort the test run after five minutes if there are some regressions already
07:43 sorear well this is a new one: https://gist.github.com/so​rear/3a0ce2b9d857150b2008
07:48 dalek nqp: 3a6ec82 | sorear++ | / (4 files):
07:48 dalek nqp: Streamline use of interop object a bit
07:48 dalek nqp: review: https://github.com/perl6/nqp/commit/3a6ec822be
07:49 sorear I think I have that roughly as sugary as the BOOT version has any right to be
07:49 sorear (see doc patch in last commit)
07:50 sorear there will be a P6JavaInterop subclass that handles stuff like container marshalling, lvalue fields, and overloading
07:50 JimmyZ sorear++, it's nice
07:55 sorear oh, and transparent callback marshalling.  can't forget that
07:56 * sorear thinks we can do $p6interop.type('java.lang.Thread').new( { say "hello, world" }, "HelloThread" ).start()
07:57 sorear you won't be able to do that with the BOOT version because 1. no transparent callback marshalling 2. no multiple dispatch on the new
07:59 FROGGS moritz: I know you are a math-pro, do you think you could get the basics done for sprintf "%e" ? playground would be here: https://gist.github.com/FROGGS/7a14e​5d8843bd140d829#file-sprintf-pl-L222
08:01 sorear http://www.ampl.com/REFS/rounding.pdf
08:02 FROGGS sorear: is it a problem that I cant read the formulas on page two? R-[
08:03 FROGGS but I'll read through it
08:06 sorear FROGGS: technical issues or lack-of-background issues?
08:06 FROGGS ahh, that explains not_gerd's commit comment
08:06 FROGGS sorear: the latter
08:23 araujo joined #perl6
08:23 araujo joined #perl6
08:47 colomon joined #perl6
08:49 masak good morning, #perl6
08:50 dalek nqp: 2f317f6 | sorear++ | src/vm/jvm/runtime/org/perl6/nq​p/sixmodel/SixModelObject.java:
08:50 dalek nqp: Move misplaced exists_pos out of the Associative section
08:50 dalek nqp: review: https://github.com/perl6/nqp/commit/2f317f6b5c
08:50 dalek nqp: 94b4100 | sorear++ | / (2 files):
08:50 dalek nqp: Add "proxy", a lightweight way to turn coderefs into Java interfaces
08:50 dalek nqp: review: https://github.com/perl6/nqp/commit/94b41008f2
08:51 sorear o/ masak, colomon
08:52 colomon \o
08:57 masak I'm relieved to see that sprintf in Rakudo survived the night ;)
08:57 FROGGS hi masak, hi colomon
08:58 FROGGS masak: I have a patch here that handles sprintfing floats < 1, but I need to track at least one regression down before I can commit
08:58 FROGGS (if you wonder why stagestats prints 0 instead of 0.000)
09:03 dalek specs: 8854a63 | masak++ | S99-glossary.pod:
09:03 dalek specs: [S99] add "HPMoR" entry
09:03 dalek specs: review: https://github.com/perl6/specs/commit/8854a63106
09:04 masak FROGGS: nice. keep up the good work!
09:04 colomon masak: I played around with adding e and g last night, but gave up on it because I knew I needed to wake up insanely early this morning.  (ie now)
09:04 FROGGS (masak: I want to trick moritz in hacking %e, but don't tell him)
09:07 masak colomon: speaking of which, you're up insanely early this morning!
09:08 masak FROGGS: ok, it'll just be our little secret, then.
09:08 colomon have to drive (well maybe ride) an hour then catch an early plane.
09:08 colomon o/
09:13 dalek nqp: 98e5e6a | sorear++ | examples/CallFromJava.java:
09:13 dalek nqp: Start on a calling-from-java example for colomon
09:13 dalek nqp: review: https://github.com/perl6/nqp/commit/98e5e6ad10
09:13 sorear grrk.  missed him
09:13 sorear .tell colomon https://github.com/perl6/nqp/commit/98e5e6ad10
09:13 yoleaux sorear: I'll pass your message to colomon.
09:14 sorear .tell colomon Let me know what you'd like to see examples of in there.
09:14 yoleaux sorear: I'll pass your message to colomon.
09:16 vruiz joined #perl6
09:20 masak #parrot is very useful for getting a quick overview of the rakudo/nqp commits that happened overnight.
09:20 sorear :P
09:20 masak it's like #perl6 but minus the discussion.
09:22 masak FROGGS: plural of "synopsis" is "synopses" ;)
09:22 FROGGS k, thanks :o)
09:23 vruiz is it time to switch to perl6?
09:23 sorear from?
09:23 vruiz from perl5
09:23 sorear switch what?
09:23 vruiz 5.8
09:23 vruiz start using perl6 in my work
09:23 sorear 5.8?  you poor soul, no //
09:25 vruiz i mean, is perl6 a complete perl system to support every day work at enterprises?
09:25 sorear well, uh, sure, no reason not to give it a try
09:25 sorear perl6 won't support ALL of my daily work, but then neither will perl5
09:26 vruiz what about the lerarning curve?
09:26 masak vruiz: here's the thing: if you're asking that question, then you are probably not ready to switch.
09:26 masak vruiz: but I am, for example. I've been writing Perl 6 for 8 (!) years, and more and more every day.
09:26 masak (well, on average at least)
09:27 sorear (!) indeed
09:27 vruiz i see, and then why is it not extended as perl5, it makes me think in something like IPv4 and IPv6, never comes the change
09:28 masak vruiz: yeah, that's a good comparison.
09:28 masak vruiz: in the fullness of time, I think those who see a point in switching will switch.
09:28 masak vruiz: the rest? let them use Perl 5 if they want. we're not here to force anyone.
09:28 masak I see my job as presenting Perl 6 in the best light possible, so that people will at least try it out.
09:29 masak and some percentage of those who try it out will go "this is awesome! why doesn't everyone use this?", and then they will probably switch.
09:29 masak but in general, you can't make people switch.
09:29 masak it's Open Source, man. :) people use what they want.
09:29 spider-mario joined #perl6
09:29 vruiz what i really expect to switch is to write code more a like python
09:29 moritz also people switching and code base switching are two very different things
09:30 masak some poor sods are still on perl 4, you know. *shudder*
09:30 moritz even when Perl 6 will be much faster and more robust than it is today, it'll make sense for many existing code bases to remain in perl 5
09:30 moritz simply because the cost of switching is too high
09:30 masak yeah.
09:30 sorear bah!
09:30 sorear rakudo sets up the compiler in a MAIN sub, so I can't just loadbytecode and getcomp it :(
09:31 vruiz i would like to have better OOP support
09:31 moritz Perl 6 offers that, yes
09:31 vruiz preferably as simple as python
09:32 vruiz i've read that to have true OOP requieres rewriting perl from scratch. Is that true?
09:33 moritz do you mean existing perl code? or the Perl language? or the perl compiler?
09:33 vruiz perl code im'lementation
09:33 masak vruiz: do you count Moose as "true OO"?
09:33 moritz and what exact is "true OOP"?
09:33 masak vruiz: if so, then "no". if not, then "probably yes".
09:33 sorear Is there any good reason why rakudo:src/Perl6/main.nqp doesn't look like nqp:src/NQP/Compiler.pm ?
09:33 masak vruiz: but see stevan's p5mop effort for more information.
09:34 vruiz i'd like every thing would be an object
09:34 masak vruiz: that just makes no sense :)
09:34 vruiz not just a wrapper clas to simulate it
09:34 masak vruiz: your worry that the compiler is taking too long -- is that an object?
09:34 masak vruiz: a sunbeam hitting your keyboard in the morning -- is that an object?
09:34 moritz vruiz: autobox.pm exists
09:34 vruiz not, for sure, what i love from perl is it speed
09:35 masak vruiz: the total combination of all the bits in your computer and everyone else's -- is that an object?
09:35 masak *everything* can't be an object!
09:35 sorear r: say Set(0,1).PARROT
09:35 camelia rakudo 2b3dbf: OUTPUT«Cannot coerce object of type Capture to Set. To create a one-element set, pass it to the 'set' function␤  in sub to-set at src/gen/CORE.setting:13617␤  in sub to-set at src/gen/CORE.setting:13610␤  in method postcircumfix:<( )> at src/gen/CORE.setting:13609␤  in bl…
09:35 sorear r: say Set([0,1]).PARROT
09:35 camelia rakudo 2b3dbf: OUTPUT«Cannot coerce object of type Capture to Set. To create a one-element set, pass it to the 'set' function␤  in sub to-set at src/gen/CORE.setting:13617␤  in sub to-set at src/gen/CORE.setting:13610␤  in method postcircumfix:<( )> at src/gen/CORE.setting:13609␤  in bl…
09:35 sorear r: say set(0,1).PARROT
09:35 camelia rakudo 2b3dbf: OUTPUT«No such method 'PARROT' for invocant of type 'Set'␤  in block  at /tmp/1RZw0oweoW:1␤␤»
09:35 sorear r: say PARROT(set(0,1))
09:35 camelia rakudo 2b3dbf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    PARROT used at line 1â�¤â�¤Â»
09:35 vruiz think of this: in unix every thing is managed as if it where afile, there are many benefits from this aproach
09:36 * moritz hasn't seen PARROT in a while
09:36 sorear r: say pir::typeof__sp(set(0,1))
09:36 camelia rakudo 2b3dbf: OUTPUT«===SORRY!===␤error:imcc:The opcode 'typeof_p' (typeof<1>) was not found. Check the type and number of the arguments␤      in file '(file unknown)' line 68␤»
09:36 moritz vruiz: that simply isn't true
09:36 moritz vruiz: file permissions aren't handled as files
09:36 moritz users aren't files
09:36 masak keypress events aren't files.
09:36 moritz lots of things aren't files, and aren't handled as files, in contemporary UNIX implementations
09:37 masak (but see Plan 9 for a really good attempt)
09:37 sorear r: say pir::typeof__SP(set(0,1))
09:37 camelia rakudo 2b3dbf: OUTPUT«Set␤»
09:37 moritz signals
09:37 moritz interrupts
09:37 moritz system calls
09:38 moritz the list goes on
09:38 vruiz ok, nothing is absoultely perfect, but i'd like to have a more friendly OOP programming with perl6
09:38 masak vruiz: *ding*! you have it.
09:38 vruiz that's why i asked for switch
09:38 masak vruiz: your wish has been granted. OOP is more friendly in Perl 6.
09:39 vruiz i'll give it a try
09:39 vruiz another item in my whishlist :-)
09:40 masak see http://rakudo.org/how-to-get-rakudo/
09:40 vruiz ok
09:40 vruiz would you say that perl6 simplifies language syntax?
09:41 vruiz from perl5?
09:41 masak in a way.
09:41 masak I know many Perl 5 who would disagree strongly, though.
09:41 sorear there's more of it, but there are many fewer special cases
09:41 masak maybe put it like this: Perl 6's syntax is "bigger" in some sense. it does more things.
09:42 masak but it's also "simpler" in some sense.
09:42 sorear we've completely eliminated the indirect object ambiguity, for instance
09:42 sorear how many times has that bitten you in p5?
09:42 masak in particular, there's a really really nice standard grammar for it.
09:42 masak written in Perl 6 itself.
09:43 sorear whose idea was it to set up the Perl6::Compiler in a sub main :[
09:43 * sorear wonders if anything will break if this is changed
09:44 masak by the way, someone(TM) should perhaps update the http://rakudo.org/how-to-get-rakudo/ instructions to cover JVM?
09:44 vruiz thanks for your comments
09:44 vruiz left #perl6
09:45 moritz masak: only when we start to run modules on rakudo-jvm, I'd say
09:45 sorear an installable rakudo-jvm would be a nice touch
09:45 sorear and a pony.
09:45 masak moritz: fairy nuff.
09:46 * sorear RTA "thanks for your commits"
09:48 sorear hmm.  @*END_PHASERS and @*MODULES... will need to be refactored for embedding
09:50 sorear I could turn those into hllglobals
09:53 sorear looks probably more sensible to ditch the global @*MODULES, deal with the fallout from that, and turn END_PHASERS into a global
09:55 sorear .tell jnthn $global_install probably needs to be dealt with in your thread safety pass
09:55 yoleaux sorear: I'll pass your message to jnthn.
10:07 dmol joined #perl6
10:23 daniel-s joined #perl6
10:27 dalek rakudo/jvm-embeddable: b72d148 | sorear++ | src/ (6 files):
10:27 dalek rakudo/jvm-embeddable: Refactor src/main.nqp stuff to bring us closer to embeddability
10:27 dalek rakudo/jvm-embeddable: review: https://github.com/rakudo/rakudo/commit/b72d1483c5
10:27 sorear if someone could check that for Parrot regressions, that would be awesome
10:27 sorear sleep&
10:43 FROGGS I know now how to track regressions properly and easy:
10:44 FROGGS mkdir .diff && cd .diff && git init && cd ..
10:45 FROGGS export PERL_TEST_HARNESS_DUMP_TAP=.diff # this will put the TAP of every single test file within that dir
10:45 FROGGS add && commit the test files, patch nqp or rakudo, run tests again, and then do a git diff in that .diff dir
10:46 FROGGS (no need to add a remote to that .diff repo, and no need to push)
10:48 arnsholt FROGGS: Oh, that's very cool!
10:50 FROGGS yeah, better then subclassing TAP::Harness *g*
10:50 arnsholt Indeed
10:50 FROGGS it would be nice to see the diff to the last run while running the spectest, but doing a git diff from now and then is okay too
10:50 arnsholt I've been playing with the idea of writing a plugin that dumps a JSON representation to file
10:51 arnsholt But your way is definitely the simplest
11:01 PacoAir joined #perl6
11:03 jnthn afternoon, #perl6
11:03 yoleaux 09:55Z <sorear> jnthn: $global_install probably needs to be dealt with in your thread safety pass
11:06 FROGGS hi jnthn
11:09 lizmat hi jnthn!
11:12 FROGGS joined #perl6
11:12 jnthn So we're close to 97%? Wow!
11:15 FROGGS heh, I enabled turbo boost for my core i5 right now >.<
11:16 FROGGS why was that off?
11:16 tadzik is it off by default?
11:16 FROGGS dont think so
11:16 tadzik hm
11:16 tadzik how did you enable it?
11:17 FROGGS I guess I turned it off when getting my laptop, my ubuntu was rebooting from time to time which turned out to be a kernel bug/incompatibility
11:17 FROGGS in the bios
11:17 tadzik brb reboot :)
11:17 FROGGS :o)
11:20 tadzik I don't see an option for it
11:20 tadzik but I'm amused by "Enable charing iPod, iPhone or Blackberry when power off"
11:21 FROGGS +g
11:21 FROGGS why? it means it has to power the usb ports, which can be useful when you need it, otherwise it is just bad for your accu
11:24 lizmat .tell sorear I'm not seeing any Rakudo regressions
11:24 yoleaux lizmat: I'll pass your message to sorear.
11:25 jnthn lizmat: Including in the branch?
11:41 pmurias joined #perl6
11:49 jlaire joined #perl6
11:50 pmurias rakudo: sub foo($foo) {$foo := 123;say($foo)};foo(456)
11:50 camelia rakudo 2b3dbf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/9jFKja5BFz:1â�¤------> [32msub foo($foo) {$foo := 123[33mâ��[31m;say($foo)};foo(456)[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:52 rindolf joined #perl6
11:58 FROGGS jnthn: the %f bug you discovered yesterday won't be fixed before late evening, there are some regressions, like t/spec/S02-names-vars/perl.rakudo.jvm test #90
11:59 FROGGS and now that I know all regressions I can fix'em
12:01 jnthn FROGGS: ok :)
12:02 FROGGS bbl
12:02 diakopter .
12:10 dalek rakudo-js: c4c51bb | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp:
12:10 dalek rakudo-js: Assign params directly instead of calling the bind method, fixes a test.
12:10 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/c4c51bbbdd
12:10 dalek rakudo-js: 26c5f36 | (Pawel Murias)++ | run (2 files):
12:10 dalek rakudo-js: Read in contexts correctly. Pass 56-role.t at last!
12:10 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/26c5f36a00
12:15 * jnthn starts to understand a bit more of the sorear++ interop stuff :)
12:15 jnthn Now I just need some time to ponder how to get a nice sugar layer in Perl 6 land... :)
12:20 JimmyZ :P
12:22 BenGoldberg joined #perl6
12:23 pmurias can I have both nqp-jvm and nqp-parrot installed? I want to make sure the test for the metamodel work on both of them ;)
12:23 jnthn pmurias: Yeah, just install them to different places, I guess?
12:23 * jnthn has an install and install-jvm directory in his Rakudo tree
12:27 tadzik I should put rakudobrew somewhere
12:27 tadzik although it's now a terrible mixture of bash and perl
12:31 PacoAir joined #perl6
12:32 birdwindupbird joined #perl6
12:41 timotimo can i change a specs document (changing a "with" to a "without", so that the sentence makes sense again) without incrementing the version? perhaps just the last changed bit?
12:41 masak tadzik: put it somewhere early, put it somewhere often.
12:47 kaare_ joined #perl6
12:53 benabik joined #perl6
12:57 mstefanko joined #perl6
12:57 pmurias jnthn: http://pastie.org/8118052 - I get an error for make clean;make in rakudo-jvm
12:58 jnthn pmurias: Looks like too old nqp
12:58 pmurias updating it atm
13:01 berekuk joined #perl6
13:04 timotimo pypy is just removing all the old & busted code for the cli and jvm backends, rakudo is just getting a spiffy new jvm backend ... hmm
13:15 moritz timotimo: just increment the version
13:15 moritz it's not a very significant number
13:15 moritz (though if you don't nobody will reaslly complain either)
13:17 spider-mario was no * 2013.06 planned?
13:18 moritz independently of whether it was planned or not, none was released
13:21 dalek roast: 1bc6e7e | thundergnat++ | S32-str/sprintf.t:
13:21 dalek roast: Add test for multi-byte characters in strings. RT 117547
13:21 dalek roast: review: https://github.com/perl6/roast/commit/1bc6e7e4de
13:21 raiph joined #perl6
13:23 timotimo shouldn't that skip read #?rakudo.parrot skip?
13:25 lizmat jnthn: which branch do you mean?
13:27 Moukeddar joined #perl6
13:27 jnthn lizmat: The one sorear pushed to just before sleeping
13:27 jnthn lizmat: jvm-embeddable
13:27 jnthn lizmat: If you feel like testing it doesn't break the Parrot build, go ahead. Otherwise, I can do it ;)
13:34 ponbiki joined #perl6
13:39 preflex joined #perl6
13:45 cogno joined #perl6
13:46 dayangkun joined #perl6
13:50 cogno_ joined #perl6
13:51 atroxaper joined #perl6
13:52 atroxaper left #perl6
13:53 atroxaper joined #perl6
13:55 atroxaper left #perl6
13:58 cogno joined #perl6
14:06 ggoebel joined #perl6
14:09 cogno joined #perl6
14:35 xinming joined #perl6
14:40 ajr joined #perl6
14:50 xyf joined #perl6
14:59 ecocode joined #perl6
15:05 * xyf test
15:07 masak xyf: your test was successful. hello.
15:07 masak :)
15:10 konundra joined #perl6
15:11 SamuraiJack joined #perl6
15:19 xiaoyafeng joined #perl6
15:21 itz_ joined #perl6
15:25 xyf exit
15:25 xyf quit
15:26 * masak imagines an IRC user trying to claw his way out of the channel
15:26 amoe joined #perl6
15:27 spider-mario joined #perl6
15:31 dalek nqp: 6eea7ba | (Pawel Murias)++ | t/nqp/65-how.t:
15:31 dalek nqp: Test NQPClassHOW.add_attribute.
15:31 dalek nqp: review: https://github.com/perl6/nqp/commit/6eea7ba782
15:41 lizmat jnthn: spectesting now
15:53 raiph joined #perl6
15:58 kaare_ joined #perl6
15:59 iSlug joined #perl6
16:00 dalek roast: 5b5a0b3 | (Elizabeth Mattijsen)++ | S32-str/sprintf.t:
16:00 dalek roast: Fix # tests
16:00 dalek roast: review: https://github.com/perl6/roast/commit/5b5a0b34df
16:00 lizmat jnthn,sorear: after fixing ^^, no regressions in jvm-embeddable
16:12 lizmat cycling&
16:18 birdwindupbird joined #perl6
16:23 census joined #perl6
16:26 FROGGS joined #perl6
16:26 masak r: .say for (1 .. 10_000).pick(10)
16:26 camelia rakudo 2b3dbf: OUTPUT«3747␤5248␤3823␤7076␤71​94␤5665␤4150␤4132␤6336␤4701␤»
16:39 pmurias About 1,060,000 results (0.71 seconds)
16:39 pmurias Search Results
16:39 masak is that so.
16:40 ajr joined #perl6
16:47 ecocode joined #perl6
16:50 crab2313 joined #perl6
16:52 thundergnat joined #perl6
16:57 BenGoldberg joined #perl6
16:59 rindolf joined #perl6
17:01 dalek nqp: 7b4bee7 | (Tobias Leich)++ | / (2 files):
17:01 dalek nqp: render digits up to precision for %f
17:01 dalek nqp: review: https://github.com/perl6/nqp/commit/7b4bee7601
17:03 ilogger2 joined #perl6
17:11 fridim_ joined #perl6
17:39 BenGoldberg r: .say for (1..1e4).pick(1)
17:39 camelia rakudo 2b3dbf: OUTPUT«3412␤»
17:39 BenGoldberg r: .say for (1..1e5).pick(1)
17:39 crab2313 left #perl6
17:39 camelia rakudo 2b3dbf: OUTPUT«(timeout)»
17:44 [Coke] daily jvm run up to S02-types...
17:47 Vlavv joined #perl6
18:18 vaelxon joined #perl6
18:22 sorear good * #perl6
18:22 yoleaux 11:24Z <lizmat> sorear: I'm not seeing any Rakudo regressions
18:23 dalek perl6-roast-data: aa0c757 | coke++ | / (5 files):
18:23 dalek perl6-roast-data: today (automated commit)
18:23 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/aa0c7575ad
18:23 timotimo good * sorear :)
18:23 [Coke] 96.95%
18:23 timotimo holy moly! didn't even see commits that would have explained that! (or is that the sprintf-on-jvm thing?)
18:24 [Coke] r: say 26160*.97-25364
18:24 camelia rakudo 2b3dbf: OUTPUT«11.2␤»
18:24 [Coke] that's most of that last jump, yes
18:31 sorear so in other words no change since yesterday?
18:36 BenGoldberg .ping
18:36 yoleaux There is no ping command; nor can this be construed as a response.
18:36 BenGoldberg rakudo: 42.say
18:36 camelia rakudo 2b3dbf: OUTPUT«42␤»
18:36 BenGoldberg rakudo.jvm: 42.say
18:37 sorear There is no rakudo.jvm:.
18:37 BenGoldberg Camelia doesn't support rakudo on jvm?
18:37 sorear correct.
18:38 * BenGoldberg pouts
18:40 dalek rakudo/nom: b72d148 | sorear++ | src/ (6 files):
18:40 dalek rakudo/nom: Refactor src/main.nqp stuff to bring us closer to embeddability
18:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b72d1483c5
18:44 [Coke] ok. with 97%, are we ready to start fudging rakudo.jvm in roast?
18:44 [Coke] I know FROGGS++ is ready...
18:44 [Coke] I think if we fudge anything that isn't aborting, we'll be fine. (or we can fudge those also, and then keep a list of things so fudged)
18:46 dalek nqp: 0ffeec3 | (Tobias Leich)++ | / (2 files):
18:46 dalek nqp: display + sign for positive decimals when requested
18:46 dalek nqp: review: https://github.com/perl6/nqp/commit/0ffeec3769
18:52 [Coke] ... and the first file I find is not amenable to fudging. :)
18:53 * moritz hopes it's amendable to fixing
18:54 xinming joined #perl6
18:54 pecastro joined #perl6
18:56 sorear ...why is a NullPointerException being thrown with *no stack trace*?
19:02 [Coke] sorear: how can I get at $*ENV from inside java in nqp?
19:03 [Coke] er, $%ENV
19:03 raiph joined #perl6
19:03 [Coke] or should I require $%ENV to be passed in as an argument to nqp::shell?
19:04 sorear [Coke]: probably saner to use System.getenv("WHATEVER") directly
19:05 [Coke] sorear: does setting $%ENV already set System.getenv?
19:05 [Coke] er, does setting the rakudo variable already set the java env?
19:06 [Coke] (trying to propagate out to child processes)
19:06 sorear [Coke]: no, but it should
19:07 sorear oh, that's the exact bug you're trying to fix
19:08 [Coke] ah. looks like processbuilder should be doing this automatically based on the current env.
19:09 [Coke] so if I make it so that $%ENV{a} = 'b' sets the java env, I win.
19:10 sorear yes
19:11 sorear what syntax is $%ENV, though>?
19:11 [Coke] the wrong one
19:16 [Coke] so the only way I know to call java from nqp at this point is to add opcodes. nqp::setenv(key, value), nqp::delenv(key) ?
19:16 [Coke] and wire those into ENV's already special FETCH and STORE subs?
19:17 sorear that seems the sanest way
19:21 thundergnat left #perl6
19:22 dalek nqp: 04041f3 | sorear++ | examples/CallFromJava.java:
19:22 dalek nqp: make examples/CallFromJava.java work with any HLL
19:22 dalek nqp: review: https://github.com/perl6/nqp/commit/04041f3281
19:22 raiph joined #perl6
19:22 dalek rakudo/nom: bc3f73d | sorear++ | src/ (2 files):
19:22 dalek rakudo/nom: A few more small tweaks to get embedding working
19:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc3f73d9d7
19:23 sorear $ java -cp ../nqp-jvm:../nqp-jvm/3rdparty/asm/asm-4.1.ja​r:../nqp-jvm/3rdparty/asm/asm-tree-4.1.jar:..​/nqp-jvm/nqp-runtime.jar:rakudo-runtime.jar:. examples.CallFromJa
19:23 sorear va perl6.jar perl6 'say 2 + 2'
19:23 sorear 4
19:24 FROGGS sorear: how can I check that an argument sprintf gets is a bigint? .REPR gives P6opaque for bigints, and p6str/p6num for strings/nums
19:26 FROGGS hmmm
19:26 FROGGS r: say nqp::isbig_I(8720987304587034​987502938740592837405987345)
19:26 camelia rakudo b72d14: OUTPUT«1␤»
19:26 FROGGS r: say nqp::isbig_I(8720987304587034)
19:26 camelia rakudo b72d14: OUTPUT«1␤»
19:26 FROGGS r: say nqp::isbig_I(87209)
19:26 camelia rakudo b72d14: OUTPUT«0␤»
19:26 FROGGS that might do it
19:27 xilo joined #perl6
19:27 [Coke] sorear: ah. you can't set env vars.
19:27 [Coke] so I pretty much have to get
19:27 [Coke] er, have to get %*ENV accessible to the shell() method
19:31 timotimo sorear: would like that example to show how to eval multiple things in a row while keeping data around like the repl would (and i know you're going to make something like that anyway ;) )
19:34 sorear [Coke]: bleh.  probably best to pass %*ENV (or the mirrored BOOTHash which the proxy maintains) as an argument to nqp::shell and copy that into the processbuilder... not forgetting to clear out the old environment first...
19:35 sorear FROGGS: I have a sense that you're asking the wrong question.  Suppose you *knew* that an argument was an Int; how would you use that information?
19:35 sorear FROGGS: any test that returns false for 87209 is wrong, because that absolutely is stored as a bigint
19:36 [Coke] sorear: need to figure out how deal with getting an RT_OBJ in the shell() method...
19:36 FROGGS sorear: I want to make the decision to use pow_i or pow_I...
19:36 sorear timotimo: if you want the repl, use the repl.  I'm going in more of a JSP way with this embedding, where the goal is to construct functions/objects in perl6 code and then call them repeatedly... hence the return value from eval...
19:37 * [Coke] guesses a SixModelObject
19:37 FROGGS sorear: and I would guess that I dont get a small enough number as a bigint
19:37 sorear [Coke]: SixModelObject in the java param list
19:37 sorear FROGGS: if it's coming from perl 6, "0" will come in as a bigint.
19:37 timotimo hm, ok
19:39 FROGGS sorear: okay, but it looks like it is working want I want to do... since I use things like pow_i on small bigints
19:43 [Coke] sorear: where do I get the ThreadContext to pass in?
19:43 [Coke] (to call, say, SixModelObject's at_key_boxed ?
19:49 [Coke] ah, I see.
19:50 xilo joined #perl6
19:59 sorear [Coke]: best way is to add it as a last argument to the function and add a :tc flag to the compiler
20:06 sqirrel joined #perl6
20:06 grondilu joined #perl6
20:15 colomon joined #perl6
20:15 colomon o/
20:15 yoleaux 09:13Z <sorear> colomon: https://github.com/perl6/nqp/commit/98e5e6ad10
20:15 yoleaux 09:14Z <sorear> colomon: Let me know what you'd like to see examples of in there.
20:15 [Coke] aye, found an example that did that. Thanks
20:16 colomon sorear++ # I'll have to consider what I can use, I had no idea something could be up and running this quickly!
20:16 colomon I've got a simple nqp implemention of %e and %g, trying to merge it with the latest version right now.
20:18 colomon ugh, this may take a while
20:22 FROGGS colomon: %e %g? you are talking about sprintf?
20:22 colomon yes
20:22 FROGGS \o/
20:22 FROGGS colomon++
20:23 colomon merging it with your recent changes is going to take some thought
20:23 colomon as I had refactored things a bit.  :)
20:23 FROGGS ohh, okay
20:23 FROGGS :/
20:23 colomon …. oh, I suppose I could leave %f as you have it and just include my changes.
20:23 colomon that would be faster.
20:23 FROGGS but I would be interested in your %f too
20:24 colomon It should be pretty obvious from the other two, the entire code path will be in %g
20:25 colomon so probably we will need to merge your %f changes into my %g implementation (maybe %e as well), and then move my refactor into your code.  Something like that.
20:25 FROGGS hmm, okay
20:25 colomon my refactoring definitely needs work, so this will be good all around.
20:29 sorear colomon: is it correctly rounded/
20:29 sorear ?
20:30 sorear circumfix:<{ }> does a shocking amount of busywork
20:31 sorear { foo => $bar, baz => $quux } makes about 100 perl6 function calls
20:31 colomon sorear: probably not, if there were issues with the %f implement -- I just expanded that logic to handle %e and %g
20:32 snoopy_ joined #perl6
20:35 dalek nqp: 321a8df | (Solomon Foster)++ | t/jvm/06-sprintf.t:
20:35 dalek nqp: Quick tests for %e, %E, %g, and %G.
20:35 dalek nqp:
20:35 dalek nqp: There are still many more tests to be written, IMO.
20:35 dalek nqp: review: https://github.com/perl6/nqp/commit/321a8dfe99
20:35 dalek nqp: 5b21061 | (Solomon Foster)++ | / (2 files):
20:35 dalek nqp: Support %e, %E, %g, and %G.
20:35 dalek nqp:
20:35 dalek nqp: Still needs refactoring, IMO.  But since I'm mostly offline this week, I wanted to get this checked in as soon as I had something that worked somewhat, just to prevent duplication of effort.
20:35 dalek nqp: review: https://github.com/perl6/nqp/commit/5b21061ba8
20:37 colomon joined #perl6
20:37 colomon okay, my changes have been pushed
20:37 [Coke] here's my WIP on shell-with-env. Fails. Any pointers on what I'm screwing up
20:37 [Coke] https://gist.github.com/coke/5944808
20:38 [Coke] ?
20:38 colomon I'll try to figure out how to work in FROGGS++'s changes.
20:38 colomon But I probably won't be back online again today.
20:39 FROGGS k, I'll try to handle bigints somehow...
20:39 colomon FROGGS: if you look at the sprintf repo in my github, I've got some of that, but definitely not all
20:40 FROGGS ohh cool
20:40 FROGGS colomon++
20:40 colomon There's still a key point missing, I don't know how to tell when sprintf is passed a bigint!
20:40 snoopy_ nqp/t/jvm/06-sprintf.t plan needs a tweak...
20:40 snoopy_ planning 101 tests, but running 103
20:41 colomon snoopy_: you need to pull, I just added 30 tests
20:41 colomon and I think I got the plan right
20:42 snoopy_ ok, thanks rerunning..
20:43 lizmat jnthn: I spectested the branch jvm/embeddable
20:43 colomon sorry to just check things in and run.
20:43 lizmat colomon++ nonetheless  :-)
20:46 sorear I just deleted it :p
20:47 lizmat without digressing I can say it didn't regress
20:47 diakopter egress(0)
20:47 sorear [Coke]: --ll-exception will give you a backtrace
20:49 ecocode joined #perl6
20:49 preflex_ joined #perl6
20:53 woolfy1 joined #perl6
20:56 [Coke] weird. if I change the env from <a>='b' to <a>=3, I get no error (but no output)
20:58 [Coke] ... urk. because it was <a>=b, not <a>='b'
20:59 sorear probably the reason you get no output is that there's a try block that eats all exceptions
21:00 sorear adding e.printStackTrace(); to both cases might help
21:01 sorear ... I doubt that code will work anyway because %*ENV isn't a VMHashInstance, it's a P6Opaque that wraps a VMHashInstance
21:02 sorear see also this: "To start a process with an explicit set of environment variables, first call Map.clear() before adding environment variables.
21:02 sorear "
21:02 itz joined #perl6
21:03 [Coke] Yes, I hadn't done that part yet.
21:04 [Coke] (no output) also, shell generates no output. :P
21:07 sorear 'echo' generates output, though.
21:07 [Coke] sorear: but not through shell.
21:07 [Coke] I'd need to do echo $a > stuff and read stuff.
21:08 * [Coke] tries to find examples of how to poke into a P6Opaque
21:09 sorear [Coke]: since you used inheritIO, the output from the echo should have gone to the terminal you used to start pelr6
21:10 [Coke] ah, ok.
21:15 * [Coke] stares dumbly at the P6Opaque hierarchy.
21:15 dalek rakudo/nom: 5023481 | (Elizabeth Mattijsen)++ | src/core/traits.pm:
21:15 dalek rakudo/nom: Sort of implement "is parcel" (basically the same as "is rw" for now)
21:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5023481f42
21:15 dalek rakudo/nom: 93f30e8 | (Elizabeth Mattijsen)++ | src/core/List.pm:
21:15 dalek rakudo/nom: Mark List.pop and List.shift as "is parcel"
21:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/93f30e80e7
21:16 lizmat per S06:563
21:19 sorear [Coke]: take a look at setmethcache
21:23 [Coke] sorear++
21:30 masak FROGGS++ # further %f hacking
21:34 masak 'night, #perl6
21:35 lizmat_ joined #perl6
21:38 konundra joined #perl6
21:42 lizmat r: my sub foo is rw { 42 } # feels this should die at compile time
21:42 camelia rakudo bc3f73:  ( no output )
21:42 lizmat r: my sub foo is rw { 42 }; foo=1 # is this will never work
21:42 camelia rakudo bc3f73: OUTPUT«Cannot modify an immutable value␤  in block  at /tmp/Ezd1PkSI_f:1␤␤»
21:42 lizmat r: my sub foo is parcel { 42 }; foo=1 # this we can't tell at compile time
21:43 camelia rakudo bc3f73: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot call 'trait_mod:<is>'; none of these signatures match:�:(Mu:U $child, Mu:U $parent)�:(Mu:U $type, :rw(:$rw)!)�:(Mu:U $type, :nativesize(:$nativesize)!)�:(Mu:U $type, :hidden(:$hidden)!)�:(Mu:U $type, *%fail)�:(Attribute:D $attr…
22:03 dalek roast: 95cab91 | (Elizabeth Mattijsen)++ | S03-binding/nested.t:
22:03 dalek roast: Replace tests for "is rw" by more appropriate "is parcel"
22:03 dalek roast: review: https://github.com/perl6/roast/commit/95cab91658
22:03 dalek roast: 2f3ef00 | (Elizabeth Mattijsen)++ | S03-binding/subs.t:
22:03 dalek roast: Change sub "is rw" to more appropriate "is parcel"
22:03 dalek roast:
22:03 dalek roast: Oddly enough, this file does not seem to be part of roast
22:03 dalek roast: review: https://github.com/perl6/roast/commit/2f3ef007cd
22:04 araujo joined #perl6
22:04 lizmat gnight #perl6!
22:05 labster good night lizmat, good * to the rest of #perl6
22:05 sorear night lizmat!
22:05 sorear o/ labster!
22:05 labster \o
22:06 woolfy joined #perl6
22:09 * jnthn back
22:10 sorear \o/ jnthn
22:12 dmol joined #perl6
22:29 pecastro joined #perl6
22:32 Ben_Goldberg joined #perl6
23:02 konundra joined #perl6
23:09 nanzu joined #perl6
23:34 jnthn sleep &
23:50 cognominal joined #perl6

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

Perl 6 | Reference Documentation | Rakudo