Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-12-30

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 revdiablo I saw the gather/take examples binding to arrays, which triggers my "this thing is eager" perl5 mindeset
00:00 revdiablo I suppose that's probably not a good assumption for perl6, though
00:05 pmichaud we're still working out how laziness applies to array assignment... which is why I gave an example with a scalar :-)
00:05 revdiablo Ah, ok. But the scalar will definitely be lazy?
00:05 eric256 left #perl6
00:06 pmichaud that's kinda up to the implementation, but yes.
00:07 revdiablo Really, it's not in the spec? That seems unfortunate
00:10 Limbic_Region revdiablo: that's not the same as "specification by reference implementation"
00:11 pmichaud the degree of laziness implied by things is not (yet) part of the spec
00:12 pmichaud but there's going to be a synopsis for it (S07, I think)
00:12 revdiablo I hope it will be.  I'd like to have laziness I can rely on (is that a paradox?)
00:12 Limbic_Region and getting the right answer in the test suite is what really counts
00:12 Limbic_Region you just need to get a test that fails when it is eager ;-)
00:13 revdiablo I remember gather/take being the answer to this question years ago, so I'm pretty sure that it will continue to be... but ya never know!
00:14 cspencer rakudo: (1..1).WHAT.say
00:14 p6eval rakudo 34594: OUTPUT«Range␤»
00:14 revdiablo rakudo: (1..1).WHAT
00:14 p6eval rakudo 34594: OUTPUT«Null PMC access in get_bool()␤current instr.: 'parrot;Range;true' pc 6169 (src/classes/Range.pir:251)␤»
00:14 revdiablo Oops, I guess the .say is needed
00:15 Limbic_Region well, depends on what you want ;-)
00:15 pmichaud dinnertime here -- afk
00:16 revdiablo I was thinking of the Perl 5 evalbot from #perl, which would run Data::Dumper on the last expression's return value
00:16 revdiablo pmichaud: Thanks for the answers, ttyl
00:29 brunoV joined #perl6
00:34 alc joined #perl6
00:41 abebae joined #perl6
01:19 cognominal joined #perl6
01:19 hercynium joined #perl6
01:26 lisppaste3 joined #perl6
01:52 cspencer rakudo: my Str $s; $s.^can("+").say
01:53 p6eval rakudo 34595: OUTPUT«0␤»
01:53 cspencer rakudo: my Int $i; $i.^can("+").say
01:53 p6eval rakudo 34595: OUTPUT«0␤»
01:53 cspencer rakudo: my Int $i; $i.^can("infix:+").say
01:53 p6eval rakudo 34595: OUTPUT«0␤»
01:54 cspencer rakudo: my Int $i; $i.^can("+=").say
01:54 p6eval rakudo 34595: OUTPUT«0␤»
01:55 cspencer rakudo: Int.^can("say").say
01:55 p6eval rakudo 34595: OUTPUT«1␤»
01:55 cspencer rakudo: Int.^can("+").say
01:55 p6eval rakudo 34595: OUTPUT«0␤»
02:54 meppl joined #perl6
03:01 azawawi_ joined #perl6
03:15 cspencer joined #perl6
03:21 [bjoern] joined #perl6
03:21 [bjoern] Where would I find recent win32 builds these days? Links tend to be dead and google isn't helping...
03:29 wolverian of what?
03:29 [bjoern] Pugs
03:29 wolverian not sure if anyone upkeeps that.
03:32 meppuru joined #perl6
03:39 [bjoern] are there sourceballs somewhere at least?
03:41 silug joined #perl6
03:43 meppl good night
03:49 [bjoern] Right svn co fails for http://irclog.perlgeek.de/text.pl?channel=perl6;date=2008-11-16 some m0ld.hs file; even with the most recent svn.
03:50 [bjoern] Ah I take it there is a m0ld.hs and a M0ld.hs
03:51 [bjoern] Obviously that won't work on Win32...
03:59 [bjoern] #svn tells me there is no workaround either.
03:59 cspencer joined #perl6
04:02 elmex_ joined #perl6
04:03 [bjoern] left #perl6
04:39 alester_ joined #perl6
04:40 cataska joined #perl6
04:53 cspencer joined #perl6
04:57 lambdabot joined #perl6
05:24 alc joined #perl6
05:29 cspencer joined #perl6
05:35 cspencer joined #perl6
05:44 stephens joined #perl6
05:53 cspencer joined #perl6
05:59 Exodist joined #perl6
07:09 cspencer joined #perl6
07:35 [particle] joined #perl6
07:51 alanhaggai joined #perl6
08:14 iblechbot joined #perl6
08:21 DemoFreak joined #perl6
08:38 alech joined #perl6
08:41 alanhaggai_ joined #perl6
09:59 barney joined #perl6
10:04 duke_leto joined #perl6
10:34 tomyan joined #perl6
10:48 alech joined #perl6
10:51 masak joined #perl6
10:52 masak http://use.perl.org/~masak/journal/38184
10:57 pmurias joined #perl6
11:08 alech_ joined #perl6
11:24 ruoso joined #perl6
11:32 ruoso pmurias, have you seen the problem of M0ld.hs and m0ld.hs in svn+win32?
11:32 masak not only in svn+win32, I might add.
11:33 masak I'm on Mac OS X, and I have that problem too.
11:33 ruoso seriously? is the osx filesystem case insensitive?
11:33 masak it can be, I think.
11:33 ruoso ga
11:33 masak is that the cause of the problem?
11:33 masak that explains a lot.
11:33 Tene it is on the default install
11:34 Tene it's possible to manually set up a case-sensitive filesystem to run OS X on, but problems come up
11:34 * ruoso wonders how someone can take a good OS and turn it into such a mess
11:34 masak the first thing I do on a new Mac is usually to reformat the drive to a case-sensitive file system
11:34 pugs_svn r24683 | pmurias++ | [m0ld] renamed M0ld to M0ld/M0ld.hs as people using despicable case-insensitive OSes were having problems
11:34 masak pmichaud: thank you.
11:35 * ruoso .oO( My description of OSX: "A Unix Operating System with a `Program Files' directory" )
11:36 masak ruoso: 'Applications', but who's counting?
11:38 * ruoso .oO( FHS++ )
11:42 pmurias ruoso: do you think i could get away with using Coro instead of stealing it's black magic?
11:43 ruoso the biggest problem is that you need to "save the current coro"
11:43 ruoso and I think Coro doesn't do that today
11:44 ruoso you need to initialize a Coro
11:44 ruoso to be able to save it
11:44 * ruoso checking
11:46 ruoso pmurias, the point you need is more in Coro::State
11:52 pmurias i think i'll just have to print out Coro/State.xs and carefully understand all the hacks...
11:53 ruoso pmurias, re-reading Coro::State
11:54 ruoso you actually can take the "main" execution and treat it as if it was initialized as a Coro
11:54 ruoso my $current = Coro::State->new
11:54 ruoso but this still doesn't contain the statem,
11:54 ruoso because the state is only saved at "transfer" time
11:55 pmurias Core::State shows how to implement call/cc but it's not exactly encouraged
11:56 spx2 joined #perl6
11:56 ruoso additionally, one thing I know you're going to need is your own p5 OP
11:57 pmurias what for?
11:57 ruoso which I, for now, named PolymorphicEvalOP
11:57 ruoso to tell the p5 interpreter to run a "foreign continuation"
11:58 ruoso I think you could do it without a custom p5 by using a global variable
11:58 ruoso that would hold the "current continuation"
11:59 ruoso you would need a custom runops
11:59 ruoso (which can be made without a custom p5)
11:59 ruoso to initialize a SMOP interpreter for each p5 runops
11:59 ruoso (since p5 is not entirely stackless)
12:01 pmurias if i use Coro it'll take care of the C stack
12:01 ruoso no, it will just stop you from recursing
12:02 pmurias there is code in there for grabbing the current SP
12:02 ruoso at least Coro::State says that it takes care of that just to make sure a XS code doesn't try to callback the Perl interpreter
12:04 ruoso most of the problems for making that work with p5 is the amount of global variables you have in p5
12:05 ruoso pmurias, but I think it's probably saner to steal the "saving the current coro state" and "restoring some coro state"
12:05 ruoso and avoid the other semantics Coro provides
12:06 * ruoso later &
12:08 c9s_ joined #perl6
12:11 pdcawley joined #perl6
12:27 slavik joined #perl6
12:28 slavik kp6: say "hello";
12:28 p6eval kp6 24683: OUTPUT«hello␤»
12:29 pmurias slavik: why kp6:?
12:37 slavik ?
12:37 slavik just testing
12:47 azawawi joined #perl6
13:01 maerzhase joined #perl6
13:02 maerzhase joined #perl6
13:06 azawawi_ joined #perl6
13:21 meppl joined #perl6
13:23 pmurias joined #perl6
13:27 icwiener joined #perl6
13:39 ChrisDavaz joined #perl6
14:23 Jedai joined #perl6
14:25 pugs_svn r24684 | pmurias++ | [smop] added a Loader which loades a shared library using it's .load method and call the init(interpreter,scope) function in it
14:31 apeiron joined #perl6
14:34 lvh joined #perl6
14:52 meppuru joined #perl6
14:55 alc joined #perl6
15:03 araujo joined #perl6
15:17 eric256 joined #perl6
15:19 jhorwitz joined #perl6
15:30 vixey joined #Perl6
15:32 lvh joined #perl6
16:19 masak rakudo: say <a b c d>[3..1]
16:19 p6eval rakudo 34650: OUTPUT«abcd␤»
16:28 stephens joined #perl6
16:31 masak ah, I think I know what's going on. the null range is interpreted as a zen slice.
16:31 masak rakudo: say <a b c d>[]
16:31 p6eval rakudo 34650: OUTPUT«abcd␤»
16:39 pmichaud correct.
16:40 pmichaud #ps in 110
16:40 masak oh right, that's today.
16:40 pmichaud (oops, wrong chan)
16:40 masak thanks for the reminder :)
16:40 slavik ?
16:41 masak slavik: there's a weekly meeting about Parrot devs on #parrotsketch.
16:41 slavik oh, awesome
16:41 masak yes, they are. :)
16:42 slavik is mug throwing allowed?
16:42 masak slavik: allowed? it's a tradition since the start!
16:42 slavik :D
16:52 mberends joined #perl6
17:00 azawawi_ joined #perl6
17:10 azawawi joined #perl6
17:20 rakudo_svn r34651 | pmichaud++ | [rakudo]: spectest-progress.csv update: 264 files, 5912 passing, 0 failing
17:22 azawawi_ joined #perl6
17:30 rakudo_svn r34652 | pmichaud++ | [rakudo]:  Fix empty slice -- e.g., @a[2..1] .  Resolves RT #61842.
17:44 xinming_ joined #perl6
18:06 ruoso joined #perl6
18:13 ruoso pmurias, the loader thing is looking cool... but remember that it needs to keep track of the modules that it already loaded so you can "use" a module more than once without loading it more tha once... even because that could result in circular dependencies...
18:13 azawawi joined #perl6
18:13 pmurias i thought of layering stuff on top of it which would take care of such things
18:14 ruoso ok
18:14 ruoso fair enough
18:14 ruoso it would be cool if you had a compile-time flag telling the location of the files to load
18:15 pmurias it looks at LD_LIBRARY_PATH if supplied an filename withought a slash
18:15 ruoso I know... but this shared objects will be more a plugin
18:15 ruoso and plugins usually don't go into standard ld path
18:16 slavik how about Perl6 library path
18:16 slavik when is that getting set up?
18:16 ruoso it's more than that...
18:16 ruoso it's "Perl 6 libraries that are loadable by this plugin mechanism"
18:18 ruoso pmurias, it would be nice if we used a less-generic name for it...
18:19 ruoso but am I dreaming or this and making a custom m0ld output enough to have module loading in SMOP?
18:20 pmurias more of a custom mildew output
18:20 ruoso s/or this/or is this/
18:20 ruoso yeah... right...
18:23 pmurias you know how should Package.EXPORTALL look like?
18:23 ruoso I was just re-reading S11 for that matter ;)
18:23 ruoso it should handle the "known" tagsets
18:24 ruoso that being DEFAULT
18:24 ruoso ALL
18:24 ruoso I think that's all
18:25 ruoso then, if there's an EXPORT method
18:25 ruoso or sub
18:25 Psyche^ joined #perl6
18:25 ruoso call it with the remaining arguments
18:26 ruoso actually I think that by "known tagsets" it means all subpackages of EXPORT
18:26 pmurias i'm still unsure how should the integration with the p5 runloop look like
18:27 pmurias one thing i suppose would work would be to create a new Coro::State for each eval and subroutine/method call
18:27 frodwith joined #perl6
18:28 ruoso pmurias, the problem is that you need to save its state before callback to SMOP
18:29 ruoso because unlike SMOP, the coro state is only saved when you transfer to some other coro state
18:29 pmurias the coro would cede to the "main" coroutine
18:30 pmurias not cede ->transfer
18:31 ruoso but that needs to be made explicitly
18:31 pmurias and when the given coro was invoked again it would $Coro::main->transfer back to itself
18:31 pmurias yes
18:31 ruoso and I'm not sure you can do it from XS
18:31 ruoso (not with the current Coro::State)
18:32 pmurias why not?
18:32 ruoso because Coro::State takes track of that to avoid callbacks from XS
18:32 pmurias i could move SMOP::Object::AUTOLOAD to perl5
18:32 pmurias but that's just being desperate ;)
18:33 duke_leto joined #perl6
18:34 ruoso iirc, it should be easier to do such things by implementing new OPs
18:35 duke_leto joined #perl6
18:35 pmurias you mean overridding the method call opcode in perl5 code?
18:35 duke_leto joined #perl6
18:37 pmurias ruoso: i could try do it without using Coro but i'm not sure what should the coro state consist of
18:38 ruoso pmurias, yes, making a call on a smop object result in a new OP....
18:38 ruoso pmurias, unfortunally I'm not that familiar with Coro as well
18:42 pmurias i'll try the Coro::State way tommorow, what should the init(...) function of a smop module do?
18:45 ruoso call the main m0ld code
18:45 ruoso of that module
18:46 ruoso with the given scope
18:50 pmurias coding it...
18:50 * ruoso implementing the "module" package declarator
19:02 pugs_svn r24685 | ruoso++ | [mildew] implements the module keyword
19:06 pugs_svn r24686 | lwall++ | [STD] add non-slurpy capture param for ruoso++
19:06 ruoso :D
19:06 brunoV joined #perl6
19:10 pugs_svn r24687 | pmurias++ | [mildew] implemented -Cso which creates a shared object to be loaded in by the Loader
19:12 pmurias ruoso: is the loader what you wanted?
19:12 ruoso yes...
19:12 ruoso but I think it might be better if we use a more specific name
19:13 ruoso "Loader" is somewhat too generic, when this only loads "SMOP mildew plugin"
19:14 pmurias better name suggestion?
19:16 ruoso MildewSOLoader
19:17 pmurias changing
19:22 maerzhase joined #perl6
19:29 cspencer joined #perl6
19:32 pmurias ruoso: i'm adding $LexicalPrelude to the lexical prelude so it can be passed to the loader
19:32 ruoso pmurias, I don't think its needed
19:33 ruoso you don't want everything to be loaded into the prelude
19:33 ruoso we later can implement a proper lexical prelude loading
19:33 ruoso that will load all the desired modules inside the prelude scope
19:35 pmurias it's not mandatory to load things in the prelude
19:35 pmurias but $LexicalPrelude could be usefull
19:36 pmurias i already have it added in my working copy but i can remove it if you want
19:36 ruoso no, you can leave it there...
19:36 ruoso (is hash aware of circular references already?
19:37 pugs_svn r24688 | pmurias++ | [smop] added $LexicalPrelude to the lexical prelude, renamed Loader to MildewSOLoader
19:37 ruoso pmurias, just make sure that doesn't cause a circular reference between the lexical scope and itself
19:37 pmurias took care of it
19:37 ruoso ok
19:38 Matt-W Hello
19:39 maerzhase1 joined #perl6
20:15 pugs_svn r24689 | lwall++ | [S01] revert correction of non-mistake
20:19 pmurias ruoso: so what do we know need for use?
20:19 ruoso Package.EXPORTALL
20:19 ruoso which can be a no-op
20:19 ruoso for start
20:20 icwiener TimToady: Sorry for not asking. I somehow suspected this to be on purpose but then forgot to ask. :/
20:22 maerzhase joined #perl6
20:22 [particle] getting forgiveness is easier than getting permission
20:24 desertmax joined #perl6
20:25 pugs_svn r24690 | ruoso++ | [smop] Package.FETCH
20:25 pugs_svn r24690 | ruoso++ | [smop] add an empty $?PACKAGE in the lexical prelude (the root package?)
20:25 pugs_svn r24690 | ruoso++ | [mildew] support our declarations in packages
20:25 ruoso pmurias, hah.. we now have "our sub"
20:26 ruoso we still don't support plain 'sub'
20:26 ruoso without the scope declarator...
20:26 pmurias heh
20:26 ruoso take a look at t/our_sub.t
20:33 pmurias modules is treated as my module
20:34 ruoso currently in mildew?
20:34 ruoso in mildew they are already being registered in the outer $?PACKAGE
20:35 pmurias no sorry
20:35 pmurias looked at -Cdesugar incorrectly
20:36 ruoso I even had to register an empty $?PACKAGE in the lexical prelude
20:36 pmurias isn't it the root namespace?
20:37 ruoso yeah... much like it, yes...
20:37 ruoso except that it is lexical
20:37 ruoso not global
20:39 pmurias the lexical prelude is global
20:39 ruoso just because it is the root of all lexical scopes
20:39 pmurias so $?PACKAGE is global too
20:40 ruoso no,
20:40 ruoso it's a lexical
20:40 pmurias $?PACKAGE in the lexical prelude
20:40 ruoso conceptually, the lexical prelude is not global
20:41 ruoso because if someone redefines a variable, the outer value is no longer visible
20:43 ruoso the GLOBAL package can be a lexically defined name that points to a global value
20:43 ruoso (but I still think we don't need globals ;)
20:43 s1n joined #perl6
20:53 TimToady icwiener: no problem--here we operate on the principle that it's more efficient to ask forgiveness than permission, because you only need to ask forgiveness when you guess wrong :)
20:54 ruoso TimToady, std parses Foo::.bar() in a strange way
20:55 lambdabot joined #perl6
20:56 TimToady I expect it to parse (Foo::).bar, and it seems that that's how it's parsing it
20:56 ruoso it's returning '::' in the "morename"
20:57 ruoso maybe I need to recompile std, but Foo::.bar is not the same as (Foo::).bar
20:58 ruoso I mean, it is not compiling to the same thing
20:59 slavik how can I eval Perl6 within Perl6 code by also giving it the current context (to have the evaled code be able to see declared variables and such)
20:59 TimToady yes, morename starts with '::' but has no identifier after it
20:59 TimToady we don't currently have a :: infix
20:59 * ruoso in the meanwhile points to http://www.nntp.perl.org/group/perl.perl6.language/2008/12/msg30251.html
21:00 masak rakudo: my $a = 5; eval 'say $a'
21:00 TimToady slavik: it's supposed to have that context already, if not, it's a bug
21:00 slavik I see
21:01 p6eval rakudo 34665: RESULT«Null PMC access in find_method()␤current instr.: '_block14' pc 64 (EVAL_13:39)␤»
21:01 TimToady lunch &
21:01 * ruoso later &
21:01 * masak submits rakudobug
21:01 slavik TimToady: the idea here is to have a Perl6 application server :)
21:01 slavik rakudo: my $a = 5; eval("say $a");
21:01 p6eval rakudo 34665: OUTPUT«5␤»
21:01 slavik rakudo: my $a = 5; eval('say $a');
21:02 p6eval rakudo 34665: RESULT«Null PMC access in find_method()␤current instr.: '_block14' pc 64 (EVAL_13:39)␤»
21:02 slavik :(
21:02 slavik does perl5 do the same thing?
21:02 ruoso slavik, yes
21:03 pugs_svn r24691 | ruoso++ | [mildew] ignore morename if it doesnt have a name
21:13 slavik awesome
21:16 slavik so, can we fix that bug with eval?
21:16 slavik perl6: say "hello"
21:16 p6eval elf 24691, pugs, rakudo 34670: OUTPUT«hello␤»
21:16 cspencer joined #perl6
21:18 masak slavik: if you provide a patch for the bug with eval, I'll review it and apply it to Rakudo.
21:18 wolverian joined #perl6
21:18 slavik :-\
21:19 Grrrr joined #perl6
21:19 slavik masak: that would require me to know what I am doing
21:19 slavik which is not the case
21:19 xuser joined #perl6
21:19 masak slavik: in that case, I think you'll have to wait for someone who does to have mercy on you.
21:19 masak slavik: that, or learn. :)
21:20 [particle] or write a test.
21:20 lambdabot [particle]: You have 1 new message. '/msg lambdabot @messages' to read it.
21:20 slavik masak: I'd love to, but I am not much of a language designer beyond grammars :(
21:20 slavik [particle]: :D
21:20 masak slavik: oh, it's not about design.
21:20 slavik will try to take a look
21:20 [particle] messages
21:20 [particle] @messages
21:20 lambdabot moritz_ said 16d 1h 50m 3s ago: I've glanced over S19 and I think there should be an --encoding option to specify the encoding of the source file
21:20 [particle] @messages erase
21:20 lambdabot You don't have any new messages.
21:22 Jedai joined #perl6
21:23 eric256 joined #perl6
21:27 kidd joined #perl6
21:33 preflex joined #perl6
21:52 Whiteknight joined #perl6
22:40 justatheory joined #perl6
22:43 pugs_svn r24692 | pmichaud++ | [t/spec]:  #?rakudo skip tests involving non-existent StrPos.
22:45 pugs_svn r24693 | pmichaud++ | [t/spec]:  Correct tests for definedness in undef.t .
22:48 pmichaud t/spec/S29-list/join.t has:
22:48 pmichaud my $undefined;
22:48 pmichaud my @odd_list1 = (1, $undefined, 2, $undefined, 3);
22:48 pmichaud my $joined2e = join(':', @odd_list1);
22:48 pmichaud is($joined2e, "1::2::3", 'join(":", @odd_list1) works');
22:49 pmichaud .... what should   "my $undefined" be initialized to ?
22:56 pmichaud rakudo:  my Int $u;  say join(':', (1, $u, 2, $u, 3));
22:57 p6eval rakudo 34678: OUTPUT«1:Int:2:Int:3␤»
22:58 PerlJam isn't "my $undef" the same as "my Any $undef"?
22:58 [particle] shouldn't that .perl-ify to "Int()"
22:59 pmichaud [particle]: yes, we haven't implemented that yet.
22:59 pmichaud PerlJam:  I would think Object
23:00 pmichaud otherwise we can't do  my $u = 2 | 3;
23:00 pmichaud rvar branch is currently initializing it to Object, which is resulting in 1:Object:2:Object:3 for the above.
23:00 PerlJam makes sense.
23:00 pmichaud I'll just initialize it to undef() for now.
23:01 PerlJam (though I'm still a bit leery that Any doesn't really mean "any"  :)
23:03 pugs_svn r24694 | particle++ | elaborate on concepts in introduction, and replace 'compiler' with 'program'
23:04 [particle] oops, forgot my [S19] tag there
23:05 PerlJam git --amend  (oops, no git :)
23:15 cognominal joined #perl6
23:18 PZt joined #perl6
23:29 pugs_svn r24695 | particle++ | [S19] allow option clustering; change delimited option syntax to ++foo ... ++/foo; update notes
23:31 pugs_svn r24696 | particle++ | rename Awk service to Autoloop
23:36 hercynium joined #perl6
23:49 ruoso joined #perl6
23:53 eric256 left #perl6
23:55 pugs_svn r24697 | particle++ | [S19] update option reference, including: longnames for all options; desugaring for some options; new options (-e6, -o, -O, -T)
23:58 duke_leto left #perl6

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

Perl 6 | Reference Documentation | Rakudo