Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-11-04

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:03 pedrob joined #perl6
00:11 wayland76 joined #perl6
00:11 wayland76 Has anyone seen a USB version of the Space Cadet keyboard?
00:17 avar joined #perl6
00:33 fleebailey33 joined #perl6
00:33 avar joined #perl6
00:37 pedrob joined #perl6
00:46 meppl good night
00:51 spx2 joined #perl6
00:53 spx2 has anyone tried automating AJAX-pages for scraping with this for example http://htmlunit.sourceforge.net/ ?
00:53 lambdabot Title: HtmlUnit - Welcome to HtmlUnit
00:57 hercynium joined #perl6
01:10 alester joined #perl6
01:19 wayland76 Not I (said the little ed hen)
01:20 wayland76 (in response to spx2
01:35 bacek_ pugs: say one('a','b','c') eq 'a'
01:35 p6eval pugs: OUTPUT[one(VBool True)␤]
01:35 bacek_ pugs: if (one('a','b','c') eq 'a') say { "foo" } else { say "bar" }
01:35 p6eval pugs: OUTPUT[*** ␤    Unexpected "say"␤    expecting operator or bare or pointy block construct␤    at /tmp/T0q4P16ZR6 line 1, column 30␤]
01:36 bacek_ pugs: if (one('a','b','c') eq 'a') { say "foo" } else { say "bar" }
01:36 p6eval pugs: OUTPUT[foo␤]
01:36 bacek_ rakudo: if (one('a','b','c') eq 'a') { say "foo" } else { say "bar" }
01:36 p6eval rakudo 32323: OUTPUT[foo␤]
01:39 bacek_ pugs: say ~(one('a','b','c'))
01:39 p6eval pugs: OUTPUT[one(VStr "a",VStr "b",VStr "c")␤]
01:39 bacek_ pugs: say ?(one('a','b','c'))
01:39 p6eval pugs: OUTPUT[one()␤]
01:39 bacek_ pugs: say ?(one('a',Bool::True))
01:39 p6eval pugs: OUTPUT[one()␤]
01:39 bacek_ pugs: say ?(any('a',Bool::True))
01:39 p6eval pugs: OUTPUT[any(VBool True)␤]
01:49 bacek_ perl6: if (Bool::True&Bool::False) { say "foo" } else { say "bar" }
01:49 p6eval pugs: OUTPUT[bar␤]
01:49 p6eval ..elf 22847, rakudo 32323: OUTPUT[foo␤]
01:50 bacek_ heh. nailed
01:54 eternaleye joined #perl6
01:55 bacek_ msg masak 'if (Bool::True&Bool::False) { say "foo" } else { say "bar" }' - root of almost all problems with Junctions...
01:59 bacek_ perl6: my $j=Bool::True&Bool::False; while ($j) { say "foo"; $j = Bool::False }; say "bar"
01:59 [particle]1 joined #perl6
01:59 p6eval rakudo 32323: OUTPUT[foo␤bar␤]
01:59 p6eval ..pugs: OUTPUT[bar␤]
01:59 p6eval ..elf 22847:
01:59 p6eval ..OUTPUT[foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤​foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤f​oo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤fo​o␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo​␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤​foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo��
01:59 bacek_ elf--
02:05 alester joined #perl6
02:05 jhorwitz_ joined #perl6
02:06 alech_ joined #perl6
02:11 hercynium joined #perl6
02:11 fleebailey33 joined #perl6
02:11 wknight8111 joined #perl6
02:11 jhorwitz joined #perl6
02:11 aindilis joined #perl6
02:11 sri_kraih_ joined #perl6
02:11 lambdabot joined #perl6
02:11 yahooooo3 joined #perl6
02:11 szbalint joined #perl6
02:11 audreyt joined #perl6
02:11 Maddingue joined #perl6
02:12 szbalint joined #perl6
02:12 aindilis joined #perl6
02:13 sri_kraih joined #perl6
02:23 fleebailey33 joined #perl6
03:28 Ontolog joined #perl6
03:49 Psyche^ joined #perl6
03:52 hercynium joined #perl6
04:19 bacek joined #perl6
04:31 Alias_ joined #perl6
04:43 z80ASM joined #perl6
04:56 alc joined #perl6
05:07 adc_Penner joined #perl6
05:23 * wayland76 has not quit
05:26 TimToady @tell masak there will certainly be some method for asking an IO handle how many chunks it has returned.  alternately, an input line could be decorated with some kind of chunk number property
05:26 lambdabot Consider it noted.
05:28 wayland76 TimToady!!!
05:28 wayland76 (Sorry, I'm in a good mood :)
05:28 wayland76 I'm working on a Perl keyboard layout
05:29 wayland76 So far, it seems the best way is to use two keyboards :)
05:29 wayland76 :)
05:49 literal !#$%&*/()[]{}<> as home keys?
05:49 wayland76 No, that's the swearing keyboard :)
05:50 wayland76 My basic idea at the moment is that you put one hand on each keyboard, and then have all the punctuation and stuff around the place
05:50 wayland76 ie. all those perl unicode symbols
05:51 wayland76 I want it to also appeal to a) programmers other than Perl, b) Mathematicians and Scientists (Greek letters and maths symbols), and c) people who write Western european languages :)
05:52 wayland76 Oh, and leave room to have another language on there too, so that it can also appeal to Biblical scholars (already has Greek, and they can order the Hebrew option :) )
05:53 literal all those Perl unicode symbols?
05:53 wayland76 rakudo: $fh = open("dev/null"); @lines = $fh.lines();
05:53 p6eval rakudo 32324: OUTPUT[No handler to delete.␤current instr.: 'parrot;PAST;Compiler;as_post' pc 6024 (src/PAST/Compiler.pir:1651)␤]
05:53 literal those aren't that many if I recall
05:53 wayland76 well, the << and >> anyway
05:53 wayland76 yeah, there aren't but if I also include the set operators, someone will no doubt make a module that uses them :)
05:54 literal on my layout it's just altgr+z(«) and altgr+x(») :P
05:54 wayland76 Also want an easy way to input unicode characters :)
05:54 literal set operators?
05:54 wayland76 literal: Well, not on my layout :)
05:55 literal have you tried a nodeadkeys variant?
05:55 literal that would surely have «» somewhere
05:57 wayland76 I had a look for the set operators.  I always use a font named SimPL when hunting for mathematical operators
05:57 wayland76 because it has them :)
05:57 wayland76 Yeah, found the «» operators :)
05:57 wayland76 On the [] keys :)
05:57 wayland76 I made my own keyboard layout, so it has strange stuff on it :)
05:59 wayland76 I'm trying to figure out if rakudo does IO.lines() yet
05:59 wayland76 Do I have to use IO or something?
06:01 wayland76 Don't worry, I worked around it :)
06:12 wayland76 Is undef.++ going to be implemented eventually?
06:13 wayland76 rakudo: $count++
06:13 p6eval rakudo 32324: OUTPUT[No handler to delete.␤current instr.: 'parrot;PAST;Compiler;as_post' pc 6024 (src/PAST/Compiler.pir:1651)␤]
06:15 wayland76 rakudo: [1, 3, 2].sort()
06:16 p6eval rakudo 32324: RESULT[[1, 2, 3]]
06:16 literal rakudo: undef.perl
06:16 p6eval rakudo 32324: RESULT["undef"]
06:28 justatheory joined #perl6
06:57 jauaor joined #perl6
07:01 ashizawa joined #perl6
07:13 eternaleye joined #perl6
07:16 zamolxes joined #perl6
07:37 fronty joined #perl6
07:40 fronty joined #perl6
07:48 pbuetow joined #perl6
08:05 xinming_ joined #perl6
08:13 elmex joined #perl6
08:23 alc joined #perl6
09:03 tomyan joined #perl6
09:16 jferrero joined #perl6
09:20 schmalbe joined #perl6
09:21 Bzek joined #perl6
09:22 smg joined #perl6
09:34 ejs joined #perl6
10:08 spx2 joined #perl6
11:45 hanekomu joined #perl6
11:56 smg joined #perl6
12:06 iblechbot joined #perl6
12:11 araujo joined #perl6
12:19 fleebailey33 joined #perl6
12:25 sri_kraih joined #perl6
12:29 nipotan_ joined #perl6
12:55 pugs_svn r22865 | jnthn++ | [spectest] Some tests for smart-matching a regex against an array and a hash.
12:57 nipotan__ joined #perl6
13:09 pmurias joined #perl6
13:09 pmurias @messages
13:09 lambdabot mncharity said 20d 19h 6m 26s ago: re mildew as duplication (last night), I was wrong. eg, elf doesn'
13:09 lambdabot ruoso said 18h 41m 7s ago: how do you keep track of which mold frame registers you use? should it just generate a random name for them and expect a later optimization that would consolidate the
13:09 lambdabot usage?
13:14 pmurias @tell ruoso i just use a register with a unique name, good register allocation in none-trivial and will be done by an optimalisation pass
13:14 lambdabot Consider it noted.
13:21 pugs_svn r22866 | jnthn++ | [spectest] Add test for anonymous enums.
13:26 jferrero left #perl6
13:28 pugs_svn r22867 | jnthn++ | [spectest] Test for the case where a named enum has a single value, plus test export of declared enum values.
13:42 diakopter wayland76: space bar as modifier key?
14:01 Ontolog joined #perl6
14:17 adc_Penner joined #perl6
14:36 ejs joined #perl6
14:39 pedrob joined #perl6
14:40 Exodist joined #perl6
14:53 jhorwitz joined #perl6
15:19 Igno- joined #perl6
15:26 rindolf joined #perl6
15:43 aindilis joined #perl6
15:48 TJCRI joined #perl6
15:52 alc joined #perl6
16:23 justatheory joined #perl6
16:23 braceta joined #perl6
16:24 azawawi joined #perl6
16:24 azawawi hi
16:34 pugs_svn r22868 | jnthn++ | [spectest] Unfudge a test that Rakudo now passes.
16:34 z80ASM joined #perl6
16:37 jhorwitz_ joined #perl6
16:44 schmalbe joined #perl6
16:49 alester joined #perl6
16:56 pugs_svn r22869 | jnthn++ | [spectest] Some fudging/unfudging to add another test to Rakudo.
16:58 pmurias joined #perl6
16:59 pugs_svn r22870 | moritz++ | [t/spec] tests for @() context forcers, patch courtesy by rindolf++
16:59 pugs_svn r22870 | moritz++ | (plus precedence corrections)
17:01 moritz_ svn--
17:01 moritz_ I just did a propset commit, and it failed because the server did not respond
17:01 moritz_ now it says I have no local changes (ie another 'svn ci' does nothing)
17:03 ejs joined #perl6
17:04 pmurias svn is a bit strange ;)
17:05 hercynium joined #perl6
17:05 pugs_svn r22871 | moritz++ | [t/spec] fudge newly added tests
17:06 moritz_ pugs_svn: that's nicely phrased :)
17:06 moritz_ erm, pmurias I meant
17:06 moritz_ p<tab> isn't all that reliable ;)
17:09 [particle]1 it's never *your* fault, moritz, is it? :P
17:09 moritz_ [particle]: oof course not. How could it? ;-)
17:09 moritz_ ususally I write the first two letters of a name, and then press tab
17:10 moritz_ (but that doesn't work with pm<tab>, because we have two pm<tab>s frequenting the channel) ;)
17:11 moritz_ but in the case of svn, I fail to see how it could be my fault
17:15 meppl joined #perl6
17:16 meppl good evening
17:16 pugs_svn r22872 | moritz++ | [t/spec] fix bad plan in boolean-context.t
17:17 [particle] are there any expected spectest failures now, jonathan?
17:17 [particle] i'm seeing failures in S03-junctions/boolean-context.t
17:17 [particle] and -junctions/misc
17:18 [particle] hee, moritz++
17:18 moritz_ the three failures in misc.t are because masak++ reverted some changes to rakudo without reverting the corresponding spectest changes
17:19 moritz_ but since the reversion didn't fix what he thought it would, I'm not sure what to do - re-fudge the tests, or re-comit the changes?
17:19 [particle] ok, so i'll ignore those in my review of my local changes
17:19 [particle] if the reversion is a regression, it's not a proper reversion. revert it so we stop regressing.
17:19 [particle] :)
17:23 moritz_ [particle]: if you feel like you understand what's going on, revert the appropriate change ;)
17:24 moritz_ or better, the inappropriate change ;)
17:24 [particle] :)
17:27 pugs_svn r22873 | azawawi++ | [STD_syntax_highlight] re-factored --simple-html for easier support of
17:27 pugs_svn r22873 | azawawi++ | [STD_syntax_highlight] future output formats
17:28 pedrob joined #perl6
17:29 [particle] t\spec\S12-class\namespaced..........​.....................Method 'baz' not found for invocant of class 'Foo;Bar'
17:29 delrico left #perl6
17:30 moritz_ it works here (no local modifications)
17:38 pugs_svn r22874 | azawawi++ | [STD_syntax_highlight] more refactorings... --full-html and --simple-html
17:45 pugs_svn r22875 | azawawi++ | [STD_syntax_highlight] smaller code, refactored --ansi-text
17:48 pugs_svn r22876 | azawawi++ | [STD_syntax_highlight] more code cleanups
17:52 cognominal joined #perl6
17:59 ruoso joined #perl6
17:59 fridim_ joined #perl6
17:59 jferrero joined #perl6
18:00 ruoso Hello!
18:00 lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
18:05 pugs_svn r22877 | azawawi++ | [STD_syntax_highlight] implemented --snippet-html. Enjoy ;-)
18:06 azawawi hi ruoso
18:07 azawawi *: any preference on how YAML is formatted from STD_syntax_highlight?
18:08 [particle] i prefer delimited over indented
18:09 [particle] but that may just be me
18:09 masak joined #perl6
18:09 azawawi [particle]: can u give me a more specific example?
18:09 azawawi hi masak
18:10 masak azawawi: hi azawawi
18:10 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
18:10 masak @messages
18:10 lambdabot TimToady said 12h 43m 22s ago: there will certainly be some method for asking an IO handle how many chunks it has returned. alternately, an input line could be decorated with some kind of chunk
18:10 lambdabot number property
18:10 masak TimToady: yes, I assumed as much.
18:12 [particle] syntax: [ !scope_declarator 'my', !ws ' ', !sigil '$', !variable 'foo', ... ]
18:13 [particle] azawawi: i'm assuming the node types will be stored as yaml type info
18:13 [particle] oh, and btw your coloring misses param_var
18:14 smg joined #perl6
18:15 pugs_svn r22878 | azawawi++ | [STD_syntax_highlight] better pod, added an explanation for redspans
18:16 azawawi [particle]: param_var, i dont see a css rule for it.
18:17 moritz_ that's why it's missing ;)
18:17 azawawi moritz_++
18:17 azawawi ;-)
18:17 azawawi moritz_: --snippet-html is ready
18:18 moritz_ azawawi: nice ;)
18:18 azawawi moritz_: i wanted to rename it as --very-simple-html then i resisted the urge ;-)
18:19 moritz_ .oO( too simple html)
18:20 azawawi moritz_: it would be nice if we had a bot to 'highlight:' and send the output to sial.org
18:20 [particle] azawawi: a simple example like 'my $x; foo($x);' will show you the difference in highlighting between variables and param_vars
18:23 azawawi [particle]: i dont see a 'param_vars' from redspans
18:24 [particle] y/s//
18:26 pasteling "azawawi" at 212.38.153.104 pasted "redspans output for 'my $x; foo($x);'" (39 lines, 1.8K) at http://sial.org/pbot/33040
18:27 azawawi [particle]: no param_var in previous pasteling...
18:30 [particle] silly me. sub foo($x) {...}
18:30 [particle] my $x; sub foo($x) {...} # to be precise
18:31 Jedai joined #perl6
18:33 TimToady I also noticed that method unitstop was highlighting unitstop as role unitstop instead of a method name.
18:42 stephenos joined #perl6
18:45 cathyal joined #perl6
18:46 pugs_svn r22879 | azawawi++ | [STD_syntax_highlight] param_var now works. [particle]++
18:48 * azawawi is running out from web-safe colors ;-)
18:49 TimToady I also tend to not like my quotes to be the same color as most everything else...
18:49 masak .oO( outstanding quotes )
18:49 REPLeffect joined #perl6
18:50 TimToady .oO(in other words, most of my quotes are off color...)
18:50 masak :)
18:50 azawawi ;-)
18:52 TimToady well, to be more precise, my quoted strings.  I don't actually care what color the quotes themselves are...
18:52 azawawi moritz_: regarding using STD_syntax_highlight over CGI; can we secure it by removing the 'lex' directory?
18:53 moritz_ azawawi: STD.pm doesn't work without lex/
18:53 TimToady in theory, it could, but slowly
18:53 TimToady since it would have to regen in-core lexers every time
18:54 moritz_ don't think it's worth the trouble
18:54 TimToady maybe some way of having a read-only lex directory
18:54 ruoso TimToady, is there a way to output a frozen STD with its lex?
18:54 [particle] ala Storable?
18:54 ruoso yeah... maybe that...
18:55 TimToady not currently
18:56 TimToady and lex/ could still use about 100x of compression in any case
18:56 ruoso TimToady, thinking on a serialize format for STD is something that is going to be usefull in a near future
18:56 ruoso just like serializing any other type of package
18:56 TimToady I'll get a fair amount of compression when I give TRE the boot
18:57 * azawawi listens carefully and drinks coffee...
18:57 pbuetow joined #perl6
18:58 TimToady certainly it will be to our advantage to have a version of STD that comes with common languages pre-lexed.
18:59 bacek pugs: if (none(Bool::True,Bool::False)) { say "foo" } else { say "bar" }
19:00 p6eval pugs: OUTPUT[bar␤]
19:00 bacek pugs: if (none(Bool::True)) { say "foo" } else { say "bar" }
19:00 p6eval pugs: OUTPUT[bar␤]
19:00 TimToady but at the moment, including the common lexers runs you about .5GB
19:00 [particle] eek!
19:01 TimToady and that's just disk space
19:01 TimToady well, a couple weeks ago it was about 4 GB, so we've got a 9x improvement already
19:02 TimToady and bzip indicates there's about 200x worth of redundant info there at the moment
19:02 TimToady most of it is there for the purpose of faking out TRE into working
19:06 azawawi moritz_: where can i find the code for various p6 bots?
19:07 moritz_ p6eval lives in misc/evalbot/
19:07 moritz_ polyglotbot (in #parrot) is a fork of that, I think
19:08 azawawi moritz_: thx
19:12 pugs_svn r22880 | jnthn++ | [spectest] Unfudge an enum test that we can now pass in Rakudo.
19:19 mberends_ joined #perl6
19:22 kisu joined #perl6
19:32 pugs_svn r22881 | azawawi++ | [STD_syntax_highlight] implemented --yaml, [particle]++
19:35 kisu joined #perl6
19:44 jan_ joined #perl6
19:53 ruoso @tell pmurias with some help of #p5p people, I'm starting the p5 smopp5 branch in the gitorious public git hosting... http://gitorious.org/projects/smopp5
19:53 lambdabot Consider it noted.
19:54 sri_kraih joined #perl6
20:05 masak pugs: say ?(Bool::True&Bool::False)
20:05 p6eval pugs: OUTPUT[all(VBool False,VBool True)␤]
20:05 masak ok, adding a test that checks against this (faulty) behaviour
20:06 masak would `ok ?(Bool::True & Bool::False) == Bool::False` cut it?
20:06 moritz_ I think so, yes
20:06 * masak makes it so
20:06 moritz_ or ok ?(Bool::True & Bool::False) !~~ Junction
20:07 masak ooh
20:07 moritz_ if you wan tto be explicit
20:07 masak how about both?
20:07 moritz_ (many tests)++
20:07 masak 'xactly.
20:08 azawawi @tell [particle] --yaml for STD_syntax_highlight is done
20:08 lambdabot Consider it noted.
20:09 masak perl6: say (!(Bool::True & Bool::False)).perl
20:09 p6eval elf 22847: OUTPUT[␤]
20:09 p6eval ..pugs: OUTPUT[*** ␤    Unexpected " Bool"␤    expecting "::"␤    at /tmp/SDrlsBNFjq line 1, column 20␤]
20:09 p6eval ..rakudo 32343: OUTPUT[all("0", "1")␤]
20:10 masak should the real answer be 'Bool::False'?
20:11 moritz_ no, Bool::True
20:11 * masak still cannot reliably do junctive algebra in his head
20:11 pugs_svn r22882 | azawawi++ | [STD_syntax_highlight] print->say
20:11 pugs_svn r22882 | azawawi++ | [STD_syntax_highlight] an STD.pm sanity check [masak++]
20:11 pedrob joined #perl6
20:11 masak moritz_: because False&True collapses to False, which is then negated?
20:11 moritz_ masak: right
20:12 masak moritz_: because of all(), right. were it any(), the final answer'd been True, yes?
20:12 moritz_ masak: !any(1, 0) is 0
20:13 moritz_ because ?any(1, 0) collapses to 1, and the ! negates to 0
20:13 masak moritz_: oh, of course.
20:13 masak I meant that, just confused myself on the way.
20:13 moritz_ I thought so, yes ;)
20:13 masak 谢谢。
20:17 masak interested follow-up question: when dealing with junctions, when can I _not_ be sure that if I do ?(...) I get one boolean reply and if I do !(...) I get the other?
20:18 masak I know we talked about this yesterday, but... I need the repetition.
20:19 pugs_svn r22883 | azawawi++ | [STD_syntax_highlight] ETOOMUCHTIME now checks your LANG variable for .UTF-8 suffix
20:21 * azawawi is feeling bored ;-)
20:21 moritz_ azawawi: write more tests ;)
20:22 masak azawawi: check out November and try getting it running ;)
20:22 moritz_ masak: jonathan++ fixed precompiled modules today, at least one commit message said that...
20:23 masak moritz_: aye. means we can do a server upgrade again.
20:23 masak I haven't tried it yet. but if true, it's excellent news.
20:24 moritz_ oh, and Namespaces::With::Double::Colons should work again
20:24 masak low-hanging fruit for someone, then. patches welcome :)
20:25 masak (be sure to actually try running the wiki before sending the patch to the list.)
20:25 azawawi moritz_: how do i generate IRC colors that are reliable to work on most clients?
20:26 moritz_ azawawi: dunno. What do you need that for?
20:26 azawawi moritz_: for 'p6_hilite: my $foo = <a b c>;'
20:27 moritz_ azawawi: don't. please ;)
20:27 azawawi moritz_: why? ;-)
20:28 masak pugs: say (?(1&0)).perl
20:28 p6eval pugs: OUTPUT[(Bool::False & Bool::True)␤]
20:29 moritz_ azawawi: because colors are annoying, and should be the clients choice
20:29 pugs_svn r22884 | masak++ | [t/spec/S03-junctions/boolean-context.t]
20:29 pugs_svn r22884 | masak++ | * added tests checking for the following Pugs bug:
20:29 pugs_svn r22884 | masak++ | ** <masak> pugs: say (?(1&0)).perl
20:29 pugs_svn r22884 | masak++ | ** <p6eval> pugs: OUTPUT[(Bool::False & Bool::True)␤]
20:29 pugs_svn r22884 | masak++ | * (should really collapse to Bool::False)
20:30 moritz_ whoops, some characters in masak++'s commit message totally borked irssi or screen
20:31 masak moritz_: it looks borked here too.
20:31 azawawi moritz_: hmmm... we can pasteling the result
20:31 masak moritz_: it was the ␤ char from the evaluation.
20:32 moritz_ azawawi: that's better
20:32 masak looks like the bot thinks it got latin-1, when it really got UTF-8
20:33 pugs_svn r22885 | moritz++ | [t/spec] fix smartlinks in angle-brackets.t
20:33 moritz_ masak: pugs_svn isn't utf-8 aware :(
20:33 masak so much potential for improvement everywhere...
20:34 moritz_ I tried to convert all the bots to plagger, but failed miserably
20:38 StephenPollei joined #perl6
20:39 azawawi moritz_: btw, i cant run evalbot on feather1 since it cant find some modules
20:39 moritz_ azawawi: evalbots don't belong on feather1
20:40 azawawi i know but i need to test it a bit on another channel...
20:40 * azawawi promises to be careful ;-)
20:41 azawawi feather3?
20:41 moritz_ I don't care
20:41 azawawi ?
20:41 moritz_ I don't care which one
20:42 azawawi im gonna watch the elections now... sleep &
20:43 azawawi cya
20:43 masak azawawi: good night.
20:44 azawawi masak: what time is it on your timezone?
20:44 masak azawawi: almost ten in the evening.
20:44 masak 21:44
20:44 azawawi 10:44 here
20:45 * azawawi sleep &
20:54 moritz_ @tell azawawi all required modules are installed on feather1 now (for evalbot)
20:54 lambdabot Consider it noted.
20:59 ab5tract_ joined #perl6
21:22 iktome joined #perl6
21:22 pedrob joined #perl6
21:45 jonathan1 joined #perl6
21:46 jnthn hi all
21:46 jnthn for sub foo { return }
21:46 jnthn I'm thinking this returns an empty Capture.
21:47 jnthn I guess an empty Capture is considered false in boolean context.
21:47 jnthn Is it considered as defined, though?
21:47 jnthn say defined(foo()) # gives what?
21:50 masak jnthn: by my intuitive understanding of definedness, yes. is there a situation where 'false but defined' might break the Law of Least Astonishment?
21:50 moritz_ you know my opinion on that one ;)
21:51 masak moritz_: I don't.
21:51 jnthn masak: See http://rt.perl.org/rt3/Tic​ket/Display.html?id=58770
21:52 moritz_ masak: ah, you missed the discussion in #parrot. It's about a ticket I opened because I thought it should be undef
21:52 lambdabot Title: #58770: Bare return; should be undef
21:52 moritz_ this one ;)
21:52 masak hm, an empty list object is defined, an empty capture object is defined... why not an empty Capture object?
21:52 * masak reads the ticket
21:52 moritz_ masak: because return; doesn't look like it returns anything defined
21:52 masak oh. yes.
21:52 masak ACK.
21:53 masak but it seems that a little of Least Astonishment is broken by either of the choices defined/undefined.
21:53 masak see my reasoning above.
21:54 moritz_ no, it only breaks consitency, not principle of least surprise ;)
21:54 jnthn S06 says that return preserves the capture of the arguments it is given.
21:54 masak is there a reason `return` should give an empty Capture, and not just undef?
21:54 masak I mean, it's given 0 arguments.
21:55 masak we can make that mean anything we want.
21:55 masak Hee, designing languages is fun! :>
21:56 moritz_ and hard.
21:56 masak no argument there.
21:57 diakopter masak: hahaha; good one.
21:58 masak diakopter: undef.
21:58 masak ;)
21:58 diakopter heh
21:58 jnthn masak: The Spec says "The return function preserves its argument list as a Capture object,"
21:58 masak jnthn: but there is no argument list...
21:58 masak just `return`
21:59 jnthn No, that's just an empty argument list.
21:59 masak hokay.
21:59 jnthn sub foo() { ... }; foo;
21:59 jnthn or $obj.meth # empty list of arguments, same as $obj.meth()
22:00 jnthn I think elsewhere in Perl 6, no argument list is taken to be the same as an empty one.
22:00 masak wait a minute -- let's clear this up once and for all, just to be on the safe side
22:00 masak they're called 'argument' at the definition side, and 'parameters' at the call side of the method, right?
22:00 masak s/argument/arguments/
22:00 moritz_ jnthn: from the spec quote it seems more logical that it should be defined. But it doesn't feel right, IMHO ;)
22:01 masak it's certainly not in line with Perl 5
22:01 masak so it will astonish PerlFivers more than the Least Amount
22:02 masak though I guess we've never tried to astonish PerlFivers as little as possible anyway :)
22:02 TimToady eh, that's backwards, they're parameters on the definition side
22:03 TimToady and arguments on the call side
22:03 jnthn Yay, we haz TimToady!
22:03 jnthn TimToady: And the answer to the original question? ;-)
22:03 TimToady mmphph
22:03 masak TimToady: thank you. I can never remember, but will try from now on.
22:03 TimToady an empty capture does not automatically turn into an undef
22:03 masak then why is it called @ARGS ? :)
22:04 moritz_ masak: "formal parameters" sounds better than "formal arguments" ;)
22:04 jnthn TimToady: So "sub foo { return }; defined(foo()) # true ?
22:04 moritz_ masak: because it's the list of arguments?
22:04 masak moritz_: I don't think CS should have "what sounds better" as a guiding principle. :)
22:04 moritz_ masak: I know, but maybe it can help you remember
22:05 TimToady it's called @ARGS because it contains some, not because it are one
22:05 masak moritz_: might be because it's the list of arguments, yes. what would be a list of parameters in this case?
22:05 masak TimToady: makes sense.
22:05 masak the arguments are pulled through from the call side.
22:05 moritz_ masak: in Unix a program doesn't have a list of parameters.
22:06 TimToady jnthn: if you want a function to fail you should use fail
22:06 moritz_ masak: it should just die if it can't make sense of an argument list
22:06 masak moritz_: does that mean anything more than that the Unix tradition got the terms wrong?
22:06 masak moritz_: ah.
22:06 jnthn TimToady: I've not got a position on this, I just want to know what the correct semantics are. :-)
22:06 jnthn So the implementation can be correct.
22:07 TimToady well, it depends on what the context supplied by defined() is
22:08 * masak doesn't really have a position either, but plenty of momentum
22:08 TimToady if it's looking for an item then it probably fails to bind at all
22:08 TimToady so the answer might be that defined() without args throws an exception
22:09 moritz_ and sub foo { return }; foo().defined?
22:09 jnthn Ah, because we have a capture back and are trying to bind that capture to the signature of defined...
22:09 TimToady or we can give a multi with 0 args and say it's undefined
22:09 jnthn The second would sound more sensible to me.
22:09 TimToady well, more to the point is what we do with defined(@foo) and @foo.defined
22:10 TimToady I'd argue that in either case we're looking at the variable as an item
22:10 TimToady so the real question is what does item( () ) return
22:11 TimToady seems like I already decided this once
22:11 KidShenck joined #perl6
22:11 jnthn TimToady: And remind me what the answer was?
22:12 TimToady you're asking the senile member of the group to remember something?
22:14 TimToady in fact, this was discussed on p6l
22:15 eternaleye joined #perl6
22:15 wknight8111 joined #perl6
22:23 TimToady and I think the real answer is that item( () ) returns Nil, which is a form of undef that returns () in list context  :)
22:23 TimToady basically () === Nil
22:25 TimToady whereas Object or Failure returns itself in list context
22:25 jnthn Ah, OK.
22:26 * jnthn tires to make it fit into his head
22:26 TimToady would if fit better if we named it NothingToSeeHereMoveAlong instead?
22:27 jnthn :-P
22:27 masak JediMindTrick.
22:28 TimToady btw, the p6l thread was entitled: adverbial form of Pairs notation question
22:28 jnthn Thanks
22:28 TimToady though I think I said NIL in that thread
22:29 TimToady commuting &
22:33 spx2 hmm there's some nice stuff going on
22:33 spx2 I heard recently ActiveState and also BBC joined the advisory board of Parrot ?
22:33 spx2 is this to say that perl6 has more chances of coming out sooner than before ?
22:34 * moritz_ finds it hard to judge the impact of these decisions
22:34 spx2 ok uhm... what is actually going on if those companies join an advisory board ?
22:35 spx2 Perl6 needs Parrot in order for the developers to code/test it... no ?
22:35 moritz_ I think most of all they publicly announce that they are interested in the parrot project
22:35 masak spx2: Rakudo needs Parrot, the other implementations mostly don't.
22:36 smg joined #perl6
22:36 moritz_ Perl 6 witout Parrot is possible, as pugs demonstrated. The question is how good, portable and fast it can be without.
22:36 wknight8111 the question is how good, portable, and fast it can be with parrot
22:36 masak that remains to be seen.
22:37 spx2 I am waiting for a version that comes out where I don't need to make distinctions between implementations or the need to know that a virtual machine Parrot exists
22:37 masak writing PIR is a remarkable experience, at least. feels like Perl assembler. it's easy to imagine Rakudo working well on top of that.
22:38 wknight8111 spx2: eventually you won't have to worry about the implementation, no
22:38 masak spx2: what do you mean? you can already do `perl6`.
22:38 wknight8111 but we aren't at that point yet, perl6 is mostly usable now, but with rough edges
22:38 Chillance joined #perl6
22:39 moritz_ both rough and sharp edges :/
22:39 spx2 masak: I want to write stuff with it that won't break due to "not yet implemented stuff" or "not enough tested stuff" (is this a lame excuse ?)
22:39 moritz_ and I want a ponie.
22:39 masak wknight8111: ah I see what you mean. well, with a good test suite, and a faithful "Perl Implementation" stamp of approval, you won't have to worry about implementations.
22:40 masak spx2: what was the latest Perl 6 feature you added to an implementation? :P
22:40 spx2 moritz_: give me your poine when you get it,I'd like to have it
22:40 spx2 masak: none , but I don't feel I need to add something in order to use perl6
22:40 zamolxes joined #perl6
22:40 wknight8111 spx2: you have three options: 1) Play around with what we have, 2) wait patiently for the rest, or 3) join the project and help us complete it!
22:40 moritz_ sadly it doesn't work that way
22:41 spx2 wknight8111: part 3
22:41 wknight8111 spx2++
22:41 spx2 wknight8111: sorry , I meant part 3 demands pretty much experience,not every newbie coming around saying "I want that toy" can really build it
22:41 masak spx2: no, you don't have to add something in order to use Perl 6. but sometimes it's actually easier to help implement something than to complain about missing features, I've found.
22:41 spx2 my <return> key is broken
22:42 wknight8111 when I was younger, I was told to "press alt+F4 to fix that"
22:42 wknight8111 I've never been cruel enough to give that advice myself
22:42 masak ah, the days when Alt+F4 actually quit Windows...
22:43 spx2 why exactly is this book out if perl6 is not yet finished ? I imagine only fools would buy that ...(or not ?) http://apress.com/book/view/1590598334
22:43 lambdabot Title: APRESS.COM : Beginning Perl 6: From Novice to Professional : 9781590598337
22:43 masak spx2: the Perl 6 Spec is fairly stable these days.
22:44 masak we're just waiting for the implementations to catch up :)
22:44 moritz_ spx2: people have been complaining about a lack of documentation. Rightly so.
22:44 wknight8111 yeah, documentation is one of those things I want to be working on more seriously
22:45 spx2 joined #perl6
22:45 moritz_ wknight8111: speaking of which, I've seen that you've written a (very short) intro to rules in one of the book chapters...
22:45 moritz_ wknight8111: but the Perl 6 part already has a whole chapter on it..
22:45 wknight8111 yeah, just trying to keep things standard, no idea whether my ideas are right or wrong
22:46 gabiruh joined #perl6
22:46 moritz_ wknight8111: did you just forget about that? or is that duplication intentional?
22:46 wknight8111 intentional
22:46 moritz_ (it's horribly out of date, and needs more work, but it's a starting point for sure)
22:46 moritz_ ok
22:48 spx2 oh you people must be working on compilers etc...surely you have written expression evaluators ?
22:49 spx2 how does one treat unary operators when writing a infix->postfix and afterwards shunting yard rpn evaluator ?
22:49 wknight8111 i've written some very painful expression calculators
22:49 wknight8111 at least, painful for me
22:49 * moritz_ has written Math::Expression::Evaluator ;)
22:49 moritz_ but I've never bothered with rpn
22:50 spx2 recursive descent ?
22:50 moritz_ yes
22:50 moritz_ works with less theory ;)
22:54 Limbic_Region joined #perl6
23:01 spx2 moritz_: so you read something in particular for the "theory" or examples
23:02 kst joined #perl6
23:02 spx2 for example I found a nice description of recursive descent in bjarne stroustrup "the c++ programming language" and also kernighan ritchie "the c programming language"
23:03 moritz_ spx2: I read http://compilers.iecc.com/crenshaw/. Before I thought that compilers were scary magic. After that I decided to write at least an interpreter ;)
23:03 lambdabot Title: Let's Build a Compiler
23:03 moritz_ spx2: it's a bit out of date, but IMHO still interesting
23:03 moritz_ (and yes, I built an interpreter for a nearly usable, turing complete language shortly afterwards)
23:05 [particle] left #perl6
23:05 moritz_ anyway, I'm off to bed now
23:06 masak g'night.
23:07 spx2 same
23:12 nacho_ joined #perl6
23:18 Alias_ joined #perl6
23:26 [particle] joined #perl6
23:33 nipotan_ joined #perl6
23:35 bacek_ joined #perl6
23:41 FurnaceBoy joined #perl6
23:43 masak @tell moritz_ languages/perl6/tools/update_passing_test_data.pl starts funny: "This tool runs the same test that C<make spectest> would, except those that C<make spectest> runs." (in other words, it does nothing?)
23:43 lambdabot Consider it noted.
23:43 jauaor joined #perl6
23:50 [particle] masak: i have a feeling someone did a s/spectest_regression/spectest/g in langugaes/perl6/ and didn't review the changed docs
23:50 lambdabot [particle]: You have 1 new message. '/msg lambdabot @messages' to read it.
23:50 [particle] @moosages
23:50 lambdabot azawawi said 3h 41m 17s ago: --yaml for STD_syntax_highlight is done
23:50 [particle] \o/
23:50 gabiruh left #perl6
23:50 masak [particle]: clbuttic mistake. http://www.codinghorror.com​/blog/archives/001176.html
23:50 lambdabot Title: Coding Horror: Obscenity Filters: Bad Idea, or Incredibly Intercoursing Bad Idea ...
23:56 eternaleye joined #perl6

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

Perl 6 | Reference Documentation | Rakudo