»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:04 whiteknight left 00:05 Chillance left
dalek ecza: cab0fe7 | sorear++ | lib/ (2 files):
Simplify NewBoundVar now that Bind is dead
00:08
ecza: b9f246d | sorear++ | / (3 files):
De-CPS-ify the variable API

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