Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-17

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:04 whiteknight left #perl6
00:05 Chillance left #perl6
00:08 dalek niecza: cab0fe7 | sorear++ | lib/ (2 files):
00:08 dalek niecza: Simplify NewBoundVar now that Bind is dead
00:08 dalek niecza: review: http://github.com/sorear/niecza/commit/cab0fe73d9555e78dc1072fe86dd2cf80276884d
00:08 dalek niecza: b9f246d | sorear++ | / (3 files):
00:08 dalek niecza: De-CPS-ify the variable API
00:08 dalek niecza:
00:08 dalek niecza: If you want to use 'take' in a FETCH or STORE method, you are now out of luck.
00:08 dalek niecza: On the other hand, 25% speedup for $x += $y benchmark.
00:08 dalek niecza: review: http://github.com/sorear/niecza/commit/b9f246d1918ff1a98be171a2d9cfc27d6561cef8
00:11 HarryS joined #perl6
00:11 leprevost joined #perl6
00:13 thowe left #perl6
00:13 risou_ joined #perl6
00:14 risou left #perl6
00:16 HarryS left #perl6
00:19 araujo http://ideone.com/qn6lm
00:19 araujo :)
00:23 leprevost hi, I have some questions about CPAN and Perl 6.
00:25 leprevost i found this webste http://cpan6.org/, is this the official CPAN for Perl 6?
00:26 sjohnson looks like some dude's website
00:26 sjohnson doesnt look official by any means
00:28 leprevost where can I found modules for Perl 6 ?
00:29 sorear for about a month I've been trying to get the Perl 6 and CPAN people to talk to each other
00:29 sorear unfortunately I don't have a working schedule or agenda
00:31 leprevost that's sad...
00:34 justatheory left #perl6
00:36 qw3rty joined #perl6
00:38 cbk joined #perl6
00:41 ruoso joined #perl6
00:46 risou_ left #perl6
00:46 s1n left #perl6
00:48 s1n joined #perl6
00:49 redicaps joined #perl6
00:50 redicaps left #perl6
01:03 QinGW joined #perl6
01:06 QinGW1 joined #perl6
01:10 QinGW left #perl6
01:12 Bucciarati left #perl6
01:15 Italian_Plumber1 joined #perl6
01:15 Italian_Plumber left #perl6
01:16 Italian_Plumber1 left #perl6
01:20 pythonian4000 Anyone know when moritz usually gets in?
01:31 gottreu rakudo has trouble being built in cygwin on xp with 256 megs of RAM.  I thought the wrong VM had a gig allocated to it.
01:32 gottreu Parrot built without complaint surpringly.
01:35 leprevost left #perl6
01:37 ascent_ pythonian4000: in Europe it's 3:37am.
01:38 pythonian4000 Thanks! =) Wasn't sure of his timezone
01:46 gfx joined #perl6
01:49 cbk Anyone know if  "fake exe" is working in Perl6 yet?
01:55 envi^home joined #perl6
01:55 molaf_ joined #perl6
01:59 molaf left #perl6
01:59 LaVolta joined #perl6
02:09 meppl left #perl6
02:20 alester joined #perl6
02:29 qw3rty left #perl6
02:40 agentzh joined #perl6
02:49 araujo left #perl6
02:50 felipe_ joined #perl6
02:50 felipe_ left #perl6
02:51 felipe_ joined #perl6
02:51 felipe_ left #perl6
02:51 dalek rakudo: 2c8bb89 | pmichaud++ | build/PARROT_REVISION:
02:51 dalek rakudo: Bump PARROT_REVISION.
02:51 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2c8bb89b9d8efd4b5a5d748bd26b01d23f447723
02:51 leprevost joined #perl6
03:02 orafu left #perl6
03:02 orafu joined #perl6
03:24 gottreu_ joined #perl6
03:32 mikelifeguard joined #perl6
03:38 justatheory joined #perl6
03:41 mikelifeguard left #perl6
04:00 gfx left #perl6
04:01 satyavvd joined #perl6
04:01 gfx joined #perl6
04:02 nymacro joined #perl6
04:03 rbuels left #perl6
04:25 QinGW joined #perl6
04:27 QinGW2 joined #perl6
04:27 QinGW1 left #perl6
04:28 Warlord joined #perl6
04:29 QinGW left #perl6
04:58 Khisanth left #perl6
05:00 kaare joined #perl6
05:01 kaare is now known as Guest29403
05:01 Khisanth joined #perl6
05:03 Alias joined #perl6
05:16 thowe joined #perl6
05:18 nymacro left #perl6
05:19 gfx left #perl6
05:20 nymacro joined #perl6
05:25 envi^home left #perl6
05:38 sorear good * #perl6
05:39 LaVolta \Ø/
05:40 sorear gottreu_: Parrot's build involves running GCC, a relatively efficient program.  Rakudo's build involves running... Parrot.
05:50 kjeldahl_ joined #perl6
05:55 alester left #perl6
05:59 dalek niecza: 083e7f5 | sorear++ | / (4 files):
05:59 dalek niecza: Combine the functions of Variable and Container
05:59 dalek niecza: review: http://github.com/sorear/niecza/commit/083e7f580ab42bb802ea4b659aa83e94f63f6bef
05:59 dalek niecza: de8c4a9 | sorear++ | src/ResolveLex.pm:
05:59 dalek niecza: Fix the global constant optimization
05:59 dalek niecza: review: http://github.com/sorear/niecza/commit/de8c4a9fe69b748807fc7b424fc76d7b82123a41
05:59 kjeldahl_ left #perl6
06:01 wtw joined #perl6
06:01 kjeldahl_ joined #perl6
06:03 sorear for @x -> $y { }  # niecza: 50us per loop  perl5: 150ns per loop
06:03 sorear :/
06:04 gottreu_ sorear: that explains it.
06:05 plobsing left #perl6
06:05 sorear I don't have a working rakudo or I'd compare it too
06:05 sorear gottreu_: explains what?
06:06 sorear my $i = 0; my $b = 0; while ($i < N) { $b += $i; $b += $i; $b += $i; $b += $i; $b += $i; $i++ } # niecza: 40 us/loop  perl5: 1.75 us/loop   not quite so bad
06:07 gottreu_ why rakudo's build ran out of memory.
06:07 cjk101010 joined #perl6
06:09 sorear I increasingly suspect changing niecza to use a bytecode interpreter might be a win
06:09 ingy TimToady: my gf Jen wants to know if anyone has ever called you the Mother of Perl.
06:10 ingy TimToady: she makes great letter press business cards :)
06:11 gottreu_ sorear: what's the timing difference if '$b+=$i' is replaced with '$b+=$i' (and $i++ with $-=4 to keep N the same)?
06:12 gottreu_ s/$b+=$i/$b += ++$i/
06:12 gottreu_ that is if such questions are simple to answer.
06:22 sorear $-=4?
06:23 moritz_ good morning
06:23 sorear pythonian4000: about now
06:24 sorear I haven't actually done much optimization of metaops yet
06:27 kjeldahl left #perl6
06:31 kjeldahl_ left #perl6
06:35 uniejo joined #perl6
06:45 thowe left #perl6
07:07 Ross joined #perl6
07:07 Ross left #perl6
07:07 Ross joined #perl6
07:10 frettled left #perl6
07:11 araujo joined #perl6
07:12 sorear pmichaud: hi
07:13 Ross left #perl6
07:18 * sorear has a Meta Model Epiphany
07:21 araujo left #perl6
07:29 Entonian joined #perl6
07:32 Entonian left #perl6
07:34 Entonian joined #perl6
07:39 Zapelius joined #perl6
07:55 Zapelius How do I do a timeouted read in p6 ? something like: while ( ! $in ) { howto_timeout( $in = get $*IN, 0.1 ); meanwhile_a_periodical_thing; }  -wanted.
07:58 moritz_ Zapelius: I guess in future you'll do a non-blocking read; not yet implemented though :(
08:03 wamba joined #perl6
08:04 Zapelius hmm...
08:10 am0c^ joined #perl6
08:10 sorear ick, poll loops
08:10 Entonian left #perl6
08:11 sorear don't call a function every 0.1 seconds or I'll hate you
08:11 sorear multitasking operating systems like the one I use rely on the fact that programs do nothing at all when not being used
08:12 sorear even if your program only seems to be using <1 microsecond per second, it's actually taking a huge toll on the system's administration faculties
08:12 thebird joined #perl6
08:16 moritz_ though any working contribution in the area of IO spec and implemtation is very welcome
08:17 moritz_ we have a totally over-engineered IO spec, which is not very practical
08:24 florz sorear: I think read with timeout in order to do meanwhile_a_periodical_thing doesn't really qualify as a poll loop, does it?
08:27 sorear florz: I missed that loop. :(
08:28 am0c^ left #perl6
08:28 sorear sorry.
08:30 timbunce joined #perl6
08:36 Mowah left #perl6
08:41 jferrero joined #perl6
08:45 boggy left #perl6
08:48 envi^home joined #perl6
08:48 Zapelius I might do a fork..
08:48 Zapelius left #perl6
08:52 daxim joined #perl6
08:53 dakkar joined #perl6
08:56 Mowah joined #perl6
08:56 cotto left #perl6
08:57 cotto joined #perl6
08:59 rhebus joined #perl6
09:00 rhebus morning
09:00 nymacro left #perl6
09:01 Mowah left #perl6
09:09 masonkramer left #perl6
09:09 masonkramer joined #perl6
09:11 nymacro joined #perl6
09:17 gfx joined #perl6
09:17 moritz_ rakudo: say now
09:17 p6eval rakudo 2c8bb8: OUTPUT«Could not find sub &now␤  in main program body at line 22:/tmp/NfyPhq3Vve␤»
09:17 moritz_ I thought that worked?
09:19 moritz_ rakudo: time
09:19 p6eval rakudo 2c8bb8: OUTPUT«Could not find sub &time␤  in main program body at line 22:/tmp/VN3fzPeGjd␤»
09:20 qw3rty joined #perl6
09:22 Mowah joined #perl6
09:22 Mowah left #perl6
09:23 Mowah joined #perl6
09:26 moritz_ phenny: tell pmichaud that he broke 'now' and 'time'
09:26 phenny moritz_: I'll pass that on when pmichaud is around.
09:32 sorear std: BEGIN { foo; }; sub foo() { }
09:32 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤   'foo' used at line 1␤Check failed␤FAILED 00:01 117m␤»
09:33 sorear std: sub foo() { bar; }; BEGIN { foo; }; sub bar() { }
09:33 p6eval std : OUTPUT«ok 00:01 117m␤»
09:33 sorear I don't think that should work...
09:33 * moritz_ neither
09:37 * jnthn neither
09:38 sorear o/ jnthn
09:41 sorear jnthn: I think there are one or two important checks missing from your model
09:42 sorear class Foo { has $!x; method foo() { $!x } }
09:42 sorear class Bar { has $!y; method bar() { $!y } }
09:42 sorear class Baz is Foo is Bar { }
09:42 gottreu_ left #perl6
09:42 sorear both foo and bar are compiled with the hint 0 for the attr ref
09:43 sorear but 6model doesn't check at runtime to see if 0 is the correct attr
09:43 gottreu_ joined #perl6
09:44 jnthn sorear: In multiple inheritance situations it'll refuse to give hints and just fall back to named lookup.
09:44 jnthn That's implemented in P6opaque already, iirc.
09:45 moritz_ so MI is costly?
09:45 jnthn Right
09:45 jnthn But that doesn't bother me.
09:45 jnthn And only for attribute lookup.
09:45 jnthn Method dispatch needn't be more so.
09:45 am0c^ joined #perl6
09:46 jnthn Don't really see the point of making everything more complex to make MI optimal though, when we have roles and when MI is generally seen as a bad idea.
09:46 moritz_ in Rakudo, the only MI type seems to be Match
09:47 jnthn Right, and it conceptually needn't be, it's just convenience.
09:47 moritz_ says a quick ack
09:47 moritz_ right, inheriting from Regex::Match is more or less a cheat
09:47 jnthn Aye.
09:48 sorear jnthn: Foo and Bar are both singly inherited, though.  So it will give hints.
09:48 sorear Unless you're planning to abandon "compiled code is shared between superclasses and subclasses"
09:49 jnthn sorear: Not at all. The superclass and subclass have a different instance of the REPR.
09:50 jnthn sorear: And the subclass one won't have had the array storage allocated.
09:50 sorear Oh, in MI cases you don't store *any* attributes in the array?
09:50 nymacro left #perl6
09:51 jnthn sorear: Correct.
09:51 sorear What does an "instance of the REPR" mean?
09:51 sorear RakudoObject value?
09:52 qw3rty left #perl6
09:52 jnthn No, in the C# version it's an instance of the class implementing the representation.
09:52 sorear those are subclasses of RakudoObject, no?
09:52 jnthn It's up to the REPR, when it makes a new type object, to decide whether it's singleton or whether to allocate a version of itself just for this type.
09:52 jnthn No, REPRs are not.
09:53 jnthn Some REPRs need to state beyond what's in the object.
09:53 jnthn s/to/no/
09:53 jnthn Others do want some.
09:53 jnthn P6opaque is one that goes.
09:53 sorear Type object == WHAT?
09:53 sorear just an ordinary undefined RakudoObject?
09:53 jnthn Yes
09:53 jnthn Right.
09:54 sorear So P6opaque stores the name->index mapping in the WHAT?
09:54 jnthn ?
09:54 jnthn No
09:54 sorear WHAT summarizes my reaction to what you're saying
09:54 jnthn It stores the mapping in the REPR.
09:54 jnthn Which is referenced from the STable.
09:55 sorear REPR is not 1:1 with REPR string values?
09:55 jnthn So you can get to it via the WHAT, just as you can from any object.
09:55 jnthn I don't understand "REPR string values"
09:55 jnthn You mean the "is repr('foo')" that you can write when declaring a class?
09:55 sorear Yes
09:56 jnthn Yes, there's a REPR registry that takes care of that mapping.
09:56 sorear So P6opaque creates 1 REPR per class
09:56 jnthn It's 1:1 in terms of 1 name maps to 1 C# class
09:56 sorear How do I write the is repr() for Baz
09:56 jnthn But there may be many instances of that.
09:57 jnthn class Baz is repr('...') { } ?
09:57 * jnthn suspects he's missing the point of the question there...
09:58 HarryS joined #perl6
09:58 jnthn (note, for REPRs I use instance quite loosely...)
09:58 sorear You said that every class created from P6opaque has a new REPR
09:58 jnthn (they're not full-blown objects, it can just be useful to think of them in singleton terms)
09:58 sorear So class Baz {} creates a new REPR
09:58 jnthn (or instance terms)
09:58 sorear How do I write it
09:59 jnthn Well, the REPR creates a new instance of itself. See type_object_for in P6opaque.
10:00 sorear Oh.  OK, this is starting to make sense
10:01 sorear Why do STables use delegates for InvokeMethod, etc, instead of having virtual methods overriden in P6Opaque.Instance?
10:01 QinGW2 left #perl6
10:01 sorear well, delegates for KnowHOW
10:01 sorear for P6opaque the same question exists in different form
10:02 HarryS left #perl6
10:03 jnthn At the time I did it that way, I figured I may want to override invocation per S-Table rather than per representation.
10:03 jnthn I'm not 100% sure I'm using that capability though.
10:03 jnthn Or if it'll be needed.
10:03 jnthn If not, there's a simplification to be had there.
10:04 sorear The implementation written makes a great deal of sense for a low-level implementation
10:04 sorear it's just slightly wasteful to have two vtables on the CLR :)
10:05 jnthn Yeah, I totally agree it'd be more efficient the way you're suggesting it.
10:05 sorear especially since the CLR can't encode a naked function pointer but requires a second virtual call to invoke the delegate
10:05 jnthn At the moment, I'm inclined to leave it the way it is until I know a little more certainly that the simplification won't hurt. My feeling is it probably won't though.
10:06 jnthn Yes, quite - they're not so cheap as C function pointers.
10:07 sorear How does Ops.get_lex("KnowHOW") obtain its value?
10:07 jnthn Follows the outer chain from the current context, until it reaches ths setting
10:07 jnthn Which is where KnowHOW lives.
10:08 sorear I'm looking at NQPSetting.pm right now, there's nothing that looks like a definition of KnowHOW
10:08 jnthn Oh, yes
10:08 jnthn We fudge KnowHOW in
10:08 jnthn In Init.cs
10:08 jnthn Also see KnowHOWBootstrapper.cs which is the thing that sets it up.
10:09 jnthn KnowHOW is the "low level" package implementation, that can be used to implement the rest.
10:13 Trashlord left #perl6
10:14 Trashlord joined #perl6
10:14 sorear What object(s) does 'knowhow NQPInt { ... }' create?
10:15 jnthn That one is actually knowhow NQPInt is repr('P6int') { ... } iirc?
10:15 sorear yes
10:15 jnthn OK, good :-)
10:16 sorear it seems to create a 'NQPInt' object
10:16 sorear does it make any others?
10:16 jnthn It creates a KnowHOW object that will be the .HOW, and a type object which is a P6int.Instance
10:16 * moritz_ is happy to see ideas and discussions flowing between the writers of different Perl 6 compilers
10:16 jnthn (And the KnowHOW object is just an object, but at low level it's the C# class KnowHOWREPR
10:16 sorear The .HOW of all P6Int.Instances from then on?
10:16 jnthn )
10:16 jnthn Yes
10:17 jnthn (Unless they go doing anything like mixing into the meta-class on a per-object basis.)
10:17 sorear Is the bootstrap NQPInt in Init.cs used for anything after that point?
10:17 oyse joined #perl6
10:17 LaVolta left #perl6
10:18 jnthn No, the entry fudged in at that point is purely for bootstrapping the setting, and the NQPInt in the setting takes over once it has been defined/installed.
10:18 sorear ok
10:18 sorear the NQPInt WHAT, I take it, has a new STable
10:18 sorear HOW = new NQPInt HOW
10:18 sorear WHAT = ?
10:19 sorear REPR = ?
10:19 jnthn Steps are
10:19 jnthn 1) Create the HOW
10:19 jnthn oh, evne that's wrong, gah :-)
10:19 * jnthn quickly checks a method name to make sure he doesn't cause more confusion
10:19 Kodi joined #perl6
10:20 jnthn Right, so...
10:20 jnthn knowhow NQPInt is repr('P6int') { ... }
10:20 jnthn Does
10:21 jnthn KnowHOW.new_type(repr => 'P6int')
10:21 jnthn This creates a new instance of KnowHOW (in Perl 6 termss, KnowHOW.new)
10:22 pythonian4000 is now known as pythonian4000afk
10:22 jnthn If then gets the REPR - or P6opaque if none is specified, and calls type_object_for on that, passing the new instnace of KnowHOW that it created
10:22 jnthn It is the REPR's type_object_for method that then creates the STable, creates an empty instance of itself to be the WHAT, and fills out the STable, and points the WHAT's STable pointer to it.
10:23 jnthn It then retrns the WHAT
10:23 jnthn And then we're done.
10:23 sorear ok.
10:23 sorear lemme go read new_type now.
10:23 jnthn The KnowHOW one is in KnowHOWBootstrapper.
10:23 leprevost left #perl6
10:23 jnthn Oh, I didn't write any other HOWs yet, so I guess that's the only one. :-)
10:23 * moritz_ is kinda scared that all of that remotely makes sense to him
10:23 jnthn So I can't show you how it'd look in Perl 6 yet.
10:24 jnthn moritz_: I find that reassuring. :-)
10:24 jnthn moritz_: It's *meant* to be grokkable from the perspective of the curious Perl 6 programmer.
10:26 sorear when I say $nqp_int.Bool, how is the function at line 5 found?
10:26 jnthn sorear: fwiw, if you think of a much nicer name for STable, let me know.
10:26 sorear P6int.cs doesn't seem to have a method hash anywhere
10:27 jnthn Right, P6int is the representation.
10:27 jnthn It only cares for memory layout / attribute storage.
10:27 jnthn The methods live int he meta-object.
10:27 jnthn e.g. in the KnowHOW instance
10:27 sorear Oh!
10:27 jnthn That's the REPR / HOW responsibility boundary.
10:28 jnthn HOW is about dispatch, introspection, declaration, etc.
10:28 jnthn REPR is in charge of how state is stored.
10:28 sorear that's what niecza doesn't have
10:28 jnthn The STable is simply the commonalities between a pair (HOW, REPR)
10:29 sorear The last time I implemented something like STable, I called it 'struct format'
10:29 jnthn An STable is mostly just a bunch of pointers/references to other things.
10:30 sorear niecza has a (C#) class DynMetaObject, which holds method tables & lots of other metadata, it's like a big ugly C# ClassHOW
10:30 sorear every repr defines a method GetMO(), which can turn an object into a DynMetaObject ref
10:31 jnthn brb, phone
10:31 sorear my P6opaque looks like: class DynObject: IP6 { DynMetaObject klass; IP6[] slots; override GetMO() { return klass; } /* slot stuff, etc, etc */ }
10:32 sorear most of my other reprs are tied to specific meta objects
10:33 ruoso left #perl6
10:34 Mowah left #perl6
10:34 Kodi phenny: tell pmichaud that I'd like to get real work done on this Perl6Scalar cleanup issue, but $school may not leave much time for hacking in the near future. I'll do what I can.
10:34 phenny Kodi: I'll pass that on when pmichaud is around.
10:34 gfx left #perl6
10:35 Kodi left #perl6
10:36 jnthn sorear: Yeah, Rakudo has conflated the two to date also.
10:37 jnthn But it gave us no way to do representation polymorphism.
10:39 sorear How do you define representation polymorphism, and how does the conflation break it?
10:47 HarryS joined #perl6
10:48 jnthn The idea that you can use one class declaration (= one HOW) but be able to have different storage strategies
10:48 jnthn e.g. make it possible to implement the CREATE('repr_name') thingy.
10:49 HarryS left #perl6
10:50 HarryS joined #perl6
10:52 sorear How is that precluded?  There could certainly be a second Object-like PMC which shared the same classes
10:52 sorear Or are you saying it would have to duplicate too much code?
10:54 jnthn I guess you *could* manage it that way, but I don't think it's a particularly clean design.
10:55 jnthn And yes, duplication.
10:56 jnthn Also you may have cases where you know the REPR but not the HOW, or vice versa.
10:56 jnthn (at compile time, that is)
10:56 HarryS is now known as Guest22288
10:57 sorear I think I see.
10:57 * sorear -> sleep
10:57 jnthn :-)
10:57 Guest22288 left #perl6
10:57 jnthn Sleep well.
10:57 oyse perl6: %*ENV<TEST> = 'Test'
10:57 p6eval pugs: OUTPUT«*** Can't modify constant item: VUndef␤    at /tmp/8cfvkxMWW4 line 1, column 1 - line 2, column 1␤       /tmp/8cfvkxMWW4 line 1, column 1 - line 2, column 1␤»
10:57 p6eval ..rakudo 2c8bb8: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/KJgjuXXMkL␤»
10:57 masak joined #perl6
10:57 masak oh hai, #perl6!
10:58 HarryS joined #perl6
10:58 oyse How do you modify a environment variable in Perl6. Tried %*ENV<TEST> = 'Test', but that does not work
10:58 masak it should.
10:58 masak rakudo: %*ENV<TEST> = 'Test'; say %*ENV<TEST>
10:59 p6eval rakudo 2c8bb8: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/Hst2x6eseE␤»
10:59 masak I think that one's in RT.
10:59 masak shouldn't be terribly hard to fix.
11:00 Guest29403 is now known as kaare_
11:00 oyse Ok. Thanks.
11:01 oyse Where is the RT queue btw?
11:02 masak http://rt.perl.org/rt3/
11:02 HarryS left #perl6
11:03 masak we don't seem to have a ticket for %*ENV being readonly.
11:03 * masak submits one
11:03 masak oyse++
11:04 am0c^ left #perl6
11:15 oyse Do you know where the implementation of ENV is? In a sudden moment of hubris I plan to take a look :)
11:17 masak oyse: looking
11:18 masak oyse: http://github.com/rakudo/rakudo/blob/master/src/glue/run.pir
11:19 oyse I see there is comment telling that is only readonly :)
11:27 Fuzzy_ joined #perl6
11:27 masak remove the comment, and rebuild :P
11:27 masak rakudo: say %*ENV.WHAT
11:28 p6eval rakudo 2c8bb8: OUTPUT«Hash()␤»
11:28 oyse masak: hehe, will proably do as much good as me trying to understand why it is readonly :)
11:28 agentzh left #perl6
11:29 * masak bets pmichaud or jnthn can answer that
11:31 Zapelius joined #perl6
11:34 moritz_ oyse: cd rakudo; ack -w ENV src/
11:34 moritz_ src/glue/run.pir
11:35 Fuzzy_ left #perl6
11:35 moritz_ it just uses the parrot env PMC
11:35 moritz_ which itself is implemented in parrot/src/pmc/env.pmc
11:38 oyse moritz_: but is the Parrot env PMC readonly? Or is it something in rakudo that makes it readonly?
11:38 moritz_ oyse: dunno, you need to look at the parrot PMC to find out
11:40 takadonet morning all
11:40 Zapelius how do I implement any kind of select() or $*IN.can_read(), etc. anything non blocking ? I'm short of manuals already :)
11:40 oyse moritz_: Looking at it now, but I don't know much C, so hard for me to tell. It calls Parrot_setenv() which for me seems to implemented
11:41 Mowah joined #perl6
11:42 masak <TimToady> .flat(* xx 27)
11:42 masak er,
11:42 masak rakudo: sub foo($a, $b, $c) { say ($a, $b, $c).perl }; foo(42 xx 3)
11:42 p6eval rakudo 2c8bb8: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in 'foo' at line 22:/tmp/emTGJt8kmT␤  in main program body at line 22:/tmp/emTGJt8kmT␤»
11:42 masak what am I missing here?
11:42 moritz_ rakudo: sub foo($a, $b, $c) { say ($a, $b, $c).perl }; foo(|(42 xx 3))
11:42 p6eval rakudo 2c8bb8: OUTPUT«(42, 42, 42)␤»
11:43 moritz_ masak: the same step as in foo(@a)
11:43 masak fair enough.
11:43 masak so, what is TimToady missing here?
11:43 moritz_ context?
11:43 * masak fetches
11:44 masak http://irclog.perlgeek.de/perl6/2010-09-16#i_2835061
11:45 masak he's explicitly suggesting that .flat(* xx 27) corresponds to 27 (ordinary) positional *es.
11:45 moritz_ masak: .flat might have a slurpy param
11:45 jaldhar left #perl6
11:45 masak rakudo: sub foo(*@a) { say @a.perl }; foo(42 xx 3)
11:45 p6eval rakudo 2c8bb8: OUTPUT«[42, 42, 42]␤»
11:45 jaldhar joined #perl6
11:45 moritz_ that's correct
11:45 masak ah.
11:45 moritz_ slurpies flatten parcels
11:45 masak then that was what I was missing. thanks.
11:45 moritz_ (at least the first level)
11:50 * moritz_ finds http://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh amusing
11:52 * masak immediately aliases 'moar' to 'less' on his box
11:54 pmichaud good morning, #perl6
11:54 phenny pmichaud: 09:26Z <moritz_> tell pmichaud that he broke 'now' and 'time'
11:54 phenny pmichaud: 10:34Z <Kodi> tell pmichaud that I'd like to get real work done on this Perl6Scalar cleanup issue, but $school may not leave much time for hacking in the near future. I'll do what I can.
11:54 moritz_ good am, pm
11:55 pmichaud rakudo: say now
11:55 masak moritz_: it's am where you're at?
11:55 p6eval rakudo 2c8bb8: OUTPUT«Could not find sub &now␤  in main program body at line 22:/tmp/65LFeWDwIt␤»
11:56 moritz_ masak: nope; but I kinda guess it's am for pm :-)
11:56 pmichaud > say now
11:56 pmichaud Instant:2010-09-17T11:55:50.029915Z
11:56 masak moritz_: oh, nevermind. you were localizing on pm's am, not your pm :)
11:56 pmichaud it works locally  :-|
11:56 moritz_ pmichaud: do you have uncomitted changes? or unpushed commits?
11:56 masak pmichaud: "now is already here, it's just unevenly distributed" :P
11:56 pmichaud no
11:56 moritz_ pmichaud: I get the same behavior as p6eval
11:56 pmichaud just a sec
11:57 pmichaud it works correctly on two machines I have
11:57 moritz_ (I'm a few parrot revisions ahead of build/PARROT_REVISION, but p6eval is not)
11:57 pmichaud (which wouldn't make sense if there are unpushed commits)
11:57 pmichaud let me update again and see what happens
11:58 * moritz_ wonders what 'time' buys us that 'now' doesn't give us
11:58 pmichaud time is a posix time
11:58 pmichaud for those who need posix time quickly
11:58 moritz_ hmkay
11:58 pmichaud now is a real time
12:00 pmichaud fwiw, there is no longer a sub &now
12:00 pmichaud so.... hm.
12:01 * masak builds and tests locally
12:02 * moritz_ just realcleaned and rebuilt. Same result.
12:03 pmichaud moritz_: what does   Grammar.pm:1979-1985 look like?
12:03 pmichaud (on your system)
12:04 pmichaud oh, wait
12:04 pmichaud hmmm
12:05 pmichaud it's lines 1245 and 1247 in current head
12:05 pmichaud (should be the tokens for <now> and <time>)
12:06 masak they are here.
12:06 masak (still building)
12:06 pmichaud and in Actions.pm:1979-1985 should be the action methods for <now> and <time>, both of which should set up a call to &term:<now> and &term:<time>
12:06 moritz_ token term:sym<now> { <sym> <.nofun> }
12:06 uniejo left #perl6
12:06 moritz_ token term:sym<time> { <sym> <.nofun> }
12:07 moritz_ method term:sym<now>($/) { make PAST::Op.new( :name('&term:<now>'), :node($/) );
12:07 moritz_ }
12:07 pmichaud anyway, I can confirm that <time> and <now> are working on a machine other than the one where I made the original patch.  :)
12:07 pmichaud moritz_: those look correct to me
12:07 pmichaud as in, you have the patch.
12:07 pmichaud so..... hmmm.
12:07 moritz_ is :pasttype<call> the default?
12:08 pmichaud yes.
12:08 pmichaud (it's the default when no :pirop or :inline are set)
12:08 takadonet left #perl6
12:08 moritz_ rakudo: say rand
12:08 p6eval rakudo 2c8bb8: OUTPUT«0.83389047425905␤»
12:09 Bucciarati joined #perl6
12:10 moritz_ the parse tree also shows that it's parsed as the term, not as a function call
12:10 pmichaud what does the PIR output look like?  You should see a call to "&term:<now>" somewhere.
12:11 moritz_ recapture_loop_end:
12:11 moritz_ $P89 = "&term:<now>"()
12:11 moritz_ .return ($P89)
12:11 pmichaud so, that's right.
12:11 pmichaud do you see anything that says "&now" ?
12:11 moritz_ that's the only mention of now
12:12 takadonet joined #perl6
12:12 pmichaud but when you run it normally, it comes back with "Could not find sub &now"?
12:12 moritz_ right
12:12 pmichaud are you sure you're using the same executable?
12:13 pmichaud I mean, it can't complain "Could not find sub &now" if there's no "&now" in the PIR.
12:13 masak > say now
12:13 masak Instant:2010-09-17T12:13:4.668199Z
12:13 pmichaud are there any precompiled modules involved?
12:13 masak \o/
12:13 satyavvd left #perl6
12:13 pmichaud (that might have the old &now call?)
12:13 moritz_ $ ./parrot_install/bin/parrot out.pir
12:13 moritz_ PackFile_unpack: This Parrot cannot read bytecode files with version 8.2.
12:13 moritz_ Parrot VM: Can't unpack packfile /home/moritz/rakudo/parrot_install/lib/2.7.0-devel/languages/perl6/perl6.pbc.
12:13 moritz_ Unable to append PBC to the current directory
12:13 moritz_ current instr.: '' pc 139 (out.pir:68)
12:13 pmichaud looks like an out of date .pbc
12:13 moritz_ yes
12:14 pmichaud there was a change to parrot recently that required a parrot realclean
12:14 moritz_ and I did realclean parrot... but not parrot_install
12:14 Zapelius so, perl6 doesn't have any thread/async/non-blocking-io/etc support yet? if so, I still _might_ be able to rewrite the whole thing in perl5 before monday...
12:16 moritz_ what I don't understand is: on the p6eval server, the rakudo is installed
12:16 moritz_ so an outdated perl6.pbc should be overridden
12:20 pmichaud here's a possibly useful statistic:
12:20 pmichaud I just did a "spectest" run where each file was parsed (via "-c") instead of run
12:20 pmichaud time to complete a normal spectest run:  20m6s
12:20 pmichaud time to complete a "parse-only" spectest run: 4m32s
12:21 moritz_ huh, my perl6 binary doesn't understand the -c option
12:21 pmichaud rakudo:  say 272/1206.Num
12:21 p6eval rakudo 2c8bb8: OUTPUT«0.225538971807629␤»
12:21 pmichaud so, we currently spend 22% of the time parsing
12:22 ruoso joined #perl6
12:23 takadonet pmichaud: I love how you use the rakudo bot to find out the percentage of time spend parsing
12:23 moritz_ pmichaud: http://nopaste.snit.ch/23407 allow me to just say "WTF?"
12:23 pmichaud moritz_: ./perl6 --version ?
12:24 moritz_ This is Rakudo Perl 6, version 2010.08-111-g2c8bb89 built on parrot 2.7.0 r49075
12:24 moritz_ Copyright 2008-2010, The Perl Foundation
12:24 masak same.
12:24 moritz_ that was after  make realclean; rm -rf parrot_install; cd parrot; git clean -xdf; $usual_parrot_rebuild_script; cd ..; perl Configure.pl; make -j3
12:25 pmichaud make -j3 can be evil.
12:25 plainhao joined #perl6
12:25 pmichaud (if there are any incorrect dependencies)
12:25 pmichaud not sure that explains this result, though.
12:25 moritz_ I'll try again with sequential make
12:25 moritz_ but it's *really* odd that -e and a file produce such different results
12:25 pmichaud right
12:26 moritz_ and IMHO that can't be explained by stale .pbc or .pir files
12:26 pmichaud and iirc, Parrot r49075 isn't a significant change over r49074 (r49075 just adds a test)
12:26 moritz_ especially since I just cleaned out parrot_install/, and I have no other install location
12:26 pmichaud but you'll be gratified to see:
12:26 masak pmichaud: also, it works here. and I'm running latest Parrot.
12:27 pmichaud pmichaud@orange:~/rakudo$ ./perl6 -e 'say now'
12:27 pmichaud Could not find sub &now in main program body at line 1
12:27 pmichaud pmichaud@orange:~/rakudo$
12:27 pmichaud so it's not just you.
12:27 moritz_ (I have a ~/bin/perl6, but it's just a symlink to parrot_install/bin/perl6)
12:27 pmichaud a-ha!
12:27 pmichaud pmichaud@orange:~/rakudo$ ./perl6 -e 'say now;'
12:27 pmichaud Instant:2010-09-17T12:27:25.852535Z
12:27 pmichaud note the semi.
12:27 masak o.O
12:27 bluescreen joined #perl6
12:27 moritz_ <.nofun> ?
12:27 pmichaud must be
12:27 masak so, parsing error.
12:27 moritz_ ah
12:28 masak ohew.
12:28 masak phew*
12:28 moritz_ and -e doesn't have a trailing newline
12:28 pmichaud correct.
12:28 masak right.
12:28 masak moritz_++ pmichaud++
12:28 moritz_ and since -e and --target don't mix well, I tried   echo 'now' | ./perl6 --target=parse
12:29 moritz_ rakudo: say now;
12:29 p6eval rakudo 2c8bb8: OUTPUT«Instant:2010-09-17T12:06:38.878931Z␤»
12:29 moritz_ rakudo: say now␤
12:29 p6eval rakudo 2c8bb8: OUTPUT«Instant:2010-09-17T12:06:54.652965Z␤»
12:30 moritz_ rakudo: say ?('' ~~ / <![ ( \\ ' \- ]> » /)
12:30 p6eval rakudo 2c8bb8: OUTPUT«0␤»
12:30 moritz_ rakudo: say ?("\n" ~~ / <![ ( \\ ' \- ]> » /)
12:30 p6eval rakudo 2c8bb8: OUTPUT«0␤»
12:30 pmichaud rakudo:  say ?("abc" ~~ / 'abc' <![ ( \\ ' \- ]> /)
12:30 p6eval rakudo 2c8bb8: OUTPUT«0␤»
12:31 pmichaud looks like a bug with <![...]>
12:31 moritz_ should <![...]> be the same as <!before <[...]> > ?
12:31 pmichaud essentially, yes.
12:32 pmichaud it's a zero-width negated match
12:32 mathw lol context?
12:32 * mathw reads the spec change
12:32 moritz_ "you think this is cute today"
12:32 pmichaud rakudo:  say ?("abc" ~~ / 'abc' <!before <[ ( \\ ' \- ]> >/)
12:32 p6eval rakudo 2c8bb8: OUTPUT«1␤»
12:32 uniejo joined #perl6
12:33 moritz_ rakudo: say "ab" ~~ /a<![x]>/
12:33 p6eval rakudo 2c8bb8: OUTPUT«a␤»
12:33 masak I'm getting retweets for being grumpy today: http://twitter.com/carlmasak/status/24750905156
12:34 masak the most charitable thing I can say about 'lol context' is that it goes well with 'Mu'. :P
12:34 masak also, the capitalization of 'LoL' is horrible.
12:34 moritz_ Mu.
12:34 pmichaud is it okay to panic yet?  ;-)   # http://irclog.perlgeek.de/perl6/2010-09-16#i_2834821
12:37 masak ah, so that's why TimToady wrote that. it was a preemptive tranquilizer.
12:38 moritz_ pmichaud: want me to submit a bug report for the regex thing?
12:38 pmichaud moritz_: sure, it's an nqp-rx bug.  I've found the bug, I'm trying to figure out how to fix it.
12:38 mathw okay it looks like nice semantics
12:38 * masak has no problem submitting nqp-rx bugs to RT if they affect Rakudo
12:39 mathw as far as I can understand right now anyway!
12:39 masak mathw: I feel the same. I want to try it out in an impl before I have any more opinions.
12:39 takadonet left #perl6
12:39 moritz_ masak: me neither, but I can be more specific when I know it
12:39 mathw masak: I think it may clarify some things I was a little uneasy about on the edges of my awareness
12:41 takadonet joined #perl6
12:42 moritz_ http://github.com/perl6/nqp-rx/issues/issue/9
12:43 masak I was also uneasy about slicels and neighboring spec things. I didn't read tonight's change carefully enough to know if I'm less uneasy now.
12:43 masak but if I understand correctly, it was mostly a name change.
12:52 pythonian4000afk is now known as pythonian4000
12:53 pythonian4000 is now known as pythonian4000afk
12:54 pmichaud or, my earlier statistic about time needed to parse spectests was seriously flawed
12:54 pmichaud I'll have to recompute in a bit
12:54 pmichaud s/or,/oh,/
12:54 perlygatekeeper left #perl6
12:56 uniejo left #perl6
12:56 uniejo joined #perl6
12:58 takadonet left #perl6
12:58 patspam joined #perl6
12:59 takadonet joined #perl6
12:59 wolverian joined #perl6
13:00 pmichaud so, to clarify -- I did indeed run the spectests with the -c option passed to 'perl6'.  But moritz_++ correctly notes that the perl6 binary doesn't support the -c option.
13:01 pmichaud (we lost that in the transition from alpha to ng)
13:01 pmichaud so, the 22% of spectime that I measured is the cost of.... Rakudo startup.
13:01 moritz_ so you were only measuring startup time?
13:01 pmichaud right.
13:02 pmichaud as soon as my machine clears I'll try again and measure parse time for real :-)
13:02 masak I have a handful of things I'd like to see improved with perl6 options and command-line processing in general. not just -n and -p, but also things like redirection, and $*ARGFILES.
13:02 masak maybe I should make it into a concrete list somewhere.
13:06 kaare_ left #perl6
13:06 takadonet left #perl6
13:07 takadonet joined #perl6
13:09 perlygatekeeper joined #perl6
13:14 pythonian4000afk is now known as pythonian4000
13:15 jaldhar left #perl6
13:16 pythonian4000 is now known as pythonian4000afk
13:16 pythonian4000afk is now known as pythonian4000
13:16 Patterner left #perl6
13:16 pmichaud locally:
13:16 pmichaud pmichaud@plum:~/rakudo$ ./perl6 -e 'say now'
13:16 pmichaud Instant:2010-09-17T13:16:34.134697Z
13:16 pmichaud \o/
13:17 masak pmichaud++
13:17 pmichaud spectesting
13:20 jaldhar joined #perl6
13:20 jaldhar left #perl6
13:21 jaldhar joined #perl6
13:28 Psyche^ joined #perl6
13:28 Psyche^ is now known as Patterner
13:30 Holy_Cow joined #perl6
13:37 gottreu_ left #perl6
13:38 dalek nqp-rx: 8009d57 | pmichaud++ | build/PARROT_REVISION:
13:38 dalek nqp-rx: Bump PARROT_REVISION.
13:38 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/8009d573b8df6095d39b69142583d198c2c0ca50
13:38 dalek nqp-rx: c9a989b | pmichaud++ | / (2 files):
13:38 dalek nqp-rx: Fix negated zero-width enumcharlist at end of string (fixes issue #9 on github). Discovered by moritz++.
13:38 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c9a989bd5675f8d3dcd72bee817e494fdac0fcbe
13:38 dalek nqp-rx: ccc2e3f | pmichaud++ | src/stage0/ (4 files):
13:38 dalek nqp-rx: Update bootstrap.
13:38 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/ccc2e3f65aec6352f85022f6b95c8b4c80088bb7
13:39 bluescreen left #perl6
13:39 masak pmichaud++
13:41 uniejo left #perl6
13:43 masak tadzik: I replied to your note at http://github.com/rakudo/rakudo/commit/39b41ad73b2c0888bdee28a59c8a65aacc8f6925#commitcomment-148185
13:46 dalek rakudo: ca4a1d6 | pmichaud++ | build/PARROT_REVISION:
13:46 dalek rakudo: Bump PARROT_REVISION.
13:46 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ca4a1d6ea874a72a6d7051ea021cc2945715de1a
13:52 Zapelius left #perl6
13:53 Guest23195 joined #perl6
13:54 bluescreen joined #perl6
13:54 flussence rakudo: say "good {<morning day evening>[DateTime.now.hour.Int div 8]}, #perl6"
13:54 p6eval rakudo 2c8bb8: OUTPUT«good day, #perl6␤»
13:55 masak flussence++
13:55 timbunce_ joined #perl6
13:56 masak rakudo: our sub infix:<(...)>(&f, $x) { f($x) }; sub foo { $^n + 2 }; sub bar { $^n * 2 }; sub baz { $^n ** 2 }; say ~(&foo, &bar, &baz X(...) 1, 2, 3) # function application operator
13:56 p6eval rakudo 2c8bb8: OUTPUT«3 4 5 2 4 6 1 4 9␤»
13:56 flussence I've gone and stuck spectest_smolder in a nightly cronjob, might as well put my idle server to some use
13:56 moritz_ "hello my friend, how are you, good evening, day or morning\n I'm as happy to see you as the last time I was here 'cause this is a recording"
13:56 wtw left #perl6
13:57 moritz_ (Rob Paravonian)++
13:57 timbunce left #perl6
13:57 timbunce_ is now known as timbunce
13:57 masak ah, the "Pachelbel Rant" guy.
13:57 LoRe why is .Int required in [DateTime.now.hour.Int div 8] ?
13:58 flussence rakudo: say DateTime.now.hour.WHAT
13:58 masak LoRe: because `div` isn't specific to Ints.
13:58 p6eval rakudo 2c8bb8: OUTPUT«Num()␤»
13:58 masak oh, and that.
13:58 masak maybe .hour should return an Int already.
13:58 * masak submits rakudobug
13:58 flussence seems like the sensible thing to do
13:59 masak aye.
14:00 LoRe so, no implicit casting there?
14:02 nymacro joined #perl6
14:02 masak LoRe: `div` isn't specific to Ints, so no casting possible.
14:03 masak except inside .hour, where it arguably should be made.
14:03 flussence rakudo: say DateTime.now.week # I think I broke it :/
14:03 p6eval rakudo 2c8bb8: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in 'Dateish::week' at line 6407:CORE.setting␤  in main program body at line 22:/tmp/yOB_pEMEsV␤»
14:03 * masak submits rakudobug
14:03 masak don't we have tests for that? :/
14:05 pmichaud rakudo: say DateTime.now.WHAT
14:05 p6eval rakudo 2c8bb8: OUTPUT«DateTime()␤»
14:05 pmichaud rakudo: say DateTime.now.week
14:05 Lorn left #perl6
14:05 p6eval rakudo 2c8bb8: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in 'Dateish::week' at line 6407:CORE.setting␤  in main program body at line 22:/tmp/HqZbSN6wb5␤»
14:07 flussence hmm, t/spec/S32-temporal/ all passes for me, and there are uses of .week in there...
14:09 pmichaud are they uses on .now, though?
14:09 qw3rty joined #perl6
14:09 flussence rakudo: say DateTime.new('2010-01-01T01:01:01').week
14:10 p6eval rakudo 2c8bb8: OUTPUT«200953␤»
14:10 flussence something to do with .now
14:11 flussence rakudo: say DateTime.new
14:11 p6eval rakudo 2c8bb8:  ( no output )
14:12 flussence that gives me an error locally:
14:12 flussence invoke() not implemented in class 'Any'
14:12 flussence and kicks me out of the interpreter prompt :(
14:14 qw3rty left #perl6
14:14 Mowah left #perl6
14:15 jaldhar left #perl6
14:16 Lorn joined #perl6
14:17 masak flussence: the kicking-out from the interpreter point is traumatic, unfair, known, and submitted to RT.
14:17 masak s/point/part/
14:19 gottreu regarding smoldering spectests, are tests run in a virtualized environment on varied OS's useful?  or does the identicalness of the virtual hardware not warrant the effort?
14:21 flussence I think testing different OSes on the same hardware is fine, if they're different enough.
14:22 flussence if it works on most and fails on one, you can rule out the hardware being an issue in that case
14:23 satyavvd joined #perl6
14:28 PerlJam Alias was going to talk to Microsoft people to see what they could donate to parrot/perl6 development in terms of "machines".   I wonder what ever became of that?
14:30 moritz_ pmichaud: we have a passing TODO in t/spec/S05-metasyntax/repeat.rakudo
14:30 Holy_Cow left #perl6
14:31 gottreu Well I've been meaning to setup FreeBSD and Solaris in VMs for work and general education, thought I might add an item to my someday/maybe list.
14:31 moritz_ sure, that would be welcome
14:31 moritz_ in particular different *NIX flavours often differ in their handling of Inf and NaN etc.
14:32 moritz_ which will make colomon++ (un)happy :-)
14:32 * colomon wishes there was an angry fist waving smiley.  ;)
14:33 gottreu technically i could try it on a SPARC machine, but my boss may not like that.  Of course he's used perl since v4 or even earlier, so maybe he has a soft spot for perl.
14:34 sftp joined #perl6
14:36 colomon Is lue++ making sure we still build on PPC?  I actually have an old PPC Mac sitting in the basement, could try to revive it and build on that if that would be useful.
14:52 am0c^ joined #perl6
14:53 dual left #perl6
14:54 moritz_ rakudo: say (<a, b>, <c, d>).reverse.perl
14:54 p6eval rakudo ca4a1d: OUTPUT«(("c,", "d"), ("a,", "b"))␤»
14:55 Mowah joined #perl6
14:55 moritz_ pmichaud: the example above is the essence of the test failure in 99problems-41-to-50.t. Is rakudo correct here? If yes, I know how to fix the test.
14:56 plobsing joined #perl6
14:56 gottreu i have a fix i've been sitting on
14:56 gottreu .flat betwixt the second call to gray and reverse fixes it
14:56 moritz_ inserting a flat() or assigning the gray($n-1) return value to an array fixes it
14:56 moritz_ right
14:57 gottreu or parens around the ('1' xx 2 ** ($n-1) >>~<< gray($n-1))
14:57 gottreu since the ~ hyperperator deal flattens as well
14:57 moritz_ that feels like a slightly obscure fix :-)
14:57 moritz_ I'd prefer an explicit one (if the test is wrong indeed)
14:58 qw3rty joined #perl6
14:59 Exodist left #perl6
15:01 exodist joined #perl6
15:02 masak rakudo: role Drinking {}; role Gymnastics {}; class DrunkGymnast { does Gymnastics; does Drinking }; say DrunkGymnast ~~ Drinking
15:02 p6eval rakudo ca4a1d: OUTPUT«1␤»
15:02 masak I wasn't aware this worked.
15:02 masak jnthn++!
15:03 masak rakudo: class A {}; class B { is A }
15:03 p6eval rakudo ca4a1d: OUTPUT«Could not find sub &is␤  in main program body at line 22:/tmp/Bc42XcFiRG␤»
15:03 masak jnthn: you'll get one more karma point if you fix this :P
15:03 jnthn I'm not entirely sure if either should work (more)
15:04 jnthn I think you have to write "also does ..." or "also is ..." these days
15:04 jnthn std: role Drinking {}; role Gymnastics {}; class DrunkGymnast { does Gymnastics; does Drinking }
15:04 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤   'does' used at line 1,1␤Check failed␤FAILED 00:01 116m␤»
15:04 jnthn yeah
15:04 jnthn std: role Drinking {}; role Gymnastics {}; class DrunkGymnast { also does Gymnastics; also does Drinking }
15:04 p6eval std : OUTPUT«ok 00:01 115m␤»
15:04 jnthn I'll catch us up
15:04 jnthn It'll actually be easier, I suspect
15:05 masak ok.
15:05 masak I would like to know why that is necessary.
15:05 masak but mostly I'm fine with it.
15:05 jnthn Trouble with is Foo; is that it conflicts a bit nastily with e.g. is in a test.
15:05 jnthn iirc anyway
15:05 moritz_ right
15:05 jnthn There may have been another motivation
15:05 masak jnthn: grammaro in slides: s/become make them multis/become multis/
15:05 moritz_ and it give the opportunity for better error messages
15:05 jnthn I guess an implementation nicety is that we can just parse a trait_mod there
15:05 jnthn masak: Which slides, ooc? Latest ones?
15:06 masak aye.
15:06 jnthn thanks
15:06 masak there are no slide numbers.
15:06 moritz_ also does MispeledFoo; will produce a better error message than  does MispeledFoo;
15:06 masak (otherwise I could have told you which one)
15:07 jnthn masak: whichever is the current page of the PDF you're on? :-)
15:07 jferrero left #perl6
15:07 jnthn But I think I know which slide you mean anyway.
15:08 masak jnthn: I can't see the current page of the PDF I'm on.
15:08 masak I'm using Safari, and it doesn't say.
15:08 jnthn minimalism--
15:09 masak jnthn: another small fix: s/as give it/as you give it/ -- on the page with the blue double arrow.
15:09 masak hm, "switching language". I'm not a native speaker, but I'd have said "switching languages"...
15:09 masak anyway, jnthn++ # nice! http://www.jnthn.net/papers/2010-nuug-little-n-large.pdf
15:10 jnthn There'll be a video too probably, so you can spot speako's too ;-)
15:11 jnthn .oO( misspakes )
15:11 masak :P
15:12 masak I prefer to be picky in constructive ways :)
15:14 oyse left #perl6
15:17 jdv79 jnthn: nice presentation
15:19 moritz_ indeed
15:19 * moritz_ just finished skimming the slides
15:22 Ross joined #perl6
15:23 jnthn Thanks, it was a quite fun one to give. :-)
15:24 alester joined #perl6
15:24 jdv79 gradual typing sounds like a neat challenge, maybe endless in terms of compiler optimizations.
15:24 jnthn I'm working on a blog post about that and some other related bits. :-)
15:30 am0c^ left #perl6
15:33 masak \o/
15:33 * masak is working on a blog, period
15:34 Holy_Cow joined #perl6
15:34 jnthn period is a curious name for a blog...
15:34 jnthn Maybe it'll have a high posting frequency though.
15:35 am0c^ joined #perl6
15:35 exodist is now known as Exodist
15:37 diakopter heh
15:38 diakopter low period, high frequency; good one.
15:38 florz jnthn: if noone has nitpicked that yet: "more optimal" ...
15:38 jnthn diakopter: Heh...I made a good pun. Usually folks are all like, "ouch, that hertz"...
15:39 nymacro left #perl6
15:39 jnthn florz: I so hope I didn't write "optimaler"... :-)
15:39 florz jnthn: well, no, but I guess that would be the same problem in a different language ... ;-)
15:40 dalek roast: c19ab2c | KodiB++ | S02-builtin_data_types/set.t:
15:40 dalek roast: [set.t] Marked some tests as relevant to RT #77760.
15:40 dalek roast: review: http://github.com/perl6/roast/commit/c19ab2cee0bcc24da761264091f72c0f9729d634
15:40 diakopter jnthn: hee
15:42 dalek rakudo: da7c7f9 | KodiB++ | / (2 files):
15:42 dalek rakudo: Tweaked Set enough to let us pass set.t.
15:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/da7c7f9b3041f2217e53e0a8a1764258e455e21e
15:45 cbk What would be the best/easiest way in Perl6 to break up a large file of code into 2 or 3 smaller files?  I would like to put my classes into one file and the main program into another.
15:46 TimToady jnthn: don't know if anyone pointed out that >>-<< is wrong precedence on slide 29, though Z- would work there
15:46 cbk I have read s10 and s11 and it seams a bit much for what I want to do.
15:46 jnthn TimToady: Oh gah, I had parens originally...
15:47 jnthn Then thought "oh wait, don't need those, they're just noise"
15:47 jnthn :/
15:47 envi^home left #perl6
15:47 jnthn rakudo: sub foo($a) { say $a }; foo 5 - 2
15:47 p6eval rakudo ca4a1d: OUTPUT«3␤»
15:48 jnthn TimToady: I was figgering the [+] was parsed list-op-ish
15:48 jnthn So it'd work like the above.
15:48 jnthn rakudo: my @a = 1,2,3; my @b = 3,2,1; say [+] @a >>-<< @b;
15:48 p6eval rakudo ca4a1d: OUTPUT«0␤»
15:48 TimToady but the map: is also a listop
15:48 jnthn Oh!
15:48 jnthn d'oh
15:49 TimToady so Z- wouldn't work either
15:49 jnthn Shouldn't have used the : form
15:49 jnthn yeah
15:49 satyavvd_ joined #perl6
15:49 jnthn Ok, you meant a different fail than I first thought.
15:49 TimToady yeah, I've fallen for that one several times too :)
15:49 TimToady no, I meant the wrong fail, so it was a fail fail :)
15:50 TimToady with map() form the >>-<< would work too
15:50 jnthn aha :)
15:50 jnthn I'll hafta do some slide tweaks.
15:51 TimToady I tend to use .map(*.foo) in those cases
15:51 satyavvd left #perl6
15:51 satyavvd_ is now known as satyavvd
15:52 envi^home joined #perl6
15:54 gottreu say ~((1,2,3) >>+>> ())
15:54 gottreu rakudo: say ~((1,2,3) >>+>> ())
15:55 p6eval rakudo ca4a1d: OUTPUT«(timeout)»
15:55 gottreu TimToady: what should that produce?
15:55 TimToady probably a message that says "Can't replicate an empty dimension"
15:56 gottreu okie doke.  Thanks.
15:56 gottreu should i like submit a bug report?
15:56 TimToady sure
15:57 masak <jnthn> Shouldn't have used the : form
15:57 masak this, by the way, is my general philosophy. :)
15:58 TimToady I'll bet you avoid $ in Haskell as well
15:58 TimToady and refrain from returning inside switch statements
15:58 masak no, I've come to terms with $ in Haskell.
15:59 masak I confess I do not return often from inside a switch statement. but not out of principle.
15:59 TimToady : is just a slightly more limited form of $
15:59 masak I don't like it. it bites. :)
15:59 TimToady don't use it unless it's the tail of your expression
15:59 masak right.
16:01 TimToady note that .method:{...}.morestuff is supposed to work, but I don't think rakudo does that yet
16:02 TimToady that's parsed as an adverb rather than a listop
16:04 TimToady though I think even std misparses it currently
16:05 am0c^ left #perl6
16:05 araujo joined #perl6
16:08 timbunce left #perl6
16:10 dual joined #perl6
16:12 Ross left #perl6
16:14 timbunce joined #perl6
16:18 pythonian4000 is now known as pythonian4000afk
16:21 daxim left #perl6
16:27 rbuels joined #perl6
16:27 gottreu rakudo: say [1,2,3,4].iterator.perl
16:27 p6eval rakudo ca4a1d: OUTPUT«Null PMC access in find_method('perl')␤  in <anon> at line 1210:CORE.setting␤  in 'Any::join' at line 1␤  in 'Mu::attribs' at line 1211:CORE.setting␤  in 'Mu::perl' at line 1215:CORE.setting␤  in main program body at line 22:/tmp/2WmZdXaKol␤»
16:27 gottreu rakudo: say (1,2,3,4).iterator.perl
16:28 p6eval rakudo ca4a1d: OUTPUT«Method 'perl' not found for invocant of class 'ResizablePMCArray'␤  in <anon> at line 1210:CORE.setting␤  in 'Any::join' at line 1␤  in 'Mu::attribs' at line 1211:CORE.setting␤  in 'Mu::perl' at line 1215:CORE.setting␤  in main program body at line 22:/tmp/OgNeh5Qs00␤»
16:28 gottreu Are these known problems?
16:28 moritz_ rakudo: say (1,2).iterator.WHAT
16:28 p6eval rakudo ca4a1d:  ( no output )
16:28 moritz_ gottreu: don#t think so
16:28 moritz_ rakudo: say (1,2).iterator.PARROT
16:28 p6eval rakudo ca4a1d: OUTPUT«ParcelIter␤»
16:28 cdarroch joined #perl6
16:28 cdarroch left #perl6
16:28 cdarroch joined #perl6
16:29 gottreu rakudo: say [1,2,3,4].iterator.map({$_;}).perl
16:29 p6eval rakudo ca4a1d: OUTPUT«(1, 2, 3, 4)␤»
16:29 moritz_ seems like ParcelIter is defined in PIR
16:30 moritz_ which explains its weird behavior
16:30 gottreu how is one supposed to access the elements of a Parcel?  (or is one not supposed to?)
16:31 moritz_ rakudo: say (1, 2, 3)[2]
16:31 p6eval rakudo ca4a1d: OUTPUT«3␤»
16:31 gottreu (1,(2,3),4).elems
16:32 gottreu rakudo: say (1,(2,3),4).elems
16:32 p6eval rakudo ca4a1d: OUTPUT«4␤»
16:32 gottreu rakudo: say (1,(2,3),4).map({$_}).elems
16:32 p6eval rakudo ca4a1d: OUTPUT«3␤»
16:34 TimToady I think .map should flatten now that we have .tree for other kinds of mapping
16:35 TimToady and I think most of the Any-list methods should flatten by defualt
16:35 TimToady *au
16:35 moritz_ so (<a b>, <c d>).reverse.join should be 'dcba' ?
16:36 TimToady yes
16:36 gottreu so what changed betwixt star and now to make the test fail?   (it did used to pass, eh?)
16:36 moritz_ gottreu: pmichaud rewrite List.reverse in PIR
16:37 gottreu ah
16:37 diakopter std: ...Z...1
16:37 p6eval std : OUTPUT«ok 00:01 116m␤»
16:38 moritz_ how evil.
16:38 pmichaud rakudo:  say 272/1201     # fraction of spectest time spent loading perl6
16:38 p6eval rakudo ca4a1d: OUTPUT«0.226477935054122␤»
16:38 diakopter rakudo: say ...Z...1
16:38 p6eval rakudo ca4a1d:  ( no output )
16:38 pmichaud rakudo:  say (665-272)/1201    # fraction of spectest time spent parsing source
16:38 p6eval rakudo ca4a1d: OUTPUT«0.327227310574521␤»
16:38 TimToady std: ... Z... 1
16:38 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤      'Z' used at line 1␤Check failed␤FAILED 00:01 116m␤»
16:38 TimToady right
16:39 pmichaud rakudo:  say (1201-665)/1201   # fraction of spectest time spent running code
16:39 p6eval rakudo ca4a1d: OUTPUT«0.446294754371357␤»
16:39 TimToady std: ...() Z... 1
16:39 p6eval std : OUTPUT«ok 00:01 116m␤»
16:39 diakopter rakudo: (...() Z... 1).say
16:39 p6eval rakudo ca4a1d:  ( no output )
16:40 TimToady rakudo: (Failure Z... 1).say
16:40 p6eval rakudo ca4a1d: OUTPUT«Use of uninitialized value in numeric context␤Any()»
16:40 diakopter pmichaud: what's it doing the other 23%? compiling?
16:40 TimToady rakudo: ...().WHAT.say
16:40 p6eval rakudo ca4a1d:  ( no output )
16:41 TimToady o_O
16:41 pmichaud diakopter: there's 100% there :)
16:41 diakopter oh I missed the first one
16:41 gottreu The default flattening by Any-list methods, is that when applied to just Parcels?  or lists too?  (Lists?)
16:42 TimToady ah, ... returns failure
16:42 TimToady as in "return" from sub
16:42 TimToady rakudo: say return "foo"
16:42 p6eval rakudo ca4a1d:  ( no output )
16:43 TimToady rakudo: fail "bar"
16:43 p6eval rakudo ca4a1d:  ( no output )
16:43 flussence rakudo: sub abc { ...; return 1 }; say abc().WHAT
16:43 p6eval rakudo ca4a1d: OUTPUT«Failure()␤»
16:44 TimToady rakudo: sub abc { ...Z...1 }; say abc.WHAT
16:44 p6eval rakudo ca4a1d: OUTPUT«Failure()␤»
16:44 slavik left #perl6
16:44 TimToady rakudo's mainline should probably notice a return of Failure and report it
16:47 masak aye.
16:48 flussence having p6eval say "RETURN:«...»" after/unless "OUTPUT:«...»" would be nice too
16:49 satyavvd left #perl6
16:50 gottreu is now known as gottreu_AFK
16:51 patrickas joined #perl6
16:52 moritz_ we've had that at some point
16:52 moritz_ it turned out to be too confusing
16:52 flussence ah
16:52 moritz_ and caused a few false bug reports
16:52 TimToady well, that's because it looks too similar
16:53 TimToady I'm quite certain it could be made not confusing
16:54 TimToady NO OUTPUT but main returned «...»
16:55 dalek nqp-rx: df8c49d | pmichaud++ | src/HLL.pir:
16:55 dalek nqp-rx: Add some pod directives to help out Parrot's "make codetest" target.
16:55 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/df8c49de9b75592a086e9a85e2025da3df81f2a4
16:56 Chillance joined #perl6
16:59 dakkar left #perl6
17:09 thebird left #perl6
17:11 molaf_ left #perl6
17:13 molaf joined #perl6
17:18 meppl joined #perl6
17:20 ZadYree joined #perl6
17:20 ZadYree will apt-get install perl6 overwrite my /usr/bin/perl? (perl 5)
17:20 moritz_ no
17:21 moritz_ the spec says that if a Perl 6 binary is installed under the name 'perl', it needs to default to Perl 5 mode
17:22 moritz_ since rakudo doesn't have that at the moment, the binary is called 'perl6'
17:24 ZadYree nice
17:25 rokoteko is perl6 in some debian repositoriy already? where?
17:25 rokoteko that doesnt sound very ... sane. :)
17:26 masak rokoteko: http://packages.debian.org/search?keywords=rakudo
17:26 moritz_ rokoteko: why not?
17:26 rokoteko Ah. now I finally understand what experimental really means. :)
17:26 masak huh. those releases are *old*. :)
17:27 moritz_ within the limits of what rakudo claims to be (a slow, limited subset of Perl 6) it works pretty well
17:27 rokoteko .. now that masak mentioned it. how often debian makes releases compared to rakudo?
17:27 arnsholt masak: Which just shows that occasionally, the Debian approach to life is actualy not so good =)
17:27 patrickas rakudo: my @primes := (2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n %% any(@a.grep( * <= sqrt($n))); $n } ... * );my $s = time; say ~(@primes ... { time - $s>=5; } ); #as many primes as you can in 5 seconds
17:27 p6eval rakudo da7c7f: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109␤»
17:28 moritz_ rokoteko: every 18 to 24 month, I think
17:28 moritz_ patrickas++
17:28 masak patrickas++ # creative uses of the series operator
17:30 wamba left #perl6
17:30 rokoteko moritz_: hmm. yes true. you have lot's of time to send newer versions.
17:30 patrickas also i would have thought it would be much slower then doing it in one swoop (insteda of two series) but it does not seem to be the case!
17:31 rokoteko maybe I should turn my work squeeze to the current experimental, instead of downloading the perl6 source from github when Im curious of something.
17:31 patrickas s/then/than/;s/insteda/instead/;
17:32 masak nom &
17:38 patrickas are state variables harder to implement in master than they were in alpha? or is it just a matter of no tuits?
17:42 molaf left #perl6
17:43 slavik joined #perl6
17:44 am0c^ joined #perl6
17:46 am0c joined #perl6
17:51 envi^home left #perl6
18:04 wolverian left #perl6
18:06 wolverian joined #perl6
18:11 moritz_ rakudo: say 'abc'.substr(-1)
18:11 p6eval rakudo da7c7f: OUTPUT«c␤»
18:17 TimToady that should probably only accept *-1
18:17 patrickas TimToady: what's the rationale ? both for substr and for array subscript ?
18:18 rokoteko rakudo: say 'abc'.index("a");  # hmm. where in the spec was what happens to $! when failures happens?
18:18 p6eval rakudo da7c7f: OUTPUT«0␤»
18:20 TimToady avoiding accidental discontinuities when you say .substr($something)
18:21 TimToady or .[$something]
18:21 patrickas ok
18:22 Cyrus left #perl6
18:22 pmichaud (state variables)  I suspect it's primarily tuits.
18:22 patrickas but we lose all the good things we can do on numbers like adding / incrementing ...
18:22 pmichaud Plus a lot has changed internally in variable handling since alpha, so we can't simply port the same code/approach across.
18:22 masak TimToady: .substr(-1) is known and reported to RT
18:23 TimToady patrickas: no we don't
18:23 gottreu_AFK is @a[-1] similarly known?
18:23 TimToady you can just as easily do .substr(*-$something)
18:23 gottreu_AFK is now known as gottreu
18:23 TimToady and you certainly can't increment -1  :)
18:24 colomon rakudo: my @a = 1..3; say @a[-1]
18:24 moritz_ rakudo: say ''.substr(-1)
18:24 p6eval rakudo da7c7f:  ( no output )
18:24 p6eval rakudo da7c7f: OUTPUT«Mu()␤»
18:24 patrickas pmichaud: thanks, I was wondering if I could try workingon that ...
18:25 moritz_ I want to replace $frac-part.=subst(/(\d)0+$/, { ~$_[0] }); in str2num-rat  with something faster... any ideas?
18:25 patrickas TimToady: I guess ... it's just that in a couple of situtaion it felt like it that would have been easier if [-$x] was allowed ... could be a mis-feeling
18:26 pmichaud don't use regexes
18:26 moritz_ I've tried $frac-part.=chop while $frac-part.substr(-1) eq '0'; but that fails for zero-width $frac-part
18:27 moritz_ will probably add more elaborate loop with substr
18:27 patrickas TimToady: now that I think of it , mostly things like [-5..-1] working without needing any special handling
18:28 supernovus joined #perl6
18:29 masak jnthn: timbunce++ tweeted your presentation, and it's getting retweeted a lot. \o/
18:30 supernovus A quick question. If I want to use the result of a capture in the replacement, what is the proper syntax? I tried $str ~~ s:g/ '${' (.*?) '} / $0 /; for a test and it returns Any() instead of the test that should match.
18:31 araujo anybody knows a nice name for a keyword that is going to "invoke" or "call" a routine ??
18:31 araujo know.. or can think of .. >)
18:31 araujo :)
18:31 pmichaud araujo: "call" ?
18:31 pmichaud araujo: "invoke" ?   :-P
18:31 araujo pmichaud, too boring name
18:31 araujo :P
18:31 * masak was just going to suggest those two
18:31 pmichaud araujo: "execute"  #  a bit more dramatic, maybe?
18:32 moritz_ supernovus: currently not yet implemented; you can work around it with $str.=subst(:g, rx/'${' (.*?) '}'}, -> $/ { $0 })
18:32 masak araujo: 'lolinvoke'
18:32 moritz_ that's the method form of s///
18:32 moritz_ araujo: lolcall
18:32 araujo and well, this keyword is a bit special too, since it transform a "block" of code into a function at the same time
18:32 masak araujo: 'funinvoke'
18:33 araujo mm...
18:33 supernovus moritz_: Good to know! Even better since I'm actually going to be passing the match to a method to return the proper value.
18:33 masak araujo: 'wham-bam-transform-you-mam-invoke'
18:33 araujo funinvoke .... fuivoke ... fuke ... fuel ...
18:34 masak araujo: 'callblock'
18:35 araujo masak, too long :(
18:35 flussence "poke"?
18:35 araujo heh, poke is fun
18:36 patrickas "invocalsform" ?
18:36 TimToady .&( {...} )
18:36 supernovus moritz_++ Awesome, it works perfectly now! Nice to know when it's just a case of something not being implemented and that there is a usable workaround :-)
18:37 masak it'll be awesome when s/...(...).../$1/ works, though.
18:37 araujo mmmm.. right .. a symbol or symbol combination could make it too
18:38 moritz_ masak: but not so easy to do
18:39 pmichaud ...  will that ever work?
18:40 masak pmichaud: are you thinking of the assignment form?
18:40 masak pmichaud: that's just a supplement, IIUC.
18:40 pmichaud no, I'm questioning whether $1 automatically gets turned into a closure.
18:40 * araujo was thinking about 'go' ... but other language already monopolized that word
18:41 patrickas left #perl6
18:41 * masak despairs
18:41 masak pmichaud: why wouldn't it?
18:41 moritz_ pmichaud: it will work with $0, I hope :-)
18:41 masak oh :)
18:41 * masak meant $0
18:41 pmichaud no, that's not what I'm referring to
18:42 masak right.
18:42 flussence araujo: two languages actually (http://code.google.com/p/go/issues/detail?id=9)
18:42 pmichaud s/abc/def/    ->   same as    .subst(/abc/, 'def')     # yes?
18:42 moritz_ probably the same as .subst(/abc/, -> $/ { 'def' })
18:42 TimToady .=subst
18:43 araujo flussence, ooh, well, I meant the name as a keyword .. not sure if the other Go! had a keyword 'go' though ...
18:43 pmichaud ...  so   s/abc/def $0/   becomes
18:43 pmichaud ...?
18:43 pmichaud .subst(/abc/, -> $/ { "def $0" })
18:43 pmichaud ?
18:43 masak aye.
18:44 moritz_ seems to be the most sane thing I could think of so far
18:44 TimToady .=
18:44 masak :)
18:44 pmichaud yes, .=
18:44 pmichaud sorry about that
18:44 masak is the -> $/ thing permanent now?
18:44 moritz_ TimToady: just because you're the language designer... :-)
18:44 TimToady masak: I hope not
18:44 masak phew.
18:45 pmichaud we're still having to work out how to make $/ properly dynamic
18:45 * araujo believes this is the first time the word 'sane' is used in here
18:45 moritz_ araujo: not at all :-)
18:45 TimToady if so, you're insane
18:45 huf when are we leaving?
18:46 TimToady on the 8th
18:47 masak araujo: what you just did is known as 'linguification'. http://en.wikipedia.org/wiki/Linguification
18:47 slavik why are you leaving?
18:48 masak 'an observation about [facts] is expressed as an unsupported (and unsupportable) claim about language'
18:49 slavik please don't leave :)
18:49 TimToady you can leave without returning, but you can't return without leaving :)
18:49 masak :P
18:50 slavik it is difficult to find a good Perl script which mentions the word 'use' with it being followed by 'strict' at least once in the script.
18:50 slavik masak: is that linguification, too?
18:50 araujo Lingui .....
18:50 araujo that sounds like good name for a programming language
18:51 slavik yes, it does
18:51 araujo hey thanks masak :D
18:51 slavik TimToady: s/Perl6/Lingui/ ?
18:51 TimToady LinguiF*ck
18:51 slavik :D
18:51 masak slavik: not sure. doesn't look much like one.
18:51 slavik TimToady: is that a clusterfuck of a language? or a modified version of Brainfuck?
18:51 slavik :(
18:52 slavik I fail at english
18:52 masak slavik: because you're actually talking about the code.
18:52 TimToady it's just a linguif*ckation
18:52 slavik masak: I see
18:52 masak slavik: let me give you an example: "the name 'George Bush' has never occurred in the same sentence as the word 'clever'". this sentence contradicts itself.
18:52 slavik masak: function names being followed by () ?
18:53 slavik lol, nice
18:53 masak slavik: did you read the Wikipedia entry? :)
18:53 slavik masak: yes
18:53 slavik masak: trying to understand it
18:53 slavik I am not smart enough to be a linguist :)
18:53 * PerlJam linguifies slavik
18:53 masak then you know it's about wanting to make a statement about factual matters and ending up making a statement about language.
18:53 slavik I am amazed by the japanese sentense structure of SOV ...
18:54 masak slavik: your two attempts were already about (programming) language, and thus weren't linguification.
18:54 [particle] in #perl6, i'm not linguist enough to be smart.
18:54 masak :)
18:54 TimToady slavic: japanese is very much a reverse polish language
18:54 slavik masak: so programming languages don't count as languages? :(
18:54 TimToady the head word of a phrase almost always comes last
18:55 masak slavik: yes they do, and the fact that they do is why your examples weren't good examples.
18:55 slavik I see
18:56 masak slavik: another example of a linguification: "the words 'Beyonce' and 'good' should never occur in the same sentence!"
18:56 slavik haha
18:56 slavik ok, I get it
18:56 [particle] where's the Acme:: module for perl6 that returns all-caps misspelled words in lol-context?
18:56 masak which disallows, for example, the phrase "Beyonce is not good"...
18:56 slavik right
18:57 masak oh, here's one of my absolute dis-favourites: "'Science' is a verb". yuck!
18:58 sorear good * #perl6
18:58 masak *, sorear.
18:58 TimToady this sentencing no nouning
18:58 PerlJam at least Perl 6 is intelligently designed   ;)
18:59 TimToady that doesn't mean that evolution isn't the most intelligent way to design something...
19:00 PerlJam except that you can only gauge intelligence after the fact.
19:01 * TimToady has trouble telling where his ego leaves off and merges into the Borg... :)
19:01 jnthn masak: Ooh :-)
19:01 jnthn Mmm...so good nom. :-)
19:01 masak jnthn: yours too? :)
19:01 Mowah left #perl6
19:02 rokoteko TimToady: mind if I ask you. what shape is the Borg?
19:03 TimToady I'm sure you've never caught me linguifr...lingrify...that-thinging.
19:03 TimToady rokoteko: kinda round, in spots, but not everywhere
19:03 flussence lasagnafication?
19:04 PerlJam flussence: only we can guarantee no Garfield.
19:04 jnthn masak: Yeah, strayed from my usual bunch of favourites to try something new at That Nice Thai Place, and was well rewarded for my small bit of daring. :-)
19:04 PerlJam only *if*
19:04 rokoteko TimToady: what about the ship they tend to travel in? :)
19:04 TimToady the Borg never travel; they are the center
19:05 rokoteko PerlJam: ah. the dude who always remind me of Spaceballs :)
19:05 masak ooh, That Nice Thai Place... :)
19:06 masak TimToady: I think you're safe; I can't recall seeing your nick on the same IRC line as the word 'linguification', like, ever.
19:06 PerlJam masak++
19:06 araujo left #perl6
19:06 masak somehow all my linguifications turn out to be self-refuting...
19:06 pmichaud I'm sure it saw it at least once.
19:07 PerlJam masak: you're just specializing.
19:07 TimToady masak: it goes without saying that you can say that again.
19:07 masak TimToady: I think you're safe; I can't recall seeing your nick on the same IRC line as the word 'linguification', like, ever.
19:07 masak masak, Dr of Self-Refuting Linguifications
19:07 * pmichaud wishes it had indeed gone without saying.
19:07 TimToady well, you never know, you know...
19:08 masak pmichaud: I could have gone either way with that one.
19:08 sorear pmichaud: moritz_: masak: do any of you know who might be willing to pick up the baton on pushing #cpan6sketch
19:08 masak sorear: in my view, it all hinges on when Alias++ is available.
19:08 Alias I thought I told you the hours?
19:09 PerlJam now?
19:09 * TimToady hums Dance of the Hourse
19:09 TimToady *Hours!!!
19:10 * PerlJam was wondering if that was a british horse
19:10 * TimToady doesn't wantto see a Hourse dancing
19:10 masak Alias: at least I missed that...
19:11 colomon Oh sure, TimToady, now I'm humming the Dance of the Hours.
19:12 sorear masak: "1600 is fine by me, 1500 is a bit better"
19:12 Alias I'd prefer not to be meeting between 3am and 9am
19:13 masak are the above lines both UTC?
19:13 * PerlJam thinks all times should be given as Texas time  :)
19:13 Alias ya
19:14 masak both 1600 and 1500 work for me, but I've missed many meetings so far due to lack of advance notice.
19:14 slavik meetings are a waste ... in my experience anyway
19:14 masak sometimes I miss #phasers meetings for the same reason. I should get a calendar or something.
19:15 PerlJam If enough people are awake at the same time #cpan6sketch should have a "meeting of opportunity"
19:16 sorear masak: the only person ever to have made a #cpan6sketch to this point (4 weeks) is moritz_
19:16 masak I made it once, but no-one else was there.
19:17 PerlJam masak: are you sure it wasn't no-one else was when?
19:17 masak PerlJam: I find that sentence confusing.
19:18 PerlJam masak: space v. time allusion
19:19 perigrin PerlJam: I think you wanted "then" anyway
19:19 masak oh, *then*! :)
19:19 masak now it's perfectly clear. :P
19:19 PerlJam perigrin: yeah, but I have when on the brain while looking at $work-code
19:20 perigrin $work code probably isn't approved by your psychatrist anyway
19:21 rhebus left #perl6
19:24 masak chromatic++ rants about the term 'pre-alpha' in http://www.modernperlbooks.com/mt/2010/09/that-silly-obsession-with-the-greek-alphabet.html
19:24 dalek roast: 39de0eb | pmichaud++ | integration/99problems-41-to-50.t:
19:24 dalek roast: Fudge out 41-to-50 gray code test until .reverse is settled.
19:24 dalek roast: review: http://github.com/perl6/roast/commit/39de0eb13c0ab686881a5f60c02d016ffc222fe0
19:26 * Alias & bed
19:29 jnthn masak: And I only had to reach for the dictionary once to read it. :-)
19:30 masak jnthn: which word?
19:30 jnthn sagaciously
19:30 jnthn I don't know that I've even heard it before.
19:31 masak 'sagacity' =:= 'sage-ness', no?
19:31 PerlJam how does chromatic know those people saying "pre-alpha" don't have beards?
19:32 PerlJam ;)
19:32 jnthn I thought it was parsley-ness...
19:32 PerlJam jnthn: as long as releases are thymely
19:33 masak oh card'mom, you guys!
19:33 jnthn That'd be mint!
19:35 masak this conversation is totally nutmeg.
19:36 PerlJam masak: no need to be ginger, really speak your mind!
19:36 slavik does that mean that masak has no soul?
19:37 masak I generally forget to pack my soul when I'm abroad traveling...
19:37 pmichaud I sold mine long ago.  :-S
19:37 masak in Riga, I had to buy a spare, just to keep me going.
19:37 masak then I forgot it at jnthn's place.
19:38 jnthn Good job by the time you left it at my place it wasn't your sole soul.
19:38 masak right. now I have two.
19:38 masak which is kind of handy. I can keep one at the office and one at home. :)
19:38 sorear so... who wants the "#cpan6sketch in 5" job?
19:39 sorear also, we need an agenda
19:39 pmichaud I'll do the #cpan6sketch in 5 job.
19:39 masak I'd love an agenda.
19:39 pmichaud (assuming I can make it at whatever time we agree upon)
19:39 pmichaud afk, kid pickup
19:42 plainhao left #perl6
19:45 meppl left #perl6
19:47 am0c left #perl6
19:50 moritz_ rakudo: say ~(<a b>, <c d>).reverse
19:50 p6eval rakudo da7c7f: OUTPUT«c d a b␤»
19:52 pmichaud fixing.
19:56 snearch joined #perl6
20:01 toebu wonders ... $OUTER::x and $CALLER::x do not work in rakudo yet ... right ?
20:02 pmichaud they do not.   You can sometimes get to CALLER:: by using callframe(), though.
20:02 pmichaud callframe(1).my<$x>   # iirc
20:02 pmichaud > say (<a b>, <c d>).reverse
20:02 pmichaud dcba
20:03 toebu aka there are several ways todo it ...
20:03 pmichaud spectesting
20:03 toebu but OUTER and CALLER are still 'correct' just not implemented ?
20:03 pmichaud not implemented, yes.
20:03 toebu drops a slide from his LISA2010 class ...
20:04 * moritz_ now has a patch that speeds up str2num-rat by about a factor of 2
20:04 moritz_ Test.pm builds, which is a good sign :-)
20:04 moritz_ running spectest now
20:05 toebu uses rakudo to execute all the code snipets included in his perl6 tutorial and includes the output again ... latex write18 is cool
20:05 gottreu pmichaud: is that just reverse or most/all methods that handle lists?
20:06 gottreu and/also/or is it just for Parcels?
20:07 pmichaud gottreu: It's for list methods obtained through the Any class (which will include Parcel)
20:08 gottreu ok
20:08 pmichaud gottreu: and I only changed .reverse for the moment... changing the rest of them might introduce other regressions I'll want to look at
20:10 moritz_ rakudo: say join '|', <a b>, <c d>
20:10 p6eval rakudo da7c7f: OUTPUT«a|b|c|d␤»
20:11 moritz_ rakudo++
20:11 moritz_ rakudo: say (<a b>, <c d>).join('|')
20:11 p6eval rakudo da7c7f: OUTPUT«a|b|c|d␤»
20:11 moritz_ rakudo++ again :-)
20:11 sorear niecza: say (<a b>, <c d>).join('|')  # Is this supposed to be hard?
20:11 p6eval niecza de8c4a9: OUTPUT«a|b|c|d␤»
20:11 moritz_ niecza++
20:12 moritz_ niezca: say ([<a b>], [<c d>]).join('|')
20:12 masak sorear++
20:13 moritz_ niecza: say ([<a b>], [<c d>]).join('|')
20:13 p6eval niecza de8c4a9: OUTPUT«[31m===[0mSORRY![31m===[0m␤Action method circumfix__S_Bra_Ket not yet implemented at /home/p6eval/niecza/src/Niecza/Actions.pm line 54.␤Check failed␤»
20:13 moritz_ is that [] that's NYI?
20:14 sorear yes
20:14 moritz_ niecza: say (<a b>.item, <c d>.item).join('|')
20:14 p6eval niecza de8c4a9: OUTPUT«Unhandled exception: Unable to resolve method item in class Parcel␤  at /tmp/bkfks2t78q line 1␤  at lib/SAFE.setting line 910␤  at lib/SAFE.setting line 910␤  at lib/SAFE.setting line 910␤  at (generated) line 910␤  at  line 0␤"mono" unexpectedly returned exit value 1 at
20:14 p6eval ..(eval 804)…
20:14 moritz_ sorear: is there any way to get a non-flattening list or array in niecza?
20:14 timbunce left #perl6
20:15 moritz_ niecza: say (my $ = <a b>, my $ = <c d>).join('|')
20:15 p6eval niecza de8c4a9: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-simple variables NYI at /tmp/K0BYveElO5 line 1:␤------> [32msay (my $[33m⏏[31m = <a b>, my $ = <c d>).join('|')[0m␤Use of uninitialized value $t in pattern match (m//) at /home/p6eval/niecza/src/Niecza/Actions.pm line 1832.␤Use of
20:15 p6eval ..uninitialize…
20:15 snearch left #perl6
20:15 sorear ... wow you guys are finding so much LHF
20:15 moritz_ niezca: my $a = <a b>; my $b = <c d>; say ($a, $b).join('|')
20:15 moritz_ niecza: my $a = <a b>; my $b = <c d>; say ($a, $b).join('|')
20:15 p6eval niecza de8c4a9: OUTPUT«Parcel()<instance>|Parcel()<instance>␤»
20:15 moritz_ parcel stringification, for one :-)
20:16 sorear parcels string as join(" ") ?
20:16 moritz_ yes
20:16 moritz_ if you neglect that, niecza++ and sorear++
20:17 moritz_ though I keep misspelling that name
20:17 sorear if I "neglect" that?
20:17 sorear what good is neglecting it?
20:18 moritz_ what I wanted to test is if it flattens or not
20:18 moritz_ it does not
20:18 moritz_ which is good
20:19 moritz_ so it didn't get the result right, but it got the non-flattening right
20:21 timbunce joined #perl6
20:21 sorear rakudo: say List.parents
20:21 supernovus left #perl6
20:21 p6eval rakudo da7c7f: OUTPUT«Method 'parents' not found for invocant of class ''␤  in main program body at line 22:/tmp/1aqzcX6pb6␤»
20:21 sorear rakudo: List.^parents.say
20:21 gottreu should reverse(X) be equivalent to X.reverse ?
20:21 p6eval rakudo da7c7f: OUTPUT«Iterable()Cool()Any()Mu()␤»
20:21 sorear rakudo: List.^roles.say
20:21 p6eval rakudo da7c7f: OUTPUT«Positional()␤»
20:21 sorear rakudo: Parcel.^parents.say
20:22 p6eval rakudo da7c7f: OUTPUT«Iterable()Cool()Any()Mu()␤»
20:22 * sorear implements Iterable
20:22 sorear I already have the correct Str ... but it's in List
20:22 sorear and my Parcel and my List didn't have a common superclass
20:22 moritz_ gottreu: yes, I think so
20:23 gottreu rakudo: say my $c = (1,2,3);say $c.elems;say my $d=reverse($c);say $d.elems
20:23 p6eval rakudo da7c7f: OUTPUT«1 2 3␤3␤1 2 3␤1␤»
20:23 pmichaud gottreu: not exactly
20:23 pmichaud reverse($x)  is not always the same as $x.reverse
20:23 gottreu ok
20:24 pmichaud rakudo:  my $x = <1 2 3>;  say $x.reverse;  say reverse($x);
20:24 p6eval rakudo da7c7f: OUTPUT«321␤1 2 3␤»
20:24 masak huh.
20:24 sorear What class should Seq be in?
20:25 moritz_ rakudo: class A { method reverse { 'abc' } }; say A.new.reverse; say reverse A.new
20:25 p6eval rakudo da7c7f: OUTPUT«abc␤A()<0x62de0f0>␤»
20:26 cibs left #perl6
20:26 sorear rakudo: say Iterable.^methods(:local)».Str.sort.join(" ")
20:26 p6eval rakudo da7c7f: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
20:26 pmichaud sorear: I have Seq as a subclass of List
20:26 sorear pmichaud: I mean the .Seq method
20:26 pmichaud oh
20:26 pmichaud I have that in Any
20:27 cjk101010 left #perl6
20:27 cbk What would be the best/easiest way in Perl6 to break up a large file of code into 2 or 3 smaller files?  I would like to put my classes into one file and the main program into another.
20:27 cbk I have read s10 and s11 and it seams a bit much for what I want to do.
20:27 qw3rty left #perl6
20:27 cbk is there in include statement or something?
20:28 moritz_ there's  use ClassName;
20:28 cbk and ClassName is in a different file?
20:28 moritz_ yes
20:28 moritz_ in ClassName.pm
20:28 moritz_ by convention in lib/
20:29 cbk ok and the .pm file is just a perl6 script?
20:29 moritz_ yes
20:29 sorear there are a lot of nasty circular dependencies in the setting
20:29 moritz_ and contains
20:29 moritz_ class ClassName { ... }
20:29 moritz_ or module or package or grammar
20:30 cbk I think I'll just start out with use ClassName
20:30 cbk I don't want to get into modules or packages yet.
20:31 moritz_ well, you need to include a module or a class, otherwise it won't load
20:31 cbk I just want to clean up my code and make it easier to find things.
20:31 cbk moritz_, Thanks!!!
20:31 moritz_ then structure it properly
20:31 cbk I don't care too much for large text files ;(
20:32 cbk especially if the class section is not the focus of my coding.
20:33 dalek rakudo: a90ae93 | pmichaud++ | src/Perl6/Compiler.pir:
20:33 dalek rakudo: Restore '-c' option to check a program's syntax without executing it.
20:33 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a90ae93e76427b07c076b2aa68b6669ac77e0ee1
20:33 dalek rakudo: 9e46fe0 | pmichaud++ | src/core/Any-list.pm:
20:33 dalek rakudo: Set Any.reverse to flatten the invocant before reversing.
20:33 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9e46fe01f20c7705a663e80e20fb6dba9b5ce590
20:33 supernovus joined #perl6
20:33 dalek roast: 1210d8f | pmichaud++ | integration/99problems-41-to-50.t:
20:33 dalek roast: Unfudge gray() test in 99problems-41-to-50.t .
20:33 dalek roast: review: http://github.com/perl6/roast/commit/1210d8f90aad0955be29f48206c06911e15d2d0a
20:34 moritz_ rakudo: 'a' ~~ /a{1,3}/
20:34 p6eval rakudo da7c7f: OUTPUT«===SORRY!===␤Unsupported use of {N,M} as general quantifier;in Perl 6 please use ** N..M (or ** N..*) at line 22, near "/"␤»
20:36 TimToady std: 'a' ~~ /a{1,3}/
20:36 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of {1,3} as general quantifier; in Perl 6 please use X**1..3 at /tmp/MMk56uHbEc line 1:␤------> [32m'a' ~~ /a{1,3}[33m⏏[31m/[0m␤Check failed␤FAILED 00:01 118m␤»
20:37 moritz_ due to nqp-rx limitations, rakudo can't use captures in panic messages yet
20:39 dalek rakudo: a204ba8 | moritz++ | src/core/Str.pm:
20:39 dalek rakudo: avoid calling .subst in str2num-rat
20:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a204ba831b96fb15d0189863afc158e9ce9d3e9c
20:39 pmichaud ...sure it can.
20:39 * pmichaud tests
20:39 dalek roast: 5b48fa0 | moritz++ | S05-metasyntax/repeat.t:
20:39 dalek roast: unfudge test for catching p5 style general quantifiers in regexes
20:39 dalek roast: review: http://github.com/perl6/roast/commit/5b48fa056e3418bd35e1967378fa9b75881b79c2
20:40 moritz_ pmichaud: last time I tried, I couldn't get it to work. You're welcome to show me ottherwise
20:41 sorear niecza's setting is pushing 1k lines and is organized by one simple rule
20:41 sorear new code always goes at the bottom
20:41 sorear yes, it's full of augments
20:42 pmichaud oh, I had my compilers backwards.  Anyway, I think I can get substitutions to work in subrule calls.
20:43 moritz_ rakudo: say :16<ag>
20:43 p6eval rakudo da7c7f: OUTPUT«DON'T PANIC! Invalid character (G)! Please try again :) ␤  in main program body at line 1␤»
20:44 diakopter urp
20:47 diakopter rakudo: say 0b10000000000000000000000000000000000000000000000000000000000000000000000000000000000001
20:47 p6eval rakudo da7c7f: OUTPUT«1␤»
20:50 flussence rakudo: say '0b10000000000000000000000000000000000000000000000000000000000000000000000000000000000001'.chars - 2 # just wondering
20:50 p6eval rakudo da7c7f: OUTPUT«86␤»
20:51 flussence rakudo: my $a = '0b1' ~ '0' x 62 ~ '1'; say $a.Int
20:52 p6eval rakudo da7c7f: OUTPUT«-9223372036854775808␤»
20:52 flussence rakudo: my $a = '0b1' ~ '0' x 63 ~ '1'; say $a.Int
20:52 p6eval rakudo da7c7f: OUTPUT«-9223372036854775808␤»
20:52 flussence er...
20:52 gottreu rakudo: say 0b1000000000000000000000000000000000000000000000000000000000000001
20:52 p6eval rakudo a204ba: OUTPUT«-9223372036854775807␤»
20:52 gottreu double er...
20:54 masak probably some overflow issue.
20:55 flussence rakudo: my $a = '0b1' ~ '0' x 62 ~ '1'; say eval $a; say $a.Int # works up to this length
20:55 p6eval rakudo a204ba: OUTPUT«-9223372036854775807␤-9223372036854775808␤»
20:55 flussence oh wait, no it doesn't
20:55 flussence the eval does.
20:56 moritz_ rakudo uses parrot's integers internally for such calculations
20:56 moritz_ so anything that overflows in there can result in arbitrary results for now
20:57 diakopter oh.  unchecked.
20:57 pmichaud rakudo's string-to-num conversions are basically fragile right now.
20:58 pmichaud (and far slower than they should be)
20:58 moritz_ I'm currently working on it
20:58 moritz_ though I'll probably go to bed soonish
20:58 pmichaud the correct mechanism will likely be to re-use the converters from HLL::Grammar
20:58 pmichaud instead of re-rolling new ones yet again
20:58 Guest23195 left #perl6
20:59 moritz_ where does HLL::Grammar live?
20:59 pmichaud it's the base class for Perl6::Grammar
20:59 pmichaud (in nqp-rx)
20:59 pmichaud actually, I guess the converters are in HLL::Actions
20:59 moritz_ we *really* need some cheat sheet that tells us which class come from which repo, and inerits from which other etc.
20:59 pmichaud anyway, they already know how to handle bases other than 10, and soon they'll be smart enough to handle integer overflow
21:01 moritz_ looks like str2num-int in rakudo is basically copied-and-pasted from string_to_int in HLL::Actions
21:01 flussence my $a = '0b1' ~ '0' x 51 ~ '1' ~ '0' x 10; say eval $a; say $a.Int
21:01 flussence .Int stops working when that second '1' is further right than that.
21:01 flussence rakudo: my $a = '0b1' ~ '0' x 51 ~ '1' ~ '0' x 10; say eval $a; say $a.Int
21:02 p6eval rakudo a204ba: OUTPUT«4611686018427388928␤4611686018427388928␤»
21:02 moritz_ though the latter currently requires a cursor as first argument, in order to throw proper error messages
21:03 moritz_ my primary goal is to move it to compile time
21:03 moritz_ making it more correct and robust or removing code duplication is secondary for now
21:04 dalek 6model: 9765a28 | mberends++ | java/runtime/Rakudo/ (5 files):
21:04 pmichaud compile-time handling ought to basically be to call Str.Numeric, and then figure out how to put the result into code
21:04 dalek 6model: [java] translate all remaining C# lambdas in KnowHOWBootstrapper to anonymous classes
21:04 dalek 6model: review: http://github.com/jnthn/6model/commit/9765a28ef2ddf274daaa71b3a519b8717389eb8c
21:04 timbunce left #perl6
21:04 bluescreen left #perl6
21:06 perlygatekeeper left #perl6
21:08 whiteknight joined #perl6
21:08 meppl joined #perl6
21:09 masonkramer left #perl6
21:09 masonkramer joined #perl6
21:15 supernovus left #perl6
21:20 pmichaud 20:59 <moritz_> we *really* need some cheat sheet that tells us which class come from which repo, and inerits from which other etc.
21:20 pmichaud I've started putting that sort of information at the top of each class declaration.
21:21 pmichaud (in comments)
21:22 colomon rakudo: say my $a = [[1, 2, 3], 4]; say $a.elems
21:22 p6eval rakudo a204ba: OUTPUT«1 2 3 4␤2␤»
21:22 colomon rakudo: my $a = [[1, 2, 3], 4]; say $a.elems
21:22 p6eval rakudo a204ba: OUTPUT«2␤»
21:22 colomon rakudo: my $a = [[1, 2, 3], 4]; say $a.elems; say $a[3]
21:22 p6eval rakudo a204ba: OUTPUT«2␤Any()␤»
21:22 colomon rakudo: my $a = [[1, 2, 3], 4]; say $a.elems; say $a[1]; say $a[3];
21:22 p6eval rakudo a204ba: OUTPUT«2␤4␤Any()␤»
21:23 colomon rakudo: my $a = [[1, 2, 3], 4]; say $a.elems; say $a[1]; say $a[3]; say $a[*-1]
21:23 p6eval rakudo a204ba: OUTPUT«2␤4␤Any()␤4␤»
21:23 colomon is that spec behavior, then?
21:23 pmichaud looks like it to me.  what behavior are you expecting?
21:23 colomon I would have expected $a.elems to be 2.
21:23 pmichaud it is 2
21:24 colomon you're right.
21:24 colomon huh.
21:24 colomon then I've failed to duplicate what I've got going on locally.
21:24 colomon but at least rakudo/p6 seems sane.  :)
21:25 colomon rakudo: my $a = ([1, 2, 3], 4); say $a.elems; say $a[1]; say $a[3]; say $a[*-1]
21:25 p6eval rakudo a204ba: OUTPUT«2␤4␤Any()␤4␤»
21:25 colomon I've got a situation here where it seems to be flattening when .elems is called.
21:30 spq1 left #perl6
21:30 colomon oooo, I see.
21:30 colomon false alarm.
21:31 moritz_ rakudo: say pir::pow__III(2, 3)
21:31 p6eval rakudo a204ba: OUTPUT«===SORRY!===␤The opcode 'pow_i_i_i' (pow<3>) was not found. Check the type and number of the arguments␤»
21:31 colomon though possibly an annoying testing glitch
21:31 moritz_ rakudo: say pir::pow__NNN(2, 3)
21:31 p6eval rakudo a204ba: OUTPUT«8␤»
21:31 colomon isa_ok $match.ast.elems, 7, '$match.ast has seven elements';
21:31 colomon comes out true.
21:32 colomon obviously should be is instead of isa_ok
21:32 colomon but I would have hoped it would catch boneheaded moves like that for me.  :)
21:32 pmichaud could switch isa_ok to require an Abstraction for its second arg
21:33 pmichaud that would catch stuff like this.
21:33 araujo joined #perl6
21:33 colomon Abstraction?  don't recall bumping into that before.
21:34 moritz_ a role that type objects implement
21:34 moritz_ pmichaud: we also have some isa_ok tests that use a string as second argument (type name)
21:34 masak colomon: Abstraction is the type equivalent of the :: (not-quite-)sigil
21:35 pmichaud S02:1837
21:35 pmichaud moritz_: oh, good point.
21:36 moritz_ which doesn't work if :: appears in the name, btw
21:37 colomon rakudo: say 1.isa(58)
21:37 p6eval rakudo a204ba: OUTPUT«1␤»
21:37 colomon rakudo: say 1.isa("blue")
21:37 p6eval rakudo a204ba: OUTPUT«0␤»
21:38 moritz_ rakudo: say 3.3.isa(23)
21:38 p6eval rakudo a204ba: OUTPUT«0␤»
21:41 molaf joined #perl6
21:43 moritz_ pmichaud: in NQP, how can I call a subroutine with a & sigil in a namspace?
21:43 moritz_ Str::&foo doesn't seem to parse
21:45 hercynium joined #perl6
21:47 estrabd is now known as estrabd_milehigh
21:49 estrabd_milehigh is now known as estrabd_afk
21:50 jnthn &Str::foo should shuffle the & to the right place, I think.
21:50 jnthn (If it doesn't, then bug.)
21:55 patspam left #perl6
21:59 pythonian4000afk is now known as pythonian4000
22:00 ruoso left #perl6
22:01 pythonian4000 is now known as pythonian4000afk
22:02 Mowah joined #perl6
22:08 pmichaud yes, I think &Str::foo should work.
22:08 wolverian left #perl6
22:08 wolverian joined #perl6
22:10 bluescreen joined #perl6
22:15 bluescreen left #perl6
22:16 Util left #perl6
22:16 Util joined #perl6
22:17 xinming left #perl6
22:18 xinming joined #perl6
22:19 Mowah left #perl6
22:28 bluescreen joined #perl6
22:29 pmichaud left #perl6
22:29 pmichaud joined #perl6
22:30 PerlJam left #perl6
22:30 sorear pmichaud: moritz_: jnthn: masak: We need some seed agenda items
22:31 masak "Why isn't Perl 6 on CPAN and what can we do about it?" :)
22:31 sorear rakudo: say 2+2
22:31 p6eval rakudo a204ba: OUTPUT«4␤»
22:31 PerlJam joined #perl6
22:33 pythonian4000afk is now known as pythonian4000
22:33 thundergnat joined #perl6
22:35 pugssvn left #perl6
22:36 s1n left #perl6
22:36 pugssvn joined #perl6
22:36 gbacon left #perl6
22:37 s1n joined #perl6
22:37 PerlJam left #perl6
22:37 Exodist left #perl6
22:37 exodist_ joined #perl6
22:37 PerlJam joined #perl6
22:38 gbacon joined #perl6
22:40 dalek niecza: 0d043eb | sorear++ | / (3 files):
22:40 dalek niecza: Fold next,redo,last,return back into setting
22:40 dalek niecza: review: http://github.com/sorear/niecza/commit/0d043ebd16860fa05d5151f2eed50790b9d5eef7
22:41 cj left #perl6
22:44 diakopter pugssvn: what are you doing here.
22:45 flussence it's feeling lonely.
22:47 Holy_Cow left #perl6
22:48 pugssvn left #perl6
22:49 diakopter phenny: tell moritz_ I sigtermed your pugssvn on feather3; sorry if I wasn't supposed to
22:49 phenny diakopter: I'll pass that on when moritz_ is around.
22:50 * diakopter wonders why mysql is running on feather3
22:50 diakopter oh, try_rakudo uses it.
22:57 cj joined #perl6
22:58 cj left #perl6
22:58 cj joined #perl6
23:00 amkrankruleuen joined #perl6
23:00 amkrankruleuen Hello
23:00 sorear Hello
23:00 supernovus joined #perl6
23:01 supernovus Is there is way to make clone() do a deep clone, so that objects inside the original aren't affected by changes to the clone?
23:02 sorear Don't think there's any builtin deep clone
23:02 supernovus crap :(
23:03 supernovus I came upon this when I cloned an object that had a bunch of child objects, and was shocked that after modifying the clone, the child objects on the original had also changed...
23:03 masak supernovus: this comes up once in a while.
23:03 supernovus masak: Is there any known workaround or best practice?
23:03 masak supernovus: problem is -- I think -- that deep cloning gets into deep trouble pretty quicky.
23:04 masak best practice: write your own deep cloning multimethod.
23:04 supernovus Oh goodie... well, here goes nothing ;-)
23:07 masak supernovus: there are so many things a built-in deep cloner could run across which are simply unsolvable cloning problems. database handles, singletons, things that Never, Never Must Be Cloned for various reasons...
23:07 masak better to handle that on the programmer side than on the language side.
23:08 supernovus masak: Makes sense. I'll add a deep-clone method to Exemel that clones the XML object then recursively clones all child nodes.
23:08 masak excellent.
23:10 supernovus It's so short, I can barely wait to see if it works ;-)
23:16 colomon .oO( of course, if all your objects were immutable, cloning wouldn't be such an issue.... )
23:19 masak in other news, Down With The Assignment Operator. join us in our yearly struggle on January 19th.
23:22 jnthn Hey, that's just before my birthday!
23:23 masak then we'll just have to party two days in a row :)
23:23 jaldhar joined #perl6
23:24 jnthn Well, not quite the day before.
23:24 jnthn We could party all the days inbetween though :-)
23:24 masak as long as we don't assign to things, sure.
23:25 jnthn Maybe I should have assignment-operator shaped candles on the cake.
23:25 masak as long as there are red bars across them, sure.
23:27 supernovus colomon: Well, considering how the Exemel object works, it wouldn't make sense to be immutable. But, adding a deep-clone method to it should solve my problem.
23:28 masak left #perl6
23:29 colomon supernovus: sure, that was mostly in jest.  the only new class I've created recently was definitely mutable...  (though I might tinker with that design, now that I think about it).
23:31 supernovus colomon: No worries, I use a lot of immutable stuff in other projects, but in this case, the entire design is based around a mutable object representing an XML element and it's children. The model has certainly made implementing a version of Petal fairly simple.
23:37 cdarroch left #perl6
23:45 zostay_ left #perl6

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

Perl 6 | Reference Documentation | Rakudo