»ö« 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:10 spider-mario left
[Coke] ok. crontab problem with running pugs: i run it from the command line, it fails almost nothing. from cron, several hundred more. 00:13
... oh, wait, my test to duplicate crontab's environment have duplicated the problem. score. 00:14
now I just need to figure out which env var is to blame. ;) 00:15
moritz binary search over 'em?
00:17 eviltwin_b left 00:21 PacoAir left
[Coke] argh. now it's not duplicated. arglebargle. 00:23
is there anything cron changes other than env vars? 00:26
00:26 cognominal joined
moritz I don't think so 00:29
I wouldn't know what else *could* be different
[Coke] shell, mebbe. 00:32
moritz right 00:33
[Coke] goes bugeyed. 00:38
00:46 lichtkind left 01:01 thou left, Chillance left 01:07 ingy joined 01:13 raiph joined
raiph "can you give some elements of P6 that you find "lispish"?" 01:14
www.reddit.com/r/perl/comments/wkk1...th/c5eb5i2
01:29 Coleoid joined 01:31 raiph left 01:39 godfrey999 joined 01:43 am0c_ joined 01:50 zhutingting joined
[Coke] should probably change this gist to a git project. 01:52
lue Does anybody else get a bus error (or know how to fix it) when running nqp (toqast branch) outside the nqp repo? 02:18
lue guesses a bad sector in /usr/local land 02:22
geekosaur that should show up in syslog 02:23
lue I know dmesg confirms that my HDD is old :) /me wonders if he ever set up metalog 02:26
02:37 orafu left 02:39 orafu joined
colomon sorear: ping? 02:45
Unsupported use of | with sigil; nowadays please use | without sigil at /Users/colomon/tools/niecza/t/spec/packages/Test/Util.pm line 7: 02:51
------> proto sub is_run(|$⏏) is export { * }
02:57 thou joined 03:02 zhutingting left 03:16 prettyrobots left 03:20 prettyrobots joined 03:25 zhutingting joined 03:26 apejens_ is now known as apejens
colomon thinks he may have finally sorted out his mono difficulties. 03:27
\
03:31 kaare_ joined 03:35 mucker left
dalek ast: 094220d | (Solomon Foster)++ | S02-types/array.t:
Fudge for niecza and whine somewhat about the test.
03:57
04:20 skids left 04:34 zhutingting left
dalek ast: e311f17 | coke++ | S (4 files):
pugs fudge
04:42
ast: 63da604 | coke++ | S0 (3 files):
pugs fudge
04:59
05:17 kaleem joined 05:37 am0c_ left, PZt left 05:40 PZt joined 05:55 am0c_ joined 05:59 kresike joined
kresike good morning all you happy perl6 people 05:59
06:16 fridim_ joined
tadzik oh hello kresike 06:17
did you wake up earlier today, or am I late for work already? :)
kresike hello tadzik 06:18
yes, I'm an early bird today
[Coke] must...sleep. 06:23
tadzik [Coke]: goo.gl/bqCc5 06:24
06:25 nodmonkey joined
thou r: say 'foo'.Int // 0; 06:30
p6eval rakudo ee86a5: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ in method Int at src/gen/CORE.setting:9556␤ in method Int at src/gen/CORE.setting:3485␤ in block <anon> at /tmp/URGRBor_BY:1␤␤»
thou r: say +'foo' // 0;
p6eval rakudo ee86a5: OUTPUT«0␤»
thou ?
06:34 nodmonkey left 06:36 fridim_ left 06:38 hoelzro|away is now known as hoelzro 06:51 GlitchMr joined
[Coke] fixes pugs's testing borkedness. 06:53
should bring pugs up from 33% to nearly 40% again. 06:58
moritz: missing a LANG. 07:00
07:09 wtw joined
bbkr good morning 07:17
how to write tests for LTA error messages like this one: github.com/perl6/roast/blob/094220...ray.t#L338 to avoid conflicts with other implementations?
moritz the first step is to determine what the proper error message would be 07:24
then define an exception class for it
07:24 brrt joined
moritz and then use throws_like from Test::Util 07:24
the current tests are certainly wrong
my class X::Index is Exception { has $.aggregate; has $.index; method message() { "Cannot index {$.aggregate.^name} with $.index" } } 07:26
or so 07:27
bbkr every error should throw some kind of exception? 07:28
07:29 prettyrobots left
moritz some should fail(), some should throw exceptions 07:29
I'm not quite sure when to do what, but it's usually OK to start with die()
and yes, all errors (except internal errors) should end up being of a proper exception class 07:30
07:30 prettyrobots joined
bbkr this example above throws X:AdHoc - is is something temporary (that should not be put in test)? 07:30
moritz X::AdHoc is what you get when the throwing location doesn't pass an Exception to &die 07:31
so, not something you should test for in this context
(and the error message is certainly wrong)
probaly needs an if nqp::isnanorinf($index) { ... } check at some point 07:32
bbkr I'm restoring ticket and removing this test then. Sorry about trouble niecza guys. 07:34
moritz (allowing proper tests for such conditions is the reason I did the whole typed exception stunt. It's still hairy) 07:35
dalek ast: 202d250 | (Pawel Pabian)++ | S02-types/array.t:
removed inappropriate Rakudo-specific test
07:39
hoelzro does NativeCall only use *.bundle on OS X?
bbkr moritz: exception thing makes perfect sense in multi-implementation-world 07:40
geekosaur why would it use it elsewhere? os x and nextstep are the only oses that use *.bundle
bbkr hoelzro: yes, there is issue filled about it - github.com/jnthn/zavolaj/issues/7 07:41
hoelzro geekosaur: what I mean is will it also use *.dylib
bbkr: thanks
masak goede morgen, #perl6 07:42
bbkr hoelzro: if you want to use dylib you have to hardcode like here: github.com/bbkr/GeoIPerl6/blob/mas...eoIP.pm#L7
hoelzro unfortunately, it's DBIish that's doing the native stuff, not me =( 07:44
bbkr moritz: how about Failures - will they be also replaced by exceptions so I should avoid writing tests like: github.com/perl6/roast/commit/c1c8...8d0e6fd94b ? 07:45
07:45 fhelmberger joined
moritz bbkr: not replaced 07:47
bbkr: but you can write something like
throws_ok 'use fatal; "foo".substr(4)', X::Str::Substr::EOS; or so 07:48
or you can get at the failure's exception with .exception 07:49
bbkr Test::Util is not included in Rakudo yet? 07:50
tadzik r: use Test; "foo".substr(4); say "alive"; { use fatal; throws_ok { "foo".substr(4) }, X::Str::Substr::EOS; }; say "alive2"
p6eval rakudo ee86a5: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&throws_ok' called (line 1)␤»
tadzik r: use Test; "foo".substr(4); say "alive"; { use fatal; dies_ok { "foo".substr(4) }; }; say "alive2"
p6eval rakudo ee86a5: OUTPUT«alive␤ok 1 - ␤alive2␤»
moritz throws_ok comes from Test::Util
and, my example was assuming that such an exception is actually failed/thrown 07:51
bbkr r: use Test::Util; 07:52
p6eval rakudo ee86a5: OUTPUT«===SORRY!===␤Could not find Test::Util in any of: /home/p6eval/.perl6/lib, /home/p6eval/nom-inst2/lib/parrot/4.5.0-devel/languages/perl6/lib␤»
jnthn morning, #perl6
tadzik morning jnthn
masak jnthn! \o/ 07:53
jnthn masak!
tadzik!
masak we meet again.
jnthn Geeez, why is my internets so slow... 07:54
Oh, uploading 2 gig file...
masak that might be it.
jnthn Thought that might get done overnight. :)
moritz \o jnthn, masak, tadzik, *
masak .oO( why does tadzik get an infinity of greetings? ) :) 07:55
bbkr doing: try {"foo".substr(4) }; ok $! ~~ X::Str::Substr::EOS; will breake whole test for niecza because such package is not registered there :(
masak thou: las link in july-9 post corrected. thank you for spotting that. 07:56
last*
moritz bbkr: currently it'll also break rakudo
bbkr: but that's what fudging is for
07:57 snearch joined
thou good. there was one other similar (a post missing link to the corresponding code). ah, yes, july 7th (when you were tired). 07:57
masak: ^ 07:58
masak oh!
moritz r: Inf.Int; say 'alive'
p6eval rakudo ee86a5: OUTPUT«alive␤»
moritz r: 1.list[Inf] 07:59
p6eval rakudo ee86a5: OUTPUT«Cannot coerce Inf to an Int␤ in method Numeric at src/gen/CORE.setting:9558␤ in sub infix:<+> at src/gen/CORE.setting:2466␤ in method exists at src/gen/CORE.setting:5317␤ in method at_pos at src/gen/CORE.setting:5297␤ in method postcircumfix:<[ ]> at src/gen/C…
bbkr moritz: thanks. I will replace literal error message comparing to X:: checks in my latest roast commits
moritz r: [1][Inf]
p6eval rakudo ee86a5: OUTPUT«This type cannot unbox to a native integer␤ in method at_pos at src/gen/CORE.setting:5730␤ in method postcircumfix:<[ ]> at src/gen/CORE.setting:1214␤ in block <anon> at /tmp/lqwhuQ6zVQ:1␤␤»
moritz bbkr: ok, great
bbkr++
bbkr: adding typed exceptions for stuff in the setting isn't very hard
oh, we already have an X::OutOfRange 08:01
so we can use that for substr 08:02
08:16 dakkar joined
masak lol, I blogged! strangelyconsistent.org/blog/july-1...ied-around 08:19
08:23 daxim joined
dalek kudo/nom: 65e2aae | moritz++ | src/core/Str.pm:
start to &fail typed exceptions from Str.substr
08:26
moritz masak++ 08:36
08:37 prettyrobots left
masak re-doing this game this way is so much fun that I submitted a 20-minute YAPC::EU talk proposal about it :) 08:41
tadzik oh yay! 08:47
dalek kudo/nom: 1fe39c7 | moritz++ | src/core/Str.pm:
another typed failure from Str.substr
08:48
moritz bbkr: substr should now fail with X::OutOfRange when any of the arguments are wrong
08:53 bbkr1 joined
lumi_ r: class A { my $b = 10; method inc { $A::b++ }; method get { $A::b }; }; my A $a .= new; $a.inc; say $a.get 08:55
p6eval rakudo ee86a5: OUTPUT«1␤»
moritz wtf? one can refer to a 'my'-variable with $A::b? 08:56
lumi_ moritz: No, but that's what the test in github.com/perl6/roast/commit/0577...697f8dd247 claims, and it's broken
moritz oh. broken test is broken.
so it autovivifies a A::<$b> 08:57
lumi_ Maybe it was removed? I was backlogging
08:58 wtw left
lumi_ No, it's still there 08:59
09:01 jerome joined
lumi_ n: class A { my $b = 10; method inc { $A::b++ }; method get { $A::b }; }; my A $a .= new; $a.inc; say $a.get 09:02
p6eval niecza v19-13-g442e075: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/4PRDlDufNB line 1:␤------> class A { my ⏏$b = 10; method inc { $A::b++ }; method ␤␤1␤»
09:04 wtw joined
lumi_ Any idea how that test can be improved? 09:06
I guess remove the 'my'-variable 09:07
bbkr1 RT 74412 market this behavior as testneeded
phenny bbkr1: 01 Mar 23:00Z <benabik> tell bbkr1 Try `git clean -xdf` in your NQP directory. This will remove any files not under version control, and seemed to let dyncall build properly for me.
bbkr1 oh, message from the past :)
lumi_ bbkr1: Yes, but "no longer sure" as mentioned there, it doesn't actually access the lexical 09:08
moritz bbkr: "testneeded" means "we need a test that the code in the ticket behaves as it should", so first we must be clear on how it should behave
but it's ok, we can extend/fix the test
bbkr1 sorry about that. I understood Coke's message "Closable with tests." as "this is desired behavior that should be tested" 09:10
moritz I have a fix for the test locally 09:12
just need to recompile rakudo to test it :(
09:13 tokuhiro_ joined
bbkr1 moritz: how about testing github.com/perl6/roast/commit/868d...4dbc9d70fa to avoid comparing error message? I cannot do "throws_ok { say and die 3 }" as it fails in compile time. 09:23
and - what seems logical - compile time errors do not have corresponding exceptions, have they? 09:24
hoelzro I should be able to assign anything that "does Associative" to a %-variable, right? 09:27
09:38 kaleem left, Khisanth left, kaleem joined 09:46 thou left
moritz bbkr1: they have 09:52
r: try eval '$x'; say $!.WHAT
p6eval rakudo 1fe39c: OUTPUT«X::Undeclared()␤»
09:52 Khisanth joined
dalek ast: 175f5e9 | moritz++ | S02-packages/package-lookup.t:
fix tests for lookup of our-variables in a class
09:56
hoelzro this code *should* work, right?
gist.github.com/3121878
moritz hoelzro: bind, not assign
hoelzro or am I missing something obvious?
?
moritz hoelzro: hash assignment is coercive
my %environment := RobTest.new(); 09:57
hoelzro ok
that's...interesting.
can I do that in a hash constructor? something like my %params = :environment(RobTest.new);
moritz that places a pair with key 'environment' and value RobTest.new into %params 09:58
not sure if that's what you want 09:59
hoelzro well, I'm passing %params to new of a class
a class that has an attribute: has %.environment;
right now, it's complaining about odd number of elements
moritz hm
r: class A { has %.h }; class B does Associative { }; say A.new(h => B.new.new).perl 10:00
p6eval rakudo 1fe39c: OUTPUT«Odd number of elements found where hash expected␤ in method STORE at src/gen/CORE.setting:6110␤ in block <anon> at src/gen/CORE.setting:636␤ in method BUILDALL at src/gen/CORE.setting:620␤ in method bless at src/gen/CORE.setting:610␤ in method new at src/gen/C…
moritz I guess it should work, but we'd have to ask jnthn++
oh 10:01
hoelzro moritz: btw, which synopsis covers :=?
moritz but if you then use %.h inside the class, it might call the .hash method
so it's safer to use a scalar attribute
hoelzro: S03 iirc
hoelzro =(
jnthn Doing Associatve doesn't imply anything about flattening in hash context. It just means you support at_key. 10:04
Well, or that you claim to.
r: class B does Associative { }; my %h = B.new
p6eval rakudo 1fe39c: OUTPUT«Odd number of elements found where hash expected␤ in method STORE at src/gen/CORE.setting:6110␤ in block <anon> at /tmp/wPlxxSagrm:1␤␤»
jnthn Don't need the class and stuff to reproduce this one. 10:05
hoelzro so my %hash = Class.new coerces the RHS to a Hash?
10:06 Guest6173 joined
jnthn No 10:06
It doesn't coerce it anywhere
Storing into a hash first puts the list of things being assigned into flattening, eager context. 10:07
It then goes through them. If it sees anything that is ~~ EnumMap, it flattens that in. If it sees a Pair or Enum object, it will use it as a key/value pair. For anything else, it expects there to be a key followed by a value. 10:08
10:09 Guest6173 left
flussence so... turns out that "is rw" on sub params in zavolaj doesn't actually have any effect - they're writable even without it. 10:15
.oO( which is nicer than the alternative, being unmodifiable in spite of it... )
10:16
moritz jnthn: the question is, does the default .new/.bless bind or assign hash attributes? 10:20
jnthn moritz: Assign.
moritz: Same for scalars and arrays.
moritz that's... odd 10:21
r: class A { has @.a }; say A.new(a => [1, 2, 3]).a.elems
p6eval rakudo 1fe39c: OUTPUT«3␤»
moritz if it's assignment, why does it flatten?
special case?
jnthn Because masak demanded that work so we somehow made it do so, I think... :)
r: my $x = [1, 2, 3]; class A { has @.a }; my $a = A.new(a => $x); say $a.a.elems 10:22
p6eval rakudo 1fe39c: OUTPUT«3␤»
jnthn r: my $x = [1, 2, 3]; class A { has @.a }; my $a = A.new(a => $x); $x.push(4); say $a.a.elems 10:23
p6eval rakudo 1fe39c: OUTPUT«3␤»
jnthn ah, yes
We explicitly decontainerise. 10:24
10:24 Patterner left 10:26 Psyche^ joined, Psyche^ is now known as Patterner 10:30 godfrey999 left, brrt left 10:31 godfrey999 joined, godfrey999 left 10:34 simplx left 10:50 tokuhiro_ left, tokuhiro_ joined, JimmyZ joined 10:54 tokuhiro_ left 10:55 HarryS left 10:57 Guest39567 joined 11:01 GlitchMr left 11:02 Guest39567 left 11:03 mikemol left 11:04 dukeleto left, mikemol joined 11:11 apejens left, GlitchMr joined
lumi_ r: sub foo { 1 }; try eval 'foo() = 3' ; say $!.perl 11:13
p6eval rakudo 1fe39c: OUTPUT«X::Assignment::RO.new()␤»
lumi_ r: sub foo { my $x }; try eval 'foo() = 3' ; say $!.perl
p6eval rakudo 1fe39c: OUTPUT«X::AdHoc.new(payload => "Cannot assign to a readonly variable or a value")␤»
lumi_ Does this make sense?
11:13 apejens joined
lumi_ Should it be the same exception? 11:13
JimmyZ r: sub foo { my $x }; try eval 'foo() = 3' ; 11:14
p6eval rakudo 1fe39c: ( no output )
11:19 dukeleto joined 11:24 kaleem left 11:37 dukeleto left 11:43 Khisanth left, Coleoid left, benabik left, preflex left, Exodist left, aloha left, rsimoes left, c1sung left, baest left, domidumont left, wolong left, Tene left, pnu left
colomon n: say and die 3 11:43
p6eval niecza v19-13-g442e075: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'and' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) ␤ at /home…
11:43 Khisanth joined 11:44 brrt joined, Coleoid joined, benabik joined, preflex joined, Exodist joined, aloha joined, rsimoes joined, c1sung joined, baest joined, domidumont joined, wolong joined, Tene joined, pnu joined
JimmyZ r: sub foo { my $x; say 'ehhl'; }; try eval 'foo() = 3' ; 11:45
p6eval rakudo 1fe39c: OUTPUT«ehhl␤»
colomon n: module M { }; say 42 ~~ M
p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method ACCEPTS in type M␤ at /tmp/86dw2hnyuj line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3919 (module-CORE @ 562) ␤ at /home/…
11:47 Coleoid left
colomon n: say 'foo123bar' ~~ /foo <( 123 <( bar/ 11:50
p6eval niecza v19-13-g442e075: OUTPUT«#<match from(3) to(9) text(123bar) pos([].list) named({}.hash)>␤»
11:51 dukeleto joined 11:54 snearch left 11:55 HarryS joined
colomon n: my $p = 'a' ~~ /$<foo>='a'/; my $q = $p.clone 12:00
p6eval niecza v19-13-g442e075: OUTPUT«Potential difficulties:␤ $q is declared but not used at /tmp/BGRHrdSIGd line 1:␤------> my $p = 'a' ~~ /$<foo>='a'/; my ⏏$q = $p.clone␤␤Unhandled exception: Representation P6cursor does not support cloning␤ at /home/p6eval/niecza/lib/…
bbkr1 that's weird...
Is test correct here? I haven't found anything in spec saying that match object cannot be cloned. 12:03
colomon bbkr1: darned if I know. I assume it can, but I don't know for sure that's the case. 12:04
bbkr1 colomon: after $dayjob I'll fix my test commits that compare rakudo error messages so they check thrown exceptions (as moritz explained) to avoid niecza conflicts
colomon That will just cause a different set of niecza conflicts (no exceptions), but it's a good plan because they will be much better tests with the exception check. 12:05
bbkr1++
12:06 am0c_ left
colomon just realized his computer has now been backing up his family's digital pictures for over 12 hours now, and it's still in 2011 12:06
12:11 zhutingting joined 12:13 cognominal_ joined 12:15 HarryS left 12:16 cognominal left
cognominal_ .ms? 12:20
oops 12:21
flussence that's a lot of pics... I think the ones I've got still fit on one SD card :)
colomon flussence: there are probably duplicates involved... and it's backing it up across cable internet, so I doubt the upload time is particularly fast. (Downloading to my NAS at my in-laws' house.) 12:23
12:24 daniel-s_ joined
daniel-s_ hi 12:24
moritz hi daniel-s_ 12:25
daniel-s_ rakudo: say "hi there daniel-s!"
p6eval rakudo 1fe39c: OUTPUT«hi there daniel-s!␤»
daniel-s_ :) hi p6eval
so, I have never been that interested in how compilers work, but I have recently had a little project in which I need to read a particular file format 12:26
I tried the first time, basically it's really long and has a whole bunch of really complicated loops and regular expressions
...then I read a book on compiler design :) 12:27
moritz :-)
daniel-s_ when you have created tokens and you're parsing the tokens, what goes on the non-leaf nodes?
that's where I'm stuck, I'm trying to write a recursive loop that creates the syntax tree. From there I'm pretty much set 12:28
tadzik are you reading "Let's Build a Compiler", by any chance?
daniel-s_ should I be creating a new token that I call something like, "expression token"
moritz daniel-s_: with "token", do you mean the piece of text just read, or a piece of the AST? 12:29
daniel-s_ Fundamentals of Compilers, an introduction to computer language translation
Karen A. Lemone 1992 0-8493-7341-7
Before I started reading I thought it was going to be a horrible scary book (I never did computer science) 12:30
but it's actually really simple and easy :)
12:30 zhutingting left
moritz maybe I should read it too :-) 12:30
daniel-s_: there are different approaches, so without a bit more context it's hard to answer the question 12:31
the first is the classical compilation in phases
first you tokenize the whole file
daniel-s_ I started this morning, I thought I would read it through (it's only 150 pages) then write my interpreter, but I keep getting impatient and will read a chapter, implemented, get stuck, then read the next chapter and get unstuck
moritz then you create a parse tree from the token
and then the AST from the parse tree 12:32
daniel-s_ that's where I'm stuck (parse tree from tokens)
12:32 rafl left
moritz and then the IR or assembler or from the AST 12:32
daniel-s_: there are basically two approaches, recursive descending parsing
daniel-s_: or using a tool like bison/yacc 12:33
recursive descending is probably easier to understand
there, you start with a top rule
like 'program'
12:34 rafl joined
moritz and if a program is just a list of expressions, you just call 'expression' until all of the tokens are consumed 12:34
and collect the return values from all 'expression' calls in an array, and return it
cpansearch.perl.org/src/MORITZ/Math.../Parser.pm is a recursive descending parser for mathematic expression 12:36
cpansearch.perl.org/src/MORITZ/Math...r/Lexer.pm for the tokenizer 12:37
arnsholt daniel-s_: Basically, what you label the result of combining several tokens depends on how it will combine with other things to make larger pieces of structure
daniel-s_ OK. I will read the two chapters on parsing and give it another go tomorrow. It got to 9:30 and I gave up and came back home 12:39
By the way, do you guys often do all nighters?
I did, the first time a few weeks ago because there was something I really needed to get done. Absolutely horrible! 12:40
it's not nearly as glamorous as I had been led to believe
arnsholt I've been known to do them, but not because I like it =)
Necessity is the mother of invention, and all that
bbkr1 Laziness s the mother of invention :) 12:41
tadzik yes, exactly :)
[Coke] misreads X::OutOfRange as X::OutRage
dalek ast: 6acf7cf | (Solomon Foster)++ | S02-types/hash.t:
Fudge for niecza. (And another new test that is not at all Niecza friendly. Hmm.)
ast: 66bf9aa | (Solomon Foster)++ | S03-operators/precedence.t:
Fudge for niecza.
ast: dc9f15f | (Solomon Foster)++ | S (7 files):
Lots of niecza fudges.
daniel-s_ I like the bill gates quote, if he has a difficult problem he'll give it to a lazy person because they will find a way to make it easy :) 12:43
flussence just make sure they're genuinely lazy, and not just dumb :) 12:44
[Coke] yay. dry run from cron now has pugs failing no spec tests, niecza failing 218, and rakudo failing 8.
colomon almost has the number of niecza spectest failures down to something reasonable... 12:45
[Coke] (as opposed to yesterday, which was 1885, 99, and 8)
colomon++
you don't stay on top of it, people adding tests can easily screw you up :|
(it is a nice problem to have, of course.) 12:46
[Coke] does another spectest run in advance of the noon-eastern comparisonrun.
Yay, still clean! 12:50
12:55 HarryS joined
JimmyZ [Coke]: how about rm_pasm now? :) 12:56
12:56 rafl left 12:58 rafl joined
colomon [Coke]: biggest issue here was that my mono install was still borked, so I was getting large numbers of false failures in spectest runs. I gave up entirely on keeping on top of things for a week or two. But I finally figured out my mono problem yesterday evening, and now I'm trying to get on top of things again. 12:59
n: sub foo($x where { $x == $y }, $y) { }
p6eval niecza v19-13-g442e075: OUTPUT«===SORRY!===␤␤Variable $y is not predeclared at /tmp/EgxI56we7j line 1:␤------> sub foo($x where { $x == ⏏$y }, $y) { }␤␤Potential difficulties:␤ $y is declared but not used at /tmp/EgxI56we7j line 1:␤------> sub …
[Coke] colomon++ 13:01
dalek ast: 3257bad | (Solomon Foster)++ | S12- (2 files):
Fudge for niecza.
13:02
13:03 [particle]1 is now known as [particle]
[Coke] JimmyZ: rm_pasm wasn't waiting on me, was it? 13:03
ah, probably.
[Coke] should at least get it up to date.
JimmyZ any reason it's not merged into trunk? 13:04
13:07 zhutingting joined
[Coke] JimmyZ: Lack of interest on my part to push it? 13:09
JimmyZ [Coke]: I don't know, actually ;) 13:10
13:17 localhost left 13:19 localhost joined, MayDaniel joined
dalek ast: 11d7758 | (Solomon Foster)++ | S02-magicals/env.t:
Fudge for niecza.
13:20
13:28 gdonald joined 13:32 skids joined 13:33 atrodo joined
gdonald where to report a Rakudo compile issue? 13:34
masak [email@hidden.address] 13:35
and/or here.
well, through some nopaste service, preferably.
13:41 bluescreen10 joined 13:52 birdwindupbird joined 13:55 tyatpi joined 14:00 wtw left 14:04 sergot joined
sergot hi o/ 14:04
14:05 GlitchMr left, _jaldhar_ left 14:06 GlitchMr joined
masak sergocie! \o/ 14:07
14:10 benabik left
diakopter X::OutRage 14:12
bbkr1 X::TrustMe::ImAnEngineer :) 14:13
tadzik :) 14:14
hey, why would that be an exception? :P
masak X::ImADoctor::Jim::NotACircusSeal
bbkr1 tadzik: because X::TrustMe::ImAnEngineer rethrows X::WhatTheF::DidJustHappen::Here :) 14:15
diakopter X::ThrowMe 14:16
masak what is this, Wonderland?
14:19 bluescreen10 left 14:20 bluescreen10 joined
[Coke] Curious, sir. 14:22
14:23 prettyrobots joined
diakopter hm, where'd those unfertilized chicken embryos run off to 14:23
jnthn Accross the road? 14:24
flussence X::Frogger?
masak .oO( shouldn't have put all those eggs in the same basket... )
pmichaud good morning, #perl6 14:25
moritz good am, pm
jnthn morning, pmichaud
14:25 PacoAir joined
pmichaud other things have come up around here, so I'm tuit-less until tomorrow afternoon :-/ 14:25
masak pmichaud! \o/ 14:26
jnthn Aww. Good luck with @other-thing
pmichaud (well, at least tomorrow afternoon)
masak yes, good luck.
pmichaud who is doing this month's rakudo release?
(compiler release)
tadzik I think I do
or maybe I'm August
masak no, I am.
moritz 2012-07-19 Rakudo #54 masak
2012-08-23 Rakudo #55 tadzik
tadzik yep, I'm August
aye 14:27
moritz September is free
October is pmichaud
sorry, PerlJam
masak .oO( October is p<tab> ) :)
moritz right :-)
pmichaud I'm thinking that I want to start bumping PARROT_RELEASE only when we need a new version of Parrot
moritz +1 14:28
masak I won't have time to ram D2 into the July release, I'm afraid. but I'll probably get started on it before Thursday.
moritz so, we downgrade it to 4.4.0 ?
pmichaud yes, back it down to 4.4.0
unless there's something in 4.6.0 that we think we need
moritz fwiw after 4.6.0 there'll be the io_cleanup merge (I hope), to which I plan to upgrade nearly immediately
pmichaud I'll try to get the release guide updated with this; but if not -- masak++ you know what to do :)
will the io_cleanup merge involve patches to rakudo/nqp ? 14:29
moritz yes
pmichaud okay, so we'd have to bump then.
moritz (setting encoding on the socket, for one) 14:30
pmichaud sounds good
moritz that'll explain how $sock.recv manages to return a Str, not a Buf :-)
on which our users currently rely
tadzik ew 14:31
masak pmichaud: gotcha. we stick to 4.4.0, and I update the release guide unless you beat me to it.
pmichaud +1 and thanks 14:32
14:32 birdwindupbird left
pmichaud I expect to be more available again tomorrow. 14:32
flussence if 4.4.0 means I don't need to randomly insert -G flags into nqp's makefile, +1 to that :)
dalek p: 8cbe162 | moritz++ | tools/build/PARROT_REVISION:
downgrade parrot to 4.4.0

there was no reason to require 4.5 over 4.4, so we can depend on an older parrot (but it still works on the newer one)
jnthn flussence: Does the Rakuod you get out in the end work oK? 14:33
*Rakudo, *ok :)
(with the flags, I mean)
flussence yep, I was doing some messing around with nativecall on it this morning :) 14:34
arnsholt What kind of NativeCall messing around, OOC? 14:43
14:43 fhelmberger left
[Coke] grumbles about autogenerated tests in roast again (making them hard to fudge) 14:46
bbkr1 autogenerated? 14:47
14:47 nightlord joined
[Coke] s/auto// 14:47
some of the trig stuff is (rightfully) generated so that it's easier to maintain and test edge cases.
15:04 kst left
kresike bye all 15:08
15:08 kresike left 15:10 cognominal__ joined, cognominal_ left 15:12 cognominal__ left 15:13 cognominal__ joined 15:18 JimmyZ left 15:20 thelazydeveloper joined, gdonald left 15:22 gdonald joined 15:23 MayDaniel left
daxim flussence++ # hypotenuses 15:24
15:24 hoelzro is now known as hoelzro|away 15:25 thou joined
flussence heh, didn't think anyone would notice that :) 15:26
flussence -> decommute
15:27 MayDaniel joined 15:30 MayDaniel left 15:33 sirrobert left 15:40 xinming left, xinming joined
[Coke] can get about 100 more passes if he could fudge S32-trig/sin.t ... and presumably 100 more from cos and tan 15:41
15:46 nightlord left 15:47 dukeleto left 15:51 lue left
[Coke] so quiet today. 15:55
diakopter . 15:56
15:59 benabik joined, sirrobert joined
sirrobert Why does this happen?: 15:59
class A { has $.str }; my $a = A.new(str => 'foo'); say $a.str;
r: class A { has $.str }; my $a = A.new(str => 'foo'); say $a.str;
p6eval rakudo 1fe39c: OUTPUT«foo␤»
sirrobert r: class B { has $.str; submethod BUILD {} }; my $b = B.new(str => 'foo'); say $b.str; 16:00
p6eval rakudo 1fe39c: OUTPUT«Any()␤»
16:00 dukeleto joined
sirrobert Adding an empty submethod BUILD {}' 16:00
16:00 GlitchMr left
sirrobert makes it behave in a way I don't understand 16:00
[Coke] unhelpfully, presumably you are overriding the builtin BUILD, and not dispatching to it, so you have to replace its functionality. 16:02
sirrobert ok, hmm. How can I apply a mixin to an instance during construction?
what's the best way to do that? 16:03
16:03 brrt left
sirrobert in BUILD? 16:03
[Coke] r: class B { has $.str; submethod BUILD(:$arg) { $.str = $arg } }; my $b =B.new(str => 'foo'); say $b.str;
p6eval rakudo 1fe39c: OUTPUT«===SORRY!===␤Virtual call $.str may not be used on partially constructed objects␤at /tmp/MAwUBpqRbB:1␤»
16:04 prettyrobots left
jnthn r: class B { has $.str; submethod BUILD(:$!str) { }; }; my $b =B.new(str => 'foo'); say $b.str; 16:04
sirrobert I don't know where to find docs on BUILD ... are there any yet?
p6eval rakudo 1fe39c: OUTPUT«foo␤»
[Coke] jnthn: looks magicy.
sirrobert (thanks, jnthn and COKE =)
er [Coke] 16:05
heh
jnthn sirrobert: Not sure p6doc has anything on BUILD yet. moritz++ did a good blog post on it
[Coke] sirrobert: S12, I think.
jnthn: perlgeek.de/blog-en/perl-6/object-c...ation.html ?
16:05 lue joined
sirrobert thanks; reading 16:06
jnthn sirrobert: perlgeek.de/blog-en/perl-6/object-c...ation.html 16:07
ah, [Coke] beat me to finding it
sirrobert thanks =)
16:12 tyatpi left, cognominal__ left, cognominal joined
sirrobert that clarified it. Thanks all. I'll put a up a blog post about it in a min. 16:13
thou tadzik: do you have an example of any module that includes C code as part of it (to be used via NativeCall)? or an idea of how you think such a thing would be structured and built, or what tools need to be developed to make that happen? I just started playing w/ a simple Term::Curses module, and need some helper functions to work around macros in the curses API.... I have it working, but just with is native('term-curses.dyl 16:17
ib') and manual build of the lib.
maybe it's premature to worry about packaging on that kind of thing 16:18
arnsholt AFAIK we don't have any modules that have C code in them as well 16:21
How complicated are the macros you're replacing?
You might be able to replicate them with pure Perl code
16:25 prettyrobots joined
thou arnsholt: the problem i have is that the curses api does stuff like: getyx(WINDOW *, int y, int x). this is a macro that uses the opaque WINDOW * object to get out the values, and stores them into y and x (notice those are not pointers -- the macro assigns directly) 16:26
so void term_curses_getyx(WINDOW *win, struct Point *p) { getyx(win, p->y, p->x); } 16:27
16:28 MayDaniel_ joined
thou i'm using a class Perl is repr('CStruct') to get the values back out 16:28
i can't avoid the macro, afaik, the curses api doesn't provide a non-macro way to (portably) extract those values
16:30 mucker joined
geekosaur it doesn't. it's a mess 16:30
16:32 PacoAir left
thou this is kind of getting off-topic, but, "Also, ncurses meets the XSI requirement that every macro entry point have a corresponding function which may be linked (and will be prototype-checked) if the macro definition is disabled with #undef. " 16:32
but i couldn't seem to get that to work (i tried stuff like sub getyx(OpaquePointer, int is rw, int is rw) (to try to say "I'm passing a pointer-to-int"), but it (not surprisingly, to me at least) segfaults 16:34
[Coke] needs to add the timings to the test runs. I'd be interested to see how long pugs takes to pass its 40 16:35
% of rakudo's tests.
s/see/track/ 16:36
arnsholt thou: Oh! I see. Yeah, I've no good ideas then 16:47
But if the signature is void getyx(WINDOW *, int *, int*) it might be better to make it sub getyx(OpaquePointer, CArray, CArray) and use one-element arrays 16:48
I'm not at all certain that int is rw is supposed to work 16:49
Speaking of #undef and such, seeing how you're using (under the hood, that is) dlopen and friends to get at the symbols, the function equivalents should be directly available without any further hackery 16:50
Also, given that curses is vaguely objecty, you might want to look at the CPointer REPR 16:52
thou arnsholt: yes, i was considering using CPointer. it turns out the doc i was reading is wrong, not *all* of the macros have function implementations. from curses.h: /* These pseudo functions are always implemented as macros: */ #define getyx(win,x,y) 16:54
there *is* a non-portable function available in ncurses, so i could just cheat and use that. thanks for the tip about single-element CArray, that makes sense
16:55 zhutingting left
PerlJam seems like zavolaj should provide handy aliases for the one-element CArray of int and str 16:55
(assuming that works) 16:56
16:59 dakkar left 17:02 bbkr1 left
jnthn I suspect it should make the "is rw" syntax map to that trick :) 17:03
17:18 crab2313 joined 17:20 snearch joined 17:23 seldon joined 17:32 MayDaniel_ left 17:33 nodmonkey joined 17:35 GlitchMr joined 17:39 birdwindupbird joined
[Coke] colomon: so close. 17:39
"Impl", "pass","fail","todo","skip","plan","spec"
+# 07/16/2012 - rakudo++ (22933); niecza (89.88%); pugs (39.63%)
+"niecza", 20613, 1, 738, 1472, 22824, 24361
+"pugs" , 9089, 0, 3338, 1603, 14030, 24223
+"rakudo", 22933, 8, 645, 1829, 25415, 24361
rakudo is failing tests in : S06-routine-modifiers/lvalue-subroutines.rakudo S19-command-line/dash-e.t 17:40
niecza failed one test: niecza failed: S19-command-line/dash-e.t 17:41
colomon [Coke]: works fine on my system
[Coke] r: say 22933*.4-9089 17:42
p6eval rakudo 1fe39c: OUTPUT«84.2␤»
17:45 kst joined
sorear good * #perl6 17:47
colomon: pong
colomon sorear: .... GIVE ME A Minute to swap back into my main memory in the issue I had found. 17:48
ah, in Utils.pm 17:49
you switched it to proto sub is_run(|$) is export { * }
17:49 localhost left
colomon (six months ago) 17:49
in niecza, that gives you
Unsupported use of | with sigil; nowadays please use | without sigil at /Users/colomon/tools/niecza/t/spec/packages/Test/Util.pm line 7:
------> proto sub is_run(|$⏏) is export { * }
dunno if that is a concern or not, but I thought I should point it out. 17:50
thou is there a way to declare attribute has Int $.y is rw, such that $object.y += 1 will call method y(Int $val) { call_sub_with($val); } ?
17:50 MayDaniel joined
thou i think i can declare method y() is rw { ... }, but how do i hook that up to get the $val and do something with it? 17:51
colomon is having one of those days.... precipitated a 40-minute tantrum at the grocery store by not buying cookies with cream ice cream sandwiches
sorear thou: you can do Proxy.new(FETCH => sub () { fetch; }, STORE => sub ($new_val) { store; }) 17:52
17:52 REPLeffect left
sorear s:g/sub/method/ 17:52
thou sorear: ah, Proxy. ok, thanks. is this ... idiomatic, or is it generally considered smelly code? 17:53
sorear colomon: we decided that |$foo was subtly wrong because the object being bound wasn't _really_ a scalar
thou: it's idiomatic code, but the relevant spec parts are a bit smelly imo
thou ok :-)
sorear colomon: so the spec got changed to allow |foo, with |$foo as an obsolescent compatibility form 17:54
colomon: if rakudo supports |foo, change it, otherwise #OK use of | with sigil
jnthn It doesn't yet :( 17:58
After I'm done with QAST, I should really look at that. 17:59
Will need to leave in compat for the old way too I guess...
17:59 dukeleto left 18:02 PacoAir joined 18:05 REPLeffect joined
thou sorear: rakudo isn't recognizing $new_val, it's saying it's not declared at the STORE => method($new_val) line. do you happen to know if that's a rakudo bug or ? any existing Proxy code out there? 18:07
18:08 snearch left
thou hmmm, github.com/perl6/roast/blob/master...rs/proxy.t ; looks correct according to that 18:09
colomon sorear++
18:11 tyatpi joined 18:12 dukeleto joined 18:13 dukeleto left
thou ah, i had syntax error, needed method ($foo) # Space before parens 18:14
18:15 Chillance joined 18:17 telex joined 18:20 dukeleto joined 18:24 cognominal_ joined 18:27 cognominal left 18:28 sirrobert left
arnsholt thou: (sorry, went afk for a while) If there're normal functions available, I'd go for those for a first implementation 18:37
Worry about the finer points later
Also, are there many other curses implementations in active use that aren't ncurses? 18:38
thou right. no, i don't think so
sorear arnsholt: pdcurses? maybe bsd curses 18:39
geekosaur System V curses (Solaris, HP/UX, etc.)
sorear is BSD curses actually a thing? my osx system seems to have ncurses 18:40
geekosaur freebsd, hence os x, went to ncurses years ago. I don't know what netbsd or openbsd do 18:43
arnsholt Yeah, no idea about the other BSDs, but FreeBSD is definitely ncurses 18:46
And I guess we can consider Solaris (or whatever it's called at this point) and HP/UX marginal ATM =)
geekosaur more to the point might be that there are some windows curses implementations based on pdcurses instead of ncurses 18:47
arnsholt That's a good point, though
sorear colomon: hmm, I kind of thought that a <( b <( c was undefined behavior 18:52
colomon sorear: all I know is it is spectested. You can take that for exactly what it is worth. 18:53
(explicitly spectested, I mean, not just an accident)
sorear ah.
if it's spectested, it's not undefined behavior 18:54
colomon or someone mistakenly wrote a spectest. :) 18:55
18:56 daxim left
PerlJam It seems fine to me. 19:01
19:01 GlitchMr left 19:03 fibo joined, fibo left 19:04 rurban joined
rurban parrot master and rakudo nom: /usr/src/parrot/rakudo-git/nqp/src/ops/nqp_dyncall_ops.c:3578: undefined reference to `_dlLoadLibrary' 19:05
diakopter there was recently a fix to nqp for dyncall build errors 19:06
tested on strawberry and activeperl.. not cygwin
rurban I'm on debian now and did --gen-nqp
diakopter oh
rurban no wait. this is cygwin... 19:07
I'm testing many machines with tomorrows parrot-4.6.0 release
Is rakudo closed already also or can I try to fix cygwin? 19:08
jnthn rurban: I'm guesisng it's NQP that needs the fix; there's still time for a cygwin patch. 19:09
19:12 brrt joined
rurban This one? github.com/perl6/nqp/commit/62b9fc9f16 19:13
19:13 dukeleto left
tadzik thou: sure 19:19
thou: did you see Perl6-MPD or whathisname?
thou: github.com/tadzik/perl6-MPD/blob/m...lib/MPD.pm 19:20
thou tadzik: yes, but it just uses NativeCall on existing mpd library, doesn't package an extra .c source file and compile that to a lib
tadzik oh, right
then NativeCall uses that, methinks
in its tests
thou other NativeCall users do the same, i haven't seen any that have to supply their own
ah, hmmm
tadzik yeah, me neither
you were talking about curses. Do you hate macros as well? :) 19:21
thou: github.com/jnthn/zavolaj/tree/master/t has C files which it compiles (I think)
thou i'll look at that
rurban dyncall creates elf objects files on cygwin. nice. 19:25
19:26 dukeleto joined 19:30 not_gerd joined
not_gerd hello, #perl6 19:30
19:30 brrt left
not_gerd rurban: NQP should build on Cygwin (at least it did 4 days ago) 19:31
rurban For now the cygwin workaround for dyncall is quite heavy, make in all 3 dyncall subdirs and mv the build_out files into .
19:33 brrt joined
rurban but maybe I have left some elf files there... 19:36
19:37 brrt left 19:38 sudokode left 19:40 cognominal_ left, brrt joined
brrt r: pir::load_language("NQP") 19:40
p6eval rakudo 1fe39c: OUTPUT«"load_language" couldn't find a compiler module for the language 'NQP'␤ in block <anon> at /tmp/Gl7PP8Uh3d:1␤␤»
rurban yes, my fault. make didn't pick up the arch change after rsync. 19:41
brrt r: pir::load_language("nqp")
p6eval rakudo 1fe39c: OUTPUT«"load_language" couldn't find a compiler module for the language 'nqp'␤ in block <anon> at /tmp/oug0XEgF_E:1␤␤»
rurban p Configure.pl --gen-nqp; mkdir /usr/local/lib/parrot/4.6.0/languages/nqp: Permission denied
Should'nt there be a sudo check? 19:42
19:42 cognominal joined
rurban with installed parrot 19:42
sudo make install for --gen-nqp is needed 19:46
moritz yes, would be nice to have an option that does sudo on install 19:51
19:52 mauke left, mauke joined 20:01 Timbus joined, sivoais joined
rurban make test for rakudo/nom on debian and cygwin ok with installed parrot-4.6.0 20:01
dalek ast: 6d2b72c | (Pawel Pabian)++ | S06-multi/redispatch.t:
change test to avoid comparing rakudo-specific error messages
20:14
ast: 2f85a48 | (Pawel Pabian)++ | S03-operators/precedence.t:
avoid checking rakudo-specific error

I could not use X:: here as it still throws X::AdHoc. I also could not switch to eval_dies_ok as evaluated code has "die" in it - it will be impossible to say if code died to compilation failure or die inside caused it. So I reversed test logic and I'm checking if die in evaluated code was not executed by comparing $! value after eval.
ast: e9acfaf | (Pawel Pabian)++ | S12-subset/subtypes.t:
avoid checking rakudo-specific error in test

Remains fudged for Niecza but with different reason.
20:15
bbkr I'm not sure how to modify github.com/perl6/roast/commit/84fa...fd5ddf1ae1 test to be Niecza-compatible 20:17
masak bbkr++ # nice work on tests 20:19
moritz bbkr: is that behavior specced?
or is that a limitation in rakudo?
nr: class A { has Array $x .= new }; A.new 20:20
p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method ctxzyg in type Method␤ at /home/p6eval/niecza/src/NieczaPassSimplifier.pm6 line 162 (run_optree @ 8) ␤ at /home/p6eval/niecza/src/NieczaPassSimplifier.pm6 line 19 (NieczaPassSimplifier.invoke_incr @ 5) ␤ at …
..rakudo 1fe39c: OUTPUT«===SORRY!===␤Cannot use .= to initialize an attribute at line 2, near " }; A.new"␤»
sorear bbkr: proper form these days is to smartmatch on types like X::Foo
bbkr: this doesn't work on niecza, I know :| but it's clearly the right way going forward
moritz sorear: do you think the example above (has Type $.x .= new) should work? 20:21
sorear moritz: Yes
moritz then the proper thing is to test that it works
and then both rakudo and niecza fail the test
except that rakudo has the nicer error message 20:22
bbkr I'll reverse test logic and fudge it for Rakudo and Niecza
sorear good point, I wasn't even looking at the test itself :D
moritz: saying that Rakudo has the nicer error message implies that Niecza has an error message at all, which I would dispute :D
moritz sorear: it prints something in the case of an error, so I'd call it an "error message" :-) 20:23
bbkr also RT should be reopened here, am I right?
moritz yes
rurban debian 64bit: t/spec/S32-io/IO-Socket-INET.t Failed tests: 1-17
moritz woah 20:24
rurban: can you paste the output from running ./perl6 -Ilib t/spec/S32-io/IO-Socket-INET.t please?
erm, better to nopaste :-)
rurban cygwin has only some filespec tests and dash-e.t failing
sure. just redoing it
[Coke] masak: pugs spectesting back up and running. Now we just need someone to write some haskell. ;) 20:26
masak [Coke]: :)
[Coke]: my first priority is still $grant, sadly.
20:26 alester joined
rurban 'No such method 'encoding' for invocant of type 'Socket' 20:26
masak but I'm not averse to writing Haskell.
speaking of nothing, `git add -i` FTW! \o/ 20:27
rurban moritz: nopaste.snit.ch/148448 No such method 'encoding' for invocant of type 'Socket'
20:28 spaceships left
[Coke] your mention of grant reminds me to poke pmichaud for a grant report. 20:29
masak I was just bitten by a logical bug -- sprintf not matching the number of args to the number of directives.
20:29 bruges_ left
masak feels like the compiler is doing less than it can there. 20:29
partly because sprintf encodes a sublanguage as a dead string. 20:30
like Perl 5 does with regexes.
[Coke] "we completely rewrite regular expressions, but leave sprintf as is?"
masak :)
flussence is there any prior art we can steal? :) 20:31
masak there are several forces in play here. one the one hand, sprintf suffers from its first argument being a dead string.
20:31 bruges joined
flussence (preferably prior art that can be used in double-quoted strings without causing insanity) 20:32
masak on the other hand, it's a very convenient and useful encoding of formats, and the mixing of constant string values and directives is *deliberate* and actually the very reason we use sprintf.
but to me it looks like a slang now that I think about it.
not a string.
well, hm. 20:33
in Druid I actually built strings and passed them to sprintf. I couldn't do that (as easily) with a slang. maybe.
dalek ast: 506d0a5 | (Pawel Pabian)++ | S12-class/attributes.t:
initialization of class attribute using .= should work

IRC discussion in RT #74850
masak but most of the time I just have a constant string.
[Coke] I don't know what you mean by dead string. 20:34
seems like writing a grammar for the sprintf format would be an obvious implementation. 20:35
rurban nopaste.snit.ch/148450 cygwin fails
[Coke] (except that passing what we have to sprintf() is obviouser)
moritz rurban: which rakudo branch are you on? 20:36
rurban moritz: nom
flussence
.oO( U+1F4A1! )
jnthn moritz: When was .encoding added?
[Coke] hurls www.tcl.tk/man/tcl8.6/TclCmd/format.htm for a slightly-different-from-ANSI version of sprintf.
rurban $ g br -r origin/HEAD -> origin/nom 20:37
jnthn moritz: could the earlier drop to an earlier Parrot version have caused it?
rurban parrot did not merge the io_cleanup1 branch yet
jnthn Aye, but the .encoding method could still have been a recent addition. 20:38
masak [Coke]: dead string as opposed to a sublanguage, which is syntax-checked with the rest of the program. even Perl 5 regexes are syntax-checked. not so sprintf format strings. 20:39
diakopter you might use a new quote mechanism 20:40
rurban PERL6LIB=lib:. ./perl6 t/spec/S06-routine-modifiers/lvalue-subroutines.rakudo runs only 8 tests, not 14
moritz d0dc2d33d0a5eabc1a781b52c253d1f1d85d0a61 in branch parrot-iocleanup1 20:42
+ $PIO.encoding(nqp::unbox_s(PARROT_ENCODING(self.encoding)));
looks like it might have caused that issue
rurban And one more issue: "SEGV in Parrot_CallContext_get_pmc_keyed_int" (61 lines) at nopaste.snit.ch/148452 20:43
moritz but, I have no idea if/how that commit made it into rurban++'s nom branch
20:43 tyatpi left
moritz rurban: what does 'git describe nom' say on your rakudo repo? 20:43
rurban Ooh. I see the problem. my fault. sorry 20:44
g diff origin/nom.. has this line added. $PIO.encoding(nqp::unbox_s(PARROT_ENCODING(self.encoding)));
moritz rurban: I'm relieved that I didn't mess up nom then :-) 20:45
rurban I'll redo all the rakudo tests now. I'm relieved also. Sigh
moritz it won't have any effect on non-socket tests
[Coke] masak: if I am bored I'll write up a grammar that matches the tcl one I sent. 20:46
moritz wow, that segfault is what, 4 nested runloops deep?
masak r: my %h = foo => 1, bar => 2; .say for (%h ==> map { .value })
p6eval rakudo 1fe39c: OUTPUT«1␤2␤»
masak r: my %h = foo => 1, bar => 2; .say for (%h ==> grep { .value == 2 })
p6eval rakudo 1fe39c: OUTPUT«"bar" => 2␤»
masak r: my %h = foo => 1, bar => 2; .say for (%h ==> map &key) 20:47
p6eval rakudo 1fe39c: OUTPUT«Cannot call 'map'; none of these signatures match:␤:(&code, *@values)␤␤ in block <anon> at /tmp/B0n2MdXjsl:1␤␤»
rurban 4 is my record :)
masak r: my %h = foo => 1, bar => 2; .say for (%h ==> map key)
p6eval rakudo 1fe39c: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&key' called (line 1)␤»
masak oh!
rurban I count even 5
masak r: say key (foo => 1)
p6eval rakudo 1fe39c: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&key' called (line 1)␤»
masak that explains it.
why is 'keys' a builtin sub but not 'key'?
flussence just throwing some ideas around: gist.github.com/3124942 20:48
moritz masak: because p5 has hashes, but no pairs
20:48 spider-mario joined
moritz masak: and we don't have subs for every possible method in every type below Cool 20:49
20:49 kaare_ left
masak I've often felt that we builtinize too few of them. never felt that we builtinize too many. 20:50
20:50 MayDaniel left
moritz feels the exact other way round 20:51
masak it's a good thing we're both on the project, then. :)
moritz too few masaks and too many moritzes
or so :-)
sorear the problem with methods is that it's very difficult for the optimizer to statically prove that they haven't been overridden
20:51 not_gerd left
masak aye. 20:52
sorear "I guuess that makes me masak"
moritz well
masak I'm not favoring one over the other.
I'm saying we're not being very consistent about which methods we builtinize.
moritz in rakudo, we usually re-dispatch the sub form to the method form
so we don't get any speed benefit from the sub form
rurban with pair you mean something like a cons cell?
moritz rurban: yes
r: say (a => 1).WHAT 20:53
p6eval rakudo 1fe39c: OUTPUT«Pair()␤»
sorear but perl 6 does _not_ use cons lists
moritz ... except when you do :-)
masak unless you build them from Pairs.
rurban I see. Maybe I can add that to the coretypes of hash with fixed-size 1. github.com/rurban/coretypes 20:54
sorear moritz: there are complicated issues with this in niecza, mostly reducing to "what dynamic scopes is &take allowed to cross?"
20:56 snearch joined
rurban still: S06-routine-modifiers/lvalue-subroutines.rakudo loops into an recursion at test 9 20:57
brrt moritz: are your logs searchable?
moritz brrt: yes-ish
brrt great
moritz brrt: there's a "search" link, but the search isn't very good
20:58 fridim_ joined, dukeleto left 20:59 PacoAir left 21:12 skids left 21:21 birdwindupbird left 21:22 nodmonkey left 21:24 brrt left 21:29 tyatpi joined 21:32 tyatpi left 21:34 fridim_ left
thou i have what seems like a bug to me, but maybe i'm not understanding scope / closure right: friendpaste.com/53MKnWboUIKj7JwCqIQ5FW 21:50
i'd expect the $!repr attribute to be available in the anonymous sub that's assigned to the FETCH param in Proxy.new 21:51
jnthn thou: Which if you'd written an anonymous sub there would be fine. :)
thou but i have to alias it, or else i get an error. in this simplified test, i get an error "Native call expected object with CPointer representation, but got something else", which is a pretty nice error
jnthn thou: But it's an anonymous method.
So it gets its own self. 21:52
thou oh, right
hmmm, why *would* i want an anonymous method?
thou checks if sub works OK
jnthn It'll work, but you probably need to take a $cont arg extra or some such
thou copied from sorear++ and from S06 without understanding 21:53
i got a segfault w/ my more complex (Term::Curses) code instead of that nice error message
sorear I suspect that Proxy.new takes methods because someone wasn't thinking quite straight when they wrote that part of S06
jnthn sorear: That is also rather possible :)
thou i see on google old (2005-era) code using -> $val { pointy block }, which is prettier imo 21:55
i wonder if it would be possible to simplify all this with something like: has $.foo :STORE({ store-func }) sugary adverbial goodness 21:59
or is that just another layer of indirection that'd be confusing
sorear I like is STORE 22:00
maybe would be better to do 'is trigger'
projects I'd like to do someday, partial list: go through the lists of Moose core and MooseX features and port as many as possible to Perl 6 22:01
'trigger' is the Moose core adverb that does what you want
thou ah, good point, i guess Moose has gotten some real-world feedback on this
mauke heh. stealing perl6 ideas back from perl5?
sorear mauke: it's more like stealing from perl6, since Moose was started by Pugs hackers 22:02
I consider everyone who works on Moose today part of the perl6 community 22:03
s/<( perl6/broader/
masak hm. not sure about that.
well, they're part of the Perl community that likes to think of Perl 6 as something serious. 22:04
lol, I blog'ded! strangelyconsistent.org/blog/july-1...he-scenery
sorear moritz: I kind of dozed off yesterday, sorry :| 22:05
masak bbkr++ # I'm catching p6c emails, and you're everywhere, writing spectests 22:10
22:10 alester left 22:14 cognominal left 22:15 cognominal joined 22:17 snearch left 22:20 bluescreen10 left 22:28 mucker left 22:31 cognominal left, cognominal joined 22:32 sergot left 22:44 crab2313 left 22:50 raiph joined 22:54 seldon left 22:59 Coleoid joined 23:01 skids joined, Chillance left 23:22 awwaiid left, awwaiid joined
masak 'night, #perl6 23:27
23:35 tokuhiro_ joined 23:48 thelazydeveloper left 23:53 benabik left 23:54 Vlavv` left 23:57 spider-mario left