»ö« 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:00 Guest91403 left 00:01 am0c_ joined 00:07 molaf__ joined 00:11 molaf_ left 00:12 araujo joined, araujo left, araujo joined 00:22 fsergot joined 00:32 Chillance left 00:39 cogno joined 00:42 ksi left, PacoAir left 00:43 PacoAir joined 00:56 cogno left 01:02 am0c_ left, am0c joined 01:10 icwiener left 01:16 nallar left 01:17 wolfman2000 joined 01:26 spetrea left 01:37 sftp left 01:38 sftp joined, cognominal left, cognominal joined
[Coke] # 01/13/2012 - niecza at 97.37% 01:46
rakudo is pulling away.
01:55 buubot_backup joined 02:00 tokuhirom left 02:16 panterax left 02:28 thou left 02:30 thou joined 02:33 cooper left 02:43 cooper joined 02:51 thou left 02:54 cooper left, cooper joined 02:59 godfrey999 joined 03:12 PacoAir left 03:13 godfrey999 left 03:16 alvis left 03:23 jaldhar joined 03:29 alvis joined
colomon [Coke]: nooooooo! 03:31
03:36 orafu left, orafu joined 03:41 whiteknight left, Patterner left 03:43 Psyche^ joined, Psyche^ is now known as Patterner
colomon niecza: class A { has $.a; multi method new(Int $a) { self.bless(*, :$a); }; }; A.new(:a(20)); say "alive" 03:50
p6eval niecza v13-246-g1ae3990: OUTPUT«Unhandled exception: No candidates for dispatch to new; candidates are:␤ ␤ at /tmp/HvHmEw2feQ line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2993 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2994 (module-CORE @ 59)…
colomon nom: class A { has $.a; multi method new(Int $a) { self.bless(*, :$a); }; }; A.new(:a(20)); say "alive"
p6eval nom 9493f9: OUTPUT«alive␤»
04:15 benabik left 05:02 aindilis joined 05:40 marvin_gardens joined
marvin_gardens hello 05:40
TimToady howdy doo 05:41
marvin_gardens I like perl but every time I tell anyone about it they tell me that I am wasting my time 05:42
and it seems like perl6 is never going to come out
sorear 1. you need to find better people to tell
2. perl6 came out a couple years ago but nobody noticed 05:43
araujo perl6 is pretty much a reality since few years now I think .... several implementations for it
marvin_gardens wikipedia says that it is still in development
and perl.org is linking perl5 05:44
05:44 xinming joined
marvin_gardens where is learning perl 6? 05:45
araujo marvin_gardens, there are already perl6 implementations if you want to start using it
perl6.org 05:46
I think perl.org will _always_ link to perl5 , since perl6 is a whole new language
I don't know, my opinion, someone else could tell you better
here.... 05:47
marvin_gardens are there any big projects using perl6, will I be able to get a job with it, or is it going to be a fringe language?
araujo marvin_gardens, checked perl6.org now? 05:50
marvin_gardens I am looking at it
TimToady rosettacode.org/wiki/Modular_expone...ion#Perl_6 05:51
05:52 xinming left, xinming joined
TimToady there are already two big projects using Perl 6, called rakudo and niecza 05:53
Woodi it's little cheating :) 05:54
TimToady you will be able to get a job with it, if not today, then someday
marvin_gardens I believe those are the implementations of perl6?
Woodi marvin_gardens: but big parts of rakudo in niecza are in perl6
TimToady and it will be a fringe language until it isn't
Woodi rakudo and niecza, ofc 05:55
marvin_gardens: you would like to write something bigger in perl6 ? 05:56
TimToady: I realy think perl6 can start like perl1 - by do usefull scripts here and there. and later move up :) 05:57
marvin_gardens I am mostly writing simple programs right now in perl5
TimToady we will eventually take over various ecological niches for which Perl 6 is suitable and the best choice 05:58
Woodi marvin_gardens: than you can try perl6 too :)
TimToady Perl 6 has much more potential than Perl 5, I think 05:59
but it also takes more time to do something greater
araujo TimToady, takes more time?
TimToady so we expect Perl 6 to take over slowly but surely 06:00
Woodi TimToady: I do not like restricting Perl6 to grammar-like things... 06:01
TimToady who said we were?
Woodi no one realy, just /me thinks it is now 06:02
TimToady look at rosettacode.org/wiki/Category:Perl_6 and you'll see very few grammar-like things among the 401 examples
Woodi becouse grammar-like things are new niche, already filled by perl6 :) 06:03
I just saying about my impression, that grammars are easy here and rest little shy... 06:04
TimToady well, it's what we needed first, so is most developed 06:05
sorear marvin_gardens: if you want to be treated as a serious programmer, you need to know at least five languages. Don't worrry about the fact that Perl6 isn't used much yet 06:06
06:06 sayu joined
marvin_gardens it just seems like every time I mention perl I get attacked as old fashioned 06:07
Woodi TimToady: is it possible to implement perl6 compiler by making first grammar engine (lexer/tokenizer) and later perl6 specs on it ?
araujo 5 industry languages, and 5 fringe languages for being a more real programmer
Woodi marvin_gardens: do not worry :) if you know perl ppls will need you assistance sooner or later :) 06:08
marvin_gardens haha
TimToady Woodi: I don't understand what you're asking that would be different from what we already have
marvin_gardens perl5 has literally saved my company 10 or thousands of dollars
10s of thousands
but it is hard to justify going forward with perl5 when everyone else is saying python 06:09
Woodi I was once in situation that Oracle admin needed some fine grained time functionality and my Recipes Book was on the shelf :) 06:10
TimToady: maybe I do not know architecture of rakudo/niecza then... just thinking about grammar engine in C which allow to implement Perl6 features... something like peg/leg 06:12
marvin_gardens: thes days ppls use many languages
marvin_gardens that's true 06:13
Woodi so C/C++/Perl/lua/...
maybe always was like that ? :) except 90s ? :)
Woodi wonders how look like Perl6 architecture pictured with boxes and ractangles...[3~ 06:15
marvin_gardens why do the while loops have "repeat" in front of them? 06:19
TimToady only if the condition is to be tested at the end 06:20
06:21 tokuhirom joined
marvin_gardens is there a perldoc.perl.org for perl6? 06:22
this www.learningperl6.com/ is not encouraging 06:24
TimToady see perl6.org/documentation/ 06:25
marvin_gardens thanks for the help guys 06:29
is there anything you think I should tell the world about perl or perl6 before I go? 06:30
I guess I wont say anything 06:34
goodbye 06:35
sorear shrug. you seem like a lost cause already
bye, and good luck
marvin_gardens not really
I would love to be able to defend perl
or perl6
I am just looking for ammunition 06:36
and not finding much
I still really like perl though
but it seems at risk 06:37
or becoming disused
anyways thanks 06:38
and goodbye
06:38 marvin_gardens left
Woodi why perl seems to be defended in ppls eyes ? 06:46
bonsaikitten because it gets the job done 06:49
Woodi about static bug finding: cacm.acm.org/magazines/2010/2/69354...code-later imagine something like this for Perl6 when few more compilers will be developed :) 06:54
moritz \o 06:58
cognominal this post about a mistranslation in lemonde may interest some of you : plus.google.com/116438127795030726872/posts 07:11
07:17 sayu left
sorear perl 6 is a really bad language for any kind of static analysis 07:30
07:33 GlitchMr joined
moritz sorear: I disagree 07:33
sorear: static analysis isn't always about proving facts about your code. If you just want to find potential bugs, you can just ignore the fact that an &eval can change a lot 07:34
07:36 tokuhirom left 07:48 am0c left
sorear That's assuming you figure out a way to parse the code in the first place. 07:55
moritz aye 07:56
I must admit that the complexity of the language is likely a big hurdle
not a conceptual one, but still one that matters greatly in real life
dalek ast: 7eca192 | moritz++ | S03-operators/overflow.t:
RT #77016
07:59
ast: e63d42f | moritz++ | S04-declarations/my.t:
presence/absence of routines is checked before run time
08:06
ast: d193348 | moritz++ | S04-declarations/my.t:
avoid printing to STDOUT
08:10 tokuhirom joined
moritz nom: { my $caught = 0; CONTROL { default { $caught = 1 } }; warn "foo"; say $caught } 08:14
p6eval nom 9493f9: ( no output )
moritz why doesn't this run the "say"?
oh, because I didn't resume execution
(having a test plan)++
dalek ast: b775a42 | moritz++ | S32-basics/warn.t:
test interaction of &warn with CATCH and CONTROL
08:16
moritz nom: .ord.say for <[ ]> 08:40
p6eval nom 9493f9: OUTPUT«91␤93␤»
moritz nom: say chr 92
p6eval nom 9493f9: OUTPUT«\␤»
moritz nom: say chr 80 08:43
p6eval nom 9493f9: OUTPUT«P␤»
moritz nom: say chr 90
p6eval nom 9493f9: OUTPUT«Z␤»
moritz nom: say chr 94 08:44
p6eval nom 9493f9: OUTPUT«^␤»
dalek ast: 94c01b3 | moritz++ | S05-metasyntax/charset.t:
test char class + backslashed character
08:50 cognominal_ joined 08:52 cognominal left 08:54 Trashlord joined
Woodi sorear: looks even C is bad for static analysis - the biggest problem coverity have was differences in flavours of C in used compilers. and it is why I bring that link here, to language-still-under-development forum... maybe something can be changed before many Perl6 dialects appear 09:00
09:01 xinming left
Woodi know about STD++ :) 09:01
moritz Woodi: maybe you're not aware of it, but we put huge efforts into harmonizing the different Perl 6 compilers 09:08
why do you think we have such a big test suite? :-)
09:10 snearch joined 09:19 MayDaniel joined 09:20 feb joined 09:25 MayDaniel left 09:26 feb left 09:39 cognominal joined 09:42 cognominal_ left
Woodi moritz: just see that C looks like small and simple language and so many problems. and Coverity had a lot of human-lvl problems, eg.: use-after-free found - answer: "So ? It will crash. We will get a call." :) 09:47
09:48 kaare_ joined
Woodi moritz: it is as usual - I just talking in hope some helping-bits will be toggled... 09:48
actually static analyse is mainly about apps code checking. maybe there is one more problem which can be pre-resolved ? 09:50
moritz and as usual, that talk isn't very enlightening, because there's not much new in there 09:58
Woodi ok, for me was. especially problems with ppls :) 10:01
10:04 hundskatt joined 10:20 mj41 joined 10:21 donri joined 10:33 panterax joined 10:34 Chillance joined 10:49 panterax left 10:54 birdwindupbird joined 10:55 sayu joined 11:00 birdwindupbird left 11:02 panterax joined 11:09 MayDaniel joined 11:12 birdwindupbird joined 11:17 RobiX joined 11:18 birdwindupbird left 11:22 nebuchad` is now known as nebuchadnezzar
jnthn afternoon, #perl6 11:34
11:35 JimmyZ_ joined 11:38 whiteknight joined
jnthn nom: say 665 - 91 11:43
p6eval nom 9493f9: OUTPUT«574␤»
jnthn moritz++
11:56 spine joined 12:13 baest_ is now known as baest 12:14 MayDaniel left 12:20 sayu left 12:44 sayu joined
dalek ast: 6344a7c | moritz++ | S06-signature/named-parameters.t:
fix scoping bug in eval_dies_ok usage
12:48
12:49 nick joined
nick hi perl6 ~ 12:49
moritz hi
12:49 nick is now known as Guest55442
moritz uhm, seems there's much more to clean in that test file... 12:49
12:50 protorom joined
dalek ast: 2671796 | moritz++ | S06-signature/named-parameters.t:
fix an scoping bug in eval_dies_ok usage, and remove two outdated tests
12:50
12:51 protorom left
Guest55442 nom can do this before: my $f = open 'file' ;my @a= $f.lines 12:52
today i compile nom; it can't do that
moritz why not? what's the problem?
$ ./perl6 -e 'my $f = open "README"; my @a = $f.lines; say @a.elems; say @a[0]' 12:53
88
Rakudo Perl 6
Guest55442 just stop.
moritz seems fine here
Guest55442: you mean it loops infinitely?
for what does "just stop" mean?
Guest55442 can't got array...and loop 12:54
moritz Guest55442: please show the code you're running, and show the output you get, and tell us what you expect instead 12:55
Guest55442 my $f = open 'file'; for $f.lines {.say} fail today
moritz how does it fail?
does it produce no output? or an error message? or does it hang? 12:56
Guest55442 > my $f = open 'z' IO.new(ins => 0, chomp => Bool::True, path => "z") > my @a= $f.lines
and stop
no error message 12:57
moritz well, you didn't print anything
so it's not surprising if you don't get any output
or are you running it interactively?
Guest55442 but I can't got an array.
12:57 tokuhirom left
moritz my $f = open 'z' IO.new ... is a syntax error 12:57
nom: my $f = open 'z' IO.new(ins => 0, chomp => Bool::True, path => "z") 12:58
Guest55442 no no
p6eval nom 9493f9: OUTPUT«===SORRY!===␤Confused at line 1, near "my $f = op"␤»
mj41 Hi. Perl 6 and Parrot links updated perl6.cz/wiki/Perl_6_and_Parrot_links#2011 ... also statistics tapir2.ro.vutbr.cz/P6aP-links/stats.html ... 2011 only 165 links ( 2010 ... 314, 2009 ... 374)
Guest55442 my $f = open 'z'
output:IO.new(ins => 0, chomp => Bool::True, path => "z")
> my @a= $f.lines
no output no errormessage 12:59
jnthn Odd, I just tried it here on README and it gave me all the stuff in the file.
moritz Guest55442: does a file named 'z' exist in your current directory?
jnthn: same here
Guest55442 yes
moritz Guest55442: what happens when you run say @a.perl; 13:00
jnthn Guest55442: Try: say 'z'.IO.e
Guest55442 no @a ,it just stop there
i t can't do anything.. must CTRL+C quit perl6 13:01
moritz Guest55442: how many lines are in file z? 13:02
Guest55442 'z'.IO.e Bool::True 13:03
jnthn OK, so the file certainly exists.
moritz: In theory, it should be lazy...
Guest55442 6 lines
moritz it seems that rakudo tries to read the entire file first :/
jnthn: but it isn't :/
jnthn :/
moritz that's very weird
it shouldn't take long to read those 6 lines
jnthn aye 13:04
moritz: Is it the assignment that does it? is a for loop over the file lazy
?
masak g'day #perl6 13:19
colomon o/ 13:24
dalek ast: dca54e3 | (Solomon Foster)++ | S12-construction/new.t:
Fudge for niecza.
13:28
ecza: 19352d3 | (Solomon Foster)++ | t/spectest.data:
Turn on S12-construction/new.t.
13:29
13:42 raiph joined
dalek ast: 398132a | (Solomon Foster)++ | S12-methods/method-vs-sub.t:
Fudge for niecza.
13:44
ecza: 512fece | (Solomon Foster)++ | t/spectest.data:
Turn on S12-methods/method-vs-sub.t.
13:45
colomon .... wow, t/spec/S12-construction/destruction.t seems to be testing whether or not GC destroys the object , rather than if the destruction is done properly. Ugh. 13:52
masak definee "done properly". 13:53
define*
colomon it's supposed to be testing that DESTROY methods fire in the proper order and things like that. 13:54
masak oh, within the class hierarchy for the same object? 13:55
yeah, that would be a good thing to test.
it's hard to do *any* kinds of tests that expect the GC to do something without an explicit user-level GC.fire() method.
tadzik good morni... afternoon 13:58
colomon masak: that's the thing. the test just tries to create some more objects and hope that the GC destroys the earlier ones. If it doesn't, the tests all fail because no destructor has ever executed. 14:01
masak g'afternoon, tadzik
colomon: non-deterministic tests aren't good tests.
colomon masak: my point precisely 14:03
14:04 nallar joined
masak Fowler has a nice longish bliki article about exactly that. martinfowler.com/articles/nonDeterminism.html 14:04
colomon masak: okay, here's another interesting one 14:09
S12-construction/BUILD.t
niecza has a whole lot of errors along the lines of 14:10
"Virtual call $.parent-counter may not be used on partially constructed object"
That seems to be to be a pretty valid complaint
If you switch it to $!parent-counter, it works without complaint.
jnthn BUILD should always use $!. 14:13
colomon is niecza correct that you can't do a virtual call on a partially constructed object? 14:14
jnthn S12 has some wording to the effect that compilers should warn on that, iirc. 14:15
14:15 sayu left
jnthn std: class A { has $.x; submethod BUILD() { $.x = 42 } } 14:16
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Virtual call $.x may not be used on partially constructed object at /tmp/DP0zVTILSh line 1:␤------> class A { has $.x; submethod BUILD() { ⏏$.x = 42 } }␤Check failed␤FAILED 00:01 112m␤»
colomon that seems to call the entire test file into question, every single BUILD submethod uses . to fetch either an attribute or a method.
jnthn Yeah, it's staright out of STD
Though STD is inconsistent with the spec there because it fails Check, whereas S12 says it should just be a warning. 14:17
masak aye, the rule is submethod:method::slot:accessor
14:18 Guest55442 left
colomon Even with everything changed to $! access, the tests fail in niecza because the child is trying to access the parent's $! attributes. :( 14:19
afk # morning ski!
jnthn ...uh. :/
(that test file)-- then
Rakudo would complain just the same about that.
14:27 kaare__ joined, kaare_ left
colomon but Rakudo is running the file, because it doesn't fail on the $. accesses. 14:29
probably everything could be trivially rewritten to be using global variables instead of class attributes. 14:30
jnthn colomon: It shouldn't fail, but it should warn 14:31
...well, depending on if you believe S12 or STD ;0
colomon this is why having two implementations is a Good Thing 14:32
afk # gone skiing for real this time 14:35
14:56 JimmyZ_ left, nallar is now known as nallar|afk, JimmyZ joined 15:06 JimmyZ left 15:10 shinobicl___ joined 15:20 icwiener joined
masak on Tuesday the 24th this month, I will give a Perl course at a company. at the end of it, I'll give a one-hour tour of Perl 6. 15:32
15:32 fsergot left
masak basically presenting Perl 6 to a bunch of Perl 5 people. 15:32
15:42 snearch left 15:47 RobiX left
colomon I got passed by a dogsled with a team of six huskies on my ski this morning! 15:48
15:48 JimmyZ joined 15:55 zhangkaizhao joined 15:56 zhangkaizhao left, zhangkaizhao joined 15:57 mj41 left 15:59 am0c joined, GlitchMr42 joined 16:01 autark joined 16:02 GlitchMr left 16:03 autark left 16:05 dr-ank-M joined 16:14 Trashlord left 16:16 shinobicl___ left, Trashlord joined 16:17 arlinius left 16:20 PacoAir joined, dr-ank-M left, arlinius joined, dr-ank-M joined 16:21 JimmyZ left 16:22 pmurias joined
pmurias sorear: ping 16:25
sorear: i'm unbitrotting the p5 interop in niecza 16:27
masak wow!
colomon pmurias++
pmurias sorear: what do you think is the right aproach for freezing/thawing p5 objects?
masak pmurias++
pmurias how do I enable line numbers in C# code in exceptions in niecza? 16:36
s/exceptions/exception traces/
16:39 nallar|afk is now known as nallar
masak phenny: "nallar"? 16:41
phenny masak: "Bruins" (sv to en, translate.google.com)
masak "Bruins"? huh?
colomon Bruins?
nallar someone told me it means horseshoes in turkish, if that helps.
google translate disagreed.
masak phenny: en sv "teddy bears"? 16:42
phenny masak: "nallar" (en to sv, translate.google.com)
masak there we are :)
colomon only knows the word Bruins from en.wikipedia.org/wiki/Boston_Bruins
dalek ast: 6caab9a | (Solomon Foster)++ | S12-construction/BUILD.t:
Complete reworking of tests to remove dependency on calling class methods during BUILD.
16:46
ecza: dcdb0d2 | (Solomon Foster)++ | t/spectest.data:
Turn on S12-construction/BUILD.t.
16:47
TimToady go UCLA!
pmurias UCLA?
TimToady also Bruins
jnthn back 16:48
colomon bruin |ˈbroōin|
noun
a bear, esp. in children's fables.
jnthn colomon: Does the re-worked test also run fine on Rakudo?
colomon jnthn: I didn't check, but I imagine so
it's simpler, on the whole
colomon doesn't have a current nom build atm.... 16:50
jnthn Hm, it ran up to test 7 our of 8, and the 8th one needed me to have ICU 16:51
oh, and you fudged that one...
colomon It was already fudged, I didn't change the last test at all 16:52
except for to add niecza fudging
jnthn ah, ok
colomon Maybe TimToady++ can give us an opinion on spec versus std here. :) 16:53
jnthn is happy to have an opinion before he implements it one way or tother. :)
TimToady opinion on which? 16:56
colomon std: class A { has $.x; submethod BUILD() { $.x = 42 } }
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Virtual call $.x may not be used on partially constructed object at /tmp/UBTm2m477g line 1:␤------> class A { has $.x; submethod BUILD() { ⏏$.x = 42 } }␤Check failed␤FAILED 00:01 112m␤»
colomon should be warning or error?
jnthn TimToady: S12 says error. STD says check fail.
er
S12 says *warning*. STD says check fail.
colomon hopes TimToady has had his morning coffee-like-beverage 16:57
TimToady std: class A { has $.x; submethod BUILD() { self.x = 42 } } 16:58
p6eval std dc62e1d: OUTPUT«ok 00:01 112m␤»
TimToady arguably either an inconsistency or an escape hatch...
colomon :\ 16:59
jnthn Eep
I'm pretty sure Rakudo has those two compiled down to the same thing by the time I'd want to implement the analysis... 17:00
TimToady on the one hand, Liskov would say we should allow partial virtual methods; on the other hand, it nearly always indicates a thinko, and an inefficiency when we're setting our own attributes 17:02
pmurias sorear: ping 17:03
TimToady so a warning is probably most appropriate, especially if easily suppressible via #OK or self.x
colomon TimToady: you can always use $!x... 17:04
jnthn TimToady: I'm a tiny bit uneasy about the $.x vs self.x distinction
TimToady that's the point
masak too
TimToady whether they're thinking of it as an attribute or a virtual method call
jnthn TimToady: The point is to make me uneasy? :P
TimToady well, that's beside the point :P
17:05 am0c left
jnthn (how they're thinking of it) hm, good point. 17:05
TimToady I think it's a useful psychological distinction
jnthn What about things of the form $.foo(4,2) ?
17:05 GlitchMr42 left
masak what's a use case for calling a public method in a submethod? -- I asked this and immediately thought of a case: deriving class needs to get/set attribute of base class. 17:05
jnthn Also 17:06
has $.c = $.a + $.b; # is this warned about also?
That is, is the method we generated on the RHS actually a method, or a submethod?
TimToady STD doesn't, afaik
but probably should be consistent with BUILD semantics 17:07
jnthn std: class A { has $.a; has $.b; has $.c = $.a + $.b }
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Variable $.a used where no 'self' is available at /tmp/_odt_h6ucV line 1:␤------> class A { has $.a; has $.b; has $.c = ⏏$.a + $.b }␤Variable $.b used where no 'self' is available at /tmp/_odt_h6ucV line 1:␤------> […
TimToady it's infrastructural, like BUILD
jnthn std: class A { has $.a; has $.b; has $.c = $!a + $!b }
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Variable $!a used where no 'self' is available at /tmp/jxNvCkt_ju line 1:␤------> class A { has $.a; has $.b; has $.c = ⏏$!a + $!b }␤Variable $!b used where no 'self' is available at /tmp/jxNvCkt_ju line 1:␤------> […
TimToady yes, well...
jnthn Ah, above is problematic 17:08
TimToady STD isn't quite done yet :)
jnthn That's why I didn't steal STD's partial invocant stuff into Rakudo
colomon the above doesn't actually make any sense, does it?
jnthn (I started trying and then hit this, and it wasn't obvious how to fix it.)
colomon: The second one should work
colomon I mean, you're adding two uninitialized variables together...
masak colomon: not at all. that's a thunk.
jnthn colomon: My assumption is you did A.new(a => 1, b => 2)
colomon and $.c's thunk is run AFTER the other two are initialized?! 17:09
jnthn colomon: yes
colomon: Attribute initialization happens in order
17:10 dr-ank-M left
masak .oO( or we could run them all simultaneously, and beat APL in how golfed one could make Game of Life... ) 17:10
geekosaur letrec 17:11
colomon ....so if I have a BUILD submethod, are attributes initialized before or after it?
jnthn Defaults are applied afterwards
17:12 thou joined
jnthn And only if the BUILD didn't touch the attribute itself. 17:12
colomon so all those tests in BUILD.t were wrongly assuming they were initializing the attributes before BUILD ran. sigh. :)
and everything we're discussing should be a test in BUILD.t, right? ;) 17:13
17:14 JimmyZ_ joined
jnthn We probably need better test coverage, yes 17:14
17:30 kmwallio joined 17:44 MayDaniel joined 17:46 Trashlord left 17:55 JimmyZ_ left 18:04 GlitchMr joined
pmurias sorear: i'm having trouble in casting to IForeignInterpreter in eval_perl5 in Builtins.cs 18:07
sorear: could you check that the Makefile is correct?
18:09 zhangkaizhao left 18:10 nallar is now known as Ross 18:16 Ross is now known as nallar
colomon phenny: tell sorear Any hints on how to do ~~ Real and call a class method from niecza's C# code? If I can do those, I think I can get a lot of the Bridge code running.... ;) 18:18
phenny colomon: I'll pass that on when sorear is around.
18:20 MayDaniel left, thou left
jnthn colomon: ooc, what blocks Bridge stuff working in nom these days? 18:20
(if anything...) 18:21
colomon jnthn: geez, I've just assumed it was working!
18:22 sayu joined
colomon niecza's issues are because of the special handling for many of the number operators / methods. 18:22
tadzik Bridge? 18:26
colomon nom: say 10.Bridge 18:28
p6eval nom 9493f9: OUTPUT«10␤»
18:31 kboga joined
dalek ast: 0185636 | (Solomon Foster)++ | S12-methods/submethods.t:
Remove pointless "lives_ok" test which was causing trouble for Niecza. Fudge for Niecza.
18:33
ecza: b5cd39e | (Solomon Foster)++ | t/spectest.data:
Turn on S12-methods/submethods.t.
18:34
kboga iirc Real is still a class in nom (instead of a role), I suppose thats why nom can't run the S32-num/real-bridge.t tests yet.
jnthn colomon: oh, maybe it is working, I'm sure we have a test fudged related to it though
OH
OK, then any(I, somebody) should fix that :)
huh, Numeric is too
kboga yep, its one of the todo things in the NOMMAP too. 18:35
18:35 geekosaur joined
kboga eh, should get back to fourier & friends now... 18:35
18:36 kboga left
jnthn OK 18:38
jnthn takes a look at it
dalek kudo/nom: 4197625 | jnthn++ | src/ (4 files):
Make Numeric into a role, as it should be.
18:46
18:56 icwiener left, icwiener joined 18:57 muixirt joined
muixirt hi 18:58
jnthn o/ 19:00
colomon: Ugh. Numeric becoming a role was easy. Real becoming one causes a bunch of test failures, though at least they're all in obviously numerics related test files. 19:03
muixirt rakudo: class Dog { }; say ^Dog
p6eval rakudo 419762: OUTPUT«use of uninitialized variable $max of type Dog in numeric context␤0..^0␤»
jnthn dinner, bbl 19:04
19:09 icwiener left
masak hm... does ^Dog still mean Dog.HOW ? 19:12
TimToady Dog.HOW($obj,
well, Dog.HOW(Dog, in this case 19:13
masak I thought we had Dog.^foo for expressing that thought. 19:14
why do we also need ^Dog.foo ?
TimToady nevermind, I'm just confused this morning 19:15
19:15 spine left
masak oh phew. 19:16
did ^Dog ever mean Dog.HOW, though? or have I just dreamt that? 19:17
19:17 GlitchMr42 joined 19:18 GlitchMr left, GlitchMr42 is now known as GlitchMr
muixirt well it's a range, right? The LTA error message confused me :-) 19:20
19:21 raiph left
arnsholt Is Grammar.parse($text, :rule<foo>) implicitly anchored at the beginning of the string? 19:24
colomon has always assumed the answer is yes... 19:25
19:25 Trashlord joined
masak arnsholt: it makes a lot more sense than that magic residing in TOP, that's for sure. 19:29
jnthn If there's magic, it's in .parse 19:32
hm
masak oh, there's magic ;)
I agree putting the magic in .parse makes a whole lot of sense.
jnthn masak: No, you're not imagining things...at least, not in this case :)
Actually it turns out the magic isn't in .parse, though. That's the "normal" case. 19:33
It's the "need to scan" case that is special.
so /.../ does "magic" :)
S03 still says that ^Dog is Dog.HOW 19:34
masak I hear ya, but am having trouble accepting it for some reason :)
what's the use case for ^Dog being Dog.HOW?
jnthn While it would be all of 30 seconds to implement that, I'd like to argue that we instead can this behavior. :)
It: 19:35
masak can I remove it from the spec? can I? can I? :P
jnthn 1) Is useless due to precedence. You always want to call a method on a meta-object.
TimToady yes, you may
masak breathes excitedly like a ^Dog
jnthn 2) ...ok, I had more good arguments. :)
TimToady++
masak axes
jnthn I think the reasoning was something about it being the "domain of the object" or some such. 19:36
It was cute at the time. :)
dalek kudo/real-trouble: 9c69e07 | jnthn++ | src/ (7 files):
Initial changes to make Real into a role. Breaks tests, though they all seem to fail in the same kind of way.
19:37
jnthn phenny: tell moritz I changed Numeric to a role. It was trouble-free. I did similar with Real, and it fails various tests. If you fancy having a look, see the real-trouble branch; feel free to toss it back to me if you don't have a good idea of a fix. 19:39
phenny jnthn: I'll pass that on when moritz is around.
jnthn phenny: ask moritz are there any branches you've started that are blocked on me taking a look at them?
phenny jnthn: I'll pass that on when moritz is around.
arnsholt Right. In that case, what's the right incantation to call a rule in a different package via m//? /<My::Package::my-rule>/ doesn't seem to be it 19:40
TimToady try <&My::Package::my-rule> 19:42
dalek kudo/nom: 4553a58 | jnthn++ | NOMMAP.markdown:
Update NOMMAP; really want to get rid of this and fold it into ROADMAP before the next release.
jnthn And if you do, be sure that the other package declares the rule you want to do that to with "our"
dalek ecs: bf4c011 | masak++ | S (2 files):
[S03, S12] ^Dog no longer means Dog.HOW

Use the Dog.^foo form when you want to call methods on Dog's metaclass.
This makes prefix:<^> unambiguously mean 0 ..^ $something, with no weird exception for type objects.
19:43
19:43 birdwindupbird joined
jnthn TimToady: What should <My::Package::my-rule> do? Is it basically like <LANG(My::Package, 'my-rule')>? 19:43
19:43 kmwallio left
jnthn Apart from not LANG because that only looks at %*LANG 19:43
But similar concept.
masak++ 19:44
masak I love making the spec smaller :D
muixirt masak: and better error handling wrt prefix:<^> would be nice 19:48
jnthn nom: ^Int 19:49
p6eval nom 419762: OUTPUT«use of uninitialized variable $max of type Int in numeric context␤»
jnthn yeah, could be better
masak now we can make it a "deprecated" error instead :P
jnthn masak: No, it should really just warn in a better way 19:50
Probably before it tries to construct the range
muixirt nom: my $t; say ^$t
p6eval nom 419762: OUTPUT«use of uninitialized variable $max of type Any in numeric context␤0..^0␤»
masak aye.
arnsholt TimToady: Cheers, that seems to do the trick. Now to figure out the next thing I've done wrong =D 19:56
19:56 snearch joined
dalek ast: bbc3c0a | (Solomon Foster)++ | S12-class/open.t:
Fudge for niecza.
19:58
20:00 arlinius left
dalek ecza: fa23c48 | (Solomon Foster)++ | t/spectest.data:
Turn on S12-class/open.t.
20:01
20:01 arlinius joined 20:04 y3llow_ joined, pothos_ joined 20:06 pothos left, y3llow left 20:07 y3llow_ left, y3llow joined, pothos_ left 20:08 pothos joined
colomon niecza: NoSuch::Subclass.new() 20:08
p6eval niecza v13-246-g1ae3990: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/a6IbuphFee line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2993 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2994 (module-CORE @ 5…
dalek ast: 7a7bca4 | (Solomon Foster)++ | S12-class/instantiate.t:
Fudge for niecza.
20:09
20:09 y3llow left
masak nom: A::B.new; class A::B {} 20:09
p6eval nom 4553a5: OUTPUT«Could not find symbol 'A::&B'␤ in block <anon> at /tmp/wXn2bv6TzY:1␤ in <anon> at /tmp/wXn2bv6TzY:1␤»
20:09 y3llow joined
masak \o/ 20:09
dalek ecza: c102694 | (Solomon Foster)++ | t/spectest.data:
Turn on S12-class/instantiate.t.
20:10
20:10 pothos left 20:11 pothos joined 20:15 mtk left 20:19 sayu left 20:31 GlitchMr42 joined, GlitchMr left, GlitchMr42 is now known as GlitchMr
colomon errr... so S16-filehandles/dir.t has "use FindBin". But it doesn't exist in roast, as far as I can. Anyone know what's up with that? 20:32
20:41 huf joined
colomon niecza: print "not ok 7 # TODO\nnot ok 8 # TODO" 20:45
p6eval niecza v13-246-g1ae3990: OUTPUT«not ok 7 # TODO␤not ok 8 # TODO»
colomon niecza: $*OUT.print: "Hello!"
p6eval niecza v13-246-g1ae3990: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤ at Run.CORE.C1081TextWriter.print (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filenam…
sorear good * #perl6
phenny sorear: 18:18Z <colomon> tell sorear Any hints on how to do ~~ Real and call a class method from niecza's C# code? If I can do those, I think I can get a lot of the Bridge code running.... ;)
colomon niecza: $*OUT.say: "Hello!"
p6eval niecza v13-246-g1ae3990: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤ at Run.CORE.C1080TextWriter.say (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filename … 20:46
pmurias sorear: hi
colomon o/, sorear
pmurias sorear: i'm having trouble debitrotting the p5 interop 20:49
sorear: would it be possible that a different IForeignInterpreter is being linked against in P5Interpreter.cs and Builtins.cs? 20:50
sorear pmurias: yes. Try changing Kernel.dll to Run.Kernel.dll on lines 59 and 60 of the Makefile 20:53
pmurias: freezing p5 objects should just throw an exception for now
colomon: (P6any).Does(Kernel.RealMO); to call a class method, use a type object 20:54
pmurias sorear: thanks, that works 20:57
pmurias hates build systems 20:58
sorear I agree
21:03 GlitchMr left
dalek ecza: 59c6a7b | (Paweł Murias)++ | / (2 files):
Unbitrot perl5 interopability.
21:05
21:06 huf left, huf joined
pmurias sorear: did the perl5 interop work on your machine previously? 21:07
masak pmurias, sorear: have you come across cr.yp.to/redo.html ?
pmurias masak: just saw it 21:10
jnthn Question on constant folding 21:11
say 1 + 1; multi infix:<+>(1, 1) { 3 } # What is the output of this? :) 21:12
masak 3.
pmurias perl6: say 1 + 1; multi infix:<+>(1, 1) { 3 }
p6eval rakudo 4553a5: OUTPUT«2␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "1"␤ expecting formal parameter or ")"␤ at /tmp/WbcEkN63OR line 1, column 28␤»
..niecza v13-246-g1ae3990: OUTPUT«===SORRY!===␤␤Lexical symbol '&infix:<+>' is already bound to an outer symbol (see ??? line 0);␤ the implicit outer binding at line 1 must be rewritten as &infix:<+>␤ before you can unambiguously declare a new '&infix:<+>' in this scop…
pmurias perl6: say 1 + 1; multi infix:<+>($a, $b) { 3 }
masak submits rakudobug
p6eval pugs b927740, rakudo 4553a5: OUTPUT«2␤» 21:13
..niecza v13-246-g1ae3990: OUTPUT«===SORRY!===␤␤Lexical symbol '&infix:<+>' is already bound to an outer symbol (see ??? line 0);␤ the implicit outer binding at line 1 must be rewritten as &infix:<+>␤ before you can unambiguously declare a new '&infix:<+>' in this scop…
jnthn masak: no, wait.
masak :)
jnthn This is exactly the point I wanted to make.
masak yes, and you're wrong :P
jnthn If the answer is to be 3, you're saying that we can never constant fold until we've parsed the entire compilation unit.
sorear I'm suprised niecza gets this one as right as it does.
jnthn sorear: I like Niecza's answer, fwiw. 21:14
pmurias jnthn: constant folding shouldn't change the result of a program
masak niecza's answer is very sane, yes.
pmurias: exactly!
but now that I think about it, Niecza is right.
jnthn pmurias: perl 6 has funny definition of constant folding that we should probably call something else.
masak it shouldn't be anything.
sorear masak++ ^Dog
21:14 huf left 21:15 huf joined
masak , destroyer of spec 21:15
masak :Vishnu::spec:world
pmurias jnthn: he optimizer is allowed to start 21:16
making these optimizations after the main program's C<CHECK> time
jnthn: so the spec only allows constant folding after the whole unit is parsed
jnthn pmurias: I'd love it if things were that simple. :) But I'm sure we've discussed situations where constant folding is more than optimization.
pmurias: Spec ref?
Also: does STD parse -1 as a literal, or as a prefix and a literal? 21:17
sorear Prefix and literal.
jnthn OK
So here's where I ran into this fun
nom: enum Foo (a => 1, b => 2) 21:18
p6eval nom 4553a5: ( no output )
jnthn nom: enum Foo (a => -1, b => 2)
p6eval nom 4553a5: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near ""␤»
pmurias jnthn: S06:2881
jnthn This makes it a bit hard to define Order. :)
pmurias: Thanks. 21:19
dalek ast: a43df14 | (Solomon Foster)++ | S16-io/print.t:
Partial fudge for niecza.
jnthn pmurias: Yes, that does seem relevant here.
sorear: How does Niecza handle defining enum Order?
pmurias jnthn: yes, there are a few places where if i remember correctly either a constant or a expression which constant folds is accepted
jnthn pmurias: Yeah, that's where I'm going with this. Because this demands constant folding *before* CHECK time. 21:20
masak guten nacht, #perl6 21:21
pmurias we could do conservative constant folding before CHECK time
and do so more folding after CHECK time
s/so/some/
jnthn pmurias: What makes it "conservative"?
pmurias "convervative" = "what you can implement easily" 21:22
sorear jnthn: Right now, it doesn't.
jnthn sorear: ah, OK :)
sorear jnthn: What I'm planning to do is make the stuff after enum implicitly BEGIN
but that runs into some issues because the compiler can't see the definition of Pair in the setting 21:23
pmurias jnthn: one possible trick would be if we are forced to make assumptions, make them and check them at CHECK time
sorear and I'm still trying to find an elegant way to handle that
21:23 huf left
jnthn sorear: I fear just running the whole thing under BEGIN would give me even more circularity fun :) 21:23
jnthn realizes that the place he just defined Order in the setting is before it defines prefix:<->(Int) :/ 21:24
(not that I have the folding yet anyway, mind...)
pmurias jnthn: and raise an error "hey we had to make some assumptions to compile your program and you broke them" ;) (or some more than awesome version of that) 21:25
jnthn pmurias: May be possible, though tricky.
.oO( Thank $deity I didn't try and do Bool as an enum in the setting... )
21:26
21:26 huf joined
colomon so what exactly do I get in niecza if I "make perl5"? 21:29
sorear colomon: you get a .so file, which if the stars align right can be used to make eval(:lang<perl5>) work 21:30
the whole system is not very reliable, and I'm not planning to make a big fuss over it until pmurias or I figures out how to make it reliable
colomon so it doesn't enable :p5 matching? 21:32
pmurias not yet 21:33
sorear: the problem with the .so is that shared and static libraries don't mix on some systems?
sorear pmurias: that's one of the problems 21:34
pmurias what are the others?
sorear it doesn't work very well if you like to use niecza from several directories 21:35
it requires a C compiler
it doesn't work on Windows for unknown reasons
colomon (I asked because there are about 1000 tests that should work once rx:p5 comes on-line.
21:36 muixirt left
sorear I'm pretty sure make perl5 should have nothing to do with rx:P5 21:36
jnthn had been planning it as just another frontend to the Perl 6 regex engine. 21:37
pmichaud++ prototyped that out long ago
sorear rx:P5 needs to make Perl 6 match objects, which means it really really shouldn't be invoking libperl.so
colomon ah
pmurias sorear: re "... from several directories" i had a partly done solution for that 21:38
colomon Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: obj/p5embed.so 21:39
pmurias colomon: what platform?
colomon Seems I have Perl5Interpreter.dll instead of obj/p5embed.so
OS X
pmurias colomon: you don't have obj/p5embed.so?
after 'make perl5'? 21:40
colomon oh, I do!
huh
so why didn't it find it?
I'm in the root niecza directory 21:41
sorear No clue, but this is part of what I mean by 'unreliable'
pmurias different .so lookup rules
colomon unless fudgeandrun and/or prove are changing my effective directory at some point 21:42
sorear wait, what? 21:43
ah, S01-perl-5-integration?
colomon sorear: I got that error trying to run the ... yes
I get the same error if I niecza> eval('1', :lang<perl5>) from the root niecza directory 21:45
pmurias colomon: i think the library lookup rules are different under OS X 21:46
pmurias is searching for the right docs 21:47
21:49 kaare__ left, Trashlord left, kaare__ joined
pmurias sorear: re lack of C compiler is that a big issue? 21:53
sorear I think so 21:55
but not really avoidable :|
21:57 kaare__ left
geekosaur OS X doesn't like to use library paths a la ld.so; it likes to see paths compiled in as part of the dylib/so reference 22:04
you might be able to use DYLD_FALLBACK_LIBRARY_PATH, but it really wants a full pathname (not even relative) 22:07
22:07 birdwindupbird left
pmurias sorear: a perl5 without a C compiler isn't fully functional 22:09
geekosaur: the full pathname can contain a .so? 22:10
s/contain/end with/
dalek ecza: 0440b71 | sorear++ | src/niecza:
When a proto is exported, automatically export the corresponding multis
22:12
geekosaur I think it can, it's just not recommended 22:14
(since .so implies ELF shared object, and OS X doesn't support ELF)
colomon full path name doesn't seem to help for me, with or without .so
22:15 mj41 joined
pmurias colomon: you chainged all mentions of obj/p5embed.so in Perl5Interpreter to a full path? 22:17
and typed 'make perl5' after that?
22:17 donri left
colomon yes, and the error message I get includes my new path 22:18
pmurias colomon: could you paste the error message? 22:19
colomon Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: /Users/colomon/tools/niecza/obj/p5embed
\
(That's the without .so version) 22:20
22:21 _jaldhar joined, jakky_ joined
pmurias colomon: and the file exists? 22:24
colomon yes
Wynne:niecza colomon$ ls -l obj/p5embed.so
-rwxr-xr-x 1 colomon staff 1638396 Jan 14 16:29 obj/p5embed.so
sorear could try using ktrace to confirm the file name that mono is looking for
it's been a while since I used that so I don't remember the syntax; man ktrace and man kdump 22:25
dalek kudo/nom: d2999d7 | jnthn++ | src/Perl6/ (2 files):
Circularity sawing so we can have enums in CORE.setting.
22:26
kudo/nom: bd28c07 | jnthn++ | / (2 files):
Sketch out a very basic constant folder.
kudo/nom: 3a6f65c | jnthn++ | src/Perl6/ConstantFolder.pm:
Fix thinko.
kudo/nom: e33ee02 | jnthn++ | src/Perl6/ (2 files):
Use the constant folder on enum values. Note that the hack in Perl6::World means this code is *only* safe for use in this particular case for now (the folder is general, the code in World is not).
kudo/nom: d3f0caf | jnthn++ | src/core/Int.pm:
Add Order enumeration to CORE.
pmurias colomon: maybe try renaming the .so file to .dylib? 22:27
colomon ... doesn'twork without an extension .... 22:29
sorear colomon: I'm curious what ktrace has to say
colomon doesn't work with
ktrace? 22:30
sorear man ktrace
man kdump
it will show you the system calls Mono/dyld makes
in particular, there will be a few calls to open() that return ENOENT 22:31
colomon I don't have ktrace. :(
I do seem to recall using a similar program, however.
geekosaur dtrace on modern OS X
colomon dtrace, I think maybe?
geekosaur er, dtruss
sorear I used ktrace on OS X 10.3 or 10.4 22:32
listen to geekosaus
r
geekosaur yeh, that was taken from freebsd. in 10.5 Apple switched to dtrace, and the dtrace version is dtruss
sadly this will probably require root :/ I never did figure out the correct way to make dtrace usable by mortals
dalek kudo/nom: d1c15fc | jnthn++ | src/core/Int.pm:
Er, helps to get Increae and Decrease the right way around. :-)
sorear geekosaur: what, stock OSX doesn't allow syscall tracing by nonroot? 22:33
geekosaur (it's restricted because it can be used to do things like snoop on kernel I/O buffers containing typed passwords)
not any more it doesn't
colomon sorry guys, busy in last minutes of cooking dinner. Not sure when I'll get a chance to figure out dtruss 22:34
sorear is it possible to do syscall tracing on OSX using the strace methodology? (debugger API, break on all syscalls and dump arguments then)
arnsholt nom: grammar Foo { rule foo { a } }; "bar" ~~ m/<&Foo::foo>/; # Rakudobug?
sorear does OSX restrict gdb to root?
p6eval nom 4553a5: OUTPUT«use of uninitialized value of type Any in string context␤»
arnsholt sorear: Not AFAIK
sorear arnsholt: to which? 22:35
jnthn arnsholt: That ain't gonna work.
geekosaur theoretically yes, in practice you need to build libbfd/binutils/gdb from their git-or-whatever repo because released versions have severe bugsin their Mach-O support
jnthn If it will, it'll need an "our" on rule foo
nom: grammar Foo { our rule foo { a } }; "bar" ~~ m/<&Foo::foo>/; 22:36
p6eval nom 4553a5: OUTPUT«Nominal type check failed for parameter ''; expected Foo but got Cursor instead␤ in regex foo at /tmp/3hcWcpRiBc:1␤ in method INTERPOLATE at src/gen/CORE.setting:7344␤ in regex <anon> at /tmp/3hcWcpRiBc:1␤ in method ll-match at src/gen/CORE.setting:3488␤ in metho…
jnthn Then there's taht.
*that
sorear geekosaur: are you saying gdb is restricted to root, or...?
arnsholt Yeah, I just discovered
geekosaur gdb is not restricted to root, it just doesn;t work right :/
tadzik doesn't Order:: win us some spectests? 22:37
jnthn tadzik: Yes, once we updated <=> and cmp to use it
tadzik S03-operators/comparison.t possibly
sorear I love how the race is finally on ;)
is niecza back to 95% yet?
arnsholt Oh well, I'll just do it the basic way 22:38
22:38 snearch left, whiteknight left, jaldhar left, cooper left, fridim left, jakky left
dalek ecza: 899f28d | sorear++ | src/niecza:
Fix export logic for the protos themselves
22:39
geekosaur is rather annoyed by the state of debugging on lion :/ 22:40
(and that apple ships a gdb that DOESN'T WORK)
TimToady enums are constants and so must be done at BEGIN tine
jnthn tadzik: Yes, that's the test file. Feel free to work on updating <=> and cmp. Don't think I've the energy for it this evening. 22:42
22:42 cooper joined, snearch joined
jnthn TimToady: Yes, that's just why I did a first cut constant folder... :) 22:43
22:43 whiteknight joined
tadzik jnthn: okay, I'm on it 22:43
jnthn (Yes, it uses the same interpreter as runtime. Yes, it looks in the right lexical scope for the correct candidate list. :-))
TimToady was just backing you up :)
jnthn ah :)
arnsholt geekosaur: What's broken with gdb in Lion? 22:44
jnthn is more used to being told off :P
tadzik jnthn: btw, how for is "speeding up the compile time" on your TODO? :)
TimToady is obviously a lousy leader :)
jnthn is obviously a lousy compiler hacker :)
sorear arnsholt: it can't read Mach-O files reliably 22:45
jnthn tadzik: High.
sorear 14:35 < geekosaur> theoretically yes, in practice you need to build libbfd/binutils/gdb from their git-or-whatever repo because released versions have severe bugsin their Mach-O support
tadzik \o/
jnthn tadzik: I've been working on QRegex stuff, with help from kshannon++. In theory that can get us faster parsing.
sorear speeding up the compile time is on the top of my todo. however I CAN'T FIGURE OUT HOW 22:46
jnthn tadzik: After that it's QAST, and the serialization stuff.
tadzik: Over half the PAST nodes we make when compiling CORE.setting are ones we shouldn't have to.
tadzik huh
jnthn Yeah. :)
22:46 simcop2387 left
tadzik well, I shouldn't probably be very suprised :) 22:47
jnthn I really should work on the serialization stuff soon. I've put it off quite a while. It's mostly just fiddling and boring.
*fiddly
sorear by Q3 2012, nom will be faster than niecza at both compile time and runtime, but niecza will pass more spectests
jnthn sorear: Hmm, curious prediction.
22:47 simcop2387 joined
jnthn sorear: How do you think we're going to get faster at runtime, ooc? 22:47
.oO( this is one way not to have to figure it out ;-) )
sorear jnthn: Gradual typing analysis, better use of native types, Lorito stuff 22:48
jnthn True, I've got a long way to go on gradual typing.
Lorito? Is...is that still moving? :) 22:49
tadzik jnthn: <=> on Mu compares reprs, iiuc. Should False in this case become Increase, or Decrease?
sorear It's an unknown.
jnthn tadzik: er...what is it today?
compares reprs? What does that mean? :)
nom: Mu <=> Mu
p6eval nom 4553a5: OUTPUT«No applicable candidates found to dispatch to for 'infix:<<=>>'. Available candidates are:␤:(int $a, int $b)␤:(num $a, num $b)␤:(Int:D\$a, Int:D\$b)␤:(Num:D\$a, Num:D\$b)␤:(Instant:D $a, Instant:D $b)␤:(Date:D $a, Date:D $b)␤:(Real\$a, Real\$b)␤:(Any\$a, Any\$b)␤␤ in…
jnthn nom: Any <=> Any 22:50
p6eval nom 4553a5: OUTPUT«use of uninitialized value of type Any in numeric context␤use of uninitialized value of type Any in numeric context␤»
tadzik erm
pir::perl6_container_store__0PP($a, $b)
whatever that is :)
jnthn ...what?
tadzik (sub infix:<=>(Mu \$a, Mu \$b))
oh
jnthn tadzik: That's assignment operator
:)
tadzik wait
dang
pmurias sorear: re making p5 interop reliable would having an option in the Makefile to build a p5 with the proper linking and version help?
jnthn hands tadzik++ an extra beer
tadzik okay, I'm blind :P
oh, a friendly reminder!
tadzik tssk!s 22:51
now I'm ready
sorear pmurias: Unsure.
jnthn :)
22:53 panterax left, panterax joined
geekosaur it can *read* Mach-O fine, generation is what fails (which is why no binutils but only Apple's tools). but debugging is weird, in particular if you try to step through (including the implicit stepping done when you just want function entry/exit) and it tries to call into a dylib, it gets lost 22:55
22:56 snearch left
tadzik > Order ~~ Enum 22:56
Bool::False
-_- 22:57
jnthn tadzik: That's...not what Enum does :)
nom: say Pair ~~ Enum
p6eval nom 4553a5: OUTPUT«Bool::True␤»
jnthn It's parent of Pair
nom: say Order.^mro 22:58
p6eval nom 4553a5: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Order' called (line 1)␤»
jnthn oh, not re-built yet.
tadzik Order() Int() Real() Cool() Any() Mu()
okay
jnthn Looks like it.
arnsholt nom: say "[]" ~~ m/<-[[\]]>/
jnthn Enumeration types "inherit" from their base type.
p6eval nom 4553a5: OUTPUT«#<failed match>␤»
tadzik there's an at_key on class Enum. I'm trying to avoid either allocating a new [Decrease, Same, Increase] array on every <=> call or creating a chain of if-elsifs in those 22:59
sorear Why is Real a class?
jnthn sorear: Hysterical raisons
tadzik so I was looking for something like Order.at_key(nqp::cmp_I() + 1)
arnsholt nom: say "[]" ~~ m/<[\W]-[[\]]>/
p6eval nom 4553a5: OUTPUT«=> <[>␤␤»
jnthn sorear: It got put in before I'd got roles in shape.
sorear Not raisins? Ok
22:59 az5112 joined
jnthn sorear: Will be a role soon. 23:00
az5112 What is the most elegant way to read the _last_ array element? I'm using @arr[ @arr.end ] but maybe there is a more succinct way?
jnthn @arr[*-1]
az5112 tx
jnthn tadzik: Oh, hmm
tadzik so, since Enum has at_key, I thought of that 23:01
jnthn tadzik: Yeah but, Enum has...less to do with enumerations that you might hope.
tadzik hah
sorear you really want a common supertype of all enums to put the enum funnybusiness in
arnsholt nom: say "[]" ~~ m/<\W-[[\]]>/
p6eval nom 4553a5: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at line 1, near "\\W-[[\\]]>/"␤»
jnthn sorear: I have a role for that. 23:02
sorear niecza has a class CommonEnum, which all enum classes multiply-inherit from
jnthn tadzik: src/core/Enumeration.pm
sorear but that's because roles in niecza predate roles
...you know what I mean
tadzik oh, there we are
jnthn ...er? :)
hehe ;)
arnsholt jnthn: Thank you so much for Grammar::Tracer =) 23:03
jnthn arnsholt: Welcome. :)
arnsholt It just saved me oodles of Aristotelic introspection of grammar code =D
jnthn arnsholt: I think it's still my favorite bit of meta-programming so far. :)
tadzik that leaves us to stuff like say Order.enums.invert.hash.{~(-1)} 23:04
which looks so-so as well
jnthn tadzik: Nie je dobre...
jnthn glances S12
tadzik jnthn: ano, takie sobie
jnthn tadzik: z S12-a: Day(3) # Wed constant, found as value 23:05
colomon geekosaur: do you know a handy dtruss command line for this? 23:06
tadzik oh
arnsholt jnthn: Oooh, nice code indeed (just looked at it). Nice example of the possibilities of fiddling with metaclasses and friends
jnthn tadzik: NYI, but it'd seem to be the ideal way
tadzik: Then it's just Order(...what we already have...)
geekosaur has lost track of what "this" is
tadzik so postcircumfix:<( )> for Enumeration? 23:07
jnthn tadzik: Yeah
tadzik which is basically .enums.invert anyway
jnthn tadzik: Yeah, though we can always try and make it more efficient later
tadzik also, invert is a List, I guess, so S12 is wrong here
geekosaur dtruss -t open -t open_nocancel ...
tadzik jnthn: I was also thinking about a Int.pm-scoped array of [Decrease, Same, Increase] 23:08
s/«a»/an/ 23:09
jnthn tadzik: Hm, not sure how to do that and not have it appear in the user's lexical scope though...
tadzik yeah
23:10 phenny left
colomon geekosaur, sorear, pmurias: I don't see any sign it's trying to open the file at all! gist.github.com/1613298 23:10
tadzik ok, I'll just do it idiomatically first, we can optimize it when it becomes a perf problem
jnthn tadzik: IMHO, let's go with the Order(...) approach.
tadzik: I get we can optimize that.
*bet
23:11 phenny joined
tadzik jnthn: so implement postcircumfix:<( )> for Enumeration and use that then? 23:11
too few arguments: 0 passed, 23871728 expected
0_o
colomon geekosaur, sorear, pmurias: Though it does seem to be doing a lot with p5 files: gist.github.com/1613304 23:12
jnthn omfg
23:12 phenny left
geekosaur hm, I wonder if you need -f in there too 23:12
jnthn tadzik: ...How'd you manage that? :)
tadzik: Yes.
(yes to postcircumfix:<( )>)
tadzik jnthn: ^D in the repl, not sure how tf did it happen ;) 23:13
23:13 mj41 left
colomon geekosaur: -t open -t open_nocancel seemed to only give me open_nocancel uses, thus the second gist 23:13
23:13 phenny joined
tadzik must've confused it with those enums :> 23:13
pmurias colomon: you renamed the file in obj/ to .dylib?
colomon pmurias: yes
pmurias ok, just making sure ;) 23:14
geekosaur yeh, I included both because I still dont know when it uses the not-_nocancel one (it does, but not often and not according to any rules obvious to me)
(I think it's related to threading)
pmurias colomon: without the -t option does it print anything? 23:15
colomon wait, paydirt
!
geekosaur that's a good point
I think it uses mmap...
sorear colomon: hold on a second, are you trying to dtruss prove? 23:16
colomon yes
gist.github.com/1613317
sorear you might have better luck dtrussing mono itself
geekosaur (hrm, but even so it should open it to get an fd and then mmap that)
colomon needed -f to follow children, that's all 23:17
geekosaur++
sorear Err#2 eh
colomon huh. looks like line 18 actually works? 23:18
sorear I'm enough of a Linux sob story to see "2" and read "ENOENT"
suprised OSX uses the same number
colomon: looks like it read out the architecture word and then abandoned the file 23:19
ISTR that Mono on OSX is built for x86
colomon possibly because dylib instead of so?
geekosaur I think error numbers < 16 or so are pretty much the same
sorear what architecture did you build p5embed.so for?
I'm guessing you may have built it as amd64 23:20
colomon whatever the default is...
sorear "file" might tell you
colomon gotta run
geekosaur linux started out way back in the beginning with the idea of maybe shuffling stuff up to catch people being nonportable, then discovered that all that accomplished was to make sure nobody ported anything...
and OS X uses the error numbers from *BSD
23:21 localhost left 23:22 localhost joined
dalek ecza: 0da5620 | sorear++ | lib/NieczaCLR.cs:
When a multi fails, display the full candidate list, not the arity-filtered and sorted one
23:34
ecza: be89d96 | sorear++ | / (2 files):
Fixes to enable imported multis to correctly make dispatchers
sorear phenny: tell colomon Test::Util works now, but you may need to delete a stale Test.Util.ser if you have one 23:35
phenny sorear: I'll pass that on when colomon is around.
dalek volaj: 26a91f4 | jnthn++ | TODO:
Remove some done items.
23:37
volaj: 4b34bad | jnthn++ | README (2 files):
Turn README into Markdown; start to improve things.
23:39 wolfman2000 left
colomon sorear++ 23:41
phenny colomon: 23:35Z <sorear> tell colomon Test::Util works now, but you may need to delete a stale Test.Util.ser if you have one
colomon sorear: 23:42
Wynne:niecza colomon$ file obj/p5embed.dylib
obj/p5embed.dylib: Mach-O 64-bit dynamically linked shared library x86_64
sorear yeah, that's your problem
try rebuilding with -m32 in the cc command line 23:43
dalek volaj: 81ff0e4 | jnthn++ | README.markdown:
Document working with pointers.
23:45
colomon sorear: still no joy. 23:47
sorear colomon: re. dyld or Test::Util? 23:48
colomon dyld 23:51
23:51 shinobicl_ joined
pmurias colomon: still the same error? 23:53
colomon yes
pmurias file obj/p5embed.dylib 23:55
colomon give me a minute, trying to pick a movie to watch with my wife. :) 23:56
pmurias ok ;) 23:57