Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-01-14

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 am0c_ joined #perl6
00:07 molaf__ joined #perl6
00:12 araujo joined #perl6
00:12 araujo joined #perl6
00:22 fsergot joined #perl6
00:39 cogno joined #perl6
00:43 PacoAir joined #perl6
01:02 am0c joined #perl6
01:17 wolfman2000 joined #perl6
01:38 sftp joined #perl6
01:38 cognominal joined #perl6
01:46 [Coke] # 01/13/2012 - niecza at 97.37%
01:46 [Coke] rakudo is pulling away.
01:55 buubot_backup joined #perl6
02:30 thou joined #perl6
02:43 cooper joined #perl6
02:54 cooper joined #perl6
02:59 godfrey999 joined #perl6
03:23 jaldhar joined #perl6
03:29 alvis joined #perl6
03:31 colomon [Coke]: nooooooo!
03:36 orafu joined #perl6
03:43 Psyche^ joined #perl6
03:50 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)…
03:50 colomon nom: class A { has $.a; multi method new(Int $a) { self.bless(*, :$a); }; }; A.new(:a(20)); say "alive"
03:50 p6eval nom 9493f9: OUTPUT«alive␤»
05:02 aindilis joined #perl6
05:40 marvin_gardens joined #perl6
05:40 marvin_gardens hello
05:41 TimToady howdy doo
05:42 marvin_gardens I like perl but every time I tell anyone about it they tell me that I am wasting my time
05:42 marvin_gardens and it seems like perl6 is never going to come out
05:42 sorear 1. you need to find better people to tell
05:43 sorear 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
05:43 marvin_gardens wikipedia says that it is still in development
05:44 marvin_gardens and perl.org is linking perl5
05:44 xinming joined #perl6
05:45 marvin_gardens where is learning perl 6?
05:45 araujo marvin_gardens, there are already perl6 implementations if you want to start using it
05:46 araujo perl6.org
05:46 araujo I think perl.org will _always_ link to perl5 , since perl6 is a whole new language
05:46 araujo I don't know, my opinion, someone else could tell you better
05:47 araujo 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?
05:50 araujo marvin_gardens, checked perl6.org now?
05:50 marvin_gardens I am looking at it
05:51 TimToady http://rosettacode.org/wiki/Modular_exponentiation#Perl_6
05:52 xinming joined #perl6
05:53 TimToady there are already two big projects using Perl 6, called rakudo and niecza
05:54 Woodi it's little cheating :)
05:54 TimToady you will be able to get a job with it, if not today, then someday
05:54 marvin_gardens I believe those are the implementations of perl6?
05:54 Woodi marvin_gardens: but big parts of rakudo in niecza are in perl6
05:54 TimToady and it will be a fringe language until it isn't
05:55 Woodi rakudo and niecza, ofc
05:56 Woodi marvin_gardens: you would like to write something bigger in perl6 ?
05:57 Woodi 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
05:58 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 :)
05:59 TimToady Perl 6 has much more potential than Perl 5, I think
05:59 TimToady but it also takes more time to do something greater
05:59 araujo TimToady, takes more time?
06:00 TimToady so we expect Perl 6 to take over slowly but surely
06:01 Woodi TimToady: I do not like restricting Perl6 to grammar-like things...
06:01 TimToady who said we were?
06:02 Woodi no one realy, just /me thinks it is now
06:02 TimToady look at http://rosettacode.org/wiki/Category:Perl_6 and you'll see very few grammar-like things among the 401 examples
06:03 Woodi becouse grammar-like things are new niche, already filled by perl6 :)
06:04 Woodi I just saying about my impression, that grammars are easy here and rest little shy...
06:05 TimToady well, it's what we needed first, so is most developed
06:06 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 sayu joined #perl6
06:06 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 ?
06:07 araujo 5 industry languages, and 5 fringe languages for being a more real programmer
06:07 Woodi marvin_gardens: do not worry :) if you know perl ppls will need you assistance sooner or later :)
06:08 marvin_gardens haha
06:08 TimToady Woodi: I don't understand what you're asking that would be different from what we already have
06:08 marvin_gardens perl5 has literally saved my company 10 or thousands of dollars
06:08 marvin_gardens 10s of thousands
06:09 marvin_gardens 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:12 Woodi 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 Woodi marvin_gardens: thes days ppls use many languages
06:13 marvin_gardens that's true
06:13 Woodi so C/C++/Perl/lua/...
06:13 Woodi maybe always was like that ? :) except 90s ? :)
06:15 * Woodi wonders how look like Perl6 architecture pictured with boxes and ractangles...[3~
06:19 marvin_gardens why do the while loops have "repeat" in front of them?
06:20 TimToady only if the condition is to be tested at the end
06:21 tokuhirom joined #perl6
06:22 marvin_gardens is there a perldoc.perl.org for perl6?
06:24 marvin_gardens this http://www.learningperl6.com/ is not encouraging
06:25 TimToady see http://perl6.org/documentation/
06:29 marvin_gardens thanks for the help guys
06:30 marvin_gardens is there anything you think I should tell the world about perl or perl6 before I go?
06:34 marvin_gardens I guess I wont say anything
06:35 marvin_gardens goodbye
06:35 sorear shrug.  you seem like a lost cause already
06:35 sorear bye, and good luck
06:35 marvin_gardens not really
06:35 marvin_gardens I would love to be able to defend perl
06:35 marvin_gardens or perl6
06:36 marvin_gardens I am just looking for ammunition
06:36 marvin_gardens and not finding much
06:36 marvin_gardens I still really like perl though
06:37 marvin_gardens but it seems at risk
06:37 marvin_gardens or becoming disused
06:38 marvin_gardens anyways thanks
06:38 marvin_gardens and goodbye
06:46 Woodi why perl seems to be defended in ppls eyes ?
06:49 bonsaikitten because it gets the job done
06:54 Woodi about static bug finding: http://cacm.acm.org/magazines/2010/2/69354-a-few-billion-lines-of-code-later    imagine something like this for Perl6 when few more compilers will be developed :)
06:58 moritz \o
07:11 cognominal this post about a mistranslation in lemonde may interest some of you : https://plus.google.com/116438127795030726872/posts
07:30 sorear perl 6 is a really bad language for any kind of static analysis
07:33 GlitchMr joined #perl6
07:33 moritz sorear: I disagree
07:34 moritz 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:55 sorear That's assuming you figure out a way to parse the code in the first place.
07:56 moritz aye
07:56 moritz I must admit that the complexity of the language is likely a big hurdle
07:56 moritz not a conceptual one, but still one that matters greatly in real life
07:59 dalek roast: 7eca192 | moritz++ | S03-operators/overflow.t:
07:59 dalek roast: RT #77016
07:59 dalek roast: review: https://github.com/perl6/roast/commit/7eca192148
08:06 dalek roast: e63d42f | moritz++ | S04-declarations/my.t:
08:06 dalek roast: presence/absence of routines is checked before run time
08:06 dalek roast: review: https://github.com/perl6/roast/commit/e63d42f802
08:06 dalek roast: d193348 | moritz++ | S04-declarations/my.t:
08:06 dalek roast: avoid printing to STDOUT
08:06 dalek roast: review: https://github.com/perl6/roast/commit/d1933480e1
08:10 tokuhirom joined #perl6
08:14 moritz nom: { my $caught = 0; CONTROL { default { $caught = 1 } }; warn "foo"; say $caught }
08:14 p6eval nom 9493f9:  ( no output )
08:14 moritz why doesn't this run the "say"?
08:14 moritz oh, because I didn't resume execution
08:14 moritz (having a test plan)++
08:16 dalek roast: b775a42 | moritz++ | S32-basics/warn.t:
08:16 dalek roast: test interaction of &warn with CATCH and CONTROL
08:16 dalek roast: review: https://github.com/perl6/roast/commit/b775a425ba
08:40 moritz nom: .ord.say for <[ ]>
08:40 p6eval nom 9493f9: OUTPUT«91␤93␤»
08:40 moritz nom: say chr 92
08:40 p6eval nom 9493f9: OUTPUT«\␤»
08:43 moritz nom: say chr 80
08:43 p6eval nom 9493f9: OUTPUT«P␤»
08:43 moritz nom: say chr 90
08:43 p6eval nom 9493f9: OUTPUT«Z␤»
08:43 moritz nom: say chr 94
08:44 p6eval nom 9493f9: OUTPUT«^␤»
08:44 dalek roast: 94c01b3 | moritz++ | S05-metasyntax/charset.t:
08:44 dalek roast: test char class + backslashed character
08:44 dalek roast: review: https://github.com/perl6/roast/commit/94c01b33a3
08:50 cognominal_ joined #perl6
08:54 Trashlord joined #perl6
09:00 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:01 * Woodi know about STD++ :)
09:08 moritz Woodi: maybe you're not aware of it, but we put huge efforts into harmonizing the different Perl 6 compilers
09:08 moritz why do you think we have such a big test suite? :-)
09:10 snearch joined #perl6
09:19 MayDaniel joined #perl6
09:20 feb joined #perl6
09:26 feb left #perl6
09:39 cognominal joined #perl6
09:47 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:48 kaare_ joined #perl6
09:48 Woodi moritz: it is as usual - I just talking in hope some helping-bits will be toggled...
09:50 Woodi actually static analyse is mainly about apps code checking. maybe there is one more problem which can be pre-resolved ?
09:58 moritz and as usual, that talk isn't very enlightening, because there's not much new in there
10:01 Woodi ok, for me was. especially problems with ppls :)
10:04 hundskatt joined #perl6
10:20 mj41 joined #perl6
10:21 donri joined #perl6
10:33 panterax joined #perl6
10:34 Chillance joined #perl6
10:54 birdwindupbird joined #perl6
10:55 sayu joined #perl6
11:02 panterax joined #perl6
11:09 MayDaniel joined #perl6
11:12 birdwindupbird joined #perl6
11:17 RobiX joined #perl6
11:34 jnthn afternoon, #perl6
11:35 JimmyZ_ joined #perl6
11:38 whiteknight joined #perl6
11:43 jnthn nom: say 665 - 91
11:43 p6eval nom 9493f9: OUTPUT«574␤»
11:43 jnthn moritz++
11:56 spine joined #perl6
12:44 sayu joined #perl6
12:48 dalek roast: 6344a7c | moritz++ | S06-signature/named-parameters.t:
12:48 dalek roast: fix scoping bug in eval_dies_ok usage
12:48 dalek roast: review: https://github.com/perl6/roast/commit/6344a7c36a
12:49 nick joined #perl6
12:49 nick hi perl6 ~
12:49 moritz hi
12:49 moritz uhm, seems there's much more to clean in that test file...
12:50 protorom joined #perl6
12:50 dalek roast: 2671796 | moritz++ | S06-signature/named-parameters.t:
12:50 dalek roast: fix an scoping bug in eval_dies_ok usage, and remove two outdated tests
12:50 dalek roast: review: https://github.com/perl6/roast/commit/267179669a
12:51 protorom left #perl6
12:52 Guest55442 nom can do this before: my $f = open 'file' ;my @a= $f.lines
12:52 Guest55442 today i compile nom; it can't do that
12:52 moritz why not? what's the problem?
12:53 moritz $ ./perl6 -e 'my $f = open "README"; my @a = $f.lines; say @a.elems; say @a[0]'
12:53 moritz 88
12:53 moritz Rakudo Perl 6
12:53 Guest55442 just stop.
12:53 moritz seems fine here
12:53 moritz Guest55442: you mean it loops infinitely?
12:53 moritz for what does "just stop" mean?
12:54 Guest55442 can't got array...and loop
12:55 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
12:55 moritz how does it fail?
12:56 moritz 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
12:56 Guest55442 and stop
12:57 Guest55442 no error message
12:57 moritz well, you didn't print anything
12:57 moritz so it's not surprising if you don't get any output
12:57 moritz or are you running it interactively?
12:57 Guest55442 but I can't got an array.
12:57 moritz my $f = open 'z' IO.new ... is a syntax error
12:58 moritz nom: my $f = open 'z' IO.new(ins => 0, chomp => Bool::True, path => "z")
12:58 Guest55442 no no
12:58 p6eval nom 9493f9: OUTPUT«===SORRY!===␤Confused at line 1, near "my $f = op"␤»
12:58 mj41 Hi. Perl 6 and Parrot links updated http://perl6.cz/wiki/Perl_6_and_Parrot_links#2011 ... also statistics http://tapir2.ro.vutbr.cz/P6aP-links/stats.html ... 2011 only 165 links ( 2010 ... 314, 2009 ... 374)
12:58 Guest55442 my $f = open 'z'
12:58 Guest55442 output:IO.new(ins => 0, chomp => Bool::True, path => "z")
12:58 Guest55442 > my @a= $f.lines
12:59 Guest55442 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.
12:59 moritz Guest55442: does a file named 'z' exist in your current directory?
12:59 moritz jnthn: same here
12:59 Guest55442 yes
13:00 moritz Guest55442: what happens when you run    say @a.perl;
13:00 jnthn Guest55442: Try: say 'z'.IO.e
13:00 Guest55442 no @a ,it just stop there
13:01 Guest55442 i t can't do anything.. must CTRL+C quit perl6
13:02 moritz Guest55442: how many lines are in file z?
13:03 Guest55442 'z'.IO.e Bool::True
13:03 jnthn OK, so the file certainly exists.
13:03 jnthn moritz: In theory, it should be lazy...
13:03 Guest55442 6 lines
13:03 moritz it seems that rakudo tries to read the entire file first :/
13:03 moritz jnthn: but it isn't :/
13:03 jnthn :/
13:03 moritz that's very weird
13:03 moritz it shouldn't take long to read those 6 lines
13:04 jnthn aye
13:04 jnthn moritz: Is it the assignment that does it? is a for loop over the file lazy
13:04 jnthn ?
13:19 masak g'day #perl6
13:24 colomon o/
13:28 dalek roast: dca54e3 | (Solomon Foster)++ | S12-construction/new.t:
13:28 dalek roast: Fudge for niecza.
13:28 dalek roast: review: https://github.com/perl6/roast/commit/dca54e30f3
13:29 dalek niecza: 19352d3 | (Solomon Foster)++ | t/spectest.data:
13:29 dalek niecza: Turn on S12-construction/new.t.
13:29 dalek niecza: review: https://github.com/sorear/niecza/commit/19352d3b63
13:42 raiph joined #perl6
13:44 dalek roast: 398132a | (Solomon Foster)++ | S12-methods/method-vs-sub.t:
13:44 dalek roast: Fudge for niecza.
13:44 dalek roast: review: https://github.com/perl6/roast/commit/398132af5d
13:45 dalek niecza: 512fece | (Solomon Foster)++ | t/spectest.data:
13:45 dalek niecza: Turn on S12-methods/method-vs-sub.t.
13:45 dalek niecza: review: https://github.com/sorear/niecza/commit/512fece46f
13:52 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:53 masak definee "done properly".
13:53 masak define*
13:54 colomon it's supposed to be testing that DESTROY methods fire in the proper order and things like that.
13:55 masak oh, within the class hierarchy for the same object?
13:55 masak yeah, that would be a good thing to test.
13:55 masak it's hard to do *any* kinds of tests that expect the GC to do something without an explicit user-level GC.fire() method.
13:58 tadzik good morni... afternoon
14:01 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
14:01 masak colomon: non-deterministic tests aren't good tests.
14:03 colomon masak: my point precisely
14:04 nallar joined #perl6
14:04 masak Fowler has a nice longish bliki article about exactly that. http://martinfowler.com/articles/nonDeterminism.html
14:09 colomon masak: okay, here's another interesting one
14:09 colomon S12-construction/BUILD.t
14:10 colomon niecza has a whole lot of errors along the lines of
14:10 colomon "Virtual call $.parent-counter may not be used on partially constructed object"
14:10 colomon That seems to be to be a pretty valid complaint
14:10 colomon If you switch it to $!parent-counter, it works without complaint.
14:13 jnthn BUILD should always use $!.
14:14 colomon is niecza correct that you can't do a virtual call on a partially constructed object?
14:15 jnthn S12 has some wording to the effect that compilers should warn on that, iirc.
14:16 jnthn std: class A { has $.x; submethod BUILD() { $.x = 42 } }
14:16 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Virtual call $.x may not be used on partially constructed object at /tmp/DP0zVTILSh line 1:�------> [32mclass A { has $.x; submethod BUILD() { [33m�[31m$.x = 42 } }[0m�Check failed�FAILED 00:01 112m�»
14:16 colomon that seems to call the entire test file into question, every single BUILD submethod uses . to fetch either an attribute or a method.
14:16 jnthn Yeah, it's staright out of STD
14:17 jnthn 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:19 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 colomon afk # morning ski!
14:19 jnthn ...uh. :/
14:19 jnthn (that test file)-- then
14:19 jnthn Rakudo would complain just the same about that.
14:27 kaare__ joined #perl6
14:29 colomon but Rakudo is running the file, because it doesn't fail on the $. accesses.
14:30 colomon probably everything could be trivially rewritten to be using global variables instead of class attributes.
14:31 jnthn colomon: It shouldn't fail, but it should warn
14:31 jnthn ...well, depending on if you believe S12 or STD ;0
14:32 colomon this is why having two implementations is a Good Thing
14:35 colomon afk # gone skiing for real this time
14:56 JimmyZ joined #perl6
15:10 shinobicl___ joined #perl6
15:20 icwiener joined #perl6
15:32 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 masak basically presenting Perl 6 to a bunch of Perl 5 people.
15:48 colomon I got passed by a dogsled with a team of six huskies on my ski this morning!
15:48 JimmyZ joined #perl6
15:55 zhangkaizhao joined #perl6
15:56 zhangkaizhao joined #perl6
15:59 am0c joined #perl6
15:59 GlitchMr42 joined #perl6
16:01 autark joined #perl6
16:03 autark left #perl6
16:05 dr-ank-M joined #perl6
16:16 Trashlord joined #perl6
16:20 PacoAir joined #perl6
16:20 arlinius joined #perl6
16:20 dr-ank-M joined #perl6
16:22 pmurias joined #perl6
16:25 pmurias sorear: ping
16:27 pmurias sorear: i'm unbitrotting the p5 interop in niecza
16:27 masak wow!
16:27 colomon pmurias++
16:27 pmurias sorear: what do you think is the right aproach for freezing/thawing p5 objects?
16:27 masak pmurias++
16:36 pmurias how do I enable line numbers in C# code in exceptions in niecza?
16:36 pmurias s/exceptions/exception traces/
16:41 masak phenny: "nallar"?
16:41 phenny masak: "Bruins" (sv to en, translate.google.com)
16:41 masak "Bruins"? huh?
16:41 colomon Bruins?
16:41 nallar someone told me it means horseshoes in turkish, if that helps.
16:41 nallar google translate disagreed.
16:42 masak phenny: en sv "teddy bears"?
16:42 phenny masak: "nallar" (en to sv, translate.google.com)
16:42 masak there we are :)
16:42 * colomon only knows the word Bruins from http://en.wikipedia.org/wiki/Boston_Bruins
16:46 dalek roast: 6caab9a | (Solomon Foster)++ | S12-construction/BUILD.t:
16:46 dalek roast: Complete reworking of tests to remove dependency on calling class methods during BUILD.
16:46 dalek roast: review: https://github.com/perl6/roast/commit/6caab9ab2e
16:47 dalek niecza: dcdb0d2 | (Solomon Foster)++ | t/spectest.data:
16:47 dalek niecza: Turn on S12-construction/BUILD.t.
16:47 dalek niecza: review: https://github.com/sorear/niecza/commit/dcdb0d2bf3
16:47 TimToady go UCLA!
16:47 pmurias UCLA?
16:47 TimToady also Bruins
16:48 * jnthn back
16:48 colomon bruin |ˈbroōin|
16:48 colomon noun
16:48 colomon a bear, esp. in children's fables.
16:48 jnthn colomon: Does the re-worked test also run fine on Rakudo?
16:48 colomon jnthn: I didn't check, but I imagine so
16:48 colomon it's simpler, on the whole
16:50 * colomon doesn't have a current nom build atm....
16:51 jnthn Hm, it ran up to test 7 our of 8, and the 8th one needed me to have ICU
16:51 jnthn oh, and you fudged that one...
16:52 colomon It was already fudged, I didn't change the last test at all
16:52 colomon except for to add niecza fudging
16:52 jnthn ah, ok
16:53 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. :)
16:56 TimToady opinion on which?
16:56 colomon std: class A { has $.x; submethod BUILD() { $.x = 42 } }
16:56 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Virtual call $.x may not be used on partially constructed object at /tmp/UBTm2m477g line 1:�------> [32mclass A { has $.x; submethod BUILD() { [33m�[31m$.x = 42 } }[0m�Check failed�FAILED 00:01 112m�»
16:56 colomon should be warning or error?
16:56 jnthn TimToady: S12 says error. STD says check fail.
16:56 jnthn er
16:56 jnthn S12 says *warning*. STD says check fail.
16:57 * colomon hopes TimToady has had his morning coffee-like-beverage
16:58 TimToady std: class A { has $.x; submethod BUILD() { self.x = 42 } }
16:58 p6eval std dc62e1d: OUTPUT«ok 00:01 112m␤»
16:58 TimToady arguably either an inconsistency or an escape hatch...
16:59 colomon :\
16:59 jnthn Eep
17:00 jnthn 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:02 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:03 pmurias sorear: ping
17:03 TimToady so a warning is probably most appropriate, especially if easily suppressible via #OK or self.x
17:04 colomon TimToady: you can always use $!x...
17:04 jnthn TimToady: I'm a tiny bit uneasy about the $.x vs self.x distinction
17:04 TimToady that's the point
17:04 * masak too
17:04 TimToady whether they're thinking of it as an attribute or a virtual method call
17:04 jnthn TimToady: The point is to make me uneasy? :P
17:04 TimToady well, that's beside the point :P
17:05 jnthn (how they're thinking of it) hm, good point.
17:05 TimToady I think it's a useful psychological distinction
17:05 jnthn What about things of the form $.foo(4,2) ?
17:05 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:06 jnthn Also
17:06 jnthn has $.c = $.a + $.b; # is this warned about also?
17:06 TimToady STD doesn't, afaik
17:06 jnthn That is, is the method we generated on the RHS actually a method, or a submethod?
17:07 TimToady but probably should be consistent with BUILD semantics
17:07 jnthn std: class A { has $.a; has $.b; has $.c = $.a + $.b }
17:07 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $.a used where no 'self' is available at /tmp/_odt_h6ucV line 1:�------> [32mclass A { has $.a; has $.b; has $.c = [33m�[31m$.a + $.b }[0m�Variable $.b used where no 'self' is available at /tmp/_odt_h6ucV line 1:�------> […
17:07 TimToady it's infrastructural, like BUILD
17:07 jnthn std: class A { has $.a; has $.b; has $.c = $!a + $!b }
17:07 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $!a used where no 'self' is available at /tmp/jxNvCkt_ju line 1:�------> [32mclass A { has $.a; has $.b; has $.c = [33m�[31m$!a + $!b }[0m�Variable $!b used where no 'self' is available at /tmp/jxNvCkt_ju line 1:�------> […
17:07 TimToady yes, well...
17:07 jnthn Ah, above is problematic
17:08 TimToady STD isn't quite done yet :)
17:08 jnthn That's why I didn't steal STD's partial invocant stuff into Rakudo
17:08 colomon the above doesn't actually make any sense, does it?
17:08 jnthn (I started trying and then hit this, and it wasn't obvious how to fix it.)
17:08 jnthn colomon: The second one should work
17:08 colomon I mean, you're adding two uninitialized variables together...
17:08 masak colomon: not at all. that's a thunk.
17:08 jnthn colomon: My assumption is you did A.new(a => 1, b => 2)
17:09 colomon and $.c's thunk is run AFTER the other two are initialized?!
17:09 jnthn colomon: yes
17:09 jnthn colomon: Attribute initialization happens in order
17:10 * masak .oO( or we could run them all simultaneously, and beat APL in how golfed one could make Game of Life... )
17:11 geekosaur letrec
17:11 colomon ....so if I have a BUILD submethod, are attributes initialized before or after it?
17:11 jnthn Defaults are applied afterwards
17:12 thou joined #perl6
17:12 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.  :)
17:13 colomon and everything we're discussing should be a test in BUILD.t, right?  ;)
17:14 JimmyZ_ joined #perl6
17:14 jnthn We probably need better test coverage, yes
17:30 kmwallio joined #perl6
17:44 MayDaniel joined #perl6
18:04 GlitchMr joined #perl6
18:07 pmurias sorear: i'm having trouble in casting to IForeignInterpreter in eval_perl5 in Builtins.cs
18:07 pmurias sorear: could you check that the Makefile is correct?
18:18 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 jnthn colomon: ooc, what blocks Bridge stuff working in nom these days?
18:21 jnthn (if anything...)
18:21 colomon jnthn: geez, I've just assumed it was working!
18:22 sayu joined #perl6
18:22 colomon niecza's issues are because of the special handling for many of the number operators / methods.
18:26 tadzik Bridge?
18:28 colomon nom: say 10.Bridge
18:28 p6eval nom 9493f9: OUTPUT«10␤»
18:31 kboga joined #perl6
18:33 dalek roast: 0185636 | (Solomon Foster)++ | S12-methods/submethods.t:
18:33 dalek roast: Remove pointless "lives_ok" test which was causing trouble for Niecza.  Fudge for Niecza.
18:33 dalek roast: review: https://github.com/perl6/roast/commit/0185636267
18:34 dalek niecza: b5cd39e | (Solomon Foster)++ | t/spectest.data:
18:34 dalek niecza: Turn on S12-methods/submethods.t.
18:34 dalek niecza: review: https://github.com/sorear/niecza/commit/b5cd39e57d
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.
18:34 jnthn colomon: oh, maybe it is working, I'm sure we have a test fudged related to it though
18:34 jnthn OH
18:34 jnthn OK, then any(I, somebody) should fix that :)
18:34 jnthn huh, Numeric is too
18:35 kboga yep, its one of the todo things in the NOMMAP too.
18:35 geekosaur joined #perl6
18:35 kboga eh, should get back to fourier & friends now...
18:38 jnthn OK
18:38 * jnthn takes a look at it
18:46 dalek rakudo/nom: 4197625 | jnthn++ | src/ (4 files):
18:46 dalek rakudo/nom: Make Numeric into a role, as it should be.
18:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4197625f61
18:56 icwiener joined #perl6
18:57 muixirt joined #perl6
18:58 muixirt hi
19:00 jnthn o/
19:03 jnthn 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
19:03 p6eval rakudo 419762: OUTPUT«use of uninitialized variable $max of type Dog in numeric context␤0..^0␤»
19:04 jnthn dinner, bbl
19:12 masak hm... does ^Dog still mean Dog.HOW ?
19:12 TimToady Dog.HOW($obj,
19:13 TimToady well, Dog.HOW(Dog, in this case
19:14 masak I thought we had Dog.^foo for expressing that thought.
19:14 masak why do we also need ^Dog.foo ?
19:15 TimToady nevermind, I'm just confused this morning
19:16 masak oh phew.
19:17 masak did ^Dog ever mean Dog.HOW, though? or have I just dreamt that?
19:17 GlitchMr42 joined #perl6
19:20 muixirt well it's a range, right? The LTA error message confused me :-)
19:24 arnsholt Is Grammar.parse($text, :rule<foo>) implicitly anchored at the beginning of the string?
19:25 * colomon has always assumed the answer is yes...
19:25 Trashlord joined #perl6
19:29 masak arnsholt: it makes a lot more sense than that magic residing in TOP, that's for sure.
19:32 jnthn If there's magic, it's in .parse
19:32 jnthn hm
19:32 masak oh, there's magic ;)
19:32 masak I agree putting the magic in .parse makes a whole lot of sense.
19:32 jnthn masak: No, you're not imagining things...at least, not in this case :)
19:33 jnthn Actually it turns out the magic isn't in .parse, though. That's the "normal" case.
19:33 jnthn It's the "need to scan" case that is special.
19:33 jnthn so /.../ does "magic" :)
19:34 jnthn S03 still says that ^Dog is Dog.HOW
19:34 masak I hear ya, but am having trouble accepting it for some reason :)
19:34 masak what's the use case for ^Dog being Dog.HOW?
19:34 jnthn While it would be all of 30 seconds to implement that, I'd like to argue that we instead can this behavior. :)
19:35 jnthn It:
19:35 masak can I remove it from the spec? can I? can I? :P
19:35 jnthn 1) Is useless due to precedence. You always want to call a method on a meta-object.
19:35 TimToady yes, you may
19:35 * masak breathes excitedly like a ^Dog
19:35 jnthn 2) ...ok, I had more good arguments. :)
19:35 jnthn TimToady++
19:35 * masak axes
19:36 jnthn I think the reasoning was something about it being the "domain of the object" or some such.
19:36 jnthn It was cute at the time. :)
19:37 dalek rakudo/real-trouble: 9c69e07 | jnthn++ | src/ (7 files):
19:37 dalek rakudo/real-trouble: Initial changes to make Real into a role. Breaks tests, though they all seem to fail in the same kind of way.
19:37 dalek rakudo/real-trouble: review: https://github.com/rakudo/rakudo/commit/9c69e07f36
19:39 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.
19:39 jnthn phenny: ask moritz are there any branches you've started that are blocked on me taking a look at them?
19:39 phenny jnthn: I'll pass that on when moritz is around.
19:40 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:42 TimToady try <&My::Package::my-rule>
19:42 dalek rakudo/nom: 4553a58 | jnthn++ | NOMMAP.markdown:
19:42 dalek rakudo/nom: Update NOMMAP; really want to get rid of this and fold it into ROADMAP before the next release.
19:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4553a587db
19:42 jnthn And if you do, be sure that the other package declares the rule you want to do that to with "our"
19:43 dalek specs: bf4c011 | masak++ | S (2 files):
19:43 dalek specs: [S03, S12] ^Dog no longer means Dog.HOW
19:43 dalek specs:
19:43 dalek specs: Use the Dog.^foo form when you want to call methods on Dog's metaclass.
19:43 dalek specs:
19:43 dalek specs: This makes prefix:<^> unambiguously mean 0 ..^ $something, with no
19:43 dalek specs: weird exception for type objects.
19:43 dalek specs: review: https://github.com/perl6/specs/commit/bf4c011469
19:43 birdwindupbird joined #perl6
19:43 jnthn TimToady: What should <My::Package::my-rule> do? Is it basically like <LANG(My::Package, 'my-rule')>?
19:43 jnthn Apart from not LANG because that only looks at %*LANG
19:43 jnthn But similar concept.
19:44 jnthn masak++
19:44 masak I love making the spec smaller :D
19:48 muixirt masak: and better error handling wrt prefix:<^> would be nice
19:49 jnthn nom: ^Int
19:49 p6eval nom 419762: OUTPUT«use of uninitialized variable $max of type Int in numeric context␤»
19:49 jnthn yeah, could be better
19:49 masak now we can make it a "deprecated" error instead :P
19:50 jnthn masak: No, it should really just warn in a better way
19:50 jnthn Probably before it tries to construct the range
19:50 muixirt nom: my $t; say ^$t
19:50 p6eval nom 419762: OUTPUT«use of uninitialized variable $max of type Any in numeric context␤0..^0␤»
19:50 masak aye.
19:56 arnsholt TimToady: Cheers, that seems to do the trick. Now to figure out the next thing I've done wrong =D
19:56 snearch joined #perl6
19:58 dalek roast: bbc3c0a | (Solomon Foster)++ | S12-class/open.t:
19:58 dalek roast: Fudge for niecza.
19:58 dalek roast: review: https://github.com/perl6/roast/commit/bbc3c0a3ee
20:01 dalek niecza: fa23c48 | (Solomon Foster)++ | t/spectest.data:
20:01 dalek niecza: Turn on S12-class/open.t.
20:01 dalek niecza: review: https://github.com/sorear/niecza/commit/fa23c48d17
20:01 arlinius joined #perl6
20:04 y3llow_ joined #perl6
20:04 pothos_ joined #perl6
20:07 y3llow joined #perl6
20:08 pothos joined #perl6
20:08 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…
20:09 dalek roast: 7a7bca4 | (Solomon Foster)++ | S12-class/instantiate.t:
20:09 dalek roast: Fudge for niecza.
20:09 dalek roast: review: https://github.com/perl6/roast/commit/7a7bca404c
20:09 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 #perl6
20:09 masak \o/
20:10 dalek niecza: c102694 | (Solomon Foster)++ | t/spectest.data:
20:10 dalek niecza: Turn on S12-class/instantiate.t.
20:10 dalek niecza: review: https://github.com/sorear/niecza/commit/c102694f76
20:11 pothos joined #perl6
20:31 GlitchMr42 joined #perl6
20:32 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:41 huf joined #perl6
20:45 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»
20:45 colomon niecza: $*OUT.print: "Hello!"
20:45 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…
20:45 sorear good * #perl6
20:45 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....  ;)
20:45 colomon niecza: $*OUT.say: "Hello!"
20:46 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
20:46 colomon o/, sorear
20:49 pmurias sorear: i'm having trouble debitrotting the p5 interop
20:50 pmurias sorear: would it be possible that a different IForeignInterpreter is being linked against in P5Interpreter.cs and Builtins.cs?
20:53 sorear pmurias: yes. Try changing Kernel.dll to Run.Kernel.dll on lines 59 and 60 of the Makefile
20:53 sorear pmurias: freezing p5 objects should just throw an exception for now
20:54 sorear colomon: (P6any).Does(Kernel.RealMO); to call a class method, use a type object
20:57 pmurias sorear: thanks, that works
20:57 * pmurias hates build systems
20:58 sorear I agree
21:05 dalek niecza: 59c6a7b | (Paweł Murias)++ | / (2 files):
21:05 dalek niecza: Unbitrot perl5 interopability.
21:05 dalek niecza: review: https://github.com/sorear/niecza/commit/59c6a7b202
21:06 huf joined #perl6
21:07 pmurias sorear: did the perl5 interop work on your machine previously?
21:07 masak pmurias, sorear: have you come across http://cr.yp.to/redo.html ?
21:10 pmurias masak: just saw it
21:11 jnthn Question on constant folding
21:12 jnthn say 1 + 1; multi infix:<+>(1, 1) { 3 } # What is the output of this? :)
21:12 masak 3.
21:12 pmurias perl6: say 1 + 1; multi infix:<+>(1, 1) { 3 }
21:12 p6eval rakudo 4553a5: OUTPUT«2␤»
21:12 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "1"␤    expecting formal parameter or ")"␤    at /tmp/WbcEkN63OR line 1, column 28␤»
21:12 p6eval ..niecza v13-246-g1ae3990: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤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…
21:12 pmurias perl6: say 1 + 1; multi infix:<+>($a, $b) { 3 }
21:12 * masak submits rakudobug
21:12 p6eval pugs b927740, rakudo 4553a5: OUTPUT«2␤»
21:12 p6eval ..niecza v13-246-g1ae3990: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤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…
21:13 jnthn masak: no, wait.
21:13 masak :)
21:13 jnthn This is exactly the point I wanted to make.
21:13 masak yes, and you're wrong :P
21:13 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.
21:13 sorear I'm suprised niecza gets this one as right as it does.
21:14 jnthn sorear: I like Niecza's answer, fwiw.
21:14 pmurias jnthn: constant folding shouldn't change the result of a program
21:14 masak niecza's answer is very sane, yes.
21:14 masak pmurias: exactly!
21:14 masak but now that I think about it, Niecza is right.
21:14 jnthn pmurias: perl 6 has funny definition of constant folding that we should probably call something else.
21:14 masak it shouldn't be anything.
21:14 sorear masak++ ^Dog
21:15 * masak , destroyer of spec
21:15 huf joined #perl6
21:15 * masak :Vishnu::spec:world
21:16 pmurias jnthn: he optimizer is allowed to start
21:16 pmurias making these optimizations after the main program's C<CHECK> time
21:16 pmurias jnthn: so the spec only allows constant folding after the whole unit is parsed
21:16 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.
21:16 jnthn pmurias: Spec ref?
21:17 jnthn Also: does STD parse -1 as a literal, or as a prefix and a literal?
21:17 sorear Prefix and literal.
21:17 jnthn OK
21:17 jnthn So here's where I ran into this fun
21:18 jnthn nom: enum Foo (a => 1, b => 2)
21:18 p6eval nom 4553a5:  ( no output )
21:18 jnthn nom: enum Foo (a => -1, b => 2)
21:18 p6eval nom 4553a5: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near ""␤»
21:18 pmurias jnthn: S06:2881
21:18 jnthn This makes it a bit hard to define Order. :)
21:19 jnthn pmurias: Thanks.
21:19 dalek roast: a43df14 | (Solomon Foster)++ | S16-io/print.t:
21:19 dalek roast: Partial fudge for niecza.
21:19 dalek roast: review: https://github.com/perl6/roast/commit/a43df1417e
21:19 jnthn pmurias: Yes, that does seem relevant here.
21:19 jnthn sorear: How does Niecza handle defining enum Order?
21:19 pmurias jnthn: yes, there are a few places where if i remember correctly either a constant or a expression which constant folds is accepted
21:20 jnthn pmurias: Yeah, that's where I'm going with this. Because this demands constant folding *before* CHECK time.
21:21 masak guten nacht, #perl6
21:21 pmurias we could do conservative constant folding before CHECK time
21:21 pmurias and do so more folding after CHECK time
21:21 pmurias s/so/some/
21:21 jnthn pmurias: What makes it "conservative"?
21:22 pmurias "convervative" = "what you can implement easily"
21:22 sorear jnthn: Right now, it doesn't.
21:22 jnthn sorear: ah, OK :)
21:22 sorear jnthn: What I'm planning to do is make the stuff after enum implicitly BEGIN
21:23 sorear 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
21:23 sorear and I'm still trying to find an elegant way to handle that
21:23 jnthn sorear: I fear just running the whole thing under BEGIN would give me even more circularity fun :)
21:24 * jnthn realizes that the place he just defined Order in the setting is before it defines prefix:<->(Int) :/
21:24 jnthn (not that I have the folding yet anyway, mind...)
21:25 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.
21:26 jnthn .oO( Thank $deity I didn't try and do Bool as an enum in the setting... )
21:26 huf joined #perl6
21:29 colomon so what exactly do I get in niecza if I "make perl5"?
21:30 sorear colomon: you get a .so file, which if the stars align right can be used to make eval(:lang<perl5>) work
21:30 sorear 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
21:32 colomon so it doesn't enable :p5 matching?
21:33 pmurias not yet
21:33 pmurias sorear: the problem with the .so is that shared and static libraries don't mix on some systems?
21:34 sorear pmurias: that's one of the problems
21:34 pmurias what are the others?
21:35 sorear it doesn't work very well if you like to use niecza from several directories
21:35 sorear it requires a C compiler
21:35 sorear it doesn't work on Windows for unknown reasons
21:35 colomon (I asked because there are about 1000 tests that should work once rx:p5 comes on-line.
21:36 sorear I'm pretty sure make perl5 should have nothing to do with rx:P5
21:37 * jnthn had been planning it as just another frontend to the Perl 6 regex engine.
21:37 jnthn pmichaud++ prototyped that out long ago
21:37 sorear rx:P5 needs to make Perl 6 match objects, which means it really really shouldn't be invoking libperl.so
21:37 colomon ah
21:38 pmurias sorear: re "... from several directories" i had a partly done solution for that
21:39 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?
21:39 colomon Seems I have Perl5Interpreter.dll instead of obj/p5embed.so
21:39 colomon OS X
21:39 pmurias colomon: you don't have obj/p5embed.so?
21:40 pmurias after 'make perl5'?
21:40 colomon oh, I do!
21:40 colomon huh
21:40 colomon so why didn't it find it?
21:41 colomon I'm in the root niecza directory
21:41 sorear No clue, but this is part of what I mean by 'unreliable'
21:41 pmurias different .so lookup rules
21:42 colomon unless fudgeandrun and/or prove are changing my effective directory at some point
21:43 sorear wait, what?
21:43 sorear ah, S01-perl-5-integration?
21:43 colomon sorear: I got that error trying to run the ... yes
21:45 colomon I get the same error if I niecza> eval('1', :lang<perl5>) from the root niecza directory
21:46 pmurias colomon: i think the library lookup rules are different under OS X
21:47 * pmurias is searching for the right docs
21:49 kaare__ joined #perl6
21:53 pmurias sorear: re lack of C compiler is that a big issue?
21:55 sorear I think so
21:55 sorear but not really avoidable :|
22:04 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:07 geekosaur you might be able to use DYLD_FALLBACK_LIBRARY_PATH, but it really wants a full pathname (not even relative)
22:09 pmurias sorear: a perl5 without a C compiler isn't fully functional
22:10 pmurias geekosaur: the full pathname can contain a .so?
22:10 pmurias s/contain/end with/
22:12 dalek niecza: 0440b71 | sorear++ | src/niecza:
22:12 dalek niecza: When a proto is exported, automatically export the corresponding multis
22:12 dalek niecza: review: https://github.com/sorear/niecza/commit/0440b711e7
22:14 geekosaur I think it can, it's just not recommended
22:14 geekosaur (since .so implies ELF shared object, and OS X doesn't support ELF)
22:14 colomon full path name doesn't seem to help for me, with or without .so
22:15 mj41 joined #perl6
22:17 pmurias colomon: you chainged all mentions of obj/p5embed.so in Perl5Interpreter to a full path?
22:17 pmurias and typed 'make perl5' after that?
22:17 donri left #perl6
22:18 colomon yes, and the error message I get includes my new path
22:19 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
22:19 colomon \
22:20 colomon (That's the without .so version)
22:21 _jaldhar joined #perl6
22:21 jakky_ joined #perl6
22:24 pmurias colomon: and the file exists?
22:24 colomon yes
22:24 colomon Wynne:niecza colomon$ ls -l obj/p5embed.so
22:24 colomon -rwxr-xr-x  1 colomon  staff  1638396 Jan 14 16:29 obj/p5embed.so
22:24 sorear could try using ktrace to confirm the file name that mono is looking for
22:25 sorear it's been a while since I used that so I don't remember the syntax; man ktrace and man kdump
22:26 dalek rakudo/nom: d2999d7 | jnthn++ | src/Perl6/ (2 files):
22:26 dalek rakudo/nom: Circularity sawing so we can have enums in CORE.setting.
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2999d738b
22:26 dalek rakudo/nom: bd28c07 | jnthn++ | / (2 files):
22:26 dalek rakudo/nom: Sketch out a very basic constant folder.
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd28c07e05
22:26 dalek rakudo/nom: 3a6f65c | jnthn++ | src/Perl6/ConstantFolder.pm:
22:26 dalek rakudo/nom: Fix thinko.
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3a6f65c999
22:26 dalek rakudo/nom: e33ee02 | jnthn++ | src/Perl6/ (2 files):
22:26 dalek rakudo/nom: 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).
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e33ee027a3
22:26 dalek rakudo/nom: d3f0caf | jnthn++ | src/core/Int.pm:
22:26 dalek rakudo/nom: Add Order enumeration to CORE.
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3f0caf3ea
22:27 pmurias colomon: maybe try renaming the .so file to .dylib?
22:29 colomon ... doesn'twork without an extension ....
22:29 sorear colomon: I'm curious what ktrace has to say
22:29 colomon doesn't work with
22:30 colomon ktrace?
22:30 sorear man ktrace
22:30 sorear man kdump
22:30 sorear it will show you the system calls Mono/dyld makes
22:31 sorear in particular, there will be a few calls to open() that return ENOENT
22:31 colomon I don't have ktrace.  :(
22:31 colomon I do seem to recall using a similar program, however.
22:31 geekosaur dtrace on modern OS X
22:31 colomon dtrace, I think maybe?
22:31 geekosaur er, dtruss
22:31 sorear I used ktrace on OS X 10.3 or 10.4
22:32 sorear listen to geekosaus
22:32 sorear r
22:32 geekosaur yeh, that was taken from freebsd.  in 10.5 Apple switched to dtrace, and the dtrace version is dtruss
22:32 geekosaur sadly this will probably require root :/ I never did figure out the correct way to make dtrace usable by mortals
22:32 dalek rakudo/nom: d1c15fc | jnthn++ | src/core/Int.pm:
22:32 dalek rakudo/nom: Er, helps to get Increae and Decrease the right way around. :-)
22:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1c15fcf2e
22:33 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)
22:33 geekosaur not any more it doesn't
22:34 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)
22:34 arnsholt nom: grammar Foo { rule foo { a } }; "bar" ~~ m/<&Foo::foo>/; # Rakudobug?
22:34 sorear does OSX restrict gdb to root?
22:34 p6eval nom 4553a5: OUTPUT«use of uninitialized value of type Any in string context␤»
22:34 arnsholt sorear: Not AFAIK
22:35 sorear arnsholt: to which?
22:35 jnthn arnsholt: That ain't gonna work.
22: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
22:35 jnthn If it will, it'll need an "our" on rule foo
22:36 jnthn 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…
22:36 jnthn Then there's taht.
22:36 jnthn *that
22:36 sorear geekosaur: are you saying gdb is restricted to root, or...?
22:36 arnsholt Yeah, I just discovered
22:36 geekosaur gdb is not restricted to root, it just doesn;t work right :/
22:37 tadzik doesn't Order:: win us some spectests?
22:37 jnthn tadzik: Yes, once we updated <=> and cmp to use it
22:37 tadzik S03-operators/comparison.t possibly
22:37 sorear I love how the race is finally on ;)
22:37 sorear is niecza back to 95% yet?
22:38 arnsholt Oh well, I'll just do it the basic way
22:39 dalek niecza: 899f28d | sorear++ | src/niecza:
22:39 dalek niecza: Fix export logic for the protos themselves
22:39 dalek niecza: review: https://github.com/sorear/niecza/commit/899f28d4ae
22:40 * geekosaur is rather annoyed by the state of debugging on lion :/
22:40 geekosaur (and that apple ships a gdb that DOESN'T WORK)
22:40 TimToady enums are constants and so must be done at BEGIN tine
22:42 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 cooper joined #perl6
22:42 snearch joined #perl6
22:43 jnthn TimToady: Yes, that's just why I did a first cut constant folder... :)
22:43 whiteknight joined #perl6
22:43 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. :-))
22:43 TimToady was just backing you up :)
22:43 jnthn ah :)
22:44 arnsholt geekosaur: What's broken with gdb in Lion?
22:44 * jnthn is more used to being told off :P
22:44 tadzik jnthn: btw, how for is "speeding up the compile time" on your TODO? :)
22:44 * TimToady is obviously a lousy leader :)
22:44 * jnthn is obviously a lousy compiler hacker :)
22:45 sorear arnsholt: it can't read Mach-O files reliably
22:45 jnthn tadzik: High.
22:45 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
22:45 tadzik \o/
22:45 jnthn tadzik: I've been working on QRegex stuff, with help from kshannon++. In theory that can get us faster parsing.
22:46 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.
22:46 jnthn tadzik: Over half the PAST nodes we make when compiling CORE.setting are ones we shouldn't have to.
22:46 tadzik huh
22:46 jnthn Yeah. :)
22:47 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.
22:47 jnthn *fiddly
22:47 sorear by Q3 2012, nom will be faster than niecza at both compile time and runtime, but niecza will pass more spectests
22:47 jnthn sorear: Hmm, curious prediction.
22:47 simcop2387 joined #perl6
22:47 jnthn sorear: How do you think we're going to get faster at runtime, ooc?
22:47 jnthn .oO( this is one way not to have to figure it out ;-) )
22:48 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.
22:49 jnthn Lorito? Is...is that still moving? :)
22:49 tadzik jnthn: <=> on Mu compares reprs, iiuc. Should False in this case become Increase, or Decrease?
22:49 sorear It's an unknown.
22:49 jnthn tadzik: er...what is it today?
22:49 jnthn compares reprs? What does that mean? :)
22:49 jnthn nom: Mu <=> Mu
22:49 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…
22:50 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␤»
22:50 tadzik erm
22:50 tadzik pir::perl6_container_store__0PP($a, $b)
22:50 tadzik whatever that is :)
22:50 jnthn ...what?
22:50 tadzik (sub infix:<=>(Mu \$a, Mu \$b))
22:50 tadzik oh
22:50 jnthn tadzik: That's assignment operator
22:50 jnthn :)
22:50 tadzik wait
22:50 tadzik dang
22:50 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?
22:50 * jnthn hands tadzik++ an extra beer
22:50 tadzik okay, I'm blind :P
22:50 tadzik oh, a friendly reminder!
22:51 * tadzik tssk!s
22:51 tadzik now I'm ready
22:51 sorear pmurias: Unsure.
22:51 jnthn :)
22:53 panterax joined #perl6
22:55 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:56 tadzik > Order ~~ Enum
22:56 tadzik Bool::False
22:56 tadzik -_-
22:57 jnthn tadzik: That's...not what Enum does :)
22:57 jnthn nom: say Pair ~~ Enum
22:57 p6eval nom 4553a5: OUTPUT«Bool::True␤»
22:57 jnthn It's parent of Pair
22:57 jnthn nom: say Order.^mro
22:58 p6eval nom 4553a5: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Order' called (line 1)␤»
22:58 jnthn oh, not re-built yet.
22:58 tadzik Order() Int() Real() Cool() Any() Mu()
22:58 tadzik okay
22:58 jnthn Looks like it.
22:58 arnsholt nom: say "[]" ~~ m/<-[[\]]>/
22:58 jnthn Enumeration types "inherit" from their base type.
22:58 p6eval nom 4553a5: OUTPUT«#<failed match>␤»
22:59 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?
22:59 jnthn sorear: Hysterical raisons
22:59 tadzik so I was looking for something like Order.at_key(nqp::cmp_I() + 1)
22:59 arnsholt nom: say "[]" ~~ m/<[\W]-[[\]]>/
22:59 p6eval nom 4553a5: OUTPUT«=> <[>␤␤»
22:59 jnthn sorear: It got put in before I'd got roles in shape.
22:59 sorear Not raisins?  Ok
22:59 az5112 joined #perl6
23:00 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?
23:00 jnthn @arr[*-1]
23:00 az5112 tx
23:00 jnthn tadzik: Oh, hmm
23:00 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.
23:01 tadzik hah
23:01 sorear you really want a common supertype of all enums to put the enum funnybusiness in
23:01 arnsholt nom: say "[]" ~~ m/<\W-[[\]]>/
23:01 p6eval nom 4553a5: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at line 1, near "\\W-[[\\]]>/"␤»
23:02 jnthn sorear: I have a role for that.
23:02 sorear niecza has a class CommonEnum, which all enum classes multiply-inherit from
23:02 jnthn tadzik: src/core/Enumeration.pm
23:02 sorear but that's because roles in niecza predate roles
23:02 sorear ...you know what I mean
23:02 tadzik oh, there we are
23:02 jnthn ...er? :)
23:02 jnthn hehe ;)
23:03 arnsholt jnthn: Thank you so much for Grammar::Tracer =)
23:03 jnthn arnsholt: Welcome. :)
23:03 arnsholt It just saved me oodles of Aristotelic introspection of grammar code =D
23:03 jnthn arnsholt: I think it's still my favorite bit of meta-programming so far. :)
23:04 tadzik that leaves us to stuff like say Order.enums.invert.hash.{~(-1)}
23:04 tadzik which looks so-so as well
23:04 jnthn tadzik: Nie je dobre...
23:04 * jnthn glances S12
23:04 tadzik jnthn: ano, takie sobie
23:05 jnthn tadzik: z S12-a: Day(3)               # Wed constant, found as value
23:06 colomon geekosaur: do you know a handy dtruss command line for this?
23:06 tadzik oh
23:06 arnsholt jnthn: Oooh, nice code indeed (just looked at it). Nice example of the possibilities of fiddling with metaclasses and friends
23:06 jnthn tadzik: NYI, but it'd seem to be the ideal way
23:06 jnthn tadzik: Then it's just Order(...what we already have...)
23:06 * geekosaur has lost track of what "this" is
23:07 tadzik so postcircumfix:<( )> for Enumeration?
23:07 jnthn tadzik: Yeah
23:07 tadzik which is basically .enums.invert anyway
23:07 jnthn tadzik: Yeah, though we can always try and make it more efficient later
23:07 tadzik also, invert is a List, I guess, so S12 is wrong here
23:07 geekosaur dtruss -t open -t open_nocancel ...
23:08 tadzik jnthn: I was also thinking about a Int.pm-scoped array of [Decrease, Same, Increase]
23:09 tadzik 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...
23:09 tadzik yeah
23:10 colomon geekosaur, sorear, pmurias: I don't see any sign it's trying to open the file at all!  https://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
23:10 jnthn tadzik: IMHO, let's go with the Order(...) approach.
23:10 jnthn tadzik: I get we can optimize that.
23:10 jnthn *bet
23:11 phenny joined #perl6
23:11 tadzik jnthn: so implement postcircumfix:<( )> for Enumeration and use that then?
23:11 tadzik too few arguments: 0 passed, 23871728 expected
23:11 tadzik 0_o
23:12 colomon geekosaur, sorear, pmurias: Though it does seem to be doing a lot with p5 files: https://gist.github.com/1613304
23:12 jnthn omfg
23:12 geekosaur hm, I wonder if you need -f in there too
23:12 jnthn tadzik: ...How'd you manage that? :)
23:12 jnthn tadzik: Yes.
23:12 jnthn (yes to postcircumfix:<( )>)
23:13 tadzik jnthn: ^D in the repl, not sure how tf did it happen ;)
23:13 colomon geekosaur: -t open -t open_nocancel seemed to only give me open_nocancel uses, thus the second gist
23:13 phenny joined #perl6
23:13 tadzik must've confused it with those enums :>
23:13 pmurias colomon: you renamed the file in obj/ to .dylib?
23:13 colomon pmurias: yes
23:14 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)
23:14 geekosaur (I think it's related to threading)
23:15 pmurias colomon: without the -t option does it print anything?
23:15 colomon wait, paydirt
23:15 colomon !
23:15 geekosaur that's a good point
23:15 geekosaur I think it uses mmap...
23:16 sorear colomon: hold on a second, are you trying to dtruss prove?
23:16 colomon yes
23:16 colomon https://gist.github.com/1613317
23:16 sorear you might have better luck dtrussing mono itself
23:16 geekosaur (hrm, but even so it should open it to get an fd and then mmap that)
23:17 colomon needed -f to follow children, that's all
23:17 colomon geekosaur++
23:17 sorear Err#2 eh
23:18 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"
23:18 sorear suprised OSX uses the same number
23:19 sorear colomon: looks like it read out the architecture word and then abandoned the file
23:19 sorear ISTR that Mono on OSX is built for x86
23:19 colomon possibly because dylib instead of so?
23:19 geekosaur I think error numbers < 16 or so are pretty much the same
23:19 sorear what architecture did you build p5embed.so for?
23:20 sorear I'm guessing you may have built it as amd64
23:20 colomon whatever the default is...
23:20 sorear "file" might tell you
23:20 colomon gotta run
23:20 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...
23:20 geekosaur and OS X uses the error numbers from *BSD
23:22 localhost joined #perl6
23:34 dalek niecza: 0da5620 | sorear++ | lib/NieczaCLR.cs:
23:34 dalek niecza: When a multi fails, display the full candidate list, not the arity-filtered and sorted one
23:34 dalek niecza: review: https://github.com/sorear/niecza/commit/0da56208cb
23:34 dalek niecza: be89d96 | sorear++ | / (2 files):
23:34 dalek niecza: Fixes to enable imported multis to correctly make dispatchers
23:34 dalek niecza: review: https://github.com/sorear/niecza/commit/be89d96fc0
23:35 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.
23:37 dalek zavolaj: 26a91f4 | jnthn++ | TODO:
23:37 dalek zavolaj: Remove some done items.
23:37 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/26a91f4e8f
23:37 dalek zavolaj: 4b34bad | jnthn++ | README (2 files):
23:37 dalek zavolaj: Turn README into Markdown; start to improve things.
23:37 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/4b34badb5c
23:41 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
23:42 colomon sorear:
23:42 colomon Wynne:niecza colomon$ file obj/p5embed.dylib
23:42 colomon obj/p5embed.dylib: Mach-O 64-bit dynamically linked shared library x86_64
23:42 sorear yeah, that's your problem
23:43 sorear try rebuilding with -m32 in the cc command line
23:45 dalek zavolaj: 81ff0e4 | jnthn++ | README.markdown:
23:45 dalek zavolaj: Document working with pointers.
23:45 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/81ff0e4766
23:47 colomon sorear: still no joy.
23:48 sorear colomon: re. dyld or Test::Util?
23:51 colomon dyld
23:51 shinobicl_ joined #perl6
23:53 pmurias colomon: still the same error?
23:53 colomon yes
23:55 pmurias file obj/p5embed.dylib
23:56 colomon give me a minute, trying to pick a movie to watch with my wife.  :)
23:57 pmurias ok ;)

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo