»ö« 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! Set by sorear on 4 February 2011. |
|||
00:00
am0c joined,
noam joined
00:03
twinshadow left
00:13
betterworld left,
betterworld joined
00:17
benabik left
00:20
benabik joined
|
|||
retupmoca | #perl6! I decided to write something in perl 6, so I attempted a port of Email::Simple at github.com/retupmoca/p6-Email-Simple | 00:30 | |
so | |||
is there a defined way to get this into the modules list? | 00:31 | ||
[Coke] | retupmoca++ | 00:36 | |
00:39
benabik left,
kmwallio joined
|
|||
sorear | I think you have to talk to tadzik | 00:42 | |
TimToady | plus whatever is on modules.perl6.org/ | 00:43 | |
unfortunately our most modular people are asleep in some other hemisphere... | 00:45 | ||
retupmoca | the only thing I see on modules.perl6.org is #perl6, and the guide says to poke a maintainer | ||
TimToady | there's a link to a guide there | ||
sorear | "a maintainer" means tadzik these days. | 00:46 | |
TimToady | 3rd paragraph | ||
sorear | 0146 Warsaw time atm | ||
TimToady | which point to ttjjss.wordpress.com/2010/08/09/so-...-6-module/ | ||
retupmoca | yeah, I saw that | ||
was following it, but all it says is to poke a maintainer | 00:47 | ||
who seems to be asleep | |||
TimToady | there's probably a serkit git repo that has to be tweaked | 00:48 | |
and yes, the docs appear to be a bit haphazard on that subject so far :) | |||
retupmoca | github.com/perl6/ecosystem maybe | 00:49 | |
hrm | |||
I need a META.info | |||
00:50
japhb_ left,
japhb joined
|
|||
TimToady | do you have a github id? | 00:52 | |
00:52
benabik joined
|
|||
retupmoca | yeah | 00:52 | |
retupmoca | |||
TimToady | hmm, github is being slow, but I think I can add you | 00:54 | |
retupmoca | otherwise I could do a fork / pull request | 00:55 | |
TimToady | github has been suffering from DoS attacks lately, so maybe that's why it's being sluggish | 00:56 | |
retupmoca | yeah, it's been sporadically slow | ||
TimToady | okay, I think I did it | 00:57 | |
you can now destroy^Wcontribute to any of the Perl 6 projects, welcome aboard | |||
retupmoca | github says read+write access | ||
yay! | |||
TimToady++ | |||
TimToady | as we say, have the appropriate amount of fun, which may from time to time be negative, but hopefully mostly positive | 00:59 | |
dalek | osystem: ffd609f | (Andrew Egeler)++ | META.list: Add Email::Simple |
01:00 | |
01:01
kmwallio left
|
|||
TimToady | retupmoca++ | 01:02 | |
retupmoca | ok, so it should show up next time modules.perl6.org updates then | 01:03 | |
TimToady | \o/ | ||
retupmoca | hrm, now that I have this access, I'll have to write more modules | 01:04 | |
TimToady | or tests, or docs, or webpages, or... :) | ||
retupmoca | yes indeed | ||
TimToady | we could also use more porting of modules back and forth between rakudo and niecza | 01:05 | |
diakopter | mmm .meth | 01:06 | |
01:06
scott_ joined,
scott_ is now known as Guest3203
01:07
kcw joined
|
|||
TimToady | careful, I don't want to end up on some proscribed list for buying decongestants :) | 01:07 | |
I have a trick sinus that doesn't like to go up in airplanes | 01:09 | ||
well, actually, it's fine going up, but coming back down sometimes feels like an icepick in the forehead | |||
TimToady is looking forward to flying on the more-pressurized 787's to see if that helps | 01:10 | ||
but maybe I shouldn't mention airplanes either... :) | 01:11 | ||
01:12
am0c left
01:13
cooper left,
cooper joined
01:14
cooper left,
cooper joined
01:25
yertalert left
01:54
kmwallio joined
01:57
whiteknight left
01:58
shinobicl___ joined
02:23
wolfman2000 joined
02:42
shinobicl___ left
02:51
lxping joined
02:55
kmwallio left
02:58
unobe left
02:59
unobe joined
|
|||
colomon | ==> Testing Email::Simple | 03:14 | |
t/basic.t .. ===SORRY!=== | |||
Can only provide exactly one initial value to a mixin at /Users/colomon/.panda-niecza/src/Email__Simple/lib/Email/Simple/Header.pm6 line 90: | |||
------> return @values but @values[0]⏏; | |||
I don't think niecza likes the @values but @values[0] construct. | 03:20 | ||
03:23
lxping left
|
|||
sorear | @values but @values[0] eh... | 03:26 | |
o/ colomon | 03:27 | ||
colomon | \o | ||
does that make sense, even? | |||
sorear | I'm not sure | 03:28 | |
it's not entirely clear what the semantics of the implied @values.clone would be | |||
(the error message, OTOH, is clearly bogus) | 03:29 | ||
03:29
jaldhar joined
|
|||
colomon | oh, I thought it was complaining there were too many values (ie more than one) in @values | 03:32 | |
03:36
orafu left,
orafu joined,
birdwindupbird joined
03:38
Teratogen left
03:42
Teratogen joined
03:43
birdwindupbird left
|
|||
colomon | bedtime | 03:47 | |
TimToady | o/ | 03:48 | |
04:12
odoacre left
04:14
araujo left
04:15
araujo joined
|
|||
retupmoca | ok, Email::Simple doesn't use @values but @values[0] anymore | 04:34 | |
if someone wants to test it on niecza | |||
I would, but I don't have it installed yet | |||
kcw | I'm not sure if I've found a bug with gather/take or I'm doing something wrong... | 04:44 | |
> my @spam = gather loop { take 'eggs'; last } | |||
Method 'eager' not found for invocant of class 'Integer' | 04:45 | ||
in rakudo, that is | |||
TimToady | perl6: my @spam = gather loop { take 'eggs'; last }; say @spam | 04:46 | |
p6eval | rakudo bd5adb: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in block <anon> at /tmp/B6jpxyUQ0v:1» | ||
..pugs b927740, niecza v14-42-g1d02da9: OUTPUT«eggs» | |||
TimToady | I'd say you're right | ||
04:47
alvis left
|
|||
TimToady | the eager likely comes from the assignment, but I've no idea where the Integer comes from--looks like a Parrot type | 04:47 | |
kcw | k. I'll submit it to perlbug. Glad to see I'm not just misunderstanding something; I've been trying to figure out why this doesn't work for a while. | 04:48 | |
TimToady | nom: my @spam = gather while 1 { take 'eggs'; last }; say @spam | 04:49 | |
p6eval | nom bd5adb: OUTPUT«eggs» | ||
TimToady | hmm | ||
nom: my @spam = gather loop (;1;) { take 'eggs'; last }; say @spam | |||
p6eval | nom bd5adb: OUTPUT«eggs» | ||
TimToady | seems like there's a hint | ||
nom: my @spam = gather loop (;;) { take 'eggs'; last }; say @spam | 04:50 | ||
p6eval | nom bd5adb: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in block <anon> at /tmp/7pxw9NGc3l:1» | ||
TimToady | I'd say the default condition is a Parrot type rather than a Perl type | ||
sorear | btw, kcw, welcome | 04:51 | |
is nbrown one of us? | 04:52 | ||
05:01
alvis joined
05:02
yertalert joined
05:12
birdwindupbird joined
05:15
xinming left,
xinming joined
05:29
ilogger2 joined,
ChanServ sets mode: +v ilogger2
05:30
Gothmog_ joined,
jnthn joined,
mathw joined
05:31
broquaint joined
05:32
thou joined
05:34
wolverian joined,
literal joined
05:40
thou left
05:53
kaleem joined
05:58
snearch joined
06:13
xinming joined
06:23
avar joined
06:27
woosley joined
07:03
wtw joined
07:10
packetknife joined
07:16
noam joined
07:29
birdwind1pbird joined
08:11
birdwind1pbird left
08:16
woosley left,
kaleem left,
kaleem joined
08:18
kaleem left
|
|||
Teratogen | I'm working on a book | 08:20 | |
"Parsing HTML with Regular Expressions for Fun and Profit" | |||
08:21
woosley1 joined
|
|||
sorear | there's nothing wrong with being a fan of Gabriel. | 08:23 | |
troll failed. :D | |||
Teratogen | AND IIIIIEIIIIIIIEIIIIII WILL ALWAYS LOVE YOOOUUUEUUUUUEUUUU | 08:27 | |
gah | |||
can't get that song out of my head | 08:28 | ||
08:37
woosley1 left
08:41
shak joined
08:42
shak left
08:49
mj41 joined
08:59
satyavvd joined
|
|||
masak | me neither. | 09:12 | |
good #perl6, morning. | |||
sorear | masak morning. good. | 09:14 | |
.oO( forwhy is masak mo(u)rning?) |
09:15 | ||
jnthn becomes vaguely concious-ish | 09:17 | ||
sorear | o/ jnthn | ||
jnthn | o/ | 09:18 | |
jnthn sees somebody found a code-gen bug | |||
.oO( the masakbot is slow to see the word "bug" today... ) |
09:21 | ||
masak | heh :) | ||
I haven't backlogged yet. I'll get to it. | |||
retupmoca: welcome! retupmoca++ | 09:23 | ||
nom: my @spam = gather loop { take 'eggs'; last }; say @spam | 09:26 | ||
p6eval | nom bd5adb: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in block <anon> at /tmp/QoVvAM5Irq:1» | ||
masak submits rakudobug | |||
oh, submitted already by kcw++ | 09:28 | ||
jnthn | oh! | ||
moritz | masak: any feedback for the bt printer? | 09:33 | |
one thing I noticed is that it's fairly useless for debugging the setting | 09:47 | ||
maybe I can change that without making the normal user experience worse | 09:48 | ||
jnthn | moritz: I guess for that we can use --ll-exception or add a --debug-setting flag or something | ||
--setting-exception | |||
sorear | fwiw, this sort of thing is a lot of the reason I haven't touched niecza's bt printer yet | 09:49 | |
moritz | jnthn: well, I think it's a fairly artificial thing to exclude the setting | ||
sorear | I don't think I can improve it without making it unusable for all the uses I haven't thought of | ||
jnthn | moritz: True | ||
moritz | jnthn: currently I exclude the setting when searching for the first "interesting" call frame | 09:50 | |
jnthn | moritz: Maybe we should include it but mark various of the list guts as excluded | ||
moritz | jnthn: but if we are consequent with usage of 'is hidden_from_backtrace', then I can drop that condition | ||
jnthn | moritz: That trait doesn't bother me. | 09:51 | |
moritz | sorear: well, you can just sit back and watch us experiment, and copy whatever workable thing we come up with | ||
sorear | moritz: that's what I'm doing :D | 09:52 | |
09:53
dakkar joined
|
|||
moritz | jnthn: if things work out the way I am imagining right now, we don't need to special-case the list guts at all to keep them out of the vast majority of backtraces | 09:53 | |
jnthn | moritz: OK :) | ||
masak | moritz: haven't been toying around with it yet; been too busy. | 09:54 | |
10:00
lestrrat joined
|
|||
moritz | \o/ seems to work | 10:01 | |
10:15
tarch joined
|
|||
dalek | kudo/nom: d43594e | moritz++ | src/core/Backtrace.pm: stop special-casing the setting in the bt printer |
10:29 | |
10:32
daxim joined
10:42
JimmyZ joined
10:44
am0c joined
10:56
TimToady joined
10:57
kshannon joined,
ashleydev joined,
Yappoko___ joined
11:19
phenny left
11:26
TimToady left,
wtw left,
xinming left,
literal left,
mj41 left,
noam left,
Yappoko___ left,
mathw left,
Gothmog_ left,
kshannon left,
avar left,
broquaint left,
dakkar left,
am0c left,
packetknife left,
daxim left,
lestrrat left,
ruoso left
11:27
snearch left
|
|||
Teratogen | now THAT, my friends, was a fricking netsplit! | 11:28 | |
masak | it was. | 11:31 | |
11:33
Yappoko___ joined,
kshannon joined,
TimToady joined,
am0c joined,
daxim joined,
lestrrat joined,
dakkar joined,
mj41 joined,
noam joined,
wtw joined,
avar joined,
xinming joined,
literal joined,
broquaint joined,
mathw joined,
Gothmog_ joined,
rafl joined,
orafu joined,
unobe joined,
cooper joined,
kcw joined,
benabik joined,
betterworld joined,
simcop2387 joined,
pernatiy joined,
pothos joined,
y3llow joined,
Vlavv_ joined,
sivoais joined,
emss joined,
apejens joined,
colomon joined,
Patterner joined,
preflex joined,
felipe joined,
sjn joined,
baest joined,
`10 joined,
etneg_ joined,
retup-work joined,
flussence joined,
imarcusthis joined,
pjcj joined,
ascent_ joined,
kthakore joined,
BooK joined,
tokuhirom3 joined,
stepnem joined,
mls joined,
mtths joined,
jevin_ joined,
Maddingue joined,
arnsholt joined,
[particle] joined,
Shozan joined,
nebuchadnezzar joined,
Grrrr joined,
ingy joined,
cotto joined,
jrockway joined,
rhr joined,
sftp_ joined,
sudokode joined,
pomysl_ joined,
Bucciarati joined,
HarryS joined,
wooden joined,
takesako joined,
pochi joined,
yves joined,
gfldex joined,
geekosaur joined,
revdiablo joined,
robinsmidsrod joined,
zostay joined,
renormalist joined,
jlaire joined,
zamolxes joined,
mikemol joined,
dalek joined,
diakopter joined,
szabgab joined,
Juerd joined,
PZt joined,
PerlJam joined,
c1sung joined,
sunnavy joined,
sorear joined,
timotimo joined,
cj joined,
krunen joined,
sirhc joined,
frettled joined,
BooK_ joined,
card.freenode.net sets mode: +v dalek,
ocharles joined,
Khisanth joined,
dukeleto joined,
awwaiid joined,
tty234 joined,
_ilbot joined,
Guest6426 joined,
cognominal_ joined,
rsimoes joined,
kst joined,
ranguard joined,
prammer joined,
djanatyn joined,
chra joined,
aloha joined,
huf joined,
Timbus joined,
jtpalmer_ joined,
cosimo joined,
BinGOs joined,
ruoso joined,
Lorn joined,
perimosocordiae joined,
Util joined,
pyrimidine joined,
moritz joined,
s1n joined,
shachaf joined,
tomaw joined,
cxreg joined,
kcwu joined,
doy joined,
mattp_ joined,
szbalint joined,
`patch` joined,
phenny joined
11:35
y3llow left,
y3llow joined
12:05
ilogger2 joined,
ChanServ sets mode: +v ilogger2,
Gothmog_ joined
12:07
_sri joined
12:09
bonsaikitten joined,
jnthn joined,
broquaint joined
12:11
fridim_ joined
12:12
wolverian joined
12:22
Trashlord joined
12:39
tokuhirom joined
12:40
bluescreen10 joined
12:54
pernatiy joined
12:56
fridim_ left
13:11
timotimo joined
|
|||
JimmyZ | \o, dyncall build works now | 13:11 | |
masak | \o/ | ||
wow, END phasers in Perl 5 run both after a 'die' and after an 'exit'. | 13:13 | ||
JimmyZ wants to update dyncall to v0.7, and commit some fixs to nqp | 13:16 | ||
jnthn | JimmyZ: +1 | 13:17 | |
13:17
ab5tract joined
|
|||
jnthn | (on the 0.7 upgrade) | 13:18 | |
I just hadn't got there yet | |||
oh but... | |||
I think we have some additional patches on top of what 0.7 has | |||
JimmyZ | jnthn: but that also needs to make some changes to dyncall makefile | ||
jnthn | JimmyZ: Have you submitted those changes upstream to the dyncall folks? | ||
moritz | you should upgrade dyncall by applying the diff between the old and the new version | 13:19 | |
not by overwriting stuff | |||
JimmyZ | jnthn: well, dyncall.org doesn't seem to be open enough, I should email the patch to authors ? | 13:20 | |
jnthn | JimmyZ: Yes, they've responded to emails from me before. | ||
They seem quite friendly and happy to accept patches/input :) | |||
JimmyZ | it's odd that 'as' can't compile .S file | 13:21 | |
moritz | gist.github.com/1826725 # my experiments with ObjHash | ||
binding works, but assignment doesn't. Seems I've misunderstood $!whence. | 13:22 | ||
jnthn | moritz: Two things. | 13:30 | |
moritz: whence runs before the actual storage is done. So $v won't have its value there | |||
moritz: Second, you need to bind it into %!keys and %!values | 13:31 | ||
moritz: Otherwise you'll re-containerize. | |||
moritz: gist.github.com/1826773 works for me | |||
moritz | jnthn: cool, thanks | 13:32 | |
ah right, that's the difference between Proxy and whence | 13:33 | ||
13:34
benabik joined
|
|||
jnthn | moritz: Also one of efficiency. | 13:35 | |
(the whence mechanism is *way* faster) | |||
masak | whereas the Proxy one is more flexible, I guess? | 13:36 | |
jnthn | masak: Yes. | ||
masak: They're kinda apples and oranges in a way. | |||
masak: You could build the stuff we do with $!whence on top of Proxy. | |||
masak .oO( apples are way faster, whereas oranges can be peeled in countless ways ) | |||
jnthn | masak: But it'd look quite different. | 13:37 | |
:P | |||
13:44
bluescreen10 left
|
|||
masak | nom: sub fp($x, &c) { c($x) === $x ?? $x !! fp(c($x), &c) }; for ^10 { repeat while fp(my $s, *.subst("[]", "")) { $s = "[]".comb.roll(10).join }; say $s } | 13:46 | |
p6eval | nom bd5adb: OUTPUT«[[]][][][][[]][[]][][][[]][][][][][[[]]][[[[[]]]]][][][[[]]][[[[[]]]]][[[]]][][][[[[]]][]][][][[]][]» | 13:47 | |
masak <3 Perl 6 | |||
nom: sub fp($x, &c) { c($x) === $x ?? $x !! fp(c($x), &c) }; sub shuffle { @^list.pick(*) }; for ^10 { repeat while fp(my $s, *.subst("[]", "")) { $s = "[[[[[]]]]]".comb.&shuffle.join }; say $s } | 13:49 | ||
p6eval | nom bd5adb: OUTPUT«[][[[[]]]][[]][[[]]][[]][[[]]][[][][]][][[][][]][][][[[][]]][[[][[]]]][][][[]][][][[]][][][[][[]]][]» | ||
13:53
xinming joined,
MayDaniel joined,
GlitchMr joined
13:54
kaleem joined
13:59
bluescreen10 joined
|
|||
masak | Whirlpool. domainlanguage.com/ddd/whirlpool/ | 14:00 | |
14:01
xinming left
14:03
xinming joined
14:17
xinming left
14:18
xinming joined
14:29
ilogger2 joined,
ChanServ sets mode: +v ilogger2
14:30
_sri joined
|
|||
masak | timotimo: the goal is to generate any such fixed-length balanced string with equal probability. | 14:31 | |
14:31
avar joined,
avar left,
avar joined
|
|||
masak | timotimo: it's been up for discussion before. TimToady++ w/ family figgered out how to do it using an auxiliary table. | 14:31 | |
14:32
literal joined,
broquaint joined
|
|||
timotimo | i see | 14:32 | |
in that case i believe your solution works pretty well | 14:33 | ||
masak | my version above "fails" in that it has to reject a certain percentage of candidates. the table approach always succeeds but is longer. | ||
I can't help thinking that there is a short, simple solution out there. | |||
timotimo | mhm | ||
14:34
mathw joined
14:36
Gothmog_ joined,
xinming joined
14:49
GlitchMr joined
|
|||
[Coke] | .u *face* | 14:52 | |
phenny | ValueError: Broken regexp: '*FACE*' (file "/home/sbp/Dropbox/inamidst.com/phenny/modules/codepoints.py", line 58, in codepoint_extended) | ||
[Coke] | ZOMG, PHENNY IS MADE OF PYTHON! | ||
14:53
PacoAir joined
|
|||
jnthn | .u fa.* | 14:53 | |
phenny | U+0618 ARABIC SMALL FATHA (◌ؘ) | ||
U+063D ARABIC LETTER FARSI YEH WITH INVERTED V (ؽ) | |||
U+063E ARABIC LETTER FARSI YEH WITH TWO DOTS ABOVE (ؾ) [...] | |||
14:57
PacoAir left
|
|||
masak | .u (((((((((((.*)*)*)*)*)*)*)*)*)*)*)* | 14:58 | |
phenny | masak: Sorry, your input is too long! | ||
masak | :) | ||
timotimo | heh | 15:00 | |
15:04
MayDaniel joined
|
|||
moritz | masak: also it's pretty pointless; only regexes that fail to match actually backtrac | 15:07 | |
k | |||
masak | troo | 15:08 | |
I'm not too good at being malicious. | |||
jnthn | phenny: .u (\w* \d* \s* XX)+ | ||
That one's more...oops. :) | |||
dammit, I didn't mean to actually send it! | 15:09 | ||
moritz | perlgeek.de/blog-en/perl-tips/in-se...egexp.html | ||
jnthn | That one is straight out of my C# regexes course... | ||
Well. Regexes for C# programmers. | |||
masak | jnthn: I think it's harmless if you write 'phenny: ' as you did. | 15:11 | |
benabik | phenny: .u t | ||
.u t | |||
phenny | U+0074 LATIN SMALL LETTER T (t) | ||
masak | right. | ||
jnthn | masak: er, I didn't cyrillic it this time :P | ||
But I'm happy phenny is still alove. :) | |||
*alive | |||
masak | phenny: en ru "I'm doing science and I'm still alive."? | 15:12 | |
phenny | masak: "Я делаю науку , и я все еще жив." (en to ru, translate.google.com) | ||
jnthn | oh, Russian...thanks for the reminder... | 15:14 | |
jnthn afk :) | |||
masak | hee hee | 15:15 | |
perl6: say "Happy Valentine's \x2665" | 15:17 | ||
p6eval | pugs b927740: OUTPUT«Happy Valentine's ⥻ | ||
..rakudo bd5adb, niecza v14-42-g1d02da9: OUTPUT«Happy Valentine's ♥» | |||
15:18
MayDaniel left
|
|||
masak | there's something the matter with the way Pugs output gets presented. | 15:20 | |
moritz | aye | 15:21 | |
15:22
bluescreen10 joined
|
|||
moritz | I promise to investigate whem pugs is again actively developed | 15:23 | |
masak | deal :) | ||
setting up an environment on feather where Pugs can be actively developed will be good for everyone. | 15:24 | ||
15:25
fsergot joined
|
|||
moritz | feather has fairly recent ghc and cabal-install packages | 15:26 | |
not sure what else we need | |||
I also have no ideas which pugs repo is the most recent | 15:27 | ||
masak | github.com/audreyt/Pugs.hs , most likely. | 15:28 | |
activity 11 days ago. | 15:29 | ||
masak clones that one into his home directory | 15:30 | ||
oh, but the hacking file says to use github.com/perl6/Pugs.hs | |||
which has an identical HEAD. | 15:31 | ||
moritz | so it's already synchronized? | ||
masak | guessing au-chan does stuff in her repo, then pushes to the perl6 one. | 15:34 | |
so perl6/Pugs.hs is the "upstreamest" one. | |||
moritz | .oO( the ups and downs in the life of a stream ... ) |
15:36 | |
masak .oO( The Upstremiest Repo That Ever Lived ) | 15:38 | ||
Upstreamiest* | |||
15:41
overrosy joined
|
|||
moritz | ok, successfully built a Pugs.hs from source | 15:42 | |
on feather, that is | 15:43 | ||
15:43
y3llow_ joined
|
|||
moritz | and that Unicode problem is also present on the command line | 15:43 | |
so it's not an evalbot thing | |||
15:43
hillu joined,
Psyche^ joined
15:44
au joined,
birdwindupbird joined
15:45
y3llow_ is now known as y3llow,
clkao joined,
integral joined,
integral left,
integral joined,
z-b joined
|
|||
[Coke] | moritz: does every user have their own cabal ... downloads? | 15:46 | |
15:46
Helios joined
|
|||
timotimo | there is no cabal! | 15:46 | |
15:46
Psyche^ is now known as Patterner,
DarthGandalf joined
15:47
dju joined
|
|||
[Coke] guesses so, as he's now installing packages with cabal. | 15:48 | ||
moritz | [Coke]: yes | 15:50 | |
TimToady | std: Happy ♥'s Day | 15:51 | |
p6eval | std 52f3895: OUTPUT«===SORRY!===Confused at /tmp/i1su4d3F_Y line 1:------> Happy ⏏♥'s Day expecting any of: bracketed infix infix or meta-infix statement modifier loopUndeclared name: 'Happy' used at line 1Parse failedFAILED 00:01 | ||
..109m»… | |||
masak | \♥/ | 15:53 | |
[Coke] | gist.github.com/1827728 - pugs build failure on feather | 15:55 | |
colomon | Conversation just had here: Jen: "You should thank TimToady not to give you an STD." colomon: "std is standard, dear!" Jen: "STDs are *not* standard!" | 15:56 | |
moritz | :-) | ||
masak | [Coke]: that's odd. what's the GHC version? | 16:00 | |
[Coke] | looks like it might be 7.4.1 | 16:01 | |
"whatever is installed on feather". ;) | |||
masak | yeah, getting 7.4.1 on feather too. | 16:02 | |
and the last thing that happened to Pugs.hs was that it got updated for 7.4.1 compatibility. | 16:03 | ||
which indicates that it *should* work on 7.4.1 :) | |||
moritz | and it does, here | 16:04 | |
daxim | ooh, opensuse packagers are slacking | 16:05 | |
moritz | [Coke]: what commit is your Pugs.hs repo on? | ||
[Coke] | 08f0e5052cfccf839f852c883a913298697d146e | ||
moritz | ok, same as mine | 16:06 | |
[Coke] | mine's in ~coke/sandbox/Pugs if that helps. | ||
masak | moritz: it worksforyou on feather? | ||
moritz | masak: it compiled. | 16:07 | |
masak | then the more interesting question is how your setup and [Coke]'s differ. | ||
moritz | and the resulting 'pugs' binary seems to be able to evaluate basic expressions | ||
masak | wohoo! | 16:08 | |
moritz | what I did is run 'cabal update', and then 'cabal install <packages>' for all the packages that 'make' complained about | ||
masak | sounds easy enough. | ||
[Coke] | moritz: did you specify the > < modifiers also? | ||
masak | I'll try it here too. | ||
[Coke] | (one of them had a < requirement.) | ||
moritz | [Coke]: nope | 16:09 | |
[Coke] | cabal doesn't have a "list of installed" ? | ||
benabik | cabal list --installed | 16:10 | |
[Coke] | feather.perl6.nl/~coke/cabal.txt | ||
moritz | same as mine | 16:12 | |
[Coke] | O_o | 16:14 | |
moritz | my karma is just better :-) | ||
masak | karma moritz | 16:15 | |
aloha | moritz has karma of 2965. | ||
masak | karma [Coke] | ||
aloha | [Coke] has karma of 0. | ||
masak | that would explain it, yes. | ||
benabik | karma Coke | ||
aloha | Coke has karma of 575. | ||
16:15
birdwindupbird left
|
|||
moritz | [Coke]++ | 16:16 | |
karma [Coke] | |||
aloha | [Coke] has karma of 0. | ||
moritz | karma Coke | ||
aloha | Coke has karma of 575. | ||
moritz | wtf? | ||
PerlJam | Coke++ | ||
[Coke] | That's fine. | ||
PerlJam | Pepsi-- | ||
:) | |||
[Coke] | I'm not [Coke] anyway. it's just a stupid wrapper I have to wear on freenode. | 16:17 | |
masak | it's the adapter pattern. | 16:18 | |
16:18
thou joined
|
|||
masak | I followed moritz' instructions. I'm getting [Coke]'s error. :( | 16:21 | |
karma masak | |||
aloha | masak has karma of 629. | ||
16:22
wolverian joined
|
|||
benabik | make IGNORE_KARMA=Yes | 16:23 | |
16:32
_ilbot joined
|
|||
[Coke] | I'm using [email@hidden.address] | 16:34 | |
masak too | 16:38 | ||
moritz is using git://github.com/perl6/Pugs.hs.git | 16:39 | ||
I can't imagine the difference matters though, since it's the same HEAD. | |||
benabik | Those should be the same repo (although the git:// URL is read-only) | ||
masak | right. | 16:40 | |
16:44
bluescreen10 left
|
|||
moritz | I don't have any suspicious environment variables either | 16:53 | |
masak | curiouser and curiouser, thought Alice. | 16:54 | |
16:55
PacoAir joined
|
|||
masak decommutes | 16:58 | ||
[Coke] tries to figure out how to call excel from visual basic from java on windows. | 16:59 | ||
16:59
bluescreen10 joined
|
|||
[Coke] gets a little dizzy. | 16:59 | ||
17:07
noam joined
17:13
slavik joined
17:21
kaare_ joined
17:33
colomon joined
17:34
foodoo joined
17:40
dukeleto joined
17:41
Gothmog_ left
17:42
phenny joined,
bluescreen10 left,
Patterner left,
bluescreen10 joined,
buubot_backup joined
17:43
au left,
Gothmog_ joined
17:44
Psyche^ joined,
Psyche^ is now known as Patterner,
au joined,
rsimoes1 joined,
alvis joined
17:47
drbean joined
17:49
zb joined
17:50
overrosy_ joined,
dju_ joined
17:54
Chillance joined
17:55
_ilbot left,
z-b left,
overrosy left,
xinming left,
thou left,
dju left,
Helios left,
kaare_ left
17:56
az5112 joined,
Helios joined,
kaare_ joined,
thou joined,
benabik joined,
ashleydev joined,
tarch joined,
Teratogen joined,
jaldhar joined,
skids joined,
mtk joined,
fhelmberger joined,
jerome_ joined,
p6eval joined,
nsh joined,
scottp joined,
Woodi joined,
yeltzooo joined,
pmichaud joined,
pnu joined,
lumi___ joined,
athomason_ joined,
[Coke] joined,
snarkyboojum joined,
LoRe joined,
risou joined,
krakan joined,
tadzik joined,
Tene joined,
bacek_at_work joined,
masak joined,
daemon joined,
barjavel.freenode.net sets mode: +v p6eval,
snarkyboojum left
17:57
dju_ left,
dju_ joined,
dju_ is now known as dju
|
|||
[Coke] | # 02/14/2012 - niecza at 100% | 17:57 | |
"niecza", 20055, 8, 751, 1573, 22387, 23233 | |||
"rakudo", 20055, 28, 609, 1863, 22555, 23243 | |||
wow. ;) | |||
17:57
p6eval left,
nsh left
17:58
silug_ joined,
snarkyboojum joined,
baest joined
17:59
p6eval joined,
ChanServ sets mode: +v p6eval
18:00
jferrero joined,
nsh joined
18:02
jasonmay joined
18:04
retupmoca joined
18:08
_jfried joined,
_ilbot joined,
japhb joined,
charsbar___ joined,
felher joined
|
|||
TimToady | okay, here's a first whack at my rethink of acceptance types that I promised | 18:09 | |
gist.github.com/1828667 | |||
commuting & | |||
18:12
BooK__ joined
18:13
_jfried is now known as jfried
18:15
simcop2387_ joined
18:23
gfldex left,
pochi left,
geekosaur left,
wolverian left
18:26
_ilbot left,
japhb left,
charsbar___ left,
felher left,
jferrero left,
jasonmay left,
silug_ left,
Helios left,
thou left,
LoRe left,
simcop2387_ left,
kaare_ left,
ashleydev left,
tarch left,
Teratogen left,
jaldhar left,
skids left,
mtk left,
fhelmberger left,
jerome_ left
18:27
scottp left,
Woodi left,
yeltzooo left,
pmichaud left,
pnu left,
lumi___ left,
[Coke] left,
masak left,
daemon left,
bacek_at_work left,
Tene left,
tadzik left,
krakan left,
risou left,
az5112 left,
benabik left,
athomason_ left,
buubot_backup left,
fsergot left
18:28
alvis left,
au left,
colomon left,
mathw left
18:29
foodoo left,
robinsmidsrod left,
overrosy_ left,
Patterner left,
bluescreen10 left,
slavik left,
DarthGandalf left,
avar left,
zostay left
18:30
hillu left,
jfried left,
retupmoca left,
nsh left,
Chillance left,
drbean left,
phenny left,
noam left,
clkao left,
literal left,
baest left,
zb left,
Gothmog_ left,
dukeleto left,
integral left,
GlitchMr left,
p6eval left,
dju left,
rsimoes1 left,
PacoAir left,
_sri left,
broquaint left,
revdiablo left,
renormalist left,
BooK__ left,
snarkyboojum left,
y3llow left,
wolv joined,
isBEKaml joined,
geekosaur joined,
krunen joined,
sirhc joined,
frettled joined,
ocharles joined,
Khisanth joined,
robinsmidsrod joined,
sivoais joined,
cooper joined,
Yappoko___ joined,
foodoo joined,
pochi_ joined,
jnthn joined,
gfldex_ joined,
simcop2387 joined,
BooK__ joined,
felher joined,
charsbar___ joined,
japhb joined,
_ilbot joined,
jfried joined,
retupmoca joined,
jasonmay joined,
nsh joined,
jferrero joined,
p6eval joined,
baest joined,
snarkyboojum joined,
silug_ joined,
daemon joined,
masak joined,
bacek_at_work joined,
Tene joined,
tadzik joined,
krakan joined,
risou joined,
LoRe joined,
[Coke] joined,
athomason_ joined,
lumi___ joined,
pnu joined,
pmichaud joined,
yeltzooo joined,
Woodi joined,
scottp joined,
barjavel.freenode.net sets mode: +v p6eval,
jerome_ joined,
fhelmberger joined,
mtk joined,
skids joined,
jaldhar joined,
Teratogen joined,
tarch joined,
ashleydev joined,
benabik joined,
thou joined,
kaare_ joined,
Helios joined,
az5112 joined,
Chillance joined,
dju joined,
overrosy_ joined,
zb joined,
drbean joined,
alvis joined,
rsimoes1 joined,
au joined,
Patterner joined,
Gothmog_ joined,
buubot_backup joined,
bluescreen10 joined,
phenny joined,
dukeleto joined,
colomon joined,
slavik joined,
noam joined,
PacoAir joined,
DarthGandalf joined,
integral joined,
clkao joined,
hillu joined,
y3llow joined,
fsergot joined,
GlitchMr joined,
mathw joined,
broquaint joined,
literal joined,
avar joined,
_sri joined,
bonsaikitten joined,
rafl joined,
ab5tract joined,
timotimo joined,
pernatiy joined,
Trashlord joined,
araujo joined,
kshannon joined,
TimToady joined,
lestrrat joined,
orafu joined,
unobe joined,
kcw joined,
betterworld joined,
pothos joined,
Vlavv_ joined,
emss joined,
apejens joined,
preflex joined,
felipe joined,
sjn joined,
`10 joined,
etneg_ joined,
retup-work joined,
flussence joined,
imarcusthis joined,
pjcj joined,
ascent_ joined,
kthakore joined,
BooK joined,
tokuhirom3 joined,
stepnem joined,
mls joined,
mtths joined,
jevin_ joined,
Maddingue joined,
arnsholt joined,
[particle] joined,
SHODAN joined,
nebuchadnezzar joined,
Grrrr joined,
ingy joined,
cotto joined,
jrockway joined,
rhr joined,
sftp_ joined,
sudokode joined,
pomysl_ joined,
HarryS joined,
wooden joined,
takesako joined,
revdiablo joined,
zostay joined,
renormalist joined,
jlaire joined,
zamolxes joined,
mikemol joined,
dalek joined,
diakopter joined,
szabgab joined,
Juerd joined,
PZt joined,
PerlJam joined,
c1sung joined,
sunnavy joined,
sorear joined,
cj joined,
awwaiid joined,
tty234 joined,
Guest6426 joined,
cognominal_ joined,
rsimoes joined,
kst joined,
ranguard joined,
prammer joined,
djanatyn joined,
chra joined,
aloha joined,
huf joined,
Timbus joined,
jtpalmer_ joined,
cosimo joined,
BinGOs joined,
ruoso joined,
Lorn joined,
perimosocordiae joined,
Util joined,
pyrimidine joined,
moritz joined,
s1n joined,
shachaf joined,
tomaw joined,
cxreg joined,
kcwu joined,
doy joined,
mattp_ joined,
szbalint joined,
`patch` joined,
barjavel.freenode.net sets mode: +v dalek
18:33
emss left
|
|||
moritz | also it feels slightly wrong to base the presence of the REALLY method on the presence of the payload | 18:37 | |
it means you need to go rather meta jut for instantiating very basic stuff | |||
isBEKaml | masak: I got pugs setup on my machine with GHC 6.12.3, a few months back. :) | 18:38 | |
moritz | also | 18:39 | |
18:39
kaleem joined
|
|||
moritz | the proposal tries to address the matter of having too many acception/rejection types, but has just as many in the result | 18:40 | |
if you count OK/OK+ and Nil/Nil+ as separate types, which it seems you should, because they behave differently | |||
well, Nil/Nil+ behave differently, OK/OK+ don't do so much | 18:41 | ||
so 6 -> 5 | |||
18:45
zby_home joined
|
|||
isBEKaml | perl6: my $x = 42 but False; say "blah" if $x; # nom ? | 18:46 | |
p6eval | rakudo bd5adb: OUTPUT«blah» | ||
..niecza v14-42-g1d02da9: ( no output ) | |||
..pugs b927740: OUTPUT«*** Cannot cast from VBool False to VCode (VCode) at Prelude.pm line 541, column 5-16» | |||
isBEKaml | I was confused for a moment when I tried this on nom until I saw niecza. :) | 18:47 | |
BTW, is that right what rakudo does? known bug, I presume? | |||
18:47
emss joined,
emss left
18:48
birdwindupbird joined
|
|||
jnthn | nom: my $x = 42 but False; say $x.WHAT; | 18:48 | |
p6eval | nom bd5adb: OUTPUT«Int+{<anon>}()» | ||
18:48
emss joined
|
|||
jnthn | nom: my $x = 42 but False; say $x.^methods(:local); | 18:48 | |
18:48
emss left
|
|||
p6eval | nom bd5adb: OUTPUT«Bool» | 18:48 | |
jnthn | nom: my $x = 42 but False; say $x.Bool | 18:49 | |
p6eval | nom bd5adb: OUTPUT«False» | ||
moritz | I guess that's because Int has a separate boolification protocol? | ||
jnthn | moritz: OH | ||
moritz++ | |||
benabik | nom: my $x = 42 but False; say ?$x | ||
p6eval | nom bd5adb: OUTPUT«False» | ||
isBEKaml | Oh, I have to ?$x when doing it in bool context? | ||
jnthn | isBEKaml: No, we just need to know when to stop cheating. :) | ||
18:49
emss joined
|
|||
moritz | one more thing about the proposal... it feels wrong to $regex_match<foo> die in sink context if it has failure information | 18:49 | |
isBEKaml: it's a rakudobug | 18:50 | ||
benabik | isBEKaml: ?$x is another way to explicitly ask for the bool. | ||
moritz | std: :72<foo> | ||
p6eval | std 52f3895: OUTPUT«ok 00:01 107m» | ||
jnthn | ouch, I think I missed the thingy that's being discussed at the moment due to network failz... | ||
jnthn hits the ir clogs | |||
isBEKaml | jnthn: Yeah, I was thinking: "Hey I know this is meant to be used as a bool when I said but False. ?$x is just overdoing it." :) | ||
moritz | jnthn: gist.github.com/1828667 | ||
18:50
gfldex_ is now known as gfldex
|
|||
jnthn | isBEKaml: Yeah, compiling the "obvious patch" for the issue now to see if it works. | 18:53 | |
isBEKaml | jnthn++ # great! | ||
isBEKaml is a bit sad that he can't try nom/rakudo anymore on his machine as the build requirements are far out of reach for his poor old machine. | 18:54 | ||
18:54
xinming joined
|
|||
isBEKaml | .oO(talk about sleepy times and verbosity) |
18:55 | |
benabik | isBEKaml: That may get better when jnthn finishes his serialization work (*knocks on wood*) | 18:56 | |
jnthn | It almost certainly will. | 18:57 | |
TimToady | jnthn: the OKness proposal is basically trying to name your primitive cheating mechanism :) | ||
jnthn | TimToady: I did a o.O as soon as it started talking about roles being inside or out of Any. ;) | ||
18:58
fridim_ joined
|
|||
TimToady | where they instantiate to, really | 18:58 | |
jnthn | (Generally they only pretend to be in any of these so we can pass them around first class) | ||
TimToady: OK | |||
benabik | .oO( role OK is instantiates(Mu) {...} ) |
18:59 | |
jnthn | Dang my patch fai...oh...that's because I didn't build the new nqp with op moritz++ added :) | ||
18:59
xinming left
19:00
foodoo left
|
|||
jnthn | Failure and Match will both go away as insufficiently general. | 19:01 | |
==> Match stays in the sense of it being the Match type object though? | |||
It's just not what we return on a failed Match? | |||
isBEKaml | benabik,jnthn: that's great! # hopeful | ||
jnthn | A successful match now returns OK instantiated with match info, if any. | 19:02 | |
==> Are we talking about "top level" matches here? Or all the way down? | |||
TimToady | gist.github.com/1828667 has tweaks from some of your suggestions | 19:03 | |
jnthn | To first approximation, OK/Nil force only truth, definedness, and .REALLY; | 19:04 | |
==> we're talking .defined level here, not .DEFINITE level? | |||
TimToady | well, I think they track in this case, offhand | 19:05 | |
but OKness is necessarily on a primitive level, so carries .DEFINITE as well as primitive boolean | |||
jnthn | .DEFINITE is *really* low level in 6model | 19:06 | |
TimToady | only question is whether .defined delegates, and I don't think it does | ||
jnthn | Like, "checks a bit somewhere" level | ||
Like, "if you screw this up we segfault" level. | |||
TimToady | I'm hoping with a good enough definition of OKness we can get away from juggling circularity saws, at least on booleans and defineds | 19:07 | |
jnthn | It's really the "is this a type object" flag. | ||
Well, we added .DEFINITE distinct from .defined to be a circularity saw. | |||
TimToady | is there a name for primitive boolean context? | 19:08 | |
jnthn | TimToady: No. (more) | ||
TimToady: I've considered that "primitive" thing as purely an optimization so far. | |||
It's leaking out in the "but True" example you showed in just a straight "getting caught cheating" thing. | 19:09 | ||
I can imagine a primitive boolean context style operation. | |||
But my primary goal was optimization at the low level, rather than different semantics at the high level. | |||
TimToady | sure, just trying to clean up the success/failure semantics to make it easier, and perhaps make it more obvious when we're cheating on purpose | 19:10 | |
jnthn | *nod* | ||
TimToady | KEEP/UNDO probably simplifies a bit under OKness too | 19:11 | |
jnthn | Yeah, I'm happy to clear things up. Just need to get my head around the details. :) | ||
TimToady | I probably need some rows in my table for things like type objects, and maybe s'more columns | ||
well, except type objects are largely outside of OKness, so they aren't treated as automatic success/failure by smartmatch | 19:13 | ||
jnthn | TimToady: Is there a particular reason OK and Nil are themselves roles? | ||
TimToady: That'd imply you could mix them in to things. | |||
19:13
kaleem left
|
|||
jnthn | If you do that, what are the semantics? | 19:13 | |
TimToady | was originally thinking of instantiation rather than delegation, but I don't think you want to be mixing them into other things; more the other way around, since they're primitive | 19:14 | |
and "delegation" might not be high-level delegation either | |||
jnthn | Delegation tends to imply you have an instance. :) | 19:15 | |
TimToady | "mixin" likely means something different than high-level mixin | ||
jnthn | (which holds the attribute to delegate to) | ||
TimToady | this is more just trying name the primitives we're already using anonymously, along with trying to straighten out the user-visible namespace | 19:16 | |
[Coke] | woot. I think I'm going to YAPC! | 19:17 | |
TimToady | niecza: say <a b c> »~~» /b/ | ||
p6eval | niecza v14-42-g1d02da9: OUTPUT«Match() #<match from(0) to(1) text(b) pos([].list) named({}.hash)> Match()» | ||
TimToady | I'm trying to get that to come out: Nil OK[stuff] Nil | ||
skids | Slightly OT: Is rakudo's <{fail}> in regexp formally considered a cheat? It does what I consider to be the right thing and propagates something that explodes down to the root of the returned result, but that's despite the fact that it is tested for truthfulness during the regexp match, which should mark it as "handled" (?) | ||
TimToady | skids: the interaction of normal failure with backtracking is not yet quite nailed down; it might be that only specific kinds of failure induce specific kinds of backtracking | 19:19 | |
but all such failures would be some variant of Nil in the new model | 19:20 | ||
jnthn | Not to mention that the regex engine just does the cheapest thing it can do figure out if the match was a success :-) | ||
*.does(OK) & none *.can('REALLY') | 19:21 | ||
When would an OK not be able to REALLY? | |||
TimToady | meta-talk really | ||
I'm talking about if the "delegate" slot is empty | |||
jnthn | ok | ||
Ah, that's what the "payload" column means | |||
TimToady | and perhaps not even allocated | ||
i.e. wouldn't need a delegate pointer if the 'delegate exists' bit was false | 19:22 | ||
19:22
xinming joined
|
|||
jnthn | "Types outside of OKness must call .Bool to determine truthiness" | 19:22 | |
Actually the boolification cheating I have is to avoid having to call a method when we can very quickly check for zero, which is the case for, say, an Int or Num. | 19:23 | ||
TimToady | trying to nail down when you can just look at the bit, and when you have to ask the object nicely | ||
we might find some way of bending that part | 19:24 | ||
jnthn | OK, but in some cases I've wanted to cheat for things that are more than "look at the bit" :) | ||
19:24
MayDaniel joined
|
|||
skids | jnthn: RE delegation, well there is the NYI "method foo () handles" which could return a class expecting calls to the class instead of an instance... | 19:24 | |
TimToady | it's difficult to know when you're breaking Liskov on that though | 19:25 | |
19:25
PacoAir left
|
|||
jnthn | TimToady: Yeah, that's what the "but True" bug just caught us doing :) | 19:25 | |
TimToady | I don't know whether this is quite sane yet, but I think this is a path toward sanity | 19:26 | |
19:27
xinming left
|
|||
jnthn | TimToady: Yes, there's much to like in here. And much to ponder.. | 19:28 | |
Match ~~ OK[Match] # ?? | |||
OK[Match] ~~ Match # ?? | |||
(using [...] in a handwavey sense here) | 19:29 | ||
oh | |||
The latter can't be true | |||
H | |||
Hmm | |||
Well | |||
Nil[Match] ~~ Match had best be false :) | |||
19:30
PacoAir joined
|
|||
TimToady | Types outside of OKness must call .Bool to determine truthiness (though native types and known-non-derived types can generally optimize this away). | 19:32 | |
Along with Bool, OKness types may not be used literally in smartmatching, and will warn when such usage is parsed. | |||
jnthn | Yeah, known non-derived is what blew things here. | ||
19:33
fridim_ left
|
|||
jnthn | TimToady: My questions above were not in the smart matching sense, but in the type checking sense | 19:33 | |
TimToady | that level may also require cheats | ||
jnthn | sub foo(Match $m) { }; foo("abc" ~~ /a/) | ||
TimToady | there is no Match anymore | 19:34 | |
19:34
fridim_ joined
|
|||
TimToady | there's a conjecture that you write that: sub foo(OKness $m) | 19:34 | |
jnthn | So...there's no class Match { ... } ? | ||
TimToady | nor any class Failure | ||
jnthn | OK, what represents a Match object? | ||
TimToady | these turn notionally into annotated OK and Nil | ||
OK with match info inside | 19:35 | ||
benabik | Match info stored in something other than a Match object? | ||
TimToady | such an OK is not much different than our current Match type | ||
jnthn wonders if it's a different meta-object | |||
TimToady | benabik: basically it's just a rename of Match to OK | ||
moritz | how can I tell if an OK is a result of a regex match? | ||
jnthn | ok Match { has $!CURSOR; ... } | ||
TimToady | and OK by itself is now generalized success | 19:36 | |
jnthn | Hm | ||
No, not that... :) | |||
TimToady: What do you think the definition of the thing that replaces Match will look like? | |||
TimToady | moritz: use case? | ||
moritz | TimToady: debugging | ||
TimToady | well, not many things will be returning OK other than match | 19:37 | |
most .ACCEPTS just return True or False | |||
moritz | can't we just continue to call it Match then? | ||
and require defined-but-false Match to .gist-ify something that clearly indicates a match failure? | 19:38 | ||
TimToady | Match is not a good name for success, I think | ||
moritz | nom: say 'a' ~~ /b/ | ||
p6eval | nom bd5adb: OUTPUT«#<failed match>» | ||
moritz | or maybe return a different type from a failed match | ||
moritz is kinda fond of Match being returned from a match. | |||
TimToady | so I perceive, but maybe it's just sentimental attachment | 19:39 | |
moritz | and maybe it's genuine | ||
TimToady | we're trying for clean primitives here, and most languages just give you something vs Nil | ||
before it was just handwaving that makes Match work with smartmatching (when it does work) | 19:40 | ||
moritz | yes, I agree that something should be done in that area | 19:41 | |
[Coke] | Anyone planning to go to YAPC::NA? they're looking for intro talks, wondering if an intro to perl6 would be good. | ||
TimToady | I really do think that people will not find it confusing for matches to return OK or Nil | ||
eek, *do not | 19:42 | ||
eek, nevermind | |||
TimToady can't read | |||
benabik | OK just being able to store random information for the match seems stranger to me. | ||
skids | Yeah it's the part about OK being the type where things like .from and .to are specified that feels a bit icky. | 19:44 | |
TimToady | well, of course it's stranger till you get used to it...historically most of my strange unifications have been...strange... | ||
moritz | TimToady: do you think of OK as actually delegating to its payload, or more like mixing stuff in? | 19:45 | |
TimToady | there probably is a "match" object hiding inside of OK that, as the delegate, dispatches all those matchly methods | ||
skids | but cannot exist without an OK wrapping it? | ||
TimToady | moritz: it's really a primitive composition, and doesn't really describe itself well in terms of high-level constructs | 19:46 | |
skids: it can, but won't respond to smartmatching the way you'd think | |||
jnthn | TimToady: So your use of "role" here is just trying to convey the idea rather than say what you really think OK and Nil are? | ||
TimToady | nodnod | 19:47 | |
moritz | TimToady: creating a new OO construct feels like a bit of a warning sign (not saying it's wrong, but...) | ||
TimToady | sorry for all the misleading metaphors | ||
moritz: more trying to describe what's already there on some levels | |||
or in some cases ought to be there as primitive as booleanness already is | 19:48 | ||
jnthn | TimToady: It almost feels like you want to apply the decorator pattern at the meta-object level. :) | ||
19:49
pernatiy left
|
|||
jnthn | TimToady: That is, we're really defining a class BUT with some set of presumptions that normal classes don't have. | 19:49 | |
TimToady | yes, just like native types | 19:50 | |
and with similar restrictions on being productive | |||
(as well as potential efficiency benefits) | |||
19:51
snearch joined
|
|||
TimToady | OK might even delegate the HOW to the "real" object, since OKness is just some bits | 19:53 | |
jnthn | TimToady: Yes, that's what I was getting at when I said decorator. | ||
TimToady | there might be no effective difference between "0 but OK" and "OK but 0" | ||
jnthn | That seems hard to imagine | 19:54 | |
TimToady | it would have to be trapped and cheated on, if so | ||
or we use other notation for it | 19:55 | ||
jnthn | Yes, because flattening composition normally implies that the meta-object being composed in doesn't play a role beyond the composition (maybe apart from appearing in the type check list of the target type) | 19:56 | |
TimToady | if we hijack OK[] then we cheat in role space rather than infix:<bug> | ||
er, *but :) | |||
benabik | Does but True and but False become playing with OK and Nil? | 19:57 | |
TimToady | or we just have some primitive macros that flip bits | ||
benabik: perhaps, if we cheat using "but" | |||
19:58
xinming joined
|
|||
TimToady | officemates at the door... | 19:58 | |
lunch & | |||
20:01
MayDaniel left
20:02
xinming left
20:10
xinming joined
20:15
xinming left
|
|||
dalek | kudo/nom: d4d4a21 | jnthn++ | src/Perl6/Metamodel/Mixins.pm: Fix but True / but False. |
20:18 | |
20:37
spine joined
20:45
birdwindupbird left
20:46
mls left
|
|||
spine | hi #perl6 | 20:54 | |
masak | OK/Nil seems to me like an odd pairing. | ||
spine | anyone got an idea why my local variables don't get gced on nom? | 20:55 | |
masak | spine: hi! | ||
spine | perl6 -e 'sub a { my $b = "x" x 10_000; }; a() for 1..*;' eats up my memory at 40MB/s. | ||
masak | sounds like a bug. | ||
jnthn | nom doesn't know about sink context yet | 20:56 | |
So it's acting like map and building up a result list | |||
It's not a GC bug, it's that we're actually holding on to them until the end of the for loop, when we should be throwing them away. | 20:57 | ||
I'll bet if that sub is sub a { my $b = "x" x 10_000; 1; } then it doesn't leak. | 20:58 | ||
spine | jnthn: oh, I see | ||
masak | I like the unification of making fail/succeed semantic cousins. | ||
as well as Nil.anything passing on Nil. | 20:59 | ||
if Nil is now an item, we need a new idiom for the "empty for loop" use case. | |||
jnthn | spine: Yeah. It's a bug, but not about GC of local variables. | 21:00 | |
spine | jnthn: so I'll just be careful to return something small from my functions for now :) | ||
PerlJam | jnthn: I agree with your assessment, but it still leaks with the return value | 21:01 | |
masak | bare return still needs to return something that's false and undefined, IMO. | ||
PerlJam | masak: agreed. | 21:02 | |
(but I may just be agreeing because of my history with Perl 5) | |||
jnthn | PerlJam: er, yeah | ||
I shoulda said "leaks a lot slower" rather than "doesn't leak" | |||
Nil as the last thing may not leak. | |||
But the real answer is "need sink" | 21:03 | ||
PerlJam | aye | ||
masak | PerlJam: yeah, me too. maybe it is as moritz++ says that 'return' now means, 'OK, we're done here, return successfully'. | 21:04 | |
PerlJam: maybe routines that exit with 'return' should be considered to have done a 'void return', and the value will explode if ever inspected by the caller :) | 21:05 | ||
dalek | p/bs: 1cb59b4 | jnthn++ | / (2 files): Sketch out NQPRoutine and NQPSignature, which we'll migrate towards in place of a couple of PMCs. This will ease serialization, eliminate two PMCs and also eliminate our use of :instanceof. Hopefully... |
||
p/bs: 52e0e73 | jnthn++ | / (6 files): Move NQP's multi-dispatcher out of the 6model folder; it's not a core part of 6model. |
|||
p/bs: 37c6c88 | jnthn++ | / (2 files): NQPRoutine needs to delegate invocation in order to serve as a code object. |
|||
21:05
GlitchMr left
|
|||
dalek | p/bs: 22467fe | jnthn++ | src/guts/multi_dispatch.h: Sketch out C struct mappings for NQPRoutine and NQPSignature. |
21:05 | |
masak | that doesn't sound too Perlish, though. | ||
PerlJam | nope | ||
almost makes me want another keyword ... "finish" | |||
but maybe we should get rid of return and entirely and just use succeed/fail | 21:07 | ||
s/and// | |||
[Coke] | how would succeed differ from return? | ||
. o O (succeed Failure.new()) | 21:08 | ||
PerlJam | [Coke]: mostly in connotation. "succeed" says more about the result than "return" does | ||
masak | maybe that's the thing. 'return' is neutral. 'succeed' is a successful return. 'fail' is a return in shame. | 21:12 | |
I could certainly imagine coding like that :) | |||
PerlJam | me too | ||
the only problem is that to "steal" succeed from when blocks like that probably means it will need a replacement :) | 21:13 | ||
[Coke] | meh. | ||
21:14
az5112 left
|
|||
masak | does it. | 21:14 | |
s/\./?/ | |||
PerlJam | (I'd vote for "done") | 21:15 | |
masak | [Conjecture: fail scopes to topicalizer/sub the same as succeed] | ||
sounds to me we'd get to keep the 'when' block semantics. | |||
PerlJam | I dunno. that's deeper thoughts than I can give right now. | ||
masak | and 'done' is taken by Test.pm :) | ||
21:16
tk_ joined
|
|||
tk_ | hi, so what is the different between rakudo star and rakudo on parrot | 21:16 | |
masak | tk_: hi! | ||
PerlJam | tk_: rakudo star has a bunch of modules and things | ||
masak | tk_: both of those run on Parrot. | ||
PerlJam | tk_: rakudo star *is* "rakudo on parrot" but with more stuff | 21:17 | |
masak | Rakudo proper is just the compiler. Rakudo Star bundles a bunch of nice stuff. | ||
tk_ | oh so rakudo star is snapshots of rakudo compiler + modules and stuff? | ||
21:18
MayDaniel joined
|
|||
masak | aye. | 21:18 | |
tk_ | :) | ||
appreciate it | |||
masak | rakudo: say "OH HAI, tk_!" | ||
p6eval | rakudo bd5adb: OUTPUT«OH HAI, tk_!» | ||
masak | star: say "This is Rakudo Star speaking :)" | ||
p6eval | star 2012.01: OUTPUT«This is Rakudo Star speaking :)» | ||
masak | see there, the rakudo gives a git hash (latest commit) as its version, but the star one gives a release version number. | 21:19 | |
tk_ | :) | ||
so cool | |||
masak | so it's wheels within wheels. one develops quickly, the other is more stable. | ||
[Coke] | star: use Nativecall;\ | ||
p6eval | star 2012.01: OUTPUT«===SORRY!===Could not find Nativecall in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/rakudo-star-2012.01/install/lib/parrot/3.11.0/languages/perl6/lib, .» | ||
masak | yeah, the bots are cool. I forget sometimes how cool they are. :) | ||
[Coke] | star: use Nativecall; | ||
p6eval | star 2012.01: OUTPUT«===SORRY!===Could not find Nativecall in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/rakudo-star-2012.01/install/lib/parrot/3.11.0/languages/perl6/lib, .» | ||
[Coke] | star: use NativeCall; | 21:20 | |
PerlJam | [Coke]: heh, I just did that in /msg | ||
p6eval | star 2012.01: ( no output ) | ||
[Coke] | (ugh!) | ||
rakudo: use NativeCall; | |||
p6eval | rakudo bd5adb: OUTPUT«===SORRY!===Could not find NativeCall in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/nom-inst1/lib/parrot/4.0.0-devel/languages/perl6/lib, .» | ||
[Coke] | (there's a concrete example.) | ||
tk_ | [Coke]: tyvm | ||
was it difficult updating rakudo to work with parrot 4.0? | 21:21 | ||
masak | star: say "[[[[[]]]]]".comb.pick(*).join | ||
p6eval | star 2012.01: OUTPUT«][[][]][][» | ||
masak | tk_: don't think so. | ||
tk_: communication these days flows fairly effortlessly between the Rakudo camp and the Parrot camp. | |||
tk_ | parrot seems like a very difficult project | ||
PerlJam | tk_: like anything else, the hard part is nailing down what "it" is. | 21:22 | |
tk_ | yes, i admire the vision of the parrot foundation | ||
masak | Parrot is suffering a little bit from lack of a Very Satisfied Customer. | 21:23 | |
Rakudo is its main customer, but we've had to invent some of the stuff itself because (at the time, at least) Rakudo couldn't wait for Parrot to get them. | |||
tk_ | so was the stuff built on rakudo or contributed to parrot? | 21:24 | |
PerlJam | tk_: both | ||
tk_ | have anyone here contributed to the perl 6 book? | 21:25 | |
PerlJam | tk_: you can think of some of the things pioneered with Rakudo as the test run for what gets implemented in Parrot | ||
masak | tk_: most people who have contributed to the Perl 6 book hang out here, yes. | ||
PerlJam | masak: most? Who doesn't? ;) | 21:26 | |
21:26
pernatiy joined
|
|||
tk_ | is the virtual machine a new concept for perl? | 21:26 | |
is parrot the first perl virtual machine? | 21:27 | ||
PerlJam | tk_: that it's a separate, well-defined thing is new to Perl | ||
masak | PerlJam: I was pretty sure there are contributors of smaller things who aren't regulars here... :) | ||
PerlJam | tk_: but Perl 5 has a VM of sorts | ||
tk_ | PerlJam: oh? | ||
masak | everyone is so surprised Perl 5 has a VM! :) | ||
tk_ | i had to ask | 21:28 | |
masak | oh, sure. | ||
tk_ | i hope perl 6 kills java | ||
masak | tk_: Perl 5 code gets compiled into some kind of op tree. the interpreter then runs the op tree. | ||
PerlJam | I hope Perl 6 doesn't kill anything | ||
I hope that Perl 6 lives and thrives and makes its own way in the world | 21:29 | ||
benabik | Oracle's doing a pretty good job of killing Java. They don't need help. ;-) | ||
masak | I find it unlikely that everyone doing Java today will do Perl 6 tomorrow. :) | ||
tk_ | they are opposite | ||
PerlJam | benabik: we just have to cross our fingers that Oracles doesn't decide to help Perl 6 ;) | ||
s/les/le/ | 21:30 | ||
tk_ | is a virtual machine defined in the specification of perl 6? | ||
is it in java? | |||
benabik | Java's VM has a specification. I don't think the language spec is explicitly tied to it. (I could be wrong.) | 21:31 | |
PerlJam | tk_: I don't think that Perl cares how things are implemented as long as they have the proper syntax and semantics. | ||
21:31
xinming joined
|
|||
[Coke] | masak: I do java. I'd drop it for perl6 if I could make a convincing business case. (but sadly cannot) | 21:32 | |
masak | tk_: you'd have a hard time making a fully compliant Perl 6 implementation that *didn't* run on a VM. | ||
geekosaur | tk_, there is no VM specified, and two of the current implementations are on different VMs (Parrot and CLR) | ||
tk_ | so the perl virtual machine is made so that perl can run cross - compatible? what are the advantages and disadvantages? | 21:33 | |
geekosaur | er? | ||
masak | [Coke]: main reason I'm still doing helping with Perl 6 is to see it ease into the world a little each day. so that I (and others) can use it practically for more things. | ||
tk_ | geekosaur: i realize that one advantage of a virtual machine is that programs can be run independently of the system they are running on. but what are the _real_ advantages? | 21:34 | |
PerlJam | masak: watching it ease into Perl 5 is interesting too :) | ||
masak | indeed. | ||
but they can't steal some of our best stuff because backwards compat. | |||
PerlJam | depends on how well obra's plan for the future is executed. It may be that one day they break back-compat. because they can. | 21:35 | |
masak | nod. | 21:36 | |
obra++ | |||
21:36
xinming left
|
|||
PerlJam | and then we'll wake up one day and Perl 5 will have morphed into Perl 6 and there will only be Perl :) | 21:36 | |
jnthn | tk_: All we really mean by "virtual machine" here is "something that provides services that a language implementation needs at runtime". Part of that is access to the underlying OS, part of it is garbage collection (freeing memory that is no longer in use), part of it is actually executing code, and so on. | 21:37 | |
tk_ | nqp is like rakudo in that it compiles code for parrot? | 21:39 | |
PerlJam | tk_: you can think of nqp as a mini-perl6 | 21:40 | |
[Coke] | ISTR jnthn++ had a nice slide for that. | 21:41 | |
dalek | p/bs: 52c1b2b | jnthn++ | src/NQP/ (3 files): Big refactor of block and symbol handling in NQP. This more fully shuffles it into NQP::World, matching the factoring that's worked out so nicely in Rakudo. It'll also make the upcoming multi refactoring much easier. |
||
jnthn | [Coke]: You may be thinking of the Rakudo architecture diagram from get_legacy_block_list() | 21:42 | |
er | |||
from jnthn.net/papers/2011-tcpw-optimization.pdf | |||
[Coke] | jnthn: that seems sufficiently recent and pretty, yes. | 21:45 | |
tk_: try that URL, page through to "Rakudo Architecture". | |||
tk_ | ruby v python? | 21:48 | |
PerlJam | ruby wins! | 21:50 | |
21:50
xinming joined
|
|||
tk_ | i havent used it, but i'm not sure if i can love anything as much as python | 21:51 | |
i also think that the industry needs to catch up with py3 | |||
masak | good luck. | 21:52 | |
tk_ | its unfortunate that i have to write code in py2 | ||
s/have/am forced | |||
masak | now you know how we feel, with Perl 5 and Perl 6 :) | 21:55 | |
21:55
kaare_ left
21:56
rsimoes1 left
|
|||
tk_ | "the perl 6 teleportation project" | 21:56 | |
21:56
rsimoes1 joined
|
|||
tk_ | in which caffeined perl 6 macho devs port every package to perl 6 | 21:57 | |
[Coke]: 'we do a few fixups do world' ..?? | |||
is AST v World like .c v .h? | 21:58 | ||
[Coke] | tk_: context? | ||
tk_ | in the slide | ||
'how rakudo runs programs' | 21:59 | ||
21:59
dalek left
|
|||
jnthn | tk_: The AST captures the execution aspects of the program (like statements). The World captures the declarations (classes, routines, etc.) | 21:59 | |
22:00
dalek joined,
ChanServ sets mode: +v dalek,
xinming left
|
|||
jnthn | tk_: There's a phase when we've compiled the AST when we need to tweak some things. In Perl 6 you can run code at compile time, so when we parse a routine, we install a "compile it on demand" stub thingy. But before we run the program we have to replace that "compile on demand" stub with the real compiled output. | 22:01 | |
That phase is called "fixup time" in Rakudo. | |||
nom: sub foo() { say "I get run!" }; BEGIN { foo() }; omfg !!!!! a parse error!! | 22:02 | ||
p6eval | nom bd5adb: OUTPUT«I get run!===SORRY!===Confusedat /tmp/ss0bh2qdR4:1» | ||
tk_ | jnthn: is that the basis of JIT? in order to run at compile time? | 22:03 | |
jnthn | tk_: No, JIT would be at a rather lower level than this. | ||
tk_ | jnthn: its a concept that needs a name | 22:04 | |
jnthn | tk_: Though the "on demand" compilation is indeed what JIT compilers do. | ||
tk_: But this is something else. | |||
tk_: In Perl 6 we talk about BEGIN time. This is the time during compilation. | |||
So the code I wrote there gets run at BEGIN time. | |||
(and no, it's not something you do very often :-)) | 22:05 | ||
(it's a power tool) | |||
PerlJam | parse-time thunking of compile-time information for proper run-time semantics | ||
(but run-time could happen at any time ;) | 22:06 | ||
jnthn | Perl 6 kinda blurs the lines for the user, but if you're implementing the stuff you'd better know which you're doing at a given point in time. :) | 22:08 | |
tk_ | pypy is so cool | 22:10 | |
it translates python into c | |||
so does rakudo compile perl 6 into a subset of perl 6 for efficient compilation? | 22:12 | ||
i.e. nqp | |||
jnthn | tk_: No, both Rakudo and NQP genrate an AST, and that is in turn transformed into code for the Parrot VM. | 22:13 | |
tk_: NQP being simpler allows us to more easily optimize it, and means it can be bootstrapped too. | |||
Well, we could technically bootstrap all of Rakudo, but...I'd not fancy that. :) | 22:14 | ||
tk_ | what is bootstrapped | ||
jnthn | tk_: NQP can compile itself. | ||
tk_: That is, it's written in NQP. | |||
tk_ | it said it was written in parrot | ||
jnthn | At least, mostly; the few parts left that aren't soon will be. | 22:15 | |
PerlJam | tk_: bootstrapping is building just enough of a compiler to write a complicated compiler. Keep doing that until you have the compiler of appropriate complexity that you wan.t | ||
to write a more complicated compiler. | |||
tk_ | rakudo uses nqp? | ||
PerlJam | tk_: ye | ||
jnthn | tk_: Rakudo is mostly written in NQP | ||
tk_ | so you could eliminate rakudo and write in nqp? | 22:16 | |
22:16
isBEKaml left,
bluescreen10 left
|
|||
jnthn | tk_: Yes, NQP is a language in its own right. | 22:16 | |
tk_ | why wouldnt you do that, jnthn | ||
jnthn | tk_: It's a subset of Perl 6, with just the right things for writing compilers. | ||
tk_ | thats what i said | ||
PerlJam | tk_: NQP doesn't have assignment for instance. Only binding. | 22:17 | |
tk_ | example? i dont | ||
22:18
isBEKaml joined
|
|||
masak | binding is tying a value to a variable. assignment is placing a value in a container (which in turn may be tied to a variable). | 22:19 | |
nom: my $a; my $b := $a; $a = 42; say $b | |||
p6eval | nom bd5adb: OUTPUT«42» | ||
masak | (the ':=' is binding, and makes $b and $a point to the same container) | ||
so, um, binding is tying *something* to a variable -- either a value or a container. | 22:20 | ||
nom: my $a := 42; $a = 5 | |||
p6eval | nom bd5adb: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/p6UiRlEkLx:1» | ||
masak | when tying $a directly to a value like that, it loses its ability to be assigned to. because the container that assignment needs is out of the loop -- there's just the variable and the value. | 22:21 | |
tk_ | so declare and define is equivalent to bind and assign? | ||
masak | I'm not sure that analogy holds, no. | ||
tk_ | what else is := used for? | 22:25 | |
masak | signature binding. | 22:26 | |
nom: sub foo($a) { say $a }; my $b = 42; foo($b) | |||
p6eval | nom bd5adb: OUTPUT«42» | ||
masak | the $a and the $b are distinct variables, but they need to point to the same value/container. | ||
binding to the rescue. | 22:27 | ||
tk_ | thank you, lover. | ||
masak has never been called "lover" on #perl6 before :) | 22:28 | ||
tk_ | normally i'd reserve that language for my usb port, but you're something special ;) | 22:29 | |
masak | not gonna argue there. :) | ||
pyrimidine | it's getting hot in here :) | ||
masak should've said "...I see my reputation precedes me" :) | 22:30 | ||
tk_: we do want to let newbies feel they are loved when they arrive. we love to heap attention on them. | 22:32 | ||
tk_ | i'm speechless | 22:33 | |
tk_ has a sense of gratitude in his eyes | |||
22:35
tk_ is now known as tk________
|
|||
tk________ | *ahem* | 22:35 | |
tk________ crosses legs | |||
masak | now that's perhaps somewhat below the level of discourse we try to keep around here. | 22:38 | |
keep in mind this is a family channel. | |||
tk________ | im trying to keep it g | 22:39 | |
22:39
tk________ is now known as tk______,
xinming joined
22:40
drbean left
22:41
isBEKaml left,
drbean joined
|
|||
masak | nom: .say for (1, 1, 2, * + * ... *)[^20] | 22:41 | |
p6eval | nom bd5adb: OUTPUT«11235813213455891442333776109871597258441816765» | ||
22:42
lestrrat left,
lestrrat joined
22:43
fsergot left
22:44
xinming left,
isBEKaml joined
|
|||
tk______ | masak: in the signature binding example you never used := | 22:44 | |
22:46
fridim_ left
|
|||
masak | no, because the binding is done behind the scenes, through the function call. | 22:48 | |
but you asked about another example of binding, not of the actual ':=' syntax. | |||
tk______ | oh | ||
OH | 22:49 | ||
22:49
fridim_ joined
|
|||
tk______ | my comp sci teacher always used to say "java 5's new boxing feature hurr durr" which made primitive data types into objects | 22:50 | |
autoboxing | |||
masak | in Perl 6, Int is a full-featured object, and int is the native type. | 22:52 | |
generally, you'd use Int for full flexibility, and int for memory compactness/speed. | 22:53 | ||
tk______ | a:=42 is that an Int or int | 22:55 | |
masak | std: a := 42 | 22:56 | |
p6eval | std 52f3895: OUTPUT«===SORRY!===Preceding context expects a term, but found infix := instead at /tmp/SaaPMU4bNU line 1:------> a ⏏:= 42Parse failedFAILED 00:01 109m» | ||
masak | it's not syntactically correct Perl 6. | ||
you need to declare variables, using 'my' or equivalent. | 22:57 | ||
benabik | nom: my \a := 42; say a | ||
p6eval | nom bd5adb: OUTPUT«===SORRY!===Malformed my at line 1, near " \\a := 42;"» | ||
benabik | NYI, I guess. | ||
tk______ | masak: so, using = on an int would be illegal? | 22:58 | |
because it doesnt have a container | |||
in reference to your earlier example | |||
jnthn | tk______: If you want to work with native types, you have to explicitly declare variables as being natives | ||
my int $a = 42; # $a stores 42 as a native integer | 22:59 | ||
my $a = 42; # $a stores 42 as a boxed Int | |||
tk______ | std: my int $a = 42; $b = 43 | ||
p6eval | std 52f3895: OUTPUT«===SORRY!===Variable $b is not predeclared at /tmp/3JLRbG4vmK line 1:------> my int $a = 42; ⏏$b = 43Check failedFAILED 00:01 111m» | ||
tk______ | std: my int $a = 42; my $b = 43 | ||
p6eval | std 52f3895: OUTPUT«ok 00:01 110m» | ||
tk______ | std: my int $a = 42; my $b = $a | 23:00 | |
p6eval | std 52f3895: OUTPUT«ok 00:01 110m» | ||
tk______ | std: my int $a := 42; my $b = $a | ||
p6eval | std 52f3895: OUTPUT«ok 00:01 110m» | ||
masak | tk______: your question about natives, assignment, and containers makes a lot of sense. I don't know the answer, though. | ||
tk______ | std: my $a := 42; my $b = $a | ||
p6eval | std 52f3895: OUTPUT«ok 00:01 110m» | ||
masak | keep in mind that STD only checks syntax, it doesn't run your code. | ||
skids | jnthn: that kinda confuses me given the "native types dispatch to their container's methods" thing, which makes me expect "my $i = int(42)" to be the way to do things. | 23:01 | |
tk______ | nom: my $a := 42; my $a = 5 | 23:02 | |
p6eval | nom bd5adb: OUTPUT«===SORRY!===Redeclaration of symbol $aat /tmp/EMNdolqru0:1» | ||
tk______ | nom: my $a := 42; $a = 5 | ||
p6eval | nom bd5adb: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/cDYF5FsQjy:1» | ||
tk______ | nom: my int $a := 42; $a = 5 | ||
p6eval | nom bd5adb: OUTPUT«===SORRY!===Cannot bind to a natively typed variable; use assignment insteadat /tmp/onl5kHz6Ht:1» | ||
23:02
lestrrat left
|
|||
tk______ | nom: my int $a = 42; $a = 5 | 23:02 | |
p6eval | nom bd5adb: ( no output ) | ||
masak | seems it's binding that doesn't work for natives. | ||
jnthn | Correct. | 23:03 | |
Because there's no container. | |||
tk______ | so its Int by default | ||
23:03
lestrrat joined
|
|||
tk______ | nom: my Int $a := 42; $a = 5 | 23:03 | |
p6eval | nom bd5adb: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/HL7WKXUkdu:1» | ||
jnthn | skids: It's not quite like that - actually if you do a method call on a native type it has to box it first. | 23:04 | |
skids: When you declare "my int ..." you're saying "don't allocate a container, instead just make space in the lexpad for a native integer" | |||
dalek | p/bs: 0fad218 | jnthn++ | src/ops/nqp.ops: Add an op for setting the signature as a single object. |
23:06 | |
p/bs: e7be6cc | jnthn++ | src/guts/multi_dispatch.h: Fix typo. |
|||
p/bs: 18f17e9 | jnthn++ | src/ops/nqp.ops: Oops, can't remove this yet - gotta go round the bootstrap loop. |
|||
p/bs: 78fb2c3 | jnthn++ | src/guts/multi_dispatch.c: Get multi dispatcher to recognize both new and old way of doing the signature for a moment. |
|||
p/bs: bfadf52 | jnthn++ | src/NQP/ (2 files): Switch to using the new signature objects. |
|||
p/bs: 1ac3f88 | jnthn++ | src/guts/multi_dispatch.c: Quick tweak and...the new signature objects work. |
|||
p/bs: 33fc4d2 | jnthn++ | src/stage0/ (6 files): Update bootstrap. |
|||
p/bs: 7c8a11c | jnthn++ | / (4 files): Rip out the NQPMultiSig PMC; we don't need it any more. |
|||
23:06
spine left
|
|||
tk______ | so if youre binding an integer you could just use native types for memory efficiency | 23:06 | |
jnthn | Yeah *but* Int also provides big integer semantics. | 23:07 | |
skids | so "my int $i" declares a virtual container that autoboxes into ... ? ... and then methods called on its contents (an immutable int) dispatch to the result of the autobox. | ||
jnthn | nom: say [*] 1..100 | ||
p6eval | nom bd5adb: OUTPUT«93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000» | ||
jnthn | Much bigger than a native int can store. | ||
skids: If you do $i.foo then it code-gens a boxing if $i into an Int. | 23:08 | ||
And then what you said, yes. | |||
s:2nd/if/of | |||
23:09
shinobicl_ joined
|
|||
tk______ | so binding essentially erases the container of an Int? | 23:09 | |
nom: my $a = 5; $a := 42 | 23:10 | ||
23:10
pat_js joined
|
|||
p6eval | nom bd5adb: ( no output ) | 23:10 | |
tk______ | nom: my $a = 5; $a := 42; $a := 5; $a = 5 | ||
p6eval | nom bd5adb: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/Ti0vvEUFZh:1» | ||
tk______ | nom: my $a = 5; $a := 42; $a := 5 | ||
p6eval | nom bd5adb: ( no output ) | ||
tk______ | nom: my $a = 5; $a := 42; $a := [*] 1..100; say $a | 23:11 | |
p6eval | nom bd5adb: OUTPUT«93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000» | ||
23:11
xinming joined
|
|||
tk______ | nom: my int $a = [*] 1..100; say $a | 23:12 | |
23:12
pomysl_ left
|
|||
p6eval | nom bd5adb: OUTPUT«0» | 23:12 | |
tk______ | nom: my $a = [*] 1..100; say $a | ||
p6eval | nom bd5adb: OUTPUT«93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000» | ||
23:13
noam left
|
|||
skids | OK, so if "int $i" is contains the platform's MAXINT, and you call "$i++", then at some point after the boxing, the Int gets unboxed again, and that's when we'd get an error, or is Int supposed to have some wisdom about underlying REPRs? | 23:13 | |
23:13
thou left
|
|||
tk______ | is all this Int and boxing stuff defined in the spec? | 23:14 | |
jnthn | skids: ++ is an operator. When we're done with natives, that'll just be a CPU-level increment. And it should check for overflow and throw also. | 23:15 | |
skids | The binding stuff and such related material is kinda scattered around the specs, really needs a more congealed workup. | ||
jnthn | Note that the native types implementation is still quite new and experimental. | 23:16 | |
masak | yes, the thing with native types and boxing is defined by the spec. | ||
jnthn | It works well in various places, and not so well in others just yet. | ||
skids | jnthn: that, I have definitely noticed :-) | ||
jnthn | skids: Yeah. Many improvements there are on my todo list. | 23:17 | |
23:18
fridim_ left
23:19
isBEKaml left
|
|||
skids | WRT the ++ example, I was thinking more on a "theoretically if we didn't have an optimizer" specifications level. | 23:19 | |
23:21
isBEKaml joined
23:23
Trashlord left
23:24
shinobicl_ left,
xinming left,
Trashlord joined
|
|||
masak | 'night, #perl6 | 23:29 | |
23:31
benabik left
23:35
whiteknight joined
23:37
xinming joined
23:42
xinming left
|
|||
jnthn figures he'd best get some rest also | 23:44 | ||
'night | |||
23:44
xinming joined
23:48
tomaw left,
tomaw joined
23:49
jnthn left
23:52
tarch left
23:57
tokuhirom joined
23:59
PacoAir left
|