Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-28

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:24 pugs_svn r25073 | lwall++ | [STD] cut reduce meta tokens in half, memory usage 40% smaller
00:24 TimToady std: say "howdy"
00:25 p6eval std 25072: OUTPUT«00:07 92m␤»
00:29 TimToady std: say "howdy"
00:29 p6eval std 25073: OUTPUT«00:07 92m␤»
00:31 pugs_svn r25074 | hinrik++ | [util/perl6.vim] remove some duplicate code, give Q strings less matching priority than identifiers/functions/ops so that the 'q' in '$foo eq $bar' will not be considered the start of a q$$ string
00:33 TimToady I've basically had to stop using perl6.vim on STD.pm, just too slow
00:33 literal I recently turned a few slow things off by default, have you tried it recently?
00:33 TimToady My system's perl6.vim is a symlink into the repo :/
00:34 TimToady so I'm always using the latest
00:34 pugs_svn r25075 | hinrik++ | [util/perl6.vim] and update the timestamp
00:34 literal yes, but you said you stopped, was that before or after the aforementioned change? :P
00:35 TimToady I stopped about half an hour ago
00:35 literal heh, I see
00:35 TimToady it seems to be reparsing everything from the top, maybe
00:35 TimToady I wonder if there's a way to just reparse the current function
00:36 literal there is a way, I just haven't gotten around to doing that...
00:36 TimToady assume /^{/ is a potential resync point
00:36 TimToady or /^}/
00:37 literal yeah, I only have hooks for ^= pod stuff now
00:37 TimToady course, that doesn't help in the middle of a class
00:38 TimToady or lines starting with sub, method, token, etc
00:38 TimToady ignoring leading ws
00:39 TimToady anyway, a lag of several seconds is what I get here, and it makes it a bit hard to edit
00:50 pugs_svn r25076 | hinrik++ | [util/perl6.vim] add a few missing keywords
00:57 pugs_svn r25077 | lwall++ | [STD] assignop should rely on :assign, not on non-Bool
01:07 frew std: foo( :bar($baz))
01:07 p6eval std 25077: OUTPUT«Unknown routines:␤     foo called at 1 ␤00:04 63m␤»
01:07 frew std: join( :bar($baz))
01:07 p6eval std 25077: OUTPUT«00:04 63m␤»
01:07 frew std: join(bar: $baz)
01:07 p6eval std 25077: OUTPUT«Unknown routines:␤     bar called at 1 ␤00:05 72m␤»
01:11 frew Hey I am having some weird issues with a test
01:11 frew I can't seem to get it to skip a test
01:12 TimToady as in fudge?
01:12 frew uh, maybe?
01:12 frew as in #?rakudo skip 'foo'
01:12 TimToady a single test or a block?
01:12 frew I tried both
01:12 TimToady nopaste it?
01:13 frew good idea
01:13 frew one sec
01:14 frew http://rafb.net/p/0YOvhN13.html
01:14 TimToady looking
01:16 TimToady skipped blocks have to be flush on the margin
01:16 TimToady iirc
01:16 [particle] true dat.
01:17 frew ahh!
01:17 frew thanks
01:17 frew is there any reason some blocks have semicolons after them/
01:17 TimToady if not the last thing on the line
01:18 frew ah, k
01:18 frew also: do any of you use vim and have problems with entire tests looking commented out because of the pod?
01:19 p6paste "frew" at 127.0.0.1 pasted "pop.t" (90 lines) at http://paste.nix.is/4
01:19 literal better paste :)
01:19 literal if you like highlighting, that is
01:19 frew ah, cool
01:21 frew I'll take that as a no.
01:22 pugs_svn r25078 | frew++ | [t] named argument test for pop
01:22 literal frew: maybe you are using the Perl 5 vim syntax file
01:22 literal you need this: http://svn.pugscode.org/pugs/util/perl6.vim
01:22 frew yeah
01:22 frew I got that
01:22 literal at the moment it's a bit slow and doesn't highlight regexes/grammars, but otherwise it's useful
01:23 frew and I put it in ~/.vim/ftplugin/
01:23 literal it should be in ~/.vim/syntax
01:23 frew but it seems to not highlight anything
01:23 frew oh
01:23 frew my bad
01:24 literal and you'll have to do ":set ft=perl6" if the file you're editing doesn't contain a vim modeline declaring the filetype
01:24 frew oooh!
01:24 frew it works!
01:24 frew thank you!
01:24 frew well, I'll just add the modeline
01:25 frew it's in like, half of them
01:25 literal yeah
01:31 pugs_svn r25079 | frew++ | [t] named arg test for push
01:33 frew literal: that is kinda slow.  is that just because perl6 is complicated or what/
01:36 literal that, and vim's syntax highlighting engine is very limited
01:37 literal so I had to use lookahead/lookbehind a lot in the regexes
01:37 frew ahh
01:37 frew gotcha
01:37 frew because of matching and stuff?
01:38 literal and all these weird operators :P
01:38 pugs_svn r25080 | frew++ | [t] named arg tests for shift
01:38 frew haha
01:39 frew yeah, I took a peak at it and I like how you were like, "A MILLION KEYWORDS!"
01:39 TimToady std: $a <<=== $b
01:39 p6eval std 25079: OUTPUT«############# PARSE FAILED #############␤Can't make assignment of sequencer operator at /tmp/MiOjiXWklg line 1:␤------> [32m$a <<===[31m $b[0m␤00:04 62m␤»
01:40 literal frew: that comment was there before I started changing it, actually :P
01:40 literal one of the few things I left unchanged
01:41 TimToady std: $a ==>>= $b
01:42 p6eval std 25080: OUTPUT«00:05 84m␤»
01:42 TimToady oops
01:42 frew nice
01:42 pugs_svn r25081 | lwall++ | [STD] catch ==>>=
01:43 TimToady std: $a ==>>= $b
01:43 p6eval std 25080: OUTPUT«00:05 84m␤»
01:43 * TimToady waits
01:45 TimToady std: $a ==>>= $b
01:45 p6eval std 25081: OUTPUT«00:05 84m␤»
01:46 TimToady hmm
01:47 TimToady std: $a ==>>= $b
01:47 p6eval std 25081: OUTPUT«00:05 84m␤»
01:48 TimToady guess it needs to rebuild its lexer cache...it fails here anyway
01:48 frew TimToady: so I just realized who you are
01:48 TimToady I'm still trying to figure that out
01:48 frew thanks for being awesome!
01:48 frew haha, aren't we all?
01:48 TimToady thanks for the encouragement
01:48 frew haha, no problem
01:49 frew I have a question for you about a syntax choice
01:49 frew you guys do this for named args: foo( bar => $baz)
01:49 frew or foo( :bar(baz))
01:49 frew have you even considered foo(bar: $baz)?
01:49 TimToady that means somethign else
01:49 frew I know that's a total ripoff of javascript/ruby2
01:50 frew yeah, I figured that would be the case
01:50 TimToady that means bar.foo($baz)
01:50 frew wait....
01:50 TimToady because : on the first arg means it's an invocant
01:50 frew ooooh
01:50 frew so foo(:bar($baz)) != foo(bar => $baz)?
01:50 TimToady std: print $*OUT: "howdy"
01:50 p6eval std 25081: OUTPUT«00:06 73m␤»
01:51 TimToady those are the same
01:51 frew so foo(bar: $baz) = bar.foo($baz) ?
01:52 TimToady usually seen as
01:52 TimToady foo bar: $baz
01:52 TimToady without the parens
01:52 frew ahh
01:52 sri_kraih joined #perl6
01:52 TimToady it's the p5 indirect object syntax, only not nearly so ambiguous
01:52 frew so that's like the syntax in perl5 kinda
01:52 frew got it
01:53 TimToady we use it in sigs too:  method foo ($self: $a, $b) {...}
01:53 frew Yeah, I noticed
01:53 frew but that's not quite the same is it?
01:54 frew I take it back, I guess it is
01:54 TimToady well, has a different effect in a sig, but still means "this thing on the left is the invocant"
01:54 frew So do we need to put ($self: ...) in all of our object methods?
01:54 TimToady nope
01:54 literal so this is valid? method $self.foo ($a, $b) { ... }
01:54 frew ah, great
01:55 TimToady no
01:55 TimToady just method foo ($a,$b) is fine
01:55 TimToady the invocant is optional in the sig
01:55 literal yeah
01:55 TimToady just if you want to name it
01:55 literal just wondering how close the analogy to indirect object syntax went
01:56 frew ok, and one other question that I haven't seen in any of my readings
01:56 frew what about threading stuff?
01:56 frew I read that perl6 is better than perl5 threading
01:56 frew but is it as good as weird functional lanuages at threading etc?
01:56 TimToady well, it's designed to have almost no global state, which helps
01:56 literal frew: seen this? http://svn.pugscode.org/pugs/docs/Perl6/Spec/S17-concurrency.pod
01:57 TimToady and plenty of primitives that allow lightweight threading
01:57 TimToady you're basically spawning threads when you do foo() ==> bar()
01:57 TimToady and contextual variables are intended to be more thread friendly than p5's local
01:58 frew cool
01:58 frew does it have features like clojure?
01:59 frew my Larry Wall fan girl friend asked me to ask that, so I can't tell you what that means :_)
01:59 literal "Concurrent programming through software transactional memory, an agent system, and a dynamic var system"
01:59 literal says Wikipedia
02:01 frew just to disambiguate, my friend isn't a girl or my girlfriend, but acting (like I am) like a fangirl :-)
02:01 literal our hopes; dashed
02:01 TimToady it's okay to be a fanboy too :)
02:01 frew yeah, but it's funnier to say fangirl
02:03 literal btw, I'd like to echo frew's earlier sentiment
02:03 TimToady there is a plan to support STM, but remains to be seen how well that works out
02:03 literal TimToady: thanks for being awesome!
02:03 TimToady thanks for the encouragement
02:04 TimToady std: $a ==>>= $b
02:04 p6eval std 25081: OUTPUT«############# PARSE FAILED #############␤Can't make assignment out of sequencer operator at /tmp/7MLDzOEmtj line 1:␤------> [32m$a ==>>=[31m $b[0m␤00:04 62m␤»
02:04 TimToady that's more like it
02:05 literal TimToady: you said tchrist is working on the next Programming Perl version? any idea how that's going?
02:05 frew literal: any idea why vim sometimes accidentally highlights large swaths of code as if they are strings?
02:05 TimToady he was working on a new Perl 5 version, I think
02:05 TimToady no idea how it's going
02:06 literal frew: does it appear to be random, and goes back to normal by scrolling back and forth?
02:06 literal s/by/when/
02:07 literal if it's not random then I'd like to hear what code caused it
02:07 literal if it's some grammar/regex stuff then that's because that hasn't been finished yet
02:08 frew literal: yeah
02:08 frew literal: it's not just perl though, it happens with javascript at work
02:08 frew and often with folds?
02:08 frew I think its a vim bug
02:08 frew but it's REALLY hard to pin down
02:10 literal I suspect it only happens when the syntax syncing in vim is set so that it only highlights the code you're currently looking at, or that is, all the way back to the start of some region
02:11 frew hm
02:11 literal and it either can't find any starting point within the limit specified (usually 100 lines)
02:11 frew so the only real solution to that is small files
02:11 literal or "syn sync fromstart"
02:12 literal which makes it highlight the whole file when opening it
02:12 frew should I put that in my .vimrc?
02:12 frew hmm
02:12 frew that shouldn't be so bad at work
02:12 frew my work computer is like, awesome
02:12 literal Perl 5's syntax file does that, and it only causes a slight delay when the file is a few thousand lines
02:13 frew ok, I just did :syn sync fromstart
02:13 literal perl6.vim does it too because I haven't registered the required syntax syncing hooks (i.e. "when you look back and see this pattern, what follows is a subroutine")
02:13 frew and then did :e t/spec/S29-array/splice.t
02:13 frew and it's still busted
02:13 literal but it's slower simply because Perl 6 is more complicated than Perl 5
02:14 frew ok
02:14 frew so the reason it didn't work just now is because perl6.vim is basically just not done
02:14 literal splice.t looks fine to me
02:15 literal did you forget to set the filetype?
02:15 frew I added # vim: syn=perl6 to the end
02:15 frew and if I go to the bottom of the file and reload it it looks all stringy
02:15 literal that's not right
02:15 frew (you *must* load the file with the cursor at the bottom)
02:16 literal should be: # vim: ft=perl6
02:16 frew ok, done, but it still has the issue
02:17 literal yeah, it happens when the cursor is at the bottom
02:17 literal don't know why
02:17 literal it shouldn't happen since vim highlights the whole file upon opening it
02:18 frew well, I'll try that syn sync fromstart at work
02:19 literal you shouldn't have to try it for Perl 6, it's already in the syntax file :P
02:19 frew haha
02:19 frew is there a >> << for blocks?
02:19 literal what do you mean?
02:20 frew like instead of @foo >>+<< @bar
02:20 literal feed operators?
02:20 literal ah
02:20 frew hyper(@foo, @bar, { $^a + $^b})
02:20 literal you could define your own operator and put it in >> <<
02:20 frew that's kindav a drag
02:21 frew what if I want to iterate over two arrays at once?
02:21 frew note: that is not the same question
02:22 TimToady for @foo Z @bar { $^a + $^b }
02:23 frew interesting
02:23 frew so that's what zip does?
02:23 literal it weaves them together, just like your zipper does :P
02:24 s1n joined #perl6
02:25 TimToady perl6: for 1,2,3 Z 4,5,6 { say $^a + $^b }
02:25 p6eval rakudo 36073: OUTPUT«5␤7␤9␤»
02:25 p6eval ..pugs: OUTPUT«4␤2␤»
02:25 p6eval ..elf 25081: OUTPUT«Undefined subroutine &GLOBAL::infix_Z called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
02:26 TimToady looks like rakudo has it right
02:27 TimToady perl6: map &infix:<+>, (1,2,3 Z 4,5,6)
02:27 p6eval pugs: RESULT«(4.0, 2.0)»
02:27 p6eval ..elf 25081: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤   from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤      from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤       from
02:27 p6eval ../home/evalenv/pugs/mi...
02:27 p6eval ..rakudo 36073: OUTPUT«Statement not terminated properly at line 1, near ":<+>, (1,2"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:28 TimToady perl6: map &infix:<+>, zip(1,2,3; 4,5,6)
02:28 p6eval pugs: RESULT«(6.0,)»
02:28 p6eval ..elf 25081: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤   from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤      from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤       from
02:28 p6eval ../home/evalenv/pugs/mi...
02:28 p6eval ..rakudo 36073: OUTPUT«Statement not terminated properly at line 1, near ":<+>, zip("␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:30 frew it looks like pugs is doing something (at least to me) unexpected for thsi for 1,2,3 Z 3,2,1 { say $^a ~ $^b; }
02:31 frew I get '1 32 2\n3 1Item'
02:33 TimToady perl6: for (1,2,3) Z (4,5,6) { say $^a + $^b }
02:33 p6eval rakudo 36073: OUTPUT«5␤7␤9␤»
02:33 p6eval ..pugs: OUTPUT«4␤2␤»
02:33 p6eval ..elf 25081: OUTPUT«Undefined subroutine &GLOBAL::infix_Z called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
02:34 frew so I should start using rakudo for my playing.
02:34 frew it's not as nice
02:34 TimToady pugs: for zip(1,2,3; 4,5,6) { say $_ }
02:34 p6eval pugs: OUTPUT«123456␤»
02:35 TimToady pugs: rakudo: zip(1,2,3; 4,5,6) { say $_ }
02:35 p6eval pugs: OUTPUT«*** ␤    Unexpected "{"␤    expecting operator␤    at /tmp/0mSHro2tcp line 1, column 27␤»
02:35 TimToady rakudo: for zip(1,2,3; 4,5,6) { say $_ }
02:35 frew you forgot the for
02:35 p6eval rakudo 36073: OUTPUT«Statement not terminated properly at line 1, near "(1,2,3; 4,"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:36 TimToady perl6: say 1,2,3 Z 4,5,6
02:36 p6eval pugs: OUTPUT«123␤»
02:36 p6eval ..rakudo 36073: OUTPUT«142536␤»
02:36 p6eval ..elf 25081: OUTPUT«Undefined subroutine &GLOBAL::infix_Z called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
02:36 TimToady perl6: say (1,2,3 Z 4,5,6)
02:37 p6eval pugs: OUTPUT«1 42 53 6␤»
02:37 p6eval ..rakudo 36073: OUTPUT«142536␤»
02:37 p6eval ..elf 25081: OUTPUT«Undefined subroutine &GLOBAL::infix_Z called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
02:37 TimToady pugs has precedence and extra-[] problems there
02:38 frew my rakudo is invariably failing splice.t
02:39 frew I'll stop using pugs
02:39 gravity joined #perl6
02:40 frew weird.
02:41 frew it's saying splice isn't a sub
02:41 TimToady it was aiming at the design from several years ago, and has suffered some "design rot" since then
02:41 frew yeah
02:42 frew rakudo: splice(1,2,3; 1,2)
02:42 p6eval rakudo 36073: OUTPUT«Statement not terminated properly at line 1, near "(1,2,3; 1,"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:42 frew rakudo: my @f = 1,2,3; splice(@f, 1,2)
02:42 p6eval rakudo 36073: OUTPUT«Could not find non-existent sub splice␤current instr.: '_block14' pc 116 (EVAL_17:53)␤»
02:45 frew does perl6 allow "monkey patching" and is it scoped in any way?
02:50 TimToady heh
02:51 TimToady look at S12 and scan for MONKEY_PATCHING
02:53 * gravity grins
02:53 frew nice
02:55 frew what if I have a module that monkey patches Scalar and adds some method and then you do it in another module with the same method name?
02:57 TimToady there are reasons we try to discourage magical action at a distance in the design of Perl 6 :)
02:58 TimToady and the requirement to put "use MONKEY_PATCHING" at the front of your file is just one of the ways we discourage the practice
02:58 TimToady nevertheless, every now and then you want a tactical Swiss Army nuke...
02:59 TimToady just keep your uranium at a distance from my uranium...
03:01 frew TimToady: yeah, but my question is: what if you write modules, and you uranium it up, but I don't want your uranium.  Will using your module give me radiation?
03:03 TimToady MONKEY_PATCHING is really easy to grep for
03:03 frew so you are saying yes
03:03 frew but that is an ok alternative
03:03 frew because scoped monkey patching would be weird at the very least
03:04 TimToady basically, MONKEY_PATCHING should be considered part of the public interface of a module
03:04 frew and the main reason monkey patching is good (imho) in ruby is because it's missing macros
03:04 frew ok, that makes sense
03:04 frew and typically if a module has monkey patching it's whole purpose is monkey patching
03:04 TimToady it's a bad solution to the wrong problem :)
03:04 frew hahahaha
03:04 frew well, the perfect example is andand
03:05 frew which perl6 and groovy have out of the box
03:05 frew but nonetheless could be taken care of with macros
03:05 frew $foo.?bar
03:05 TimToady our goal is to give everyone all the tools they need, and then discourage them from using the tools by also giving them the primitives they need :)
03:06 frew haha
03:06 frew yeah
03:06 frew I noticed today that perl5 doesn't have capitalize
03:06 frew which is ok, but it would be nice to have
03:06 TimToady well, it has ucfirst...
03:06 frew (SOMEONE STORED EVERYTHING IN THE DB AS ALL CAPS)
03:07 TimToady probably andy
03:07 frew TimToady: yeah, but 1
03:07 frew this: join(' ', map { ucfirst } split(/\s+/, lc($words)));
03:07 frew is kinda hairy
03:08 frew I'm sure it was andy.
03:08 TimToady s/(\S+)/\U\l$1/g or some such
03:09 TimToady 'course, we got rid of \u and \l in p6...
03:09 pugs_svn r25082 | azawawi++ | [S:H:P6] Moved rsc folder as S::H::P6::files (less namespace collision)
03:09 pugs_svn r25082 | azawawi++ | [S:H:P6] Updated to STD r25081 and perl6.vim r25076
03:09 pugs_svn r25082 | azawawi++ | [S:H:P6] sent version 0.037 to CPAN
03:09 frew but you have capitalize...
03:10 alester joined #perl6
03:11 frew that looks like it did exactly the opposite
03:12 frew yeah, actually s/(\S+)/\u\L$1/g
03:13 gravity joined #perl6
03:14 frew that only works for one word...
03:15 TimToady not with /g
03:17 frew indeed
03:18 edenc joined #perl6
03:27 PZt joined #perl6
03:28 pugs_svn r25083 | azawawi++ | [S:H:P6] less CPAN namespace collisions
03:28 rabbits77 joined #perl6
03:32 rabbits77 left #perl6
03:32 pugs_svn r25084 | frew++ | [t] added named args to unshift test
03:34 frew I am going to blindly commit my changes for splice.t.  The test fails as is so I can't say I broke it.
03:35 pugs_svn r25085 | azawawi++ | [S:H:P6] more cleanups
03:36 rabbits77_ joined #perl6
03:36 pugs_svn r25086 | lwall++ | [pop.t] fix syntax error
03:39 pugs_svn r25087 | azawawi++ | [S:H:P6] less CPAN namespace collisions with respect to resources completed
03:40 pugs_svn r25088 | frew++ | [t] added named arg test for splice.t
03:47 pugs_svn r25089 | azawawi++ | [S:H:P6] Fixed namespace collision issues that was introduced in 0.037
03:51 rabbits77 joined #perl6
03:52 rabbits77 left #perl6
04:17 mtnviewmark joined #perl6
04:19 Cyrus joined #perl6
04:21 s1n what is the line number anchor format on perlcabal?
04:27 ayrnieu joined #perl6
04:28 pugs_svn r25090 | putter++ | [elfparse] IRx1_FromAST_create tweak.  Added regression baseline for 'rx_on_re tests as parsed by STD_blue'.  /\N/.  More std.pm unpodding.
04:28 pugs_svn r25090 | putter++ | [elf] IRx1_FromAST_create tweak.  Lightly dust README.
04:33 pugs_svn r25091 | hinrik++ | [util/perl6.vim] simpler solution to the eq/q problem which doesn't have side effects: look for a word boundary
05:08 ejs joined #perl6
05:12 meppl joined #perl6
05:25 araujo joined #perl6
05:56 xuser joined #perl6
06:11 ChrisDavaz joined #perl6
06:29 eternaleye_ joined #perl6
06:37 masak joined #perl6
06:39 masak @tell moritz_ re http://perlgeek.de/blog-en/perl-6/rakudo-rocks.html -- very cool, kudos. slight typo: s/Mai/May/
06:40 masak lambdabot?
06:42 masak I like being portrayed as being quite enthusiastic despite writing about a lot of nasty bugs. that captures the doubleness of writing stuff on top of Rakudo.
06:46 ashizawa joined #perl6
06:51 mtnviewmark so - am I right in thinking that rakudo is now trying to figure a way to boot strap into STD.pm?
06:52 masak that's always been the long term goal, I think.
06:52 mtnviewmark wow - that is one awfully cool graph in that article!
06:52 [particle] the way is fairly clear, and pmichaud is funded to make it happen.
06:53 mtnviewmark it would depend on keeping STD.pm down to some reasonable, hard coded subset of the language?
06:53 mtnviewmark or is it - get the first one working... then it is all generational from there
06:55 [particle] rakudo will eventually parse STD.pm
06:55 [particle] after protoregexes and LTM are implemented for PGE
07:02 vixey joined #Perl6
07:17 moritz_ good morning
07:17 mtnviewmark left #perl6
07:18 masak moritz_: godmorgon!
07:20 moritz_ masak: that sounds a bit like the language of Mordor ;-)
07:20 masak moritz_: well, it's very dark and inhospitable in Sweden at this time of year...
07:21 moritz_ ;-)
07:21 masak moritz_: but it looks worse than it sounds. both the 'd' and the 'g' are elided in actual spoken Swedish, so "go'morron", effectively.
07:22 moritz_ so you call people morrons? ;-)
07:22 masak yes, and to their face.
07:22 * moritz_ isn't very nice today
07:22 japhb joined #perl6
07:23 masak moritz_: s'ok. :) Swedish is a germanic language, after all.
07:24 moritz_ I've heard people say that in German even a proposed marriage sounds threatening ;-)
07:25 masak 哈哈
07:25 masak I've heard some very beautifully spoken German, as well.
07:26 masak TIMTOWTPI
07:39 dh_ joined #perl6
07:41 moritz_ literal++ # fixing a long-standing issue with perl6.vim and ternary operator
07:46 mtve joined #perl6
08:00 duke_leto joined #perl6
08:03 duke_leto left #perl6
08:04 hanekomu_ joined #perl6
08:07 ilogger2 joined #perl6
08:18 iblechbot joined #perl6
08:19 Casan joined #perl6
08:20 xinming joined #perl6
08:21 Matt-W masak: I've sung some very beautiful German
08:22 masak yes. I've heard beautiful German sung.
08:25 Matt-W It wasn't easy, but that had a lot to do with the music that went with it
08:32 barney joined #perl6
08:46 DemoFreak joined #perl6
09:00 masak rakudo: class A { submethod BUILD { say "OH HAI {self}" } }; A.new
09:00 p6eval rakudo 36084: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2502 (src/classes/Role.pir:42)␤»
09:01 Matt-W so we don't support BUILD yet?
09:01 masak not in that way, at least.
09:02 * masak looks forward to BUILD
09:02 Matt-W I'm unclear on exactly what BUILD is supposed to do
09:02 masak Matt-W: oh, it's called by .new
09:03 Matt-W so is it where you'd go if you wanted to have the parameters to .new interpreted differently?
09:04 moritz_ yes, I think so
09:04 masak probably, yes.
09:05 Matt-W good, because there are sure to be many times when the default behaviour is unsuitable
09:05 masak actually, I'm suffering a bit from a knowledge deficit in the area of object construction in Perl 6.
09:05 masak I don't even understand why the keys in .new params are barewords.
09:06 moritz_ masak: because the => operator quotes barewords on the left
09:07 masak moritz_: ok. so the following should actually be allowed?
09:07 Matt-W they're just named arguments
09:07 masak rakudo: class A {}; A.new( "test:key" => "value" )
09:07 p6eval rakudo 36084: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2502 (src/classes/Role.pir:42)␤»
09:07 masak rakudo: say "test"
09:08 p6eval rakudo 36084: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2502 (src/classes/Role.pir:42)␤»
09:08 Matt-W umm
09:08 masak someone's destroyed Rakudo again.
09:08 Matt-W I think rakudo's ill
09:08 Matt-W It wasn't me! I haven't got commit access!
09:08 masak Matt-W: that's what they all say.
09:08 Matt-W Well in my case it's true
09:08 Matt-W I've only got access to Pugs
09:10 moritz_ rakudo: sub a(:$x, :$y) { say "$x $y" }; a("y" => 2, "x" => 3)
09:10 p6eval rakudo 36084: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2502 (src/classes/Role.pir:42)␤»
09:10 moritz_ rakudo: sub a(:$x, :$y) { say "$x $y" }; a(y => 2, x => 3)
09:10 p6eval rakudo 36084: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2502 (src/classes/Role.pir:42)␤»
09:11 moritz_ rebuilding parrot on the server now...
09:11 * masak bisects
09:12 moritz_ masak: to answer your question - anything that counts as named arguments works, so for example A.new(:a($x)) also works
09:12 masak moritz_: a'ight.
09:12 moritz_ masak: I'm not sure if quoting the LHS of => makes it a positional pair instead
09:12 masak I hope .new is not special cased in that way.
09:13 moritz_ it is not.
09:16 duke_leto joined #perl6
09:16 duke_leto left #perl6
09:22 moritz_ rakudo: sub a(:$x, :$y) { say "$x $y" }; a(y => 2, x => 3)
09:22 p6eval rakudo 36085: OUTPUT«3 2␤»
09:22 moritz_ rakudo: sub a(:$x, :$y) { say "$x $y" }; a("y" => 2, "x" => 3)
09:22 p6eval rakudo 36085: OUTPUT«y   2 x     3␤»
09:22 moritz_ ok, quoting the key makes it a positinal argument
09:23 moritz_ masak: so you can't write A.new("b" => ...) and have it DWIM
09:23 masak that puzzles me a lot.
09:23 moritz_ why?
09:23 masak that means that there's something more than autoquoting going on.
09:23 moritz_ yes, it's synactic magic
09:24 masak ...so I'm rightfully confused.
09:24 moritz_ but it's not all that bad, because you attributes are always identifiers
09:24 drbean joined #perl6
09:24 moritz_ just like :a<x> is a named arg, and (:a<x>) is a positional one
09:29 Matt-W that's going to have to be written very clearly on the documentation for parameter passing
09:30 moritz_ Matt-W: it is already, IMHO
09:30 masak let's just repeat that clarity in u4x, then.
09:31 moritz_ the most important point is, "the distinction between named and positional arguments only depends on syntax, not on type"
09:32 Matt-W mmm
09:32 Matt-W reading about objects
09:32 Matt-W it seems if you want to have different parameter handling in your constructor, you provide a custom new()
09:32 Matt-W so overriding BUILD is probably not necessary most of the time
09:33 moritz_ it always depends on what you actually want to achieve :-)
09:34 Matt-W true, true
09:34 masak moritz_: so you're saying there are times when you want to override new and times when you want to override BUILD?
09:35 Matt-W the synopsis says overriding new is for converting positional parameters to named parameters to give to bless
09:35 masak Matt-W: oh.
09:35 masak I see. I don't grok yet, but hopefully I will when I've done it a few times.
09:36 moritz_ masak: yes
09:36 Matt-W also seems like the place for lots of other constructory magic actually
09:36 Matt-W the kinds of thing you might want to do with a C++ constructor
09:36 moritz_ masak: when you want to change params, overriding new() is the way to go. If you just want to do additional stuff, writing a BUILD submethod is sufficient
09:38 masak moritz_: how did you fix thet Perl6MultiSub error? I'm still getting it locally with the latest Rakudo.
09:38 masak moritz_: ah. good explanation. I grok.
09:39 moritz_ masak: realclean did it
09:39 masak oh!
09:39 * masak forgot this one time
09:40 finanalyst1 joined #perl6
09:45 finanalyst1 joined #perl6
10:01 rob joined #perl6
10:04 ejs joined #perl6
10:05 pugs_svn r25092 | finanalyst++ | [t] moved unicode.t to spec/
10:08 pugs_svn r25093 | finanalyst++ | [t/spec] S02-builtin_data_types unicode.t from t/ No changes seemed to be needed.
10:09 braceta joined #perl6
10:10 finanalyst moritz_: moved unicode.t It was the last test in builtins/strings. Should the strings directory be removed?
10:10 finanalyst from t/
10:30 cai joined #perl6
10:46 rob joined #perl6
11:04 hanekomu_ joined #perl6
11:14 ChrisDavaz joined #perl6
11:26 jnthn morning all
11:28 * jnthn reads backscroll and starts the day with a make realclean
11:28 ruoso joined #perl6
11:30 ruoso Hello!
11:31 masak jnthn: dobru rano.
11:31 jnthn :-)
11:31 jnthn masak: hej hej ;-)
11:32 * jnthn knows just one Swedish greeting
11:33 masak jnthn: 'hejsan', 'hallå', 'tjena', 'goddag'...
11:36 jnthn :-)
11:36 masak but mostly we go around saying things like this: http://www.smouse.force9.co.uk/monty.htm
11:44 jnthn LOL!
11:44 jnthn :-)
11:44 jnthn Wi n�t trei a h�liday in Sweden this yer?
11:44 jnthn ;-)
11:44 masak yup
11:44 jnthn Maybe I trei again in summer. ;-)
11:45 masak See the løveli lakes... The wonderful telephøne system
11:46 jnthn Drink the cheap beer...
11:46 jnthn Oh, wait...
11:46 masak d'oh!
11:47 ayrnieu in the Czech Republic, beer is cheaper than water.
11:47 ayrnieu unrelated: http://en.wikipedia.org/wiki/List_of_countries_by_beer_consumption_per_capita
11:47 masak not entirely unrelated, I'd guess :)
11:49 jnthn ayrnieu: Also, the beer is *good*.
11:49 * jnthn has enjoyed much Starobrno.
11:51 jnthn Hah...over 1.5 litres a day in the Czech Republic!
11:58 kisu_ joined #perl6
12:04 kisu__ joined #perl6
12:11 masak std: **
12:11 p6eval std 25093: OUTPUT«00:04 61m␤»
12:11 masak what's (**).WHAT ?
12:11 masak Whatever?
12:14 moritz_ masak: it's HyperWhatever or something similar
12:15 masak moritz_: not according to http://use.perl.org/~chromatic/journal/38256 , it seems
12:16 moritz_ masak: read S09, not chromatic's blog :-)
12:16 masak :)
12:17 masak std: HyperWhatever
12:17 p6eval std 25093: OUTPUT«Unknown routines:␤     HyperWhatever called at 1 ␤00:04 61m␤»
12:17 moritz_ It is also possible to specify that an array has an arbitrary number of dimensions, using a "hyperwhatever" (**) at the end of the dimensional specification
12:17 moritz_ uhm, but it seems they also create just closures
12:17 masak moritz_:  that doesn't say anything about the .WHAT
12:19 moritz_ masak: well, if it constructs a closure, **.WHAT will return something like Code
12:19 masak rakudo: say (*).WHAT
12:19 p6eval rakudo 36089: OUTPUT«Whatever␤»
12:19 masak moritz_: so *.WHAT is 'Whatever' and **.WHAT is 'Code'?
12:21 moritz_ masak: not sure
12:21 moritz_ "Note that ** is a shorthand for [;] * xx *"
12:22 moritz_ then **.WHAT would be Array
12:22 masak ah. yes.
12:22 moritz_ (do you think there's any type I can't argue for? *g*)
12:32 jnthn Hmm. I got quite a few spectest failures.
12:32 jnthn Failed 7/298 test scripts. 74/8444 subtests failed.
12:32 * jnthn thought particle's patch for NaN/Inf stuff woulda resolved a bunch.
12:33 jnthn However, I've got more now than ever. :-|
12:35 jnthn Hmm
12:35 jnthn is +"Inf",     Inf, "+ context forcer works (7)";
12:35 jnthn is +"-Inf",   -Inf, "+ context forcer works (8)";
12:35 jnthn is +"NaN",     NaN, "+ context forcer works (9)";
12:35 jnthn [particle]: ping
12:37 ruoso_ joined #perl6
13:02 smtms joined #perl6
13:12 * ruoso_ just figured out that trying to infer the text structure from a text file is harder than he thought
13:14 masak ruoso_: 'text structure'?
13:14 ruoso_ as in "this is a itemized list", "this is a section title"
13:14 ruoso_ "this is a description list"
13:15 masak sounds like the parsing I'm doing for November right now. :)
13:15 ruoso_ from an unstructured text file, I should mention...
13:15 ruoso_ more like an ascii art generated from a pdf file
13:16 masak aye, that sounds difficult.
13:16 masak it sounds a bit like Befunge, actually...
13:31 vixey joined #Perl6
13:39 zamolxes joined #perl6
13:46 jnthn moritz_: Know if we haz any tests for auto-threading on the invocant?
13:47 kisu joined #perl6
13:58 Exodist joined #perl6
14:08 moritz_ jnthn: don't think so, but I can write some in ~4 hrs, if that's soon enough for you
14:09 jnthn moritz_: I'm scribbling some at the moment, but feel free to expand on them/tweak them etc.
14:13 moritz_ rakudo: class A { has $.a; method b { $.a = 1; 0 }}; my @x = gather { take A.new for 1..3 }; any(@x).b; say @x[0].a
14:13 p6eval rakudo 36089: OUTPUT«Could not locate a method 'b' to invoke on class 'Junction'.␤current instr.: 'die' pc 16767 (src/builtins/control.pir:204)␤»
14:13 moritz_ jnthn: that's a very basic test
14:14 moritz_ note that method b has to return a false value, because otherwise the dispatcher could short-circuit on the first true return value (if in boolean context)
14:15 jnthn moritz_: Also needs to be has $.a is rw
14:15 jnthn But on my local copy, gives 1
14:17 moritz_ ... or assignment to $!a, right
14:19 sri_kraih_ joined #perl6
14:22 pugs_svn r25094 | jnthn++ | [t/spec] Various, though certainly not exhaustive, tests for auto-threading over junctional invocants.
14:23 jnthn moritz_: There are six tests added - they cover various things, like nested junctional invocants, invocants of different types, and auto-threading where there's both junctional invocant and a junctional parameter.
14:24 moritz_ I've been thinking about the Junction.values vs. Junction.eigenvalues - it should really be Junction.eigenstates, because it fits much better into the quantum mechanics picture
14:25 jnthn moritz_: The current private method is !eigenstates
14:27 moritz_ ah, good
14:30 rakudo_svn r36090 | jonathan++ | [rakudo] Auto-threading over the invocant for methods not defined in Junction.
14:40 rakudo_svn r36093 | bernhard++ | [codingstd] trailing_space.t
14:49 alester joined #perl6
14:50 rindolf joined #perl6
15:05 frew Has anyone in here ever connected to a vpn with openvpn in linux?
15:06 moritz_ yes
15:08 DemoFreak joined #perl6
15:08 frew ok, well it apparently finished (I had to do it with sudo) and said Initialization Sequequence Completed
15:08 frew but I can't seem to connect to anything at work
15:08 frew any ideas?
15:10 moritz_ no
15:10 frew alright; thanks anyway :-)
15:15 Tene joined #perl6
15:34 donaldh joined #perl6
15:37 moritz_ finanalyst1: empty directories in t/ should be deleted, yes. (Sorry for late reply)
15:42 riffraff joined #perl6
15:46 * jnthn runs the spectests, hoping that having added compile-time symbol redeclaration tests for types won't have broken anything
15:50 jnthn [particle]++ # NaN/Inf fixes make tests far quieter now
15:53 [particle] yeah, i'm glad to have that done (mostly, anyway)
15:53 jnthn Yeah, one test still has some fails, but it's a *lot* better than before.
16:00 rakudo_svn r36096 | jonathan++ | [rakudo] Compile time detection of type re-declaration, as well as making class A is B { } and class A does B { } a compile time error when B is not declared.
16:01 PerlJam jnthn: is it specced that they have to be declared before use?
16:02 moritz_ I'm quite sure it is
16:02 moritz_ B parses as a sub-name if it's not declared as a type
16:02 moritz_ which doesn't make sense in a trait
16:03 Matt-W Let's not have error messages like Microsoft's C++ compiler
16:03 jnthn PerlJam: Yes.
16:03 PerlJam okay.  For some reason I was thinking that items in those position get treated as if B is a class/role that will be declared before the end of compilation.
16:03 Matt-W which just complained about postcircumfix:<[ ]> by calling it 'binary ['
16:03 jnthn PerlJam: Nope, they gotta be declared beforehand.
16:06 jnthn Anyone know offhand, if sub Foo::a { } is a valid way to declare a sub inside namespace Foo?
16:06 moritz_ rakudo: say NaN ~~ NaN
16:06 p6eval rakudo 36095: OUTPUT«0␤»
16:07 moritz_ [particle]: that used to print 1
16:07 moritz_ (and that's how it's specced and tested)
16:08 [particle] yes, that's the one remaining failing test... will attack today
16:09 jnthn moritz_: I suspect [particle]'s Parrot changes may be right, since comparing one NaN against another is meant to be false (so you can check wiht x == x is false)
16:09 jnthn But probably .ACCEPTS on NaN needs to be special.
16:09 jnthn Like, check the topic with x == x and if it's false, it's a NaN
16:09 moritz_ jnthn: for == maybe, but ~~ should be true
16:09 jnthn moritz_: Sure.
16:09 moritz_ ok
16:09 jnthn Just trying to pin-point what needs changing.
16:09 jnthn Or what I think needs changing.
16:10 jnthn I suspect that ACCEPTS now is just falling to Num's ACCEPTS.
16:10 jnthn Which does ==
16:11 jnthn moritz_: Any suggestions where tests for redeclaration of types should go?
16:11 pbuetow joined #perl6
16:11 jnthn Or can I leave that to you?
16:12 moritz_ S10-packages.pod
16:12 moritz_ 47:Since there are no barewords in Perl 6, package names must be predeclared,
16:12 moritz_ uhm, that are just package names
16:13 PerlJam it's the same rule for them all, I just checked
16:13 PerlJam since there are no barewords, barewordy things must be predeclared.
16:13 stephenlb joined #perl6
16:13 moritz_ and documented in S02:2937
16:14 moritz_ so it's S02-literals/soemthing.t
16:14 moritz_ jnthn: you can leave it to me, but it'll take some time
16:14 sahadev joined #perl6
16:15 jnthn moritz_: I'm not in a hurry to have them.
16:15 moritz_ ok
16:15 jnthn So, thanks. ;-)
16:15 PerlJam moritz++
16:21 mtnviewmark joined #perl6
16:23 pugs_svn r25095 | lwall++ | [STD] add missing HyperWhatever type
16:25 justatheory joined #perl6
16:30 TimToady moritz_: * and ** are not by themselves Code objects.  Most basic operators have Whatever multis that return Code objects, e.g. *-1 is a Code object
16:31 TimToady @tell masak * and ** are not by themselves Code objects.  Most basic operators have Whatever multis that return Code objects, e.g. *-1 is a Code object
16:37 [particle] jnthn: custom .ACCEPTS is what i figured on doing. glad to have the sanity check
16:39 jnthn [particle]: OK, have fun. :-)
16:39 * jnthn afk for a while
16:40 ejs joined #perl6
16:46 moritz_ rakudo: sub a($x) { $x * 2}; say eval 'a(g => 7'; say $!;
16:46 p6eval rakudo 36096: OUTPUT«␤Statement not terminated properly at line 1, near "(g => 7"␤␤»
16:46 moritz_ rakudo: sub a($x) { $x * 2}; say eval 'a(g => 7)'; say $!;
16:46 p6eval rakudo 36096: OUTPUT«␤too many named arguments - 'g' not expected␤»
16:46 moritz_ wow
16:48 TimToady methods ignore unrecognized nameds, but subs don't
16:48 TimToady so looks right
16:48 ayrnieu pugs: sub List::rand { @_[rand +@_] } <a b c>.rand
16:48 moritz_ rakudo: sub a(:$x) { $x * 2}; say a(23)
16:48 p6eval pugs: RESULT«\"a"»
16:48 p6eval rakudo 36096: OUTPUT«46␤»
16:48 ayrnieu rakudo: sub List::rand { @_[rand +@_] } <a b c>.rand
16:48 p6eval rakudo 36096: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 67 (EVAL_17:43)␤»
16:48 moritz_ TimToady: methods do? interesting, I should write tests for that
16:49 TimToady shouldn't bind a positional arg to :$x like that
16:49 moritz_ I know
16:49 TimToady *nod*
16:49 moritz_ diakopter++ submitted a whole bunch of argument-passing bugs some time ago
16:49 moritz_ and now one of them seems to be fixed
16:50 rakudo_svn r36098 | infinoid++ | [cage] Trailing whitespace fix.
16:50 TimToady rakudo: method sub List::rand { @_[rand +@_] } <a b c>.rand
16:50 p6eval rakudo 36096: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 67 (EVAL_17:43)␤»
16:51 pugs_svn r25096 | moritz++ | [t/spec] unfudge passing tests for rakudo (now dies on superfluous named args)
16:51 TimToady ayrnieu: btw, rand doesn't take an arg any more
16:52 TimToady rakudo: method sub List::rand { @_[+@_.rand] } <a b c>.rand
16:52 p6eval rakudo 36096: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 67 (EVAL_17:43)␤»
16:52 TimToady rakudo: method sub List::rand { @_[+@_.rand] }; <a b c>.rand
16:52 p6eval rakudo 36096: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 71 (EVAL_17:43)␤»
16:52 moritz_ "method sub" ?
16:53 TimToady rakudo: method List::rand { @_[+@_.rand] }; <a b c>.rand
16:53 p6eval rakudo 36096: RESULT«0.264447002194185»
16:53 TimToady rakudo: method Array::rand { @_[+@_.rand] }; <a b c>.rand
16:53 p6eval rakudo 36096: RESULT«1.21035174605187»
16:54 TimToady well <a b c>.pick is easier :)
16:54 moritz_ TimToady: uhm, +@_.rand parses as +(@_.rand)
16:54 TimToady right
16:54 TimToady that's gonna be a frequent error
16:55 TimToady rakudo: method Array::rand { @_[(+@_).rand] }; <a b c>.rand
16:55 p6eval rakudo 36096: RESULT«1.45104434572842»
16:55 TimToady still not calling the monkey patched method
16:55 moritz_ TimToady: I find it quite useful, because you can write things like ~$/<foo>
16:56 TimToady not proposing to change it
16:56 TimToady but I wish there was a way to read the programmer's mind...
16:57 TimToady maybe declarations of names containing :: also require 'use MONKEY_PATCHING' at the top
16:58 TimToady maybe it wil fall out naturally, if there's a semantic constraint on modifying a "complete" package
16:58 mtnviewmark "TimToady: methods ignore unrecognized nameds, but subs don't" -- that is exactly the choice I made for GlyphicScript (language I built long ago) -- I didn't like that it wasn't uniform, but it was what programmers expected
16:58 TimToady (rather than a syntactic constraint)
16:59 TimToady mtnviewmark: the motivation for doing it that way in p6 was that you might want to pass args to a constructor that doesn't know which of its BUILD routines wants which arg
17:00 TimToady and it's future proofing in case the class structure gets refactored
17:00 moritz_ TimToady: isn't that easier to solve by making new and BUILD use slurpy args?
17:00 moritz_ erm, named slurpy params I mean
17:01 TimToady you don't know which arg to pass to which BUILD after the class is split into parent/child, for instance
17:01 TimToady the name and/or type is all it has to go on
17:02 moritz_ and because you want that behaviour for one method, you impose it on all?
17:03 TimToady you can always write your own .new if you don't like it. :P
17:03 moritz_ that won't change the acceptance behaviour of other methods :/
17:03 TimToady but yes, it's basically a pragmatic decision rather than beautiful
17:04 TimToady you can write your own dispatcher too :)
17:04 moritz_ that's not so easy, I guess ;-)
17:04 TimToady well, basically specced in S12 alredy
17:04 TimToady *already
17:04 moritz_ well, I don't have to like every aspect of a programming language, I guess
17:05 mtnviewmark I'm not even sure TimToady does - and he's the only one with a fighting chance!
17:05 TimToady navigating the psychological swamps is never entirely pleasant
17:07 TimToady that's why language designers tend to get along so well.  they all hate their own language nearly as much as everyone else's :)
17:07 TimToady (Lisp excepted, as usual)
17:07 mtnviewmark heh!
17:08 mtnviewmark odd thought: I like programming language design for the same reason I like music intonation systems: They are both mathematically constructed systems that are constrained enough to never have a perfect fit....
17:09 mtnviewmark sort of like building with Lego in some slightly non-Euclidian space, with a slight curvature -- nothing ever manages to line up 100% in the end
17:09 TimToady does if you push hard enough :)
17:09 mtnviewmark and ignore the stress fractures...
17:16 hanekomu joined #perl6
17:26 pugs_svn r25097 | moritz++ | [t/spec] unfudge numeric-context.t for rakudo
17:33 jferrero joined #perl6
17:37 nihiliad joined #perl6
17:43 moritz_ rakudo: eval 'class B is C { }'; say "alive with $!";
17:44 p6eval rakudo 36099: OUTPUT«alive with The type C does not exist. at line 1, near "{ }"␤␤»
17:46 ruoso joined #perl6
17:54 moritz_ jnthn: I tried to write some tests for redeclaration of types, but all of them seem to suffer from RT #60368
17:55 pugs_svn r25098 | moritz++ | [t/spec] test for type redeclaration and reliance on non-existing types
17:56 moritz_ jnthn: take a look at t/spec/S02-literals/types.t - I'd expect all except the second to pass now, but if I unfudge them I get assertion failures
18:21 mberends joined #perl6
18:35 Psyche^ joined #perl6
18:40 rakudo_svn r36102 | particle++ | [rakudo] NaN ~~ NaN is true now
18:52 masak joined #perl6
18:53 pugs_svn r25099 | finanalyst++ | [t/builtins/strings/] delete dir
18:54 moritz_ [particle]++ # all tests pass, YaY
19:01 finanalyst left #perl6
19:22 gbacon joined #perl6
19:29 pugs_svn r25100 | hinrik++ | [util/perl6.vim] add missing whitespace between a couple of keywords
19:30 rakudo_svn r36106 | moritz++ | [rakudo] move some items in docs/STATUS from "To do" to "implemented"
19:30 explorer__ joined #perl6
19:59 pugs_svn r25101 | lwall++ | [STD] improved diagnostics on undefined symbols
20:22 masak rakudo: class A { has $!foo; method bar { my $!foo = 8; say $!foo } }; A.new.bar
20:22 p6eval rakudo 36112: OUTPUT«Use of uninitialized value␤␤»
20:24 braceta left #perl6
20:24 moritz_ does `my $!foo' make any sense inside a method?
20:26 masak not as far as I know.
20:26 masak I just wanted to see if it was allowed.
20:27 masak std: class A { has $!foo; method bar { my $!foo = 8; say $!foo } }
20:27 moritz_ maybe it hides the "outer" attribute
20:27 p6eval std 25101: OUTPUT«00:04 63m␤»
20:27 masak moritz_: in that case, it should print '8'
20:27 moritz_ masak: right
20:28 moritz_ and if it doesn't make sense, it should give an error, preferrably at compile time
20:28 masak aye.
20:34 masak the shortest Rakudo program I can think of that gives a Null PMC access:
20:34 masak rakudo: printf "%s"
20:34 p6eval rakudo 36113: OUTPUT«Null PMC access in get_string()␤current instr.: 'parrot;Str;sprintf' pc 4031 (src/classes/Str.pir:112)␤»
20:34 masak 11 characters. :)
20:34 moritz_ rakudo: printf"%s"
20:34 p6eval rakudo 36113: OUTPUT«Statement not terminated properly at line 1, near "\"%s\""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
20:34 masak rakudo: printf<%s>
20:34 p6eval rakudo 36113: OUTPUT«too few arguments passed (0) - 2 params expected␤current instr.: 'parrot;Str;sprintf' pc 4016 (src/classes/Str.pir:108)␤»
20:34 moritz_ should that work without space? In perl 5 it certainly does
20:35 * masak does not know
20:39 moritz_ rakudo: my $x = -> $y { leave 3*$y }; say $x(2)
20:39 p6eval rakudo 36113: OUTPUT«Could not find non-existent sub leave␤current instr.: '_block21' pc 161 (EVAL_17:72)␤»
20:40 masak perl6: say ('oh' err "don't we have err yet in Rakudo?")
20:40 p6eval elf 25101: OUTPUT«Parse error in: /tmp/znkeoKLoj1␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say ('oh' err "don't we have e␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
20:40 p6eval ..STD_r...
20:40 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "err"␤    expecting operator or ")"␤    at /tmp/HqEgBdrrb7 line 1, column 11␤»
20:40 p6eval ..rakudo 36113: OUTPUT«Statement not terminated properly at line 1, near "err \"don't"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
20:40 moritz_ Tene: if you're looking for some control exception tasks, leave() might be nice to heave (like return(), but it escapes blocks, not subs)
20:41 Tene Hmm.  Maybe.
20:44 Bribles joined #perl6
20:53 mberends joined #perl6
21:00 mberends rakudo: printf "aa %4s cc", "bb"
21:01 p6eval rakudo 36119: OUTPUT«aa   bb cc»
21:04 sahadev left #perl6
21:07 mberends masak: besides speaking there, are you involved with Nordic Perl Workshop?
21:07 masak mberends: no.
21:08 mberends I've just submitted a post-deadline talk proposal and wondered what the chances were of being accepted. It would be about Pod 6.
21:10 masak mberends: kudos. I hope it gets accepted. I know they've had to extend their initial deadline, so hopefully they'll be lenient.
21:11 mberends I'm hopeful, there are still quite a few hours to fill in the schedule.
21:13 masak it would be nice to meet.
21:13 mberends definitely, people work together better online after meeting in person
21:14 mberends re printf: every % in the format string requires an additional argument, remember
21:15 moritz_ mberends: sure, but a null PMC access is no appropriate reaction to a missing argument
21:15 masak mberends: I know what the problem is.
21:16 masak but thanks. :)
21:16 mberends ok
21:16 masak from my perspective, a Null PMC access is a free rakudobug submission.
21:16 masak they should basically never happen.
21:17 mberends yes, it's a dead alley for a Perl programmer
21:17 masak like this one:
21:17 masak rakudo: class A { class B {}; B.new }
21:17 p6eval rakudo 36119: OUTPUT«Null PMC access in find_method()␤current instr.: 'parrot;A;_block20' pc 97 (EVAL_19:51)␤»
21:17 masak :)
21:17 * masak submits rakudobug
21:18 mberends :)
21:18 mberends in Debian, your name would be sid
21:18 moritz_ heh
21:22 masak I can call you Betty, and you can call me Al.
21:23 mberends I even saw the Graceland tour live in Durban many years ago.
21:25 masak I've lately become a big fan of the Siman part of Simon and Garfunkel.
21:26 masak his texts are sublime, especially of late.
21:27 masak rakudo: class A { class B {} }; B.new
21:27 p6eval rakudo 36119: OUTPUT«Null PMC access in find_method()␤current instr.: '_block14' pc 63 (EVAL_19:40)␤»
21:28 masak rakudo: class A { class B {}; A::B.new }
21:28 p6eval rakudo 36119: OUTPUT«Null PMC access in getprop()␤current instr.: 'parrot;P6object;HOW' pc 60 (runtime/parrot/library/P6object.pir:98)␤»
21:30 * moritz_ wonders if masak will make the "3 bugs in 5 minutes"
21:31 * mberends wouldn't bet against it
21:31 masak no, those are all the same bug. :)
21:33 masak I'm refactoring Druid.
21:33 masak when things move around, they tend to knock Rakudo over.
21:34 masak Druid does some funky, post-modern stuff, especially with micro-closures.
21:39 * masak wonders if there's a way to alias git and svn so that they DTRT if he writes the wrong one in a directory
21:40 jferrero joined #perl6
21:40 moritz_ masak: they do already - "svn: '.' is not a working copy" and "fatal: Not a git repository"
21:41 masak oh, sorry. I meant DWIM except for the 'git'/'svn' part.
21:42 moritz_ do you use the "git-commit" or the "git commit" syntax?
21:42 moritz_ if the former, that might be a bit much effort
21:43 masak I'm a 'git ci' guy.
21:45 masak unh. time to head home and sleep++.
21:45 * masak waves
21:59 Bribles I'm having trouble installing Pugs under Ubuntu 8.04, is this an appropriate place to ask about such things?
22:01 mberends Bribles, this is a good place, but the answer is difficult :-(
22:02 mberends several people have reported similar problems here in the last few months
22:03 diakopter Bribles: which install method are you trying
22:04 Bribles I tried getting latest pugs via svn, but perl Makefile.PL fails with syntax error.  Then i tried installing Perl6::Pugs from CPAN, that failed also somewhere in Makefile.PL
22:04 diakopter Bribles: use the method described in the pugs svn
22:05 diakopter inside the INSTALL file
22:05 wknight8111 joined #perl6
22:05 diakopter http://svn.pugscode.org/pugs/INSTALL
22:05 Bribles does that mean using cabal is the recommended route?  i was not doing that, but i have installed cabal since then
22:06 diakopter yes, "The current recommended way to build Pugs is via cabal-install.
22:07 Bribles No, i didn't install cabal, i get some version mismatches for ghc "Depends: ghc6 (<6.6.1+) but 6.8.2-2ubuntu1 is to be installed"
22:08 Bribles should I just tell my cat that it's not as curious as it thinks and just go home?
22:08 diakopter there have been 14 releases of Pugs 6.2.13 to hackage in the past 7 months; mostly seems like updates to support latests releases of ghc
22:08 diakopter which ubuntu release do you use
22:09 diakopter oh, 8.04
22:10 diakopter you'll want the latest release of ghc, methinks... so something newer than the one in ubuntu 8.04
22:11 Bribles newer than 6.8.2?  it looks like 8.04's cabal is out of date and needs an old ghc
22:12 Bribles and that sort of makes me get the feeling that this is 1999 and i'm using slackware and doing stuff by hand again
22:12 diakopter see http://hackage.haskell.org/packages/archive/Pugs/6.2.13.14/Pugs.cabal  for the details and dependencies
22:13 avar joined #perl6
22:14 moritz_ Bribles: pugs isn't developed anymore, so if none of the existing methods work, you're out of luck
22:14 moritz_ some of us use Rakudo these days instead
22:14 diakopter moritz_: there have been 14 releases of Pugs 6.2.13 to hackage in the past 7 months
22:15 moritz_ diakopter: ah, I only watch the svn repo, maybe that's the problem
22:15 Bribles So Rakudo is usable (for certain values of usable) Perl6 interpreter?
22:15 avar joined #perl6
22:15 moritz_ a compiler, actually
22:15 diakopter moritz_: it's maintained elsewhere...
22:15 diakopter moritz_: or so it seems
22:15 moritz_ diakopter: yes, I see
22:16 moritz_ and since I've seen no announcement whatsoever I'm a bit confused
22:17 diakopter audreyt's most recent commit (afaict) was to update the INSTALL to point people elsewhere for pugs
22:17 mberends Bribles: Rakudo is pretty useable. Read logs at http://irclog.perlgeek.de/perl6
22:19 moritz_ diakopter: she updated the install procedure, but didn't point anyone anywhere
22:19 diakopter cabal...
22:19 diakopter hackage
22:20 moritz_ put it this way: I see no version control system, no different homepage, ...
22:20 diakopter I'm not suggesting there have been feature changes/additions in the recent releases (I have no idea), but there at least has been refactoring and adaptations to new ghc
22:21 Bribles if one wanted to make a blog (for fun, not actual use) could Rakudo (or anything else) handle it?
22:22 moritz_ Bribles: yes, with some effort. Actually there's a wiki engine written in Perl 6...
22:22 moritz_ Bribles: see http://november-wiki.org/
22:22 Bribles I assume the "some effort" is getting around current bugs and missing features.
22:23 moritz_ Bribles: and one of the developers is also working on a blog
22:23 moritz_ right
22:23 moritz_ most prominently, there's no stable database interface
22:23 moritz_ so you have to make do with text files only
22:23 Bribles socket() is also missing?  :)
22:23 moritz_ yes
22:24 moritz_ there are experimental mysql and postgres bindings, but they need lots of love
22:24 Bribles missing features indeed
22:25 mberends the challenges actually make it a lot of fun to get things working...
22:32 moritz_ uhm, rebuilding pugs takes 1.7gb ram, it seems :(
22:33 diakopter heh
22:36 avar moritz_: you could also shell out to perl -MDBI
22:37 diakopter TimToady: or anyone, is there a way to run src/perl6/tryfile through the spec test suite to test for parsing?
22:37 moritz_ diakopter: 'make test' in src/perl6/
22:38 moritz_ diakopter: or 'make testt' if you want to include t/, not just t/spec/
22:38 diakopter oh..
22:38 diakopter thanks
22:38 moritz_ be warned, it takes a while.
22:38 diakopter :D
22:38 diakopter hm, cygwin doesn't like the ps usage
22:39 moritz_ though it only generates 220M in lex/, it used to be >3GB ;-)
22:39 diakopter so, does it parse it all successfully?
22:40 moritz_ apart from random fluctuations: yes
22:40 diakopter nice
22:40 diakopter it would be cool to have an autosmoker that detects changes on .t files and/or src/perl6 and tests them...
22:40 diakopter at least for changed .t files
22:41 moritz_ diakopter: iirc you can pipe the output of 'svn up' into tryfile
22:42 moritz_ so it's actually very close ;-)
22:44 diakopter nice...
23:14 nihiliad left #perl6
23:16 Limbic_Region joined #perl6
23:29 km2 joined #perl6
23:33 Bribles rakudo built brilliantly
23:33 moritz_ that's nice
23:33 Bribles as did the perl6 executable
23:33 moritz_ try 'make spectest' in the languages/perl6/ dir
23:34 moritz_ bed &
23:34 Bribles "bed &" ?
23:35 Bribles --fudge .. now that a command line argument that is always necessary
23:36 [particle] try: make testable
23:39 Bribles spectest is still running, i'll check on it when i come back to work tomorrow
23:39 [particle] oh, i thought you were having problems running spectest
23:39 [particle] testable is a dependency for spectest
23:40 Bribles no, it's runnign fine.  junction/autothreading failed verbosely
23:48 kid51 joined #perl6
23:55 aindilis joined #perl6
23:58 shinobi-cl joined #perl6
23:58 shinobi-cl hi

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo