pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
00:04 jferrero left 00:05 jferrero joined
mncharity p6 creation status: () parser, still don't have one. STD.pm is p6, partially running after automagic massage, largely correct, "almost good enough for now" spec. parrot's grammar is p6, runs, somewhat slowly, but is less coverage. STD_red, a manual massage of STD.pm, is not p6, runs quickly, has coverage somewhere between pugs/STD and rakudo. pugs is non p6, increasingly non-spec, runs. somewhat slowly. 00:13
pugs_svnbot r20563 | bacek++ | [spec] Remove test skip for rakudo (requires rakudo r27848+). Fix array declaration
mncharity () regex engine. no p6 ones at all. rakudo's PGE best working one. yet_another_regex_engine, in p5, has portability problems (eg, "not running on 32-bit perl"). nothing else really usable. 00:16
00:18 japhb left
mncharity () compiler. pugs - non p6, mature, dead. rakudo - non p6, active. elf - p6, low-bus-number active, currently less wizzy than pugs and rakudo, more than kp6. being implemented in p6 perhaps provides greater leverage for wizziness than rakudo's pir, but less than pugs's haskell. kp6 - sort of p6, inactive. 00:20
() runtime. no p6 ones at all. rakudo - active, featureful, but gaps still prevent extending it using p6. elf - combination p5 and p6. less complete than rakudo or pugs, perhaps even than kp6. pugs - you know. 00:23
Auzon mncharity: Nice summary. Is this for a blog or similar? 00:25
vixey STD.pm almost runs?!
how?
00:26 ruoso left
mncharity () usability: pugs - a bit slow, good coverage, has been used with several smallish (a few classes) projects, attempts at larger projects consistently fail. elf - fast, narrower eclectic coverage, has been used for one larger project than pugs, but less code total. rakudo - speed medium, more robust coverage, but almost no p6 ever run. 00:27
vixey: re 'STD.pm almost runs?!', said "partially running". cd src/perl6; ./STD5_run. can generally do expressions. 00:29
Auzon elf has a project?
pmichaud rakudo is non-p6? by what measure? 00:30
00:31 bacek joined
mncharity re blog, thinking up elf summary for avar metastasized into a big picture summary. cause hard to do the smaller without the bigger. 00:31
re 'elf has a project', huh?
pmichaud: my impression is other than the parser grammar, it's written almost entirely in pir, not p6. no? 00:32
pmichaud no.
mncharity great! elaborate...
?
pmichaud the parser and the conversion to an AST are both written in p6.
Auzon re project: "[elf] has been used for one larger project than pugs, but less code total" 00:33
pmichaud svn.perl.org/parrot/trunk/languages...actions.pm
lambdabot tinyurl.com/5b5g2h
avar Parrot recently implemented a mini-perl6 like language that they use for AST manipulation
mncharity re parser, PGE is p6?!? or you mean, PGE, written in pir, takes a p6 grammar which generates a p6 ast?
pmichaud PGE, written in pir, can parse and execute p6 grammars and rules. 00:34
rakudo is mostly written in P6.
unless you're requiring that every tool used in the compiler toolchain is written in p6.
avar So the parser is PGE (implemented in PIR), the AST hacking is done in their miniperl6 and the actual logic is in PIR still
Like the implementation of operators and whatnot
(last I checked)
mncharity re every tool, not at all
pmichaud "the parser is PGE" is a bit misleading
Rakudo's parser is written in Perl 6.
PGE is a parser engine. 00:35
Rakudo's parser is at svn.perl.org/parrot/trunk/languages...grammar.pg and svn.perl.org/trunk/languages/perl6/...ar-oper.pg 00:36
lambdabot tinyurl.com/5jh29s
pmichaud sorry, 2nd url should be svn.perl.org/parrot/trunk/languages...ar-oper.pg
lambdabot tinyurl.com/5r3cfq
00:36 allbery_b left
avar I mean the PGE library, but it by design has the same syntax as some of perl 6 00:37
It still has inline pir there and not perl 6 and so on.
00:37 allbery_m joined, allbery_m is now known as allbery_b
pmichaud yes, it has a small amount of inline PIR. But I don't think that's enough to say "it's not p6". The vast majority of the core code for the compiler is written in Perl 6. 00:37
I think it's very misleading to say that Rakudo is written in PIR. 00:38
00:38 tobeya left
mncharity it might be clearer to say that rakudo's _grammar_ is written p6. to avoid confusion between 'parser as spec+engine' vs 'parser as spec, engine separate thing'. ie, "yacc's parser is written in yacc" and "yacc's parser is written in C", are both true, but the latter more informative. 00:38
pmichaud mncharity: do you include the conversion to an ast as being part of the grammar? 00:39
mncharity given the {make ...} regex stuff, yes. 00:40
avar pmichaud: I don't think what I said was misleading (2008-05-28 00:34:12 <avar> So the parser is PGE...). When I was hacking on rakudo albeit doing some minor changes all the stuff I was doing was in PIR because I wasn't working on changing the grammar or the AST.
pmichaud what changes were you making?
mncharity 'The vast majority of the core code for the compiler is written in Perl 6', aside from the grammar, is that the miniperl6 avar mentioned?
avar adding object methods and other small stuff like that.
pmichaud avar: can you give me a specific example? 00:41
mncharity: if by "miniperl6" you mean "the code that is in actions.pm", then yes. 00:42
avar One patch I think I did added .sum to lists and arrays, another added a .say method to Object.
pmichaud can you write ".say" in Perl 6?
00:43 armagad_ left
avar I don't pretend to know the first thing about rakudo really I'm just saying that when I was poking it 24/18/12/6 months ago all the stuff I was doing was almost exclusively in PIR because I wasn't changing the syntax or adding new features to the parser. 00:43
mncharity i have no idea what "miniperl6" means, looking for clarification.... is "actions.pm" plus the grammar the aforementioned "vast majority of the core code", or is there more I should look at?
pmichaud mncharity: grammar.pg is the grammar (the part that builds a parse tree). actions.pm is the part that converts a parse tree into an AST. 00:44
that, plus a variety of runtime libraries, is the rakudo compiler.
avar: rakudo has substantially changed in the past 6 months, then.
avar: as of 6 months ago most of what we were writing was PIR, yes. 00:45
avar Parrot has a language with a perl6 like syntax that has just enough features to do the operations you need to have for AST hacking, i.e. simple datatypes, constructing lists etc. They use that to parse their AST manipulator and generate a .pir file
pmichaud as of 5 months ago most of what we have been writing is p6.
avar (All the stuff goes into one giant PIR file which then gets compiled to a pbc or executable)
(Standard disclaimer about me not knowing anything about parrot here)
pmichaud (avar has the basic build process correct :-) 00:46
mncharity re 'can you write ".say" in Perl 6?', yes. svn.pugscode.org/pugs/misc/elf/elf_...Prelude.pm oh, that's *say(). There's a .print there though.
;)
pmichaud and .print is written in P6?
avar So stuff like object methods and such gets written in perl 6 now?
pmichaud we're still writing the object methods for core types in PIR, simply because that's easier.
for example, it's fairly difficult to justify writing "substr" in Perl 6, given that the PIR version is about 5 lines of code. 00:47
mncharity re 'actions.pm is the part that converts a parse tree into an AST', ah, ok. so re earlier 'is AST part of grammar', then not so much. is anything downstream of the AST in p6? 00:48
re "it's fairly difficult to justify writing "substr" in Perl 6, given that the PIR version is about 5 lines of code", wrt rakudo, sure. wrt "it would be nice to run p6 in peoples' browsers, and elsewhere", it would be nice to have a p6 implementation of substr.
00:49 kanru left
pmichaud is there a p6 implementation of substr somewhere? 00:49
mncharity at least a p6 implementation that moved from all the prelude multi and type'ed argument ness down to something more primitive.
pmichaud in Prelude.pm, where's the definition for 'print' that 'say' is using?
(anything downstream of the AST in p6) Parrot has a common AST representation -- the tools that compile the AST into PIR are themselves written in PIR, yes. 00:51
but that's really a part of the toolset.
mncharity print is a p5 primitive. should probably be renamed something like primitive::print, since there's no way such a p5 primitive is going to correctly participate in multi dispatch, etc.
pmichaud right, so even Prelude isn't pure Perl 6.
it relies on p5 primitives. 00:53
mncharity err, you don't mean elf's Prelude.pm, yes? using a primitive defined elsewhere wouldn't make it not pure Perl 6. re Prelude in general, of course runtimes define some things a primitives, how else. Though there's an insentive to have them not end up directly in the Prelude. but re self hosting, the more 00:54
pmichaud rakudo does the same thing -- it defines some things as primitives. And it uses PIR to do that.
mncharity p6 spec prelude which is available as p6, the less the various runtimes will need to implement. again, not directly an issue for rakudo, but certainly one for p6 in general. 00:55
pmichaud I agree, the more prelude that we have as p6 spec, the better. But lacking that prelude, rakudo chooses to do a lot of its runtime primitives in PIR.
but the bulk of the *compiler* is clearly p6. 00:56
mncharity re primitives, sure, but the point is, pugs's compiler guts are written in haskell, elf's in p6, and rakudo's in pir.
me reads, preceeding line, things
*thinks
"vocabulary" conflict
the thing which takes an ast, does scope, lifetime, type and dataflow analysis, in so far as any of our compilers do, do it in haskell, p6, and pir, respectively. 00:57
and runtime code emittion 00:58
*emission
00:58 duzy joined
duzy greeting :) 00:58
pmichaud perhaps. but someone working on the rakudo compiler itself never has to deal with the underlying PIR
(yes, most of do deal with some pir, and knowing pir is helpful) 01:00
*most of us
mncharity re someone working, definitely vocabulary divergence. :) s/compiler/implementation/ and I'll bite. 01:01
though...
avar Yeah, but what the compiler maintainer has to deal with and whether the whole system is bootstrapped are two really different things:)
mncharity I thought it still wasn't possible to chose to write, say, a prelude method or sub in p6?
pmichaud one can write subs in p6, yes.
avar But AFAIK parrot has never been aiming for a Perl 6 bootstrap
pmichaud we don't have a good mechanism to include those as part of the perl6.pbc file yet, but that's coming real soon. But we're also finding that there aren't a lot of subs that we're dying to have written as Perl 6. 01:02
rakudo's primary goal is a working Perl 6 implementation. bootstrapping is secondary.
(we expect to do bootstrapping, yes, but thus far it's a secondary goal.) 01:03
01:04 dolmen left
mncharity so "one can write subs in p6", but until "real soon", it is not currently possible to write prelude subs or methods for rakudo in p6. with the addendum that you're finding such a thing to be of limited interest. 01:04
avar Yes I know, parrot is a runtime as opposed to a x-in-x compiler like kp6 tried to be or your average C compiler is.
But it's aiming to bootstrap eventually? I didn't know that? 01:05
s/\?$//
How will that work? Parrot has a lot of libraries in PIR that further rely on stuff written in C which would all have to be rewritten in Perl 6 if it were to bootstrap itself, or am I misunderstanding what you mean by bootstrap? 01:06
pmichaud I mean that eventually the AST compiler and possibly PGE will be (re)written in Perl 6.
once the AST compiler is written in Perl6, we can target whatever backend we really want. 01:07
(actually we could do that now, but it's not a huge priority at the moment.)
if by bootstrap you mean "a complete implementation from Perl 6 to machine code written entirely in Perl 6"... I don't know anyone who is doing that. 01:08
mncharity so to recap, my undertanding is rakudo is p6 in the grammar and actions, and entirely non-p6 in the engine, analysis, emission, runtime, and prelude. yes?
pmichaud prelude will become more p6 as we progress 01:09
but yes, that's a fair understanding.
what is elf's runtime written in? 01:10
mncharity almost entirely p5. both because of Moose and Class::Multimethods, and because it's currently heavily using unboxed objects. and because very little besides a few unboxed objects are implemented. 01:12
pmichaud right. so the fact that a runtime is non-p6 is likely to be expected.
mncharity objective is to minimize the p5 footprint as much as possible. given that anything non-p6 will all have to be rewritten for each new backend. 01:13
pmichaud reasonable. 01:14
(for the target goal)
mncharity re runtime, I'd ideally like to have almost all the runtime in p6, with backend-specific overlays. but... don't even have macros yet, so still far from that.
01:14 meteorjay left
mncharity next step along that path is separating the "figuring out what the IR tree is trying to say" from the "emit a method call as piece of p5 code X". 01:15
pmichaud anyway, yes, there's a fair amount of non-p6 code in rakudo (if one counts the compiler tools used to generate it), but the bulk of the analysis and conversion from parse tree to executable form is being done in p6. 01:16
I certainly think of rakudo as being written with more p6 code than non-p6 code.
mncharity boggles... interesting 01:17
I suspect my concept "rakudo" includes many files which your's doesn't. view from outside parrot, vs view from inside. 01:19
pmichaud well, if one treats 'elf' as requiring p5/moose, then I suspect the view is much the same :-) 01:20
mncharity ie, if PGE is a compiler tool, no part of rakudo, then the entire rakudo front-end is p6.
pmichaud I think that p5 and moose are elf's virtual machine, while parrot is rakudo's. 01:21
(phone)
mncharity currently the primary elf variant isn't using Moose... wondering whether it might be worth dropping Moose for a while, in pursuit of kiss variant pruning.
stevan_ mncharity: fyi - Moose/MOP svn HEAD is 20-25% less slow 01:22
mncharity ! :)
hi stevan_
startup or runtime? 01:23
stevan_ uhm
test suite :)
mncharity * running time
:)
stevan_ but seems to be reflected in several other large moose app test suites too 01:24
pmichaud okay, p5 is elf's virtual machine. :-)
and perhaps parts of CPAN ? ;-)
mncharity :)
autobox
pmichaud anyway, an outside view of 'elf' might say it's mostly p5 and C. :-) 01:25
01:25 Ched- left, Ched- joined
mncharity but I would love it if someone started a non-p5 backend. basically, if elf isn't running just fine on some non-p5 backend, then elf still has a fundamental gap. but that's just the focus with which it was defined. 01:26
pmichaud there is that difference -- in the parrot world we aren't explicitly targeting other backends
anyway, I'm going to go hack again.
TimToady stevan_: can moose parameterize roles on values in addition to types yet? 01:28
stevan_ no, it cant even do it on types yet
TimToady hmm, thought I read that somewhere...
mncharity re "explicitly targeting other backends", indeed. which makes it harder to draw such "what is the language" lines. targetting multiple backends makes the choice clearer. eg, perl compatible regexp engines are out (everyone has them), p6 regex engines are in.
stevan_ no, we have parameterized types
TimToady okay, it's eval for now then...
pmichaud TimToady: oh, I had a question regarding list() -- does that get special parsing treatment? 01:29
mncharity back to hack. enlightening conversation. tnx
pmichaud or is it a normal function?
01:30 lisppaste3 left
TimToady I think it's a function that processes on the raw Capture maybe 01:30
pmichaud the example being: list(1, 2, a=>3, 4)
TimToady assuming a raw Capture can keep those 4 things in order, of course...
pmichaud hmmmm 01:31
TimToady but it does seem that it should treat a=> as a pair, not as a named arg
pmichaud currently pugs does something special with "list" to make it work. 01:32
TimToady especially when you start writing @(1, 2, a=>3, 4) instead
pmichaud er, "work".
mncharity if anyone is looking for a challenging p5 project, create a p5 module/design, which compared to Moose, is more focused on p6 compliance, and less on "humans can actually use it by hand in p5". perhaps involves cannibalizing Moose. ie, the objective
is to end up with a *fast* prototype spec object system which can be emitted to mechanically.
pmichaud pugs: my &f := &list; say &f(1, 2, a=>3, 4); 01:33
exp_evalbot OUTPUT[*** Named argument found where no matched parameter expected: ("a",Ann (Pos (MkPos "/tmp/3B2HytjWsa" 1 35 1 36)) (Val (VInt 3)))␤ at /tmp/3B2HytjWsa line 1, column 23-40␤]
pmichaud pugs: say list(1, 2, a=>3, 4);
exp_evalbot OUTPUT[12a 34␤]
TimToady looks like pugs has special-cased list() where it should instead know how to retrieve the orginal Capture order 01:34
pmichaud anyway, I have my answer for now, which is that either Captures keep track of the argument order, or we do something special with list
if Captures keep track of the original argument order, that's going to make things tricky for Parrot. 01:35
because Parrot requires named arguments to come after positional ones
mncharity does anyone know how much of t/ rakudo parses? /me ponders ways to move from STD_red to p6... 01:36
pmichaud (currently PCT reorders arguments to make sure this requirement is met.)
TimToady seems like any time you throw info away you end up with a design smell of some sort or other... 01:38
pmichaud also, as a head's up -- named argument passing was a topic of today's #parrotsketch and will likely come up during the design meeting 01:39
somehow we'll have to bridge the gap between Parrot and Perl 6... and my preference is that Parrot do it and not have to do a lot of workarounds in rakudo :-) 01:40
where "do it" == "the bulk of the work in bridging the gap"
anyway, thanks for the answer. :-) 01:41
TimToady well, it might be the wrong answer... :)
pmichaud I'm sure if it is you'll tell us at some point :)
TimToady usually after someone has told me (repeatedly) :) 01:42
pmichaud it's not clear from the synopses that captures record relative positions of named and positional values
01:42 lisppaste3 joined
pmichaud (perhaps because this question hasn't come up before.) 01:43
TimToady I've always kinda had the feeling it oughta, but audrey argued me out of it, for various good reasons, but the real problem may be a language design problem
and maybe pairs are a little too context-dependent in their meaning
there are various ways to finesse it, but it's not clear what the costs are
pmichaud fwiw, everything is okay with (1, 2, a=>3, 4), because it's not a postcircumfix:<( )> 01:44
same for @(1, 2, a=>3, 4)
it's only something like list(...) that poses a difficulty at this point.
(from what testing I've done.)
TimToady well, it's possible to move the problem around without solving it too... 01:45
pmichaud :-)
TimToady and arguably @(...) should treat a pair as a named argument, since it's an operator, and operators are just functions 01:46
pmichaud yes, there's that argument also. :-)
anyway, something to think about. for now rakudo will likely take the pugs approach until we can figure out how it fits together and what we'll need or have from Parrot to resolve it. 01:47
it's not and urgent problem from the rakudo perspective.
s/and/an/
TimToady 'k will go off and think & # dinner 01:48
pmichaud thanks, enjoy dinner.
01:49 cjfields_ joined
pmichaud oh, here's a radical and possibly very bad suggestion 01:50
have foo => 3 always be a positional pair, and require a colon for named arguments
a => 3 # positional pair
:a => 3 # named argument, same as :a(3)
pugs_svnbot r20564 | Auzon++ | [gsoc_specteset] adding some simple module re-export tests 01:53
Auzon Apparently I can't spell spectest. Oh well. 01:54
mncharity :)
01:57 alester_ joined 02:02 Auzon left 02:07 cjfields left 02:08 eternaleye_ left 02:16 Auzon joined 02:19 FurnaceBoy left 02:23 BinGOs_ joined, ron___ left 02:25 cjfields joined 02:26 jhorwitz left 02:28 alester_ left 02:38 BinGOs left 02:42 cjfields_ left, alester_ joined 02:51 cjfields left 02:57 cjfields joined 03:00 cjfields left 03:32 jferrero left 03:43 eternaleye_ joined
TimToady I was thinking more like named args always use a => 3 or :a(3), and you have to say 'a' => 3 to force pairs in argument lists (but circumfix:<( )> always makes pairs regardless 03:45
03:51 mncharity left
TimToady problem with :a => 3 is that :a is a term in its own right 03:53
03:53 REPLeffect_ joined 03:54 wknight8111 left 03:58 detrolex left 04:07 cjfields joined, cjfields left 04:29 braceta left 04:37 nipotan is now known as nipotaway
diakopter TimToady: b/c of the specification for a Perl 6 interpreter/compiler to treat source code as Perl 5(.which?) until "use v6;", it seems to me that any complete implementation will need perl5.x.x (at least) linked (b/c no one is going to succeed to reimplement perl5 (perfectly) in Perl 6 or even PCT). This means every (bootstrapped, self-hosting, or otherwise) Perl 6 implementation will include perl5 as a dependency. It also ... 04:56
... implies to me that when implementing tight interaction between/among the interpreters, a perl5-hosted implementation has advantages. thoughts?
TimToady or anyone else, I mean... 04:57
Auzon Yeah, the requirement of Perl 5 is somewhat constraining 05:01
diakopter and for the (conjectured?) requirement of a perl6 to analyze/compile source to an executable, it seems to me that all these executables will end up looking just like PAR executables, b/c of the possible necessity of doing an arbitrary runtime eval(). Another advantage of a Perl 5 host?
Auzon Too bad it's so popular ;)
I imagine we'll see Perl 6 implementations linking to libperl, or just ignoring that part and almost being Perl 6. 05:02
diakopter or that specification redacted :D
but that begs another question - is it also a requirement for a perl6 to include a Perl5 grammar? ??!!!? 05:03
Auzon I've recently been wondering about a perl52perl6 translator of sorts, based off of Perl 5's PPI module (search.cpan.org/perldoc?PPI) 05:04
lambdabot Title: PPI - Parse, Analyze and Manipulate Perl (without perl) - search.cpan.org
05:04 alc joined
Auzon Apparently it's pretty good with parsing perl5. So maybe it'd be enough to write a translator using that, then translating itself to Perl 6. 05:05
Maybe I'm missing something. And maybe PPI isn't good enough here. 05:06
diakopter it seems that (as pugs does) it would be extremely convenient to be able to use/require CPAN(5) modules already in site/ At least you would want to be able to interact with them somehow.
but I don't know if the synopses address that. (use'ing Perl 5 modules from Perl 6 code) 05:07
05:07 Southen left
diakopter I mean, it's all quite magical in pugs 05:07
TimToady ppi isn't good enough, which is the whole reason I wrote mad instead 05:08
diakopter read that as "went mad" 05:09
Auzon Likely that too ;)
TimToady and as it happens, the p5-to-p6 translator was a SoC project two years ago :)
Auzon How well did it go?
TimToady okay given how much we didn't know yet about Perl 6... 05:10
it's in Haskell
takes yaml output of MAD as input
Auzon Interesting. 05:11
diakopter TimToady doesn't need any more compelling reasons to go mad.
TimToady see ./misc/pX/Common/P5_to_P6_Translation if you're interested 05:12
diakopter waits for the implementation named "psyx" 05:13
several pronounciation choices 05:14
TimToady biab &
Auzon Interesting, but I don't speak Haskell 05:15
anyway. sleep & 05:17
diakopter fg 05:18
Auzon yes, thanks. 05:19
05:48 benjammy joined 05:52 alester_ left 06:00 meppl joined 06:10 justatheory left 06:22 BinGOs_ is now known as BinGOs 06:36 duzy left 06:47 luqui joined 07:06 japhb joined 07:11 b_jonas joined 07:13 pbuetow joined 07:14 IllvilJa left, agentzh left, smtms left, r0bby left, kolibrie left, arguile left, kane_ left, Maddingue left, Caelum left 07:16 IllvilJa joined, agentzh joined, smtms joined, kane_ joined, Caelum joined, Maddingue joined, kolibrie joined, arguile joined 07:29 lambdabot left 07:37 iblechbot joined 07:41 cosimo joined 07:59 bsb left 08:09 pmurias joined 08:10 alanhaggai joined 08:24 pbuetow left 08:36 Caelum left 08:37 alanhaggai left 08:38 Caelum joined, cookys left 08:40 alanhaggai joined 08:43 renormalist left 08:58 bacek left 09:26 lambdabot joined 09:33 pmurias left 09:46 rindolf joined 09:59 elmex joined 10:04 ludan joined
ludan hi 10:05
moritz_ hi
rindolf Hi ludan 10:11
Hi moritz_
Hi all.
10:16 alc left 10:19 IllvilJa left 10:27 luqui left 10:49 ruoso joined 10:53 alanhaggai_ joined 10:57 b_jonas left 10:58 alanhaggai left 11:03 Ukkaron joined 11:09 IllvilJa joined 11:10 Ukkaron left 11:18 mj41 joined 11:21 FurnaceBoy joined 11:44 alanhaggai_ left 12:11 FurnaceBoy left 12:18 braceta joined 12:41 alanhaggai joined 12:52 cmarcelo joined 13:13 braceta left 13:22 REPLeffect_ left, REPLeffect_ joined 13:30 alc joined 13:31 jhorwitz joined, eternaleye_ left
rakudo_svn r27871 | pmichaud++ | [rakudo]: 13:32
r27871 | pmichaud++ | * Add some more operators (RT#54946, dolmen++)
r27871 | pmichaud++ | * Patch courtesy Olivier Mengu?\195?\169 <olivier.mengue at gmail.com>
13:37 allbery_b is now known as eviltwin_b, allbery_b joined, wknight8111 joined 13:38 eviltwin_b left
rakudo_svn r27872 | pmichaud++ | [rakudo]: 13:51
r27872 | pmichaud++ | * Refactored version of List's grep, reduce, first methods (RT#54822, bacek++)
r27872 | pmichaud++ | * Patch courtesy Vasily Chekalkin [email@hidden.address]
r27874 | pmichaud++ | [rakudo]: 13:57
r27874 | pmichaud++ | * Handle negative length in Str.substr (RT#54766, bacek++)
r27874 | pmichaud++ | * Patch courtesy Vasily Chekalkin [email@hidden.address]
14:03 sscaffidi joined
pugs_svnbot r20565 | moritz++ | [spec] last item of an array is @a[*-1], not @[-1] 14:06
rakudo_svn r27875 | pmichaud++ | [rakudo]: 14:08
r27875 | pmichaud++ | * Update README with "make spectest_regression" (RT#54762, moritz++)
r27875 | pmichaud++ | * Patch courtesy Moritz Lenz [email@hidden.address]
14:09 chris2 joined
rakudo_svn r27876 | pmichaud++ | [rakudo]: 14:12
r27876 | pmichaud++ | * Add 'pop' function. (RT#54746, bacek++)
r27876 | pmichaud++ | * Patch courtesy Vasily Chekalkin [email@hidden.address]
14:18 cjfields joined 14:19 jrockway left, TJCRI joined
pugs_svnbot r20566 | moritz++ | [spec] more @a[-1] -> @a[*-1] transition 14:21
cjfields rakudo: my $str = 'AAGGAGTGACTCAAAA'; my $str2 = $str.trans('wsatugcyrkmbdhvnATUGCYRKMBDHVN' => 'WSTAACGRYMKVHDBNTAACGRYMKVHDBN'); $str.say; $str2.say; 14:22
exp_evalbot rakudo r27876 OUTPUT[too few arguments passed (2) - 3 params expected␤current instr.: '_block11' pc -340181811 ((unknown file):-1)␤
14:22 jrockway joined
cjfields pugs: my $str = 'AAGGAGTGACTCAAAA'; my $str2 = $str.trans('wsatugcyrkmbdhvnATUGCYRKMBDHVN' => 'WSTAACGRYMKVHDBNTAACGRYMKVHDBN'); $str.say; $str2.say; 14:23
exp_evalbot OUTPUT[AAGGAGTGACTCAAAA␤TTCCTCACTGAGTTTT␤]
14:23 iblechbot left
moritz_ what's Str.trans ? 14:23
cjfields transliteration
moritz_ ah, tr///
cjfields S05? 14:24
moritz_ S29 perhaps?
cjfields feather.perl6.nl/syn/S05.html#Transliteration
lambdabot Title: S05
rakudo_svn r27877 | pmichaud++ | [rakudo]:
r27877 | pmichaud++ | * Add refactored implementation of 'map' (RT#54742, bacek++)
r27877 | pmichaud++ | * Patch courtesy Vasily Chekalkin [email@hidden.address]
cjfields rakudo doesn't have trans() implemented correctly 14:25
14:26 iblechbot joined
moritz_ cjfields: is t/spec/S05-transliteration/trans.t correct? 14:26
cjfields checking the transliteration tests... 14:27
moritz_: It appears so. I think my example is wrong (supposed to pass a Pair, at least) 14:30
moritz_ cjfields: there's no contradiction in both being wrong, rakudo doesn't parse the test yet 14:31
cjfields Right, but the method is implemented in rakudo (I think in String) 14:32
cjfields digging through...
yep, in src/pmc/string.pmc, there is a trans() method 14:33
'Translate ascii string src with entries from trans_table' 14:34
I'll ask on #parrot, maybe they would know... 14:36
moritz_ cjfields: I'm trying to get that test working in rakudo 14:37
cjfields k 14:38
14:39 polettix joined 14:43 penk left 14:49 rdice joined
moritz_ S03-operators seems to be a fairly braindead name since all of S03 is about operators 14:52
rakudo_svn r27879 | pmichaud++ | [rakudo]: 14:53
r27879 | pmichaud++ | * Fix "()" (and "[]") to return an empty list.
r27879 | pmichaud++ | * Reported by bacek++, moritz++ .
Juerd moritz_: SEO ;)
moritz_ Juerd: ? 14:54
14:55 alanhaggai_ joined
Juerd moritz_: Search Engine Optimization. A horrible buzzword often mentioned by my clients :( 14:55
moritz_ Juerd: ah *that* SEO - I don't think we need that for Perl 6 ;-)
Juerd And after I refuse to do more than just making their website sane, they find someone else and pay ridiculous amounts for something that probably doesn't work at all, and if it works, will stop working in a few months. 14:56
In the mean time my own sites, having plain HTML and very few images, keep scoring well.
Where "score" is rank. 14:57
moritz_ most of all you need to have good content (and sane techniques), then the rest comes all by itself 14:58
fullermd But who wants to waste time creating content? We just want more people coming to the site! 14:59
avar I once sent a danish embedded router company a job application and as "my first test" they demanded I increase their google rating.
15:03 alanhaggai left
rakudo_svn r27880 | pmichaud++ | [rakudo]: 15:17
r27880 | pmichaud++ | * Add 'iterator' method to List.
r27880 | pmichaud++ | * Fix 'perl' method to be a lot cleaner and simpler.
15:20 alanhaggai_ left
rakudo_svn r27881 | pmichaud++ | [rakudo]: 15:26
r27881 | pmichaud++ | * Fix List.perl() method.
15:32 cmarcelo left 15:33 lambdabot left 15:34 lambdabot joined, alanhaggai joined
moritz_ this is revision 20567 codename "it even works" 15:36
pugs_svnbot r20567 | moritz++ | [irclog] link parrot's RT numbers 15:37
15:38 kst` joined 15:50 rindolf left, armagad_ joined 15:51 kst left 15:52 elmex left 15:57 meppl left
pugs_svnbot r20568 | moritz++ | [irclog] make #perl6 link to its logs in the logs 16:01
r20568 | moritz++ | (mostly useful for cross-references between #perl6 and #parrot)
moritz_ [particle]++ for suggesting
16:03 nothingmuch left, nothingmuch joined 16:04 alc left 16:09 pbuetow joined
moritz_ wonders if he should exclude join messages from the logs 16:09
since leaves/ping timeouts/etc. aren't in, they are of limited usefulness anyway 16:10
would anybody miss them?
16:11 justatheory joined
diakopter moritz_: I see leaves in the logs 16:13
moritz_ diakopter: I know, but not all of them are recorded
diakopter: actually only /leave's but no timeouts (which are much more common), no kicks 16:14
16:15 chris2 left 16:17 braceta joined
rakudo_svn r27884 | particle++ | [rakudo] rename t/passing_spec to t/spectest_regression.data 16:18
r27884 | particle++ | ~ update makefile template to match
r27885 | particle++ | [rakudo] add more passing tests to spectest_regression 16:25
r27885 | particle++ | Courtesy of Moritz Lenz (moritz++)
r27887 | particle++ | [rakudo] 16:33
r27887 | particle++ | this ugly piece of perl 5 code runs 'make spectest' and looks
r27887 | particle++ | for passing test files that are not yet included in the
r27887 | particle++ | 'spectest_regression' target. The output is an evil mess, but still useful.
r27887 | particle++ |
r27887 | particle++ | ~ not cross-platform
r27887 | particle++ | ~ needs to be generalized
r27887 | particle++ | ~ patches welcome
r27887 | particle++ | Courtesy of Moritz Lenz (moritz++)
16:37 ludan left
avar w 9 16:47
16:51 sscaffidi is now known as Hercynium, Psyche^ joined 16:52 nipotaway is now known as nipotan, Hercynium is now known as hercynium 16:53 hercynium is now known as sscaffidi
Auzon moritz_: It's nice to see when I join/part so I can see what messages I missed 16:54
moritz_ Auzon: ok, I'll leave it in then 16:55
16:59 alanhaggai_ joined 17:02 [particle1 joined 17:03 Patterner left, Psyche^ is now known as Patterner 17:06 sscaffidi is now known as hercynium
hercynium being lazy, I have to ask - where would I find the logs for this channel? 17:06
17:06 alanhaggai left
Auzon It's in the topic. 17:06
hercynium ach - yeah
Auzon irc.pugscode.org/
lambdabot Title: IRC log for #perl6, 2008-05-28
TimToady diakopter: btw, to actually answer your earlier question, I don't think every Perl 6 executable has to recognize Perl 5; only those implementations that are intended to be reachable from /usr/bin/perl, really 17:07
hercynium yeah - I'm using Xchat-GNOME and the silly thing hides the end of the topic if it exceeds the window size
thx, Auzon and lambdabot 17:08
at least my ignorance is recorded for posterity ;)
TimToady some of us prefer our ignorance to be writ large :) 17:10
moritz_ TimToady: that's why you published perl 1, right? ;-)
TimToady indeed...
moritz_ actually I never ran wrote perl 1 code, so I can't really say ;) 17:11
obra TimToady: this reminds me of schwern's original Class::DBI talk: Class::DBI - A Collection of Solved Problems or a Triumph of Multiple Inheritance
TimToady well, it's really easy to solve one problem while creating a different problem :) 17:14
obra grins
obra wonders what new problems he's created today
TimToady for the last eight years I've been doing Studies in Unimplementability :)
obra grins. It looks like the implementors are starting to catch up with you, though. Or they're just wearing you down. 17:16
TimToady with an emphasis in Emergent Properties of Complex Systems
17:16 [particle] left
[particle1 sounds like a doctoral thesis 17:22
17:22 [particle1 is now known as [particle]
[particle] ...or the subtitle for the next state of the onion 17:23
remember, it doesn't matter how you get there, if you don't know where you're going. 17:27
hercynium particle, now *that* sounds like a good subtitle 17:30
17:36 meppl joined
fullermd I don't know where we're going, but there's no sense being late. 17:40
17:56 FurnaceBoy joined 18:03 cjfields left
ruoso preparing the "Perl 6 is just a SMOP" presentation that will take place at the PPW in Braga, June 6.... 18:05
18:10 pmurias joined 18:12 eternaleye_ joined 18:13 ilogger2 joined 18:18 cjfields joined, cjfields left 18:19 cjfields joined 18:27 cjfields is now known as verklempt 18:28 verklempt is now known as cjfields
pmurias ruoso: will you be at yapc::europe? 18:34
ruoso probably not...
moritz_ ruoso: can you show us the slides when you're done? 18:35
ruoso I was trying to upload it before it's finished :)
18:36 tobeya joined
ruoso moritz_, pmurias, people.debian.org/~ruoso/SMOP.pdf 18:39
any input is welcome...
I still have more than a week to make any change...
and it's still not complet
so... please... comment on it... ;)
moritz_ I like the NOTHINGmuch ;-) 18:40
ruoso hehe
moritz_ page 47, shouldn't it be s:1st/high/low/ ? 18:43
ruoso moritz_, yeah... actually... I should rephrase that 18:44
Auzon reads
ruoso "Because we want low-level optimized implementations to behave transparently as if they were high-level objects."
better this way...
Auzon I like the object art
ruoso heh
moritz_ ruoso: I assume you'll add something about MMD methods and implementation? 18:46
ruoso well... I'm afraid of getting too long...
and I still didn't get into SMOP itself
I'm only explaining why SMOP is how it is
[particle] slide 54 should read "Something is what it says it is" 18:48
ruoso [particle], thanks... I was really unsure on how to write that...
[particle] it a good presentation. wish i could be there. 18:49
ruoso the last part will be explaining the basics on the SMOP internals... trying to get some developers ;) 18:51
[particle], thanks
diakopter cpan searching is down? 18:54
rakudo_svn r27889 | particle++ | [rakudo] update comment in makefile template 18:58
19:04 elmex joined
ruoso moritz_, pmurias, [particle], Auzon, I had just uploaded the first finished version... care to take a look? 19:08
Auzon sure.
same URL?
ruoso yes
Auzon I like the "er... without XS" parts :) 19:10
ruoso :) 19:11
moritz_ and mOOOOse part ;)
ruoso: if your audience mostly knows perl, they'll like your small jokes very much ;)
ruoso even better... nothingmuch will be there ;) 19:12
moritz_ hehe
btw use use .^can and .^does, but you don't explain what's the difference
at least not on the slides 19:13
[particle] notices void * in SMOP__* structures
ruoso I'm having an internal conflict on presenting all p6 features and doing the presentation in 40 minutes ;)
[particle] i'd rather they have a type name with some semantic meaning
moritz_ ruoso: I don't expect you to do it all, I just realized it on my second pass ;) 19:14
ruoso [particle], the thing is that each low-level implementation re-defines it as something else...
[particle] ...that's not a slide problem per se...
ruoso [particle], the data structure *really* has a void* there
pmurias ruoso: the ResponerInterface declaration in the right box has 'struct SMOP__Object' 19:15
ruoso pmurias++ thanks...
[particle] i understand, but VIRTUAL_ABSTRACT_T *data; or whatever may express that more clearly
pmurias why?
void* is a generic pointer 19:16
ruoso would VIRTUAL_ABSTRACT_T *data map simply as void*?
pmurias and the field is just that
ruoso or it would define more information?
[particle] yes #define VIRTUAL_ABSTRACT_T void
ruoso that seems reasonable
[particle] just to help us humans understand *why* it's void 19:17
because you're a sloppy coder?
no.
ruoso going home now... I should be back later...
[particle], would you like to patch that in svn directly? please, do it :) 19:18
else I should get to it some time in the future :)
[particle] it may take some time to update pugs, but i can try to beat you :)
ruoso :)... 19:19
bbl
moritz_ #perl6-soc in 10 minutes
Auzon Yes.
moritz_ (that was just a general reminder, not particularly directed at Auzon ;)
Auzon I just wanted to let you know that I'm here and aware of it :) 19:20
moritz_ ok ;)
pmurias a comment what is stored in the data field would be better then giving void a funny name
19:20 schmalbe joined
moritz_ but we can pile buzzwords onto void ;) 19:21
19:23 ron_ joined
pmurias we can name void Top 19:23
ron_ rakudo: sub muddle () { ladle 'n'; } muddle;
exp_evalbot rakudo r27890 OUTPUT[Statement not terminated properly at line 1, near "muddle;"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
pmichaud need a semi there. 19:24
ron_ rakudo: sub muddle () { ladle 'n'; } ; muddle;
exp_evalbot rakudo r27890 OUTPUT[Could not invoke non-existent sub ladle␤current instr.: 'muddle' pc 61 (EVAL_10:35)␤
ron_ like yesterday core dumps under ubuntu / cygwin - this time "corrupted double-linked list" under ubuntu 19:25
moritz_ ron_: I think the 'perl6' target is still rather unstable, '../../parrot perl6.pbc' works much more reliable 19:26
ron_ ok will work with that for a while - thx 19:27
19:27 sscaffidi joined
moritz_ I just made a small script #!/bin/sh\n../../parrot perl6.pbc "$@" 19:28
that's much more convenient on the command line
19:29 r0bby joined 19:48 ron_ left 19:49 schmalbe left 19:56 braceta joined
rakudo_svn r27891 | pmichaud++ | [rakudo]: 19:59
r27891 | pmichaud++ | * Clean up .unshift, .keys, .values
pmurias TimToady: there is a useless if modifier in Cursor5.pm:677, should i remove it? 20:10
TimToady in what sense is it useless? 20:13
pmurias there is a check for that flag with unless before 20:14
Auzon rakudo: sub fac (Int $n) {my $t = 1; $t *= $n-- while $n}; fac(6);
exp_evalbot rakudo r27891 RESULT[too few arguments passed (0) - 1 params expected␤current instr.: 'fac' pc 94 (EVAL_12:45)␤
pmurias so the code would have returned if it wasn't tru
Auzon rakudo: sub fac (Int $n) {my $t = 1; $t *= $n-- while $n}; my $n = 6; fac($n); 20:15
exp_evalbot rakudo r27891 RESULT[too few arguments passed (0) - 1 params expected␤current instr.: 'fac' pc 109 (EVAL_12:52)␤
Auzon pugs: sub fac (Int $n) {my $t = 1; $t *= $n-- while $n}; my $n = 6; fac($n);
exp_evalbot OUTPUT[*** Can't modify constant item: VRef <Scalar:0xb660de10>␤ at /tmp/62ie3StACB line 1, column 30-41␤]
Auzon pugs: sub fac (Int $n is rw) {my $t = 1; $t *= $n-- while $n}; my $n = 6; fac($n);
exp_evalbot RESULT[undef]
TimToady pmurias: yes, you may remove it
pmurias thanks
Auzon pugs: sub fac (Int $n is rw) {my $t = 1; $t *= $n-- while $n; $t}; my $n = 6; fac($n);
exp_evalbot RESULT[\720]
Auzon pugs: multi sub postfix:<!> (Int $n is rw) {my $t = 1; $t *= $n-- while $n; $t}; say 5!; 20:16
exp_evalbot OUTPUT[*** Can't modify constant item: VInt 5␤ at /tmp/BElVwhLUoL line 1, column 50-61␤]
pmurias should I replace the powers of 2 constants with 'use constant DEBUG_something' ? 20:17
Auzon pugs: say [*] 1 .. 5;
exp_evalbot OUTPUT[120␤]
Auzon pugs: multi sub postfix:<!> (Int $n) {[*] 1 .. $n}; say 5!;
exp_evalbot OUTPUT[120␤]
Auzon perl6: multi sub postfix:<!> (Int $n) {[*] 1 .. $n}; say 5!; 20:19
exp_evalbot kp6 r20568: OUTPUT[error in Block at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Sub.pm line 1457, <> line 1.␤*** Syntax Error in sub 'Main postfix:<!>' near pos=32␤]
..pugs: OUTPUT[120␤]
..rakudo r27891: OUTPUT[Statement not terminated properly at line 1, near ":<!> (Int "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20568: OUTPUT[Parse error in: /tmp/hvhTYy1uK6␤panic at line 1 column 32 (pos 32): Missing right brace␤WHERE: lti sub postfix:<!> (Int $n) {[*] 1 .. $n}; say 5!;␤WHERE: /\<-- HERE␤ STD_red/prelude.rb:98:in `panic'␤ STD_red/std.rb:255:in `_block_rest'␤
..STD_red/std.rb:242:in `block in block'␤ STD_red/prelude.rb:51:in `call...
pmurias TimToady: is the policy on Cursor5.pm, ask before changing or change and be reverted? 20:21
20:22 ruoso joined
TimToady depends on whether your feelings will be hurt by having your changes reverted :) 20:22
seriously, I don't mind either way 20:23
pmurias i should have prefixed the constants question with a TimToady:
TimToady my copy tends to get a little out-of-date with the checked in version at times though
20:23 alester joined
ruoso back 20:24
TimToady pmurias: how long ago?
pmurias 22:16 ;)
ruoso: it might make sense to add a comment the data field explaining what it contains 20:26
pugs_svnbot r20569 | moritz++ | [t] added (mis-spelled) file depcreated-syntax.pod (can't rename it without
r20569 | moritz++ | commiting first, svn--)
ruoso pmurias, data field?
pugs_svnbot r20570 | moritz++ | [t] fixed previous commit (renamed file ;)
pmurias ruoso: in the SMOP__Object and SMOP__Responder 20:29
20:29 avar joined
ruoso pmurias, you mean in the presentation? 20:30
pmurias yes
ruoso but at that level, no one knows what it contains... 20:31
pmurias TimToady: "should I replace the powers of 2 constants with 'use constant DEBUG_something'=>power_of_2 ?"
ruoso: you told be it contains data the responder uses for GC
ruoso in the *default* lowlevel implementation...
20:32 bacek__ joined
ruoso but it's already in a higher-level then smop_base.h 20:32
that's the part that can be replaced
pmurias it might be worth noting it's not the object storage but private place for the RI
ruoso but it might be the object storage 20:33
it's not the case in the default implementation
but it doesn't need to be that way for everything....
the constant identifiers use the void* data as object storage 20:34
pmurias you could mention the objects can actually have additional fields in smop
ruoso yes.. that's an important point... I usually assume people get the inherited struct thing... but it's important to make an explicit comment... 20:35
pmurias it's obvious for C++ codes 20:37
pugs_svnbot r20571 | pmurias++ | removed useless if modifier
pmurias * coders
TimToady pmurias: sorry, phone... 20:38
ruoso TimToady, if you have some time... could you please take a look at the presentation I'm preparing: "Perl 6 is just a SMOP"... people.debian.org/~ruoso/SMOP.pdf 20:41
20:46 cjfields left
Auzon On S13 (Overloading), the Type Casting section mentions treating an object of a class as a routine, array, or hash. What do |$capture and @@slice contain? 20:50
TimToady |$capture is the underlying way that an ordinary argument list is passed as an object without rebinding its components to a signature 20:55
*@@slice is the way ordinary subscripts bind a multidimensional list of lists so as not to flatten the top-level Captures like ordinary list context does 20:56
pmurias TimToady: what should / translate to in a constant name? 20:58
TimToady pmurias: given that Cursor5 will eventually be rewritten into Perl 6, I'm not too terribly worried about making it pretty yet. 20:59
(in fact, the original Cursor.pm was in Perl 6, back when I was trying to get metholate to work under pugs.)
20:59 braceta left
pmurias i'm planning to use Cursor5 in elf 20:59
TimToady in what way? 21:00
pmurias as a basis for a regex engine
TimToady well, that's certainly one of the ways that STD5 uses it... :) 21:01
it would be possible to use the matching part of it without the LTM, though probably pretty slow 21:04
and the linkage to the LTM is pretty complicated, given the LTM has to know how to calculate sets of longest tokens for particular sublanguages in a JIT fashion 21:05
21:05 ispy_ joined
TimToady but I figure that LTM being difficult is the price to pay for making Perl 6 very useful... 21:06
well, one of the prices....
pmurias: you mean like in the name mangling that it does for symbols? 21:07
I think / turns into Slash there
pmurias i wasn't sure how to name DEBUG_trace_call/return 21:08
TimToady no really good solution for that 21:09
just drop the /return is maybe the best
since a call implies a return anyway
pmurias k 21:10
and try_processing_in_STD5.pm?
rakudo_svn r27892 | pmichaud++ | [rakudo]: 21:13
r27892 | pmichaud++ | * More cleanups to .unshift, .shift, .pop, .push
21:14 elmex left 21:15 bacek_ joined
TimToady pmurias: not sure what you're asking... 21:15
21:16 bacek__ left
pmurias TimToady: the other flag name had a dot, replaced it with _dot_ 21:18
pugs_svnbot r20572 | pmurias++ | [Cursor5] added use constant for the DEBUG flag bits (haven't replaced the numbers yet)
pmurias will finish it tomorrow as i'm to tired to do it correctly 21:21
TimToady wanders off for a while... & 21:24
21:25 meppl joined 21:34 Alias_ joined
rakudo_svn r27894 | particle++ | [rakudo] allow specification of local test list 21:35
r27894 | particle++ | ~ 'make localtest' looks for a file named t/localtest.data
r27894 | particle++ | ~ localtest.data contains a list of test files and directories
r27894 | particle++ |
r27894 | particle++ | this allows rakudo developers to specify a list of tests they wish to run locally during development of new features, etc.
r27894 | particle++ | 'make localtest' currently assumes the tests should be fudged. this assumption should be removed.
21:35 bacek__ joined, bacek_ left 21:38 japhb joined
pugs_svnbot r20573 | Auzon++ | [gsoc_spectest] Simplistic S13 (overloading) typecasting tests (long form). 21:38
21:39 aindilis joined
Auzon If someone would be kind enough to look over this test and the spec area, I'd be happy to add the short form versions of these. (perlcabal.org/syn/S13.html#Type_Casting is the URL; smartlink will come soon) 21:39
lambdabot Title: S13
21:40 Psyche^ joined, Psyche^ is now known as Patterner
moritz_ looks fine 21:41
rakudo_svn r27895 | pmichaud++ | [rakudo]: 21:42
r27895 | pmichaud++ | * Remove .ACCEPTS: S03 doesn't show a .ACCEPTS for List, and the one
r27895 | pmichaud++ | we have here is likely bogus anyway.
r27895 | pmichaud++ | * Rewrite .join: Parrot has a 'join' opcode, use it instead of
r27895 | pmichaud++ | looping over repeated concatenations.
r27895 | pmichaud++ | * Rewrite .reverse using iterators. Eventually we'll even make this
r27895 | pmichaud++ | lazy.
Auzon Ok, then I'll copy the file and change the syntax to the short form mentioned. Thanks moritz_++
rakudo: module TypeCastSub {method postcircumfix:<( )> (|$capture) {return 'pretending to be a sub'}}; my $thing = TypeCastSub.new(); say $thing(); 21:45
exp_evalbot rakudo r27895 OUTPUT[Statement not terminated properly at line 1, near ":<( )> (|$"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
Auzon 1) Should I fudge that? 2) Should that be a class instead? 21:46
moritz_ a class, yes 21:47
method outside of classes are illegal
moritz_ should have noticed that
Auzon rakudo: class TypeCastSub {method postcircumfix:<( )> (|$capture) {return 'pretending to be a sub'}}; my $thing = TypeCastSub.new(); say $thing(); # let's see if this is better
exp_evalbot rakudo r27895 OUTPUT[Statement not terminated properly at line 1, near ":<( )> (|$"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
21:47 sscaffidi left
moritz_ Auzon: you can't really fudge that and still have something left for rakudo 21:48
Auzon: so just leave it as is
Auzon Alright.
21:55 bacek__ left
pugs_svnbot r20574 | Auzon++ | [gsoc_spectest] s/module/class/ in typecasting-long.t. Added typecasting-short.t to test the same things but with the shorter syntax form. 21:55
21:56 bacek__ joined
Auzon This is just a copy, using the shorter syntax form. Still testworthy though, and it could probably be expanded to actually do something with the arguments/indexes provided. 21:58
moritz_ aye, but it's fine for a first version 21:59
Auzon++
@karma Auzon 22:00
lambdabot Auzon has a karma of 6
moritz_ lambdabot: you're cheating, aren't you?
perlbot: karma Auzon
perlbot Karma for Auzon: 31
moritz_ that's more likely
seems like lambdabot as stopped recording new karma
[particle] lambdabot-- 22:01
moritz_ Auzon: you could test for a modules that overloads all of the three postcircumfix methods 22:02
s/modules/class
Auzon Hm, yeah, and using the different syntax forms just to make it more interesting.
moritz_ anyway, bed &
Auzon good night, moritz_. 22:03
22:03 elmex joined
pmichaud I have a question on t/spec/S29-arrays/delete.t: nopaste.snit.ch/13095 22:11
for the last two tests, should deleting the element at index 3 shorten the array to have just 2 elements? 22:12
or do we shorten the array _only_ if an element being deleted is the very last one? 22:13
(or, I should say, only to the position of the last explicitly deleted element, even if earlier items were deleted) 22:14
22:15 bacek_ joined
Auzon looks -- not in the middle of anything 22:15
22:16 bacek__ left
pmichaud in particular, what is the result of 22:17
my @array; @array[9] = 'foo'; @array.delete(9); say +@array;
Auzon I believe that it's only shortened if the deleted elements at the end (assuming no shape()).
pmichaud pugs: my @array; @array[9] = 'foo'; @array.delete(9); say +@array;
exp_evalbot OUTPUT[9␤]
pmichaud fwiw, Perl 5 disagrees. :-)
$ cat x 22:18
my @array; $array[9] = 'foo'; delete $array[9]; print 0+@array, "\n";
$ perl x
0
Auzon You can delete on arrays?
in Perl 5, that is. 22:19
pmichaud sure, that's the standard mechanism for removing elements from an array.
perldoc -f delete:
delete EXPR
Given an expression that specifies a hash element, array ele‐
ment, hash slice, or array slice, deletes the specified ele‐
ment(s) from the hash or array. In the case of an array, if
the array elements happen to be at the end, the size of the
array will shrink to the highest element that tests true for
exists() (or 0 if no such element exists). 22:20
meppl good night 22:23
Auzon is befuddled 22:28
pmichaud (I think the spectest is wrong.) 22:29
22:29 aindilis left
Auzon Is that recent in p5? 22:30
pmichaud I don't think so. delete from an array has been around since p4, I think.
pmichaud grabs his pink camel.
22:31 meppl left
Auzon I guess no one uses it because of pop(), splice(), and undef $array[$i] 22:31
pmichaud okay, it's not in the pink camel.
well, undef does something different.
delete from an array was in Perl 5.6 22:33
(according to my 3rd edition camel)
22:40 cjfields joined 22:41 cjfields left
rakudo_svn r27896 | pmichaud++ | [rakudo]: More List revisions 22:51
r27896 | pmichaud++ | * Rework .kv, .exists, and .delete .
r27896 | pmichaud++ | * The changes to .delete cause t/spec/S29-array/delete.t to fail,
r27896 | pmichaud++ | but I think the spectest is wrong and this implementation is correct.
wknight8111 wow, rakudo_svn gives away that karma like candy 22:53
pmichaud no kidding! 22:55
I think I'll make longer commit messages from now on :-)
Auzon I think any multiline commit does this 22:56
Testing S29 will be fun next week. :) 22:58
22:59 ruoso left 23:12 cognominal_ joined 23:17 justatheory joined 23:19 cognominal_ left
pmichaud pugs: my @a = [1,2,3]; say @a.perl; 23:22
exp_evalbot OUTPUT[[[1, 2, 3],]␤]
pmichaud my @a = 1,2,3; say @a.perl;
pugs: my @a = 1,2,3; say @a.perl;
exp_evalbot OUTPUT[[1, 2, 3]␤]
pmichaud pugs: my @a = 1..3; say @a.perl;
exp_evalbot OUTPUT[[1, 2, 3]␤]
pmichaud pugs: my @a = 1..3; my @b = @a; say @b.perl; 23:23
exp_evalbot OUTPUT[[1, 2, 3]␤]
pmichaud my @a = 1..3; my @b = @a, @a; say @b.perl; 23:24
pugs: my @a = 1..3; my @b = @a, @a; say @b.perl;
exp_evalbot OUTPUT[[1, 2, 3, 1, 2, 3]␤]
pmichaud my @a = 1..3; say @a.WHAT;
pugs: my @a = 1..3; say @a.WHAT;
exp_evalbot OUTPUT[Array␤]
pmichaud say [1,2,3].WHAT;
pugs: say [1,2,3].WHAT;
exp_evalbot OUTPUT[Array␤]
pmichaud (sorry for the non-pugs: spam)
spinclad ruoso++ NOTHINGmuch++ 23:25
pmichaud okay, I'm a bit confused. What is it that allows @b to flatten but prevents [1,2,3] from flattening? 23:26
(I understand that this is the way it's supposed to work -- I'm wondering what the compiler looks for to distinguish the two.) 23:27
23:29 cjfields joined
pmichaud is it that [1,2,3] is actually a scalar? 23:30
okay, that makes sense to me. 23:35
thanks, empty channel. :-)
23:40 aindilis joined
Tene pmichaud: the [] 23:42
@b is the same as 1, 2, 3 without []
lambdabot Maybe you meant: b52s babel bf botsnack brain bug . ? @ v
pmichaud yes, but both @b and [] are "Array" 23:43
Tene Hm.
pmichaud but (I think) the answer is that [] is a Scalar containing an Array, while @b is an Array.
Tene Yeah, that sounds right. 23:44
pmichaud so, @b flattens, but [] doesn't (because a Scalar in list context becomes a list containing the scalar)
spinclad ruoso: re void*: parameterize it: struct SMOP__Object<T> { struct SMOP_ResponderInterface *ri; T data; } :) 23:51
[particle] if only! 23:52
23:56 bacek__ joined 23:57 cjfields left 23:58 bacek_ left 23:59 bacek joined