Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-09-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:00 Blwood the synopsis about IO : http://perlcabal.org/syn/S16.html hasn't go a link for slurp() and connect()
00:00 lambdabot Title: S16
00:05 gojo10 left #perl6
01:30 buetow joined #perl6
01:33 kcwu joined #perl6
01:49 snearch joined #perl6
04:11 justatheory joined #perl6
04:39 weinig joined #perl6
04:48 Ashizawa joined #perl6
04:52 sunnavy joined #perl6
05:33 agentzh joined #perl6
05:35 devogon joined #perl6
05:52 adrian_ joined #perl6
05:55 moritz_ Blwood: which means we need more tests
05:58 rfordinal joined #perl6
06:01 moritz_ good morning ;)
06:09 [particle] joined #perl6
06:16 weinig_ joined #perl6
06:35 jisom joined #perl6
06:42 renormalist joined #perl6
06:55 szbalint joined #perl6
07:06 agentzh morning, moritz_ :)
07:12 moritz_ agentzh: could you add an option to the smartlink script to spit out a list of all tests that don't contain smartlinks?
07:13 moritz_ the grep/ack solutions work partially, but they are a cludge
07:13 agentzh moritz_: sure :)
07:13 agentzh moritz_: will add to my TODO list :)
07:14 moritz_ maybe I get round to it as well...
07:23 agentzh cool
07:23 moritz_ doesn't seem to be too hard
07:23 agentzh moritz_: there's POD at the end of smartlinks.pl explaining the AST...
07:23 iblechbot joined #perl6
07:23 moritz_ agentzh: I won't dig into the AST ;)
07:24 moritz_ agentzh: I'm trying to catch it where you loop over the test files
07:24 agentzh moritz_: fine
07:25 moritz_ hey, that doesn't seem to be too hard ;)
07:27 pugs_svnbot r17640 | moritz++ | smartlinks.pl: added option --missing to check for test
07:27 pugs_svnbot r17640 | moritz++ | files without smartlinks
07:27 pugs_svnbot diff: http://dev.pugscode.org/changeset/17640
07:28 lambdabot Title: Changeset 17640 - Pugs - Trac
07:31 pugs_svnbot r17641 | moritz++ | t/regex/from_perl6_rules/anchors.t: fixed smartlink
07:31 pugs_svnbot diff: http://dev.pugscode.org/changeset/17641
07:31 lambdabot Title: Changeset 17641 - Pugs - Trac
07:32 moritz_ it feels like most of the broken smartlinks I'm fixing now are caused by me ;)
07:32 pugs_svnbot r17642 | moritz++ | t/regex/capture_rollback.t: fixed smartlink
07:32 pugs_svnbot diff: http://dev.pugscode.org/changeset/17642
07:33 lambdabot Title: Changeset 17642 - Pugs - Trac
07:34 elmex joined #perl6
07:34 agentzh moritz_++
07:35 franck___ joined #perl6
07:36 pugs_svnbot r17643 | moritz++ | passing_the_pair_class_to_a_sub.t: fixed smartlink
07:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/17643
07:36 devogon joined #perl6
07:36 lambdabot Title: Changeset 17643 - Pugs - Trac
07:36 meppl good morning
07:36 moritz_ now this one wasn't broken by me, but by a change to the synopsis ;)
07:36 moritz_ good morning meppl ;)
07:38 meppl good morning mortiz
07:38 pugs_svnbot r17644 | moritz++ | t/syntax/long_dot.t: fixed smartlink
07:38 pugs_svnbot diff: http://dev.pugscode.org/changeset/17644
07:38 lambdabot Title: Changeset 17644 - Pugs - Trac
07:38 moritz_ info: 599 smartlinks found and 0 broken.
07:38 moritz_ nice ;)
07:54 agentzh yay!
08:01 TimToady joined #perl6
08:09 jisom joined #perl6
08:16 Aankhen`` joined #perl6
08:28 drupek12 joined #perl6
08:33 ruoso joined #perl6
08:54 Aankhen`` joined #perl6
08:57 laye joined #perl6
09:02 elmex joined #perl6
09:07 pugs_svnbot r17645 | ruoso++ | [kp6] simplifying makefile, at least untill kp6-kp6 bootstraps
09:07 pugs_svnbot diff: http://dev.pugscode.org/changeset/17645
09:20 ruoso joined #perl6
09:22 drupek12 joined #perl6
09:23 Blwood_ joined #perl6
09:27 iblechbot joined #perl6
09:34 drupek12 joined #perl6
09:45 fglock joined #perl6
09:49 moritz_ what's the policy of adding failing (but compiling) tests to TESTS in kp6?
09:50 moritz_ for example /01-sanity/03-equal.t compiles, but partially fails
09:51 ruoso moritz_, we try to keep them working
09:52 ruoso but at this moment, due to the bootstrap efforts... some of them are failing
09:54 TimToady_ joined #perl6
09:55 pugs_svnbot r17646 | ruoso++ | [kp6] KP6::Runtime::P5::Compiler almost rewritten in P6
09:55 pugs_svnbot diff: http://dev.pugscode.org/changeset/17646
09:55 lambdabot Title: Changeset 17646 - Pugs - Trac
10:10 riffraff joined #perl6
10:17 rindolf joined #perl6
10:18 Blwood joined #perl6
10:31 nipra joined #perl6
10:35 pugs_svnbot r17647 | ruoso++ | [kp6] starting to change calling convention from kp6-mp6 to kp6-kp6 in kp6-kp6 (yes, thats bootstrapping)
10:35 pugs_svnbot diff: http://dev.pugscode.org/changeset/17647
10:35 lambdabot Title: Changeset 17647 - Pugs - Trac
10:41 pugs_svnbot r17648 | ruoso++ | [kp6] declared some of the Pad attributes
10:41 pugs_svnbot diff: http://dev.pugscode.org/changeset/17648
10:41 lambdabot Title: Changeset 17648 - Pugs - Trac
10:56 rindolf joined #perl6
10:59 pugs_svnbot r17649 | fglock++ | [kp6] minimal test for Pad objects
10:59 pugs_svnbot diff: http://dev.pugscode.org/changeset/17649
10:59 lambdabot Title: Changeset 17649 - Pugs - Trac
11:10 Blwood is there a difference of implementation between [+] and sum ?
11:11 moritz_ sum is a method, [+] is an operator
11:11 moritz_ I guess that's all
11:12 Juerd Hm, can reduction be used as a method?
11:12 Juerd @foo.[*]
11:12 lambdabot Unknown command, try @list
11:12 Juerd Hm, of course not.
11:12 Juerd That's @foo[@foo.last]
11:13 Blwood because there's a very little difference of execution time between [+] and sum
11:13 fglock maybe @foo.reduce( &infix:<+> )
11:13 moritz_ Blwood: are you asking about current or desired implementation?
11:14 avar the current hyper implementations just do what sum would do, loop over the list and accumulate
11:14 Juerd fglock: That probably doesn't use identity
11:14 moritz_ avar: I thought pugs did some autothreading on SMP maschines?
11:14 Juerd IIRC it doesn't
11:15 Blwood moritz_, ? sorry I didn't understand
11:15 moritz_ one of audreyt's slides mentioned that at YAPC::Asia iirc
11:16 fglock i think identity is a method of the &infix:<+> code object
11:16 pugs_svnbot r17650 | ruoso++ | [kp6] created a kp6-kp6 test dir which can be compiled by kp6-mp6 and be runned with kp6-kp6 runtime
11:16 pugs_svnbot diff: http://dev.pugscode.org/changeset/17650
11:16 lambdabot Title: Changeset 17650 - Pugs - Trac
11:16 moritz_ Blwood: which part?
11:16 * moritz_ tries to understand MAD output in blead
11:16 Blwood moritz_, "current or desired implementation"
11:17 moritz_ Blwood: well, current implemetations (like pugs) are certainly far from being perfect...
11:17 moritz_ Blwood: and maybe they implement sum and [+] differently
11:18 moritz_ Blwood: but I don't expect that there''l be a measurable difference once these implementatioins are close to perfection
11:19 Blwood okay :), so the difference between [+] and sum is that [+] is an operator, and sum a function/method, but why should I use the first one or the second ? If I want the sum of elements in a list I don't see any differences
11:19 avar moritz_: Actually there will, a to->p5 implementation like the current kp6 backend won't autothread smoothly without someone implementing that in XS
11:19 daxim joined #perl6
11:19 pugs_svnbot r17651 | ruoso++ | [kp6] as the kp6-kp6 compiler still dont work... all tests are compiled with kp6-mp6, but runned in the kp6-kp6 runtime
11:19 pugs_svnbot diff: http://dev.pugscode.org/changeset/17651
11:19 lambdabot Title: Changeset 17651 - Pugs - Trac
11:20 avar Blwood: You want [+] because it'll be faster and because it makes more sense, you want the plus operation logically across a list
11:21 Blwood yeah, you're right
11:28 pugs_svnbot r17652 | ruoso++ | [kp6] updated bootstrap todo list
11:28 pugs_svnbot diff: http://dev.pugscode.org/changeset/17652
11:28 lambdabot Title: Changeset 17652 - Pugs - Trac
11:42 buetow joined #perl6
11:46 pugs_svnbot r17653 | ruoso++ | [kp6] recompile script unecessary
11:46 pugs_svnbot diff: http://dev.pugscode.org/changeset/17653
11:46 lambdabot Title: Changeset 17653 - Pugs - Trac
11:53 pugs_svnbot r17654 | ruoso++ | [kp6] added a README file, explaining the directory strucuture
11:53 pugs_svnbot diff: http://dev.pugscode.org/changeset/17654
11:53 lambdabot Title: Changeset 17654 - Pugs - Trac
11:53 masak joined #perl6
11:56 pugs_svnbot r17655 | blwood++ | main function
11:56 pugs_svnbot diff: http://dev.pugscode.org/changeset/17655
11:56 lambdabot Title: Changeset 17655 - Pugs - Trac
12:09 Daveman joined #perl6
12:14 mkanat joined #perl6
12:24 pbuetow joined #perl6
12:25 kanru joined #perl6
12:26 masak for a long time I've been wanting an REPL loop for Java, for educational purposes. I've come to realize that Java is exceptionally ill-suited to parsing/executing itself at runtime...
12:27 masak so now I'm actually leaning towards implementing a Java grammar in perl6
12:27 moritz_ masak: somebody(tm) wrote a Java class to Perl 6 class translator...
12:27 masak yes
12:28 moritz_ masak: it was one of the microgrants
12:28 masak maybe I could reuse code from that
12:28 moritz_ maybe you want to take a look at that
12:28 masak it's strange, coming from a Perl direction I sorta take for granted that a programming language will have eval()
12:28 masak I mean, how could it not?
12:28 masak but seemingly, Java doesn't :(
12:29 wolverian masak, there's beanshell
12:29 wolverian which is not java :)
12:29 masak wolverian: I know
12:29 masak didn't they also reimplement the Java grammar?
12:30 mkanat left #perl6
12:30 masak it miight be good looking at what they did, too, for inspiration
12:30 masak thing is, I'm lazy and I want to write as little as possible
12:30 wolverian it has a language that is not java, but it also supports java
12:31 masak so, a superset
12:31 wolverian something like that, yes
12:31 masak I don't want that
12:31 masak but the thing I want can probably not really be called Java either, since I want a REPL loop
12:31 masak basically, I want a cross between irb and Java
12:33 masak I've been wanting this for about a year, and I thing it would be a great sandbox for Java development
12:33 moritz_ REPL for java sounds so weird to me... do you want to write a class on each line?
12:33 masak :)
12:33 masak no
12:33 moritz_ NQJ? not quite java?
12:33 masak supporting class declarations would be nice
12:33 masak but I certainly want to be able to execute statements outside of a class, too
12:34 masak sort of like Perl 6
12:34 masak I probably wouldn't want orphan methods, though
12:34 masak but maybe a nice syntax to inject methods into non-final classes after defining them
12:34 wolverian the java api has no language reflection classes for this sort of a thing?
12:35 wolverian I thought 1.5^W5 gained something there
12:35 masak what sort of thing? adding methods?
12:35 wolverian compilation
12:35 masak it does
12:35 masak so technically, I could write my line to a file (with class/main around it), compile. and run
12:36 masak but that wouldn't take care of my already defined vars, so I would have to fix that
12:36 masak I must say, though, that it does feel wrong having to go through the file system for every line
12:36 wolverian new ExecutionEnvironment() // no? :(
12:37 wolverian (I just made that up)
12:37 masak I may have looked at the wrong place, but the only thing I've found is a way to compile .java files into .class files and load them using the class loader
12:38 wolverian poo on that.
12:38 masak (sorry for being slightly OT today, I'm trying to keep some connection to the topic by wondering alound whether p6 can help me here. the ##java channel certainly couldn't)
12:40 cmarcelo joined #perl6
12:41 moritz_ masak: don't worry.. there wasn't that much p6 discussion today anyway ;)
12:43 masak ;)
12:43 masak but really, I'm interested in how p6 grammar might be leveraged here
12:43 masak I'm no p6 grammar expert, but the way I understand, it's really useful for describing languages
12:44 moritz_ aye ;)
12:44 masak now, Java is no small language by any means, but it still feels doable
12:44 masak starting with expression syntax, working up through methods and classes...
12:44 moritz_ maybe sun even publishes an EBNF grammar
12:45 moritz_ if so, you can easily convert that to p6 rules
12:45 masak I've been seeing things like that in their JLS
12:46 masak actually, it would feel sort of "pure" to feed the JVM with JIT-compiled code from the Java shell, but I'm not sure how well suited the JVM is for that kind of successive feeding
12:48 demq32 joined #perl6
12:55 masak here's the whole grammar: http://java.sun.com/docs/books/jls/third_edition/html/syntax.html#18.1
12:55 lambdabot http://tinyurl.com/ypnqs7
12:56 masak it should be possible to make a small converter from that page to a p6 grammar
12:56 moritz_ aye
12:58 * masak rejoices
12:58 masak now all that remains, as a theoretical obstacle, is emulating the runtime model...
12:59 moritz_ first you need to transform the parse tree to an AST
12:59 masak yes
12:59 masak but the grammar will do that for me, no?
13:00 moritz_ no, it just builds a parse tree
13:00 masak ah
13:00 masak hm, wonder if there's a Java-certified conversion to such an AST
13:00 moritz_ ;)
13:01 masak because designing ASTs seems to be a hurdle, and I'm not sure I'd do it right on the first attempt
13:01 masak ASTs need to be flexible, lightweight and specialized
13:01 masak it's a pick-any-two situation
13:01 moritz_ no, primarily they have to work ;)
13:01 masak :)
13:02 masak so, why not just call the parse tree an AST, then?
13:02 moritz_ because it's rather inconvenient
13:02 masak exactly :)
13:02 moritz_ an perl example: you'd convert unless { } to if { } in the course of AST transformation
13:03 masak yup
13:03 masak Pugs does
13:03 moritz_ and loop(a; b; c){d} to a; while(b){d; c} and the like
13:03 masak hm
13:03 masak yes
13:03 masak at which point is constant folding and stuff made?
13:04 masak I will probably not have to do that here, just interested
13:04 moritz_ dunno ;)
13:04 masak seems like one would want to do that on the AST
13:07 masak hm, the GSoC project seems almost complementary to what I want to do
13:07 masak http://www.perlfoundation.org/april_7_2007_phil_crow_to_create_jdbc_api_for_perl_6
13:07 lambdabot http://tinyurl.com/yrcw9t
13:07 masak only declarations, not code
13:07 masak though that thing about the "Java deparser" seems like a nice thing to look into
13:09 moritz_ but it's not what you want, because first you need to get it to bytecode ;)
13:10 masak moritz_: yes, provided I even want that
13:10 masak actually, I'd be pretty happy if I could parse the subset of Java which is written inside of methods
13:11 masak parse/execute
13:11 masak but that would include... ah, interacting with the Java API classes
13:11 masak ...which is where Pugs comes in again
13:11 masak pugs can do this, right?
13:14 moritz_ can it?
13:14 jhorwitz joined #perl6
13:15 masak call into Java API classes, I mean
13:15 masak I seem to recall reading about that
13:16 Psyche^ joined #perl6
13:26 daxim_ joined #perl6
13:28 masak hm, beanshell is not what I want, but maybe I can use its eval method to do what I want: http://www.beanshell.org/manual/bshmanual.html#Calling_BeanShell_From_Your_Application
13:28 lambdabot Title: BeanShell User's Manual, http://tinyurl.com/3cr9k
13:28 masak hooray for not having to reinvent the Java wheel!
13:31 moritz_ hooray for reinventing the wheel!
13:31 masak :)
13:31 masak that, too
13:48 TJCRI joined #perl6
13:49 andara joined #perl6
13:52 |Jedai| joined #perl6
14:04 flokuehn joined #perl6
14:08 amnesiac joined #perl6
14:45 Arathorn joined #perl6
14:51 moritz_ is the (non)interpolation in regex charclasses identical to the rest of regexes?
14:51 moritz_ ie $string vs <[$string]>
14:52 moritz_ #pugs my $a="bc"; say "ac" ~~ m/a<[$a]>/
14:52 exp_evalbot OUTPUT[␤]
14:52 moritz_ #pugs my $a="bc"; say ?("ac" ~~ m/a<[$a]>/)
14:52 exp_evalbot OUTPUT[1␤]
14:52 moritz_ #pugs my $a="bc"; say ~("ac" ~~ m/a<[$a]>/)
14:52 exp_evalbot OUTPUT[a␤]
14:52 moritz_ #pugs my $a="bc"; say ~("ac" ~~ m/<[$a]>/)
14:52 exp_evalbot OUTPUT[␤]
14:53 moritz_ #pugs my $a="bc"; say ?("ac" ~~ m/<[$a]>/)
14:53 exp_evalbot OUTPUT[1␤]
14:53 fglock joined #perl6
14:55 TimToady_ regexes only use variables; they never interpolate
14:55 TimToady_ they aren't strings any more
14:55 moritz_ ok, interpolation is badly phrased
14:56 moritz_ so do char classes assemble possible chars from passed variables?
14:56 TimToady_ no
14:56 moritz_ should I split them to an array, and use that?
14:56 TimToady_ that would be one way to do it
14:57 TimToady_ we might go as far as to allow <+$a-$b>
14:57 moritz_ that would be great
14:58 TimToady_ since + is probably becoming the the ?
14:58 TimToady_ that is, <?ws> is likely turning into <+ws>
14:58 TimToady_ where + implies width, and ? implies non-width
14:58 TimToady_ to make ? the same as !
14:59 moritz_ and + is non-capturing?
14:59 TimToady_ correct
14:59 moritz_ so how would I start a capturing char class?
14:59 moritz_ <[]+alpha>?
14:59 TimToady_ same as you do now
14:59 TimToady_ alpha is just a subrule
14:59 TimToady_ <+alpha> works fine
15:00 TimToady_ you don't know how long your characters are anyway
15:01 moritz_ but why is <+ws> non-capturing and <+alpha> capturing?
15:01 * moritz_ is confused
15:01 TimToady_ <+alpha> isn't capturing
15:01 TimToady_ never has been
15:01 autin joined #perl6
15:01 moritz_ ok
15:01 moritz_ so I'd use <alpha=<+alpha>> or something
15:02 moritz_ or $<alpha>:=<+alpha> in the old syntax
15:02 TimToady_ or something
15:02 * amnesiac interpolates TimToady_
15:02 rhizo joined #perl6
15:02 TimToady_ <+alpha> -> $<alpha> is another possibility
15:03 TimToady_ that syntax would probably require either a block or semi after though
15:04 moritz_ doesn't that contradict the "import things first" notion?
15:04 TimToady_ what's to import?
15:05 moritz_ s/import/important/
15:05 TimToady_ the important thing is the pattern, by one reckoning
15:05 moritz_ typing is hard.. nearly as hard as thinking
15:05 TimToady_ and the pattern match happens before the binding, so arguably it can be on the left
15:06 moritz_ ok, good point
15:06 pmurias joined #perl6
15:06 TimToady_ possibly [] -> $x; is a way to declare "my $x" in a pattern
15:07 TimToady_ btw, yes, hyperops can autothread in pugs
15:07 renormalist joined #perl6
15:08 TimToady_ also, there's no identity method for infix:<+> other than "multi infix:<+> () { 0 }"
15:08 TimToady_ it just relies on multiple dispatch with no args
15:09 pugs_svnbot r17656 | ruoso++ | [kp6] fixing "make test"
15:09 pugs_svnbot diff: http://dev.pugscode.org/changeset/17656
15:09 lambdabot Title: Changeset 17656 - Pugs - Trac
15:12 pugs_svnbot r17657 | ruoso++ | [kp6] now make has "make kp6_kp6" and "make kp6_mp6"
15:12 pugs_svnbot r17658 | ruoso++ | [kp6] avoid compiling kp6.p6 as it still doesnt work
15:12 pugs_svnbot diff: http://dev.pugscode.org/changeset/17658
15:12 lambdabot Title: Changeset 17658 - Pugs - Trac
15:15 pmurias ruoso: hi
15:16 penk joined #perl6
15:19 ruoso pmurias, hi
15:20 fglock i'm looking for the rev when Multi got broken
15:21 fglock now reading the svk docs
15:22 fglock how do i get to an old version?
15:23 rgs svk up -r old-revision-number
15:24 fglock rgs: thanks
15:25 pugs_svnbot r17659 | pmurias++ | [kp6] kp6.p6 uses .push which works
15:25 pugs_svnbot diff: http://dev.pugscode.org/changeset/17659
15:25 lambdabot Title: Changeset 17659 - Pugs - Trac
15:34 pmurias fglock: are you looking by hand or with a script?
15:35 fglock by hand, i'm going back in svn and testing
15:36 moritz_ git-bisect++
15:38 barney joined #perl6
15:41 fglock found it - http://dev.pugscode.org/changeset/17617
15:41 lambdabot Title: Changeset 17617 - Pugs - Trac
15:42 pmurias i suspected that one
15:43 fglock but it changes almost nothing
15:43 fglock i think some previous version was not compiled
15:43 pmurias me too
15:43 weinig joined #perl6
15:44 pmurias the bug didn't go away after recompiling lib5
15:44 pugs_svnbot r17660 | ruoso++ | [kp6] begin_block evals, but dont treat side effects yet. Thats ok for bootstrap, as kp6 itself doesnt use begin blocks
15:44 pugs_svnbot diff: http://dev.pugscode.org/changeset/17660
15:44 lambdabot Title: Changeset 17660 - Pugs - Trac
15:45 pmurias well lib5/KindaPerl6/Runtime/Perl6/*
15:46 fglock i'm doing a forcerecompile in the previous version
15:48 ruoso #pugs my $a = 1; say $a; BEGIN { $a = 2 }; say $a;
15:48 exp_evalbot OUTPUT[1␤1␤]
15:48 pugs_svnbot r17661 | ruoso++ | [kp6] update bootstrap notes
15:48 pugs_svnbot diff: http://dev.pugscode.org/changeset/17661
15:48 lambdabot Title: Changeset 17661 - Pugs - Trac
15:48 ruoso #pugs my $a; say $a; $a = 1; say $a; BEGIN { $a = 2 }; say $a;
15:48 exp_evalbot OUTPUT[2␤1␤1␤]
15:49 ruoso #kp6 my $a; say $a; $a = 1; say $a; BEGIN { $a = 2 }; say $a;
15:49 exp_evalbot r17661: OUTPUT[2␤1␤1␤]
15:49 moritz_ that seems right
15:50 ruoso I was actually trying to understand how kp6 does it
15:50 ruoso but now I saw, the side effects emitter generates it inside a p5 BEGIN block
15:51 szbalint joined #perl6
15:51 pmurias it should IMHO just set the default for the variable
15:52 ruoso pmurias, the problem is that in kp6 today there's no real separation in code emitting between the "vm state" and the "ast emitting"
15:52 stevan__ joined #perl6
15:53 ruoso in theory, the state would be emitted before, setting all the symbols that were defined after the compilation
15:53 ruoso and just after that, we would have the code itself
15:53 ruoso kp6 uses the p5 BEGIN feature today
15:54 ruoso that means we need to implement all the namespace and lexical scoping on top of p5 instead of using p5
15:54 ruoso but that stays for the new compiler
15:54 ruoso he
15:54 ruoso heh
15:59 pmurias when is BEGIN run in p6?
16:00 ruoso in the compile phase only
16:00 ruoso if there's a "object" file
16:00 ruoso the object will not run the block when someone runs it
16:00 pmurias at parse time? i seem to remember it's in some way different then in p5
16:01 fglock it's just like in perl5
16:01 ruoso I think it is in parse time
16:01 ruoso because a BEGIN may define new macros
16:01 ruoso right, fglock?
16:01 pmurias thanks
16:01 buetow joined #perl6
16:02 moritz_ and modify the grammar, if needed :=
16:02 fglock yes
16:02 moritz_ s/=/)/
16:02 ruoso is that happening in kp6 now?
16:02 pmurias yes
16:04 ruoso we need a p5 hack to be able to run two different code blocks in the same stash
16:04 subichan joined #perl6
16:04 ruz joined #perl6
16:05 fglock that's Pad.add_lexicals
16:07 rindolf joined #perl6
16:11 stevan_ joined #perl6
16:25 kjwcode joined #perl6
16:27 subichan is there any other perl6 implementation except the haskell one?
16:29 moritz_ subichan: aye, but pugs is the most advanced
16:29 justatheory joined #perl6
16:29 moritz_ subichan: there's perl6 on parrot, kp6, nqp (not quite perl)
16:29 subichan and what's kp6 ?
16:30 moritz_ #eval say("a perl6 interpreter/compiler");
16:30 exp_evalbot kp6: OUTPUT[a perl6 interpreter/compiler␤]
16:30 exp_evalbot ..pugs: OUTPUT[a perl6 interpreter/compiler␤]
16:30 exp_evalbot ..p6: OUTPUT[a perl6 interpreter/compiler␤]
16:30 exp_evalbot ..nqp: OUTPUT[a perl6 interpreter/compiler␤]
16:30 moritz_ subichan: KindaPerl6, an perl6 implementation in p5 and p6
16:30 moritz_ http://www.pugscode.org/kp6.html
16:30 lambdabot Title: kp6 - KindaPerl6
16:32 subichan so basically somebody says how perl6 should be and a buncha people go and implement it in several languages?
16:32 moritz_ subichan: right
16:33 subichan noone proposed an ASM implementation yet? lol
16:33 moritz_ subichan: you could start one ;)
16:33 subichan how much time till one of these becomes official though? when's the deadline?
16:34 moritz_ there's no deadline, and every implementation that passes the test suite will be "official"
16:34 moritz_ but we expect a release on christmas
16:34 moritz_ don't know which year, though ;)
16:34 moritz_ probably 2008
16:35 subichan so you could even implement it after ten years if perl6 is still alive and if it passes the test suite then it's official?
16:35 moritz_ yes
16:36 subichan ok.. now onto something quite different then.. who gets to decide how perl6 will be ?
16:36 moritz_ mostly Larry Wall aka TimToady_
16:36 moritz_ the specs are here: http://perlcabal.org/syn/
16:36 lambdabot Title: Official Perl 6 Documentation
16:37 subichan I'd like to suggest a thing, how do I do that?
16:39 moritz_ write a mail to perl6-language@perl.org
16:39 lesterc joined #perl6
16:40 moritz_ afk &
16:40 subichan OK thanks!
16:40 pmurias or you could discuss it here first
16:40 subichan oh, easy said: finite state transducers.
16:41 subichan tr/// isn't enough
16:41 pmurias IMHO it's better to post it if it's something complex
16:41 subichan ooo-kay :>
16:42 pmurias you'll avoid retyping it :)
16:43 subichan i don't really think i need to explain myself any further, TimToady_ knows linguistics, and he knows why we all need finite state transducers :P
16:43 subichan that's why i wanted to know who exactly gets the chance to decide how things will go for perl6
16:44 subichan anyway thanks for the info everybody, i'll post the message as soon as i get some free time
16:44 subichan see you later
16:48 moritz_ that sounds like the things macros are made for
16:49 moritz_ implement a DSL within a quote-like construct
17:06 pugs_svnbot r17662 | fglock++ | [kp6] fixed 'for' topic scope
17:06 pugs_svnbot diff: http://dev.pugscode.org/changeset/17662
17:06 lambdabot Title: Changeset 17662 - Pugs - Trac
17:10 pugs_svnbot r17663 | fglock++ | [kp6] recompiled prelude with last commit version
17:10 pugs_svnbot diff: http://dev.pugscode.org/changeset/17663
17:12 pmurias fglock++ #fixing for which were a real pain in the backs
17:15 pmurias * was
17:15 pmurias * back
17:21 pmurias moritz_: i don't think code macros work in pugs now
17:22 pmurias ?pugs macro foo() {return 'say "hi"'}; foo();
17:22 lambdabot http://hackage.haskell.org/trac/ghc/newticket?type=bug
17:22 pmurias #pugs macro foo() {return 'say "hi"'}; foo();
17:22 exp_evalbot OUTPUT[hi␤]
17:22 pmurias string one work seem to work fine
17:23 pmurias #pugs macro foo($a) {return 'say "'~$a~'"'}; foo("World");
17:23 exp_evalbot OUTPUT[World␤]
17:23 pmurias #pugs macro foo($a) {return 'say "Hello '~$a~'"'}; foo("World");
17:23 exp_evalbot OUTPUT[Hello World␤]
17:27 pmurias #pugs q:code {say "Hi
17:27 exp_evalbot OUTPUT[*** ␤    Unexpected end of input␤    expecting block, "\\", variable name or "\""␤    at /tmp/ou51QfBEDJ line 2, column 1␤]
17:27 pmurias #pugs q:code {say "Hi"}
17:27 exp_evalbot OUTPUT[Code::Exp.new()␤]
17:27 pmurias #pugs my $code = q:code {say "Hi"};$code.say
17:27 exp_evalbot OUTPUT[\Code::Exp.new()␤]
17:27 pmurias #pugs my $code = q:code {say "Hi"};$code
17:27 exp_evalbot OUTPUT[\Code::Exp.new()␤]
17:28 pmurias #pugs my $code = q:code {say {{{"HI"}}}};$code
17:28 exp_evalbot OUTPUT[\Code::Exp.new()␤]
17:37 justatheory joined #perl6
17:44 justatheory joined #perl6
17:44 Psyche^ joined #perl6
17:46 moritz_ my $a= q:code {say "Hi"}; $code();
17:46 moritz_ #pugs my $a= q:code {say "Hi"}; $code();
17:46 exp_evalbot OUTPUT[*** ␤    Unexpected "$a"␤    expecting "=", "::", context, ":" or "("␤    Variable "$code" requires predeclaration or explicit package name␤    at /tmp/dVwyh8pJQJ line 1, column 4␤]
17:46 jjore-w joined #perl6
17:52 fglock joined #perl6
18:00 jisom joined #perl6
18:10 pmurias fglock: multi and junction-all seem to work here :_
18:10 pmurias :)
18:10 pmurias s/:_//
18:10 ruoso pmurias, the fixes need to be ported to kp6-kp6 now
18:11 ruoso that's the problem in having the two sources
18:11 ruoso pmurias, but you didn't commit yet
18:12 pmurias ruoso: why would i need to commit?
18:13 ruoso heh
18:13 pmurias fglock seems to have fixed them not me
18:13 ruoso huh?
18:13 pmurias :)
18:13 pmurias i just ran the tests and they work
18:13 ruoso ah...
18:13 fglock pmurias: did you forcerecompile?
18:13 ruoso the port to kp6_kp6 is missing
18:14 ruoso if you run the other script it will still fail
18:15 fglock trying
18:23 pmurias fglock: i think the junction & multi problems were caused by a problem with for
18:23 fglock pmurias: i recompiled and it works :)
18:23 fglock committing
18:23 pmurias the svn head work already for me
18:27 renormalist joined #perl6
18:27 pugs_svnbot r17664 | fglock++ | [kp6] updated image using last commit
18:27 pugs_svnbot diff: http://dev.pugscode.org/changeset/17664
18:27 lambdabot Title: Changeset 17664 - Pugs - Trac
18:32 nwc10 joined #perl6
18:32 nwc10 What would the following program output on Perl 6?
18:32 nwc10 ./perl -Ilib  -wlE 'sub bar {warn}; sub baz {state $foo = bar}; baz; baz'
18:32 nwc10 and how could I answer that without asking the channel?
18:33 PerlJam nwc10: you could read teh synopses and divine the answer that way.
18:33 PerlJam nwc10: you could ask pugs (since it's a first approximation of perl 6)
18:33 nwc10 which I don't have installed
18:35 moritz_ http://run.pugscode.org/
18:35 lambdabot Title: Run Perl 6 Now -- in your browser!
18:38 renormalist #pugs 'sub bar {warn}; sub baz {state $foo = bar}; baz; baz;
18:38 exp_evalbot OUTPUT[*** ␤    Unexpected end of input␤    expecting "\\", variable name or "'"␤    at /tmp/KRhQxpgW5S line 2, column 1␤]
18:38 renormalist #pugs sub bar {warn}; sub baz {state $foo = bar}; baz; baz;
18:38 exp_evalbot OUTPUT[*** Cannot cast from VUndef to Handle (VHandle)␤    at /tmp/rx3qZAxvAB line 1, column 10-14␤]
18:39 nwc10 oh. oops. thanks for trying
18:40 TimToady_ in my pugs it prints the warning twice (should be once)
18:40 nwc10 ah!
18:40 nwc10 I have perl 5 doing it once only now. :-)
18:40 nwc10 Perl 5 clearly better. :-)
18:40 TimToady_ indeed
18:40 PerlJam nwc10: oh yeah ... you could ask TimToady what it's supposed to do :)
18:40 nwc10 not clear whether rgs will consider it acceptable for 5.10, as he wanted to be in feature freeze
18:41 nwc10 only got it working for scalar assignment.
18:41 nwc10 have an idea for list assignment, but it's more complex
18:41 nwc10 is        (state $foo, my $bar) = baz();
18:41 nwc10 a syntax error?
18:41 TimToady_ no, but it'll rewrite $foo each time through
18:41 nwc10 ah OK
18:41 TimToady_ it doesn't magically turn an outer = into pseudoassign
18:42 nwc10 (state $foo, state $bar) = baz();
18:42 nwc10 runs once or runs each time through?
18:42 TimToady_ each time
18:42 nwc10 state ($foo, $bar) = baz();
18:42 nwc10 is only once?
18:42 TimToady_ once
18:42 nwc10 right. thanks. I think that telling the last two apart is actually moderately tricky in perl 5
18:43 nwc10 at least at the point when I thought I could do it
18:43 PerlJam nwc10++ for making a bridge to perl6 :)
18:43 TimToady_ perl 5 is better at lots of things, especially when it comes to lying to itself. :)
18:43 nwc10 I blame Rafael. He did more of it
18:43 nwc10 TimToady_: and who do we thank for that? :-)
18:43 TimToady_ mmph
18:51 nwc10 For  my $b = state $a = function();
18:51 nwc10 second and later times through, is $b assigned the value of $a ?
18:51 nwc10 [no call to function(), no assignement to $a]
18:55 renormalist I don't remember, there was some way to slurp the synopses into pugs, but I don't remember how. Anyone?
18:56 renormalist I want to read them offline ...
18:56 pugs_svnbot r17665 | fglock++ | [kp6] inf, nan
18:56 pugs_svnbot diff: http://dev.pugscode.org/changeset/17665
18:56 lambdabot Title: Changeset 17665 - Pugs - Trac
18:59 pugs_svnbot r17666 | fglock++ | [kp6] export Inf, NaN
18:59 pugs_svnbot diff: http://dev.pugscode.org/changeset/17666
18:59 lambdabot Title: Changeset 17666 - Pugs - Trac
19:02 renormalist fglock: I see that there are several lib subdirs in kp6, where eg. Math gets changed. Do you manually keep them in sync or is this part of a make?
19:03 fglock it's updated by make
19:03 fglock but we currently have 2 versions of kp6 :(
19:03 renormalist ok, so which is the primary subdir where I write code?
19:04 renormalist lib-kp6-mp6-p5 or lib-kp6-mp6
19:04 pmurias the second
19:04 fglock it depends - i'm still developing the old one, ruoso is bootstrapping a kp6-in-kp6
19:05 renormalist m'kay
19:05 fglock lib-kp6-mp6 is the primary version
19:05 fglock lib-kp6-kp6 is the bootstrap version
19:05 fglock *-p5 is the compiled libs
19:06 renormalist ah, what foerly was lib5, I understand
19:06 renormalist formerly
19:07 pmurias renormalist: svn co "http://svn.perl.org/perl6/doc/trunk/design/syn for the synopsis
19:07 lambdabot Title: Revision 14446: /doc/trunk/design/syn
19:07 pmurias it's the pod version
19:07 TimToady joined #perl6
19:11 renormalist pmurias: thanks, I checked it out.
19:12 TimToady nwc10: yes, I believe it should work the way you expect, since the right side of the first = should just resolve to $a
19:12 nwc10 thanks
19:12 nwc10 that's how I have it working in perl 5 (well, patched perl 5)
19:13 renormalist Hm, there is a S16 in http://perlcabal.org/syn/S16.html, but not in http://svn.perl.org/perl6/doc/trunk/design/syn/ ?
19:13 lambdabot Title: S16
19:14 moritz_ renormalist: in the pugs repository under docs/Perl6/Spec/ there are a few files as well...
19:14 moritz_ that's where IO.pod is from
19:15 devogon joined #perl6
19:17 renormalist does spec.pugscode.org collect them from different places?
19:20 TimToady renormalist: yes, the ones under pugs are still in active churn
19:20 nwc10 left #perl6
19:20 TimToady (in theory)
19:21 TimToady the actual distinction is more like, the ones on perl.org are the ones I don't want other people monkeying with
19:22 TimToady but they all still churn a bit...
19:23 renormalist ok, thanks
19:24 TimToady in particular, <?ws> is about to take a severe whack
19:24 TimToady we'll probably have to deprecate <?foo> for a month or two.
19:25 TimToady shortterm you'll have to write <!!foo> to mean <?foo> as zero-width assertion
19:26 TimToady and probably <+ws> or some such to mean what <?ws> currently means
19:26 elmex joined #perl6
19:34 iblechbot joined #perl6
19:38 renormalist #kp6 my $a = "aaa"; my $b = "bbb"; print $a ~ $b;
19:38 exp_evalbot r17666: OUTPUT[aaabbb]
19:38 renormalist #kp6 my $a = "aaa"; my $b = Math.rand; print $a ~ $b;
19:38 exp_evalbot r17666: OUTPUT[aaa0.858970582558872]
19:38 renormalist #kp6 my $a = "aaa"; print $a ~ Math.rand;
19:38 exp_evalbot r17666: OUTPUT[aaa0.462924013686465]
19:39 ludan joined #perl6
19:39 ludan hola
19:40 renormalist #kp6 sub foo($c)  {print $c };  my $a = "aaa"; foo($a ~ Math.rand);
19:40 exp_evalbot r17666: OUTPUT[aaa0.329169482997717]
19:40 renormalist damn, why does it work as expected? :-)
19:43 xinming joined #perl6
19:44 ruoso renormalist, is that a bad thing?
19:48 pugs_svnbot r17667 | renormalist++ | - [kp6] more random dirs in mkdir/rmdir tests
19:48 pugs_svnbot diff: http://dev.pugscode.org/changeset/17667
19:48 lambdabot Title: Changeset 17667 - Pugs - Trac
19:50 REPLeffect joined #perl6
19:56 renormalist ruoso: for some strange reason my tests need an explicit stringify
19:56 pugs_svnbot r17668 | renormalist++ | - [kp6] stringify with .str
19:56 pugs_svnbot diff: http://dev.pugscode.org/changeset/17668
19:56 lambdabot Title: Changeset 17668 - Pugs - Trac
19:57 renormalist but I give the argument to rmdir/mkdir, maybe they are different than the implementation of print, what I used here for the #kp6 bot
19:58 fglock renormalist: ~$dirname should work
19:58 renormalist why does re-prepare all string concat into a variable befor not work?
20:00 fglock renormalist: i don't understand, can you give an example?
20:01 renormalist in t/kp6/io/01-dir.t I wantred to prepare a filename with a random numer (kind of tempname), my $dirname = "kp6_really_strange_temp_file_name_" ~ Math.rand;
20:01 renormalist but in calling the methods I have to explicitly stringify
20:01 renormalist either rmdir($dirname ~ "")
20:01 renormalist or rmdir($dirname.str)
20:02 renormalist 'print' does not seem to have this problem but I dont nuderstand the reason
20:02 fglock looking
20:02 renormalist you can comment out the last two test from io/01-dir.t then the created subdirs are visible
20:03 pugs_svnbot r17669 | fglock++ | [kp6] inf.t passes on the command line, but fails in make test
20:03 pugs_svnbot diff: http://dev.pugscode.org/changeset/17669
20:03 lambdabot Title: Changeset 17669 - Pugs - Trac
20:04 ruoso fglock, try running each of the run_test scripts
20:05 fglock renormalist: it's a bug, $dirname is not dereferenced; you can workaround by calling FETCH
20:06 buetow joined #perl6
20:06 fglock renormalist: i'll fix it
20:09 pugs_svnbot r17670 | fglock++ | [kp6] dereference var in mkdir/rmdir
20:09 pugs_svnbot diff: http://dev.pugscode.org/changeset/17670
20:09 lambdabot Title: Changeset 17670 - Pugs - Trac
20:10 renormalist fglock: thanks, I see the difference
20:10 renormalist fglock: do I always have to handle all arguments that way?
20:11 fglock yes, for now - the implementation of 'want' should also fix that
20:11 renormalist fglock: why does 'print' in MOP.pm line 369 does not seem to need it?
20:12 fglock because it operates on a Value
20:13 fglock instead of Container
20:14 renormalist ok, thanks
20:15 fglock is it o to remove # Perl6 runtime integration in 01-rand.t ?
20:15 fglock ok
20:16 fglock removing
20:18 renormalist yes that was kind of experimental stuff from me
20:18 pugs_svnbot r17671 | renormalist++ | - [kp6] stringification in tests removed, thanks to fglock++ for clarify
20:18 pugs_svnbot r17672 | fglock++ | [kp6] removed invalid test
20:18 pugs_svnbot diff: http://dev.pugscode.org/changeset/17672
20:18 lambdabot Title: Changeset 17672 - Pugs - Trac
20:21 rindolf joined #perl6
20:22 fglock ruoso: 'perl run_tests_kp6_mp6.pl' passes all tests, but 'make test' doesn't
20:24 ruoso fglock, the other uses kp6_kp6 runtime
20:24 ruoso the fix must be ported to the new tree
20:24 fglock ok
20:30 fglock home &
20:36 pugs_svnbot r17673 | renormalist++ | [kp6]
20:36 pugs_svnbot r17673 | renormalist++ | - made IO methods global; tests; all in both kp6-trees (mp6 + kp6)
20:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/17673
20:36 lambdabot Title: Changeset 17673 - Pugs - Trac
20:40 drupek12 joined #perl6
20:41 xinming joined #perl6
20:48 xinming joined #perl6
20:48 renormalist Is a call to      foo($name, :w)      the same as       foo($name, 'w' => True) ? I.e., can I implement foo() via just evaluating Hash arguments and the caller can use hash or pair as he likes?
20:53 renormalist ah, it's    :w    is like    'w' => 1  (not True)
20:59 danga joined #perl6
21:02 renormalist #pugs sub foo(%stuff) { print %stuff{'a'} } ; foo(:a};
21:02 exp_evalbot OUTPUT[*** ␤    Unexpected "};"␤    expecting word character, dot, block construct, "(", "[", "<<", "<", "\171", ":", identifier or ")"␤    at /tmp/2UAMUOxqNQ line 1, column 47␤]
21:02 renormalist #pugs sub foo(%stuff) { print %stuff{'a'} } ; foo(:a);
21:02 exp_evalbot OUTPUT[*** Named argument found where no matched parameter expected: ("a",Val (VBool True))␤    at /tmp/SuV4lf0WYE line 1, column 41-48␤]
21:03 renormalist #pugs sub foo($a) { say $a } ; foo(:a);
21:03 exp_evalbot OUTPUT[1␤]
21:05 renormalist #pugs sub foo(*%stuff) { print %stuff{'a'} } ; foo(:a);
21:05 exp_evalbot OUTPUT[1]
21:06 renormalist #pugs sub foo(*%stuff) { print %stuff{'a'} } ; foo(:a(0));
21:06 exp_evalbot OUTPUT[0]
21:06 renormalist #kp6  sub foo(*%stuff) { print %stuff{'a'} } ; foo(:a);
21:06 exp_evalbot r17673: OUTPUT[Syntax Error␤DISPATCH: calling APPLY on invalid object:$VAR1 = {};␤␤ at lib-kp6-mp6-p5/KindaPerl6/Runtime/Perl5/MOP.pm line 32␤        main::DISPATCH('undef', 'APPLY') called at - line 16␤]
21:06 renormalist #kp6  sub foo(%stuff) { print %stuff{'a'} } ; foo(:a);
21:06 exp_evalbot r17673: OUTPUT[Syntax Error␤no method 'LOOKUP' in Class 'Undef'␤]
21:07 renormalist #kp6  sub foo(*%stuff) { print %stuff{'a'} } ; foo('a' => 1);
21:07 exp_evalbot r17673: OUTPUT[Syntax Error␤DISPATCH: calling APPLY on invalid object:$VAR1 = {};␤␤ at lib-kp6-mp6-p5/KindaPerl6/Runtime/Perl5/MOP.pm line 32␤        main::DISPATCH('undef', 'APPLY') called at - line 16␤]
21:07 renormalist #kp6  sub foo(%stuff) { print %stuff{'a'} } ; foo('a' => 1);
21:07 exp_evalbot r17673: OUTPUT[no method 'LOOKUP' in Class 'Undef'␤]
21:16 weinig_ joined #perl6
21:24 buetow joined #perl6
21:31 danga joined #perl6
21:37 rutlov joined #perl6
21:48 xinming joined #perl6
21:49 rutlov left #perl6
22:04 drupek1260 joined #perl6
22:24 Limbic_Region joined #perl6
22:34 [particle1 joined #perl6
22:39 buetow joined #perl6
23:02 xinming joined #perl6
23:20 drupek1260 joined #perl6
23:26 Schwern joined #perl6
23:40 riffraff joined #perl6
23:43 subichan joined #perl6

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

Perl 6 | Reference Documentation | Rakudo