Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-04-24

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 jnthn rakudo: say Any.^parents() <<===>> Any
00:02 p6eval rakudo a1159c: OUTPUT«0␤»
00:02 jnthn rakudo: say Any.^parents() <<===>> Mu
00:02 p6eval rakudo a1159c: OUTPUT«No applicable candidates found to dispatch to for 'hyper'. Available candidates are:␤:(&op, %lhs, %rhs, Any :dwim-left($dwim-left), Any :dwim-right($dwim-right))␤:(&op, Iterable $lhs-iterable, Iterable $rhs-iterable, Any :dwim-left($dwim-left), Any
00:02 p6eval ..:dwim-right($dwim-right))␤:(&op, …
00:02 jnthn rakudo: say (Any.^parents())[0] <<===>> Any
00:02 p6eval rakudo a1159c: OUTPUT«No applicable candidates found to dispatch to for 'hyper'. Available candidates are:␤:(&op, %lhs, %rhs, Any :dwim-left($dwim-left), Any :dwim-right($dwim-right))␤:(&op, Iterable $lhs-iterable, Iterable $rhs-iterable, Any :dwim-left($dwim-left), Any
00:02 p6eval ..:dwim-right($dwim-right))␤:(&op, …
00:02 jnthn hm :-/
00:03 jnthn rakudo: say Cool.^parents() <<===>> Any
00:03 p6eval rakudo a1159c: OUTPUT«10␤»
00:03 jnthn rakudo: say ?any(Cool.^parents() <<===>> Any)
00:03 p6eval rakudo a1159c: OUTPUT«1␤»
00:03 masak shouldn't the first one blow up?
00:03 masak (because the lists are of different length)
00:04 jnthn masak: >>===<< would
00:04 masak oh, right.
00:04 masak don't mind me :)
00:04 jnthn heh, I always used to mix them up
00:04 jnthn I remember it as "point at the one(s) that should dwim"
00:05 diakopter ඹඹඹඹ
00:05 masak that's a good rule.
00:05 jnthn Anyway, none of this explains why the same code in .WALK ain't doing what I expect. :|
00:06 jnthn Passes some of the tests, at least.
00:06 jnthn I'll work out the rest tomorrow.
00:07 jnthn (Not ready for sleep, but want to do something more than relaxing for a bit. :-))
00:07 jnthn er, more relaxing than debugging...
00:07 jnthn :-)
00:07 masak I was worried there for a while :)
00:07 masak (about you going to sleep so early, that is)
00:07 jnthn Yeah, the parametric role bugs were...tricky. :-)
00:08 jnthn My brane is sore now.
00:08 jnthn We now pass tests alpha never did though. Which is nice.
00:08 masak cool.
00:08 jnthn I may pop handles back this weekend.
00:09 jnthn Feels like one of the big still-missing OO bits.
00:09 jnthn (Yes, I know, named enums are another. :-P)
00:09 masak I've been thinking the past few days whether it'd be simple to tack resumed compilation onto Yapsi, and get a real REPL there before Rakudo gets it :)
00:12 jnthn http://gist.github.com/377330 # this tells you the number of tests, by synopsis, that we've still got commented out in spectest.data
00:12 masak number of test files, right?
00:13 jnthn Correct.
00:13 jnthn Sorry, thinko. :-)
00:13 masak a common one :)
00:13 masak it's about what I'd expect, I think.
00:14 masak though number of test files is a wonky measure in the first place.
00:14 masak number of tests says more.
00:14 jnthn Sure.
00:14 Chillance joined #perl6
00:14 jnthn But that's a rather harder number to come by.
00:15 jnthn It gives some indication of where work is needed, though.
00:16 masak I wonder how tough it would be to write a tool once and for all that, given a .t file in t/spec, came back and gave an integer number corresponding to the actual number of tests in that file.
00:16 sorear Rice-hard
00:16 masak I mean, for a general solution it reduces to the Haltin Problem, I guess.
00:16 jnthn Well, it's trivial if you've got a Perl 6 implementation that passes the test file.
00:16 pmichaud in the general case, halting problem yes.
00:16 jnthn So maybe just write one of those. ;-)
00:16 masak jnthn: well, let's assum we don't.
00:17 jnthn Aww!
00:17 sorear what we could do is modify the fudger to never change the number of tests
00:17 sorear i.e. generate skip records for fudged tests
00:17 masak jnthn: let's assume we have what we have today.
00:17 jnthn Well, this was all easy back in the days of test plans.
00:17 jnthn ;-)
00:17 sorear then you can just run the tests and count the number of passes vs. skips
00:17 masak I know, with an integer in the test plan we just take that one.
00:17 masak there are two other cases that I know of.
00:18 * jnthn is still only semi-convinced of the plan *;...DONE_TESTING
00:18 masak one is where it says 'plan @some-array;'
00:18 jnthn Ah. That one *is* scary. :-)
00:18 masak or some simple arithmetic expression based on @some-array.
00:18 sorear what do we think of fixing the fudger?
00:18 masak I don't think that one is very scary, because the array is often constant.
00:18 masak sorear: it's an interesting idea, co-opting the fudger for that purpose.
00:19 masak sorear: but it'd probably mean a lot of manual fudging of files we don't even attempt yet.
00:20 masak I was more thinking about either using duct-tape parsing heuristics or piggy-backing viv somehow.
00:22 masak S12: "Since the colon does not require a space in this case, and it looks kinda funny to put it, [...]"
00:22 masak is that standard English? "to put it"?
00:22 diakopter eh
00:23 pmichaud "to put one there" probably.
00:23 diakopter s/to put it/there/
00:23 diakopter or that
00:23 pmichaud and s/kinda/kind of/  :-)
00:23 jnthn Yeah, gives me a parse-ouch.
00:23 pmichaud kinda is kinda slangy.
00:23 masak sorta, yah.
00:23 pmichaud or even better,   s/kinda//;
00:23 jnthn But that's kinda OK, 'cus Perl 6 supports slangs. :-)
00:25 pugssvn r30459 | masak++ | [S12] straightened up the language
00:26 diakopter you show that language who's boss ;)
00:27 diakopter o wait, that's "straightened out"; oops
00:27 masak :)
00:28 diakopter std: $*ttt = 5;
00:28 * masak needs version control for the commit messages
00:28 p6eval std 30459: OUTPUT«ok 00:01 108m␤»
00:28 diakopter rakudo: $*ttt = 5;
00:28 p6eval rakudo a1159c: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17354 (src/builtins/Junction.pir:393)␤»
00:28 diakopter rakudo: my $*ttt = 5;
00:29 p6eval rakudo a1159c:  ( no output )
00:29 diakopter oh
00:29 jnthn masak: Actually straightended up didn't look funny to me.
00:29 masak diakopter: I blame Nick Clegg for the typo. it's his fault.
00:29 diakopter there wasn't a typo
00:29 diakopter I was making a follow-on joke.
00:29 masak alpha: $*ttt = 5
00:29 p6eval alpha 30e0ed:  ( no output )
00:30 jnthn Heh. What does alpha think it's assigning to. :-)
00:30 jnthn Of course, alpha would assign to anything. :-)
00:30 diakopter I wasn't saying 'straightened up' looked funny.
00:31 masak ah. I wasn't following on, I guess :)
00:31 * masak should be more assertive in his non-nativeness
00:31 ruoso joined #perl6
00:31 masak diakopter: how's the status on perlesque? care to give a 30-second summary?
00:32 diakopter ok
00:32 diakopter took a 3-day break; hopefully I'll finish contextuals tonight.
00:33 diakopter pmurias has started to think about a perlesque backend for mildew/std
00:33 diakopter so we've talked about what perlesque needs next
00:33 diakopter for that
00:33 diakopter most of it is just syntactic shortcuts for stuff that can be done through .NET apis directly
00:34 diakopter he's been figuring out where CLR stops and where perlesque begins
00:34 sorear alpha: 2 + 2 = 5; say (2 + 2)
00:34 p6eval alpha 30e0ed: OUTPUT«Unable to set lvalue on PAST::Val node␤in Main (file <unknown>, line <unknown>)␤»
00:36 masak joined #perl6
00:36 diakopter masak: .u left
00:36 diakopter o
00:36 masak diakopter: sounds like nice progress.
00:36 masak well, neighbournet. it's unreliable.
00:36 masak apologies.
00:37 diakopter I don't know what you heard last about perlesque; what did you know so far?
00:37 masak` joined #perl6
00:37 diakopter I don't know what you heard last about perlesque; what did you know so far?
00:38 masak diakopter: I know that it isn't a Perl 6 implementation, but something that might run STD.pm6.
00:40 masak I know you've done quite a bit of type stuff.
00:40 masak with native ints, at least.
00:40 masak a while back, it seems that you were figuring out things with scopes.
00:41 masak that's about it.
00:43 diakopter oh
00:44 diakopter it has strongly-typed closures-as-scalar-variables, invocations of scalars, more control flow than anyone could ever use, including labels & goto
00:44 diakopter named subs
00:45 diakopter return statement
00:45 masak sounds like a cute little language.
00:46 diakopter string literals
00:46 masak what was your main motivation in creating it?
00:46 diakopter BigInteger, Complex (not the Perl 6 api, though)
00:46 diakopter a target/assembly language for std/viv
00:46 diakopter tho of course it could be one for rakudo/nqp-rx
00:47 masak I've been growing a target/assembly language for Yapsi lately.
00:47 diakopter probably next after contextuals should be class declarations
00:47 diakopter oh?
00:47 masak some of the things you mention above ring familiar.
00:48 masak though right now, SIC (as it's called) is much less complex.
00:48 masak it only got blocks this evening.
00:48 diakopter would you like to expose it to p6eval?
00:48 masak eventually, yes.
00:48 masak probably before the May release.
00:49 masak though I suspect it'll hit speed issues fairly soon...
00:49 masak but I recommend that you download it and play with it, of course :)
00:49 diakopter speed issues?
00:50 masak yes. not aiming to be fast, just to get the fundamentals right.
00:50 diakopter the fundamentals of what?
00:50 masak of Perl 6 semantics.
00:50 diakopter oh
00:50 masak in the short term, that means lexical variables and nested blocks.
00:50 masak in the slightly longer term, it means functions and function calls.
00:54 masak I was thinking about the DESTROY/DESTROYALL methods the other day. I realized that since the method has to be called by the GC, it's important that the VM know how to call into Perl 6 to execute the DESTROYALL method on the object to be GC-ed.
00:54 masak I haven't seen any discussion on that, ever.
00:54 colomon alpha: my $a; $a *= 2; say $a
00:54 p6eval alpha 30e0ed: OUTPUT«2␤»
00:55 colomon dang, that does work!
00:55 sorear masak: GC reentrancy is made of hell
00:55 sorear quite a few implementations of finalizers require them in C and blow up if you try to eval()
00:56 jnthn IIRC, there's a way to override VTABLE_destroy in PIR.
00:56 sorear this is for good reason
00:56 jnthn However
00:56 jnthn Hell knows what happens if we run a bunch of Perl 6 there and do fun stuff. :-)
00:57 jnthn The mere fact that the object about to be collected has just been used as an invocant means we now have (GC-able) call frames that reference it.
00:57 masak in Java, the finalize method is IIUC fairly useless, because it doesn't guarantee that an object fit to be GC-ed has its finalize method called within reasonable time, or even at all before the program finishes.
00:57 jnthn masak: Same for Perl 6, I expect.
00:57 jnthn masak: Or at least, implementation dependent.
00:57 jnthn masak: That's why blocks can have LEAVE and so on.
00:58 masak maybe we shouldn't spec a DESTROY method, if it's so fickle and useless.
00:58 jnthn wfm.
00:58 masak I'd remove it right away, but I'm not that brave :)
00:58 * jnthn checks we even have on spec'd.
00:58 diakopter jnthn: same for clr destructors..
00:58 jnthn heh
00:58 masak S12:787
00:58 jnthn It says it exists
00:58 jnthn It doesn't give any details beyond that. :-)
00:59 masak no-one would notice if I just edited it out... :)
00:59 jnthn It makes sense if you're doing any GC that's not reference counting, I guess.
00:59 jnthn If you want to be doing efficient things like generational schemes.
00:59 masak how so?
01:00 masak what makes sense? having a DESTROY method, or removing it?
01:00 jnthn masak: Makes sense that you don't get promises about timeliness of it being called.
01:00 hercynium joined #perl6
01:01 masak right.
01:01 masak this thread seems to rehash most of the answers: http://stackoverflow.com/questions/171952/is-there-a-destructor-for-java
01:02 masak in essence, the answer is 'there are no real destructors in Java. there's finalize, but it sucks. also, Java has a GC, why do you need destructors?'
01:03 jnthn Often, the answer is "to free up unmanaged resources"
01:03 jnthn (file handles, sockets, etc)
01:03 Raynes joined #perl6
01:04 colomon destructors make for some great C++ idioms.
01:04 jnthn My experience of doing C# dev is that the lifetime of many resources is lexically scoped though.
01:04 colomon it's a shame they are tough to port to GC-based languages.
01:04 jnthn (There's a construct for making things easy there.)
01:05 jnthn So I think overall lexical block hooks would cover many bases there.
01:05 masak I don't see how I could implement destructors in Yapsi, at the moment.
01:05 masak I mean, if Yapsi runs on Rakudo, then the GC is Parrot's. but Yapsi is pure Perl 6, so it doesn't even know it *has* a GC.
01:05 jnthn You could write your own object allocation, and GC. ;-)
01:06 * masak would rather not :)
01:06 jnthn But I wouldn't wish that upon anyone. :-)
01:06 jnthn ;-)
01:06 jaldhar_ joined #perl6
01:07 jnthn Anyway, I've not really heard "omg need destory" from people using Rakudo.
01:07 masak maybe because we don't do files and databases and other resources that much.
01:07 jnthn Maybe wider usage will see people pine for such things.
01:07 jnthn True.
01:07 colomon jnthn: I don't know that anyone has really gotten far enough to need it.
01:07 jnthn Fair point.
01:08 masak but no, DESTROY isn't high on the wish list for me :)
01:08 masak just mildly curious.
01:08 colomon and ugly ugly ugly C# style workarounds ought to be possible with what we have now.
01:09 jnthn colomon: ugly? :-)
01:09 colomon I haven't programmed extensively in C#, but my impression is that it is terrible on this front.
01:09 jnthn using (var Handle = File.Open("blah")) { ...do stuff... } // doesn't hurt me so much...
01:10 colomon right, but it's how that's implemented that's the problem.
01:10 jnthn Calls .Dispone() on Handle at the end of the block, IIRC.
01:10 jnthn (which in this case is implemented to close the file handle)
01:10 colomon Any class that needs to be finalized (is it disposed?) needs to be marked that way.
01:10 jnthn Disposed
01:11 jnthn Well, you need to mark up your usage of it that way, yes.
01:11 colomon But that attribute doesn't commute automatically.
01:11 jnthn Well, it's just an interface (IDisposable)
01:11 colomon so if you change a class to need to be Disposed, you must change every single class that uses that class as well.
01:11 jnthn *nod*
01:11 jnthn Yeah, it's not good in that sense.
01:12 jnthn I don't find that situation arises so much though, in the stuff I do.
01:12 jnthn Or maybe I just design stuff so the situation won't arise.
01:12 diakopter :)
01:13 * masak decides to go to sleep
01:13 diakopter I'm sure things that make use of unsafe code need such things
01:13 colomon Maybe the C# code I've seen was just bad, and yours is better.
01:13 masak 'night, #perl6
01:13 colomon night!
01:13 diakopter gn
01:13 jnthn o/ masak
01:13 jnthn ooh, ETOOLATE
01:13 jnthn colomon: I've seen plenty of bad C# too. :-)
01:14 colomon but certainly the way I program C++ makes heavy use of destructors for things other than releasing memory, and porting that style over to C# appears very painful.
01:15 jnthn Yes, I can imagine it would be.
01:16 colomon at any rate, I imagine it would be very easy to port the IDisposable interface to Perl 6.  Then it's just a matter of figuring out a graceful way to trigger it at the end of the block.
01:16 diakopter rakudo: sub a() { $*b = 6; if ($*b == 52) { my $*b = 4 } }; my $*b = 7; a(); say $*b
01:16 p6eval rakudo a1159c: OUTPUT«6␤»
01:16 diakopter perlesque has routine epilogues
01:17 diakopter but you're talking about a block; I see.
01:18 diakopter rakudo: sub a() { $*b = 6; if ($*b == 52) { my $*b = 4 } else { my $*b = 8 } }; my $*b = 7; a(); say $*b
01:18 p6eval rakudo a1159c: OUTPUT«6␤»
01:19 diakopter ah, ok
01:19 jnthn Rakudo looks correct there to me, fwiw.
01:20 diakopter I hope so, cuz that's what I'm basing my implementation on..
01:20 jnthn :-)
01:21 diakopter rakudo: sub a() { $*b = 6; if ((my $*b) == 52) { my $*b = 4 } else { $*b = 8 } }; my $*b = 7; a(); say $*b
01:21 p6eval rakudo a1159c: OUTPUT«7␤»
01:21 diakopter oh
01:21 diakopter k
01:22 diakopter oh wait
01:23 diakopter where'd the 6 go
01:23 jnthn diakopter: The my $*b declared another $*b in the block
01:23 jnthn I think actually it should complain at compile time.
01:24 diakopter oh
01:24 jnthn std: sub a() { $*b = 6; if ((my $*b) == 52) { my $*b = 4 } else { $*b = 8 } }; my $*b = 7; a(); say $*b
01:24 p6eval std 30459: OUTPUT«ok 00:01 109m␤»
01:24 jnthn Oh.
01:24 jnthn but
01:24 jnthn std: my $a; sub foo() { $a; my $a }
01:24 p6eval std 30459: OUTPUT«[31m===[0mSORRY![31m===[0m␤Lexical symbol '$a' is already bound to an outer symbol (see line 1);␤  the implicit outer binding at line 1 must be rewritten as OUTER::<$a>␤  before you can unambiguously declare a new '$a' in this scope at /tmp/oKZWAi8rjn line 1:␤------> [32mmy
01:24 p6eval ..$a…
01:24 jnthn That's what I was going on.
01:25 jnthn I'd expected sub foo() { $*bar; my $*bar } to complain.
01:25 colomon std: my $*a; sub foo() { $*a; my $*a }
01:25 p6eval std 30459: OUTPUT«ok 00:01 109m␤»
01:25 jnthn For the same reason it does in the lexical case (ambiguity).
01:26 * diakopter will wait for clarification, then
01:26 * jnthn would be interested to know the answer too
01:27 TimToady std probably just punts on * vars
01:27 phenny TimToady: 23 Apr 23:28Z <sorear> tell TimToady How do undef warnings interact with autovivication?  %hash{$key} += 1;
01:27 TimToady that should be no warning at all
01:28 diakopter std: my $*a; sub foo() { my $*a; my $*a }
01:28 p6eval std 30459: OUTPUT«Potential difficulties:␤  Useless redeclaration of variable $*a (see line 1) at /tmp/KBzrSCgtVO line 1:␤------> [32mmy $*a; sub foo() { my $*a; my $*a[33m⏏[31m }[0m␤ok 00:01 109m␤»
01:28 jnthn Semi-punt. :-)
01:28 TimToady well, the difference is that it doesn't attempt to link $*a to any outer lexical scope as a mere rvalue
01:29 pmichaud Will Pm ever stop writing about Perl 6?   http://www.perlmonks.org/?node_id=836636
01:29 diakopter std: my $*a; sub foo() { my $*a if ({my $*a}()) }
01:29 p6eval std 30459: OUTPUT«ok 00:01 109m␤»
01:29 pmichaud (answer, yes, at least on this set of topics :-)
01:32 jnthn pmichaud++
01:32 jnthn Another good post.
01:37 astrojp left #perl6
01:43 meppl joined #perl6
01:44 _jaldhar_ joined #perl6
01:45 _jaldhar_ joined #perl6
01:54 * jnthn -> rest o/
01:56 alester joined #perl6
01:56 sorear backlog.
01:56 diakopter :)
01:56 sorear that stackoverflow thread doesn't touch on the real problems with DESTROY
01:57 sorear the comment about stack frames was more apt
01:57 sorear there's the question of how you deal with ressurrection, mostly
01:58 * diakopter wonders if the stackoverflow site ever throws a stackoverflow error
01:58 Psyche^ joined #perl6
01:59 sorear you can attack the problem in various ways, but there are always layer upon layer of subtle semantic traps
02:00 sorear this is one place where, IMO, there's no substitute for reading the literature
02:03 colomon why does exp have a $base argument?
02:09 sorear to set the base of the exponential?
02:09 plobsing_ joined #perl6
02:11 lue for things like :16<34*10^3>
02:11 lue (and hi)
02:12 lue (oh, I'm thinking of radcalc(). never mind)
02:12 colomon but (unless I've gone insane), exp(4, 6) is exactly the same as 6 ** 4
02:12 colomon and hi.
02:12 sorear TIMTOWDI
02:12 lue there's a base argument for the radcalc() helper function for :16<> and such :)
02:26 patspam joined #perl6
02:48 envi^home joined #perl6
02:48 fridim joined #perl6
02:53 lue rakudo: my @a = ((1,2,3),(4,5,6),(7,8,9)); say @a.WHAT
02:53 p6eval rakudo a1159c: OUTPUT«Array()␤»
02:58 Kyril joined #perl6
02:59 rv2733 joined #perl6
03:04 gurjeet joined #perl6
03:11 pugssvn r30460 | kyle++ | [util] Added purge-empty-dirs.pl
03:12 patspam joined #perl6
03:12 eternaleye joined #perl6
03:13 pugssvn r30461 | kyle++ | ran util/purge-empty-dirs.pl -- 337 empty directories gone
03:15 dalek rakudo: 543d672 | (Solomon Foster)++ | src/core/ (4 files):
03:15 dalek rakudo: Minor tweak to Complex.abs, added Real.exp and Real.infix:<**>, removed Num.exp.
03:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/543d672781b6a3d19214fedbb146b170c162c520
03:21 sorear ARGH.
03:21 sorear I know why blizkost is mysteriously failing now!
03:21 sorear it's compiling against 5.12.0 headers and linking against a 5.10.1 libperl.so
03:22 sorear and I have no clue why
03:26 sorear oh, it might be related to the fact that perl 5.12.0 was built as a monolithic binary, no libperl.so
03:34 lue our salute to *nix complexities :)
03:42 meppel joined #perl6
03:46 sorear blizkost needs a *much* more robust build system
03:48 dalek joined #perl6
04:10 jonrafkind joined #perl6
04:11 sorear I am going to break something.
04:12 sorear Most likely jnthn's no distutils rule.
04:12 sorear The build system we are using cannot get data from the compilation environment
04:13 sorear Perl 5.12 hides libperl.so in a weird place even if you compile with libperl.so support
04:13 sorear to get access to the correct path requires a Perl command containing quotes and dollar signs
04:14 sorear so embedding it in a Makefile is nontrivial
04:24 sorear GNU make's quoting syntax is NOT DOCUMENTED.
04:24 sorear Why do I have to use this software?
04:26 lue joined #perl6
04:26 sorear $(shell perl -MConfig -e 'print $$Config{ccdlflags}') did the trick
04:27 sorear no other combination works
04:27 lue \o/
04:27 sorear after 15 minutes of banging on the thing
04:46 sorear *now* I have blizkost linking against the correct Perl
05:00 ReiniUrban joined #perl6
05:03 yinyin joined #perl6
05:05 CokeBot9000 joined #perl6
06:01 XaeroOne joined #perl6
06:06 kaare joined #perl6
06:19 isBEKaml joined #perl6
06:22 snarkyboojum joined #perl6
06:35 lue goodnight moon
06:57 mgi joined #perl6
07:07 Trashlord joined #perl6
07:11 moritz_ good morning
07:11 sorear h*llo
07:13 moritz_ KyleHa++ # cleanup in pugs repo
07:18 M_o_C joined #perl6
07:20 XaeroOne joined #perl6
07:25 JimmyZ joined #perl6
07:27 JimmyZ Good aftermoon
07:33 hejki it's not waning
08:07 iblechbot joined #perl6
08:15 snarkyboojum good moaning
08:16 sorear joined #perl6
08:30 agentzh joined #perl6
08:47 isBEKaml joined #perl6
08:49 KaneJin joined #perl6
08:50 KaneJin left #perl6
09:08 JimmyZ joined #perl6
10:04 dual_ joined #perl6
10:43 sorear phenny: tell jnthn , http://qif3.kyla.fi/~stefanor/1272105680.png \o/
10:43 phenny sorear: I'll pass that on when jnthn is around.
10:45 sorear actually, everyone
10:45 sorear blizkost running a GUI in NQP
10:45 sorear :D
10:46 sorear the screenshot I told jnthn.
10:49 colomon \o/
10:50 sundar joined #perl6
10:51 sorear phenny: tell TimToady , What is the most reasonable interface for accessing Perl 5 globals?  Something like GLOBAL<perl5>::MainWindow.new, but you probably have a niftier syntax
10:51 phenny sorear: I'll pass that on when TimToady is around.
10:58 elmex joined #perl6
11:06 avar sorear: What's a global in perl5? package variables? magic variables?
11:07 sorear avar: In this case, it's an entire package.
11:08 sorear Punned as a class.
11:08 sorear Generally speaking, everything that hangs off of PL_defstash I would call "global"
11:08 sorear it's pretty easy to fake lexicality for actual imports
11:08 sorear but for non-imported symbols, it's ickier
11:09 sorear I already have the case worked out for directly imported packages (use Some::Class;  Some::Class->new)
11:09 sorear but with Tk, you import Tk and get classes like FOREIGN::perl5::MainWindow
11:10 sorear actually that's my favorite syntax so far
11:20 JimmyZ joined #perl6
11:34 finanalyst joined #perl6
11:34 finanalyst rakudo: my %h='n'=><a1 a2 a3>;class A {has @.s}; my A $x.=new(:s(%h<n>));say $x.s.perl
11:34 p6eval rakudo 543d67: OUTPUT«[("a1", "a2", "a3")]␤»
11:34 finanalyst alpha: my %h='n'=><a1 a2 a3>;class A {has @.s}; my A $x.=new(:s(%h<n>));say $x.s.perl
11:34 p6eval alpha 30e0ed:  ( no output )
11:35 finanalyst rakudo: my %h='n'=><a1 a2 a3>; say %h.perl; class A {has @.s}; my A $x.=new((%h<n>));say $x.s.perl
11:35 p6eval rakudo 543d67: OUTPUT«{"n" => ("a1", "a2", "a3")}␤[]␤»
11:36 finanalyst rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h.perl; my A $x.=new((%h<n>));say $x.s.perl
11:36 p6eval rakudo 543d67: OUTPUT«{"n" => ("a1", "a2", "a3")}␤[]␤»
11:37 finanalyst rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h.perl; my A $x.=new(:s(%h<n>));say $x.s.perl
11:37 p6eval rakudo 543d67: OUTPUT«{"n" => ("a1", "a2", "a3")}␤[("a1", "a2", "a3")]␤»
11:38 finanalyst rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h<n>.perl;my A $x.=new(:s(%h<n>));say $x.s.perl
11:38 p6eval rakudo 543d67: OUTPUT«("a1", "a2", "a3")␤[("a1", "a2", "a3")]␤»
11:40 finanalyst moritz_: am i wrong to expect the two outputs to be the same?
11:40 finanalyst hi. anyone here?
11:42 JimmyZ hello
11:45 finanalyst alpha: rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h<n>.perl;my A $x.=new(:s(%h<n>));say $x.s.perl
11:45 p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near ": class A "␤in Main (file <unknown>, line <unknown>)␤»
11:58 TSa joined #perl6
12:03 rgrau` joined #perl6
12:09 rv2733 joined #perl6
12:15 jnthn sorear: Wow, nice! :-)
12:15 phenny jnthn: 10:43Z <sorear> tell jnthn , http://qif3.kyla.fi/~stefanor/1272105680.png \o/
12:17 JimmyZ sorear++
12:18 pugssvn r30462 | moritz++ | [t/spec] random unfudges for Rakudo
12:19 moritz_ finanalyst: I'm not sure
12:21 finanalyst moritz_: if i am wrong, then how do I assign an array to an array attribute in a class?
12:22 finanalyst rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h<n>.perl;my A $x.=new(:s(%h<n>));say $x.s.perl
12:22 p6eval rakudo 543d67: OUTPUT«("a1", "a2", "a3")␤[("a1", "a2", "a3")]␤»
12:22 moritz_ rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; my A $x.=new(:s(@(%h<n>)));say $x.s.perl
12:22 p6eval rakudo 543d67: OUTPUT«["a1", "a2", "a3"]␤»
12:23 finanalyst ah. ok.
12:23 finanalyst not really DWIM
12:24 jnthn sorear: fwiw, the latest makefile is broken on Win32 in a way I'm not sure how to fix.
12:24 moritz_ finanalyst: the () should flatten out automatically
12:25 jnthn sorear: If you feel strongly that going the distutils route would be better, and since you're primarily the one who has to cope with the Blizkost build system, then I can stop objecting. :-)
12:26 jnthn rakudo: time('oh no', 'arguments')
12:26 p6eval rakudo 543d67:  ( no output )
12:26 jnthn grr
12:28 JimmyZ rakudo: say time - 1; say say - 1;
12:28 p6eval rakudo 543d67: OUTPUT«1272111156.57088␤-1␤1␤»
12:30 JimmyZ rakudo: say &time - 1;
12:30 p6eval rakudo 543d67: OUTPUT«get_number() not implemented in class 'Sub'␤current instr.: 'infix:<->' pc 294442 (src/gen/core.pir:1398)␤»
12:30 JimmyZ alpha: say &time - 1;
12:30 p6eval alpha 30e0ed: OUTPUT«get_number() not implemented in class 'Sub'␤in Main (file <unknown>, line <unknown>)␤»
12:32 JimmyZ rakudo: my $b = &time; say &$b;
12:32 p6eval rakudo 543d67: OUTPUT«␤»
12:32 JimmyZ alpha: my $b = &time; say &$b;
12:32 p6eval alpha 30e0ed: OUTPUT«time␤»
12:32 JimmyZ which one is right?
12:33 JimmyZ alpha: my $b = &time; say &$b();
12:33 p6eval alpha 30e0ed: OUTPUT«1272111439.44215␤»
12:33 JimmyZ rakudo: my $b = &time; say &$b();
12:33 p6eval rakudo 543d67: OUTPUT«␤»
12:33 JimmyZ rakudo: my $b = &time; say $b();
12:33 p6eval rakudo 543d67: OUTPUT«1272111459.04758␤»
12:33 JimmyZ alpha: my $b = &time; say $b();
12:33 p6eval alpha 30e0ed: OUTPUT«1272111462.12188␤»
12:33 * jnthn afk for a bit
12:34 jnthn (spectesting a patch to move time into the setting to at least the 0-args signature is enforced)
12:45 k23z__ joined #perl6
12:48 ingy 5555
12:48 gurjeet joined #perl6
12:49 * moritz_ hopes that was not an irssi window number :-)
13:00 pmichaud good morning, #perl6
13:00 moritz_ oh hai
13:00 * jnthn back for a bit
13:00 jnthn o/ pmichaud
13:00 ReiniUrban joined #perl6
13:04 * moritz_ sees a test like this:
13:05 moritz_ my $foo = 42;
13:05 moritz_ ($foo, 'ignored')[0] = 23
13:05 moritz_ and the test expects that to assign 23 to $foo
13:05 moritz_ is that correct?
13:05 * moritz_ hopes not
13:06 jnthn moritz_: Why would you expect it to not work?
13:06 moritz_ because lists are immutable
13:06 moritz_ oh, rakudo actually passes that test...
13:07 jnthn Hmm. Interesting question. :-)
13:07 moritz_ rakudo: my $x = 4; ($x, 3)[0] = 6; say $x
13:07 p6eval rakudo 543d67: OUTPUT«6␤»
13:08 moritz_ rakudo: my $x = 0; my $y = 0; ($x, $y)[0] = (6, 8); say $x, $y
13:08 p6eval rakudo 543d67: OUTPUT«6 80␤»
13:08 moritz_ rakudo: my $x = 0; my $y = 0; ($x, $y)[0, 1] = (6, 8); say $x, $y
13:08 p6eval rakudo 543d67: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17354 (src/builtins/Junction.pir:393)␤»
13:08 moritz_ rakudo: my $x = 0; my $y = 0; ($x, $y)[0, 1] = 6, 8; say $x, $y
13:08 p6eval rakudo 543d67: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17354 (src/builtins/Junction.pir:393)␤»
13:09 moritz_ it complains in a slice, but not otherwise
13:09 colomon joined #perl6
13:09 colomon http://www.nomic.net/~nomicwiki/index.php/PerlNomic
13:11 jnthn moritz_: Something seems odd there, then.
13:11 dalek rakudo: ae0c2d4 | jonathan++ | build/Makefile.in:
13:11 dalek rakudo: Pull subset implementation a little earlier in the bootstrap, so we can define subset types in the core setting.
13:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ae0c2d462f816285656e3fb0abe57fe6c2e2f94d
13:11 dalek rakudo: c866154 | jonathan++ | src/ (2 files):
13:11 dalek rakudo: Move time to core setting.
13:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c866154f601575818b4004f8be57b74c89c90575
13:11 dalek rakudo: de2ad34 | jonathan++ | src/core/Mu.pm:
13:11 dalek rakudo: Initial port of WALK from alpha. Passes some of the tests; think those that fail are not due to an issue in WALK itself. Also add the Matcher subset type.
13:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/de2ad341b279e0ece8b9d6c510be44e832f0986f
13:12 moritz_ rakudo: say Parcel ~~ Seq
13:12 p6eval rakudo 543d67: OUTPUT«0␤»
13:14 pugssvn r30463 | moritz++ | [t/spec] fudge lists.t for rakudo; some corrections
13:18 pugssvn r30464 | moritz++ | [t/spec] fudge dollar-underscore.t for rakudo
13:20 pmichaud 13:06 <moritz_> because lists are immutable
13:20 pmichaud ... ($foo, 23)  is not a list.
13:20 pmichaud It's a Parcel.
13:20 moritz_ point taken
13:20 pmichaud and clearly we expect  ($foo, $bar) = ...   to work.
13:21 moritz_ fair enough
13:21 moritz_ now that you mention it, I feel silly for having asked :-)
13:21 pmichaud so, I agree there's an argument to be made that perhaps  ($foo, 23)[0] = ...   shouldn't work, but there's also an argument the other way :)
13:22 pmichaud more interesting might be something like   (@a, @b)[25] = ...
13:22 plobsing joined #perl6
13:23 pmichaud there's also the possibiility that  .[ ]   turns a parcel into a list or seq or something like that, which would make your original interpretation ("it shouldn't work") valid.
13:23 pugssvn r30465 | moritz++ | [t/spec] update dollar_bang.t
13:23 pmichaud I think we just have to see how the list/seq/array refactoring falls out and then say "oh, yes of course" or "no, that can't be right"  :)
13:24 jnthn pmichaud: (turns a into a Seq) that was the main reason I was thinking "hmm, mabye that won't work", fwiw.
13:24 pmichaud jnthn: right
13:25 pmichaud jnthn: but I'm also suspicious that Parcel->Seq won't end up being the transformation.  We'll see.
13:27 jnthn Ah, OK.
13:27 pugssvn r30466 | moritz++ | [t/spec] throw away a wrong test in chained-declarators.t, and fudge for rakudo
13:27 moritz_ rakudo: 1 p5=> 5
13:27 * jnthn expects he'll be happy with whatever pmichaud++ comes up with
13:27 p6eval rakudo 543d67: OUTPUT«Confused at line 11, near "1 p5=> 5"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
13:27 moritz_ std. 1 p5=> 5
13:27 moritz_ std: 1 p5=> 5
13:27 p6eval std 30462: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/B8kNRbvLWR line 1:␤------> [32m1 [33m⏏[31mp5=> 5[0m␤    expecting any of:␤       bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 109m␤»
13:27 moritz_ std: 1 P5=> 5
13:27 p6eval std 30465: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/8jEGzSOSN1 line 1:␤------> [32m1 [33m⏏[31mP5=> 5[0m␤    expecting any of:␤       bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 109m␤»
13:29 moritz_ rakudo: [/] ()
13:29 p6eval rakudo 543d67: OUTPUT«No applicable candidates found to dispatch to for 'infix:</>'. Available candidates are:␤:(Rat $a, Rat $b)␤:(Rat $a, Int $b)␤:(Int $a, Rat $b)␤:(Int $a, Int $b)␤:(Complex $a, Complex $b)␤:(Num $a, Num $b)␤:(Real $a, Real $b)␤:(Complex $a, Any $b)␤:(Any $a, Complex $b)␤:(Any
13:29 p6eval ..$a, Any…
13:35 molaf joined #perl6
13:40 colomon woah, that's a lot of options.
13:46 pmichaud need to be able to define [/]() directly.
13:46 moritz_ rakudo: say [*]()
13:46 pmichaud (and it should fail)
13:46 p6eval rakudo 543d67: OUTPUT«1␤»
13:46 moritz_ pmichaud: I've defined some of these operators, but for those not in the setting it's harder
13:46 pmichaud moritz_++
13:47 moritz_ src/core/metaops.pm
13:47 colomon surely / should be easy, right?
13:47 colomon hmmm.... where are the tests for those?
13:47 pmichaud our multi sub infix:</>() { fail "..." };
13:47 colomon why fail?
13:48 pmichaud S03:
13:48 pmichaud Builtin reduce operators return the following identity values:
13:48 pmichaud [**]()      # 1     (arguably nonsensical) [*]()       # 1 [/]()       # fail  (reduce is nonsensical)
13:48 colomon fair enough!
13:48 pmichaud afk, housework
13:48 XaeroOne joined #perl6
13:49 colomon moritz_: do you have that, or do you want me to get it?
13:50 iblechbot joined #perl6
13:50 * colomon not convinced [/] is nonsensical, though mildly useless seems accurate...
13:51 _buno_ joined #perl6
13:52 moritz_ colomon: S03-operators/reduce-le1arg.t
13:53 colomon danke
13:53 moritz_ bitteschön
13:53 moritz_ S03-operators/spaceship.t
13:53 moritz_ S03-operators/spaceship.t
13:53 moritz_ oops
13:54 moritz_ that test file relies on {; $_ => 1 } being a block
13:54 moritz_ rakudo: say {; $_ => 1}.WHAT
13:54 p6eval rakudo de2ad3: OUTPUT«Hash()␤»
13:54 colomon yeah, we apparently need to fix that.
13:54 jnthn Eww!
13:57 dalek joined #perl6
14:08 * jnthn going out to enjoy the sun for a bit
14:08 colomon is pondering how to make reduce-le1arg.t work.
14:09 colomon more work than I was expecting.
14:14 patspam joined #perl6
14:15 finanalyst rakudo: class B {has @.a;has $.u;method m { for $.u .. 4  { .WHAT.say; say @.a[$_] }}}; my B $x.=new(:a<a b c d>,:u('3'));$x.m
14:15 p6eval rakudo de2ad3: OUTPUT«Str()␤No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10885 (src/builtins/Role.pir:73)␤»
14:16 finanalyst i think Str should numify to index an array in a class. Yes?
14:17 colomon sounds plausible to me.
14:18 finanalyst rakudo: class B {has @.a;has $.u;method m { for $.u .. 4  { .WHAT.say; say @.a[+$_] }}}; my B $x.=new(:a<a b c d>,:u('3'));$x.m
14:18 p6eval rakudo de2ad3: OUTPUT«Str()␤No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10885 (src/builtins/Role.pir:73)␤»
14:18 finanalyst not only that but I cant seem to coerce the Str to a Num
14:18 finanalyst akudo: class B {has @.a;has $.u;method m { for $.u .. 4  { .WHAT.say; say @.a[$_] }}}; my B $x.=new(:a<a b c d>,:u(3));$x.m
14:19 finanalyst rakudo: class B {has @.a;has $.u;method m { for $.u .. 4  { .WHAT.say; say @.a[$_] }}}; my B $x.=new(:a<a b c d>,:u(3));$x.m
14:19 p6eval rakudo de2ad3: OUTPUT«Int()␤d␤Int()␤␤»
14:19 finanalyst but code works if attribute is given as a number.
14:20 colomon that's not ever going to work, because Ranges can be over numbers or over strings.
14:21 colomon rakudo: say 'd' .. 'f'
14:21 p6eval rakudo de2ad3: OUTPUT«def␤»
14:21 colomon rakudo: say '3' .. 'f'
14:21 p6eval rakudo de2ad3: OUTPUT«3456789␤»
14:21 colomon which isn't to say that it necessarily works correctly now, either.
14:21 colomon rakudo: say ('3' .. 'f').list.perl
14:21 p6eval rakudo de2ad3: OUTPUT«"3".."f"␤»
14:22 finanalyst the problem is the coercion to an integer to index the array
14:22 colomon rakudo: say ('3' .. 'f').iterator.perl
14:22 p6eval rakudo de2ad3: OUTPUT«("3", "4", "5", "6", "7", "8", "9")␤»
14:22 XaeroOne joined #perl6
14:23 finanalyst if $_ is given Type Str, then inside the class it cannot be used to index the array attribute
14:23 finanalyst And I cant work out how to coerce it to do so
14:24 colomon rakudo: my @a = 'a'..'g'; say @a[+'3']
14:24 p6eval rakudo de2ad3: OUTPUT«d␤»
14:24 finanalyst rakudo: class B {has @.a;has $.u;method m { for $.u .. 4  { .WHAT.say; say @.a[+$_] }}}; my B $x.=new(:a<a b c d>,:u(+'3'));$x.m
14:24 p6eval rakudo de2ad3: OUTPUT«Num()␤No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10885 (src/builtins/Role.pir:73)␤»
14:24 finanalyst Also Num cant be used to index array. Bug I think
14:28 colomon There are definitely bugs in array indexing at the moment.
14:29 finanalyst what is the syntax for casting to an Int?
14:29 patspam joined #perl6
14:30 finanalyst rakudo: my $x = '3'; say $x.WHAT; say (+$x).WHAT
14:30 p6eval rakudo de2ad3: OUTPUT«Str()␤Num()␤»
14:30 finanalyst rakudo: my $x = '3'; say $x.WHAT; say (+$x).WHAT; say (Int($x)).WHAT
14:30 p6eval rakudo de2ad3: OUTPUT«Str()␤Num()␤Could not find sub &Int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
14:30 finanalyst rakudo: my $x = '3'; say $x.WHAT; say (+$x).WHAT; say (int($x)).WHAT
14:30 p6eval rakudo de2ad3: OUTPUT«Str()␤Num()␤Could not find sub &int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
14:31 finanalyst colomon: how do I get an Int()?
14:32 XaeroOne joined #perl6
14:33 pmichaud officially,  Int($something) .  I think that's still NYI.
14:33 pmichaud you might be able to do  $something.Int  -- that may be NYI also but it would be relatively easy to I
14:33 pmichaud rakudo:  say "3.14".Int
14:33 p6eval rakudo de2ad3: OUTPUT«3␤»
14:33 pmichaud looks I to me :-)
14:33 pmichaud rakudo:  say Int(3.14);
14:33 p6eval rakudo de2ad3: OUTPUT«Could not find sub &Int␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
14:34 pmichaud that's wrong -- it shouldn't be treating Int(...) as a sub.
14:34 colomon .Int
14:38 finanalyst rakudo: my $x = '3'; say $x.WHAT; say (+$x).WHAT; say ($x.Int).WHAT
14:38 p6eval rakudo de2ad3: OUTPUT«Str()␤Num()␤Int()␤»
14:39 finanalyst rakudo: class B {has @.a;has $.u;method m { for $.u .. 4  { .WHAT.say; say @.a[$_.Int] }}}; my B $x.=new(:a<a b c d>,:u('3'));$x.m
14:39 p6eval rakudo de2ad3: OUTPUT«Str()␤d␤Str()␤␤»
14:46 XaeroOne joined #perl6
14:52 lisppaste3 joined #perl6
14:54 M_o_C joined #perl6
15:19 takadonet any idea what error message "Method 'new' not found for non-object" means?
15:19 moritz_ takadonet: it means a parrot value leaks through somewhere
15:19 takadonet mortiz_: nuts....
15:20 * moritz_ points takadonet to the tab key
15:20 takadonet sorry
15:20 moritz_ np
15:25 snarkyboojum joined #perl6
15:26 TiMBuS joined #perl6
15:33 takadonet what is another way to replace all '_' in a string  with a whitespace without using .trans method?
15:35 moritz_ takadonet: $str.subst('_', ' ', :g)
15:35 moritz_ or maybe /_/
15:35 takadonet moritz_: I almost got it myself but you are quicker :)
15:36 colomon joined #perl6
15:39 takadonet welcome back colomon
15:40 colomon I hardly left, the computer just accidentally got closed.  ;)
15:47 pmurias joined #perl6
15:54 takadonet Another error message: Method 'list' not found for invocant of class 'ResizablePMCArray' I'm trying to do a gather and take in action class  i.e :  my @matches = gather for @( $/<fasta> ) -> $m {take $m;} . Any ideas?
15:56 takadonet I can access any of the match normally by $/<fasta>[NUM]
15:56 lue o hai dere
15:56 colomon did you try leaving out the @(    and ) bits?
15:58 takadonet runs but not sure if the result are being taking out
15:58 takadonet shit...
15:58 takadonet need to put back the make @matches part
15:58 colomon yeah, you might get the entire thing instead of each bit.
15:59 takadonet ya
16:03 patspam joined #perl6
16:11 Trashlord joined #perl6
16:15 * jnthn back from walk
16:18 takadonet jnthn: welcome back
16:18 takadonet gather and take are lazy by default correct?
16:19 jnthn Should be.
16:19 lue hello jnthn o/
16:20 Gothmog_ joined #perl6
16:21 lisppaste3 takadonet pasted "lazy:gather/take" at http://paste.lisp.org/display/98277
16:22 takadonet Should this print out the word beer between each number?
16:23 takadonet Or is the 'for' loop is forcing to evaluate all the values?
16:24 jnthn takadonet: Yeah, for loops are not lazy yet.
16:25 takadonet jnthn: Well they should be :) Thanks jnthn
16:26 jnthn rakudo: my $i; my @a = gather { $i = 1; for (1 .. 5) -> $j { say 'beer!'; take $j; } }; @a.map(-> $b { say $b }).eager;
16:26 p6eval rakudo de2ad3: OUTPUT«beer!␤beer!␤beer!␤beer!␤beer!␤1␤2␤3␤4␤5␤»
16:26 jnthn Oh
16:26 jnthn Yeah, so maybe it's the array assignment this time.
16:26 jnthn I think pmichaud++ is working on this area this weekend though. :-)
16:26 takadonet good
16:27 takadonet :)
16:27 takadonet I always find the unimplemented areas within a few minutes of coding!
16:33 daemon takadonet, you must have the skill :)
16:34 takadonet daemon: well I really want to start getting some working code again!
16:34 daemon takadonet, Oh you enjoy the challange, admit it
16:35 takadonet daemon: yes..... but but.... ya
16:35 hudnix joined #perl6
16:36 justatheory joined #perl6
16:36 daemon hehe good luck, time for me to go be challanged by writing out my new database. I really suck with postgres :( *heads off to find a 'PostGres for dummies' book*
16:40 lisppaste3 takadonet annotated #98277 "Subst bug?" at http://paste.lisp.org/display/98277#1
16:40 takadonet subst cannot be used on a Regex::match?
16:43 nihiliad joined #perl6
16:50 takadonet take that as everyone is hacking quietly or sleeping :)
16:50 patspam joined #perl6
16:53 finanalyst left #perl6
16:53 pmurias takadonet: what would it do?
16:53 takadonet pmurias: error message " Method 'subst' not found for invocant of class 'Regex;Match' "
16:54 takadonet i can do math operation on Regex::Match but not string modification
16:54 pmurias += works?
16:54 takadonet also $/.ast is undef since we are in the action method
16:55 jnthn takadonet: You may want to coerce it to a string yourself for now
16:55 jnthn In the long run, yes, it should work
16:55 colomon I'm not sure why $/.subst doesn't work, but have you tried (~$/).subst?
16:55 * pmurias forgot that subst doesn't modify the string
16:55 takadonet colomon: works!
16:56 takadonet what did you just tell me to do? hehe
16:56 colomon same thing jnthn++ did, I just expressed it as code.
16:56 colomon prefixing a ~ on something turns it into a string.
16:56 colomon so $/ is a match object, ~$/ is the string form of it.
16:57 takadonet sweet
16:57 takadonet well it works
16:58 takadonet colomon++
16:59 colomon rakudo: say Regex::Match ~~ Cool
16:59 p6eval rakudo de2ad3: OUTPUT«0␤»
17:00 colomon That may be why it didn't work the first way you had it there.
17:04 jnthn Yeah, our Match objects aren't Cool yet.
17:05 * takadonet cries
17:05 takadonet one day... one day
17:14 * moritz_ working on it
17:25 Kyril joined #perl6
17:30 mberends joined #perl6
17:34 pugssvn r30467 | moritz++ | [t/spec] a fudge to lists.t that I forgot earlier
17:35 lue afk
18:03 pugssvn r30468 | colomon++ | [t/spec] Major refudge for current Rakudo.
18:03 mberends ooh! :-)
18:06 mikehh joined #perl6
18:08 Kyril_ joined #perl6
18:18 hghgd joined #perl6
18:34 masak joined #perl6
18:34 masak saluton, #perl6!
18:36 takadonet masak:hello
18:36 meppl joined #perl6
18:36 kerframil left #perl6
18:36 mberends ahoj, masak!
18:37 masak for ^5 { my $a; BEGIN { $a = 42; say "OH HAI" }; say $a }
18:37 masak what would you expect this to output?
18:38 masak Perl 5.10 outputs "OH HAI\n42\nwarning\n\nwarning\n\nwarning\n\nwarning\n\n"
18:38 mberends 42\n42\n42\n42\n42\n ?
18:39 M_o_C joined #perl6
18:39 masak why would the $a variables get that value if no "OH HAI" is output?
18:40 mberends OH HAI42\n42\n42\n42\n42\n ? # forgot ;)
18:40 masak ok, that's a reasonable expectation.
18:41 masak at least I thought so until today. :)
18:41 jnthn If it's going to work, I'd think that you'd get that.
18:41 jnthn I'd expect to BEGIN to run once.
18:41 masak right.
18:41 jnthn Well
18:41 jnthn Thing is
18:41 jnthn a BEGIN block that refers to outer lexicals is just plain nasty.
18:42 masak so there's some kind of cloning of the for block going on here to make this work.
18:42 masak there's kind of a proto-block which knows that it contains a lexical $a.
18:42 jnthn IICU, a "my" is meant to make set up the thingy in the lexpad.
18:42 masak that one gets 'reified' into a runnable block and the BEGIN block runs on it.
18:42 jnthn e.g. maybe you're seeing the same effect that makes the "my $x if 0" trick.
18:43 masak for each iteration then, a new runnable block is cloned from the one where the BEGIN ran.
18:43 jnthn Maybe.
18:44 masak that's the only reasonable way I can think of right now, to produce "OH HAI\n42\n42\n42\n42\n42\n"
18:44 jnthn Pm and I have discussed the idea of a "proto lex pad" which is the same kinda clone idea I think.
18:44 masak well,
18:44 masak I already know that I well need blocks-at-compile-time and blocks-at-runtime.
18:44 jnthn My inner implementer wants to just say "can't do that with BEGIN" of course. :-)
18:44 masak of course :)
18:45 masak Perl 5 doesn't come out and say it, but instead implies it.
18:48 mberends I've just committed the closure goodness of masak++'s nicer-strftime branch to master, without any loss of tests :-)
18:48 masak mberends++
18:49 colomon Speaking of which, 31605 tests passing here
18:49 dalek rakudo: a7f317d | (Martin Berends)++ | src/core/Temporal.pm:
18:49 dalek rakudo: [core/Temporal.pm] merge in the nicer-strftime branch hash-of-closures in strftime() in a way that works with current master
18:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a7f317d2fb50eaa4896d0713c44e424a21bb8669
18:49 dalek rakudo: 06fe9a7 | (Solomon Foster)++ | t/spectest.data:
18:49 dalek rakudo: Turn on S03-operators/reduce-le1arg.t.
18:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/06fe9a7452d03083374cb92aeb3e0e8c4ece9ab5
18:49 dalek rakudo: 884c3c0 | (Solomon Foster)++ | src/core/metaops.pm:
18:49 dalek rakudo: Add version of notresults which takes an operator type but no operands and always returns Bool::True.  Add zero-arg versions of <, <=, >, >=, and eqv.
18:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/884c3c06248ced56f9c86ff60b039e96e105e58a
18:49 dalek rakudo: 1e71b81 | (Solomon Foster)++ | src/c (4 files):
18:49 dalek rakudo: Move a bunch of operators from num-ops.pir and str-ops.pir to operators.pm.  Add no-arguments versions of some of them as well.
18:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1e71b81b6097f7efa2ee781ce71ea7a8cf5fafed
18:51 masak mberends: so I'll remove the nicer-strftime branch on github, then?
18:52 jnthn colomon: Whoa...how'd we get up to that?! :-D
18:53 colomon I blame moritz_++
18:53 colomon Though I just adding 40 passing tests myself.  :)
18:54 mberends masak: yes, thanks
18:54 masak done.
18:58 masak pmichaud: [backlog] nice http://www.perlmonks.org/?node_id=836636 -- a teeny tiny nitpick: not only do I in that post (and in general) not believe that a name change of Perl 6 will 'happen anytime soon', I don't believe it will, or should, happen at all.
18:59 masak but maybe that's less what people reading that post want to hear right now, and what you wrote is more diplomatic.
19:00 masak that said, I'm all for giving lots of focus on names like "Rakudo", "Vill", and "Sprixel".
19:02 jnthn colomon: Yay! :-)
19:04 pugssvn r30469 | kyle++ | [util] Silly bug
19:08 colomon rakudo: say [before] 3, 4, 15, 100/3
19:09 p6eval rakudo de2ad3: OUTPUT«1␤»
19:09 colomon rakudo: say [before] 3, 4, 15, 10/3
19:09 p6eval rakudo de2ad3: OUTPUT«0␤»
19:10 masak sorear++ # blizkost nqp GUI \o/
19:16 masak I can't be sure, but the two newcomers (cberg++ yesterday and Matthias_++ the day before) might very well both have been here thanks to the positive impact of the recent PerlMOnks thread with all the anti-FUD.
19:25 jnthn masak: That thought had occurred to me too.
19:26 jnthn \o/ Jag har tolv köttbullar i pannat!
19:26 masak 'pannan' :)
19:26 masak köttbullar, mums!
19:27 masak jnthn: oh btw, I finally heard an example of the food-orders-always-have-an-'en'-article today in real use.
19:27 masak it was really obvious, but I hadn't thought about it until now.
19:27 jnthn Oh?
19:27 masak 'en kaffe'.
19:28 masak now, 'kaffe' is a t-word.
19:28 jnthn kaffe is normally neuter?
19:28 wormphlegm joined #perl6
19:28 masak right.
19:28 jnthn Jag dricker kaffet. # I'm drinking the coffee
19:28 jnthn ?
19:28 masak aye.
19:28 jnthn But en kaffe to order?
19:28 jnthn OK. :-)
19:28 masak 'Jag vill ha en smörgås och en kaffe.'
19:30 jnthn An egg goose? ;-)
19:33 masak nono, a butter goose.
19:33 masak that's how we say 'sandwich' in my country.
19:33 * masak does a funny native dance, too
19:34 frettled sudo make me a sandwich
19:36 * jnthn gets the lingonsylt and smörgås gurka ready :-)
19:36 moritz_ http://www.perlmonks.org/?node_id=836695 "If you would (like me) follow Python boards and see the frustration Ruby causes you might change your opinion about a fast major release of Perl5."
19:36 moritz_ somehowI don't understand this sentence at all
19:37 moritz_ wtf has the python-ruby frustration to do with the next major perl 5 release?
19:38 moritz_ and do I even want to know?
19:39 * jnthn afk, nomming
19:39 masak might be beyond the point where knowing/caring stops leading to something constructive.
19:39 moritz_ probably
19:41 lichtkind joined #perl6
19:41 moritz_ rakudo: say pi
19:41 p6eval rakudo 06fe9a: OUTPUT«3.14159265358979␤»
19:42 masak rakudo: pi pi
19:42 p6eval rakudo 06fe9a: OUTPUT«Confused at line 11, near "pi pi"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
19:42 masak rakudo++
19:42 pugssvn r30470 | colomon++ | [t/spec] Add tests for infix:<before> and infix:<after>, fix a typo.
19:42 masak std: pi pi
19:42 p6eval std 30469: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/AG9A7mf3Ui line 1:␤------> [32mpi [33m⏏[31mpi[0m␤    expecting any of:␤  bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 109m␤»
19:42 dalek rakudo: 4bf985c | (Solomon Foster)++ | src/core/metaops.pm:
19:42 dalek rakudo: Delete a number of commented out zero-arg operators that we don't need because notreduce handles them.  Uncomment infix:<before> and infix:<after>.
19:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4bf985c1e9f5d8754e879c538938778516fe258a
19:42 dalek rakudo: ea91882 | moritz++ | t/spectest.data:
19:42 dalek rakudo: re-enable a few test files; also throw one entry away where the test file was deleted
19:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ea91882ebc12fcd4b8c8f258cfc8fdaffe58af01
19:42 masak though STD wins on the error message.
19:44 moritz_ rakudo. say atan(1)
19:44 lichtkind cheers buddys
19:44 moritz_ rakudo: say atan(1)
19:44 p6eval rakudo 06fe9a: OUTPUT«0.785398163397448␤»
19:44 moritz_ rakudo: say atan(1)*4
19:44 p6eval rakudo 06fe9a: OUTPUT«3.14159265358979␤»
19:45 masak lichtkind! \o/
19:46 masak rakudo: say atan2(0, -1)
19:46 p6eval rakudo 06fe9a: OUTPUT«3.14159265358979␤»
19:49 sorear jnthn: How is the makefile broken on Windows?
19:49 moritz_ rakudo: 3.14159265358979323846264338327950288419716939937510e0
19:49 p6eval rakudo 06fe9a: OUTPUT«Multiple Dispatch: No suitable candidate found for 'multiply_float', with signature 'PNP->P'␤current instr.: 'perl6;Perl6;Actions;_block6598' pc 264972 (src/gen/perl6-actions.pir:13056)␤»
19:49 masak I s'pose that's a known, reported bug?
19:50 moritz_ no idea
19:50 moritz_ don't think so
19:50 * masak submits it, then
19:50 masak Justin Case. :)
19:51 pugssvn r30471 | colomon++ | [t/spec] Add a few tests for infix:<**>(Real, Real) and Real.exp.
19:52 masak rakudo: rakudo: 3.14159265358979323846264338327950288419716939937510
19:52 colomon That is a known bug, I think.
19:52 p6eval rakudo 06fe9a: OUTPUT«Confused at line 11, near "rakudo: 3."␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
19:52 masak dang.
19:52 masak rakudo: 3.14159265358979323846264338327950288419716939937510
19:52 p6eval rakudo 06fe9a: OUTPUT«PAST::Compiler can't compile node of type BigInt␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
19:52 moritz_ colomon: I knew it only with rats, not with nums
19:52 masak colomon: even with the e0 at the end?
19:52 colomon A couple of us have had shots at rewriting it and failed.
19:53 moritz_ there's a patch by baest++ in RT
19:53 colomon orly?
19:53 frettled Whoever this Rolf (LanX) is, that discussion subthread is counter-productive.  Kudos to pmichaud++ for trying to keep up, but I think it's a dead end.
19:54 masak frettled: I had the same thought.
19:54 moritz_ I never found discussing with LanX productive
19:54 moritz_ he used to have endless threads on perl-community.de too
19:57 colomon where is the current thread?
19:59 masak http://www.perlmonks.org/?node_id=836349
19:59 colomon thanks
19:59 frettled colomon: I'd recommend against reading it.  :)
20:00 masak well, once doesn't hurt. just don't read it four times, like I did. :P
20:00 frettled haha
20:06 * jnthn back from nomming
20:07 frettled So, er, did you _really_ combine lingonsylt with smörgåsgurka?
20:07 jnthn sorear: I *think* my make program doesn't handle :=
20:07 jnthn frettled: Maybe smörgåsgurka isn't the word I wanted.
20:07 jnthn Pickled cucumber?
20:08 masak aye.
20:08 frettled The same
20:08 masak frettled: don't tell me you've never combined those two and köttbullar? :)
20:08 frettled But by all means, that sounds like a worthy test for a gastronaut.
20:08 masak it's typical Swedish fare.
20:09 jnthn It somehow feels right.
20:09 jnthn Having actually done it.
20:09 frettled masak: sure, but I don't think I've put both lingon and gurka in my mouth at the same time, strangely enough.
20:09 masak frettled: you're putting up invisible limits for yourself. free your mind :)
20:10 frettled Hmm.
20:10 * frettled checks the fridge.
20:10 masak sweet and salty is very good, in a contrasty way.
20:10 masak and come to think of it, lingon is actually sweet with a touch of sour.
20:11 dalek rakudo: 73e8d42 | moritz++ |  (2 files):
20:11 dalek rakudo: implement samecase()
20:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/73e8d42cf493366464a60411fa59cd6601856b90
20:12 colomon partridgeberry!  mmmmmm......
20:15 pugssvn r30472 | moritz++ | [t/spec] be more idiomatic in map_function_return_values.t
20:15 masak p6l is now considering not only all the calendars of the world, but all possible calendars in all fantasy worlds, too. my blood pressure stays low because I simply cannot take them seriously.
20:16 * jnthn isn't even reading those posts any more.
20:16 * moritz_ finds that blood pressure is generally overrated anyway
20:16 jnthn masak++ for bothering to at all.
20:18 madalu joined #perl6
20:19 masak well, zany as they seem, they might be right in that the option to plug in other calendar systems is actually a good idea for extensibility.
20:19 frettled http://jani.at.ifi.uio.no/tmp/lingon+gurka.jpg
20:20 masak frettled++
20:20 moritz_ masak: yes. And Instant provides that capability
20:20 frettled The gurka is a bit too dominantly sour, otherwise it would work quite well.
20:21 * colomon appears to have completely broken exp locally.
20:21 moritz_ use MONKEY_TYPING; augment class Instant { method Discordian { Discordian.new(self) } }; now.Discordian.whatever
20:21 masak or just put the coercion in the Discordian class.
20:21 nihiliad joined #perl6
20:21 frettled heh
20:22 masak hm, actually using Discordian as an example in the spec would make lue++ happy :)
20:22 moritz_ masak: sure, if you're not sold to the built-in feeling
20:22 frettled I actually think the last two posts (that I read) were quite useful.  Darren Duncan and Jon Lang, IIRC.
20:22 masak moritz_: I'm not, at least not at the expense of turning on duck punching... er, monkey typing.
20:22 moritz_ frettled: the key is knowing when to stop reading :-)
20:22 frettled and which parts to skim
20:23 masak sounds like the Halting Problem but for PerlMonks posts :P
20:23 masak you need to skim to know whether or not to skim, but then you might actually start reading in depth...
20:24 frettled I can hear one hand clapping already.
20:25 frettled On a more serious note: I think it's useful to think of the basis of time as instants and durations, but as Jon (IIRC) said: there should be a default, and that default should be Gregorian.  And that's what we're getting, ain't that so?
20:25 masak yes!
20:27 frettled Is there a perl6-modules discussion list yet?
20:28 moritz_ nope
20:28 moritz_ might be a good idea to start one
20:29 colomon "No, you'd likely have a Perl 5.10 that would be called "Perl 6"."  pmichaud++
20:30 madalu joined #perl6
20:31 frettled I'm so glad that I don't have an account for commenting there, I might be tempted to say something like "there haven't yet been big enough changes to Perl 5 to merit a new major version number, nor is there any such change on the horizon", and people might be pissed off for all sorts of reasons.  :)
20:32 frettled But then I have a pretty conservative and orthodox view regarding what merits a change of major version, and I think that changing the minor version is a huge f-ing clue that there are significant changes.
20:41 masak audreyt++ # "Perl v5+6i" :)
20:41 masak a bit too complex, I fear. but a fun suggestion.
20:42 frettled heh
20:43 sorear jnthn: You can replace the := with a = if you want, it'll only double the number of processes run during the make
20:43 sorear = in make is macro expansion and evaluates each time the LHS is used
20:43 sorear := evaluates once, but it's not in nmake?
20:44 moritz_ still same O($thing) :-)
20:44 moritz_ rakudo: class A { method f { say "moep" } }: A.new ~~ .f
20:44 p6eval rakudo ea9188: OUTPUT«Confused at line 11, near "class A { "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
20:45 moritz_ rakudo: class A { method f { say "moep" } }; A.new ~~ .f
20:45 p6eval rakudo ea9188: OUTPUT«Method 'f' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
20:45 moritz_ bug
20:48 jnthn moritz_: It's a syntactic form of smartmatch, didn't pop 'em back yet.
20:48 jnthn moritz_: I think all of the smartmatch test files that we still have got commented out are for the syntactic forms.
20:49 lue hello!
20:49 moritz_ jnthn: well, even if it's not syntactic, the LHS should be the topic of the RHS, afaict
20:50 moritz_ but adding back the syntactic form should solve the problem too
20:50 sorear does rakudo work on parrot trunk yet?
20:50 moritz_ is there a way to get the caller's $_ somehow? (maybe PIR cheating)
20:50 moritz_ sorear: don't think so
20:50 sorear $CALLER::_
20:51 moritz_ sorear: today, not in theory :-)
20:51 jnthn moritz_: The syntactic form is used to make that so.
20:51 moritz_ jnthn: ah
20:51 moritz_ rakudo: say (s/foo/bar/).WHAT
20:51 p6eval rakudo ea9188: OUTPUT«Substitution()␤»
20:52 takadonet I just got parsefile method from Grammar to work correctly with my code. Do i need to make a new patch (http://wiki.github.com/rakudo/rakudo/steps-to-create-a-patch) for a one line change?
20:52 moritz_ takadonet: you can nopaste it here too
20:52 takadonet k
20:52 jnthn Yes, there's a way, in PIR it's something like $P0 = getinterp\n$P1 = $P0['lexpad';1]\n$P2 = $P1['$_'] # or some such
20:53 moritz_ jnthn: thanks
20:55 lisppaste3 takadonet pasted "Parsefile Fix" at http://paste.lisp.org/display/98283
20:56 moritz_ method parse() could also use a *%options hash
20:56 * moritz_ spectests
20:56 takadonet moritz_: Ya either way works
20:57 takadonet spec file still does not pass but it for other reason
20:57 takadonet but my code does work now :)
20:57 sorear jnthn: Does s/:=/=/ work for you?
20:59 sorear jnthn: To be fair I'm not convinced by the distutils approach, but I definitely want to get away from our reliance on gen_makefile.pl because it has no extensibility
20:59 sorear I can see us copying the Rakudo makefile machinery
21:00 ReiniUrban joined #perl6
21:01 moritz_ takadonet: ah, the test file assumes weird things
21:02 takadonet moritz_: which test file? parse_and_parsefile.t ?
21:02 moritz_ .parse() implicitly anchors the matcht as ^ ... $
21:02 moritz_ takadonet: yes
21:02 * moritz_ too tired to fix it
21:03 takadonet moritz_: nothing to do with my change right?
21:03 moritz_ takadonet: right
21:03 takadonet moritz_: Good! apply when you want, I just changed it on my branch for now so I can can continue to work
21:04 cosimo hi everyone, i picked up rakudo on win32 again after a couple of months. builds fine, but I can't run my LWP::Simple module anymore...
21:04 cosimo it used to be fine, but now I get this error message:
21:04 cosimo Null PMC access in find_method('get_parrotclass')
21:04 cosimo current instr.: 'perl6;ClassHOW;onload' pc -1 ((unknown file):-1)
21:05 masak cosimo: might be you're using sockets and they don't work in master yet.
21:05 masak still, it's an un-fun error message.
21:05 masak tried to isolate it?
21:06 lisppaste3 cosimo pasted "lwp-get.pl" at http://paste.lisp.org/display/98287
21:06 lue what does LWP::Simple do?
21:06 jnthn That looks like a startup-time crash... :-/
21:07 moritz_ any stray .pir files lying around?
21:07 moritz_ lue: it crashes
21:07 cosimo masak: ok
21:07 lue *supposed* to do :)
21:07 jnthn moritz_: Yes, that's a good guess.
21:08 cosimo lue: like this LWP::Simple, http://search.cpan.org/~gaas/libwww-perl-5.834/lib/LWP/Simple.pm
21:08 lue thank you
21:08 cosimo moritz_: what should I look for?
21:09 PerlJam rakudo: say "12345".fmt{'%x'}
21:09 p6eval rakudo 73e8d4: OUTPUT«1␤»
21:09 PerlJam That is an interesting twist of things
21:10 PerlJam fmt is superfluous too
21:10 PerlJam say "2345".{2}
21:10 PerlJam rakudo: say "2345".{2}
21:10 * sorear pokes jnthn
21:10 p6eval rakudo 73e8d4: OUTPUT«4␤»
21:10 moritz_ cosimo: .pir files in ~/.perl6/lib/ . and $RAKUDO_DIR
21:10 jnthn sorear: ouch! :P
21:11 _buno_ joined #perl6
21:11 sorear jnthn: I can't do anything with the blizkost build system until I find out if s/:=/=/ makes it work
21:11 sorear And more importantly, if you're about to patch anything
21:11 jnthn sorear: It doesn't. :-(
21:12 sorear How does it then fail?
21:12 jnthn makefile(21) : fatal error U1000: syntax error : ')' missing in macro invocation
21:12 jnthn I'm not sure how to fix that one.
21:12 cosimo moritz_: tried deleting all *.pir files around, but I get the same error. thanks anyway.
21:13 moritz_ :(
21:16 masak snarkyboojum: ping
21:16 pugssvn r30473 | colomon++ | [t/spec] Add named argument $base tests to exp.
21:17 colomon 31663 passing tests now, 32000 is starting to look within reach.... ;)
21:17 lisppaste3 cosimo pasted "A simpler test with a class" at http://paste.lisp.org/display/98290
21:17 masak colomon: wow! when will it end?
21:17 sorear jnthn: try changing the $(shell syntax to backquotes
21:18 colomon masak: Jan 17th, 2043
21:18 cosimo moritz_: looks like a simpler test fails too, or maybe it's just my ignorance of perl6
21:19 jnthn sorear: That gets us further.
21:19 jnthn http://gist.github.com/377954
21:20 masak colomon: that's both informative and a bit scary, thanks.
21:20 dalek rakudo: aa51358 | (Solomon Foster)++ | src/core/Co (2 files):
21:20 dalek rakudo: Add $base to exp proto, and make a version of Complex.exp which takes the $base argument.
21:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/aa513580d4fc2f10cfc15dcad123b75586cabe96
21:20 moritz_ cosimo: did you 'make install' rakudo?
21:21 cosimo moritz_: no, i didn't
21:21 moritz_ cosimo: you must, otherwise rakudo won't work from outside the build dir
21:21 sorear jnthn: uck
21:22 sorear no backquotes in nmake, eh
21:22 sorear I thought we were already using them!
21:22 jnthn :/
21:22 colomon masak: no problem.
21:23 sorear :/
21:23 colomon masak: just don't tell lue.  ;)
21:23 gurjeet joined #perl6
21:23 cosimo moritz_: that's it. you definitely have a crystal ball :)
21:23 sorear the way forward from here is to have Configure.pl write the correct stuff into the Makefiles itself.
21:23 * sorear gets on this
21:25 cosimo moritz_: the simpler example works now. LWP::Simple does not, as masak pointed out already. thanks guys
21:25 lue I've changed the date it's finished. It's not 2043 anymore :)
21:26 masak even the future doesn't hold still...
21:26 dalek rakudo: 55a62ae | moritz++ | src/core/Grammar.pm:
21:26 dalek rakudo: fix Grammar.parsefail, patch by takadonet++
21:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/55a62aee795ae5ff5244c7a79c2350088018cdba
21:26 takadonet thanks moritz_
21:26 lue I made it earlier, more like a few weeks from now.
21:28 masak lue: I think your tempral-scope is smudgy. that's Rakudo Star you're seeing.
21:28 jnthn moritz_: parse*fail*? :-)
21:29 jnthn oh, I thought it was a typo for .parsefile :-)
21:31 sorear jnthn: Who do I need to bug about adding Blizkost dalek announces to #perl6? :)
21:32 colomon lue: I was reporting the date the last spectest change will be made to the Perl 6 test suite.
21:32 lue Bah! The TARDIS is still reparing itself, I'm bound to make some mistakes :)
21:32 lue On the + side, it's got a colorful 60's type look now :)
21:35 jnthn sorear: Maybe Infinoid
21:36 lue colomon: I know, I just couldn't see well. :)
21:36 gurjeet left #perl6
21:38 * jnthn afk for a bit
21:43 takadonet anyone run into the issue where inside a method of a Role,  Perl cannot find builtin sub like say,pop,push etc... ?
21:45 PerlJam takadonet: got some code that illustrates it?
21:46 lisppaste3 takadonet annotated #98283 "Role fail..." at http://paste.lisp.org/display/98283#1
21:47 jaldhar joined #perl6
21:47 masak takadonet: that sounds familiar. hold on, I'll check around RT.
21:47 PerlJam aye, it's already in RT
21:47 takadonet masak: thanks
21:47 PerlJam 74078
21:48 masak PerlJam++
21:48 jaldhar joined #perl6
21:49 takadonet hmmm
21:49 takadonet nuts
21:54 masak does this sound familiar? "We're not interested in childish popularity contests, we're interested in [being awesome]. And we are succeeding."
21:54 masak it's from this post: http://jeffreystedfast.blogspot.com/2009/09/mono-not-chasing-tail-lights.html
21:55 masak seems other language communities are also dealing with FUD :)
21:55 rv2733 joined #perl6
21:58 lue FUD?
21:59 masak http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt
21:59 masak a common acronymic term for negative spin against something.
22:00 cognominal your name is FUD. :)
22:00 frettled FUD, as pioneered by Microsoft ;)
22:01 am0c joined #perl6
22:02 cognominal nope .it predate MS. IBM used it as well against its competitors.
22:02 lue go to <a href="http://www.microsoft.com">hell!</a>
22:02 lue :)
22:03 masak rakudo: class A { multi method foo($a) { "general" }; multi submethod foo(Str $a) { "specific" } }; class B is A {}; say .new.foo("OH HAI") for A, B
22:03 p6eval rakudo 55a62a: OUTPUT«specific␤specific␤»
22:03 masak should be "specific\ngeneral\n".
22:03 * masak submits rakudobug
22:04 masak (since submethods don't inherit)
22:04 bbkr joined #perl6
22:06 masak rakudo: class A { submethod foo { say "OH HAI" } }; class B is A {}; B.new.foo
22:06 frettled cognominal: What?  But Microsoft says in their marketing material that they invented FUD!
22:06 p6eval rakudo 55a62a: OUTPUT«Method 'foo' not found for invocant of class 'B'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:06 masak works for only methods but not for multi submethods.
22:09 * masak heads to bed
22:09 masak 'night, #perl6
22:09 frettled sleep tight
22:09 colomon 'night
22:10 lichtkind good night
22:12 lue good night
22:14 Chillance joined #perl6
22:17 jnthn Mixing a method and submethod of the same shortname is...odd.
22:18 PerlJam I thought so at first too, but I think it should be fine.
22:21 jnthn It probably makes for a rather tricky fix.
22:21 lue afk
22:25 M_o_C joined #perl6
22:32 jonrafkind joined #perl6
22:33 sorear jnthn: Can you test the latest patch?
22:35 jnthn pullin
22:36 jnthn \o/
22:36 jnthn sorear++
22:36 jnthn Builds.
22:36 jnthn nmake install also works
22:37 jnthn On test failure.
22:37 jnthn nt/callsv.t ................ Dubious, test returned 5 (wstat 1280, 0x500)
22:37 jnthn All 1 subtests passed
22:37 jnthn *one
22:37 sorear I'm not suprised
22:37 sorear that just means it crashed during global destruction
22:38 jnthn OK.
22:38 sorear which it does >50% of the time on linux
22:38 jnthn Consistently crashed in 5 runs on Windows.
22:38 jnthn But anways, yes, tricky issue.
22:39 sorear I've got an idea for a refactor that will make it a bit more robust
22:39 sorear but it's not going to be completely solid until the GC overhaul #parrot promises
22:40 sorear since, among other things, there's no guarantee dynpmcs will have their destroy VTABLEs called before the library is unloaded
22:40 jnthn Ah, Ok.
22:40 sorear rakudo works around this by skipping global destruction and calling _exit directly
22:40 jnthn Ouch!
22:40 jnthn I hadn't realized that. :-)
22:41 * jnthn starts the lexical class yak shaving
22:41 sorear lexical classes sound 100% awesome, what's so yakky about them,
22:42 jnthn Hopefully relatively little; I suspect parts of what we already have are too namespace-centric.
22:43 jnthn So it's not quite as straightforward as one might hope.
22:43 jnthn rakudo: my class Foo { method bar() { say 42 } }
22:43 p6eval rakudo 55a62a: OUTPUT«Can't handle scope declarator my on packages yet␤current instr.: 'perl6;Perl6;Compiler;Package;finish' pc 27406 (src/gen/parameter_pm.pir:613)␤»
22:44 sorear unrelatedly, do we have a set minimum Perl?
22:44 sorear the Parrot Configure.pl requires 5.8.0
22:44 jnthn omfg, my patch worked first time.
22:45 jnthn > { my class Foo { method bar() { say 42 } }; Foo.new.bar }; Foo.new.bar;
22:45 jnthn 42
22:45 jnthn Could not find sub &Foo
22:45 bbkr rakudo: say (1e2/7).WHAT; #this should be Rat?
22:45 p6eval rakudo 55a62a: OUTPUT«Num()␤»
22:45 sorear rakudo: say 1e2.WHAT
22:45 p6eval rakudo 55a62a: OUTPUT«Num()␤»
22:45 sorear rakudo: say 7.WHAT
22:45 p6eval rakudo 55a62a: OUTPUT«Int()␤»
22:46 sorear rakudo: say 100.WHAT
22:46 p6eval rakudo 55a62a: OUTPUT«Int()␤»
22:46 sorear rakudo: say 100 === 1e2
22:46 jnthn iirc, only Int / Int will give you a Rat
22:46 p6eval rakudo 55a62a: OUTPUT«0␤»
22:46 jnthn (or Int / Rat and so on)
22:46 sorear rakudo: say 100 === 100
22:46 p6eval rakudo 55a62a: OUTPUT«1␤»
22:47 bbkr ok, thanks jnthn for clarification
22:48 sorear my personal choice for Perl absolute minimum is 5.6.0 (lexically-scoped file handles, weak references, and modern threads)
22:48 jnthn sorear: Depends on context. What context are you asking for?
22:48 jnthn Blizkost?
22:48 sorear jnthn: aye
22:48 sorear Parrot's current Configure.pl sets a minimum of 5.8.0
22:49 jnthn Well, if you need 5.8.0 to get a Parrot, that implies at least 5.8.0.
22:49 jnthn Does 5.8.0 give you headaches to support over, say, 5.10.0?
22:49 mantovani joined #perl6
22:49 bbkr however it's sometimes not exactly clear if we have Num or Int, so behavior like (if $x.Int == $x) then create Rat anyway would be more DWIM
22:50 jnthn bbkr: In this case, I think the rule is "if you write an exponent you always get Num".
22:50 sorear jnthn: Not particularly
22:50 jnthn sorear: Then I don't really see a reason not to go 5.8.0 for Blizkost too.
22:50 sorear what I'd like to do is get Blizkost to fully support the standard alternate perl protocols
22:51 jnthn @standard alternate perl protocols@?
22:51 jnthn gah, wrong keyboard map
22:51 sorear so I can go ~/perls/5.8.0/bin/perl Configure.pl; make; make test
22:51 jnthn s/@/"/ :-)
22:51 jnthn Ah, I see
22:51 jnthn So you can test easily against multiple Perls?
22:52 sorear Configure extracts all the needed information from the running Perl and doesn't depend on $PATH/perl
22:52 sorear yes
22:52 jnthn Sounds cool.
22:52 sorear that last patch was a big step in that direction - we now get cflags and ldflags for the configure perl
22:53 sorear I haven't tested it though and there are probably lots of bugs
23:00 * sorear attempts to install Perl 5.8.0
23:01 sorear it's pretty awesome that Perl 5 has unified their 28 years of development into a single git repo
23:02 sorear git checkout perl-5.8.0; git clean -dfx; sh Configure -des -Duseithreads -Duseshrplib -Dprefix=/opt/perl-5.8.0; make; make test; sudo make install
23:04 bbkr rakudo: my $x = Inf; say ($x.Int / 1).WHAT; # this one looks bad, I have Int/Int but rakudo fails with some weird message
23:04 p6eval rakudo 55a62a: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤current instr.: 'perl6;Rat;new' pc 461240 (src/gen/core.pir:0)␤»
23:05 jnthn rakudo: my $x = Inf; say $x.WHAT
23:05 p6eval rakudo 55a62a: OUTPUT«Num()␤»
23:06 bbkr I know that Inf is kinda bugged now (Inf.Int is the max int on machine), but I have Int/Int anyway so it should give Rat?
23:06 jnthn I expected so.
23:07 jnthn rakudo:  my $x = Inf; say $x.Int
23:07 jnthn rakudo:  my $x = Inf; say $x.Int.WHAT
23:07 p6eval rakudo 55a62a: OUTPUT«-9223372036854775808␤»
23:07 p6eval rakudo 55a62a: OUTPUT«Int()␤»
23:07 bbkr see :)
23:07 jnthn Yeah, that one looks like a bug.
23:07 bbkr please submit, i don't have submit rights yet
23:07 jnthn Submit = email
23:08 jnthn Just email to rakudobug@perl.org
23:09 orafu joined #perl6
23:13 bbkr bug report sent
23:21 pugssvn r30474 | jnthn++ | [t/spec] A bunch more tests for lexical classes.
23:25 * jnthn reads p6l and chuckles at, "your bikeshed has become too small to contain a bike"
23:26 dalek rakudo: 4a1312a | jonathan++ | src/Perl6/Compiler/Package.pm:
23:26 dalek rakudo: First cut implementation of lexical classes; hard to know just how well it works yet for lack of tests.
23:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4a1312a20ad173cb392efc9b95b8188e0c272839
23:26 dalek rakudo: e393c7e | jonathan++ | t/spectest.data:
23:26 dalek rakudo: Turn on S12-class/lexical.t.
23:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e393c7efc56a17820d2de8bf6dc9700c0e4c553d
23:29 frettled :)
23:33 bbkr rakudo: my class X {has X $.x}; say X.new(x => X.new).x.WHAT; # just checking :)
23:34 p6eval rakudo 55a62a: OUTPUT«Can't handle scope declarator my on packages yet␤current instr.: 'perl6;Perl6;Compiler;Package;finish' pc 27406 (src/gen/parameter_pm.pir:613)␤»
23:34 jnthn Too soon. :-)
23:34 frettled Miracles take slightly more time?  :D
23:35 jnthn no, p6eval takes time to update. :-)
23:35 jnthn bbkr: Locally:
23:35 jnthn > my class X {has X $.x}; say X.new(x => X.new).x.WHAT;
23:35 jnthn X()
23:35 frettled Yeah, there's a cronjob doing periodical updates, isn't that so?
23:35 jnthn Ae.
23:35 jnthn *Aye
23:35 bbkr nice :D
23:40 jnthn Aww. My patch to do lexical roles didn't work first time though.
23:40 jnthn Clearly I hit and passed the Ballmer Peak.
23:49 ruoso joined #perl6

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

Perl 6 | Reference Documentation | Rakudo