pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/ Set by TimToady on 25 January 2008. |
|||
00:00
wknight-away is now known as wknight8111
00:02
Limbic_Region left
00:13
macroron joined
00:14
LionWRK left
00:24
macroron left
00:38
wknight8111 left
00:41
thoughtpolice joined
00:50
mac_ joined
00:51
mac_ is now known as nodboy
00:52
BinGOs_ joined
00:54
BinGOs left
00:56
nipotaway is now known as nipotan,
ispy_ left
01:02
pbuetow left
01:03
Limbic_Region joined
01:04
devogon left
01:13
blindfish left
01:25
cyberpass joined
01:26
Andy_ joined
01:34
justatheory left
01:41
kst joined
|
|||
pugs_svn | r19805 | lwall++ | [t/operators/assign.t] mods to new assignment semantics | 02:00 | |
r19806 | lwall++ | move assign.t into t/spec | 02:01 | ||
02:10
cyberpass left
|
|||
meppl | good night | 02:12 | |
02:14
meppl left
02:43
jferrero left
02:48
peepsalot left
02:49
peepsalot joined
02:57
kanru left
02:58
kanru joined
02:59
Limbic_Region left
03:02
apple-gunkies joined
03:16
justatheory joined
03:34
alester left
03:40
jjore joined
03:41
vainguard_ joined
03:48
vainguard left
04:27
orafu joined
04:37
agentzh joined
04:38
vainguard_ left,
vainguard joined
04:42
thoughtp1lice joined
04:44
OuLouFu_ left
04:53
thoughtpolice left
04:56
Southen_ joined
04:58
thoughtp1lice left,
kanru left,
Andy_ left,
araujo left,
ludan left,
simcop2387 left,
Patterner left,
faxathisia left,
gbacon left,
lisppaste3 left,
marmic left,
ruoso left,
nothingmuch left
04:59
ting joined,
nothingmuch joined
05:00
jjore left,
apple-gunkies left,
mj41 left,
IRSeekBot left,
broquaint left,
allbery_b left,
mugwump left,
GeJ left,
pasteling left,
Southen left,
sri_work left
05:01
jjore joined,
apple-gunkies joined,
mj41 joined,
broquaint joined,
allbery_b joined,
mugwump joined,
GeJ joined,
pasteling joined,
Southen joined
05:02
thoughtp1lice joined,
kanru joined,
Andy_ joined,
araujo joined,
ludan joined,
simcop2387 joined,
Patterner joined,
faxathisia joined,
gbacon joined,
lisppaste3 joined,
marmic joined,
ruoso joined,
arguile joined,
Caelum joined,
f0rth joined,
dalek joined,
Maddingue joined,
kcwu joined,
cognominal joined,
wolverian joined,
Eidolos joined
05:03
thoughtp1lice left
05:27
Southen left
05:34
monomorph joined
05:44
Aankhen`` joined
05:46
justatheory left
|
|||
pugs_svn | r19807 | putter++ | misc/Ruby6: rmdir. Directory was empty, old, and never had files. | 05:53 | |
r19807 | putter++ | karhu: if you are still around and interested, let's talk. :) | |||
05:53
cyberpass joined
|
|||
pugs_svn | r19808 | putter++ | putter/talk.txt: tweak. | 06:00 | |
r19809 | putter++ | src/perl6/STD_extract: created. The start of a script to take STD.pm, and extract its information into a more accessible form. | 06:07 | ||
06:07
peeps[work] joined
|
|||
pugs_svn | r19810 | lwall++ | [pugs] simplified assignment parsing | 06:09 | |
06:25
agentzh left
06:46
peeps[work] left
06:49
kcwu left
06:53
devogon joined,
BinGOs_ is now known as BinGOs
06:54
Andy_ left
07:01
cyberpass left
07:07
lumi joined
|
|||
pugs_svn | r19811 | lwall++ | [assign.t] cut-n-paste errors | 07:33 | |
07:37
lumi left
07:56
Southen_ left
07:59
ludan left
08:12
iblechbot joined
08:15
meppl joined
08:33
ting left,
orafu left,
BinGOs left,
Auzon left,
cognominal_ left,
jiing left,
penk left,
bloonix left,
djm left,
tewk_ left,
sunnavy left,
LCamel left,
revdiablo left,
pugs_svn left,
Grrrr left,
diakopter left,
jql left,
Grrrr joined
08:34
faxathisia left,
revdiablo joined
08:35
tewk joined,
sunnavy joined,
pjcj joined
08:38
pugs_svn joined,
vainguard left,
cognominal_ joined
08:39
mattz joined
08:40
cosimo joined
08:45
BinGOs joined
08:52
penk joined,
Auzon joined
08:58
viklund joined
09:01
njbartlett left
09:16
meppl left
09:49
ruoso left
09:50
ruoso joined
09:53
IllvilJa joined
09:54
kanru left
10:11
kcwu joined
10:14
ebassi joined
10:16
pbuetow joined
10:24
njbartlett joined
10:29
njbartlett left,
njbartlett joined,
jql joined
10:32
spinclad_ joined
10:34
mattz left,
njbartlett left
10:35
njbartlett joined,
kanru joined
10:38
njbartlett left,
njbartlett joined
10:39
mattz joined
10:43
njbartlett left
10:44
Southen joined
|
|||
pugs_svn | r19812 | ruoso++ | [smop] First major milestone achieved!!!! Stage 0 SMOP finished. No memory leaks, no valgrind dected errors, ALL TESTS PASSING. | 10:59 | |
11:00
penk left
|
|||
moritz_ | ruoso++ indeed | 11:00 | |
@karam ruoso | |||
lambdabot | Maybe you meant: karma karma+ karma- | ||
moritz_ | @karma ruoso | ||
lambdabot | ruoso has a karma of 231 | ||
pbuetow | @karma pbuetow | 11:04 | |
lambdabot | You have a karma of 0 | ||
pbuetow | :P | ||
i used to have a karma of 1 | 11:05 | ||
moritz_ | pbuetow: you need to commit a bit more ;) | ||
pbuetow | :( | ||
moritz_ | perhaps lambdabot lost its information | ||
@karma audreyt | |||
lambdabot | audreyt has a karma of 115 | ||
moritz_ | @karma moritz | ||
lambdabot | moritz has a karma of 186 | ||
pbuetow | yes can be | ||
11:08
chacha_chaudhry joined
|
|||
pugs_svn | r19813 | ruoso++ | [smop] when destroying the interpreter using the interpreter prototype, make sure to do a goto(false) and a runloop before. This seems to be a bug in the stackfull implementation used to destroy the stackless interpreter. | 11:20 | |
11:24
chris2 joined
11:25
blindfish joined
11:26
Aankh|Clone joined
11:36
Aankhen`` left
|
|||
ruoso starting to wonder how p6opaque should look like in smop... | 11:41 | ||
11:44
Aankhen`` joined
11:51
Aankh|Clone left
12:33
Aankh|Clone joined
12:35
zamolxes joined
12:42
riffraff joined
12:49
nipotan is now known as nipotaway
12:51
Aankhen`` left
12:53
Aankh|Clone left
13:28
tcliou_ joined
13:37
chris2 left
13:40
tcliou left
13:46
alester joined
13:50
alester left
14:09
diakopter joined,
ChanServ sets mode: +o diakopter
14:13
cognominal_ left
14:14
meppl joined
14:30
jhorwitz joined
14:48
Auzon left
14:49
barney joined
14:57
cognominal_ joined
15:03
Aankhen`` joined
15:15
chacha_chaudhry left
15:20
TJCRI joined
|
|||
cognominal_ | is there a pragma to promote pairs of slurpy hash to behave as lexicals as a temporary mesure before changing the signature and adding them as named parameter or as a way to avoid overcrowding the signature. | 15:22 | |
15:22
alester joined
|
|||
cognominal_ | Maybe that deserve a dedicated twigil | 15:22 | |
moritz_ | uhm | ||
that's too fast for me | 15:23 | ||
cognominal_ | ?? | ||
moritz_ | show us a line of code | ||
what do you want to achieve? | |||
cognominal_ | sub toto (*%f) { ... shitload of %f<> } | 15:25 | |
versus | |||
moritz_ | so you want slurpy named parameters? | ||
pugs: sub a(%f) { say %f.perl } a(:foo(bar)); | 15:26 | ||
exp_evalbot | OUTPUT[*** Named argument found where no matched parameter expected: ("foo",Ann (Pos (MkPos "/tmp/RUKg9GtJ6c" 1 34 1 37)) (App (Var "&bar") Nothing [])) at /tmp/RUKg9GtJ6c line 1, column 27-39] | ||
moritz_ | pugs: sub a(%f) { say %f.perl } a(foo => 'bar'); | ||
exp_evalbot | OUTPUT[*** Named argument found where no matched parameter expected: ("foo",Ann (Pos (MkPos "/tmp/T6fDU03IUp" 1 36 1 41)) (Val (VStr "bar"))) at /tmp/T6fDU03IUp line 1, column 27-42] | ||
cognominal_ | subu toto(*%f) { $+a } # + would be the wtwigil | 15:28 | |
toto( a => 1 ); | |||
Tene | pugs: sub a(*%f) { say %f.perl } a(foo => 'bar'); | ||
exp_evalbot | OUTPUT[{("foo" => "bar"),}] | ||
cognominal_ | that would avoid to deal wit the hash | ||
moritz_ | I think that's too much of a shortcut | 15:29 | |
Tene's solution sounds good | |||
cognominal_ | but would not conflict with other names | ||
moritz_ | anyway, the idea is not all that bad | ||
cognominal_ | see the module JQuery translated in Perl6 | 15:30 | |
moritz_ | $^<identifier> are for list args, so $<other twigil><identifier> could be named args | ||
cognominal_ | the params hash everywhere is just structural code | ||
Tene | which hash? %_? | ||
nice idea | 15:31 | ||
moritz_ | pugs: sub f { say %_.perl } f(:a(b)) | ||
exp_evalbot | OUTPUT[***  Unexpected "." expecting "::" Variable "%_" requires predeclaration or explicit package name at /tmp/jQQZQxd5qk line 1, column 15] | ||
Tene | pugs: sub f { say %_.perl } f(:a<b>) | 15:32 | |
exp_evalbot | OUTPUT[***  Unexpected "." expecting "::" Variable "%_" requires predeclaration or explicit package name at /tmp/4xnAoeuiZ5 line 1, column 15] | ||
cognominal_ | I am rereading the synopsis so I may miss obvious things | ||
moritz_ | re JQuery translated in Perl6, do you have a link anywhere? | ||
cognominal_ | no, I am just playing with the idea | 15:33 | |
but get the original JQuery perl module and you will et the idea | |||
it is full of $my->{param}{remote} = 0 if ! defined $my->{param}{remote} ; | 15:34 | ||
where $my->{param} whould be a slurpi hash in Perl6 | |||
moritz_ | do you use $my as self? | 15:35 | |
cognominal_ | no in that code $my is not self | ||
moritz_ | can you name a particular method that you'd like to look me at? | ||
cognominal_ | any methods with $my->{param} | 15:36 | |
they are all over the place in the JQuery/*.pm modules | |||
moritz_ | why not just declare them as formal parameters? | 15:37 | |
it's a very good way to make the methods self-documenting | |||
cognominal_ | "> is there a pragma to promote pairs of slurpy hash to behave as lexicals as a temporary mesure before changing the signature and adding them as named parameter or as a way to avoid overcrowding the signature." | ||
moritz_ | well, the answer is "no", I guess | 15:38 | |
cognominal_ | I don't deny they can make formal parameter but they may be too numerous to be of any interest | ||
15:38
peeps[work] joined
|
|||
moritz_ | but overcrowed signatures are a design problem, not a language problem | 15:38 | |
[particle] | %my{param} // 0 | ||
%my{param} //= 0 | |||
cognominal_ | the design is out of the scope of Perl here, this is jquery | 15:39 | |
moritz_ | hmmm | ||
well, perhaps TimToady picks up your idea | |||
cognominal_ | this is just in idea, now it is in my log :) | ||
moritz_ | or you'll have to life a with either crowded formal parameters or a slurpy hash | 15:40 | |
[particle] | i don't understand what you're trying to do. flatten the hash? | ||
cognominal_ | I want to avoid to dereference explictely a hash | ||
moritz_ | [particle]: cognominal_ wants something like like $^a, $^b for named arguments | ||
cognominal_ | some twigil would say me this variable comme from the slurpy hash. | 15:41 | |
[particle] | ok, i see. | ||
cognominal_ | I don't care about the name of the slurpy hash so why should I other with it everywhere | ||
a twigil seems nicer that naming the slurpy hash in the body of the sub | 15:42 | ||
[particle] | does $%hash have meaning in perl 6 today? | ||
that is, can '%' be the twigil | 15:43 | ||
moritz_ | well, the idea is appealing because of the symmetry between named and positional args | ||
[particle] | yes, agreed. | ||
moritz_ thought of $|name, for no particular reason | |||
cognominal_ | appealing? english fails me here | ||
moritz_ | "looks nice to have" | 15:44 | |
cognominal_: what's your native language? | |||
cognominal_ | french | ||
and I am too lazy to reach the dict of my mackbook, shame on me | |||
moritz_ | appealing = attractive | 15:45 | |
in good approximation ;) | |||
15:45
devogon left
|
|||
[particle] | shame on us for writing in the *other* international language ;) | 15:45 | |
moritz_ | [particle]: like, uhm, Spanish? ;) | ||
[particle] | i meant chinese | ||
cognominal_ | we should go esperanto to be on equal footing :) | 15:46 | |
I suppose the asiatic would disagree | |||
moritz_ | actually chinese is spoken by many people, but not (officially) in many countries | 15:47 | |
cognominal_ | kudo for TimToady and co. The synopsis are not easu reading but very compelling. Good progress here. | 15:48 | |
s/easu/easy/ | |||
rhr_ | hard to find a new twigil. the ones taken are . ! + ? * = ^ and : $ @ % & / < _ ( can't be used there either, afaics | 15:51 | |
moritz_ | so | is still free? | 15:52 | |
cognominal_ | there are so much twigils | ||
what's the + for? | |||
rhr_ | | might work, but it looks a lot like ! | ||
moritz_ | yes | ||
rhr_ | + is for context vars | ||
cognominal_ | amazing, with many degrees of liberties added, Perl6 is already running out of ASCII chars | 15:54 | |
[particle] | we still have ` but it's (unofficially iirc) reserved for users | 15:55 | |
i suppose $'foo suggests a named var | 15:56 | ||
cognominal_ | back reading the synopses to get some lagunes in the see of my ignorance | 15:58 | |
[particle] | ah, "lagoons in the sea". | 15:59 | |
hey, wow! i understand french :) | 16:00 | ||
cognominal_ | arf, that does not translate in english | ||
16:00
kanru left
|
|||
cognominal_ | lagune is more like a bank of sand | 16:00 | |
[particle] | i knew what you meant, but yeah, lagoon must not be the translation for lagune | 16:01 | |
cognominal_ | and lacune is lacuna in English | ||
[particle] | more like "sand bar" | ||
16:04
kanru joined
16:05
devogon joined
16:10
Aankhen`` left
16:11
Aankhen`` joined
16:16
chris2_ joined,
luqui joined
16:17
chris2_ is now known as chris2
16:20
barney left
16:25
Patterner left
|
|||
pugs_svn | r19814 | putter++ | src/perl6/STD_extract: more constructs recognized. | 16:29 | |
16:29
stevan_ left
16:30
Psyche^ joined,
Psyche^ is now known as Patterner,
thepler joined
16:31
stevan_ joined
16:35
rindolf joined
|
|||
TimToady | $:foo is actually available, i think | 16:38 | |
16:40
REPLeffect joined
|
|||
moritz_ | pugs: sub f { say $:foo.perl } f(:foo('bar')) | 16:41 | |
exp_evalbot | OUTPUT[***  Unexpected ":foo" expecting "::" at /tmp/B9Zt5LCYRz line 1, column 14] | ||
moritz_ | oh, I misunderstood "available" ;) | 16:42 | |
16:42
vainguard joined
|
|||
cognominal_ | TimToady owns the colon :) | 16:48 | |
moritz_ | all your colon are belong to us | 16:50 | |
16:51
aindilis joined
|
|||
TimToady | now if you really want to start confusing people, write foo(:$:foo) | 16:52 | |
16:56
justatheory joined
16:57
rindolf left
16:58
vainguard left
16:59
vainguard joined
17:00
vainguard left,
vainguard joined
17:01
jjore left
|
|||
[particle] | ::('$')(:$:_) | 17:04 | |
cognominal_ | so we will have the visual equivalent of tongue twisters in Perl6 | 17:06 | |
any sufficient rich language cannot avoid that | 17:07 | ||
ton thé t'a t'il oté ta toux :) -> has you tea got rid you of your cough | 17:09 | ||
17:09
djm joined
|
|||
moritz_ | cognominal_: "simple things should look simple, weird things should look weird" ;) | 17:13 | |
17:15
pcbuetow joined
|
|||
pugs_svn | r19815 | lwall++ | Fixed smartlink. | 17:18 | |
17:25
IRSeekBot joined
17:28
silug left
17:32
silug joined
|
|||
cognominal_ | following on the implication of my twigil nad my study of JQuery , this may means that a object may have optionnal attributes declared as $:a and that a constructor may have a slurpy hash too. | 17:39 | |
s/nad/and/ | |||
I can't see the ramification | |||
ho, that can't do, that should be $.:a , arf multiletter twigils :( | 17:42 | ||
17:45
cognominal_ left,
cognominal_ joined
17:47
Aankhen`` left,
Aankhen`` joined
|
|||
pugs_svn | r19816 | rhr++ | [Unicode.pm] delegate encoding to pack/unpack | 17:49 | |
[particle] | thrigils! | 17:50 | |
TimToady | all attributes are optional already :) | ||
at least, everything derived from Object is already a "maybe" type | |||
moritz_ | recursive countable n-igils! | ||
[particle] | you can't do $.^a so i don't see how $.:a would make sense | 17:51 | |
pugs_svn | r19817 | rhr++ | [assign.t] some more cun-n-paste errors | 17:52 | |
cognominal_ | anyway I find that JQuery is a good yardstick for conversion in Perl6 | 17:54 | |
maybe, Perl6 should be called haskell :) | |||
17:56
jferrero joined
|
|||
moritz_ | no, its syntax is much prettier | 17:56 | |
TimToady | significant whitespace, ugh! :P | 17:57 | |
[particle] | i can't believe you chose to steal *that* from python. of all things.... | ||
:P | |||
cognominal_ | python predates haskell? I don't think so | 17:58 | |
TimToady | yes, but at least I'm sneaky about it | ||
cognominal_ | ho, I was confused | 17:59 | |
TimToady | gee, an unclear antecedent to a pronoun, fancy that... | ||
reminds me I should go read PerlMonks this morning... | |||
ruoso just received the result for the grant proposal on smop with 6 votes no, 2 abstentions and no vote for yes... it appears that the perl foundation is not very much -Ofun oriented... one of the comments: "I think there is no need in more engines for Perl 6. I think that ONE is required, and people should work on it. If Parrot is the one more developed, I think we should grant parrot projects;" | 18:04 | ||
pugs_svn | r19818 | lwall++ | Added : twigil | ||
[particle] | ruoso: that's a real shame. imo the problem is that the grants committee is full of p5 folk | ||
ruoso | m completely against new runtimes. Let's not reinvent every | 18:05 | |
wheel at once. | |||
* Not yet another Perl 6 compiler/runtime/implementation/whatever! | |||
There are way to many already. | |||
these are some other comments | |||
moritz_ | jerks | 18:06 | |
that contradicts the "not one official perl6 implementation" idea | 18:07 | ||
[particle] | apparently the grants committee hasn't read the perl 6 spec. | ||
TimToady | well, tpf should really be named "The Parrot Foundation", I suspect | ||
[particle] | or, chooses not to agree with it. | ||
ruoso | it's sad, specially now that I've finished the stage 0 of smop | 18:08 | |
TimToady | well, not many people actually get paid to do any of this, alas... | ||
ruoso | and I was counting on the grant to deliver more time to it | ||
moritz_ | ruoso: did you apply for a "real" grant, or for a perl 6 microgrant? | 18:20 | |
ruoso | real grant | ||
18:20
cosimo left
18:21
cosimo joined
|
|||
ruoso | later & | 18:23 | |
18:23
manfred joined,
cosimo left
|
|||
diakopter wonders what TPF is planning to do with all of its money in the bank | 18:24 | ||
[particle] | we may never find out. | ||
diakopter | I suppose endowing its own overhead is not out of the question | ||
18:30
barney joined
18:31
zamolxes left
18:33
ebassi left
18:34
tewk left,
tewk joined
|
|||
cognominal_ | can one write my $a, $b meaning the Perl5 my ($a, $b)? | 18:34 | |
moritz_ | pugs: my $a, $b = 2, 3; say $a, '|', $b | 18:35 | |
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "$b" requires predeclaration or explicit package name at /tmp/nqk8ggfLuK line 1, column 10] | ||
cognominal_ | ok | 18:36 | |
moritz_ | cognominal_: don't take pugs as a spec ;) | ||
cognominal_: btw your proposal of a new twigil has been accepted (in case you don't read p6l) | 18:37 | ||
cognominal_ | I hope this is a good idea | ||
[particle] | indeed, it is. it's in the spec now :) | ||
cognominal_ | well, Larry is always right ... even if he changes his mind | 18:38 | |
moritz_ | honestly, I don't think it's all that usefull, but it's certainly not harmful, and nice to have ;) | 18:39 | |
cognominal_ | at least, it proves that I understant the general Perl6 zeitgeist | 18:40 | |
18:40
lisppaste3 left
18:41
DarkWolf84 joined,
wknight8111 joined
18:53
Aankhen`` left,
GeJ left,
lisppaste3 joined
18:55
qmole joined
|
|||
TimToady | Or I suppose we could rename it the Turf Protection Foundation... | 19:14 | |
cognominal_ | buzz is entered in the judiciary french language thx to the suite of our president and our first lady against Ryanair :) | 19:22 | |
19:22
meppl left
|
|||
cognominal_ | even though we have (had?) a low against the gratuitous use of hte english language | 19:23 | |
...has entered | |||
moritz_ | not just against English, IIRC | ||
cognominal_ | yea, but English is the perceived menace. | 19:24 | |
moritz_ | the enemy, just across the channel ;) | 19:25 | |
[particle] | and the pond :) | ||
19:25
barney left
|
|||
cognominal_ | anyway. thx to the writer strike, no more american series and movies will protect us | 19:26 | |
for the perfid Aliban, that's another story | 19:27 | ||
Albion! | 19:28 | ||
19:35
icwiener joined
|
|||
[particle] checks if the 'self' keyword is in STD.pm | 19:41 | ||
ah, there it is. | 19:42 | ||
however, some uses of self in the grammar itself use a sigil, others don't | |||
moritz_ | it shouldn't have one, I guess | 19:43 | |
unless you assign it, or use it in my_methods($self: $other, $ags) | |||
[particle] | ok, actually it all looks good | ||
my $self = qlang(...) | |||
that's the only use with sigil | 19:44 | ||
19:45
REPLeffect left
|
|||
jnthn | [particle]: lwall++ added term:self at the weekend; I put it into the Rakudo grammar, a tad differently. See comment. | 19:47 | |
19:47
vainguard left
|
|||
[particle] | fab. yep, we need to put those in the grammar a bit differently since we don't have protoregexes yet | 19:48 | |
DarkWolf84 | so 'self' will be part of the grammar | 19:49 | |
jnthn | Well, for other reasons too... | ||
DarkWolf84 | ? | 19:50 | |
jnthn | [particle]: Not only did I ad the parse rule, I added an action too, so self actually works. ;-) | ||
DarkWolf84: Yes, the self keyword/function is in the grammar. | |||
19:51
vainguard joined
|
|||
moritz_ | rakudo: class Foo { method bar { say self } }; | 19:51 | |
exp_evalbot | RESULT[Null PMC access in find_method()current instr.: '_block10' pc 19 (EVAL_10:10)called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)called from Sub | ||
..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/HLLCompiler.pir... | |||
cognominal_ | how would you translate that in Perl6? ref($c) =~ /\S/ | 19:52 | |
jnthn | Hmm... | ||
cognominal_ | and $object.can('get_css') ; | 19:53 | |
moritz_ | cognominal_: most ref($something) tests are now done with the Smart match operator | ||
jnthn | rakudo: class Foo { method bar { say "hi"; }; method baz { self.bar(); }; }; my $x = Foo.new(); $x.baz(); | 19:54 | |
exp_evalbot | OUTPUT[hi] | ||
wolverian | why does it need to be in the grammar? | ||
moritz_ | so the first might be $c ~~ Object or something | ||
cognominal_ | that would mean $c is an instance of a subclass of Object, meaning any class | 19:55 | |
moritz_ | cognominal_: $object.can('get_css') perhaps 'get_css' ~~ $object.HOW.methods # dunno if there's an easier way | ||
cognominal_: aye | |||
cognominal_: what you you like ref($c) =~ m/\S/ to mean? | |||
wolverian | $object.?get_css(); | ||
moritz_ | wolverian: sounds much clearer ;) | 19:56 | |
19:56
pbuetow left
|
|||
cognominal_ | this is in JQuery, test if the var is an obj or a string | 19:56 | |
19:56
pbuetow joined
|
|||
wolverian | you'd probably use signatures in perl 6 | 19:56 | |
multi foo (Str $bar) { ... } multi foo (Object $bar) { ... } # or so | 19:57 | ||
moritz_ | cognominal_: $c ~~ Str ? | ||
cognominal_ | I don't know if I will go anywhere playing with JQuery but I lean a log of Perl 6 | ||
wolverian | though certainly you can do it in one method too. it's just a bit ugly, given that multimethods are so natural. | ||
cognominal_ | yea | ||
"I learn a lot of Perl6" | |||
I can't type on this macbook keyboard and I don't know anymore how to type on any other keyboard :( | 19:58 | ||
$object.?get_css(); calls get_css() if it exists but the code involves has a rupture of sequence if get_css is not defined so here this is not the right way | 20:02 | ||
20:02
riffraff left
|
|||
[particle] | jnthn++ # that is SO COOL! | 20:02 | |
moritz_ | so who's going to the German Perl Workshop next week? | 20:03 | |
cognominal_ | I wish I spoke german | 20:04 | |
but French don't speak anything but french | 20:05 | ||
moritz_ | it takes place in my home town and I have vacations, so I'll surely go there | ||
cognominal_ | where is that? | ||
moritz_ | Erlangen | ||
close to Nürnberg, if you happen to know that | 20:06 | ||
cognominal_ | I know the Erlangen program thx to Felix Klein but not the town itself | 20:07 | |
jnthn | moritz_: In a last minute change of plan - I will be there! | ||
moritz_ | jnthn: cool | ||
jnthn | cognominal_: Ich speaken kein Deutsch, but I'm gehen anyway. ;-) | 20:08 | |
[particle]: It's only a fancy way of writing say "hi"; ;-) | |||
cognominal_ | :) | ||
[particle] | jnthn: the madness is in the method :) | 20:09 | |
jnthn | <groan> | ||
20:10
namelessuser joined
|
|||
jnthn | Wonder why say self blows up... | 20:10 | |
moritz_ | jnthn: perhaps it doesn't know how to stringify? | ||
jnthn | moritz_: Yeah, I think so too. | 20:11 | |
[particle] | say $( self ) | ||
jnthn | How do classes stringify? | ||
[particle] | i forget. need to check the spec | 20:12 | |
moritz_ | according to their Str method ;) | ||
20:12
luqui left
|
|||
moritz_ | don't know what the default method is, though | 20:12 | |
[particle] | what do the pugs tests say? | 20:13 | |
t/oo hasn't been moved to t/spec yet | |||
jnthn | The PIR that the compiler is generating looks sane, at least. | ||
pugs: class Foo { method bar { say self; }; }; my $x = Foo.new(); $x.bar(); | |||
exp_evalbot | OUTPUT[<obj:Foo>] | ||
[particle] | jnthn: it could call the parrot 'name' method | 20:14 | |
that looks like haskell underneath | |||
jnthn | class Foo { method bar { say self; }; }; | 20:15 | |
my $x = Foo.new(); $x.bar(); | |||
TimToady | cognominal_: no, $object.?method merely returns undef if there is no such method | ||
jnthn | get_string() not implemented in class 'Foo' | ||
cognominal_ | thx | ||
TimToady | now if you try to use the value without checking it, then you could get an exception thrown | ||
20:16
pbuetow left,
pbuetow joined
|
|||
TimToady | but I think you'll see a lot of $object.?method // "NONESUCH" | 20:16 | |
jnthn has been writing too much C#, and mis-read // as a comment there | 20:17 | ||
TimToady | there's a sense in which it is certainly less important than the mainline code | ||
20:18
manfred left
|
|||
[particle] | unsurprisingly, perl hasn't stolen much from C++ | 20:18 | |
jnthn | :-) | ||
TimToady | it stole the idea of *not* putting const everywhere... | ||
:) | |||
wolverian | "orelse" works pretty well there too | ||
TimToady | or would, if anyone implemented it yet | 20:19 | |
wolverian | though for now I go "huh? where's the STM here?" when I see it | ||
well, if I saw it... | |||
jnthn | orelse is to // what or is to ||? | ||
wolverian | yes | 20:20 | |
[particle] | rakudo: my $x; say ($x orelse 'foo'); | ||
exp_evalbot | OUTPUT[Null PMC access in invoke()current instr.: '_block10' pc 28 (EVAL_10:15)called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)called from Sub | ||
..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/HLLCompiler.pir:676)... | |||
TimToady | mostly | ||
it also captures the undefined value into $! for handiness | |||
[particle] | hrmm | ||
TimToady | which // doesn't | 20:21 | |
[particle] | 'orelse' is in the rakudo opp | 20:22 | |
but infix:orelse doesn't seem to be implemented | |||
jnthn | Time to go do some $REAL_LIFE for a bit... & | 20:23 | |
wolverian | I was going to look at it, but before pulling parrot I realised my git is at least a week old, so now I'm rebuilding git.. I'll probably get distracted by something else in a few minutes | ||
20:24
njbartlett joined
|
|||
TimToady | andthen :) | 20:24 | |
[particle] | don't fear the yak. | ||
TimToady | andthen andthen andthen andthen | ||
wolverian | butfirst | 20:25 | |
TimToady | butwait! | 20:26 | |
[particle] | whatif | ||
wolverian | eventhough | ||
[particle] | noway | ||
spinclad_ | pleasedon't | 20:30 | |
20:31
pbuetow left
|
|||
spinclad_ | inasmuchaswhich | 20:32 | |
wolverian | isn't that cobol? | ||
spinclad_ | insofaras it's anything, maybe | ||
whereas | 20:33 | ||
andyet | |||
20:34
pbuetow joined
|
|||
[particle] | pleasepleaseplease | 20:35 | |
spinclad_ | [puppyeyes] | ||
moritz_ | actually eiffel has the "implies" keyword, where "a implies b" is (not a) or b | ||
spinclad_ | ew, how boolean! | 20:36 | |
20:36
vainguard left
|
|||
moritz_ | actually it's pretty useful - eiffel is very strong on design by contract, and that makes it more readable in some places | 20:36 | |
[particle] | parrot has complete boolean logic support, including xand | 20:38 | |
a and b, but not both | 20:39 | ||
spinclad_ | [useful] oh, definitely -- i just think of when a isn't (known to be) true or false (yet). | ||
20:39
ebassi joined
|
|||
spinclad_ | such as a protoobject of its type | 20:39 | |
20:40
__Ace__ joined
|
|||
spinclad_ | 'a implies b' when a's truthspace is inside b's | 20:41 | |
moritz_ | that's a perfect exercise to define such an op at runtime | ||
spinclad_ | when b is ineverycase at least as true as a | 20:43 | |
20:44
spinclad_ is now known as spinclad
|
|||
TimToady | well, "implies" is easily expressed in Perl 6 as !?> :) | 21:00 | |
moritz_ | and _so_ readable | 21:01 | |
TimToady | well, it's like math's ->, with the unexplanatory - replace with the elements of logic ? and ! | ||
*replaced | |||
21:02
meppl joined
|
|||
spinclad | idle question: is ?Bool just == Bool? (that is, boolifying the generic Boolean) (and not true or false, like most ?<expr>) | 21:04 | |
TimToady | 'course, we haven't actually defined ?> as boolean right shift yet... | ||
and you can't use a ! metaoperator on anything that isn't a chaining comparator... | 21:05 | ||
spinclad | i thought boolean right shift would be ?>> | ||
(as opposed to >>?>>) | 21:06 | ||
TimToady | maybe that means ?| and ?& and ?^ really belong at the comparator level, not the additive level | ||
no, we reduced them to single > and < to avoid confusion with Texas quotes | |||
spinclad | and gain confusion with comparison... | 21:07 | |
TimToady | troonuff | ||
but that's just mental confusion, not parser confusion | |||
spinclad | but Texas quotes are deeper parsering | ||
right | 21:08 | ||
21:18
gbacon left,
gbacon joined
21:30
iblechbot left,
GeJ joined
21:32
sri_work joined
21:34
njbartlett_ joined
21:48
whiteg joined
21:50
njbartlett left
21:51
jhorwitz left
22:03
kst left
22:04
kst joined
22:11
DarkWolf84 left
22:16
TJCRI left
22:22
vainguard joined
|
|||
ruoso | TimToady, Undef isa Object? | 22:25 | |
moritz_ | pugs: say Undef ~~ Object | ||
exp_evalbot | OUTPUT[*** No such subroutine: "&Undef" at /tmp/5yOxIcjRtn line 1, column 5 - line 2, column 1] | ||
moritz_ | pugs: say undef ~~ Object | 22:26 | |
exp_evalbot | OUTPUT[1] | ||
ruoso | kp6: say Undef ~~ Object | ||
exp_evalbot | r19818: OUTPUT[no method 'APPLY' in Class 'Undef' at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345 KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824be54)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 | ||
..main::DISPATCH('HASH(0x824be54)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin... | |||
22:26
icwiener left
|
|||
ruoso | the thing is... is it right? | 22:26 | |
22:28
apple-gunkies left
|
|||
ruoso | I've been thinking on how to implement p6opaque and the classes in smop... | 22:28 | |
in theory, a class is "Undef" with add ons... | 22:29 | ||
like | |||
my $foo = Undef; | |||
$foo.^add_method(name => 'bar', code => $baz); | 22:30 | ||
[particle] | why are you capitalizing? looking for a basic type called 'Undef'? | ||
or the value 'undef'? | |||
ruoso | well... as per S02, "undef" is a function, not a value | ||
[particle] | ok, nullary function, like self. | ||
<term> | 22:31 | ||
ruoso | yep... the value is of the Undef type | ||
there's no "native undef" | |||
Undef is a class like any other... | |||
except that it returns false to "defined" | 22:32 | ||
[particle] | ah, i see in S02 | ||
TimToady | Object is the most generic Undef class | ||
but all "classes" in p6 are protoobjects, and hence typed versions of undef | |||
one could argue that undef === Object should return true | |||
[particle] | my Undef $x = 2; | 22:33 | |
ruoso | so, taking a copy of undef and adding methods is a sane way of creating a class... | ||
TimToady | well, but p6 really has no classes in that sense, it has protoobjects and metaclasses | ||
22:34
blindfish left
|
|||
ruoso | yeah... yeah... | 22:34 | |
TimToady | class Foo is already the undef you | ||
want | |||
ruoso | I know... but I'm not talking about syntax... | 22:35 | |
TimToady | pugs: class Foo {}; defined(Foo) | ||
ruoso | but about runtime | ||
exp_evalbot | RESULT[Bool::False] | ||
ruoso | how one would do it by reflection code | ||
s/reflection/introspection/ | |||
ruoso wonders why java uses "reflection" | |||
TimToady | well, more or less the way Moose and MO handle it | 22:36 | |
ruoso have to take a look in MO looking for that in specific... | 22:37 | ||
TimToady | you should probably mostly be talking to nothingmuch and stevan at this point | ||
I ignore everything that goes on behind the .HOW curtain :) | 22:38 | ||
ruoso | but isn't this something that should work across implementations? | ||
I mean... shouldn't .HOW have an API | 22:39 | ||
TimToady | the basic methods need to be interoperable, yes | ||
and nothingmuch's MO is pretty much what everyone should be aiming for | |||
ruoso | ok... just before I get in deep MO again... | 22:40 | |
pugs_svn | r19819 | putter++ | src/perl6/STD.pm: normalize a couple of unusual { } indentations. | ||
TimToady | however, stevan's implementation of Moose is a solider implementation | ||
22:40
Limbic_Region joined
|
|||
TimToady | but doesn't yet (I don't think) do Responder Interfaces quite MOish | 22:40 | |
I sure hope putter knows about cheat and metholate already... | 22:41 | ||
but he seems to be scarce around here lately... | |||
ruoso | my $foo = Undef.clone(); $foo.^add_method(name => 'foo', code => $bar, signature => $sig); seems like a sane way of initializing a new anonymous class | 22:42 | |
TimToady | s/Undef/Object/ | ||
there is no Undef type | |||
22:43
xeridon joined
|
|||
ruoso | hm? | 22:43 | |
TimToady | there is no Undef type | ||
ruoso lost now | |||
TimToady | the type of "undef" is Object | ||
Object is the most generic undefined type | 22:44 | ||
ruoso | ah.. ok.. Undef is simply anything that returns false to "defined" | ||
22:44
xeridon left
|
|||
[particle] | s/putter/mncharity/ | 22:44 | |
TimToady | was doing that already | ||
pugs_svn | r19820 | putter++ | src/perl6/STD_extract: Additional constructs recognized (feature complete?). Command-line controlled output. Todo and questions. | 22:45 | |
TimToady | still scarce | ||
22:46
vainguard left
|
|||
TimToady | sure looks to me like he's reinventing cheat/metholate | 22:46 | |
22:46
vainguard joined
|
|||
TimToady | maybe it needs to be reinvented, but still... | 22:46 | |
maybe I'm just irritated because I can no longer type "vi S<tab>" and get it to complete :) | 22:48 | ||
Tene | TimToady: what if you just press tab extra hard? | 22:49 | |
analog sensitivity in a keyboard would have some interesting uses... | |||
Especially if integrated with an editor and a programming language. To refer to a global variable, type the name extra hard! | 22:50 | ||
TimToady | well, if the vibrations push down the shift and 8 keys simultaneously, it might just work | 22:51 | |
@seen mncharity | 22:52 | ||
lambdabot | I saw mncharity leaving #perl6 2d 17h 2m 24s ago, and . | ||
Tene laughs and gets a funny look from a student. | |||
22:56
ebassi left
|
|||
ruoso | pugs: class Foo { }; my $a = Foo.new(); say $a.HOW() === Foo.HOW() | 23:04 | |
exp_evalbot | OUTPUT[1] | ||
ruoso | pugs: class Foo { }; say Foo.clone().HOW() === Foo.HOW() | 23:05 | |
exp_evalbot | OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14 at /tmp/p7DhvUJDth line 1, column 20 - line 2, column 1] | ||
ruoso | pugs: class Foo { }; my $a = Foo.clone(); say $a.HOW() === Foo.HOW(); | 23:06 | |
exp_evalbot | OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14 at /tmp/NhmBGOyUl0 line 1, column 19-35] | ||
23:06
kst left,
kst joined
|
|||
ruoso | pugs: class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW(); | 23:07 | |
exp_evalbot | OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14 at /tmp/aiSBJyXUvw line 1, column 19-33] | ||
ruoso | pugs: class Foo { }; my $a = Foo; my $b = $a.clone(); say $b.HOW() === Foo.HOW(); | ||
exp_evalbot | OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14 at /tmp/oIMBXyhu2n line 1, column 32-47] | ||
TimToady | I don't believe pugs implements .clone, nor does it really quite implement .HOW | 23:08 | |
ruoso | hmmm... | ||
but do you think the way I'm going is sane? | 23:09 | ||
23:09
mattz_ joined,
vainguard left
|
|||
ruoso | if Foo.clone().HOW() !=== Foo.HOW(), then I can use it as a way to boot new classes | 23:11 | |
TimToady | well, merely saying class {} ought to get you an anonymous class derived from Object | 23:15 | |
but puts doesn't do that | |||
*pugs | |||
ruoso | sure... but again... I'm using p6 syntax here just for simplicity... | ||
Limbic_Region | pugs does an extraordinary amount considering it hasn't really been maintained for over a year | ||
ruoso | I'm talking about the runtime... or better... which code will be executed for "class { }" | ||
23:17
marmic left
|
|||
TimToady | I don't have an opinion on the subject, as long as it ends up with an anonymous class derived from Object | 23:18 | |
ruoso | heh | ||
23:19
peeps[work] left
23:20
marmic joined
23:21
silug_ joined
23:23
mattz left
23:25
silug left
|
|||
Limbic_Region | TimToady - are you following rakudo much? | 23:26 | |
23:26
silug_ left
|
|||
TimToady | pretty much | 23:26 | |
23:27
silug joined
|
|||
Limbic_Region | have any feel for how much is implemented compared to pugs? | 23:28 | |
seems like many features that get implemented don't equate to more passing tests with spectest | |||
ruoso | rakudo: class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW(); | ||
exp_evalbot | OUTPUT[Method 'clone' not found for invocant of class ''current instr.: '_block10' pc 9 (EVAL_9:8)called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)called from Sub | ||
..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/H... | |||
TimToady | we've only ported over a smattering of tests so far | ||
Limbic_Region | right | 23:29 | |
TimToady | and I doubt they're always the simple ones :) | ||
Limbic_Region | which is why it is difficult for me to judge | ||
since I am not following | |||
source that is | |||
ruoso | kp6: class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW(); | ||
exp_evalbot | r19820: OUTPUT[syntax error at position 47, line 1 column 47:class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW() ^ HERE] | ||
moritz_ | I think it's far from pugs' feature completeness | ||
ruoso | kp6: my $a = Object.clone; say $a.HOW() === Foo.HOW(); | 23:30 | |
exp_evalbot | r19820: OUTPUT[syntax error at position 35, line 1 column 35:my $a = Object.clone; say $a.HOW() === Foo.HOW() ^ HERE] | ||
TimToady | It's probably closer to having a fast compiler, and the parts associated with that, but the rest isn't there yet | ||
on the other hand, they're implementing something close to MO | |||
23:31
vainguard joined
|
|||
TimToady | it remains to be seen whether the subsurface structure is solid or rotten to support the superstructure... | 23:33 | |
jnthn | TimToady: If you've an object and you stringify it, is there some default method that's called to get the string representation that you define in your class, and what should the default stringification of an object me? | ||
Limbic_Region | . o O ( .perl ? ) | ||
jnthn | Or if I've missed the appropriate bit of the synonypis, just point me at it... | ||
s/me/be/ | 23:34 | ||
TimToady | see S13:212 | 23:35 | |
23:35
vainguard left
|
|||
moritz_ | .perl is the equivalent to Data::Dumper | 23:35 | |
TimToady | method Str is export {...} | ||
Limbic_Region | moritz_ - let's hope not | ||
moritz_ - more like, .perl is like Data::Dump::Streamer only better ;-) | 23:36 | ||
moritz_ | Limbic_Region: not in the litereal sense ;) | ||
pugs: my $a = sub { }; say $a.perl | |||
exp_evalbot | OUTPUT[\sub :(@_) "$_" := "Scalar" #<Scalar:0xb7b1c380> "@_" := "Array" #<Array:0xb7b1c378> "&?ROUTINE" := "Sub" #<Sub:0xb6604df4> "&?BLOCK" := "Sub" #<Sub:0xb6604df4> {"$_" := "Scalar" #<Scalar:0xb7270e78> "@_" := | ||
.."Array" #<Array:0xb72d245c> ... | |||
jnthn | TimToady: Thanks. | 23:37 | |
TimToady | kp6: my $a = sub { }; say $a.perl | ||
exp_evalbot | r19820: OUTPUT[{ ... }] | ||
TimToady | hmm, that's kind of a misuse of ... there | 23:38 | |
ruoso | www.perlfoundation.org/perl6/index....ementation -- first sketches... | ||
23:39
vainguard joined
|
|||
pugs_svn | r19821 | putter++ | src/perl6/STD_extract: a minor start at regex pattern analysis. | 23:39 | |
ruoso | any review on the above sketches are very much welcome | 23:42 | |
23:43
alester is now known as AndyAway,
wknight8111 is now known as wknight-away
|
|||
rakudo_svn | r25542 | jonathan++ | [rakudo] Tweaks to inheritance so now we can inherit from Bool, etc. | 23:52 | |
pugs_svn | r19822 | lwall++ | [STD_extract] query to putter who is ignoring #perl6 :) | 23:53 | |
23:59
kst left
|