Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-05-29

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 nothingmuch what I do in perl to get this done:
00:00 nothingmuch my $later = sub { function_call() };
00:00 nothingmuch as I said before,
00:00 nothingmuch &{ $later }();
00:00 wolverian it's just like $foo = { function() }; except the closure is implicitly called when needed
00:00 nothingmuch it makes a coroutine that is invisible to the using code, and it executes it as late as possible
00:00 Juerd wolverian: I agree that that is useful, but it should not use the word "lazy"
00:00 nothingmuch wolverian: not exactly like a closure
00:00 Juerd Because it has nothing to do with the laziness that lazy lists have.
00:00 nothingmuch why not? isn't that exactly what it is?
00:00 Juerd nothingmuch: What is your lazy, and what does it do?
00:00 Juerd nothingmuch: It's not a context specifier.
00:01 nothingmuch it's a context sensitive op, that fudges it's right side
00:01 Juerd Be more precise
00:01 nothingmuch like list and scalar and foo,
00:01 nothingmuch scalar 1 + 1; lazy scalar 1 + 1; scalar lazy 1 + 1; # all three are the same
00:01 Juerd I think the keyword "later" is better for your purpose.
00:01 nothingmuch to the right hand side, and also to the left hand side but because it doesn't know
00:02 Juerd This has nothing to do with the lazy that I had in mind
00:02 Juerd AND - it has nothing to do with the gather/take example we were discussing then
00:02 Juerd Because your current specs, as I read them, would mean that gather is called whenever the first element is needed.
00:02 Juerd Gather needs to know it has to yield instead of return
00:03 Juerd Without that information, it can't delay the creation of the second element.
00:03 wolverian 'later' is a good name for this.
00:03 wolverian 'postponed' is maybe better, except it's too long.
00:03 wolverian maybe we really want a circumfix op for it.
00:03 wolverian my $foo = {{ bar() }};  # :)
00:03 Juerd That is why "lazy" should be "list but lazy" or something like that, calling gather *immediately*, allowing it to return something based on coros.
00:04 Juerd wolverian: I've suggested a circumfix op for that even, once
00:04 Juerd wolverian: But {{}} is impossible.
00:04 wolverian yes.
00:04 Juerd my $foo = later { 42 };
00:04 Juerd This doesn't even need core support probably.
00:04 wolverian right. and as a macro it doesn't even need the braces
00:05 wolverian I'm a bit unclear about your 'lazy'. could you explain it again?
00:05 nothingmuch I don't mind later {}; it's just the same to me
00:05 Juerd Just have &later return a variable that is tied
00:05 Juerd wolverian: Mine?
00:05 nothingmuch true, we discussed that here
00:05 nothingmuch iblech and myself
00:05 nothingmuch for around 5 minutes after it was brought up
00:05 wolverian Juerd: oh, is 'lazy' specced?
00:05 nothingmuch and then I mailed p6l
00:05 Juerd wolverian: No.
00:06 nothingmuch i thought at the time that we had the same thing in mind
00:06 nothingmuch but i still really don't see the difference of lazy gather between your and my usage cases
00:06 wolverian Juerd: hmm. want.lazy ?? yield :: return?
00:06 Juerd wolverian: "lazy" and "list" force list context. Default list context is unlazy. Lazy context is always list context. A sub called in lazy list context, returns a coro, that is then called once per element needed.
00:07 nothingmuch except that in my example we know how 'take' will do what it does
00:07 Juerd wolverian: Somewhat like that.
00:07 wolverian (the trinary op is horribly ugly now. I won't be using it.)
00:07 Juerd wolverian: gather would have "take" only collect in list context, but have it yield immediately in lazy.
00:07 nothingmuch i actually think it's a readability improvement... it's more obvious in thick code
00:07 Juerd wolverian: I think ??:: is an improvement.
00:08 wolverian Juerd: why?
00:08 wolverian (re: ??::)
00:08 Juerd wolverian: It's easier to spot visually, in a world where ? and : both already have at least three different meanings each.
00:08 wolverian right
00:08 wolverian but in perl5, that's not the situation
00:09 Juerd No.
00:09 Juerd In Perl 5, ?: works well.
00:09 Juerd However, we need those characters. Or other characters, but these are probably the best.
00:09 nothingmuch anyway, sleep
00:09 Juerd Bye, nm
00:09 wolverian I'm a bit unclear about the whole gather { take } deal. why can't we just do coro { yield }?
00:09 nothingmuch Hope I didn't make your RSI complain
00:10 nothingmuch Juerd: i still secretly think we agree
00:10 nothingmuch wolverian: because that's not list-generator-automagical
00:10 Juerd What nm said.
00:10 nothingmuch @array = gather { }...
00:10 wolverian right.
00:10 nothingmuch one second, i'll whip up that def of the range operator, and then really go
00:11 wolverian good point. :)
00:11 Juerd wolverian: gather can't be coro by default, because the block may access outside variables and depend on certain timing
00:11 Juerd wolverian: That is why the distinction between lazy and immediate must be explicit
00:11 wolverian sure.
00:11 Juerd And I think immediate execution is a much better default.
00:11 pasteling "nothingmuch" at 212.143.91.217 pasted "sub infix:<...>" (6 lines, 244B) at http://sial.org/pbot/10546
00:12 Juerd If the block used with gather is labeled as pure with "is pure", obviously, it can auto-lazify
00:12 nothingmuch wolverian: the reason i'm scared to death is that i can't sanely use any complicated function in a gather without getting bitten at least once a year
00:12 nothingmuch ciao!
00:12 Juerd Same goes for 1..number, which can always be lazy.
00:12 Juerd And 1..Inf will have to be :)
00:13 nothingmuch that's because the builtin map ops are pure on Num etc
00:16 Juerd I'm going to bed too
00:16 Juerd Unless someone has a question right now
00:18 Juerd Okay
00:18 Juerd Bye
00:18 Juerd afk
00:18 nothingmuch s/map/math/;
00:18 gugod_ has quit IRC (Remote closed the connection)
00:18 gugod has quit IRC (Killed by ballard.freenode.net (Nick collision))
00:18 gugod has joined #perl6
00:24 IshaCocoa_ has quit IRC (Read error: 110 (Connection timed out))
00:30 wolverian has quit IRC (Read error: 110 (Connection timed out))
00:33 broquaint has joined #perl6
00:35 jroc has joined #perl6
00:49 |RefleX| has joined #perl6
00:49 |RefleX| has left
00:55 vcv- has joined #perl6
00:55 jql has joined #perl6
00:57 IshaCocoa has quit IRC ()
00:57 robkinyon nothingmuch - yes?
00:59 robkinyon seen broquaint
00:59 jabbot robkinyon: broquaint was seen 4 hours 25 minutes 55 seconds ago
00:59 broquaint Hello?
01:00 robkinyon just wondering if you had any ideas re: a module installer/distributor/etc.
01:01 broquaint I wouldn't know where to begin.
01:01 broquaint Sounds like lots of system magic.
01:01 robkinyon well, would you mind letting me outline what I've got so far?
01:01 broquaint Go ahead :)
01:02 robkinyon Ok. there's actual 6 different components that need to be designed in parallel
01:02 robkinyon The first is the distro installer / uninstaller - this is the EU::MM / M::B analog
01:03 robkinyon 2) the distro builder - this is what I would use when packaging up my C6PAN modules
01:03 robkinyon 3) The module sourcer - this is the "use" or "require" keywords
01:04 robkinyon 4) The distro inquirer - you want to be able to find out about your current installation structure without having to fake up code
01:04 robkinyon 5) The distro repository - this is C6PAN. It's important that it understands how "use" works, for various reasons
01:04 robkinyon 6) The distro downloader and uploader - the analog to CPAN/CPANPLUS.
01:05 broquaint Sounds involved.
01:05 robkinyon All 6 of them have to understand the new metadata associated with distributions and modules
01:05 robkinyon (Note: a distribution is separate from a module or class, but I'm not sure anyone has realized it yet)
01:05 robkinyon The biggest block I've got is getting the keywords to play nicely with the other stuff
01:06 robkinyon I need @Larry's buy-in - I've got a note on P6L waiting for them to reply
01:06 robkinyon I think the keywords should call out to some common code for knowledge how to find the right place to source in the code
01:07 robkinyon I don't want to write that code, but I want to know it's accessible by the various components
01:07 robkinyon So, essentially, there's a 7th component that's shared across all 6.
01:08 broquaint The code that accesses/munges that metadata?
01:08 * robkinyon nods
01:08 robkinyon that code has to be able to mixin'ed
01:08 robkinyon which means I have to control how it's loaded and, potentially, inherit from it.
01:08 robkinyon or override some of its functioning
01:09 robkinyon (And, no, there isn't a bootstrapping or catch-22 problem ... it just looks that way.)
01:10 broquaint I don't see a bootstrapping problem.
01:10 theorbtw1 has joined #perl6
01:11 robkinyon ok. I initially did with how "use" finds the shared component and its programmer-defined mixins, but that's solvable
01:12 autrijus SamB: ping
01:12 autrijus SamB: it's okay (and fine) to use TH, but you need to guard the code using #ifdef PUGS_HAVE_TH
01:12 robkinyon autrijus - got a moment?
01:13 autrijus SamB: some places has no ghci
01:13 autrijus SamB: and hence TH won't work
01:13 autrijus hi robkinyon. I'm about to sleep, but a moment sounds ok
01:13 robkinyon do you have any specs on the full syntax for "use"?
01:14 autrijus robkinyon: S11
01:14 robkinyon thanks
01:14 autrijus np :)
01:14 autrijus that's all I have.
01:15 broquaint Good luck, robkinyon.
01:15 broquaint has quit IRC ("sleep")
01:15 robkinyon thanks
01:15 robkinyon i think i'll need it
01:15 castaway_ has joined #perl6
01:17 autrijus SamB: so using TH blindly will break build on those places.  look at Pugs.Compile.Haskell on how to disable it entirely for platforms without TH
01:18 theorbtwo has quit IRC (Read error: 145 (Connection timed out))
01:23 clkao morning autrijus
01:23 autrijus greetings.
01:23 clkao did you mention that one should use store_global for creating something in a namespace?
01:24 autrijus why, yes, but I believe I mentioned it in a Parrot context.
01:25 clkao ok. what bout perl6
01:25 clkao btw i tried to implement $foo.as and @foo.as but failed. then i i go back reading htut
01:27 autrijus heh.
01:27 clkao and did you see the segfault i mentioned?
01:27 autrijus there is printf
01:27 autrijus you can just call to printf.
01:27 clkao sure. that's what i was doing
01:27 clkao but array and vlist etc hates me
01:28 autrijus alright.
01:28 autrijus .as is probably a bit challenging as your first Prim
01:28 clkao so, segfault:     SVN::Client.new.log('http://svn.openfoundry.org/pugs' , 'HEAD', 'HEAD', 0, 1, sub { say @_ });
01:28 clkao call this twice and fscked
01:29 castaway has quit IRC (Read error: 110 (Connection timed out))
01:29 autrijus clkao: what does gdb say?
01:29 clkao document op\d a bit? i was lost in Val and VRef Vlist IVal Eval Eval ?
01:29 autrijus have you read PA02?
01:29 * clkao checks with gdb
01:30 autrijus and you probably want to grok the entire src/Pugs/AST/Internals.hs too
01:30 clkao strangely i thought i did, but appearantly i didn't see the latter parts
01:30 clkao #0  0x28469281 in Perl_sv_isobject () from /usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so
01:30 autrijus :)
01:30 clkao #1  0x28982972 in svn_swig_pl_make_pool ()
01:30 clkao   from /home/clkao/work/svn/subversion/bindings/swig/perl/libsvn_swig_perl/.libs/libsvn_swig_perl-1.so.0
01:30 clkao #2  0x28e58e8e in _wrap_svn_client_create_context (cv=0x85950ec) at svn_client.c:2943
01:31 clkao pool fun
01:31 autrijus yow.
01:31 clkao :(
01:31 autrijus I'm inclined to say it's outside my reach right now. maybe when I have enough sleep
01:31 * clkao translates the script back to perl5
01:31 autrijus sorry
01:31 clkao no worries
01:34 clkao autrijus: wha'what's the proper way to get returned hashref more transparent?
01:34 svnbot6 r4083, autrijus++ | * stub implementation for .does
01:34 clkao currently you can't do keys.
01:35 autrijus clkao: oh. it's easy
01:35 autrijus look at src/Pugs/Types/Hash.hs
01:36 autrijus see line 130
01:36 autrijus it needs some haskell-fu
01:36 autrijus but you can trivially implement fetchKeys etc
01:36 autrijus using evalPerl5Sub alone
01:36 autrijus see the other IHash classes above for samples
01:36 autrijus (and the typeclass definition for the interface spec)
01:36 clkao i did try yesterday or so
01:37 autrijus that's line 3
01:37 clkao and it hates me for some reasons
01:37 autrijus ok. let me do keys as an example...
01:37 autrijus wait...
01:37 autrijus ...done.
01:37 clkao i have tests
01:38 autrijus hm, we didn't handle multiple return values from p5 side
01:38 clkao no. not yet
01:38 clkao how is that suppsoed to be handled?
01:39 autrijus it's supposed to be cased from multiple SV
01:39 clkao because you are getting a sv  from perl5_apply
01:39 autrijus into a VList that contains those SVs
01:39 autrijus or you can return a SvAV
01:39 autrijus and I can detect SvAVness and cast it to VList
01:39 clkao ok..
01:39 autrijus that is perhaps easiest
01:40 autrijus anyway I've checked in a stub
01:40 autrijus r4084
01:40 autrijus (untested!)
01:41 autrijus but that should give you an idea
01:41 clkao hm wit pugs_apply is returning a single sv.
01:42 autrijus right, so if I have multiple returns, it will be a SV that is a ref to a VList
01:42 clkao ok
01:42 autrijus I think we should also cast that to SvAV
01:42 autrijus so you can analyse that
01:42 autrijus and promot it to multiple XSRETURN
01:42 autrijus there can be other strategies, but I think the SvAV/VList duality is fine
01:47 clkao returning with av in perl5_apply done
01:47 defitro has quit IRC ("Forgot i was here!")
01:47 svnbot6 r4084, autrijus++ | * first cut at $hash.keys for perl5.
01:48 clkao ??
01:49 clkao Warning: ignoring unrecognised input `-Wl,-R/usr/local/lib/perl5/5.8.5/mach/CORE'
01:49 clkao it was working yesterday
01:54 clkao it's in compile.pugs
01:55 clkao summon SamB
01:56 SamB what?
01:56 SamB did I break something?
01:58 misc_ has quit IRC (Read error: 60 (Operation timed out))
01:58 clkao ya, revert pugscompile/pugs to r4077 works
01:58 wolverian has joined #perl6
01:58 clkao pugs_embed=perl5 build.
01:59 SamB how can Pugs.Compile.Pugs be considered to work in the first place when it emits "<ref>" all over the place?
02:00 misc has joined #perl6
02:01 SamB or is that a compile error?
02:01 clkao compile error
02:01 clkao it tries to link things
02:02 SamB maybe nobody else used a Template Haskell splice before?
02:02 clkao and can't parse the additional linker flag
02:02 meppl gute nacht
02:02 SamB let me reconfigure then...
02:03 clkao autrijus: still:
02:03 clkao *** Not a keyed reference: PerlSV 0x083a9934
02:03 SamB okay, how do I turn on Perl 5 embedding?
02:04 autrijus clkao: right, have to implement doHash
02:04 autrijus hmm no
02:04 SamB oh, I see..
02:04 autrijus ah it's in Keyed
02:05 autrijus Prims.Keyed
02:05 * SamB had been expecting a --flag, and tried perl Makefile.PL --help...
02:07 autrijus clkao: fixed (still untested)
02:07 * SamB rebuilds...
02:08 clkao i have the tests
02:08 SamB where does it get that -Wl, flag?
02:10 clkao SamB: from extutils::embed.
02:10 clkao during makeifle.pl when pugs_embed=perl5
02:10 SamB clkao: are you on windows or something? you seem to be case insensitive. I suppose your shift key could be broken...
02:11 meppl has quit IRC (Remote closed the connection)
02:11 clkao SamB: freebsd
02:12 clkao i am just trying to help my wrists
02:12 clkao sorry if that bothers you
02:12 svnbot6 r4085, autrijus++ | * add PerlSV to keysFromVal
02:12 svnbot6 r4086, clkao++ | Make multiple returned value into AV for perl5_apply.
02:12 SamB mine has a different problem...
02:13 SamB Dynamic linker error message was:
02:13 SamB   /usr/lib/libpthread.so: invalid ELF header
02:13 SamB Whilst trying to load:  (dynamic) pthread
02:15 SamB apparantly my /usr/lib/libpthread.so is a linker script
02:15 SamB autrijus: what to do, what to do.
02:16 SamB TH splices totally wedge with perl5 embedding...
02:16 SamB in at least two different ways
02:16 SamB no wait, did I even commit that part...
02:17 SamB okay, yes, I did.
02:19 autrijus SamB: ok, so it isn't a bug. :-/
02:19 autrijus I don't really know how to solve this either.
02:20 clkao autrijus: tests committed
02:21 autrijus cool
02:22 * SamB wishes Makefile.PL did not trigger buggy syntax highlighting in Emacs...
02:23 Darren_Duncan has left
02:24 xern has joined #perl6
02:24 xern has quit IRC (Client Quit)
02:24 svnbot6 r4087, clkao++ | Roundtrip tests for hash and array.
02:25 SamB is there another way to spell s{([\\"'])}{\\$1}g; which might not confuse emacs?
02:25 xern has joined #perl6
02:26 mauke huhu, time to switch to vim?
02:26 mauke you can replace the { }{ } by almost anything
02:27 mauke s|([\\"'])|\\$1|g; for example
02:27 theorbtw1 Are you using perl mode, or cperl mode?
02:27 SamB hmm, I think it is the quotation marks that confuse it...
02:27 SamB theorbtw1: my status line says (Perl)
02:27 mauke doesn't it recognize the s as metaquoting operator?
02:27 theorbtw1 M-x cperl-mode, then.
02:28 theorbtw1 is now known as theorbtwo
02:28 theorbtwo cperl mode is generally much smarter.
02:28 SamB wow, crazy-looking!
02:28 SamB but it does seem better.
02:28 theorbtwo Yes, somewhat sadly they have sepperate configuration.
02:29 theorbtwo ...and some of cperl mode's default faces are rather silly.
02:29 theorbtwo (Bold for arrays?  Who thought of that?)
02:30 SamB although now half the file looks like it is in a comment, only things are highlighted anyway...
02:30 SamB I guess I should learn vi-style and use Yi, once it actually works.
02:30 SamB that is, if it is actually possible to parse perl.
02:30 mauke it isn't (without actually executing code)
02:30 wolverian Yi?
02:31 SamB wolverian: a text editor being written in Haskell which is intended to do syntactical highlighting, among other things
02:32 SamB as opposed to regexp-based highlighting
02:32 scook0 has joined #perl6
02:32 wolverian heh. syntax highlighting with side effects!
02:32 wolverian (in perl, anyway, by necessity.)
02:32 SamB that is crazy...
02:32 mauke only perl can parse Perl
02:34 wolverian although with perl6's grammars being visible to everyone, it's possible to at least ensure grammatical correctness
02:34 theorbtwo SamB: I thought people were working on an emacsish mode?
02:34 SamB theorbtwo: true
02:34 SamB I guess that might actually work now
02:35 theorbtwo SamB: Makefile.PL is a hard case, since it is half-make and half-perl.
02:35 SamB last time I actually touched it I had to add deletion
02:35 theorbtwo The things that look like comments are probably really big strings.
02:35 svnbot6 r4088, clkao++ | First cut perl5/README.
02:35 SamB maybe I should use notepad, I think Wine has one ;-)
02:37 SamB huh, WINE's notepad is flickery
02:39 sphex has quit IRC ("Leaving")
02:40 SamB making /usr/lib/libpthread.so a linker script is a nasty hack...
02:41 theorbtwo Oooh.  So it is.  That's a nifty, and ugly, hack.
02:41 theorbtwo I'd almost rather have seen a proprihetary ELF extension.
02:42 SamB yeah, that would have been easier for GHC to deal with ;-)
02:42 SamB though GNU or somebody would no doubt object to the use of the term "proprietary"...
02:43 theorbtwo Probably.
02:44 theorbtwo IIRC, though, pthreads needs compiler-level support to be useful anyway.
02:44 SamB well, it has that from GCC.
02:45 SamB though how well perl5 threading would interact with GHC's runtime is beyond me
02:45 theorbtwo Doesn't it get /usr/lib/libpthred.so.0 by the time it sees it?
02:45 theorbtwo How ithreads does anything is more or less beyond me.
02:45 SamB not if it starts GHCi internalyl to handle a TH splice
02:45 SamB depending what it you meant
02:47 theorbtwo (BTW: you shouldn't say perl5 threading, since there have been two very different threading models during 5's time -- 5005threads and ithreads.  5005threads are obsolete, though.)
02:47 SamB well, I really meant pthread threading...
02:49 theorbtwo Hm, I could have sworn that ithreads on linux didn't use libphread, but I appear to be wrong.
02:50 theorbtwo That's a versioned depend, so I don't see why you're getting pthread.so and not pthread.so.0
02:51 SamB theorbtwo: hey, me neither. there is probably a lot of perl code to see through, too...
02:52 theorbtwo Are you sure it comes from the p5 side?
02:53 SamB why would clkao have had that problem with '-Wl,...' if it came from GHC-land?
02:53 theorbtwo Oh!
02:53 SamB also, why would it be in the makefile?
02:54 theorbtwo It's probably from Config.pm.
02:54 SamB yeah
02:55 SamB    if ($ENV{PUGS_EMBED} and $ENV{PUGS_EMBED} =~ /\bperl5\b/i) {
02:55 SamB        push @prereqs, "src/perl5/perl5.o";
02:55 SamB        $ghc_output .= " src/perl5/perl5.o ";
02:55 SamB        $ghc_flags .= " -DPUGS_HAVE_PERL5 ";
02:55 SamB        my $flags = "$Config{ccflags} $Config{ccdlflags}";
02:57 * theorbtwo shrugs.
02:57 theorbtwo p5 embedding won't build for me at all.
02:58 * SamB wonders why cpp doesn't throw a fit over #endiff, only over the unterminated #ifdef
02:58 Khisanth hmm apparently it won't for me either, seems to be a problem with libpthread.so
02:58 theorbtwo Khisanth: You probably have ethe same problem as clkao, then.
02:58 SamB lets see if it actually will build at all here anyway?
02:59 theorbtwo I haven't tried it in a while, so trying again.
02:59 Khisanth actually why the heck is libpthread involved? the Makefile.PL output said it wasn't building with threads
02:59 theorbtwo Yep, same as before.
02:59 jroc has quit IRC ("Leaving")
02:59 SamB Khisanth: oh?
03:00 Khisanth *** Thread support disabled because you are building with embedded perl5 and your perl5 is not threaded.
03:00 theorbtwo Odd.
03:00 Khisanth or is that just for p5 embedding?
03:01 Khisanth DynaLoader.a is unrecognized
03:02 SamB okay, I committed that quick fix, what happened to svnbot6 ?
03:02 svnbot6 r4089, scook0++ | #ifndef'd out some TH code for Haddock
03:03 theorbtwo SamB: Lag.
03:03 SamB why is svnbot6 more lagged than I am?
03:03 theorbtwo Because it only checks for changes every so often.
03:03 rafl has joined #perl6
03:03 SamB oh
03:05 Khisanth how much memory does the linking step for pugs require anyway?
03:06 SamB wait, my commit failed anyway...
03:07 autrijus SamB: I see. your splicing happens at compile time
03:07 autrijus because you use $() as outer quote
03:08 autrijus SamB: please refactor to use [||] as outer quote
03:08 autrijus so that the rest of us can have libperl linked in again
03:08 SamB autrijus: wouldn't it take a bit more than refactoring?
03:08 SamB I'm just punting and using show when PUGS_HAVE_PERL5 is set
03:09 clkao autrijus: kill perl5/README todos
03:09 clkao or push items there
03:09 autrijus SamB: ok... if that is the case, test for
03:09 autrijus PUGS_HAVE_PARROT
03:09 autrijus PUGS_HAVE_PERL5
03:09 autrijus or
03:09 autrijus not PUGS_HAVE_TH
03:09 autrijus in either of the three cases, fallback to show
03:12 bsb has joined #perl6
03:12 SamB also HADDOCK?
03:13 theorbtwo SamB: You don't need code at all in the HADDOCK case, but feel free to provide any code that isn't TH.
03:13 autrijus that too
03:13 autrijus indeed
03:13 SamB theorbtwo: hey, if I have a big long #if line, one more clause in the condition is no trouble
03:14 theorbtwo Right.
03:14 theorbtwo Also, haddock chokes on the TH syntax.
03:15 SamB yeah, thats why my commit failed
03:15 theorbtwo haddock could really do with a refactor so that it's part of ghc, but that's not really in our scope.
03:15 SamB uh, that sounds kind of scary.
03:16 theorbtwo It means that haddock stays in sync with ghc's syntax additions.
03:16 theorbtwo It also means that it can resolve types without explicit signatures.
03:16 stevan has quit IRC ("Leaving")
03:16 SamB well true.
03:16 stevan has joined #perl6
03:17 SamB but then we might start seeing 'forall a b. ...' in haddock docs for things compiled with -fglasgow-exts!
03:23 jdv79 has joined #perl6
03:23 svnbot6 r4090, SamB++ | More work + quick fix for TH/perl5 embedding conflict in Pugs.Compile.Pugs
03:33 SamB okay, now I want to know why I don't have PUGS_HAVE_TH defined...
03:37 autrijus SamB: it tries to compile
03:37 autrijus if you have hs-plugins that is recent enough (from darcs repo)
03:37 autrijus then it will persumably compile
03:37 SamB which tries?
03:39 autrijus SamB: makefile.pl line 85
03:40 SamB oh, that works fine.
03:40 SamB its PUGS_HAVE_TH that I want to know about
03:41 * SamB had already updated to build lambdabot
03:42 SamB there is no mention of PUGS_HAVE_TH in the entire file...
03:42 autrijus right
03:42 autrijus it's in util/config_h.pl
03:42 autrijus and it should be unified now
03:42 autrijus it tries to compile
03:42 autrijus {-# OPTIONS_GHC -fth #-}
03:42 autrijus main :: (Monad m) => m ()
03:42 autrijus main = $([| return () |])
03:44 IshaCocoa has joined #perl6
03:44 SamB this is worse than Forth!
03:44 SamB (at least in forth you EXPECT words to parse input)
03:45 SamB now I see what you guys mean about only perl being able to parse Perl...
03:45 theorbtwo (In soviet forth, input parses words?)
03:46 theorbtwo Well, not quite you don't.
03:46 SamB oh?
03:46 theorbtwo You see that it is hard.  You don't yet see that it is impossible.
03:46 SamB if an arbitrary function like try_compile can do it, why not anything else?
03:46 SamB or is that from the <<?
03:48 theorbtwo The easiest one to see is (cpp-style) macros.
03:48 SamB I guess it is from the <<...
03:49 theorbtwo (Source filters in perl5.)
03:50 theorbtwo You can create a macro that feeds back at compile time, so the only way to parse any code after the declaration of the macro involves running the macro.
03:50 theorbtwo The macro is, of course, perl code.
03:50 theorbtwo So in order to parse, you must run at compile time.
03:51 theorbtwo Scary, no?
03:51 SamB with TH you can at least PARSE without running code at compile-time...
03:51 mauke BEGIN { *foo = rand() < .5 ? sub {1} : sub () {2} } foo /3;#/; print "this is even scarier";
03:51 SamB is Perl 6 any better?
03:52 theorbtwo SamB: Possibly worse.
03:52 SamB figures.
03:52 theorbtwo Source filters in perl5 were considered ugly hacks.  In perl6, they are much more reasonable to use.
03:52 theorbtwo In either case, though, you'll likely not see them used much to create nonbalenced syntatic constructs.
03:53 theorbtwo (There's a similar problem with C and CPP.
03:53 theorbtwo You don't see macros like #define FOO ) much, though... and when you do, you expect the syntax hilighter to mess up.
03:53 SamB at least cpp doesn't include a way to do 'rm -rf ~'...
03:54 theorbtwo This is true.
03:54 SamB which is likely to be scarier than 'rm -rf /'
03:54 xern has quit IRC ("leaving")
03:54 theorbtwo OTOH, it also doesn't have a way to make it possible to include arbitrary unicode chars in your code by writing U+.
03:55 xern has joined #perl6
03:55 theorbtwo Or gzip-encoding your script.
03:55 theorbtwo (Both of which are not just possible, but easy, in p5.)
03:58 Khisanth rm -rf / should include ~
03:58 theorbtwo Yes, Khisanth, but might die before then.
03:59 Khisanth I think I did that once ...
04:00 SamB rm -rf / will only work as root, period...
04:00 Khisanth I'll take your word for it :)
04:00 theorbtwo It might do some damage first if you run it as some other user with write access to /bin (generally alpha first).
04:01 theorbtwo Hm, I need to write a program named simple light user tty at some point.
04:02 SamB huh? wouldn't it stop upon noticing that / was root.root 0755?
04:02 theorbtwo On some systems /root is 775 root.wheel.
04:03 theorbtwo So it'd delete the contents of /bin before trying to do anything that it couldn't do, if run as a member of wheel.
04:03 theorbtwo Hm, should get in the habit of saying root:wheel.
04:03 SamB why the colon?
04:06 viirya has joined #perl6
04:06 theorbtwo . is depreciated there -- it's a legal, if strange, char for usernames and groups in POSIX.
04:07 * SamB does not have POSIXLY_CORRECT in his environment...
04:08 SamB can we get a lambdabot in here?
04:08 theorbtwo We do, sometimes.
04:08 theorbtwo It gets annoying when talking about arrays, however.
04:08 SamB oh
04:08 SamB oh yes
04:08 jdv79 is hs-plugins required for embe3dding parrot or perl5?
04:09 SamB maybe you could customize it to use a different sigil for commands ?
04:09 SamB such as \
04:09 SamB nah.
04:09 SamB \foo
04:09 SamB well it could work...
04:09 theorbtwo The problem is that perl has stolen every metacharacter available on a en-us keyboard, and some that aren't available.
04:10 theorbtwo Could make it not respond "I don't know that command", though.
04:10 SamB definately
04:11 SamB or it could be modified to only accept commands after its name
04:40 vcv has quit IRC (Read error: 104 (Connection reset by peer))
04:49 vcv- has quit IRC (Read error: 60 (Operation timed out))
04:49 jql has quit IRC (Read error: 110 (Connection timed out))
04:57 wolv has joined #perl6
04:58 wolverian has quit IRC (Read error: 54 (Connection reset by peer))
04:58 wolv is now known as wolverian
05:16 viirya has quit IRC ()
05:25 nothingmuch has quit IRC ()
05:31 IshaCocoa has left
05:42 Shachaf has quit IRC ("[<>]")
05:47 IshaCocoa has joined #perl6
05:48 sri_ my Int $foo = 1; $foo.bar; sub bar { say 'lalala' } # is it right that this works?
05:53 scook0 sri_: what does it do?
05:54 sri_ says lalala :)
05:55 scook0 I can't imagine that being correct
05:55 SamB !eval my Int $foo = 1; $foo.bar; sub bar { say 'lalala' } # is it right that this works?
05:58 scook0 which bit are you worried about--the fact that it allows the call before the sub declaration, or the fact that the sub is accepting arguments that it shouldn't be?
05:59 sri_ does that matter?
05:59 Khisanth how about the fact that you can call a method at all?
05:59 scook0 I think we can safely say that /something/ is comprehensively broken...
06:00 scook0 that code should be failing for 3 separate reasons then
06:01 scook0 Mind you, using a sub before it's declared might not be an error...not sure
06:01 scook0 because the declarations get processed at compile-time anyway, so by the time the code is actually run, bar is already declared
06:01 scook0 it's just a matter of whether it should be in scope or not
06:11 vcv has joined #perl6
06:11 vcv- has joined #perl6
06:16 jql has joined #perl6
06:36 viirya has joined #perl6
06:36 vcv has quit IRC (Read error: 54 (Connection reset by peer))
06:45 Aankhen`` has joined #perl6
06:54 vcv- has quit IRC (Read error: 110 (Connection timed out))
06:58 eric256 has joined #perl6
07:00 eric256 ?eval my $x = 1; given $x { when Int { say "Hello" } };
07:00 eric256 opps evalbot seems to be gone for now...
07:00 Aankhen`` Heh.
07:07 zgrim has left "no reason at all"
07:10 elmex has joined #perl6
07:20 eric256 when Foo {}; # still appears to need to be written as when (Foo) {}
07:20 nothingmuch has joined #perl6
07:22 nothingmuch morning
07:22 eric256 morning
07:32 x86 has quit IRC (Read error: 60 (Operation timed out))
07:41 IshaCocoa has left
07:41 svnbot6 r4091, eric256++ | wizard.p6 using the new features that have been added
07:43 IshaCocoa has joined #perl6
08:13 jql has quit IRC (Read error: 110 (Connection timed out))
08:16 vcv has joined #perl6
08:16 vcv- has joined #perl6
08:36 Aankh|Clone has joined #perl6
08:36 vcv has quit IRC (Read error: 131 (Connection reset by peer))
08:41 Aankhen`` has quit IRC (Read error: 145 (Connection timed out))
08:41 Aankh|Clone is now known as Aankhen``
08:44 vcv- has quit IRC (Read error: 60 (Operation timed out))
08:50 lathos Can you add methods to anonymous classes?
08:51 Aankh|Clone has joined #perl6
08:52 lathos Ah, not yet, anyway.
08:57 Aankhen`` has quit IRC (Read error: 60 (Operation timed out))
08:59 larsen has joined #perl6
09:04 sri_ dammit, traits are also marked as todo feature :/
09:07 sri_ and i have to explicitly use classes before using them in class traits
09:08 sri_ use Cat6; class MyApp is Cat6; # a bit ugly
09:10 IshaCocoa has quit IRC (Read error: 110 (Connection timed out))
09:11 IshaCocoa has joined #perl6
09:11 lathos Yeah, that's how Maypole is looking at the moment.
09:11 lathos Once we have anonymous classes, the subclassing works fine, though.
09:15 viirya has quit IRC ()
09:15 sri_ wish my haskell skills were better... :)
09:16 lathos I only want better haskell skills if I could also have thirty extra hours in a week...
09:19 sri_ i heared modafinil works wonders
09:19 iblechbot has joined #perl6
09:43 jql has joined #perl6
09:44 Aankh|Clone is now known as Aankhen``
10:01 broquaint has joined #perl6
10:16 vcv has joined #perl6
10:16 vcv- has joined #perl6
10:32 broquaint Urk, parse errors are hard to track down :/
10:40 vcv- has quit IRC (Read error: 60 (Operation timed out))
10:45 IshaCocoa has quit IRC ()
10:45 Juerd broquaint: comment...
10:46 broquaint When there's a parse error within a function it reports the error as occuring at the line of the declaration of the function.
10:46 broquaint function/anonymous sub etc
10:46 broquaint Which can be tricky when it's a big sub (am translating some of the HOP code presently).
10:50 Juerd Yes
10:50 Juerd Then, commenting out bits until it no longer errors helps
10:51 Juerd When it no longer errors, start removing comments
10:51 Juerd It's tedious.
10:51 broquaint Yep. That's pretty much what I've done, but it's only been the once so far (small functions++)
10:53 broquaint Sub prototypes are so nice, so very nice.
10:54 jql indeed
10:56 broquaint The topic variable in for loops is implicitly lexical, right?
10:57 jql yes
10:57 broquaint Good, good.
11:00 iblechbot has quit IRC (Read error: 110 (Connection timed out))
11:09 mugwump has quit IRC (Read error: 113 (No route to host))
11:21 simcop2387 has quit IRC ("Client exiting")
11:21 simcop2387 has joined #perl6
11:24 broquaint Is 'g' magical? pugs -e 'sub g { say $_ } sub f { temp $_ = q[in f]; say $_; g() } $_ = q[main]; say $_; f;' # No compatible subroutine found: "&g"
11:24 broquaint Or, even, why isn't g() found?
11:25 broquaint It doesn't matter what the subname is.
11:25 Juerd Sounds like a bug
11:25 Juerd Is this the minimal case example?
11:26 Juerd Note by the way that $_ is lexical in Perl 6, not global.
11:26 broquaint pugs -e 'sub f { say $_ } $_ = q[main]; say $_; f();'
11:26 broquaint pugs -e 'sub f { say $_ } f();'
11:26 broquaint The $_ seems to mix things up.
11:27 broquaint Without $_ it works fine.
11:31 revdiablo it seems $_ becomes part of the argument list implicitly
11:31 revdiablo and since f() has no args, it doesn't match
11:31 integral isn't that how: map:{ $_ * 2 } <== ... works?
11:32 revdiablo pugs -e 'sub f { say $_ } f("test");' # this works
11:34 revdiablo hmm, mixing $_ and $^X in one block seems to work, but I wonder if it's a good idea
11:35 revdiablo e.g. pugs -e 'sub f { say $_, $^a, $^b } f("test", "foo", "bar");'
11:36 broquaint What does the C-style for loop look like in perl6?
11:37 revdiablo my $x; loop $x = 1; $x < 5; $x++ { say $x }
11:37 broquaint Funky.
11:38 revdiablo parentheses may be common for that :)
11:38 broquaint Thanks, revdiablo :)
11:38 broquaint It does look a little odd.
11:38 revdiablo no problem
11:38 revdiablo yeah, using it as loop (..;..;..) {} looks better
11:39 nothingmuch has left
11:40 iblechbot has joined #perl6
11:41 nothingmuch has joined #perl6
11:42 sorje has left
12:16 vcv has quit IRC (Read error: 104 (Connection reset by peer))
12:16 svnbot6 r4092, iblech++ | * Usual svn properties
12:16 svnbot6 r4092, iblech++ | * src/perl5/README -- More PODification and spelling fixes
12:16 vcv has joined #perl6
12:19 iblech has joined #perl6
12:21 meppl has joined #perl6
12:30 Juerd broquaint: It looks odd, because C-style fors are unperlish by definition.
12:30 svnbot6 r4093, iblech++ | Pugs.Compile.Pugs -- Add more #ifs to silence warnings about unused functions.
12:31 Juerd broquaint: { init; { ...; incr; cond and redo; } }
12:31 nothingmuch "Here's what's going on: The IO Monad binds blah blah blah that's all in the other tutorials and yet you're reading this. Let's try again."
12:31 nothingmuch cute =)
12:31 Juerd You're almost always better off with foreach or while, anyway.
12:32 Juerd Do note that we have 2..10 :by(2) now :)
12:32 Juerd (Doesn't work yet)
12:54 meppl guten morgen
12:54 svnbot6 r4094, Aankhen++ | * slight modification to tests for HTTP::Headers::Util.
12:54 viirya has joined #perl6
12:55 iblech Morgen :)
12:55 meppl good morning iblech
12:58 nothingmuch has quit IRC ()
13:02 vcv has quit IRC (Read error: 60 (Operation timed out))
13:17 cdpruden has joined #perl6
13:28 stevan autrijus: I will start the changelog in a hour or so
13:28 * stevan has a feeling this is going to be the longest one so far
13:32 autrijus stevan: as always.
13:32 stevan :)
13:32 * autrijus mumbles something about acceleration and singularity
13:32 autrijus stevan++
13:32 stevan autrijus++
13:33 * stevan is off to buy some food, bbiab &
13:34 scook0 autrijus: I think the change from (list-of-invocants) to (Maybe explicit-invocant) has left stuff subtly broken
13:36 nothingmuch has joined #perl6
13:38 scook0 well, I must go...bye
13:38 scook0 has quit IRC ("Leaving")
13:38 * clkao mumbles something about membling
13:39 clkao autrijus: when do you depart?
13:40 autrijus clkao: 7th of June
13:40 Aankhen`` For?
13:40 clkao ok
13:41 * autrijus wonders what "subtly broken" mean
13:41 autrijus Aankhen``: Vienna
13:41 Aankhen`` Ah.
13:41 Aankhen`` Holiday?  Permanently moving?
13:41 clkao Aankhen``: what do you think? hacking of course
13:41 * Aankhen`` tries to wrap his brain around that.
13:41 autrijus Aankhen``: Austrian Parrot/Pugs hackathon
13:42 Aankhen`` Ahh.
13:42 Aankhen`` Kewles.
13:42 Aankhen`` Kewlies, even.
13:42 autrijus (with a workshop and JA*H contest thrown in)
13:42 vcv has joined #perl6
13:46 jhorwitz has joined #perl6
14:02 viirya has quit IRC ()
14:05 x86 has joined #perl6
14:32 vcv- has joined #perl6
14:32 vcv has quit IRC (Read error: 131 (Connection reset by peer))
14:33 knewt are these errors expected right now?
14:33 knewt pugs> "abc" ~~ /<alpha>+/
14:33 knewt *** Cannot parse PGE: <alpha>+
14:33 knewt *** Error: Name 'alpha' not found
14:33 knewt pugs> pugs> "abc" ~~ /<+alpha>+/
14:33 knewt *** Cannot parse PGE: <+alpha>+
14:33 knewt *** Error: PGE Parse error: invalid subrule name at offset 1 (found <<+>>)
14:34 iblech PGE doesn't support these yet, I think
14:35 knewt this is the latest parrot trunk, with the pge from that copied across into the latest pugs trunk
14:36 knewt also, just to check, are 4 subtest failures in t/rules/from_perl6_rules/capture.t currently expected?
14:37 knewt hmm, 10 subtests unexpectedly succeeded in my test run :)
14:38 autrijus knewt: itym <[alpha]>
14:38 autrijus <-[alpha]>
14:38 autrijus etc.
14:38 iblech I thought Larry changed this, so the brackets are not longe needed? Not sure though
14:39 autrijus that is still being debated
14:39 autrijus but that's the way it is in pge anyway
14:39 autrijus (at least this moment)
14:39 iblech knewt: Here, with not-so-latest Parrot, all tests successful, 41/65 TODO
14:39 iblech Ah, ok
14:39 ramzi has joined #perl6
14:39 autrijus knewt: please unTODO those unexpected successes. :)
14:40 autrijus knewt: capture.t is all okay for me
14:40 autrijus using old pge
14:40 knewt autrijus: i was just following the stuff in docs/quickref/rules re <alpha>
14:40 autrijus knewt: nod. maybe fix the quickref to mention the status in pge?
14:40 autrijus (or ask on p6c)
14:40 knewt which says the <[alpha]> would match one of a, l, p, h or a
14:40 autrijus ahh.
14:41 knewt s/ or a//
14:41 autrijus then maybe I'm borked.
14:41 autrijus indeed.
14:41 autrijus sorry, I'm teh borked. you are correct.
14:41 autrijus so it boils down to a set of default named rules that pugs has to supply pge with.
14:42 autrijus care to add definitions at quickref?
14:42 autrijus i.e. in the line of <alpha>
14:42 knewt i'll take a look, see if i can figure out what/where is needed
14:42 autrijus add another line that says <[a-zA-Z]>
14:43 autrijus (that is of course not unicode-correct, but neither is pge for now)
14:43 autrijus thanks. I'll bbiab
14:43 autrijus &
14:44 knewt iblech: my test failures from capture.t are nos 61-65
14:45 knewt ah, and there's a nice comment above where it starts failing with [[ # FIXME parsefail ]]
14:47 iblech Here: 61-65 TODO fail, with the exception of 63, which is ok
14:50 klau1 has joined #perl6
14:51 klau1 has left
14:53 knewt anyone here a channel operator?
14:55 knewt meh, never mind for now. i'll just paste the nopaste url myself
14:55 knewt iblech: http://nopaste.snit.ch:8002/2748 # the end of my capture.t run
14:57 iblech Hm, mine finishes cleanly
14:57 knewt must be the updated pge
14:57 iblech Yep
15:03 hcchien weird, the chomp doesn't work well for me.
15:03 svnbot6 r4095, iblech++ | unTODOs.
15:10 knewt re the message about chomp that was sent to p6c earlier, it being and error, and the error being what is reported, feels right to me, but i'm not up on perl6 semantics, so have for loop semantics changed p5->p6 ?
15:10 knewt s/and error/an error/
15:11 knewt back to rules, where in the pugs source would i add default named rules?
15:11 iblech I think a "is rw" is needed, but that might still not work, as he tries to chomp a constant, not sure...
15:13 knewt because in perl5, a for loop aliases to the items. does perl6 still do that, in which case the error is correct?
15:14 iblech Yes. But by default, the aliases are readonly. To get a r/w alias, one has to write: for ... -> $foo is rw {...}
15:14 knewt a chomp variant that doesn't affect the original variable, but returns ($chomped, $what_was_chomped) might be nice
15:14 elmex has quit IRC ("ok, hof")
15:15 iblech IIRC Juerd has proposed this (I like it)
15:17 knewt or maybe instead of a variant, alway returning ($what_was_chomped, $chomped), and have a flag to say whether or not to alter the original variable
15:18 knewt s/alway returning/always return/
15:18 nothingmuch_ has joined #perl6
15:18 theorbtwo nothingmu!
15:19 Limbic_Region has joined #perl6
15:19 eric256 can i override FETCH for an object?
15:19 nothingmuch has quit IRC (Read error: 54 (Connection reset by peer))
15:20 iblech my $proxy_object := new Proxy: FETCH => {...}   # do you mean that?
15:21 eric256 i think maybe sort of,but i don't understand why it is a proxy?  should my class inherit from Proxy and then define its own fetch?  i want to make a range class that when fetched in scalar context returns a random number in the range
15:21 iblech Ah, I unterstand... Use:
15:22 knewt grr. still can't figure out where to add default rules. gah. me--
15:22 iblech class MyClass { method *prefix:<+> { ...return a random number... } }   # But this'll only ret a random number in *numeric* context
15:23 eric256 oh that is an interseting idea... i was approaching it from a different angle. i think that will work though.
15:23 iblech :)
15:25 Aankhen`` Is * supposed to completely flatten arrays, or just one level?
15:25 iblech *IIRC*, only one level. Not sure, though
15:25 Aankhen`` I think so too.
15:25 Aankhen`` Hrm.
15:26 integral isn't ** the super-flatten that does all levels?
15:26 Aankhen`` No, I believe ** is for when you want it to be flattened immediately and not lazily.
15:26 iblech Right.
15:26 integral ah
15:27 Aankhen`` Well, Pugs is flattening all levels.
15:27 * Aankhen`` goes to check AES.
15:28 iblech No:
15:28 iblech pugs> *(1, [2,[3,[4,5]]]).perl
15:28 iblech ('(1, [2, [3, [4, 5]]])')
15:28 Aankhen`` pugs> *([(1, 2), (3, 4)]).perl
15:28 Aankhen`` ('[1, 2, 3, 4]')
15:28 Aankhen`` Am I missing something?
15:28 iblech The ()s inside the [] don't construct a list
15:29 iblech They just group
15:29 Aankhen`` Ah.
15:29 eric256 hmmm. i'm getting NaN ?
15:29 iblech (At least I think that's the correct explanation -- ask Juerd to be sure :))
15:29 Aankhen`` Heh.
15:30 iblech eric256: IIRC this is not yet implemented in Pugs. Try: multi sub *prefix:<+>(YourClass $self) { $self.get_random_number }
15:30 iblech This should have the same effect
15:31 Aankhen`` What about: multi sub *coerce:<as> (::?CLASS $self, Num ::to) { $self.get_random_number; }
15:31 eric256 iblech: that is what i did.
15:32 iblech Aankhen``: That should work, too, I think, but is definitely not yet implemented
15:32 Aankhen`` Heh.
15:32 eric256 hmm. my overridden methods aren't getting called at all.
15:33 eric256 i wonder if thats not implemented for classes yet
15:35 eric256 from the tests it looks like those aren't implemented yet
15:37 eric256 i wanted to make a 'd' operator that creates a dice roll and overload it so you could do  Monster.new(:damage(5d6 + 5)) ;)
15:38 Aankhen`` That'd be cool. ^_^
15:38 iblech sub infix:<d>(Int $a, Int $b) { ... } should work
15:38 eric256 yea that part works fine.
15:39 eric256 but i want it to act just like a number so inside the Monster class you just do return $.damage and it then rolls 5 6sided dice and adds five to the answer.
15:40 iblech Ah, yes
15:40 iblech You might be able to fake it with lazy {...}
15:41 eric256 the 5d6 part i could fake with that.  but i would need a class in order to overload + and - to behave right
15:41 eric256 interesting idea though. i'll play with that for now ;)
15:42 iblech (nothingmuch's lazy proposal)++ :)
15:43 Aankhen`` Use an accessor for $.damage?
15:44 svnbot6 r4096, iblech++ | t/operators/short_circuit.t -- EVALed some tests to make it parse again.
15:44 iblech That would still not make + and - work, I think
15:44 Aankhen`` Hrm, wait, that didn't make sense.
15:44 * Aankhen`` takes it back.
15:44 * Aankhen`` cries.
15:44 Aankhen`` I spent all day -- and a large part of last night -- trying to debug HTTP::Headers::Util.
15:45 sorje has joined #perl6
15:45 eric256 Aankhen yea i can do that. i'm just trying to make an object created with <d> that returns a random number in its range (well not range but you know)  then it could be used anywhere (/me sees Aankhen`` understands now but i've already typed all this. ;)
15:45 Aankhen`` A few minutes ago, out of curiosity, I combined a couple of function calls which I had split into two for debugging.
15:45 Aankhen`` Voila!  Everything works.
15:45 iblech :)
15:47 Aankhen`` I love having a large library of songs.
15:47 Aankhen`` A couple weeks back, I added the entire thing to the playlist and shuffled it now.
15:48 Aankhen`` Now I get to listen to new music everyday. :-)
15:49 eric256 lazy is cool! lol
15:49 svnbot6 r4097, Aankhen++ | * fixed HTTP::Headers::Util.
15:49 svnbot6 r4097, Aankhen++ | * fixed test scripts for aforementioned module.
15:49 svnbot6 r4098, iblech++ | Make operators/assign.t parse again, too.
15:49 svnbot6 r4099, iblech++ | t/pugsrun/10-dash-uppercase-m.t -- Hmm... nothingmuch++'s OSX smoke lists this
15:49 svnbot6 r4099, iblech++ | test as skipped, this commit should fix that.
15:51 Aankhen`` You know what would be nice?
15:51 Aankhen`` A couple new sub traits: `is unimplemented` and `is deprecated`.
15:52 Aankhen`` `is unimplemented` could die (or raise an exception, if that functionality were in place) when the sub is called.
15:52 Aankhen`` `is deprecated` could generate a warning (possibly one that could be turned off).
15:53 Aankhen`` I guess `is unimplemented` might only be useful in terms of porting modules... `is deprecated` would probably be useful in general, though.
15:54 eric256 infix:<+> isn't dispatching based on the types it is expecting!
15:54 Aankhen`` What does the method look like?
15:54 eric256 is unimplemented could be good, but that is a mouth full to type ;)
15:54 svnbot6 r4100, iblech++ | examples/network/evalbot -- Added a README.
15:54 eric256 multi sub infix:<+> (Range $range, Int $inc) {
15:55 Aankhen`` I think you need `*infix:<+>`.
15:55 kelan Aankhen``: is unimplemented is written `...` such as: sub definedlater { ... }
15:55 Aankhen`` kelan >> Ah, thanks. I knew I was overlooking something.
15:55 Shachaf has joined #perl6
15:55 kelan if you never gave a real definition, the sub would die when called
15:55 eric256 hmm that did make a difference. what does * mean?
15:55 Aankhen`` eric256 >> Makes it global in scope.
15:55 kelan or warn or raise an exception, i guess, depending on some other things i can't remember
15:56 Aankhen`` Otherwise that would only make a difference in the scope of your class, I think.
15:56 eric256 yea but its defined outside the class.
15:56 Aankhen`` Oughtn't it be inside it?
15:56 eric256 it wasn't working inside... and i didn't see any reason it shouldn't work outside
15:57 Aankhen`` I dunno.
15:57 Aankhen`` "Global subroutines and variables are normally referred to by prefixing their identifier with *, but it may be omitted if the reference is unambiguous:"
15:58 eric256 looks like the scoping part is working but dispatch based on class type is not.
15:58 Aankhen`` Is `Range` a valid class in Pugs?
15:58 eric256 i defined it
15:59 Aankhen`` Ah.
15:59 Aankhen`` It's visible in whatever scope the sub is in?
15:59 eric256 yea
16:00 eric256 guess i'll check back later and see if anyone has hacked it in...wish i knew haskel so i could do it ;)
16:00 Aankhen`` Heh.
16:01 eric256 i'm betting that method dispatching is a little beyond someone who can't even read haskel. ;)
16:01 Aankhen`` Looks like ... is unimplemented.
16:01 Aankhen`` Talk about irony.
16:02 eric256 lol
16:03 iblech ;) But "..." should work, as does !!! and ???, last time I checked
16:04 Aankhen`` Remind me not to complain about things not being implemented when I'm tired.
16:04 iblech ;)
16:04 * Aankhen`` gets back to HTTP::Message.
16:05 Aankhen`` Would anyone happen to know what all this temp-ex-output and unlink-test-file and insanta and outsanta and golf* are about?
16:05 svnbot6 r4101, iblech++ | Updated examples/network/README.
16:05 svnbot6 r4102, autrijus++ | * Perl5Embed: .kv, .keys, .values, .pairs etc now works on Perl hashrefs.
16:05 Aankhen`` s/are/is/
16:05 mrborisguy has joined #perl6
16:06 mrborisguy was the default split taken out?  i can't seem to do @arr = split $str; anymore.  i thought calling this would split on spaces.
16:06 iblech Aankhen``: These are temporary files created by some tests, which aren't deleted, either because the test doesn't unlink() them or because the test dies
16:07 Aankhen`` Ah.
16:09 autrijus rehi!
16:09 iblech Hi :)
16:09 Aankhen`` Hiya autrijus.
16:11 autrijus so I checked in this
16:11 autrijus http://svn.perl.org/parrot/trunk/compilers/pge/PGE/Hs.pir
16:11 svnbot6 r4103, iblech++ | examples/:
16:11 svnbot6 r4103, iblech++ | * Removed three svn:executables, as the rest of the examples aren't
16:11 svnbot6 r4103, iblech++ |   executable, either (consistency...).
16:11 svnbot6 r4103, iblech++ | * Unified the shebang-line of examples/*.p6, too.
16:11 svnbot6 r4104, iblech++ | Add/change two shebang-lines of t/ to the default, too.
16:11 autrijus vgrep for "add_perl6_builtin_rules"
16:11 autrijus as a list of the builtin rules that's going to be supported
16:12 autrijus it's basically a series of add_rule calls
16:12 autrijus I wonder if it can be derived from docs/quickref/rules somehow.
16:13 clkao autrijus: want to fix keys for p5 returned hash?
16:13 * autrijus ponders a bit... hmm also the <ident> definition there (from pmichaud's demo.pir) is different from quickref/rules
16:13 autrijus clkao: huh?
16:13 autrijus $ ./pugs -e 'say eval_perl5(q({1,2,3,4})).keys'
16:13 autrijus 13
16:13 autrijus how is it broken?
16:14 autrijus are you using ancient pugs again? :)
16:14 eric256 has left
16:14 Khisanth more than a minute old?
16:14 autrijus 9 minutes
16:14 clkao autrijus: gah did my test pass?
16:15 autrijus which test?
16:15 clkao roundtrip
16:16 clkao autrijus: ok, it passes, now the next failed one
16:16 knewt autrijus: if the builtin rules are added at the pge level, does that mean they won't turn up in the p6 global pad?
16:16 svnbot6 r4105, Aankhen++ | * moved tests from t/builtins/lists/enum.t to t/data_types/enum.t
16:16 svnbot6 r4105, Aankhen++ | * deleted t/builtins/lists/enum.t
16:17 autrijus knewt: that is an excellent question.
16:17 autrijus knewt: and you convinced me that it's a bad thing to do it at PGE level.
16:17 autrijus knewt: thanks, I'm reverting the parrot side things :)
16:17 knewt autrijus: i was looking around the pugs source, trying to figure out how to manually create a VRule
16:18 autrijus VRule $ MkRulePGE "<alpha>" False False
16:19 vcv-- has joined #perl6
16:19 autrijus hcchien: bring p6 discussions here bah :p
16:19 autrijus (hcchien was saying that chomp($read) didn't chomp the scalar)
16:19 knewt ah, cool. i'm still very much un-knowing about the pugs source :)
16:19 stevan ok starting the changelog, wish me luck ;)
16:20 Aankhen`` GOOD LUCK STEVAN
16:20 clkao quick, more features while stevan is doing changelog!
16:20 Aankhen`` Uhmm.
16:20 autrijus stevan: good luck!
16:20 Aankhen`` Good luck, stevan
16:20 Aankhen`` .
16:20 stevan clkao: it wouldn't be the first time :)
16:20 stevan thank Aankhen``  :)
16:21 * stevan looks for some good Changelog writing music first
16:21 Aankhen`` "The Times They Are A-Changing'"?
16:21 stevan :D
16:21 Aankhen`` :-)
16:21 hcchien http://irc.csie.org:8888/124
16:22 autrijus Aankhen++
16:22 Aankhen`` What for?
16:22 autrijus the music :)
16:22 Aankhen`` Ah.
16:22 Aankhen`` Thanks. :-)
16:23 autrijus hcchien: chomp() worksforme on STDIN... maybe the server is sending \r\n
16:23 autrijus hcchien: can you try printing the entire $read?
16:24 autrijus something like
16:25 autrijus    say $read.split(rx//).map(&ord).join(' ');
16:25 hcchien does function length exist? :)
16:25 autrijus hcchien: yes, it's called .chars
16:25 autrijus but try using that say line above
16:25 hcchien ok, let me try it.
16:25 autrijus oh, you may need to use
16:25 autrijus rx:P5//
16:25 autrijus or rather, an empty string
16:26 autrijus    say split('', $read).map(&ord).join(' ');
16:27 hcchien autrijus: "105 102 98 109 13"
16:27 hcchien for the input "ifbm\n"
16:29 autrijus aha. so there's a \r
16:30 iblech FWIW, Net::IRC currently uses a hack:
16:31 iblech $line ~~ s:P5/[\015\012]*$//; # Hack to remove all "\r\n"s
16:31 autrijus hm it's because unlike perl5
16:31 autrijus ghc doesn't do eol translation for sockets
16:31 mrborisguy speaking of split... for some reason i remember there being a default split that split on whitespace (ie "this that".split; would yield ("this","that") ).  but obviously it's not anymore.  am i imagining things?  or was there something like this once?  (not that "this that".split( /\s/ ) is that ugly)
16:32 svnbot6 r4106, iblech++ | Added a test for getc() (t/builtins/io/getc.t).
16:32 autrijus mrborisguy: I think it's just unimplemented. want to take a stab?
16:33 mrborisguy haskell?  wouldn't have the foggiest idea where to start
16:33 mrborisguy but it is in the language?
16:33 autrijus not sure. I think it's useful
16:33 hcchien autrijus: so I should parse it manually?
16:34 Orkun_TR has joined #perl6
16:34 Orkun_TR perl 6 is out ? :P
16:34 autrijus hcchien: try using what iblech uses
16:34 mrborisguy i guess i wonder if split should default as .split( /\s/ ) or .split( /,/ )
16:36 hcchien autrijus: sure, it works. just  make sure will pugs offer the eol translation.
16:37 autrijus hcchien: I'm not sure about it at all
16:37 autrijus iblech: you think it's sane to make getLine kill trailing \r ?
16:37 autrijus Orkun_TR: well, a preview is
16:38 autrijus mrborisguy: well, can you help editing docs/AES/S29draft?
16:38 gaal has quit IRC ("goodbye")
16:38 mrborisguy sure
16:38 mrborisguy i'll take a look
16:38 autrijus mrborisguy: add the correct forms of split
16:38 iblech Hmm... I'd rather see a layered IO system eventually. But for now, I think people can s/// away the \r\ns manually.
16:39 gaal has joined #perl6
16:39 autrijus okay then.
16:39 autrijus mrborisguy: unary split is implemented. tests and docs welcom
16:39 mrborisguy autrijus: i have an account on Juerd's feather server... do I still need to use svn to get it in my account, or is there a default place i can edit it.
16:40 simcop2387 has quit IRC (Remote closed the connection)
16:41 gaal say, shouldn't $?PUGS_VERSION be renamed to $?PERL_VERSION ? that way code that uses it still works when run under the official perl :)
16:41 simcop2387 has joined #perl6
16:41 autrijus  
16:42 autrijus mrborisguy: see topic
16:42 autrijus the url on the topics that is
16:42 mrborisguy noted
16:43 mrborisguy has quit IRC ("Sunday family time")
16:43 svnbot6 r4107, autrijus++ | * minor style cleanup on roundtrip.t
16:43 svnbot6 r4108, autrijus++ | * Unary split() is now a synonym of Haskell's "words".
16:45 broquaint has quit IRC (Read error: 54 (Connection reset by peer))
17:01 elmex has joined #perl6
17:01 svnbot6 r4109, gaal++ | fix Prim signatures for open and openFile
17:01 svnbot6 r4110, iblech++ | * Added a test testing Pugs' safemode (t/pugsrun/11-safemode.t).
17:01 svnbot6 r4110, iblech++ | * Added "ignore_errors_please" to t/builtins/system.t.
17:08 Limbic_Region has quit IRC (Read error: 110 (Connection timed out))
17:08 svnbot6 r4111, iblech++ | * Moved some builtins/ tests to builtins/io/.
17:08 svnbot6 r4111, iblech++ | * Moved some other builtins/ tests to new dir builtins/control_flow.
17:08 svnbot6 r4111, iblech++ | * Moved even other builtins/ tests to new dir builtins/bool.
17:08 svnbot6 r4112, iblech++ | More test suite cleanup -- remove svn:executable from four test scripts.
17:10 vcv- has quit IRC (Read error: 60 (Operation timed out))
17:11 IshaCocoa has joined #perl6
17:17 knewt autrijus: is there any way to dump the contents of the globals table? from a haskell point of view
17:19 autrijus knewt: sure...
17:20 autrijus print =<< askGlobal
17:20 autrijus what do you need that for?
17:21 knewt well, i'm managing to get something into the globals table (i think), but it's not being picked up so i want to find out exactly what it was i managed to put in there
17:25 larsen has quit IRC ("later")
17:25 svnbot6 r4113, iblech++ | ext/Benchmark/t/basic.t -- Reduced the number of runs so one doesn't think the test hangs.
17:27 autrijus evalExp $ Sym SGlobal "<*ident" (Syn ":=" [Var "<*ident", Val (VRule ...)])
17:27 autrijus err
17:27 autrijus evalExp $ Sym SGlobal "<ident" (Syn ":=" [Var "<ident", Val (VRule ...)])
17:27 autrijus that's an example of adding a subrule
17:27 autrijus the "<" should really be "<*". fixing
17:27 autrijus but that's the general idea of adding something to global
17:28 obra autrijus: how close is 6.28?
17:28 autrijus obra: another month
17:28 * obra nids
17:28 autrijus then 6.285 may be almost free
17:28 * obra nods
17:29 iblech s/6.285/6.283/?
17:29 SamB has quit IRC (Read error: 104 (Connection reset by peer))
17:29 autrijus yeah
17:30 obra how up to date is PA01?
17:30 svnbot6 r4114, autrijus++ | * global named rules should use `<*foo` in the global pad,
17:30 svnbot6 r4114, autrijus++ |   not `<foo`.
17:31 autrijus obra: almost obsolete by now ;)
17:32 stevan autrijus: the ChangeLog is done,
17:32 stevan however it is not as long as I thought it would be
17:32 autrijus ?eval "stevan++" xx 3
17:32 autrijus oh, evalbot not here
17:32 stevan so i am worried i missed something
17:32 stevan :)
17:33 autrijus hm, I think there's some more bugfixes
17:33 autrijus I'll take a look in a bit
17:33 stevan ok
17:33 autrijus <- still struggling with this Academic Paper Format thing
17:33 stevan bugfixes are hard to figure out sometimes, I can't always tell if they are 6.2.5 bugs or post-6.2.5 bugfixes :)
17:34 autrijus I'm thinking I should give up any pretense of knowing how to write it, and submit my paper as if it's a TPJ article
17:34 stevan autrijus: yuk, nothing worse than Academic Paper formatting stuff
17:34 stevan autrijus: in POD :)
17:34 autrijus exactly ;)
17:35 knewt autrijus: ah, ok. i was trying to add it to the call to emptyEnv within prepareEnv :/
17:35 stevan autrijus: sometimes next week i will commit my perl5 meta-model stuff
17:35 svnbot6 r4115, Stevan++ | ChangeLog for 6.2.6
17:36 stevan actually, its a perl5 implemenation of the perl6 meta-model :)
17:37 stevan I might actually make it into a CPAN module too
17:37 stevan so I can use Perl6-like classes in perl5 :)
17:38 nothingmuch_ phew!
17:38 autrijus stevan: good :)
17:39 * nothingmuch_ just road all the way to work
17:39 stevan nothingmuch_: to work??
17:39 autrijus knewt: oh... what are you trying to add? the global rules?
17:39 nothingmuch_ if google maps showed israel I could show off
17:39 nothingmuch_ geographically
17:39 knewt autrijus: yeah
17:39 nothingmuch_ i didn
17:39 nothingmuch_ 't go to work now
17:39 nothingmuch_ which means if i leave home at 5:30-6:00 am i can get there before 8
17:39 nothingmuch_ it's 20:39
17:39 nothingmuch_ but i got there
17:39 nothingmuch_ shower, eat
17:40 nothingmuch_ and then work with my brain saturated with oxygen
17:40 autrijus knewt: then just newScalar (VRule...)
17:40 autrijus and put them into "<*foo"
17:40 knewt autrijus: i'm still in the "pretty much guesswork" stage of working with pugs source
17:40 nothingmuch_ plus i stay in shape
17:40 autrijus in the genSym below
17:40 nothingmuch_ and I have fun
17:40 autrijus and try it out with "xx" ~~ /<foo>/
17:40 autrijus be sure to sync up my change of adding the * twigil too
17:40 svnbot6 r4116, iblech++ | ChangeLog -- s/\.$//
17:40 svnbot6 r4117, iblech++ | ext/Set -- Fix basic.t, operations.t, and hash.t. Set is now "All tests
17:40 svnbot6 r4117, iblech++ | successful".
17:40 svnbot6 r4118, iblech++ | ext/CGI -- UnTODO a header.t test. CGI is now 100% successful, too.
17:41 iblech Ok, all ext/ modules pass all tests, here
17:42 stevan iblech++ # preflighting early :)
17:42 nothingmuch_ iblech++; # i've heard of DECAFBAD but not of DEADBEEF
17:43 knewt DEADBEEF is quite common i thought
17:43 * iblech will be away the next week (school visit of our capital), so I want to use the last few hours :)
17:44 * iblech didn't know DECAFBAD ;)
17:44 nothingmuch_ wow, a chance to catch up with iblech's karma =)
17:45 SamB has joined #perl6
17:45 madhouse has quit IRC ()
17:45 iblech ;)
17:45 stevan :D
17:45 nothingmuch_ anyway, shower time
17:45 nothingmuch_ too bad we're going to miss you iblech
17:45 nothingmuch_ hope you come back extra motivated
17:45 stevan he will have Pugs withdrawl
17:46 iblech Yeah... :(
17:51 autrijus iblech++
17:51 autrijus iblech++
17:51 autrijus iblech++ # take care, we'll miss ya
17:51 autrijus you can take svk with you...
17:52 iblech No internet, no laptop :/
17:54 stevan iblech: I have faith your will find a public terminal :)
17:54 ihb stevan: isn't there a Perl6 class module on CPAN already?
17:54 iblech I hope so, too :) But we won't have much time
17:54 SamB has anyone tried building with perl5 embedding off after building with it on? I've been having trouble with that, even after make clean...
17:56 iblech That reminds me of a holiday in a small town in France, we asked in a restaurant: "Do you know whether there's an Internet cafe here?" -- "Um, sorry, we only have Sprite, Fanta..." *sigh*
17:57 stevan ihb: yes there is, but that is different then what i am talking about
17:57 ihb stevan: what's it called so i can check it out when it's released?
17:57 stevan ihb: it allows you to write perl6 code, and use it as perl5 object
17:57 stevan ihb: no idea yet :)
17:57 stevan ihb: I will likely put it in the pugs tree at some point
17:58 stevan ihb: it is a meta-meta-model, so it's a little "weird"
17:59 stevan however it does make semi-working classes with no symbol table mangling :)
18:03 ihb stevan: does it rely on AUTOLOAD then?
18:03 stevan ihb: yes, but only as a gateway to the invoke_method() on the MetaClass
18:04 ihb ah, so stuff like NEXT works.
18:04 stevan these classes are interpreter level things, so normally the AUTOLOAD junk would never be needed
18:04 autrijus SamB: try nuking src/perl5/perl5.o and src/*/Perl5.o
18:05 stevan ihb: even better, it will have perl6 style method dispatching (see A/S12)
18:05 stevan ihb: but thats what I am working on now so it doesnt work yet :)
18:05 ihb stevan: ok.
18:06 robkinyon stevan: ping
18:06 stevan robkinyon: pong
18:06 ihb stevan: i haven't designed MI OO classes, so i don't know what i'm talking about, but people tend to not like MI. Some says it solves problems, some say those problems aren't real problems but just consequences of bad designs. i guess my question is: the Perl 6 things: do they solve real problems, or the symptoms of bad design? :-)
18:07 stevan ihb: do you mean Roles?
18:07 stevan ihb: I think roles are a great alternative to MI
18:07 robkinyon MI tends to solve problems that roles/mixins are a better match
18:08 robkinyon (But, then again, roles/mixins are sometimes viewed as an alternative to classes in general.)
18:08 stevan ideally the language is SI and has something like roles to get the benefits of MI without the pain :)
18:08 svnbot6 r4119, autrijus++ | * add src/perl5/*.o etc to "make clean" targets.
18:08 robkinyon The prototypers (q.v. class::prototyped) are in this crowd
18:08 iblech Does somebody mind if I add ext/ to util/yaml_harness.pl?
18:08 * stevan "grew up" on Javascript's prototyped OO model
18:08 * robkinyon too
18:09 stevan I knew there was a reason I liked you robkinyon  :)
18:09 robkinyon :-p
18:10 * iblech adds ext/ to yaml_harness and waits for the next automated smoke :)
18:11 gaal when's the next release planned?
18:12 gaal iblech: the safeMode patch makes use/require unsafe. is that's the way you envisioned it?
18:12 ihb stevan: no, i mean the new dispatch thingies.
18:13 Limbic_Region has joined #perl6
18:13 iblech gaal: Yep.
18:13 svnbot6 r4120, iblech++ | util/yaml_harness.pl -- The ext/ modules should be tested, too.
18:13 stevan ihb: MI dispatch is (IMO) fairly simple, it's just very hard to "use"
18:13 stevan but Roles have a clearly defined place in the dispatch order
18:14 stevan basically IIRC its this:
18:14 stevan search the local class
18:14 stevan search the attached roles breadth first
18:14 iblech gaal: "Attackers" shouldn't see the error messages if a module can't be found etc. -- they could detect which files exist and which not, for example
18:14 stevan search the superclass heirarchy
18:14 stevan this makes it easier to "see" where your method will dispatch to given multiple roles
18:15 Limbic_Region OT:  is anyone familiar with a module that given a music CD UPC can gather info about the CD reliably ?
18:16 ihb stevan: btw, will we see any Learning Perl 6 or something like it anytime soon?
18:16 gaal iblech: i realize that; but doesn't that mean safe code can't use modules?
18:16 stevan ihb: ask merlyn :)
18:16 ihb stevan: he's the only one that can write books? ;-)
18:17 stevan ihb: to be honest, I think the language design needs to be finished first ;)
18:17 vitaminmoo has quit IRC ("Leaving")
18:17 ihb stevan: yeah, but are there any plans on any learning material?
18:18 stevan ihb: there is the cookbook and quickref
18:18 stevan but other than that I have no idea
18:18 stevan I am sure chromatic would love to put some Perl6 articles onto perl.com though
18:19 iblech gaal: Yes. Idea: We unsafe use and require, but make sure only [\w0-9-etc.] are in the module name when running under safe mode
18:19 Limbic_Region brian d foy has been asking for p5 articles for TPR
18:19 Limbic_Region err p6 even
18:20 Limbic_Region the problem with writing learning material at this point is that the mass majority of people are not comfortable with a "living document"
18:20 gaal iblech, alternatively, is there any chance for lexical as opposed to dynamic safety?
18:21 gaal i'm not sure what that means yet *g*, but something like
18:21 vitaminmoo has joined #perl6
18:21 iblech gaal: Yeah, that'd be cool. Implement it? :)
18:21 gaal { use safe; eval $user_string; }
18:21 iblech Yep
18:21 gaal *no* explicit "no safe"
18:22 autrijus lexical safety is atomic{} :)
18:22 autrijus you can of course restrict access to op*
18:22 autrijus via some kind of masking
18:23 autrijus but the correct(tm) way is really getting runEvalSTM to work properly, and/or redefine liftIO to watch for safeness flag
18:24 gaal iblech, ext/ doesn't work well in the yaml harnes on win32, i'm investigating.
18:25 cdpruden has quit IRC ("Oops. This machine just fell asleep")
18:28 iblech gaal: Thanks :) I did a "glob 't/ ext/*/t'" to get the dirs to test, dunno why's that borken on win32
18:28 gaal oh, it globs all right
18:28 gaal i think maybe it's my fault and i should have set PERL6LIB correctly
18:28 gaal i keep forgetting, and set it to ext/Test/lib
18:29 IshaCocoa_ has joined #perl6
18:29 gaal however now i did 'nmake' and that triggered a 'clean', so i'm waiting for a full build :)
18:29 iblech Maybe we should $ENV{PERL6LIB} .= ":blib6/lib" in yaml_harness?
18:30 gaal probably! run-smoke used to do that.
18:30 gaal even:
18:30 gaal = "blib6/lib:$ENV{PERL6LIB"
18:30 iblech Yep
18:30 * iblech adds that to run-smoke
18:30 gaal except w/o my syntax errors
18:31 gaal brb
18:31 Limbic_Region has quit IRC ("leafChat IRC client: http://www.leafdigital.com/Software/leafChat/")
18:32 iblech Done as of r4121
18:33 autrijus yay, finally got the outline in place.
18:33 svnbot6 r4121, iblech++ | * util/run-smoke.pl -- Add blib6/lib to %*ENV<PERL6LIB>.
18:33 svnbot6 r4121, iblech++ | * util/livecd/mklivecd.pl -- Adjust the initrd size.
18:35 autrijus # http://autrijus.org/tmp/pugs-paper.txt
18:35 * autrijus ponders putting all 107 people in AUTHORS into acknowledgement
18:45 vcv- has joined #perl6
18:45 svnbot6 r4122, gaal++ | fix smoke on win32
18:47 IshaCocoa has quit IRC (Read error: 110 (Connection timed out))
18:55 svnbot6 r4123, iblech++ | util/run-smoke.pl -- qw<$ENV{PERL6LIB}> doesn't interpolate, fixed.
18:55 gaal eventually, we'll get this one right ;-)
18:55 iblech :D
18:56 gaal of course, i should have been using qw<< >>   :-P
18:57 iblech Or even qw«...» ;)
18:57 gaal yeah!
18:58 * gaal needs a decent editor for win32 that doesn't get confused by utf-8
18:58 gaal vim very unfortunately does
18:59 iblech :set fileencoding=utf-8  # works here fine
18:59 * Odin-LAP points in the general direction of emacs, before running.
18:59 gaal iblech, it almost works here. i dunno, maybe it's just the crummy windows terminal that's giving me grief.
19:00 gaal Odin-LAP, :p
19:18 svnbot6 r4124, autrijus++ | * add lib imports to LKT tests so it still works when running
19:18 svnbot6 r4124, autrijus++ |   as part of `make smoke` on pugs's base path.  We may need a
19:18 svnbot6 r4124, autrijus++ |   FindBin.pm soon...
19:18 vcv-- has quit IRC (Read error: 54 (Connection reset by peer))
19:20 gaal http://feather.perl6.nl/~gaal/smoke_xp.html
19:21 iblech Hm, Benchmark/t/basic.t is 100% ok here
19:23 iblech The other ext/ failures are probably because of . not being ext/...
19:24 gaal iblech, prove -v says it threw an illegal division by zero.
19:24 iblech Maybe the test run too fast...
19:24 gaal maybe 100 is too fast?
19:24 gaal heh
19:24 iblech Fixing Benchmark.pm
19:25 gaal yes, that was it.
19:25 gaal 500 works here, but it does make the test slower.
19:25 knewt ok, i've got most of the built-in rule assertions in now. a couple i can't get to work for some reason though. and my code is horrible, but i can't figure out how to move it out into a seperate function
19:27 vcv- has quit IRC (Read error: 60 (Operation timed out))
19:35 svnbot6 r4125, iblech++ | Benchmark.pm -- Catch /0.
19:35 svnbot6 r4126, iblech++ | ext/{Test,Config-Tiny,Pod-Event-Parser} -- Hack to either chdir() or use lib
19:35 svnbot6 r4126, iblech++ | the correct directory, even when run from `make smoke`.
19:48 gaal hey, shouldn't 'while my $x = foo() { ... }' work?
19:51 iblech It should, but doesn't, as my() is currently only parsed on statement-level, not as part of an expression
19:51 gaal ah. thanks.
20:02 gander has joined #perl6
20:02 IshaCocoa_ has quit IRC ()
20:03 mrborisguy has joined #perl6
20:16 ramzi has quit IRC (Read error: 60 (Operation timed out))
20:16 mrborisguy has quit IRC (Read error: 104 (Connection reset by peer))
20:16 svnbot6 r4127, iblech++ | libwww-perl -- Modified @*INC to make headers-util.t work under `make smoke`, too.
20:16 larsen has joined #perl6
20:21 Aankhen`` If I have a class property which I would usually mark as `is rw` and use a proxy in, and I need to store instance information in a property by that name, will one of the two clobber the other?
20:22 Aankhen`` And if so, should I just, for example, call the method :foo and the property :_foo?
20:22 iblech I'm not sure I understood your question 100%, but I think so -- class methods/properties and instance methods/properties share one namespace
20:23 Aankhen`` OK.
20:23 iblech (But you could use multi sub/multi method tricks :))
20:25 pasteling "Aankhen``" at 203.101.5.82 pasted "Example class" (9 lines, 202B) at http://sial.org/pbot/10565
20:25 iblech E_INFINITE_LOOP
20:25 Aankhen`` (let's pretend that the data is massaged into some form or the other when storing it, and thus the Proxy is actually needed)
20:26 iblech s/$self.bar/$.bar/
20:26 Aankhen`` That'd still access the instance variables?
20:26 Aankhen`` Even though the invocant is aliased to $self in the signature?
20:27 iblech Yep. $.bar always refers to the $.bar of the invocant
20:27 iblech No matter to what $self or $_ or whatever is set
20:27 Aankhen`` Ah, cool.
20:27 Aankhen`` And if I were to use $self.bar, that'd call the method?
20:29 iblech yep
20:29 Aankhen`` Doesn't matter whether it's private, right?
20:29 Aankhen`` I mean, I could s/\.bar/.:bar/ and not have trouble?
20:30 * iblech thinks so
20:30 Aankhen`` OK.
20:30 Aankhen`` iblech++ # for always being patient and answering my lamest question
20:30 Aankhen`` s|$|s|
20:31 iblech Aankhen``++ # for asking the questions everybody wanted to ask but were afraid of :)
20:31 Aankhen`` :-D
20:46 svnbot6 r4128, iblech++ | lib/Perl6/Pugs.pm and lib/pugs.pm -- Little more PODification so the docs look
20:46 svnbot6 r4128, iblech++ | prettier on search.cpan.org.
20:53 Forth has quit IRC (Read error: 110 (Connection timed out))
20:53 svnbot6 r4129, iblech++ | lib/Inline/Pugs.pm -- Little more PODification to make it look better on
20:53 svnbot6 r4129, iblech++ | search.cpan.org (forget this one in my previous commit).
20:54 gaal bug: -- doesn't work on the pugs command line
20:54 gaal ./pugs -e 'say @ARGS' -version
20:56 iblech Ah... -version is eaten by pugs, so the -e-script doesn't see -version
20:57 gaal errrr
20:57 gaal imean
20:57 gaal -e 'say @ARGS' -- -version
20:57 gaal pugs still eats the -version
20:57 iblech Yep, bug
20:58 * iblech checks whether there's a Getopt::Long-like module for Haskell
20:58 gaal there is something autrijus metioned once
20:59 iblech There's System.Console.GetOpt
20:59 gaal what's the opposite of svn add ?
20:59 iblech svn rm
20:59 gaal i get an error about "... has local modifications"
20:59 gaal about a vim swapfile i accidentally added
20:59 gaal didn't ci yet
21:00 vcv-- has joined #perl6
21:00 Aankhen`` In P5, does calling a sub from within another sub, using `&foo;`, pass on all the parameters?
21:00 gaal ah, got it
21:00 gaal yes
21:00 Aankhen`` OK.
21:00 Aankhen`` Thanks.
21:00 vcv- has joined #perl6
21:00 Khisanth Aankhen``: well the current @_ is get used as the @_ for the other sub
21:00 gaal you musn't use parens if you want that though.
21:00 Aankhen`` OK.
21:01 Aankhen`` It's been a learning experience just working on HTTP::Message. =)
21:01 obra What is HTTP::Message?
21:02 Aankhen`` One of the modules in libwww-perl.  I'm porting all of the HTTP::* modules from that distro as per discussions regarding a replacement for CGI.pm.
21:02 obra very cool.
21:02 Aankhen`` Well, not really as per the discussions in the strictest sense, but by way of following up on it. :-)
21:03 obra Are you preserving the API or updating it?
21:03 Chewie[] If I were to want to start getting involved with the development of Pugs/Perl 6 in general, where would I start?
21:03 Aankhen`` I'm preserving the API of the ported modules, if that's what you're asking it; I am P6-ising it wherever there are obvious translations, though.
21:03 gaal iblech: btw Damian mentioned he had some work towards an p6 args parsing library.
21:04 Aankhen`` Chewie[] >> Learn Haskell. :-D
21:04 svnbot6 r4130, gaal++ | Perl6 Power Tools beginnings.
21:04 Aankhen`` Or start porting Perl 6 modules.
21:04 Aankhen`` Or write tests.
21:04 Aankhen`` And verify that the existing ones are indeed correct.
21:04 obra Or write docs ;)
21:04 Aankhen`` Or that.
21:04 obra Chewie[]: what are you good at?
21:04 Chewie[] Docs would be interesting.. I never was too good, though I do comment my code liberally.
21:05 Chewie[] obra: Many common programming languages. Assembly to Brain**** to Perl.
21:05 obra Chewie[]: test suite work may be the best way to get involved
21:05 jhorwitz has quit IRC ("Chatzilla 0.9.67 [Firefox 1.0.4/20050511]")
21:05 obra if you're up for trying haskell, find a failing or todo test and see if you can fix it
21:06 jql Now that Perl6 is approaching usability, it's getting helpful for people to just try /using/ it and bring up issues which don't work for you
21:06 gaal Gettting to know the t/ directory is invaluable because it has tons of p6 code, plus you can tell what's already implemented and what isn't with it.
21:06 Chewie[] jql: I was considering trying to port a few projects.
21:07 gaal porting your favorite CPAN module is nice too.
21:07 jql I think porting stuff is a good start. I find it helps to have something motivating me to learn how to fix stuff
21:07 Aankhen`` Chewie[] >> Glance through interesting sounding files in t/ and examples/, that should help you gain familiarity with Perl 6. Then you could try porting a few modules or projects.
21:07 Chewie[] obra: I may try to pick up Haskell over the summer. My goals are Haskell, Smalltalk, and Calculus for this summer.
21:07 jql I didn't learn Perl5 XS until I wrote a module whoch required it
21:08 jql now I know all sorts of gory details about the perl5 implementation...
21:08 Aankhen`` Heh,
21:08 * jql tries to cleanse his mind
21:08 Aankhen`` Heh.
21:08 Aankhen`` FMTYEWTK?
21:08 jql yep
21:09 jql I never read the parser or the re engine, so I still have some sanity
21:09 Chewie[] heh.
21:09 Chewie[] I have some gripes with the proposed regex changes, but I think I'll live.
21:09 Aankhen`` Dump your knowledge into a text file, put it up on the 'Net somewhere so people can be awed by your wisdom/insanity and replace it mentally with something else. ;-)
21:10 Aankhen`` BTW, iblech, what happened to evalbot?
21:10 gaal Porting Getopt::Long can be very useful! Although (as i just said mylsef) some people have plans for alternative moduels too
21:10 jql en.wikipedia.org/wiki/My_Insanity
21:10 Chewie[] Is Pugs going to be "the" Perl 6 implementation? Will Perl 6 require Haskell?
21:10 gaal no, and no :)
21:10 integral maybe, and no
21:10 * jql concurs with gaal
21:10 Chewie[] Just as I thought.
21:10 Aankhen`` Chewie[] >> Actually, Pugs requires a Haskell compiler. :-P
21:11 Aankhen`` Yey, index() works.
21:11 Chewie[] Aankhen``: I was speaking in a more general sense. "Would Pugs work without anything Haskell?"
21:11 Aankhen`` Chewie[] >> I know, I'm just teasing you. :-)
21:11 jql Perl6 will be like Python. Lots of implementations. CPython, Jython, PyPy
21:11 obra Chewie[]: it's the intent to use haskell to bootstrap a pure perl6 implementation in perl6
21:11 gaal Chewie[], you can d/l binaries of pugs today that work w/o having haskell on your box.
21:12 Chewie[] jql: I can't wait for the Perl 5 implementation.
21:12 jql Chewie[]: Damian tried that. Didn't work.
21:12 Chewie[] jql: Why not? Speed?
21:12 jql no, the perl5 re engine couldn't implement the Perl6 rule engine, it seems
21:12 integral japhy's Regexp::Parser work might do something in the Perl6::Rules direction
21:13 jql Perl6 parsing required a proper grammar engine, and the perl5 re engine couldn't quite bridge the gap
21:13 jql :(
21:13 Chewie[] heh.
21:13 integral you can cheat now and use Inline::Pugs :-P
21:14 Chewie[] giggle.
21:14 jql true... true
21:15 Chewie[] If Perl 6 code is compiled by the Haskell-based Pugs into Parrot code, and the Parrot is run on the platform-specific VM, where does most of the functionality end up grouped? Does Parrot need to have its own grammar engine to handle Perl 6's new engine?
21:15 * gaal ZZzzz &
21:16 integral Chewie[]: the grammar engine in pugs is PGE which is the "Parrot Grammar Engine".  Pugs links in parrot to be able to use rules
21:16 integral PGE itself is written in parrot, and produces parrot directly
21:17 Chewie[] integral: So there's no real dedicated library - the functionality is generated in-line?
21:17 integral hmm, I think the generate code doesn't need any library
21:20 Juerd knewt, iblech: chomp should not mutate by default. Nothing should. If you want something to mutate, use .=
21:23 vcv-- $string.=chomp <-will this work?
21:25 jql interesting
21:26 jql chomp seems to return the chomped bit. is that correct?
21:27 SamB autrijus: I think ./src/Pugs/Run/Perl5_stub.c may be the problem...
21:27 Aankhen`` Do labels work alright in Pugs?
21:28 autrijus SamB: nod. it's created by ghc
21:28 SamB I know.
21:28 autrijus SamB: maybe I should add it to "make clean" targets
21:28 SamB yes, that is exactly what I was thinking.
21:28 SamB for cleanliness, probably also the .h
21:29 autrijus done.
21:31 mrborisguy has joined #perl6
21:34 madhouse has joined #perl6
21:34 svnbot6 r4131, autrijus++ | * from SamB: add the GHC-created stub files to `make clean` targets.
21:35 * Aankhen`` goes to sleep.
21:35 iblech Night, Aankhen``
21:36 Aankhen`` G'night.
21:36 Aankhen`` has quit IRC ("Induhvidual quote: "It's best not to open that can of wax." [Time wasted online: 12hrs 44mins 31secs]")
21:37 * SamB thinks it a little odd that GHCi does linking *before* compilation...
21:38 cookys has joined #perl6
21:41 Limbic_Region has joined #perl6
21:41 Limbic_Region anyone know why I received a bunch of OSSF pugs "test" emails?
21:42 autrijus er. yes. sorry.
21:42 autrijus I was deleting old tickets
21:42 autrijus but forgot to tick off the "don't send to committers" flag.
21:42 autrijus sorry. won't happen again
21:42 Limbic_Region no worries
21:43 Limbic_Region just found it odd
21:44 mrborisguy has quit IRC ()
21:46 Chewie[] Will Parrot have some sort of XS-like thingy?
21:46 iblech Yep, it has got NCI (Native Call Interface)
21:46 integral you can link in code as PMCs,  and there's the option of NCI
21:47 jql Yes, but it'll also be able to make external function-calls by name (with dlopen() and such)
21:47 jql kinda like ffi
21:47 Khisanth NCI looks a lot easier than XS
21:47 * jql agrees... except for that damned C++ language
21:48 * jql kicks C++ in the +
21:48 Chewie[] Heh, okay, now I'm just lost. If I wanted to re-do MIME::Base64, what should I use? Should I implement Base64 in Parrot?
21:48 iblech Gonna sleep, see you in a week :)
21:48 SamB what in the world is it called an NCI for?
21:48 integral Native Call Interface
21:48 jql Native Call Interface
21:48 SamB I mean, why "native"
21:48 * integral first saw that with java's JNI
21:49 jql Chewie[]: Perl6 will be fine
21:49 SamB oh, right.
21:49 iblech has quit IRC ("sleep &")
21:49 jql It'll compile down to parrot, and all will be will
21:49 jql well, even
21:49 integral and then we can feed it to the JIT, and save it to dist...
21:49 Chewie[] jql: If it's all the same to everyone, though, I need to learn Parrot to feel like a man.
21:49 integral *disk
21:50 Chewie[] Where by "everyone" I mean the interpreters and compilers.
21:50 jql Well, if your manliness is at stake, you must learn Parrot
21:51 Chewie[] Indeed. It will also be a bit more optimal than the Perl 6 compilers could make.
21:51 Chewie[] Would it not be better to do it in C, though? Or is it not worth the hassle?
21:51 integral ou just add optimisations to the compiler for this specific case ;-)
21:52 jql Chewie[]: Honestly, I'd just find the gnome library which does Base64 voodoo and NCI it
21:52 jql NCI will be the main way of handling Parrot modules. That way, you don't need to learn Parrot internals unless you need it
21:53 Chewie[] Assume I really don't know what you're talking about (which may very well be the case, in that I just found myself wanting to do this today.)
21:53 jql the trick there is handling memory. Ain't that always a bitch?
21:55 jql Chewie[]: What I mean is, you write a shared C library which has a single function: const char *encode_base64(const char *). You can ask parrot to call that function by NCI
21:56 SamB that sounds suspiciously like FFI
21:56 Chewie[] I got that far. Should I assume NCI is somewhat like IDL, telling one application where to find another library?
21:56 jql because it is. :)
21:56 SamB this is why I was wondering why it was called NCI.
21:56 jql cause it's not using libffi
21:57 SamB why can't you people name things based on what they are?
21:57 jql and we don't wanna steal their name
21:57 jql :)
21:57 SamB jql: neither does most FFI I know!
21:57 integral hmm, and why is Foreign Function a better name than Native Call? :-P
21:57 svnbot6 r4132, iblech++ | examples/ppt/README -- Typo fix.
21:58 jql also, with Parrot, Foreign Function could be thought of as a Tcl function as well
21:58 jql Native Call is always gonna be a C library
21:59 SamB Isn't C foreign to Parrot?
21:59 Chewie[] Native Call for assembly code, Foreign Function for another interpreted language?
21:59 SamB Parrot is not, after all, C...
21:59 Chewie[] (Interpreted because all else boils down to Assembly?)
21:59 jql Chewie[]: that's not how it's defined, but that's how I think of it
22:00 Chewie[] jql: Ah.
22:00 Chewie[] jql: I'd rather write it in Parrot for the sake of portability, and letting Parrot handle memory in the best way for the platform.
22:00 jql indeed
22:00 jql plus, no compiler required
22:00 jql except parrot, of course
22:00 integral SamB: parrot is in C, it itself uses C calling convention for implementation, so wrt to parrot it's native
22:02 Chewie[] C isn't native to Parrot. Parrot is its own world.
22:03 * integral said parrot...
22:04 * jql whips out dictionary definition 5a:  Being a member of the original inhabitants of a particular place.
22:04 jql Aboriginal Call Interface, anyone?
22:06 Chewie[] Hey, I've got a friend who's really, really angry about the Unicode in Perl. Rambling on about his VTs not supporting it and such. Will there be workarounds or anything like that for non-Unicode devices/applications?
22:10 jql 1. He's a VT user and doesn't use Emacs?
22:10 jql 2. Yes
22:11 Chewie[] Heh.. He's a FreeBSD/Vim devotee.
22:11 Chewie[] (and Latin-1, apparently.)
22:11 jql scary
22:11 Chewie[] (18:11:35) Chris: ... I smell a penguin fucker.
22:11 * Chewie[] giggles insanely.
22:11 jql he doesn't even get to take advantage of Linux console unicode font hackery
22:12 SamB emacs actually supports unicode in a way that works?
22:12 * jql feels saddened
22:12 Chewie[] I've been considering a FreeBSD switch, actually.
22:14 jql depends on the meaning of the word 'works'
22:24 elmex has quit IRC ("leaving")
22:29 iblechbot has quit IRC (Read error: 110 (Connection timed out))
22:58 Darren_Duncan has joined #perl6
22:58 vcv-- has quit IRC (Read error: 104 (Connection reset by peer))
23:00 Darren_Duncan suggestion re Pugs ext/ module tests ...
23:00 Darren_Duncan supposedly test file names need to be spelled all in lower case to execute ...
23:00 Darren_Duncan as putting any uppercase characters in them is a signal that they shouldn't be executed yet
23:02 Darren_Duncan I suggest as an alternative that such not-executable files go in a different folder name instead, such as 'todo_t' rather than 't' ...
23:02 Darren_Duncan then test names can be uppercased again without triggering the special hack that causes them to not execute ...
23:02 Darren_Duncan I would like to be able to use mixed case in my test names and have them still execute
23:02 Darren_Duncan that is all
23:06 bsb has quit IRC ("ChatZilla 0.9.61 [Mozilla rv:1.7.5/20050105]")
23:07 vcv- has quit IRC (Read error: 60 (Operation timed out))
23:37 Limbic_Region has quit IRC ("tiuq\")
23:50 larsen has quit IRC ("later")
23:55 Darren_Duncan question ...
23:56 Darren_Duncan conceptually speaking, if you declare a module 'Foo' containing subroutine 'bar' that is not exported, is it reasonable for user code to say "use Foo; Foo.bar();"?
23:57 Darren_Duncan I find that I can only get the code to run if I rename 'module' to 'class' and 'sub' to 'method' ...
23:57 Darren_Duncan this is perfectly fine for a work-around
23:58 Darren_Duncan however, conceptually I thought classes were more for when there were attributes behind the scenes that they were managing, and modules were for when there aren't any state variables or attributes
23:59 Darren_Duncan hopefully Module.sub() syntax will work soon, since one doesn't always want to pollute the caller namespace with exports
23:59 Darren_Duncan but as I said, there is a simple workaround that I can use meanwhile
23:59 Darren_Duncan so not top priority

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

Perl 6 | Reference Documentation | Rakudo