»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
eternaleye Wolfman2000: Okay, sounds good 00:00
00:01 pnate2 left
Wolfman2000 ...okay...I have to wonder what is being processed on my Form. I'm not even doing any validation: this is merely a check to see that POST requests go through without a hitch. It's lagging! 00:03
...or it was stopped due to C-z
00:04 meteorjay joined 00:12 kidd left
carlin Tene++: Any updates on the IO work? 00:16
pugs_svn r29028 | pmurias++ | [mildew-js] fix Scalar.new 00:19
00:21 s1n left, s1n joined 00:30 lestrrat is now known as lest_away 00:33 orafu left, oZ]1 left, orafu joined, xenoterracide left 00:36 xenoterracide joined 00:45 ihrd joined 00:46 ihrd left 00:54 pmurias_ left 00:55 reid05 left 00:56 reid05 joined 01:05 lest_away is now known as lestrrat
Wolfman2000 ...now the Catalyst people are confusing me. Bah. Who else is an expert on this? 01:20
01:32 payload left, nihiliad left, nihiliad joined
Juerd Why are the parameter names for IO::Socket and IO::Socket::INET in camelcase? 01:41
::Unix too
Wolfman2000 Juerd: *shrugs* I don't name them 01:43
jnthn Juerd: Are you looking at spec or Rakudo, out of interest? 01:44
Juerd jnthn: spec 01:45
jnthn Hmm. 01:46
Seems inconsistent.
carlin
.oO( Because S32/IO lists what *NOT* to do with IO ... )
jnthn lol 01:47
I think IO wins the award for the most bikesheded part of Perl 6.
Juerd I'm not trying to participate in any bikeshedding! 01:48
Juerd is just curious :)
I think the most bikeshedded part of Perl 6 is the syntax for "self". :) 01:49
diakopter I think the most bikeshedded part of Perl 6 is the syntax
jnthn Juerd: Oh, I wasn't criticising your comment. :-)
Juerd: I agree with you.
diakopter :P ;)
Juerd jnthn: I'm not sure I have an opinion even. What are you agreeing with :)
jnthn Juerd: In the Perl world camel case doesn't seem to be the Done Thing. 01:50
Juerd Except in namespaces
jnthn I dunno why. I prefer it personally. But I'm one of those "I don't care much what the standard is, I do care about consistently applying one" people
Juerd I've been looking for a standard for identifiers but couldn't find one for Perl 6 01:51
jnthn The "we can use hypens now" only adds to the confusion. 01:52
Wolfman2000 where's that dictionary bot someone said he was going to program? I'm not familiar with bikeshedding myself.
Juerd Hyphens are great but over-used.
carlin Wolfman2000: arguning abut the colour of the bikeshed while the house is still being built
jnthn no-no-no-no-no-YES
Juerd Wolfman2000: en.wiktionary.org/wiki/bikeshedding
carlin s/arguning/arguing/ 01:53
jnthn
.oO( probably nobody else got the Vicar of Dibly reference. eh well )
01:53 oZ] joined
Wolfman2000 Juerd: While you're here, one of the cpan modules I tried to install but failed to was File::ChangeNotify. It's one of the few modules that still hard codes installing the man files to /usr/man or whatever the common place is, and thus cpan won't install it for me. 01:53
Juerd I see 01:54
While I install it, please tell me why you need to know when files change. I'm curious :)
Wolfman2000 Juerd: One of the options for running Catalyst's development server is to have it automatically reload itself upon changing a core file. 01:55
oZ] (which is awesome.)
Wolfman2000 It beats having to kill and restart it at least.
When Web.pm becomes more popular, File::ChangeNotify can come in handy, along with Module::Refresh
Juerd Wolfman2000: Wouldn't just sending SIGHUP be a much easier way to accomplish that, not to mention leaner? 01:56
Wolfman2000 Juerd: not familiar with that operation.
Juerd Wolfman2000: Installed
Wolfman2000 Juerd++: danke 01:57
Juerd Wolfman2000: In Unix, processes are controlled using signals. For example, if you send a KILL signal to a process, it dies.
Wolfman2000 kill -9...I'm familiar with that one
01:57 nbrown left
Juerd Wolfman2000: When a child process has finished, the parent gets the CHLD signal so it can clean up after the child. 01:57
01:58 nbrown joined
oZ] Juerd: I would imagine that Catalyst server's restarting of the process is a lot cleaner and safer than attempting a full unload of modules and then reloading them. 01:58
Juerd Wolfman2000: The HUP signal, hangup, is commonly used to signal that reloading or resynchronisation is required.
Wolfman2000: For example, after I change a DNS zone file, I do killall -HUP named and named reloads its zone files.
Wolfman2000 Juerd: oZ] is my unofficial coach when the main catalyst room is either dead or dumbfounded by my questions.
Juerd: Hmm...it does sound like it has some advantages. 01:59
Juerd I don't know about Perl 6, but implementing signals in Perl 5 goes by just assigning to %SIG, like so: $SIG{HUP} = sub { ... }; 02:00
Ah, it is described in S17 02:02
CONTROL { when Error::Signal::HUP { ... } } apparently 02:03
jnthn Sleep for me...night all
oZ] G'night.
Juerd jnthn: Good idea. Good night 02:04
Juerd too &
02:05 payload joined 02:06 c9s left
Wolfman2000 ...I'm an idiot. Most form input style tags require an ID AND a name. 02:06
eternaleye: I require your assistance again. 02:09
eternaleye Wolfman2000: ? 02:11
Wolfman2000 I need a reminder on what we agreed upon when it comes to user registration. Should we allow users to effectively register themselves if they give a username unclaimed and a password that's valid? 02:12
eternaleye Wolfman2000: I think it should require actively registering, rather than autovivifying a login. 02:15
But we didn't actually discuss it.
Wolfman2000 eternaleye: I didn't recall if we discussed that point. I thank you for thinking that one should actively register. A part of me thinks getting their email address should be part of the process. 02:16
eternaleye Wolfman2000: That makes entirely too much sense ;D
Wolfman2000 eternaleye: what's wrong with that? 02:17
eternaleye Wolfman2000: It's a snarky way of saying 'Why didn't I think of that'
Wolfman2000 Noted. 02:18
While you're here...I think I know of something else that will help, but I need some confirmation. Do you have any particular favorite XML parsing module? 02:19
eternaleye Wolfman2000: Not really, I don't deal with XML much.
02:35 payload left
Wolfman2000 eternaleye: forget that I asked about XML. I'm trying to make this pastebin too complicated. 02:39
Wolfman2000 will have to learn AJAX some other time. 02:40
Homework time: If I'm lucky, I should knock out everything I need to within an hour. 02:46
02:51 Whiteknight left 03:10 Thyssen joined 03:19 scottt left, scottt_ joined 03:20 yves left
carlin Hmm, parrot/rakudo built with SunStudio leaks memory slower than if it was built with gcc 03:22
Thyssen then use Clang/LLVM 03:23
carlin Oh. Probably because it runs slower :/ 03:25
diakopter does parrot build with Clang/LLVM? 03:26
Thyssen well now's never a better time to find out 03:28
diakopter I suspect you mean now's never a worse time to find out 03:29
rakudo: rogate 03:30
p6eval rakudo 97ced1: Could not find non-existent sub rogate␤in Main (file src/gen_setting.pm, line 324)␤
carlin rakudo: marine 03:50
p6eval rakudo 97ced1: Could not find non-existent sub marine␤in Main (file src/gen_setting.pm, line 324)␤
03:57 am0c joined
Wolfman2000 ...I never thought I would struggle this much on this part of a cryptography paper 04:04
04:09 c9s joined 04:10 meppel joined 04:11 meppl left 04:14 fax left 04:30 envi^office joined 04:38 frew joined 04:46 nihiliad left 04:48 yves joined
Thyssen rakudo: abstract syntax tree 05:04
p6eval rakudo 97ced1: Could not find non-existent sub tree␤in Main (file src/gen_setting.pm, line 324)␤
05:07 markmont left
Wolfman2000 ...I'm going to need bed soon. I can't guarantee much work on the website for the next day or two due to college. Those on feather: if you know what you are doing, feel free to try to improve what I've got. 05:16
05:22 justatheory left
diakopter Wolfman2000: 'nite 05:22
05:27 KatrinaTheLamia left 05:37 oZ] left 06:03 simcop2387 left
s1n reading back 06:04
Juerd: to be perfectly clear, _any_ signal without a handler results in undefined behavior, which the default happens to be to die 06:05
06:14 frew left
carlin rakudo: say %*ENV<_> 06:18
p6eval rakudo 97ced1: ../p/bin/perl6␤
06:19 colomon left 06:23 colomon joined 06:33 [particle] joined 06:43 icwiener joined 06:47 reid05 left 06:54 simcop2387 joined 07:01 xp_prg left, hsb left, hsb joined 07:02 xp_prg joined, Thyssen left 07:03 nsh left 07:04 sunnavy left, sunnavy joined, base_16 left, base_16 joined, nsh joined 07:05 Infinoid left, Infinoid joined 07:11 kaare joined 07:18 simcop2387 left 07:21 simcop2387 joined 07:28 am0c left
moritz_ good morning 07:38
diakopter noim 07:39
07:41 envi^office left 07:42 snarkyboojum joined 07:49 envi^office joined 08:03 leedo left 08:07 leedo joined 08:16 snarkyboojum left 08:17 gfx joined 08:18 iblechbot joined 08:20 snarkyboojum joined 08:27 baest joined 08:32 Leland joined
Leland morning 08:32
08:35 Su-Shee joined 08:41 barney joined 08:47 mariuz joined 08:58 meppel left 09:04 colomon left 09:09 snarkyboojum left 09:12 am0c joined, xabbu42 left
moritz_ diakopter: btw last time I tried rakudo and parrot did build with clang/llvm... 09:24
diakopter: but I needed the --without-gmp option to parrot's Configure.pl
09:26 explorer joined
diakopter interesting 09:29
diakopter still awake, it seems 09:30
09:31 pdcawley left
diakopter rakudo-ng: say 'hi' 09:31
09:32 pdcawley joined, masak joined, diakopter sets mode: +o masak
masak good morning, #perl6. 09:32
diakopter phenny: yeah, yeah 09:33
o wait
moritz_ oh hai masak 09:34
diakopter to bed
moritz_ diakopter: good night 09:36
masak: I liked your auld way of blogging (less posts, but more substance to each of them) better than what you're doing this month 09:38
09:42 gfx left, IllvilJa left
masak frettled++ # you're a nice guy too! 09:42
09:44 envi^office left
masak frettled: you missed hugme! :/ 09:44
hugme: hug frettled
hugme hugs frettled
masak how did that happen? 09:45
frettled /o\ 09:46
hugme: hug masak
hugme hugs masak
moritz_ masak: yesterday night we also planned to move that blog post to a new page on perl6.org to make it easier to update for anybody
masak that's likely a good idea.
frettled masak: fixified 09:49
09:52 SmokeMachine left
masak frettled++ 09:53
moritz_ nqp: say('hopefully fast') 09:56
p6eval nqp: hopefully fast␤
masak phenny: tell colomon that I think Str.Str returning self is perfectly alright. (1) Liskov doesn't say it needs to be exactly a Str, just at least a Str. (2) derived classes can always override, as usual. 10:01
phenny masak: I'll pass that on when colomon is around.
frettled moritz_: Aha, so we can use it for testing nqp as well now! *fixes blog*
moritz_ frettled: pugs, rakudo, nqp, elf, mildew, std, mildew-js, sprixel (iirc) 10:02
kp6: say('hi') 10:03
frettled whoa 10:04
moritz_ I did try to make every Perl 6 compiler available through p6eval :-) 10:07
btw the nqp: target uses nqp-rx, not the old nqp
frettled okay, fixed :)
10:08 flip214 joined
flip214 Hello everybody! 10:08
frettled hello! 10:09
masak rakudo: say '412pilf elloH'.flip.say 10:10
p6eval rakudo 97ced1: Holle flip214␤1␤
masak er.
rakudo: '!412pilf elloH'.flip.say
p6eval rakudo 97ced1: Holle flip214!␤
masak *sigh*
rakudo: '!412pilf olleH'.flip.say
p6eval rakudo 97ced1: Hello flip214!␤
masak I should have used a mirror or something from the start.
flip214 thank you
Sorry if I'm being dense again, but I tried some small things in p6 ... but I've got problems again. 10:11
moritz_ wonders if p6eval not showing trailing spaces will become an issue some day
flip214 I tried to use opendir/readdir, but get "could not find non-existent sub opendir"
Now in parrot there's a DirHandle
but I'm wondering ...
masak moritz_: where did the OUTPUT«» go?
flip214 what's the general plan? 10:12
moritz_ masak: somebody patched it into oblivion
flip214 can perl6 import definitions written in parrot? constants, types, functions?
masak moritz_: yes, but why?
flip214 or do such declarations have to be duplicated?
masak moritz_: feels dangerous. in the worst case, p6eval could now trigger other bots. 10:13
flip214 I tried "use DirHandle" but that's not found ... I'll have to look why, isn't that in the parrot_install path?
moritz_ masak: probably because it's less clutter, and there's not RESULT«...» anyway
flip214: it would be use DireHandle:from<parrot>;
flip214 masak: as demonstrated two weeks ago, that can happen anyway, because p6 may do tcp sockets ...
moritz: I'll try that. 10:14
moritz_ flip214: but the master plan is to have some parrot independent directory reading facility
flip214: I'll try to restrict that with selinux in the near future
flip214 well, I'm a bit confused ...
moritz_ rakudo: use DirHandle:from<parrot>; say 'alive';
p6eval rakudo 97ced1: "load_bytecode" couldn't find file 'DirHandle.pir'␤in Main (file <unknown>, line <unknown>)␤
10:15 snarkyboojum joined
flip214 I hoped that with parrot *all* languages implemented above could use each others functions 10:15
but how should that work, exactly?
moritz_ use OtherModule :from<language>;
flip214 If perl6 should call C functions, it needs the structures, constants, etc somehow
I'd think that they'd be supplied with classes
10:16 meppl joined
flip214 but a perl6 class definition won't help a php part, or a javascript part, or a lisp part and so on 10:16
so is there some way to share lower-level declarations (from parrot)?
or do they have do be duplicated in *all* languages used above?
and the ":from<parrot>" doesn't work for me locally, too. 10:17
To be a bit more clear ...
I'm rewriting a C program.
jnthn oh hai
flip214 I'd like to do most things in P6, but the performance-sensitive parts may need parrot or C
moritz_ flip214: there are two different problems and solutions ... 10:18
flip214: for one you can ask "how can any Perl 6 program call a C functioon?"
flip214 so, until p6 can be compiled to C and re-compiled to native code, I'll need some link
moritz_ that needs a Perl 6 solution that's independent of parrot
flip214 moritz: to that I already got the answer "there the native call interface"
moritz_ and if PHP wants a solution to that problem, it also needs a native PHP solution
etc.
flip214 that's bad 10:19
moritz_ there's not much we can do about it
the second question is that of interaction of parrot-based languages
flip214 I think all languages done on parrot need some kind of "precompiler"-loading, so that such declarations can be easily shared
moritz_ that one is partially solved
flip214 without having to transform them a hundred times with swig or something like that
moritz_ aye 10:20
flip214 moritz: yes? the "interaction of parrot-based languages"? what's the plan?
moritz_ flip214: the plan is to just share the parrot objects, and call methods on them 10:21
which partially works
if you've got rakudo and cardinal installed, use RubyModule :from<cardinal>; works
but if you just want to call some PIR functions, you can also use inline PIR
flip214 so enums/constants have to be passed by name here, and are changed to ints or whatever in parrot, right? 10:22
moritz_ anyway, I'm not a cross-HLL expert; Tene or jnthn are more competent here
flip214 will make a few problems for syntax highlightning, spelling and so on, I think
they'd have to know parrot at least
So, the canonical way will be to use the DirHandle module from parrot, instead of opendir/readdir. 10:24
moritz_ masak: re dangerous, triggering other bots: as long as the prefix (rakudo $sha:) is fixed by the bot, tehre's not much danger
flip214: Perl 6 will offer a parrot-independent interface for reading directories
flip214 Is that just a short-lived problem (":from<parrot>" not working), or is that just not implemented yet?
moritz_ :from<parrot> works in principle, but there might just not be a DirHandle.pir lying around in the install dir 10:25
10:25 rgrau joined
moritz_ so needs more investigation 10:25
lunch &
10:28 Leland left
flip214 is there some easy way to get c header files parsed to get parrot NCI output and/or class definitions (for structures) 10:28
masak moritz_: sure, as long as all implementations have an $sha -- which I don't think is the case.
moritz_: otherwise, all you need is a bot called nqp or something, and... BAM. 10:29
carlin pugs: say 'do evil things' 10:31
p6eval pugs: do evil things␤
masak pugs: 'no output' 10:34
p6eval pugs: ( no output )
10:54 icwiener left, payload joined
carlin gist.github.com/229871 # because lolsql just wasn't enough 10:58
masak :) 11:03
jnthn OMGWTFAWESOME! 11:06
I can haz replaicement for my failshell now!
11:07 IllvilJa joined
masak IllvilJa: greetings, malice. 11:10
jnthn
.oO( I learn all the best Swedish words )
11:13
masak jnthn: this one is very easy. ill-vilja. ill will. 11:14
jnthn Yeah
Clear related root.
moritz_ carlin: awesome, please blog about it
masak lunch & 11:15
moritz_ carlin: two minor comments 1) there's a prompt() builtin
11:15 pnate left
jnthn Almost as if Nordic languages at some point in history had an influence on English. ;-) 11:15
moritz_ carlin: 2) sub translate would benefit from a hash :-)
11:20 pdcawley_ joined 11:21 scottt_ left 11:28 envi^home joined 11:30 lestrrat is now known as lest_away
eternaleye 3.) Maybe returning $input as the default, so that non-LOL commands can be executed 11:31
11:36 pdcawley left, pdcawley_ is now known as pdcawley, SmokeMachine joined
moritz_ eternaleye: but... that wouldn't be funny at all :-) 11:46
masak: the solution is not to have a bot called 'pugs' :-) 11:47
the universally accepted solution is to make all bots reply by cpct (or whatever that thing is called) and not by normal message 11:49
but I kinda don't like that
11:50 _eMaX_ left 11:51 _eMaX_1 joined 12:01 xabbu42 joined
IllvilJa Hello folks! 12:02
12:04 colomon joined
moritz_ hello folk! 12:04
erm... :-)
colomon hello! 12:06
phenny colomon: 10:01Z <masak> tell colomon that I think Str.Str returning self is perfectly alright. (1) Liskov doesn't say it needs to be exactly a Str, just at least a Str. (2) derived classes can always override, as usual.
colomon glad he agrees! :) 12:07
carlin moritz_: Ohh, I didn't know about prompt(), cool
and yes, a hash would be better there
12:08 iblechbot left 12:09 reid05 joined 12:11 frettled left, gfx joined
masak moritz_: I'm just trying to think ahead, so that we don't accidentally design bots to trigger each other. that's why I liked OUTPUT«» 12:17
moritz_ masak: maybe a compromise would be in order, for example just «…» without the OUTPUT prefix 12:19
masak worksforme. 12:20
moritz_ less visual clutter, but more botinteractionsafety
masak nod.
jnthn starts working on his awesome new IRC bot, "OUTPUT" 12:21
masak *lol*
12:28 payload left 12:30 KatrinaTheLamia joined, lest_away is now known as lestrrat 12:32 frettled joined, flip214 left
dalek kudo: 929998c | (Solomon Foster)++ | src/setting/Str.pm:
Remove cautious comment now that #perl6 has confirmed what I did.
12:46
12:52 gfx left 13:06 takadonet joined
takadonet morning all 13:06
colomon \o
Is there a perl 5 equivalent for slurp? 13:09
moritz_ File::Slurp 13:10
colomon danke
moritz_ or do { open my $Handle, '<', $filename or die $!; local $/; <$Handle> }
pmichaud good morning, #perl6
moritz_ good morning pmichaud 13:11
colomon o/
masak morning, pmichaud.
jnthn hi pmichaud 13:12
13:16 hugme left, hugme joined
pmichaud is looking forward to a full day of productive hacking. 13:16
jnthn \o/ 13:17
pmichaud: Will join the ng hacking in ~ 1 hour.
pmichaud: Just getting my @other-task for the day out of the way first, then the rest of the day is clear for Rakudo. :-)
pmichaud it'll probably be close to an hour before I'm fully into it also
jnthn Ah, good timing.
pmichaud have to get kids to school and house ready for housekeeping
moritz_ hugme: twit rakudoperl rakudo committers can now twitter over the rakudoperl account via IRC! 13:18
hugme hugs moritz_; tweet delivered
pmichaud can the command be "tweet" instead of "twit"? 13:19
moritz_ sure
jnthn lol 13:20
13:21 hugme left, hugme joined, moritz_ sets mode: +v hugme
moritz_ hugme: help 13:21
hugme moritz_: (add $who to $project | list projects | show $project | hug $nickname | twit $twittername $message )
moritz_ ouch
13:21 hugme left, fax joined, hugme joined
moritz_ hugme: help 13:21
hugme moritz_: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
13:22 moritz_ sets mode: +v hugme
moritz_ better 13:22
masak how does the last command work? what does it do, more exactly?
moritz_ masak: it relays the message to twitter 13:23
masak yes, but how? to what account?
moritz_ twitter.com/rakudoperl/status/5558208699
with Net::Twitter::Lite, do the account you give as second parameter
currently hugme knows about hugme_test and rakudoper 13:24
*rakudoperl
masak ah. so hugme must know about the account. now I see how it works.
jnthn wonders if "twit" is slong in American English too :-)
*slang
pmichaud it is slang, yes
jnthn :-)
In BE too. :-)
moritz_ masak: just like with the github repos: it needs to learn about them before it can manipulate them
masak jnthn: that's probably why the verb isn't 'twit', but 'tweet' :) 13:25
moritz_: yes, that makes sense.
jnthn masak: It'd be far funnier if it was twit though. :-)
13:26 pnate joined 13:37 payload joined
masak jnthn: indubitably. :) 13:38
jnthn masak: gah, I had to go look in the dictionary to check that was a real word. :-P 13:39
masak jnthn: "a weak or thin place in yarn caused by uneven spinning" :P 13:41
13:42 Thyssen joined, payload left, payload joined
dalek ok: bf74ba8 | moritz++ | src/basics.pod:
grammar improvement by snarkyboojum++
13:45
ok: a8c0d89 | masak++ | src/basics.pod:
[basics] minor changes in the first paragraph
ok: 5c8417a | moritz++ | src/basics.pod:
[basics] hopefully clarify a sentence for snarkyboojum++
Wolfman2000 *yawn* morning 13:47
takadonet Wolfman2000: morning 13:48
13:53 pmurias joined 13:56 alexba joined
masak Wolfman2000: \o 13:57
13:57 alexba left 13:58 jaffa8 joined 14:01 Chillance left
Wolfman2000 Leaving for college in a few hours...unsure how much I can do today. 14:01
14:02 pdcawley_ joined
masak there's always things to do! 14:03
Wolfman2000 masak: I mean in terms of how much time I can do stuff. 14:04
My main project for now is working on the pastebin
masak you could triage RT tickets, or write a test, or review someone's module...
Wolfman2000 However, my classes last until evening tonight.
Hopefully that makes more sense to you 14:05
dalek ok: d6be394 | snarkyboojum++ | src/basics.pod:
Minor grammatical changes
14:09 pdcawley left, pdcawley_ is now known as pdcawley, Thyssen left 14:12 pnate left 14:15 pnate joined, NorwayGeek joined 14:25 payload left, payload joined 14:26 NorwayGeek left, NorwayGeek joined 14:27 pnate2 joined 14:34 hirschnase joined, hirschnase left 14:40 kaare left 14:43 snarkyboojum left 14:44 pnate left 14:51 zaslon left 14:52 _eMaX_1 left, alester left, zaslon joined, mdxi joined 14:53 alester joined
zaslon lolcarlinhazblogged! carlin++ 'i maeked u a shell': theintersect.org/2009/i-maeked-u-a-shell/ 14:55
jnthn ...but I eated it? 14:58
masak :) 14:59
14:59 PacoLinux joined
moritz_ carlin++ indeed 15:00
15:00 pmurias_ joined 15:01 pmurias left, pmurias_ is now known as pmurias
jnthn pmichaud: huh? <DECL=variable_declarator=variable_declarator> 15:02
wtf?
Why not just <DECL=variable_declarator> 15:03
moritz_ do you use the variable_declarator capture anywhere?
jnthn method scoped($/) { make $<DECL>.ast; 15:04
masak jnthn: because one wants a variable variable_declarator somewhere?
jnthn }
masak wow, the json.org front page truly is pretty. www.json.org/
in terms of clarifying the standard, I mean.
moritz_ jnthn: maybe something accesssess a subcapture of $<scoped>?
jnthn maybe 15:05
just looks...odd.
15:05 nihiliad joined
pmichaud jnthn: in order to keep the parse tree consistent with what STD.pm produces, I want to capture to $<variable_declarator> 15:08
jnthn pmichaud: Hmm...ok.
We diverged from STD by adding the <DECL=...> but anyways...
Guess it doesn't matter so much. 15:09
pmichaud well, the alternative is something like
jnthn Just looks kinda ugly repeating it, that's all.
pmichaud <variable_declarator> { $<DECL> := $<variable_declarator> }
which is effectively the same thing
jnthn I look at it and think "plz say there's a cleaner way"
pmichaud not yet there isn't
jnthn OK. The repetition just looks like a wart in a sea of beauty. :-) 15:10
[particle] do warts float?
pmichaud well, if you'd prefer that we do the many checks inside the method for now, we can do that
pugs_svn r29029 | pmurias++ | [mildew-js] grep,map,:(int,int) variants for -,+,<,==
pmichaud I figured that just processing $<DECL> was easier
jnthn pmichaud: No, I'm not that bothered, and I agree with making the action method more concise.
pugs_svn r29030 | pmurias++ | [re-mildew] remove leftover code
r29031 | pmurias++ | [mildew-js] fix typos in TESTS-js, attributes in knowhows
r29032 | pmurias++ | [mildew-js] add passing tests to TESTS-js
pmurias @seen ruoso
lambdabot Unknown command, try @list
pmurias @list
lambdabot code.haskell.org/lambdabot/COMMANDS
masak [particle]: depends how bit they are. :)
s/bit/big/
pmurias seen ruso
seen ruoso 15:11
pmichaud maybe S05 will come up with a cleaner syntax
jnthn pmichaud: It just feels like we're missing a way of saying "alias the thing as this" without repeating the original name again.
masak lambdabot: somehow, you grow less useful every day.
jnthn Yeah.
masak lambdabot: it's as if you _want_ us to reinvent you in Perl 6.
jnthn I'm hacking on augment at the moment.
pmichaud okay, excellent. I'm working on getting 'use' semantics correct.
jnthn You breaking it up into the...whatever the bits are called these days? :-) 15:12
pmichaud partially that, but also just getting the load semantics correct
jnthn *nod*
Lexical importation?
pmichaud since we have to deal with run from interpreter / run from command line / accessed via load_bytecode
masak jnthn: let me see if I get this straight. you say <a> and you get $<a>. you say <b=a> and you get $<b>, but not $<a>. so you have to say <b=a=a> to get both $<a> and $<b>. correct?
jnthn Yeah, that's a bit of "fun".
masak: Right. 15:13
masak jnthn: I'm not sure I'm so bothered by that.
jnthn: it's very explicit.
moritz_ if the name is just a, it doesn't bother me :-)
pmichaud masak: it just looks ugly when a is "variable_declarator"
jnthn moritz_: Yeah, I was thinking that. :-)
masak pmichaud: I guess. :)
pmurias @girl19
lambdabot I'm in Moscow, Russia
pmichaud <DECL=variable_declarator=variable_declarator>
masak pmurias: :) 15:14
jnthn @girl42
lambdabot I have been into not actually hacking, but social engineering
moritz_ @girl23
lambdabot I've always found myself unequal to the intellectual pressure of programming
jnthn @girl69
lambdabot am I supposed to be frantic with terror and anxiety?
jnthn YES.
...these are creepy.
@girl100
lambdabot I have stolen about 50 msn and yahoo accounts
jnthn ...ok, she's cute. 15:15
masak lambdabot: I'm not sure if you funny or just politically incorrect.
15:15 xinming_ joined
jnthn lambdabot: srsly, what? :-) 15:15
masak s/you/you're/
moritz_ @boy50
lambdabot Unknown command, try @list
masak goes to read source
15:16 KyleHa joined 15:19 xinming left
masak far as I can tell, those quotes are from an actual "Girl 19, Apr 11, 2006". that actually makes it funny again. :) 15:19
jnthn :-)
masak @protontorpedo 15:20
lambdabot is haskella lisp?
masak (another IRC user apparently full of quotes)
moritz_ @haskella
lambdabot Unknown command, try @list
jnthn @protontorpedo
lambdabot why haskell over say clsip or smalltalk?
jnthn Because it's harder for people to understand your code, so there's less change of it being illegally appropriated. 15:21
Wow, you could have a quiz with this thing. :-)
masak "Haskell is easy. I've learned it several times!"
-- @TimToady
jnthn: imagine a channel full of protontorpedoes. that's what yesterday on #perl on magnet felt like. :) 15:22
jnthn masak: Well, it just so happens that we've a bot that can recreate it here, if you'd like... ;-) 15:23
masak they are wonderful people, but they can't think straight, or argue fairly.
jnthn: that'd be... cathartic.
15:24 Psyche^ joined
masak it could say things like "*yawn* wake me up when you release a production-ready Perl 6 1.0" 15:24
or "Perl 6 is dead!"
or "Do you have DBI?"
IllvilJa Just for kicks, I checked if the gentoo distribution did have 'parrot' available and yes it did. 15:25
masak \o/
baby steps.
IllvilJa Unfortunately, neither rakudo, perl6 or pugs seemed to show up when doing a 'emerge --search'... 15:26
Wolfman2000 @list
lambdabot code.haskell.org/lambdabot/COMMANDS
15:26 xabbu42 left
Wolfman2000 @help 15:26
lambdabot help <command>. Ask for help for <command>. Try 'list' for all commands
IllvilJa So I'm patiently awaiting when rakudo reaches a stage when gentoo maintainers start to create packages for it...
moritz_ packages.debian.org/experimental/rakudo
Wolfman2000 Perhaps the help stuff should be /noticed to us? 15:27
IllvilJa moritz_: thanks
Wolfman2000 @help more
lambdabot @more. Return more output from the bot buffer.
Wolfman2000 I'll mess with it later. I need to get ready to head out to college.
moritz_ note the platforms it compiles on. Whoa.
Juerd Warning: This package is from the experimental distribution. That means it is likely unstable or buggy, and it may even cause data loss. 15:28
Yay!
Juerd deletes all feather backups and removes the cronjob
IllvilJa Hm... s390, isn't that some IBM mainframe OS? Cool to have Rakudo on that :-).
15:30 Patterner left, Psyche^ is now known as Patterner 15:33 base_16 left 15:36 pnate2 left
jnthn gist.github.com/230037 # yay, we can haz augment! 15:38
15:38 pnate2 joined
masak jnthn++ 15:39
KyleHa rakudo: sub 0 { say 'zero' }; 0();
p6eval rakudo 929998: Malformed routine definition at line 2, near "0 { say 'z"␤in Main (file <unknown>, line <unknown>)␤
jnthn pmichaud: augment pushed.
pmichaud jnthn++ thanks, that'll be a big help for us in ng
oh, and in fixing the 'use' semantics, I think I'm also going to get a working REPL :) 15:40
jnthn \o/
Great work!
masak I meant to write '\o/', but I find that too week for the occasion.
jnthn OK, now I need to take on lexical multis I guess.
masak \O/
pmichaud might take a day or two for all the pieces to land, but it'll be another critical task off our list
jnthn For use, or for the repl? 15:41
pmichaud the repl
use I'm hoping to do today -- needed for spectests
jnthn Yes, thus why I was asking. :-)
pmichaud s/hoping/expecting
15:41 payload left
pmichaud I think the only big pieces left are 'use' and 'try' 15:41
and 'try' isn't all that big
jnthn OK 15:42
moritz_ jnthn++
jnthn I'm going to take on package scoped subs and multis now.
And probably try and do multi-methods into it all. 15:43
After that, is export should get trivial.
pmichaud that will help a bunch also 15:45
moritz_ wonders if for-loops will run, now that lists are lazy...
pmichaud we haven't implemented for yet
but really I just expect 'for' to call 'map' 15:46
moritz_ currently map is implemented in terms of for :-)
pmichaud we will probably have to switch that, then :)
moritz_ well, one of them will have to use the iterator API under the hood 15:48
pmichaud sure, no problem
it can easily go either way for now
PCT's 'for' construct is always eager at the moment 15:49
15:49 payload joined
pmichaud so even if the list is lazy, the for loop will run to exhaustion (or until 'last') 15:49
moritz_ the question is: if you do 'for $variable { ... }', and $variable overrides the .map method, does that change the semantics of the 'for' loop?
pmichaud no
because the translation is
list($variable).map( { ... } ) 15:50
$variable's .map method (if any) doesn't enter the picture at all
moritz_ ok
good to know
15:50 pnate joined
KyleHa rakudo: class M { multi d( Any $x ) { say 'any' }; }; M.new.d(1.2); 15:51
p6eval rakudo 929998: ( no output )
KyleHa rakudo: class M { multi d( Any $x ) { say 'any' }; }; M.new.d(1.2); say 'done'; 15:52
p6eval rakudo 929998: ( no output )
moritz_ who removed the TIME_OUT output?
that was useful.
rakudo: sleep 20;
p6eval rakudo 929998: ( no output )
moritz_ rakudo: sleep 20; say 3
p6eval rakudo 929998: ( no output ) 15:53
KyleHa Method 'd' not found for invocant of class 'M'. What am I doing wrong?
moritz_ KyleHa: 'multi' is a sub, not a method
KyleHa Oh. I have to say 'multi method' ? 15:54
moritz_ yes
KyleHa I am thus enlightened. Thank you!
moritz_ wonders if a 'multi' without a 'method' or 'sub' after it should be a warning inside a class :-)
Wolfman2000 moritz_: make it so 15:56
jnthn++: Can't say I'm familiar with augments, but nice going. 15:57
moritz_ waits for a comment from TimToady
I just remember that s1n was confused about that a while back
(iirc, maybe it was somebody else, not quite sure...)
jnthn pmichaud: ping 15:59
Wolfman2000 Off to college now. Slight chance I can come back on in between classes, but...no guarantees. If I'm lucky, I'll be done with everything by 8 PM EST
pmichaud jnthn: pong
15:59 Wolfman2000 left
jnthn pmichaud: Is there a compile-time place to store "our" scoped things? 16:00
That is, info about them.
pmichaud I've been thinking there should be
jnthn I'm just looking at the our thing and thinking "hmm"
pmichaud and you definitely mean 'our' scoped and not unit scoped, yes? 16:01
16:01 pnate2 left
jnthn Good question. 16:01
pmichaud I mean, an 'our' scoped thingy would seem to go in @PACKAGES[0]
jnthn I'm meaning things that belong in packages.
Yeah, good point.
pmichaud ...except that @PACKAGES are no longer PAST::Block.
jnthn :-)
They could still be made easy enough to support .symbol 16:02
pmichaud I'd say either make P:C:Package a subclass of PAST::Block
jnthn Yeah - that could work out quite nicely.
pmichaud or switch @PACKAGES to hold Blocks and have a reference to the package object
anyway, you catch the idea :) 16:03
jnthn I think I prefer the inheritance option.
OK, that gives me a neat solution.
pmichaud or make sure that P:C:Package has a reference to its corresponding PAST::Block
I see lots of possibilities, so whichever feels rightish to you is fine
jnthn Well, we create it before we have a PAST::Block made.
pmichaud hmmmm 16:04
good point
thinking
jnthn Anyway, if it isa PAST::Block we've no problem I guess.
pmichaud reviewing STD.pm
actually, you do have a problem
because the <.newpad> will come along and create another
jnthn Is that a problem if we're only doing the inheritance to make use of .symbol?
pmichaud I'd prefer to keep the blocks properly nested 16:05
jnthn Perl6::Compiler::Package disappears in the final PAST tree.
pmichaud essentially the package ends up interposing an extra block
jnthn It's .finish method hands back the $<block>, with various bits done to its loadinit as appropraite.
pmichaud it still feels wrongish to me
jnthn So the Perl6::Compiler::Package does actually appear in the final tree.
pmichaud we shouldn't end up with nested blocks that way 16:06
jnthn erm
*doesn't*
Right.
16:06 meppl left
jnthn We won't. :-) 16:06
lisppaste3 KyleHa pasted "is this tested somewhere?" at paste.lisp.org/display/90040
pmichaud I'm not sure we should have them even in the intermediate processing (more)
KyleHa moritz_: That one's for you.
pmichaud it feels like the way we were having <signature> create blocks that would then be sometimes thrown away 16:07
jnthn Well, that argues for Perl6::Compiler::Package to not be a block.
japhb I find myself needing globals in Plumage, now that I'm working on breaking a lot of code out into classes and modules -- but still want access to the VM, the user's CONF, etc. What are my options for doing that in nqp-rx?
pmichaud japhb: I'm not entirely certain how I want to do those yet 16:08
I'd like NQP to be able to provide $*ARGS and $*VM contextuals.... just figuring out how to do it
also can't decide if those should be native to NQP or if they should come from loading an external library
japhb Is the problem that nqp-rx doesn't support contextuals yet, or that you don't know how you want to go about initializing them? 16:09
pmichaud nqp supports contextuals.
I don't know how I want to initialize them.
or what should be doing the initialization
japhb Because I'm happy to do the initializing work ... remember, I've got this big mash of PIR code called Glue.pir. ;-)
16:10 payload left
japhb How do I instantiate one from PIR? 16:10
16:10 payload1 joined
pmichaud my @*ARGS := ...code to get args... 16:10
my %*VM; %*VM<config> := ...code to get config...
japhb contextuals are my, not our? Hmmm, I'm out of touch, I guess. 16:11
pmichaud generally "my", yes.
japhb I was hoping to just create them all directly in Glue.pir's :init, so that the calling code just had the variables *there*, and didn't have to write both NQP-side and PIR-side code to accomplish that. 16:12
pmichaud well, doing contextuals in Glue.pir isn't likely to work out 16:13
oh, I take that back
one could do
my @*ARGS; my %*VM;
and then Glue.pir can fill those in
frettled pointme: mubot
pointme carlins's mubot is at github.com/carlins/mubot/
diakopter moritz_: sorry; I removed it (TIMEOUT) but neglected to put it back.. I can if you like
16:13 diakopter sets mode: +o frettled, diakopter sets mode: +v pointme, diakopter sets mode: +o japhb
pmichaud something has to create the @*ARGS and %*VM variables, though. 16:14
japhb pmichaud, that's essentially what I'm doing now, with the old code carried over from NQP. 'our %VM;', and then Glue.pir does the rest.
pmichaud japhb: sure, but "our" is a package scoped variable
the advantage of a contextual is that it only has to be declared once on the outside
while "our" requires declaration in every module that uses it 16:15
japhb pmichaud, I'd like to click on that. What exactly do you mean by 'create ... the variables'? Am I, as with old NQP, essentially telling the compiler how to find the variable that I created in PIR space?
pmichaud, 'on the outside'?
pmichaud in nqp, contextuals are just dynamically-scoped lexicals 16:16
PerlJam japhb: in the outter most scope in which you need to use it
pmichaud so something has to declare a lexical that allows the called functions to see it
japhb PerlJam, OK ... so I don't need to create a 'setting' and arrange to run it, I can just declare them in my main program, and then all modules called by the main program will be able to see them?
pmichaud you can declare them in your main program, and then one of your called functions can take care of initializing them 16:17
(because a called function can see them)
japhb pmichaud, right, perfect.
diakopter moritz_: b/c sometimes things were timing out on p6eval that don't from a shell, so I was starting to diagnose 16:18
japhb In PIR, how do I refer to (get and set) a contextual?
pmichaud $P0 = find_dynamic_lex '@*ARGS'
set_dynamic_lex '@*ARGS', $P1
oops
store, not set
store_dynamic_lex '@*ARGS', $P1
japhb pmichaud, OK, excellent, thank you!
pmichaud++ PerlJam++
pmichaud, and thank you for adding closure interpolation, too. 16:19
pmichaud jnthn: I don't have a clear answer for the package stuff yet 16:20
inheriting from PAST::Block just to get the .symbol method seems wrong
japhb I think I also saw that pointy blocks went in. So if I write a 'module Hash { method kv () {...} }', I can haz 'for %blah.kv -> $k, $v { ... }' now?
pmichaud japhb: I _think_ so... I'm not sure that I finished pointy blocks. If I updated the wiki to say they're done then I'm done with them for now. 16:21
16:21 [particle]1 joined
pmichaud (and yes, what you wrote should then work) 16:21
jnthn pmichaud: Yeah. I odn't have a better answer for now (other that implementing .symbol in package) 16:22
If only there was a mechanism whereby you could share functionality between classes.
pmichaud jnthn: what do you need to store in the package?
jnthn Oh, wait... :-)
japhb pmichaud, OK, I'll give them a try in a bit.
jnthn pmichaud: The main utility is being able to make multi stuff a bit easier to handle, e.g. if we have a sequence of them, or if we have a proto.
pmichaud: If we have .sybmol on the package too, then it's trivial to make this all just fall out neatly. 16:23
(I've just written most of what I think will work.)
(And it was hardly any additions at all.)
pmichaud For a variety of reasons, I'd really like to find a way for us to tie the PAST::Block for the package to it's P::C::Package object.
either by merging them together somehow, or otherwise establishing a reference between the two.
if that gets done, then it's pretty easy to use the .symbol of the PAST::Block 16:24
jnthn The easy way is for .newpad to check if @PACKAGE[0] doesn't have a block set.
And if so, just associate the one it creates with that. 16:25
pmichaud that would work well for me.
jnthn Would that work?
OK.
pmichaud I think I'd like that a lot.
jnthn As an attribute with accessor, I guess, rather than a $node<block> :-)
pmichaud ultimately, though....
TimToady masak: you misspelled "bloodbath" as "bloodbatch"
pmichaud we really probably want to get rid of @BLOCK altogether anyway, and create a chain
same with @PACKAGES 16:26
...masakpost?
TimToady use.perl.org/~masak/journal/39864?from=rss 16:27
jnthn pmichaud: Perhaps, yeah.
masak TimToady: thanks. fixing.
pmichaud jnthn: anyway, go with the <.newpad> fix for now
the rest is easy to fix
(if we decide to change)
masak fixed. TimToady++ 16:28
jnthn pmichaud: OK, going for it. :-)
masak I was dead tired yesterday, after playing with sleep a bit.
fax me too -_-
KyleHa I thought "bloodbatch" was some kind of medical supplies event I hadn't heard of. 16:33
TimToady masak: and on the positive side, thanks for the P6INP meme blog... "Cheezburgrz 4 teh kittehs dat sez shhhhh!, Ceiling Cat is liek "u mai kittehs." 16:34
16:34 Wolfman2000 joined
masak TimToady: :) 16:34
Wolfman2000 ...huh. Guess the @ was temporary. That's fine.
16:38 [particle] left
masak TimToady: aye. peacemakers. I believe that's the way too. 16:39
16:39 hudnix joined
masak frankly, I wasn't entirely prepared for the general lack of friendliness on the part of #perl. it's like we slighted them in some way. 16:39
pmichaud tbh, I find the python community more accepting than #perl :-) 16:40
pmurias masak: #perl on irc.perl.org?
masak on the bright side, I think a bunch will come around come April.
TimToady they're hard on the noobs too
PerlJam #perl has almost never been a friendly place. 16:41
masak pmurias: well, here's the funny thing: that's where emma asked her question, but the heated discussions yesterday took place on freenode.
KyleHa If $x ~~ Array, then $x[0] is the first element of it, right? I'm surprised that 'say $x[0].WHAT' says nothing.
Wolfman2000 PerlJam: Which #perl room?
masak pmurias: oh, sorry. the other way around.
PerlJam Wolfman2000: *all* of them. freenode #perl is as close as any have come to being friendly. 16:42
Wolfman2000 ...hard for me to argue that one.
japhb nqp: class Foo { method say_foo () { say($*FOO); } }; class Bar { my $*FOO := "foo"; method do_it () { my $foo := Foo.new; $foo.say_foo; } }; my $bar := Bar.new; $bar.do_it;
p6eval nqp: Contextual $*FOO not found␤current instr.: 'parrot;Foo;say_foo' pc 119 (EVAL_1:47)␤
japhb pmichaud, what is wrong with that? 16:43
pmichaud there's no $*FOO in context when you call do_it
note that contextuals only search the caller chain
class Bar { ... } is not a caller of method do_it
japhb So they don't do a full lexical search from each caller, just check *directly* in the caller's lexical pad at each caller? 16:44
pmichaud correct
16:44 pdcawley_ joined
japhb pmichaud, OK, thank you. 16:44
TimToady one can't always be a peacemaker, alas, when you run into an entrenched priesthood 16:46
16:46 pmurias_ joined
TimToady "woe 2 u, teachers ov teh law an fariseez, u hypocritez! U shut teh door ov teh kingdom ov heaven in peeps facez. U yourselvez do not entr, nor will u let dose entr hoo r tryin 2. 16:46
PerlJam especially when the priests carry swords and rapiers and other such implements 16:47
16:47 pmurias left
TimToady ...u blind guidez! U strain out gnat but swallow camel. :) 16:47
16:47 pmurias_ is now known as pmurias, yahooooo left
arnsholt PerlJam: "Noone likes armed missionaries." - Robespierre =) 16:47
16:48 yahooooo joined
frettled camel? 16:48
Patterner "that's why it is important to shoot missionaries on sight" - Pratchett
pmichaud I'm disappearing for a bit to focus on 'use'... bbl
PerlJam arnsholt: yeah, except it's kind of backwards. There are no armed perl missionaries. But when you go to their temple, watch out how you pray!
16:58 justatheory joined 16:59 pdcawley left, pdcawley_ is now known as pdcawley
KyleHa Or perhaps, when you go to their temple, say your prayers. 17:01
17:03 TopoMorto joined 17:04 TopoMorto left
pmurias perl6: say (say 3).perl 17:04
p6eval pugs, rakudo 929998: 3␤Bool::True␤
..elf 29032: 3␤1␤
17:05 TopoMorto joined
pmurias rakudo: say (say 3) 17:05
p6eval rakudo 929998: 3␤1␤
pmurias rakudo,pugs: say (say 3)
Wolfman2000 pmurias: don't think you can select two at once like that
pugs_svn r29033 | pmurias++ | [mildew-js] say returns True 17:06
pmurias Wolfman2000: wasn't expecting it to work but it would be nice if it did 17:07
17:08 am0c left
Wolfman2000 Hmm...slightly off topic, but anyone know of a good online obfuscator for Perl? I think I have found a good use for one. 17:09
17:10 cdarroch joined
KyleHa An automated obfuscator? No. For a one off snippet here or there, I might ask perlmonks.org to obfuscate it. Or just ask, "how can I make this shorter?" 17:11
Wolfman2000 KyleHa: Don't necessarily need it to be shorter.
But...I guess I can use an offline one, provided I can find one that doesn't just print \x4b all the time.
17:13 payload1 left
KyleHa What's your real goal? Why obfuscate? 17:13
Wolfman2000 KyleHa: I want to have an error message page...with one of the messages being something written in obfuscated perl. 17:14
KyleHa If it were me, I'd study the encoding in this node and use it: perlmonks.org/?node_id=683469 17:16
zaslon lolmasakhazblogged! masak++ 'November 9 2009 -- stuff comes tumbling down, yay!': use.perl.org/~masak/journal/39866?from=rss
KyleHa Or maybe this is closer to what you want: search.cpan.org/~asavige/Acme-EyeDr...yeDrops.pm 17:18
17:18 xabbu42 joined
Wolfman2000 KyleHa: I don't need...that much. 17:19
This is meant to go on a web page. I can't have that much room for art.
17:20 envi^home left
japhb pmichaud, I think I've tripped over a gotcha with the contextuals ... As far as I can figure it, load_bytecode does qualify as a call, so :init subs within the bytecode being loaded cannot see the contextuals defined in the code doing the loading. 17:23
er, does *not*
masak swimming &
eiro pointme, mubot
hello all :)
pointme: mubot 17:24
pointme carlins's mubot is at github.com/carlins/mubot/
jnthn Arrgh!! 17:27
pmurias which bot can handle seen?
jnthn sighs a Parrot
moritz_ lambdabot used to
jnthn *at
17:28 Wolfman2000 left, Thyssen joined
moritz_ pmurias: irclog.perlgeek.de/search.pl?channe...oso&q= 17:29
pugs_svn r29034 | kyle++ | [t/spec] Some testing based on r27045 17:30
17:32 SmokeMachine left
pugs_svn r29035 | lwall++ | [STD] make module A {} disable module B; for pmichaud++ 17:36
japhb Do proper Perl 6 contextuals work analogously to the way pmichaud described them working in NQP-rx above? 17:37
i.e., they must be declared as lexicals in the outermost dynamic scope?
IIUC, this means that modules can't declare new contextuals. They can *initialize* them, but not *declare* them. 17:38
moritz_ I think any outer dynamic scope is fine
TimToady if $*foo is not defined somewhere in an outer dynamic scope, it's undefined as an rvalue
but yes, any scope as outermost is fine 17:39
note that a module can export to a lexical scope too
jnthn japhb: I guess a module wanting to declare a contextual may be able to export it.
japhb And they can't even initialize them without an explicit init() call, since the act of loading another module does not "call" it, at least in NQP ... I dunno about Perl 6.
TimToady, ah! That's the bit I'm missing
17:39 jaffa8 left 17:40 jaffa8 joined
japhb OK, so hmm, how would this work ...? I guess a module wanting to make new contextuals available in the code that loaded it *without* forcing the loader to do any extra boilerpolate would have to 1) declare the contextuals as lexicals at the module's outermost scope. 2) either initialize them in the outermost scope, or call an initialization routine from the module's mainline code, 3) export the contextuals into the loader's lexical pad. 17:45
Am I more or less on trac here?
er track
KyleHa My eyes glaze over trying to understand multiple dispatch. 17:47
moritz_ KyleHa: have you read the multi dispatch chapter in the new book? 17:48
KyleHa No, but that's not a bad idea.
moritz_ github.com/perl6/book/blob/master/s...spatch.pod 17:49
KyleHa I'm looking at r27045 and the paragraph in S12 that says "multi-method tiebreaking only happens within a given class" and wondering how to test that.
moritz_ through inheritance
or multiple inheritance 17:50
KyleHa Ah. I thought it was talking about multi methods vs. multi subs.
17:50 xp_prg left
KyleHa Inherited methods is another ball of goo. 17:50
japhb OK, *assuming* I'm on track about the contextuals, how do I actually go about exporting the contextuals? (Answers in all(< perl6 nqp-rx pir >) much appreciated -- I'll end up at various times doing it in all three. :-) 17:51
moritz_ class A { method a(Int $x) { 'A' } }; class B { method a(Int $x) { 'B' } }; class C is A is B { }; C.new.a(3) # boom!
17:52 SmokeMachine joined
KyleHa That calls the 'A' method. 17:53
moritz_ why?
KyleHa Don't know. 8-)
moritz_ doesn't see why it should 17:54
17:54 pnate left
moritz_ rakudo: class A { method a(Int $x) { 'A' } }; class B { method a(Int $x) { 'B' } }; class C is A is B { }; say C.new.a(3) # boom! 17:54
uhm, defining new classes will surely lead to a timeout again
p6eval rakudo 929998: ( no output )
17:55 meppl joined
KyleHa That's what I'd expect in Perl 5, sorta. 'A' is before 'B' in the list of parents. 17:55
And indeed, if I swap 'em, it calls 'B'.
moritz_ which contradicts what you cited earlier, "multi-method tiebreaking only happens within a given class"
17:56 stephenlb joined
KyleHa I'm not sure it does. 17:56
17:56 mariuz left
KyleHa A::a and B::a are tied, but they're in separate classes. 17:56
If tiebreaking only happens within a given class, they never have to be compared.
17:56 pnate joined
pmichaud gist.github.com/230137 # yay, we can haz CHECK, INIT, END 17:57
moritz_ KyleHa: another idea on testing...
jnthn KyleHa: A::a and B::a can never be tied in a method dispatch.
moritz_ class X { }; class Y is X { }; 17:58
KyleHa jnthn: That sounds close to what I meant.
moritz_ class A { method thing(Y) { } }; class B is A { method thing(X) { } }; B.new.thing(Y.new)
if I understand multi method dispatch correctly, that should be a tie 17:59
right?
jnthn Wrong
KyleHa I think they're only tied if A is a role.
jnthn We consider the set of multis by inheritance level.
moritz_ so the invocant is kinda special?
jnthn If we find soemthing matching in a subclass, we never get to looking at the parent class.
No
The fact that you do a method dispatch is special. 18:00
Note that $x.foo and foo($x) are different.
pmichaud (well, the invocant is a little special, in that we have thing(A,Y) and thing(B,X) above
jnthn Well, yes. :-) 18:01
pmichaud (that's not what avoids the tie in this instance, but the two methods do differ on the type of the invocant)
jnthn Yes, that's correct.
moritz_ ok, back to the multi intheritance example above
18:01 colomon left
moritz_ would that be a tie if A and B were roles, and composed into C? 18:02
instead of inheritance
jnthn Basically the algo is like for @mro -> $class { my @found = $class.find_multis_that_match; next unless @found; }
well, and then a call on the end of that loop, sorry
moritz_: Yes.
Because methods in a role that gets composed are defined as being "as if they were written in the class itself" or something along those lines.
The composition of roles is totally flattening. 18:03
The dispatcher doesn't go looking in the method tables of the roles.
KyleHa class T { multi m($x) { 1 }; multi m($y) { 2 }; }; T.new.m(); # tied methods explode here, right?
pugs_svn r29036 | lwall++ | [src/perl6/Makefile] invoke perl from path instead of relying on gimme5's #!, eternaleye++
jnthn But rather, the compositon inserts the methods from the role into the method table of the class.
KyleHa: Correct.
pmichaud: Good news. our routines and multi routines work. And now as a result inheritance also works again. :-) 18:04
18:04 payload joined
pmichaud jnthn: awesome 18:04
KyleHa class P { multi m($x) { 1 }; }; class T is P { multi m($y) { 2 }; }; T.new.m(); # P::m is never considered here, correct?
pmichaud KyleHa: I assume you mean "multi method" 18:05
jnthn pmichaud++ # call to fire_phasers
KyleHa pmichaud: Yes, thanks.
pmichaud if yes, then yes, P::m gets considered (and rejected)
jnthn KyleHa: oh yeah, I didn't notice that in your example above...kinda assumed it.
KyleHa: But yes, what pm says
pmichaud because there are no targets in T that match .m()
jnthn KyleHa: That dispatch fails because you didn't do T.new.m(42) or so 18:06
KyleHa: If you did *that* then P::m would never be considered.
KyleHa Oh, OK. Yes, my example is sloppy.
pmichaud if you had done T.new.m(42..... what jnthn++ said.
jnthn Because T::m matches.
:-)
18:07 icwiener joined
jnthn
.oO( there's a joke about not considering Pm somewhere in here ;-) )
18:07
pmichaud P's multimethods get considered only if all of T's multimethods fail
KyleHa jnthn++, pmichaud++ # answering the question I meant to ask as well as the one I did.
jnthn pmichaud: OK, I guess next I should do sub trait stuff.
pmichaud jnthn: that would be awesome, yes.
I'm about to do need + use
jnthn pmichaud: Excellent.
pmichaud and probably important
japhb pmichaud, before you disappear ...
pmichaud er, import 18:08
KyleHa I think I'm a little more enlightened now. Hopefully what I've learned will be retained while I nom.
japhb ... got a second to help me understand exporting contextuals?
pmichaud ...exporting?
KyleHa s/KyleHa/consumer/
japhb pmichaud, supposedly I won't have to declare 'my %*VM;' in my mainline if I load a module that exports %*VM to my lexpad. correct? 18:10
pmichaud japhb: no. It's not possible to dynamically modify lexpad entries
if your mainline is going to have a %*VM contextual, it has to declare it.
japhb OK, now I'm confused. What were TimToady and jnthn talking about then?
moritz_ can't it be exported at compile time? 18:11
pmichaud I don't know, I was afc at the time
jnthn pmichaud: You can export symbols at compile time.
pmichaud jnthn: in NQP?
jnthn pmichaud: In Perl 6. :-)
pmichaud sure, I know it can be done in perl 6. japhb is using NQP.
japhb OK, so this is one of those places where NQP can't replicate Perl 6, got it. 18:12
pmichaud (can't replicate Perl 6 *yet*)
18:12 elmex left, elmex joined
jnthn pmichaud: OK, I wasn't sure quite what the plans were on that. 18:12
japhb pmichaud, I wanted to know how in all(< perl6 nqp pir >), so it's valuable to know both.
pmichaud yes, when NQP get a 'use' statement, there is some small chance that it will be able to grab lexicals from modules.
the problem is that a 'use' statement in NQP can't always know that the module it's grabbing is available at the time.
(which is why NQP doesn't have 'use' yet) 18:13
the best NQP can do at the moment is pir::load_bytecode, and I guarantee we're not able to deduce the lexical imports at compile time from that yet.
18:13 colomon joined
pmichaud the other difference is that Perl 6 contextuals default to looking in GLOBAL and PROCESS, while NQP contextuals don't do that 18:14
(because doing so requires a runtime library, or generating a lot of code around each contextual use)
18:15 xp_prg joined
japhb bak, sorry 18:19
pmichaud, OK, so in the NQP/PIR world, the current answer is 'declare them in the loading code, load_bytecode the module that will initialize them, then call an init function in that module so that the proper dynamic/lexical scoping will be set up so the module can do the initialization'. Yes? 18:20
pmichaud yes, that's the best we can do as of today
I expect we'll do better in the future, but don't know exactly when 18:21
japhb OK, fair enough. Progress is better than frustration. :-/
pmichaud I might go ahead and switch contextuals to look in the global namespace, though.
(in addition to the caller stack)
that feels rightish 18:22
then your loading code could just stick things into the global namespace and it would work.
and no declarations are needed.
japhb 'global namespace' meaning 'namespace []' in PIR?
pmichaud yes.
japhb ooh, that would be tasty 18:23
please.
pmichaud yeah, I think so.
japhb :-)
pmichaud looking at code
heh
'fetch' makes it easy
TimToady remember to s/\*// ?
pmichaud yeah, I'd have to consider that also 18:24
NQP tends to not muck with names much
there might be some value in requiring globals to have the * in order to be considered contextual
japhb TimToady, pmichaud: Well, the whole point of this was to not have to declare (and possibly initialize) the vars in every different module I write, but have them be truly "global"
So having to use the * makes sense to me, because it indicates different-than-normal variable semantics. 18:25
And in NQP, you're "close to the machine", so seeing that is important, I'd think.
pmichaud japhb: another possibility might be for us to introduce the GLOBAL pseudo-namespace, too
then you could just do @GLOBAL::ARGS 18:26
and %GLOBAL::VM
japhb pmichaud, it's a little uglier, but I can hang.
18:26 xp_prg left
pmichaud (which don't currently work atm) 18:26
18:26 payload left, payload joined
japhb pmichaud, yes, I discovered that at length last night. ;-) 18:26
diakopter what does(should) %GLOBAL::VM hold
pmichaud put those on the wiki list :)
japhb pmichaud, will do
pmichaud diakopter: well, in Perl 6, it's probably %PROCESS::VM 18:27
$*VM Which VM I'm running under
japhb diakopter, in NQP, the main use I've found is for %VM<config>, the configuration info subhash.
diakopter o neet
pmichaud $::("*::$foo") # global $Bar (<----fossil in S02?) 18:30
Do we still support $*::foo as a shortcut for $GLOBAL::foo ?
TimToady n 18:31
my o key is getting balky... 18:32
18:32 kidd` left
TimToady globals got dehuffmanized that way 18:32
pmichaud that's what I thought. So the S02 line is fossil, or has some other interpretation that makes it work? 18:33
japhb pmichaud, wiki.github.com/perl6/nqp-rx/plumage-requests updated 18:34
pmichaud japhb: noted, thanks 18:35
japhb Can someone teach dalek to watch wiki.github.com/perl6/nqp-rx/wikis.atom ?
pmichaud japhb: I'll come up with something in the near future.
japhb pmichaud, thank you!
18:35 kidd` joined 18:36 [particle]1 is now known as [particle]
pmichaud that atom feed might be a little to verbose ofr dalek 18:36
*for dalek
TimToady also, this line is bogus:
$::($foo) # package-scoped $Bar
pmichaud TimToady: when you get a chance, cleaning those up would be helpful. :)
TimToady I don't think packages should be privileged in indirect lookup
japhb has several in-progress Plumage branches locally, each of them stuck on something not working yet in NQP.
Here's to driving NQP development!
pmichaud japhb: feel free to put a priority marker in the wiki page
japhb pmichaud, yeah, I just realized it was the whole page, not just the diffs. :-( 18:37
er, the atom feed was ...
pmichaud japhb: still, I keep a pretty good eye on the page
japhb pmichaud, OK, cool, I'll look and see what's most important to me right now.
pmichaud hmmm, global contextual doesn't look too bad. have to decide whether to strip the twigil. 18:39
(generated code is ugly, but ... oh well.) 18:40
japhb Does it uglify every variable reference, or just contextuals? 18:42
pmichaud just contextual references
and it won't be so ugly when I've got 'fetch' integrated into PAST
japhb I was going to ask about that .... ;-)
Actually, I'm going to add that to the wiki, because I'm doing a lot of debugging using --target=pir, and I could use all the cleanliness I can get. 18:43
18:43 awwaiid left 18:47 TSa joined 18:49 tomaw_ left 18:50 iblechbot joined
pugs_svn r29037 | lwall++ | [S02] clean up ::() semantics to be identical to normal lookup 18:50
18:50 tylerni7 left
japhb pmichaud, does this work for you? wiki.github.com/perl6/nqp-rx/plumage-requests 18:52
18:52 tomaw_ joined
japhb Actually, a couple more edits coming ... 18:53
TimToady I still think it's better to strip the twigil, or we can't easily find $GLOBAL::foo, and "package GLOBAL; our $foo" becomes problematic
japhb pmichaud, OK, fixed now 18:55
18:56 tylerni7 joined
japhb TimToady, do you mean for the case of having contextual lookup in NQP look in 'namespace []' as well? 18:56
TimToady well, if NQP has different semantics there, it's no longer a subset
18:57 payload left
pmichaud we know there are going to be a few places where NQP doesn't quite match Perl. But we try to keep them to a minimum, and the idea is that an NQP program should be able to generally run under a full Perl 6 18:59
japhb TimToady, sure. I thought the NQP rules were '1. Thou shalt not have a required runtime. 2. Be as close as possible to a proper subset of Perl 6 as you can without violating Rule 1.' Hence stuff like Q:PIR{} and pir::
jnthn pmichaud: Gah. I'm guessing you just did the GLOBAL change? 19:00
Like, it was one of the last things you committed?
pmichaud in that sense, it would seem to make more sense to strip the twigil
jnthn So everything is in GLOBAL now?
pmichaud jnthn: it was relatively recent, yes.
jnthn pmichaud: OK. It's broken trait_mods...
pmichaud: I think because you didn't also update package_def.
class Foo { ... } now goes in
pmichaud jnthn: yeah, we need a pragma or something that says "Don't compile this unit in GLOBAL"
jnthn .namespace ["Foo"]
pmichaud jnthn: GLOBAL in ng is the same as Main was in the older rakudo 19:01
jnthn Oh, so the answer is not for us to have instead
.namespace ["GLOBAL";"Foo"]
?
TimToady STD recognizes 'my module CORE;' as special :)
pmichaud jnthn: at this point I don't want Foo to go in as ['GLOBAL';'Foo'], no. 19:02
ultimately packages will be lexical
jnthn pmichaud: OK. Hm.
pmichaud just think of GLOBAL as being in the same niche that Main was
(for now)
We used to have a "no Main;"
jnthn True
TimToady 'my module' seems more natural 19:03
pmichaud feel free ot remove the GLOBAL declaration for now
(just eliminate :namespace('GLOBAL') from method comp_unit )
I agree it might be a day or two premature
jnthn OK
In other news, I just put in sub traits...and got a segfault. 19:04
*sigh*
pmichaud that should put things back the way they were, and we can figure out how we want to parse + handle 'my module CORE;'
(and review what STD is doing)
(I agree 'my module' feels more natural.... it just didn't exist when we added 'no Main' :-)
(and "CORE" was called "setting")
(having recently changed from "Prelude") 19:05
(and ..... :-)
japhb: even with Q:PIR{} and pir::, those *could* be Perl 6 if the appropriate modules were loaded :-)
japhb pmichaud, well, the type magic of pir:: is stretching it a bit, but sure. :-) 19:06
pmichaud really?
how hard would it be to write pir::* subroutines to do the equivalent?
19:07 fridim_ joined
japhb pmichaud, didn't you say that part of the magic of pir:: is that PCT will detect consecutive ops respectively returning and taking unboxed values, and being smart enough not to box in between? 19:07
pmichaud sure, but one can get equivalent semantics with boxing 19:08
the box/unbox is optimization more than semantic difference
and Perl 6 also allows native types
like int/str/num
so..... seems pretty equivalent to me
anyway, I'm pretty sure I can write subs in Perl 6 that accept unboxed values and return them :-) 19:09
japhb Sure, yes.
pmichaud our int sub length(str $x) { ... }
(except I guess there's no str type. Would need to be buf)
anyway, it shouldn't be too hard to emulate the pir::* subs in Perl 6 :-) 19:10
far easier than trying to parse the Q:PIR{ ... } contents.
KyleHa S12 under multimethods says if it can't resolve ties, "dispatch fails". Does that mean a run-time 'die', or it returns a Failure object, or what? 19:11
pmichaud depends on the mode of dispatch, I suspect. But for a generic method dispatch, throws an exception.
19:12 explorer left
pmichaud afk, lunch and more work on "use/need/import" 19:12
KyleHa OK, thanks.
pmichaud jnthn: another possibility for now is to detect CORE as a module name and treat it as :namespace('') 19:14
then we just need "module CORE;" at the top of the builtins.
jnthn pmichaud: Ah, true.
pmichaud: I fixed the segv for is export, so we can haz that now too. :-)
pmichaud probably worth doing that and removing GLOBAL for now.
yay
okay, lunch for me, then back to implement use
jnthn I might for now just drag in the PIR code we had before.
OK. :-) 19:15
pmichaud ...PIR we had before for...?
jnthn is export
pmichaud I thought is export was a trait
jnthn In the original traits.pm
pmichaud ahhhh, okay
jnthn Yes, but it's body was Q:PIR { ... }
pmichaud that's fine with me for now
actually, though, I might want it to go in src/cheats
jnthn Yeah, I'd like to re-write it into Perl 6 at some point, but it's maybe a "nice to have"
erm
fine, if part of traisn.pm is also in src/cheats I guess. :-) 19:16
*traits
pmichaud just split traits.pm into two parts
jnthn ok
pmichaud traits.pm is pure perl 6
src/cheats/traits-export.pm is the pir cheating part
jnthn OK
pmichaud list both of them in CORE
(it works out identically)
jnthn ooh...it's after 8pm...I should think about dinner :-)
pmichaud oh, also, I'd like someone to put together a 99-test.t file for 01-sanity 19:17
it should verify that the test module functions are working properly
doesn't have to do all of them -- just the basics
(ok, is, skip, etc.)
basically, the goal of 01-sanity is to test everything that's needed for 99-test.t to ultimately pass 19:18
(and thereby begin running spectests)
okay, lunch for me -- bbl
sjohnson morning 19:21
KyleHa My understanding of multiple dispatch: gist.github.com/230192 19:23
pmichaud: You want 99-test.t to start with 'use Test' and exercise its code to confirm it's runnable? Or something else? 19:27
19:33 scottt_ joined 19:34 Thyssen left 19:35 Thyssen joined 19:37 scottt_ left 19:39 scottt_ joined 19:43 scottt_ left 19:55 payload joined 19:57 hercynium joined 20:03 ShaneC joined 20:15 masak left
japhb nqp: my %c; %c<a> := "b"; for %c { say($_ ~ "\t" ~ %c{$_}); } 20:29
p6eval nqp: Multiple Dispatch: No suitable candidate found for 'concatenate_str', with signature 'PSP->P'␤current instr.: '_block21' pc 104 (EVAL_1:0)␤
japhb pmichaud?
when I do --target=pir, I don't see any three way concat's like that. 20:30
Just one for the first ~ and a separate one for the second ~ 20:31
jnthn nqp: my %c; %c<a> := "b"; for %c { say(~$_ ~ "\t" ~ %c{$_}); }
p6eval nqp: a b␤
japhb jnthn, So NQP bug or PEBCAK?
jnthn japhb: Debatable..it's annoying though. 20:32
pmichaud KyleHa: (99-test.t) yes
jnthn japhb: I've hit it before too.
japhb ah
jnthn (thus why I so quickly knew the solution)
KyleHa pmichaud: I have a local branch for that; how do I get it to github for you?
japhb heh
pmichaud KyleHa: maybe just nopaste the file somewhere is easiest?
jnthn I think pmichaud can probably give a better opinion than me on if it's an NQP bug or something Parrot should deal with - I'm not sure off hand. 20:33
KyleHa pmichaud: It's three files plus changes to Test.pm that seemed appropriate upon review.
pmichaud KyleHa: maybe "git diff" into a patch, then?
japhb jnthn, the thing that made me assume it was NQP was that --target=pir looked sane (well, as it ever is)
pmichaud I can apply the patch. Seems easier than trying to push to github, unless you have an easy way to do that already
japhb actually, let me try the two pass method
pmichaud japhb/jnthn: It's because Parrot doesn't have a "concat" opcode that knows what to do with a first argument as a match object 20:34
PerlJam KyleHa: git push origin refs/heads/name-of-branch
japhb Nope, it fails from PIR as well
pmichaud, a match object?
pmichaud or, put another way, it's because match objects don't have a concat vtable method
PerlJam KyleHa: or perhaps git push origin name-of-branch
pmichaud oh, wait, maybe not a match object here.
looking.
KyleHa That rings a bell. Thanks PerlJam++
pmichaud I was reading $_ as a match object. 20:35
pmichaud checks the --target=pir output 20:36
japhb I'm guessing $_ in this case is some sort of key PMC?
jnthn pmichaud: I think the problem is that iterating a Hash nowadays gives you back something other than a String.
It gives back a HashKey or something.
japhb What jnthn said
pmichaud jnthn: sure, but 'for' shifts from the iterator
oh, you mean shifting from the iterator gives something else back. Possible/likely. 20:37
jnthn pmichaud: Right.
Sorry, wasn't clear (cooking...)
pmichaud well, whatever is coming back, it doesn't have a concatenate vtable.
and thus you get the "no suitable candidate found..." error
diakopter optimized away!
pmichaud this is the problem with trying to tie all operations too closely to the datatype (actually, to the lhs operand)
japhb OK, but stringify is guaranteed to work, yes? I mean, doesn't every PMC need to support at least a stub stringification?
20:38 __ash__ joined
japhb So jnthn's workaround will always work? 20:38
pmichaud I don't know if it's guaranted to work for every PMC, but it obviously needs to work with whatever Hash iterator is returning.
japhb right
pmichaud I suppose I can make the claim in Parrot that it's a deprecation violation.
probably worth checking.
japhb :-)
jnthn ooh, dinner is cooked, bbs 20:39
KyleHa pmichaud: There it is: github.com/rakudo/rakudo/tree/validate-test-pm
pmichaud KyleHa: the last three commits? 20:40
KyleHa Yes. You may want to review and cherry pick.
pmichaud I will, and thanks.
...there's two 99-test files?
I tend to want only one file per number :)
KyleHa I can renumber them. I'd probably order them basic, plan, err 20:41
pmichaud let me look a bit further
japhb remembers when that particular fail happened ...
er, *first* happened. 20:42
pmichaud KyleHa: okay, I think I'm only needing 99-test-basic.t at the moment
we're standardizing on plan *;, yes?
KyleHa Yes, but there's still a lot of files that use explicit plans. 20:43
20:43 barney left
pmichaud that's okay 20:43
this test is just to get us to say "yes, you have enough of a testing environment that you could conceivably start to run spectests"
it's not to say "you have a complete testing environment"
is plan * optional?
20:43 TSa left
KyleHa I think so, yes. If you don't declare a plan at all, it kind of assumes 'plan *'. 20:44
pmichaud or do we expect it to exist more often than not?
KyleHa It will usually exist.
pmichaud okay. we'll want to be able to parse that then.
I'll probably omit the eval tests for now
KyleHa I don't know of a spectest file that doesn't have 'plan' with either a number or a stare. 20:45
s/stare/star/
pmichaud I'm going to assume that most spectest files will move to having 'plan *', so we'll test for that.
many thanks, this works great for me. I'll cherry pick shortly. 20:46
KyleHa You're welcome.
Right now, 616 files have 'plan\s+\d' and 72 have 'plan\s+\*', give or take sloppy grepping. 20:50
pmichaud okay 20:51
I'll presume that if a Test.pm can handle plan * that it can likely handle plan \d+
at this stage we really want a low barrier to entry, not a high one.
(i.e., we want people to be able to start running spectests asap)
KyleHa Anything else I can do to help? 20:52
pmichaud that's perfect, thanks for the very quick response
saved me an hour or so of work :)
KyleHa Yay! 20:53
pmichaud oh, I'm going to reject some of the Test.pm changes, though.
0
+multi sub todo($reason, Int $count where { $count > 0 } ) is export(:DEFAULT) {
handling "where" clauses might be a "high barrier to entry" 20:54
this is a case where I think I'd prefer the sub to fail if count is negative rather than not be invoked at all
unless you expect someday there to be a todo() sub where negative counts are allowed :)
jnthn back from nom 20:55
20:55 cdarroch left 20:57 takadonet left 20:58 eternaleye left 21:01 hudnix left 21:13 Su-Shee left 21:15 jaffa8 left
KyleHa I'm surprised that a sub call that doesn't match any signature doesn't blow up somehow. 21:16
jnthn ?
That'd be...odd.
rakudo: multi foo($x) { }; foo(1,2)
p6eval rakudo 929998: No applicable candidates found to dispatch to for 'foo'␤in Main (file <unknown>, line <unknown>)␤
KyleHa rakudo: sub x(Int $x where { $x > 0 }) { say 'yay' }; x(-1); say 'done';
p6eval rakudo 929998: Constraint type check failed for parameter '$x'␤in Main (file src/gen_setting.pm, line 324)␤ 21:17
jnthn Looks like a blow up to me. :-)
KyleHa Something odd here, then.
21:18 hudnix joined
jnthn KyleHa: What are you seeing? 21:19
KyleHa jnthn: I have, basically, the code above in a file, and when I run it, it doesn't explode as it does here.
I'm investigating further...
jnthn KyleHa: master or ng? 21:21
KyleHa master
jnthn Hm
Not sure then.
If it was in ng, I could happily believe there's an issue.
KyleHa Found it. 21:22
If I have my sub definition on one line, the call on the line below it, it doesn't work (doesn't die). If I add a semicolon to the end of the line with the sub definition, it does what we want (dies).
jnthn wtf... 21:23
pmichaud japhb: I filed the concatenation bug as a major parrot bug (TT #1253). Turns out that much more than concatenation is affected.
jnthn Way too odd.
pmichaud I suspect an end-of-block parsing issue.
I'd not worry about it to much -- likely to be fixed in ng.
japhb pmichaud, OUCH
jnthn pmichaud: Hope so.
pmichaud welllll, we know it'll be fixed in ng. :) 21:24
21:24 jaffa8 joined
pmichaud but anytime adding a semicolon fixes things, I suspect a parsing bug. 21:24
(which we know we've had trouble with)
jnthn Yes, it sounds like it is that.
KyleHa Where would be a good place to test this?
jaffa8 ; seems to be a problem in other languages too
21:25 estrabd joined
moritz_ KyleHa: maybe t/spec/S02-whitespace_and_comments/ somewhere 21:25
KyleHa moritz_: Thanks!
japhb pmichaud, (my OUCH was in relation to TT #1253) 21:27
21:27 quietfanatic left
pmichaud japhb: yes, that's where I applied it. :) 21:27
japhb ah, good
:-)
pmichaud I thought the same thing. In several ways 1.4.0 was a FAIL as far as Parrot's stated deprecation policy goes.
japhb I mistook your response starting with welllll to be to me, rather than jnthn. :-) 21:28
21:28 quietfanatic joined
jnthn glances the TT out of curiosity 21:28
japhb The deprecation policy so far has seemed to be the worst of both worlds.
pmichaud I think I said as much last November at PDS 2008 when it was adopted. 21:29
japhb is not surprised.
pmichaud afk, fetching kiddies.
21:30 simcop2387 left
jnthn FAIL. 21:30
21:31 simcop2387 joined 21:33 TopoMorto left 21:36 desertm4x joined 21:40 desertm4x left 21:41 simcop2387 left
pugs_svn r29038 | kyle++ | [t/spec] Test for a parsing problem noticed on IRC 21:41
21:41 mubot left 21:42 simcop2387 joined
japhb nqp: my @list := ("a", 1, 5.3); say(@list[0]); 21:43
p6eval nqp: Confused at line 1, near "my @list :"␤current instr.: 'parrot;HLL;Grammar;panic' pc 448 (src/cheats/hll-grammar.pir:197)␤
japhb nqp: my @list := ("a", 1, 5); say(@list[0]);
p6eval nqp: a␤
pmichaud nqp doesn't know floats yet.
japhb Num fail
ah, OK
pmichaud need it to?
japhb Not this instant, but soon. ==> wiki? 21:44
pmichaud please.
japhb np
done 21:45
BTW, do you mind if I gc that page occasionally?
Or do you like having the history visible?
japhb increases priority of flatten while he's at it 21:47
jnthn pmichaud: oh ping 21:48
pmichaud pong
(gc) just move the completed stuff to the bottom so we have a list :)
jnthn pmichaud: I just added in a very minimal Pair in PIR (just creates the class and has .key)
japhb pmichaud, roger that
21:48 nbrown_ joined
jnthn pmichaud: Since is export needed. 21:48
erm, needed it
pmichaud: is export now may well work
pmichaud jnthn: wfm
jnthn pmichaud: However, there's one snag.
class Foo { method wob is export { ... } } # oh noes 21:49
&wob doesn't get a namespace entry.
And the 'is export" goes off asking the sub for its namespace, and .get_namespaces is like, "I dunno".
So gives back null. 21:50
Same on lexical subs.
our subs work though! ;-)
pmichaud okay. I can fix that, or you can.
I'm fine with fixing it myself, it will help when I get to finishing up 'import' semantics
jnthn I'm not sure I know exactly how it's meant to work. Maybe since you're doing all of the import stuff, it's better than I punt it to you?
pmichaud as long as the export trait handler is being called, that's the bulk of what I needed 21:51
jnthn Yes, that is decidedly happening.
pmichaud excellent. that should be good enough for this evening.
jnthn Excellent.
Is there anything else you'd especially like?
I had traits and augment on my list and I did 'em. :)
pmichaud doing things through the namespace is a bit bogus anyway, and we really shouldn't need to ask the sub for its namespace. We can always check the namespace of export's caller. 21:52
jnthn oh
Yes, that'd help
pmichaud I think you cleared the list of things I needed for finishing Test.pm and getting started on spectests
jnthn Excellent. 21:53
japhb pmichaud, ah, wiki page much cleaner now
pmichaud my hope and plan is to finish that up tonight (even if I have to stay up a bit later to do it), then write some reports
if I get that finished tonight, tomorrow we can start working on core setting
likely starting with the operators
and some of the other builtin classes
jnthn Great. 21:54
oh by the way
When I put pair back
I put it back registered as Pair
Not Perl6Pair.
pmichaud good
I think Pair is gone from parrot anyway
the only class where we have a bit of difficulty is Perl6Object <-> Object
because I don't think we can have a PMC type named "Object"
KyleHa Objection! 21:55
pmichaud oops, gotta pick up other kid
brb
KyleHa moritz_: I'm looking for tests like these and not finding them. gist.github.com/230192 I'm thinking of adding them to S12-methods/multi.t unless you have another suggestion. 21:58
moritz_ KyleHa: seems like a good choice 21:59
pugs_svn r29039 | kyle++ | [t/spec] Tests for ambiguous dispatch. 22:03
22:05 nbrown left
jnthn pmichaud: Added a Pair.pm in the setting. Just implements .value, but hey, at least we're sure augment works properly in the setting now. :-) 22:08
pmichaud jnthn++ +1 22:16
jnthn pmichaud: Realized I'd not put "is rw" and friends back on parameters.
pmichaud: Doing that now. 22:17
22:17 quietfanatic left
pmichaud good, we'll want that too. How about 'is ref" ? 22:17
jnthn Well, my current "is rw" impl kinda...is...is ref. :-)
pmichaud that's fine. any chance we can have is ref and is rw both do the same thing for now?
jnthn ... 22:18
pmichaud while we're waiting for a decision from TimToady++ about is rw
jnthn We can
pmichaud ?
+1
jnthn All "is rw" was going to do was say "oh hey, does it have the rw flag set"
And otherwise be the same as is ref.
But I can leave them both the same for now if you like.
I've gone and forgotten the decision we're waiting on now.
pmichaud me too... I just remember we're waiting on one. I'll write it up as a Pm-## question. 22:19
so it doesn't get lost :)
this week should be fun playing with core setting :) 22:20
I'm thinking of implementing Range in the setting instead of PIR
(along with lazy RangeIterators)
jnthn Sounds good.
pmichaud: oh, when you add that question
pmichaud: Unless you know the answer...
Can you also add
"What is the difference between :(\$x) and :($x is ref) ? 22:21
pmichaud sure
or you can go ahead and add it to pm.txt
just use the next Pm-## in sequence
jnthn Because given my recollection of the last discussion of is ref, it matches my recollection of what the \ quantifier was meant to do... 22:22
Aww...why can't I have a jw.txt? ;-)
jnthn decides to add to the file that's getting answers :-)
Is it in the spec directory? 22:23
aww
moritz_ no, in misc/ 22:24
jnthn moritz_: thanks 22:26
pmichaud misc/pm.txt
jnthn checks out
pmichaud you can add it as jw-1 if you want. :)
jnthn oooh 22:27
jnthn feels special again
sheesh...there's a lot besides pm.txt in misc!
moritz_ that's where camelia dwells! 22:28
22:29 am0c joined 22:30 simcop2387 left
pugs_svn r29040 | jnthn++ | [pm.txt] An imposter strikes with a question about the difference between :(\$x) and :($x is ref). 22:31
22:32 SmokeMachine left, iblechbot left, fridim_ left
diakopter mailing list via source code repo. 22:33
22:34 simcop2387 joined, justatheory left
moritz_ avoids bikeshedding :-) 22:35
jnthn lol
Why do you think I use p6l so infrequently for questions? :-) 22:36
22:41 lichtkind joined 22:44 Chillance joined 22:46 justatheory joined 22:53 KyleHa left
japhb Is there either A) a working perl6doc project, or B) a way to tell classic perldoc to parse using the new grammar? Now that NQP-rx is using Perl 6-ish =begin/=end instead of =foo/=cut, classic perldoc has gotten a lot less useful for checking my POD. 22:54
pmurias diakopter: you're now writing a PAST interpreter in js? 22:59
pmurias wonders if supporting p5 interop would be usefull in mildew-js 23:07
Juerd jnthn: I'll refrain from asking questions, so we don't have to share the jw's :) 23:10
jnthn ;-)
23:10 __ash__ left
pugs_svn r29041 | lwall++ | [STD_P5] weed out non-P5-ops, use <O()> notation, add missing %binding precedence 23:12
pmurias TimToady: what does O() notation in STD do? 23:16
pmichaud (based on a #parrot conversation) .... what's the result of numifying a Pair ? 23:17
rakudo: my $a = '5'=>3; say +$a;
p6eval rakudo 929998: Method 'Num' not found for invocant of class 'Perl6Pair'␤in Main (file src/gen_setting.pm, line 324)␤
pmurias pugs: +(a=>4)
p6eval pugs: ( no output )
pmurias pugs: say +(a=>4)
p6eval pugs: 2␤
pmichaud pugs treats pairs as arrays of two elements 23:18
jnthn Not quite sure that's right.
arnsholt pmurias: Does using tuples in a numberic context even make sense?
Er, s/pmurias/pmichaud/
pmurias not a lot
pmichaud arnsholt: I don't know. I'm just curious as to what the answer would be in that case. 23:19
arnsholt Point
pmichaud because it's coming up in a conversation on #parrot as to what a parrot behavior ought to be
pmurias the current behavior might be the right one 23:20
arnsholt But I suppose the numified right side of the pair might be a viable option?
pmichaud arnsholt: it might be, yes. That's why I was hoping for a Perl 6 answer. :)
pmurias rakudo: my $a = '5'=>3;say $a[0];
p6eval rakudo 929998: Method 'postcircumfix:[ ]' not found for invocant of class 'Perl6Pair'␤in Main (file src/gen_setting.pm, line 324)␤
arnsholt The pugs behaviour makes sense for generic length tuples, but for pairs it's a bit redundant 23:21
pmichaud otoh, stringifying a pair doesn't produce the stringified value of its rhs, so I suspect numifying should not do that
I'm fine if numifying the pair produces a Failure of some sort
arnsholt That's the "correct" solution if you ask me, but in a DWIM context it might not be 23:22
jnthn I'm not sure what IM though. :-) 23:24
23:25 bloonix left, mathw left, mathw joined
arnsholt That's the part that has me struggling as well =) 23:26
23:26 bloonix joined 23:27 __ash__ joined
moritz_ rakudo-ng doesn't build Test.pm anymore 23:27
jnthn oh 23:28
that sucks
moritz_ Method 'ast' not found for invocant of class 'Undef'
duringthe compilation step
...
jnthn ah crap
moritz_ called from Sub 'perl6;Perl6;Grammar;package_def' pc 34433 (src/gen/perl6-grammar.pir:5128)
jnthn yeah, I see it
23:28 quietfanatic joined
jnthn We're kinda...lacking tests... 23:28
;-)
TimToady pmurias: <O(%preclvl)> replaces the old fake --> coercion syntax 23:29
moritz_
.oO( ... )
quietfanatic Maybe numifying a pair should create a ratio?
:)
jnthn moritz_: Well, normally the work flow is: I change something, run the spec tests, commit. :-)
moritz_: But there's no spec tests now, so if make test don't catch it... :-)
23:30 __ash__ left
TimToady I suspect the conservative thing is to fail for now, until we decide we all mean the same thing by numification of Pairs 23:30
moritz_ jnthn: what's missing? use?
23:30 simcop2387 left
jnthn yeah, pmichaud++ is working on it 23:30
We'll have Test.pm back soon
oh
I think it's just that I've broken the semi form of package declarators. 23:31
yup
23:31 simcop2387 joined
jnthn || ';' 23:32
<.newpad>
<.finishpad>
huh!
pmichaud TimToady: we'll fail for now, works for me
jnthn: TimToady just changed STD here earlier today -- I haven't had a chance to catch up 23:33
jnthn pmichaud: oh 23:34
The action.pm says statement_list and the grammar votes statementlist
So does STD.
jnthn tweaks the actions and hpes
*hopes
pmichaud the previous version of STD.pm basically just let things fall through to the comp_unit statementlist 23:35
which didn't really work for us
jnthn ah, ok
pmichaud anyway, feel free to tweak, but I'll definitely give it a look later
23:36 lestrrat is now known as lest_away
jnthn Why does Test.pm have 23:37
is export(:DEFAULT)
When
is export
Would do just fine?
Turns out $<circumfix>.ast doesn't do the right thing in the trait mod after all. :-(
moritz_ jnthn: feel free to simplify the 'is export' thing 23:38
jnthn moritz_: OK, thanks. Wanted to check there wasn't a reason first. :-)
OK, now it compiles again. \o/
23:39 NorwayGeek left
jnthn moritz++ for noticing the breakage. :-) 23:40
pmichaud: I've put pretty much all the signature stuff back, apart from @x looking for Positional. I think it may be a day or two too soon for that. 23:41
(I know List ain't 'does Positional' yet, for example.)
pmichaud agree on day too soon 23:42
tomorrow or wed may be optimal
jnthn Sure
Well
23:43 jaffa8 left
quietfanatic rakudo: say 45.HOW 23:43
p6eval rakudo 929998: Int()<0x2b2855901540>␤
jnthn Maybe List and Array will want to become parametric roles at that point as well.
quietfanatic rakudo: say 45.HOW.HOW; say "done"
p6eval rakudo 929998: ( no output )
moritz_ $int.HOW.HOW segfaulted here last I tried
quietfanatic (segmentation fault)
jnthn quietfanatic: Doesn't in ng. 23:44
:-)
moritz_ that's already in RT
quietfanatic sweet :)
sjohnson howdy quietfanatic
quietfanatic hey sjohnson
jnthn pmichaud: OK, I've coded enough today. I think I'm at the point where quality will start to decrease, so I'll resume tomorrow. :-)
quietfanatic jnthn: oh, I was gonna ask you about the trait_mod:<is> thing but I gues that can wait. 23:45
*guess 23:46
jnthn quietfanatic: It won't change in master now, I doubt, and that stuff looks a bit difference in ng.
quietfanatic: So I think best is look at it once ng is far enough along to sanely be able to play with it there.
quietfanatic Fair enough
23:54 Whiteknight joined 23:57 nihiliad left