pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
cj anything new here? 00:03
ari @bot 00:04
geezusfreeek @bot 00:04
rahaskella :)
luqui @tell clkao mncharity asks: How goes Data::Bind? I'm looking for something to implement Signature/Capture binding for subs in elf. Thoughts? 00:08
rahaskella Consider it noted.
pugs_svnbot r20453 | putter++ | [elf] main -> Main. Other elf_d compatibility artifacts also removed.
mncharity :)
luqui++
mncharity Hmm. Looks like STD.pm doesn't accept 'sub *f(){}'. eh,,, 00:32
pugs_svnbot r20454 | putter++ | [elf] Param slurpiness is no longer ignored. \\ in strings works better. say() moved to PrimitivesP5.pm. 01:17
mncharity say() should perhaps be reimplemented in p6 and placed in Prelude.pm, with whatever, more minimal, primitives are needed left in PrimitivesP5.pm and EmitSimpleP5.pm. 01:18
mncharity wonders what to do next... 01:29
vixey hi mncharity
mncharity hi vixey :) 01:34
how goes 01:35
?
been pondering backends lately. javascript and as3 and CommonLisp or scheme, oh my. basically to help keep the bootstrap honest, and push things towards p6 and away from language-specific runtimes. 01:50
pugs_svnbot r20455 | putter++ | [elf] Improved parsing of closures. Pair IR from AST improved, but it's a kludge.
r20455 | putter++ | [STD_red] list infix ops with no right arg, now parse more correctly - the op is no longer ignored. eg, \(2:) != \(2).
mncharity pmurias: ^^^ we should now have closure literals. or some approximation thereof. just let me know if you hit difficulties. 01:51
any other requests? ;)
so much of the prelude should be multi subs... but need a brief on Data::Bind to know how to proceed there... or look at the code... 01:53
could start an autobox hack which differentiates strings from numbers... 01:54
vixey mncharity: I'm not sure what to do eiter 02:05
mncharity email off to chocolate.boy (of autobox) offering patch. autobox appear to be under very active development, so it would save a fork and the effort to maintain. 02:17
mncharity vixey: elf_f_faster is so fast, with little overhead, that I'm tempted by having run-tests or some other tool, when a test file is a parse or runtime error, try commenting out top level statements to see if it can get other parts of the file to run. thus getting access to more tests. 02:20
re backends... so far the elf_f implementation requires relatively little of its backend. anything with real scoping (not python, js) should be easy. even faking scoping should be straight forward. so the question is... what would be a "nifty" hack. 02:21
Auzon mncharity: Is elf_f_faster fast enough to wrap for evalbot? I'd be willing to give some tuits to looking into that. 02:23
mncharity js/spidermonkey is getting faster than it was, so could be a "real" backend. flash/as3 too. bigloo scheme has a nice regex-like parsing story, making it an attractive "implement bigloo on p6" target, and thus it might be nice to do a backend first.
elf_f_faster runs the entire t/ in <10 min.
sub-second startup. 02:24
it would be neat to have an evalbot :)
there's currently no knowledge of safe-ness.
Auzon What unsafe operations are there? 02:25
mncharity even elf_f only has a ~1.5 sec startup overhead when on 5.10 (3 s on 5.8.8).
eval_perl5 :) 02:26
Auzon takes a look into elf's code
mncharity hmm. I wonder it could just be put in a box, rather than trying to encode safety. there's little io support now, but that could change rsn, and it would be nice not to have to worry or deal. 02:27
Auzon Without knowing the infrastructure for evalbot or elf, would you be opposed to a command line switch for safemode?
mncharity no worried about a switch, but question is impact of trying to support it. 02:29
does p5 have a "be safe" argument? then the only issue would be making sure elf itself still works with that arg set. 02:33
Auzon there's Safe.pm 02:33
Eevee I don't think so, you have to use Safe;
mncharity looks...
Auzon search.cpan.org/~rgarcia/Safe-2.16/Safe.pm 02:34
mncharity tries wrapping elf_f in a Safe... 02:38
diakopter moritz_: irclog is asleep 02:43
mncharity tries to work around Safe not liking 'use strict;' because that involves a require()... 02:45
hmm... XSLoader needs -f and seems likely to then do something with files... so maybe wrapping all of elf in Safe is the wrong approach. maybe just Safe the eval... hmm, but that's not how Safe works. 02:51
I suspect I'm losing here, but let's see...
with $compartment->permit('require','caller','entereval',':filesys_read','tied'); there are no more operator mask trap messages, but "Attempt to reload DynaLoader.pm aborted.", and require XSLoader.pm fails (along with other things). hmm... 02:54
the :filesys_read is potentially non-minimal, but the others were each needed. 02:55
basically I just put "use Safe; my $compartment = new Safe; $compartment->permit('require','caller','entereval',':filesys_read','tied'); $compartment->reval(<<'END_FILE'); die $@ if $@;" at the top of elf_f, and END_FILE at the bottom. 02:56
s/basically// 02:58
search.cpan.org/~rgarcia/perl-5.10....pcode_Tags
oh, ->deny_only() still fails with "Can't load module IO, dynamic loading not available in this perl.", so it seems Safe can't reval elf, regardless of opcode restrictions. :/ 03:02
Auzon Have you tried just the eval routine in elf?
mncharity curious.
you mean wrap the elf code in a bare eval rather than Safe's reval? hmm...
Auzon No, I meant the eval call in elf. Wrap _that_ in reval or similar 03:03
mncharity oh, well, the bare eval() works.
re wrapping that, it seems Safe is a compile time restriction on specific bits of code, combined with limiting it's access to the rest of the program. so my fuzzy understanding is 03:04
one would have to tell Safe about... just about everything... at which point things most likely wouldn't be safe anymore. 03:05
s/about/permit access to/
ie, it doesn't seem to be taint like. more, lets assure that a bit of code doesn't use particular opcodes. but says nothing about what is done by other code which that bit calls. 03:07
so I think were back to having an external box, or trying to teach elf internals to care about safety. 03:08
unless... is taint enough for this?
Auzon Nope.
I don't think so at least
mncharity :( 03:09
Auzon Cause they can untaint in the eval. Or mess with stuff in pure Perl 03:10
mncharity ah, ok 03:11
the safe/unsafe tagging in pugs long bugged me... :/ 03:13
does safe buy anything but a box-less evalbot?
Auzon The only thing I can think of is evalbot-style things. e.g. elf in your browser.
mncharity here in the future, feather is running virtual machines, so an evalbot could conceivably have its own. or only be able to mess with other evalbots. or something. 03:14
re browser, oh interesting... hmm... not sure we really want to care at this point.
Auzon Yeah. It's cool, but requires tuits :) 03:15
mncharity indeed
how restricted are the feather vm's? ie, could a black evalbot spam the world? or only break itself? or...? 03:16
Auzon I imagine it could spam the world, but I'm not certain how much we need to worry about 03:18
IRC messages are only something like 256 characters maximum 03:19
510. 03:21
luqui that's racist 03:22
mncharity ?
oh, s/black/black hat/
luqui :-) 03:23
diakopter oh, I thought it was black [box] evalbot
mncharity rakudo: system("ls")
exp_evalbot OUTPUT[Could not invoke non-existent sub system␤current instr.: '_block11' pc 25 (EVAL_9:15)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/HLLCompiler.pir:587)␤called from Sub
..'parrot;PCT::HLLCompiler;command_line' pc 1246 (src/PCT/HLLCompi...
mncharity re box, :) 03:24
hmm, both interpretations work.
diakopter hatbox 03:25
mncharity if we were off STD_red, and elf was all just a p5 file, then I'd wonder if an evalbot was a priority, running it yourself being so easy. but for the moment... it could be nice. 03:26
mncharity wonders if someone has an evalbot.com, where you get a jail vm which can only do text io with the world. 03:29
Auzon An interesting idea... 03:30
Auzon hm. My which(1) seems to be wrong. 03:31
mncharity so... closure... an elf evalbot would be neat. near term, it seems any security would have to be external to elf, eg from a restricted feather vm. or non-feather vm, if someone has a real or emulated machine they would be happy running it on. 03:32
Auzon I'm interested in this, so I'll continue to investigate. Do you know where evalbot's code is or who maintains it? 03:33
mncharity My fuzzy recollection is the SLAVES file mentions... 03:34
Auzon oh, I'll just check SLAVES
mncharity diakopter. and moritz? (i'm not sure what exp_evalbot is) 03:35
Auzon pugs: say "hi" 03:36
exp_evalbot OUTPUT[hi␤]
Auzon Looks like exp_evalbot is the one we want.
And I've never seen anything from just an "evalbot" in my logs 03:37
mncharity yes, and moritz, and ... others... looking at svn log for misc/evalbot/ ... but the svn server seems to have just become unhappy. 03:38
back... and rhr.
Auzon rhr? 03:40
Looks like we want pugs/misc/evalbot, not pugs/examples/network/evalbot 03:41
mncharity re rhr, dunno, let's see... Ryan "rhr" Richter (from AUTHORS) 03:43
and here. :)
Auzon mncharity: What all ways does elf have of executing Perl 5 code? 03:53
mncharity hmm... 04:01
it is p5; eval in p5; eval_perl5 in p6; indirectly through p6 eval(); sub f() is p5{'this is p5'}; ... 04:02
the parser response is eval()ed, so if it were broken for some reason... 04:03
mncharity grep eval ../elf_f 04:04
Auzon Well, I meant from code running under elf
I'll check it out when I get ruby 1.9.0 compiled
mncharity broken code emitting giving "not what you expected" p5 04:05
Auzon Well, thanks for your help mncharity++ 04:06
mncharity regex's currently get eval()ed... 04:07
so very np. glad to help. thanks for working on it. :)
mncharity talks on #moose@somewhere with clkao about Data::Bind et al... 04:16
moose irc.perl.org
mncharity end of day for me. good night all & 04:50
Auzon moritz_: ping re exp_evalbot and elf 06:12
moritz_ Auzon: pong 06:45
Auzon Hi moritz_ 06:46
You maintain exp_evalbot, right?
moritz_ right
Auzon Are you interested in adding another language to it? I think I have a patch for enabling elf's faster variant 06:47
I'm currently seeing if elf can be made safe enough without making it too ugly
moritz_ Auzon: I'm interested, but I've not yet set up ruby 1.9 on the server 06:48
Auzon: it's Debian stable, which doesn't have a sufficiently recent version 06:49
Auzon: but go right ahead and patch it, then I'll feel more motivated to get things done
Auzon moritz_: I'm thinking about requesting a feather login so I don't have to fight with Pugs locally. I could compile it for you if you'd like
it being ruby 1.9
moritz_ Auzon: you can request a feather login, and/or I can give you access to the server that currently runs evalbot 06:52
Auzon Oh. I thought evalbot ran on feather.
moritz_ exp_evalbot doesn't 06:53
Auzon Alright. Well, let me know if you want me to take a look at getting ruby on your server this week after I commit my patches to SVN. 06:54
pugs: map {"$_ $_"} <one two> 06:58
exp_evalbot OUTPUT[*** ␤ Unexpected end of input␤ at /tmp/6iD2rTsLla line 2, column 1␤]
Auzon pugs: map {"$_ $_"} <one two>;
exp_evalbot OUTPUT[*** ␤ Unexpected end of input␤ at /tmp/yuBaTMzZTY line 1, column 25␤]
Auzon pugs: say map {"$_ $_"} <one two>;
exp_evalbot OUTPUT[*** ␤ Unexpected end of input␤ at /tmp/SxM3Yz7uCs line 1, column 29␤]
moritz_ pugs: say map {"$_ $_"}, <one two>
exp_evalbot OUTPUT[one onetwo two␤]
Auzon oh
moritz_ Auzon: Perl 6 needs a comma after the block
because it usually discourages two terms in a row
Auzon Makes sense. 06:59
Eevee rakudo: say map { $_ + 1 }, <1 2> 07:00
exp_evalbot OUTPUT[Could not invoke non-existent sub map␤current instr.: '_block11' pc 47 (EVAL_11:19)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/HLLCompiler.pir:587)␤called from Sub
..'parrot;PCT::HLLCompiler;command_line' pc 1246 (src/PCT/HLLCompile...
Eevee rakudo: say <1 2>.map({ $_ + 1 })
exp_evalbot OUTPUT[Method 'map' not found for invocant of class 'List'␤current instr.: '_block11' pc 50 (EVAL_11:19)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/HLLCompiler.pir:587)␤called from Sub
..'parrot;PCT::HLLCompiler;command_line' pc 1246 (src/...
Eevee :(
rakudo: say <1 2 3>.reduce({ $^a + $^b })
exp_evalbot OUTPUT[6␤]
Auzon no wonder. elf doesn't seem to support map yet. :-/ 07:06
Eevee we need a table of what supports what 07:07
Auzon The test cases are somewhat like that 07:08
At least, the nice HTML smoke reports
Eevee ah, forgot about those 07:10
Auzon Hm. I need some sleep. night all & 07:12
Eevee night 07:13
moritz_ good night 07:14
Juerd moritz_: Do you want root access on feather2? feather2 is meant for evalbots. 08:42
If you're comfortable with hosting it yourself, nevermind :)
moritz_ Juerd: currently I'm comfortable. If that should change I'll contact you 08:47
Juerd ok! 08:49
syle2 what kewl data structures we got in perl6? perl dominated with hashes originally, whats next? 09:23
Patterner bytecode as hash-key. it's OOP 2.0. 09:25
moritz_ objects
roles
grammars
Patterner taitors
moritz_ junctions
Juerd syle2: Pairs. 10:41
syle2: Pairs really are used quite a lot in Perl 6. More than hashes I think, even if you discount those that are used to build hashes. 10:42
pmurias Auzon: kp6 is in the evalbot and it's safety mode dosn't work 13:11
pmurias Juerd: what's that important about pairs? 13:41
Juerd pmurias: Pair syntax is used for passing arguments by name, for base-N integers, for aliasing in signatures, and probably even more. 13:43
It's a very simple concept, but very flexible and broadly applicable.
Juerd To me, pairs are certainly the hot new datastructure for Perl 6, not because the structure itself is so very useful, but because its syntax is nice and used in many ways that feel intuitive. 13:44
pmurias i see
Juerd Junctions are a neat idea too of course, but most of the times your junction will the the .value of a pair ;)
Maybe I'm wrong :) 13:45
drbean_ /sb start
/sb begin
Juerd drbean_: No space in front.
drbean_ /sb home 13:46
Juerd Now without the whitespace
You can do it!
drbean_ I did it! 13:47
Juerd drbean_: Good for you. Here's a cookie. 13:54
bbkr_ am i right that "has 'foo' => ('isa' => 'Some::Package, 'default' => sub {return Some::Package->new()})" can be replaced by shorter "has 'foo' => ('isa' => 'Some::Package, 'builder' => 'new')" ? 15:11
even if Some::Package is not MOP class?
wrong... should be #moose :)
moritz_ thought so ;)
moritz_ I think we should have a method of a flagging files in spectest as "rakudo should already pass these" 15:31
so that we can have a spectest with only those that should pass atm 15:32
and another target with all of spectest
simply fudging everything that 'make spectest' succeeds is too hard a task
Auzon pmurias: re no security on KP6, what dangerous things can it do? elf can do a bit of file IO and also eval some P5 code. 15:33
[particle1 moritz_: how about a patch to rakudo's makefile, or t/harness?
moritz_ [particle]: I first wanted to hear if you (and other rakudo hackers) like the idea 15:33
[particle] sure, if it helps potential hackers 15:34
it's just a matter of maintenance
moritz_ any idea what the make target should be called? 15:37
pmurias Auzon: it can use perl5 modules, file io at least, likely evaling p5 code 15:40
moritz_ actually I decided to take the risk because it's not that easy to figure out 15:41
and kp6 has at least some basic security measures
and evalbot runs in a changeroot as an unprivileged user on an unimportant server ;)
[particle] moritz_: spectest_regression, maybe?? 15:42
moritz_ [particle]: sounds good
pmurias moritz_: puting in in a vm might be a better choice then trusting in obscurity 15:46
moritz_ pmurias: you're right of course, that's what feather does. 15:47
Juerd feather has a separate VM for eval thingies 15:52
Auzon out & 15:53
sail0r is pugs still actively worked on? 16:17
Tene No.
sail0r is it due to a lack of haskell programmers interested in working on it? 16:18
Tene Mostly.
[particle] pugs devel is blocking on a new object model 16:19
a patch for which was half (or more) crafted by audreyt, when Real Life got in her way
the patch hasn't been finished and applied, and pugs has not progressed
ari @bot 18:15
rahaskella :)
lambdabot :)
ari rahaskella: @part #perl6
cj so... I want to fiddle a bit with the kp6 compiler 19:39
does mp6 handle inheritence yet? 19:40
ance?
I can never remember...
Auzon My spellchecker says inheritance, FWIW
cj danke
anyone seen flavio recently? I know he just moved... 19:41
pmurias cj: re inheritence i'm afraid not 21:16
kp6 does
pmurias @tell mncharity to faking lexical scoping in js (function(var) {})(value) can be used 21:33
lambdabot Consider it noted.
cj pmichaud: that's too bad 22:23
meppl good night 22:26
mncharity cj: have you seen elf? 23:27
hmm, lambdabot is forgetful. 23:29
pmurias: re lambda, ah, right. thanks.
mncharity Auzon: re "elf doesn't seem to support map yet.", only a x.map(sub($e){...}) method form is being used atm. don't know what else works. 23:34
chocolateboy++ woot. autobox-2.50 has landed. with distinct INTEGER, FLOAT, and STRING mappings now available. 23:36
one day turnaround! :)
Auzon mncharity: re map, I figured out that it supported that form after I said that. 23:55