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