-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6 Set by apple-gunkies on 11 November 2005. |
|||
clkao | seen ibleach | 00:02 | |
jabbot | clkao: I havn't seen ibleach, clkao | ||
rafl | clkao: Do you mean iblech? | 00:03 | |
clkao | ya | ||
rafl | clkao: aka Ingo Blechschmidt. | ||
clkao: He's not that active on IRC but he answers mails in <24h normally. | |||
clkao | ok, thansk | ||
trying to find out how jsbackend returns a perl6 object | 00:04 | ||
rafl | iblech is the right person to ask that, indeed. | 00:05 | |
q[Skud] | what's perl6's equivalent for $#array? | 00:12 | |
Alias_ | @array.something | 00:13 | |
q[Skud] | i got that far :) | ||
Alias_ | ah | ||
q[Skud] | it's not length, that's string-only | 00:14 | |
integral | eval: my @a = (1, 2, 3); $#a; | ||
?eval my @a = (1, 2, 3); $#a; | |||
q[Skud] | and i can't find anything in S29 | ||
00:14
evalbot_8225 is now known as evalbot_8233
|
|||
evalbot_8233 | Error: unexpected "#" expecting "::" | 00:14 | |
buu | ?eval @x=1..4; @x.length | ||
evalbot_8233 | Error: Undeclared variable: "@x" | ||
buu | ?eval my @x=1..4; @x.length | ||
evalbot_8233 | Error: No such method: "&length" | ||
buu | ?eval my @x=1..4; @x.keys | ||
evalbot_8233 | (0, 1, 2, 3) | ||
buu | heh | ||
rafl | elems? | ||
buu | ?eval my @x=1..4; @x.elems | ||
evalbot_8233 | 4 | ||
rafl | yay! | ||
buu | eval: 1 | ||
hrm | 00:15 | ||
Yay! | |||
integral | ?eval my @a = (1, 2, 3); @a.end | ||
evalbot_8233 | 2 | ||
integral | (the trick is to grep ../src/Pugs/Prim.hs for elems, then go up one line...) | ||
stevan_ | ?eval my @a = (1, 2, 3); +@a; | 00:16 | |
evalbot_8233 | 3 | ||
q[Skud] | ok, elems it is. | ||
integral | q[Skud]: umm, that's not the same as $#a, @a.end is the same as $#a. | ||
q[Skud] | oh, right. | ||
sorry. i am not quite awake here | |||
huh. | 00:19 | ||
here's a slightly wacky thing. | |||
say "Sorted: ", @animals.sort; | 00:20 | ||
say "Reversed: ", @animals.reverse; | |||
Sorted: aardvark bat bear cow dog zebra | |||
Reversed: zebraaardvarkcowdogbatbear | |||
integral | heh | ||
q[Skud] | i presume that's not meant to happen. | 00:21 | |
integral | it's something todo with arrays vs. lists | ||
the sort seems to be working with an array, but the reverse with a list | 00:22 | ||
q[Skud] | yeah. | ||
integral | curiously, ~@a.sort and ~@a.reverse produce a spaced string each | 00:24 | |
q[Skud] | ok, you'll have to excuse me if i kind of blink and go "duhhhh..." like i'm a bit short on neural function here, because i only started playing with this yesterday. | 00:26 | |
integral | np :-) | ||
q[Skud] | just kinda starting as a "dumb user" and working through perlintro trying to figure out what each thing there is, in perl 6 idiom. | 00:27 | |
errrr. how do i declare a hash and access one of the elements? like, in perl5, it would be $days{'February'} | 00:28 | ||
ah, got it | 00:29 | ||
i hadn't quoted the key | |||
integral | yeah, {} doesn't autoquote now. You need to use <> or <<>> to get that: %hash<<$interpolated>>, %hash<notinterpolated> | 00:31 | |
(<> and <<>> are like the old qw) | |||
q[Skud] | ok, but i can still say %days{'February'} | 00:32 | |
integral | yes. | 00:34 | |
it's so that {} is always more like a closure | |||
clkao implmemented slurp | 00:37 | ||
buu | Is there an ioctl function in pugs? | 00:45 | |
?eval ioctl | 00:46 | ||
evalbot_8233 | Error: No such sub: "&ioctl" | ||
rafl | buu: No. Not yet. | ||
integral | if it's in System.POSIX, it should be a trivial exercise to add :-) I think there was a tutorial on the wiki at one point | 00:47 | |
buu | Bummer =[ | ||
clkao | runjs is printing 1..0 for some reason | 00:59 | |
that looks like skipall | |||
svnbot6 | r8234 | skud++ | Some new stuff I encountered. | 01:07 | |
r8235 | skud++ | Errr, lots of new stuff. Intro embiggened. Differences likewise. Moved p5 stuff into a | 01:09 | ||
r8235 | skud++ | subdir. | |||
clkao | nopaste.snit.ch:8001/5868 | 01:14 | |
clkao grins | |||
svnbot6 | r8236 | clkao++ | Implement slurp() with Perl5/IO::File. | ||
01:36
blm_ is now known as blm_work
|
|||
svnbot6 | r8237 | clkao++ | * Add --run to runjs.pl, supporting js, jspm, jssm. | 01:57 | |
r8237 | clkao++ | * Add --perl5 to runjs.pl, which initialises perl5 related | |||
r8237 | clkao++ | functions for jspm. | |||
r8237 | clkao++ | * Move stuff from jsperl to PIL2JS/JSPM. | |||
tewk | Does pugs support here docs? can someone point me to a synopsis or test example? | 02:23 | |
meppl | gute nacht | 02:43 | |
buu | Stupid perl5 | 02:45 | |
Scary fucking vodoo magic. | |||
sili_ | what | ||
meppl | its technic | 02:46 | |
no voodoo | |||
buu | Lies. | ||
sili_ | just wait until i finish this parrot lisp. | ||
buu | meppl: I'm trying to make C use perl file handles. | ||
meppl | hm | 02:47 | |
i would like xs for perl6 | |||
have | |||
but im very patient | 02:48 | ||
for c++ | 02:50 | ||
*sleeping* | 02:51 | ||
Andy | obra: I can't /msg you becaue I'm not registered. See AIM. | 03:32 | |
sri_ | audreyt: please increment the version of Module::Install::Admin in the next release, Catalyst has a prereq on M::I | 05:28 | |
gaal | morning all... | 05:29 | |
blm | morning gaal | 06:12 | |
avar | pugs -e 'my Num @a = 0..Inf; say @a[100]' takes forever;/ | 06:14 | |
blm | Does perl 6 use lazy evaluation like Haskell? | ||
Sorry is it supposed to do lazy evaluation? | 06:15 | ||
avar | it is | 06:17 | |
which is why it shouldn't take forever | |||
(last I read the specs) | |||
sili__ | there was talk about laziness and Inf on the lists recently | 06:21 | |
i'm not sure how/what was implemented in pugs | |||
blm | Is audrey around? | 06:44 | |
Alias_ | Goddam it... PPI still leaking despite %PARENT hash being cleaned up properly | 06:45 | |
blm | Hi Alias_ | ||
Alias_ | heya | ||
blm | Is Audrey en route? | ||
Alias_ | hmmm about 20 megabytes per 25,000 documents | ||
Probably | |||
blm | Do you know Module::Install? | 06:46 | |
Alias_ | yep | ||
blm | Trying to install it from CPAN and it seems to depend on Module::Scandeps. When I try to install Module::Scandeps it seems to find the old version of M::I and bombs out "Can't locate method "_top" via package "PACK001" | 06:47 | |
Alias_ | hmm... dunno | 06:48 | |
blm | at Module::Insall::Base line 52 | ||
Alias_ | The system one or the bundled one | ||
blm | Might move old Module::Install out of way. | ||
Get this error! says /usr/local/lib/perl5/site_perl/5.8.7/Module/Install/Base.pm line 52 and there is no dir /usr/local/lib/perl5. | 06:50 | ||
I don't like cygwin :-( | |||
Alias_ | Personally I'm putting my bets on PXPerl being sane | 06:51 | |
blm | What is PXPerl? (excuse my ignorance :-) ) | 06:52 | |
Alias_ | An attempt to write a sane Windows Perl install | ||
blm | Excellent! | ||
Alias_ | One that doesn't rely on a proprietary PPM package | ||
blm | You on win32 much? | 06:53 | |
Alias_ | Win32 desktop, Linux server | ||
avar | how do I access <obj:Time::Local> in perl6? doing pugs -e 'say for localtime' | ||
blm | Does par work? | ||
avar | perl -le 'print for localtime' would work | 06:54 | |
Alias_ | Reasonably well for bundling applications | ||
blm | Includes dependancies? | ||
Alias_ | I think so... | ||
blm | Cool | ||
svnbot6 | r8238 | tewk++ | Simple perl6 test harness for pil. | 07:32 | |
avar | how can I see which rfc's got accepted? | 07:47 | |
dev.perl.org/perl6/rfc/39.html <- I like this one for example, but I don't think it got accepted;/ | 07:48 | ||
nothingmuch | avar: every apocalypse | 07:49 | |
they list the RFCs which got considered | |||
as rejected or accepted | |||
but most RFCs were munged | 07:50 | ||
IMHO 'say' is much more parsable than >foo<, too | |||
and that mixes up with hyper operators and stuff | |||
avar | select STDERR; | ||
nothingmuch | you can define it though: | ||
avar | say >"goes to -err and -out"<; | ||
I just thought it was neat as an inverse of <> | 07:51 | ||
nothingmuch | &circumfix:{'>', '<'} ::= say; | ||
avar | does that work in pugs? | 07:52 | |
nothingmuch | let's try | 07:57 | |
?eval &circumfix:{'>', '<'} ::= &say; > | |||
?eval &circumfix:{'>', '<'} ::= &say; >"foo"<; | |||
?eval "foo" | |||
hmm... i think it's dead | |||
07:57
evalbot_8233 is now known as evalbot_8238
|
|||
evalbot_8238 | Error: unexpected ">" expecting ";", statements or end of input | 07:57 | |
nothingmuch is not really in touch with pugs lately | |||
evalbot_8238 | "foo" | ||
nothingmuch | been having a "useful" phase (as opposed to an "interesting" phase) - lots of Catalyst work | ||
avar | nothingmuch: I tried, it was more of a "should it work or did I fuck anything up?" question;) | 07:58 | |
nothingmuch | avar: i guess the grammar isn't dynamic yet | 07:59 | |
but it will work | |||
we have an internals lecture at work | |||
see you | |||
avar | cya | ||
Skud | evening pjf | 08:12 | |
PJF | Good evening Skud! How are you this fine day? | ||
svnbot6 | r8239 | yiyihu++ | Renew the broken links in series of `01Overview.html`. | 08:13 | |
PJF | Good day, blm. | 08:26 | |
Skud: Wow! Lots more documentation. | 09:37 | ||
Alias_ | PPI 1.07 is uploaded! | 09:38 | |
Now it can parse line noise! | |||
wolverian | yay :) Alias++ | ||
Alias_ | I leaks a bit still... | 09:39 | |
1k per document I think | |||
But I can certainly confirm it isn't me leaking circulars now | |||
So it's now someone else's problem | |||
PJF | Congrats, Alias. | 09:41 | |
Alias_ | At least it's editor-compatible now | ||
Which takes a surprisingly large load off my mind | 10:05 | ||
wolverian | editor-compatible? | 10:07 | |
Alias_ | As in you can type any old shit and it won't crash the parser | ||
wolverian | oh, okay. I think I see. | ||
right. :) | |||
Alias_ | Which is a big step | ||
wolverian | so, where's the vim plugin? | ||
Alias_ | My queue now is basically, 1. Wait for PXPerl to release 2. Get PCE actually running 3. Write Perl::Editor 4. Then you can write a vim plugin | 10:08 | |
The parser in it's standalone is surprisingly useless :) | |||
wolverian | PCE? | ||
Alias_ | Editors need the next layer of support infrastructure too, caching and metrics and transforms, oh my! | ||
The cross platform pure Perl Wx+Scintilla Perl editor | 10:09 | ||
Which has some pretty big issues, but I'm helping the author to work through them, then I'm going to use it as my base platform for the refactoring Perl editor grant | |||
Anyways | |||
Alias_ home | |||
(It also means you can now parse Perl 5 into pugs btw) | 10:10 | ||
audreyt: You want 1.107. It's over to you now. | |||
wolverian | right. this is exciting :) Alias++ | 10:11 | |
rafl | Is there a freenode server that listens to a port != 6667? My ISP seems to block that port.. | 10:38 | |
avar | does perl6 have some quick way to create accessors like ruby? | 10:46 | |
wolverian | has $.foo; | 10:48 | |
see S12 | |||
kane_ | rafl: cgi:irc installations would work.. like this one: webchat.xs4all.nl/cgi-bin/ircnet/irc.cgi | 10:57 | |
integral | feather already runs a CGI:IRC :) | 10:58 | |
rafl | kane_: I actually don't want to use CGI:IRC but irssi and not on feather but on my host :-) | ||
integral | rafl: most freenode boxes listen on a few ports around 6667, something like 6665-9 I think | ||
rafl | integral: OK, I'll try that. | 10:59 | |
kane_ | rafl: yeah, this was more 'last resort' | ||
you could tunnel it via feather too btw | |||
rafl | kane_: That's what came to my mind as well. But I'll try using IPv6 first. | 11:00 | |
kane_ | bbl, off to the office | ||
integral | 6to4++ | ||
rafl | integral: Do you know a good tunnel provider? sixx maybe? | 11:02 | |
integral | I don't. I have decent 6to4 access so I just use that | 11:03 | |
avar | how do I call my own method within a class, self.mehod() doesn't work (as seen in S12) | 11:12 | |
wolverian | self.method or just .method if $_ =:= self (as is the default in methods) | 11:13 | |
?eval class Foo { method bar { "hi" } method baz { .bar } } Foo.new.baz | 11:14 | ||
11:14
evalbot_8238 is now known as evalbot_8239
|
|||
evalbot_8239 | "hi" | 11:14 | |
PJF | ?eval class Foo { method bar {"hi"} method baz { self.bar } } Foo.new.baz | 11:15 | |
evalbot_8239 | "hi" | ||
PJF | ?eval class Foo { method bar {"hi"} method baz { self.bar() } } Foo.new.baz | ||
evalbot_8239 | "hi" | ||
PJF | Good. You had me worried for a moment there, avar. ;) | 11:16 | |
svnbot6 | r8240 | asavige++ | Evil documentation plan (first cut based on Audrey caffeine free coke brain-dump) | 11:17 | |
avar | ?eval role P {method lang { "poo" }} class AE does P {method hello() { self.lang }} AE.new.hello | 11:18 | |
evalbot_8239 | Error: No compatible subrountine found: "&lang" | ||
avar | ?eval class P {method lang { "poo" }} class AE is P {method hello() { self.lang }} AE.new.hello | ||
evalbot_8239 | Error: No compatible subrountine found: "&lang" | ||
avar | ?eval class AE is P {method lang() { "poo"} method hello() { self.lang }} AE.new.hello | 11:19 | |
evalbot_8239 | Can't exec "./pugs": Permission denied at examples/network/evalbot//evalhelper.p5 line 46. | ||
avar | ?eval class AE is P {method lang() { "poo"} method hello() { self.lang }} AE.new.helloo | ||
evalbot_8239 | Can't exec "./pugs": Permission denied at examples/network/evalbot//evalhelper.p5 line 46. | ||
PJF | Oh my god! You killed evalbot! | ||
avar | ?eval class AE is P {method lang() { "poo"} method hello() { self.lang }} say AE.new.lang | ||
11:19
evalbot_8239 is now known as evalbot_8240
|
|||
evalbot_8240 | OUTPUT[poo ] bool::true | 11:19 | |
pasteling | "avar" at 212.30.222.56 pasted "woo" (26 lines, 550B) at sial.org/pbot/14952 | 11:21 | |
avar | *** No compatible subroutine found: "&self"" | ||
rafl | avar: my $langs = self.langs; looks wrong. | 11:31 | |
Huh.. no. It doesn't. | 11:32 | ||
PJF | Good evening Andrew. | 11:47 | |
asavige | hi PJF Audrey left Sydney at 1:00 pm on China Airlines flight C152 | 11:48 | |
should have just arrived in taipei about now | |||
PJF | I have no doubt we'll see her active on IRC again shortly then. ;) | ||
asavige | wow, skud has hit this channel like a ... skud missile ;-) | 11:49 | |
integral | and written lots of documentation! | ||
asavige | she is putting me to shame (though I just uploaded Audrey's brain-dump evil plan) | ||
PJF | Night all. I seem to have landed myself with real work for the next couple of weeks, and have to sleep at awkward times as a result. Happy hacking. | 12:00 | |
Odin-LAP | avar: Hmm. Ertu aĆ° elta mig? :p | 12:09 | |
avar | maĆ°ur mƦtti spurja Ć¾ig af Ć¾vĆ sama! | 12:10 | |
Odin-LAP | avar: Ćg kom Ć” undan. ;) | ||
avar | viss? Ćg hef ekki veriĆ° hĆ©rna Ć einhvern tĆma | 12:11 | |
Ć©g mun hinsvegar aldrei elta Ć¾ig Ć” #emacs ;) | |||
Odin-LAP | Haha. | ||
Viss? | |||
avar | haha | 12:12 | |
jĆ” | |||
haha | 12:16 | ||
$ pugs -CParrot -e 'say "foo"'|wc -l | 12:17 | ||
355 | |||
3558 | |||
meppl | guten morgen | 12:43 | |
GeJ | servus | ||
clkao | nothingmuch: did you mention there's a tapmatrix diff util or something like tha? | 12:46 | |
meppl | good morning gej | 13:03 | |
nothingmuch | clkao: ? | 13:57 | |
oh | |||
yes | |||
i have that | |||
i'll talk to you about it when I get home | |||
nothingmuch.woobling.org/Test-TAP-HTMLMatrix | |||
nothingmuch.woobling.org/Test-TAP-Model | |||
get those darcs repos | |||
they have working code | |||
(example.pl has dummy failures) | 13:58 | ||
i have to go pick up my mom from the univ | 13:59 | ||
ciao! | |||
xinming | how to get a line from stdin, and process it, and get another line? | 14:03 | |
pd clocks pugs at less than 2000x slower than perl5, woo hoo! | 14:17 | ||
avar | 1 for =<>; ? | 15:20 | |
gaal | process(=$*IN); $next = =$*IN; | 15:30 | |
process($^line) for =$*IN; | |||
xinming | try it in pugs first please | 15:31 | |
gaal | ./pugs -e 'print ">>> $_" for =$*IN' | 15:32 | |
this works | |||
but you may be Suffering from Buffering <tm>. | |||
xinming | for =$*IN -> $line { print "myline: " ~ $line;} | 15:33 | |
Khisanth | that works | ||
too :P | |||
xinming | the problem is, It will hold all input in a "temperary" list, and after you enter EOF, it then process the list | 15:34 | |
Khisanth | eh? | ||
xinming | Khisanth: You can save it in a file, and run it | ||
Khisanth | well I guess laziness isn't implemented yet? | ||
gaal | yes, IO buffering. | ||
xinming | gaal: How to get rid out of this? | 15:35 | |
gaal | eval '$| = 1', :lang<perl5> | ||
just kidding :-) | |||
good question. I wonder if getContents or whatsits name can be configured to work in line buffered mode; I but it can, but there's a chance that requires POSIX :-( | 15:36 | ||
Khisanth | mumbled $*OUT is autoflushed; ? :P | ||
gaal | uh, the immediate answer for you though is, sorry I don't know. | 15:37 | |
pd | on perl5: "Perl does not support truly unbuffered output (except insofar as you can syswrite(OUT, $char, 1))." Heh. | ||
gaal | pd, in this case linebuffered mode would be sufficient. | 15:39 | |
xinming | So, It's the problem of haskell. :-) | ||
fglock | xinming: it's not a problem with buffering - this works: for 1..10 { print "myline: " ~ =$*IN } | ||
gaal | fglock: what is the problem then? | 15:40 | |
xinming: it's not Haskell's fault, probably, if that what's you mean. | |||
fglock | I think it is a problem with laziness not being implemented yet - it is trying to construct the full =IN list before using it | ||
gaal | ah, wonderful: haskell.org/ghc/docs/latest/html/li...IO.html#12 | 15:41 | |
there are buffering operators including linemode in non-posix haskell io. | |||
Oh. :-/ | |||
that is unfortunate. :( | 15:42 | ||
avar | ?eval sayā"boo"āifā1 | ||
evalbot_8240 | OUTPUT[boo ] bool::true | ||
avar | harhar | ||
gaal | if anyone wants to add simple buffering, btw, it's a nice and easy addition. | 15:43 | |
avar | ?eval say"boo"if1 | ||
evalbot_8240 | Error: unexpected "1" or "i" expecting term postfix, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
avar | >;) | ||
xinming | fglock: for your example, you have to write exit the for loop yourself | ||
fglock | xinming: yes. I'll try with -Bperl5 | 15:45 | |
avar | ?eval sayāā1 | 15:46 | |
evalbot_8240 | OUTPUT[1 ] bool::true | ||
avar | ?eval sayā1 | ||
evalbot_8240 | OUTPUT[1 ] bool::true | ||
avar | ?eval say1 | ||
evalbot_8240 | Error: No such sub: "&say1" | ||
gaal | parsefail if rand > .5; # wtf | 15:47 | |
pd | heh. | ||
avar | doesn't that bot take ?eval in query? | ||
gaal | hmm? | 15:48 | |
Khisanth | don't think so | ||
gaal | fwiw I have an old r6995 lying about that doesn't exhibit this interesting behavior. | ||
xinming | why the first `?eval say1` doesn't fail? | ||
Khisanth | probably to avoid having people abuse it for various purposes | ||
avar | xinming: because it's magical;) | 15:49 | |
gaal | avar: are you asking if eval works? yes, for p6 eval. not for other :langs. | ||
?eval say eval "hola" | |||
evalbot_8240 | OUTPUT[ ] bool::true | ||
gaal | ahem. | ||
?eval eval "hola" | 15:50 | ||
evalbot_8240 | undef | ||
gaal | er, yes i should learn perl. | ||
Khisanth | heh | ||
gaal | ?eval say eval "'hola'" | ||
avar | is there anything in place to secure that bot? | ||
evalbot_8240 | OUTPUT[hola ] bool::true | ||
avar | ?eval "foo" | ||
evalbot_8240 | "foo" | ||
gaal | avar: yes, look into safe mode. | ||
there are both pugs-specific and OS measures. | 15:51 | ||
some prims are marked as "unsafe" so you can't do them from the bot: | |||
?eval open "/etc/passwd" | |||
evalbot_8240 | Error: No such sub: "&Pugs::Internals::openFile" | ||
xinming | ?eval $*IN | ||
avar | ?eval fork while fork | ||
evalbot_8240 | \undef | ||
Error: No such sub: "&fork" | |||
gaal | and the thing that dispatches pugs in the bot uses a limit on CPU and time: | 15:52 | |
xinming | ?eval my $a = =$*IN | ||
evalbot_8240 | Error: Can't use readline() or getc() in safemode. | ||
gaal | ?eval 1 while 1 | ||
evalbot_8240 | (no output) | ||
gaal | also, there are limits on output size and RAM. | ||
xinming | ?eval sub x { y }; sub y { x }; y | ||
evalbot_8240 | pugs: out of memory (requested 1048576 bytes) | ||
xinming | gaal: I think so | ||
gaal | to which please join me in saying, iblech++ :-) | 15:53 | |
xinming | ?eval system "free" | ||
evalbot_8240 | Error: No such method: "&system" | ||
gaal | please see examples/network/evalbot/README.pod | 15:54 | |
xinming | ?eval say1 | ||
evalbot_8240 | Error: No such sub: "&say1" | ||
avar | ?eval $x = 1; $x *= 2 while 0..Inf | ||
evalbot_8240 | Error: Undeclared variable: "$x" | ||
gaal | say "my". | ||
avar | ?eval my $x = 1; $x *= 2 while 0..Inf | ||
evalbot_8240 | pugs: out of memory (requested 1048576 bytes) | ||
xinming wonders why avar's example works | |||
gaal | xinming: he said "my". | ||
avar | ?eval my $x = 1; $x *= 2 while 1 | 15:55 | |
evalbot_8240 | (no output) | ||
xinming | avar ?eval sayāā1 | ||
evalbot_8240 OUTPUT[1 ] bool::true | |||
is there a "my" ? :-/ | |||
pd | ?eval say "what"; | ||
evalbot_8240 | OUTPUT[what ] bool::true | ||
xinming | ?eval say"what" | 15:56 | |
evalbot_8240 | OUTPUT[what ] bool::true | ||
xinming | ?eval say1 | ||
evalbot_8240 | Error: No such sub: "&say1" | ||
avar | xinming: see, magic;) | ||
pd | ?eval say 1; | ||
avar | actually, it's not magic | ||
evalbot_8240 | OUTPUT[1 ] bool::true | ||
avar | you can use any unicode whitespace in perl6 to delimit tokens, including zero-width unicode whitespace | ||
gaal | pfff | ||
avar | (this should result in lots of clever code) | 15:57 | |
"clever" | |||
gaal | remind me to hack that out of the parser :-) | ||
pd | ?eval sub say1 { say "what"; }; say1; | ||
evalbot_8240 | OUTPUT[what ] bool::true | ||
Khisanth | but it won't lower your golf score! | ||
avar | Khisanth: maybe, | ||
Khisanth: not if you count it by bytes | |||
but if you count by characters... | |||
it'll be the same | |||
but less understandable | 15:58 | ||
gaal | the possibilities for ACME::Bleach are interesting. | ||
pd | Remind me to store data in UNICODE characters then. | ||
gaal | *Anything* becomes a one-liner. | ||
Khisanth | Acme::Onliner? | ||
gaal | At least, I propose Acme::Bleach::Unary | 15:59 | |
which encodes your program in zero-width chars | |||
the number of chars is a unary representation of the data | |||
fglock | xinming: '=$*IN' is not implemented in -Bperl5 yet, so I can't test it | ||
gaal | so the module needs not use pesky tabs, spaces, and newlines | ||
and create programs that truly fit on one line! | 16:00 | ||
I'm racing against myself here, see, because I fully intend to disallow this. I just don't know what I'll get to first. | 16:01 | ||
xinming | the console need to be utf-8 compatible. :-) | ||
gaal | brb | 16:02 | |
avar | gaal: acc. to the synopsis it's there on purpose | ||
?eval 1<2 | 16:17 | ||
evalbot_8240 | bool::true | ||
avar | ?eval 1>2 | ||
evalbot_8240 | bool::false | ||
avar | ?eval my $x = "foo"; my $y := $x; $y = "bar; $x | 16:18 | |
evalbot_8240 | Error: unexpected "b" expecting block, "\\", "$/", "$", "$!", "\"", word character, "::", ".", ":", "=", subroutine name, array subscript, hash subscript or code subscript | 16:19 | |
avar | ?eval my $x = "foo"; my $y := $x; $y = "bar"; $x | ||
evalbot_8240 | \"bar" | ||
avar | ?eval my $x = "foo"; my $y ::= $x; $y = "bar"; $x | ||
evalbot_8240 | \"bar" | ||
avar | ?eval my $x = "foo"; my $y ::= $x; $y = "bar"; \$x | ||
evalbot_8240 | \"bar" | ||
avar | ?eval my $x = "foo"; my $y ::= $x; $y = "bar"; $x =:= $y | ||
evalbot_8240 | bool::true | ||
avar | ?eval my $x = "foo"; my $y ::= $x; $y = "bar"; my $z = "bar"; $x =:= $z | 16:20 | |
evalbot_8240 | bool::true | ||
avar | I have Ā„ on my ibook keyboard somewhere, I just can't find where.. | 16:23 | |
gaal | avar: Y works wherever Ā„ does | 16:30 | |
svnbot6 | r8241 | kane++ | r484@coke: kane | 2005-12-14 13:28:31 +0100 | ||
r8241 | kane++ | * eliminate the use of one global $Obj for the config | |||
r8241 | kane++ | * it's still a singleton though | |||
r8242 | kane++ | r485@coke: kane | 2005-12-14 17:29:25 +0100 | |||
r8242 | kane++ | * make the installation variables in config.pm private | |||
r8242 | kane++ | * they are wrapped from Installation.pm | |||
r8242 | kane++ | * add ls_all_accessors that returns private accessors as well in config.pm | |||
r8242 | kane++ | * try and use path::class everywhere | |||
r8242 | kane++ | * every dir/file returned by config.pm is a p::c object | 16:31 | ||
r8242 | kane++ | * rewrite all code to use the new installation wrappers rather than | |||
r8242 | kane++ | the old config.pm accessors | |||
rafl | kane++; #using Path::Class everywhere. | 16:39 | |
fglock | re minilang.subset(p6) - codespeak.net/pypy/extradoc/talk/os...paper.html - about the pypy project | 17:20 | |
avar | ?eval "x" x 3 | 18:02 | |
18:02
evalbot_8240 is now known as evalbot_8242
|
|||
evalbot_8242 | "xxx" | 18:02 | |
avar | ?eval "x" xx 3 | ||
evalbot_8242 | ("x", "x", "x") | ||
avar | ?eval "x" xx 3 ~ "x" | ||
evalbot_8242 | "x x xx" | ||
avar | ?eval ("x" xx 3) ~ "x" | 18:03 | |
evalbot_8242 | "x x xx" | ||
avar | ?eval scalar "x" xx 3 | ||
evalbot_8242 | Error: No such method: "&scalar" | ||
avar | ?eval scalar ("x" xx 3) | ||
evalbot_8242 | Error: No such method: "&scalar" | ||
avar | oh my | ||
?eval scalar str("x" xx 3) | 18:10 | ||
evalbot_8242 | Error: No such method: "&scalar" | ||
avar | ?eval str("x" xx 3) | ||
evalbot_8242 | Error: No such method: "&str" | ||
avar | ?eval (str)("x" xx 3) | ||
evalbot_8242 | Error: No such sub: "&str" | ||
xinming | avar: In perl 6, I think scalar context is splited into Number context and String context | 18:27 | |
gaal | ?eval ~("x" xx 3) | 18:28 | |
evalbot_8242 | "x x x" | ||
gaal | ?eval +("x" xx 3) | ||
evalbot_8242 | 3 | ||
gaal | rehi btw | ||
xinming | so, you can use ~ to force it into string context, and use + to force it into numberic context | ||
gaal | ?eval ?("x" xx 3) | ||
evalbot_8242 | bool::true | ||
gaal | and boolean context :) | ||
xinming | by the way, anyone here knows about m4? | ||
how to supress the #!/usr/bin/m4 line if chmod a .m4 file into executable | 18:29 | ||
integral | under linux you might be able to fiddle with binfmt_misc I suppose | 18:31 | |
but a shebang line is standard to invoke a script | |||
integral misses the point, oops | |||
avar | xinming; gaal: thx;) | 18:32 | |
I mostly know perl5, just typing stuff into pugs & evalbot while reading dev.perl.org | |||
xinming | integral: yes, But the problem is, for m4, it will print the shebang line | ||
integral | to be honest I didn't even know you could access @ARGV in m4 :) | 18:33 | |
xinming | #!/usr/bin/m4 | 18:34 | |
foo here | |||
xinming@Laptop:~/tmp$ cat asdf.m4 | |||
#!/usr/bin/m4 | |||
define(`foo', ``foo' here') | |||
foo | |||
I'd think using m4 as a cgi script would be fun. :-P | |||
avar | ?eval reverse <a b c> | 18:55 | |
evalbot_8242 | "c b a" | ||
avar | ?eval reverse ~(<a b c>) | ||
evalbot_8242 | "c b a" | ||
avar | ?eval reverse "abc" | 18:56 | |
evalbot_8242 | "cba" | ||
gaal | avar: at this point please run your own pugs locally :-) | 19:06 | |
j0sephi | picasa.hu/1134587387-al.kaida.xmas.jpg ahaha idiots :):):) :) | 19:21 | |
gaal | oh, someone kick j0sephi already | 19:42 | |
svnbot6 | r8243 | gaal++ | * docs/p6doc/ - a few small fixes to skud++'s notes | 19:45 | |
stevan__ | fglock: the Object Space is very much inspired by PyPy (hell we even took their name :) | 19:50 | |
tewk | stevan__: I've got a very simple test harness, I'll paste a diff and get your comments | 19:52 | |
stevan__ | tewk: did you commit it? | 19:56 | |
tewk | I'm about too. An old version is in t/pil/simple.t ./pugs t/pil/simple.t | ||
I' | |||
I've factored out the code to ext/Test/lib/TestPil.pm, but I don't know what to do with the build process. | 19:57 | ||
I've been copying ext/Test/lib/TestPil.pm to blib6/lib manually. | |||
I've also got a t/pil/bit.t ready to go. | 19:58 | ||
stevan__ | is it in p6? or p5? | ||
tewk: cool! | |||
19:58
stevan__ is now known as stevan
|
|||
tewk | p6, but I can make it p5. The p6 stuff took me a while to come up to speed on, so I kept it simple to start. | 19:59 | |
stevan | tewk: simple is good, and p6 is good too | ||
self-hosting++ | |||
tewk | so is t/pil a good place for tests, and do you have any guidance about the build process and what I need to do there? | ||
If not I'll check in and ask for build process help. | 20:00 | ||
stevan | t/pil is good yes | ||
I think maybe it should be Test::Pil though, not TestPil | |||
but thats a detail | |||
we can easily change if we want too | |||
tewk | Test::Pil I agree, I'm just getting comfortable with the pugs tree there are so many exts, blibs, libs, I'm a little lost. | 20:01 | |
Here it comes | |||
stevan | tewk: ext is where this should go,.. and when people run the Makefile.PL it should get copied to the blib dir | 20:02 | |
tewk | That what I though, I just haven't got it to work how I expect yet. | ||
stevan | you can also do ./pugs -I ext/Test/lib t/pil/bit.t | 20:03 | |
svnbot6 | r8244 | tewk++ | pil test code factored out to it's own module. | 20:04 | |
r8244 | tewk++ | tests for NativeBit not, and, and or operations | |||
gaal | or export PERL6LIB=blib6/lib | ||
hey stevan | 20:05 | ||
stevan | hey gaal | ||
tewk | I found this on hack.pod at pugscode.org and have been using it, export HARNESS_PERL=./pugs export PERL6LIB=blib6/lib | 20:06 | |
Where is the HARNESS_PERL used? | 20:07 | ||
stevan | tewk++ # very nice stuff | 20:08 | |
gaal | by prove | ||
tewk | ahh | ||
gaal | tewk: prove is a p5 tool, but it can use pugs to generate TAP data | ||
did anyone write a TAP module for other languages alredy? Java, C# etc? | 20:09 | ||
*already | |||
should be just a few days work, and then they can benefit from the matrix etc. | |||
tewk | ?paste | 20:10 | |
gaal | perlbot nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
gaal | why isn't perlbot clever enough to s/<channel>/$channel/? :-) | 20:11 | |
stevan | gaal: I think there are some other TAP modules out there, there is a JS one I know, and IIRC someone on perl-qa mentioned a C/C++ one | ||
gaal | whoa, a c one could have helped me a while ago | ||
tewk | thanks, I have an idea for test descriptions, but I'm have p6 woes :) I'll paste in a minute | ||
gaal | sure | 20:12 | |
c is hardly a language where TDD is fun though :) | |||
stevan wonders what about C is fun at all :P | 20:13 | ||
gaal finds it hard to express | |||
certainly not strings :) | |||
but some of the time I find a great elegance in it. | 20:14 | ||
some of the time it's plain ridiculous though :) | |||
GLib has some beautiful c. | 20:15 | ||
stevan | I haven't had the benefit of a CS education, so the low level stuff you need to fiddle with in C is just frustrating to me | ||
I much more prefer higher level abstractions :) | |||
I do see some beauty in C though | 20:16 | ||
I used to read a lot of books on hard-real-time systems, and the C code written for that stuff is (usually) really nice compact and elegant code | |||
I guess I can appreciate it, but can't ever see writing it :) | 20:17 | ||
gaal | funny, I don't have a CS education either, and abstractions are often difficult for me. at least the first couple of years :) | ||
stevan was a painting major, abstract painting mostly :) | |||
I "see" code in my head visually, and I never could "see" C very well | 20:18 | ||
gaal has a rothke reproduction he likes in the living room | |||
stevan does too :) | |||
gaal: which one? | 20:19 | ||
gaal | it's not titled. Red, from 1956. | ||
stevan wonders if we have the same one :) | |||
gaal | :) | 20:20 | |
heh, i mixed him up with the poet | |||
www.prints4all.com/cgi-bin/commerce...ey=IMA3918 | 20:21 | ||
stevan | nope.... different ones | 20:23 | |
mine has more browns in it | |||
have you ever seen his work in person | |||
amazing stuff | |||
I have gotten yelled at by many a MoMA guards for standing too close :) | |||
gaal | Distinctly I remember a very magical half-hour in the Tate :-) | 20:24 | |
Might have been less. Anyway... we're spamming the channel :-) | 20:25 | ||
stevan prefers to think of it as educating the masses,.. but okay ;) | 20:26 | ||
pasteling | "tewk" at 71.32.232.64 pasted "Ugly Test::Pil, syntatic errors, but it has my ideas for test descriptions" (44 lines, 1.4K) at sial.org/pbot/14958 | 20:30 | |
tewk | Now to try to get it to work :) | ||
stevan | tewk: what is the need for generating the description? | 20:32 | |
as opposed to writing it with the test itself? | |||
tewk | I have the benefit of a CS education, which has taught me to write dozens of lines to code to avoid typing a description for each test :) | 20:34 | |
stevan | LOL | 20:35 | |
tewk | I'm just trying to get up to speed on Perl6 and I'm laxy. | ||
stevan | tewk: I am not sure we have lexical subs yet | ||
tewk | Ah | 20:36 | |
stevan | although it should work anyway | ||
just not define it lexically | |||
tewk | Well that was what I was trying to do, I'll keep playing with it. Maybe I should get back to writing test for PIL. :) | 20:37 | |
gaal giggles <for at by> tewk's benefit | |||
tewk | I think I will just add an optional description arg and call it good. On to tests. By the way how do you make an arg optional in Perl6? | ||
gaal | sub X ($arg?) | 20:38 | |
sub X ($arg? = "default val") | |||
tewk | thanx | ||
gaal: your much faster then greping through docs and synopsis :) | 20:39 | ||
gaal | #perl6 is a kind of an optimized grep | ||
stevan | gaal is a storehouse of p6 knowledge... aka.. its an in-memory search :) | ||
gaal | you give me waaay too much credit folks :) | 20:40 | |
Juerd & luqui are our resident perldocs | |||
and I will NOT get into a drawing contest with audrey :) | |||
tewk | stevan: Being CS educated, I'm very interested in the native mini-language and bootstrapping the ObjectModel. I've got to run, but what are he next small tasks that need done. | 20:42 | |
stevan | tewk: mostly it is implementing the object meta-model using the mini-language,.. | 20:43 | |
this is all based on the work in perl5/Perl6-ObjectSpace | |||
tewk | I'll continue improveing TestPil. Can I just move it to ext/Test/lib/Test/Pil.pm and change TestPil to Test::Pil ? | 20:44 | |
stevan | sure | ||
I will probably add some tests later tonight myself | |||
gaal | tewk: svn mv, in case you don't know it | ||
tewk | thanks gaal: My perl5/6/haskell is pretty pretty pathetic :) but I know svn, C, etc | 20:46 | |
gaal | cool :) no offence I hope... impossible to tell what people know and don't know these days :) | 20:49 | |
tewk | No I appreciate the help, if fact I learn fast and I like suggestions, especially in reguards to my perl. | 20:50 | |
gaal | learning haskell is hard (for me) but extremely enjoyable when things click | 20:51 | |
tewk | I've played with python, ruby, scheme, haskell, etc. So I get a lot of the concepts. I just don't know perlism syntax very well, so I revert to evil C style syntax in perl, which usually gets the job done. I want to learn though. | 20:53 | |
gaal | oh, in that case you're in luck cause learning perl is loads of fun :-) | 20:54 | |
sili__ | tewk: just avoid c-style for loops and you'll be ok | 20:56 | |
cause those are the worstestest. | |||
xinming thinks learning haskell is the biggest pain he ever encountered. | 20:58 | ||
especially the moand, takes me 3 days to understand what the monads is. | |||
svnbot6 | r8245 | tewk++ | TestPil becomes Test::Pil | ||
gaal | xinming: you are in great shape :-) It's taking me nine *months* and counting | 20:59 | |
xinming | frustrating me | ||
gaal: I just understand what it is, But the problem is, I can't write without the the example. :-/ | 21:00 | ||
21:11
stevan_ is now known as stevan
|
|||
svnbot6 | r8246 | stevan++ | ::Class.get_method_list should have no parameters ;) | 21:54 | |
gaal | where are the shiftTs that relate to the resetT in opEval (Pugs.Prim.Eval)? | 22:33 | |
why is position information omitted in failed evals? because $! isn't fully specced? | 22:49 | ||
?eval eval "asdfadf"; $! | |||
22:49
evalbot_8242 is now known as evalbot_8246
|
|||
evalbot_8246 | \undef | 22:49 | |
gaal | ?eval eval "asdfadf"; say $! | ||
evalbot_8246 | OUTPUT[No such sub: "&asdfadf" ] bool::true | ||
gaal | contrast: | ||
?eval asdf | 22:50 | ||
evalbot_8246 | Error: No such sub: "&asdf" | ||
gaal | heh. | ||
well on non-evalbot, that also prints coordinates. | |||
but retEvalResult does only | |||
err@(VError e _) -> do writeRef errSV e | 22:51 | ||
... on a different note: | 22:52 | ||
opRequire, when a module was found in %*INC already: | |||
opEval style pathName "" | |||
why? why the call to opEval, just to possibly reset $! ? | 22:53 | ||
stevan wonders who gaal is talking to :) | |||
svnbot6 | r8247 | stevan++ | PIL.Native.* | ||
r8247 | stevan++ | - changed attribute names in PIL/Native/Eval.hs to include the | |||
r8247 | stevan++ | twigils (%methods becomes %:methods, etc) | |||
r8247 | stevan++ | - added src/PIL/Native/Bootstrap.pil, this is the skeleton of the | |||
r8247 | stevan++ | meta-model bootstrap code, it needs a /LOT/ of work :) | |||
r8247 | stevan++ | Perl6::ObjectSpace | |||
r8247 | stevan++ | - misc scribbles in the API_sketch.pod, nothing interesting really | |||
stevan | audreyt: we need to chat when you get back online | 22:55 | |
stevan dinner & | |||
23:05
avarab is now known as avar
|
|||
gaal | what does "VControl $ ControlEnv env" mean? | 23:17 | |
what does 'Syn "env" []' do? | |||
eg. EvalResultEnv -> (`mergeStmts` Syn "env" []) | 23:18 | ||
zzZZ & | 23:19 | ||
meppl | gute nacht | 23:30 |