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.
ruoso @tell pmurias I think I know how to solve the issue, we could make p6opaque intercept the FETCH calls based on some attribute that could be set in some special cases, like a specific role or something... 00:58
lambdabot Consider it noted.
pmichaud slavik: <blah>? means that any captured value goes into an array, yes. 02:16
slavik pmichaud: right, but if I do <blah> then $/<blah> will hold it, not $/<blah>[0] like it is with <blah>? 02:26
IMO, since <blah> is said to be optional with '?' why should it go into an array?
pmichaud that's what the spec says 02:27
slavik also, I am having trouble with assertions ...
I see
pmichaud but it's really that <blah>? is the same as <blah> ** 0..1
i.e., it's a quantifier, and all quantified captures become an array
slavik ahh, I see, makes sense now
token port { (\d ** 1..5) <?{1 <= $0 < 2**16}> } 02:28
does that make sense?
rakudo tells me that the line is not terminated properly 02:30
rakudo: token port { (\d ** 1..5) <?{1 <= $0 < 2**16}> }
p6eval rakudo 32683: OUTPUT[Statement not terminated properly at line 1, near "?{1 <= $0 "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
slavik also, I forget how to put a character into a token that should not be captured ... 02:31
<.':'> ???
so then * and + become ** 0..inf and ** 1..inf respectively? 02:35
meppl good night 04:10
slavik rakudo: version 04:33
p6eval rakudo 32684: OUTPUT[Could not find non-existent sub version␤current instr.: '_block11' pc 23 (EVAL_12:14)␤]
slavik rakudo: version
p6eval rakudo 32684: OUTPUT[Could not find non-existent sub version␤current instr.: '_block11' pc 23 (EVAL_12:14)␤]
slavik rakudo: say "hello" if <?{ 1 == 1}>;
p6eval rakudo 32684: OUTPUT[hello␤]
slavik rakudo: say "hello" if <?{ 1 == 2}>; 04:34
p6eval rakudo 32684: OUTPUT[hello␤]
slavik @tell pmichaud I think assertions are broken :( 05:35
lambdabot Consider it noted.
pmichaud @tell slavik code assertions aren't implemented in rakudo yet. 05:45
lambdabot Consider it noted.
pmurias slavik: where is <?{ ... }> specced? 12:20
lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
pmurias ruoso: why do we need to call a FETCH on the yet unbuild protoobject? 12:22
masak is terribly fond of the `for @array.kv -> $index, $elem { ... }` idiom 12:28
lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
masak azawawi: great, thanks! 12:29
pernod Hi 13:25
Has anyone got time for a question regarding building pugs from the public svn repository?
slavik I used the cabal system 13:26
lambdabot slavik: You have 1 new message. '/msg lambdabot @messages' to read it.
slavik @messages
pernod ok
lambdabot pmichaud said 7h 40m 34s ago: code assertions aren't implemented in rakudo yet.
masak pernod: I also used Cabal. you tried that?
pernod So the plain svn $repository;perl Makefile.pl;make is not the way to go?
Nope.
I'l have a look at cabal then.
pernod It's just that I get an error from svn when I attempt to fetch the repository 13:27
A pugs/v6/smop/m0ld/m0ld.cabal
A pugs/v6/smop/m0ld/m0ld_boilerplate_back
svn: In directory 'pugs/v6/smop/m0ld'
svn: Can't copy 'pugs/v6/smop/m0ld/.svn/tmp/text-base/m0ld.hs.svn-base' to 'pugs/v6/smop/m0ld/.svn/tmp/m0ld.hs.tmp.tmp': No such file or directory
masak pernod: I don't know if making from svn works again. it used to not work, at least.
pernod I saw something on the pugsblog that it should be working, but it was two months ago ...
masak pernod: is that on a fresh checkout?
pernod Yup 13:28
masak or are you updating?
strange...
pernod Indeed!
Things didn't work, so I thought I'd try a fresh checkout.
Unknown-00-1f-5b-d9-84-7d:dev pernod$ rm -rf pugs/
Unknown-00-1f-5b-d9-84-7d:dev pernod$ svn co svn.pugscode.org/pugs/ pugs
lambdabot Title: pugs - Revision 23028: /
masak I'm stumped. maybe the smop devs pmurias and ruoso know what's going on.
pernod ok 13:29
pmurias pernod: that's definitely a svn bug 13:31
pernod Ok.
I just used the default command line svn in Mac OS X.
I'll see if updating svn helps.
Thanks!
pmurias pernod: usually svn screws up the .svn dir and prints stupid error messages, but a problem with a fresh checkout is strange 13:34
masak and concerning.
pernod Hm. 14:07
I tried cabal
Building Pugs-6.2.13.12...
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
cabal: Error: some packages failed to install:
Pugs-6.2.13.12 failed during the building phase. The exception was:
exit: ExitFailure 1
I have a bad aura, apparently.
slavik you said it, not us
pernod :) 14:09
pmurias pernod: try rm -fr ~/pugs/v6/ 14:15
pernod I'm still struggling with updating the command line svn client on my Mac. 14:16
Let me get back to you pmurias, and thank you for your suggestion. 14:17
pmurias pernod: you shouldn't thank me just yet my suggestions are most likely bogus 14:19
;)
pernod pmurias: shotgun debugging for the win! 14:20
slavik my suggestion is to dump OSX and use a real OS :P 14:21
masak oh come on -- OS bashing is so 2002. we bash each other's web browsers nowadays. 14:24
or virtual machines. 14:25
pernod I like my shiny toy :D 14:27
(May I emphasise the word "toy" here?)
masak yes, we like that word here on #perl6 :) 14:27
pernod Good stuff. 14:28
pernod is waiting for svn-1.5.4 to build from source
lizsac is waiting for service pack 2 to install 14:30
pmurias pernod: re "shotgun debugging" - did it work? 14:31
pernod pmurias: I'm still waiting for my subversion client to be up to date. 14:32
ruoso pmurias, Perl 6 code uses FETCH all over the way... including while building the object...
pmurias ruoso: hi
ruoso pmurias, hi
pernod The default svn on os x is 1.4.4, so I thought I'd get the latest subversion before anything else. 14:33
pmurias ruoso: if we make sure the object is always in a container it should work
ruoso pmurias, it ends up being by itself at some point... 14:34
I think intercepting FETCH calls in p6opaque might be sane
we just need to find a way to discover when to intercept and when not to intercept 14:35
pmurias which is where the insanity creeps in
ruoso maybe we simply have a switch 14:36
and it by defaults intercepts the FETCH
pmurias ruoso: have you seen my latest change having is rw instead of is copy as the default?
ruoso it doesn't solve the problem
because it ends up being by itself at some other point 14:37
pmurias not nessesarly
ruoso well, I tried that path, and it always got there at some point
pmurias if we put it in a scalar using VAR($foo).STORE(...)
ruoso pmurias, I have to leave now (lunch), and might not get back today, so feel free to try that 14:38
but I should warn that I don't see a very near exit... 14:39
ruoso later &
pernod pmurias: Tried to delete /v6 and then do a svn up. 14:42
Still fails
svn: In directory 'v6/smop/m0ld' 14:43
svn: Can't open file 'v6/smop/m0ld/.svn/tmp/text-base/m0ld.hs.svn-base': No such file or directory
masak pernod: which URL are you checking out from, by the way? 14:45
pernod masak: svn.pugscode.org/pugs
lambdabot Title: pugs - Revision 23028: /
masak ok. that's where I get my stuff, too. 14:46
I updated today, and it worked.
pernod It's my aura then :)
masak I'll try to do a checkout, too, and see if I can reproduce.
pernod Unknown-00-1f-5b-d9-84-7d:pugs pernod$ svn up 14:47
svn: Working copy 'v6/smop/m0ld' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
Unknown-00-1f-5b-d9-84-7d:pugs pernod$ svn cleanup
svn: In directory 'v6/smop/m0ld'
svn: Error processing command 'modify-wcprop' in 'v6/smop/m0ld'
svn: 'v6/smop/m0ld/M0ld.hs' is not under version control
masak pernod: out of curiosity, what do you intend to do with Pugs?
pernod: (are you sure you don't want Rakudo instead/too?)
pernod masak: I'll quote Sir Hillary. Because it is there. 14:48
masak pernod: so is Rakudo.
in some cases, even more so.
well worth a look.
[particle] that's always nice to see :)
pernod I used to follow the development in 2005/2006, but got busy with other work. I thought I'd have a look again now.
masak pernod: nope. my svn checkout worked. I'm running svn 1.4.4
pernod: then you should definitely check out Rakudo. 14:49
trust me, I write working software on top of it every day.
pernod Ok.
masak mumbles "for some definition of 'working'..."
perl6: { $^greeting.say }.("OH HAI") 14:53
p6eval pugs: No output (you need to produce output to STDOUT)
..elf 23014: OUTPUT[Parse error in: /tmp/5cVzeXxF8z␤panic at line 1 column 18 (pos 18): Statement not terminated properly␤WHERE: { $^greeting.say }.("OH HAI")␤WHERE: /\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:355:in `eat_terminator'␤ STD_red/std.rb:269:in
..`block...
..rakudo 32707: OUTPUT[OH HAI␤]
masak the elf output is not exactly geared towards being shown by p6eval. 14:55
rakudo_svn r32717 | jonathan++ | [rakudo] First cut of prefix:| for flattening arrays; doesn't work with hashes yet, but should be enough for what mod_parrot needs. 17:40
stas hi all. I try to execute code from the en.wikipedia.org/wiki/Perl_6, exactly example use of class to encapsulate a Cartesian point. When I execute this script I get the error: Attempt to inherit from non-existent parent class 20:32
lambdabot Title: Perl 6 - Wikipedia, the free encyclopedia
slavik the class Point stuff? 20:33
pastebin your code and errors
masak std: my $a; $a .= "A"
stas right
p6eval std 23014: OUTPUT[Use of uninitialized value $file in open at Cursor.pm line 151.␤Use of uninitialized value $file in concatenation (.) or string at Cursor.pm line 151.␤parse failure␤]
masak :(
slavik std?
masak can someone with 5.10 on their box confirm that for me?
slavik 5.10?
masak slavik: STD is the only authority on Perl 6 syntax except for TimToady :) 20:34
slavik I see
and Larry Wall?
see rule #1 :)
masak never heard of him.
slavik wtfbbqkthxbye
masak slavik: (I'm joking. TimToady eqv lwall) 20:35
slavik hmm
masak (or maybe it's =:=)
slavik hmm 20:36
rindolf masak: confirm what?
stas code: $ cat t.pl
#!/home/stas/perl/parrot/languages/perl6/perl6
class Point is rw {
has $.x;
has $.y;
}
rindolf masak: I have 5.10
stas 22.35 stas@stas-laptop ~/temp/perl6
$ ./t.pl
Attempt to inherit from non-existent parent class
current instr.: 'die' pc 12171 (src/gen_builtins.pir:7453)
called from Sub 'trait_auxiliary:is' pc 15784 (src/gen_builtins.pir:9891)
called from Sub '_block13' pc 122 (EVAL_12:47)
called from Sub 'parrot;PCT;HLLCompiler;evalpmc' pc 804 (src/PCT/HLLCompiler.pir:468)
masak rindolf: confirm that the syntax I wrote to STD above is a parsefail. thx.
stas called from Sub 'parrot;PCT;HLLCompiler;compile' pc 434 (src/PCT/HLLCompiler.pir:303)
slavik stas: what are you using? maybe that speci is not there yet ...
stas called from Sub 'parrot;PCT;HLLCompiler;eval' pc 836 (src/PCT/HLLCompiler.pir:493)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1201 (src/PCT/HLLCompiler.pir:667)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1380 (src/PCT/HLLCompiler.pir:756)
called from Sub 'parrot;Perl6;Compiler;main' pc 16062 (perl6.pir:168)
22.36 stas@stas-laptop ~/temp/perl6
slavik pastebin != paste ...
read the topic 20:37
rindolf masak: ah. How do I install STD?
masak stas: it's easier of you nopaste that.
rindolf: it comes with Pugs.
rindolf masak: ah.
masak somewhere under src/perl6
slavik why not just implement the Perl6 grammar with assertions and stuff and you're done :D 20:38
masak rindolf: the README in that directory should get you started
slavik: that's what STD does.
slavik oh, ok
masak welcome to the future :) 20:39
slavik :)
rindolf svn.pugscode.org is donw 20:42
lambdabot Title: pugs - Revision 23028: /
masak rindolf: apparently not :)
rindolf: (try it without the s in https) 20:43
rindolf masak: ah. 20:44
masak rakudo: if "foo" ~~ /foo/ -> $/ { say $/ } 21:06
p6eval rakudo 32732: OUTPUT[Statement not terminated properly at line 1, near "-> $/ { sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
masak that should work, right?
slavik masak: why the pointy block? 21:07
masak slavik: good question.
it's not really needed.
slavik rakudo: say $/ if "foo" ~~ /foo/;
p6eval rakudo 32732: OUTPUT[foo␤]
slavik :)
masak aye :)
simpler.
slavik and I don't think pointy blocks work for if ... do they? 21:08
masak slavik: they do.
so my question still remains. that should work, right?
slavik hmm
no idea
masak anyone with an idea?
can closure parameters be called $/ ? 21:09
slavik rakudo: if "foo" ~~ /foo/ -> $a { say $a; }
p6eval rakudo 32732: OUTPUT[foo␤]
slavik hmm
semicolon? 21:10
rakudo: if "foo" ~~ /foo/ -> $a { say $a }
p6eval rakudo 32732: OUTPUT[foo␤] 21:10
rakudo_svn r32733 | jonathan++ | [rakudo] Fix initialization of attributes of array and hash types (@ and % sigils). Resolves RT#60572.
masak why discriminate $/ ?
slavik rakudo: if "foo" ~~ /foo/ -> $/ { say $/ }
p6eval rakudo 32732: OUTPUT[Statement not terminated properly at line 1, near "-> $/ { sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
slavik hmm, it's a special var?
masak yes, you could say that. 21:11
bacek pugs: my @a=(1,2); my @b=(1,2); say @a === @b; 21:12
p6eval pugs: No output (you need to produce output to STDOUT)
bacek pugs: my @a=(1,2); my @b=(1,2); say (@a === @b); 21:13
p6eval pugs: No output (you need to produce output to STDOUT)
bacek pugs: my @a=(1,2); my @b=(1,2); say (@a === @b); say "bye"
p6eval pugs: No output (you need to produce output to STDOUT)
bacek hmmm
perl6: my @a=(1,2); my @b=(1,2); say (@a === @b); say "bye"
p6eval pugs: No output (you need to produce output to STDOUT)
..rakudo 32732: OUTPUT[0␤bye␤]
..elf 23014: OUTPUT[Can't call method "Str" on an undefined value at ./elf_f line 649.␤ at ./elf_f line 3861␤]
pasteling "stas" at 92.113.128.216 pasted "code & error" (20 lines, 973B) at sial.org/pbot/33230 21:16
masak might I suggest that we add a warning for when a non-sideeffect method in the Prelude is used in void context? like .subst, for example. might catch a few embarrassing errors, like the one I just did. 21:17
s/did/made/
slavik stas: no idea ... try removing rw 21:19
and read the spec 21:20
masak guess he went to read the spec. 21:21
slavik is rw is kind of ambiguous ...
masak slavik: how so?
slavik well, "is rw" is that inheritance or attributes? 21:22
or do classes HAVE to start with a capital letter?
masak neither.
it's a trait
slavik: no, why would they?
slavik meant trait by the work attributes
so, how do you distinguish between the two 21:23
masak slavik: the member variables are called attributes in Perl 6.
slavik err?
masak slavik: class inheritance is only done when declaring the class.
there's no ambiguity.
slavik right
look at the code 21:24
masak looks
slavik it says "class Point is rw { .............. }"
masak ah.
slavik and rakudo thinks that rw is a class, not an attribute type thing
masak well, as long as there's a class called 'rw', then it's no problem :)
slavik so that is indeed not the intended syntax 21:25
the traits have to be rw, correct?
masak depends on what was intended.
slavik: what do you mean, have to?
slavik ie: class Point { has $.x is rw; } 21:26
masak you can have a trait which is not called 'rw'.
slavik: that's legal, but omitting the 'rw' trait is legal, too.
slavik masak: but the point class there, the idea behind the code is to declare it as a C struct (complete read write on everything) 21:27
masak slavik: (note: 'is rw' is called a trait, '$.x' is called an attribute in Perl 6)
slavik right
masak slavik: if that's what was intended, that is indeed not the intended syntax.
slavik masak: exactly
masak rakudo: my $a = " foo "; $a .= subst( / ^ \s+ /, '' ) 21:28
p6eval rakudo 32733: RESULT["foo "]
slavik ok, I am off
masak slavik: see you.
slavik .= ??? 21:29
oh, nvm
masak slavik: read the spec. :)
slavik ha! neat!
masak the above code throws a 'no applicable methods' on my box
maybe I need to do a clean checkout.
slavik rakudo: say "25" + 5 21:30
p6eval rakudo 32733: OUTPUT[30␤]
slavik rakudo: say "helloworld25" + 5
p6eval rakudo 32733: OUTPUT[5␤]
masak still the same old Perl.
slavik yeah 21:31
rakudo: say "helloworld25" ~ 5
p6eval rakudo 32733: OUTPUT[helloworld255␤]
masak rakudo: my $file = 'picture238.jpg'; $file++; say $file
p6eval rakudo 32733: OUTPUT[picture239.jpg␤]
masak :)
masak oh, and that last one by slavik++ is a bug too, right? :) 21:32
oh, nvm
masak needs to squint to see the difference between ~ and - at this font size
masak dang! I still get 'no applicable methods', even after doing a clean checkout. 21:40
could someone else test this locally on r32733? 21:41
ok, nvm. false alarm :/ 21:45
masak exhales 21:46