Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-08-03

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:21 dalek rakudo: e95ae57 | pmichaud++ | src/classes/Signature.pir:
00:21 dalek rakudo: Remove unused all_types PMC creation.
00:21 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e95ae570a79f3b620750d849080093e81656dfeb
00:21 dalek rakudo: 186e36d | pmichaud++ | src/ (2 files):
00:21 dalek rakudo: We don't need to store an Undef for cons_type; PMCNULL suffices.
00:21 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/186e36d6a49ce0c385532c8a609eed493814c41a
00:26 tann rakudo: package P { }; my $x = P.new;
00:26 p6eval rakudo c57fbd:  ( no output )
00:27 KyleHa joined #perl6
00:27 KyleHa On my box, this crashes (segmentation fault) SOMETIMES:  http://gist.github.com/160262
00:28 eMaX joined #perl6
00:28 KyleHa I can't seem to get it any smaller, and the result-in-death isn't consistent.
00:28 pmichaud I suspect it's due to errors in the vals
00:28 pmichaud *evals
00:29 pmichaud one or more of the evals is failing, and you're getting the segmentation fault because we never exit the inferior runloop
00:29 KyleHa Yes, they definitely fail.
00:30 pmichaud in particular:  eval 'role RT64688_r1'  isn't valid as written (at least not according to Rakudo's grammar)
00:30 pmichaud std:  role RT64688_r1
00:30 p6eval std 27857:  ( no output )
00:30 pmichaud hmmm
00:30 pmichaud std:  role RT64688_r1;
00:30 p6eval std 27857: OUTPUT«ok 00:02 36m␤»
00:30 pmichaud std:  role RT64688_r1
00:30 p6eval std 27857: OUTPUT«ok 00:02 36m␤»
00:31 KyleHa S10-packages/basic.t is wall to wall failing evals.  New code in there is kind of a crap shoot.
00:32 pmichaud well, that one is just giving segfaults on exit, yes?
00:32 frettled pmichaud: what on earth are you doing up so late?  (oh, wait, that goes for me, too ...)
00:32 KyleHa I got it to segfault midstream.  That's why I was trying to track this down.
00:32 pmichaud ah, I see.
00:32 pmichaud anyway, I'm fairly sure it's an inferior runloop problem.
00:33 KyleHa I had to stick my tests somewhere else to get them to behave.  8-)
00:33 wayland76 joined #perl6
00:33 pmichaud Right now in any Parrot program, more than one failing eval() is likely to cause segfaults.
00:33 KyleHa OK, well, can you think of a way to trigger this reliably so I can test it?
00:34 pmichaud depends... what exactly are you wanting to test?
00:34 KyleHa I want to test the segfault thing...
00:35 pmichaud segfaults by their nature are somewhat unreliable.
00:35 KyleHa Yeah, that's true.
00:36 KyleHa eval random_noise() for 1 .. 1000;
00:36 DemoPhreak joined #perl6
00:36 KyleHa lives_ok { eval random_noise() for 1 .. 1000 }, 'nyuck nyuck nyuck';
00:37 frettled But with a little patience, a debugger, some more patience, and a bit of patience, you can get there.
00:37 KyleHa OK, well, I have to go take care of others.  Thanks for your insight.
00:37 frettled Did I mention patience?
00:37 frettled KyleHa: good luck, hope you manage to track down a bug or two and enjoy your night.
00:41 KyleHa Thanks, frettled.
00:42 tann rakudo: module X { class Y { }; }; X::Y.new;
00:42 p6eval rakudo c57fbd:  ( no output )
00:48 arejay left #perl6
00:50 pmichaud rakudo:  say 3|4
00:50 p6eval rakudo 186e36: OUTPUT«34␤»
00:50 pmichaud (wrong!)
00:51 pmichaud (fixing)
01:02 tann rakudo: say $?PACKAGE, $?MODULE, $?CLASS;
01:02 p6eval rakudo 186e36: OUTPUT«Symbol '$?PACKAGE' not predeclared in <anonymous> (/tmp/OVFnRyWpIK:2)␤in Main (src/gen_setting.pm:3363)␤»
01:03 pmichaud rakudo doesn't know those yet, I don't think.
01:03 pmichaud at least, it doesn't know some of them.
01:22 flexibeast joined #perl6
01:23 sri_kraih joined #perl6
01:31 cxreg rakudo: sub foo{};multi foo{}
01:31 p6eval rakudo 186e36: OUTPUT«Redefinition of routine foo␤»
01:31 cxreg that's segfaulting on me :)
01:33 agentzh left #perl6
01:38 colomon Huh.  I've got a weird one I don't think can be duplicated with the rakudobot here.
01:38 colomon my $out = open "02.pl", :w or die "Unable to open 02.pl: $!\n";
01:39 colomon Works if an 02.pl file exists, fails with "Unable to open filehandle from path '02.pl' " if it doesn't.
01:39 cxreg wfm
01:40 cxreg maybe you dont have directory write permission?
01:41 colomon I do, directory is drwxr-xr-x.
01:42 KyleHa rakudo: my $foo = { "Yay" }; say $foo(foo => 'bar');
01:42 p6eval rakudo 186e36: OUTPUT«FixedIntegerArray: index out of bounds!␤in Main (/tmp/h7KKjEEyKv:1)␤»
01:43 pmichaud (sigh) Parrot bug again.
01:43 KyleHa pmichaud: Which?  Mine or colomon?
01:43 pmichaud KyleHa:
01:43 pmichaud KyleHa: yours.
01:43 pmichaud it's putting the named parameter into $_
01:44 pmichaud and then likely getting confused about it.
01:44 pmichaud rakudo: my $foo = { $^a; "Yay" };   say $foo(foo => 'bar')
01:44 p6eval rakudo 186e36: OUTPUT«too many named arguments - 'foo' not expected␤in Main (/tmp/X1rdAj15yv:1)␤»
01:44 pmichaud hmmm
01:44 KyleHa OK, well, at least it's reliably testable this time.
01:46 pmichaud colomon: are you sure you have write permission?  I get the same error if I turn off write permission to my directory
01:46 colomon Actually, just realized I'm completely on the wrong track here.  One sec.
01:47 pmichaud although now I'm getting a strange version of it as well.
01:47 pmichaud oh.
01:48 colomon got it -- was executing the wrong script, so that I was executing the script that didn't exist, or was a 0 byte long file.  thus the two different results.
01:49 pmichaud Yes, I was guessing it was something like that.
01:49 colomon not the most intuitive error message for "your script doesn't exist", but I'd have known instantly if I hadn't been trying to write a script with another script.  :)
01:50 pmichaud yes, we should fix that error message.
01:51 * pmichaud files rakudobug
01:53 pmichaud (filed)
01:55 lumi joined #perl6
01:59 colomon pmichaud++; cxreg++;
02:11 justatheory joined #perl6
02:15 blackdog joined #perl6
02:16 blackdog is pugs still a going concern? if so, is it possible to drop out into haskell from within pugs?
02:18 dalek rakudo: d51bca3 | pmichaud++ | src/classes/Signature.pir:
02:18 dalek rakudo: Slurpy params should default to Object instead of Any.
02:18 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d51bca3629b90986428f758b26a6b7d7b0053e24
02:18 dalek rakudo: 91408af | pmichaud++ | src/ (2 files):
02:18 dalek rakudo: Move print() and say() functions to the setting.
02:18 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/91408af1b18a14a00a95a8f64badb34d181c61db
02:24 pugs_svn r27858 | pmichaud++ | [t/spec]:  Add some tests for slurpy params and autothreading (RT #68142).
02:42 blackdog_ joined #perl6
02:45 pugs_svn r27859 | kyle++ | [t/spec] Adjust RT #64818 test
02:45 pugs_svn r27860 | kyle++ | [t/spec] Tests for RT #64828
02:45 pugs_svn r27861 | kyle++ | [t/spec] Tests for RT #64844
02:46 alester joined #perl6
02:56 kane_ joined #perl6
02:59 KyleHa rakudo: sub foo { say "bar" }; my $x = 'foo'; ::$x()
02:59 p6eval rakudo 91408a: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤in Main (src/gen_setting.pm:2240)␤»
03:00 meppl good night
03:06 molaf joined #perl6
03:31 shinobi-cl joined #perl6
03:37 sparc joined #perl6
03:44 agentzh joined #perl6
03:59 eternaleye What's currently blocking heredocs?
04:41 wayland76 They're there instead of here :)
04:41 wayland76 (no idea really :) )
04:54 lumi_ joined #perl6
05:06 dalek rakudo: 18598de | tene++ | src/setting/IO/Socket/INET.pm:
05:06 dalek rakudo: Fix Socket::INET to re-use the appropriate attribute from its parent class.
05:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/18598dec8636e1f28db522258bad12f99ce8cecb
05:13 kane_ joined #perl6
05:16 cbk off to DC for 10 days. (will work on perl 6 programs, but no IRC 4 me) c-ya all when I get back :-)
05:19 ruz_mac_ joined #perl6
05:20 wayland76 o/
05:29 sri_kraih joined #perl6
05:38 cognominal joined #perl6
05:45 orafu joined #perl6
05:45 wayland76 lambdabot: @seen jnthn
05:45 lambdabot jnthn is in #perl6. I last heard jnthn speak 18h 3m 24s ago.
05:53 fridim_ joined #perl6
06:09 agentzh left #perl6
06:16 lumi joined #perl6
06:18 azawawi joined #perl6
06:21 jiing joined #perl6
06:21 azawawi std: sub sub($foo) { say "OH HAI" }; sub(1)
06:21 p6eval std 27861:  ( no output )
06:22 antiphase joined #perl6
06:23 xinming joined #perl6
06:30 rfordinal joined #perl6
06:45 blackdog_ joined #perl6
07:00 finanalyst joined #perl6
07:08 eMaX joined #perl6
07:11 rfordinal joined #perl6
07:16 agentzh joined #perl6
07:23 kane_ joined #perl6
07:25 synthEEEE joined #perl6
07:41 payload joined #perl6
07:55 to_char joined #perl6
07:57 ssm joined #perl6
08:01 moritz_ std: 1
08:01 p6eval std 27861: OUTPUT«ok 00:02 36m␤»
08:01 moritz_ std: sub sub($foo) { say "OH HAI" }; sub(1)
08:01 p6eval std 27861:  ( no output )
08:13 rfordinal3643 joined #perl6
08:18 moritz_ cxreg: you'll never see a segmentation fault from p6eval, it will print these only to the administration log, not to the channel (not sure why, though)
08:19 tann rakudo: my @cities = <Berlin Paris London>; my @visited = <Paris London>; say "I want to see ", @cities - @visited;
08:19 p6eval rakudo 18598d: OUTPUT«I want to see 1␤»
08:19 tann rakudo: my @cities = <Berlin Paris London>; my @visited = <Paris London>; say "I want to see ", @cities >>-<< @visited;
08:19 p6eval rakudo 18598d: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤in Main (/tmp/WMxtfM7LZ4:2)␤»
08:21 moritz_ rakudo: my @cities = <Berlin Paris London>; my @visited = <Paris London>; my %v; %v{@visited} = @visited; say "I want to see ", @cities.grep({!%v{$_}})
08:21 p6eval rakudo 18598d: OUTPUT«I want to see Berlin␤»
08:21 moritz_ rakudo: my @cities = <Berlin Paris London>; my @visited = <Paris Berlin>; my %v; %v{@visited} = @visited; say "I want to see ", @cities.grep({!%v{$_}}) # adapted to my experience :-)
08:21 p6eval rakudo 18598d: OUTPUT«I want to see London␤»
08:24 fridim_ joined #perl6
08:24 tann i kinda like ruby's way..very convenient and concise :)
08:24 tann not sure how it's implemented in ruby though
08:24 moritz_ Perl 6 has sets, they just aren't implemented yet, and aren't specced very well either
08:26 ihrd left #perl6
08:27 tann dont see 'em on perlcabal
08:27 tann moritz, which s#?
08:27 moritz_ ack -w Set docs/Perl6/Spec/
08:28 moritz_ S32:Containers, S02 and S03 mention it
08:29 tann thanks
08:44 tann__ joined #perl6
08:51 rfordinal joined #perl6
08:55 rfordinal3643_ joined #perl6
08:59 rfordinal3643__ joined #perl6
09:16 eldragon2 joined #perl6
09:19 donaldh joined #perl6
09:28 lumi_ joined #perl6
09:34 wayland76 I'm keen to see more Sets too :)
09:35 wayland76 rakudo: say "Sets" x 20
09:35 p6eval rakudo 18598d: OUTPUT«SetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSetsSets␤»
09:39 Front_slash joined #perl6
09:49 wayland76 Does Perl6 support relational algebra?
09:49 agentzh joined #perl6
09:49 moritz_ what is "relational algebra"?
09:50 eldragon2 it's the algebra of the cartesian product in many relational databases
09:50 wayland76 Well, the join operator, for example :)
09:51 moritz_ I don't think it does
09:52 wayland76 http://en.wikipedia.org/wiki/Relational_algebra
09:52 wayland76 Have we considered it?
09:53 Matt-W Not that I'm aware of
09:53 Matt-W But you could write a module for it...
09:53 moritz_ I think dduncan tries to do something like that with Muldis-D or Rosetta or whatever it's called these days
09:53 wayland76 Yeah, I figured
09:53 Matt-W would it need core language support when you can define custom operators and types and munge the grammar?
09:54 Molaf joined #perl6
09:54 wayland76 Matt-W: The old saying that "FORTRAN programmers can write FORTRAN in any language" is truer of Perl than any language before
09:54 Matt-W yes
09:54 Matt-W use FORTRAN;
09:54 wayland76 (basically, nothing almost nothing needs core support :) )
09:54 Matt-W indeed
09:55 Matt-W it's not so much about adding to the core language at this point, as writing cool modules to be shipped with the compiler
09:55 wayland76 The only thing is, I was confused earlier, and thought that we were getting Relational Algebra along with Sets
09:56 wayland76 but I've just realised this isn't the case.  I must admit, I'm disappointed, but I don't expect RA to find its way into the core
09:58 wayland76 I'm having trouble with my ws token in a grammar
09:58 wayland76 Is the default <ws> token just \s
09:58 wayland76 ?
10:00 moritz_ no
10:00 moritz_ it's <ww> \s+ || \s*
10:00 moritz_ erm, <.ww>
10:00 moritz_ or something similar
10:01 wayland76 I'm trying to make it eliminate // style comments
10:01 wayland76 Tried  \s | '//' .*?\n
10:02 wayland76 But it didn't seem to like that wonderfully well :)
10:02 wayland76 What's ww?
10:02 moritz_ it's the "within word" assertioin
10:02 moritz_ a single \s is almost certainly wrong
10:03 wayland76 Ok
10:03 moritz_ and so is .*?\n, because it might backtrack
10:03 moritz_ try '//' \N*\n instead
10:03 moritz_ lunch&
10:04 wayland76 Ok, will do
10:05 moritz_ <.ww> \s+ || <!ww> \s* [ '//' \N* \n]?
10:05 wayland76 Rakudo seems to be using: <!ww> [ | <.unsp> | \v+ | <.unv> ]*
10:05 wayland76 (I removed some PIR code that I didn't understand :) )
10:11 wayland76 Got this error: Unable to find regex 'ww'
10:14 wayland76 I got rid of both ww and it worked, though.  Thanks ;)
10:15 wayland76 Maybe there should be an easier way to do this, though; maybe <ws> should call <comment> which does nothing by default, but can be set by the user
10:23 sbp joined #perl6
10:24 nsh joined #perl6
10:29 unitxt joined #perl6
10:29 mkfort joined #perl6
10:29 dalek joined #perl6
10:29 leedo joined #perl6
10:29 clkao joined #perl6
10:29 jeekobu joined #perl6
10:29 gabiruh joined #perl6
10:29 Ingmar joined #perl6
10:52 unitxt joined #perl6
10:52 mkfort joined #perl6
10:52 dalek joined #perl6
10:52 leedo joined #perl6
10:52 clkao joined #perl6
10:52 jeekobu joined #perl6
10:52 gabiruh joined #perl6
10:52 Ingmar joined #perl6
11:19 meppl joined #perl6
11:21 donaldh joined #perl6
11:25 payload joined #perl6
11:49 nihiliad joined #perl6
11:52 unitxt joined #perl6
11:52 mkfort joined #perl6
11:52 dalek joined #perl6
11:52 leedo joined #perl6
11:52 clkao joined #perl6
11:52 jeekobu joined #perl6
11:52 gabiruh joined #perl6
11:52 Ingmar joined #perl6
11:54 leedo joined #perl6
11:56 blackdog_ joined #perl6
11:56 Patterner joined #perl6
11:56 charsbar joined #perl6
11:56 huf joined #perl6
11:56 integral joined #perl6
11:56 estrabd joined #perl6
11:56 nnunley joined #perl6
11:56 unitxt joined #perl6
11:56 mkfort joined #perl6
11:56 dalek joined #perl6
11:56 clkao joined #perl6
11:56 jeekobu joined #perl6
11:56 gabiruh joined #perl6
11:56 Ingmar joined #perl6
12:04 wayland76 Quiet tonight :)
12:05 moritz_ YAPC::EU absorbs all the bright minds :-)
12:05 Molaf joined #perl6
12:05 wayland76 Ah, that would explain it :)
12:06 wayland76 Although that doesn't explain what you're doing here :)
12:06 moritz_ well, it does :/
12:08 wayland76 Well, since you're one of the most knowledgeable about P6, that leads to two possibilities
12:08 dakkar joined #perl6
12:08 wayland76 1) Knowledge of P6 != brightness, or 2) you're at YAPC::EU
12:09 moritz_ the first one applies
12:09 moritz_ I'd love the second better :-)
12:10 wayland76 I think I've found a Rakudobug
12:12 wayland76 In an actionclass, I'm going: $currkey = $match<ident>
12:12 wayland76 And I get: Null PMC access in getprop()
12:13 wayland76 Does anyone know whether that's a known bug?
12:13 wayland76 Oh, wait, I didn't mention, this is in the middle of a rule :)
12:14 moritz_ I don't recognize it
12:14 moritz_ so please submit
12:15 wayland76 Will do
12:15 wayland76 Just trying to generate a minimal whatever at the moment
12:18 wayland76 Doesn't matter if it's in the middle of a rule or not
12:20 wayland76 (submitted btw)
12:39 Su-Shee joined #perl6
12:40 Su-Shee good.. well day. :)
12:40 Matt-W good afternoon
12:40 pugs_svn r27862 | azawawi++ | [STD] ignore STD.pm5
12:42 pugs_svn r27863 | azawawi++ | [STD] Fix strict ref warning
12:43 SmokeMachine joined #perl6
12:44 payload1 joined #perl6
12:45 wayland76 good localtime()
12:45 wayland76 Nearly bedtime for me :)
12:45 Su-Shee wayland76: perfect solution. :)
12:45 wayland76 Well, I have to admit, it's not original to me :)
12:45 Su-Shee aren't you all in lisboa?
12:46 wayland76 No, I'm still in country-town Australia :)
12:46 * Su-Shee is amazed every day by open source and irc and internationalism.
12:47 wayland76 :)
12:47 wayland76 We've got pretty good coverage here now
12:47 wayland76 EU and US, of course, and bacek and I are in AU
12:48 moritz_ ruoso is in south america, afaict
12:48 wayland76 azawawi is in the middle east somewhere
12:48 moritz_ that leaves afrika, the far east and the south pole :-)
12:48 Su-Shee didn't we have two mainland china developers also?
12:48 wayland76 I think you're right about ruoso.  I'm thinking of timezone coverage, though, rather than geographical
12:48 moritz_ maybe xinming or xiaoyafeng?
12:49 Su-Shee I recollect JimmyZ mention it, but I maybe wrong.
12:51 jauaor joined #perl6
12:52 Matt-W This is probably the most internationalised project I've been so involved in
12:53 wayland76 Definitely for me
12:53 wayland76 I suspect it has a little to do with the Unicode stuff in P6.
12:54 Su-Shee interesting question. what attracts more internationl developers?
12:55 azawawi joined #perl6
12:55 azawawi wayland76: jordan...
12:55 wayland76 I'm afraid it's my bedtime, though.  I think my brain just went to bed, so I'll send my body to join it.  Goodnight all
12:55 KyleHa joined #perl6
12:55 moritz_ Su-Shee: Unicode, general openness, being not hostile to talk in other languages
12:55 Matt-W Su-Shee: sheer coolness, I think, and because you can be in a different time zone and yet not really feel like you're missing out
12:56 JimmyZ joined #perl6
12:56 Matt-W Some projects are so US-focussed that if you're not in at the right time you never get to talk about anything at all
12:56 wayland76 Also, I suspect once you get critical mass in less-popular timezones, things even out
12:56 Su-Shee Matt-W: Example?
12:57 Su-Shee I have to admit I really don't know any US-centric project.
12:57 moritz_ Su-Shee: another thing is that in Perl you can write "baby talk", which is pretty good when you're learning a language - especially if your natural language far away from english, linguistically
12:57 Su-Shee moritz_: isn't english on the other hand what today everybody has accepted as tech-language?
12:57 Matt-W wayland76: absolutely
12:58 Su-Shee moritz_: mr shee and me realized today that we don't know certain subjects in german anymore. (electronics for example.)
12:58 Matt-W Plus we're also all quite nice people, and patient with people coming in whose english isn't great (even if it does sometimes turn into an english lesson)
12:58 moritz_ Su-Shee: I know that feeling :-)
12:58 Matt-W used to be that physicists had to know english and german
12:58 Su-Shee Matt-W: the linguistic roots of perl. :)
12:59 Matt-W Su-Shee: well larry is a native American speaker...
12:59 Su-Shee Matt-W: that much I know. :)
12:59 Matt-W Perl's a great deal more sensible than any form of English though
13:00 Su-Shee on the other hand, I don't know how the php/ruby/python community looks like.
13:01 moritz_ I think TIMTOWTDI is great in a language
13:01 moritz_ because if there's only one way to do something, as a beginner it's often very hard to find that one way
13:02 Su-Shee moritz_: MEIN REDEN. ;) I really don't know why everybody's insisting on perl being difficult for beginners..
13:04 moritz_ it can certainly be hard to read all these different ways
13:04 moritz_ but when you learn a programming language, the examples are explained, and the you write yourself
13:04 Su-Shee well I had mostly the problem how to get from "perl the language" with obyeing syntax to actual "this is good code"
13:05 moritz_ typically you don't immediately start to read completely foreign code
13:05 Su-Shee yeah, but today you _use_ foreign code very much as you're encouraged to use modules.
13:05 moritz_ yes, but as a start it's enough to read their docs
13:06 Matt-W Perl looks very strange when you first see it on the screen
13:06 Matt-W I think that's got a lot to do with its reputation
13:06 Matt-W people see the $ and the @ and the % and they think 'huh?'
13:07 Matt-W a lot of people who bash Perl to me never got any further than that...
13:07 Matt-W or they see the golfing stuff and think that's what all Perl is like
13:07 Su-Shee Matt-W: that's not what you care for when you start programming.
13:07 Su-Shee Matt-W: I accepted sigils plainly as "that's what perl is". never questioned it.
13:08 Matt-W I just thought okay, let's find out what this all means
13:08 Matt-W and I read Programming Perl
13:08 Matt-W and this lightbulb came on inside my head :)
13:08 moritz_ Su-Shee: you assume the first contact is under the assumption "I want to learn it" - that's not always true
13:09 pugs_svn r27864 | azawawi++ | [STD] Removed another warning when using DEBUG.pmc
13:09 Matt-W moritz_: this is true, I was interested because I wanted to know why Perl is so popular, and I wanted a CGI language that was nicer than PHP
13:10 Su-Shee moritz_: that's true. I realized that painfully when I gave lectures. ;)
13:10 moritz_ actually I looked at python, and thought "WTF? they don't have strict?"
13:11 Su-Shee I read about cool hackers and wanted to become one. ;)
13:11 moritz_ :-)
13:12 Su-Shee but then open source was more interesting and suitable for my mind set. ;)
13:12 Matt-W moritz_: I looked at Python, liked the syntax, but really felt that it tends to become quite hard to follow somehow
13:13 Matt-W it looks nice and clean, but then it ends up *too* clean
13:13 Matt-W not that I have a problem with block identing, it's just the total effect of how Python works
13:13 Su-Shee During my perl crisis I did some python, but I never really _liked_ it. it left me somehow indifferently.
13:16 Matt-W I think they've got some good ideas, but I don't really like the 'pick the best way and make it the only way' approach
13:16 Matt-W because how do you know for sure it's the best?
13:17 Su-Shee well I like to have at least the opportunity to have a different opinion. ;)
13:18 Matt-W maybe that's what draws us all together
13:18 Matt-W we're all terribly argumentative
13:18 moritz_ Matt-W: no, we're not! :-)
13:18 Su-Shee well perl has a certain kind of sexiness I plainly like. and it evolves very nicely.
13:19 Matt-W moritz_: yes we are!
13:20 Matt-W Su-Shee: Perl 6, to me, is a refinement of Perl, a statement of what Perl really is and what it really means
13:20 Matt-W and it turns out that what it means is 'awesome programming language'
13:20 Matt-W it makes C++ look like a baby toy
13:21 sri_kraih_ joined #perl6
13:23 * araujo likes perl ...to a certain extent :) .... bu he can understand why it is not usually chose as a learning language
13:23 Su-Shee Well, I have the announcement to drop by at my editor's already half finished when rakudo gets released. ;)
13:32 azawawi TimToady: Hi. I am getting substr errors in redspans, please see http://gist.github.com/160552
13:32 azawawi TimToady: it happened while i tried to upgrade S:H:P6 to the latest STD.pm
13:34 Matt-W araujo: I'm not sure I'd recommend it as a first language at all
13:34 Jedai joined #perl6
13:34 Matt-W araujo: although I'm not sure *what* I'd recommend as a first language
13:34 Matt-W no decent language is nice for newbies
13:35 moritz_ well, you could start with haskell
13:35 moritz_ or with pascal
13:37 Su-Shee moritz_: _why_ would _anyone_ want to start with those languages?
13:37 araujo Matt-W, Scheme
13:37 araujo I would recommend that one
13:37 Matt-W haskell's not bad for teaching basic programming
13:37 _Jedai_ joined #perl6
13:38 moritz_ Su-Shee: haskell has a very clean design
13:38 Matt-W but then I'm not sure how you'd suddenly throw mutable variables at people
13:38 Matt-W and advanced haskell is VERY VERY SCARY
13:38 Matt-W Scheme might be a good choice
13:38 Matt-W although the syntax tends to turn people off, as with all lisp variants
13:38 Matt-W Java I wouldn't recommend for anything at all
13:38 * araujo would go with Scheme all the way through
13:38 Su-Shee moritz_: I as a newbie I would care for that why? I want cool games/nice web stuff/hacking/do open source.
13:38 moritz_ Su-Shee: it's hard for us to learn when your brain is wired like ours is, but I don't think it's that much harder than other languages to learn for a total newbie
13:38 araujo and i think, that once a person grasp the basic of programming with it, could easily take other language as second language
13:39 Su-Shee that's very school like thinking.
13:39 moritz_ yes, I went to school for 13 years :-)
13:39 Matt-W yes, where programming should be taught
13:39 moritz_ and then a few years university
13:40 moritz_ I guess that leaves traces, no?
13:40 Su-Shee well I had to do pascal at school with all this outstandingly boring tower of hanoi stuff and I didn't bother even take another term computer science. ;)
13:40 Matt-W that's not pascal's fault
13:40 araujo school fault
13:40 Matt-W tower of hanoi is, I always thought, a horrendous example
13:40 Matt-W NOBODY CARES
13:41 araujo haha
13:41 mdxi those monks in hanoi, who will one day end the world, care
13:41 Su-Shee Matt-W: no, but imagine you're 13 today, with internet and open source grown up already - would you _really_ even touch pascal? no. you would go for C, C++, PHP or something like this.
13:41 moritz_ Matt-W: actually I think it's a very good example, because it's one of the few where recursion really makes things easier, as compared to iterative solutions
13:41 araujo that's other thing I find perl isn't too much in the academic world ... academy usually don't go too much into the pragmatic thinking ... and perl is highly pragmatic
13:41 Su-Shee araujo: that was in 1986/87, I was "lucky" even having computers at school.
13:42 moritz_ Matt-W: what would you use as an example for teaching recursion?
13:42 araujo recursion isn't too hard of a concept to grasp
13:42 Su-Shee a real world example actually used on some project? ;)
13:42 Matt-W I'd just use it
13:42 araujo throw at the fibonnaci or factorial
13:42 Matt-W but that might be my Haskell tuition coming out
13:43 Matt-W I don't think of recursion as anything special
13:43 moritz_ araujo: both are actually a good example where you should not use recursion
13:43 araujo moritz_, why? .. how it is pretty much done in languages like haskell
13:43 Matt-W moritz_: but in a pure functional language you *have* to use recursion for that :)
13:43 moritz_ yes, but in all other languages you don't
13:43 Su-Shee wasn't there this nice memoizing example for exactly fibonacci in HOP? ;)
13:43 araujo we are talking about recursion
13:44 araujo as a concept
13:44 moritz_ in perl a naiive recursive fibonacci takes O(2**n)
13:44 Matt-W I think it's probably a good idea to initially teach programming using quite a pure language
13:44 araujo once you grasp at it, you can use it in other languages
13:44 Matt-W don't throw people straight into the deep end of C++ or something else multi-paradigm
13:44 araujo Matt-W, I think so too
13:44 Matt-W then you step into another paradigm and teach a pure form of that
13:44 Matt-W do two or three like that
13:44 Su-Shee Matt-W: why not? it's what is actually really used in real world programming.
13:44 Matt-W then you introduce a heavyweight
13:45 TimToady joined #perl6
13:45 payload1 joined #perl6
13:45 PZt joined #perl6
13:45 c1sung joined #perl6
13:45 ingy joined #perl6
13:45 Trey joined #perl6
13:45 elmex joined #perl6
13:45 PerlJam joined #perl6
13:45 IRSeekBot joined #perl6
13:45 buu joined #perl6
13:45 Matt-W Su-Shee: because you want people to understand the concepts
13:45 moritz_ araujo: I'd like to teach concepts with examples that make sense, and not only in a very special branch of programming languages
13:45 moritz_ I always hated those "I'll show you how to do it, but don't do it in this particular case, because it's a bad idea"
13:45 araujo moritz_, recursion is a concept .. it isn't tied to any language
13:45 Su-Shee Matt-W: and who are you going to convince first learn two other languages because actually starting with the project you really want to do? :)
13:45 araujo what it matters is that the student grasp at it
13:45 Matt-W Su-Shee: a hobbyist or somebody wanting to do a specific project is going to start completely differently
13:45 araujo you don't need a complex example for it
13:46 Matt-W and probably end up writing total shit
13:46 moritz_ araujo: I understand that. But I don't want to explain to a newbie why the recursive fibonacci takes exponentatial time in anything but haskell
13:46 Matt-W (obviously there are exceptions)
13:46 Su-Shee Matt-W: but that's half of all techies nowadays.
13:46 Matt-W Su-Shee: that's why so much code is shit
13:46 moritz_ araujo: which is why fibonacci is a bad example for teaching, IMHO
13:46 araujo moritz_, you won't need to do it.. he is a newbie .. still learning
13:46 Su-Shee Matt-W: and there's plenty literature how to write good <insertyourfavoritelanghere> out there.
13:46 Matt-W moritz_: it's dreadful, nobody's interested in generating fibonacci numbers either
13:46 Matt-W Su-Shee: which they don't read
13:46 araujo moritz_, plus you are teaching him recursion , not time complexity
13:47 Su-Shee Matt-W: they don't learn the two "pure" languages either. ;)
13:47 Matt-W Su-Shee: indeed they don't
13:47 Matt-W I refer you back to my comment about how much bad code there is out there
13:47 moritz_ araujo: yes. Which is why I'd like to teach him something where I don't have to explain why it takes 2 years to calc fib(100)
13:47 Matt-W We had a senior developer in a meeting this morning say 'but it's only a small race condition'
13:47 moritz_ so I take an example that's well behaved instead
13:48 araujo moritz_, you are taking other way, seriously, i am taking here about recursion as a concept .. you can even teach it using a pseudo language if you want
13:48 Su-Shee Matt-W: maybe so. but that's how people learn and that will even grow because everyone being 12 years old today has internet, web, games, linux, robots, arduino, cell phones at his/her fingertips.
13:48 moritz_ araujo: I know that you are talking about a concept
13:48 araujo moritz_, plus recursive fib doesn't take that long
13:48 Matt-W Su-Shee: but it's okay, because they all just sit on MySpace saying 'lol' to each other
13:48 moritz_ araujo: but when teaching concepts, you often need examples
13:49 araujo functional languages get all these algorithms recursively
13:49 moritz_ araujo: and it makes sense to take examples that are well-behaved
13:49 Su-Shee Matt-W: you wish. ;)
13:49 araujo moritz_, i don't see how a recursive fib is bad behaved
13:49 Matt-W And I don't really care how they start out
13:49 moritz_ O(2**n)
13:49 araujo it is how it is done in functional languages, and it works good
13:49 Matt-W As long as they get caught at some point and taught things properly
13:49 Matt-W Or develop the wits to figure it out themselves
13:49 Su-Shee Matt-W: you want them to write good code.
13:49 Matt-W I do
13:49 moritz_ yes, but it works *only* well where the values are automatically memoized
13:49 Matt-W I see so much bad code
13:50 moritz_ so it applies only to a small seet of programming languages
13:50 moritz_ s/seet/set/
13:50 araujo I still think that doesn't matter for teaching recursion really
13:50 moritz_ I think it does, if they want to try it out
13:50 araujo the student can worry further about time complexity
13:51 araujo and this discussion reminds me the Djikstra(sp?) quote about optimization
13:51 Matt-W araujo: you have to teach about the performance implications in certain language classes
13:51 araujo this seems to me like an 'early' optimization in the process of learning
13:51 moritz_ chosing a good example is not an early optimization
13:51 blackdog_ joined #perl6
13:51 Patterner joined #perl6
13:51 charsbar joined #perl6
13:51 huf joined #perl6
13:51 integral joined #perl6
13:51 estrabd joined #perl6
13:51 nnunley joined #perl6
13:52 araujo fib is a good example to explain recursion
13:52 araujo you care about time complexity of the language
13:52 araujo that's pretty much an optimization
13:52 moritz_ heck, I care about time complexity of stuff that I show on the blackboard
13:52 araujo and I think it doesn't matter when you are explaining what recursion is
13:53 moritz_ I don't want a student to say "could you please show an example with fib(10)?"
13:53 unitxt joined #perl6
13:53 mkfort joined #perl6
13:53 dalek joined #perl6
13:53 clkao joined #perl6
13:53 jeekobu joined #perl6
13:53 gabiruh joined #perl6
13:53 Ingmar joined #perl6
13:53 moritz_ and I'll stend the rest of the lecture writing it to the blackboard
13:53 moritz_ for me that's a no-go
13:53 araujo you know that won't happen :)
13:53 moritz_ depends on how smart the students are
13:53 araujo the students are paying attention to what recursion is , not taking the time you spend writing in the blackboard
13:53 moritz_ I don't want to optimize for dumb students
13:54 Su-Shee (and me idiot always thought there's books to actually read up on recursion.. ;)
13:54 Matt-W if the students don't get it after an example for, say, fib(3), writing out fib(10) ain't going to help
13:55 araujo i bet he would get more confused :P
13:55 moritz_ anyway, to me these things matter, which is why I like neither fibs or factorials as an example of "good" recursion
13:55 araujo early optimization are evil
13:55 araujo :P
13:56 moritz_ only if you expose them
13:56 Matt-W I was always taught fib in Haskell as 'this is how we do it in Haskell'
13:56 Matt-W with no particular implication that it would be a good way to do it in any other language
13:56 moritz_ I mean I wouldn't tell the students "now I'm not going to use $this example, because it sucks"
13:56 moritz_ *that* would be premature
13:56 araujo Matt-W, because recursion is a concept .. not a language feature
13:56 Matt-W araujo: no, because I knew it was a shit way to do it in any language without good recursion optimisations and lazy evaluation
13:57 Matt-W but then, brain
13:57 Matt-W not a feature of many of my fellow students
13:58 araujo still, see .. recursion is not a language feature .... just a concept, you can have your compiler or interpreters optimized for it, but i think this goes beyond the recursion concept
13:58 Matt-W the concept is important, yes
13:58 Matt-W but at some point you have to tie it concretely
13:58 araujo I am pretty much talking about learning the concept here
13:58 Matt-W you then have to learn how to apply it
13:58 moritz_ araujo: sure. But there's no good reason to use an example which *requires* optimization to not run abyssimally slow
13:58 Matt-W and when it's appropriate to apply it
13:59 araujo i doubt you will be able to concrete it if you barely understand the concept, so, first learn it well, then you can worry about time complexity and all that stuff
13:59 Matt-W personally I think I'd rather use something like tree processing to show optimisation because it's a lovely way to program
13:59 Matt-W err
13:59 Matt-W to show recursion
13:59 * Matt-W bangs his head on the desk
14:00 moritz_ right, that's a good one
14:00 mikehh does that hurt the poor desk :-}
14:00 araujo moritz_, still, it doesn't matter to teach recursion
14:00 araujo seriously, this stuff doesn't matter to teach recursion
14:00 moritz_ araujo: unless your students want to try it out
14:00 araujo this is early learning process optimization
14:00 moritz_ there are some who learn by analyzing, and others learn by trying out, and observing
14:00 araujo what?, it will take 2 years? :)
14:01 moritz_ I don't see why I should make it harder for the second group
14:01 araujo you are not making it harder to anyone
14:01 frew_ joined #perl6
14:01 moritz_ right, because I'm not using it :-)
14:01 Matt-W har
14:01 araujo i bet that worrying about early time complexity stuff would make it far harder for all the group
14:01 araujo heck
14:01 moritz_ anyway, this discussion doesn't make sense
14:01 araujo I even bet all you want here
14:01 moritz_ araujo: only if share these worries
14:02 Matt-W all I want is a decent programming language
14:02 araujo i can teach faster to a set of new students about recursion with my examples
14:02 * Matt-W cracks his whip
14:02 Matt-W go write rakudo patches!
14:02 araujo than you can with all that time complexity theory
14:02 araujo I bet all man :)
14:02 moritz_ Matt-W: there is no decent programming language (yet)
14:02 Matt-W moritz_: that's why you have to go and write rakudo patches, Perl 6 is the closest we've got
14:02 mikehh Christmas
14:03 Matt-W presumably the Rakudo release for Perl 6.0.0 will be codenamed "Christmas"
14:03 Matt-W I can see it now
14:03 Matt-W "Rakudo release #5,774 "Christmas" now available"
14:04 mikehh hah - far too pesimistic - it will be before #5773
14:05 Su-Shee #2412 to be precise. ;)
14:05 mikehh precision will be 128 bits
14:05 mikehh or even 256?
14:06 moritz_ 2412 fits in 12 bits
14:07 mikehh but you need 24 for all of unicode specification
14:11 mikehh whatever - I better run my tests again - last time was 12 hours ago
14:14 unitxt joined #perl6
14:14 mkfort joined #perl6
14:14 dalek joined #perl6
14:14 clkao joined #perl6
14:14 jeekobu joined #perl6
14:14 gabiruh joined #perl6
14:14 Ingmar joined #perl6
14:25 rfordinal joined #perl6
14:30 SmokeMachine joined #perl6
14:32 alester joined #perl6
14:32 alester joined #perl6
14:34 molaf_x joined #perl6
14:38 finanalyst left #perl6
14:53 Psyche^ joined #perl6
14:56 payload joined #perl6
15:02 justatheory joined #perl6
15:18 tann_ joined #perl6
15:19 dakkar joined #perl6
15:21 donaldh joined #perl6
15:22 PerlJam moritz_: feel free to make any commits to perl6-docs without waiting for approval.
15:22 moritz_ PerlJam: ok
15:22 PerlJam If I disagree with a commit, I can change it myself and we can have a nice discussion about it here :)
15:22 PerlJam (or via email)
15:23 PerlJam oh, and be sure to add your name in there as author.
15:24 moritz_ I will, in the next commit
15:26 rfordinal joined #perl6
15:27 ruoso joined #perl6
15:28 ruoso HellO!
15:28 * ruoso with no time to backlog!
15:29 rfordinal left #perl6
15:40 ab5tract joined #perl6
15:49 moritz_ PerlJam: there, pushed
15:51 moritz_ PerlJam: funnily we both had a commit that moved <ws> out of the char classes section
15:53 jan_ joined #perl6
15:54 PerlJam moritz_++
16:08 cdarroch joined #perl6
16:08 r0bby joined #perl6
16:09 mikehh rakudo (18598d0) builds on parrot r 40392 - make test PASS / make spectest (up to r27864) FAIL - two tests same as before - Kubuntu 9.04 amd64
16:10 mikehh eame two tests FAIL on i386 but also two others pass tests then exit
16:13 colomon joined #perl6
16:21 lionWrk joined #perl6
16:22 hercynium joined #perl6
16:33 tann joined #perl6
16:40 pmichaud good afternoon, #perl6
16:41 Tene Hi, pm!
16:41 moritz_ oh hai pmichaud
16:43 hercynium joined #perl6
16:49 kane_ joined #perl6
16:53 skids_ joined #perl6
16:55 payload joined #perl6
16:58 sparc left #perl6
16:58 pmichaud finally got wireless at the conference :-|
16:59 tann that'll definitely help rakudo sprint to xmas sooner :)
17:05 abra joined #perl6
17:05 SmokeMachine joined #perl6
17:10 Front_slash joined #perl6
17:11 abra joined #perl6
17:12 dakkar joined #perl6
17:13 colomon joined #perl6
17:21 colomon Hello?
17:21 moritz_ hello.
17:21 colomon I
17:22 colomon I've nothing useful to say, just upgraded my IRC client and was startled by the utter quiet.  :)
17:22 Tene Hi!
17:22 Su-Shee *hihi* no, nothing broken. ;)
17:23 dakkar_ joined #perl6
17:25 tann pugs: multi sub qsort() { () }; multi sub qsort(*$p, *@l) { (qsort(grep { $_ < $p }, @l), $p, qsort(grep {$_ >= $p }, @l)) }; say qsort(5, 3, 4, 2, 1);
17:25 p6eval pugs:  ( no output )
17:25 moritz_ pugs: say 1
17:25 p6eval pugs: OUTPUT«1␤»
17:25 tann rakudo: multi sub qsort() { () }; multi sub qsort(*$p, *@l) { (qsort(grep { $_ < $p }, @l), $p, qsort(grep {$_ >= $p }, @l)) }; say qsort(5, 3, 4, 2, 1);
17:25 p6eval rakudo 18598d:  ( no output )
17:27 tann ^^^...i got a recursion error with the latest rakudo/parrot on my local box
17:29 lionWrk joined #perl6
17:29 moritz_ I could well imagine that *$p is not (properly) implement
17:29 tann moritz: looks like it
17:30 moritz_ does it need to be slurpy at all?
17:30 tann the first call $p is assigned the correct value
17:30 tann when 2nd invocation (from the recursion), it gets assigned the value of the rest of the list
17:30 tann which is wrong or that i didn't do it right
17:31 moritz_ it seems to recurse on the empty list
17:31 tann yes
17:31 tann b/c *$p slurps it up on the 2nd call
17:31 moritz_ rakudo: mult a (*@b) { 1 }; multi a() { 2 }; say a()
17:32 p6eval rakudo 18598d: OUTPUT«Statement not terminated properly at line 2, near "@b) { 1 };"␤in Main (src/gen_setting.pm:3363)␤»
17:32 moritz_ rakudo: multi a (*@b) { 1 }; multi a() { 2 }; say a()
17:32 p6eval rakudo 18598d: OUTPUT«Ambiguous dispatch to multi 'a'. Ambiguous candidates had signatures:␤:(Object *@b)␤:()␤in Main (/tmp/ib3fNWf9c7:2)␤»
17:32 moritz_ rakudo: multi a (*$p, *@b) { 1 }; multi a() { 2 }; say a()
17:32 p6eval rakudo 18598d: OUTPUT«2␤»
17:33 moritz_ rakudo: multi a (*$p, *@b) { 1 }; multi a() { 2 }; my @c = (); say a(|@c)
17:33 p6eval rakudo 18598d: OUTPUT«2␤»
17:33 moritz_ rakudo: multi a ( *@b) { 1 }; multi a() { 2 }; my @c = (); say a(|@c)
17:33 p6eval rakudo 18598d: OUTPUT«Ambiguous dispatch to multi 'a'. Ambiguous candidates had signatures:␤:(Object *@b)␤:()␤in Main (/tmp/8WLZhb7D89:2)␤»
17:34 lisppaste3 moritz_ pasted "This works in Rakudo right now (quicksort)" at http://paste.lisp.org/display/84678
17:37 colomon Wouldn't it be simpler and more efficient to just use "pick" to get a pivot element?
17:38 moritz_ colomon: feel free to try it
17:38 colomon Fair enough!
17:39 PerlJam efficient?
17:39 moritz_ I don't think it'll be more efficient; I'tt just amek it harder to come up with degenerate examples that run in O(n²)
17:40 moritz_ and I think the point of this qsort ist to demonstrate the power of signatures in Perl 6
17:40 moritz_ not a fast sort algorithm
17:41 colomon Randomizing the pivot is certainly not a cure-all, but it's generally better than just taking the first element as pivot, no?
17:41 colomon beside, I'm still besotted with the pick command.  :)
17:41 PerlJam yes.  To avoid the degenerate behavior.
17:42 colomon moritz_: I think the power of signatures is what I'm missing from your example -- I don't quite understand what it is doing.
17:42 PerlJam colomon: but once you factor in the time to run pick, you may find that your quick sort isn't as quick as you would like
17:44 colomon Is the $p parameter needed because slurpy (*@l) cannot be distinguished from ()?
17:45 PerlJam colomon: but it can!
17:46 colomon Ambiguous dispatch to multi 'qsort'. Ambiguous candidates had signatures:
17:46 colomon :()
17:46 colomon :(Any *@l)
17:46 PerlJam (or should be able to :)
17:46 colomon Certainly feel better if that is a bug/NYI rather than a design limitation!
17:50 lisppaste3 colomon pasted "qsort with pick" at http://paste.lisp.org/display/84679
17:52 PerlJam colomon: where are the timings at?!?  ;)
17:53 colomon nowhere, since it gives the error I pasted above.  :)
17:53 colomon sorry, I meant to say something like "Does this code look correct?" after I pasted that.
17:54 moritz_ no
17:54 moritz_ you should not pass the pivot element on to the recursive calls
17:55 moritz_ if you do, there might be calls which don't reduce the number of items passed to the next recursive call
17:55 colomon I see, the second grep is off.
17:55 moritz_ just test your script with the list (4, 4, 4) and see what happens
17:55 moritz_ no
17:56 colomon I meant correct in terms of Perl syntax, as Rakudo barfs on it now.
17:56 PerlJam rakudo can tell you if the syntax is right.  It's the semantics you're having difficulty with.
17:57 moritz_ if you change it from >= to > then duplicate elements will be filtered out
17:57 moritz_ not nice for a sort routine
17:59 colomon moritz_: yes, I see that is an advantage of taking the first argument as pivot in your code, and thereby removing it from the list.
18:00 moritz_ (not my code, I merely adapted it)
18:00 colomon But at the moment, I'm more worried about the fact I got an error when I tried this code rather than an infinite loop.
18:15 lisppaste3 colomon pasted "qsort with shift instead of pick" at http://paste.lisp.org/display/84680
18:16 colomon There, I've used shift instead of pick in an effort to clean up errors in the algorithm.  This still fails with the "Ambiguous dispatch" error.  Should it work?
18:16 PerlJam colomon: btw, if you want to do a value-based constraint, you need to use a where clause.  Otherwise you never will call your no-arg qsort.  (that's why you have to use |() to get it to work even)
18:19 colomon PerlJam: ???? Where am I trying to do a value-based constraint?
18:19 moritz_ rakudo sees () and (*@a) as conflicting when doing dispatch on an empty list
18:20 moritz_ you could use (*@a where { @a.elems > 0 }) to disambiguate
18:23 colomon Is that a rakudo limitation or a Perl 6 limitation?
18:23 moritz_ I'm not sure
18:23 moritz_ jnthn is our dispatch expert
18:24 payload joined #perl6
18:24 PerlJam IMHO,  qsort(@some_thing_that_may_be_empty), should *never* dispatch to multi qsort() { ... }
18:25 moritz_ rakudo: multi a ($x) { 1 }; multi a (*@x) { 2 }; say a(3)
18:25 p6eval rakudo 18598d: OUTPUT«1␤»
18:25 moritz_ PerlJam: sounds right (unless you put a | in front)
18:25 PerlJam right
18:33 kane_ joined #perl6
18:33 colomon rakudo: multi a () { 1 }; multi a (*@x) { 2 }; say a();
18:33 p6eval rakudo 18598d: OUTPUT«Ambiguous dispatch to multi 'a'. Ambiguous candidates had signatures:␤:()␤:(Object *@x)␤in Main (/tmp/8uPi9JrI7p:2)␤»
18:36 PerlJam colomon: how about you rakudobug that?  :)
18:36 colomon I'm happy too, if you guys are reasonably confident it is a bug!
18:36 zamolxes joined #perl6
18:38 eMaX joined #perl6
18:38 athomason joined #perl6
18:39 colomon s/too/to/
18:40 Su-Shee ok, coding perl 5 and perl 6 is really nasty with the sigil-hash/array change.
18:41 moritz_ Su-Shee: welcome to the club ;-)
18:41 PerlJam colomon: I  think it's a bug, but what do I know?  If it *isn't* a bug though, a bug report is likely to get some sort of ruling on that  :)
18:42 Su-Shee moritz_: I stared 10 minutes on the code. hilighted. I plainly don't see it anymore.
18:42 colomon Su-Shee: That's why I'm doing my best to only work in Perl 6 these days.  :)
18:44 Su-Shee yeah, having also sql, css, javascript and html in the mix isn't helping very much...
18:44 Su-Shee <-- is glad having learned "web" the old way.. this is insane nowadays...
18:49 tann Su-Shee: that's itneresting...the hash/array change just comes natural to me..in fact, i had a hard time to understand why you have to switch to $ when dealing with hash/array elements when i first picked up perl..i thought that was *stupid* :)) blame my old mind
18:51 iblechbot joined #perl6
18:52 kthakore joined #perl6
18:52 Su-Shee tann: it really does come naturally - that's because I make the mistake in perl 5.
18:52 Su-Shee in perl 6 I'm fine. :)
18:52 Su-Shee "because of that" that way around :)
18:55 colomon PerlJam: seems this case is somewhat explicitly NOT tested....
18:56 lisppaste3 colomon pasted "from S06-multi/type-based.t" at http://paste.lisp.org/display/84683
19:06 jauaor joined #perl6
19:26 ruz_mac joined #perl6
19:33 TimToady_ joined #perl6
19:33 buu_ joined #perl6
19:34 c1sung_ joined #perl6
19:34 ingyfoo joined #perl6
19:38 hercynium joined #perl6
19:47 payload joined #perl6
19:53 justatheory joined #perl6
19:57 IRSeekBot joined #perl6
19:59 kane___ joined #perl6
20:01 jauaor joined #perl6
20:02 freenose joined #perl6
20:10 ivast joined #perl6
20:17 buu joined #perl6
20:19 M_o_C joined #perl6
20:33 cogno joined #perl6
20:48 eternaleye colomon: Couldn't you disambiguate as multi qsort( *@l where { @l.elems > 0 } ) {...} ?
20:50 colomon eternaleye: Yes, but this isn't a showstopper for a program I was trying to write -- it's something that I stumbled across when playing around.  And it certainly seems like it would be much more elegant if it did work...
21:00 Whiteknight joined #perl6
21:05 zamolxes joined #perl6
21:06 Trey joined #perl6
21:16 frettled Are all these people connecting and disconnecting at the Radisson in Lisbon?  :D
21:17 Su-Shee filter it. :)
21:19 tann rakudo: my @a = (1..100).pick(10); my @sorted_aliases := @a.sort; say "min: @sorted_aliases[0]"; say @a.perl; @sorted_aliases[0]++; say @a.perl;
21:19 p6eval rakudo 18598d: OUTPUT«min: @sorted_aliases[0]␤[29, 76, 64, 4, 50, 82, 66, 31, 7, 47]␤[29, 76, 64, 5, 50, 82, 66, 31, 7, 47]␤»
21:20 tann perl6++
21:24 PerlJam aside from the rakudo interpolation fail there, rakudo++ too
21:25 donaldh joined #perl6
21:34 frettled Su-Shee: oh, it's merely an observation regarding the quality (or lack thereof) of the wireless network at the hotel; they have multiple access points with the same SSID and roaming enabled, combined with lousy signal from all of them.
21:39 Su-Shee frettled: I have to admit that all the joining and leaving and ping time-outing is that annoying that I filter it in irssi.
21:39 Su-Shee frettled: so to me it all looks very quiet :)
21:41 frettled Su-Shee: aha :)
21:41 moritz_ same here
21:41 frettled I don't, in case I end up speaking into thin air
21:43 maja joined #perl6
21:51 ivast joined #perl6
22:01 Su-Shee left #perl6
22:04 justatheory joined #perl6
22:14 ruoso joined #perl6
22:15 ruoso hello!
22:16 masak joined #perl6
22:16 masak olà, #perl6.
22:16 phenny masak: 02 Aug 21:25Z <eternaleye> tell masak The Astaire docs have an error: the useragent example has :agent => /regex/ - the colons don't belong IIUC
22:16 payload this produces a big bad bug http://pastebin.com/m496b44f8
22:16 masak eternaleye: thank you.
22:18 masak from what I understand of named arguments, the colon has to be there, but it should be :agent(/regex/) -- fixed it that way.
22:19 blackdog joined #perl6
22:34 cognominal ./perl6  -e 'class A { method a { 'b'  } };  A.a'
22:34 cognominal Could not find non-existent sub b
22:34 cognominal I don't get it
22:35 masak colomon: looks like you're using apostrophes inside your apostrophe-delimited -e script.
22:35 masak sorry, cognominal, I mean.
22:35 masak cognominal: so it would be read as a subroutine call.
22:35 cognominal oops. I am so stooopide
22:35 masak cognominal: no, it's a natural mistake. :)
22:36 cognominal I should know, I make it so often :(
22:36 colomon masak: no worries, though it was a bit startling to learn I was screwing up my programming even when just reading Shadow Unit and contemplating what to cook for dinner.
22:36 masak colomon: sorry again. :)
22:37 colomon masak: I've done enough stupid things on this board in the last two weeks to make it a natural mistake.  :)
22:37 masak :)
22:38 masak no now we have colomon/cognomial, pmichaud/pmurias, and moritz_/masak...
22:38 masak people should spread out more in the nick space. :P
22:39 cognominal there is cog, too,  but not here
22:39 cognominal ./perl6  -e 'grammar A { token a { a } }; say "a" ~~ A.a()'
22:39 cognominal Null PMC access in get_integer()
22:40 cognominal That would be nice to have grammar working. Or am I still making a mistake?
22:40 masak cognominal: yes.
22:41 cognominal ??
22:41 masak rakudo: grammar A { token a { a } }; say "a" ~~ /<A::a>/
22:41 p6eval rakudo 18598d: OUTPUT«a␤»
22:41 cognominal cool
22:41 masak there you go.
22:41 masak grammars work quite well, actually.
22:41 cognominal need to brush up my skills
22:41 * masak submits rakudobug
22:42 cognominal I wonder what I said is supposed to mean :)
22:42 masak rakudo: grammar A { token a { a } }; A.a()
22:43 p6eval rakudo 18598d: OUTPUT«Null PMC access in get_integer()␤in regex A::a (/tmp/rRW77eM8AK:2)␤called from Main (/tmp/rRW77eM8AK:2)␤»
22:43 masak rakudo: token a { a }; a()
22:43 p6eval rakudo 18598d: OUTPUT«too few arguments passed (0) - 2 params expected␤in regex a (/tmp/W3so9Hy1r0:1)␤called from Main (/tmp/W3so9Hy1r0:2)␤»
22:53 freenose left #perl6
22:54 mikehh_ joined #perl6
23:01 ancients joined #perl6
23:15 jferrero joined #perl6
23:20 eternaleye masak: re colons, either :agent(/regex/) or agent => /regex/ is a named argument, while 'agent' => /regex is a positional Pair
23:21 masak eternaleye: ah. aye, that sounds familiar.
23:21 masak I still haven't internalized that.
23:23 gbacon joined #perl6
23:33 ihrd joined #perl6
23:34 zamolxes joined #perl6
23:44 mberends joined #perl6
23:44 SmokeMachine joined #perl6

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

Perl 6 | Reference Documentation | Rakudo