Camelia, the Perl 6 bug

IRC log for #perl6, 2008-12-20

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:03 mncharity pmurias: in fact, on possible path into running STD.pm, instead of EXPR-first, or top-down statements, would be p5 re first.  that would let us run the test suite faster (30s/1min/1hr original/current/elf-and-STD_blue), provide the first reality check on rx_on_re performance vis running STD, and set up to perhaps do p6 rx next, where it could be nice to
00:03 mncharity have a fast edit-test cycle heading into the rest of STD.pm.
00:03 mncharity s/on possible/one possible/
00:05 c9s_ joined #perl6
00:07 * pmurias was afk
00:08 * mncharity has a tablet now... have to remember to use afk as a joke somewhere...
00:09 pmurias ruoso: hi
00:09 ruoso hi pmurias
00:10 pmurias mncharity: the problem with the plan is that p5 re aren't good enough to base running STD.pm on them
00:11 pmurias s/the/that
00:12 pmurias ruoso: re c project topic what other C tasks do we have in smop?
00:16 pmurias other than PCL
00:16 mncharity pmurias: re the problem, err, there are a great many things which aren't good enough to base a running STD.pm on.  STD.pm is very not-small and non-trival.  so the task is to identify subsets of it which can be developed and tested well.  core IR and runtime regex/regexp is one such.
00:18 mncharity one alternate approach being start from scratch, banging STD against t/ .  been there, done that several times, not a fun place to be.
00:19 mncharity much nicer to be able to say after each edit / refactoring, "and a big portion of everything still works".
00:20 pmurias banding STD against t/ being using STD to run a random subset of t/
00:21 pmurias s/banding/banging
00:21 pmurias ?
00:21 mncharity the rx_on_re work, while spread over a couple of months, has probably only been a few FT days of work.  test-based keep-it-working development tends to be vastly faster than 'extend and debug'.  re banging,
00:23 pmurias shower&
00:24 mncharity pugs, the pugs alternate backends, redsix, kp6, all took "now we parse file one of t/sanity, now file two, now...".  could do the same thing with STD.  but once something... ah ok.  another time.
00:27 mncharity literary license on the last paragraph.  creation of t/01-sanity was actually a nice improvement.
00:29 mncharity I'm off.  if not back in next few days, happy holidays all.
00:34 jhorwitz joined #perl6
00:49 c9s joined #perl6
01:12 drbean joined #perl6
01:21 alech joined #perl6
01:23 hudnix_ joined #perl6
02:06 pugs_svn r24506 | lwall++ | [S19] random annotations for [particle]++'s consideration
02:08 slavik joined #perl6
02:12 slavik rakudo: say "hello"
02:12 p6eval rakudo 34122: OUTPUT[hello␤]
02:44 cls_bsd joined #perl6
02:47 meppl good night
02:49 hudnix_ joined #perl6
02:56 kisu joined #perl6
03:04 kanru joined #perl6
03:18 hudnix_ joined #perl6
03:19 pugs_svn r24507 | pmichaud++ | [t/spec]:  Update main.t test to work with fudging.
03:20 rakudo_svn r34128 | util++ | [codingstd] Removed trailing whitespace from action.pm
03:36 slavik @tell slavik hello
03:36 lambdabot You can tell yourself!
03:40 kisu_ joined #perl6
03:44 pugs_svn r24508 | wayland++ | Added some definitions
04:01 elmex_ joined #perl6
04:08 alester joined #perl6
04:10 cspencer joined #perl6
04:38 c9s_ joined #perl6
04:43 c9s__ joined #perl6
04:44 pasteling "mncharity" at 98.216.110.149 pasted "STD.pm/gimme5 unexpected p5 re parse failures" (255 lines, 5.8K) at http://sial.org/pbot/33935
04:51 cspencer rakudo: (1..4).map: { .say }
04:51 p6eval rakudo 34129: OUTPUT[Method 'map' not found for invocant of class 'Range'␤current instr.: '_block14' pc 82 (EVAL_16:43)␤]
04:53 slavik rakudo: map { say } 1..4;
04:53 p6eval rakudo 34129: OUTPUT[Statement not terminated properly at line 1, near "1..4;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
04:53 slavik rakudo: map { say } 1..4
04:53 p6eval rakudo 34129: OUTPUT[Statement not terminated properly at line 1, near "1..4"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
04:53 slavik rakudo: map { say $_ } 1..4;
04:53 TimToady @tell mncharity thanks for the p5regex nopaste
04:53 lambdabot Consider it noted.
04:53 p6eval rakudo 34129: OUTPUT[Statement not terminated properly at line 1, near "1..4;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
04:53 slavik hmm
04:54 cspencer rakudo: (1..4).grep: { $^a % 2 }
04:54 p6eval rakudo 34129: OUTPUT[Method 'grep' not found for invocant of class 'Range'␤current instr.: '_block14' pc 82 (EVAL_16:43)␤]
04:54 slavik for 1..4 { say };
04:54 slavik rakudo: for 1..4 { say };
04:55 p6eval rakudo 34129: OUTPUT[␤␤␤␤]
04:55 slavik rakudo: for 1..4 { say $_ };
04:55 p6eval rakudo 34129: OUTPUT[1␤2␤3␤4␤]
04:55 slavik map 1..4 { say $_ };
04:55 slavik rakudo: map 1..4 { say $_ };
04:55 p6eval rakudo 34129: OUTPUT[Statement not terminated properly at line 1, near "{ say $_ }"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
04:55 slavik map is broken?
04:56 TimToady the block of map needs a comma after the block
04:56 cspencer rakudo: my @list = (1..4); @list.map: { .say }
04:56 TimToady rakudo: map { .say }, 1..4
04:56 p6eval rakudo 34129: OUTPUT[1␤2␤3␤4␤]
04:56 p6eval rakudo 34129: OUTPUT[1␤2␤3␤4␤]
04:56 slavik oh, not like Perl5, eh?
04:56 slavik heh
04:56 cspencer it's broken for Range's, i was just working on a patch for that
04:57 slavik oh
04:57 cspencer (if that's what had got you wondering...)
04:57 TimToady yes, there is no indirect object syntactic slot like there is in p5
04:57 cspencer o
04:57 cspencer er
04:57 slavik rakudo: map { say }, 1..4
04:57 p6eval rakudo 34129: OUTPUT[␤␤␤␤]
04:57 TimToady and nothing defaults to $_
04:57 slavik say doesn't act on $_ by default?
04:57 slavik err, how come?
04:57 TimToady to throw out one of the lists of exceptions that people had to memorize
04:58 TimToady it's not that much harder to say .say
04:58 cspencer sorry, don't mind my "er" :)
04:58 slavik TimToady: not arguing, just learning, heh
04:58 cspencer i'm assuming map should also work on something like: (1..4).map: { .say } ?
04:58 TimToady you don't have to know that certain vars are the same var in every package anymore either
04:59 TimToady rakudo: [1..4].map: { .say }
04:59 p6eval rakudo 34129: OUTPUT[1␤2␤3␤4␤]
04:59 TimToady it's just that Range objects aren't sufficiently listlike yet
04:59 cspencer i'll send in a patch for that shortly
04:59 slavik TimToady: will parrot/perl6 be ported to symbian by any chance?
04:59 TimToady map should probably be coming out of some kind of Traversible role
05:00 slavik would be nice to have perl6/python/others available on symbian as an alternative to Java
05:00 TimToady I'm not familiar with symbian, so you'd have to ask the parrot folks
05:00 slavik k
05:00 TimToady what is symbian?
05:01 slavik TimToady: OS for mobile phones
05:01 cspencer TimToday: ah ok, i'd moved map/grep into the 'Any' class, is that incorrect?
05:01 slavik like windows mobile, but better ;)
05:01 slavik and they have POSIX ported to it and a C++ compiler
05:01 slavik so, gcc can compile for symbian
05:01 slavik it's also usually an ARM CPU
05:03 TimToady Any is okay for now
05:03 cspencer ok
05:03 TimToady but that doesn't explain why Range couldn't find it...
05:04 TimToady or is that not checked in yet?
05:06 cspencer not checked in yet no
05:06 cspencer Range couldn't find it because map/grep was in the List class
05:06 cspencer so i'd moved it into Any, which both List/Range derive from
05:07 cspencer the patch is in ticket #61550
05:08 TimToady but eventually it probably wants to be abstracted into some kind of a role for anything traversible
05:08 cspencer alrighty
05:08 TimToady which might or might not be the same as a List role
05:09 TimToady course if anything not traversible is its own list of one element, then maybe Any is appropriate
05:09 cspencer are hashes traversable?
05:10 TimToady I think the basic question is, what does this look like in list context?
05:10 cspencer right, ok
05:10 TimToady so certainly hashes work
05:11 TimToady it might also be closely related to the Iterator interface
05:17 hudnix_ joined #perl6
05:27 justatheory joined #perl6
05:53 azawawi hi
05:53 azawawi TimToady: thx; i will test right now.
06:02 Minthe joined #perl6
06:25 azawawi std: my $bar = "&<>";
06:25 p6eval std 24508: OUTPUT[00:07 88m␤]
06:30 azawawi TimToady: ping
06:32 azawawi @tell TimToady it works but it introduces another bug in my tests; see 'cd ~/pugs/misc/Syntax-Highlight-Perl6; make test'. First call to STD->parse works but subsequent calls fail on new text.
06:32 lambdabot Consider it noted.
06:32 slavik azawawi: what are you working on?
06:33 azawawi slavik: Perl6 syntax highlighting and Padre
06:33 slavik using grammars?
06:33 azawawi no using perl5 code
06:33 slavik I see
06:33 slavik where is this syntax highliting used?
06:34 azawawi offline generation of t/spec: http://feather.perl6.nl/~azawawi/html/
06:34 azawawi and in Padre::Plugin::Perl6
06:34 azawawi soon to be released
06:35 slavik javascript?
06:35 slavik there should be a text editor in Perl6, where highlighting is done with grammars ...
06:36 slavik seems like a good idea to me (as long as you have a grammar for a language and know what colors what piece of the language has to be) ...
06:36 azawawi nice idea... go for it
06:36 slavik :-\
06:36 slavik are there gtk bindings for perl6 yet though?
06:36 pugs_svn r24509 | azawawi++ | [Syntax::Highlight::Perl6] Fix localization of "context" vars such as $::PARSER;
06:36 pugs_svn r24509 | azawawi++ | [Syntax::Highlight::Perl6] TimToady++
06:37 Minthe Excuse me, but can I build pugs-r24509 with GHC682 successfully?
06:38 slavik not only that, but I have never build a text editor ... :(
06:39 pugs_svn r24510 | azawawi++ | [Syntax::Highlight::Perl6] $VERSION is now '0.0296'
06:39 pugs_svn r24510 | azawawi++ | [Syntax::Highlight::Perl6] Removed all extra references to use STD
06:39 pugs_svn r24510 | azawawi++ | [Syntax::Highlight::Perl6] Updated changes and pod bugs section
06:39 pugs_svn r24510 | azawawi++ | [Syntax::Highlight::Perl6] Not going to release this to CPAN since make test fails
06:39 slavik Minthe: looks like your pugs version just got outdated ...
06:40 azawawi minthe: if you want to try 'pugs' quickly use this:
06:40 azawawi pugs: say 'hello';
06:40 Minthe I use pugs-r19955, the final version which can be built with GHC661
06:40 p6eval pugs: OUTPUT[hello␤]
06:49 slavik Version: 6.2.13.11
06:49 slavik the pugs I have came from the cabal packages
06:49 slavik and I use rakudo
06:50 slavik it seems to have more stuff
07:08 Minthe So I'd like to ask you whether the latest version built with GHC682 works without errors?
07:08 slavik no idea
07:08 Minthe s/\?/\./
07:08 slavik I installed the pre-compiled version from cabal
07:08 azawawi minthe: let me check
07:09 azawawi minthe: i have 6.8.2 on feather1
07:09 azawawi minthe: and i compiled it before so it should work
07:11 Minthe Thank you
07:11 kanru joined #perl6
07:12 Minthe So the bug I talked about in http://irclog.perlgeek.de/out.p​l?channel=perl6;date=2008-06-05 was fixed.
07:12 azawawi no idea there
07:14 azawawi minthe: pugs has slept for 3 years now ;-)
07:14 Minthe r21xxx showed "Invalid grammatical category: "Bool""
07:36 hudnix_ joined #perl6
07:39 slavik same here
07:47 pugs_svn r24511 | azawawi++ | [Cursor.pmc] Fixed the log file creation even though debug is not enabled
07:47 pugs_svn r24511 | azawawi++ | [Cursor.pmc] STD5DEBUG could be q{} and hence added a check to make it zero
07:50 laye joined #perl6
07:52 pugs_svn r24512 | azawawi++ | [Syntax::Highlight::Perl6] Fixed the log file creation even though debug is disabled
07:52 pugs_svn r24512 | azawawi++ | [Syntax::Highlight::Perl6] Updated the BUGS sections
07:57 sail0r joined #perl6
07:57 sail0r left #perl6
08:04 kisu joined #perl6
08:21 laye left #perl6
08:32 adam joined #perl6
08:34 justatheory joined #perl6
08:58 kanru joined #perl6
09:15 kisu_ joined #perl6
09:24 pdcawley joined #perl6
09:45 Minthe Oh now Pugs builds dependencies automatically
09:45 Minthe Very nice.
09:46 Minthe In r19955 I had to manually install parsec and so on.
09:47 moritz_ aye
09:56 Minthe Dependencies built. Proceeding to make core...
10:05 pmurias joined #perl6
10:06 justatheory joined #perl6
10:09 iblechbot joined #perl6
10:11 alanhaggai joined #perl6
10:14 pugs_svn r24513 | moritz++ | [t/spec] test for .grep on Range, and unfudge Range.map test
10:20 rakudo_svn r34133 | moritz++ | [rakudo] move .map and .grep to any-list.pir to make them work on ranges.
10:20 rakudo_svn r34133 | moritz++ | Patch courtesy by Cory Spence, cspencer++. Closes RT #61550.
10:27 azawawi hi moritz
10:29 pasteling "azawawi" at 212.38.154.37 pasted "make test output" (34 lines, 1.5K) at http://sial.org/pbot/33937
10:30 cls_bsd joined #perl6
10:37 gfldex_ joined #perl6
10:45 pugs_svn r24514 | moritz++ | [t/spec] clean up a test that depended on hash order
10:48 moritz_ I'll mostly be offline until 2009-01-08
10:49 pmichaud :(
10:49 pmichaud I hope it's for a good vacation, though.
10:50 rakudo_svn r34134 | pmichaud++ | [rakudo]: spectest-progress.csv update: 252 files, 5228 passing, 0 failing
10:56 pmurias ruoso: spec/S02-builtin_data_types/autovivification.t is enough for correct autovivification?
11:00 rakudo_svn r34135 | pmichaud++ | [rakudo]:  Clean up export handling for 'map' and 'grep'.
11:03 moritz_ pmichaud: I'm a bit confused, why does it work without export? it gave me some test failures when I tried without
11:03 pmichaud the functional forms currently go into the [] namespace.
11:04 pmichaud the original patch didn't have that.
11:04 moritz_ ah
11:04 pmichaud stated differently:  the method form goes into 'Any', the subroutine form goes into []
11:04 pmichaud then, if the method is "is export" in S29, we use !EXPORT
11:04 moritz_ so [] basically is our prelude scope?
11:05 pmichaud technically in Parrot it's global scope, but yes, we're using that for prelude scope for now until we get a true prelude scope.
11:05 pmichaud or, perhaps [] will always be our prelude scope, and we'll use ['GLOBAL'] for our global scope.
11:05 pmichaud haven't worked that out yet.
11:09 Minthe joined #perl6
11:20 rakudo_svn r34137 | pmichaud++ | [rakudo]: Distinguish array from hash access (resolves RT #60732).
11:21 Minthe joined #perl6
11:23 moritz_ pmichaud: do we have tests for #60732?
11:24 pmichaud one test, yes.
11:25 pmichaud unfudging it now.
11:25 azawawi this 'akl-' guy is getting on my nerve
11:25 azawawi or bot
11:26 pmichaud anyone have chanops?
11:26 * azawawi what? ;-)
11:26 moritz_ here? diakopter or TimToady ususally
11:27 pugs_svn r24515 | pmichaud++ | [t/spec]:  Unfudge test resolved in RT #60732.
11:27 azawawi Padre::Plugin::Perl6 0.01 is out on CPAN
11:29 moritz_ rt is behaving badly
11:31 pugs_svn r24516 | moritz++ | [t/spec] tests for RT #61544
11:32 meppl joined #perl6
11:38 alech joined #perl6
11:40 moritz_ is "\x[41]" still valid interpolation syntax?
11:41 pmichaud yes, as far as I know.
11:41 pmichaud rakudo:  say "\x[41]"
11:41 p6eval rakudo 34137: OUTPUT[A␤]
11:41 pmichaud rakudo:  say "\x[48,101,108,108,111]"
11:41 p6eval rakudo 34137: OUTPUT[HāĈĈđ␤]
11:41 pmichaud oh.
11:42 pmichaud rakudo:  say "\x[48,65,6c,6c,6f]"
11:42 p6eval rakudo 34137: OUTPUT[Hello␤]
11:42 pugs_svn r24517 | moritz++ | [t] move interpolation/strings.t to spec/
11:50 moritz_ rakudo: say " \c[111] \c[107] ".perl
11:50 p6eval rakudo 34137: OUTPUT[" c[111] c[107] "␤]
11:50 pmichaud probably should indicate that \c isn't implemented.
11:51 pmichaud ...but isn't it \d ?
11:51 pmichaud rakudo:  say " \d[111] \d[107] ".perl
11:51 p6eval rakudo 34137: OUTPUT[" o k "␤]
11:51 pmichaud or did it change?
11:51 moritz_ S02:2800
11:51 moritz_ You may also put one or more decimal numbers inside the square brackets:
11:51 moritz_ "\c[13,10]"# CRLF
11:52 moritz_ no \d[ in S02
11:52 pmichaud it changed then, it used to be \d
11:52 pmichaud okay.
11:52 pmichaud fixing.  :-)
11:53 pugs_svn r24518 | moritz++ | [t/spec] fudge misc-interpolation.t for rakudo - passes, but it's still bad
11:53 pugs_svn r24518 | moritz++ | plan
11:53 drbean joined #perl6
11:53 ruoso pmurias, yes... that test seems to be enough...
11:54 masak joined #perl6
11:54 ruoso although it doesn't test  autovivifying arrays, and HoA, AoH
11:55 pmurias ruoso: hi
11:55 pmurias i'm spliting AST::Package into smaller node atm
11:59 pugs_svn r24519 | moritz++ | [t/spec] fix fudged plan of misc-interpolation.t (required ugly fudge hack)
12:00 rakudo_svn r34138 | pmichaud++ | [rakudo]:  Change \d[...] to \c[...] to comply with S02 change.
12:00 rakudo_svn r34139 | pmichaud++ | [rakudo]:  update tests to match \d --> \c change in r34138.
12:01 masak cspencer++ # many bug tickets
12:02 masak TimToady++ # restoring my faith in Perl 6 parsing with his reply on the `say for` thing
12:11 moritz_ I have to confess I didn't quite understand that reply
12:11 masak moritz_: ok. something in particular that troubled you?
12:12 moritz_ masak: how is 'say for 1' parsed?
12:12 masak I read it as "when `for` is used as a statement modifier, it can never be confused with a listop"
12:12 sail0r_ joined #perl6
12:12 masak moritz_: as a statement modifier.
12:14 moritz_ ok.
12:16 moritz_ Cursor.pmc:11 looks unnecessary complicated, and warns if STD5DEBUG isn't set
12:17 moritz_ any reason not to say $ENV{STD5DEBUG} // 0 instead?
12:17 azawawi STD5DEBUG can be q{}
12:17 moritz_ and what should $_DEBUG contain in this case?
12:18 azawawi when you negative it, you get a warning
12:18 azawawi negate...
12:18 moritz_ that doesn't answer my question
12:19 azawawi warns?
12:21 azawawi moritz_: i needed the .log file to be created only if a debug flag was 1
12:22 azawawi moritz_: i will fix it
12:24 pbuetow joined #perl6
12:26 pugs_svn r24520 | pmurias++ | [mildew]
12:26 pugs_svn r24520 | pmurias++ | added AST::Seq for a sequence of nodes
12:26 pugs_svn r24520 | pmurias++ | removed AST::Package - it's now constructed from smaller nodes
12:27 pugs_svn r24521 | pmichaud++ | [t/spec]:  Updates and fudging in S02-builtin_data_types/pair.t .
12:30 masak surprised that #61550 didn't have any spectests, I went to find the appropriate t/spec/ file to add them to, but found that moritz_++ had already added them. :)
12:30 masak I guess I'll just apply the patch instead.
12:30 rakudo_svn r34140 | pmichaud++ | [rakudo]:  Add .kv method to Pair.
12:30 rakudo_svn r34141 | pmichaud++ | [rakudo]:  Add S02-builtin_data_types/pair.t to spectest regression.
12:30 rakudo_svn r34141 | pmichaud++ | +63 passing tests.
12:33 pugs_svn r24522 | moritz++ | [t/spec] unfudge passing tests
12:35 pmurias azawawi: in which repo does Padre::Plugin::Perl6 live?
12:35 azawawi http://svn.perlide.org/padre/trunk
12:38 masak heh, moritz_++ did that as well...
12:41 alanhaggai joined #perl6
12:43 rindolf joined #perl6
12:44 moritz_ pmichaud: there are a few passing TODO tests in t/spec/S02-literals/char-by-number.t - could you please unfudge them? they are partly Unicode related, so I don't know which ones are safe to unfudge on non-icu systems
12:50 rakudo_svn r34142 | moritz++ | [rakudo] add an interpolation test to spectest.data
12:51 pugs_svn r24523 | masak++ | [t/spec/S29-list/reverse.t] fixed a test that depended on hash key order
12:51 pugs_svn r24523 | masak++ | during stringification
12:52 moritz_ masak++
12:53 DemoFreak joined #perl6
13:03 DemoPhreak joined #perl6
13:03 pmichaud moritz_: will do.  Turns out I'm working on a few unicode things at the moment anyway.  :-)
13:04 pmichaud I've put it on my hiveminder queue
13:11 pugs_svn r24524 | azawawi++ | [Cursor.pmc] Simplified the STD5DEBUG flag and removed warnings, moritz++
13:11 pugs_svn r24524 | azawawi++ | [Cursor.pmc] if defined it is 1 otherwise 0 and it also handles q{}.
13:14 pugs_svn r24525 | azawawi++ | [Syntax::Highlight::Perl6] Fix Cursor.pmc STD5DEBUG warning message
13:17 vixey joined #Perl6
13:22 DemoFreak joined #perl6
13:29 Minthe Finally pugs-r24512 with GHC682 worked successfully. Thank you very much.
13:34 Blackxhat joined #perl6
13:35 Blackxhat left #perl6
13:59 DemoPhreak joined #perl6
14:20 Whiteknight joined #perl6
14:20 rakudo_svn r34144 | pmichaud++ | [rakudo]:  Recognize more unicode bracketing characters in quotes.
14:21 mberends akl- , is your irc client having configuration problems?
14:22 pugs_svn r24526 | pmichaud++ | [t/spec]:  Unfudge rakudo tests in S02-literals/quoting-unicode.t .
14:22 pmichaud it's been doing that for a while.  Maybe a chanop can /kick him?
14:22 mberends yep
14:30 rakudo_svn r34145 | pmichaud++ | [rakudo]:  Add S02-literals/quoting-unicode.t to regression.  +70 passing tests.
14:32 zostay joined #perl6
14:32 ilogger2 joined #perl6
14:32 moritz_ /ignore also helps ;-)
14:37 adc_penner joined #perl6
14:50 rakudo_svn r34146 | pmichaud++ | [rakudo]:  Make the unicode versions of hyperops work (e.g., »+«).
14:50 rakudo_svn r34146 | pmichaud++ | This relegates programs containing the french angle brackets to use
14:50 rakudo_svn r34146 | pmichaud++ | utf-8 parsing (slower), but we gain these hyperops and it may lead
14:50 rakudo_svn r34146 | pmichaud++ | to getting french quotes to work.
14:52 meteorjay joined #perl6
15:00 jhorwitz joined #perl6
15:03 mberends # the 5 minute interval suggests an experimental cron job
15:10 was kicked by TimToady: TimToady
15:22 * masak beams
15:24 TimToady driving to socal today, so feel free to pass on ops to other long-term denizens if you start running short of ops
15:24 lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
15:24 TimToady @messages
15:24 lambdabot azawawi said 8h 52m 3s ago: it works but it introduces another bug in my tests; see 'cd ~/pugs/misc/Syntax-Highlight-Perl6; make test'. First call to STD->parse works but subsequent calls fail on
15:24 lambdabot new text.
15:24 TimToady biab &
15:27 moritz_ I'm also gone, see you all
15:27 azawawi moritz_: cya
15:27 moritz_ and if I don't see you in the next few days, merry christmas!
15:28 azawawi moritz_: Merry Christmas to you too..
15:29 azawawi where can i find a list of all builtins in perl 6?
15:33 masak moritz_: see you! but I think we'll meet here before Christmas eve :)
15:33 masak azawawi: S29? although it's not complete.
15:37 ft joined #perl6
15:38 azawawi and S16
16:03 sail0r joined #perl6
16:17 iblechbot joined #perl6
16:37 masak I wish I could write like _why.
16:39 alanhaggai joined #perl6
16:49 apeiron joined #perl6
16:51 kcwu joined #perl6
16:55 DemoFreak joined #perl6
17:00 schmalbe joined #perl6
17:04 justatheory joined #perl6
17:04 masak is it fair to say that gather/take makes it possible to write coroutines in Perl 6?
17:11 japhb joined #perl6
17:23 apeiron_ joined #perl6
17:29 alech joined #perl6
17:39 c9s joined #perl6
17:40 justatheory joined #perl6
17:43 adc_penner joined #perl6
18:10 Gothmog_ masak: Yes, I think so.
18:10 masak I do too.
18:11 masak also, I don't think anyone has written very much about stream-oriented programming in Perl 6.
18:36 cspencer joined #perl6
18:37 Psyche^ joined #perl6
18:43 araujo joined #perl6
18:45 pugs_svn r24527 | pmichaud++ | [t/spec]:  Clean up unicode whitespace tests
18:45 pugs_svn r24527 | pmichaud++ | ('=' at start of line indicates <pod_comment>).
18:47 schmalbe joined #perl6
18:50 rakudo_svn r34149 | pmichaud++ | [rakudo]:  Add unicode-whitespace.t test to regression (+48 passing tests)
18:50 alech joined #perl6
18:59 adc_penner2 joined #perl6
19:03 dukeleto joined #perl6
19:15 pugs_svn r24528 | pmichaud++ | [t/spec]:  Correct tests for failure from [/], [%], etc. ops.
19:16 nacho joined #perl6
19:20 rakudo_svn r34156 | pmichaud++ | [rakudo]:  Add C<< p5=> >> operator.
19:20 rakudo_svn r34158 | pmichaud++ | [rakudo]:  Add reduce-le1arg.t to regression, +49 passing tests.
19:40 pugs_svn r24529 | pmichaud++ | [t/spec]:  Fudge io_in_for_loops.t for current spec.
19:50 rakudo_svn r34159 | pmichaud++ | [rakudo]:  Add S16-filehandles/io_in_for_loops.t (+25 passing tests)
19:51 cspencer yesterday i'd submitted a patch to List.pir/any-list.pir moving map/grep into the Any class so that they're accessible to ranges as well as lists
19:51 cspencer i'm assuming reduce should probably be in the same place
19:51 cspencer and probably first
19:51 pmichaud cspencer: yes.
19:52 cspencer alright, i'll submit that shortly as a patch
19:52 pmichaud excellent.
19:52 cspencer moritz had mentioned that i hadn't !EXPORT'ed them in the any-list.pir, but i wasn't able to find where that was happening when i revisited it
19:53 pmichaud they aren't supposed to be EXPORTED
19:53 cspencer oh ok
19:53 pmichaud I undid moritz++ 's change, and fixed up the namespaces a bit.
19:53 cspencer so just remove them from List.pir's export list then and move them over?
19:53 cspencer ok
19:53 pmichaud it depends on the specific function.
19:54 cspencer what does the !EXPORT do then?
19:54 pmichaud in general, if a method is marked "is export" in S29, then we use !EXPORT On it
19:54 cspencer gotcha, ok
19:54 pmichaud if there is a separate sub, then we put that sub into .namespace [] and don't !EXPORT the method
19:54 pmichaud the reason is that    grep { ... }, @list    is different from  @list.grep { ... }
19:54 cspencer ah ok, right, which is applicable to map/grep/first/reduce
19:54 cspencer ok
19:55 pmichaud for some methods, though, they act the same -- i.e.,    $x.abs()   is the same as abs($x)
19:55 pmichaud in those cases, we can just export the method instead of having to write a separate sub to handle the different signature.
19:55 cspencer right, ok, makes sense
19:58 dalek joined #perl6
20:08 pugs_svn r24530 | pmichaud++ | [t/spec]:  Rewrite sleep.t to avoid use of cmp_ok() function.
20:10 cspencer patch submitted, should show up as ticket #61560
20:14 pugs_svn r24531 | pmichaud++ | [t/spec]:  Fudge S29-hash/slice.t for Rakudo.
20:18 pugs_svn r24532 | pmichaud++ | [t/spec]:  Fudge io.t for Rakudo.
20:20 rakudo_svn r34160 | pmichaud++ | [spec]:  Refactor IO.readline and prefix:<=>.
20:20 rakudo_svn r34161 | pmichaud++ | [rakudo]:  Add some more spectest files to the regression suite.
20:20 alech_ joined #perl6
20:23 pmichaud testing #61560 now.
20:25 eric256 joined #perl6
20:26 eric256 i was adding some links for rakudo to http://www.perlfoundation.org/p​erl6/index.cgi?getting_involved under Rakudo Links...any other links that would be good to list there?
20:29 alech joined #perl6
20:40 rakudo_svn r34162 | pmichaud++ | [rakudo]:  Refactor 'first' and 'reduce' methods to Any (RT #61560, cspencer++)
20:40 rakudo_svn r34162 | pmichaud++ | * Patch (slightly modified) courtesy Cory Spencer <cspencer  at sprocket.org>
20:40 cspencer what needed modification on that patch?
20:41 pmichaud $P0 = new 'Undef'   should be   $P0 = 'undef'()
20:41 pmichaud or '!FAIL'('Reason for fail')
20:41 pmichaud We're trying to eliminate use of the Undef type from the source
20:41 cspencer okay.  which cases should Undef be eliminated in?
20:42 pmichaud basically any time we have    = new 'Undef'   it definitely needs to be converted to 'undef'()  or something similar.
20:42 cspencer ok
20:42 pmichaud .tailcall '!FAIL'('reason')   is the PIR equivalent of Perl 6's   fail() function.
20:42 cspencer i'll keep an eye out for that in the future
20:42 pmichaud that'd be fantastic.
20:43 pmichaud afk for a bit -- gotta talk a walk.
20:43 cspencer sure, thanks for the tips!
20:51 lichtkind joined #perl6
20:59 moujahedin joined #perl6
21:04 iblechbot joined #perl6
21:08 alanhaggai joined #perl6
21:12 masak joined #perl6
21:15 alech joined #perl6
21:27 eric256 pmichaud: is there any resource with those tips?  i'd definitly be willing to go through and make those kinds of changes (and more) if there was some document simply explaining it like you just did
21:27 eric256 i'd be happy to start such a document if none exists yet as well
21:31 pmichaud eric256: there's not a resource with those tips yet -- they change somewhat frequently.  Although I expect it to be less frequent going forward from here.
21:31 pmichaud I'd be very glad if you started such a document.
21:33 pugs_svn r24533 | pmichaud++ | [t/spec]:  Unfudge some todo tests in char-by-number.t
21:36 masak rakudo: my @a := 1, @a; say @a[0..5]
21:36 p6eval rakudo 34162: OUTPUT[Method 'postcircumfix:[ ]' not found for invocant of class 'Int'␤current instr.: 'postcircumfix:[ ]' pc 1568 (src/classes/Positional.pir:77)␤]
21:36 masak boom!
21:38 masak rakudo: my @a := 1, @a; say @a.WHAT
21:38 p6eval rakudo 34162: OUTPUT[Int␤]
21:38 masak rakudo: my @a := 1; say @a.WHAT
21:38 p6eval rakudo 34162: OUTPUT[Int␤]
21:38 masak hm.
21:38 masak rakudo: my @a = 1; say @a.WHAT
21:38 p6eval rakudo 34162: OUTPUT[Array␤]
21:38 masak so, with infix:<:=>, I can assign an Int to a @-variable. is that kosher?
21:40 pmichaud no.
21:40 pmichaud Rakudo doesn't do any type checking on binding.
21:40 pmichaud (binding in general is kinda 'iffy')
21:41 masak so, the bug above is that Rakudo doesn't do type checking on binding to array variables?
21:41 pmichaud correct.
21:42 pmichaud you should get a "Int does not do Positional role" exception or something like that.
21:42 masak pmichaud: isn't it also wrong that `my @a := 1, @a` doesn't produce an infinite list?
21:42 pmichaud because @array variables can only bind to objects that do positional
21:42 pmichaud it would depend on how lazy/eager @a is
21:43 pmichaud the way I would see it:   1, @a  creates a new List
21:43 pmichaud @a is then (re)bound to that new list
21:43 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
21:43 masak lambdabot: ssh!
21:43 pmichaud of course, the "my" is a bit troublesome :-)
21:43 pmichaud I suspect you meant:   my @a;   @a = 1, @a;
21:44 masak ah, maybe so.
21:44 pmichaud but no, that's not inherently infinite.
21:44 pmichaud it just means that @a is bound to a List that has a (lazy?) reference to whatever @a was previously bound to.
21:44 masak rakudo: my @a; @a := 1, @a; say @a
21:44 p6eval rakudo 34162: OUTPUT[1␤]
21:45 masak I thought part of the reason for := was the ability to produce infinite arrays.
21:45 pmichaud we have hyperops that can do that :-)
21:45 pmichaud I hadn't heard anything about binding and infinite arrays -- maybe I just overlooked something.
21:46 masak ISTR a Pugs example implementing fibbonacci with := and >>+<<
21:46 masak but that might well be obsolete
21:46 pmichaud I'd guess that one could do better with    1 xx 1..*    or perhaps even   1 xx *
21:47 pmichaud or 1 xx Inf
21:47 pmichaud (or the hypers mentioned earlier)
21:47 masak it was something along the lines of `my @fib := 0, 1, @fib >>+<< @fib[1..*]`
21:48 masak pretty succinct :)
21:48 pmichaud my @fib = 0, 1, ..., { $^a + $^b };   # maybe
21:49 pmichaud oh, omit the commas
21:49 masak aye
21:49 pmichaud my @fib = 0, 1 ... { $^a + $^b };
21:50 masak that's arguably prettier.
21:50 pmichaud and simpler to understand.
21:51 masak my @fib = 0, 1 ... { $^previous + $^prevprev } # :)
21:51 masak no, wait.
21:51 * pmichaud thinks about implementing infix:<...>
21:52 pmichaud oh, we probably need laziness first.
21:52 masak my @fib = 0, 1 ... { $^last + $^second_last }
21:52 pmichaud otherwise it'll end up being a really long list.
21:52 masak aye.
21:54 apeiron_ joined #perl6
22:03 alech joined #perl6
22:05 pmichaud masak: in your use.perl post, why not use 'when'  ?
22:06 masak pmichaud: with or without a 'given'?
22:06 pmichaud either
22:06 pmichaud or, for that matter, you could use 'fail'  :-)
22:06 masak I could? great!
22:07 pmichaud I think so
22:07 pmichaud fail 'Must be exactly two cells apart' unless ...
22:07 masak what's the 'unless' opposite of 'when'? :P
22:07 pmichaud when ... != ... { ... }
22:07 pmichaud or  when not ...
22:08 masak pmichaud: I thought 'when' did pattern matching, not boolean comparisons.
22:08 pmichaud it also does boolean comparisons, if you give it a boolean.
22:08 masak oh, of course. right.
22:08 pmichaud so,   when 3 == 3 { say 'always do this'; }
22:09 pmichaud in that case the topic is ignored, and only the truth value of the Bool is used.
22:09 masak pmichaud: 'if' is shorter that 'when', and more recognizeable, and equivalent in this context. also, it has an 'unless' opposite, which seems appropriate in some cases.
22:09 pmichaud sure
22:09 pmichaud TMTOWTDI
22:10 masak but I'd have to take a closer look at that &fail builtin.
22:10 masak I'm not yet convinced it does a fancy return exactly the way I want.
22:10 pmichaud but part of the reason for creating 'when' and 'fail' and the like was to let Perl do these sorts of control things yet.
22:10 pmichaud fail 'because';   returns an undef to the caller
22:10 masak and what happens to the string argument?
22:11 pmichaud it's the same as    return undef;  except that a reason for the failure is attached to the value
22:11 pmichaud *to the undef
22:11 masak it sounds like exactly what I want :/
22:11 * masak tries &fail
22:11 pmichaud one difference is that the reason isn't displayed on the screen, though.
22:11 pmichaud so we'd have to have a way of extracting that message, I guess.
22:12 pmichaud (the reason gets displayed if anything attempts to use the Failure value, at which point the message is displayed on the screen.  This is how undef warnings take place, for example.)
22:13 pmichaud so for that reason &fail might not be exactly what you want.
22:13 masak pmichaud: well, you saw how my "print prompt until a valid move was input" loop looked. (I'm a bit proud of that as well).
22:13 pmichaud yes, that's what I'm looking at.
22:13 pmichaud It seems like fail ought to be able to help there somehow.
22:13 masak if there's any way to change that so that &fail could be used, I'm fine with using &fail.
22:13 pmichaud I'll think about it.
22:14 pmichaud It's code examples and problems like this that make Perl 6 fun to play with.
22:14 pmichaud otoh, your article is _very_ useful to point out how return can work.  :-)
22:14 pmichaud I need to write up my "okay, let's all write some Perl 6" challenge :-)
22:14 masak thanks :)
22:15 masak yes, please do.
22:15 pmichaud mind if I write up my suggestions about when/fail to your post?
22:15 pmichaud just to get others thinking about it :-)
22:15 masak pmichaud: go right ahead.
22:16 pmichaud I need more time to write prose.  Or to become a faster writer.
22:16 masak ideas are meant to be shared.
22:16 masak yes, I could use a keyboard speedup too.
22:40 pmurias joined #perl6
22:47 eric256 link to the use.perl post?
22:47 eric256 isn't there  a site withlike 99 problems? could be a good perl6 challenge...gotta remember the name of it though
22:49 avar 99 problems but perl 6 ain't one!
22:49 vixey avar :)
22:50 pmichaud microsoft scripting games site is the one I'm planning to point people to
22:53 Khisanth joined #perl6
22:54 literal eric256: there's examples/euler in the pugs repo
22:55 masak eric256: http://use.perl.org/~masak/journal/38123
22:55 literal then I also think there's a "%d problems in $some_lang" (can't remember the name) ported to Perl 6 somewhere in the repo
22:57 eric256 thats the one i was thinking of...i think
22:57 eric256 lol
23:01 literal eric256: http://www.oreillynet.com/onlamp/blo​g/2006/12/99_problems_in_perl_6.html
23:03 alech joined #perl6
23:04 masak rakudo: subset Positive::Int of Int where { $_ > 0 }; sub lotto (Positive::Int $count, Positive::Int $range) { return (1 .. $range).pick($count) }; say lotto(5, 40).perl
23:04 p6eval rakudo 34162: OUTPUT[[17, 9, 37, 7, 29]␤]
23:04 masak Rakudo++
23:05 literal shouldn't that be Int::Positive? :P
23:05 masak literal: I thought so, too! :)
23:06 masak rakudo: subset Int::Positive of Int where { $_ > 0 }; sub lotto (Int::Positive $count, Int::Positive $range) { return (1 .. $range).pick($count) }; say lotto(5, 40).perl
23:06 p6eval rakudo 34162: OUTPUT[[35, 9, 19, 3, 21]␤]
23:07 masak rakudo: subset Int::Positive of Int where { $_ > 0 }; sub lotto (Int::Positive $count, Int::Positive $range) returns List { return (1 .. $range).pick($count) }; say lotto(5, 40).perl
23:07 p6eval rakudo 34162: OUTPUT[[7, 10, 38, 23, 39]␤]
23:07 literal ah, it's in t/examples/99problems in the pugs repo
23:11 Ehtyar joined #perl6
23:14 DemoFreak joined #perl6
23:16 alanhaggai joined #perl6
23:18 literal looks like problem 99 is missing a Perl 6 solution
23:20 lichtkind_ joined #perl6
23:22 literal masak: do you have anything in your .vim/.vimrc that's helpful for Perl coding?
23:23 masak literal: I just moved to this computer, and I'm still cut off from my config svn repo, so no, not right now.
23:23 masak ask again in a week :)
23:23 literal I see
23:23 * masak 's laptop got stolen a week ago
23:23 literal ouch
23:23 masak :/
23:26 nacho joined #perl6
23:53 masak @tell moritz_ http://irclog.perlgeek.de/perl6/2008-12-20 dies of XML-malformedness when loading in my issue of Firefox.
23:53 lambdabot Consider it noted.
23:59 eternaleye joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs