»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | tinyurl.com/p6contest Set by moritz_ on 28 December 2010. |
|||
00:01
VXZ left
|
|||
dalek | tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....eta_tablet | 00:03 | |
00:09
Chillance left
00:10
MayDaniel_ left
|
|||
snarkyboojum is off to linux.conf.au in a couple of weeks.. a few perl talks happening, but no perl6 :| | 00:13 | ||
will see if I can find a few surreptitious perl6 hackers tho :) | |||
and drag them into #perl6 :) | 00:16 | ||
00:16
cafesofie joined
|
|||
coldhead | linux.conf.au is on the banks of the river that flooded... | 00:18 | |
one of the* | 00:19 | ||
fingers crossed | |||
snarkyboojum | yep.. it's still going ahead though.. not the ideal scenario, but things are settling down in brisbane after the floods | ||
00:22
GinoMan left
00:23
dorlamm left
00:28
felliott left
00:30
felliott joined
00:40
huf left
00:51
ashleydev left
00:53
felliott left,
ashleydev joined
00:56
QinGW joined,
huf joined
01:00
simon__ left
01:11
felliott joined
01:12
PerlJam left
01:13
pmichaud left
01:15
Juerd left,
tadzik left,
Util left,
PerlJam joined
01:16
Util joined,
Juerd joined
01:20
pmichaud joined
01:28
felliott left
01:40
KatrinaTheLamia left
01:54
KatrinaTheLamia joined
01:57
cosimo left
02:03
GinoMan joined,
noganex left
02:04
cosimo joined
02:06
noganex joined
02:19
VXZ joined
02:23
noganex left
02:30
noganex joined,
KatrinaTheLamia left
02:40
payload left
02:41
QinGW1 joined
02:42
cafesofie left
02:44
QinGW left
02:45
GinoMan left
02:48
ashleydev left,
felliott joined
02:49
felliott_ joined,
felliott left,
felliott_ is now known as felliott
02:53
lichtkind joined
|
|||
lichtkind | p5=> is gone? | 02:54 | |
i think yes | |||
i remember | |||
thanks | |||
dalek | tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....kup_tablet | 02:57 | |
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....tor_tablet | 03:03 | ||
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....tor_tablet | 03:08 | ||
03:10
felliott left
|
|||
dalek | tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....tor_tablet | 03:14 | |
03:16
xinming_ left,
lichtkind left
03:19
felliott joined,
cotto_work left
03:21
cotto_work joined,
xinming joined
03:27
tadzik joined
03:28
GinoMan joined
03:30
am0c joined
03:31
vmspb left
03:32
envi joined
03:34
KatrinaTheLamia joined
03:37
Intensity joined
03:39
QinGW1 left
03:42
VXZ left,
QinGW joined
04:06
felliott left
04:13
satyavvd joined
04:16
cafesofie joined
04:17
felliott joined
04:21
ashleydev joined
04:23
Su-Shee joined
04:24
QinGW left,
QinGW joined
04:27
Su-Shee_ left
04:30
felliott left
04:38
ashleydev left
04:39
ashleydev joined,
ashleydev left
04:43
QinGW left,
jferrero left
04:44
QinGW joined
05:19
willco left
05:23
QinGW left
05:28
QinGW joined
|
|||
coldhead | wait wait wait wait | 05:34 | |
petdance.com, sister site to rakudo.org, is host to the big black/rapeman archive? | 05:35 | ||
:O | |||
petdance.com/actionpark/ | 05:36 | ||
i am stunned | |||
05:43
QinGW left
05:44
QinGW joined
05:55
kaare_ joined
06:01
ponbiki left
06:02
ponbiki joined
06:03
QinGW left
06:04
QinGW joined
|
|||
perigrin | petdance.com is the sistersite to rakudo.org? | 06:28 | |
coldhead | same "webmaster" | 06:29 | |
perigrin | right | ||
but beyond that how are they possibly related? | 06:30 | ||
other than Andy hosts both of them? | |||
coldhead | well i was down on andy for rakudo.org stability problems. but now all is forgiven | ||
i'm mostly surprised at what a small world it can be, perl6 & a venerable big black site | 06:31 | ||
old & new, etc. nevermind | |||
perigrin | :) | 06:32 | |
06:33
Patterner left
06:34
Psyche^ joined,
Psyche^ is now known as Patterner,
awwaiid left
06:36
awwaiid joined
06:41
awwaiid left
06:43
awwaiid joined
06:44
Tene joined,
Tene left,
Tene joined
06:46
jnthn left
06:47
jnthn joined
06:48
simcop2387 left
06:52
awwaiid left
06:57
envi left
07:10
dukeleto left
07:11
dukeleto joined
07:18
simcop2387 joined
07:24
justatheory left
|
|||
moritz_ | good morning | 07:25 | |
07:27
wtw joined
07:28
awwaiid joined
07:32
awwaiid left
07:42
dukeleto left
07:43
dukeleto joined
07:47
cafesofie left
08:04
QinGW left
08:05
QinGW joined
08:18
cafesofie joined
08:19
sftp left
08:20
dukeleto left
08:21
dukeleto joined
|
|||
snarkyboojum | moaning | 08:23 | |
08:28
[particle] left
|
|||
dalek | kudo: 388eed7 | moritz++ | docs/ChangeLog: another ChangeLog entry |
08:30 | |
snarkyboojum | moritz_: that test harness you included in niecza recently.. is that supposed to be able to be run with t/run_spectests? | 08:41 | |
08:45
QinGW left,
QinGW joined
08:51
kensanata joined
|
|||
snarkyboojum | because it ain't workin' no mo' :P | 08:56 | |
Tene | anyone have any idea what sorear needs from me, re his post in #phasers? | 08:59 | |
09:02
satyavvd left
09:03
araujo left
09:04
cjk101010 joined
09:05
QinGW left
09:06
satyavvd joined
09:07
QinGW joined
09:09
agentzh joined
09:27
masak joined
|
|||
masak | oh hai, #perl6 | 09:27 | |
snarkyboojum | masak: o/ | 09:38 | |
09:39
sftp joined
|
|||
jnthn | morning, #perl6 | 09:40 | |
snarkyboojum | jnthn: o/ | ||
heh | |||
09:49
orafu left
09:50
orafu joined
09:51
lopaway is now known as lopnor
09:58
dakkar joined
|
|||
lopnor | hello, | 09:59 | |
snarkyboojum | hi lopnor | ||
lopnor | i have a question about regex in perl6, | ||
can I ask? | |||
masak | yes. always. | ||
snarkyboojum | please do. | ||
lopnor | i'd like to get 'not tab strings' | 10:00 | |
in perl5, i'll write $str =~ /[^\t]+/ | |||
or something, | |||
jnthn | Maybe \T+ works... | ||
masak | / ^ \T* $ / | ||
lopnor | then, | ||
not 'tab or newline' | 10:01 | ||
jnthn | <-[\t\n]> | ||
lopnor | will be /<[\T\N]>+/ or something? | ||
jnthn: i tried with rakudo, | |||
jnthn | No, need a negated char class for that I think... | ||
10:01
jlaire left
|
|||
lopnor | it matched 't' and 'n' | 10:01 | |
masak | lopnor: yes, that won't work. | ||
lopnor: everything matches <[\T\N]> | 10:02 | ||
jnthn | [\T & \N]+ # is probably along the lines of what you were trying to do with the char class, but it's no doubt slow as well... :) | 10:03 | |
masak | [<!before \n> \T]* | ||
lopnor | ah, | 10:04 | |
jnthn | masak: What I just wrote almost boils down to the same thing, fwiw. | ||
10:04
QinGW left
|
|||
masak | guess so, yes. | 10:04 | |
jnthn | masak: As in, I think & is implemented either very much like before or maybe even in terms of it. | ||
masak | not in PGE. | ||
jnthn | Yes, but I didn't read the source to that. :P | 10:05 | |
lopnor | thank you! | ||
i understand now! thank you everyone! | |||
masak | & has the additional restriction that the two operands need to match the same length substring. | ||
lopnor: come back for more questions anytime. | |||
jnthn | masak: True | ||
lopnor | masak: thank you. i will. | ||
10:06
jlaire joined
|
|||
masak | jnthn: I remember being flabbergasted at the complexity of &, and then it all fell into place. in the end it was trivial to implement; just let backtracking handle all of the logic. | 10:07 | |
in the end, it's because of backtracking that & is expensive. it does backtracking in both operands, a bit like X does. | |||
jnthn | Makes sense. | 10:09 | |
10:10
cafesofie left
|
|||
snarkyboojum | so this doesn't work? | 10:12 | |
jnthn | "this"? | ||
snarkyboojum | rakudo: my $text = "\t"; if $text ~~ /<-[\t]>+/ { say "no tabs" } | ||
p6eval | rakudo c664e8: OUTPUT«no tabs» | ||
snarkyboojum | I'm misunderstanding something :) | ||
jnthn | oh, ETOOIMPATIENT :) | 10:13 | |
snarkyboojum | could be bier and regex don't match :P | ||
jnthn | snarkyboojum: huh, I'd expect that to work too... | ||
Oddness | |||
masak | it's a known bug. | ||
jnthn | Oh. | ||
masak | nqp-rx doesn't recognize backslashed things in charclasses. | 10:14 | |
snarkyboojum | ah, that's what I thought our friend lopnor was raising | ||
masak++ # the human bug database | |||
masak | that's what lopnor was experiencing. I didn't want to bring it in and confuse the matter. :) | 10:16 | |
we should really fix that bug. | |||
10:16
cafesofie joined
|
|||
masak | here: rt.perl.org/rt3/Ticket/Display.html?id=81168 | 10:17 | |
but I don't think that's the latest one. I think moritz_++ submitted the original one. | |||
snarkyboojum | oh goody.. I wonder how hard it is to fix | 10:18 | |
jnthn isn't sure off hand | |||
masak | aye, here: rt.perl.org/rt3/Ticket/Display.html?id=73698 | ||
masak sees about merging the two | 10:19 | ||
snarkyboojum: moritz_++ has some wording on the thing in his ticket. | |||
snarkyboojum | interesting reading | ||
10:20
hanekomu joined
10:45
am0c left
10:51
Vlavv_ left
10:55
agentzh left
10:58
Vlavv joined
11:01
cafesofie left
11:02
cafesofie joined
11:07
vmspb joined
11:19
lopnor is now known as lopaway
11:42
envi joined
11:52
cafesofie left
11:54
satyavvd left
12:09
cogno joined
12:23
felliott joined
12:36
cogno left
12:37
MayDaniel joined
12:46
cogno joined
12:57
cogno left
|
|||
takadonet | morning all | 13:05 | |
masak | takadonet: \o | 13:06 | |
13:07
nadim_ left
13:16
Su-Shee left
13:24
Su-Shee joined,
cjk101010 left
13:32
felliott left
13:41
MayDaniel left
13:43
tylerni7 left
|
|||
takadonet | long time since I seen that rakudo pass all the spectest :) | 13:43 | |
13:46
tylerni7 joined
|
|||
masak | <sorear> Container is nonsense | 13:50 | |
I agree. I'd say Scalar is the same kind of nonsense. | |||
flussence | takadonet: it fails 3 on mine, and nobody else's apparently, I've no idea what causes it :( | ||
takadonet | i always have failed tests but no one else did... looks like we changed places | 13:51 | |
masak | some things have been platform-dependent, such as the PID bug. | 13:52 | |
[Coke] | FYI, when building rakudo with 3.0.0 : trac.parrot.org/parrot/ticket/1977 | 13:55 | |
moritz_++ has reported this in the past, I believe. | |||
jnthn | If Scalar exists it's as a container type like Array or Hash. my Scalar $x would mean you're declaraing a Scalar containing a Scalar container. | 13:56 | |
Which is, like my Array @x, not what you usually want. | 13:57 | ||
colomon | o/ | 13:59 | |
masak | \o | 14:00 | |
14:02
Weathros joined
14:03
__rnddim__ joined
14:04
sorear_ joined
14:05
huf left,
Lorn left,
p6eval left,
Bucciarati left,
stepnem left,
lue left,
Tedd1 left,
takadonet left,
flussence left
14:06
gfldex joined
14:07
plobsing left,
mj41_ joined
14:08
kst` joined,
Lorn joined,
coldhead` joined,
ponbiki left,
cxreg left,
coldhead left,
ggoebel left,
flatwhatson left,
mj41 left,
kalkin- left,
nsh_ left,
gottreu left,
mathw left,
IRSeekBot left,
ascent_ left,
nperez_ left,
betterworld left,
mathw joined,
cxreg joined,
mj41_ is now known as mj41,
nsh- joined,
nperez joined,
ponbiki joined
14:09
ggoebel joined,
meteorjay joined,
ascent_ joined,
gottreu joined,
betterworld joined
14:10
kalkin- joined,
jjore joined,
flatwhatson joined
14:11
huf joined,
p6eval joined,
Bucciarati joined,
stepnem joined,
takadonet joined,
flussence joined,
frooh joined,
zelazny.freenode.net sets mode: +v p6eval
|
|||
colomon | jnthn: what would Scalar mean if it was a container? | 14:11 | |
14:12
IRSeekBot joined
14:15
kaare_ left
14:17
ascent__ joined,
bacek_ joined
14:18
araujo joined,
araujo left,
araujo joined,
d4l3k_ joined
|
|||
masak | colomon: sounds like it would be kind of like an Array with exactly one element. | 14:19 | |
14:19
betterwo1ld joined
|
|||
masak | (and none of the regular Array methods) | 14:19 | |
14:19
[particle] joined
14:20
gfldex_ joined,
ascent_ left,
Patterner left,
bacek left,
betterworld left,
PacoLinux left,
dalek left,
PacoLinux joined,
Psyche^ joined,
Psyche^ is now known as Patterner,
gfldex left,
tadzik left,
d4l3k_ is now known as dalek,
ChanServ sets mode: +v dalek,
tadzik joined
|
|||
colomon | masak: but an element of an Array can be anything, right? | 14:21 | |
including another Array... | 14:22 | ||
masak | sure. | ||
colomon | It seems like it would be much more useful if it were something like | 14:23 | |
subset Any where { !~~ Array & Hash } | |||
(realized halfway through I had no idea how to make that legal code, but I hope the idea comes through) | 14:24 | ||
14:25
fhelmberger joined
|
|||
masak | subset Any where { $_ ~~ none(Array, Hash) } | 14:26 | |
so it's OK for it to be a Set, a Bag, or an EnumMap? | |||
flussence | (huh, "given $input { ok .indent($a), $result }" does the complete opposite of what I expected...) | 14:32 | |
(oh, I'm an idiot, that's why.) | |||
masak | flussence++ # implementing .indent | ||
flussence | I'm staring at the code thinking "wtf", when I should've used "is" there :) | ||
14:33
raihjken joined
|
|||
raihjken | Hai :S ? | 14:33 | |
14:33
raihjken left
|
|||
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index....l_6_tablet | 14:33 | |
masak | wow, a drive-by hai-er. | ||
flussence | and now that I'm using the right test function, it still does the complete opposite... but more usefully | ||
(if I'm understanding right, it's doing is($_, .indent...) | 14:34 | ||
14:34
plobsing joined
14:35
rbuels left
|
|||
masak | flussence: 'is .indent, $result' means 'is($_.indent, $result)' | 14:36 | |
14:36
mtk joined
|
|||
flussence | it helps if I look at the right got/expected lines :) | 14:36 | |
14:36
sftp left
14:37
sftp joined
14:38
hudnix left,
hudnix joined
|
|||
masak | spectests PASS here as well. \o/ | 14:42 | |
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index....lta_tablet | 14:43 | |
14:46
kaare_ joined
|
|||
dalek | kudo: 13b405c | pmichaud++ | build/PARROT_REVISION: Bump PARROT_REVISION to 3.0.0 release. |
14:48 | |
tpfwiki: util++ | www.perlfoundation.org/perl6/index....lta_tablet | |||
colomon | masak: Array, Hash was meant purely to illustrate. Positional, Associative might make more sense. Or something else altogether. | 14:49 | |
or it's just as likely the entire idea of Scalar is nonsense. :) | 14:50 | ||
14:51
pmurias joined
|
|||
pmurias | niecza: say "hi" | 14:51 | |
p6eval | niecza v1-149-g56c80b0: OUTPUT«Unhandled exception: Unable to resolve method keys in class Array at /home/p6eval/niecza/boot/lib/SAFE.setting line 922 (SAFE keys @ 2) at /home/p6eval/niecza/src/Metamodel.pm6 line 192 (Metamodel Namespace.list_stash @ 7) at | ||
../home/p6eval/niecza/src/Metamodel.pm6 line 603 (Me… | |||
pmurias | who runs the evalbot? | ||
masak | colomon: all I can say is I don't see the point of Scalar, and nothing in the spec makes me see the point of it. | 14:52 | |
14:52
gtsafas_ is now known as elb0w
|
|||
pmichaud | Scalar is the name of the type for Scalar containers, I suspect. | 14:53 | |
flussence | masak: it's mentioned as the return type for Array.pop, is there any other way of doing that? | ||
14:53
araujo left
|
|||
pmichaud | Array.pop should return Mu, I think. | 14:53 | |
14:53
araujo joined
|
|||
pmichaud | defining Array.pop to return Scalar is almost certainly wrong. | 14:53 | |
flussence: where did you see that for Array.pop, ooc? | 14:54 | ||
mux | what is Mu? | ||
flussence | S32/Containers:603 (and 680) | ||
pmichaud | "Mu" corresponds to what other languages call "Object" | ||
flussence | and there's a similar one in S32/Str:512 | ||
pmichaud | i.e., it's the "most general" type | ||
mux | oh, Isee, forall a. a | 14:55 | |
:-) | |||
masak | flussence: that's just plain wrong. | ||
pmichaud | the primarily way to think of Scalar at the moment is: my $x is Scalar | ||
"is Scalar" is the default type associated with the $ sigil | |||
just like "is Array" is the default type associated with the @ sigil | |||
masak | as opposed to what? | ||
colomon | but can't a $ sigil'd variable hold absolutely anything? | 14:56 | |
pmichaud | as opposed to: my $x is TiedHash | ||
mux | funny that perl 6 calls this Mu | ||
masak | ah. | ||
pmichaud | note the difference between "my $x is Scalar" and "my $x of Foo" | ||
"is" identifies the container type. "of" defines the value constraint | |||
my Int $x is basically like my $x is Scalar of Int | 14:57 | ||
my $x is TiedHash of Int would say that $x is a TiedHash that is constrained to hold Int values | |||
14:57
tylerni7 left
|
|||
masak | *nod* | 14:58 | |
pmichaud | so, at the moment "Scalar" is the name we give to the default scalar container type | ||
and no, it doesn't get used much | 14:59 | ||
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index....lta_tablet | ||
masak | it definitely shouldn't be used in S32 siggies. | 15:01 | |
flussence | S29:680/724 say "S32-setting-library/Scalars.pod", but that file doesn't exist. kinda worries me... | ||
masak | there might have been one at one point, but it got renamed or fractured into other parts. | ||
pmichaud | S32 and S29 were drafted long before we had good clarity on the container/value model. | 15:02 | |
so I suspect any mention of "Scalar" in those documents was highly speculative | |||
masak | also, neither of S29 or S32 should be taken as absolute truth. | ||
flussence | oh I see, it looks like all the stuff in that section is inside S32/Basics | ||
masak | granus salis applies. | ||
15:03
mberends left
|
|||
masak | more than a granus, even. | 15:03 | |
15:03
wamba joined
|
|||
pmichaud | I like spicy specs. | 15:03 | |
flussence | rakudo: say 1 ~~ Scalar | 15:04 | |
p6eval | rakudo 388eed: OUTPUT«Could not find sub &Scalar in main program body at line 22:/tmp/GKyQe7RQK0» | ||
flussence | well at least I don't have to worry about it in rakudo :) | ||
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index....lta_tablet | 15:05 | |
mux | the only time I've heard of "Mu types" is in the context of recursive types, where Mu is often given to the type-level fixed-point combinator | ||
I really wonder why they chose this name in Perl 6 | |||
mathw | there was a reason | 15:07 | |
but I can't remember what it was | |||
flussence | everything's an object, but it's shorter to type "Mu" than "Object" every time | 15:08 | |
masak | it was TheDamian who suggested it, and TimToady liked it. | ||
mux | that's a reason for the existence of "Mu", not a reason for its name | ||
masak | in Japanese, 'Mu' means 'nothingness'. | ||
mux | ah | ||
pmichaud | "Mu" is meant to also indicate a level of undefinedness | ||
masak | it's the punchline of an old koan. | ||
mux | that makes sense, thanks | ||
pmichaud | i.e., it's the most undefined type | ||
flussence | also there's the concept of µ meaning small, and there's almost nothing attached to a Mu object by itself | ||
pmichaud | indeed, "Mu" is a bit of an anagram for "most undefined" | 15:09 | |
masak | it can be seen as standing for a number of thing, among others 'Most Undefined'. | ||
mux | I should learn more japanese | ||
masak | not anagram; initialism. | ||
mux | masak: I thought this was called an acronym | ||
masak | aye. | ||
pmichaud | right, acronym | 15:10 | |
or initialism | |||
pay no attention to my ramblings this morning :) | |||
flussence | and it's a nicer name than "UNIVERSAL" | ||
mux | sure is | 15:11 | |
pmichaud hears a sinusoidal hum coming from his desktop tower and thinks the fan may be about to fail | |||
masak | Perl 7 will bring in the best of Perl 5 and Perl 6, and will call it "MUniversal". :P | ||
mux | I would have called it "Top", but that's probably because I like CS-oriented names :-) | 15:12 | |
masak | mux: are you implying that deriving a class is a downwards act? half of the CS people would disagree :) | 15:13 | |
after all, Base is at the bottom of things. | |||
mux | masak: in theory, what perl 6 calls "Mu" and other languages call "Object" is the top type | ||
this is not me making things up | |||
masak | I didn't say it was. | 15:14 | |
15:14
molaf joined
|
|||
masak | I'm saying there's no perfect consensus. | 15:14 | |
mux | simply because any other type is a subtype of it | ||
anyways, I like the reference to japanese | |||
mathw | it's both ways | ||
pmichaud | I'm not certain that Perl 6 has a "top type", though. | ||
Yes, Mu is the base class for nearly everything -- I just don't know how big "nearly" is :) | 15:15 | ||
15:15
tzhs joined
|
|||
masak | mux: MJD has a post where he defends 'derived == upwards', but I can't find it right now. | 15:15 | |
Util | tadzik: ping | ||
masak | pmichaud: we won't know until Parrot lets Rakudo talk to other implementations. | ||
15:16
mberends joined
|
|||
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index....tor_tablet | 15:16 | |
15:16
wtw left
|
|||
mux | masak: this makes sense; I'm just following the usual CS conventions myself. | 15:17 | |
pmurias | masak: re best of Perl 5 and Perl 6, Perl 6 is intended the best of Perl 5 | ||
s/intended/intended to be/ | |||
mux wonders how many years will pass until he gets to write Perl 6 code for companies | 15:18 | ||
Util | masak, mux: MJD post is blog.plover.com/CS/contravariant.html | ||
pmichaud | masak: even Parrot doesn't have a "most base" type :-( | ||
15:18
MayDaniel joined
|
|||
flussence | an object hierarchy with a defined top and bottom won't make sense when you're coding in a zero-G environment anyway. | 15:19 | |
masak | Util: thank you. | ||
mux | Util: cheers | ||
makes me wonder, does Perl 6 allows covariant/contravariant type annotations? | |||
masak | pmurias: yes. I might not have been entirely serious. | ||
mux: there's nothing to enforce Liskov et al. in Perl 6. | 15:20 | ||
mux: feels like a module or some tooling could, though. | |||
mux | poor Barbara ;-) | ||
masak looks forward to getting his hands on an implementation that does PRE and POST on methods | 15:23 | ||
maybe I should get into Niecza development and try to put that in place... | |||
or I could just push Yapsi in that direction. | |||
or Rakudo. so many choices! :) | |||
mux | never been a huge fan of contract programming, I guess I never stumbled upon a good use of it yet | ||
pmurias votes for Niecza ;) | |||
moritz_ votes against democracy :-) | 15:24 | ||
15:25
plobsing left
|
|||
masak | mux: reason I thought about it was that you mentioned covariance/contravariance, and PRE and POST do those. | 15:25 | |
mux | masak: I don't quite see how pre- and postconditions gains you covariance/contravariance | 15:26 | |
15:26
p6eval left
|
|||
mux | but then again, I'm not very familiar with those | 15:26 | |
15:27
TimToady left
|
|||
mux | or did you mean that you could use pre- and postconditions to enforce covariance/contravariance on methods? | 15:27 | |
15:27
dalek left
|
|||
masak | mux: consider inheritance. a subclass should honour at least all the POSTs of the parent class(es), and may loosen their PREs. | 15:27 | |
mux | alright, but then it's as I said, you can use such constructs to implement covariance/contravariance, but it does not come for free | 15:28 | |
15:29
sorear_ left
|
|||
pmurias | mux: what do you mean by having convariance and contravariance implemented? | 15:29 | |
mux | pmurias: being able to say that such method is covariant or contravariant in its return type -- the usual meaning as far as I know | 15:30 | |
masak | yeah, Perl 6 doesn't by default. | ||
should be addable to Real Perl 6 as a pragma, though. | |||
and implementable in pure Real Perl 6, too. | 15:31 | ||
mux | I'm not blaming Perl 6 for not having it, I'm mostly being curious about Perl 6, I know very little about it yet | ||
15:31
rod joined
15:32
diakopter left
|
|||
masak | mux: you give off very strong Haskell vibes. I like that. :) | 15:32 | |
mux | heh. :) | ||
15:33
diakopter joined,
p6eval joined,
ChanServ sets mode: +v p6eval
15:36
dalek joined,
ChanServ sets mode: +v dalek,
sorear joined,
TimToady joined
15:37
mtk left
|
|||
masak | mux: part of the reason it's not being enforced, I believe, is that the Perl 6 type system is too "powerful", and enforcing co/contravariance in the general case would get one sucked into the Halting Problem. | 15:38 | |
but I might be wrong, and rambling. | |||
15:38
mtk joined
|
|||
mux | masak: if you have pointer to discussions about it, I'd be interested | 15:39 | |
masak | not really. | 15:41 | |
15:41
cogno joined
|
|||
mux | it seems there is stuff about it in perlcabal.org/syn/S06.html | 15:41 | |
masak | just that things like 'where' clauses tend to destroy the "purity" (from a H-M point of view) of the type system. | ||
mux | masak: what kind of 'where' clauses are we talking about? those I know about don't do that | 15:43 | |
masak | rakudo: subset Even of Int where { $_ %% 2 }; say 42 ~~ Even | ||
p6eval | rakudo 388eed: OUTPUT«Bool::True» | ||
15:44
MayDaniel left
|
|||
jnthn | pmichaud: (base for nearly everything) you can have more than one strange loop in the model. :) | 15:44 | |
masak | rakudo: subset Even of Int where { $_ %% 2 }; subset DivisibleByFour of Int where { $_ %% 4 }; say DivisibleByFour ~~ Even | ||
p6eval | rakudo 388eed: OUTPUT«Bool::True» | ||
mux | masak: okay | ||
masak | o.O | ||
jnthn: ^^ | |||
mux | that's way over my head | ||
need more introductory perl 6 material | 15:45 | ||
masak | mux: it's all in S12, I believe. | ||
pmurias | mux: that's a bug | ||
15:45
hudnix left
|
|||
jnthn | masak: Subset is based on Int. Int numifies to 0. 0 is divisible by four. | 15:45 | |
masak | jnthn: I meant to do something like a type inclusion test. | ||
jnthn | You did. | 15:46 | |
It just treated the LHS like a value. | |||
masak | yes, but between subtypes. | ||
15:46
hudnix joined
|
|||
jnthn | Remember that 4 ~~ Numeric and Int ~~ Numeric are really the same operation. | 15:46 | |
15:46
gfldex_ is now known as gfldex
|
|||
masak | ok. | 15:47 | |
jnthn | Since type objects are just empty instances. | ||
masak | not saying I like it, though. | ||
jnthn | I suspect the subset one maybe should warn but it boils down to whether my Int $a; say $a %% 4 warns. | ||
rakudo: my Int $a; say $a %% 4 | |||
p6eval | rakudo 388eed: OUTPUT«Bool::True» | ||
jnthn | Anyway, computing subset inclusion is the halting problem. :) | 15:48 | |
masak | what I said. | ||
jnthn | So there's little point in drawing out special case semantics for a :U on the LHS, imho. | ||
mux | you know, type inference in haskell is undecidable, just like the halting problem. it doesn't cause much problems in practice :-) | ||
jnthn | As one couldn't make it do anything that useful anyway. | 15:49 | |
masak | mux: by analogy, it should be possible to do some type inference in Perl 6 as well. and as far as I understand, jnthn is building towards that. :) | 15:50 | |
mux | that sounds cool | ||
masak | walk & | 15:51 | |
jnthn | Yes, it's in with the whole bunch of type goodness I@m building the foundations for. | 15:52 | |
mux | yay for type goodness :-) | ||
pmurias | jnthn: what sort of type inference do you plan to implement | 15:53 | |
? | |||
15:55
cogno left
15:57
justatheory joined
|
|||
jnthn | pmurias: Haven't thought about it in great detail yet, tbh. Will probably start out with some really simple cases (like, variable that's only ever assigned once from a literal). | 15:59 | |
16:01
tzhs left
|
|||
pmurias | do you want to that for optimalisation purposes or catching type errors? | 16:01 | |
jnthn | Both | ||
I suspect a lot of the analysis for the two is the same or very similar. | 16:02 | ||
16:08
cogno joined
16:19
slavik1 left
16:22
slavik1 joined
16:27
slavik2 joined
16:28
risou joined
|
|||
pmurias | jnthn: it will be interesting to see how does the usefullness catching stuff that is guaranteed to be incorrect compare with preventing stuff that might fail | 16:30 | |
16:30
slavik2 left,
slavik2 joined
16:32
slavik1 left
|
|||
colomon | jnthn: I've got to say, I'm not very comfortable with my Int $a; say $a %% 4 not warning, and completely spooked that my Rat $al; say $a %% 4 is a hard crash instead. | 16:32 | |
16:32
hanekomu left
|
|||
colomon | rakudo: my Rat $a; say $a %% 4 | 16:32 | |
p6eval | rakudo 388eed: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!numerator in 'infix:</>' at line 4197:CORE.setting in 'infix:<%>' at line 3711:CORE.setting in 'infix:<%%>' at line 501:CORE.setting in main program body at line 22:/tmp/X2FoRkP5vu» | ||
16:33
slavik2 left,
slavik1 joined
16:34
risou_ joined
|
|||
colomon | Speaking for my own programming, I think I'd generally rather have the Int version fail as well. | 16:34 | |
jnthn | colomon: I agree they should be consistent. | ||
16:34
plobsing joined,
slavik1 left,
slavik1 joined
16:35
risou left,
cogno left
16:36
snearch joined
|
|||
colomon | I kind of feel like they should be consistent and the consistent behavior should be user-selectable. | 16:36 | |
TimToady is right that if you're doing a big hyper operation or something, you don't want one piece of data killing the entire operation. | 16:37 | ||
jnthn | Well, it should warn rather than die. | ||
colomon | But by the same token, declaring a variable and then using its value without initializing it is probably an error in normal circumstances. | ||
I'm not convinced at a warning is useful at all. | 16:38 | ||
TimToady | I think the only good argument for a warning is that it's what a P5er would expect | 16:39 | |
but we'd probably be better off settling on failure semantics | 16:40 | ||
16:40
snearch left
|
|||
colomon | Just as a for instance, I was routinely running 1000+ test cases for masak's p4. If one warning had crept in there, I probably wouldn't even have noticed it. | 16:40 | |
16:40
snearch joined,
dukeleto left,
slavik1 left,
slavik1 joined,
dukeleto joined
|
|||
colomon | maybe if you could easily log warnings, or something like that... | 16:42 | |
16:43
slavik1 left,
slavik1 joined
|
|||
TimToady | well, you can supposedly catch warning exceptions | 16:46 | |
jnthn -> home | 16:48 | ||
16:52
slavik2 joined,
slavik1 left
17:01
estrabd_waac is now known as estrabd
17:02
envi left
|
|||
tadzik | ~ | 17:04 | |
Util: pong | |||
17:06
toebu left
|
|||
arnsholt likes the TimToady quote in the GNU awk manual | 17:16 | ||
A loaded Uzi indeed ^_^ | |||
tadzik | link? | 17:18 | |
17:18
cogno joined
|
|||
arnsholt | www.gnu.org/manual/gawk/gawk.html#Array-Intro | 17:18 | |
17:35
impious joined
17:36
pmurias left,
cogno left
|
|||
dukeleto | there is a typo in the quote "tryinng" | 17:38 | |
otherwise, hilarious :) | |||
17:52
dakkar left
17:53
dukeleto left
17:54
impious left
|
|||
Util | tadzik: added META.info for Perl6-Math-Quaternion module - github.com/Util/Perl6-Math-Quatern.../META.info | 17:54 | |
17:54
dukeleto joined
17:55
thundergnat joined
|
|||
thundergnat | Rakudo: use Test; is ~(42,).sort: { 0 }, "42"; | 17:57 | |
tadzik | Util++ | ||
thundergnat: "Rakudo".lcfirst | |||
thundergnat | tadzik: oops | 17:58 | |
rakudo: use Test; is ~(42,).sort: { 0 }, "42"; | |||
p6eval | rakudo 388eed: OUTPUT«Too many positional parameters passed; got 3 but expected between 1 and 2 in 'Parcel::sort' at line 1401:CORE.setting in main program body at line 22:/tmp/eEFl3q57vQ» | ||
thundergnat | Is this a precedence / parsing issue rather than an error? | ||
rakudo: use Test; is ~((42,).sort: { 0 }), "42"; | |||
p6eval | rakudo 388eed: OUTPUT«ok 1 - » | ||
thundergnat | That is a fudged test in roast. | 17:59 | |
github.com/perl6/roast/blob/master...ort.t#L202 | |||
Seems like the test itself is faulty. | 18:00 | ||
std: use Test; is ~(42,).sort: { 0 }, "42"; | 18:02 | ||
p6eval | std 625303c: OUTPUT«Compiled lib/Test.pm6ok 00:01 123m» | ||
thundergnat | BTW tadzik: I've added META.info files to my modules in ecosystem as well. | 18:04 | |
tadzik | thundergnat: on it | ||
yay, versions | 18:05 | ||
pushed, thundergnat++ | 18:07 | ||
thundergnat | tadzik: is there any recommendations anywhere for META.info files, or is it "figure it out from S22."? | 18:08 | |
I mostly just looked at others and copied them... | |||
tadzik | thundergnat: well, that's until I do and specify it a bit | 18:09 | |
thundergnat | ah... :-) | 18:10 | |
18:10
bluescreen joined
|
|||
tadzik | you're welcome to write specs too, or just a start | 18:11 | |
arnsholt | It never ceases to amaze me how Python and Ruby don't see the utility of name declaration | ||
tadzik | you mean declaration with my/our? | 18:12 | |
arnsholt | Yeah. I hate how I can't do the equivalent of use strict in Python and Ruby | ||
tadzik | everytime I'm tempted to try Ruby/Python there's just too many things missing to me | ||
But I may be biased ;) | |||
arnsholt | Hehe | 18:13 | |
Python is ok, as long as the philosophical differences (one way to do it, rather than more than one) don't drive you nuts | 18:14 | ||
At least python.org has a set of easy-to-use spec and standard lib docs | |||
Ruby is a bit harder to get along with for me, since it's so hard to find authoritative docs that don't drive me nuts =) | 18:15 | ||
thundergnat | I've been messing around with the sort method/sub, trying to get support for arrays of comparators working. | 18:18 | |
18:18
cogno joined
|
|||
thundergnat | I've got something that works and still passes passes roast sort tests ( github.com/perl6/roast/blob/master...ist/sort.t ) | 18:18 | |
masak | thundergnat: when you do '.sort:' like that, the whole rest of the statement becomes arguments to the .sort method. | 18:19 | |
thundergnat | At least, it passes all the tests that unmodified Rakudo does plus a bunch of test for comparator arrays. | ||
But it's dismally slow. And ugly. | |||
masak | thundergnat: that little subtlety was what made me use the invocant colon (for calling) a *lot* more restrictively. | ||
in other words, the string "42" is sent in to .sort as well. | 18:20 | ||
thundergnat | masak: makes sense, I'm just pointing out that that test is in roast, and fugded because it is failing. | ||
masak | thundergnat: the test is wrong. | ||
thundergnat | nod | 18:21 | |
arnsholt | masak: I started doing the same, a bit. But I'm still a bit sad you can't use the colon for invoking normal subs as well =) | ||
jnthn hem | 18:23 | ||
masak | "hemma" :) | ||
thundergnat | Anyway, if anyone is interested, here is my comparator array trial: gist.github.com/784835 sub/method is named msort so as not to collide with built in sort. | ||
colomon | #Phasers in 37m? | ||
jnthn extracts more free Swedish edukashun from masak++ | |||
colomon: Yes, I think so. | 18:24 | ||
masak | arnsholt: hum? without the colon, you already have that semantics for listop subs... | ||
thundergnat | Comment / criticism welcome. | ||
masak | colomon: thanks for reminding me. | ||
colomon | masak: That's a big part of the reason why I ask here. ;) | ||
jnthn | :) | ||
jnthn had actually remembered, for once. | |||
arnsholt | masak: Excellent point =) | 18:25 | |
masak | colomon: how tactful of you :) | ||
tadzik | > 60% of modules on META.list :) | ||
masak | wow. | 18:26 | |
colomon | tadzik: \o/ | ||
tadzik | well, that's not me actually :) | ||
Util++ and thundergnat++ did it today | |||
jnthn signs up for YAPC::EU 2011 o/ | |||
masak | tadzik: what's a quick way to learn how to write a META.list for one's project? | ||
tadzik | masak: that's META.info. My blag toast is a quick introduction | 18:27 | |
colomon | Oooo, that reminds me, I may have volunteered to do a Perl talk / workshop at Penguicon this year. | ||
masak | tadzik: ok, I've seen that one. | 18:28 | |
tadzik | masak: sadly, not much more is written. I promised myselt to write a kinda-spec after all this mess on my Uni | ||
masak | :) | 18:29 | |
masak signs up for YAPC::EU 2011 o/ | |||
dukeleto | Riga sounds fun... | 18:30 | |
jnthn | It is. | ||
18:30
risou_ left
|
|||
tadzik | where does one sign up? | 18:31 | |
jnthn | tadzik: yapceurope.lv/ | ||
masak | Riga is one of my absolute favourite latvian capitals. | ||
jnthn | Yeah. The others just don't cut it. | ||
masak | literally. | ||
jnthn | I mean, where other Latvian capital has an Asparagus Boulevard? | 18:32 | |
masak | Asparagus Boulevard \o/ | ||
and quite nice steamed buns. and a way underappreciated Indian place. | |||
jnthn | Oh, yes. That Indian place rocked. | ||
We can go again. \o/ | |||
masak | \o/ | 18:33 | |
twice! | |||
jnthn | And to the pay-by-weight nommery with the many nice things. :) | ||
masak | yes, those were the ones with the buns. | ||
jnthn | Ah, yes, that's right. :) | ||
It had other things too though :) | |||
masak | (Rigan nommeries)++ | ||
<< This commercial was brought to you by Moscow.pm >> | 18:34 | ||
jnthn | :D | ||
jnthn nips to the shop before #phasers | 18:35 | ||
18:38
cjk101010 joined
|
|||
takadonet | /join #phashers | 18:38 | |
... | |||
tadzik | Password: | ||
18:38
cogno left,
thundergnat left
18:40
broquaint joined,
Weathros is now known as Tedd1
18:43
kaare_ left
|
|||
tadzik signed in for YAPC::EU too | 18:44 | ||
18:44
kaare_ joined
|
|||
jnthn | tadzik: Yay! :) | 18:49 | |
18:51
bluescreen left
|
|||
tadzik | (and then I saw the prize :)) | 18:51 | |
jnthn | tadzik: Submit a talk, get it accepted and you get in free. :) | 18:54 | |
18:55
molaf left
|
|||
tadzik | heh | 18:56 | |
I think I'll just sit and listen in the first year :) | 18:57 | ||
19:03
cdarroch joined,
cdarroch left,
cdarroch joined
19:04
bluescreen joined
19:07
tri1 joined
19:11
cogno joined
19:17
dukeleto left,
dukeleto joined
19:18
hercynium joined
19:20
nadim_ joined
19:22
cogno left
19:24
Zach_Mazolt joined
19:26
tri1 left
|
|||
masak | tadzik: you should do a lightning talk. if you don't want to do one alone, I'll do one with you. :) | 19:27 | |
tadzik | how is lightning talk different from a normal one, besides being lightspeed and not buying me a ticket? :) | 19:28 | |
masak: that'd be an awesome experience :) | |||
masak | tadzik: it doesn't take as much preparation, and thus the barrier of entry is smaller. | 19:29 | |
tadzik | fair enough. Works for me :) | ||
masak | tadzik: first YAPC I went to, viklund and I unveiled November in a lightning talk :) | ||
19:30
REPLeffect left
|
|||
masak | I'm still getting warm fuzzies from the reception it got :) | 19:30 | |
tadzik | yet the only thing coming to my mind (for today) is the modules stuff | 19:31 | |
although many things will probably happen til august | 19:32 | ||
masak | ...you could become a Yapsi contributor... | 19:33 | |
...or I could hook you on Druid... | |||
tadzik | that sounds fun :) | ||
19:33
tri2 joined
|
|||
tadzik | (yapsi) | 19:33 | |
masak | ...or show you the awesomeness of GGE... | ||
19:33
tri2 left
|
|||
masak | ...or convert you to pls... | 19:33 | |
tadzik | hmm | 19:34 | |
maybe after neutro/metainfo becomes neutro/master, it's time for neutro/pls to come | |||
Zach_Mazolt | Which GUI toolkit binding will be used in perl six? | ||
tadzik | but! exams first | ||
masak | neutro is proto resurrected. pls is what proto would've been if I'd known better at the time. | ||
Zach_Mazolt: any toolkit that someone writes bindings for. | 19:35 | ||
tadzik | Zach_Mazolt: whatever gets implemented. I don't think there'll be any Main Toolkit | ||
masak | Zach_Mazolt: pmichaud says that whenever someone asks "what's the official..." the answer is "no". | ||
except for "...spec" and "...spectest suite". | 19:36 | ||
Zach_Mazolt | i mean no official but any. i thought there was some work someone did so i can participate | 19:37 | |
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index...._s_notepad | ||
19:38
coldhead` is now known as coldhead
19:39
slavik2 left
19:40
slavik1 joined
|
|||
masak | Zach_Mazolt: people come in sometimes asking the question. | 19:42 | |
Zach_Mazolt: I guess that'll keep happening until someone gets motivated enough to start :) | |||
Zach_Mazolt | masak: assume I will start on one, which one you see more appropriate? qt, tk, wx? | 19:44 | |
masak | answering this might require some research. | 19:45 | |
anything with C bindings is at least possible through zavolaj. | |||
tadzik | Zach_Mazolt: you have to be aware of zavolaj aka NativeCall's current limitations | ||
19:45
snearch left,
slavik2 joined
19:46
slavik1 left
|
|||
Zach_Mazolt | I guess I will start by doing the research then.. | 19:46 | |
tadzik | ++Zach_Mazolt | 19:47 | |
masak | looking forward to seeing some cool proof-of-concept. :) | ||
didn't Su-Shee++ do something GUI-y with Perl 6 a year or so ago? | |||
Su-Shee | no, I've tried out Tene's enlightenment lib stuff and discussed perl 6 and gui here and there | 19:48 | |
I think the last common denominator was to go with dammit how was it called.. | 19:49 | ||
GIR! | |||
masak would like a GUI toolkit called "dammit" | |||
19:49
tylercurtis joined
|
|||
masak | :) | 19:49 | |
and then Teratogen would use it to put up a dialog box asking "When is Perl 6 going to be released?" :P | 19:50 | ||
Su-Shee | well the GIR thing from all the gtk libs makes it exceptionally easy as far as I've read about.. they managed to bind entire gnome basically against js that way ("seed" it's called) | ||
jnthn | :D | ||
Zavolaj's main limitation at the moment for GUI stuff, afaik, is lack of callbacks. | 19:51 | ||
Su-Shee | I think you might not need to bridge zavolaj and gtk but zavolaj and GIR | ||
19:52
rbuels joined
|
|||
Zach_Mazolt | now I am feeling tempted to do some work.. :) | 19:52 | |
masak cheers Zach_Mazolt on | |||
Su-Shee | "gnome/gtk libs and stuff" export symbols and stuff via GIR, GIR gets "handled somehow" in the target lang. | 19:53 | |
19:53
REPLeffect joined
|
|||
Su-Shee | and gir is something xml-ish afaik. so it'll probably be a gir grammar.. | 19:53 | |
so if this works, you can take either gtk (3) and make that a p6 widget binding or write you own because you decide to bind clutter instead. or both. | 19:55 | ||
Zach_Mazolt | Su-Shee: thanks for the insight. | 19:58 | |
Su-Shee | well that was just gtk. :) there's also qt available to write bindings for. ;) | 20:00 | |
or really do something native. | |||
flussence | the problem I see (with GTK stuff) is that interaction's mostly callback-based... I have no idea how that works via NativeCall. | ||
masak | it doesn't, last I heard. | ||
tadzik | when "last heard" is 9 minutes ago :) | 20:01 | |
flussence needs to read the whole log next time :) | |||
20:02
slavik1 joined
|
|||
flussence | getting the GladeXML stuff to run should be pretty easy though. That only needs about half a dozen functions to display a window, iirc | 20:02 | |
20:02
slavik2 left
|
|||
Su-Shee | Zach_Mazolt: that's deprecated. go for what's it called.. gtkbuilder I think.. | 20:03 | |
flussence | oh right, yeah | ||
masak | tadzik: ah. oh. ...I didn't hear that one. :) | ||
Zach_Mazolt | :) | ||
flussence | (I haven't done any GTK in a year or two) | ||
Zach_Mazolt | my contact is mazt.zach at gmail.com . I may not be here so often but I will be back if something worked. feel free to contact me anytime. you know what i will be working on :) | 20:04 | |
Su-Shee | go ask #gtk-perl (gtkperl?), there's emanuelle bassi who is a core gtk devel anyways _and_ does a couple of perl modules. he should really know how to go about the best way | ||
flussence | good luck with it, anyway | ||
Su-Shee | (irc.perl.org) | ||
Zach_Mazolt | Su-Shee: heading there in a moment | ||
20:05
slavik1 left
|
|||
tadzik | Zach_Mazolt: how about opening a public git repo on github so we can watch the process? | 20:05 | |
20:05
slavik1 joined
|
|||
Zach_Mazolt | tadzik: sure. | 20:05 | |
Su-Shee | ugh, emmanuele ;) | ||
Zach_Mazolt: have a little patience, they idle for hours sometimes ;) | 20:06 | ||
Zach_Mazolt: and here's basic reading: live.gnome.org/GObjectIntrospection | |||
Zach_Mazolt: and here's how it's actually done (js) library.gnome.org/devel/seed/unstable/ | 20:07 | ||
Zach_Mazolt | Su-Shee: Sounds fun.. I hope I will see some active community in #introspection | 20:08 | |
Su-Shee | browse through seed. it's _amazing_ what they've managed in like.. short under 2 years I think. it's basically everything from gnome to network to dbus wrapped in js | 20:09 | |
tadzik | jnthn: does Configure.pl build a proper Makefile for you in nqp-rx/nom? | 20:10 | |
jnthn: I think #370 needs a proper tab | |||
20:10
slavik1 left,
slavik1 joined
|
|||
jnthn | tadzik: oh, dar | 20:10 | |
n | |||
masak | dar\n :) | 20:11 | |
jnthn | tadzik: My make program doesn't care for such differences. | ||
dukeleto | are there any perl6/nqp syntax highlighters? | ||
jnthn | Yes, yes, I'm just a big pile of whitespace fail. :P | ||
masak | jnthn: the black space of the family... | ||
moritz_ | the blank space of the family :-) | 20:12 | |
jnthn | tadzik: Feel free to commit a fix if you have a moment. | ||
tadzik | dukeleto: si | ||
jnthn: Makefile is generated by Configure.pl somehow, I don't know where to look. Plus I have no commit bit anyway | |||
jnthn | build/Makefile.in | ||
Oh | |||
hugme: add tadzik to nqp-rx | 20:13 | ||
hugme | jnthn: You need to register with freenode first | ||
20:13
mtk left
|
|||
dukeleto | tadzik: where do they live? | 20:13 | |
moritz_ | hugme: add tadzik to nqp-rx | ||
hugme | moritz_: ERROR: Can't add tadzik to nqp-rx: HTTP/1.1 401 Unauthorized | ||
jnthn | hugme: add tadzik to nqp-rx | ||
moritz_ | fuck | ||
hugme | jnthn: ERROR: Can't add tadzik to nqp-rx: HTTP/1.1 401 Unauthorized | ||
jnthn | darn | ||
tadzik | dukeleto: good question, I don't remember | ||
github somewhere. Perl6.org should have some links | |||
jnthn | OK, I fix itlater. | ||
moritz_ | jnthn: it's because perl6 is an organization account now | ||
jnthn | (not hugme, I mean. the whitespace) | 20:14 | |
dukeleto | there is a new organization API on github | ||
tadzik | dukeleto: perl6.org/whatever/ there | ||
moritz_ | added tadzik via web interface | ||
tadzik | thank you moritz_ | ||
Zach_Mazolt | nice to meet you gents. see you soon. | ||
tadzik | but that's 6model | ||
jnthn | tadzik: No, I added you there already :) | 20:15 | |
masak | Zach_Mazolt: ladies and gents. :) | ||
jnthn | Then realized...wrong repo :) | ||
diakopter missed #phasers | 20:16 | ||
Zach_Mazolt | masak: don't recall seeing ladies here. but I wish them a nice day too :) | ||
masak | Su-Shee is one. :) | 20:17 | |
dalek | p-rx/nom: 88e53e7 | tadzik++ | build/Makefile.in: Fix a whitespace-o in Makefile.in |
||
Zach_Mazolt | o so I forgot to thank the one who helped the most. thanks Su-Shee :) | 20:20 | |
20:22
tri1 joined,
tri1 left,
mtk joined
20:23
slavik1 left,
slavik1 joined
|
|||
tadzik | jnthn: running ./nqp gives me PARROT VM: Could not initialize new interpreterPackFile_Header_validate: This Parrot cannot read bytecode files with version 10.0. | 20:23 | |
fresh checkout | |||
jnthn | tadzik: Did you use --gen-parrot? | 20:26 | |
moritz_ | tadzik: seems like there's an old installation somewhere | ||
tadzik | jnthn: in rakudo, yes | ||
20:26
wamba left
|
|||
tadzik | moritz_: yep. But my ~/src/rakudo/parrot_install/bin is higher in $PATH | 20:26 | |
[Coke] | does no one listen to me? ;) | ||
moritz_ | [Coke]: of course not. What did you say? | 20:27 | |
tadzik | what? :) | ||
[Coke] | tadzik, jnthn: please either 1) update to a parrot that fixes that bug (post 3.0.0, sadly), or remove your parrot install dir and try again. | ||
jnthn | fwiw, it works here :) | ||
Oh | |||
PARROT_REVISION may be awfully out of date in nqp-rx/nom | |||
20:28
Zach_Mazolt left
|
|||
moritz_ | it likely is | 20:28 | |
[Coke] | until just now, if you had a preinstalled parrot and installed a new one over it, the libparrot symlink didn't update on re-install. | ||
20:28
dip left,
dip joined
20:29
fhelmberger left
20:30
slavik1 left
20:31
jferrero joined
20:33
dip left,
dip joined
20:34
dip left,
dipthegeezer joined
20:40
slavik1 joined
20:45
mtk left
20:46
mtk joined,
simon__ joined
|
|||
simon__ | hey, can someone explain to me why there is a colon required for higher order methods? | 20:47 | |
20:47
masonkramer joined
|
|||
colomon | simon__: example? | 20:47 | |
simon__ | like (1,2,3).map: *+1 | 20:48 | |
instead of just (1,2,3).map *+1 | |||
jnthn | simon__: You could call that with (1,2,3).map(*+1) too | ||
masak | simon__: for methods, you must use either parens or colon. | ||
jnthn | It's not to do with higher orderness. It's just to do with method argument parsing. | ||
simon__ | oh so it's simply a shortcut for when the only argument is a block? | 20:49 | |
jnthn | No, it applies generally | ||
colomon | It's only a shortcut, but the argument doesn't have to be a block. | ||
tylercurtis | rakudo: $*OUT.say: 1, 2, 3 | ||
jnthn | rakudo: say ("omg", "bbq").join: "wtf" | ||
colomon | like @array.push: 10 | ||
simon__ | ah, i see, thanks | ||
p6eval | rakudo 388eed: OUTPUT«123» | ||
rakudo 388eed: OUTPUT«omgwtfbbq» | |||
masak | '(1,2,3).map *+1' doesn't work because a term may never follow upon another term in Perl 6. | ||
20:50
cjk101010 left
|
|||
masak | std: 1 2 | 20:50 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Two terms in a row at /tmp/an9jrDKioO line 1:------> 1 ⏏2 expecting any of: bracketed infix infix or meta-infix statement modifier loopParse failedFAILED 00:01 119m» | ||
masak | std: (1,2,3).map *+1 | ||
p6eval | std 625303c: OUTPUT«ok 00:01 121m» | ||
colomon | doh! | ||
masak | o.O | ||
tadzik | ha-ha | ||
jnthn | lol | ||
masak | TimToady! | ||
oh wait. | |||
jnthn | masak: (1,2,3).map * +1 | ||
masak | aye. :) | ||
not what I wanted, but it does parse :) | |||
jnthn | rakudo: (1,2,3).map * +1 | ||
masak | TimToady: never mind. :) | ||
tadzik | I don't get it | ||
p6eval | rakudo 388eed: OUTPUT«No candidates found to invoke for method 'map' on object of type 'Parcel'; available candidates have signatures::(Mu : █; *%_):(Mu : %block;; *%_) in main program body at line 22:/tmp/oUzgYa5ESn» | ||
jnthn | :) | ||
But it's a runtime error. :) | 20:51 | ||
tadzik | map with no arguments? | ||
masak | right. | ||
jnthn | yeah | ||
tadzik | so "copy this array for me"? | ||
colomon | oh, so it's like (1, 2, 3).map() * +1 | ||
? | |||
tadzik | si | ||
colomon | not even "copy this array", the answer will be 3, right? | 20:52 | |
rakudo: say (1, 2, 3).map() * +1 | |||
p6eval | rakudo 388eed: OUTPUT«No candidates found to invoke for method 'map' on object of type 'Parcel'; available candidates have signatures::(Mu : █; *%_):(Mu : %block;; *%_) in main program body at line 22:/tmp/R7SWeV6occ» | ||
jnthn | colomon: map requires an argument. | ||
colomon | rakudo: say (1, 2, 3).map(+*) * +1 | ||
p6eval | rakudo 388eed: OUTPUT«3» | ||
colomon | I think I was imagining it would be ... | ||
tadzik | is map with no args a LHF? | ||
colomon | rakudo: say (1, 2, 3).map({}) * +1 | 20:53 | |
jnthn | tadzik: I think it should be an error. | ||
p6eval | rakudo 388eed: OUTPUT«Can't call map() with a Hash argument, Callable requiredYou probably wrote a Hash composer accidentally - try todisambiguate it with a ; directly after the opening brace in 'Any::map' at line 1483:CORE.setting in main program body at line 22:/tmp/lodE0OmOeu» | ||
colomon | rakudo: say (1, 2, 3).map({;}) * +1 | ||
p6eval | rakudo 388eed: OUTPUT«3» | ||
tadzik | jnthn: so why should (1,2,3).map * +1 work? | ||
jnthn | tadzik: It shouldn't. | ||
tadzik | ah, it should just parse? | ||
jnthn | tadzik: std says that it parses. Rakudo agrees. | ||
tylercurtis | tadzik: it is syntactically valid, though. | ||
tadzik | I see | ||
jnthn | tadzik: But std doesn't know about whether it'll work at runtime. :) | ||
tadzik | std can run code too :) | 20:54 | |
std: say "ok 00:01 {150.rant.Int}m" | |||
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
tadzik | whoops | ||
jnthn | :P | ||
20:54
mtk left
|
|||
tadzik | (maybe no one will notice) | 20:55 | |
jnthn | .rant should be, like, an alias for .uc.say | ||
20:55
y3llow_ joined,
y3llow left,
y3llow_ is now known as y3llow
|
|||
rod | rakudo: say "ok 00:01 {150.rant.Int}m" | 20:56 | |
p6eval | rakudo 388eed: OUTPUT«Method 'rant' not found for invocant of class 'Int' in main program body at line 22:/tmp/NhwvNKIwSu» | ||
rod | std: say relog | 20:58 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Undeclared routine: 'relog' used at line 1Check failedFAILED 00:01 118m» | ||
tadzik | std: 150.rant | 20:59 | |
p6eval | std 625303c: OUTPUT«ok 00:01 118m» | ||
tadzik | hrm, * | ||
rod | std: say rebot | 21:00 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Undeclared routine: 'rebot' used at line 1Check failedFAILED 00:01 118m» | ||
rod | std: say block "24" | ||
p6eval | std 625303c: OUTPUT«===SORRY!===Undeclared routine: 'block' used at line 1Check failedFAILED 00:01 119m» | ||
rod | std: .map({:}) | 21:02 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Preceding context expects a term, but found infix : instead at /tmp/nS1pvGvhOG line 1:------> .map({⏏:})Parse failedFAILED 00:01 120m» | ||
rod | std: .map({1-4}) | 21:03 | |
p6eval | std 625303c: OUTPUT«ok 00:01 120m» | ||
rod | std: .map({1-9}) | ||
p6eval | std 625303c: OUTPUT«ok 00:01 120m» | ||
rod | std: .map({^}) | ||
p6eval | std 625303c: OUTPUT«===SORRY!===Prefix requires an argument at /tmp/j59vhI5Xwz line 1:------> .map({^⏏})Parse failedFAILED 00:01 119m» | 21:04 | |
21:04
plobsing left
21:05
hanekomu joined
21:06
V15170R joined
|
|||
V15170R | hello | 21:06 | |
tadzik | hello | 21:07 | |
masak | hello, visitor. | ||
V15170R | i was looking at some perl6 code and i saw things like ":=" and "map:" and i wonder.... what's the colon for? | ||
masak | different things. | ||
tadzik | it depends | ||
PerlJam | V15170R: depends on the context. | ||
tadzik | := is a binging rather than an assignment | 21:08 | |
PerlJam | V15170R: in ":=" it's part of the binding operator | ||
V15170R | like some sort of "symbolic link"? | ||
PerlJam | tadzik: heh, are you saying that microsoft is influencing Perl design with the binging op? :) | ||
V15170R: something like that. | |||
tadzik | rakudo: my $a = 5; my $b := $a; $a += 2; say $b | ||
p6eval | rakudo 388eed: OUTPUT«7» | ||
tadzik | PerlJam: ah :) | ||
V15170R | and in "map" or "reduce", whats the effect? | 21:09 | |
tadzik | that saves you typing the parens | ||
my @a; @a.push: 5 is the same as @a.push(5) | |||
PerlJam | V15170R: That's just the invocant designator. The stuff before the : is the invocant, the stuff after is an arg | ||
V15170R | perl6: my $a = 5; my $b := a; $b = 9; say $a; | ||
p6eval | niecza v1-149-g56c80b0: OUTPUT«Unhandled exception: Unable to resolve method keys in class Array at /home/p6eval/niecza/boot/lib/SAFE.setting line 922 (SAFE keys @ 2) at /home/p6eval/niecza/src/Metamodel.pm6 line 192 (Metamodel Namespace.list_stash @ 7) at | ||
../home/p6eval/niecza/src/Metamodel.pm6 line 603 (Me… | |||
..rakudo 388eed: OUTPUT«Could not find sub &a in main program body at line 22:/tmp/UZDVwpO3eK» | |||
..pugs: OUTPUT«*** No such subroutine: "&a" at /tmp/pXRtOXyLVO line 1, column 12-22» | |||
tadzik | wooooo | 21:10 | |
V15170R | perl6: my $a = 5; my $b := $a; $b = 9; say $a; | ||
p6eval | pugs, rakudo 388eed: OUTPUT«9» | ||
..niecza v1-149-g56c80b0: OUTPUT«Unhandled exception: Unable to resolve method keys in class Array at /home/p6eval/niecza/boot/lib/SAFE.setting line 922 (SAFE keys @ 2) at /home/p6eval/niecza/src/Metamodel.pm6 line 192 (Metamodel Namespace.list_stash @ 7) at | |||
../home/p6eval/niecza/src/Metamodel.pm6 line 603 (Me… | |||
tadzik | forgive niecza, it's still broken on the evalserver | ||
PerlJam | V15170R: actually binding is more like a hard link than a symbolic one. You could think of it as an aliasing operator. It gives one thing two names. | 21:11 | |
V15170R: Also, you might want to use rakudo: rather than perl6: to execute code here :) | 21:12 | ||
V15170R | oh thanks... ok a hard link.... isn't that, like, dangerous? can you bind to another program's variable? or a variable in another package/namespace? | 21:13 | |
masak | sure, but the normal scoping restrictions apply. | 21:15 | |
dalek | tpfwiki: util++ | www.perlfoundation.org/perl6/index...._s_notepad | 21:27 | |
21:28
plobsing joined
21:36
kensanata left
|
|||
tylercurtis | V15170R: Binding to a variable in another package/namespace is only dangerous if you then modify it, in which case it's exactly as dangerous as directly modifying it. | 21:39 | |
V15170R | can you do a "read only" bind? | ||
rakudo: my @a=<a b c>; sub test { return 9 }; @a[1] := &test; @a.say; | 21:41 | ||
p6eval | rakudo 388eed: OUTPUT«atestc» | 21:42 | |
21:43
alester joined
|
|||
colomon | rakudo: my @a=<a b c>; sub test { return 9 }; @a[1] := &test; @a.say; @a[1]().say | 21:44 | |
p6eval | rakudo 388eed: OUTPUT«atestc9» | 21:45 | |
tylercurtis | infix<::=> is a readonly bind, although I'm not sure exactly how it's supposed to work in the case of $foo ::= $bar where $bar is not readonly. | ||
masak | rakudo: my $a := 42; say $a; $a = 5; say $a | ||
p6eval | rakudo 388eed: OUTPUT«42Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/MGCApxaqVB» | ||
masak | V15170R: that bind could be considered "read-only". | ||
V15170R: since it's directly to a value, not to another variable. | 21:46 | ||
tylercurtis | V15170R: if you simply want to create a readonly variable, the "is readonly" trait on the variable declaration works. | 21:49 | |
rakudo: my $foo is readonly; my $bar := $foo; $bar++; | |||
p6eval | rakudo 388eed: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 7386:CORE.setting» | ||
21:50
klunky joined
|
|||
colomon | Not to speak for V15170R, but it seems to me the interesting question would be about how to make a readonly binding to a readwrite variable. | 21:50 | |
V15170R | yep... that is, exactly | ||
masak | colomon: pass it to a subroutine? :) | 21:51 | |
colomon | something like my $bar = 42; my $foo is readonly := $bar; $bar++; $foo++; # first works, second is an error | ||
masak | rakudo: my $bar = 42; my $foo is readonly := $bar; $bar++; $foo++ | ||
p6eval | rakudo 388eed: ( no output ) | ||
colomon | masak: would signature binding be endough? | ||
rakudo: my $bar = 42; my $foo is readonly := $bar; say $bar++; say $foo++ | |||
p6eval | rakudo 388eed: OUTPUT«4243» | ||
masak | colomon: hm, I've never done that manually... | ||
V15170R | rakudo: my $a = 10; my $b ::= $a; say $b; $a = 20; say $b; | 21:52 | |
p6eval | rakudo 388eed: OUTPUT«1020» | ||
colomon | V15170R: I suspect what masak and I just did is the right way to do it, but the readonly check there is not yet implemented in Rakudo. | ||
jnthn | rakudo: my $a = 10; my $b ::= $a; say $b; $b = 20; say $b | ||
p6eval | rakudo 388eed: OUTPUT«10Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/Fp38MVlKG4» | ||
jnthn | There, $a is rw but $b is readonly | 21:53 | |
colomon | what is ::= ? | ||
jnthn | rakudo: my $a = 10; my $b := $a; say $b; $b = 20; say $b | ||
p6eval | rakudo 388eed: OUTPUT«1020» | ||
jnthn | There it's OK | ||
21:53
cjk101010 joined
|
|||
jnthn | ::= creates a readonly binding | 21:53 | |
iirc | |||
colomon | jnthn++ | ||
well, it seems to work that way, anyway. ;) | |||
jnthn | I think the real point is that if the compiler sees ::= it can make a bunch more assumptions. | 21:54 | |
Or at least, a point. :) | |||
22:06
slavik1 left,
slavik1 joined
|
|||
sorear | good * #perl6 | 22:07 | |
jnthn | o/ sorear | 22:08 | |
colomon | \o | 22:09 | |
simon__ | do metaoperators always apply or only for a predefined set of operators? | 22:11 | |
for instance, if infix <= weren't defined, would $a <= $b be equivalent to $a = $a < $b? | 22:12 | ||
jnthn | simon__: It's down to the meta-operator. | ||
simon__: Some of them look at various traits of the op to decide whether the meta-op applies to it. | 22:13 | ||
simon__ | and is there a way to use them when they are overwritten by an infix function? | ||
jnthn | You can use the bracketed infix syntax, but that doesn't get around the constraints. | 22:15 | |
e.g. R[+] is the same as R+ | |||
simon__ | k thanks | ||
jnthn | To understand the trait requirements better see in STD.pm, e.g. around line 3329/3330 there's an example | ||
Meta-ops generally boil down to higher order function calls, fwiw. | 22:16 | ||
simon__ | p6eval: my $a = 1; my $b = 2; $a ,= $b; | 22:24 | |
what's happening here? it says recursion depth exceeded | 22:25 | ||
jnthn | rakudo: my $a = 1; my $b = 2; $a = $a, $b; say "alive" | ||
p6eval | rakudo 388eed: OUTPUT«alive» | ||
jnthn | rakudo: my $a = 1; my $b = 2; $a ,= $b; say "alive" | ||
p6eval | rakudo 388eed: OUTPUT«alive» | ||
jnthn | simon__: Those two should be equivalent... | 22:26 | |
jnthn wonders what they produce | |||
Oh wait | |||
I don't think they quite are... | |||
rakudo: my $a = 1; my $b = 2; $a = ($a, $b); say "alive" | |||
p6eval | rakudo 388eed: OUTPUT«alive» | ||
jnthn | That is same as $a ,= $b | 22:27 | |
rakudo: my $a = 1; my $b = 2; $a = ($a, $b); say $a.perl | |||
p6eval | rakudo 388eed: OUTPUT«maximum recursion depth exceeded in 'Block::count' at line 6077:CORE.setting in 'Block::count' at line 6077:CORE.setting in 'Any::join' at line 1 in 'List::perl' at line 2792:CORE.setting in <anon> at line 2792:CORE.setting in 'Any::join' at line 1 in | ||
..'List::perl' at … | |||
jnthn | rakudo: my $a = 1; my $b = 2; $a ,= $b; say $a.perl | ||
p6eval | rakudo 388eed: OUTPUT«maximum recursion depth exceeded in 'Block::count' at line 6077:CORE.setting in 'Block::count' at line 6077:CORE.setting in 'Any::join' at line 1 in 'List::perl' at line 2792:CORE.setting in <anon> at line 2792:CORE.setting in 'Any::join' at line 1 in | ||
..'List::perl' at … | |||
jnthn | Bug. | ||
masak | a known one, no? | 22:28 | |
jnthn | masak: I dunno, you're the human bug database. :P | ||
22:28
cjk101010 left
|
|||
masak | rakudo: my $a = 1; my $b = 2; $a ,= $b; say 'alive!' | 22:28 | |
p6eval | rakudo 388eed: OUTPUT«alive!» | ||
masak | it's a bug in .perl -- how boring. | ||
masak submits, Justin Case | 22:29 | ||
jnthn | rakudo: my $a = 1; my $b = 2; $a ,= $b; $a.say | ||
p6eval | rakudo 388eed: ( no output ) | ||
jnthn | That looks...rather dubious too | ||
masak | rakudo: my $a = 1; $a ,= 2; say $a.perl | ||
jnthn | rakudo: my $a = 1; my $b = 2; $a ,= $b; say ~$a | ||
p6eval | rakudo 388eed: OUTPUT«maximum recursion depth exceeded in 'Block::count' at line 6077:CORE.setting in 'Block::count' at line 6077:CORE.setting in 'Any::join' at line 1 in 'List::perl' at line 2792:CORE.setting in <anon> at line 2792:CORE.setting in 'Any::join' at line 1 in | ||
..'List::perl' at … | |||
rakudo 388eed: OUTPUT«maximum recursion depth exceeded in 'List::at_pos' at line 2872:CORE.setting in 'List::at_pos' at line 2872:CORE.setting in 'Any::postcircumfix:<[ ]>' at line 1761:CORE.setting in 'Any::join' at line 1464:CORE.setting in 'Any::join' at line 1469:CORE.setting in | |||
..'List::S… | |||
jnthn | It's more than just .perl it seems | ||
masak | aye. | 22:30 | |
jnthn++ | |||
jnthn suspected so | |||
masak | let's call it a bug in ,= | ||
jnthn | :( | ||
wait | |||
masak waits | |||
jnthn | rakudo: my $a = 1; my $b = 2; $a = ($a, $b); say ~$a | ||
p6eval | rakudo 388eed: OUTPUT«maximum recursion depth exceeded in 'List::at_pos' at line 2872:CORE.setting in 'List::at_pos' at line 2872:CORE.setting in 'Any::postcircumfix:<[ ]>' at line 1761:CORE.setting in 'Any::join' at line 1464:CORE.setting in 'Any::join' at line 1469:CORE.setting in | ||
..'List::S… | |||
jnthn | Darn. | ||
It's a bug in parcel construction and assignment when the parcel contains the assignee it seems... :/ | |||
Or something. | |||
Well, maybe. | 22:31 | ||
I note that stack trace has join in it, and the .perl one did too. | |||
rakudo: my $a = 1; my $b = 2; $a = ($a, $b); say $a.WHAT | |||
p6eval | rakudo 388eed: OUTPUT«Seq()» | ||
jnthn | rakudo: my $a = 1; my $b = 2; $a = ($a, $b); say $a[0] | ||
p6eval | rakudo 388eed: ( no output ) | 22:32 | |
jnthn | rakudo: my $a = 1; my $b = 2; $a = ($a, $b); say $a[1] | ||
p6eval | rakudo 388eed: OUTPUT«2» | ||
jnthn | I wonder if something that should decontainerize is failing to do so. | ||
Though if so, it's hard to say what. Since l-value parcels surely shouldn't decontainerize on construction, or we break list assignment forms like ($a, $b) = 1,2 | 22:33 | ||
jnthn 's brain asplodes | |||
Well, file it. :) | |||
22:34
kaare_ left
|
|||
masak | the bug's in the bag. | 22:35 | |
jnthn | masak++ | 22:36 | |
22:36
[particle]1 joined
22:37
MayDaniel joined
22:38
[particle] left
|
|||
V15170R | damn, perl6 is so cool.... we use a lot the Mod 11 Check Digit algorithm in my country... now here is on one line!!!!! | 22:44 | |
sorear | If that kind of stuff interests you you should check out J | ||
V15170R | rakudo: my $rut = "13294087"; my $checksum = (0 .. 9,'K', 0)[ 11 - ( [+] $rut.split('').reverse <<*>> (2..7) ) % 11 ]; say $rut~'-'~$checksum; | ||
p6eval | rakudo 388eed: OUTPUT«13294087-8» | ||
sorear | jnthn: in ideal TimToadian Perl 6, that line doesn't crash, because = calls .item and Parcel.item decontainerizes while converting to Seq | 22:48 | |
jnthn | sorear: Oh, *that's* where it should decontainerize. | ||
sorear: Thanks. | |||
sorear: It's doing the Seq conversion, just not the decontainerizing. | 22:49 | ||
I suspect I can fix that. | |||
sorear | OTOH, .perl really ought to do cycle detection | ||
22:58
vmspb left,
Vlavv left
|
|||
colomon | sorear: you think? That seems like a lot of conceptual overhead to add to each .perl method... | 22:58 | |
23:03
helv12 left
23:07
sftp left
23:08
MayDaniel left
23:09
Vlavv joined
23:10
sftp joined
23:16
cafesofie joined
|
|||
sorear | conceptually, .perl is already chained to the standard parser, since it's defined in terms of parsable Perl 6 | 23:16 | |
23:16
plobsing left
23:17
helv12 joined,
simon__ left
23:22
V15170R left
23:24
sftp left
23:28
pmurias joined
23:31
bluescreen left,
hanekomu left
|
|||
pmurias | sorear: .perl definitly should handle cycles | 23:32 | |
otherwise we will need a Data::Dumper | |||
23:32
kjeldahl left
|
|||
masak | +1 | 23:33 | |
colomon | okay, here's an example .perl: | 23:35 | |
multi method perl() '[' ~ self.map({ $^a.perl }).join(', ') ~ ']'; } | |||
How do you change that to properly detect and handle cycles? | |||
(remembering also that we want to make .perl a reasonably easy method for people to add to their own classes.) | 23:36 | ||
colomon is really hoping TimToady or sorear has a brilliant answer to this question.... | |||
TimToady | the question is where you're gonna store the state | 23:37 | |
23:38
risou joined,
sftp joined
|
|||
TimToady | probably in a contextual | 23:38 | |
23:39
slavik1 left
|
|||
colomon | does that work? what happens when you do >>.perl? | 23:40 | |
TimToady | so it'll look something like $*seen{self.WHICH} ?? fake_tag(self) !! $*seen{self.WHICH} = what you have there already | ||
23:40
Vlavv left
|
|||
sorear | colomon: .perl can't be a simple homomorphism | 23:42 | |
colomon | TimToady: How do you make fake_tag(self) do the right thing? | 23:44 | |
TimToady | just has to generate a tag based on the identity of self | 23:45 | |
coulda passed self.WHICH to that too, probably | |||
hmm, that's not really quite right | 23:46 | ||
it's only a boolean flag whether we've seen it | |||
don't have to store the existing tag, assuming it's reproducable from the self's identity | 23:47 | ||
so just $*seen{self.WHICH}++ ?? fake_tag(self) !! what you had already | |||
23:47
hercynium left
|
|||
TimToady | where $*seen probably needs a better name like $*PERLSEEN or some such | 23:48 | |
$*seen-by-perl | |||
whatever | |||
23:48
Chillance joined
|
|||
TimToady | could get rid of that | 23:48 | |
hid the variable | 23:49 | ||
23:49
Vlavv joined
|
|||
TimToady | so it's just seen-by-perl(self) || '[' ~ self.map({ $^a.perl }).join(', ') ~ ']'; | 23:49 | |
and seen-by-perl either returns a tag or false | |||
23:50
plobsing joined
|
|||
TimToady | if the method is in mu, we could have .seen-by-perl || .. | 23:50 | |
*... | 23:51 | ||
23:51
rgrau joined
|
|||
TimToady | well, maybe 'or' is better than || | 23:51 | |
so it won't be much of a burden for anyone to add ".seen-by-perl or" to their perl method | 23:52 | ||
23:52
slavik1 joined
|
|||
colomon | I like where this is going. | 23:54 | |
masak | I've now reviewed all the p1 submissions. but I'm tired now, and will put off blogging till the morning. | 23:55 | |
'night, #perl6. | |||
23:55
masak left
|
|||
colomon | But (even ignoring threading issues that scare me), it seems like more is still needed? at least, what are the strings that .perl returns going to look like in these cases? | 23:55 | |
Like the my $a = 1; my $b = 2; $a = ($a, $b); example. what would $a.perl look like? | 23:57 | ||
Tene | itym := | 23:59 |