pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:01 wknight8111 joined 00:07 alester left 00:11 BinGOs_ left, BinGOs joined 00:17 BinGOs left 00:27 BinGOs_ joined 00:30 ab5tract left 00:32 BinGOs__ joined 00:46 BinGOs_ left 00:47 elmex left 01:16 Limbic_Region left
rakudo_svn r31139 | tene++ | [rakudo] 01:16
r31139 | tene++ | Replace another instance of :inline with :pirop('newclosure').
01:20 Ehtyar joined 01:27 kanru joined 01:55 charsbar joined, charsbar_ left 02:00 ab5tract joined 02:06 wknight8111 is now known as wknight-away 02:33 wknight-away left 02:36 alester joined 02:45 Auzon1 joined, Auzon left 02:47 meppuru joined, xiaoyafeng left 03:03 xiaoyafeng joined 03:04 meppl left
meppuru good night 03:11
03:14 meppuru left 03:22 xuser left 03:34 |jedai| joined 03:36 Jedai left 03:38 xuser joined 03:43 kst` joined 03:44 sail0r joined, sail0r left 03:48 sri_work left 04:16 Bzek joined 04:18 xiaoyafeng left
s1n @tell pmichaud i have something i need help testing, i have monday night free to finish this patch 04:24
lambdabot Consider it noted.
04:31 charsbar_ joined, charsbar left 04:40 kst` left, kst`` joined 04:59 ashizawa joined 05:07 BinGOs joined 05:11 BinGOs__ left 05:16 Psyche^ joined 05:18 Psyche^ is now known as Patterner 05:32 luqui joined 05:44 _jedai_ joined 05:46 |jedai| left 06:15 luqui left 06:31 ab5tract left 06:33 jferrero joined 07:00 mberends joined 07:10 alester left 07:11 missingthepoint joined 07:12 pmurias joined 07:15 cosimo joined
pmurias ruoso: is there anything you are blocking on that i should work on or is the direction i'm pushing smop in ok? 07:16
07:18 Myoma left 07:31 iblechbot joined 07:35 charsbar_ left, charsbar joined 07:52 cosimo left 07:54 Myoma joined 08:03 pmurias_ joined, pmurias_ left 08:04 pmurias_ joined, pmurias_ left, pmurias left, pmurias_ joined
pmurias_ ruoso: i'm switching to method postcircumfix:<( )> (|$capture) {...} as method postcircumfix:<( )> ($capture) {...} leads to an awkward emitter/emitted code and is spec contradicting 08:05
08:11 charsbar left, charsbar_ joined 08:21 hanekomu joined 08:24 charsbar_ left, charsbar joined 08:26 agentzh joined 08:29 drbean joined 08:32 kane_ joined 08:35 schmalbe joined
pugs_svn r22250 | bpetering++ | Test commit bit: add self to AUTHORS 08:37
moritz_ missingthepoint++ # first commit
missingthepoint :) 08:39
moritz_: what's the state of IO in pugs and parrot? 08:41
i want a way to compare the C and perl6 versions of the code
moritz_ missingthepoint: both support reading of files and from STDIN, with various degrees for brokenness
missingthepoint was thinking of creating of file of rand() output
moritz_ in rakudo slurp($filename) works 08:42
missingthepoint should new tests be targeted to parrot? 08:43
err, s/parrot/rakudo/
pmurias_ there should be targeted at a Perl 6 implementation in general
moritz_ they should be implementation independant
but it doesn't hurt to make them as simple as possible, so that many implementations can run them 08:44
slurp($filename) works in both pugs and rakudo
pmurias_ and elf
missingthepoint ah, cool :)
i'll play around with that then 08:45
cheer, pmurias
*cheers
(can't type, need caffeine)
pmurias_ missingthepoint: cheers 08:46
missingthepoint moritz_: well, i have it compiling 08:52
i think i'll test against the C code before i commit...
but once it's committed, would you mind having a glance and pointing out any ways the perl6 could be written better? 08:53
moritz_ sure
will do 08:54
moritz_ monitors nearly all commits to t/ anyway
missingthepoint thanks heaps, moritz 08:55
you've made it a lot easier to get started
moritz_ plans to publish an article in "The Perl Review" about getting involved with the test suite 08:56
hope that it brings us some more volunteers
pugs_svn r22251 | pmurias++ | [smop/pugs] 08:59
r22251 | pmurias++ | switched to method postcircumfix:<( )> (|$capture) {...}
r22251 | pmurias++ | interpreter dies on an unknown method
r22251 | pmurias++ | pugs emits correct m0ld for $*OUT.print("1..1\nok 1\n")
08:59 drbean left
pmurias_ moritz_: the test suit seems easiest for new people to get involved in 09:00
09:00 drbean joined
missingthepoint moritz_: soon, like the Fall 2008 issue? 09:00
moritz_ pmurias_: Aye, you don't need to know about compiler construction
missingthepoint: I hope so
missingthepoint moritz_: cool... if you have a draft i could give you feedback from a newbie's perspective :) 09:02
moritz_ missingthepoint: It will be based on www.perlmonks.org/?node_id=690945 and on t/HOWTO 09:03
lambdabot Title: Getting Involved with Perl 6 - an Update
pmurias_ moritz_: i don't think you need to know much about compiler construction for any other Perl 6 stuff
moritz_ missingthepoint: and I'll give you a draft as soon as it's in a readable state
pmurias_: probably not, but hacking on a *compiler* is a scary thought for many people
missingthepoint i second that, the test suite is a lot less intimidating from where i'm standing 09:04
moritz_ because a compiler is a huge, complex beast, and you have to be a computer scientist to understand it etc </FUD>
pugs_svn r22252 | pmurias++ | [smop] added missing file 09:05
missingthepoint i know :) 09:06
(that that's FUD) 09:07
but the test suite seemed like a logical place to start for me
moritz_ another point is that for most compiler hacking you need to know a few more languages, not just Perl 6 09:08
missingthepoint yep
pmurias_ moritz_: you can learn them as you go ;)
moritz_ pmurias_: sure you can, but it's easier if you don't have to ;) 09:09
missingthepoint moritz_: i'm happy to give feedback, if that would be helpful
moritz_: i actually ++'d that node today :)
moritz_ missingthepoint: it would. I just need a few hours to come up with the draft (and do other $stuff for real life) 09:10
09:11 Ontolog joined
Ontolog my $inFile = shift or die $usage; doesn't evaluate in perl 6? 09:11
what is the idiom now?
moritz_ @*ARGS.shift 09:12
lambdabot Unknown command, try @list
moritz_ shift doesn't default to @ARGV/@_ anymore
pmurias_ \/\/ die
// die
moritz_ aye
pmurias_ moritz_: although on the fly learning works better with haskell than C because you remain reasonable productive instead of cursing segfaults and memeory leaks 09:13
moritz_ pmurias_: instead you just curse failed type checks ;)
pmurias_ most of the failed type checks error messages don't make any sense at all they are just you have a bug indicators 09:15
Ontolog what doe shift default to now? 09:16
moritz_ yes, but they are still frustrating when you try to get something to run
Ontolog: there's now default
s/now/no/
a bare shift; never does something useful in Perl 6
Ontolog why? 09:17
did they take away default for everything or only shift?
moritz_ everything 09:18
most perl 5 builtins default to $_
which you can now obtain with a leading dot
so .say is the same as $_.say
Ontolog i see...
and .shift?
is @_.shift?
or @ARGS.shift?
moritz_ $_.shift
Ontolog and what is the * ?
moritz_ it means "global variable" 09:19
Ontolog i see
moritz_ perlgeek.de/blog-en/perl-5-to-6/15-twigils.html
lambdabot Title: blog | Perlgeek.de Blog :: Twigils
pmurias_ walk&
Ontolog ....twigils 09:25
sillyness!!
pugs_svn r22253 | moritz++ | [t/TASKS] we need to test the builtins from S29 with named arguments 09:31
Ontolog is there a list of primitive functions anywhere? 09:37
09:38 zamolxes joined
moritz_ S29 comes closest: perlcabal.org/syn/S29.htmh 09:38
erm, perlcabal.org/syn/S29.html
lambdabot Title: S29
Ontolog like, is there an "open" function anywhere? 09:40
I want to open a file and start reading from it 09:41
moritz_ Ontolog: yes, there's open($filename)
Ontolog: it should be documented in S16
Ontolog i see thanks
moritz_ (btw if you go at irc.pugscode.org all these S16 and stuff is turned into links) 09:42
Ontolog thanks 09:47
Why does while $in.readline { say $_; } not work?
I mean, why is $_ not set?
if I do $in.readline -> $line it works 09:48
but the default doesn't
moritz_ that's not the Perl 6 way of doing it 09:49
there's not implicit assignment to $_ anymore
Ontolog oh not at all??
jeez
moritz_ you'd use for =$in { .say }
Ontolog i see.. :P
09:56 braceta joined
moritz_ std: .say for =$in unless $foo; 10:06
p6eval std 22253: OUTPUT[cp: cannot create regular file `lex/STD/EXPR': Permission deniedā¤parse failureā¤]
moritz_ ouch
std: .say for =$in unless $foo; 10:07
p6eval std 22253: OUTPUT[Unknown routines:ā¤ unless called at 1 ā¤parsedā¤] 10:08
10:15 kst`` left, kst``` joined, ashizawa left 10:32 wknight8111 joined 10:39 elmex joined 10:54 meppl joined
moritz_ pugs: my %h=(a=>1, b=>2); my :($a,$b) := %h; say $a 10:57
p6eval pugs: OUTPUT[*** Wrong number of binding parameters: 1 actual, 2 expectedā¤ at /tmp/m1oHE3oAp4 line 1, column 21-38ā¤]
moritz_ pugs: my %h=(a=>1, b=>2); my :($a,$b) := |%h; say $a
p6eval pugs: OUTPUT[*** Wrong number of binding parameters: 1 actual, 2 expectedā¤ at /tmp/avbBs0o5aN line 1, column 21-39ā¤]
moritz_ pugs: my %h=(a=>1, b=>2); my (:$a,:$b) := %h; say $a
p6eval pugs: OUTPUT[*** Wrong number of binding parameters: 1 actual, 2 expectedā¤ at /tmp/EqEMz1YA6h line 1, column 21-39ā¤]
moritz_ pugs: my %h=(a=>1, b=>2); my (:$a,:$b) := |%h; say $a 10:58
p6eval pugs: OUTPUT[*** Wrong number of binding parameters: 1 actual, 2 expectedā¤ at /tmp/IihjUCbMHW line 1, column 21-40ā¤]
moritz_ pugs: my %h=(a=>1, b=>2); my :(:$a,:$b) := |%h; say $a
p6eval pugs: OUTPUT[*** Wrong number of binding parameters: 1 actual, 2 expectedā¤ at /tmp/QJrK9K2RkJ line 1, column 21-41ā¤]
moritz_ pugs: my %h=(a=>1, b=>2); my :(:$a,:$b) := %h; say $a
p6eval pugs: OUTPUT[*** Wrong number of binding parameters: 1 actual, 2 expectedā¤ at /tmp/LI8CH0XliY line 1, column 21-40ā¤]
11:07 ashizawa joined 11:11 smg joined
Ontolog moritz_: so is $_ used at all in Perl 6? 11:45
can I start defining it myself? like for =$in -> $_ { mysub $_ }
11:46 BinGOs left, BinGOs joined
moritz_ oh sorry, 'for' sets it by default 11:47
as does 'given'
but not 'while'
rakudo: .say for 1..3;
p6eval rakudo 31145: OUTPUT[1ā¤2ā¤3ā¤]
Ontolog i see, the . syntax, can I do that with my own subs? .mysub?
it doesn't seem to work 11:48
moritz_ let's try 11:50
rakudo: class A { sub foo { say "yes" }; }; given A.new { .foo };
p6eval rakudo 31145: OUTPUT[Method 'foo' not found for invocant of class 'A'ā¤current instr.: '_block35' pc 286 (EVAL_12:118)ā¤]
moritz_ rakudo: class A { method foo { say "yes" }; }; given A.new { .foo }; 11:51
p6eval rakudo 31145: OUTPUT[yesā¤]
moritz_ Ontolog: it works, if you do it right
Ontolog: just remember that it's actually a method call, not a sub call
Ontolog so you can't do it with subs? 11:52
does perl even have normal subroutines?
*perl6
Myoma normal ?
11:52 BinGOs left
moritz_ yes, it has 11:52
and no, you can't
Ontolog i see
moritz_ rakudo: sub foo { say "it's a sub" }; foo()
p6eval rakudo 31145: OUTPUT[it's a subā¤]
11:56 kst``` left, kst``` joined 12:10 _jedai_ left, _jedai_ joined
Ontolog is larry wall working on any of the implementations? 12:11
moritz_ Ontolog: he's working on STD.pm, the Perl 6 grammmar 12:12
Ontolog i see, where can I get this STD.pm and how do I use it? 12:14
i saw your mention of it on the mailing list there
if I have pugs or rakudo do I already have it? 12:15
moritz_ it's in the pugs repository in src/perl6/
Ontolog i see
moritz_ you need a perl 5.10.0 or later installed in /usr/local/bin/perl ;/
then you can type 'make'
to build it
and perl5.10.0 STD5_dump_match $file
Ontolog i see; already have perl 5.10 under /usr/local 12:16
i'll try to build it
what is the 5 for?
STD5??
shouldn't it be 6? ;)
moritz_ it refers to the Perl 5 translation of STD.pm
Ontolog i see so STD.pm is written in Perl 5? 12:17
hmm i see it's not 12:18
moritz_ no, it's written in Perl 6 12:20
and can automatically be translated to Perl 5
which is what gimmme5 does
Ontolog ahh cool
12:21 BinGOs joined
Ontolog hey man why didn't you major in cs instead of physics? 12:21
moritz_ funny, my girlfriend keeps asking the same ;)
Ontolog haha maybe you can do something with both of them (cs and physics) 12:22
moritz_ basically I didn't want to limit my scope to computers and the world of abstract thoughts
Ontolog i see
moritz_ Ontolog: indeed, in Germany we have to take a second subject, and I took CS
Ontolog would you say your first love is CS or Physics?
moritz_ Ontolog: and starting from mid October I'll be teaching a bit of theoretical physics for beginners 12:23
hard to say... my first love was Lego, then came electronics, then programming
Ontolog haha mine was legos too
moritz_ so probably physics
Ontolog so funny
when i was real young i loved legos 12:24
12:24 zamolxes left
moritz_ build weird stuff with Lego, like combination locks and a machine that winds inductor coils 12:24
Ontolog that's cool, never did anything like that 12:25
moritz_ that was when I was not-so-young-anymore 12:26
perhaps 12 or 13
Ontolog i didn't know you could do that stuff with legos, were they special kits?
moritz_ the combination lock was pure lego 12:27
for the coil winder I used some non-lego stuff as well
12:28 Lorn joined 12:29 wknight8111 left
pasteling "Ontolog" at 121.15.103.0 pasted "make bombs" (8 lines, 286B) at sial.org/pbot/32160 12:30
Ontolog 48 require "STD.pmc"; 12:31
moritz_ Ontolog: look at try5.out
Ontolog: it should contain some debugging information
Ontolog empty
moritz_ runs out of ideas 12:33
you could try to add a line '1;' at the end of STD.pmc
Ontolog haha i noticed STD.pmc is also empty 12:35
what the biff
moritz_ try ./gimme5 STD.pm > STD.pmc 12:36
that should fill STD.pmc
Ontolog that seems to get stuck in an infinite loop 12:42
12:46 meppl left, schmalbe left, agentzh left, Patterner left, xuser left 12:47 Psyche^ joined, Psyche^ is now known as Patterner, Guest16015 joined 12:50 meppl joined, schmalbe joined, agentzh joined, xuser joined, Maghnus joined, cotto_home joined, jiing joined, s1n joined, bennymack-work joined 12:54 r0bby joined 13:02 ispy_ joined 13:04 jferrero left 13:17 zamolxes joined 13:19 braceta left 13:21 apeiron_ joined, masak joined 13:23 Lorn_ joined 13:29 apeiron left 13:36 braceta joined
pmurias_ re 13:41
13:42 Lorn left 13:47 Auzon1 left 13:52 clintongormley joined 13:53 kst``` left, kst``` joined 13:59 justatheory joined 14:02 pmurias_ is now known as pmurias
rakudo_svn r31152 | moritz++ | [rakudo] Mapping.values shouldn't coerce to string, bacek++ 14:04
r31152 | moritz++ | Patch courtesy by Vasily Chekalkin, <bacek at bacek.com>
masak how do I refer to a method on an object in Perl 6? (without calling it) 14:10
moritz_ how would you in perl 5?
either as a string (the method name)...
or a closure
I guess that's what you'd use in Perl 6 as well 14:11
masak I was thinking along the lines of &($obj.method)
14:11 alester joined
moritz_ I thought the same ;) 14:11
but I guess it wouldn't work
14:11 [1]Maghnus joined
masak the string variant would be what, &"\$obj.method" ? 14:12
moritz_ my $x = uc; say "abc".$x() ?
pugs: my $x = uc; say "abc".$x()
p6eval pugs: OUTPUT[*** ā¤ Unexpected "$x"ā¤ expecting "=", context, ":" or "("ā¤ at /tmp/mloepR1hRh line 1, column 4ā¤]
moritz_ uhm 14:13
of course you can say my $x = Classname::method; $x($obj:)
masak rakudo: class A { method x($n) { say $n; say self.WHAT } }; sub y($x) { $x() }; my $a = A.new; y( { $a.x(5) } ) 14:14
p6eval rakudo 31152: OUTPUT[5ā¤Aā¤]
masak this is enough for my purposes, I think
rakudo++
moritz_ erm &Classname::method I menat
*meant
masak rakudo: { nothing }() # :) 14:17
p6eval rakudo 31152: RESULT[Null PMC access in find_method()ā¤current instr.: '_block11' pc 25 (EVAL_13:12)ā¤]
14:17 sri_work joined
moritz_ masak: I don't think that nothing() is specced anymore 14:18
masak oh. it Works on My Machine
my working copy must be old
moritz_: how does one write an empty block nowadays?
rakudo: if 5 {} else { say "Will this work?" } 14:19
p6eval rakudo 31152: RESULT[Null PMC access in find_method()ā¤current instr.: '_block11' pc 25 (EVAL_13:12)ā¤]
moritz_ masak: dunno, I just seem to recall that TimToady removed nothing
masak I remember him removing nothing too
but I think nothing remained in rakudo after that
moritz_ rakudo: unless 5 { say "Will this work?" }
p6eval rakudo 31152: RESULT[5]
masak moritz_: of course one can use unless instead 14:20
but I was thinking more like someone adding and removing lines of code from a block
and suddenly ending up with an empty one
(will a block only containing comments be interpreted as an empty hash, even when it's in the position of an if block?) 14:21
moritz_ masak: the grammer explicitly looks for a block after 'if', so it will not be interpreted as a hash
pmurias rakudo if 5 {;} 14:26
rakudo: if 5 {;}
p6eval rakudo 31153: RESULT[Null PMC access in find_method()ā¤current instr.: '_block11' pc 25 (EVAL_13:12)ā¤]
moritz_ rakudo: if 5 {;}; say "still there" 14:27
p6eval rakudo 31153: OUTPUT[still thereā¤]
moritz_ that's p6eval's oddity to try to squeeze out a value if nothing is printed to stdout
14:28 Maghnus left, [1]Maghnus is now known as Maghnus
pmurias how should i emit Ā¢ from Pugs? 14:30
if i specifi it in a haskell literal it gets mangled 14:31
moritz_ $cent?
7~
oops
14:32 missingthepoint left
masak moritz_: it worries me that p6eval produces errors that aren't really there 14:34
moritz_ masak: hm, we could do some magic... 14:36
masak possibly.
moritz_ masak: right now if it doesn't produce any output, it is wrapped in ((...).perl).print or some such
masak not sure I think that's needed.
better to be consistent.
moritz_ masak: what we could do is it seperate STDOUT and STDERR for that program, and if there's no result on STDOUT then simply say "no output" 14:37
masak: but it's convenient
;)
masak sure, it's convenient.
I'm not going to oppose a feature that people like just because it produces errors I don't like :) 14:38
your idea with separating STDOUT and STDERR sounds intriguing.
if it works, I want it :)
moritz_ if you implement it, it works ;) 14:40
masak speaking of work...
masak is suddenly reminded of his real $work 14:41
moritz_ if not, you have to wait for the undefined future until someone (.oO( who could that be...?)) does it, perhaps
14:43 wknight8111 joined
pugs_svn r22254 | pmurias++ | [smop][pugs] 15:02
r22254 | pmurias++ | pugs generates working m0ld
r22254 | pmurias++ | added a very simple test for that
r22254 | pmurias++ | m0ld also accepts ? as an ascii replacement for ƂĀ¢
masak waits for the undefined future 15:03
pmurias moritz_: you want to evalbot to just die quietly if there are errors in the code
moritz_ pmurias: I don't think that's a good idea 15:13
pmurias moritz_: what was you idea for STDOUT and STDERR about? 15:14
moritz_ pmurias: if the code produces no output, wrap it in ((...).perl).print (as is now), but on that second run only check STDOUT (currently both are checked) 15:16
pmurias: some statements generate errors in some implementations if used as expressions 15:17
15:17 jferrero joined
pmurias i understand, thanks 15:17
perl6: do {say 4}
p6eval elf 22254, pugs, rakudo 31155: OUTPUT[4ā¤]
pmurias perl6: do {1} 15:18
p6eval pugs, rakudo 31155: RESULT[1]
..elf 22254: RESULT[1ā¤]
pmurias moritz_: a "do {...}" might prevent some errors
moritz_ $program = '( ( do { ' . $program . "\n} ).perl ).print"; 15:20
that's what I use now
15:20 wknight8111 left
moritz_ shouldn't be hard to do, just need 10 minutes of straight thinking 15:22
meppl what does the perl()-method do?
moritz_ meppl: roughly the same as Data::Dumper in perl 5, ie it gives you a piece of perl code that constructs the object 15:23
meppl i see 15:24
moritz_ perl6: print [1, 2].perl
p6eval elf 22254: OUTPUT[[1,2]]
..pugs: OUTPUT[\(1, 2)]
..rakudo 31156: OUTPUT[[1, 2]]
15:29 [particle] joined, charsbar left 15:37 Exodist joined
pmurias pmichaud: what's the state of the "This Week in Perl 6" attempt? 15:39
15:39 charsbar joined
pmichaud It didn't happen last night, so probably tonight. 15:39
lambdabot pmichaud: You have 1 new message. '/msg lambdabot @messages' to read it.
pmichaud @messages
lambdabot s1n said 11h 15m 11s ago: i have something i need help testing, i have monday night free to finish this patch
15:43 smg left
pmurias pmichaud: re raports/news how would you like to receive them? 15:43
pmichaud email is probably best, but I'll take them however 15:47
[email@hidden.address] 15:48
pugs_svn r22255 | moritz++ | [t/spec] unfudged a test that bacek++ made work in rakudo 15:49
15:50 hanekomu_ joined 15:52 kst``` left, kst``` joined
moritz_ pmichaud: do you want/need any reports on test suite progress? 15:53
16:07 hanekomu left 16:08 Myoma left 16:10 Myoma joined 16:13 hercynium joined 16:16 kst``` left, kst``` joined 16:22 Ehtyar left 16:27 masak left
pmichaud moritz_: all reports are welcome :-) 16:27
16:28 pht joined
pht quick question - how to declare a constant? i recall it was something like my $foo is constant, but that works not 16:28
moritz_ constant $foo = 3; # iirc 16:29
pugs: constant $x = 3; say $x;
p6eval pugs: OUTPUT[3ā¤]
moritz_ pugs: constant x = 3; say x;
p6eval pugs: OUTPUT[*** ā¤ Unexpected "="ā¤ expecting ":" or "("ā¤ at /tmp/WYUW3ENQvo line 1, column 12ā¤]
moritz_ pugs: constant x := 3; say x;
p6eval pugs: OUTPUT[*** ā¤ Unexpected "="ā¤ expecting "("ā¤ at /tmp/jGXL8YvBwf line 1, column 13ā¤]
moritz_ I think that it should also work, but not sure
pht > constant $str = 'foo'; 16:30
Null PMC access in type()
lambdabot mueval: Prelude.read: no parse
moritz_ pht: I didn't say that rakudo implemented it ;)
pht okay so basically it's not implemented
(in rakudo) 16:31
another q:
moritz_ rakudo: constant $x = 2; say $x;
p6eval rakudo 31156: OUTPUT[scope declarator 'constant' not implemented at line 1, near "= 2; say $"ā¤ā¤current instr.: 'parrot;Perl6;Grammar;Actions;scope_declarator' pc 121995 (src/gen_actions.pir:8516)ā¤]
moritz_ there you go, it even says nicely that it's not implemented ;)
pht > sub a ($x is rw) { say "$x"; }
lambdabot mueval: Prelude.read: no parse
pht > a('sth'); 16:32
lambdabot lexical error in string/character literal at character 't'
pht shouldnt this throw some error ?
moritz_ rakudo: sub a ($x is rw) { say "$x"; }; a('sth');
p6eval rakudo 31156: OUTPUT[sthā¤]
moritz_ pht: why?
16:32 kanru2 joined
pht because i'm feeding a constant into what should be rw 16:32
moritz_ but that's only an error if you actually try to modify it
pht > sub a ($x is rw) { $x ~= 'bah'; say "$x"; } 16:33
lambdabot mueval: Prelude.read: no parse
pht works too
moritz_ rakudo: sub a ($x is rw) { $x ~= 'bah'; say "$x"; }; a('sth');
p6eval rakudo 31156: OUTPUT[sthbahā¤]
moritz_ I guess that's an error 16:34
pht but maybe my first q explains it
(constants not implemented)
16:34 jferrero left
moritz_ no, I think that's a value/container distinction thing 16:34
pht shall i submit somewhere? 16:35
moritz_ rakudo: sub a ($x) { $x = 3; say $x}; a(4)
p6eval rakudo 31156: OUTPUT[Cannot assign to readonly variableā¤current instr.: 'a' pc 166 (EVAL_15:71)ā¤]
moritz_ pht: please do, to [email@hidden.address]
pht can you try it with pugs: (or can I?)
moritz_ you can 16:36
16:37 kst``` left, kst```` joined
pht pugs: sub a ($x is rw) { $x ~= 'bah'; say "$x"; }; a('sth'); 16:37
p6eval pugs: OUTPUT[*** Can't modify constant item: VStr "sth"ā¤ at /tmp/i7WG8BtOn0 line 1, column 20-31ā¤]
pht pugs: sub a ($x is rw) { say "$x"; }; a('sth');
p6eval pugs: OUTPUT[sthā¤]
pht still, it seems weird, because 'is rw' should specifically ban constants. or not? 16:38
moritz_ I think it "claims the variable for writing", which doesn't have to fail
pht rakudo: sub a ($x is rw) { $x += 3; say $x}; a(4); 16:39
p6eval rakudo 31156: OUTPUT[7ā¤]
pmichaud rakudo doesn't yet treat constant values as read-only
moritz_ rakudo autovivifies a container here it seems
pmichaud well, $x is still a container, yes. 16:40
pht pugs: my $str is Str = 'foo';
p6eval pugs: RESULT[\"foo"]
pht rakudo: my $str is Str = 'foo';
p6eval rakudo 31156: RESULT["foo"]
pht seems i have older version ... 'PAST::Compiler can't compile node of type Perl6::Grammar' 16:41
pugs_svn r22256 | moritz++ | [t/spec] removed some obsolete usages of 'is $stuff, undef'
moritz_ pmichaud: mail sent 16:46
pmichaud thanks!
16:47 eternaleye_ joined 16:50 kanru left, kanru2 is now known as kanru 16:55 eternaleye left 17:05 _jedai_ left, _jedai_ joined 17:09 eternaleye_ left 17:13 smg joined 17:22 schmalbe left 17:28 [particle] left 17:29 iblechbot left 17:32 wknight-work joined
wknight-work I would like to get a pugs commit bit, to do some work on the Perl 6 book 17:32
17:33 hanekomu joined 17:34 ruoso joined
TimToady msg me your email and preferred user name 17:35
wknight-work: and I can give you a commit bit
ruoso Hello! 17:36
wknight-work sent 17:37
17:38 zamolxes left
ruoso TimToady, could you please clarify for me how "my @a = @b" at the same time copies the array and preserves lazyness? 17:39
TimToady it's possible that we'll define assignment to be eager by default 17:40
either that 17:41
ruoso so my @a = map { ... }, @b would be eager...
TimToady or we'll define some kind of crossover where it switches from eager to lazy
much like regexes switch from pure dfa-able to nfa-ish
if we go the eager assignment route, then we'd probably make push lazy :) 17:42
but maybe not 17:43
ruoso lazy push is something I doesn't really understand...
pugs_svn r22257 | Whiteknight++ | first edit, adding myself to AUTHORS
wknight-work done! 17:44
Thanks TimToady!
TimToady we have to have some way of adding lazy iterators to the "specs" of an array, if we want lazy arrays 17:45
even if some of the array is already evaluated 17:46
but at the moment I'm actually leaning toward defining some eager/lazy compromise, where we can guarantee that easy things get done eagerly and hard things get done lazily 17:47
for some definition or other
ruoso I was considering that lazy lists are always read only
TimToady p6 arrays have always been lazily extensible 17:48
and arrays are read-write
ruoso I can't think of a use case for lazy write on the array... 17:49
I could think of a composite array that has some fixed values and a lazy iterator as a backend for the other values 17:50
pmurias ruoso: hi
ruoso hi pmurias
TimToady well, what if you want to add another iterator to an existing array?
17:50 hanekomu_ left
ruoso hmmm... I see... like if you could access the iterators of the list individually 17:51
something working on the line of slice context, for instance, that gives you another view on the array 17:52
but one could argue that adding another iterator is 17:53
my @c = (@a, @b)
I was thinking on implementing that in terms of iterators too
TimToady the basic question to me is how push should behave
ruoso it depends on the backend of each list 17:54
some simply doesn't support it
like 'feed's
other can store the value directly, like plain arrays 17:55
pmurias the list is already a wrapper around the iterator so i don't see why it can't support push (not sure if it should) 17:56
ruoso pmurias, it depends...
TimToady maybe if you could tell an iterator what its successor is...
ruoso sometimes it's the iterator that is a wrapper 17:57
sometimes it's the list
the relationship between the list and the iterator is up to them
17:57 braceta left
ruoso for instance... 17:58
a plain array contains the actual values... an iterator to that array will be a simple wrappre
pmurias i understand
17:59 sri_work_ joined
pmurias ruoso: i got pugs to compile $*OUT.print("...") to m0ld, but i need to handle scalar/value destinction to push it farther 18:02
pmichaud eagerly awaits assignment/interpolation clarifications :-) 18:04
pmurias i could either add a FETCH to *everything* now (not nice), or add context to the method call opcode (don't know how to push it into the SMOP_DISPATCH)
pmichaud: you are supposed to be planning a new way of doing context in rakudo? 18:05
pmichaud pmurias: I am? or perhaps I don't understand the question.
pmurias pmichaud: jonathan told me so 18:06
pmichaud I'd need to know the context of the comment, I guess. :-)
pmurias is searching the irc log
irclog.perlgeek.de/parrot/2008-09-13#i_566007 18:07
lambdabot Title: IRC log for #parrot, 2008-09-13
pmichaud oh, &want 18:08
I'm waiting to see how Parrot's calling conventions evolve before I worry too much about &want
ruoso pmurias, FETCH to *everything* is how I planned to do... forward context propagation should avoid unecessary calls
but as an optimization 18:09
18:09 rindolf joined
pmichaud in Parrot a called subroutine can already do some (limited) introspection to figure out what the caller is expecting back, but that interface is undergoing some changes right now in a branch as part of the pdd27mmd branch that allison is working on 18:10
in particular, I think that Parrot's calling conventions are moving almost entirely to a Perl 6-like capture model
pmurias ruoso: what i don't like about FETCHing *everything* is that *everything* needs to be FETCHable
ruoso yes... that's the part of "every value is a scalar of itself"
and "every value is a list with one element that contains itself" 18:11
pmichaud and since the same conventions are used for returning values as for calling a sub, we may end up with significant support built-in to Parrot for key features of want
ruoso I'm trying to avoid "forward context propagation" at this moment, because it would make SMOP much more complex than it is at the moment... 18:12
"late context propagation" makes things much simpler...
every method call can simply return the value, and that's all.. 18:13
pmurias ruoso: why would it make SMOP that much more complex
18:13 _jedai_ left
ruoso because you would have a lot of "if context == foo, then ..., else ..." 18:13
pmurias ?
18:14 eternaleye_ joined, _jedai_ joined
pmurias but now you would have loads of FETCH,postcircumfix:<[ ]>,push,shift.... in every class 18:14
s/class/RI
ruoso pmurias, only in the RIs that need to be used in item context...
or in list context... 18:15
and a value might return a read-only list in list context...
which means, no push, no shift...
18:16 sri_work left
ruoso the basic difference is that SMOP will probably fail with "Can't locate object method push" instead of "Can't push in read-only list" 18:16
pmurias and map and grep...
;) 18:17
ruoso map is no longer a method of list
;)
pmichaud map and grep are methods of Any
pmurias RI's don't do inheritence, maybe they could if they were generated
instead of hand (written|copy-and-pasted) 18:18
ruoso pmurias, now you gave me a very good reason for your RI DSL
pmurias ruoso: the if context == stuff would be only in a few context sensitive places
is there a way of putting context in SMOP_DISPATCH? 18:19
ruoso I was thinking about putting context in the capture 18:20
which would allow us to support multi-resolving-based-on-context on the future 18:21
pmurias visit from a friend&
ruoso but I really would like to stick with 'late context propagation' for now...
18:22 iblechbot joined 18:25 hanekomu left
pmichaud TimToady: STD.pm currently defines all of the terminator:sym<whatever> tokens with <?before 'whatever' Ā» > 18:25
but all of the calls to <terminator> as a subrule are (thus far) also embedded in <?before ...>
seems like we should be able to get rid of one or the other <?before ...> calls 18:26
(my preference would be to see token terminator:sym<foo> defined without the <?before ...> )
although I understand why it makes more sense to have <?before ...> there.
18:44 lisppaste3 joined 18:51 REPLeffect joined
TimToady pmichaud: testing... 18:53
rakudo_svn r31158 | pmichaud++ | [rakudo]: spectest-progress.csv update: 162 files, 3361 passing tests 18:54
pmichaud I can argue it either way, so I definitely defer to your intuition/judgement on that one. it just looked a bit funny to me at first. 18:55
pugs_svn r22258 | lwall++ | [STD] remove redundant befores from terminators per pmichaud++ 18:58
18:59 _jedai_ left 19:00 _jedai_ joined, wknight-work left
cognominal perl6: say m/.../.WHAT 19:09
p6eval pugs: OUTPUT[Regexā¤]
..elf 22258: OUTPUT[Regexpā¤]
..rakudo 31158: OUTPUT[Blockā¤]
TimToady none of those are actually correct, since m/.../ is supposed to run immediately and return a Match object 19:26
pmichaud right -- we were discussing it on #parrot
rakudo doesn't do the immediate match semantics yet 19:27
however, it did bring up a question in my mind, that $x ~~ m/.../ can get a bit tricky on the implementation side
because we want to match against the pattern, and not against the immediate match result
19:27 larsen_ joined 19:28 eternaleye_ left
TimToady okay, I'll think about that some 19:28
19:28 ashizawa left
pmichaud but it also begs the question of how one would do $x ~~ s/foo/bar/; to do a substitution on something other than $_ 19:29
(they're effectively related.)
for now I'm sweeping it under the rug of "smart match sometimes has to be really smart (and ugly)"
TimToady well, we've always said that ~~ has some macro characteristics 19:30
pmichaud correct
TimToady maybe that's just part of it
pmichaud yes, that's the rug I'm using right now :-)
gotta pick up kids, back in 35
19:31 zamanfou joined 19:35 zamolxes joined 19:38 japhb joined 19:46 clintongormley left
pugs_svn r22259 | lwall++ | [t/spec] two simple syntax errors found by STD 19:49
19:52 sri_work_ left 19:56 ispy_1 joined, ispy_1 left, xuser left 19:57 xuser joined, pht left
pmurias TimToady: does putting the context in the capture contractic the spec in any serious way? 19:58
19:59 justatheory_ joined, justatheory left
TimToady pmurias: I don't believe so, but I could be wrong. :) 20:09
20:11 ispy_ left 20:13 hanekomu joined 20:14 zamanfou left 20:23 rindolf left 20:32 wknight8111 joined, ab5tract joined 20:35 zamolxes left 20:40 AzureStone joined
rakudo_svn r31160 | pmichaud++ | [rakudo]: Fix <?before <terminator>> to be <?terminator>. 20:43
20:45 hercynium left 20:46 eternaleye_ joined 20:50 hanekomu_ joined
pmichaud std: $ if 1; 20:52
p6eval std 22259: OUTPUT[parsedā¤]
20:55 jan_ left
ruoso later & 20:58
20:58 ruoso left 21:01 jan_ joined 21:09 hanekomu left 21:10 justatheory_ is now known as justatheory 21:11 AzureStone_ joined
rakudo_svn r31163 | pmichaud++ | [rakudo]: Fix statement modifier after listops (RT #57352, #57334, #57076) 21:11
21:14 mberends left 21:16 AzureStone__ joined 21:25 _jedai_ left 21:26 _jedai_ joined, cognominal left 21:27 AzureStone left 21:28 alester left 21:30 cotto_w0rk joined 21:39 cognominal joined 21:40 pmurias left 21:41 Bzek left 21:55 Limbic_Region joined
pugs_svn r22260 | moritz++ | [t/spec] fixed pick.t, and fudged for rakudo 21:55
rakudo_svn r31165 | moritz++ | [rakudo] add newly fudged pick.t to spectest_regression 22:01
22:11 alester joined 22:20 BinGOs_ joined 22:29 moritz_ joined, _jedai_ left 22:30 _jedai_ joined 22:39 larsen_ left 22:40 BinGOs left 22:44 dduncan joined 22:48 cotto_w3rk joined 23:04 cotto_w0rk left 23:12 hanekomu_ left 23:20 smtms left 23:35 Exodist left 23:49 eternaleye_ left 23:55 Ontolog left