»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:01 Moukeddar joined 00:02 noganex left 00:04 Moukeddar left 00:07 noganex joined, dorlamm left 00:10 ab5tract left 00:13 rdesfo left 00:17 PacoLinux left 00:29 nbrown left, nbrown joined 00:32 benabik_ joined 00:33 benabik left, benabik_ is now known as benabik
[Coke] assymetry? 00:34
froodion slip.
00:37 wolfman2000 joined 00:42 silug_ left 00:44 rdesfo joined 00:52 shinobicl left 01:04 noganex_ joined 01:07 noganex left 01:15 Reaganomicon left 01:16 Reaganomicon joined 01:19 tokuhirom left, tokuhirom joined 01:23 tokuhirom left
dalek kudo/nom: 0756691 | Coke++ | t/spectest.data:
run some fudged tests
01:26
kudo/nom: 57db83c | Coke++ | t/spectest.data:
track failure modes
pmichaud Coke++
[Coke] whoops. one of those is old.
still safe, though. *whew8 01:27
01:32 whiteknight left 01:44 woosley joined 02:05 jaldhar joined 02:06 jaldhar left, jaldhar joined
sorear TimToady: what is the behavior of PRE { (POST @arr[$_] == $x) for ^10 } ? 02:18
TimToady: inside PRE, is POST an executable statement? does it care whether it is reached in execution, or how many times? Is POST valid in sub-blocks of PRE, or only in the PRE itself? 02:19
TimToady general rule: anything UPPERCASE is not an executable statement, per se 02:24
since it's not executable, there's no point in putting it more innerly than necessary, except possibly to add more lexicals around it for some reason 02:25
things like my $x = BEGIN expr are a slight exception to the general rule, but by the time the = happens, the BEGIN is long gone 02:26
sorear what about TEMP? is it possible to put TEMP in a loop and queue up multiple restoration closures? 02:37
02:39 silug_ joined
TimToady dunno, maybe something with 'will temp' will be more apropros 02:41
need to think about it
02:54 Moukeddar joined 03:01 ranott left 03:02 mkramer1 joined 03:15 colomon joined 03:19 rdesfo left 03:21 rdesfo joined 03:23 Chillance left, Su-Shee_ joined 03:27 Su-Shee left 03:28 sili is now known as TiffanyButterfly 03:30 TiffanyButterfly is now known as TiffanyBfly23 03:33 TiffanyBfly23 is now known as TiffanyAngel87 03:53 donri left 04:01 birdwindupbird joined 04:04 envi joined 04:07 rdesfo left 04:08 satyavvd joined 04:23 odoacre joined 04:24 araujo joined, daemon_ is now known as daemon 04:26 kaare_ joined 04:47 [particle]1 joined 04:50 [particle] left
dalek ecza: ee90805 | sorear++ | lib/ (2 files):
Implement basic ENTER/LEAVE/KEEP/UNDO/PRE/POST phasers; no exception integration yet
05:05
05:19 daniel-s joined 05:22 molaf_ left 05:23 daniel-s_ joined 05:24 daniel-s left 05:28 Moukeddar left
dalek ecza: 82a1cc6 | sorear++ | / (2 files):
Call LEAVE etc hooks during exceptional unwind
05:35
sorear evalbot rebuild niecza
p6eval OK (started asynchronously)
05:38 wolfman2000 left
dalek atures: 62c40fa | larry++ | features.json:
add matrix exponentiation as op overload example
05:50
05:54 thou left
TimToady we now have more RC pages than there were RFCs :) 05:54
a milestone of sorts
diakopter kewl 05:56
sorear: I read through that ee90805 commit; it's truly remarkable and mysterious, yet readable 05:57
I almost followed what was occuring
even without knowing what all those single-letter functions do; lolz 05:58
06:03 mberends left
sorear ...heh, I'm not sure whether that's a complement 06:09
but I'm not terribly happy with the design of that part 06:12
06:12 koban joined
sorear the JSON parse-tree-to-op-tree converter has too many responsibilities 06:13
06:18 Su-Shee_ is now known as Su-Shee
dalek ecza: f755930 | sorear++ | / (2 files):
Fix PRE compilation, add 3 new test files
06:21
ast: 7d8245f | sorear++ | S04-phasers/ (2 files):
[S04-phasers] Fudge pre-post, enter-leave, and keep-undo for niecza
06:22
06:33 [particle]1 is now known as [particle]
sorear TimToady: 1 for gather { ENTER { say 1 }; LEAVE { say 2 }; take 5 for ^20 } 06:46
TimToady: how many times is output generated? IOW, do ENTER/LEAVE have dynamic-wind semantics?
sorear thinks the answer is "no" but wants to be sure
TimToady thinks the answer is no too 06:49
moritz good morning
TimToady no
not morning here for another 10 minutes :)
sorear dynamic-windy LEAVE would cause gather { my $fh will leave {.close} = open(...); while $fh.get { take $_ } } to fail hard 06:50
TimToady we don't do take by pretending to return 06:52
in fact, the run-time should feel free to put the coroutine into another thread if it thinks it can get away with it, and that it'd be beneficial 06:54
sorear was under the impression 'gather' guaranteed fully lazy semantics 06:55
TimToady esp if it wants to work ahead and make a batch of values
no, only mostly lazy
we probably need a way to block when some expected input is not there yet though 06:59
sorear eval('') makes a new block, right? 07:00
TimToady yes
we can't have it stuffing new things into the current lexical scope
it's a dynamic scope as well, if you're thinking about ENTER/LEAVE 07:02
07:03 kjeldahl left
sorear TimToady: specifically I'm looking at tests that do my $x = 4; { eval('temp $x = 5'); is $x, 5; }; is $x, 4 07:05
TimToady that's not right, I don't think
sorear I'm fixing the tests 07:06
... 07:08
temp.t contains unconditional calls to flunk.
And they're fudged for pugs.
TimToady ... 07:09
07:10 mj41 joined
sorear I think temp.t is using TEMP wrong 07:10
TEMP adds to the *current* sub's LEAVE queue, right? 07:11
stack
TimToady it says something about it in S06, but my eyes are going crossed 07:14
07:16 SHODAN joined
sorear TimToady: should temp $x invoke $x.TEMP or $x.VAR.TEMP? 07:16
07:16 am0c joined
TimToady well, it has to restore the variable 07:17
07:18 kjeldahl joined
dalek ecza: 28de0b8 | sorear++ | / (4 files):
Implement let, temp, TEMP
07:28
ast: 0573f18 | sorear++ | S04-blocks-and-statements/ (2 files):
[S04-blocks_and_statements/{let,temp}.t] Remove ill-placed evals and other minor fixes, fudge for Niecza
07:29
moritz sorear++
07:30 wamba joined
sorear TimToady: there's another problem with the TEMP {{ ... }} syntax - the inner block is parsed as a bare block and run immediately, defeating the purpose 07:30
TimToady ah well, that part of the spec was probably written by an idiot :) 07:31
moritz TEMP {{ ... }} ? 07:36
ah 07:37
TimToady must sleep, and will likely wake up even stupider tomorrow... 07:39
zzz &
sorear night
07:41 Mowah joined
sorear we/I need a better spec/understanding for what happens when there are more than one pending exceptions 07:53
after a LEAVE dies, or in a situation with multiple fails, etc
07:53 Tedd1 left 08:02 timbunce joined
sorear -> sleep 08:03
08:06 Tedd1 joined 08:10 am0c left 08:12 cooper joined 08:26 drbean left
baest does master not support things like: /(\') [<!before $0> .]* $0/? It seems like the $0 in the end works, but not the before thing 08:40
moritz could be, yes 08:41
rakudo: say "'foo'bar'" ~~ /(\') [<!before $0> .]* $0/ 08:42
p6eval rakudo 922500: OUTPUT«␤»
moritz rakudo: say "'foo'bar'" ~~ /(\') [<!before($0)> .]* $0/
p6eval rakudo 922500: OUTPUT«Null PMC access in can()␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Cool::match' at line 2684:src/gen/core.pm␤ in 'Regex::ACCEPTS' at line 6418:src/gen/core.pm␤ in main program body at line 22:/tmp/ANKLPMLJ3q␤»
moritz rakudo: say "'foo'bar'" ~~ /(\') [<!"$0"> .]* $0/ 08:43
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Confused at line 22, near "say \"'foo'"␤»
moritz nom: say "'foo'bar'" ~~ /(\') [<!before($0)> .]* $0/
p6eval nom: OUTPUT«Method 'before' not found for invocant of class 'Cursor'␤current instr.: '_block1010' pc 470 ((file unknown):19739228) (/tmp/2rK0GbgwzC:1)␤»
baest moritz: except STD do you of some grammar matching strings. I need to match several different types of strings and would like not to have to repeat myself too much
moritz baest: you could try it with evil metaprogramming thingies 08:44
my @delimiters = <" ' !>;
08:45 Mowah left
moritz for @delimiters -> $d { YourGrammar.|^add_method("quote:sym<$d>", token { $d ~ $d [<!before $d> .]* } ) 08:45
} 08:46
not sure if that works out at all
baest nice :) Sadly I need to have support for string like $RANDOM$sdfsfsdfsd$RANDOM$, that is the user can decide what to put inside $$ as delimiter (including nothing). 08:47
moritz well, you can always go with .*? inbetween 08:48
baest yes, that is most likely the best way right now
moritz++ 08:49
moritz I generally don't like backtracking solutions, but given the current limitations, I think it's easiest
08:49 betterworld left
baest I agree 08:52
08:52 im2ee joined 09:17 zamolxes left 09:22 zamolxes joined 09:29 am0c joined 09:32 ab5tract joined 09:41 woosley left
moritz public service announcement: the server hosting the IRC logs will go down in a few hours for a software upgrade; all its services will be unavailable for some time 09:46
sorry for the inconvenience 09:47
LoRe_ famous last words?
moritz so far it has survived all upgrades :-) 09:48
which included one 32 bit -> 64 bit
tadzik good morning 09:51
oh, this is still alive: tjs.azalayah.net/ 09:54
I wonder if it's as outdated as projects.list, or more
09:58 satyavvd left, satyavvd joined 10:05 agentzh joined 10:07 MayDaniel joined
Woodi hi #perl6 10:12
is it still possible to register on YAPC::EU 2011 ?
moritz maybe look at the website? 10:13
or ask the organizers if it's not on the website
10:15 MayDaniel left 10:16 MayDaniel joined
Woodi k 10:21
10:23 drbean joined
tadzik nom: BEGIN { /\d/ } 10:30
p6eval nom: OUTPUT«error:imcc:syntax error, unexpected DOT ('.')␤ in file '(file unknown)' line 43824002␤error:imcc:syntax error ... somewhere␤ in file '(file unknown)' line 43824038␤syntax error ... somewhere␤»
tadzik nom: BEGIN { /<[0..9]>/ } 10:31
p6eval nom: ( no output )
tadzik std: :16(5) 10:43
p6eval std 516268a: OUTPUT«ok 00:01 118m␤»
tadzik rakudo: :16(5)
p6eval rakudo 922500: ( no output )
tadzik nom: :16(5)
p6eval nom: OUTPUT«NYI form of number litereal encountered␤current instr.: 'nqp;Perl6;Actions;rad_number' pc 85691 (src/gen/perl6-actions.pir:30879) (src/Perl6/Actions.pm:2993)␤»
10:45 timbunce left 10:51 timbunce joined
tadzik moritz: in the "maximum recursion depth exceeded" which occured when compiling Temporal in the setting, were you using Pod by any chance? 11:00
I think the bug is in raw block handling in Pod 11:06
11:16 pernatiy left
tadzik nom: " " ~~ / \N+ / 11:18
p6eval nom: ( no output )
tadzik nom: say so " " ~~ / \N+ / 11:19
p6eval nom: OUTPUT«Bool::True␤»
11:20 odoacre left
moritz tadzik: at first, yes 11:22
tadzik: I then removed it, and got another error, related to role composition
tadzik oh, ok 11:25
I'm just fixing that one. Apparently, Pod already managed to get a few fossils of ancient thinking :) 11:26
(in my implementation)
fyi, I'm working on Buf 11:33
moritz I hope you're not mimicking the crappy implementation from master :-) 11:40
jnthn, pmichaud: can I somehow pass a parrot-level object to a p6 routine? 11:44
I tried it with (Mu \$interp)
but I got Unmarshallable foreign language value passed for parameter '$interp'
mls_ hello perl6! 11:46
moritz \o mls_ 11:47
mls_ seem like pm had no time to look at my exception patch ;( 11:48
11:48 satyavvd left, MayDaniel left 11:50 MayDaniel joined
mls_ I've updated the patch with a comment about the opcode: gist.github.com/1127381 11:59
How about applying it for now until we find a better solution? 12:00
12:07 satyavvd joined
moritz mls_: sorry, I don't feel qualified reviewing that part of exception handling, sorry 12:07
12:10 pernatiy joined
bbkr hi. what is the faster way now to convert bytes to ascii char (string "01010100" to char "T" for example)? pack("B", "01010100") says "B" token is not recognized. 12:18
12:18 satyavvd left
flussence rakudo: say chr(:2("01010100")) 12:18
p6eval rakudo 922500: OUTPUT«T␤»
flussence there's one way...
moritz flussence++
bbkr wow! 12:19
thanks
moritz nom: class A { has $!a; method a() { $!a } }; say A.new(a => 23).a 12:20
p6eval nom: OUTPUT«Mu()␤»
moritz ah
12:21 daniel-s_ left
moritz nom: class A { has Mu $.x }; A.new(x => pir::getinterp__P) 12:22
p6eval nom: OUTPUT«Cannot assign a non-Perl 6 value to a Perl 6 container␤current instr.: '_block12668' pc 665404 (src/gen/CORE.setting.pir:168779) (src/gen/CORE.setting:429)␤»
12:24 bluescreen10 joined 12:30 am0c left 12:32 skangas left 12:35 skangas joined
bbkr rakudo: say $*IN.comb(/.*/) 12:36
p6eval rakudo 922500: OUTPUT«IO()<0x3e49f60>␤»
bbkr why does it stringify object name instead of descriptor content? known bug? 12:37
moritz NYI
bbkr rakudo: say $*IN.comb(/.**4/)
p6eval rakudo 922500: OUTPUT«IO()<0x4728f␤»
bbkr ok
moritz it's non-trivial
how to know how many characters to read for matching? 12:38
12:38 takadonet left
moritz we basically need to have a callback from the RE engine when it examines the end of the string 12:39
bbkr spec says "Reads everything into a string", but I assume it's efficiency killer
12:42 Woodi left, Woodi joined 12:49 molaf joined
moritz should be easy enough to delegate IO.comb to IO.slurp.comb 12:52
12:54 takadonet joined
takadonet morning all 12:54
12:55 am0c joined
moritz brb, system upgrade 12:55
hm, not yet :-) 12:57
gist.github.com/1127491 # my attempts to put CallFrame back 13:00
jnthn Afternoon, #perl6 13:02
moritz \o jnthn 13:03
jnthn moritz: I'd really, really rather we didn't start passing non-Perl 6 objects around between functions.
er, between routines
morning spent in JavaScript land ;) 13:04
moritz jnthn: CallFrame becomes a wee bit painful without it, but I guess I can handle
gist.github.com/1127491 is my current attempt
13:04 SHODAN left
jnthn lemme look :) 13:04
moritz: Where were you needing to do the passing? 13:05
moritz jnthn: I've eliminated it from that 13:06
jnthn ok
hm
Did you work out why it gives the wrong line?
moritz jnthn: before I used to create pir::getinterp__PP() in callframe(), and pass it on CallFrame.new
no, not yet
jnthn Think I can see that one 13:07
!annotations fetches the annotations afresh
Rather than capturing them once at callframe creation
getinterp doesn't give a snapshot 13:08
moritz that wasn't a problem in master, was it?
or maybe I didn't notice
jnthn I'm guessing the latter. :)
moritz is there any way to turn a p6 lexpad into a hash
rakudo: my $a = callframe; say $a.line
p6eval rakudo 922500: OUTPUT«22␤»
jnthn Mutable or immutable?
moritz rakudo: my $a = callframe; say $a.line␤␤ $a.line 13:09
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Confused at line 22, near "say $a.lin"␤»
moritz immutable should be enough
rakudo: my $a = callframe; say $a.line; ␤␤ $a.line
p6eval rakudo 922500: OUTPUT«22␤»
moritz rakudo: my $a = callframe; say $a.line; ␤␤ say $a.line
p6eval rakudo 922500: OUTPUT«22␤24␤»
moritz ah yes, same problem in master
jnthn moritz: Could always try like 13:10
my $h := nqp::create(EnumMap); 13:11
nqp::bindattr($h, EnumMap, '$!storage', $the_lexpad)
Note, binding there matters.
moritz I'll try
and yes, I notice that binding matters :-)
jnthn is relieved that $teaching_gig is done and that he's only one really serious day of $dayjob between now and YAPC :) 13:14
13:17 shinobicl joined
mls_ back... 13:26
hi jnthn!
13:27 Moukeddar joined
mls_ did you see my other patch from yesterday, the one adding "has_block_handler"? 13:27
Moukeddar Hello \o
jnthn hi mls_ :) 13:28
mls_: Was a little distracted yesterday.
mls_ no prob. Here's the patch agin: gist.github.com/1125226 13:29
jnthn Thanks.
mls_ I also tried to change statement_prefix:sym<try> so that it uses a block handler instead of a try node, but couldn't make it to work 13:30
Currently try {} also catches CONTROL exceptions, which is IMHO wrong 13:31
jnthn mls_: On line 7 did you mean CHECK?
mls_ You mean CATCH? No, CATCH is defined as "not CONTROL". That's what the trailing 1 does. 13:32
jnthn gah, CATCH, yes
mls_ (it makes has_block_handler look at handle_types_except() instead of handle_types() ) 13:33
jnthn oh, I see.
13:34 alyx left
jnthn I'd have been tempted to make the third parameter a named one just so what's on line 7 of the match a little clearer :) 13:35
I agree it seems to be doing the right thing.
mls_ I wasn't sure if nqp supports named parameters ;)
jnthn Yes, it does :) 13:36
mls_ Please go ahead and clean up the patch...
jnthn On line 81, any reason not to return?
Anyway, I understand the checking part of the patch and it looks sane.
Now I need to try and work out this middle part :)
13:37 jedai left
mls_ (Regarding return: I wan't sure if return is slower that falling off the end of a function, and as there normally is just one handler...) 13:37
slower than
jnthn Less so once we get the lexotic return in, and when we get an optimizer it'd probably be faster :) 13:38
mls_ The middle part is pretty simple, it's just so big because I changed the indent of some lines 13:39
13:39 jedai joined, tokuhirom joined
mls_ One thing I'm not sure about is the need of the block_closure() call 13:40
13:40 Chillance joined, onedirection joined
onedirection hi all 13:40
jnthn mls_: Yeah, I was wondering about that too. 13:41
mls_ statement_prefix:sym<do> seems to work without it
onedirection wondering about what?------- zayn
jnthn mls_: Indeed. Guess could try removing it and seeing if tests fail. It doesn't make much sense to me. 13:42
mls_ in both cases?
onedirection what you all going on about?--------- harry x
do u know who we are guys? -----------liam 13:43
jnthn mls_: Anyway, iiuc the middle part says "if we already have something that cateches the exception, don't do anything else here?
onedirection: I think you're in the wrong place.
onedirection: Unless you *want* to discuss Perl 6. :) 13:44
mls_ The middle part is: if there's a CATCH block, treat "try" as "do"
onedirection where should we be? -------------harry
moritz $ ./perl6 -e 'say callframe.line'
1
$ ./perl6 -e 'my $x = 3; say callframe.my<$x>'
3
\o/
jnthn moritz: yay! :)
13:44 tokuhirom left
mls_ |o 13:44
onedirection what is perl6?-----------louis 13:45
13:45 onedirection left
moritz does t/spec/S02-builtin_data_types/bool.rakudo fail for anybody else? 13:45
jnthn oh, phew, I thought I was about to have to find my @ :)
moritz was about to
jnthn mls_: Yeah, that's what I was trying to say :)
mls_: It seems sensible.
moritz: pulling latest 13:46
And will run a spectest.
moritz anyway, gotta run, bbl
13:49 drbean left, stkowski joined
tadzik is back 13:51
13:52 alyx joined, alyx is now known as Guest26274
jnthn Eho worked on Temporal recently? 13:53
tadzik moritz:
jnthn instants-and-durations.t hangs for me during make spectest :(
moritz: t\spec\S02-builtin_data_types\bool.rakudo ...................... ok
tadzik 1322 moritz | tadzik: I then removed it, and got another error, related to role composition
jnthn oh 13:54
OK, well, either way, the test still hangs.
mls_: I think that patch looks sane. Your other one, pmichaud++ should review.
mls_ Thanks jnthn! 13:55
tadzik 3 files changed, 3 insertions(+), 26 deletions(-)
I like coding that way :)
PerlJam tadzik: You know you're doing something right when removing code adds functionality :) 13:56
jnthn mls_: Oddness. git apply tells me the patch is corrupt :S 13:57
Just grabbed it from raw.github.com/gist/1125226/12493c...ndler.diff and get "fatal: corrupt patch at line 5" 13:58
13:59 Guest26274 left 14:00 alyx_ joined
mls_ Probably my mistake, I manually removed the "rethrow exception" part 14:00
PerlJam mls_: btw, the first if statement in has_block_handler jumps out at me that it should be a ternary op instead
tadzik @anded-contents.push: 0 xx ($a.elems - @anded-contents.elems); # what is that supposed to mean? 14:01
mls_ It's proably easier if you reimplement it. And the code will be more perl6ish, too
tadzik nom: say 0 xx "foo"
p6eval nom: OUTPUT«␤»
tadzik nom: say 0 xx 5
p6eval nom: OUTPUT«0 0 0 0 0␤»
tadzik ah
I'd _really_ prefer '0' in this case 14:02
PerlJam tadzik: but that would mean that +"foo" == 1
mls_ PerlJam: my $ltype := pir::defined($except) ?? $_.handle_types_except() !! $_.handle_types();
like this?
PerlJam mls_: yes
tadzik PerlJam: no, I mean: 14:03
nom: say '0' xx 5
p6eval nom: OUTPUT«0 0 0 0 0␤»
tadzik 0 xx 5 looks confusing at least
nom (0 xx 5).perl.say
PerlJam oh, I see
tadzik nom: (0 xx 5).perl.say
p6eval nom: OUTPUT«(0, 0, 0, 0, 0).list␤»
tadzik oh 14:04
nom: ('0' xx 5).perl.say
p6eval nom: OUTPUT«("0", "0", "0", "0", "0").list␤»
tadzik so there's a difference
PerlJam nom: (~0 xx 5).perl.say 14:05
p6eval nom: OUTPUT«("0", "0", "0", "0", "0").list␤»
PerlJam I think it's one of those "say what you mean" situations.
14:06 masak joined
masak sorear++ # phasers! 14:06
14:07 cotto left 14:09 alyx_ left, kemono joined
tadzik masak: is ./S03-operators/buf.t the only Buf test we have? 14:10
oh, also pack and unpack 14:11
jnthn I'm assuming .read and .write on IO were also tested.
tadzik nom: +"5".base(16) 14:12
p6eval nom: OUTPUT«Method 'base' not found for invocant of class 'Str'␤current instr.: '_block1002' pc 84 ((file unknown):35616239) (/tmp/7yu8nkN8u5:1)␤»
tadzik nom: "5".Numeric.base(16) 14:13
p6eval nom: ( no output )
masak tadzik: did you know that Perl 5 has something like 17e3 tests just for unpack? makes ours feel a bit wanting. :)
tadzik :) 14:14
PerlJam masak: someone should write a program to convert P5's unpack tests into P6 ;)
mls_ jnthn: should I redo the patch so that git doesn't complain? Or do you prefer to apply it manually?
masak PerlJam: the thought has crossed my mind. :) 14:15
ah; 14700: github.com/mirrors/perl/blob/blead/t/op/pack.t
PerlJam: also, I don't think it's a crazy idea at all. I think it should be done.
14:15 _ilbot left
masak but wisely, somehow. 14:15
it would be a little project in itself. 14:16
PerlJam masak: lots of P6 ideas /are/ crazy ... but in a good way :)
jnthn mls_: If you have time, feel free to grab latest and re-diff.
mls_: Looking at something else at the moment.
mls_ will do.
jnthn thanks.
masak PerlJam: ok, then it is crazy. in either a good way or a bad way :P
jnthn o/ masak
masak jnthn \o 14:17
would be a cool theme for a hackathon, I think.
"steal all of p5's pack tests"
jnthn
.oO( packathon )
masak would raise a lot of interesting questions about how p6 wants to do pack/unpack.
there's this unfinished idea floating around that some of what p5's pack/unpack do will be taken over by compact classes/data structures. 14:18
14:18 alyx_ joined 14:19 Eevee left, Eevee joined
PerlJam but pack/unpack could be another interface to the compact data structures too 14:20
14:20 ab5tract left
masak open field of research. papers welcome :P 14:21
moritz now that I've seen compact classes in action, I do agree it's an interesting approach
jnthn masak: That's an idea I find interesting, 'cus it intersects with NCI too :)
flussence I was thinking of writing a role thingy that adds a .pack/.unpack that DWIM...
masak everything, stop being so interesting! :)
jnthn :P
I know, it's so distracting being surrounded by interesting things. :)
jnthn tries to deal with another test on his triage list 14:22
masak I don't even have time for the things that are distracting me nowadays...
tadzik . o O ( Whatever is Cool ) 14:23
masak tadzik: that's a great name for a Perl 6 blog.
moritz it's also false :-) 14:24
nom: say Whatever ~~ Cool
p6eval nom: OUTPUT«Bool::True␤»
moritz oh?
masak moritz: so is "God Plays Dice". still a good blog. :P
moritz surprised
masak too
tadzik not :)
I just saw it, hence I said it
masak I don't see a case for it. 14:25
it's probably a mistake.
tadzik me neither
jnthn rakudo: say Whatever ~~ Cool
p6eval rakudo 922500: OUTPUT«Bool::False␤»
jnthn Mistake, almost certainly.
masak someone please spectest a removal of Whatever ~~ Cool :)
14:25 _ilbot joined
PerlJam then the blog will be "When Whatever was Cool" 14:25
tadzik back in my days, Whatever was Cool 14:26
14:27 PacoLinux joined
masak or 'Whatever but Cool' :) 14:27
[Coke] jnthn: mmm, javascript. 14:28
(the me from 10 years ago is very surprised to hear this, no doubt.) 14:29
jnthn [Coke]: jQuery made me not hate it. :)
Well
I never really hated the langauge
Just doing anything with it :)
14:30 molaf left
moritz pure JS (without jQuery) is just so wrongly huffmanized for DOM manipulation 14:30
14:30 _ilbot left
masak aye. 14:30
I keep hearing good things about CoffeeScript.
want to try it out sometime.
dalek ast: 68d409b | jonathan++ | S06-multi/unpackability.t:
Update a test to match current spec on type object stringification.
14:31
jnthn nom: multi foo(@a) { }; multi foo(*@a) { }; foo([1,2])
p6eval nom: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Positional @a)␤:(Positional @a)␤␤current instr.: 'foo' pc 481 ((file unknown):23568141) (/tmp/zbvrBDrPZu:1)␤»
jnthn nom: multi foo(@a) { }; multi foo(*@a) { }; foo(1,2)
p6eval nom: ( no output )
jnthn Hm
wtf.
I saw the code last night that was meant to make the non-slurpy one narrower...
14:31 jedai left
PerlJam jnthn: but does it ever get executed? :) 14:32
masak guess that code wasn't convincing enough.
jnthn PerlJam: At some point, though maybe not in that case :P
oh, I wonder... 14:33
[Coke] jnthn: (jquery) exactly.
moritz maybe the nom build is out of date
flussence (I think the over-wordiness of DOM manipulation is mostly the W3C's fault, not javascript itself)
jnthn moritz: no, mine just finished
[Coke] my biggest problem with coffee is that I have to add tools to my build to make it work.
jnthn moritz: And I can reproduce here too
moritz jnthn: I mean the one on p6eval
ok
14:34 _ilbot joined
[Coke] (and i have lots of other developers to deal with.) 14:34
tadzik Whatever but Cool. It's just me who doesn't have a fancy blag name? Now I do 14:35
jnthn oh, short answer is we don't reach that code. Reason is...involved
tadzik Could not find sub &postfix:<++> 14:36
...what
did I just break circularity? 14:38
jnthn tadzik: No, you probably just use ++ before it was defined 14:39
Well, that is circularity issue I guess
tadzik hmm
jnthn how'd you hit it? 14:42
tadzik adding encode to Str 14:43
it doesn't use ++, no
jnthn oddness
masak .oO( when all you have is a circularity saw, everything looks like a strange loop ) 14:44
jnthn Grr. This narrowness analysis code would be really simple if we didn't want to have our cake and eat it when it comes to optionals and slurpies. :)
masak jnthn: you're saying that, as an implementor, you're feeling tortured on behalf of the user? :) 14:45
jnthn masak: I fear that once in a while we'll torture a user too.
14:46 birdwindupbird left, koban left
jnthn masak: It's all find until the DWIM doesn't. :) 14:46
masak the "too clever" syndrome in software.
jnthn That's kinda my fear. 14:47
masak jnthn: do you have an example of this?
jnthn I'm reading rules I implemented and I don't understand them :P
PerlJam That's why it's the educator's job to introduce the user to that "aha" moment where it all just makes sense.
jnthn masak: Well, the reason the example I tried out above doesn't work is because at the moment the code considers any two things with different minimum arity to be tied. 14:48
moritz IRC logs going down in 2 minutes, hope it'll back up soonish 14:50
masak that can't be the only rule. a :() is tighter than a :(*@a)
14:50 cosimo joined
jnthn masak: In that case they have the same minimum arity 14:51
masak: So we fall through to another rule.
Which does what you described.
14:52 _ilbot left
masak ah. 14:53
sorry, I misread what you wrote... 14:54
tadzik jnthn: oddness: the lack of postfix:<++> appear After the setting is compiled, when compiling Test.pm 14:56
14:57 jaldhar left 14:58 donri joined
tadzik in method REIFY 14:58
jnthn WTF. 14:59
tadzik patch? 15:00
jnthn ?
tadzik want a patch?
I sticked Buf.pm between Stringy.pm and Str.pm in Makefile.oin
sorear good * #perl6 15:01
tadzik hello sorear
jnthn tadzik: Which REIFY, ooc?
tadzik: wait, while *compiling* Test.pm?
tadzik method REIFY(Parcel \$parcel)
yes
# From src/core/Array.pm 15:02
jnthn I can see it uses ++
tadzik and it's Str.encode added who broke it
jnthn OK, I want to see the patch :)
tadzik I'll push it to a branch, ok?
jnthn ok 15:03
Moukeddar masak, :)
Hi Sir
dalek kudo/nom: 03125c3 | jonathan++ | src/Perl6/Actions.pm:
Refactor handling of nested signatures so taht in a routine the parameters in them default to Any, not Mu.
15:04
tadzik jnthn: pushed to nom-buf
masak Moukeddar: hi there, sir.
Moukeddar how are you doing? 15:05
and what's cooking?
tadzik nom :P
masak Moukeddar: going to a curry place tonight. nothing cooking. :)
Moukeddar lazy dev :)
dalek kudo/nom-buf: 59a91b9 | tadzik++ | src/Perl6/ (3 files):
Cleanup raw block handling in Pod, remove some old-thinking fossils
kudo/nom-buf: 86b601f | tadzik++ | / (4 files):
Import Buf.pm, add Str.encode. Compiles the setting, breaks on Test.pm
TimToady is the irclog down? 15:07
masak can we say whatever we want with no consequences whatsoever?
:)
Moukeddar masak, we're celebrating Ramadan here :)
masak Moukeddar: oh, right! 15:08
jnthn TimToady: yes
tadzik TimToady: yes
jnthn TimToady: Server maint
masak Moukeddar: it started on Monday, I think.
Moukeddar tuesday for us
jnthn TimToady: Make spec suggestions that you want to be able to deny later now. :P
masak Moukeddar: but you're in Morocco, so sunset comes quite early for you :P
Moukeddar 7:25-30 pm :)
not early 15:09
dalek kudo/nom: 0773b30 | tadzik++ | src/Perl6/ (3 files):
Cleanup raw block handling in Pod, remove some old-thinking fossils
Moukeddar dawn is 3:55 am
jnthn Moukeddar: Heh. I know a friend here in Sweden who is fasting and it's after 9pm here. :)
Moukeddar 15 hrs :)
15:10 bluescreen10 left
tadzik oopsie, I commited stuff twice 15:10
jnthn tadzik: Don't worry, it'll git sorted out :)
15:10 thou joined, bluescreen10 joined
tadzik :P 15:11
Moukeddar good Pun
jnthn I make them occasionally. :)
masak I hadn't noticed. 15:12
mls_ jnthn: new version of the patch: gist.github.com/1127740
15:13 mj41 left
tadzik masak: I assume you're talking about the 'occasionally' part :) 15:13
Moukeddar it's a really good one :) 15:14
i Salute you Sir
15:15 wooden joined
masak tadzik: heh :) 15:15
Moukeddar: how's the coding going? learned anything new lately?
Moukeddar masak, going quite good, learned better use of generics :) 15:16
masak sounds nice.
15:16 Trashlord left
Moukeddar and never never use premature optimization 15:16
it just adds unnecessary complexity
masak :P 15:17
it's hard to resist, is all :)
Moukeddar oh, and : Use a goddamn source control
15:17 Trashlord joined
masak indeed. 15:19
rakudo: role FactoryJoke[$type] { method make { say "Help, I'm trapped inside a $type factory!" } }; FactoryJoke["role"].new.make 15:20
p6eval rakudo 922500: OUTPUT«Help, I'm trapped inside a role factory!␤»
Moukeddar the good thing is i'm learning :)
masak Moukeddar: I'm glad.
you seem to be doing well, too!
jnthn mls_: applied cleanly 15:21
Moukeddar and many thanks go to you, Sir
masak Moukeddar: I think coding katas would suit you well. you might want to look them up.
15:22 bluescreen10 left
Moukeddar like martial arts? 15:22
masak that's the analogy, yes.
"practice makes perfect"
mls_ jnthn: good. I used :except like you said, and also fixed a bug (I needed to use $block<past_block> instead of $block) 15:23
Hmm, instants-and-durations.t hangs... 15:24
nom: now 15:25
p6eval nom: ( no output )
Moukeddar masak, another interesting site
challengine problems:)
mls_ ./perl6 -e 'now' hangs for me...
masak Moukeddar: yup :)
mls_: how poetic.
mls_: perhaps it's a Long Now :P 15:26
15:27 PacoLinux__ joined, PacoLinux left, PacoLinux__ is now known as PacoLinux, s1n left 15:30 s1n joined
jnthn mls_: That's not your patch, I don't think. 15:30
It hangs for me too.
Even without your patch
:(
pmichaud good morning, #perl6 15:31
jnthn got mor...no, it's evening already here!
o/ pmichaud
masak o/ pmichaud
mls_ Hi pmichaud!
masak this slide from an old-but-good-presentation web.archive.org/web/20080907185122/...ide13.html feels odd from a Perl 6 perspective...
mls_ It seems to loop... method Num(Int:D:) is involved. 15:32
from class Int
Moukeddar masak, i'm making a video to demonstrate Dependency Injection adn IoC :) 15:33
and* 15:34
15:34 bluescreen10 joined
dalek kudo/nom: 29a3568 | jonathan++ | src/binder/multidispatch.c:
Try to be a bit smarter about slurpy in the narrowness analysis in multi-dispatch.
15:36
kudo/nom: ba477df | jonathan++ | t/spectest.data:
We now pass S06-multi/unpackability.t.
masak Moukeddar: you do seem to prefer the architectural patterns :)
jnthn nom: my @a = 2, 3, 4, 5; say @a.Capture.WHAT
p6eval nom: OUTPUT«Capture()␤»
masak Moukeddar: IoC is a very wide and general topic. DI is just a small fraction of that.
jnthn nom: my @a = 2, 3, 4, 5; say @a[0..2].Capture.WHAT
p6eval nom: OUTPUT«Parcel()␤»
jnthn WHAT?! 15:37
Moukeddar i just love those topics, i wish i can study them
pmichaud Might need to remove Parcel.Capture
mls_ (afk for a while...)
15:37 mls_ left
Moukeddar IoC is wide, agreed, but one must know the principle at least 15:37
masak Moukeddar: c2.com/cgi/wiki?HollywoodPrinciple is an example of IoC that is not DI. 15:38
jnthn pmichaud: too cheaty :) 15:39
masak though on the page they say that it's often called DI. I'm not sure I agree.
jnthn pmichaud: Gotta head out now
pmichaud jnthn: okay
15:39 im2ee left
jnthn pmichaud: I'll spectest a patch for that. Also mls++'s patch 15:39
pmichaud: Note, the one that forbids duplicate CATCH/CONTROL
pmichaud jnthn: okay 15:40
jnthn pmichaud: I won't touch the opcode-adding one until you've reviewed it.
pmichaud I didn't see the point of the opcode.
Moukeddar masak, interesting, i need to understand that term of Container
15:40 im2ee joined
Moukeddar is it like dependency resolver? 15:40
pmichaud (maybe the patch has changed since I last looked at it) 15:41
ENOIRCLOG? 15:42
TimToady down for maint
pmichaud okay, thanks.
I guess I could've looked that up in the ircl.... oh.
TimToady I did a quick scan with irssi but missed the announcement
so I asked too :) 15:43
masak Moukeddar: to me, "DI Container" is .NET (or possibly Java) term.
Moukeddar: I usually do DI by hand, without a dedicated Container.
Moukeddar that's what i do too
but having a tool that do that work at runtime for you
is tempting
masak Moukeddar: this seems to summarize it: tutorials.jenkov.com/dependency-inj...iners.html 15:44
jnthn masak: I don't think it needs to be a .Net or Java term.
masak: I think there's such things for Perl too.
TimToady maybe someone should add an RC task for that
masak jnthn: oh, ok.
still, I don't tend to use it.
Moukeddar masak, salaty.codeplex.com/SourceControl/l...changesets this is the library
i'm trying to imply what i learn there 15:45
masak oh, so that's how CodePlex looks. 15:49
Moukeddar yes :)
look at the latest changeset
masak Moukeddar: we need Windows people around. too few of them in the Open Source world.
Moukeddar i had a hard time chosing a license type :p 15:50
i'll buy a new HDD, then install OpenSuse 15:51
i need to port this to Perl :)
TimToady "Lifecycle of Singletons" sounds an awful lot like what people want RAII for... 15:52
a DI Container sounds a lot like a transaction manager 15:53
in the "knowing when we're done" sense, not the commit/rollback sense
jnthn afk 15:54
TimToady I'm still wondering how we can make transactions more natural in P6 other than throwing a dynamic scope at each transaction
well, maybe that *is* the natural way, but DI implies the dynamic scope is "held" somewhere else
masak maybe approaching from the other direction is easier. with these syntactic/semantic features, write something transactional in Perl 6 that feels natural. 15:55
TimToady we kinda have that notion already with the way gather/take can spawn off a dynamic scope that keeps spitting out values after the official return
masak yes. 15:56
TimToady actually, gather has two official returns :)
masak sort of greenthread-ish.
TimToady the first when it returns the lazy list, and the second when the lazy list completes 15:57
the outer return and the inner return, as it were
and that's the answer to when LEAVE fires off
Moukeddar imgs.xkcd.com/comics/good_code.png 15:58
TimToady outside gather, LEAVE fires on the first return; inside on the last return
dalek kudo/nom: a596b54 | pmichaud++ | NOMMAP.markdown:
Add another punchlist item to NOMMAP.
15:59 PacoLinux left
masak Moukeddar: bit of a false dichotomy, I think. 16:00
TimToady however, that's a problem for using LEAVE to close a file that is opened outside a gather 16:01
masak Moukeddar: with tests, I can go fast/right, and then asymptotically converge on maintainable.
Moukeddar TDD?
masak Moukeddar: oh yes.
gotta go. curry with jnthn :) 16:02
Moukeddar you seem to be a big Fan :)
16:02 masak left
Moukeddar yep, he is ;) 16:02
16:02 PacoLinux joined
TimToady wonders what kind of rock masak++ is testing... 16:02
Moukeddar bazalt probably 16:04
TimToady you may thinks it's gneiss, but I take it for granite...
Moukeddar one more type and i'll have another Geology crysis Episode 16:05
TimToady you don't have to start feeling all sedimental over it 16:06
16:07 agentzh left
Moukeddar Good Pun, sir 16:07
TimToady "Good Pun" is a contradiction, I'm told 16:08
Moukeddar how so? 16:09
TimToady puns are all bad
even the good ones are bad
Moukeddar no, they're good
pmichaud at least, the good puns are all bad :)
Moukeddar mind Asploded 16:10
16:13 crked joined
Moukeddar They're Good 16:13
that's it
crked Is there something wrong with the Rakudo website now? I cannot access it. 16:14
16:15 crked left 16:16 cotto joined
pmichaud rakudo.org is working for me 16:16
16:19 kaare_ left 16:21 Moukeddar_ joined 16:23 PacoLinux left
TimToady maybe we need a way to attach a LEAVEish thing to the end of a lazy list as it's being returned 16:23
so we can say "close this file when you hit the end of the list" 16:24
TimToady will think about this in the shower
Moukeddar_ talking about obsessions
how about solving problems while sleeping? 16:25
16:25 Moukeddar left 16:28 Moukeddar_ is now known as Moukeddar 16:30 molaf joined 16:33 alester joined
dalek kudo/nom: 3bfa2cf | pmichaud++ | src/ (2 files):
Add hyper method dispatch, stub in hyper infix generation.
16:36
16:47 pernatiy left 16:48 rdesfo joined
sorear good * #perl6 16:51
16:51 stkowski left
sorear phenny: tell moritz I have irc logs right now. Can we inject stuff into ilbot's database, for the sake of people browsing the logs in five years' time? 16:52
phenny sorear: I'll pass that on when moritz is around.
16:53 Moukeddar left
sorear TimToady: doesn't the contend { } block make a dynamic scope? 16:53
PerlJam sorear: I just noticed that you haven't updated features with your phasers changes. Was that intentional? 16:54
sorear PerlJam: I was expecting someone else to do it, didn't want to race
I'll do it now.
PerlJam oh, okay 16:55
sorear++
sorear TimToady: Why does niecza have ± for PROCESS et al?
dalek atures: 0aecd5d | sorear++ | features.json:
Update ENTER/PRE data points for niecza
16:57
17:03 mls_ joined, cooper left
mls_ back... 17:03
irclog.perlgeek.de is still down? 17:04
sorear hey mls_ 17:05
niecza: try { die 5; LEAVE { say "left!" } } 17:06
p6eval niecza v8-37-g28de0b8: OUTPUT«left!␤»
mls_ \o/
I currently have no clue how to implement that in parrot 17:07
(I should say: without patching parrot)
pmichaud do you know to do it with patching parrot? 17:08
that would be significant :)
[Coke] has an evil thought. 17:10
mls_ well, we have access to the call chain over the continuation
[Coke] we could have --gen-parrot not only grab a specific version of parrot but patch it in situ.
pmichaud what about in the case of exceptions?
mls_ I'm talking about the exception case
pmichaud ah
mls_ so we need a way to get to the LEAVE block from the call ctx 17:11
pmichaud seeing a prototype working in a patched parrot would be really useful.
mls_ Well, I'm on vacation for the next two weeks with no internet access, so I can only help with it after I'm back 17:13
17:13 sshc left
pmichaud that would be fine 17:14
17:14 colomon left
[Coke] mls_++ 17:15
mls_ Ok, maybe I've some good while I'm relaxing on the beach ;)
ideas
sorear I don't know about you, but I find Intenet outages extremely helpful for deep focussed hacking.
mls_ yes, no distracting code ;) 17:16
[Coke] ... if I have everything git fetch'd before I leave, yes. otherwise, it's verrrry frustrating. ;)
pmichaud afk, lunch and errands 17:17
mls_ pmichaud: did you already look at my exception patch?
too late...
pmichaud mls_: I didn't have a link to it.
mls_ and the irclog is gone... Let's see if I can find it on gist.githup 17:18
17:19 cooper joined, cooper left, cooper joined
pmichaud can you just re-post it to gist? 17:20
nom: say 'hello' 17:22
p6eval nom: OUTPUT«"load_bytecode" couldn't find file 'CORE.setting.pbc'␤current instr.: 'nqp;Perl6;ModuleLoader;_block1142' pc 2995 (src/gen/perl6-moduleloader.pir:1203) (src/Perl6/ModuleLoader.pm:127)␤»
pmichaud :(
mls_ I fear not, I have it at work, and I can' access the pc right now
pmichaud okay, I'll look when someone can send me the patch. :)
afk, lunch 17:23
(if someone can look into why nom isn't building for p6eval, that'd be great. kthxbye) 17:24
17:26 cooper left
mls_ maybe jnthn has it in his browser history 17:29
17:31 [Coke] left 17:32 [Coke] joined
TimToady gist.github.com/1124942 ? 17:35
gist.github.com/1125226 ?
17:36 cosimo left
TimToady the first, probably 17:36
sorear TimToady: after try { throws_two_exceptions; } what is the type and contents of $! ?
TimToady: is there a syntax for throwing multiple exceptions? 17:37
TimToady $! is not the main star of the show anymore
S04:1024 17:38
17:39 cooper joined
TimToady $! only links to the last thrown exception, and no longer tracks all unhandled exceptions 17:39
17:39 cooper left, cooper joined
TimToady last failure, rather 17:39
$! has almost nothing to do with throwing anymore 17:40
sorear after 'try' there are no unhandled exceptions
after 'try' finishes, are the exception(s) that try ate visible anywhere? 17:41
TimToady maybe @! is visible along with $! at that point 17:42
sorear is @! automatically declared in every Routine? 17:43
TimToady if so, $! would just be an alias to its head or tail
sorear perhaps it could be the other way around, the exceptions could be hidden in $! somewhere and @! an alias 17:45
TimToady or, horrors, $! is an any(@!) :)
mls_ gist.github.com/1124942 works TimToady++
TimToady but I'm a bit leary of mixing the handler @! notion with the $! notion
sorear wants to allow die()ing with a Set or Array of exceptions somehow 17:46
TimToady people should really be using handlers, not testing stuff after try
sorear TimToady: I am leary of the mixing too
mls_ I just added some comments today and renamed the op to rethrow_skipnextctx
TimToady maybe try only catches one exception, and rethrows if there are multiple
sorear I think that we should at least make try { ... }; note $! if $!; DTRT
or something similar to that 17:47
TimToady which would still presumably work if try catches a single exception
sorear I have a lot of code like if (try do_something) { ... } 17:48
TimToady actually, I think my @undead already has those semantics
the SIMPLECATCH will just propagate those by bypassing the @! loop 17:49
sorear usually, with try I don't care about the exact details of the exception thrown, but I do care 1. that all exceptions are caught 2. that I can know if an exception occurred 3. that I can dump the exceptions for debugging
TimToady well, maybe fail just sets $! to one exception, but try sets $! to a super-exception when there are multiple, but generally I think try is intended to catch a particular exception that the user has in mind 17:51
of course, in that case you should still probably write an explicit CATCH 17:52
since a single exception might be the "wrong" one 17:53
maybe a good middle ground is to return a $! handled exception when there's only one, but make $! an unhandled failure if there are multiple, so it blows up if you don't treat it right 17:55
except, of course, that such a try is likely to be in a sink context, and blow up immediately 17:56
sorear usually with try my code doesn't care what exceptions there are, only "did it work?" 17:57
imagine a long-running server thing
loop { try iterate; note $! if $! } 17:58
it would be *very bad* if 'try' only caught one exception
because it would seem to work, as long as iterate throws singly
but as soon as the user gets a double fault, the app crashes
not good
I'd like to find a way without such traps 17:59
TimToady nodnod, it's a useful invariant 18:00
18:01 [Coke] left 18:03 [Coke] joined
TimToady the SIMPLECATCH code distinguishes multiple exceptions thrown from within the try from extra exceptions thrown while trying to CATCH 18:03
it's only the latter which are propagated outward automatically
and I think that's what most languages do, if there's an exception in the CATCH code 18:04
but for try, we have a canned CATCH that presumably doesn't throw much
18:05 kboga joined
TimToady so the code in S04 does, in fact, catch multiple failures if they are propagated up the call stack 18:05
as long as the new failure isn't in the CATCH itself
that's why CATCH now implicitly loops over multiple exceptions 18:06
and, as written, the handler can access @! if it wants to, or just ignore it and process exceptions one at a time 18:07
we just need to figure out what the default CATCH in a try does with @! to poke a $!-ish value into the caller
it's not exactly a fail() 18:08
18:09 mj41 joined
TimToady I think it's probably fine to say that $! is the last handled failure, and try can return a last-handled failure of "Multiple failures, here they are:" 18:10
18:11 mls_ left
TimToady "Multiple exceptions" rather 18:11
trying hard to keep my failures (unthrown) distinct from my exceptions (thrown) 18:12
18:13 mls_ joined
TimToady we might need a 'handle' predicate for use in CATCH, since 'fail' says "this is unhandled" to a caller 18:15
handle would set the caller's $! but mark it handled
18:17 _ilbot joined
TimToady or maybe the snippet in S04 around the user's switch handles that automatically 18:17
I mean, we would make it do that :)
tadzik nom: class A{}; say so A ~~ Any
p6eval nom: OUTPUT«Bool::True␤»
TimToady so any CATCH puts handled exceptions into $!, not just try 18:18
tadzik nom: class A is Mu {}; say so A ~~ Any
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Attribute $attr, Any $rw)␤:(Attribute $attr, Any $readonly)␤:(Routine $r, Any $rw)␤:(Parameter $param, Any $readonly)␤:(Parameter $param, Any $rw)␤:(Parameter $param, Any $copy)␤:…
tadzik tee hee
TimToady the problem with my snippet's switch is that it's hard to capture the handling of an exception, when that's represented by a 'succeed' in the switch just iterating the loop without falling through to the "didn't handle" code 18:25
18:26 impious joined 18:28 moritz joined
moritz ~o~ 18:28
phenny moritz: 16:52Z <sorear> tell moritz I have irc logs right now. Can we inject stuff into ilbot's database, for the sake of people browsing the logs in five years' time?
moritz not easily :( 18:29
did anything significant happen that the people in five years absolutely can't miss? 18:30
mls_ sorear: can you gist the log? 18:31
18:37 PacoLinux joined
dalek ecs: 15c37f8 | larry++ | S04-control.pod:
refine relationship of CATCH to outer caller's $!

Now if there are multiple caught exceptions in a try, they should all be passed to set_outer_caller's_bang and show up in some form in $!. Note it's not the caller's bang, since we're called by some die deep down (CATCH is pre unwind). It's whatever called the OUTER of the CATCH, so is a bit lexotic
18:39
moritz btw the logging continues now, it's just the webserver that's not up yet 18:47
and my admin seems unreachable :(
18:48 kboga left 18:49 birdwindupbird joined
moritz can anyobdy build nom? 18:53
I get
Method 'infinite' not found for invocant of class 'Parcel'
when compiling Test.pm and Pod/To/Text.pm 18:54
18:54 impious left
TimToady trying 18:56
19:00 kboga joined
TimToady now takes 1.3G to compile CORE.setting... 19:02
success
that was just with a pull and a make, no clean 19:03
mls_ phenny: tell pmichaud gist.github.com/1124942 is yesterday's version. I just changed the name of the op to rethrow_skipnextctx and added some comments today. 19:05
phenny mls_: I'll pass that on when pmichaud is around.
mikemol phenny: tell thundergnat++ Many thanks for uploading images of output graphical tasks on RC. Pretty things are pretty. 19:07
phenny mikemol: I'll pass that on when thundergnat++ is around.
mikemol Hm. I'm rather disturbed that that's literally true.
rdesfo is there any way to use perl5 libqtgui4 module in perl6? 19:08
mls_ phenny: tell pmichaud the opcode makes rethrow skip all exception handlers from the current context and the next context
phenny mls_: I'll pass that on when pmichaud is around.
19:09 envi left 19:10 mberends joined 19:15 rdesfo left, tyatpi joined
dalek kudo/nom: c52595a | tadzik++ | src/ (2 files):
Fix "is doc()" trait
19:19
pmichaud mls_: I think that rethrow already skips the current handler. 19:21
phenny pmichaud: 19:05Z <mls_> tell pmichaud gist.github.com/1124942 is yesterday's version. I just changed the name of the op to rethrow_skipnextctx and added some comments today.
pmichaud: 19:08Z <mls_> tell pmichaud the opcode makes rethrow skip all exception handlers from the current context and the next context
pmichaud looks at patch 19:22
mls_ Yes, I mean the next handler in the context-
(In the rakudo case, there are no other handlers in the current context)
pmichaud I don't think this patch can be correct. It's hard to say exactly, though, because the indentation is wrong. 19:24
But it's adding a 'try' node where one didn't previously exist.
19:24 gabiruh left
pmichaud so, that's a big confusing. 19:24
*bit
19:25 gabiruh joined
mls_ Yes, it adds another try node in the handler function. If there's an exception in the handler, the extra try will catch it and rethrow it with the new op. The op will then meddle with the exception so that all handlers in the next context (where the orig exception happened) get skipped 19:27
pmichaud that feels wrong also. 19:28
what if the exception in the handler is one that would've been normally caught by some other handler? It feels wrong to skip/remove it in that case. 19:29
mls_ Oh, it just rethrows, so other handlers will get it. Just not the ones from the next context.
pmichaud what if there are other handlers in the next context? 19:30
19:30 slavik left
TimToady you might look at how SIMPLECATCH works in S04:1028 19:30
mls_ (The approach can be modified so that just the original handler is skipped) 19:31
TimToady it assumes there the 'thrower' is passing lists of exceptions back and forth to the handlers
so instead of rethrowing new exceptions it just adds them to the list of currently-being-thrown exceptions
19:32 moritz left 19:34 mj41 left, moritz joined
pmichaud why the * twigils? 19:36
mls_ TimToady: yes, the patch is a start in the SIMPLECATCH direction. Still, we need the special opcode to rethrow without getting caught by the original handler 19:40
pmichaud I think the point is to change the thing that is doing the catching.
not to add more layers of catchers
mls_ I don't think it makes a difference which handler cathes the exception. By doing a a new push_eh in the handler function we're sure that we don't interfere if the exception gets seumed, because the continuation does not see the handler 19:44
resumed
pmichaud I'm not sure that's the case.
(Maybe that's supposed to be the case, but I'm not sure that it actually *is* the case. I'd want to see proof in code.) 19:45
either way, I'm biased against creating the extra handler for now.
afk, errands 19:46
mls_ I don't see why the extra handler matters. Is the push_eh really that expensive?
TimToady the * twigil is just there so user routines can see the variable if they want to do something weird; it's negotiable
pmichaud actually, it is.
(push_eh expensive)
but more than that, I don't like convoluted "check this, skip this, etc." solutions. They aren't robust and are prone to breakage.
mls_ Oh, but it's much easier that searching the call chain for the handler function. 19:47
than
TimToady I think it's important not to switch back and forth between normal code and throwing code in a convoluted fashion 19:48
mls_ It's actually a pretty simple solution.
TimToady that why when you're in throw mode, you stay in throw mode until you're done in the SIMPLECATCH code 19:49
shinobicl hi... .how could i write this condition using junctions??
rakudo: my $start = 5; my $end = 10; my $x = 0; for (1..20) ->$i { if $i >= $start && $i <= $end { say $i } };
p6eval rakudo 922500: OUTPUT«5␤6␤7␤8␤9␤10␤»
19:50 PacoLinux left
TimToady why do you want a junction? sounds like an XY problem 19:50
PerlJam TimToady: because junctions are shiny! :)
shinobicl yes :D
TimToady $start <= $i <= $end is also shiney
shiny even 19:51
shinobicl rakudo: my $start = 5; my $end = 10; my $x = 0; for (1..20) ->$i { if $start <= $i <= $end { say $i } };
p6eval rakudo 922500: OUTPUT«5␤6␤7␤8␤9␤10␤»
shinobicl that is not a junction?
PerlJam no
flussence rakudo: my $start = 5; my $end = 10; say for grep { $start <= $^i <= $end } 1..20;
TimToady just a chained comparison
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Confused at line 22, near "say for gr"␤»
flussence grr
rakudo: my $start = 5; my $end = 10; .say for grep { $start <= $^i <= $end } 1..20;
PerlJam you could also us a smart match
TimToady comma
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Confused at line 22, near ".say for g"␤»
flussence rakudo: my $start = 5; my $end = 10; .say for grep { $start <= $^i <= $end }, 1..20; 19:52
p6eval rakudo 922500: OUTPUT«5␤6␤7␤8␤9␤10␤»
shinobicl rakudo: my $start = 5; my $end = 10; for (1..20) ->$i { if $i == any($start .. $end) { say $i } };
p6eval rakudo 922500: OUTPUT«5␤6␤7␤8␤9␤10␤»
TimToady rakudo: my $start = 5; my $end = 10; .say for grep $start..$end, 1..20
p6eval rakudo 922500: OUTPUT«5␤6␤7␤8␤9␤10␤»
TimToady the junction only slows it down
and grep already does a smartmatch, so a range works 19:53
shinobicl i had the silly idea that chained comparisons were junctions
i mean, implemented as junctions 19:54
TimToady hopes not
they're supposed to short-circuit, for one
flussence rakudo: my $start = 5; my $end = 10; for 1..20 { say $^i if {$^i==$start} ff {$^i==$end} } # am I doing this right?
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Flip flip operators are not yet implemented at line 22, near " {$^i==$en"␤»
flussence hm...
niecza: my $start = 5; my $end = 10; for 1..20 { say $^i if {$^i==$start} ff {$^i==$end} } # am I doing this right?
p6eval niecza v8-37-g28de0b8: OUTPUT«===SORRY!===␤␤$i has already been used as a non-placeholder in the surrounding block,␤ so you will confuse the reader if you suddenly declare $^i here at /tmp/eAC_RmQLD9 line 1:␤------> ; my $end = 10; for 1..20 { say $^i if {⏏…
TimToady say 1 > 10 > die "Phooey" 19:55
perl6: say 1 > 10 > die "Phooey"
flussence niecza: my $start = 5; my $end = 10; for 1..20 -> $i { say $i if {$i==$start} ff {$i==$end} }
p6eval rakudo 922500, niecza v8-37-g28de0b8: OUTPUT«Bool::False␤»
..pugs: OUTPUT«␤»
niecza v8-37-g28de0b8: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤»
TimToady flussence: you can't use $^i both inside and outside of {} 19:56
flussence oh well, there's always the brute-force option,
TimToady the lambda form works fine 19:57
as you demonstrated
mls_ ok, back in two weeks. Happy hacking!
TimToady enjoy!
mls_ Thanks! -oo 19:58
19:58 mls_ left
flussence
.oO( curses, I never got as far as defining a infix:<∩> in that module to copy+paste from... }
19:58
19:58 dual joined
TimToady the error message from niecza (from STD originally) is LTA though, since $i actually *was* a placeholder in the outside block 20:00
pmichaud 19:47 <mls_> Oh, but it's much easier that searching the call chain for the handler function.
"much easier" isn't much easier if it involves introducing holes into the solution space. (more) 20:01
by that reckoning, simply adding a "pop_eh" after catching the exception is "easier".
(back from errands)
nom: (1..10)>>.say 20:02
p6eval nom: OUTPUT«2␤5␤9␤4␤7␤8␤3␤10␤6␤1␤»
pmichaud \o/ 20:03
TimToady tell me it didn't actually do a shuffle on that... :)
TimToady has been thinking about the close-after-reading problem, and wondering whether we're basically missing a phase that needs phasing 20:06
if a scope returns a lazy list, the lifetime of that list is determined elsewhere, but we might well want something to happen when that lazy list is exhausted 20:07
tadzik nom: [1, 2, 3] «+&» [4, 5, 6]
p6eval nom: OUTPUT«Could not find sub &METAOP_HYPER␤current instr.: '_block1002' pc 90 ((file unknown):15277720) (/tmp/iyaK74jHqF:1)␤»
TimToady to be consistent with the existing .plan method, I'm thinking of a PLAN {...} phaser that adds to the end of the currently returning lazy list
and then my $handle will plan *.close = open $filename; $handle.lines 20:08
or some such
pmichaud it did actually do a shuffle on that. :) 20:09
TimToady and the close just gets tacked onto the lazy list and runs when the handle runs out of lines
or some similar way of scheduling something at the end of whatever is gathering inside
without having to compose a new gather outside 20:10
just to tack something on the end
pmichaud what exactly do we mean by "when the lazy list is exhausted"? do we really mean "when all the lazy parts are gone"?
20:10 tyatpi left
pmichaud in the case of a gather, it's pretty easy to add a close to the end within the gather 20:10
TimToady no 20:11
not if the gather is in someone else's code
see .lines above
pmichaud (thinking)
TimToady there's an outer and an inner dynamic scope, and we want to capture control right when the inner dynamic scope leaves 20:12
it's the natural time to do things like close a file
and it's the one situation where we can't actually control the dynamic context in question, because someone else is doing it 20:13
and yes, it'd only be useful for finite lists :)
pmichaud in the .lines above, does the 'plan' attach to the variable or to the value?
TimToady it's just a closure that runs at the end of the list; I have it attached to the variable 20:14
but its effect is not there at all
its PLAN {} effect is at LEAVE time, only it's basically a lazy LEAVE
pmichaud but the list is from .lines, not from the IO object 20:15
opening a file doesn't create a list.
TimToady I don't care where the list is from, as long as I can tack an action onto its end
in this case the exhaustion of lines would imply the exhaustion of the filehandle 20:16
pmichaud so, it needs to be something that decorates .lines or its return value
TimToady I was thinking of it as modifying the returned lazy list en passant
just push another plan onto its un-reified iterators
it just happens to return () and have a side effect 20:17
that seems like the simplest thing to me
but I could be wrong about that, and wouldn't mind
pmichaud having side-effects on a list seems okay to me. 20:18
but attaching the side effects to the variable does not.
TimToady well, simplest might be to compose another gather, but that'll get slow
it's not attaching side effects to the variable
it's just expressed as a trait so we know what to close at PLAN time
but maybe there's a way to mark the value instead 20:19
pmichaud yeah, doing a .push of some sort on the result of lines might work
TimToady well, .push is reifying, so I said .plan 20:20
pmichaud then just .plan
$handle.lines.plan(...)
PerlJam why is .plan named so? Just for the future aspect of it?
TimToady yeah, and it starts with p like push
pmichaud and we put something onto the list that executes and returns ()
(and that something is Iterable, so it flattens)
TimToady anyhoo, I was kinda horrified to realize we had a lifetime we couldn't easily talk about in Perl 6 20:21
pmichaud class Plan is Iterator { has $!code; method reify() { $!code; return () } }
er, $!code()
then you can put a Plan anywhere in a list, and when its interpolated it executes $!code and returns () 20:22
*it's
TimToady course, conceivably you express a plan by just saying .lines; plan()...yeah, that
pmichaud s/Plan/NilCode/ # perhaps
TimToady er, comma, not semi
pmichaud similar to Whatever and WhateverCode
20:23 moritz left
pmichaud I have to depart. Anyway, having some sort of Iterable that executes code might be a cleaner approach. 20:23
TimToady something to think on
pmichaud it would also mean that we can do code executions at the beginning of lists, in the middle of lists, etc. 20:24
as well as being able to have multiple such phasers in a list
"phasers"
TimToady that seems like a useful primitive
pmichaud okay, gotta run -- bbl
TimToady even if we have sugar for open 20:25
o/
jnthn back 20:28
Aww. I just missed pmichaud++
tadzik oh, I just catched jnthn++ :) 20:31
if I may, in gist.github.com/1128443 the argument to :WHEREFORE seems to be treated as a string - for a module, it dies with 'get_string() not implemented in class <modulename>', do you know what may cause this? 20:32
20:33 Mowah joined 20:36 Trashlord left
jnthn tadzik: looking 20:41
20:42 timbunce left
jnthn Also, grr, I've busted a bunch of tests by fixing something... 20:42
tadzik: No, not off hand. Hm 20:43
tadzik: When does it actually die with that?
tadzik jnthn: when the parser gets to the module declaration 20:44
jnthn tadzik: OK...but what's it doing? Is it dying in serialize_object? 20:46
tadzik no, not really. Let me tell you by example: 20:47
module Foo; everything gets documented, bla bla, but when I send the $what to :WHEREFORE(), it's somehow turning $what into a string or so
well, it's dying when calling serialize_object, yes 20:48
20:48 timbunce joined
tadzik oh, wait 20:48
I think add_constant uses the string value of a thing as a cache key
so maybe that's what fails
jnthn yes, it does 20:49
20:49 masak joined
masak whoa. that was one *spicy* Vindaloo. 20:49
jnthn Another reason why new_type and add_constant should probably be split out. :)
masak: :)
masak IRC logs still down? 20:50
jnthn aye
masak then how am I supposed to find out what you were talking about while I was gone? :)
tadzik I knew that masak++ would be confused :)
masak oh yeah? bet you said it too, in the nonexistent backlog! 20:51
tadzik YOU WILL NEVER KNOW
masak gaaah
tadzik jnthn: is that a ModuleHOW or something like this? 20:55
jnthn tadzik: yes 20:56
20:58 birdwindupbird left
tadzik sub foo {}; $=POD[0].WHEREFORE.() # quite cool 20:59
jnthn: any idea to solve this in a sane way?
jnthn :)
tadzik bonus points for being solvable by me :)
jnthn tadzik: I still think add_constant and new_type need splitting up.
tadzik sounds like a job for a Splitting Man! 21:00
jnthn tadzik: And new_type wouldn't cache
Maybe that works out.
Though
tadzik hmm
jnthn nom: module Foo { }; say Foo
p6eval nom: OUTPUT«Foo()␤»
jnthn nom: module Foo { }; pir::say(Foo)
p6eval nom: OUTPUT«get_string() not implemented in class 'Foo'␤current instr.: '_block1002' pc 93 ((file unknown):116) (/tmp/F2SvScvmkt:1)␤»
tadzik as a first step, we can just omit caching when 'type_new' is the argument
jnthn nom: class Foo { }; pir::say(Foo)
p6eval nom: OUTPUT«Use of uninitialized value in string context␤␤»
jnthn ah, I see...
tadzik: Well, thing is, when objects reference other complex objects, the caching is not quite going to work out. 21:01
tadzik: Or add a :$nocache
I guess for Rat and Complex we'd like to keep the cache. 21:02
tadzik probablu
so, :nocache then?
jnthn Do that for now.
tadzik okay
21:03 jaldhar joined
tadzik nqp: sub foo(:$nope) { if $nope { say(1) } }; foo(); foo(:nope) 21:03
p6eval nqp: OUTPUT«1␤»
tadzik oh crap, I have to add that to serialize_object too :) 21:04
or just don't use it in this case
21:04 jaldhar left 21:05 jaldhar joined 21:07 jaldhar left 21:08 jaldhar joined 21:09 am0c left 21:12 PacoLinux joined
tadzik huh, my unless %*COMPILING<%?OPTIONS><setting> eq 'NULL' appears to die with Method 'exists' not found for invocant of class 'Hash' 21:13
but only when I use classes :/ 21:14
21:15 mls_ joined
tadzik or not. Fun stuff 21:16
21:16 wolfman2000 joined
mls_ seen pmichaud 21:18
aloha pmichaud was last seen in #perl6 53 mins 27 seconds ago saying "okay, gotta run -- bbl".
masak aloha: OR SO YOU CLAIM 21:19
21:19 slavik joined
mls_ phenny: tell pmichaud earlier today we discussed what happens if a block both has a CATCH and a CONTROL handler and a control exception is thrown when processing the catch handler. There was agreement that it should not be caught by the handler 21:21
phenny mls_: I'll pass that on when pmichaud is around.
21:22 mj41 joined
mls_ phenny: tell pmichaud so checking if the same handler was already active is and rethrowing is not enough. all handlers in the context must be "disabled" if one handler is active. That's basically what my patch does. 21:25
phenny mls_: I'll pass that on when pmichaud is around.
masak 'night, #perl6ers. 21:27
21:27 masak left
jnthn rakudo: say \(1,2,3).WHAT 21:28
p6eval rakudo 922500: OUTPUT«Capture()␤»
jnthn rakudo: say \(1,2,3).Str
p6eval rakudo 922500: OUTPUT«Capture()<0x25cbd00>␤»
jnthn rakudo: say \(1,2,3).String
rakudo: say \(1,2,3).Stringy
p6eval rakudo 922500: OUTPUT«Method 'String' not found for invocant of class 'Capture'␤ in main program body at line 22:/tmp/PcpHF2b55T␤»
rakudo 922500: OUTPUT«Method 'Stringy' not found for invocant of class 'Capture'␤ in main program body at line 22:/tmp/gmoKnLGgzp␤»
jnthn rakudo: say \(1,2,3)
p6eval rakudo 922500: OUTPUT«Capture()<0x2da3178>␤»
mls_ phenny: tell pmichaud if speed is really an issue, we can also do this with a parrot patch by adding a flag to the context that tells parrot to skip all handlers of the next context. The handler function would then set this flag with an opcode.
phenny mls_: I'll pass that on when pmichaud is around.
21:28 mj41 left
jnthn rakudo: my @array = <a b c>; my $ref = \@array; say $ref.WHAT 21:29
tadzik nom: class A {}; say so A.HOW ~~ Metamodel::ClassHOW # jnthn?
p6eval rakudo 922500: OUTPUT«Capture()␤»
nom: OUTPUT«Segmentation fault␤»
mls_ back to bed... good night...
21:29 jaldhar left
tadzik or maybe there's a better way to tell if something is a class, a module or what? 21:29
jnthn night, mls_
tadzik mls_: g'night
mls_ quit
oops 21:30
jnthn fail
21:30 mls_ left
jnthn :) 21:30
21:30 jaldhar joined
jnthn nom: class A {}; A.HOW ~~ Metamodel::ClassHOW 21:30
p6eval nom: ( no output )
jnthn nom: class A {}; pir::say(A.HOW ~~ Metamodel::ClassHOW)
p6eval nom: OUTPUT«1␤»
tadzik nom: class A {}; say(A.HOW ~~ Metamodel::ClassHOW).WHAT 21:31
p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Integer'␤current instr.: 'say' pc 648959 (src/gen/CORE.setting.pir:161026) (src/gen/CORE.setting:4077)␤»
tadzik Parrot leaking through, eh?
jnthn Yeah
Though not obvious where really.
tadzik smartmatching?
21:31 ranott joined
jnthn No 21:31
21:31 jaldhar left
jnthn Oh 21:31
21:31 Mowah left, jaldhar joined
jnthn It's finding NQP's ACCEPTS since Metamodel::ClassHOW is written in NQP I guess 21:32
tadzik nom: say Metamodel::ClassHOW.WHAT
p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤current instr.: 'say' pc 648959 (src/gen/CORE.setting.pir:161026) (src/gen/CORE.setting:4077)␤»
tadzik probably, yes
jnthn still needs to fix that lot up
Evil bootstrapping fun.
rakudo: my @array = <a b c>; my $ref = \@array; say $ref.WHAT 21:33
p6eval rakudo 922500: OUTPUT«Capture()␤»
jnthn rakudo: my @array = <a b c>; my $ref = \@array; say $ref
p6eval rakudo 922500: OUTPUT«Capture()<0x637fdf0>␤»
tadzik nom: class A {}; say so pir::isa(A, 'ClassHOW')
p6eval nom: OUTPUT«Segmentation fault␤»
jnthn rakudo: my @array = <a b c>; my $ref = \@array; say ~$ref
p6eval rakudo 922500: OUTPUT«Capture()<0x49360a8>␤»
jnthn tadzik: er, do *not* use pir::isa on 6model objects :)
It won't even sort of work
tadzik oopsie :)
nom: class A {}; say so pir::isa(A.HOW, 'ClassHOW')
p6eval nom: OUTPUT«Segmentation fault␤»
jnthn .HOW is a 6model object
tadzik ah
jnthn pir::isa is Parrot object model only.
tadzik but still not a Perl 6 object :) 21:34
jnthn Well, it's not an object that derives from Mu.
tadzik nom: class A {}; say so A.HOW.isa('ClassHOW')
p6eval nom: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤current instr.: 'nqp;Perl6;Metamodel;MROBasedTypeChecking;isa' pc 36676 (src/gen/perl6-metamodel.pir:9926) (src/gen/Metamodel.pm:729)␤»
jnthn that'll work.
nom: class A {}; say so A.HOW.isa(A, 'ClassHOW')
p6eval nom: OUTPUT«Bool::False␤»
jnthn But not with a string of course. :)
nom: class A {}; say so A.HOW.isa(A, Metamodel::ClassHOW)
p6eval nom: OUTPUT«Bool::False␤» 21:35
jnthn hm
oh
tadzik nom: class A {}; say so A.HOW.isa(A.HOW, Metamodel::ClassHOW)
p6eval nom: OUTPUT«Bool::False␤»
jnthn yeah, that's asking about A
Not it's meat-boject :)
...meta-object
tadzik still rong
jnthn easy way
nqp::istype(A.HOW, Metamodel::ClassHOW 21:36
)
nom: class A { }; say nqp::p6bool(nqp::istype(A.HOW, Metamodel::ClassHOW))
p6eval nom: OUTPUT«Bool::True␤»
jnthn nom: role A { }; say nqp::p6bool(nqp::istype(A.HOW, Metamodel::ClassHOW))
p6eval nom: OUTPUT«Bool::False␤»
tadzik ok, nice 21:37
sorear un-nap. 21:40
21:43 thundergnat joined, pernatiy joined 21:44 Psyche^ joined 21:45 jaldhar left
tadzik oh, pushing the declarators to $=POD breaks order anyway :/ 21:46
methods get there before classes
21:47 slavik left 21:48 slavik joined
sorear flussence: that error message is wrong 21:48
21:48 Patterner left, Psyche^ is now known as Patterner
sorear TimToady: I think your PLAN {} is just LEAVE. Can you give a case where they would differ? 21:49
TimToady: Why is { my $i; { $^i == 5 } } illegal?
TimToady: I mean, why should it be. I think 'why' is because of a bug, the OUTER::<$i> alias is being created too eagerly 21:50
22:04 drbean joined 22:15 tuku joined
tuku This may be a common question, but where can I find a decent perl6 tutorial? 22:16
sorear tuku: do you know perl 5? 22:17
22:17 mkramer1 left
tuku Currently not much, just can read and write basic programs in it. 22:17
22:18 Moukeddar joined
sorear ah. 22:18
github.com/perl6/book/downloads is well regarded
22:19 mkramer joined
sorear masak did a tutorial blog series last month with a target audience of "completely new to programming" 22:19
perl6.org/documentation/ is the main directory 22:20
22:21 noam joined
tuku thanks for the links. 22:21
And I shall be off now. 22:22
22:22 tuku left
dalek kudo/nom: 4b19d47 | tadzik++ | src/Perl6/SymbolTable.pm:
[SymbolTable] Add a :nocache option to add_constant
22:26
kudo/nom: 2e38c54 | tadzik++ | src/Perl6/Actions.pm:
Don't attempt to document class attributes
kudo/nom: 71df76f | tadzik++ | src/ (2 files):
Push declarator blocks to $=POD as a Pod::Block::Declarator objects

The order is messed up unfortunately. Given a class with a method in it, the method declarator is added before the class declarator.
kudo/nom: 4472ab8 | tadzik++ | Pod/To/Text.pm:
Add declarator blocks support to Pod::To::Text
jnthn perl6: my @array = <a b c>; my $ref = \@array; say +$ref
p6eval rakudo 922500: OUTPUT«maximum recursion depth exceeded␤ in 'Cool::Numeric' at line 1921:src/gen/core.pm␤ in 'Cool::Numeric' at line 1922:src/gen/core.pm␤ in 'Cool::Num' at line 1:src/gen/core.pm␤ in 'Cool::Numeric' at line 1921:src/gen/core.pm␤ in 'Cool::Numeric' at line 1923:src/g…
..pugs: OUTPUT«3␤»
..niecza v8-37-g28de0b8: OUTPUT«Unhandled exception: Cannot use value like Capture as a number␤ at /home/p6eval/niecza/lib/CORE.setting line 696 (CORE die @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 43 (CORE Any.Numeric @ 4) ␤ at line 0 (ExitRunloop @ 0) ␤ at /tmp/R1j67JPrjs …
jnthn If \@foo is like \(@foo) I'd kinda expect that to be 1. 22:27
Since in an argument list that wouldn't flatten.
tadzik I wonder if there's any smarter way than sorting the declarator blocks by their $/.from
jnthn tadzik: Perhaps just pushing them in the right order in the first place? :) 22:28
Can see that may be tricky in some cases
Package on should be fixable though. 22:29
*one
tadzik jnthn: well, that'll require them to be pushed when they appear in the code rather than when their coresponding object action method is called 22:30
and the object needs to be constructed when they're pushed (see WHEREFORE)
gist.github.com/1128691 # current behaviour example 22:33
TimToady sorear: yes, it should allow it syntactically (though $^i is otherwise illegal in a bare block, but that's a different issue) 22:34
on the other thing...
niecza: sub foo() { LEAVE { say "now" }; gather { LEAVE { say "then" }; take $_ for 1..10 } }; .say for foo; 22:35
p6eval niecza v8-37-g28de0b8: OUTPUT«now␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
TimToady a PLAN at the point of the first leave would print at the point of the second LEAVE, if that LEAVE actually worked correctly
tadzik I wonder why t/00-parrot/09-pir.t stopped working in nom 22:37
TimToady got tired
jnthn tadzik: Probably because it doesn't box/marshall stuff appropriately. 22:38
tadzik jnthn: it gets confused when pir has a trailing whitespace
still, the only difference between nom and master is the .value in <quote_EXPR>.ast.value. Nom doesn't like .value
jnthn no, it sure won't :) 22:39
tadzik like?
yeah, no .value in Past::Op
jnthn right
The trailing whitespace thing is odd. 22:40
tadzik nom: Q:PIR { say 'ok 1' }; 22:41
p6eval nom: OUTPUT«ok 1␤»
tadzik oh, hm
I wonder how mad is to strip the trailing \h* manually 22:42
whatever, it doesn't work anyway:) 22:48
the multiline PIR seems to be Just Broken 22:49
jnthn TimToady: Is \@foo equivalent to \(@foo) ?
Failing to find a spec ref...
TimToady I believe so 22:50
jnthn OK
\@foo.elems is always 1?
TimToady and @$foo is equivalent to @($foo) :)
presumably
jnthn I've got some tests that seem to expect $c = \@foo; $c.elems == @foo.elems 22:51
TimToady sounds wrong to me
jnthn OK, good.
We were passing them because Parcel.Capture was busted...
22:52 noam left
jnthn Presumably \%hash is just \(%hash) and just making it a positonal too? 22:53
dalek ecs: a7170aa | larry++ | S04-control.pod:
no need to set $! if we're rethrowing past it
22:54
TimToady yes
\(|%hash) would, of course, be different
jnthn Aye, makes sense. 22:55
tadzik phenny: tell moritz given github.com/rakudo/rakudo/commit/71df76fa1f and gist.github.com/1128691 do you see any better way to solve this but to sort the block according to their $/.from?
phenny tadzik: I'll pass that on when moritz is around.
jnthn tadzik: BTW, are we still doing the doc trait call for every single method and package whether or not it's documented? 22:56
TimToady I probably dinged you for not having PROCESS::<$PID>
tadzik jnthn: yes :)
I should probably make that smarter 22:57
TimToady sorear: ^^
jnthn tadzik: Please do. It's likely having a negative effect on startup time and setting compilation time.
(Since we don't really serialize yet...once we do the startup time bit of it will cease to be a problem...) 22:58
Unless you're not doing the doc emission in the setting...but then I can say same story but for spectests ;-)
TimToady nom, on the other hand, has $*PID but not PROCESS::<$PID> 22:59
well, what it really doesn't have is PROCESS::{} 23:00
tadzik jnthn: what's better: making .WHY writable, or setting in with Black Magic in traits.pm?
TimToady it does have $PROCESS::PID 23:01
jnthn nom: say $PROCESS::PID 23:04
p6eval nom: OUTPUT«19598␤»
jnthn TimToady: Yeah, we don't have that other form of lookup yet.
TimToady nom: say PROCESS::<$PID>
p6eval nom: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤current instr.: 'nqp;Perl6;Metamodel;MethodDelegation;find_method' pc 27431 (src/gen/perl6-metamodel.pir:5691) (src/gen/Metamodel.pm:90)␤»
TimToady niecza: say PROCESS::<$PID> 23:05
p6eval niecza v8-37-g28de0b8: OUTPUT«Any()␤»
23:05 noam joined
TimToady but that's really a nitpick, so maybe I should make it green 23:05
23:06 timbunce left, bluescreen10 left
dalek atures: 01328ab | larry++ | features.json:
say niecza has PROCESS, etc.

It's missing PROCESS::<$PID> but that's not the namespace's fault...
23:08
TimToady niecza: say PROCESS::<$IN>.get 23:09
p6eval niecza v8-37-g28de0b8: OUTPUT«Land der Berge, Land am Strome,␤»
tadzik jnthn: well, the trait call will have to stay unless there is a way to set a default value of a metamodel property as a Perl 6 object
as in, foo.HOW.docs would have to be Any
jnthn tadzik: Ah. Though that's only true for packages. 23:12
tadzik I should be able to avoid doing a role mixin for every object though :) 23:13
dalek ast: a8b638a | jonathan++ | S06-signature/unpack-array.t:
Update test for latest stringification spec; correct one test to what it probably shoulda been.
23:14
ast: 53d2c03 | jonathan++ | S02-literals/autoref.t:
Correct a bunch of wrong assumptions about \ capture former.
jnthn
.oO( How is Capture formed? )
tadzik jnthn: hmm, to add an attribute to Mu I have to mess with BOOTSTRAP.pm, right?
jnthn wait what 23:16
Do NOT add an attribute to Mu!
tadzik okay, but why not? :)
jnthn Because you make every object everybody ever instantiates 8 bytes larger.
(on 64-bit)
sorear jnthn: notionally, captures are created by the procedure call mechanism
jnthn sorear: I was meme-reffing, not actually asking :) 23:17
tadzik jnthn: okay, then where do I keep .WHY contents for every object around?
jnthn tadzik: You mix it in *when* it exists
Then have a default method WHY() { Any } # or whatever we settled on it returning when there's no docs 23:18
The role that is mixed in for documented things overrides that
And returns the doc.
tadzik okay, that makes stuff simplier
jnthn :)
sorear role WHY { has $.WHY }; $object does WHY; $object.WHY = ...
jnthn Along those lines 23:19
tadzik that's more-less what the trait does now
jnthn tadzik: btw, thanks for fixing inheritance.t regression :)
23:19 lue joined
tadzik well, that was my bug :) 23:19
23:20 bluescreen10 joined
lue hello world o/ 23:20
jnthn Yes, but I'm still happy it's fixed :)
tadzik hello lue o/
jnthn hi lue :)
lue nom: say 35.base(16) # please work
p6eval nom: OUTPUT«23␤»
tadzik I think by adding more unshift tests and not fixing them someone wants me to feel obliged to fix unshift again :)
dalek kudo/nom: 855106b | jonathan++ | src/core/Parcel.pm:
Fix Parcel.Capture.
23:21
kudo/nom: 01c7286 | jonathan++ | src/core/Capture.pm:
Turns out that some tests relied on the Parcel.Capture returning Parcel hack, because certain things in Capture were not implemented. This adds .elems, .Str and .gist on Capture.
kudo/nom: 2b00770 | jonathan++ | src/Perl6/Actions.pm:
Apply patch from mls++ that forbids duplicate CATCH and CONTROL blocks, and saves adding a handler to a try block if it already has a CATCH.
kudo/nom: 3ee1e23 | jonathan++ | src/core/Capture.pm:
Some missing 'multi's.
sorear TimToady: what do you think of pastie.org/2327632 ?
23:22 revdiablo left 23:30 nbrown left 23:31 nbrown joined
dalek kudo/nom: ef02d7d | jonathan++ | src/core/Capture.pm:
Oops, bit overzealous multi-ing.
23:34
23:35 PacoLinux left 23:36 PacoLinux joined
TimToady sorear: I think any use of $! for something mission critical is a mistake, plus the $! doesn't belong to you anyway, since you're just a lambda 23:37
lue I wonder what needs to change to allow "make install" to work properly (i.e. make rakudo work in directories besides rakudo/)
sorear TimToady: please elaborate your opinion of $!. 23:38
TimToady: me, I'm trying to get rid of SIMPLECATCH - I think it seems a lot like what try{} is doing
TimToady but try *isn't* a simple catch, and the catch inside it is going to have a try, and the catch inside that is going to have a try...it's trytles all the way down 23:40
plus checking $! after try has had any number of hidden race conditions crop up; I'd rather just put it where I want it exactly in the catch 23:42
23:42 molaf left 23:44 Moukeddar left 23:45 im2ee left 23:46 jaldhar joined
pmichaud back again 23:47
phenny pmichaud: 21:21Z <mls_> tell pmichaud earlier today we discussed what happens if a block both has a CATCH and a CONTROL handler and a control exception is thrown when processing the catch handler. There was agreement that it should not be caught by the handler
pmichaud: 21:25Z <mls_> tell pmichaud so checking if the same handler was already active is and rethrowing is not enough. all handlers in the context must be "disabled" if one handler is active. That's basically what my patch does.
pmichaud: 21:28Z <mls_> tell pmichaud if speed is really an issue, we can also do this with a parrot patch by adding a flag to the context that tells parrot to skip all handlers of the next context. The handler function would then set this flag with an opcode.
23:55 molaf joined 23:57 wamba left