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