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:02 sri_kraih_ left 00:23 jhorwitz left 00:31 araujo joined 00:48 rhr left 00:49 rhr joined 00:51 iblechbot left 00:56 kisu left 00:57 kisu joined
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.
00:59 rhr_ joined 01:04 [particle] left, rhr left 01:07 AzureStone_ joined, ruoso left 01:26 AzureStone left 01:29 SamB left 01:44 hercynium left 01:45 hercynium joined, bacek__ joined 01:47 bacek_ left 01:57 silug joined 02:06 DemoFreak left
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
02:38 kisu left 02:39 kisu joined 02:43 SamB joined 03:15 cpfr left 03:20 silug left 03:21 meppl left 03:23 meppl joined 03:31 Patterner1 joined 03:35 kisu_ joined, s1n joined 03:39 alc joined 03:41 kisu_ left 03:42 kisu left 03:43 wknight8111 left 03:44 kisu joined 03:47 Patterner left, Patterner1 is now known as Patterner 03:56 kisu left
meppl good night 04:10
04:11 meppl left 04:13 kisu joined 04:14 Chillance left
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␤]
04:38 alester joined 04:43 [particle] joined 04:46 alester left 05:32 alester joined
slavik @tell pmichaud I think assertions are broken :( 05:35
lambdabot Consider it noted.
05:36 slavik left
pmichaud @tell slavik code assertions aren't implemented in rakudo yet. 05:45
lambdabot Consider it noted.
05:48 ewilhelm left, ewilhelm joined 05:55 azawawi left, apeiron left 06:00 justatheory left 06:01 apeiron joined 06:15 kisu left, kisu joined 06:32 iblechbot joined 06:48 nacho left 06:50 iblechbot left 07:26 agentzh left 07:31 xinming left 07:51 kisu left 07:53 kisu joined, tewk_ left, tewk joined 08:10 [particle] left 08:36 ejs joined 08:40 alester left 08:57 sri_kraih joined 09:11 agentzh joined 09:12 abra joined, abra left 09:13 abra joined, abra left 09:23 iblechbot joined 09:27 pmurias joined 09:37 bacek__ left 09:48 smg left 09:50 sri_kraih left 09:51 sri_kraih joined 10:22 ruoso joined, alc left 10:26 pmurias left 10:27 alexn_org joined 10:29 DemoFreak joined 11:05 rindolf joined 11:18 smg joined 11:33 alexn_org left 11:39 masak joined, schmalbe joined 11:48 rindolf left 11:58 xinming joined 12:01 meppl joined 12:20 pmurias joined
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.
12:28 alexn_org joined, alexn_org left 12:29 ejs left, alexn_org joined
masak azawawi: great, thanks! 12:29
13:05 zamolxes left 13:13 kisu_ joined 13:18 pernod joined, kisu left, slavik joined 13:22 [particle] joined
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.
13:26 wknight8111 joined
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.
13:36 [particle] left 13:42 [particle] joined 13:46 alc joined 13:55 rindolf joined
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
14:10 pernod left 14:14 pernod joined
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?)
14:27 kisu__ joined
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 &
14:39 kisu_ left
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
15:02 kisu_ joined 15:06 justatheory joined 15:10 kisu__ left 15:14 schmalbe left, justatheory left 15:19 kisu_ is now known as kisu 15:21 pernod left 15:28 rindolf left 15:43 [particle] left 16:07 tuxtot1 joined 16:08 tuxtot1 left 16:16 c9s_ joined 16:35 Jedai joined 16:39 kanru left 16:44 pmurias left 16:48 nacho_ joined 16:50 alc left, rindolf joined 16:53 |Jedai| left 16:55 elmex joined 16:57 elmex left, elmex joined 17:01 schmalbe joined 17:10 zamolxes joined 17:25 [particle] joined
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
17:40 adc_penner joined 17:52 masak left 18:26 smg left 18:39 kisu_ joined 18:44 kisu left 19:03 nacho_ left 19:10 adc_penner2 joined 19:14 kisu_ is now known as kisu 19:16 Limbic_Region joined 19:25 adc_penner left 19:27 alexn_org left 19:35 kisu left 19:36 kisu joined 19:39 Limbic_Region left 19:41 pbuetow joined 19:57 smg joined 19:58 masak joined 20:08 stas joined 20:21 kisu left 20:22 kisu joined 20:27 adc_penner joined
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
20:32 adc_penner2 left
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
20:51 stas left 20:53 schmalbe left 20:57 stas joined
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 }
21:10 bacek joined
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
21:20 stas left
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.
21:26 rindolf left
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 :)
21:31 slavik left
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
21:32 kisu_ joined 21:37 kisu left
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
22:08 alester joined 22:27 adc_penner left 22:31 DemoPhreak joined 22:32 justatheory joined 22:33 alexn_org joined, smg left, elmex left 22:35 pbuetow left 22:40 pbuetow joined 22:44 bacek left 22:47 DemoFreak left 22:48 Limbic_Region joined 23:03 Patterner1 joined 23:09 hercynium left, iblechbot left 23:17 pbuetow left, ZuLuuuuuu joined 23:19 kisu__ joined, Patterner left, Patterner1 is now known as Patterner 23:21 masak left 23:22 kisu_ left, pbuetow joined 23:25 kisu__ is now known as kisu, Limbic_Region left, alexn_org left 23:34 spx2 left 23:36 spx2 joined