»ö« 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.
kboga hmm, i'll look into that, thanks sorear 00:01
00:04 Trashlord left
kboga I was looking into how nom gets a hold of its @*ARGS, from typing them in the console down to what rakudo gets. 00:05
00:06 Chillance left
kboga aha and in HLL/Compiler.pm the first arg (program name) is shifted 00:10
jnthn nom: nqp::null() 00:14
p6eval nom: ( no output )
dalek kudo/nom: 34bf1be | jonathan++ | src/ (3 files):
Add a place where we can persist state variables between call frames.
00:15
kudo/nom: 6850cd0 | jonathan++ | src/pmc/perl6lex (2 files):
Get state variables essentially working; don't handle binding and closure cases correctly yet.
sorear there's a *very* simple implementation of 'state'
jnthn This one is decidedly simpler than what alpha had. 00:17
sorear how complex was alpha's version?
jnthn I forget the details...it mucked around with Parrot prophash.
Which conveniently - due to other stuff we were doing - got the closure semantics correct. 00:18
This time I had a natural place to put stuff that happens when we're sorting out the current callframe's lexpad, so just went with doing the work there. 00:19
Think it did quite some work in the actions...this one does next to none. 00:21
sorear jnthn: have you seen the niecza approach to handling 'state'? I'm rather pleased with it 00:24
00:25 impious left
jnthn std: subset A of Int where { $_ < state $x++ } 00:25
p6eval std 516268a: OUTPUT«ok 00:01 121m␤»
jnthn meh, wonder why Rakudo's parser chokes on that...
dalek kudo/nom: 296d6b8 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Get the closure semantics for state variables correct (bit of copy-paste here, but it's hot-path-ish...).
jnthn sorear: No, I didn't see it.
sorear jnthn: state variables need to exist in one copy per instantiation of the sub. what else exists in one copy per instantiation? OUTER::. 00:26
jnthn sorear: I think you may have mentioned it before though...you have an extra...yeah, that. :) 00:27
sorear in niecza, sub foo { state $x } bsically means my $x; sub foo { $x }
it's a little bit fudgier to get name scoping right
jnthn niecza: sub cf($n) { return -> { state $x //= $n; say $x++ } }; my $c1 = cf(2); my $c2 = cf(42); $c1(); $c2(); $c1(); $c2();$c1(); $c2(); # curious if it gets this one right, though suspect it will 00:28
p6eval niecza v8-3-g838bc38: OUTPUT«2␤42␤3␤43␤4␤44␤»
jnthn I fear that the name scoping issues may become a little un-fun, but maybe that's easier to cope with in Niecza than it would be in nom. 00:29
sorear incidentally, you can write state $x = $n and it will work too
jnthn Oh? 00:30
The spec has some weird timing rule for assignments to state vars too?
sorear yes
like has vars
jnthn It has one for our too
sorear and constants
jnthn Yeah, they're a PITA.
00:30 Holy_Cow joined
sorear didn't know that it had one for our 00:30
jnthn Yeah, INIT time I think. 00:31
Will deal with the state case when I get around to sorting out the INIT one anyway
sorear state vars just get wrapped in a START
jnthn I guess it's all strangely consistent. :)
sorear and START is in turn defined approxiately as EXPR unless (state $)++ 00:32
jnthn I think I had a similar handling of START to that back in alpha. 00:33
oops, 2:30AM...
And my whisky glass is empty. Guess that means sleep.
00:34 silug_ left
sorear looks at the features matrix for ideas 00:37
hmm, symbolic-deref.t seems to have a lot of fossils 00:40
00:41 Holy_Cow left 00:47 tokuhir__ left, cbk left
sorear is %::("*::ENV") even legal? 00:48
[Coke] S02-literals/pairs.t, line 158. How can I todo the Nth test in that loop?
00:49 risou_awy is now known as risou 00:53 risou is now known as risou_awy
[Coke] ... I'll just split it up into 2 chunks. 00:54
(evil)
sorear I would say better to todoize the entire test 00:57
what the test says is that all pairs work, including a selection of keywords 00:58
01:00 noganex joined
[Coke] it's not one test, it's N tests, so TODO the block means multiple unexpected passes. 01:01
.. but I can't TODO the block anyway. blargh. 01:03
01:04 noganex_ left
sorear you need a #?DOES in there 01:05
01:05 thou joined, shinobicl joined
sorear moritz: ping. do you have a good mental model of ::("") tokenization? 01:06
[Coke] I see lots of cases of DOES in the repo, trying to find one that says "todo". 01:08
sorear DOES and todo are used on separate lines 01:09
#?rakudo todo 'foo'
#?DOES 37
#?DOES nnn tells the fudger how many tests the next block does
if there are any hidden in loops
[Coke] Found one ... thank you. If I add that, --fudge is still not marking those tests as todo. 01:11
gist.github.com/1112936 01:12
running with: perl t/harness --fudge t/spec/S02-literals/pairs.t ; /perl6 t/spec/S02-literals/pairs.rakudo 01:13
ends with, e.g.: not ok 81 - Pair with 'role' as key 01:14
(#$&#@$>
whoops. ingore that last line.
(the cussing, not the "ends with") 01:17
01:19 thou left
[Coke] leaves it for someone else. sorear++ for pointing me the right direction. 01:22
01:27 thou joined 01:28 s1n joined 01:37 Tedd1 left 01:39 whiteknight left 01:51 envi joined 01:55 Grrrr joined 01:58 envi left 02:00 Grrrr left
[Coke] 'squiet. Everyone at oscon? 02:08
offby1 grumbles 02:20
[Coke] aye? 02:24
colomon not me. :) 02:25
[Coke] colomon; looks the trig tests would be LHF to reclaim. (some more accurate error msgs for spectest.data coming shortly.) 02:33
colomon [Coke]: agreed
sorear [Coke]: not I 02:34
02:39 crked joined 02:40 eiro joined 02:42 silug_ joined, rdesfo joined 02:47 jaldhar joined 02:55 [particle] left, [particle] joined
[Coke] colomon: there you go. lots of missing methods and subs. 03:03
dalek kudo/nom: cd07404 | Coke++ | t/spectest.data:
track spectest file err statuses
03:08 REPLeffect left 03:21 REPLeffect joined 03:23 Su-Shee_ joined 03:24 Su-Shee left 03:26 crked left, kaare_ joined 03:33 REPLeffect left 03:34 lichtkind left 03:39 rdesfo left 03:40 jaldhar left, jaldhar joined 03:47 REPLeffect joined 03:55 soh_cah_toa left, birdwindupbird joined 03:56 soh_cah_toa joined 04:01 jaldhar left, jaldhar joined
dalek ecza: 2c56dcb | sorear++ | README.pod:
Update README and clarify the use of "make" (hakank++)
04:03
04:14 f00li5h left 04:15 satyavvd joined 04:17 jaldhar left, molaf joined 04:18 woosley joined 04:19 jaldhar joined 04:23 daniel-s joined 04:27 daniel-s left, daniel-s joined 04:31 daniel-s_ joined, daniel-s left 04:33 shinobicl left 04:34 shinobicl joined 04:36 daniel-s_ left, daniel-s__ joined 04:40 _daniel-s__ joined, daniel-s__ left 04:45 _daniel-s__ left, daniel-s joined 04:48 am0c joined 04:49 daniel-s left, daniel-s_ joined
sorear std: 1.::("Numeric::sin")() 04:51
p6eval std 516268a: OUTPUT«ok 00:01 119m␤»
04:54 daniel-s__ joined, daniel-s_ left 04:57 _daniel-s__ joined, daniel-s__ left 05:02 _daniel-s__ left 05:05 daniel-s_ joined 05:09 daniel-s_ left, daniel-s_ joined 05:14 daniel-s_ left, daniel-s__ joined 05:18 daniel-s__ left, daniel-s__ joined 05:22 daniel-s__ left, _daniel-s__ joined 05:27 _daniel-s__ left, daniel-s joined 05:31 daniel-s left, daniel-s joined 05:32 birdwindupbird left 05:35 daniel-s left 05:36 daniel-s joined
moritz good morning 05:36
mberends hi moritz
espadrine Morning! 05:39
05:40 daniel-s_ joined, daniel-s left 05:44 daniel-s_ left, daniel-s__ joined
sorear good morning 05:48
and welcome, espadrine
mberends good evening sorear
oops, commute time soon! 05:49
sorear moritz: is %::("*::ENV") even legal/
05:49 _daniel-s__ joined, daniel-s__ left
moritz sorear: I have no idea 05:49
nom: say %::('*ENV')
p6eval nom: OUTPUT«Symbol '%::*ENV' not found␤current instr.: 'rethrow' pc 596698 (src/gen/CORE.setting.pir:163538) (src/gen/CORE.setting:4397)␤»
moritz hm
not sure it should do that 05:50
not sure what else it should do :-)
sorear moritz: '*::ENV', not '*ENV' 05:51
nom: say %::('*::ENV')
p6eval nom: OUTPUT«Symbol '%::*::ENV' not found␤current instr.: 'rethrow' pc 596698 (src/gen/CORE.setting.pir:163538) (src/gen/CORE.setting:4397)␤»
sorear is looking at adding ::() parsing to niecza, is annoyed at how ad-hoc and repetetive the name 05:52
handling is
05:53 _daniel-s__ left, daniel-s joined
moritz you need it at least once at run time, once at compile time 05:53
05:56 mberends left 05:57 molaf left
shinobicl i got a parrot out of memory error when using try - CATCH inside a method... 05:57
05:58 daniel-s_ joined
moritz are you rethrowing an exception from within the CATCH block? 05:58
05:58 daniel-s left
shinobicl just a "warn" and a "next" for going to the next record in the file i'm reading 05:59
mmm, maybe this "next" is the problem
moritz more likely the warn
shinobicl wel... i replaced warn with say and it works now :) 06:00
moritz rakudo: try { warn "foo" }; say "alive"
p6eval rakudo 922500: OUTPUT«alive␤»
moritz it treats the warning like an exception
shinobicl then i should set a flag inside the CATCH and call warn later 06:01
sorear use 'note'
06:02 daniel-s_ left
shinobicl what's is the difference from "warn", besides working inside a CATCH? 06:02
06:02 daniel-s_ joined
moritz it doesn't throw an exception, but writes strait to $*ERR 06:02
shinobicl ahh, nice :)
sorear shouldn't warn be throwing a control exception anyway 06:03
moritz I think so 06:04
rakudo's exception handling has traditionally been rather poor
06:06 daniel-s__ joined 06:07 daniel-s_ left
sorear symbolic-deref.t is so fossily, it thinks you can find &say in GLOBAL:: 06:07
moritz sorear: does it? 06:08
ah, &::("* 06:09
ah, &::("*say")
yes, those tests can go away
sorear there are a couple of different cases for name handling
and quite a few of them have odd behavior 06:10
like in roles, method ::(EXPR) needs to be compiled into a sub, but outside a role, it needs to be run at BEGIN
06:11 jferrero left, envi joined
sorear and $obj!Foo::Bar::baz() is actually a name reference to Foo::Bar 06:11
moritz std: method ::(1) () { }
p6eval std 516268a: OUTPUT«ok 00:01 120m␤»
moritz wtf
I didn't even know that was allowed
06:12 jferrero joined, rhr left
sorear niecza: role ABC[$x] { method ::($x) { $x } }; say (Any but OUR::ABC["pie"]).new.pie 06:12
dalek ast: bede20a | moritz++ | S02-names/symbolic-deref.t:
remove fossiled test, sorear++
p6eval niecza v8-4-g2c56dcb: OUTPUT«pie␤»
sorear it's actually useful 06:13
well, at least one use
when you do sub infix:<+##>(), a role has to be constructed to mix in an '&infix:sym<+##>' method 06:14
into STD::P6
06:15 mj41_nb joined
moritz well, that mechanism can use the MOP API directly 06:16
dalek ast: 07f400b | moritz++ | S32-trig/ (14 files):
[trig] do not generate tests for named parameters; regen test files
06:17
sorear walk& 06:20
06:24 rhr joined 06:34 soh_cah_toa left
moritz nom: say 4.so 06:34
p6eval nom: OUTPUT«Method 'so' not found for invocant of class 'Int'␤current instr.: '_block1002' pc 75 ((file unknown):84762275) (/tmp/sJAjAsWpa9:1)␤»
shinobicl hi again... 06:36
eiro moin
shinobicl this works right: ok ($T.arr.elems == 13, "Counting elements");
but this : is ($T.arr.elems,13, "Counting elements");
gives me this error: get_attr_str() not implemented in class 'Sub' 06:37
moritz shinobicl: you need to show enough code to reproduce it, otherwise I have no idea what's going on 06:38
dalek atures: da1ab63 | moritz++ | features.json:
add "basic multi dispatch", update two stati for nom
06:40
06:49 Mowah joined
shinobicl moritz: there is the code: pastebin.com/sm6k1XfH 06:51
moritz Unable to open filehandle from path 't/res/CLP.cal' 06:53
shinobicl thanks moritz... got to go now, i'll stick to 'ok' for now... 06:55
06:55 shinobicl left
sorear Should $b."A::m"() reparse? 06:56
06:57 masak joined
masak good morning, #perl6 06:57
moritz sorear: depends on what you mean with "reparse" 07:00
sorear: the grammar doesn't attempt to parse the "..." as a name, just as a string literal
07:04 Jackneill joined, Jackneill left, Jackneill joined
sorear moritz: I mean does it call a method with a literal :: in the name? 07:06
07:08 envi left 07:10 envi joined 07:14 mj41_nb left, mj41_nb joined
moritz sorear: I don't have any clue 07:14
dalek ast: 836cfff | moritz++ | S04-declarations/state.t:
start to fudge state.t for rakudo
07:15
07:15 birdwindupbird joined 07:17 cosimo left
masak karma hakank 07:26
aloha hakank has karma of 4.
sorear o/ masak 07:41
masak sorear: \o
will go offline now to focus on $dayjob. see you tonight.
07:41 masak left
moritz ~~ 07:41
sorear moritz: I'm going to say it does. A bit simpler that way 07:45
sorear hopes it won't be too much slower
simpler because it unifies the $a."$b"() and $a.::($b)() codepaths
moritz std: 1.foo::"bar"()
p6eval std 516268a: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/SKGKkmXvTL line 1:␤------> 1.foo::⏏"bar"()␤ expecting any of:␤ POST␤ bracketed infix␤ infix or meta-infix␤ method arguments␤ postfix␤ postfix_prefix_meta_operator␤
..statement modifier loop…
07:52 Su-Shee_ is now known as Su-Shee 07:59 wamba joined 08:09 Grrrr joined 08:24 am0c left
jnthn morning, #perl6 08:30
moritz good morning jnthn 08:31
jnthn: fwiw I fudge state.t to a state that it doesn't parse-error anymore. It shows some problems with the current state implementation
jnthn moritz: OK, thanks. 08:36
08:36 timbunce joined
dalek kudo/nom: 1f2a242 | moritz++ | src/core/ (2 files):
start to expand on atan2 implementation
08:37
kudo/nom: 926a0ba | moritz++ | src/core/Mu.pm:
Mu.so
kudo/nom: cbdfa61 | moritz++ | README:
[README] add pointer to status page
ast: dd56d7c | moritz++ | S03-operators/ternary.t:
fudge ternary.t for rakudo
08:41
08:42 ab5tract joined 08:43 birdwindupbird left
moritz nom: my %h; say %h.keys 08:46
p6eval nom: OUTPUT«get_iter() not implemented in class 'Mu'␤current instr.: '_block16452' pc 585216 (src/gen/CORE.setting.pir:158558) (src/gen/CORE.setting:3510)␤»
08:46 cosimo joined
moritz (having lots of tests)++ 08:48
08:49 Alias left 08:56 daxim joined
dalek ast: 2a1d564 | moritz++ | S02-builtin_data_types/hash.t:
correct and fudge hash.t
08:57
kudo/nom: 2176102 | moritz++ | / (2 files):
fix Hash.pairs etc. for empty hashes; run 4 more test files
09:00
09:03 f00li5h joined
moritz Files=306, Tests=8677, 506 wallclock secs 09:07
09:13 tzhs joined 09:14 mls joined
mls morning perl6 09:14
09:15 jerome joined
moritz good morning mls 09:15
mls I found the real reason for the 'bad argument count' problem
It's caused by parrot's inferior runloops interfering with exceptions 09:16
moritz do tell
ouch
mls things get bad if the exception crosses runloop boundaries 09:17
That's a known problem, as a workaround the parrot guys have added a "finalize" opcode
Basically if an exception occures, you have to make sure that either the exception is resumed or finalized 09:18
Currently, the generated pir code doesn't do that
moritz shouldn't GCing the exception finalize it? 09:19
mls I'm not sure where the best place for this is, I think PAST try nodes should do the finalize
moritz but the user might decide to rethrow inside the try block, no?
mls Nah, it's a different 'finalize'. The opcode was renamed from 'unroll', it unrolls the runloops by doing a longjmp 09:20
The problem with the PAST try node is that you need the exception PMC for calling finalize, but currently the try node doesn't fetch it 09:21
So for rakudo, I've just patched Action.pm 09:22
In method statement_prefix:sym<try>, I added finalize %r after the .get_results call 09:23
This assumes that Exceptions cought by try don't get resumed ;) 09:24
jnthn hi mls :)
mls Hey jnthn, how was the vacation? 09:25
jnthn mls: Nice, thanks. Bit more rainy (and even snowy) than woulda been ideal, but still a good time :) 09:27
dalek kudo/nom: c57bfad | jonathan++ | src/Perl6/Actions.pm:
A couple of state variable fixes.
jnthn moritz: state.t would appear to be heavily dependent on state assignments happening at START time. 09:29
mls jnthn: Is that Action.pm change above something in your area, or is pm the right guy to ask?
jnthn moritz: I'll try and get to that later on today.
09:30 woosley left
jnthn mls: The patch you've described sounds reasonable to me. pmichaud may well be interested in doing this at the PCT level too, but having it explicitly in Rakudo until then. 09:30
huh 09:31
s/then./then seems fine./
jnthn was not aware of the finalize op... 09:33
mls Patch: gist.github.com/1113521 09:34
I think the finalize/unroll is only described in some RT tickets ;) 09:36
s/is/opcode is/
jnthn Documented a bit in core.ops also. 09:38
jnthn just found it
moritz spectests
jnthn moritz: ah, you're on it? Thanks! :)
dalek ast: 68595f2 | jonathan++ | S12-class/inheritance.t:
Are these still conforming to S12, asketh the tests? Why no, no they're not!
09:43
kudo/nom: 9ec3312 | jonathan++ | t/spectest.data:
Run S12-class/inheritance.t.
09:45
09:45 stephanmg joined 09:46 stephanmg left
moritz somehow assign.rakudo stops working here 09:48
too many named arguments: 1 passed, 0 used
current instr.: 'nqp;Perl6;SymbolTable;build_container_past' pc 5914 (src/gen/perl6-symboltable.pir:1916) (src/Perl6/SymbolTable.pm:234
jnthn: did you spectest after c57bfad4901f42cfb97509caf46c57f794b84ad9? 09:51
jnthn moritz: oh, oops
dang, didn't mean to commit that, just the other half of hte patch. 09:52
moritz: undone it 09:54
(the bad part)
dalek kudo/nom: bb18757 | jonathan++ | src/Perl6/Actions.pm:
Undo something I didn't really want to commit.
09:55
jnthn Time to give $dayjob some attention. 10:00
moritz nom: say rx/foo/.WHAT
p6eval nom: OUTPUT«Regex()␤»
mls Hmm, I think CATCH needs a finalize fix as well. But this seems to require a PAST/Compiler.pir fix. 10:03
That's a bit over my head, I'll wait for pm... 10:04
moritz in fact each CATCH block turns the surrounding block into a try { } block 10:06
10:10 MayDaniel joined 10:13 ab5tract left
dalek kudo/nom: 2416f7a | moritz++ | src/core/ (2 files):
copy Str.subst over from master
10:35
kudo/nom: 84ca50d | moritz++ | / (2 files):
Merge branch 'nom' of github.com:rakudo/rakudo into nom
kudo/nom: a5aaddb | moritz++ | docs/compiler_overview.pod:
start to tell fewer outdated things in docs/compiler_overview.pod
kudo/nom: 98198e8 | moritz++ | src/Perl6/ (2 files):
try to get s/// working again.

Currently dies with Method 'clone' not found for invocant of class 'Sub'
jnthn moritz: That probably means you have a Parrot sub somewhere you need a Perl 6 code object. 10:37
10:37 cognominal_ joined 10:41 stephanepayrard_ left 11:03 jedai left, jedai_ joined
moritz jnthn: thanks, will look closer 11:19
jnthn moritz: for the first half, see how rx// is compiled - it'll be similar. For the second half, maybe make_thunk_ref is the right thing. 11:20
11:28 MayDaniel left 11:34 thou left 11:37 satyavvd left
moritz wow, new development: segfault! 11:38
11:38 pernatiy left
moritz anyway, need to do $other-stuff first 11:38
11:42 tokuhir__ joined 11:45 Patterner left, Psyche^ joined, Psyche^ is now known as Patterner 11:50 envi left 12:03 jimmy1980 joined, daniel-s__ left 12:06 JimmyZ joined 12:27 pernatiy joined
takadonet morning all 12:30
12:31 envi joined, woosley joined 12:49 pmurias joined 13:11 [Coke] left 13:12 ggoebel left 13:28 molaf joined 13:30 kjeldahlw left 13:33 ggoebel joined 13:34 coke joined, coke is now known as control-alt-coke 13:37 bluescreen10 joined 13:38 mauror joined 13:39 mauror left 13:40 mauror joined 13:41 mauror left 13:42 kjeldahlw joined 13:53 drbean left 14:12 shinobicl joined 14:14 kjeldahlw left
tadzik good day #perl6 14:16
jnthn hi, tadzik 14:17
tadzik do we have a RoleHOW or something? 14:18
a place I can stick 'does Perl6::Metamodel::Documenting'? :)
ConcreteRoleHOW? 14:19
jnthn tadzik: Probably wants to live on ParametricRoleHOW. 14:20
tadzik: And ConcreteRoleHOW also, and specialize would copy it.
tadzik what's a ConcreteRole?
jnthn A role instantiated with some parameters 14:21
role Foo { } # this creates a ParametricRoleHOW
tadzik where some ~~ >=0?
ok
jnthn class C does Foo { } # creates a ConcreteRoleHOW
It's the concrete one that's actually composed
14:22 wamba left
jnthn During specialization, anything generic that's covered by the type environment gets instantiated. 14:22
shinobicl rakudo: subset DayOfWeek of Str where <Mon Tue Wed Thu Fri Sat Sun>; my DayOfWeek @dow_array = <Mon Tue Wed Thu>; @dow_array.perl.say; 14:25
p6eval rakudo 922500: OUTPUT«["Mon", "Tue", "Wed", "Thu"]␤»
shinobicl rakudo: subset DayOfWeek of Str where <Mon Tue Wed Thu Fri Sat Sun>; my DayOfWeek @dow_array = <Mon Tue Wed ASDF>; @dow_array.perl.say;
p6eval rakudo 922500: OUTPUT«["Mon", "Tue", "Wed", "ASDF"]␤»
jnthn shinobicl: Rakudo doesn't really do typed arrays. 14:26
shinobicl: I think you'd want where any <Mon Tue Wed...> too
shinobicl ok, i see... but if i try to use enums, like this:
tadzik Method 'can' not found for invocant of class 'Perl6::Metamodel::PackageHOW' -- any workarounds? 14:27
shinobicl rakudo: enum DayOfWeek <Mon Tue Wed Thu Fri Sat Sun>; my DayOfWeek $d = 'Mon';
p6eval rakudo 922500: OUTPUT«Type check failed for assignment␤ Container type: ␤ Got: Str␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/ESYEtFVO4c␤»
tadzik pir::can or something?
14:27 mj41_nb left, uniejo left
shinobicl or maybe (more probably) i just don't understand how enums work in perl6 14:27
14:28 jaldhar left
jnthn tadzik: pir::can will work, yeah 14:28
shinobicl: Don't need the quotes
rakudo: enum DayOfWeek <Mon Tue Wed Thu Fri Sat Sun>; my DayOfWeek $d = Mon; 14:29
p6eval rakudo 922500: ( no output )
jnthn rakudo: enum DayOfWeek <Mon Tue Wed Thu Fri Sat Sun>; my DayOfWeek $d = 69;
p6eval rakudo 922500: OUTPUT«Type check failed for assignment␤ Container type: ␤ Got: Int␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/DwmD92gL_u␤»
14:29 uniejo joined
shinobicl i thought < > was an array of strings 14:29
jnthn shinobicl: Yeah, but enum is doing something cleverer.
shinobicl: It actually introduces a bunch of objects.
shinobicl rakudo: enum DayOfWeek <'Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat' 'Sun'>; my DayOfWeek $d = 'Mon';
p6eval rakudo 922500: OUTPUT«Type check failed for assignment␤ Container type: ␤ Got: Str␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/bNinza_Mfx␤» 14:30
jnthn nom: enum DayOfWeek <Mon Tue Wed Thu Fri Sat Sun>; say Mon.key; say Mon.value
p6eval nom: OUTPUT«Mon␤0␤»
shinobicl ahhh.... somewhat like an """"ordered hash"""" 14:31
internally, i mean
jnthn kinda
You can specify the values
But by defualt it's numbered 0 up.
14:35 wamba joined, sftp joined
shinobicl i was trying to do something like this: enum DayOfWeek <Mon Thu Wed Thu Fri Sat Sun>; my DayOfWeek @weekdays; $data="Mon,Tue,Wed,ThXXX"; try { @weekdays = split /','/, $data; CATCH { note "ERROR: Weekday specification not valid. Assuming Mon,Tue,Wed,Thu,Fri : $!"; @weekdays = <Mon Thu Wed Thu Fri>; } } 14:35
14:37 mkramer left
shinobicl i guess i can always use a normal string array and ask if any value in @weekdays is not found in a @DayOfWeek array, and then throw an exception 14:37
jnthn yeah
unless all(@weekdays) eq any(@DayOfWeek) { ... }
control-alt-coke remembers it's not worth arguing with dukeleto. 14:40
pmichaud good morning, #perl6
control-alt-coke pmichaud: o/ 14:41
tadzik good morning pmichaud 14:42
jnthn hi pmichaud
14:43 ab5tract joined
tadzik nom: class A { method foo() { self.?a } }; A.foo.WHAT 14:43
p6eval nom: ( no output ) 14:44
tadzik nom: class A { method foo() { self.?a } }; A.foo.WHAT.say
p6eval nom: OUTPUT«Nil␤»
JimmyZ nom: class A { has $^a = 32; }; 14:47
p6eval nom: ( no output )
jnthn JimmyZ: I...can't begin to guess what that's done... 14:48
nom: class A { has $^a = 32; }; say A.^attributes.[0].name
p6eval nom: OUTPUT«$!a␤»
jnthn Hm. :)
JimmyZ nom: class A { has $a = 32; }; say A.^attributes.[0].name 14:49
p6eval nom: OUTPUT«$!a␤»
jnthn That one is fine :)
It means you can use $a as well as $!a in the class body.
$^a OTOH is a bit more dubious 14:50
I suspect it just ignores the twigil there.
jnthn gets curious
JimmyZ nom: class A { has $a = 32; method b() { say $a; my $a; say $a; } }; A.new.b;
p6eval nom: OUTPUT«32␤Any()␤»
jnthn nom: role Foo { $^a }
p6eval nom: ( no output ) 14:51
jnthn nom: role Foo { $^a }; class C does Foo { }
p6eval nom: ( no output )
jnthn nom: role Foo { $^a }; class C does Foo[1] { }
p6eval nom: OUTPUT«Could not instantiate role 'Foo':␤Too many positional parameters passed; got 2 but expected 1␤current instr.: 'nqp;Perl6;Metamodel;ParametricRoleHOW;specialize' pc 41624 (src/gen/perl6-metamodel.pir:12545) (src/gen/Metamodel.pm:1161)␤»
JimmyZ doesn't like has $a and has $^a
jnthn JimmyZ: has $^a should likely be disallowed
has $a is kinda nice.
I suspect what you did above should be a redeclaration error though 14:52
tadzik an attribute without an accessor?
(has $a)
jnthn tadzik: Correct 14:56
it's like has $!a; but it also makes $a an alias to $!a
JimmyZ nom: class A { has $=a = 32; }; say A.^attributes.[0].name
p6eval nom: OUTPUT«$!␤»
tadzik a class' action method isn't called just when the last } appears?
jnthn tadzik: package_def should be called after the final } 14:57
tadzik I think I has a bug then, let me paste that
JimmyZ nom: class A { has $=b; }; say A.^attributes.[0].name # bug?
p6eval nom: OUTPUT«$!␤»
tadzik gist.github.com/1113985 -- a bug 14:59
JimmyZ nom: sub a { say 'hi'; } ; class A { has $=a; method b() { say $!; }}; say A.^attributes.[0].name; say A.new.b; #bug again ?
p6eval nom: OUTPUT«$!␤hi␤Any()␤Bool::True␤»
tadzik not to mention a #= token is called twice for some reason
'Setting docs' is in method package_def($/) 15:00
JimmyZ nom: sub a { say 'hi'; } ; class A { has $=a; method b() { $!; }}; A.new.b
p6eval nom: OUTPUT«hi␤»
tadzik the 'DECLARATOR' is in the grammar itself
jnthn tadzik: Is package_def a rule?
yeah, it is 15:01
And I guess POD is parsed as whitespace.
tadzik it is
jnthn So no bug as such.
JimmyZ wonders whether it is a bug
jnthn JimmyZ: er, that's evil :P
JimmyZ: And almost certainly a bug.
tadzik so what's the behaviour? "#= shouldn't" becomes eaten by the last } I suppose
jnthn JimmyZ: I suspect we should just outright ban a bunch of twigils
JimmyZ created that evil 15:02
tadzik that's why I wanted it to be glued to the class token, just before the <sym>
jnthn tadzik: In the regex package_def, I suspect <blockoid> gets as far as }
JimmyZ nom: sub a { say 'hi'; } ; class A { has $-a; method b() { $!; }}; A.new.b
p6eval nom: OUTPUT«hi␤»
JimmyZ haha
tadzik oh, I think I know how I can solve this 15:03
jnthn tadzik: But we're in a rule, and there's whitespace after <blockoid>
tadzik: So it calls <.ws> which I guess noms ya POD.
tadzik so the grammar token for declarator sets $*DECLARATOR, then the grammar rule in package_def saves $*DECLARATOR somewhere
so it won't get overwritten
jnthn JimmyZ: In that one it's parsing has $ - a 15:04
JimmyZ: as in, a substraction of a from an anonymous attribute :P
tadzik but now that becomes a binding problem. Is there a clone in nqp I can make use of?
jnthn tadzik: wait, I'm confused...where did declarator come from? 15:05
tadzik jnthn: which one?
jnthn "so the grammar token for declarator sets $*DECLARATOR"
JimmyZ jnthn: yes, you're right, that explains the evil 15:06
jnthn I'm curious if you really mean the token declarator, and if you really meant $*DECLARAND
tadzik jnthn: gist.github.com/1113985#gistcomment-42852
15:06 risou_awy is now known as risou, tzhs left
JimmyZ is not a well-behaved coder 15:07
jnthn oh, $*DECLARATOR is something in introduced?
s/in/you/
tadzik yes
that's quite broken because now every #= block resets the last one. I can either save it in some other variable after every keyword appearing (e.g. after <sym> in class declaration), or add this rule at the beginning of every declaration 15:11
jnthn #= foo is the one that documents the last declarator, and #| foo is the one that documents the next declarator, IIRC? 15:12
So for #= foo stash the documentation awya in a $*NEXTDECLARATORDOC or something, and then grab it into another contextual in package_def grammar rule that package_def action will use 15:13
For the other case maybe have a $*DOCUMENTABLEDECLARATOR that the #= finds and knows what to attach the docs to. 15:14
tadzik #| is not specced yet
#= was supposed to go, well, everywhere 15:15
I wanted to start with implementing the 'document the next declarator case', as it's the most obvious one
15:17 ab5tract left
tadzik moritz? 15:18
jnthn tadzik: Then in that case make it just set a $*PODFORNEXTDECLARAND or some such 15:19
tadzik: And grab/clear it as needed in things that can be documented. 15:20
So in package_def grammar rule
15:20 dolmen1 joined
jnthn :my $*DOC := $*PODFORNEXTDECLARAND; 15:20
$*PODFORNEXTDECLARAND := '';
Or some such
Then in action method check if you have $*DOC and attach it if so.
dolmen1 perl6: say 1, 2
tadzik but that's binding. Would that work?
p6eval pugs, rakudo 922500, niecza v8-4-g2c56dcb: OUTPUT«12␤»
jnthn tadzik: Why not? 15:21
tadzik: Remember you're binding values. There's no containers around.
tadzik oh, true
ok, that sounds good. jnthn++, thank you
dolmen1 perl6: my ($a, $b) = (3, 2); my @res = (($a / $b), ($a % $b)); say @res 15:22
p6eval pugs, rakudo 922500: OUTPUT«1.51␤»
..niecza v8-4-g2c56dcb: OUTPUT«3/21␤»
15:23 shinobicl left
mls pmichaud: did you see my analysis of the runloop/exception problem earlier this day? 15:24
tadzik though I still don't know why the token is executed twice
jnthn tadzik: Is there some regex around somewhere? 15:25
pmichaud mls: I saw it briefly. I think that calling finalize immediately after .get_results may be too soon.
doing that means there's no way to handle the exception and throw control back to the code that generated it
15:26 domidumont1 left
mls yes, true. But is that needed in the 'try' case? 15:26
pmichaud I think that finalize needs to be called at the very end of the CATCH block, not at the point where the exception is caught
tadzik jnthn: around where? that comment is a token
jnthn tadzik: Hard to say. "anywhere" :) 15:27
tadzik: I mostly meant that I can only imagine it getting called twice if something is backtracking somewhere.
mls It might get a bit tricky when the code in the CATCH block also throws an exception
tadzik WOO, THIS IS AWESOME 15:28
pmichaud I don't see that.
mls Maybe not, as lokng as the one exception handler calls finalize.
long
pmichaud (I don't see the trickiness)
tadzik gists 15:29
pmichaud yeah, finalize ultimately gets called by whatever exception handler chooses not to resume after the exception
mls cause the handler in the second exception doesn't know it has to finalize the firsst exception. But that may not be an issue.
15:29 wamba left
pmichaud it doesn't have to finalize the first exception 15:29
tadzik gist.github.com/1114044 :)
mls first. Can't type today...
pmichaud iiuc, "finalize" means that we're pruning all of the runloops below a given exception. That would include the first exception. 15:30
jnthn tadzik: yay! :D
tadzik++
tadzik it breaks for 'package' and 'module', will investigate
but first, tests
mls yes. One longjmp will do the trick. So yes, end of CATCH would work.
tadzik jnthn++ :)
jnthn tadzik: Be really careful about calling .can on meta-objects.
tadzik: You tend to mean .HOW.can(...)
There's a user-space/meta-space assymetry there. 15:31
tadzik okay
if pir::can($*PACKAGE.HOW, 'set-docs') { is my line
jnthn That seems reasonable.
tadzik but I think that can get fired now
jnthn Though I've tended to use _ instead of - in the meta-objects. 15:32
tadzik if I left something without set-docs, that's a bug :)
I'll use that, ok
pmichaud mls: The finalize doesn't have to be part of the actual CATCH block -- it can (should?) be at the end of the PIR code that handles the exception and passes it to CATCH
jnthn Yeah, maybe you didn't do the appropriate does in PackageHOW/ModuleHOW
tadzik I certainly did 15:33
pmichaud i.e., if we get back from CATCH (control hasn't been transferred elsewhere), then we go ahead and finalize on the current exception as we're about to leave the try block.
15:33 mberends joined
jnthn tadzik: Hmm, OK. Can't be that then 15:34
tadzik: oh, what does .WHY desugar to in this case? 15:35
tadzik jnthn: .HOW.docs
15:35 Trashlord joined
tadzik self.HOW, that is 15:35
it's in Mu.pm
jnthn oh
that explains a lot :)
Packages don't know how to have methods 15:36
tadzik oh, true
jnthn So SomePackage.foo is gonna blow
I'm not sure if we'll have to make them "pretend" to have methods.
"You don't support methods, but if somebody tries to call one on you, pretend you have the methods that Any does"
tadzik aha! 15:37
so I want that in Any.pm
jnthn no no
Just saying that if packages want to pretend to be a type, they probably want to pretend to be Any, not Mu 15:38
tadzik mhm
jnthn looks
pmichaud ...why aren't packages a type?
jnthn pmichaud: They are
pmichaud: Their meta-objects just don't know how to do method dispatch.
pmichaud I mean, why aren't packages a Perl 6 type? 15:39
mls hmm is right before the ".return exception" the right place? I.e. after exception["handled"] is set to 1
jnthn pmichaud: I'm not sure what you mean by "a Perl 6 type".
pmichaud something that ~~ Mu
jnthn pmichaud: That's kinda what I'm saying. They probably should act that way. 15:40
mls that would be in as_post PAST::Control node
pmichaud jnthn: I'm saying they probably should *be* that way. 15:41
at least to the same level as where things like Signature and Attribute have Mu as a parent
15:41 woosley left
pmichaud mls: I'm not sure I want to force finalize into PAST::Control, at least not yet. 15:41
mls: I'm thinking there might be languages where finalizing at that point might not be appropriate. 15:42
jnthn pmichaud: I'm kinda making a distinction that from the outside is meaningless.
pmichaud jnthn: okay.
15:42 wamba joined
jnthn pmichaud: Classes really do do inheritance, parentage and so on. Packages and modules don't, but we want them to expose the same kind of feel to a limited extent. 15:43
15:43 Holy_Cow joined
pmichaud mls: I think the finalize can go into Perl6::Actions 15:43
mls ok, fine with me ;)
pmichaud jnthn: okay, I think I'm not following. But I don't think I need to follow, either. (more) 15:44
it just seems to me that SomePackage::.WHAT ~~ Mu ought to be true at some level
jnthn pmichaud: Oh, I'm totally agreeing to make that so. :) 15:45
pmichaud wfm, then. :)
jnthn pmichaud: Partly this is me still groping around for the terminology to use for certain constructs in meta-space. :) 15:46
pmichaud jnthn: I hear and understand that. I run into that problem a lot in qregex, too. :)
tadzik so, how should package Foo; Foo.WHY behave? 15:47
jnthn tadzik: Same as class Foo; Foo.WHY 15:48
tadzik: I suspect you've not done anything wrong, you just an into a spot of NYI
tadzik: I'm looking at it now. 15:49
tadzik I'd stay with .HOW.docs for now then
jnthn yes, do so
tadzik: well
I suspect it should be .^docs
pmichaud I'm afk for a bit... changing locations. 15:50
jnthn tadzik: And your docs method takes a $obj first arg
tadzik docs() takes no args, but I see the point
jnthn tadzik: Which you'd ignore, but then it makes it consistent with everything else and open to a prototype-y implementation.
tadzik ^docs fails with No method cache and no find_method method in meta-object 15:51
jnthn tadzik: For class? 15:53
tadzik: Or just package?
tadzik for package
jnthn tadzik: right
tadzik: Oh, sorry, I was confusing
tadzik: I was suggesting you change it to that
tadzik: Just out of thinking it should look that way
tadzik: Not as a fix for the (separate) bustage for package.
tadzik jnthn: it should be .WHY anyway, not .^docs or .HOW.docs 15:55
dukeleto control-alt-coke: who is arguing? 15:57
TimToady * *, gentle *
jnthn tadzik: I've suspect .WHY is macro-ish and desugars to .^docs for types, and maybe just .docs for other things. 15:58
s/I've/I/ 15:59
*, TimToady :)
15:59 risou is now known as risou_awy
dalek Heuristic branch merge: pushed 138 commits to rakudo/podparser by tadzik 16:00
tadzik yeah, that .WHY took some time to do :P
TimToady I read that as "Neuristic"
that oughta be a word 16:01
tadzik "Fantastic" rather :)
16:01 Holy_Cow left 16:03 risou_awy is now known as risou
jnthn nom: module Foo { }; pir::say(nqp::istype(Foo, Mu)) 16:08
p6eval nom: OUTPUT«No type check cache and no type_check method in meta-object␤current instr.: '_block1002' pc 93 ((file unknown):31854234) (/tmp/bXH1d6PZFe:1)␤»
jnthn OK, that half's fixed. :)
control-alt-coke dukeleto: not me, that's for sure! ;) 16:09
TimToady moritz: I'm wondering what the difference between is between "basic multi dispatch" and "multi sub dispatch" 16:10
we should probably put some annotations on the keys to say what set of features are included/excluded from the category 16:11
16:17 tokuhir__ left, avar left, avar joined, wamba left, tokuhirom joined
dalek kudo/nom: df778cc | jonathan++ | src/Perl6/Metamodel/TypePretence.pm:
Add a type_check method to TypePretence; ParametricRoleHOW wants to play smarter, but it'll suffice for normal pretenders.
16:19
kudo/nom: 9f3d032 | jonathan++ | / (4 files):
PackageHOW and ModuleHOW do TypePretence, so now they act as if they're subtypes of Any (and thus Mu) for purposes of type checking.
kudo/nom: 08945fc | jonathan++ | / (5 files):
Make module and package type objects have the same methods as Mu and Any, so you can do 'say SomePackage' or pass package type objects around; sould also make SomePackage.WHY work for tadzik++ who reported the issue.
tadzik yay 16:21
16:21 dolmen1 left 16:22 tokuhirom left
dalek atures: 1659429 | larry++ | features.json:
put object hashes on the radar
16:29
kudo/podparser: ab7dc6b | tadzik++ | / (43 files):
Merge branch 'nom' into podparser
16:35
kudo/podparser: df778cc | jonathan++ | src/Perl6/Metamodel/TypePretence.pm:
Add a type_check method to TypePretence; ParametricRoleHOW wants to play smarter, but it'll suffice for normal pretenders.
kudo/podparser: 9f3d032 | jonathan++ | / (4 files):
PackageHOW and ModuleHOW do TypePretence, so now they act as if they're subtypes of Any (and thus Mu) for purposes of type checking.
kudo/podparser: 08945fc | jonathan++ | / (5 files):
Make module and package type objects have the same methods as Mu and Any, so you can do 'say SomePackage' or pass package type objects around; sould also make SomePackage.WHY work for tadzik++ who reported the issue.
kudo/podparser: 3a7c5f6 | tadzik++ | / (6 files):
Merge branch 'nom' into podparser
kudo/podparser: 6947907 | tadzik++ | t/pod/why.t:
Use .WHY on packages and modules properly, jnthn++
16:36 MayDaniel joined
mls argh, disabling code with #if 0 doesn't work well in perl6... 16:39
TimToady =begin 0 might work :)
espadrine` Does anyone have documentation about Perl6 hygienic macros? A standard document, something like that?
I would like to study them. 16:40
16:41 JimmyZ left
TimToady S06:2996 has some 16:42
16:47 pmurias left 16:52 MayDaniel left 16:57 Vlavv_ left, wamba joined
mls are CATCH blocks broken in nom? 17:02
jnthn mls: Believe so, yes
17:02 shinobicl joined
mls I just completely rebuilt nom because I thought my changes made try.t consume all memory, but it also happens in unpatched nom 17:03
pmichaud back from lunch 17:04
17:04 soh_cah_toa joined
jnthn pmichaud: Heading out for a bit soonish...anything before I go? 17:05
pmichaud jnthn: no, I have lots of little things to work on for a while 17:06
jnthn pmichaud: OK. I'll be around again later. :)
pmichaud sounds good
jnthn
.oO( speakers SO loud... )
pmichaud things around the house have become a little hectic, so I don't know what my schedule will be yet.
17:07 masak joined
masak oh hai, #perl6 17:07
and good evening.
pmichaud TimToady: how did the soto go?
jnthn o/ masak
pmichaud oh hai, masak++
masak TimToady: I've already read nice tweets about the soto. congrats :)
I'd like to thank anyone who has in any way contributed with Q&A of the Crypt Adventure Game. 17:08
thank y'all.
I'd like to institute a mini-challenge, just to make the code shine a bit extra:
jnthn Write it as a one-liner.
masak I'm interested in (1) people who get unexpected/crazy result by playing the game without looking the code, (2) ditto, after looking at the code. 17:09
(3) people who have comments on the integrity of the code per se. improvements, repetitions, LTAs, etc.
17:10 soh_cah_toa left, Vlavv_ joined
jnthn Hmm. S12 says that .can returns something iteratory-ish. 17:10
masak the mini-challenge goes on for the next 24 hours. best submission gets bought a beer (or equiv)
jnthn But nothing to the extent that the thing it returns should be invokable and magically call the first candidate.
I made it that way in master, but it's a pain so...I follow the spec this time. ;-) Of course, it's empty list vs non-empty for boolification, so it works just fine there. 17:11
s/candidate/result/
tadzik masak: o/
masak jnthn: I thought the thing should dispatch somehow, not just to first result. maybe I remember wrongly.
tadzik: yo zebra. 17:12
jnthn masak: I can't find anything in the spec about that.
masak: Plus it's...horrible.
masak jnthn: fairy nuff. :)
tadzik masak: see gist.github.com/1114044 :)
masak sees it
tadzik: whoa, that's ossum!
tadzik: kudojn! 17:13
phenny: en to gr: "kudos"
tadzik now I'm wondering about sub and method, they don't have their metaclasses
masak phenny: en to gr: "kudos"?
tadzik phenny: en to gr: "kudos"?
masak phenny: en-> gr: "kudos"?
tadzik phenny: en gr: "kudos"? 17:14
phenny: en gr "kudos"?
phenny tadzik: The en to gr translation failed, sorry!
jnthn nom: say ?()
p6eval nom: OUTPUT«Bool::True␤»
jnthn pmichaud: ^ Correct?
masak phenny: chicken! :P
jnthn tadzik: No, but they do have classes
tadzik: Add a $!docs to Code maybe.
tadzik: er
masak jnthn: I thought it was False but defined...
jnthn tadzik: Add a $!docs to Routine maybe :)
masak: Same.
masak nom: say defined (); say defined Nil 17:15
p6eval nom: OUTPUT«Bool::True␤Bool::False␤»
dalek ar: 6184ff8 | pmichaud++ | skel/docs/announce/2011.07:
Mention perl6.org/compilers/features in release announcement.
masak jnthn: no, no way () is True. change without permission.
jnthn OK, well, I pushed .can, but it's busted until () is False, or we decide to do this some other way 17:16
jnthn suspects bug, or just NYI .Bool in Parcel or some such.
mls Ah, CATCH doesn't work because of: Null PMC access in find_method 'new' 17:17
dalek kudo/nom: 66b3d21 | jonathan++ | src/Perl6/Actions.pm:
Should be able to mention self in attr init.
kudo/nom: 0455eb5 | jonathan++ | src/ (2 files):
Implement can. Unfortunately, ?() turns out to be True...if it's meant to be, will have to do this differently somehow.
shinobicl rakudo: my DateTime $D = now; say $D.perl;
p6eval rakudo 922500: OUTPUT«Type check failed for assignment␤ Container type: DateTime␤ Got: Instant␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/jerTTZY8Va␤»
shinobicl rakudo: my Instant $D = now; say $D.perl; 17:18
p6eval rakudo 922500: OUTPUT«(DateTime.new(year => 1970).Instant + 1311959919.80277)␤»
masak rakudo: say nom.WHAT
p6eval rakudo 922500: OUTPUT«Could not find sub &nom␤ in main program body at line 22:/tmp/buA4hSeR8L␤»
masak rakudo: say now.WHAT
p6eval rakudo 922500: OUTPUT«Instant()␤»
17:18 pernatiy left
shinobicl how can i get the day of the week for a DateTime or Instant? 17:18
DateTime.^methods>>.name.perl 17:19
rakudo: say DateTime.^methods>>.name.perl
p6eval rakudo 922500: OUTPUT«("new", "check-time", "now", "clone", "clone-without-validating", "Instant", "posix", "offset", "truncated-to", "whole-second", "in-timezone", "utc", "local", "Date", "Str", "perl", "is-leap-year", "days-in-month", "daycount-from-ymd", "ymd-from-daycount", "get-day…
shinobicl rakudo: say Instant.^methods>>.name.perl 17:20
p6eval rakudo 922500: OUTPUT«("new", "from-posix", "to-posix", "Str", "perl", "ACCEPTS", "Bridge", "Real", "Bool", "Int", "Rat", "Num", "Complex", "reals", "isNaN", "abs", "exp", "ln", "sqrt", "roots", "sign", "floor", "ceiling", "truncate", "round", "cis", "unpolar", "rand", "sin", "asin", "c…
dalek ar: abd0c1d | pmichaud++ | skel/Configure.pl:
Remove forced --gc=gms from Configure.pl .
ar: 1e6a045 | pmichaud++ | skel/build/gen_parrot.pl:
Bump parrot version to 3.6.0.
ar: 643e5e8 | pmichaud++ | skel/README:
Update release numbers in README.
ar: 3562628 | pmichaud++ | skel/docs/announce/2011.07:
Wordsmith change to 2011.07 announcement.
jnthn Dinner and beer time! \o/ 17:21
masak \o/
flussence rakudo: say DateTime.now.day-of-week
p6eval rakudo 922500: OUTPUT«5␤»
17:21 soh_cah_toa joined
masak flussence++ # faster :) 17:22
shinobicl: reason you won't see "Friday" there: it assumes English, which is an increasingly hasty assumption in today's software. 17:23
flussence rakudo: say (<Mon Tues Wednes Thurs Fri Sat Sun> X~ 'day')[DateTime.now.day-of-week - 1] 17:24
p6eval rakudo 922500: OUTPUT«Friday␤»
shinobicl rakudo: my $D = DateTime.new(year=>2011,month=>7,day=3); say $D.day-of-week;
p6eval rakudo 922500: OUTPUT«Could not find sub &day␤ in main program body at line 22:/tmp/LGFyRolgvA␤»
flussence maybe it wants day-of-month there?
oh 17:25
rakudo: my $D = DateTime.new(year=>2011,month=>7,day=>3); say $D.day-of-week; # missing ">"
p6eval rakudo 922500: OUTPUT«7␤»
shinobicl i expected a Sunday (0 or 7, i don't know)
hehe oops
thanks :)
mls get_hll_global $P1028, "Exception" seems to return a Null PMC 17:26
pmichaud correct -- we don't store things in Parrot's namespaces any longer 17:27
(except in certain rare cases) 17:28
tadzik jnthn: do I need to set Routine.$!docs in SymbolTable? Seems not to good, but the thing returned by create_code_object seems pretty opaque
mls So it should be scope lexical_6model instead of namespace [] ? 17:29
17:29 wamba left
pmichaud mls: that sounds reasonable (I could be very wrong because I'm not looking at that code atm) 17:29
mls rebuilding...
hmm, segfault in Rakudo_cont_decontainerize 17:32
shinobicl what is the "standard" word separator for perl6? '-' or '_' ? 17:34
flussence hyphen seems preferred for high level stuff 17:35
shinobicl mm ok.. thanks! 17:36
mls oh, class Exception has no new method anymore... 17:37
pmichaud mls: I think we're currently doing it via calls to &EXCEPTION
17:38 Kivutarrr joined
mls yes. and the code in push_block_handler hasn't been adapted yet 17:38
17:38 daxim left
pmichaud very possible/likely 17:39
17:40 jferrero left, donri left 17:41 jferrero joined 17:43 TROLOLOL joined 17:45 TROLOLOL left 17:51 Jackneill left 17:55 impious joined
dalek ast: f85b8bf | kboga++ | / (32 files):
Fix a bunch of typeobject stringifications.
17:56
ast: e9ea8ed | kboga++ | S (2 files):
2 todo tests now pass.
17:58 pernatiy joined
mls ok, enough hacking for today. The current patch is: gist.github.com/1114368 18:07
for some reason, test 18 in try.t still segfaults
the line where it appends $/ to $str seems to be the culprit 18:09
dalek kudo/nom: 95168b5 | pmichaud++ | src/core/control.pm:
Fix multi-argument control functions (return, take, etc.).
18:10
18:10 Mowah left 18:14 mls left 18:15 ZaphrodZenovka joined
shinobicl rakudo: use Test; my Bool $flag = True; ok ($flag, "Checking flag"); 18:26
p6eval rakudo 922500: OUTPUT«ok 1 - ␤»
shinobicl rakudo: use Test; my Bool $flag = False; ok ($flag, "Checking flag");
p6eval rakudo 922500: OUTPUT«ok 1 - ␤»
18:28 espadrine` left
flussence you've got a space between ok and ( that shouldn't be there 18:29
18:30 wamba joined, wolfman2000 left 18:31 wolfman2000 joined, shinobicl_ joined
shinobicl_ ohh... the space :S 18:32
18:32 leprevost joined 18:34 shinobicl left 18:35 thou joined 18:40 ash__ joined 18:49 [Coke] joined 18:51 birdwindupbird joined 18:53 Chillance joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2011/07/29/toy...-in-perl6/ 18:57
18:57 ab5tract joined 19:04 [Coke] left 19:06 [Coke] joined 19:07 shinobicl_ left 19:17 thou left 19:42 kaare_ left 19:44 Chillance left 19:45 Chillance joined 19:58 wamba left 20:02 wamba joined 20:03 thundergnat joined
thundergnat Hi #perl6. 20:05
Is raw sub-second time available in rakudo? 20:06
It is returned in now(), but the formatting that now does ads significant overhead. 20:07
rakudo: say now;
p6eval rakudo 922500: OUTPUT«Instant:2011-07-29T20:07:26.493582Z␤»
ash__ what formatting?
rakudo: say now, now;
p6eval rakudo 922500: OUTPUT«Instant:2011-07-29T20:07:36.855422ZInstant:2011-07-29T20:07:37.144365Z␤»
ash__ rakudo: my $a = now; my $b = now; say $b - $a;
p6eval rakudo 922500: OUTPUT«0.325825825825826␤» 20:08
flussence rakudo: say +now
p6eval rakudo 922500: OUTPUT«Instant:2011-07-29T20:08:39.374658Z␤»
flussence grr
ash__ ouch, thats a bit slower than I expected, but now gives sub second timing
tadzik star: use Benchmark; say timethis({my $a = 1; my $b = 1}) 20:09
p6eval star 2011.04: OUTPUT«===SORRY!===␤Unable to find module 'Benchmark' in the @*INC directories.␤(@*INC contains:␤ /home/p6eval/.perl6/lib␤ /home/p6eval/rakudo-star-2011.04/install/lib/parrot/3.3.0/languages/perl6/lib␤ .)␤»
thundergnat rakudo: my $begin = pir::time__n; $end = pir::time__n; say $end - $begin; #significantly less overhead... but I'm accessing parrot directly
tadzik :(
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Symbol '$end' not predeclared in <anonymous> (/tmp/ePGpqAzIPW:22)␤»
thundergnat rakudo: my $begin = pir::time__n; my $end = pir::time__n; say $end - $begin;
p6eval rakudo 922500: OUTPUT«4.79221343994141e-05␤»
thundergnat class Timer { has $.begin is rw; has $.end is rw; method start { $.begin = pir::time__n; }; method elapsed { $.end = pir::time__n; return $.end - $.begin; } }; my $timer = Timer.new; $timer.start; my $i; $i++ for 1 .. 20000; say ($timer.elapsed).fmt("%.3f"), ' seconds elapsed.'; # Cheap timer class 20:11
rakudo: class Timer { has $.begin is rw; has $.end is rw; method start { $.begin = pir::time__n; }; method elapsed { $.end = pir::time__n; return $.end - $.begin; } }; my $timer = Timer.new; $timer.start; my $i; $i++ for 1 .. 20000; say ($timer.elapsed).fmt("%.3f"), ' seconds elapsed.'; # Cheap timer class
p6eval rakudo 922500: OUTPUT«(timeout)»
thundergnat rakudo: class Timer { has $.begin is rw; has $.end is rw; method start { $.begin = pir::time__n; }; method elapsed { $.end = pir::time__n; return $.end - $.begin; } }; my $timer = Timer.new; $timer.start; my $i; $i++ for 1 .. 5000; say ($timer.elapsed).fmt("%.3f"), ' seconds elapsed.'; 20:12
p6eval rakudo 922500: OUTPUT«3.114 seconds elapsed.␤»
20:17 bluescreen10 left, mj41 joined
tadzik coderwall.com/tadzik -- something funny 20:22
I wonder what makes me appear there, and not most of the Rakudo contributors
20:24 y3llow_ joined, pothos_ joined 20:26 pothos left, pothos_ is now known as pothos, y3llow left 20:27 y3llow_ is now known as y3llow 20:42 Reaganomicon joined 20:58 thou joined 21:06 birdwindupbird left 21:14 uvtc joined
uvtc Can anyone point me to a summary of the 2011 State of the Onion? 21:15
21:15 shinobicl joined
sorear good * #perl6 21:15
uvtc Found this www.gardenofblog.com/2011/reports-f...scon-2011/ . It mentioned how the SOTO was 21:16
weaved in with some shorter talks. 21:17
shinobicl how should i compare a parcel with an array? 21:21
21:23 uvtc left 21:25 shinobicl left 21:29 mj41 left, thou left 21:30 mj41 joined 21:32 leprevost left, Instil joined
ash__ off topic, any teachers in around with a few minutes to ask a few questions? (I need to interview a person that teaches software for a class) 21:34
sorear TimToady did homeschooling, many years ago. I think this may fall under 'don't ask to ask' 21:37
ash__ well i have a few questions that might take 10~15 minutes, so i was hoping to find someone interested and not spam the channel :P 21:38
masak ash__: you might put them in a gist...
Tene ash__: I taught linux sysadmin classes, and a few programming classes, for a few years, but changed careers about a year ago. 21:39
back into doing sysadmin work.
I'd be glad to chat with you.
sorear yeah it really depends on what you mean by 'teacher'
ash__ I was vague with the work teach on purpose, even if you just show the new guy at work the ropes I'd take that 21:40
I guess as a preliminary question, do any of you know about the Software Engineering Body of Knowledge? www.computer.org/portal/web/swebok/htmlformat
IEEE is trying to get a Professional Engineer certificate for programmers based off that content 21:41
I'll put them in a gist 21:43
Tene no, I haven't seen that before.
ash__ its the list of "things you should know" if you have a software engineering degree (which is slightly different than a Comp Sci degree) 21:44
21:44 Psyche^ joined 21:45 Patterner left, Psyche^ is now known as Patterner 21:46 orafu left 21:47 orafu joined 21:48 cognominal_ left
ash__ I am taking a class on teaching, and we have been discussing the various chapters of the SWEBoK and how to teach different topics, such as testing, or design its been interesting (since I am interested in becoming a professor) 21:49
21:52 risou is now known as risou_awy, risou_awy is now known as risou 21:53 mj41 left
ash__ gist.github.com/1114825 here are the interview questions, if anyone has a moment, I'd appreciate it, if not, thats fine too 21:57
22:00 dukeleto left
PerlJam ash__: I assume you have an opinion on the "correct" answers to these questions 22:01
slavik bad answers include the word "python" 22:02
ash__ not really, it depends mostly on what your trying to teach
in my class we focused on CS1 and CS2 (the first two classes on programming, whatever you want to call them)
some ideas, like Software Configuration Management don't really work in CS1 22:03
I mean, when your just learning to program, and understand what a loop is, its not that helpful to have to do Configuration Management, at least, IMO its distracting from the main lesson your teaching at the time (e.g. loops) 22:04
PerlJam aye
22:05 soh_cah_toa left
ash__ and other topics, like quality assurance are hard to teach to someone who doesn't have "Real World" experience 22:05
masak jnthn and I are digging the IRC logs for autopun sightings. this is one of the first ones: www.threadless.com/product/623/Haik..._Sometimes 22:09
22:10 Kivutarrr left
masak we laughed most on that one, but it's unclear whether it's because it was the best one of whether it was the last one :) 22:10
ash__ I like the image version of it: goo.gl/CNL9o (deviant art link) 22:12
tadzik I was planning to get a >=a2 of it to put on my wall
but I think I'll settle for davidcrew.files.wordpress.com/2010/...568125.jpg NSFW language 22:13
or maybe not. I have an Iron Maiden poster, but no place to put it. It seems inappropriate everywhere :) 22:14
22:26 Vlavv_ left 22:32 impious left 22:33 Vlavv joined 22:39 meraxes left
masak 'night, #perl6 22:40
22:40 masak left 22:55 dukeleto joined
colomon o/ 22:55
sorear o/ colomon 22:57
colomon sorear: sorry I haven't made more progress on trig. but I was very impressed by the error message I got when I tried to run sin.t! lovely summary of the things niecza doesn't know how to handle yet 22:58
hopefully will get a chance to work on it some tomorrow.
sorear what kind of error message? you mean the explain_mysteries dump of unknown names? 22:59
colomon yes, explaining that we still need exp and asin
(exp as a sub -- I think the method is there already) 23:00
also the nice note about variables which were declared and never used
afk # called from upstairs 23:01
23:07 Khisanth left 23:14 timbunce left 23:15 Khisanth joined 23:16 fhelmberger left 23:17 fhelmberger joined 23:23 jaldhar joined, wamba left 23:28 whiteknight joined
jnthn back 23:28
tadzik: Still up? 23:31
23:34 orafu left, ash__ left 23:36 ash__ joined, cschimm1 joined 23:48 molaf_ joined 23:51 molaf left 23:52 cognominal_ joined 23:54 shinobicl joined