Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-25

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 pugs_svn r25018 | putter++ | [elfparse] Working towards elf running std.pm.  Synced with STD.pm.
00:21 aindilis joined #perl6
00:43 wilsinclair joined #perl6
00:48 |jedai| joined #perl6
00:59 wknight8111 joined #perl6
01:12 mtnviewmark perl6: 17 mod 5
01:13 p6eval pugs: OUTPUT«*** ␤    Unexpected "mod"␤    expecting operator␤    at /tmp/bJbNNGXWCY line 1, column 4␤»
01:13 p6eval ..rakudo 35948: OUTPUT«Parrot VM: PANIC: Null vtable used; did you add a new PMC?!␤C file src/pmc.c, line 246␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot.  Use parrotbug (located in parrot's root directory)
01:13 p6eval ..or se...
01:13 p6eval ..elf 25018: OUTPUT«Undefined subroutine &GLOBAL::infix_mod called at (eval 119) line 3.␤ at ./elf_h line 4333␤»
01:13 mtnviewmark hmmm.... so maybe mod really is no longer an operator.. seems like a shame
01:13 mtnviewmark perl6: 17 div 5
01:13 p6eval elf 25018: OUTPUT«Undefined subroutine &GLOBAL::infix_div called at (eval 119) line 3.␤ at ./elf_h line 4333␤»
01:13 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "div"␤    expecting operator␤    at /tmp/ex2YVxp4Hy line 1, column 4␤»
01:13 p6eval ..rakudo 35948: OUTPUT«Parrot VM: PANIC: Null vtable used; did you add a new PMC?!␤C file src/pmc.c, line 246␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot.  Use parrotbug (located in parrot's root directory)
01:13 p6eval ..or se...
01:14 mtnviewmark well - doesn't look like div fares any better
01:20 |jedai| joined #perl6
01:40 diakopter ruoso: you still around?
01:40 ruoso barelu
01:41 diakopter v6/smop/build/p5_coro.c:41: undefined reference to `_Perl_get_sv'
01:41 diakopter what am I missing from which path
01:42 spx2 joined #perl6
01:43 diakopter ruoso: in case you didn't see it, question above
01:43 rabbits77 joined #perl6
01:44 ruoso diakopter, you can skip those files, as p5 integration will depend on pcl anyway
01:45 diakopter ok..
01:45 rabbits77 left #perl6
01:46 |jedai| joined #perl6
01:50 diakopter ruoso: then I get build/s1p_lexical_prelude.c:47: undefined reference to `_SMOP__P5Interpreter'
01:50 diakopter ruoso: (I renamed src/p5*.ri)
01:51 ruoso you can comment that line in there
01:51 ruoso pmurias added te p5 interpreter into the prelude, but you're not building it
01:55 diakopter ruoso: build/smop.os: In function `smop_init':
01:55 diakopter /home/mwilson/source/pugs/v6/smop/build/smop.c:9: undefined reference to `_smop_p5interpreter_init'
01:56 diakopter ruoso: thanks for your help, btw
01:56 ruoso ok... that's in internal.h
01:56 spooneybarger joined #perl6
01:56 ruoso it's a header file that lists the initialization functions
01:56 ruoso you need to comment the reference to p5interpreter again
01:57 ruoso (that's probably valid for pcl coro as well)
01:57 diakopter ruoso: ok
01:57 mtnviewmark joined #perl6
02:01 diakopter ruoso: I got a smop.dll
02:02 ruoso cool
02:02 diakopter ruoso: thanks for your help; gtg for the evening... ttyl
02:02 ruoso ;)
02:03 kid51 joined #perl6
02:07 mtnviewmark joined #perl6
02:10 |jedai| joined #perl6
02:23 TimToady Matt-W: actually, <![abc]> is not strictly a negated character class, it's just a negative lookahead of an ordinary class, with 0 width
02:23 TimToady if you also want it to match a character, use <-[abc]> instead
02:24 TimToady that is equiv ot <![abc]> .
02:27 jhuni joined #perl6
02:35 mtnviewmark oh, TimToady --- is div and mod in on the operators?
02:36 mtnviewmark or are they out?
02:36 |jedai| joined #perl6
02:37 mtnviewmark also - \ is listed as an operator in S03, but not in STD.pm ?
03:15 pugs_svn r25019 | bacek++ | [spec] Fix S29/chomp.t test plan, add fudge for chomp with named argument.
03:21 |jedai| joined #perl6
03:39 alester joined #perl6
03:45 |jedai| joined #perl6
03:55 aindilis` joined #perl6
04:11 |jedai| joined #perl6
04:15 TimToady in
04:15 araujo out
04:24 araujo TimToady, around?
04:27 Sepheebear joined #perl6
04:31 TimToady kinda
04:33 * araujo wants TimToady's opinion about a language he is designing
04:33 araujo s/wants/would like/
04:33 araujo :-P
04:36 eternaleye joined #perl6
04:38 Tene_ araujo: I'm curious.
04:39 stevenjenkins joined #perl6
04:39 TimToady crum, I just figured out that list associative operators need to be right associative when the operator differs, not left
04:39 araujo Tene_, hah .. oh, well, it is not a big thing really ... it is a stack-based object oriented language , it's how i like to define it
04:40 TimToady by 'stack-based' do you mean closer to Forth or to Java?
04:40 araujo And .. I am trying to beat perl 6 in the operator and keyword count
04:40 araujo :-P
04:40 TimToady I mean, Perl 5 is stack based...
04:41 araujo TimToady, Closer to Forth
04:41 araujo Like a concatenative language
04:41 TimToady so kinda like a Parrot that is stack-based rather than register based
04:42 araujo Everything is an object and even a stack is an object, where the stack is the main execution environment ...
04:42 araujo Correct TimToady
04:42 TimToady so why not just program it in Japanese? :)
04:43 araujo hahaha I need to learn japanese first
04:43 araujo :-]
04:43 araujo I have found the message passing style and the stack based approach very appealing ..
04:43 araujo And .. they happen to work very well, either syntactically , and semantically
04:44 araujo together , that is it
04:48 * araujo is even thinking to get it run by parrot
04:55 nihiliad joined #perl6
05:04 nihiliad left #perl6
05:14 Tene_ moritz_: ping
05:16 Sepheebear left #perl6
05:20 |jedai| joined #perl6
05:33 meppl joined #perl6
06:04 pugs_svn r25020 | schwarzer++ | typo
06:07 |jedai| joined #perl6
06:13 alester joined #perl6
06:15 |jedai| joined #perl6
06:19 kisu joined #perl6
06:20 frew Is it valid to have a strsub with a strpos less than the initial int?  i.e. my StrPos $p = 2; "frew".substr(3, $p)
06:28 eric256 joined #perl6
06:31 eric256 left #perl6
06:56 _jedai_ joined #perl6
07:22 ChrisDavaz joined #perl6
07:22 silug joined #perl6
07:26 oss joined #perl6
07:42 |jedai| joined #perl6
08:57 ChrisDavaz joined #perl6
09:38 finanalyst joined #perl6
09:50 pmurias joined #perl6
09:53 pmurias ruoso: Coro contains (and uses) a C coroutine implementation so we can use it without PCL
09:56 schmalbe joined #perl6
10:01 |jedai| joined #perl6
10:05 pmurias ruoso: what i think would be a better solution than having a prefix:<=> method is to keep the variants we need to implement Multi in SMOP::Primitives or similar
10:08 iblechbot joined #perl6
10:23 ejs joined #perl6
10:31 __felix__ joined #perl6
10:31 pmurias TimToady: is &Foo::Bar::infix:<+> legal?
10:48 pugs_svn r25021 | pmurias++ | [smop] [mildew] fixed include paths
10:48 pugs_svn r25021 | pmurias++ | [mildew] FETCH is called before .prefix<=> (spec contradicting behaviour still)
10:48 pugs_svn r25021 | pmurias++ | [smop] removed a duplicated accessor from s1p_multi
10:51 DemoFreak joined #perl6
11:38 pbuetow joined #perl6
11:51 masak joined #perl6
11:58 |jedai| joined #perl6
12:00 ruoso @tell pmurias in the case we really want to make the code more spec-aware, we could make $obj.prefix:<=>() explicitly, instead of doing =$obj
12:00 lambdabot Consider it noted.
12:01 ruoso since prefix:<=> is expected to be a method on Iterator
12:02 ruoso and, I think, the default implementation is: multi prefix:<=>(Any $obj) { $obj.prefix:<=>() }
12:02 ruoso and that is probably the default for every unary operator
12:03 ruoso and that's why TimToady told us the compiler is free to optimize it away where there are no multi candidates for the operator
12:04 ruoso that means I don't think it is that bad for mildew to simply drop the support for unary ops overload before compiler bootstrap
12:05 ruoso since you can simply override the method in the object, instead
12:06 ruoso @tell pmurias I started writing in a @tell, but then wrote some stuff directly... please backlog (which you probably already did)
12:06 lambdabot Consider it noted.
12:07 namenlos joined #perl6
12:08 ruoso @tell pmurias btw, the use of postfix:<++> as a method is an error, I just haven't the time fix it
12:08 lambdabot Consider it noted.
12:16 |jedai| joined #perl6
12:25 spx2 joined #perl6
12:31 vixey joined #Perl6
12:49 |jedai| joined #perl6
13:01 pmurias joined #perl6
13:04 ejs joined #perl6
13:05 pmurias ruoso: isn't having both a method and a multi for the same thing duplication?
13:05 lambdabot pmurias: You have 3 new messages. '/msg lambdabot @messages' to read them.
13:08 ruoso pmurias, I think the idea of having it as a multi is allowing to change the default behavior
13:08 ruoso which is to delegate to the object
13:09 pmurias i guess we can always change it later if it proves to be incorrect
13:11 pmurias int.infix:<< >= >> in array_iterator seems to be incorrecy
13:11 pmurias * incorrect
13:14 slavik joined #perl6
13:14 ruoso yes..
13:14 slavik morning
13:14 ruoso pmurias, it is also incorrect
13:14 pmurias is there a reason for S1P__Array__Iterator to be in c/m0ld rather that p6?
13:14 pmurias slavik: good afternoon ;)
13:14 ruoso I think it was written before we had mildew
13:14 slavik does rakudo have something equivalent to haskell's [3,5,7,...] ?
13:15 slavik pmurias: it's 8:15AM ... what afternoon?
13:17 masak slavik: Rakudo doesn't AFAIK, but it's specced.
13:17 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
13:17 slavik aww :(
13:17 masak @massage
13:17 lambdabot pmurias said 19h 25m 15s ago: the evalbot runs on timtowtdi.org not on feather
13:17 masak oh.
13:18 masak rakudo: say "still out of memory?"
13:18 p6eval rakudo 35948: OUTPUT«Parrot VM: PANIC: Null vtable used; did you add a new PMC?!␤C file src/pmc.c, line 246␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot.  Use parrotbug (located in parrot's root directory) or
13:18 p6eval ..se...
13:18 masak :/
13:18 masak pmurias: someone should do something about that.
13:18 pmurias slavik: is [3,5,7,...] valid haskell
13:18 slavik pmurias: I think so
13:18 masak I think so too.
13:18 masak Haskell is slightly magical.
13:18 slavik pmurias: haskell is smart with lists like that :)
13:19 pmurias ghc thinks otherwise
13:19 slavik maybe it was 2 dots?
13:19 slavik either way, I remember that it could generate a list given a few starting elements
13:22 masak http://haskell.org/tutorial/goodies.html#sect2.4.1
13:22 masak it's two dots and no comma.
13:25 |jedai| joined #perl6
13:28 slavik masak: ty ^^
13:29 pmurias ruoso:
13:30 pmurias what would the correct non-multi version of infix:<+> and >= be?
13:30 slavik left #perl6
13:32 jan_ joined #perl6
13:40 kanru joined #perl6
13:40 aindilis` joined #perl6
13:47 masak TimToady: sometimes I'm unhappy about how restrictive the 'class Foo;' syntax is. the idea is very sound, to remove a level of indentation that encompasses practically the whole file. but I can't do 'class Foo is Bar;', because there's no way to put a use statement before that statement. putting the 'is Bar;' statement on its own line (after the use statement) feels inelegant in another way. the class-semicolon syntax is both full of
13:47 masak promise and a straitjacket right now.
13:50 aindilis` joined #perl6
14:16 _jedai_ joined #perl6
14:16 Whiteknight joined #perl6
14:36 |jedai| joined #perl6
14:39 rindolf joined #perl6
14:41 duke_leto joined #perl6
14:54 kid51 joined #perl6
15:07 diakopter pmurias: hi
15:10 gravity joined #perl6
15:18 pmurias diakopter: hi
15:23 diakopter pmurias: smop finished building, I think
15:23 diakopter how do I know whether the tests ran?
15:23 bahaa2008 joined #perl6
15:24 diakopter pmurias: I got a smop.dll, but no executable?
15:25 diakopter pmurias: or, is the test that these .o files built correctly in build-tests/ ?
15:26 pmurias you should have executables in build-tests
15:26 pmurias they end with .t
15:26 diakopter ahah... yeah, the .t files should be .t.exe on windows
15:27 diakopter 18 .t files, yes.
15:27 diakopter should I just try executing them? :)
15:27 pmurias you can type make test to run them
15:27 diakopter oohhhhhhhhhh
15:27 diakopter ok
15:27 * diakopter feels dumb[er]
15:28 diakopter well, if valgrind were installed
15:28 pmurias you can comment valgrind out
15:29 TimToady frew: if the calculated length of a substr is negative, it should probably fail, since it's more likely to be a logic error than to indicate a desire for a reversed string
15:30 TimToady pmurias: yes, &Foo::Bar::infix:<+> is quite valid
15:30 pmurias diakopter: valgrind doesn't seem to be ported to windows but it's only a debugging tool
15:31 pmurias diakopter: if the tests run you can try running mildew
15:31 pmurias diakopter: type "make test" in v6/mildew to run mildew tests
15:32 frew alright
15:33 frew I'm gonna see about adding some tests to assure it fails in that case
15:34 TimToady masak: yes, STD allows use before class Foo is Bar;
15:34 TimToady however it's not clear the p6 autorecognizer will work in that case
15:34 diakopter pmurias: well, the .t files need renamed to .t.exe, and the smop.dll needs copied to the build-tests dir, but they run
15:34 TimToady so you might have to start with 'use v6'
15:34 diakopter pmurias: but prove doesn't want to run them with the .t.exe
15:35 TimToady alternately, class Foo is Bar; might autouse Bar
15:35 TimToady shoer &
15:35 TimToady *shower
15:35 TimToady and coffee, obviously...
15:35 TimToady &
15:36 masak TimToady: I consider starting with 'use v6' good style anyway. thanks for the good news. submitting rakudobug. :)
15:36 |jedai| joined #perl6
15:38 masak TimToady: re autouse, I was thinking that too. I'm not sure if it's worth it, though. it's kind of a slippery slope.
15:42 pmurias train&
15:42 pmurias diakopter: something like $(PROVE) tests/*.t.exe should work
15:42 pmurias train&
15:54 masak TimToady: in S03:3043, .sig is a typo of .signature, no?
15:55 shinobi-cl joined #perl6
15:55 shinobi-cl hi
15:55 masak shinobi-cl: hello!
15:55 shinobi-cl i got a question about hadling files in perl
15:55 shinobi-cl perl6
15:55 masak shoot
15:56 shinobi-cl how do i do a SEEK on a file? i cant find any docs about it
15:56 shinobi-cl only docs about reading text files
15:56 masak shinobi-cl: have you found S16?
15:56 shinobi-cl nothing about binary files
15:56 masak ok.
15:56 shinobi-cl mmm i?ll take a look
15:56 * masak is out of clues
15:57 masak buubot: spack seek
15:57 buubot masak: S05-regex.pod:2 S16-io.pod:2 S17-concurrency.pod:2
15:57 masak yes, S16 seems a sure bet.
16:02 |jedai| joined #perl6
16:08 shinobi-cl joined #perl6
16:09 icwiener joined #perl6
16:13 bahaa2008 left #perl6
16:26 kid51 joined #perl6
16:31 shinobi-cl when i open a file, and use the readline method, it works, but when i call read, it says "Method read not found for invocant of class 'IO'"
16:32 shinobi-cl is that "read" is not implemented yet?
16:32 shinobi-cl im reading S16, and many methods mentioned there seems to be not declared yet...
16:38 spx2 joined #perl6
16:38 duke_leto left #perl6
16:47 Tene joined #perl6
16:54 shinobi-cl buubot: spack read
16:54 buubot shinobi-cl: S02-bits.pod:16 S03-operators.pod:20 S04-control.pod:7 S05-regex.pod:9 S06-routines.pod:36 S07-iterators.pod:2 S09-data.pod:21 S10-packages.pod:2 S11-modules.pod:4 S12-objects.pod:14 S13-overloading.pod:2 S16-io.pod:14 S17-concurrency.pod:51 S19-commandline.pod:3 S22-package-format.pod:1 S26-documentation.pod:4 S29-functions.pod:5
16:55 shinobi-cl buubot: spack seek
16:55 buubot shinobi-cl: S05-regex.pod:2 S16-io.pod:2 S17-concurrency.pod:2
17:00 shinobi-cl buubot: spack readline
17:00 buubot shinobi-cl: S16-io.pod:1
17:07 azawawi joined #perl6
17:07 azawawi hi
17:21 shinobi-cl hi
17:24 pugs_svn r25022 | azawawi++ | [S:H:P6] Bumped version to 0.035; synced to latest STD.pm; releasing to CPAN
17:26 REPLeffect joined #perl6
17:32 _jedai_ joined #perl6
17:34 ekimmargni joined #perl6
17:36 ekimmargni left #perl6
17:41 |jedai| joined #perl6
17:43 schmalbe joined #perl6
17:46 mtnviewmark joined #perl6
17:50 justatheory joined #perl6
18:02 mtnviewmark joined #perl6
18:10 azawawi joined #perl6
18:13 moritz_ re
18:13 moritz_ Tene: pong
18:30 pugs_svn r25023 | moritz++ | [t] and [t/spec]
18:30 pugs_svn r25023 | moritz++ |  * moved nested_named.t to spec/, and cleaned up
18:30 pugs_svn r25023 | moritz++ |  * fudged closure-parameter.t for rakudo
18:32 Tene moritz_: just still trying to respond to your ping from earlier. :)
18:32 shinobi-cl when i open a file, and use the readline method, it works, but when i call read, it says "Method read not found for invocant of class 'IO'"
18:38 Psyche^ joined #perl6
19:05 |jedai| joined #perl6
19:06 moritz_ frew: please test changes to the tests with rakudo ('make spectest') before you commit them
19:06 moritz_ frew: and if something doesn't run, then please skip it (with #?rakudo skip 'reason')
19:22 mtnviewmark joined #perl6
19:22 mtnviewmark joined #perl6
19:24 aindilis joined #perl6
19:25 wknight8111 joined #perl6
19:27 pugs_svn r25024 | moritz++ | [t/spec/] clean up havoc in S29-str, and remove some overly long tests that
19:27 pugs_svn r25024 | moritz++ | didn't even parse as intended
19:30 _jedai_ joined #perl6
19:49 pugs_svn r25025 | moritz++ | [t/spec] fix plan in split-simple.t, moritz--
19:59 wknight8111 joined #perl6
20:13 smtms joined #perl6
20:13 p6eval joined #perl6
20:16 meppl good night
20:19 frew moritz_: Ok, sorry
20:20 shinobi-cl joined #perl6
20:21 moritz_ frew: no harm done, just skip them the next time (yes, I know TimToady said you didn't have to, but it's nicer for the rakudo folks that way)
20:22 frew moritz_: That's what I figured.
20:22 frew should I do the same with pugs?
20:22 frew and is there a way I can run just one test at a time?
20:22 moritz_ frew: I usually don't, since pugs isn't developed at the moment
20:23 frew ok, then I won't for pugs
20:23 moritz_ when you are in rakudo's working dir, you can say 'make t/spec/S29-str/uc.t'
20:24 frew ok
20:24 frew alright, and you guys apparently already did this for all of the ones I checked in
20:25 moritz_ I did, yes ;)
20:25 frew haha, ok
20:25 frew I have a simple syntax question
20:25 moritz_ shoot!
20:25 frew it wouldn't make sense for my test to ensure that my StrLen $f = -1 fails right?  Because that's a function of the StrLen instantiation
20:25 frew right?
20:26 moritz_ -1 is an integer
20:27 frew is that a problem?
20:27 moritz_ so it would make sense to test that somewhere, I think
20:27 frew yeah
20:27 frew but I am working on strsub right now
20:27 moritz_ well, I don't think that StrLen inherits from Int
20:27 shinobi-cl left #perl6
20:27 moritz_ what is strsub?
20:27 frew woops
20:27 frew substr
20:27 frew sorry
20:28 frew so should it look like this: my StrLen $f = new StrLen(-1) or something?
20:29 frew as it stands I don't think StrLen exists at all, but I want to add the tests with it in substr
20:29 moritz_ "new StrLen(-1)" certainly does not work, maybe StrLen.new(-1)
20:29 moritz_ or StrLen.new(codes => -1)
20:29 jferrero joined #perl6
20:30 moritz_ but in either case positive values make much more sense ;-)
20:33 frew should StrLen.new($foo) work
20:33 ejs joined #perl6
20:36 moritz_ dunno
20:36 shinobi-cl joined #perl6
20:37 moritz_ the only way I know of to generate StrLen objects are Str.index, Str.rindex and maybe items of the match object
20:37 frew well
20:37 frew in my test I am using some function anyway
20:38 frew so I'll just fake it
20:41 aindilis` joined #perl6
20:42 justatheory joined #perl6
20:47 |jedai| joined #perl6
20:52 frew moritz_: when I try to run the tests it always says no plan in TAP output
20:53 moritz_ frew: what operating system are you on?
20:53 frew linux, ubuntu
20:54 frew rakudo runs
20:54 shinobi-cl left #perl6
20:54 moritz_ and if you do ../../parrot perl6.pbc t/spec/path/to/file.rakudo ?
20:55 frew segfault!
20:55 frew maybe I should rebuild parrot
20:56 moritz_ you should ;/
20:56 moritz_ with a 'make realclean' first
20:56 frew ok
20:57 frew this will take a while
20:57 frew I'll work on the test later
20:58 frew thanks moritz_
20:58 pmurias joined #perl6
21:02 jhuni joined #perl6
21:22 mncharity joined #perl6
21:23 Topic for #perl6is now http://pugscode.org/ http://planetsix.perl.org/ | nopaste: http://sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: http://irc.pugscode.org/ | ~330 days 'til Xmas
21:31 |jedai| joined #perl6
21:33 pmurias mncharity: hi
21:33 pugs_svn r25026 | putter++ | [STD.pm] There were two unescaped { in ""'s, parsing as qq escapes.
21:34 mncharity hi pmurias :)
21:35 pmurias mncharity: what are you working on now?
21:37 jhuni joined #perl6
21:38 mncharity same old same old - teaching elf to understand the STD.pm code.
21:39 mncharity hmm, that's ambiguous...
21:40 mncharity trying to get to the point where one can say   elfgreen STD.pm -e 'say /<STD::TOP>/.match("say 3").match_describe'
21:41 moritz_ mncharity: the syntax for calling grammars is now STD.parse("say 3") (although I don't know if it's in the synopsis right now)
21:42 mncharity which means taking the STD_blue (aka gimme5/STD.pm) ast for the STD.pm source file, and trying to get misc/elfish/elfparse to generate valid IR and p5 for it.
21:43 mncharity moritz_: thanks.
21:44 pmurias the README talks about things like elfgreen and elfgreenstd which don't seem to be in elfparse
21:44 mncharity make elfgreen; make elfgreenstd   or  make all
21:50 pmurias mncharity: do you think you'll get better parser performance then STD.pmc?
21:52 mncharity yes,
21:57 |jedai| joined #perl6
21:57 mncharity The near-term objective is to emit something more like STD_red than like STD.pmc.  STD_red works "well enough", and is obviously fast.  The challenge will be fudging the parts of STD.pm which assume there's a cursor, into something rx_on_re compatible.]
21:59 mncharity Specifically, rx call cost is comparable (within a few x) of method call cost, and object allocation is minimized.
22:00 mncharity The p5 code currently emitted is all regex all the time.  "token"ness is ignored.  todo.
22:02 moritz_ isn't "token"ness as simple as putting  (?>...) around the emitted regex?
22:02 mncharity yes
22:03 moritz_ or is that around each atom of the token?
22:03 mncharity though one can do more efficient things, and that's the goal.  ie, no backtracking machinery overhead needed.
22:04 mncharity re 'or is that around each atom of the token?', don't recall, sorry.
22:04 mncharity atom seems more likely.
22:07 pmurias it's a (?>...) around every construct that could backtrack
22:07 mncharity pmurias: Basically, having parsing performance comparable to STD_red is required.  Otherwise elf performance becomes unacceptable.  So, whatever it takes.  But the main theme is kludge around LTM, and get all the token atom sequencing down to method call cost.
22:08 mncharity ah, that makes sense.
22:09 * mncharity tries to remember what  /a ** b/  and /a ~ b/ are...
22:10 moritz_ a ** 2 is a repeated 2 times
22:10 moritz_ and  /a ~ b c/ is goal-matching
22:11 moritz_ and similar to /a c [ b || <panic: "can't find terminator"> ] /
22:14 mncharity STD.pm is using the  a ** <b>  and  a ** 'b'  interleave forms of **.    ~  looks more fun.
22:15 moritz_ ah, a ** 'b' is /a [ b a]*/, iirc
22:15 moritz_ a's separated by b's
22:17 mncharity yeah.  the rewrite on ~ ...  "something more like:   $<OPEN> = '(' <SETGOAL: ')'> <expression> [ $GOAL || <FAILGOAL> ] ", but that's obviously an approximation (ie, there's actually no $<OPEN> set, yes?).  so... sigh.  I'll fudge an expansion rule to match observed gimme5 behavior on STD.pm cases.  puttering onward...
22:18 mncharity be nice to have the spec nailed down at some point.
22:19 moritz_ I guess that SETGOAL sets $GOAL
22:19 moritz_ pmichaud wanted to commit a clarification of that things, iirc
22:19 moritz_ but he seems to be very much absorbed with organizing infrastructure for Rakudo sees days
22:19 pugs_svn r25027 | bacek++ | [spec] Add tests to Range.min and Range.max
22:22 |jedai| joined #perl6
22:23 mtnviewmark joined #perl6
22:28 pugs_svn r25028 | moritz++ | [t/spec] skip diying tests (for rakudo)
22:29 mncharity hmm, re spec nailing down, I hypothesize we need a concept of a version of p6 other than p6.0 or release candidates.  Ie, to formalize the notion that we're not [it seems unlikely or suboptimal] monotonically converging on a p6.0, but rather getting to a "version like p6.0, but explicitly not it, and intended to get experience using p6 prior to settling on the p6.0 spec".
22:29 mncharity perhaps
22:32 mncharity ie, "p6 exploration builds", where @larry still feel free to modify the p6 spec, in light of people starting to get experience actually using draft p6.  once we hit 6.000, a whole lot of flexibility goes away.  hmm, unless we declare  6.000-6.whatever to explicitly be unstable development versions.
22:32 mncharity anyway, back to hacking...
22:32 pugs_svn r25029 | pmurias++ | [mildew] handling &Foo::Bar::baz and &Foo::infix:<+>
22:33 moritz_ mncharity: actually Rakudo will likely have an "early adopter's release", which is hopefully very clearly not full Perl 6
22:35 ejs joined #perl6
22:35 pmurias mncharity: once we hit 6.0.0 we will have to add a backward compability mode for every change but other than that Perl 6 can evolve further
22:37 Jedai joined #perl6
22:41 bacek joined #perl6
22:44 mncharity re 6.0.0, it might be useful to declare 6.0.N to be "early adopter's release"s, giving the flexibility to only freeze the spec when "it feels the right time".
22:44 mncharity or even do an incremental freeze.
22:44 mtnviewmark wouldn't it be more perl6 like to use an adverb?  :-)    6.0:pre(1)
22:49 bacek perl6: say (1).reduce: { $^a * $^b }
22:49 p6eval pugs: OUTPUT«1␤»
22:49 p6eval ..rakudo 35948: OUTPUT«Parrot VM: PANIC: Null vtable used; did you add a new PMC?!␤C file src/pmc.c, line 246␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot.  Use parrotbug (located in parrot's root directory)
22:49 p6eval ..or se...
22:49 p6eval ..elf 25029: OUTPUT«Can't call method "reduce" without a package or object reference at (eval 120) line 3.␤ at ./elf_h line 4333␤»
22:54 mncharity *grin*
22:54 mncharity # re adverb
22:56 hudnix joined #perl6
22:58 |jedai| joined #perl6
23:08 mncharity TimToady: ~ is speced as taking 2 right side arguments, but  /a ~ b c d/ is currently grabbing the d, parsing as ~(a,termish(b,c,d)).  /[a ~ b c] d/ works.  perhaps groupify the one or two cases in STD.pm where there's a d?
23:13 shinobi-cl joined #perl6
23:13 shinobi-cl hi
23:13 moritz_ hi
23:15 shinobi-cl im trying to use the read method on a file... readline works, and both are listed together on S16...
23:15 moritz_ seems not yet implemented in Rakudo
23:15 moritz_ care to submit a [TODO] bug report?
23:15 shinobi-cl ahh, i see
23:15 shinobi-cl sure, where i do that?
23:15 moritz_ rakudobug@perl.org
23:16 shinobi-cl ok, thanks!
23:18 bacek perl6: say elems [1..4]
23:18 p6eval pugs: OUTPUT«4␤»
23:18 p6eval ..elf 25029: OUTPUT«Undefined subroutine &GLOBAL::elems called at (eval 121) line 3.␤ at ./elf_h line 4333␤»
23:18 p6eval ..rakudo 35948: OUTPUT«Parrot VM: PANIC: Null vtable used; did you add a new PMC?!␤C file src/pmc.c, line 246␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot.  Use parrotbug (located in parrot's root directory)
23:18 p6eval ..or se...
23:18 bacek rakudo requires "make realclean"...
23:18 moritz_ will do
23:18 bacek moritz_: btw, is "4" is expected result here?
23:19 bacek rakudo says "1" and I tend to agree with it.
23:19 moritz_ bacek: I don't know, this kind of things always confused me :/
23:20 moritz_ surely [1..4].elems will say 4
23:20 moritz_ woah, this is confusing
23:21 moritz_ 4
23:21 moritz_ ./rakudo -e 'sub f(@a) { @a.elems }; say f([1, 2, 3, 4])'
23:21 moritz_ that's... *drumrolls* ... 4
23:21 moritz_ but elems [1..4] is 1
23:21 moritz_ that's got to be wrong somehow
23:21 bacek perl6: sub f(@a) { @a.elems }; say f([1, 2, 3, 4])
23:22 p6eval elf 25029, pugs: OUTPUT«4␤»
23:22 p6eval ..rakudo 35948: OUTPUT«sh: ./parrot: No such file or directory␤»
23:22 bacek moritz_: it is... confusing
23:23 bacek S29-array/elems.t says "4". Should I change it?
23:23 moritz_ bacek: i'm writing a mail to p6l right now
23:23 moritz_ perl6: say [1..4].perl
23:23 p6eval pugs: OUTPUT«\(1, 2, 3, 4)␤»
23:23 p6eval ..elf 25029: OUTPUT«[1,2,3,4]␤»
23:23 p6eval ..rakudo 35948: OUTPUT«sh: ./parrot: No such file or directory␤»
23:23 moritz_ perl6: say [1..4].elems
23:23 bacek moritz_: ok
23:23 p6eval elf 25029, pugs: OUTPUT«4␤»
23:23 p6eval ..rakudo 35948: OUTPUT«sh: ./parrot: No such file or directory␤»
23:24 bacek perl6: say elems([1,2,3,4],)
23:24 p6eval pugs: OUTPUT«4␤»
23:24 p6eval ..rakudo 35948: OUTPUT«sh: ./parrot: No such file or directory␤»
23:24 p6eval ..elf 25029: OUTPUT«Undefined subroutine &GLOBAL::elems called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
23:24 moritz_ elf: f(@a) { @a.elems }; say f([1, 2, 3, 4])
23:24 p6eval elf 25029: OUTPUT«Parse error in: /tmp/OeztLBAq2n␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: f(@a) { @a.elems }; say f([1, ␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
23:24 p6eval ..STD_r...
23:25 moritz_ elf: sub f(@a) { @a.elems }; say f([1, 2, 3, 4])
23:25 p6eval elf 25029: OUTPUT«4␤»
23:27 mncharity is there a global elems() ?
23:28 moritz_ mncharity: the test suite, rakudo and pugs think so
23:30 shinobi-cl perl6: say "just testing"
23:30 p6eval elf 25029, pugs, rakudo 36011: OUTPUT«just testing␤»
23:32 bacek mncharity:  our Int method elems (@array: ) is export
23:32 bacek this is from S29
23:38 mncharity re 'method elems', so how does elems(@a) call that?  is spec that foo(@a) results in @a.foo if there isn't a foo() sub defined?
23:38 mncharity /me puzzled
23:39 moritz_ mncharity: the 'is export' traits in S29 indicate that a sub form exists
23:39 mncharity ah, ok.  multi, yes?
23:39 moritz_ right.
23:40 mncharity danke
23:56 shinobi-cl left #perl6

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

Perl 6 | Reference Documentation | Rakudo