»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by moritz on 3 May 2013.
shinobicl thanks lue 00:00
that's close, but i should have 148.41315910258 for x = 5
thanks all. i'll keep playing with this :) 00:01
lue r: sub postfix:<!> { [*] 1..$^n }; my $x = 5; my @r = (0..$x).map: {($x ** $^a)/($^a)!}; say [+] @r;
camelia rakudo b2072f: OUTPUT«91.416667␤»
[Coke] nqp: use NQPHLL; HLL::Actions.string_to_int("234");
camelia nqp: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤current instr.: 'string_to_int' pc 20387 (src/stage2/gen/NQPHLL.pir:7584) (src/stage2/gen/NQPHLL.nqp:636)␤»
[Coke] nqp: use NQPHLL; HLL::Actions.string_to_int("234",4); 00:02
camelia nqp: OUTPUT«Method 'CURSOR' not found for invocant of class 'String'␤current instr.: 'string_to_int' pc 20443 (src/stage2/gen/NQPHLL.pir:7605) (src/stage2/gen/NQPHLL.nqp:639)␤»
00:02 Chillance left
shinobicl r: sub postfix:<!> { [*] 1..$^n }; my $x = 5; my @r = (0..$x).map: {($x ** $^a)/($^a)!}; say @r.perl; 00:02
camelia rakudo b2072f: OUTPUT«Array.new(1.0, 5.0, 12.5, <125/6>, <625/24>, <625/24>)␤»
diakopter nqp-jvm: use NQPHLL; HLL::Actions.string_to_int("234",4);
camelia nqp-jvm: OUTPUT«NQPHLL.class (No such file or directory)␤ in <anon>␤ in load_module␤ in load_module␤ in statement_control:sym<use>␤ in !reduce␤ in !cursor_pass␤ in statement_control:sym<use>␤ in !protoregex␤ in statement_control␤ in statement␤ in statementlist␤ in comp_unit␤…
00:02 fgomez left
shinobicl the who las elements are the same :S 00:02
last* 00:03
two*
hehe
lue shinobicl: apparently, they're supposed to be the same :) 00:06
00:06 tgt left
lue & 00:08
shinobicl r: sub postfix:<!> { [*] 1..$^n }; my $x = 5; my @r = (0..100).map({($x ** $^a)/$^a!}); say [+] @r; 00:11
camelia rakudo b2072f: OUTPUT«148.413159102577␤»
shinobicl :D
00:12 gdey joined
shinobicl those variables, $^n and $^a, how are they named? which document can i read to understand them? 00:14
timotimo_ perlcabal.org/syn/S06.html#Placeholder_variables 00:15
00:16 gdey left
shinobicl thanks timotimo_ 00:17
timotimo_ you're welcome :)
00:20 jerkbot1 joined 00:24 btyler joined 00:25 jerkbot1 left
[Coke] oh fudge. this nqp2 branch doesn't have any of the PAST -> QAST work. 00:26
00:27 jerkbot1 joined 00:28 jerkbot1 left 00:29 btyler left
[Coke] what is the replacement for &sub := PAST::Compiler.compile($parse.ast); 00:30
?
... and nqp-jvm doesn't even have QAST, does it? 00:31
sorear it has QAST 00:32
FROGGS nqp: nqp::getcomp('nqp').eval('say("hello")')
camelia nqp: OUTPUT«hello␤»
00:32 jerkbot1 joined
[Coke] ok, good. 00:32
FROGGS maybe nqp: nqp::getcomp('nqp').compile($parse.ast) # ? dunno 00:33
nqp: nqp::getcomp('nqp').compile()
camelia nqp: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤current instr.: 'compile' pc 32505 (src/stage2/gen/NQPHLL.pir:12829) (src/stage2/gen/NQPHLL.nqp:1338)␤»
[Coke] It's the result of a .parse that I then need to comile.
the language wasn't nqp, either. 00:34
FROGGS: github.com/partcl/partcl-nqp/blob/...ds/expr.pm
00:35 jerkbot1 left
FROGGS [Coke]: have a look at that... github.com/perl6/nqp/blob/master/s...ler.nqp#L5 00:38
gnight
timotimo_ compile($foo, :target("ast"));?
maybe past instead 00:39
[Coke] FROGGS: over my head at the moment.
00:42 fgomez joined
sorear [Coke]: have a look at t/qast/01-qast.t 00:46
00:50 jeff_s1 left 00:51 jeff_s1 joined 00:54 shinobicl left 00:57 stevan_ left
[Coke] sorear: just have to figure out what to do if it's not NQP. 01:00
sorear [Coke]: it sounds like you're trying to turn QAST structures into executable subs, which is what that nqp::getcomp('whatever').compile($qast, :from('ast')) does 01:01
I think that if you aren't using language-specific custom ops, then any 'whatever' will work equally well as long as it names a language 01:02
01:03 stevan_ joined
[Coke] whee, more failures. 01:04
01:07 arnsholt left
[Coke] so, if I change it to &sub := nqp::getcomp('Partcl').compile($parse.ast, :from("ast")); that now dies with an eventual: 01:08
Error while compiling block : Can only use get_how on a SixModelObject
current instr.: '' pc 48612 (src/stage2/QAST.pir:17766) (src/stage2/QAST.nqp:2981)
gist.github.com/coke/5757381 01:09
01:10 FROGGS left
sorear are you passing in QAST or PAST? 01:10
[Coke] gist.github.com/coke/5757381 again 01:11
01:12 benabik joined, arnsholt joined
sorear notices PAST::foo in Partcl::Actions 01:14
sorear might try to get partcl-nqp running on JNQP later this month
[Coke] sorear: if it ever ran on NQP, you'd have an easier time. ;)
[Coke] goes on a PAST hunt. 01:15
sorear: only PAST in partcl::actions is in a comment. 01:20
sorear I must be looking at the wrong branch 01:22
[Coke] nqp2
(thanks for looking, btw!)
01:25 FROGGS joined 01:26 abnorman joined 01:30 abnorman left
RedditAnalytics just a little poll to break the monotony .. do any of you like listening to music while you program? 01:32
labster sometimes yes, sometimes no on music 01:36
sorear not me, but I'm weird like that 01:39
benabik Another poll: Is github.com down? 01:41
I often like to listen to music, but regularly don't. 01:42
01:53 skids joined 02:04 SamuraiJack joined 02:16 arnsholt left 02:32 census joined, arnsholt joined 02:34 census_ joined, arnsholt left 02:37 census left 02:41 census_ is now known as census 02:43 arnsholt joined 02:48 arnsholt left 02:53 arnsholt joined
colomon RedditAnalytics: I usually listen to music while I program if I am able to. (No one else to disturb, etc.) 02:54
RedditAnalytics I guess I'm a weird case since I really have a hard time programming unless I'm listening to music
census redditanalytics: i'm the same way but with the tv 02:56
RedditAnalytics what's a tv?
;) 02:57
colomon RedditAnalytics: www.last.fm/user/colomon
afk # bedtime
RedditAnalytics this is what you program to? awesome 02:58
02:58 arnsholt left 03:00 mtk left
geekosaur has been listening to www.di.fm/trance all day... but to the extent that he's been coding, it's been in puppet 03:02
03:12 mtk joined 03:13 Rix left
sorear so in the CLR if you have a method which is declared virtual, the verifier forbids nonvirtual calls to that method except in the very specific case of an overriding method doing super.foo() 03:18
apparently the JVM has no such restriction and untrusted user code can make arbitrary nonvirtual calls
so you can't rely on overriding for security
03:24 arnsholt joined 03:25 Rix joined 03:38 Rix left
diakopter ooo, 23andme found a likely 2nd cousin 03:48
03:49 Rix joined
eternaleye lue: re awesomebar, you could define a bookmark with a substitution pattern and a 'syn' keyword so you could type 'syn 16' 03:49
yoleaux 10 Jun 2013 07:05Z <FROGGS> eternaleye: Future[Int] is a type, for me a proper p6ification would be a trait
lue eternaleye: I'll look into that 03:52
eternaleye .tell FROGGS Mmm, a trait-based version of futures might be interesting with a syntax more like: my Int $answer is async( calculate_from( <life universe everything> ) )
yoleaux eternaleye: I'll pass your message to FROGGS.
eternaleye .tell Froggs (thunking the inside of the async trait_mod, of course, which would make it the kind of thing hygenic macros could implement) 03:53
yoleaux eternaleye: I'll pass your message to Froggs.
04:00 preflex_ joined, ChanServ sets mode: +v preflex_
lue looks cool, except I'd have to type "S 16" :/ (I'm not so much concerned with creating a shortcut as I am not being punished for thinking <Enter> after typing S16 would give me the first suggested completion, usually the right spec) 04:01
04:02 preflex left, preflex_ is now known as preflex
sorear .ask jnthn How is subcall_noa's direct call optimization going to interact with Perl 6 function wrapping? 04:14
yoleaux sorear: I'll pass your message to jnthn.
04:28 wbill joined 04:30 Patterner left 04:32 Patterner joined 04:38 shachaf left 04:41 atroxaper joined 04:47 arnsholt left, arnsholt joined 05:04 zby_home_ joined 05:07 dylanwh left 05:08 atroxaper left 05:10 abnorman joined
sorear nr: my @l; { my $*X = 1; @l := gather say $*X; }; 05:16
camelia rakudo b2072f: OUTPUT«Dynamic variable $*X not found␤current instr.: 'throw' pc 347557 (src/gen/CORE.setting.pir:151689) (src/gen/CORE.setting:8887)␤called from Sub 'gist' pc 379580 (src/gen/CORE.setting.pir:164088) (src/gen/CORE.setting:10161)␤called from Sub 'gist' pc 165484 (src/gen/…
..niecza v24-75-g480a062: ( no output )
sorear nr: my @l; if { my $*X = 1; @l := gather say $*X; } 05:17
camelia niecza v24-75-g480a062: OUTPUT«===SORRY!===␤␤Missing block at /tmp/fRb6tIhrWG line 1 (EOF):␤------> if { my $*X = 1; @l := gather say $*X; }⏏<EOL>␤␤Parse failed␤␤»
..rakudo b2072f: OUTPUT«===SORRY!===␤Missing block␤at /tmp/LZDEkRCios:1␤------> if { my $*X = 1; @l := gather say $*X; }⏏<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement modifier loop␤ …
sorear r: my @l; if 1 { my $*X = 1; @l := gather say $*X; }
camelia rakudo b2072f: OUTPUT«Dynamic variable $*X not found␤current instr.: 'throw' pc 347557 (src/gen/CORE.setting.pir:151689) (src/gen/CORE.setting:8887)␤called from Sub 'gist' pc 379580 (src/gen/CORE.setting.pir:164088) (src/gen/CORE.setting:10161)␤called from Sub 'gist' pc 165484 (src/gen/…
sorear r: my @l; if 1 { my $*X = 1; @l := gather say $*X; 2 }
camelia rakudo b2072f: ( no output )
sorear nr: my @l; { my $*X = 1; @l := gather say $*X;'notsink' }; { my $*X = 2; +@l } 05:18
camelia rakudo b2072f: OUTPUT«2␤»
..niecza v24-75-g480a062: OUTPUT«1␤»
05:19 SamuraiJack left
sorear nr: my @l; { my $*X = 1; @l := gather { take $_ for 1..10; say $*X;'notsink' }; $l[5] }; { my $*X = 2; +@l } 05:19
camelia rakudo b2072f: OUTPUT«===SORRY!===␤Variable '$l' is not declared. Did you mean '@l'?␤at /tmp/Pmtgwhm10a:1␤------> $_ for 1..10; say $*X;'notsink' }; $l[5]⏏ }; { my $*X = 2; +@l }␤ expecting any of:␤ postfix␤ statement end␤ sta…
..niecza v24-75-g480a062: OUTPUT«===SORRY!===␤␤Variable $l is not predeclared (did you mean @l?) at /tmp/59JnDRVPlb line 1:␤------> take $_ for 1..10; say $*X;'notsink' }; ⏏$l[5] }; { my $*X = 2; +@l }␤␤Unhandled exception: Check failed␤␤ at /home/p6e…
sorear nr: my @l; { my $*X = 1; @l := gather { take $_ for 1..10; say $*X;'notsink' }; @l[5] }; { my $*X = 2; +@l }
camelia rakudo b2072f: OUTPUT«2␤»
..niecza v24-75-g480a062: OUTPUT«1␤»
05:20 thou joined 05:28 crab2313 joined 05:36 crab2313 left 05:39 Tsuki-san joined
Tsuki-san Hsjfkls 05:39
sorear ? 05:40
05:45 census left, prevost left, dmol1 joined 05:46 dmol left 05:48 Tsuki-san left 06:04 skids left 06:05 skids joined 06:07 shachaf joined 06:10 wbill left 06:11 PacoAir joined 06:13 zby_home_ left 06:14 dmol1 left 06:15 SamuraiJack joined 06:18 skids left 06:21 FROGGS left
moritz looks like cat-over-keyboard to me :-) 06:23
06:35 xinming_ joined 06:36 SmokeMachine left 06:39 xinming left 06:45 domidumont joined 06:57 FROGGS[mobile] joined, SmokeMachine joined
FROGGS[mobile] o/ 06:58
sorear o/ FROGGS[mobile] 06:59
labster \o 07:03
07:08 geekosaur left
labster S16 says that each thread gets its own $*CWD, and that subprocesses use that as their cwd, and that all paths are absolute. 07:09
07:09 geekosaur joined
labster and I think all perl programmers get a pony, too 07:09
07:11 twigel left
moritz wants a unicorn, not a pony! 07:13
07:19 lustlife joined, snearch joined 07:20 domidumont left
labster I'm more of a pegasus guy myself. 07:20
07:21 domidumont joined 07:23 sqirrel joined 07:24 lustlife left 07:25 kaleem joined 07:37 fhelmberger joined 07:46 FROGGS joined
shachaf .u 7F01 08:09
yoleaux No characters found
08:15 FROGGS[mobile] left 08:16 FROGGS[mobile] joined 08:21 amoe joined
sorear woah, I seem to have missed a huge nqp-jvm commit 08:27
moritz a bootstrap update? 08:28
or "Kill initialize REPR function for JVM 6model."? 08:29
sorear several commits, including the bootstrap update 08:30
resulting in a small wall of text from git pull 08:31
08:41 thou left
dalek p: 9514dbe | sorear++ | src/vm/jvm/ (3 files):
s/push_self/push_cur_meth/g
08:42
08:46 dakkar joined
jnthn morning, #perl6 08:49
yoleaux 04:14Z <sorear> jnthn: How is subcall_noa's direct call optimization going to interact with Perl 6 function wrapping?
sorear mroning jnthn 08:50
jnthn sorear: Badly, until I decide how to propagate whether "use soft;" is in force downwards :) Though it need not eliminate it even there; we could have .wrap invalidate it. 08:51
(There's stuff in invokedynamic for invalidating optimistic guesses.) 08:52
sorear I did notice we're using MutableCallSite everywhere, even in wval_noa 08:54
jnthn: see irclog.perlgeek.de/perl6/2013-06-12#i_7186905 08:56
jnthn: seems parrot doesn't do the "two callers" thing, and so rakudo/parrot gets a different result from niecza 08:57
jnthn sorear: But who is write by spec? Niecza? 08:58
wtf 08:59
who is *right* by spec
...
jnthn gets moar coffee
sorear i don't think it's specced as such, but STD.pm6 depends on the niecza behavior
otherwise backtracking into the scope of a contextual doesn't work so well 09:00
09:04 JimmyZ joined
sorear jnthn: Does it make any sense to move a frame from one ThreadContext to another? 09:05
09:05 daxim joined
sorear I'm thinking .tc should be reset when we restore a frame 09:05
jnthn sorear: I guess there's no reason why you can't invokecontinuation on a different thread. 09:06
sorear although we do sort of make the assumption that the same callframe will not be active simultaneously on two threads. 09:09
jnthn Yes... :)
Hmm. :)
sorear we may need a way to shallow-clone continuations, so that NQRacket can duplicate frames when doing funky stuff like that 09:10
jnthn STD depending on a behavior is fairly spec-indicative. 09:11
Mebbe one to confirm with TimToady++. 09:12
sorear jnthn: I was SHOCKED to see that auto-close is not only not dead, it's infected JNQP 09:16
jnthn sorear: Well, that's a lot of why the closure discussion took place with Pm and I at the hackathon.
sorear: 'cus I was very bothered I "needed" to do that. :/ 09:17
sorear Why did you need it?
and how much memory are we leaking by keeping priorInvocation when we don't?
jnthn tries to remember
Right, priorInvocation is the thing I want rid of. 09:18
I *think* it showed up somewhere to do with roles.
sorear I find the behavior of "if you use a big local in a function once, the GC can't reclaim the memory until the function is called again" rather disturbing/surprising
09:18 FROGGS[mobile] left
jnthn Right. 09:19
sorear If I stick a CallFrame with null codeRef into the stack, will stuff break? 09:20
jnthn If anything does, nothing that can't be fixed with a nullness check
09:21 arnsholt left
sorear I guess the question is more *should that be supported* 09:21
jnthn I think there may already be a case where that happens.
sorear because when invoking continuations we need somewhere for the return value to land 09:23
jnthn Would the need go away if somebody magically refactored the return value handling to not use the tc.result_* things? ;)
sorear ehehehe 09:24
jnthn has been planning to return them in the Normal Way at some point :)
sorear need would be reduced 09:25
lexotic take requires the ability for take to scoop up an unrelated gather as if it were just another frame
jnthn Not sure when I'll get to it. My tuits for the next week will be reduced.
09:26 arnsholt joined
sorear and it would be simpler if we could say that all frames being scooped have an associated CallFrame 09:26
o/ arnsholt
oops
which requires nqp::continuationreset to fake up a CallFrame for itself
looks like there's code all over that does things like tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.intBoxType 09:27
so not only do I need a codeRef, but it needs to be pinned to a specific HLL as well. boo.
jnthn I did at one point ponder attaching current HLL to curFrame to avoid all of that. 09:29
(the pointer chasing)
Just set it at frame creation. 09:30
sorear create frame, create coderef, create compunit?
maybe we could make a FAKE frame in KnowHOWMethods
s/frame/coderef/ 09:31
jnthn That could also work. If there's no code executed under the frame frame then it'd not hit the hllConfig usage, I guess...
Sorry, executed under was confusingish. Executed while that frame is tc.curFrame.
sorear it would be curFrame, for just long enough to call invokeDirect... 09:32
09:33 arnsholt left
diakopter sorear: we make a temp/"fake"/intermediary frame for several situations in moar 09:36
09:37 arnsholt joined
sorear but I'm talking about JVM 09:39
diakopter sorear: I know :P
jnthn spends some cycles on $dayjob 09:40
09:41 dakkar left, JimmyZ left 09:42 SamuraiJack left
diakopter sorear: I was just letting you know so you were aware it's a problem/solution jnthn's thought a lot about 09:43
09:44 huf left 09:45 dakkar joined, arnsholt left
sorear I see 09:47
09:50 huf joined
jnthn
.oO( jnthn thinks? :D )
09:50
clkao win 21 09:56
09:57 arnsholt joined 09:59 arnsholt left
moritz
.oO( 21 is only half the answer! )
10:00
sorear wonders how different .bindTo is from MethodHandles.insertArguments 10:01
10:08 dylanwh joined
jnthn sorear: .bindTo can only bind a single, object argument. 10:11
sorear: that is, you can't bindTo an int parameter
sorear: insertArguments doesn't ahve that restriction and can insert as many arguments as needed, at whatever position.
(whereas bindTo always means "the first one") 10:12
Presumably bindTo is cheaper when it can be used, 'cus it's simpler.
10:16 domidumont left 10:20 cognominal left 10:22 domidumont joined 10:24 cognominal joined 10:29 arlinius left 10:30 chayin_ left, chayin joined
sorear jnthn: Is it to be expected that occasionally I have to rm -r src/stage* after changes? 10:36
jnthn sorear: No, that's never happened to me. 10:37
sorear: And shouldn't be happening to you either.
sorear: I guess my first question is: are you doing parallel make? If so, may be a missing dependency...
sorear ok, this is weird 10:40
what could I be doing that's causing a NoSuchMethodError? :/
moritz calling a method that doesn't exist? 10:41
lizmat an error message calling a method that doesn't exist? 10:42
masak good afty, #perl6 10:50
sorear o/ masak 10:51
masak sorear: maybe the others have already filled the deadpan-snarky quota, but it is my belief that what you're doing is *calling* a non-existent method.
if it existed, you wouldn't get an error. and if you weren't calling it, you also wouldn't get an error. 10:52
jnthn sorear: You can also get it if the arg types are wrong, I think.
afty, masak
sorear question is where are we missing the dependency 10:55
jnthn Not sure. I tried to be careful to get 'em all right...
colomon 71.10.146.50:3001/report 10:58
labster: ^^
lizmat good *, #perl6! 10:59
11:06 arlinius joined
lizmat while looking at the hash zen slice, I found that it returns the hash object itself, rather than its values like an array object itself would do 11:06
r: my %h=a=>1,b=>2; say %h{}; say %h{*}
camelia rakudo b2072f: OUTPUT«("a" => 1, "b" => 2).hash␤1 2␤»
lizmat it feels to me that there should be no difference between %h{} and %h{*} 11:07
masak no, I think the above is right.
lizmat and I feel I'm being backed up by S03:5161: The empty C<[]> and C<.[]> postfix operators are interpreted as a 11:08
zero-dimensional subscript returning the entire array, not as a one-dimensional
null slice returning no elements. Likewise for C<{}> and C<.{}> on hashes,
as well as the C<< <> >>, C<< .<> >>, C<«»>, and C<.«»> constant and
interpolating slice subscripting forms.
masak think of the use case "lol this is an interpolating string and I just want the whole hash: %h{} there we go"
lizmat I ran a spectest with %h{} returning %h.values
and the only tests that fail, are the ones that test specifically for the result of %h{} 11:09
masak: in that case, the spec needs to change
11:10 Stygia joined
dalek p: a7d9742 | sorear++ | src/vm/jvm/ (4 files):
Small rethink of method handles for reentry

Turns out we can't just use invokeExact on the original method because the type is different for every compilation unit, duh. So let's pre-curry and cache an appropriate form of the method on the StaticCodeInfo.
11:10
sorear make clean; make test worked
jnthn yay
sorear++
masak lizmat: I haven't thought about %h{} in this setting before. only @a[] 11:11
lizmat: nor can I remind myself of a use case where I've needed it.
lizmat also: the zen slice in the array case could be special in the case of shaped arrays (NYI, but who knows, maybe soon ;-) 11:12
jnthn sorear: Wait, it's the CodeRef.mh already pre-curried with the compilation unit? 11:13
*isn't
11:13 bloonix_ is now known as bloonix
jnthn sorear: github.com/perl6/nqp/blob/master/s...t.java#L84 11:14
masak (also, is this one of the uses of "curry" that should really be "prime"?) :)
sorear jnthn: yeah, it winds up primed twice 11:15
that's not a problem is it?
jnthn sorear: I'm just not quite seeing the difference between mh and mhResume 11:16
No, you can prime stuff twice, I do that elsewhere.
lizmat I will make a spec issue for the meaning of %h{}, so that TimToady c.s. can decide on it
masak lizmat++ 11:17
jnthn ooh
I see
sorear: OK, I read the code properly now. No worries. :)
11:18 rindolf joined
sorear sleep& 11:20
FROGGS gnight sorear 11:22
yoleaux 03:52Z <eternaleye> FROGGS: Mmm, a trait-based version of futures might be interesting with a syntax more like: my Int $answer is async( calculate_from( <life universe everything> ) )
03:53Z <eternaleye> FROGGS: (thunking the inside of the async trait_mod, of course, which would make it the kind of thing hygenic macros could implement)
FROGGS .tell eternaleye I was thinking more like: my Int $answer is async = calculate_from( <life universe everything> ) or my Int $answer = async calculate_from( <life universe everything> ) 11:24
yoleaux FROGGS: I'll pass your message to eternaleye.
jnthn Trouble with my Int $answer = async ... is that the thing that comes back from async is a Task/Future/Promise or whatever we call it. 11:25
lizmat couldn't that desugar to someting converting the actual return value of async to an int? 11:26
jnthn lizmat: Well, int won't be available until later, though :)
masak so, wouldn't you want to do 'my Task[Int] $answer = async ...'
jnthn masak: yes, potentially, but we don't have a way to specify what type of thing an async produces... 11:27
lizmat aka: Int $answer = async{ }.Int ?
jnthn lizmat: that'd probably block on the result, no?
If we're looking at async initialization of things, maybe we want
lizmat if written like that, yes 11:28
jnthn my Int $x will be { ...value producer... };
lizmat maybe async{…} should desugar to async { {…}.Int }
jnthn Too cute, imho
FROGGS then it would still be a Task/Future/Promise returned by async, no? 11:29
jnthn Types are constraints rather than coercers.
FROGGS: right
FROGGS I am thinking about async the same like with lazy
the time you access the value matters 11:30
lizmat wouldn't a Future be something like a fail object?
that may not throw in some situations, like matching the constraint?
FROGGS sounds right to me
lizmat .oO { Fail, Future, Finicky , all of the special F objects } 11:32
FROGGS would be awesome to have eager/lazy/eval and async somehow coherent when it comes to syntax and behaviour
jnthn r: sub foo() { fail 'x' }; my Int $x = foo(); say 'alive' 11:33
camelia rakudo b2072f: OUTPUT«x␤ in method sink at src/gen/CORE.setting:10169␤ in method BUILDALL at src/gen/CORE.setting:801␤ in method bless at src/gen/CORE.setting:743␤ in method new at src/gen/CORE.setting:728␤ in method new at src/gen/CORE.setting:726␤ in block at /tmp/S_w4kXIWec:1␤…
FROGGS jnthn: but that is not about type checking 11:34
jnthn r: sub foo() { fail 'x' }; my $x = foo(); say 'alive'
camelia rakudo b2072f: OUTPUT«alive␤»
jnthn Apparently it is ;)
FROGGS ohh
a bit surprising to me 11:35
jnthn Well, if we let you shove a Failure into a container typed as Int, then what happens in:
FROGGS I think I got it
jnthn my Int $a = foo(); my Int $b = bar(); say $a + $b # the optimizer spots Int + Int, picks the multi-candidate, and inlines
That'll probably blow up in interesting ways. 11:36
lizmat and it's also about not being the right type:
r: sub foo() { fail 'x' }; my Failure $x = foo(); say 'alive'
camelia rakudo b2072f: OUTPUT«alive␤»
11:42 simcop2387 left
lizmat github.com/perl6/specs/issues/51 "Zen slice on hashes: is %h{} the same as %h{*} or not?" 11:44
masak \o/
11:47 simcop2387 joined, kivutar joined, gudahtt joined 11:50 sqirrel left 11:55 kivutar left 11:56 SmokeMachine left 11:57 baest_ joined 11:58 SmokeMachine joined, bonsaikitten left, bonsaikitten joined 11:59 masak left, pmichaud left, pmichaud joined, masak joined, baest left 12:04 snearch left 12:05 snearch joined 12:06 baest_ is now known as baest 12:09 snearch left
[Coke] catche sup 12:19
jnthn 'sup, [Coke]? 12:20
:)
[Coke] :) 12:22
jnthn: looks like the initial conversion to nqp from nqp-rx was verrry spotty. I suspect I had gotten only "puts 3" to work that time, too, and then everything in the past week was getting back to that point after nqp churn. 12:23
jnthn: I fixed that branch so it should at least build for you now.
(on win) 12:24
jnthn [Coke]: OK :) 12:25
[Coke]: yes, it seems it does build 12:26
[Coke] presumably we'll want something better than cat.nqp and echo.nqp files, but seemed the best short term fix.
jnthn
.oO( lolcat.nqp, clearly )
12:27
[Coke] mmmheheheh 12:28
jnthn: do you see anything dodgy here: gist.github.com/coke/5757381 ? 12:29
(the compile call in expr.pm eventually triggers the error above) 12:30
FROGGS [Coke]: what is at src/Partcl/commands.pm:1057 ? 12:31
12:32 tgt joined
[Coke] FROGGS: line 15 of expr.pm 12:32
jnthn [Coke]: Possibly you got some PAST in your QAST 12:35
[Coke]: Alternatively, a string or integer literal (which needs to be a QAST::SVal or QAST::IVal node these days) 12:36
12:36 ldthien0 joined 12:42 rindolf left
[Coke] is there any sane way to debug this? 12:47
12:47 census joined
[Coke] all of my code has already run at that point, no? 12:47
(some debug flag I can enable that will show me what it's complaining about?")
FROGGS dont think so 12:48
12:48 konundra joined
colomon jnthn: just remembered: someone at YAPC::NA was wondering if the approach you used to create the Rakudo debugger could be easily modified to produce a code coverage tool for p6? 12:49
masak dear #perl6ites: in one week, this will happen: github.com/perl6/mu/wiki/perl6-wor...-june-2013
sign up if you're interested.
hm, maybe we should do the reddit thing, too? I'm actually not sure. 12:50
FROGGS jnthn: is that right? github.com/partcl/partcl-nqp/blob/...ns.pm#L318 12:51
census masak++ :)
#masakism ?
12:52 ajr joined
[Coke] FROGGS: fwiw, this is failing on "expr 2". 12:52
12:52 ajr is now known as Guest18734
[Coke] but yah, that looks dodgy. 12:53
FROGGS [Coke]: I'd guess you have to create an QAST::IVal on line 318 12:54
(at least there)
[Coke] FROGGS: that seems plausible. danke.
12:55 ldthien0 left
[Coke] FROGGS: ./partcl -e 'puts [expr 2]' 12:56
2
FROGGS same for line 320, SVal for 335, 338...
cool
12:56 mikemol joined, census2 joined
FROGGS yay, it looks like I got heredocs working 12:57
timotimo_ masak: why does it say "your name here" in the audience part and not in the participants part?
jnthn FROGGS: Looks like it needs to be a QAST::IVal there
FROGGS jnthn: right
[Coke] jnthn++ FROGGS++
FROGGS (having an nqp-debugger would save us from ours of pain... at least when using it) 12:58
timotimo_ masak: also, since i still fail at timezones, that would be 20:00 to 24:00 for CEST, yes?
masak timotimo_: you're free to enter as either participant or audience. it's just that no-one has signed up as audience yet. hope that clarifies things. 13:00
timotimo_: yes, I think that's the right time. better double-check, but yes.
13:01 birdwindupbird joined, SmokeMachine left
timotimo_ signs up 13:02
13:02 bluescreen10 joined 13:03 rindolf joined, daimonic joined 13:04 SmokeMachine joined 13:10 Guest18734 left 13:14 SamuraiJack joined
masak \o/ 13:16
13:17 daimonic left 13:35 btyler joined 13:40 kaleem left, kaleem joined
timotimo_ tadzik: may i ask you to fix io-select to run with current rakudo or give me a hint on how to reach that state? 13:41
13:43 mikemol left, spider-mario joined 13:45 FROGGS left 13:50 PacoAir left, PacoAir joined 13:52 lue left 13:54 FROGGS[mobile] joined 14:01 tgt left 14:02 mikemol joined, tgt joined, imIKARi joined 14:04 lue joined 14:08 mikemol left
timotimo_ oh 14:10
wow, that was easy
14:13 kaleem left
colomon has not managed to build Rakudo-JVM for a couple of days now... :( 14:23
14:23 skids joined 14:26 domidumont left 14:30 thou joined 14:32 JimmyZ joined 14:33 tgt left 14:34 domidumont joined 14:35 tgt joined
timotimo_ why is the $.listen attribute in the IO::Socket::INET class a Bool rather than an Int? 14:35
14:35 FROGGS joined
moritz because where the listening happens is determined by localport and... forgot the name for the local IP address 14:36
timotimo_ okay, so where do i put the number of sockets that may accumulate before they get .accept'd?
at the moment, it will just pass $.listen as the argument to $PIO.listen 14:37
should i open a spec ticket? 14:38
moritz or patch both specs and rakudo 14:39
moritz doesn't really know much about sockets, and is glad when somebody else does the work :-)
timotimo_ yeah, i will do that :)
:$listen! just means it's named and required, right? 14:40
benabik yes
timotimo_ ok good
it's not even in the spec at all 14:42
should i put it there? 14:43
14:49 ldthien0 joined
timotimo_ i was editing a socket that wasn't in git any more o_O 14:54
nope, just not understanding what "git show" does 14:55
jnthn shows your HEAD, without an arg 14:57
14:58 xilo left
timotimo_ i tried to git show path-to-file to figure out what's up with it 14:59
it didn't show up in my git diff, i hadn't realized i had already :Gwrite'd it from my vim
benabik Gwrite! I had wondered where Gadd was. 15:00
timotimo_ :) 15:01
15:14 btyler left 15:20 Stygia left 15:24 btyler joined 15:27 census2 left 15:31 fhelmberger left, FROGGS[mobile] left 15:32 FROGGS[mobile] joined, sqirrel joined 15:33 crab2313 joined 15:36 tgt left 15:38 thou left 15:41 FROGGS[mobile] left, lizmat left 15:44 ldthien0 left
tadzik timotimo_: I've no idea :( 15:44
15:46 census left
tadzik but it looks like you managed to fo that already? 15:46
15:49 ironcamel left 15:51 konundra left, tgt joined 15:53 tgt left
timotimo_ yeah, i managed :) 15:56
masak hey, did I just find a MAIN bug? gist.github.com/masak/5766668 15:59
15:59 dakkar left
jnthn masak: The "if it's in a mdouel it doesn't count" bug is already in RT 16:00
16:01 daniel-s left
jnthn Think I may even have it open in a browser tab as a "probable easy fix"... :) 16:01
16:01 tgt joined, daniel-s joined
masak I'm looking for it now. 16:01
I found the opposite bug: rt.perl.org/rt3/Ticket/Display.html?id=114354 :)
but that one's resolved...
ok, so it's known. then I won't need to submit it. 16:02
ah, found it: rt.perl.org/rt3/Ticket/Display.html?id=84342
16:03 JimmyZ left
masak is there a non-MAIN way to ask Perl 6 "was I invoked directly?" 16:03
(thinking of a workaround)
ok, easy workaround: remove the module declaration. 16:08
16:09 simcop2387 left 16:11 SamuraiJack left 16:13 SamuraiJack joined
masak r: use Test; class C {}; is_deeply C.new, C.new 16:13
camelia rakudo b2072f: OUTPUT«not ok 1 - ␤# got: C.new()␤# expected: C.new()␤»
masak is there an easy, painless way to make (value) objects play nicely with is_deeply? 16:14
r: use Test; class C { has $.x }; is_deeply C.new(x => 5), C.new(x => 5) # perhaps a better example
camelia rakudo b2072f: OUTPUT«not ok 1 - ␤# got: C.new(x => 5)␤# expected: C.new(x => 5)␤»
16:21 fhelmberger joined 16:26 xilo joined 16:32 ironcamel joined 16:36 fhelmberger left 16:46 tgt left 16:54 tgt joined
masak rn: my %h = foo => 42; my @a = \%h; say @a.perl 16:59
camelia niecza v24-75-g480a062: OUTPUT«[\({"foo" => 42}.hash)].list␤»
..rakudo b2072f: OUTPUT«Array.new(Capture.new( list => ("foo" => 42,).list, hash => EnumMap.new()))␤»
masak rn: my %h = foo => 42; my @a = %h; say @a.perl
camelia niecza v24-75-g480a062: OUTPUT«["foo" => 42].list␤»
..rakudo b2072f: OUTPUT«Array.new("foo" => 42)␤»
masak rn: my %h = foo => 42; my @a; @a[0] = %h; say @a.perl 17:00
camelia niecza v24-75-g480a062: OUTPUT«[{"foo" => 42}].list␤»
..rakudo b2072f: OUTPUT«Array.new({"foo" => 42})␤»
masak rn: my %h = foo => 42; my @a = [%h].list; say @a.perl
camelia niecza v24-75-g480a062: OUTPUT«["foo" => 42].list␤»
..rakudo b2072f: OUTPUT«Array.new("foo" => 42)␤»
masak bah :)
some days I just feel like flattening gets in the way...
17:01 kaleem joined 17:06 konundra joined
[Coke] *some* days? 17:08
17:09 cognominal left
colomon some days I feel like flattening everything in my path... 17:11
17:15 imIKARi left
masak .oO( if you don't like flattning, then you might as well switch to Python! is that what you want? huh? huh? ) :P 17:15
ah, false dichotomies. 17:16
I either like them or detest them.
spider-mario if you either like or hate false dichotomies, you might as well try true dichotomies! 17:17
17:18 zby_home_ joined 17:19 birdwindupbird left 17:22 tgt left 17:24 fgomez left
masak spider-mario: my word, you're right. 17:24
or wrong. 17:25
spider-mario what I said is any(True, False)
colomon quite possibly right and wrong 17:28
17:28 dmol joined
daxim the continuum hypothesis is all(Proven to be unprovable, Proven to be something you can't disprove) 17:29
17:29 FOAD left 17:31 btyler left, logie_ joined 17:32 sjn left, sjn joined, logie left 17:33 patspam left, patspam joined 17:38 census joined 17:47 SamuraiJack left, FOAD joined 17:48 cognominal joined
sergot_ hi! o. 17:50
o/
17:50 sergot_ is now known as sergot
masak sergocie! \o/ 17:53
ok, this is a fun one:
rn: my $s = 'pre x post'; $s ~~ /^ (<-[x]>+) 'x' (\N+) $/; $s = ~$0; ~$1
camelia niecza v24-75-g480a062: ( no output )
..rakudo b2072f: OUTPUT«Start of substr out of range. Is: 5, should be in 0..4␤current instr.: 'throw' pc 347557 (src/gen/CORE.setting.pir:151689) (src/gen/CORE.setting:8887)␤called from Sub 'sink' pc 379739 (src/gen/CORE.setting.pir:164183) (src/gen/CORE.setting:10169)␤called from Sub 'M…
masak n: my $s = 'pre x post'; $s ~~ /^ (<-[x]>+) 'x' (\N+) $/; $s = ~$0; say ~$1
camelia niecza v24-75-g480a062: OUTPUT« post␤»
masak I'm entirely with Niecza here.
I think rakudo has... a bug. :)
of course you should bind to the string itself, not to the scalar container that holds it. 17:54
masak submits rakudobug
17:54 FOAD left
eternaleye jnthn: regarding async and returning a Future, I'm in agreement with you - but FROGGS' point makes sense to me about it being insufficiently sugared. Perhaps we could just overload infix:<=>( ::T $lvalue, Future[T] $rvalue ) in some way? 17:54
yoleaux 11:24Z <FROGGS> eternaleye: I was thinking more like: my Int $answer is async = calculate_from( <life universe everything> ) or my Int $answer = async calculate_from( <life universe everything> )
nwc10 rakudo has *a* bug? Inconcievable? 17:56
masak you keep using that word. 17:57
17:57 fgomez joined
tadzik it could have a "Bug #1", like Ubuntu had 17:57
"#1 - people still run Rakudo 5.8"
eternaleye masak: When you put that ellipsis in your earlier line, I heard a scare chord. 17:58
17:58 lizmat joined
nwc10 well, it's sort of "Rakudo has but one bug? No, I don't believe this" 17:58
masak eternaleye: :)
eternaleye "I think rakudo has... [DUNNNN] a bug" 17:59
Complete with that gif of the gopher suddenly turning to the camera.
diakopter gophers are harder to shave than yaks
18:00 daxim left
[Coke] LHF for lurkers: add this test to roast: rt.perl.org/rt3/Ticket/Display.html?id=77504 18:01
jnthn
.oO( Lurker Hanging Fruit )
18:02
18:02 pochi joined 18:04 benabik left
moritz wonders if counts as a lurker these days 18:06
masak if you do, you're our favorite lurker! 18:07
eternaleye moritz: I suspect you delurked loooong ago :P 18:09
18:09 ajr joined 18:10 ajr is now known as Guest15268, Guest15268 is now known as r_aj, r_aj is now known as ajr_
[Coke] relurker! 18:11
moritz any fun ideas I could talk about at YAPC::EU? 18:12
I'm slowly planning my attendance
tadzik \o/
moritz I'm thinking of a lightning talk "Perl 6 in numbers", with lots of stuff that can be measured over time 18:14
18:14 btyler joined
moritz LOC, performance, passing tests, number of modules, ... 18:14
but I don't think I can fill more than 5 minutes with it
diakopter moritz: graphs of irc participation would be interesting 18:15
tadzik Commitbit-driven community
tadzik considers submitting "Organizing a Perl Workshop for dummies"
it went quite well on PLPW 18:16
moritz and for a main talk, maybe "Perl 6 Errors" (about error reporting, exceptions and such stuff)
tadzik oh!
diakopter moritz: maybe height of day to indicate number of irc messages, and some form of cyclical horizontal color gradient to indicate some measure of "churn" of people 18:17
masak moritz: yes, but call it "Exceptional Perl 6" :)
"Perl 6 Errors" makes it sounds like we are less-than-infallible around here... :P
tadzik Error-crouch Perl 6 18:19
heh. Perl 6 Failures would've been better :D 18:20
"this is how we fail()"
diakopter "Failing Perl 6"
eternaleye "Exceptional Perl 6: Throwing Failures to somewhere they can be handled properly"
diakopter "fail Perl fail 6 fail"
huf "exceptional monkeys get to throw exceptional ..." 18:21
tadzik Perl 6 CATCHes 18:22
18:22 FOAD joined, FOAD left, FOAD joined
jnthn Crouching Exception, Hidden Failure 18:24
Ooh 18:25
"How to make Perl 6 die" :P
[Coke] Too Perl to Fail
18:26 arnsholt joined
tadzik jnthn: haha, awesome 18:27
arnsholt jnthn: Any objections to factoring the generateJVMType bits of P6Opaque into a separate class? I think it'd be useful to share that logic with the CStruct REPR 18:28
jnthn arnsholt: Yes
arnsholt: Uh, wait. No.
arnsholt: I mean, you can refactor it that way if you wish :) 18:29
arnsholt Cool
jnthn (the yes was agreement to the second sentence, the "no" was "no objections" :))
arnsholt Yeah, with the third line as context, it made sense =)
Although I think the CPointer REPR is the first one I should write 18:31
jnthn :) 18:32
arnsholt Least amount of moving parts and all that
jnthn hopes to find the concentration to get MapIter somewhat sorted this evening.
arnsholt I think the hardest thing to figure out will be how to attach a C thing to a Java object (or alternatively create and keep track of pairings of the same) 18:33
18:38 benabik joined 18:39 crab2313 left
arnsholt Ooooooh, one thing seen on Stack Overflow: store pointers in Java long fields... very evil... 18:44
sorear good * #perl6 18:46
benabik arnsholt: why?
diakopter sorear: welcome to the land of the awake. :)
sorear wasn't there an exceptions talk at frankfurt?
arnsholt benabik: Why pair C and Java stuff, or why long? =) 18:47
jnthn sorear: Yeah, but the speaker hijacked it for his own means.
benabik arnsholt: Why pass around a pointer as a long? Just so you can introduce segfaults to Java? 18:48
diakopter sorear: having met you in person, I now know how to sound out your messages in my head to get the intended intonation and expression. it was easy. All I have to do is imagine your words being spoken by Sheldon from Big Bang Theory. :)
benabik Java, segfaults. Segfaults, Java. I'm sure you two will get along great. 18:49
arnsholt benabik: Yeah, it's really nasty. But so far it's the only option I've come across 18:50
jnthn Segfaulting the JVM for fun and profit
arnsholt Apparently segfaults are -Ofun =) 18:51
benabik arnsholt: Creating a final Pointer class, so at least people can't change it? 18:57
arnsholt Yeah, that probably makes sense
Although this is pretty deep in the compiler guts, so it needs less protection than more directly user-facing code 18:59
19:01 tomyan joined, tomyan left 19:02 stevan__ joined 19:03 stevan__ left 19:04 stevan__ joined 19:05 stevan_ left
sorear jnthn: is there a stability/deprecation policy that applies to nqp:: opcodes and semantics? 19:06
19:06 GlitchMr left 19:08 GlitchMr joined
jnthn sorear: Nothing formal at the moment. What're you considering? 19:09
sorear: A bunch of them are pretty new anyway...
sorear jnthn: oh, just "how perfect does nqp::continuation* need to be on the first pass"
19:10 tgt joined
jnthn sorear: It doesn't, especially as it's new / just going in now. 19:11
sorear: It's mostly just a concern if lots of people were to come to depend on it. I don't think that's going to happen in a hurry. :)
sorear I see 19:13
19:18 itz_ joined 19:20 itz__ left, kaleem left 19:24 gudahtt left 19:25 pmurias joined
labster Is it possible to create an object that does not have a Str method? 19:27
tadzik why? 19:28
colomon rn: class A { has $.a; }; my $a = A.new(a => "bue"); say $a.Str
camelia niecza v24-75-g480a062: OUTPUT«A()<instance>␤»
..rakudo b2072f: OUTPUT«A<285003360>␤»
colomon is that from Any?
labster no particular application. just thinking about what would be a valid input to path stuff.
Mu has .Str 19:29
colomon rn: class A { has $.a; method Str() { ... } }; my $a = A.new(a => "bue"); say $a.Str
camelia niecza v24-75-g480a062: OUTPUT«Unhandled exception: >>>Stub code executed␤ at /tmp/VXbaXIQcbs line 1 (A.Str @ 4) ␤ at /tmp/VXbaXIQcbs line 1 (mainline @ 7) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4542 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4543 (module-CORE…
..rakudo b2072f: OUTPUT«Stub code executed␤ in method gist at src/gen/CORE.setting:10161␤ in method gist at src/gen/CORE.setting:893␤ in sub say at src/gen/CORE.setting:11047␤ in block at /tmp/tnFo3PJvfe:1␤␤»
labster r: class A { has $.a; method Str() { ... } }; my $a = A.new(a => "bue"); say $a.^methods.grep('Str') 19:30
camelia rakudo b2072f: OUTPUT«Str␤»
labster it has one, it's just really bad at making strings :)
19:31 snearch joined
colomon exactly. :) 19:31
19:36 konundra left 19:39 domidumont left 19:45 konundra joined
TimToady is kinda back online for a day or two; for a definition of 'online' that does not preclude a bazillion other people trying to use this wifi spectrum here in Cambridge, where there are obviously too many smart people 19:47
colomon o/ 19:48
nwc10 or too many people interested in videos of cats
I think he's more optimistic than me :-)
lizmat o/ TimToady
diakopter how much bigger is bazillion than barillion and fooillion?
TimToady about --> <-- that much 19:49
labster a quuxillion more.
diakopter commute& 19:50
sorear o/ TimToady
TimToady on zen slices, .[] is supposed to be equivalent to @(), and .{} equivalent to %(), as a convenient contextualizer 19:51
.{} is specifically not the same as .{*} 19:52
masak what's a good way to get the fractional part of a Rat? 19:55
labster .oO ( let my terriers catch the rat first )
masak adds that to perl6/specs/issues 19:56
colomon masak: .denominator
masak colomon: .denominator != fractional part
colomon masak: yeah, just realized that 19:57
TimToady nr: my $x = 3.14159625; say $x - $x.Int
camelia rakudo b2072f: OUTPUT«0.1415963␤»
..niecza v24-75-g480a062: OUTPUT«0.14159625␤»
colomon don't think we have a method for it.
masak I did ($rat % 1), but that left me with a Num, and some rounding errors :/
colomon nr: my $x = -3.14159625; say $x - $x.Int
camelia niecza v24-75-g480a062: OUTPUT«-0.14159625␤»
..rakudo b2072f: OUTPUT«-0.1415963␤»
moritz nr: my $x = 3.14159625; say ($x - $x.Int).perl
camelia rakudo b2072f: OUTPUT«0.1415963␤»
..niecza v24-75-g480a062: OUTPUT«0.14159625␤»
TimToady nr: my $x = -3.14159625; say $x - $x.Int;
camelia niecza v24-75-g480a062: OUTPUT«-0.14159625␤» 19:58
..rakudo b2072f: OUTPUT«-0.1415963␤»
moritz nr: my $x = 3.14159625; say ($x - $x.Int).nude.join: '/'
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«113277/800000␤»
jnthn nr: my $x = 3.14159625; say ($x - $x.floor).perl
camelia rakudo b2072f: OUTPUT«0.1415963␤»
..niecza v24-75-g480a062: OUTPUT«0.14159625␤»
TimToady you'll have to decide what to do with negatives
masak in my case, I don't care about negatives.
so .floor and .Int semantics are equally usable.
19:58 rindolf left
colomon TimToady: your $x - $x.Int strikes me as doing the Right Thing for negatives 19:58
TimToady well, maybe
19:59 tomyan joined
labster rn: my $x = 3.14159625; say ($x.numerator % $x.denominator)/$x.denominator 19:59
colomon still, should we have a .fractional-part method?
camelia rakudo b2072f: OUTPUT«0.1415963␤»
..niecza v24-75-g480a062: OUTPUT«0.14159625␤»
TimToady I think negatives are sufficiently undefined that we should leave it up to the user 20:00
nr: my $x = -3.14159625; say $x - $x.floor;
camelia niecza v24-75-g480a062: OUTPUT«0.85840375␤»
..rakudo b2072f: OUTPUT«0.8584038␤»
TimToady some people might want that
masak I ended up doing ($x - $x.Int) in my code, and it seems to work fine.
TimToady nr: my $x = -3.14159625; say $x - $x.trunc; 20:01
camelia niecza v24-75-g480a062: OUTPUT«Unhandled exception: Unable to resolve method trunc in type Rat␤ at /tmp/loNe0vAuvm line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4542 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4543 (module-CORE @ 590) ␤ at /home/…
..rakudo b2072f: OUTPUT«No such method 'trunc' for invocant of type 'Rat'␤ in block at /tmp/0LbXseI5B8:1␤␤»
TimToady I guess we don't have that
nr: my $x = -3.14159625; say $x - $x.truncate;
camelia niecza v24-75-g480a062: OUTPUT«-0.14159625␤»
..rakudo b2072f: OUTPUT«-0.1415963␤»
masak .oO( no need to trunc perfectly cromulent English words ) :P 20:02
TimToady then why do they do just that so often here in Merry Olde
lue
.oO(Why is "abbreviation" not one itself?)
20:04
TimToady btw, yesterday we ate in a cave/pub, Þe Olde Trip to Jerusalem, the oldest pub in continuous operation in England.
est 1187 or some such 20:05
jnthn ooh :)
20:05 konundra left
TimToady under the Castle of Nottingham which isn't really there anymore... 20:05
moritz continuous operation? no curfew? :-)
TimToady continuous intermittent, sez Glo :) 20:06
20:06 twigel joined
masak that's my favorite kind of continuous. 20:07
TimToady kinda like this wifi network here... 20:08
20:09 arnsholt left
lizmat TimToady: so maybe {} should return self.list rather than self ? 20:09
like [] does ?
jnthn %() returns .hash 20:10
TimToady it needs to return the non-itemized form, but it still needs to have the identity of the hash/array
lizmat so the .list in the array case, only has the identity because .list has the same identity 20:11
TimToady nr: say %( %*ENV ) === %*ENV
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«True␤»
TimToady nr: say %*ENV{} === %*ENV
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«True␤»
TimToady that is correct
lizmat rn: my @a; say @a === @a[] 20:12
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«True␤»
lizmat rn: my @a; say @a === @a[.list
camelia niecza v24-75-g480a062: OUTPUT«===SORRY!===␤␤Unable to parse subscript at /tmp/vJXOUUUVbe line 1:␤------> my @a; say @a === @a[⏏.list␤Couldn't find final ']'; gave up at /tmp/vJXOUUUVbe line 1 (EOF):␤------> my @a; say @a === @a[.list⏏…
..rakudo b2072f: OUTPUT«===SORRY!===␤Unable to parse expression in subscript; couldn't find final ']'␤at /tmp/4K7bzmFg34:1␤------> my @a; say @a === @a[.list⏏<EOL>␤ expecting any of:␤ method arguments␤ postfix␤ statement end␤ …
lizmat rn: my @a; say @a === @a.list
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«True␤»
TimToady nr: my @a = 1,2,3; say @a === @a[*]
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«False␤»
TimToady .[] is not supposed to be the same as .[*]
lizmat ok, that's clear to me now. But not clear from the spec, at least not to me 20:13
TimToady .[*] is a 1-dimensional slice; .[] is 0-dimensional
.[] is the degenerate form of .[*;*;*] --> .[*;*] --> .[*] --> .[] 20:14
lizmat is apparently still living in flatland :-) 20:16
TimToady it's one of those things that we realized when S09 was written, but nobody goes there much :) 20:17
anyway, not all of .nl is that flat... :)
lizmat true.. we have mountains as well, although they're locate in the Carribean 20:18
TimToady we came through the fens today, where they used to build churches on the islands between the peat bogs
now they're just on hills :)
lizmat that's one way to make mountains :-) 20:19
rjbs "0-dimensional slice" meaning that it selects based on a 0-dimensional criteria and gets you everything? 20:21
20:21 sqirrel left
masak that's a nice way to see it. 20:23
20:25 simcop2387 joined 20:26 simcop2387 left, simcop2387 joined
lizmat rn: say (my @h).list.WHAT # shouldn't this be (List) ? 20:28
camelia rakudo b2072f: OUTPUT«(Array)␤»
..niecza v24-75-g480a062: OUTPUT«Potential difficulties:␤ @h is declared but not used at /tmp/2T4EltSrn9 line 1:␤------> say (my ⏏@h).list.WHAT # shouldn't this be (Lis␤␤(Array)␤»
lizmat or is this an optimization leaking out?
masak rn: say Array ~~ List 20:29
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«True␤»
masak if it already is one, you don't need to convert to it.
Liskov-Compliant™. 20:30
lizmat rn: say List ~~ Array
camelia rakudo b2072f, niecza v24-75-g480a062: OUTPUT«False␤»
lizmat ok… trying to wrap my head around seeming inconsistencies
lue r: my @a is List; say @a.WHAT; 20:33
camelia rakudo b2072f: OUTPUT«(Array)␤»
pmichaud .list is a contextualizer; it simply asks the invocant to return its list component 20:38
the coercer (if there is one) would be .List
lizmat o/ pmichaud! 20:39
masak pmichaud! \o/
pmichaud also, as part of the S07 work I'm expecting there to be some tightening of definitions on .values and the like 20:40
20:41 twigel left
pmichaud and a bit of a refactor on iterators in general, now that I understand "hyper" and "race" a bit better. 20:41
(yapc::na presentations)++
colomon \o/
pmichaud when that will take place... I dunno. 20:42
hopefully sometime this summer.
lizmat pmichaud: any idea on the size of Hash.new refactoring ?
size of work needed, I mean 20:43
pmichaud btw, did anyone else happen to see the tweet that yapc::asia is specifically looking for #perl6 talks?
pmichaud looks
jnthn pmichaud: Yeah, saw it 20:44
masak oh?
jnthn I did NA this year, and hadn't really budgeted to do YAPC::Asia also.
pmichaud twitter.com/yapcasia/statuses/3443...0633124864
masak ooh 20:45
colomon would get lynched if he scheduled another trip away from his family.
pmichaud colomon: so, don't schedule one. Just go. :-P 20:46
masak because that would get him so much less lynched?
colomon :p
sorear alternatively, bring your family with you.
lizmat we're still not sure whether we'll be going to YAPC::Asia, but if we're going I could give a go at a Perl 6 presentation
pmichaud sorear++ ftw!
so yeah... take your family. 2nd and 3rd mortgages on houses aren't *that* hard to come by these days :-P 20:47
sorear currently has no intention of going to yapc::asia, fwiw
colomon sorear: If I could afford to do that, I'd probably get lynched for not taking the family to Newfoundland instead. ;)
20:49 autumn left
sorear let's arrange for yapc::canada again in 2015 20:49
jnthn I'd totally do a YAPC in Canada. 20:50
colomon yapc::canada++
pmichaud Well volunteered! :-P
masak jnthn is doing a YAPC in Canada? awesome!
jnthn: I'll be there!
colomon \o/
jnthn eh? That's not what I meant! :P 20:51
pmichaud btw, for all of the yapc::na attendees, I thought I'd note that it finally got hot here after yapc::na was over :-P
masak too late you already volunteered
20:51 autumn joined
lue Wouldn't that be YAPC::NA::CA :) ? 20:51
jnthn OK, I'll work on it once I run out of Perl 6 / Moar things to do :P
benabik could probably go to one in Toronto. 20:52
sorear pmichaud: *after* lizmat got stuck in the falsh flood?
masak pmichaud: oh man, if that was not heat, I'm glad I didn't stay long enough to experience actual heat...
jnthn: well avoided. :)
lizmat flash flood ? what where? that was in Germany, not in NL :-)
colomon wasn't there a flash flood in austin on your way home (take one)? 20:53
sorear lizmat: iirc you missed your flight out of houston->AMS because of flooding
colomon YAPC::Toronto or YAPC::St John's would be absolute must attends for my whole family. :) 20:54
pmichaud masak: the week in austin was a late spring for us. summer is approaching fast... 37degC highs on their way
jnthn Man, this MapIter porting is laborious...
lizmat Ah, that way: no, we got stuck in the traffic jam caused by too much rain for the drains in Houston
[Coke] I wonder if we could get an NYC or philly event.
jnthn Or I'm just braindead...
[Coke] (too much rain) lizmat - that has been a problem forever. flooded many times when I lieved there.
pmichaud jnthn: start with the naive MapIter, fwiw. 20:55
lizmat jnthn: a good night's sleep will revive your brain
sorear [Coke]: would the pittsburgh perl workshop be close enough?
jnthn lizmat: Been trying that for the last 3 nights... :)
pmichaud: Yeah, am skipping sinking, control exceptions etc. for the first cut.
sorear I think that's in the same state as philly
pmichaud "same state as philly" is kind of like saying "I think El Paso is in the same state as Houston", though :-P 20:56
sorear I tend to think about points in space as floating-point displacements from home 20:57
:)
pmichaud (el paso is halfway between houston and san diego, fwiw :)
so, drive from san diego to houston. when you reach el paso, you're halfway there.
TimToady intricacies is definitely emphasized on the 1st syllable in western US
sorear I thought AZ and NM were bigger than that 20:58
TimToady just like "intricate"
pmichaud san->hou 1468mi
elp->hou 745mi
well, I-10 only hits the southwest corner of NM 20:59
on the plus side, a lot of I-10 is this: upload.wikimedia.org/wikipedia/comm...eiling.JPG 21:02
lizmat: (hash.new) it doesn't seem like a big chunk of work to me. I think I may be able to get the first part done tonight, even. 21:03
I'll attempt it again and report back tomorrow morning. 21:04
lizmat pmichaud++
21:08 bluescreen10 left
lizmat going home from Niederrhein.pm meeting& 21:08
21:08 lizmat left, zby_home_ left
jnthn wtf, for <a b c> { .say } just worked. 21:10
colomon jnthn: in JVM?
jnthn yeah
colomon \o/
jnthn So, guess we got simple mapiter...
tadzik aww yiss 21:11
jnthn woo, for <a b c d> -> $a, $b { say $a ~ $b } # also works
sorear \o/ jnthn++
timotimo_ cool!
jnthn darn, this startup time is incredibly terrible...I'm gonna have to spend some tuits on that soon.
colomon jnthn++ indeed
21:12 zby_home joined
sorear pmichaud: if it says 80 on the signs, that means everyone does 100, right? 21:12
dalek kudo/nom: 76de8c7 | jnthn++ | src/ (2 files):
Start porting the core of MapIter.

It was a blob of PIR. This does it mostly with QAST trees. Not yet complete; missing control exception handling and sink stuff. Works for the basic cases, though.
21:17
sorear mapiter used pir? O_O *looks* 21:20
did it have to use PIR or was that an optimization? 21:21
21:22 zby_home left
jnthn For the control exceptions I think it had to 21:22
sorear ...part of me suddenly wants to rename StackSaveException to ShiftException, because it's thrown by nqp::continuationshift and it's almost but not quite like a ControlException 21:24
masak ShiftException sounds a bit too ambiguous. 21:25
maybe ContinuationShiftException?
sorear masak: we'd need AltException and MetaException to continue the theme. 21:26
masak hehe
lee_ jnthn: you're probably aware, but the JVM p6 repl gives some strange errors if you create the same data structure twice
gist.github.com/leedo/55553c28f1300af23844
timotimo_ well, if you write the same code twice 21:27
try say "hello" twice in a raow
lee_ ah yes, same thing
sorear wut
jnthn ah, 'cus it uses the hash of the source for the SC identifier. :) 21:28
sorear also, lee_, I don't rember you, welcome to #perl6!
jnthn That's not the best of ideas for the REPL...
lee_ sorear: hehe thanks, long time lurker :P
jnthn hm, quite a stream of errors... 21:29
sorear jnthn: what should I do with documentation and usage examples for nqp::continuation* ? 21:30
from design.pod
masak lee_: welcome to the land of the not-lurking!
timotimo_ nurking? 21:31
21:31 alester left
jnthn sorear: docs/continuations.md # or so? 21:33
dalek kudo/nom: c947f78 | jnthn++ | src/Perl6/Grammar.nqp:
Fix REPL bug when same line issued twice.

Reported by lee_++.
21:37
lee_ yay! thanks 21:39
masak 'night, #perl6 21:41
sorear jnthn: Why does it work in the NQP REPL?
rakudo-jvm: say 2
jnthn sorear: NQP always adds a timestamp into the SHA1 21:42
sorear: 'cus of the bootstrap
sorear Will the fix you just did also handle the case of eval?
Is it possible to have two modules with the same source text that are compiled differently because of relative paths or something? 21:43
continuations.md WFM
though I guess I need to learn markdown :D
21:43 benabik left
jnthn sorear: (eval) yes 21:46
sorear: Oh, there's .pod in that directory too
21:46 twigel joined
jnthn sorear: I'm just too lazy to write Pod. :) 21:46
21:55 spider-mario left
pmichaud why is MapIter building QAST? 22:03
that's.... weird. 22:04
oh, you made it into an op.
I'm not sure I like it as an op. :-/ 22:05
are we limited to an op because of the control logic? 22:06
jnthn pmichaud: yes 22:13
pmichaud: I tried it another way first, but this worked out easiest. 22:14
pmichaud that's likely not going to work medium-long term.
can't say exactly why... just alarm bells here saying "nononononono"
more to the point, we have to find a way to make MapIter fast without resorting to per-vm ops to do it. 22:15
otherwise we're going to be doing per-vm ops for a lot of stuff. 22:16
(a lot of high-level-ish stuff)
sorear pmichaud: It's not a per-vm op
22:17 lizmat joined
pmichaud sorear: I see a lot of JAST and "as_jast" in the patch, so it looks per-vm-ish to me. But I don't have tuits to be able to look more closely now. 22:17
jnthn Yes, this is JVM specific, just like the PIR is Parrot-specifc 22:18
pmichaud I just want to register my objection to the patch and a note that we may be backing it out at some point.
22:18 GlitchMr left
pmichaud the PIR was Parrot specific primarily for speed concerns, iirc. 22:18
at one point I had a non-PIR version.
jnthn I thought it was primarily for the control exception stuff?
pmichaud no, speed stuff originally.
jnthn If any place is worth VM-specific optmization, this is one of 'em, though... 22:19
pmichaud you didn't like the slowdowns we were seeing in the b->nom transition, so we went to PIR to avoid that.
but that was also before the nqp:: space was largely available.
jnthn If there's a reasonably performant solution using nqp:: ops, I'm all for it. 22:20
pmichaud had the nqp:: ops been more available, I would've likely used them more directly.
just remember that MapIter's current implementation was done before we had good native var support and before we had nqp:: ops.
so I don't consider it to be "the right way to do it", or a way that we want to copy to other vm platforms, unless we just *have* to do so. 22:21
lizmat is back home and needs to sleep&
pmichaud (which may be the case... but once you generalize to n==2, it's pretty tempting to keep going to larger values of n)
lizmat will check backlog later
22:22 snearch left
pmichaud also, even if the PIR is because of control exception logic, I'd prefer to think it's that way because of Parrot's broken exception model, which we could hopefully fix for other vm platforms. 22:22
rather than continue being hobbled by parrot's way of doing it. 22:23
22:23 GlitchMr joined
pmichaud i.e., it seems to me there should be a much cleaner way of solving it in other vm platforms (and if there isn't, we're storing up some bigger difficulties for later) 22:23
jnthn ok, ok... 22:24
22:24 dmol left
jnthn maybe I'll see if I can figure out another way to do it. 22:24
pmichaud I'm not saying revert the patch.
jnthn Otherwise, you're only gonna be telling me the same a month or so down the line when I do this for Moar :P
pmichaud exactly.
jnthn At which point I'll really be fed up of porting MapIter :P 22:25
pmichaud not to mention that the current MapIter is wrong anyway.
jnthn I think I can see a way to do the control exception stuff, actually...
pmichaud the current MapIter will change a fair bit when we introduce threading, hyper, race, tc.
*etc.
[Coke] sorear: aye. I could drive to that and pick up a few people on the way, mebbe.
(not sixers though) 22:26
pmichaud which is also why I'm not saying "revert the patch", but more saying "let's not get in the pattern of thinking this is the way to do it"
sorear you couldn't pick up sixers? or just there are none in the area?
pmichaud because it feels really wrong to me.
sorear
.oO( TIMTOWDI )
pmichaud I'd prefer to see how we'd write it in p6 code (perhaps at the level of nqp:: ops), then how to make that work. 22:27
okay, I have to fetch dinner here... bbl
22:32 ajr_ left
dalek ast: be0cfe8 | (Solomon Foster)++ | S32-list/roll.t:
Fix Niecza fudging.

It was reporting a TODO pass for this test, but in actuality the test's current approach simply does not work for Niecza. I've changed it to a skip to cut down on the spectest noise, and not tempt someone else to remove the fudging all together.
22:32
[Coke] sorear: I don't know of any between here and there unless there's some in NYC. 22:34
22:53 Timbus left, Timbus joined 22:58 autumn left 23:00 autumn joined 23:03 aindilis left
jnthn 'night, #perl6 23:05
23:05 pmurias left 23:10 btyler left 23:21 cxreg2 is now known as cxreg 23:25 tgt left 23:36 census left
colomon \o 23:39
23:40 tomyan left
sorear o/ colomon 23:42
colomon sorear: how goes continuations?
rn: my @var = <a b ab c>; my $aref = \@var; say 'a0' ~~ m/$aref[0]/ 23:44
camelia niecza v24-75-g480a062: OUTPUT«Potential difficulties:␤ Apparent subscript will be treated as regex at /tmp/YyO5L1ul4r line 1:␤------> >; my $aref = \@var; say 'a0' ~~ m/$aref⏏[0]/␤␤False␤»
..rakudo b2072f: OUTPUT«Potential difficulties:␤ Apparent subscript will be treated as regex␤ at /tmp/pg8ofwTb3s:1␤ ------> >; my $aref = \@var; say 'a0' ~~ m/$aref⏏[0]/␤False␤»
sorear colomon: pretty good. shuffling tuits with $dayjob though
colomon understood. Still, it makes me happy to see you working on rakudo-jvm. :) 23:45
rn: my @var = <a b ab c>; my $aref = \@var; say 'a b ab c0' ~~ m/$aref[0]/ 23:48
camelia rakudo b2072f: OUTPUT«Potential difficulties:␤ Apparent subscript will be treated as regex␤ at /tmp/_GLkM5sFIt:1␤ ------> aref = \@var; say 'a b ab c0' ~~ m/$aref⏏[0]/␤「a b ab c0」␤␤»
..niecza v24-75-g480a062: OUTPUT«Potential difficulties:␤ Apparent subscript will be treated as regex at /tmp/EV2AIPaqQg line 1:␤------> aref = \@var; say 'a b ab c0' ~~ m/$aref⏏[0]/␤␤False␤»
sorear not rakudo-jvm. we never did get the CLA done in Austin. :)
colomon doh!
just nqp-jvm?
dalek ast: 2277bd3 | (Solomon Foster)++ | S05-metasyntax/litvar.t:
Niecza refudge.
23:54
sorear we'll see 23:55
i'll have to find any(scanner, stamp)
colomon do you have a printer? 23:58
www.usps.com/business/online-postage.htm 23:59