»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 25 June 2010. |
|||
TimToady | not yet | 00:00 | |
00:01
Psyche^ joined
|
|||
sorear | svn has some stupid feature where, after a checkin, . is out of date | 00:01 | |
s_mosher | ok, thanks for the help | 00:02 | |
00:04
Patterner left,
Psyche^ is now known as Patterner
|
|||
lue wishes he could use Perl6 instead of Javascript to code webpages. | 00:06 | ||
Juerd | I don't do complex stuff in webpages, and javascript+jquery suffices for me :) | 00:12 | |
sjohnson | lue: you are not a lone. don't tell diakopter that though | 00:14 | |
:) | |||
alone* | |||
rakudoscript | |||
would be a great day for mankind's achievement | |||
00:15
lestrrat is now known as lest_away
|
|||
lue | I use javascript for, say, making navigation updating easy. And it's been a while. Perl 6 has scarred my feelings for Javascript. | 00:18 | |
.oO(I just want to type <script type="text/perl6"> and be done with it. Instead, I have to relearn something I'll never bother with beyond the internet.) |
00:21 | ||
diakopter | wait, there's something beyond the internet? | ||
lue | .oO[ then again, that would mean browsers would be forced to interpret Perl 6. Which isn't a bad thing, of course :) ] | 00:23 | |
Although there are Perl 6 coded things for the web (like November), so there is hope... | 00:26 | ||
rakudo: say "tardis".pick(*) | 00:31 | ||
p6eval | rakudo 56c846: OUTPUT«tardis» | ||
lue | oh, let me guess, it doesn't treat that as an array of characters? | 00:32 | |
pugssvn | r32056 | sorear++ | [STD-dist] Follow all changes to STD, automatically extract version from svn, and add my email. | 00:33 | |
sjohnson | best example of javascript difficulty is doing heredoc's in it | ||
it's like pulling teeth | |||
lue | rakudo: say "tardis".split('').pick(*) | 00:34 | |
p6eval | rakudo 56c846: OUTPUT«rdsiat» | ||
lue | rakudo: say ("tardis".split('').pick(*) xx 3) | ||
p6eval | rakudo 56c846: OUTPUT«atirsdatirsdatirsd» | 00:35 | |
lue | rakudo: say "tardis".split('').pick(*) | ||
00:35
tbourdon_ left
|
|||
p6eval | rakudo 56c846: OUTPUT«itasdr» | 00:35 | |
tylercurtis | rakudo: say "tardis".comb.pick(*) | 00:36 | |
p6eval | rakudo 56c846: OUTPUT«rsatdi» | ||
00:36
tylercurtis left
|
|||
sorear | std: 2+2 | 00:38 | |
p6eval | std 32055: OUTPUT«ok 00:01 116m» | ||
sorear | STD 32056 has been sent to CPAN | 00:40 | |
(but with the wrong version number, svn--) | |||
00:44
mulander joined,
rgrau joined
00:54
jaldhar joined
|
|||
sorear | STD is now indexed on CPAN | 01:00 | |
01:14
dju joined
01:17
dju left
01:19
drbean joined
01:20
dju joined
01:22
dju left
01:29
dju joined
01:30
isBEKaml_ left,
am0c_ joined,
am0c_ is now known as am0c
01:32
am0c left
01:34
dju left,
dju joined
01:38
dju left,
dju joined
01:39
jaldhar left
01:47
justatheory joined
01:48
hewei joined
01:53
justatheory left
01:54
hewei left
01:56
s_mosher left
01:59
Clem_Chong joined
02:04
whiteknight left
02:06
redicaps joined
02:10
getpwnam joined
02:11
araujo joined
02:15
lest_away is now known as lestrrat
02:16
getpwnam left
02:29
rgrau_ joined,
rgrau left
02:31
azert0x left
02:46
rgrau__ joined,
rgrau__ left,
rgrau_ left
02:49
tylercurtis joined
02:52
constant joined,
constant left,
constant joined
03:01
jaldhar joined
03:07
melte joined
|
|||
dalek | ecza: d8781ea | sorear++ | STD_REVISION: 32053 -> 32055 for Windows fixes |
03:14 | |
ecza: 9a33e36 | sorear++ | / (3 files): Integrate Niecza and STD level module metadata |
|||
ecza: 2e8433a | sorear++ | / (6 files): Store generated code in build/ |
|||
ecza: f71920f | sorear++ | / (31 files): build -> obj, move perl5 compiler parts to src/ |
|||
03:31
redicaps left
03:38
Clem_Chong left
03:44
redicaps joined
|
|||
ingy | hi | 03:56 | |
how do you tell a grammar rule not to backtrack before this point? | |||
ie, this token is a match, if something past it fails, stop and fail. | 03:57 | ||
tylercurtis | ::, I think. | ||
perlcabal.org/syn/S05.html#Backtracking_control | |||
ingy | tylercurtis: yeah I'm reading that already, but not taking much away. | 03:59 | |
rcfox | It is kind of hard to read. | 04:00 | |
ingy | so this: [ if :: not | ify ] | ||
'if' is just a pattern? | |||
tylercurtis | Right. | 04:01 | |
Although that's probably a bad example, since ify would beat if on LTM, I think. | |||
ingy | could be: [ xx :: yy | zz ] | ||
what is ify? | |||
tylercurtis | The same as "ify" | ||
ingy | i mean, is ify a perl 6 command? | 04:02 | |
not in the grammar but in real life | |||
tylercurtis | Not that I'm aware of. | 04:03 | |
ingy | anyway :: works for me as a syntax. I'm not sure I fully grok the semantics. nor how it compares to the ::: or the : | 04:04 | |
anyway, it's a start | 04:05 | ||
I'll read the tests when I have morning brain power... | |||
I'm about halfway through being able to compile a pegex grammar with pegex itself | 04:06 | ||
I wrote a bootstrapping parser/compiler | |||
04:06
wooden joined,
wooden left,
wooden joined
|
|||
sorear | ingy: if you want the entire match to fail, use <commit> | 04:06 | |
ingy | so now I am building a suite of tests that make sure the two match | ||
04:07
achromic left
|
|||
ingy | sorear: <commit> is a special rule name? | 04:07 | |
sorear | ingy: yes, it's predefined. no, you can override it, it's just a method like anything else. | 04:08 | |
tylercurtis | ingy: well, if you had regex a { [ [ if :: foo | something ] | something else ] }, it could still backtrack into the something else part. But if you had ::: instead, the whole rule would fail. I think. | ||
ingy | pegex would use <COMMIT> as uppercase is the namespacing between user defined and language defined.... | ||
sorear | <commit> in perl6 is no more magical than &die | 04:09 | |
it hooks into runtime functions, but it's itself quite ordinary | |||
ingy | yeah, I get it. I just don't like the namespacing the perl 6 uses. requires to much special knowledge | ||
04:10
[Coke] joined
|
|||
ingy | and doesn't seem future proof thoughtful... | 04:10 | |
[Coke] | . | 04:11 | |
ingy | although that seems to be the perl6 attitude. | ||
it's done when we say it is. | |||
unless we decide it's not. | |||
:) | |||
04:12
achromic joined
|
|||
ingy | tylercurtis: i'll copy your example to a local file and look in the morning. | 04:12 | |
to tired and cranky | |||
can't you tell? ;) | |||
too | |||
tylercurtis | I don't think there's really much risk of clashes. If code has a <foo> subrule call in a grammar, that means that there must be a a foo defined somewhere in its MRO. So, if a <foo> predefined subrule gets added, it just gets added in Grammar(or is it Cursor?). The defined one in the grammar still takes precedence. The only problem is that it can be confusing to read. | 04:15 | |
04:21
go|dfish joined
|
|||
ingy | tylercurtis: nod. TestML uses the UPPER vs lower namespacing, and it plays out well, so I'm trying adopting it for pegex | 04:21 | |
i think it makes easier grokking, | 04:22 | ||
sorear | Namespacing is great for a fairly static language | 04:35 | |
Old-school Perl used foo() for system functions and &foo() for user ones | |||
04:35
macroron joined
|
|||
sorear | But once you start building up a culture of extension, the distinction between system functions and library functions becomes less important, and so people like to call them the same | 04:36 | |
ingy | sorear: that's a good point... | 04:41 | |
dukeleto | How does one put something into boolean context in Perl 6? | ||
[Coke] | dukeleto: ?what | ||
ingy | star: say Bool(42) | ||
p6eval | star 2010.07: OUTPUT«Could not find sub &Bool in main program body at line 22:/tmp/JPREEoQwVF» | ||
[Coke] | star: say ?42 | ||
tylercurtis | star: say 42.Bool | ||
p6eval | star 2010.07: OUTPUT«1» | 04:42 | |
dukeleto | thanks! | ||
ingy | dukeleto: tmtowtdiaalowtdiw | ||
(and at least one way to do it wrong) | 04:43 | ||
rcfox | Does .ast work for Matches? | ||
I keep getting Any() | |||
tylercurtis | rcfox: are you sure you're using &make? | ||
rcfox | What? | ||
rakudo: my $a = 'test' ~~ /(t(.*)t)/; say $a.ast; | 04:44 | ||
p6eval | rakudo 56c846: OUTPUT«Any()» | ||
tylercurtis | That's correct. | ||
rcfox | What is &make? | ||
ingy | it puts things in the ast | 04:45 | |
that's all I know... | |||
rcfox | Oh. | ||
tylercurtis | rakudo: grammar Foo { token TOP { abc } }; class Foo::Actions { method TOP($/) { make ~$/; } }; say Foo.parse(:actions(Foo::Actions.new), 'abc')).ast | 04:46 | |
p6eval | rakudo 56c846: OUTPUT«===SORRY!===Confused at line 22, near ").ast"» | ||
tylercurtis | rakudo: grammar Foo { token TOP { abc } }; class Foo::Actions { method TOP($/) { make ~$/; } }; say Foo.parse(:actions(Foo::Actions.new), 'abc').ast | ||
p6eval | rakudo 56c846: OUTPUT«abc» | ||
tylercurtis | rakudo: grammar Foo { token TOP { abc } }; class Foo::Actions { method TOP($/) { make 5; } }; say Foo.parse(:actions(Foo::Actions.new), 'abc').ast | ||
p6eval | rakudo 56c846: OUTPUT«5» | ||
rcfox | Where is this documented? | 04:47 | |
tylercurtis | perlcabal.org/syn/S05.html#Match_objects | ||
rcfox | And the actions thing? | 04:49 | |
I saw something about it in the grammar section, but it's just like "Oh, and here you pass a reference to actions." | 04:50 | ||
No information about what they are or how to use them... | |||
tylercurtis | hmm... I don't see anything in the spec describing it. | ||
dukeleto | sorear: i added a test to PL/Parrot that shows off Perl 6 grammars : github.com/leto/plparrot/commit/804...1581c18d7d | 04:51 | |
tylercurtis: is it described in the Squaak tutorial ? | |||
tylercurtis | dukeleto: Well, it's definitely demonstrated in it, but I don't remember if it explains in detail how they work. | ||
rcfox: perl6advent.wordpress.com/2009/12/2...d-actions/ | 04:52 | ||
dukeleto | tylercurtis: that might be something nice to add | ||
04:53
melte left
|
|||
rcfox | Hm, thanks. | 04:54 | |
04:54
melte joined
|
|||
pugssvn | r32057 | pmichaud++ | [t/spec]: Update some Nil-related tests for undefined Nil. | 05:10 | |
r32058 | pmichaud++ | [t/spec]: Fudge some Nil-related tests. | 05:12 | ||
05:22
mutewit joined
05:32
Clem_Chong joined,
blogometer left
|
|||
Clem_Chong | evalbot usage:'perl6:say hello;' | 05:33 | |
perl6:say hello; | 05:34 | ||
tylercurtis | You want perl6: say 'foo', although I'd recommend just doing star: say 'foo' or rakudo: say 'foo'. perl6: is a bit noisy. | 05:35 | |
05:37
macroron left
|
|||
Clem_Chong | perl6:say 'foo'; | 05:37 | |
tylercurtis | You need a space there after the colon, I think. | ||
Clem_Chong | perl6: say 'foo'; | 05:38 | |
p6eval | pugs, rakudo 56c846: OUTPUT«foo» | ||
Clem_Chong | :( | ||
rcfox | Clem_Chong: Darn, it works. | ||
tylercurtis | Well, it seems perl6: has been trimmed down a little. | ||
rcfox | How can I add another argument to the .ast method signatures? | 05:39 | |
Clem_Chong | Ok,don't play that,I find you perl guy's code is smart,how can you do that? | 05:40 | |
rcfox | method foo($/, $bar) gives me this when I try to call $/<foo>.ast(3): 'Not enough positional parameters passed; got 2 but expected 3' | ||
I'd like to be able to pass along the node depth. | 05:42 | ||
mathw | o/ | 05:44 | |
dukeleto | has anybody done any kind of SHA implementation in Perl 6? | 05:46 | |
sorear | rcfox: ast is just a variable, it doesn't call methods at all | 05:47 | |
05:47
[Coke] left
|
|||
sorear | Clem_Chong: I'm terrible with pronouns. How can I do what? | 05:49 | |
05:55
wtw joined
05:59
kaare joined,
kaare is now known as Guest2438
|
|||
dalek | kudo: 7530af5 | mathw++ | docs/ChangeLog: Update ChangeLog for 2010.08 release. |
06:00 | |
kudo: f1b8aca | mathw++ | docs/announce/2010.08: Finish release announcement for 2010.08. |
|||
kudo: 99a4e24 | mathw++ | docs/release_guide.pod: Update release guide with 2010.08 release. |
|||
06:03
drbean left
06:12
uniejo joined
|
|||
dalek | ecza: b82b1c8 | sorear++ | / (16 files): Move Perl6 runtime library code to lib/ |
06:25 | |
ecza: 14af68a | sorear++ | / (2 files): Allow niecza to be used from outside the source tree It's not installable, but you can symlink it into $PATH and it will be able to find the standard libraries and support code. |
|||
06:30
wooden left
06:31
wooden joined,
wooden left
06:34
drbean joined
06:36
wooden joined,
wooden left,
wooden joined
06:50
Guest2438 is now known as kaare_
06:52
tylercurtis left
06:54
mberends left
07:04
tylercurtis joined
|
|||
sorear | I wonder if I should commit a copy of the compiled Niecza grammar | 07:05 | |
07:16
tylercurtis left
07:17
wtw left,
wtw joined
07:21
timbunce joined
07:43
_madmax_ left
08:00
mulander left
08:02
flatwhatson left,
sftp left,
cotto_work left,
drbean left,
mmmpork left,
timbunce left,
uniejo left,
kaare_ left,
simcop2387 left,
krunen_ left,
go|dfish left,
[particle] left,
pugssvn left,
PerlJam left,
wooden left,
constant left,
Grrrr left,
NOTevil left,
hsb left,
melte left,
ruoso left,
hercynium left,
daemon left,
PZt left,
shade_ left
08:19
xinming_ left
08:20
xinming joined
08:24
thebird joined
08:35
dakkar joined
08:38
_madmax_ joined
08:41
[synth] joined
08:42
synth left
08:46
betterworld joined
08:48
snearch joined,
melte joined,
ruoso joined,
hercynium joined,
daemon joined,
PZt joined,
jdv79 joined,
TiMBuS joined,
astinus joined,
treed joined,
timdemkowsky joined,
patch joined,
breinbaas joined,
frooh joined
08:51
mulander joined
08:56
f00li5h joined
08:57
sunnavy_ joined,
krakan_ joined,
f00li5h left,
f00li5h joined
08:58
pjcj_ joined,
hillu_ joined
09:03
HarryS left,
japhb left,
BinGOs left,
shelling_lab left,
mulander left,
snearch left,
melte left,
ruoso left,
hercynium left,
daemon left,
PZt left,
jdv79 left,
TiMBuS left,
astinus left,
timdemkowsky left,
breinbaas left,
frooh left,
patch left,
treed left,
betterworld left,
wtw left,
dju left,
pnu left,
Util left,
cozmic left,
ascent_ left,
spacebat left,
kirillm left,
jjore left,
shabble left,
Getty left,
Gothmog_ left,
cono left,
dalek left,
_sri left,
Bucciarati left,
mathw left,
lestrrat left,
frodwith left,
m6locks left
09:12
Trashlord joined,
betterworld joined,
wtw joined,
dju joined,
cozmic joined,
pnu joined,
Util joined,
avuserow joined,
mantovani joined,
itz joined,
barika joined,
stepnem joined,
jettero joined,
jnthn joined,
nperez joined,
spq1 joined,
tomaw joined,
ascent_ joined,
kirillm joined,
spacebat joined,
shabble joined,
Getty joined,
jjore joined,
Gothmog_ joined
09:13
cono joined,
proller_ joined,
cottoo joined,
nadim joined,
thepler joined,
_sri joined,
Bucciarati joined,
mathw joined,
lestrrat joined,
m6locks joined,
frodwith joined
09:14
slavik joined,
snearch joined,
melte joined,
ruoso joined,
hercynium joined,
daemon joined,
PZt joined,
jdv79 joined,
TiMBuS joined,
astinus joined,
treed joined,
timdemkowsky joined,
patch joined,
breinbaas joined,
frooh joined,
Trashlord is now known as Guest41392,
HarryS joined,
mulander joined,
Guest41392 left,
betterworld left,
wtw left,
dju left,
pnu left,
Util left,
avuserow left,
mantovani left,
cozmic left,
itz left,
barika left,
stepnem left,
jettero left,
jnthn left,
nperez left,
spq1 left,
tomaw left,
ascent_ left,
spacebat left,
kirillm left,
jjore left,
shabble left,
Getty left,
Gothmog_ left,
HarryS left,
mulander left,
slavik left,
snearch left,
melte left,
ruoso left,
hercynium left,
daemon left,
PZt left,
jdv79 left,
TiMBuS left,
astinus left,
timdemkowsky left,
breinbaas left,
frooh left,
patch left,
treed left
09:15
cono left,
proller_ left,
cottoo left,
nadim left,
thepler left,
_sri left,
Bucciarati left,
mathw left,
lestrrat left,
frodwith left,
m6locks left
09:17
japhb joined,
mulander joined,
frooh joined,
breinbaas joined,
patch joined,
timdemkowsky joined,
treed joined,
astinus joined,
TiMBuS joined,
jdv79 joined,
PZt joined,
daemon joined,
hercynium joined,
ruoso joined,
melte joined,
snearch joined,
slavik joined,
frodwith joined,
m6locks joined,
lestrrat joined,
mathw joined,
Bucciarati joined,
_sri joined,
thepler joined,
nadim joined,
cottoo joined,
proller_ joined,
cono joined,
Guest41392 joined,
betterworld joined,
wtw joined,
dju joined,
cozmic joined,
pnu joined,
Util joined,
avuserow joined,
mantovani joined,
itz joined,
barika joined,
stepnem joined,
jettero joined,
jnthn joined,
nperez joined,
spq1 joined,
tomaw joined,
ascent_ joined,
kirillm joined,
spacebat joined,
shabble joined,
Getty joined,
jjore joined,
Gothmog_ joined
09:18
eternale1e joined,
nine_ joined,
Helios- joined,
uniejo joined,
kaare_ joined
09:19
[particle] joined,
pugssvn joined,
PerlJam joined,
osfameron joined,
takadonet joined,
bbkr joined,
pochi joined,
cosimo joined,
gabiruh joined,
perigrin joined,
_ilbot2 joined,
Sanitoeter joined,
PacoLinux joined,
xiaolongxia joined,
yahooooo joined,
card.freenode.net sets mode: +vv pugssvn _ilbot2
09:20
HarryS joined,
go|dfish joined,
simcop2387 joined,
krunen_ joined,
au|irc joined,
lucs joined,
kst joined,
rbuels joined,
Sarten-X2 joined,
draxil joined,
Woody2143 joined,
dalek joined,
jedai_ joined,
flatwhatson joined,
sftp joined,
gfldex joined,
moritz_ joined,
thebird is now known as 84XAATGC2
09:21
thebird joined,
Lorn joined,
daxim joined,
foodoo joined,
wooden joined,
constant joined,
Grrrr joined,
NOTevil joined,
hsb joined,
literal joined,
avar joined,
IllvilJa joined,
kolibrie_ joined,
cognominal joined,
felliott__ joined,
robinsmidsrod joined,
Snowclone joined,
Maddingue joined,
shelling_lab joined,
drbean joined,
mmmpork joined,
huf joined,
x3nU joined,
phenny joined,
renormalist joined,
aesop joined,
rokoteko joined,
card.freenode.net sets mode: +v phenny,
cotto_work joined,
WAA3OEL joined,
Guest41392 left,
betterworld left,
wtw left,
dju left,
pnu left,
Util left,
avuserow left,
mantovani left,
cozmic left,
itz left,
barika left,
stepnem left,
jettero left,
jnthn left,
nperez left,
spq1 left,
tomaw left,
ascent_ left,
spacebat left,
kirillm left,
jjore left,
shabble left,
Getty left,
Gothmog_ left,
shelling_lab left,
drbean left,
mmmpork left,
huf left,
x3nU left,
phenny left,
renormalist left,
aesop left,
rokoteko left,
thebird left,
Lorn left,
daxim left,
foodoo left,
wooden left,
constant left,
Grrrr left,
NOTevil left,
hsb left,
literal left,
avar left,
IllvilJa left,
kolibrie_ left,
cognominal left,
felliott__ left,
Snowclone left,
robinsmidsrod left,
Maddingue left,
cotto_work left,
dalek left
09:22
jedai_ left,
flatwhatson left,
sftp left,
gfldex left,
moritz_ left,
simcop2387 left,
krunen_ left,
go|dfish left,
au|irc left,
lucs left,
kst left,
rbuels left,
Sarten-X2 left,
Woody2143 left,
draxil left,
[particle] left,
pugssvn left,
PerlJam left,
takadonet left,
bbkr left,
pochi left,
cosimo left,
gabiruh left,
perigrin left,
_ilbot2 left,
osfameron left,
Sanitoeter left,
PacoLinux left,
xiaolongxia left,
yahooooo left,
uniejo left,
kaare_ left,
HarryS left,
mulander left,
japhb left,
slavik left,
snearch left,
melte left,
ruoso left,
hercynium left,
daemon left,
PZt left,
jdv79 left,
TiMBuS left,
astinus left,
timdemkowsky left,
breinbaas left,
frooh left,
patch left,
treed left,
cono left,
proller_ left,
cottoo left,
nadim left,
thepler left,
_sri left,
Bucciarati left,
mathw left,
lestrrat left,
frodwith left,
m6locks left
09:23
cls_bsd_ joined
09:26
Tene left
09:29
84XAATGC2 left,
cls_bsd_ is now known as cls_bsd,
szabgab left,
grew left
09:31
araujo left
09:35
wamba joined,
meteorjay joined,
szabgab joined,
buubot joined,
BinGOs joined,
c9s joined,
grew_ joined,
rhr_ joined,
TimToady_ joined,
WAA3OEL joined,
cotto_work joined,
rokoteko joined,
aesop joined,
renormalist joined,
phenny joined,
x3nU joined,
huf joined,
mmmpork joined,
shelling_lab joined,
Maddingue joined,
Snowclone joined,
robinsmidsrod joined,
felliott__ joined,
cognominal joined,
kolibrie_ joined,
IllvilJa joined,
avar joined,
literal joined,
hsb joined,
NOTevil joined,
Grrrr joined,
constant joined,
wooden joined,
foodoo joined,
daxim joined,
Lorn joined,
thebird joined,
moritz_ joined,
gfldex joined,
sftp joined,
flatwhatson joined,
jedai_ joined,
dalek joined,
Woody2143 joined,
draxil joined,
Sarten-X2 joined,
rbuels joined,
card.freenode.net sets mode: +v phenny,
kst joined,
lucs joined,
au|irc joined,
krunen_ joined,
simcop2387 joined,
go|dfish joined,
HarryS joined,
yahooooo joined,
xiaolongxia joined,
PacoLinux joined,
Sanitoeter joined,
_ilbot2 joined,
perigrin joined,
gabiruh joined,
cosimo joined,
pochi joined,
bbkr joined,
takadonet joined,
osfameron joined,
PerlJam joined,
pugssvn joined,
[particle] joined,
kaare_ joined,
uniejo joined,
japhb joined,
mulander joined,
frooh joined,
breinbaas joined,
patch joined,
timdemkowsky joined,
treed joined,
astinus joined,
TiMBuS joined,
jdv79 joined,
PZt joined,
daemon joined,
hercynium joined,
ruoso joined,
melte joined,
snearch joined,
slavik joined,
frodwith joined,
m6locks joined,
lestrrat joined,
mathw joined,
Bucciarati joined,
_sri joined,
card.freenode.net sets mode: +vv _ilbot2 pugssvn,
thepler joined,
nadim joined,
cottoo joined,
proller_ joined,
cono joined,
Guest41392 joined,
betterworld joined,
wtw joined,
dju joined,
cozmic joined,
pnu joined,
Util joined,
avuserow joined,
mantovani joined,
itz joined,
barika joined,
stepnem joined,
jettero joined,
jnthn joined,
nperez joined,
spq1 joined,
tomaw joined,
ascent_ joined,
kirillm joined,
spacebat joined,
shabble joined,
Getty joined,
jjore joined,
Gothmog_ joined
09:36
araujo joined,
ChanServ sets mode: +v dalek,
HarryS is now known as Guest197
09:37
masak joined,
BinGOs left,
BinGOs joined
|
|||
masak | oh hai, #perl6! | 09:37 | |
sorear | Hi masak! | ||
moritz_ | oh hai masak | ||
frettled | Don't jump the shark, masak! | ||
moritz_ | seems we have bad net weather | ||
Juerd | Where's the forecast? | ||
masak | frettled: I've never grokked that expression. | 09:38 | |
moritz_ | Juerd: netsplits and tcplightning | ||
frettled | masak: en.wikipedia.org/wiki/Jumping_the_shark | ||
masak | thank you. | 09:39 | |
frettled | masak: I understand it intellectually, but as I haven't seen the show they refer to, it remains a distant connection for me, too. | ||
masak | wow. a TV show where they actually jumped an actual shark. | 09:40 | |
frettled | :) | ||
daxim | blow your mind: tvtropes.org/pmwiki/pmwiki.php/Main...ngTheShark (careful, wiki crack) | ||
09:45
Guest197 left,
HarryS joined
09:47
pnate joined
09:52
redicaps left
09:54
redicaps joined,
redicaps left
|
|||
jnthn | oh morning | 09:54 | |
sorear | hello jnthn | ||
moritz_ | \o | ||
dalek | ecza: affeabf | sorear++ | src/ (3 files): Embed transitive dependency info in metadata |
09:55 | |
ecza: 94a7784 | sorear++ | / (7 files): Disallow compiling modules by file name The important case always starts with a module name, and it's much simpler if we always start with one. |
|||
ecza: 7a02246 | sorear++ | src/CompilerDriver.pm: Implement automatic compilation of imported modules |
|||
masak | sorear++ # STD on CPAN | ||
moritz_ | jnthn: would you like to have 6model commits reported here? | ||
masak | sorear: how come viv isn't marked executable? | ||
09:56
M_o_C joined
|
|||
jnthn | moritz_: I don't mind either way - as the note on the repo says, it's meant to be temporary. | 09:57 | |
sorear | masak: 1, I don't understand that aspect of the toolchain | ||
2, I didn't see an easy way to make it marked | |||
jnthn | moritz_: If people are interested in seeing what's going on there, then I've no objections. | ||
sorear | 3, It wouldn't work anyway | 09:58 | |
viv needs a large amount of rethinking before it's usable as a tool in $PATH | |||
masak | sorear: fair enough. just wondering. in the best of worlds, it might even be installed as a 'binary' somewhere. | ||
oh, ok. | |||
sorear | for some reason pmurias insists on using require 'viv'; to load the STD module | 09:59 | |
I keep trying to tell him that "use STD" will work just as well | |||
masak | aye | ||
sorear | masak: In case you missed it, STD's been on CPAN for a while; I just pushed a new version | 10:00 | |
masak | I was dimly aware it's been there for a while. but I don't think I've ++'d you for it :) | 10:04 | |
sorear | You shouldn't have. It's all pmurias++ fault | 10:05 | |
masak | pmurias++ | ||
sorear | also GSoC++ | ||
hmm, not having any way to access terminal input puts a real crimp on what little demos I can do | 10:08 | ||
10:08
dalek left,
dalek joined
10:09
ChanServ sets mode: +v dalek
|
|||
masak | sorear: the install of STD seemed to have gone fine, but when I use it I get this: gist.github.com/537522 | 10:09 | |
sorear | masak: the installable version of STD only comes with one setting, NULL | 10:10 | |
(this is one of the issues I need to understand to make a usable installed viv) | |||
10:11
Clem_Chong_ joined
|
|||
masak | I don't see what 'only comes with one setting, NULL' would mean in this case, or how it relates to my error. | 10:11 | |
10:11
Clem_Chong_ left
|
|||
masak | ooh, today is Rakudo release day! | 10:13 | |
10:13
Clem_Chong left
|
|||
frettled | \o/ | 10:13 | |
masak | ...and I still haven't been able to track down why Parrot doesn't like my enums patch... :( | ||
10:14
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
sorear | masak: :$setting = 'CORE' | 10:15 | |
masak: you need to pass , setting => "NULL" to use an installed STD if it's not embedded in a context that can provide a CORE | 10:16 | ||
masak | pass setting => "NULL" to STD->parsefile? | 10:17 | |
sorear | yes | ||
masak | and if I want the setting? | 10:18 | |
sorear | 1. locate a copy of CORE.setting into . | ||
2. modify it as you see fit (optional) | 10:19 | ||
3. STD->parsefile("CORE.setting", setting => "NULL") | |||
4. use STD->parse as you see fit (but you can't chdir) | |||
masak | should be enough for me. | 10:21 | |
thanks. | |||
sorear | Hah. The .net framework's ReadLine method documents a specific error to be thrown if there are more than Int32.MaxValue characters in the next line | 10:23 | |
jnthn | masak: github.com/rakudo/rakudo/commit/83b...e38f5920d8 - in the changes to Str.pm, aren't you missing a goto after line 39? | 10:24 | |
masak | jnthn: looking | 10:25 | |
jnthn: yes. | 10:26 | ||
jnthn: fixing. | |||
jnthn | no prizes for guessing what I'm working on. :P | ||
masak | :) | 10:27 | |
jnthn: (I'm assuming since things are in a git repo, it's OK to modify my contributed code even before my GSoC work has been approved. it won't be part of what I send in, of course.) | |||
jnthn | masak: Yes | 10:28 | |
masak: I'll be filing this in the next 10 mins or so anyway. | |||
masak | Imma let this build finish, then I will push a fix. | ||
pushed. | 10:29 | ||
lunch & | 10:30 | ||
dalek | kudo: 5b08f4e | masak++ | src/core/Str.pm: [core/Str] added missing goto in PIR Discovered by jnthn++. |
10:31 | |
10:39
ruoso left
|
|||
sorear | std: gather take my $l while ($l = self.get).defined; | 10:39 | |
p6eval | std 32058: OUTPUT«ok 00:01 119m» | ||
10:40
achromic left
|
|||
sorear | niecza: | 10:48 | |
p6eval | niecza 14af68a: ( no output ) | ||
dalek | ecza: 4770bf5 | sorear++ | lib/ (2 files): Add $*IN, .lines, .slurp, .get, .getc |
10:51 | |
sorear out | |||
11:00
pmurias joined
11:01
meppl joined,
M_o_C left
11:09
Fuad joined
11:12
lestrrat is now known as lest_away
|
|||
masak | rakudo: my $foo = "HAI"; say q"OH $foo" | 11:14 | |
p6eval | rakudo 5b08f4: OUTPUT«OH $foo» | ||
masak | :) | ||
Fuad | masak :) | ||
hello | |||
how are you? | |||
masak | Fuad: hi! | ||
Fuad: now that you're here, I'm excellent! | |||
Fuad: how are you? :) | |||
masak and Fuad privmsg | |||
Fuad | im great my friend thanks | ||
i forgot my nickname pass | 11:15 | ||
go to help they help | |||
sent my pass to email | |||
masak | \o/ | ||
Fuad | :) | ||
[15:59] -NickServ- Last seen : Jun 20 17:25:55 2009 (1 year, 8 weeks, 3 days, 17:34:18 ago) | |||
before army | |||
:) | |||
masak | I'm so glad you survived. | 11:17 | |
Fuad | thank you my bro | ||
11:25
pmurias left
11:32
[Coke] joined
11:36
rgrau joined
|
|||
takadonet | morning all | 11:46 | |
masak | takadonet: \o | 11:48 | |
11:59
envi^home joined
12:01
Fuad left
12:05
rgrau_ joined
12:06
rgrau left
12:21
azert0x joined
12:23
TiMBuS left,
TiMBuS joined
12:24
azert0x_ joined
12:25
azert0x left
12:29
drbean joined
12:30
rgrau_ left,
rgrau_ joined
12:35
patrickas joined
12:36
NiiHiiL joined,
ruoso joined
12:40
jaldhar left
12:41
Guest41392 left,
Trashlord joined,
jfried left
12:43
jaldhar joined
12:46
jferrero joined
|
|||
jferrero | rakudo: say <A C> X <G T> | 12:47 | |
p6eval | rakudo 5b08f4: OUTPUT«AGATCGCT» | ||
jferrero | rakudo: say <A C T G> X <A C T G> | 12:48 | |
p6eval | rakudo 5b08f4: OUTPUT«AAACATAGCACCCTCGTATCTTTGGAGCGTGG» | ||
masak | rakudo: say <A C T G>.pick(30, :replace) | 12:49 | |
p6eval | rakudo 5b08f4: OUTPUT«CTGGATTCCGCTGCCGGTACACGAGTGGCT» | ||
12:51
xinming left
12:52
xinming joined
|
|||
jferrero | masak: What is the join() equivalent at Perl v6? | 12:56 | |
masak | rakudo: say join '|', <a b c> | 12:57 | |
p6eval | rakudo 5b08f4: OUTPUT«a|b|c» | ||
masak | it's the same, if you want. | ||
jferrero | Ok | ||
masak | there's also a method form. | ||
rakudo: say <a b c>.join('|') | |||
p6eval | rakudo 5b08f4: OUTPUT«a|b|c» | ||
jferrero | rakudo: say join '-', <A C T G> X <A C T G> | ||
p6eval | rakudo 5b08f4: OUTPUT«» | ||
masak | jferrero: precedence. | ||
rakudo: say join '-', (<A C T G> X <A C T G>) | 12:58 | ||
p6eval | rakudo 5b08f4: OUTPUT«A-A-A-C-A-T-A-G-C-A-C-C-C-T-C-G-T-A-T-C-T-T-T-G-G-A-G-C-G-T-G-G» | ||
jferrero | 10x, masak | ||
OOps | |||
no | |||
masak | you're "w11come" | ||
jferrero | I need pairs of permutations | ||
12:58
tadzik joined
|
|||
bbkr | rakudo: say join '-', (<A C T G> X <A C T G> X <A C T G>) # checking if it's implemented | 12:59 | |
p6eval | rakudo 5b08f4: OUTPUT«No applicable candidates found to dispatch to for 'infix:<X>'. Available candidates are::(Any $lhs, Any $rhs) in main program body at line 22:/tmp/HTeh2GJGVk» | ||
moritz_ | rakudo: say (<A C T G> X=> <A C T G>).perl | ||
p6eval | rakudo 5b08f4: OUTPUT«("A" => "A", "A" => "C", "A" => "T", "A" => "G", "C" => "A", "C" => "C", "C" => "T", "C" => "G", "T" => "A", "T" => "C", "T" => "T", "T" => "G", "G" => "A", "G" => "C", "G" => "T", "G" => "G")» | ||
moritz_ | better? | ||
jferrero | Sorry... I need: AA-AC-AT-AG ... | 13:00 | |
masak | a mere &map away :) | ||
moritz_ | rakudo: say (<A C T G> X~ <A C T G>).join('-') | ||
p6eval | rakudo 5b08f4: OUTPUT«AA-AC-AT-AG-CA-CC-CT-CG-TA-TC-TT-TG-GA-GC-GT-GG» | ||
jferrero | Ole! | ||
moritz_ | masak: don't forget we have these meta operators... :-) | ||
masak | moritz_++ | 13:01 | |
jferrero | Thanks, moritz_ && masak | 13:02 | |
masak .oO( I'm lucky moritz_ evaluates to a true value... ) | 13:03 | ||
tadzik | :) | ||
jferrero | hahaha | ||
:) | |||
13:07
blogometer joined
13:09
orafu left,
orafu joined
13:12
Holy_Cow joined
13:14
lest_away is now known as lestrrat
|
|||
bbkr | rakudo: sub infix:<M>(Int, Int) {666}; (<1 2> XM <1 0>).perl.say # known bug? | 13:14 | |
p6eval | rakudo 5b08f4: OUTPUT«===SORRY!===Could not find sub &infix:<M>» | ||
cognominal | do meta operators work on methylated chains? :) | ||
13:15
kaare_ left
13:17
pnate left
|
|||
moritz_ | bbkr: yes; currently only works with 'our' operator subs | 13:24 | |
needs lift | |||
bbkr | moritz_++ | 13:25 | |
13:25
jferrero left
13:28
NiiHiiL left
13:30
snearch left
13:35
javs joined
13:41
burmas joined
13:44
pmurias joined
|
|||
pmurias | ruoso: hi | 13:44 | |
13:44
Guest23195 joined,
_madmax_ left
13:45
takadonet left
13:48
Fuad joined,
takadonet joined
|
|||
pmurias | ruoso: did you evaluate my GSoC project? | 13:48 | |
ruoso | hi pmurias | 13:51 | |
yes... I did... | |||
yes... I gave you a pass ;) | 13:52 | ||
masak | \o/ | ||
13:52
pmurias left
|
|||
moritz_ | \o/ | 13:52 | |
ruoso | in fact, when I looked at the original proposal I was impressed as how close the actual work was to the initial plan | ||
Fuad | ) | ||
pmichaud | good morning, #perl6 | 13:53 | |
rakudo: say Nil.defined # checking | |||
13:53
uniejo left
|
|||
p6eval | rakudo 5b08f4: OUTPUT«1» | 13:53 | |
pmichaud | :-( | ||
masak | "Day 2673: woke up. Nil is still defined. dang" | 13:54 | |
pmichaud | I thought I undefined it last night. | ||
13:54
pmurias joined
|
|||
pmichaud | pmichaud@plum:~/rakudo$ ./perl6 | 13:55 | |
> say Nil.defined | |||
0 | |||
masak | "local variations may occur" | ||
moritz_ | pmichaud: ship it | ||
pmichaud | # Your branch is ahead of 'origin/master' by 1 commit. | ||
moritz_ | pmichaud: erm, I mean, push it, let mathw++ ship it :-) | ||
pmichaud | oh. | ||
masak | :) | ||
pmichaud | looks like I didn't push. | ||
(was tired last night) | |||
masak | that's becoming a bit of a theme, isn't it? | ||
pmichaud | pushed. | 13:56 | |
masak | pmichaud++ | ||
pmichaud | (theme) being tired at night? yes. :-P | ||
moritz_ | pmichaud: don't forget to push chagned tests, if any? | ||
pmichaud | I know that I did commit those. | ||
masak | those just need the committing :) | ||
moritz_ | masak: ... unless you use git-svn | 13:57 | |
masak | right-o. | ||
which I should. | |||
pmichaud | r32057 and r32058 | ||
dalek | kudo: 3f0bfbb | pmichaud++ | src/ (4 files): Switch Nil to be an undefined Parcel constant. |
||
kudo: 1f5a79f | pmichaud++ | / (4 files): Merge branch 'master' of github.com:rakudo/rakudo |
|||
masak | nono, you should 'git pull --rebase' :S | 13:58 | |
then you won't get those ugly unnecessary merge commits. | 13:59 | ||
it's as if you were developing in a branch all the time. | |||
moritz_ has a script called 'update-stuff' which chdirs do a couple of project folders, and calls 'git pull --rebase' or 'svn up' in them | |||
masak | I'm with Linus on when to merge and when to rebase: www.mail-archive.com/dri-devel@list...39091.html | 14:01 | |
(short story, almost always rebase) | |||
moritz_ | unless there's a reason for you to tell the world you did a merge | ||
like, a branch that broke things inbetween | |||
masak | right. | 14:02 | |
pmichaud reads Linus' note | |||
masak | merge is a safe, but often unnecessary default. | ||
Fuad | moritz_: no way | ||
moritz_ | Fuad: context? | 14:04 | |
masak was wondering about that, too | |||
pmichaud | Hmmm... I don't get from Linus' message to "use git pull --rebase". | 14:05 | |
x3nU | how do i build rakudo to certain directory? | ||
(rakudo star ofc) | |||
moritz_ | pmichaud: that's the "clean" part | ||
14:05
wtw left
|
|||
pmichaud | x3nU: --prefix=<installdir> on Configure.pl | 14:05 | |
x3nU | thanks | 14:06 | |
moritz_ | pmichaud: there's no need to expose your merging commits when git pull'ed instead of git pull --rebase'd | ||
14:06
Fuad left
|
|||
masak | pmichaud: 'git pull --rebase' is just a shortcut command to follow the general advice in that post. | 14:06 | |
pmichaud: there are other ways not to cause merges. | |||
14:07
drbean left
|
|||
PerlJam sets git config branch.autosetuprebase always | 14:07 | ||
of course, I also have a "pullr" alias for "pull --rebase" | 14:08 | ||
masak | ooh | ||
14:10
azert0x_ left
|
|||
masak | pmichaud: I submitted the enums segfault as a parrotbug. trac.parrot.org/parrot/ticket/1746 -- as opposed to one month ago, there are now repeatable conditions for triggering the segfault. | 14:13 | |
pmichaud | masak: yes, I just saw the ticket | 14:14 | |
good choice | |||
masak | hope it'll lead to some unstuckness. | 14:15 | |
moritz_ | you usually get that when you troll #parrot enough :-) | ||
masak | is that a specific, second-person singular 'you', or the general pronoun which is synonymous with 'one'? :) | 14:17 | |
moritz_ | the latter | ||
[particle] | one usually gets that when you troll #parrot | ||
masak | oh, ok :) | ||
[particle]: lol | |||
moritz_ apologizes for the amibguties in the English language | 14:18 | ||
[particle] | what would puns be without ambiguities? | ||
masak | you don't need to apologise for ambiguities you didn't create. :) | 14:19 | |
[particle] | s/you/one/ | ||
moritz_ | [particle]: puns don't require ambiguities at all | ||
similarity is enough | |||
PerlJam | I thought ambiguity was a feature | ||
pmichaud notices that the core of ambiguities is "gui". Hmmmmmmm. | |||
[particle] | some do, but they're better spoken than read | 14:20 | |
masak | "You don't have to be ambiguous to be a pun here... but it helps!" | ||
moritz_ | or phrased another way, ambiguity is not a pundamental problem :-) | ||
masak | pmichaud: in Mandarin, 鬼 GUI3 means "devil". ":) | 14:21 | |
moritz_++ | |||
PerlJam | masak: so ... ambiguity is a two handed devil? | ||
pmichaud | rakudo: say Nil.defined # yet? | ||
p6eval | rakudo 5b08f4: OUTPUT«1» | ||
pmichaud | :-( | ||
tadzik | 0 here :) | 14:22 | |
masak | "Day 2673, later: Nil is still defined. dang" | ||
moritz_ | 15 */2 * * * perl /home/p6eval/rebuild-rakudo.pl >> /home/p6eval/rakudo-build.log 2>&1 | ||
so the rebuild should be running | |||
pmichaud | The future is here, it's just unevenly distributed. | ||
moritz_ | (server clock is in UTC) | ||
rakudo: say Nil.defined | 14:23 | ||
p6eval | rakudo 5b08f4: OUTPUT«1» | ||
tadzik | (: | ||
moritz_ | uhm. Something went wrong, it seems | ||
masak | something undefined went wrong... | ||
moritz_ | Confused. | 14:24 | |
why does it rebuild parrot? it should have a sufficient version available already | |||
mathw | Could somebody please look at ChangeLog and 2010.08 announcement and fix things they discover are wrong about new features/changes/anything else? | ||
moritz_ | seems the rebuild script is a bit broken | ||
mathw | I've probably got something wrong in there | ||
masak | of course, in Mandarin 'gui' could also mean 'noble', 'turtle', 'silicon', or 'salmon'. | 14:25 | |
mathw: looking | |||
jnthn | masak: Wow. Another upside to not liking fish is that I won't accidentally order devil in a Chinese restaurant. :-) | 14:26 | |
PerlJam | nor turtle | ||
moritz_ | + smartmatch against True or False is now an error | ||
that's more of a bug than a feature, fwiw | 14:27 | ||
it should just warn | |||
jnthn | mathw: Taking a look | ||
mathw | moritz_: the commit said it should be a .worry later | ||
moritz_ | but the ChangeLog looks good | ||
mathw | I think it was .worry | ||
but it's definitely an error right now | |||
unless the comments are wrong :) | |||
in which case it's ALL SOMEONE ELSE'S FAULT | 14:28 | ||
moritz_ | rakudo: say 1 ~~ True | ||
p6eval | rakudo 5b08f4: OUTPUT«===SORRY!===Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at line 22, near " True"» | ||
moritz_ | hm | ||
Carl Masäk, Jonathan Worthington, Bruce Gray, Patrick Abi Salloum, | 14:29 | ||
isn't that wrong? :-) | |||
pmichaud | the point is that someone shouldn't be smart matching against True/False | ||
moritz_ | Mäsak instead? | ||
pmichaud: yes. And still it's wrong to die. | |||
pmichaud | right. but die is better than no warning at all. | ||
jnthn | moritz_: Something doens't look quite right there. :-) | 14:30 | |
14:30
burmas left
|
|||
mathw | forgive me, I was asleep | 14:31 | |
jnthn | and it was an excellent | ||
location for hackathon and planning the next states of Rakudo | |||
development. | |||
"a hackathon" | |||
alester | I should probably update the Perl code in xoa.petdance.com/Songs_in_code into Perl 6. | ||
jnthn | "next stages" | ||
? | |||
Or phases ;-) | 14:32 | ||
moritz_ | phasers! | ||
dalek | kudo: ee31f3d | moritz++ | docs/announce/2010.08: [announce] those diacritics are easy to mis-remember :-) |
14:33 | |
jnthn | It's direly critical to get 'em right. | 14:34 | |
mathw | groan | ||
masak | I almost never get them wrong. don't see what the fuss is all about. :) | ||
14:34
pyrimidine joined
|
|||
mathw | 'almost never' | 14:34 | |
for your own name? | |||
masak | ok, so never. | ||
14:34
pmurias left
|
|||
masak | I meant to cushion the blow a little. :) | 14:35 | |
mathw | meh | 14:36 | |
I can't even spell my own name some days | 14:37 | ||
and it doesn't have any diacritics or anything in it | |||
masak | mathw: I read the release announcement. it looks good to me. | ||
mathw | \o/ | ||
especially now moritz++ fixed it | |||
I'll bundle up a tarball this evening | |||
14:39
azert0x joined
|
|||
dalek | kudo: 4f1dee5 | pmichaud++ | docs/announce/2010.08: Add note about Nil now being undefined. |
14:39 | |
kudo: 90637b6 | jnthn++ | docs/announce/2010.08: Tiny tiny tweakies. |
|||
14:43
rgrau__ joined
14:44
rgrau_ left,
rgrau__ is now known as rgrau
|
|||
pmichaud | rakudo: say Nil.defined; | 14:46 | |
p6eval | rakudo 90637b: OUTPUT«(timeout)» | ||
moritz_ | rakudo: say Nil.defined; | 14:47 | |
masak | the excitement is unbearable! | ||
p6eval | rakudo 90637b: OUTPUT«(timeout)» | ||
moritz_ | 14:26:21 up 309 days, 2 min, 0 users, load average: 2.27, 1.45, 1.07 | ||
pmichaud | Looks like it's impossible to undefine Nil. Change the spec. :-P | ||
masak | nooooo | ||
moritz_ | that's not too bad with 4 CPUs | ||
14:48
foodoo left
|
|||
moritz_ | rakudo: say Nil.defined | 14:51 | |
p6eval | rakudo 90637b: OUTPUT«0» | ||
moritz_ | \o/ | ||
pmichaud | \o/ | ||
masak | \o/ | ||
moritz_ | rakudo: say ().defined | ||
p6eval | rakudo 90637b: OUTPUT«1» | ||
pmichaud | \o/ | ||
masak | \o/ | ||
moritz_ | rakudo: {}.().defined | ||
colomon | \o/ | ||
p6eval | rakudo 90637b: OUTPUT«invoke() not implemented in class '' in main program body at line 22:/tmp/G5dkZGZSTS» | ||
masak | moritz_: that's a hash. | ||
moritz_ | rakudo: {;}.().defined | ||
p6eval | rakudo 90637b: ( no output ) | 14:52 | |
moritz_ | masak: I figured | ||
pmichaud | rakudo: sub xyz { }; xyz().defined.say | ||
moritz_ | rakudo: print {;}.().defined | ||
p6eval | rakudo 90637b: OUTPUT«0» | ||
rakudo 90637b: OUTPUT«0» | |||
pmichaud | rakudo: sub xyz { return; }; xyz().defined.say | ||
p6eval | rakudo 90637b: OUTPUT«0» | ||
masak | rakudo: say (class {}).?foo.defined | ||
pmichaud | rakudo: sub xyz { return(); }; xyz().defined.say | ||
p6eval | rakudo 90637b: OUTPUT«0» | ||
masak | \o/ | ||
pmichaud | rakudo: sub xyz { return (); }; xyz().defined.say | ||
p6eval | rakudo 90637b: OUTPUT«1» | ||
pmichaud | looks good to me. :-) | 14:53 | |
moritz_ | and it seems to work. Frabolous | ||
masak | Twicked! | ||
jnthn | rakudo: my $x; say ($x.?lol-i-am-nonexistant).defined | ||
p6eval | rakudo 90637b: OUTPUT«0» | 14:54 | |
jnthn | \o/ | ||
pmichaud++ | |||
masak | TimToady_++ | ||
jnthn | Yes, TimToady_++ too | ||
I'm happy we've ended up^W^Wnow swung this way. :-) :-) | |||
pmichaud | rakudo: sub xyz { }; say xyz() ~~ Nil; | 14:55 | |
p6eval | rakudo 90637b: OUTPUT«1» | ||
masak | "Perl 6 spec: we're happy we've now swung this way" | ||
pmichaud | hugme tweet rakudoperl Nil is now undefined. #perl6 | ||
hugme hugs pmichaud; tweet delivered | |||
masak | rakudo: say Nil ~~ Nil | ||
p6eval | rakudo 90637b: OUTPUT«1» | 14:56 | |
masak | rakudo: say Nill ** 2 ~~ Nil | ||
p6eval | rakudo 90637b: OUTPUT«===SORRY!===HyperWhatever (**) not yet implemented at line 22, near " 2 ~~ Nil"» | ||
masak | oops. | ||
moritz_ | rakudo: say () ~~ Nil | ||
masak | rakudo: say Nil ** 2 ~~ Nil | ||
p6eval | rakudo 90637b: OUTPUT«0» | ||
moritz_ | rakudo: Nil ~~ () | ||
p6eval | rakudo 90637b: ( no output ) | ||
moritz_ | rakudo: say Nil ~~ () | ||
p6eval | rakudo 90637b: OUTPUT«1» | ||
masak | \o/ | ||
Juerd | HyperWhatever is an interesting name | 14:57 | |
masak | "Nil: an empty Parcel with pieces of flair" | ||
pmichaud | actually, Rakudo implements it as a type. :-) | ||
masak | yeah, but the truth is so boring. :) | ||
pmichaud | that may end up being wrong, but Nil seems to act more like a type than not-a-type | ||
more precisely, Nil seems to act more like a type object than anything else :) | 14:58 | ||
Juerd finds "type object" hard to grok | |||
masak | Juerd: we just need to work more on the 'grok' tool, then :) | 14:59 | |
pmichaud | Juerd: it's the object that represents the type | ||
14:59
redicaps joined,
redicaps left
|
|||
pmichaud | or I suppose it's "an object that represents a type" | 14:59 | |
Juerd | I know what it is but it's too abstract | ||
pmichaud | I think "abstract" is what it's designed for :-P | ||
PerlJam | Juerd: blogs.perl.org/users/ovid/2010/08/w...stems.html | 15:00 | |
:-) | |||
Juerd | PerlJam: Thanks, I'll read that | ||
jnthn | Juerd: The implementation of it turns out to be quite straightforward if you get the right factoring, fwiw. :-) | ||
15:01
pyrimidine left,
pyrimidine joined
15:03
justatheory joined,
justatheory left
15:04
justatheory joined
|
|||
moritz_ | Is the implementation concrete? :-) | 15:05 | |
szbalint | It seems solid. :) | 15:07 | |
jnthn | moritz_: Yes, but it's still setting. :-) | 15:08 | |
pmichaud | ...what to work on today...? | 15:10 | |
moritz_ | pmichaud: nulling temporaries in PCT generated code | 15:11 | |
pmichaud: or splitting the setting | |||
colomon | pmichaud: two quick questions: what's the state of your series refactor? | ||
pmichaud: and what would it take to redo the gather iterator ala the range iterator? | 15:12 | ||
15:16
justatheory left
|
|||
masak | rakudo: class A {}; grammar G is A { regex TOP { foo } }; G.parse("foo") | 15:20 | |
p6eval | rakudo 90637b: OUTPUT«Method 'parse' not found for invocant of class '' in main program body at line 22:/tmp/uV6YGgoaqT» | ||
masak | I know, that's a bit of "doctor, it hurts when I do this"... | ||
moritz_ | masak: I'd say it's a bug. 'grammar' should add Grammar to the list of its parents, unless one of the explicit parents is Grammar already | 15:22 | |
at least I think that's what it should do. | |||
masak | oh, good. | ||
masak submits rakudobug | |||
moritz_ | and I know where to fix it | 15:23 | |
src/metamodel/GrammarHow.pir around line 41 | 15:24 | ||
jnthn | :-) | ||
Yes, that's HOW. | |||
moritz_ | MEH | ||
masak | YOW | ||
moritz_ | if it were written in Perl 6, I'd say if none(@parents>>.isa(Grammar)) { $P0.add_parent(Grammar, $P0) } | 15:25 | |
jnthn | It'll be written in NQP at some point. | 15:26 | |
masak | that's pretty. | ||
or 'unless any(...)' | |||
moritz_ | jnthn: how hard would it be to rewrite it now? | ||
(no, I don't want to do it before the release... ) | 15:27 | ||
15:27
azert0x left
|
|||
jnthn | moritz_: Probably quite easy. | 15:28 | |
Though a bit messy, since for now you'd still need pir::foo I guess | 15:29 | ||
pmichaud | 15:11 <colomon> pmichaud: two quick questions: what's the state of your series refactor? | 15:32 | |
I abandoned it for now. I think I'm going to wait for the spec to settle down there a bit. | 15:33 | ||
15:33
azert0x joined
|
|||
pmichaud | patrickas++ has some improvements for series, and I'm thinking those can be applied at some point. | 15:33 | |
15:12 <colomon> pmichaud: and what would it take to redo the gather iterator ala the range iterator? | |||
TimToady_ | yes, the default behavior for stringy ... is likely to take into account the endpoint | ||
15:34
risou joined
|
|||
pmichaud | afaict, the gather iterator is about what it should be... I'm not sure how it would be "re-done" like the range iterator. | 15:34 | |
colomon | patrickas also has been working on a series refactor, too, with a bit of help from me. But it doesn't seem like a very big win so far. | ||
pmichaud | colomon: I think the spec for series itself needs a bit of a cleanup. it feels... contradictory at times. | ||
I could probably come up with a revised draft | 15:35 | ||
not changing any of the core semantics, just how it's described | |||
cognominal discovers the inspect opcode | |||
pmichaud | 15:11 <moritz_> pmichaud: or splitting the setting | ||
colomon | pmichaud: for gather, I was thinking of something like returning multiple results at a time. I'm suspicious it's a big drag on Rakudo's timing at the moment. but don't have anything like proof. | ||
15:35
meppl left,
rgrau_ joined
|
|||
pmichaud | colomon: I suspect gather needs to be as lazy as possible. | 15:35 | |
colomon | pmichaud: as for series, yeah, the spec is somewhat painful at the moment. | 15:36 | |
cognominal almost said "/me inspects the discover opcode" | |||
moritz_ | rakudo: say Grammar.isa(Grammar) | ||
p6eval | rakudo 90637b: OUTPUT«1» | ||
pmichaud | 15:11 <moritz_> pmichaud: or splitting the setting | ||
moritz_: I've worked on that a bit, but it's definitely non-trivial. | |||
15:37
rgrau left
|
|||
pmichaud | also, at the moment core.pm is my primary compilation benchmark, so I'm thinking I'll want to keep it as-is for another week or so while I try to improve parsing/compiling speed overall. | 15:37 | |
colomon | pmichaud: perhaps a better approach might be to look at removing use of gather from some of the core functionality, then? I might play around with a few simple things just to see what sort of difference it makes. | ||
pmichaud | colomon: that can work (more) | 15:38 | |
colomon | pmichaud: I'm particularly thinking of IO.lines at the moment. | ||
pmichaud | colomon: well, that's another one that wants strict laziness, though. | ||
15:38
pmurias joined
|
|||
pmurias | ruoso: ping | 15:38 | |
jnthn | cognominal: Don't get too into it. :-) | 15:39 | |
15:39
perlygatekeeper joined
|
|||
colomon | pmichaud: huh? I'd think exactly the opposite, isn't the internal file buffer likely to be loading more than one line at a time anyway? | 15:39 | |
jnthn | cognominal: Anything you write that depends on it now is likely to break when the new meta-model stuff lands. | ||
TimToady_ | lines doesn't want strict laziness; that would be death for performance | ||
pmichaud | colomon: well, if you're going to have the IO object do buffering, then yes. | ||
jnthn | cognominal: And the info is already available through .^foo methods anyway. | 15:40 | |
pmichaud | TimToady_: what about | ||
pmurias | lue, sjohnson: perlito has a js backend, with a (fair) bit of hacking it could be made usefull enough to avoid having to write js | ||
moritz_ | colomon: depends on wether we allow .get after an aborted .lines() iteration | ||
pmichaud | for $IO.lines { ... } | ||
15:40
takadonet left
|
|||
pmichaud | where there's a 'last' in the loop | 15:40 | |
TimToady_ | the abstraction isn't supposed to leak batchiness | ||
you can reify ahead of time | |||
pmichaud | right, so the IO object can batch up some lines, but its iterator has to deliver/consume them lazily | 15:41 | |
in that case, there can indeed be some batching going on | |||
15:41
achromic joined
|
|||
TimToady_ | the IO object *is* the iterator in this case, meseemeth | 15:42 | |
colomon | the idea that you might do $IO.lines, only get part of the lines, and then expect $IO.get to return the next one seems very wrong to me. | ||
TimToady_ | it doesn't have to clone an iterator like an array does | ||
pmichaud | TimToady_: that can work also, yes. | ||
TimToady_ | in any case, if you want that, we can pessimize declaratively | 15:43 | |
15:43
takadonet joined
|
|||
TimToady_ | or at least openly | 15:43 | |
IO objects should have methods to tweak these things | |||
but the default on input needs to be blazing fast | 15:44 | ||
pmichaud | colomon: it's pretty clear (to me at least) that | ||
for lines() { ... } | |||
needs to be such that lines() doesn't consume all of the input | |||
otherwise we won't be using 'for' to iterate IO | 15:45 | ||
moritz_ | wow. I wrote about 15 lines of PIR, and didn't even get a compiler error | 15:47 | |
and it didn't error out either | |||
moritz_ scared of himself | |||
colomon | when you say, "consume" do you mean actually or logically? I'm certainly not proposing to read the entire file when you call .lines. But I am proposing that if you call $IO.lines, you should not no longer expect $IO.get to give you something meaningful. It seems to me you shouldn't expect to mix the two. | ||
pmichaud | colomon: I'm disagreeing with your proposal. (more) | ||
TimToady_ | I think $IO.get can be consistent, but the file pointer won't | 15:48 | |
pmichaud | # read file until we see '-----' | ||
for lines() { last if $_ eq '-----'; } | |||
# should be able to do $*ARGFILES.get here | |||
TimToady_ | a get should work after that | ||
15:48
tadzik left
|
|||
TimToady_ | both constructs are just shifting (and rebatching at need) | 15:49 | |
pmichaud | agreed. | ||
that's what I mean when I say that "lines()" needs to be "lazy" | |||
TimToady_ | so it's shift that needs to be low overhead | ||
in p5, shift just bumps the front pointer of the array and returns the bumpee | |||
pmichaud | lines() can't logically consume all of the input from the IO object when it's invoked | ||
TimToady_ | since it could be infinite | 15:50 | |
pmichaud | shift can be low-overhead when the internal iterators batch things up, yes. | ||
I'm thinking of adding an argument to .reify to say "please reify at least $n elements" | |||
wolverian | do we have a lines().take-until('------')? :) | ||
pmichaud | (if you can) | ||
TimToady_ tries to think of uses for lines on /dev/random | |||
wolverian | (or * eq '------') | ||
TimToady_ | where reify * means "you pick a good batch size" | 15:51 | |
PerlJam wonders if we somehow get tail for free now | |||
TimToady_ | this is something the source is likelier to have a good idea of than the sink | ||
15:52
tylercurtis joined
|
|||
TimToady_ | and in the case of decoding a buffer, the size might actually vary | 15:52 | |
pmichaud | wolverian: lines().map({ last when '-----' }) # maybe | ||
wolverian | pmichaud: but haskell has takeUntil (and takeWhile), so surely we should too. :) | 15:53 | |
TimToady_ | just so they aren't spelled like that, shudder... | ||
PerlJam | wolverian: perhaps that's part of Haskell::Utils | ||
wolverian | TimToady_: I used take-until. maybe that's not as bad... | ||
TimToady_ | well, take is wrong in Perlland as well | 15:54 | |
colomon | So is this legal? for $IO.lines -> $line { $i++; $IO.get if $line ~~ /blueberry/; } | ||
wolverian | PerlJam: I guess it depends on how important lists are. | ||
pmichaud | colomon: iiuc, yes, that's legal. | ||
replace $IO with $*IN and you'll see why :-) | 15:55 | ||
(although arguably the $*IN case might want to be a 'while' anyway) | |||
colomon | I dunno. My gut feeling is that is a terrible idea. | ||
Juerd | So "lines" is the plural of "get"? | ||
:P | 15:56 | ||
colomon | It's not like using $IO.get explicitly all the time is terribly hard. | ||
Juerd | i.e. Why isn't .get called .line? :) | ||
moritz_ | I have a patch for the grammar A is NonGrammar { } thing. It doesn't break anything. Sadly it doesn't seem to fix anything either :( | ||
pmichaud | colomon: rewrite what you just wrote using .get, then. | ||
colomon | while my $line = $IO.get { $i++; $IO.get if $line ~~ /blueberry/; } | ||
pmichaud | what if $I0.get returns "" ? | 15:57 | |
then the loop fails early. | |||
moritz_ | then you're screwed :-) | ||
wolverian | that looks positively five-ish :) | ||
TimToady_ | which is why p5 didn't autochomp | ||
15:57
pyrimidine_ joined
|
|||
colomon | and of course, there's the other way | 15:57 | |
moritz_ | I thought p5 rewrote that internally to while (defined my $line = ...) ? | 15:58 | |
TimToady_ | a workaround to a hack :) | ||
moritz_ | evil compiler magic and all | ||
15:58
McFist joined
|
|||
colomon | my $lines = $IO.lines; while defined my $line = $lines.shift { $i++; $lines.shift if $line ~~ /blueberry/; } | 15:59 | |
pmichaud | we've struggled pretty consistently to say "if you want to iterate something, use 'for'" -- it would be sad if we then had to add "but not file I/O". | ||
15:59
blogometer left
|
|||
colomon | but you don't use for if you might want to use more than one thing in for list at once. | 15:59 | |
pmichaud | I don't follow that. | 16:00 | |
TimToady_ | metoo | ||
McFist | just found out that parameters in subs are read-only by default, is that true? seems very unthoughtful to me | ||
colomon | there's no for @a { $i++; magically skip next element of @a if $_ %% 3; } | ||
PerlJam | McFist: why? | 16:01 | |
colomon | (or at least, there's nothing like that I'm aware of.) | ||
pmichaud | colomon: right, but @a isn't being "consumed", either. | ||
[particle] | for @something -> $x, $y { if $x < 3 say $y else unshift @something, $y } | ||
16:01
pyrimidine left,
pyrimidine_ is now known as pyrimidine
|
|||
wolverian | next :twice; | 16:01 | |
pmichaud | colomon: I mean, @a still has its values when the list is done. | ||
TimToady_ | McFist: default copy semantics are higher overhead | ||
[particle] | ^^pseudocode | ||
colomon | gotta go, but still not at all happy with this. | 16:02 | |
pmichaud | colomon: understood. I'm just following the language spec (as I understand it). | ||
McFist | TimToady_: true, but that problem could be fixed by "$a is rw" if the programmer cares about that (on modern processors esp.) | ||
pmichaud | colomon: for changes, you'll have to talk to the One Who Torments Implementors. | ||
TimToady_ | next if $prev %% 3 | 16:03 | |
McFist | PerlJam: just seems more natural, in my experience | ||
masak | McFist: the problem *is* fixed that way. I'm not sure I see what you're arguing against. | ||
PerlJam | McFist: you always utilize $_[$n] in Perl 5? | ||
pmichaud | masak: I think McFist wants the default to be 'is copy' | ||
McFist | PerlJam: very rarely, why? | ||
NO! | 16:04 | ||
PerlJam | McFist: because that's what it sounds to me like you're asking for. | ||
McFist | i've read that the default is "is copy", and asked if that's true | ||
pmichaud | the default is "is readonly" | ||
McFist | ups sorry | ||
yes, I want the default "is copy", sorry again | |||
masak | McFist: making the conservative option (in time as well as side effects) the default seems right to me. | ||
pmichaud | "is copy" means more runtime overhead | ||
McFist | pmichaud: yes, but that can be sured by "is rw" | 16:05 | |
cured, even | |||
PerlJam | (side-effect free code)++ | ||
pmichaud | McFist: we'd like the defaults to be fast | ||
not only that, but "readonly" is a safer default | |||
patrickas | pmichaud: speaking of "is copy" i got rid of the "is copy" in the series refactor :-) | ||
masak | we'd also like to make a sane cultural choice the default. | 16:06 | |
pmichaud | if you're going to write to a parameter, you should declare what sort of 'write' you want to be doing. | ||
TimToady_ | when someone says "$param = 42", we force people to think about whether they mean "rw" or "copy" | ||
otherwise we'll have people assuming the wrong one all the time | |||
McFist | i can't argue about the speed, but the sane cultural choice seems to me "is rw" | ||
pmichaud | ouch | 16:07 | |
TimToady_ | eh? Fortran semantics? no way | ||
pmichaud | that means you can inadvertently be modifying the caller's arguments | ||
masak | no thanks. | ||
pmichaud | that's not a good default. | ||
McFist | well, I'm being misunderstood, not caller aguments in @_ style | ||
just not readonly | |||
pmichaud | that's what "is rw" means. | ||
McFist | not necessarily | ||
masak | but this is all a moot point, because programmers who want that default are quite welcome to set it with a pragma. | ||
pmichaud | ("is rw" == caller arguments can be modified) | 16:08 | |
PerlJam | McFist: so you do want "is copy"? | ||
McFist | PerlJam: I guess so | ||
PerlJam | McFist: same as sub foo { my ($alpha,$beta) = @_; ... } in perl 5/ | ||
? | |||
McFist | unless there's no saner behavior , something between copying the scalar always and, well, not copying it | ||
[particle] | what about "is dangerous"? | ||
McFist | PerlJam: yes, like that | 16:09 | |
and without modifying the caller's args | |||
without $_[$a]++ that can backfire | |||
TimToady_ | we already gave two reasons why 'is copy' isn't the best default | 16:10 | |
McFist | I mean, I buy the speed argument and buy $_[$n] argument, but default readonly seems an overkill | ||
PerlJam | McFist: uh oh ... you're pushing the wrong buttons now ... How is "is ro" overkill? Explain that. | ||
TimToady_ | we want to know what the programmer means by "$param = 42", not just guess | ||
moritz_ | action at a distance is evil. | ||
it's a good idea to make the programmer declare it if he wants it | 16:11 | ||
McFist | I mean, semantic overkill - I just want sub f($a){f($a--)} to figure automatically that $a stays on the stack | 16:12 | |
pmichaud | o_O | ||
TimToady_ | what if the intent was to change the caller's parameter? | ||
s/parameter/argument/ | |||
TiMBuS | is ref | ||
moritz_ | McFist: maybe you want to program in Forth instead? | ||
pmichaud | why would you do $a-- there? | ||
moritz_ | if you care about the stack | ||
McFist | TimToady_: which not happens often, then I guess a special "is" flag suffice? like, "is i_want_to_modify_caller" ? :) | ||
masak | the code analyzer that I haven't written yet also wants the default to be 'is readonly'. | ||
16:13
smash_ joined
|
|||
smash_ | hello everyone | 16:13 | |
[particle] | that's not a very strong argument, masak | ||
PerlJam | McFist: I think you're in the camp of "wants readonly but doesn't know it yet" :) | ||
McFist | pmichaud: just an illustration, c-style if you want | ||
pmichaud | "is i_want_to_modify_caller" already has a flag, it's "is rw" | ||
masak | [particle]: no, because it caters to the computer rather than to the user. but it's worth remembering. | 16:14 | |
[particle]: were the default 'is rw', there'd be lots of actions-at-distances that I might not be able to rule out. | |||
huf | but... but... default is readonly caters to the user too ;) | ||
McFist | pmichaud: can be there such "is rw" that, well, just rw, and doesn't modify the caller? | ||
moritz_ | McFist: if you use recursion, you probably just want sub f($x) { f($x-1) } instead | ||
huf | McFist: is copy? | ||
pmichaud | McFist: there is... it's "is copy" | ||
PerlJam | McFist: wait ... sanity check: do you also want variables to be auto-declared per scope (i.e. get rid of "my") ? | ||
masak | huf: right. but it does so by being a bit strict. | ||
huf | masak: bondage is good! | ||
McFist | PerlJam: no, why? | 16:15 | |
masak | huf: in this case, it leads to some good things. | ||
huf | masak: especially as perl always leaves a loophole open ;) | ||
16:15
blogometer joined
|
|||
huf | so you're never truly bound | 16:15 | |
McFist | moritz_: not the best example, pls don't mind recursion | ||
masak | huf: there's always a 'safe word'? | ||
:) | |||
huf | ;) yeah | ||
PerlJam | McFist: because it's another area where people think the "saner default" is to do something implicit rather than explicit. | ||
McFist: those people would be wrong :) | 16:16 | ||
McFist | yeah, but | ||
do I undrestand correctly that the only argument agains default "is copy" is runtime overhead? | |||
jnthn | Not at all | ||
TimToady_ | no | ||
PerlJam | McFist: nope | ||
TimToady_ | we want to know what the programmer means by "$param = 42", not just guess | ||
that's the other argument | 16:17 | ||
McFist | TimToady_: why? and who're we here? | ||
[particle] | repeat that a few more times. | ||
TimToady_ | we want to know what the programmer means by "$param = 42", not just guess | ||
McFist | sorry I didn't get that from 1st time | ||
moritz_ | we want to know what the programmer means by "$param = 42", not just guess | ||
PerlJam | heh | ||
moritz_ | (maybe it helps if more people say it? :-) | ||
masak | we want to know what the programmer means by "$param = 42", not just guess | ||
McFist | moritz_: do you really think so? | 16:18 | |
pmichaud | 16:06 <pmichaud> if you're going to write to a parameter, you should declare what sort of 'write' you want to be doing. | ||
TimToady_ | "we" is anyone or anything who cares | ||
moritz_ | McFist: indeed | ||
16:18
justatheory joined
|
|||
TimToady_ | but esp the compiler | 16:18 | |
moritz_ | and the test suite maintainer | ||
jnthn | Or anyone trying to ready/understand the code. | ||
*rad | |||
*read | |||
TimToady_ | and the language designer, who often uses "we" to mean "I" :) | ||
masak tries to rad some of his code sometimes | 16:19 | ||
McFist | well, ok , you want it but why?? | ||
PerlJam | TimToady_: link him to your doc on natural language principles. (I don't have it handy or know it right off) | ||
moritz_ | McFist: do you want to understand code you read? | ||
PerlJam | :) | ||
TimToady_ | well, there are two reasons, and you're turning into a troll | ||
16:19
risou_ joined
16:20
McFist left
|
|||
rokoteko | pmichaud: mind if I am a bit nosy. "I'm not really after all of the people who program in Perl 5 and are happy with it" .. why not? | 16:20 | |
masak | McFist: please be more specific than 'why??' that sounds like you didn't understand the last ten minutes of conversation at all. | ||
16:20
McFist joined
|
|||
McFist | sorry | 16:20 | |
masak | McFist: please be more specific than 'why??' that sounds like you didn't understand the last ten minutes of conversation at all. | ||
PerlJam | ah, found it. | ||
moritz_ | rokoteko: I'm not pmichaud... but going for people who are happy with their current programming language | ||
McFist | sorry if I look like trolling, I'm not | ||
moritz_ | ... is just inefficient | ||
PerlJam | McFist: Language design is hard. See www.wall.org/~larry/natural.html | ||
McFist | it's hard to answer 5 people in parallel ) | 16:21 | |
16:21
justatheory left,
risou left
|
|||
rokoteko | moritz_: Erm. But it's perl. So you are one of those people who think that perl5 and perl6 are completely different languages? | 16:21 | |
moritz_ | rokoteko: it's much easier to convince people who are searching for something better | ||
pmurias | McFist: the reason "is readonly" is the default is that we want to protect people against accidently modifing the variable | ||
rokoteko | moritz_: if you are happy with perl5, you cant be excited about perl6? | ||
moritz_ | rokoteko: no. I think they are different languagages, and both are perl | ||
pmichaud | rokoteko: because if I say to myself "how do I make Perl 6 successful", I see that I can either try to convert Perl 5 programmers, or I can go after people who don't yet program or don't yet program in Perl | ||
McFist | masak: well to be more precise: "why we (e.g. compiler if I understand Larry correctly here) what to know what programmer means by $x = 42"? | 16:22 | |
pmurias | * modifiying | ||
pmichaud | I think the latter group is where the bigger win is | ||
McFist | PerlJam: thanks | ||
pmichaud | McFist: no, not the compiler | ||
PerlJam | McFist: the compiler wants to know so that it can generate the appropriate instructions | ||
masak | McFist: because depending on what you mean, the assignment could either affect or not affect the caller environment. | ||
moritz_ | rokoteko: sure. I got excited about Perl 6 when I was a Perl 5 programmer, and liked it. But there's not much to win if you try to convince die-hard p5 fans like Abigail | ||
PerlJam | McFist: the humans want to know so that they can have a reasonable chance at understanding the program | ||
masak | McFist: with 'is copy', it doesn't affect the caller, with 'is rw' it does. | 16:23 | |
pmichaud | the compiler could figure it out. it's the other people reading the code that we want to clarify for | ||
McFist | pmichaud: well, but who then, the design team? | ||
pmichaud | McFist: other programmers | ||
McFist | pmichaud:programmers like in "fellow programmers" or the perl6 design team? | ||
TimToady_ | pmichaud: I don't think the compiler can figure that out in many cases | ||
moritz_ | rokoteko: or die-hard fans of any programming language. Either they are amazed by what they see of Perl 6, or not. If not, leave them alone. You won't make them happy by intruding their language choice | ||
PerlJam | McFist: Perl 6 programmers. | ||
rokoteko | pmichaud: hm. interesting point. Im not that familiar with marketing. | 16:24 | |
pmichaud | rokoteko: it's part of being a "disruptive technology" (more) | ||
PerlJam | McFist: programmers in general too, but they'll have a tougher time at it if they don't already know perl :) | ||
moritz_ | and you won't make yourself happy either, because they'll keep comparing p6 to their old love, and moan that things are different | ||
TimToady_ | however, to the first approximation, the sample of Perl 6 programmers we have is the design team :) | ||
McFist | well I do :) | ||
TimToady_ | rakudo star is all about trying to broaden that sample | 16:25 | |
PerlJam | moritz_: Love isn't a zero-sum game. You can make more of it. It's too bad people treat it otherwise sometimes. :( | ||
pmichaud | rokoteko: disruptive technologies often start out by targeting "markets" that the existing technologies ignore or discount | ||
rokoteko: or, I can put it another way (more) | 16:26 | ||
McFist | well, I didn't buy the second argument then "we want to know what programmer means by $x = 42", because perl5 could do that without default readonly | ||
moritz_ | PerlJam: yeah, but love != die-hard fanboyism | ||
rokoteko | pmichaud: nods. well (to me) your post just made perl6 sound like perl5 for dummies. ;) | ||
pmichaud | rokoteko: which is larger -- the base of programmers that exists today, or all of the yet-to-be-programmers that will come up in the next 20-30 years? | ||
tylercurtis | McFist: that's because in Perl 5, you can't have readonly parameters. | ||
TimToady_ | McFist: only by forcing the user to make a copy | ||
moritz_ | McFist: perl5 doesn't have parameters | ||
McFist | true | ||
moritz_ | so $param = 42 never occurs in p5 | ||
patrickas | rakudo: my @a=1,2,3,4,5,6; say @a[*-3 .. *-1]; | ||
McFist | also true | ||
moritz_ | unless you copied to it first | ||
p6eval | rakudo 90637b: OUTPUT«4111111111111111» | ||
McFist | but wouldn't it be great if it would in perl6? | 16:27 | |
moritz_ | patrickas: that's curious :-) | ||
pmichaud | rokoteko: (perl 5 for dummies) -- I can see how that could be inferred from the post. It's not that Perl 6 is dumber -- it's just cleaner. | ||
pmurias | McFist: you can still do my $foo = @_[0] if you want | ||
huf | McFist: what would be the advantge of making the default harder to reason about with no gain at all? | ||
rokoteko | pmichaud: I was just curious about your point and you gave a relatively good explanation. but as it was perlmonks, maybe you could've added all this yadadada there also. :) | ||
McFist | pmurias: yeah, but it's not cool ) | ||
pmichaud | rokoteko: I still can :-) | ||
patrickas | moritz_ yea ... in all cases what's the right way to take the last n items of an array ? | 16:28 | |
TimToady_ | in this case, Perl 6 has chosen cleanliness and speed over a minor convenience | ||
pmichaud | The gain that McFist is after (I think) is that he doesn't have to write 'is copy' in order to modify a local copy of a parameter. | ||
McFist | huf: compatibility with c-infected brains, mine included :) | ||
moritz_ | patrickas: I don't know | ||
jnthn | I'm looking at this discussion and thinking, if we make the default something else, what do we gain? We make the code a bit less obvious for the programmer, we make it harder to analyze and understand a sub-routine in isolation (loss for the programmer and the compiler) and we move further away from functional programming ideals too. | ||
huf | McFist: perl isnt c, end of discussion :))) | ||
McFist | pmichaud: yes, thanks, also true | 16:29 | |
huf | pmichaud: oh, right ;) | ||
moritz_ | patrickas: I think *-3..*-1 is supposed to work, but I can see why it doesn't work in the current spec | ||
tylercurtis | McFist: suppose you start working with an existing codebase, and you see a function like "sub foo ($a) { a; bunch; of; stuff; so; that; you; can; no; longer; see; the; signature; $a++; do-something-with($a); }" And you see the $a++ bit. | ||
moritz_ | and another reason why it doesn't work in rakudo | ||
tylercurtis | What does it do? | ||
jnthn | Yes, you might end up writing your code a bit differently due to the default being readonly. | ||
I'm not convinced that'll make for worse code though. | |||
TimToady_ | I wonder if * + * could default the second arg to the first | ||
pmurias | tylercurtis: but you would have to look up to the signature regardless of the default | 16:30 | |
McFist | tylercurtis: hmm I think I'd expect that $a is on stack and doesnt modify the caller -- isn't it natural? | ||
moritz_ | TimToady_: that would make my starry obfu work again. Great idea :-) | ||
jnthn | After all, the parameter name is the name for the thingy you expect to be passed as an argument. | ||
rokoteko | pmichaud: okie. just wanted to make this clear for me as I atleast somehow managed to interpret that post wrong. thanks for your time and all the effort you are doing for perl (6). :) | ||
moritz_ | McFist: forget the stack when you're talking about Perl 6 | ||
McFist | moritz_: why? | ||
moritz_ | McFist: because there is no stack. | ||
jnthn | If you manipulate it in some way, you probably have a different thing and should probably stick it in a container with a more appropriate name. | ||
pmichaud | rokoteko: you're welcome | 16:31 | |
rokoteko: and thanks for your question; I'll see if I can clarify my comments more in the future (and the post as well if I think of how to do it) | |||
moritz_ | McFist: Rakudo is based on CPS (because parrot is based on it). There are signatures and parcels for passing arguments. No stack. | ||
jnthn | s/parcels/captures/ | 16:32 | |
moritz_ | erm, right | ||
rokoteko | pmichaud: I dont mind. I can always ask here. and maybe Im the only one who feels this way. :) I feel Im not the majority. ;) | ||
McFist | moritz_: how does the recursion work then? | ||
moritz_ | McFist: just like any other function call, really | ||
PerlJam | TimToady_: if you did that, would that also affect N-ary whatevers like * + * + * + * ? | 16:33 | |
masak | I'm against * + * being of variable arity, because it would create hard-to-track-down odd behaviours in closures. Do Not Want. | ||
moritz_ | McFist: see de.wikipedia.org/wiki/Continuation-passing_style | ||
McFist | moritz_: thanks, I know what cps is | ||
jnthn | masak: I'm inclined to think it's a tad too clever too... | ||
moritz_ | McFist: then what's the problem with recusion? | ||
pmurias | moritz_: isn't what you describe a form of a stack | ||
McFist | and I don't know german anyway ) | ||
TimToady_ | it's not an argument stack | ||
McFist | aha | 16:34 | |
TimToady_ | it's a context stack | ||
pmichaud | rokoteko: (not majority) sure, but I can still try to tune my delivery a bit. at any rate, thanks again for your question, it's very helpful. | ||
TimToady_ | to be sure, a callframe is likely to have a pointer to its arguments | ||
moritz_ | pmurias: no, it's more of a general graph | ||
McFist | hm well anyway, stack or not, I'd expect $a++ modifies only the memory visible to the current function run, not the caller | 16:35 | |
tylercurtis | McFist: even if you specifically ask for modifying the caller? | ||
moritz_ | McFist: then be glad that in Perl 6, it doesn't modify what the caller sees | ||
McFist | tylercurtis: no, of course | ||
I'd consider "is rw" a dangerous thing, as it is in perl5 | |||
but we're talking about defaults | 16:36 | ||
moritz_ | rakudo: sub f($x) { $x++ }; my $a = 5; try { f($a) }; say $a | ||
p6eval | rakudo 90637b: OUTPUT«5» | ||
moritz_ | look, it didn't modify $a | ||
isn't that great? | |||
pmurias | moritz_: isn't the default readonly? | ||
moritz_ | pmurias: yes | ||
TiMBuS | implement 'is cow', everyone wins (except pmichaud who has to implement it) | ||
:3 | 16:37 | ||
McFist | moritz_: wait, how could $x++ work if it is readonly? I'm confused | ||
pmurias | McFist: how often do you modify the argument? | ||
PerlJam | TimToady_: if "is cow" isn't specced, that should probably happen first :) | ||
moritz_ | McFist: it threw and exception | ||
McFist | aah | ||
PerlJam | McFist: note the try block | ||
McFist | yes | ||
"is cow"++ | 16:38 | ||
TimToady_ | cows are overrated | ||
PerlJam | TiMBuS: er ... see what I just erroneously said to TimToady_ | ||
moritz_ | Mu! | ||
TiMBuS | heh i saw | ||
McFist | (default "is cow") even more ++ | ||
PerlJam | TimToady_: at least they don't have GILs | ||
moritz_ -> afk | |||
McFist | pmurias: not often, but when I do it given the unpleasant feeling if it's readonly | 16:39 | |
gives | |||
jdv79 | the signatures/captures aren't really going to be used for compiler optimizations are they? just saw jnthn's EU talk. | ||
jnthn | jdv79: Huh? Of course they're useful information for the compiler. | 16:40 | |
jdv79 | you gave an example of using they to transform trees - constant folding... | ||
jnthn | jdv79: We might be able to statically work out which candidate a multi-dispatch shoudl go to at compile time and save going thorugh the multi-dispatcher, for example. | ||
TimToady_ | there's another more fundamental reason for readonly, which is that Perl 6 is trying to bias programming more in the direction of side-effect-free FP | ||
jdv79 | *them | ||
jnthn | jdv79: Oh | ||
jdv79: Sorry, mis-grokked what you meant. :-) | 16:41 | ||
McFist | TimToady_: that's a much better argument that a vague and totalitarian "we want to control $x = 42" :) | ||
than | |||
jnthn | jdv79: I've no idea if we'd actually write it that way. You do want to match stuff in trees though at some level. | ||
jdv79: I mean, PAST is really the tree form that the compiler users. | |||
jdv79: So the example was realistic in that sense. | |||
(where the compiler = Rakudo) | |||
TimToady_ | well, language designers have to think on many levels at once, and you were asking on a more detailed level, so it took a while to generalize in my head | 16:42 | |
McFist | I might even like that level, at least | ||
TimToady_ | most of these design decisions are made for many reasons, not all of which are easy to articulate | ||
16:42
cozmic left
|
|||
PerlJam | I think this is the first time I've seen anyone imply that TimToady_ is totalitarian. | 16:42 | |
It's like I'm in the twilight zone or something :) | 16:43 | ||
jdv79 | i found it surprising but interesting | ||
McFist | oh please don't paint me che guevara, alright? :) | ||
sorry if that offended anyone though | 16:44 | ||
TimToady_ | certainly not me | ||
jnthn | jdv79: I guess it depends how efficient we could make it. | 16:45 | |
masak | PerlJam: I've seen it on Reddit as well. it was absurd there as well. | ||
PerlJam | McFist: Any other language design issues you'd like to discuss? :-) | ||
TimToady_ | I already know I'm vague and totalitarian :) | ||
TiMBuS | TimToady_, is making a copy not free of side effects?? just curious | ||
McFist | PerlJam: i'm leaving already, thanks for the hospitality | ||
jnthn | jdv79: fwiw, PAST nodes are already represented as Captures. | ||
jdv79: So it may not be such a bad fit. | |||
PerlJam | TiMBuS: sure, but at the expense of always copying. Would you rather it be side-effect free and only those who need copying pay the cost? | 16:47 | |
(and only pay it where they need it) | |||
16:47
cozmic joined
|
|||
TiMBuS | PerlJam, of course, but that goes back to the overhead issue more than side effects. anyway i was just legitimately curious about whether copying cured side effects or not | 16:49 | |
PerlJam | TiMBuS: aye. | 16:50 | |
masak | ostatic.com/blog/is-perl-6-imminent...ybody-care | ||
"Just when many were set to write Perl off, it may surprise people once again." | 16:51 | ||
TimToady_ | in pure FP, nothing is mutable, so it doesn't matter if you copy or not | ||
PerlJam | masak: a funny (to me at least) quote from there is "Wall himself seemed to imply that a finished version might be available by Christmas." :-) | ||
pmichaud | masak: iirc, Tim O'Reilly said a similar thing at his OSCON keynote a few years ago :) :) | ||
masak | PerlJam: :D | 16:52 | |
pmichaud: it's becoming truer by each year! | |||
pmichaud | I'm still waiting for another blog post where someone writes "nobody cares about Perl 6" so that I can reply "I care." :-) | ||
jnthn | masak: Love the comments... "C# and Java nerds are running scared. Perl 6 will destroy themb." | ||
masak | RAWR | ||
jnthn | masak: But I'm a Perl 6 *and* C# nerd. Do I destory myself? ;-) | ||
PerlJam | pmichaud: Tim O'Reilly said that TimToady could "see around corners". I'm still wondering how he can do that :) | 16:53 | |
masak | jnthn: no, it's more of a 50% destroys 50% situation :P | ||
pmichaud | jnthn: Yes. By definition if you care about both you've already destroyed yourself. :) | ||
masak | PerlJam: using LTM, probably. | ||
jnthn | :P | ||
pmichaud | PerlJam: it has to do with immortality. | ||
masak | great. I try to go home, and suddenly it's Silly Hour. | 16:54 | |
pmichaud | PerlJam: immortality also implies the ability to send things back from the future, I think. | ||
PerlJam | nothing is new under the sun? | ||
tylercurtis | jnthn: Wait until you finish the new metamodel, at least. :P | ||
masak | in FP, everything is immortal. | ||
PerlJam: nowadays, it's "nothing new under the oracle". | |||
rokoteko | moritz_: sorry I didn't answer you as pmichaud happened to respond to me and I got caught up with that. But I dunno about the Abigail situation, but that is seriously an Extreme case. There's no reason to compare anyone mortal (like me) to Abigail. :) Anyhow. I think Abigail might also get interested (if not yet) what you are doing, when perl6 shows its power. ie. do what you used to did with perl5, just as easily, and we offer all this more. | ||
pmichaud | PerlJam: and right now, everything under the Sun is likely to get you sued for patent infringement :-P | 16:55 | |
masak | rokoteko: tl;dr :) | ||
16:56
squeeky joined
|
|||
squeeky | rahhh. | 16:56 | |
masak | squeeky! \o/ | ||
McFist | well anyway people if you consider "is cow" that'd be really great | 16:57 | |
McFist afk | |||
rokoteko | personally Im bit confused about what is different between my $bar = &foo; and my $bar := &foo; .. to me it would be easier if there was only one only one syntax for everything but many different ways of using the syntax. :) | ||
masak: tl;dr ? | |||
squeeky | masak: I'm not back for good reasons. | ||
the Configure.pl issues sprung up again. le sigh. | |||
masak | :/ | ||
jnthn | tylercurtis: Is it more terrifying that I chose to write to prototype in C#? :-) | 16:58 | |
.oO( Maybe the metamodel will destory me. o_O ) |
|||
masak | rokoteko: on reddit-like sites, that's an expression meaning "too long, didn't read". I meant to imply that your line of IRC was, er, longish. :) | ||
squeeky | Wow, tl;dr is about 7 years old now. First showed up on SomethingAwful. | 16:59 | |
rokoteko | masak: ahh. it was a long while ago that I was supposed to response. :) | ||
masak | nom & | ||
16:59
masak left
|
|||
tylercurtis | jnthn: as long as it ends up back on Parrot, $_ !~~ :terrifying. | 17:00 | |
jnthn | tylercurtis: Oh yes, it will. :-) | 17:01 | |
17:01
envi^home left
|
|||
pmichaud | rokoteko: a more accurate statement of my comment would be something like "I don't need to target Perl 5 programmers, because they already know Perl is beautiful. They'll start migrating to Perl 6 when it's ready for them, and even if they don't ever migrate, that's great -- they're still following the Perl philosophy. The bigger impact is on all those yet-to-be-programmers who someday will be looking for a programming language to use, and Perl 6 can h | 17:02 | |
tylercurtis is tempted to attempt to write a Parrot runtime for it in Winxed or something now that he has more free time. | |||
:) | |||
TimToady_ | .oO(Perl 6 can h)? |
17:03 | |
pmichaud | can hopefully attract them." | ||
(must've gotten cut off) | |||
17:04
kuzuha joined
|
|||
pmichaud | lunchtime here, then $otherjob | 17:04 | |
then I think I'll do some more profiling for a bit | 17:05 | ||
any word on the release eta? | |||
17:05
kuzuha_ left
|
|||
jnthn | pmichaud: I think mathw++ said he'd cut the tarball this evening. | 17:06 | |
pmichaud: As in, UK evening. | |||
It'd only be 6:13pm there ATM so not quite evening yet :-) | |||
pmichaud | okay, wfm. | ||
gfldex | Somebody will have to save all those PHP dudes. Perl 6 is gonna do that. :) | ||
pmichaud | I'll bbl | ||
17:09
bla123 joined
17:10
justatheory joined
|
|||
rokoteko | pmichaud: well that was a *bit* better. but to add to this again; why the extensive use of "I" ? I thought the butterfly logo was the spokesbug for perl6? | 17:11 | |
17:11
dakkar left
|
|||
pmichaud | rokoteko: oh, because I'm only talking about my motivations for Perl 6. I don't speak for the language (yet?) | 17:12 | |
Perhaps I do speak for the language and don't realize it yet :) | |||
rokoteko | pmichaud: :) | ||
PerlJam | pmichaud: you speak quite well for the language at conferences from what I've seen :) | 17:13 | |
moritz_ | rakudo: class A { }; say pir::typeof__SP(A) | 17:14 | |
p6eval | rakudo 90637b: OUTPUT«A» | ||
rokoteko | hmm.. so is there any difference between my $foo := &bar; ..vs.. my $foo = &bar; ? | 17:18 | |
gfldex | it's a different operator | 17:19 | |
so if somebody did magic with either operator, it will be different for sure :) | |||
rokoteko | nothing else? | ||
moritz_ | rokoteko: yes, binding makes $foo read-only | ||
tylercurtis | star: my &foo = -> $x { say $x }; my $bar = &foo; &foo = -> $x { say -$x; }; $bar(5) | 17:20 | |
p6eval | star 2010.07: OUTPUT«5» | 17:21 | |
tylercurtis | star: my &foo = -> $x { say $x }; my $bar := &foo; &foo = -> $x { say -$x; }; $bar(5) | ||
p6eval | star 2010.07: OUTPUT«-5» | ||
rokoteko | ok. I kinda understand the point. I wonder mainly wondering why .WHICH for both returned the same. | ||
17:21
ash_ joined
|
|||
rokoteko | but to get to the point, why I wondered about this... | 17:21 | |
patrickas | rakudo: say (1,2, *+*+* ... 20) | ||
p6eval | rakudo 90637b: OUTPUT«12» | ||
rokoteko | rakudo: sub foo (Int $x) { 1 .. $x }; push my @arr, &foo.assuming($_) for 2..5; say join ", ", @arr[2].() | 17:22 | |
p6eval | rakudo 90637b: OUTPUT«1, 2, 3, 4» | ||
rokoteko | how would you do this using the read-onlyness of := ? | ||
jnthn | With my $foo = &bar; you have a scalar container which now holds a code object. | ||
With my $foo := &bar; the $foo symbol directly references the code object. | 17:23 | ||
And you don't have the container. | |||
iiuc. | |||
17:23
Italian_Plumber joined
|
|||
moritz_ | jnthn: could you please take a look at nopaste.snit.ch/22909 ? | 17:25 | |
17:25
bla123 left
|
|||
moritz_ | I tested it with | 17:25 | |
./perl6 -e 'class A { }; grammar B is A is Array { method TOP { "foo" } }; say A ~~ Grammar' | |||
and it's false | |||
and the debugging output says that both parent classes are 'Class' | |||
rokoteko | jnthn: ok. but shouldnt $foo.WHICH be different for the former and latter? or what Im missing here? | ||
moritz_ | that's what the typeof returns | ||
rokoteko: .WHICH on a scalar acts on the object, not the container | 17:26 | ||
rokoteko | moritz_: ahh. how can I make it act on the container? | 17:27 | |
jnthn | moritz_: YOu just discovered what happens when you don't have type objects... | ||
rokoteko | rakudo: my &bar = { 1 }; my &foo1 = &bar; my &foo2 := &bar; say &bar.WHICH ~ "/" ~ &foo1.WHICH ~ "/" ~ &foo2.WHICH | ||
p6eval | rakudo 90637b: OUTPUT«124312272/124312272/124312272» | ||
jnthn | rokoteko: VAR($a).WHICH I guess | 17:28 | |
17:28
thebird left
|
|||
rokoteko | moritz_: the above example doesn't act on scalar... what's happening there? | 17:28 | |
pmurias | tylercurtis: what's winxed? | ||
17:29
justatheory left
|
|||
moritz_ | rokoteko: .WHICH acts on the object; the object is &bar every time. | 17:29 | |
ash_ | pmurias: winxed is a language based off javascript for parrot, see code.google.com/p/winxed/ its by NotFound++ | ||
rokoteko | rakudo: my &bar = { 1 }; my $foo1 = &bar; my $foo2 := &bar; say &bar.WHICH ~ "/" ~ VAR($foo1).WHICH ~ "/" ~ VAR($foo2).WHICH | ||
p6eval | rakudo 90637b: OUTPUT«Could not find sub &VAR in main program body at line 22:/tmp/gyUzUEPAfD» | ||
rokoteko | NYI? | 17:30 | |
moritz_ | seems like | ||
jnthn: is there an easy(-ish) fix? | |||
rokoteko | ok. Then it's obviously the wrong time trying to figure this out. :) | ||
jnthn | moritz_: Ah, yes | 17:31 | |
moritz_: (sorry, took me a moment to realize the easy way :-)) | 17:32 | ||
moritz_: Get the Parrot class object associated with Grammar | |||
And then use eq_addr | |||
17:32
buzzlightyear joined
|
|||
jnthn | To see if they're the same thing. | 17:32 | |
moritz_: Let me know if you need more details on how to do that. | 17:33 | ||
moritz_ | jnthn: ah, but I want to also consider the parent's parent | ||
jnthn | Oh...hm | ||
oh | |||
moritz_ | jnthn: so I'd end up re-implementing isa, no? | ||
jnthn | moritz_: No, you can get Parrot to tell you the MRO I guess | 17:34 | |
inspect with "all_parents" to get that | |||
Then you just have to look through that. | |||
moritz_ | I'll try that, thanks | ||
jnthn | moritz_: You're might be getting and inkling of why I'm re-doing the meta-model stuff. :-) | ||
17:34
risou_ left
|
|||
moritz_ | :-) | 17:35 | |
jnthn | yowser I has a hungry | 17:38 | |
jnthn takes a nombreak | |||
17:41
buzzlightyear left
|
|||
pmichaud | www.perlmonks.org/?node_id=856089 # not news, but maybe interesting to others | 17:51 | |
afk, lunch | 17:52 | ||
17:53
Trashlord left
17:55
pyrimidine left,
pyrimidine joined
17:56
Trashlord joined
17:57
cotto_work left,
pyrimidine_ joined,
Holy_Cow left
17:58
Holy_Cow joined
17:59
pmurias left,
pyrimidine left,
pyrimidine_ is now known as pyrimidine
18:01
daxim left
18:04
cotto_work joined
|
|||
Exodist | Hmm. C pisses me off, I think I will switch to implementing Oyster-Perl6 on Go. | 18:04 | |
(good excuse to learn Go as well) | |||
18:06
pyrimidine is now known as py[tab]
18:09
araujo left,
araujo joined
18:11
tadzik joined
18:15
mberends joined,
patrickas left
18:16
Mowah joined
18:20
djburiedalive joined
18:21
djburiedalive left
|
|||
sorear | good * #perl6 | 18:24 | |
18:24
stephenlb joined
18:25
stephenlb left
18:26
stephenlb joined
|
|||
tadzik | good evening | 18:26 | |
sorear | niecza: use Test; ok True, "can load modules from p6eval" | ||
p6eval | niecza 4770bf5: OUTPUT«(timeout)» | ||
sorear | niecza: use Test; ok True, "can load modules from p6eval" | 18:27 | |
p6eval | niecza 4770bf5: OUTPUT«ok 1 - can load modules from p6eval» | ||
sorear needs to make niecza faster :/ | |||
moritz_ | jnthn: hm, doesn't work with all_parents either | 18:28 | |
18:28
Mowah left
18:29
alester left
18:30
alester joined
|
|||
sorear | moritz_: just add Grammar to the end of the list, C3 will DTRT | 18:31 | |
(unconditionally) | |||
moritz_ | wow. Then I don't understand C3 correctly | 18:32 | |
sorear | also, why shouldn't grammar Foo is Any work | ||
class Foo is Mu works | |||
moritz_ | because class != grammar | 18:33 | |
18:38
eternale1e is now known as eternaleye
18:43
mantovani left
18:44
mantovani joined
18:46
blogometer_ joined
18:47
blogometer left,
blogometer_ is now known as blogometer,
Trashlord left
|
|||
colomon | pmichaud, TimToady_: does the strict laziness requirement for .lines imply that basically every normal filter method must also be strictly lazy? For instance, .grep. | 18:49 | |
My backscroll here doesn't go far enough, but someone suggested something like $IO.lines.take-until('------') | |||
could that then simply be $IO.lines.grep('--------').shift ? | 18:50 | ||
18:50
Trashlord joined
|
|||
moritz_ | (fwiw, irclog.perlgeek.de/perl6/today has nearly infinite backscroll :-) | 18:51 | |
colomon | moritz_: yeah, but I have nearly infinite laziness. | ||
ash_ | colomon: dont worry, thats a virtue i hear in these parts | 18:52 | |
PerlJam wonders if anyone has specced .first | 18:53 | ||
sorear | .[0] is shorter | ||
[Coke] | you mean .car? | ||
sorear | and it's .head anyway | ||
18:54
blogometer left
|
|||
colomon | .head versus .car religious war! | 18:54 | |
phenny | Can't connect to versus .car religious | ||
ash_ | isn't just [0] shorter than .[0]? | 18:55 | |
moritz_ | .head sudokugarden.de/ | ||
phenny | moritz_: 200, text/html, utf-8 | ||
colomon | PerlJam: yup, .first is in there and does exactly what I want in this case. | ||
but I think .grep makes the point clearer. | 18:56 | ||
ash_ | rakudo: my @a = 1..3; say @a.first; # NYI ? | ||
p6eval | rakudo 90637b: OUTPUT«No candidates found to invoke for method 'first' on object of type 'Array'; available candidates have signatures::(Mu : Mu $test;; *%_) in main program body at line 22:/tmp/1cnSc6QSEi» | ||
ash_ | rakudo: my @a = 1..3; say @a.first 1; | ||
18:56
pmurias joined
|
|||
p6eval | rakudo 90637b: OUTPUT«===SORRY!===Confused at line 22, near "say @a.fir"» | 18:56 | |
pmurias | ruoso: ping | ||
colomon | rakudo: my @a = 1..3; say @a.first(* %% 2) | ||
p6eval | rakudo 90637b: OUTPUT«2» | ||
ash_ | ah | 18:57 | |
rakudo: my @a = 1..6; say @a.first(* %% 2), ' ', @a.grep(* %% 2).shift; | |||
p6eval | rakudo 90637b: OUTPUT«2 2» | ||
pmurias | Exodist: what is Oyster-Perl6? | ||
sorear | pmurias: hi | 18:58 | |
pmurias | sorear: hi | ||
sorear | pmurias: why do you use require "viv" | ||
pmurias | don't remember | 18:59 | |
i can try to stop using that and check if anything breaks | |||
sorear plans to move viv out of @INC at some point, at which point that will pick up an old version | |||
pmurias | viv defines some VAST::* classes | 19:00 | |
PerlJam | rakudo: my @a = 'a'..'z'; say @a.rotate(13); | ||
p6eval | rakudo 90637b: OUTPUT«nopqrstuvwxyzabcdefghijklm» | ||
19:00
masak joined
|
|||
pmurias | sorear: Actions autogenerates missing ones | 19:01 | |
19:01
Italian_Plumber left
|
|||
Exodist | pmichaud, github.com/exodist/Oyster | 19:01 | |
masak | moritz_: 'nearly infinite' is a bit of an exaggeration... :) | ||
Exodist: oh hai. | |||
pmurias | sorear: but all of them inherit from VAST::Base | ||
pmichaud assumes that was meant for pmurias. | |||
Exodist | oops, sorry pmichaud, that was for pmurias | ||
damn tab completion in xchat | 19:02 | ||
masak | Exodist: happens to everyone in here :) | ||
Exodist: we're both implementing self-hosting Perl 6 implementations. perhaps you saw my email. | |||
Exodist | I did, didn't I respond? | ||
masak checks | |||
nope. :) | 19:03 | ||
Exodist | oh, oops | ||
moritz_ | masak: well, it goes back a million line... that's quite close to infinity, for a backscroll | ||
masak | Exodist: forgot to push, like pmichaud? :P | ||
Exodist | masak, what lang is yours in? | ||
masak | Exodist: Perl 6. | ||
hence the 'self-hosting'. | |||
pmichaud assumes that "self-hosting Perl6" means "written in Perl 6" :-P | |||
masak | Exodist: I've yet to see much Perl 6 in your self-hosting impl. :P | ||
diakopter | P-: | ||
Exodist | lol, I mean your bootstrapping stuff. | 19:04 | |
masak | Exodist: oh, that. | ||
Exodist | is it gonna be rakudo-strapped? | ||
moritz_ | akshually it's 1.9mio lines in #perl6 | ||
masak | it *is* Rakudo-strapped. | ||
doesn't compile/run itself yet. | |||
doesn't by quite a bit, akshually. | |||
pmurias | Exodist: re Perl6-Go, perlito has a Go backend | 19:05 | |
diakopter whistles "These Rakudos are made for walkin'" | |||
19:05
jaldhar left
|
|||
masak | diakopter: if Nike makes a shoe named "Rakudo", we're either hosed, or golden. | 19:05 | |
Exodist | pmurias, ah, I was thinking of switching cause C is so stressful. | ||
Go has a lot of things already just done for me. | 19:06 | ||
masak | Exodist: from what I've seen of your commits, your project has more of a bottom-up approach, and Yapsi has more of a top-down approach. | ||
Exodist | masak, yeah, trouth is I am most interested in implementing tha grammar engine. | 19:07 | |
cause it seems fun | |||
masak | Exodist: aye, that's why in my email I linked you to my Perl 6 implementation of a Perl 6 grammar engine. | ||
it *was* quite fun to write. | 19:08 | ||
so far I've given three talks about it. :) | |||
19:08
rokoteko left
|
|||
moritz_ | talk-driven design! | 19:09 | |
masak | moritz_: most of the development took place before the talks, though. :) | 19:10 | |
jnthn was there at The First Talk | |||
masak | between the first and the second talks I finally figgered out how to do backtracking right. | ||
backtracking is clearly the fun part. | |||
jnthn | Actually, I think I've seen all three... | ||
moritz_ | rakudo: use fatal; open('nonexistant') | 19:12 | |
p6eval | rakudo 90637b: OUTPUT«Operation not permitted in safe mode in 'Safe::forbidden' at line 2:/tmp/UWF_orMPCL in main program body at line 22:/tmp/UWF_orMPCL» | ||
moritz_ | works locally | ||
pmurias | sorear: dropping use viv seems to be mostly adding some VAST classes to viv | 19:13 | |
moritz_ | oh, it's always fatal | ||
masak | jnthn: you might be the only one who has been to all three :) | ||
moritz_ thinks masak also has been to all three | 19:14 | ||
masak is not so sure himself | |||
Exodist: anyway, I guess my point is this: if you ever want to discuss the finer points of bootstrapping a Perl 6 implementations, feel free to ping me :) | 19:15 | ||
TimToady_ | .oO(it's not really a "Perl 6 grammar" unless it does transitive LTM...mutter...mutter...grumble) |
||
jnthn | masak: I saw you at all of them. :P | 19:16 | |
Exodist | masak, thanks will do. | ||
masak | jnthn: might've been one of my clones. :P | ||
PerlJam wonders if soon it will be some sort of rite of passage to implement Perl 6 | |||
moritz_ | TimToady_: just because you're the language desiger doesn't mean people listen to you :-) | ||
jnthn | o_O | ||
masak | TimToady_: I still haven't entirely ruled out trying to go against pmichaud++'s recommendation and refactor GGE into an LTM-y engine. | ||
jdv79 | transitive LTM sounds a bit painful | 19:17 | |
Exodist | TimToady_, My goal is for mine to completely meet the spec, I just have to decide to stay in C or switch it to go. | ||
moritz_ | just need to construct a DFA, or something similar | ||
"just" | |||
masak | Exodist: what a coincidence, that's the goal for my implementation as well! o.O | ||
Exodist | wait, whats the diff between ltm and transative ltm? | 19:18 | |
19:18
meppl joined
|
|||
masak | Exodist: ok, so do you know about ltm? | 19:18 | |
Exodist | masak, yes | ||
pugssvn | r32059 | moritz++ | [t/spec] tests for RT #71362, $0, $1 etc. work even for $/ := $something | ||
masak | Exodist: transitive LTM is LTM that doesn't care whether different alternatives are $N levels down in a subrule, as long as they're alternatives in the same alternation. | 19:19 | |
Exodist: rule foo { <bar> | <baz> }; rule bar { a | b | c }; rule baz { d | e }; rule foo has 5 alternatives. | |||
(that example showcases "transitive", but not "LTM") | 19:20 | ||
sorear | niecza: "fooo" ~~ / foo { say "A" } | fo* { say "B" } / | 19:21 | |
p6eval | niecza 4770bf5: OUTPUT«B» | ||
Exodist | ok, Then what I have been thinking hits that case just fine where it takes longest to depth of alternates. | ||
masak | aye. | ||
and it works correctly with backtracking :) | |||
sorear | Exodist: incidentally, I am also working on a p6 implementation that focuses on the grammar engine | 19:22 | |
Exodist | sorear, I am following it on github | ||
though I have not looked at it to depth. | |||
pugssvn | r32060 | moritz++ | [t/spec] test for RT #66694, redefining methods by augmenting stuff | 19:23 | |
masak | "If I didn't believe that, I wouldn't have spent the last decade pouring my heart and soul into it." -- www.perlmonks.org/?node_id=855886 by TimToady_ -- wow, for some reason it was refreshing to read that sentence on PerlMonks. TimToady_++ | ||
moritz_ | rakudo: say 0e999999999999999 | 19:24 | |
p6eval | rakudo 90637b: OUTPUT«NaN» | ||
moritz_ | "huh" | ||
masak | actually, that whole post is rather warm an fuzzy. | ||
s/an/and/ | |||
sorear | It's more accurate than GHC's result | ||
colomon | rakudo: say 0e99999999 | 19:25 | |
moritz_ | sorear: what does GHC return? | ||
p6eval | rakudo 90637b: OUTPUT«NaN» | ||
colomon | rakudo: say 0e99 | ||
p6eval | rakudo 90637b: OUTPUT«0» | ||
moritz_ | oh. It takes longer. Much longer. | ||
colomon | rakudo: say 0e999 | ||
sorear | moritz_: nothing; the parser starts by evaluating 10^999999999999999 as a bignum | ||
p6eval | rakudo 90637b: OUTPUT«NaN» | ||
colomon | yeah, that's it all right. rakudo is evaluating 10^999 before multiplying it by zero. | ||
moritz_ | rakudo: say 0e999999999999999 == 0 | 19:26 | |
colomon | rakudo: say 10 ** 999 | ||
p6eval | rakudo 90637b: OUTPUT«0» | ||
rakudo 90637b: OUTPUT«Inf» | |||
colomon | rakudo: say Inf * 0 | ||
p6eval | rakudo 90637b: OUTPUT«NaN» | ||
pugssvn | r32061 | moritz++ | [t/spec] test for RT #70600, 0e9999999 | 19:27 | |
sorear hacks his copy of STD to increase the error limit from 10 to 10k | 19:29 | ||
[Coke] | TimToady++ | ||
sorear | [Coke]: What did he do this time? | 19:30 | |
[Coke] is merely catching up in backscroll. | |||
... is there anything in here that monitors karma? | |||
masak | sorear: because you really like errors? | 19:31 | |
sorear | buubot: karma TimToady | ||
buubot | sorear: TimToady has karma of 312 | ||
sorear | buubot: karma lwall | ||
buubot | sorear: lwall has karma of 801 | ||
masak | buubot: karma karma | ||
buubot | masak: karma has karma of 4 | ||
masak | buubot: karma 4 | ||
buubot | masak: 4 has karma of -329 | ||
masak | o.O | ||
buubot: karma -329 | |||
buubot | masak: -329 has karma of | ||
tadzik | :D | ||
masak | buubot: karma | 19:32 | |
buubot | masak: has karma of | ||
masak | ok, we've reached Zen. | ||
tadzik | :D | ||
jnthn | buubot: karma dogma | ||
buubot | jnthn: dogma has karma of 1 | ||
masak | dogma++ | ||
masak puts some karma in his dogma | |||
jnthn | EKARMARANOVERDOGMA | ||
[Coke] | <monty python>There is noooooooooooooooooooooooo Perl six</> | ||
masak | [Coke]: was that why you asked whether anything monitors karma? :) | 19:33 | |
[Coke] | masak: ha! no. just wondering if karming people mattered except warmandfuzzily | ||
masak | I get the feeling that keeping count is mostly incidental to the warm and fuzzy part. | 19:35 | |
but I might be wrong. | |||
[particle] puts some llama in his karma | 19:36 | ||
TimToady_ | karming is more important than karma | ||
mathw | Right | ||
I've done aikido, I've had fish and chips, I've drunk a ridiculous amount of water and I'm ready to go | |||
masak cheers mathw on | |||
[particle] | well then, what are you doing here? /kick mathw | 19:37 | |
[Coke] | no programmers were karmed in the release of this software. | ||
tadzik | they must be sad now | ||
masak | sad llama in snow | ||
TimToady_ | First of all, do no karm. --Hoppo Crates | ||
tadzik | sad llama is sad | ||
TimToady_ | *Hippo | ||
masak quickly patents the new llama meme | 19:38 | ||
tadzik | I thought Hoppo is a pun | ||
TimToady_ | Hippo Hoppo Crates is someone else | ||
masak | I thought his name was Groucho Crates. | ||
[particle] | Harpo Crates | ||
masak | Happy Happy Hippo Crates. | ||
tadzik | Crapo Haters | ||
masak | no wait, that's Hungry Hungry Hippo Crates. | ||
mathw | Is anybody aware of any problems with the release? | 19:39 | |
colomon | mathw++ | ||
tadzik | is anyone aware of the release? :) | ||
TimToady_ | is anyone aware at all? | ||
mathw | tadzik: the release hasn't happened yet, I'm about to do it | ||
But now is the time to yell 'stop!!!' | |||
but only if there's a reason | |||
masak | mathw: I saw an odd failure in S03-operators/context.rakudo earlier today when spectesting. | ||
tadzik | stop!... oh, ok | ||
mathw | masak: did you fix it? | 19:40 | |
masak | mathw: of course not. | ||
I promptly forgot about it and moved on with my life. | |||
I'm only remembering it now. | |||
mathw | pfft | ||
useless | |||
TimToady_ | not having released it seems to be the largest problem :) | ||
masak does the sad llama routine | |||
mathw | TimToady_: Well I had to go to aikido, because if the release isn't right I'm going to have to defend myself :) | ||
pmichaud | the context.t failure should be fixed after my delayed push of this morning | ||
19:41
TimToady_ is now known as TimToady
|
|||
sorear | masak: Quite the opposite, the more I see at once the faster I can get rid of them | 19:41 | |
[particle] | is your git constipated? | ||
pmichaud | mathw: if something goes wrong with the release, you're in good company :-) | ||
mathw | pmichaud: :) | ||
pmichaud runs a "make spectest" just to check | 19:42 | ||
mathw | I'm almost kicking off a spectest run here | ||
just waiting for it to build... | |||
masak | fwiw, context.rakudo passes outside of the harness. | ||
mathw | awesome | ||
masak | so probably nothing to worry about. | ||
19:42
py[tab] left
|
|||
pmichaud | (transitive ltm) -- fwiw, nqp-rx does manage to do transitive ltm in some cases :) | 19:42 | |
it just doesn't manage it in all of them yet. | 19:43 | ||
mathw does "make spectest" | |||
masak | if it doesn't do all of them, it's Not A Real Perl 6 Grammar Engine. | ||
pmichaud | I don't know that any implementation is truly a Real Perl 6 Grammar Engine yet :-) | ||
mathw | Isn't that why it's called Not Quite Perl? | ||
masak | that is correct. | ||
no wonder people complain about Perl 6 not being finished yet. | 19:44 | ||
mathw | lol | ||
pmichaud | heh | ||
mathw | oh so we should've called it Bucket then? | ||
masak | because it's... round? | ||
pmichaud | so, while yapsi claims "complete and official", nqp explicitly claims "not quite" and "not official" | ||
mathw | Everybody say 'boo' for pmichaud's naming | ||
1/22 failed in S02-literals/numeric.t | 19:45 | ||
masak | pmichaud: "not quite not official" | ||
pmichaud | yes, I get a numeric.t failure also | 19:46 | |
19:46
x3nU left
|
|||
pmichaud | that feels new | 19:46 | |
mathw | good thing it's not just me | ||
19:46
azert0x left
|
|||
pmichaud investigates. | 19:46 | ||
mathw watches for other ones | |||
pmichaud | I think it's a new test that was added that needs fudging. | ||
mathw | this is the problem with me doing the release, I have to get other people to fix things :) | ||
pmichaud | aha | 19:47 | |
#?todo 'RT 70600' | |||
fudge fail | |||
colomon | yup, needs fudge | ||
mathw | OOI, what's the correct way to fudge | ||
pmichaud | should be #?rakudo todo 'RT 70600' | 19:48 | |
pugssvn | r32062 | pmichaud++ | [t/spec]: Fix fudge in S02-literals/numeric.t | ||
mathw | aaah | ||
pmichaud | to distinguish it from all of the other Perl 6 implementations, where it works already :-) | 19:49 | |
mathw | I knew fudging was implementation-specific, honest | ||
PerlJam | mathw: the correct way to fudge is to get other people to do it :) | ||
mathw | rofl | 19:50 | |
is 'get pmichaud to do it' the answer to everything tonight? :) | |||
pmichaud | fwiw, "release manager" and "delegation" go well together | ||
i.e., the release manager doesn't have to do all of the work; just needs to make sure the release goes out (correctly) | |||
mathw | :) | ||
I can do that | |||
been doing a bit of this sort of thing at work lately too | |||
but people keep changing the spec underneath me there :( | 19:51 | ||
pmichaud | ...releases? | ||
mathw: I know the feeling well. | |||
(changing spec :-) | |||
mathw | yeah, a bit of coordinating everything into a point where we can release it to the QA team or to internal customers or something | ||
which is great, it's like "hey, why did you put this in what doesn't work? Fix it!" | 19:52 | ||
mathw likes svn blame | |||
not seen any more failures yet | 19:53 | ||
forgot how big the spectest is | |||
probably a lot bigger than it was last time I did one though | |||
19:55
shade_ joined,
prz joined
|
|||
mathw | S05-modifier/ignorecase.rakudo dubious, test returned 1 | 19:58 | |
tadzik | running various Perl 6 snippets of mine shows that today's Rakudo is from 2 to 20 times faster than 2010.06 | ||
pmichaud | \o/ | ||
mathw | well the ChangeLog mentions integer performance improvements | ||
that is very awesome | |||
pmichaud | I knew those delay loops I snuck into the 2010.06 release would prove helpful. :-P | 19:59 | |
tadzik | almost everything's 2 times faster, 20 times faster is the code adding integers in a loop :P | ||
which is colomon++ and pmichaud++ | |||
19:59
x3nU joined
|
|||
colomon | final improvement is mostly pmichaud++'s. | 19:59 | |
oh, and he is particularly responsible for the fact that they're not just integer improvements, any Range iteration should be faster now. | 20:00 | ||
mathw | eeww | 20:02 | |
I smell :( | |||
straight in the bath after the release is done I think! | |||
20:03
Tene joined
|
|||
PerlJam | mathw: sounds like you have good timing. aikido, release, bath. sounds cathartic. | 20:04 | |
mathw | yeah | ||
aikido, bath is good enough | |||
a rakudo release as well is almost unbearable | |||
:) | |||
pmichaud | only spectest failure I had was numeric.t, which is now working. | 20:05 | |
mathw | good | ||
moritz_ | yeah, I messed up the fudging | ||
mathw | I'm in S32 tests at the moment | ||
so we're looking good if nothing goes wrong here? | 20:06 | ||
moritz_ | sorry about that | ||
mathw | I love how many trig tests there are | ||
tadzik | hmm. Is it possible that a module was working well a month ago and it is not passing tests now? | ||
mathw | yes | ||
20:06
azert0x joined
|
|||
moritz_ | tadzik: yes | 20:07 | |
ash_ | i blame colomon++ for all the trig work, i am sure there are others i am missing though | ||
mathw | things do change | ||
tadzik | I'm talking about Config::INI, it stopped parsing stuff. Is that expected/normal? | ||
mathw | modules are quite susceptible to breaking iwth changes in Rakudo | ||
moritz_ | tadzik: have you removed all stray .pir files? | ||
pmichaud | depends on whether it was relying on any bugs that are now fixed :-) | ||
tadzik | moritz_: will check once again | ||
moritz_ | at least that's the most common reason for my modules to fail | 20:08 | |
mathw | yup | ||
same here | |||
tadzik | nah, this is something else | ||
and I remember it failing when I WAS SMOKE TESTING PERL6 MODULES :) | 20:09 | ||
(in case you didn't know/remember yet :)) | |||
maybe it's time for a new test though | 20:10 | ||
before Star | |||
20:11
rjbs joined
|
|||
rjbs | There's a question that's been nagging me for months, and I finally am going to just ask! | 20:11 | |
20:12
sjohnson joined
|
|||
[particle] | (false laziness)-- | 20:12 | |
rjbs | The confusion of {hash} and {sub} is such a huge pain in Perl 5. I know that it's slightly less of a pain in Perl 6, but I wonder why it wasn't solved more thoroughly. | ||
mathw | right | ||
[particle] | {} always means closure in perl 6 | ||
mathw | everybody happy with the release being cut now? | 20:13 | |
tadzik | yes! | ||
masak | mathw: \o/ | ||
moritz_ | but sometimes it's run immediatly | ||
mathw: +1 | |||
pmichaud | [particle]: my $x = {}; | ||
mathw | right then | ||
moritz_ | rjbs: I guess it has to do with not having enough bracing characters | ||
rjbs | This first started to bug me when I read the Perl 6 cheat sheet, which shows %hash{'a'} | ||
masak | pmichaud: I think what [particle] meant was what the spec says: that {} always means closure. | ||
jnthn | rakudo: my $x = {}; say $x.WHAT; | ||
p6eval | rakudo 90637b: OUTPUT«Hash()» | ||
masak | pmichaud: some of them might evaporate into hashes, though. | 20:14 | |
pmichaud | well, the spec is misleading then. :-) | ||
masak | not really. | ||
pmichaud | or at least quoting that part of the spec is misleading :) | ||
masak | a hash is just a "special case" of a closure :) | ||
x3nU | moritz_: using some strange unicode characters as bracklets would be a "good" idea ;d | ||
masak | not a subclass, but a special case. | ||
rjbs | moritz_: I thought about that, but there seem to be some bracing characters that could have been put to use for hash/closure as opposed to (say) qw. | ||
16:14 <masak> a hash is just a "special case" of a closure :) | |||
pmichaud | my $x = {}.(); | ||
rjbs | ^ Intuition Fail! | ||
mathw | testing the tarball | ||
rjbs | mathw: Good luck! | ||
pmichaud | rakudo: my $x = {}.(); | ||
p6eval | rakudo 90637b: OUTPUT«invoke() not implemented in class '' in main program body at line 22:/tmp/5AP2C7WAiF» | 20:15 | |
pmichaud | {} is always a closure.... except when it's not. :-) | ||
rjbs | Right, and that has been such a source of irritation in Perl 5! Is it just a "well, we want to stay Perlish"? | ||
masak | rjbs: you may or may not have read use.perl.org/~masak/journal/40431 , where I talk a bit about this. | ||
rjbs | Quite possible! | 20:16 | |
pmichaud | rjbs: I think it's a desire to retain the notion of "anonymous hash" | ||
masak | rjbs: sumamry of that post: the fact that {} was used for both used to bother me in Perl 6, but nowadays I find the rules simple enough to follow, and it bothers me very little. | ||
rjbs | You know, I think I did read that, and I felt unsatisfied. :) | ||
masak | good to know :) | ||
sorear | I for one would not be opposed to a :{} for hashes, {} for closures thing | ||
mathw | it would be nice if there was another set of brackets on the keyboard for that | ||
but it doesn't really bother me at all for some reason | 20:17 | ||
moritz_ | rjbs: I agree the that it's still confusing; however one thing has drastically improved, and that is that you never get a syntax error from soemthing that starts to be parsed as a hash, and then turns out to be a closure | ||
rjbs | pmichaud: Right -- but I wondered why that wasn't (say) < ... > | ||
I do agree that it's a huge improvement. | |||
pmichaud | well, < ... > has a more useful meaning, I think. | ||
I wonder if %{ ... } would work for an anonymous hash :-) | 20:18 | ||
PerlJam | not using {} for hash constructionwould have just pushed things too far away from their perl-nature ;) | ||
moritz_ | there's also hash { ... } | ||
just like sub { ... } | |||
sorear | pmichaud: +1 | ||
pmichaud | one could get away with %( ... ) for building an anonymous hash, but then it's not itemized | ||
hash { ... } fails, I think. | |||
at least it fails if you're expecting { ... } to be a closure | 20:19 | ||
masak | right, it's 'hash ...'. | ||
moritz_ | huh? | ||
ash_ | rakudo: my $a = {; }; say $a.WHAT; | ||
p6eval | rakudo 90637b: OUTPUT«Block()» | ||
pmichaud | moritz_: 'hash' is just a listop | 20:20 | |
pugssvn | r32063 | moritz++ | [t/spec] RT #75768, indexing a series with a series. Makes colomon++ unspeakably happy | ||
pmichaud | it doesn't impose any special interpretation on curlied arguments | ||
rjbs | If I want a closure that returns a pair, I need to say something like: {; 1 => 2 } ? | 20:21 | |
(or add a return, or whatever) | |||
sorear | Yes | ||
ingy | greetings from boston | ||
colomon | \o/ | ||
mathw | oh hai ingy | ||
ash_ | rakudo: say ({; a => 2 })().WHAT; | ||
mathw | you're just in time for the release | ||
p6eval | rakudo 90637b: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» | ||
pmichaud | rakudo: say { 1=>2; }.WHAT | ||
p6eval | rakudo 90637b: OUTPUT«Hash()» | ||
ingy | oh yeah? | ||
pmichaud | hmmmm | 20:22 | |
ingy | * release or what? | ||
pmichaud | I suspect that ought to be a closure. | ||
sorear | +1 in favor of %(), btw | ||
pmichaud | sorear: what about the flattening behavior? | ||
rjbs | See! Aren't you glad I came to whine :) | ||
masak | we're always glad when people come to whine. | ||
that means they care. | |||
moritz_ | rjbs: yes; it's always good to ask questions | ||
pmichaud | people are whining and dining us all the time :-) | ||
ash_ | rakudo: say ({; 1=>2; }).WHAT, ' ', ({ 1=>2; }).WHAT | 20:23 | |
p6eval | rakudo 90637b: OUTPUT«Block() Hash()» | ||
moritz_ | well, there's productive whining, and annoying whining | ||
mathw | THE TARBALL IS UP! | ||
sorear | pmichaud: the only case I've seen where flattening of hashes is an issue is in Array.push, which IMO should be changed to take a (non flattening) parcel now that you can say push: |@list | ||
pmichaud | sorear: my @a = { 1 => 2 }; my @b = %( 1 => 2); | 20:24 | |
masak | mathw++ | ||
sorear | Why are you assigning hashes to arrays in the first place? | ||
20:24
djburiedalive joined
|
|||
masak | moritz_: just as there's productive dining, and annoying dining :P | 20:24 | |
pmichaud | I might want an array to contain a hashref | ||
the first gives @a[0] a hash. The second gives @a[0] a Pair. | 20:25 | ||
mathw | I think I sent it from the right email address, so hopefully the announcement won't bounce off perl6-compiler | ||
20:25
djburiedalive left
|
|||
pugssvn | r32064 | moritz++ | [t/spec] test for RT #74530, hyper ops and ranges should mix | 20:25 | |
ash_ | rakudo: ({; a => 1 })().WHAT.say # is a block that returns a pair | ||
p6eval | rakudo 90637b: OUTPUT«Pair()» | ||
moritz_ | any volunteers for next month's release? | ||
mathw++ can tell you how easy it is :-) | 20:26 | ||
pmichaud | rjbs: fwiw, you can always explicitly signify a block with -> | ||
mathw | hee | ||
that wasn't too bad | |||
pmichaud | rakudo: say (-> { a => 1 }).WHAT | ||
p6eval | rakudo 90637b: OUTPUT«Block()» | ||
rjbs | pmichaud: {; works just as well, doesn't it? | ||
pmichaud | rjbs: sure. | ||
mathw | just kind of nervous | ||
rjbs | It's what I use in P5 and is shorter! :) | ||
mathw | glad the procedure's all sorted out | ||
ash_ | pointy blocks let you have arguments though | ||
pmichaud | well, non-pointies allow that too :-) | 20:27 | |
ash_ | rakudo: my $a = -> Int $foo { say 'int'; }; $a(1); $a('foo'); # but not type checking | ||
p6eval | rakudo 90637b: OUTPUT«intNominal type check failed for parameter '$foo'; expected Int but got Str instead in <anon> at line 2:/tmp/ZxUDeUZ__i in main program body at line 22:/tmp/ZxUDeUZ__i» | ||
ash_ | well, you could do your type checking in the block i guess | 20:28 | |
but thats no fun | |||
pmichaud | right, that would be +Ofun I guess. | ||
ash_ | is there a way for making an anonymous multi? | ||
moritz_ | rakudo: use Test | ||
p6eval | rakudo 90637b: ( no output ) | ||
masak | rakudo: { die "AAARH!" unless $^a ~~ Str; say $^a }.($_) for "OH LOL", 42 | 20:29 | |
moritz_ | ash_: how would you add candidates? | ||
p6eval | rakudo 90637b: OUTPUT«OH LOLAAARH! in <anon> at line 22:/tmp/jdqlXX4ya4 in main program body at line 22:/tmp/jdqlXX4ya4» | ||
ash_ | like, anon multi sub Int $a { }, sub Str $a { }; | ||
moritz_: *scratches head* beats me | |||
jnthn | No, though folks ask now and then | ||
masak | anonymous multies? that's crazy talk. | ||
mathw | oh by the way | ||
moritz_ | with cheating, you can do do { multi a() { ... }; multi a($x) { .. }; &a } | 20:30 | |
jnthn | But since they're lexical, you could easily make a sub that constructs and returns anon multis. | ||
mathw | oh ignore me, I just answered my own question | ||
jnthn | Or that. | ||
:-) | |||
moritz_ | or | ||
mathw | I'm goin gto have some cider instead | ||
masak | maybe create an anon proto, and add variants to it through some method on the routine? | ||
colomon | cider++ | ||
moritz_ | my $x = anon multi foo() { }; $x.push(anon multi foo($x) { ... }) | ||
or was it .candidates.push? not sure | |||
but we have a method API | 20:31 | ||
mathw: I've received your p6c mail, so no problem here | |||
jnthn | Cider. It's like apple beer. | ||
mathw | moritz_: awesome | ||
all done then | |||
moritz_ -> bed | |||
ash_ | multi sub (Int $a) { ... } and sub (Str $a) { ... }; | ||
jnthn | moritz_: Something like that. But if we give people a way to modify the candidate list dynamically, they'll get a surprised when discovering that the optimizer did stuff 'cus it didn't know about their added candidates. | 20:32 | |
20:32
javs left
|
|||
jnthn | Or put another way, we probably only want to allow it with a pragma. | 20:32 | |
tylercurtis | jnthn: perhaps a trait? | ||
ash_ | my $foo = multi sub (Int $a) { ... } and sub (Str $a) { ... }; $foo(1); $foo('a'); | ||
jnthn | tylercurtis: Well, pragma would be anal. to MONKEY_TYPING | 20:33 | |
masak | jnthn: please don't abbreviate 'analogous' that way. :/ | ||
ash_ | std: my $foo = multi sub (Int $a) { ~$a } and sub (Str $a) { +$a }; $foo(1); $foo('a'); | ||
p6eval | std 32064: OUTPUT«ok 00:01 121m» | ||
mathw | yes | ||
please | |||
jnthn | masak: I couldn't remember if it was an "o" or an "a" after the l :P | 20:34 | |
I concede a spelling mistake woulda been better... :-) | |||
masak | jnthn: either one is better. | ||
jnthn: mnemonic: analog clocks | |||
jnthn | :P | 20:35 | |
tylercurtis | jnthn: yes, but I think you're more likely to just want to pessimize one multi than all multis in a scope. | ||
ash_ | multi sub (Int $a) { ~$a } and sub (Str $a) { +$a } and sub ($a) { 'others' }; | ||
jnthn | tylercurtis: Yeah, true. | ||
OTOH, you often only want to monkey with a couple of types too... | 20:36 | ||
ash_: Did you steal that from ML? :-) | |||
masak | ash_: not sure infix:<and> should be mis-used in that way... outside of a pragma. | ||
ash_ | no, i don't know ml | ||
jnthn | ash_: ah, it uses something like it for | ||
grr | |||
ash_ | masak: i know, i was just looking for an infix:<op> that made sense and passed std :P | ||
jnthn | *for mutually recursive functions | ||
masak | ash_: infix:<|> feels less wrong to me than infix:<and>. | 20:37 | |
still wouldn't want that functionalirt in core Perl 6, though. | |||
tylercurtis | With MONKEY_TYPING, you still have to specify when a class declaration is supposed to be monkeying around with augment or supersede. | ||
jnthn | True | ||
pmichaud | my $foo = Multi.new( sub (Int $a) { ... }, sub (Str $b) { ... }) | ||
masak | ash_: you can already do infix:<|> on routine signatures. | ||
jnthn | oh | ||
That's not bad | 20:38 | ||
Then we could declare tha Multi is immutable once created. | |||
masak | pmichaud++ | ||
ash_ | don't take my suggestion to seriously, i was more toying with std | ||
jnthn | And be happy | ||
masak | std: multi sub foo (Str $a, Int $b) | (Int $a, Str $b) { ... } | ||
pmichaud | or that one can create new multis from existing ones | ||
p6eval | std 32064: OUTPUT«Potential difficulties: $b is declared but not used at /tmp/wBnnRpbog0 line 1:------> multi sub foo (Str $a, Int ⏏$b) | (Int $a, Str $b) { ... } $a is declared but not used at /tmp/wBnnRpbog0 line 1:------> multi sub foo (Str ⏏$a, Int $b) | | ||
..(… | |||
masak | hrm. | ||
std: multi sub foo (Str $a, Int $b) | (Int $a, Str $b) { say $a, $b; } | |||
pmichaud | i.e., Multi.new could know what to do with other Multis as arguments | ||
p6eval | std 32064: OUTPUT«ok 00:01 122m» | ||
ash_ | std: multi sub (Str $a, Int $b) | (Int $a, Str $b) { say $a, $b; } | 20:39 | |
p6eval | std 32064: OUTPUT«ok 00:01 121m» | ||
ash_ | thats kinda weird though, since there is only one { } block | ||
std: multi sub foo (Str $a, Int $b) { say $a, $b; } | (Int $a, Str $b) { say $a, $b; } | |||
p6eval | std 32064: OUTPUT«===SORRY!===Two terms in a row at /tmp/_k2EOa2puT line 1:------> Str $a, Int $b) { say $a, $b; } | (Int ⏏$a, Str $b) { say $a, $b; } expecting any of: bracketed infix infix or meta-infix statement modifier loopParse | ||
..failedFAILED 00:0… | |||
ash_ | i think Multi.new is the current logical solution, :P | 20:40 | |
masak | +1 | 20:41 | |
jnthn | +2 | ||
ash_ | anyway, back to hacking on the try.rakudo.org backend | ||
jnthn | \o/ | ||
masak | ash_++ | ||
tadzik | ash_++ | ||
ash_ | its a lot hard to manage multiple processes with a single daemon than i originally thought... | 20:42 | |
tadzik | ash_: did you thought about keeping a pipe to a REPL instead of writing to a file and executing it? | 20:43 | |
mathw | process management is horrible | ||
pmichaud | gist.github.com/538865 # jnthn, any ideas about how to make this (abridged) codepath faster? | 20:44 | |
ash_ | tadzik: ya, thats the only way to do it properly, i have a POE server that spawns sub processes now, each new connection to the server makes a new subprocess that lasts as long as the session, once the session dies the sub process is killed | ||
its about 80% done, then i need to test it | |||
tadzik | awesome! | ||
pmichaud | essentially, that's the code generated for token ws { <?MARKED('ws')> } | 20:45 | |
jnthn | pmichaud: Looking. | ||
pmichaud | (I took it from the original "token ws" rule and cut out the parts that aren't on the <?MARKED...> codepath | 20:46 | |
and of course, by 'faster' I mean 'significantly faster' | |||
sorear | What does <? do? | 20:47 | |
pmichaud | zero-width positive assertion | ||
invokes the subrule, and passes if the subrule passes | |||
sorear | oh, right, d'oh | ||
pmichaud | (but doesn't consume any characters) | ||
and actually, the code that normally gets executed is only down to the 'debug_401:' label | 20:49 | ||
i.e., we never reach anything after the first .return (rx70_cur) | |||
jnthn | pmichaud: Remind me what the four things taht cursor_start returns are? | ||
pmichaud | a new cursor | 20:50 | |
the current position | |||
the target string | |||
I forget what $I10 is -- probably "are we scanning or anchored" or something like that | |||
jnthn | unused here anyway I guess | ||
pmichaud | right | ||
I might be able to move/postpone the target string setup that takes place at substr rx70_tgt, rx70_tgt, rx70_off | 20:52 | ||
but I can't see that having a significant impact on execution time. | |||
oh yes, $I10 is whether we're invoking the rule for the first time or whether we're backtracking into the rule (which we never do in this case) | |||
masak | mathw++ # release announcement on p6c! | ||
pmichaud | mathw++ # excellent -- nice and quick! | ||
20:53
perlygatekeeper1 joined
|
|||
mathw | I still haven't got it :( | 20:53 | |
jnthn | pmichaud: What came of the proposal to have the string equal at... op? | ||
mathw | but now it's time for my bath | ||
jnthn | That'd avoid a string header... | ||
mathw | goodnight all | ||
thanks for the support and assistance | |||
PerlJam | mathw++ | 20:54 | |
jnthn | mathw++ # thanks for doing the release | ||
pmichaud | jnthn: I tried it in a branch, and it resulted in a <0.1% improvement | ||
jnthn | Wow. | ||
mathw | oh and looking at my schedule... I can do next month as well | ||
pmichaud | it's possible I got that part wrong. | ||
jnthn | That...surprises me a little. | ||
But OK. | |||
pmichaud | it surprised me a lot | ||
here's what I'm looking at for this particular case | |||
jnthn | pmichaud: I mean, every run through we're doing ~ 3 method calls. | ||
pmichaud | when I run the parser on NQP/Actions.pm | ||
I get timings that look like | 20:55 | ||
sorear | I'd be very suspicious of that small a result | ||
20:55
perlygatekeeper left
|
|||
sorear | Wait | 20:55 | |
Was substr_eq_at provided in _s_sc_i or only _s_s_i? | |||
jnthn | I figure that !cursor_start, !cursor_pass, !cursor_pos and MARKED don't go making other pricey calls? | ||
pmichaud | jnthn: I've tried to make them as efficient as I could, yes. | ||
jnthn | sorear: It'd generate the SC version unless they went to effort to make it not do so | ||
pmichaud | sorear: I'm suspicious also. | ||
it was _s_sc_i | 20:56 | ||
anyway | |||
I get | |||
ws : 6700 1.4943 6700 1.4943 0 0.0000 | |||
jnthn | pmichaud: Yeah. I mean, without making all the primitives here cheaper, or inlining, it's hard to see what to do. | ||
pmichaud | which tells me that 6700 calls to ws took 1.4943 seconds | ||
jnthn | Ouch | ||
That feels...more than it should be. | |||
pmichaud | that includes the cost of debugging and tracing | ||
jnthn | ah, OK | ||
pmichaud | but relatively speaking, that should be constant | ||
jnthn | What % overhead did we get from debugging/tracing, ooc? | 20:57 | |
pmichaud | more to the point, those 6700 calls to ws took more time than anything else | ||
jnthn | More than any other rule? | ||
pmichaud | yes.... but now I see the problem. | ||
jnthn | Because of the call volume? | ||
pmichaud | the debugging/tracing is likely swamping the noise | ||
right, because of the call volume | |||
jnthn | Or even when you factor it out? | ||
OK | |||
pmichaud | I don't know how to factor it out. | ||
jnthn | Well, I mean | ||
If you divide the number of calls into the time we spend in ws | 20:58 | ||
tadzik | will there be anyting on p6u and rakudo.org? | ||
jnthn | Is it a relatively expensive rule | ||
dalek | ecza: b284300 | sorear++ | / (2 files): Add an option to generate self-contained executables |
||
jnthn | Or is it just pure volume? | ||
pmichaud | I'm guessing here it may be just pure volume | ||
jnthn | OK | ||
20:58
ash_ left,
wamba left
|
|||
jnthn | I mean, we know that method lookup and attribute lookup are going to get cheaper. | 20:59 | |
pmichaud | if I do the division, I get 0.000222 second per call | ||
jnthn | But that's probably not until October. | ||
pmichaud | (that's including tracing overhead) | ||
jnthn gets curious how MARKED works | |||
pmichaud | it just looks up values in a hash and returns true/false | ||
[particle] wonders what the tracing overhead is | |||
pmichaud | but more to the point, I can look at the trace output itself and determine that 0.000076 seconds for this code path is in ws itself, and not in Marked | 21:00 | |
21:00
prz left,
ash_ joined
|
|||
pmichaud | or, put another way, by looking at the trace output, I can see that this code path takes 0.000109 seconds | 21:00 | |
jnthn | Ah, OK | ||
MARKED unconditionally calls debug, fwiw | |||
(!cursor_debug) | |||
Rather than checking if it should. | 21:01 | ||
pmichaud | ah, you're correct. | ||
21:01
whiteknight joined
|
|||
pmichaud | anyway, that's unchanged in this thought experiment :-) | 21:01 | |
21:01
perlygatekeeper1 left
|
|||
pmichaud | anyway, this code path takes 0.000109 seconds | 21:01 | |
this is the *optimal* code path -- i.e., we call the <.ws> rule and immediately discover that we're at the end of a <ws> sequence and don't need to check further | 21:02 | ||
21:02
Guest23195 left
|
|||
jnthn | pmichaud: Also in MARKED and MARKER you might save some runloop overhead using the vivify op | 21:02 | |
or fetch | |||
Whichever one it was | |||
For the global %!MARKED | |||
er | 21:03 | ||
%!MARKHASH | |||
pmichaud: Could that become an attribute in the future? | |||
pmichaud | sure, or a dynlex | ||
more likely a dynlex, it's per-compilation-unit. | |||
jnthn | attributes we're going to be able to lookup by index, I expect | ||
pmichaud | STD has it as a dynamic var. | ||
jnthn | dynlexes are EWW for performance 'cus you have to go chasing down the lexpads for 'em. | ||
pmichaud | so we're a little constrained. | ||
jnthn | That doesn't make it a good idea. | 21:04 | |
pmichaud | I might be able to optimize it into an attribute, yes. | ||
jnthn | Is the rest of ws maybe the more expensive bit? | ||
pmichaud | no, I can time the execution of *this* codepath. | ||
jnthn | $P1 = self.'pos'() # where's this defined, oc? | 21:05 | |
*ooc | |||
pmichaud | 'pos' is a method on the cursor object. | ||
you're straying from my question, though. | |||
jnthn | pmichaud: aye, I'm just trying to grok the bigger picture here | 21:06 | |
21:07
justatheory joined
|
|||
pmichaud | what I'm seeing is that exclusive of the calls to MARKER, this codepath requires 0.000072 seconds per execution | 21:08 | |
jnthn | rakudo: say 0.000072 / 0.000109 | ||
p6eval | rakudo 90637b: OUTPUT«0.660550458715596» | ||
pmichaud | more to the point: | 21:09 | |
jnthn | So we spend 66% of our time in the stuff other than int he call to MARKED? | ||
pmichaud | rakudo: 0.000072 * 6700 | ||
p6eval | rakudo 90637b: ( no output ) | ||
pmichaud | rakudo: say 0.000072 * 6700 | ||
p6eval | rakudo 90637b: OUTPUT«0.4824» | ||
pmichaud | that's debug-inclusive time, of course, but more to the point, the overall (debug) time needed to process the file was 10.5 seconds | 21:10 | |
so fully 0.5 seconds (5%) of the time was spent in this codepath | |||
(I'm rounding a bit there) | 21:11 | ||
rakudo: say 0.4824 / 10.6 | |||
p6eval | rakudo 90637b: OUTPUT«0.0455094339622642» | ||
pmichaud | 4.5% | ||
in this codepath, *exclusive* of the call to MARKED | |||
the calls to MARKED added another 0.24 seconds on top of this | 21:12 | ||
21:12
ash_ left
|
|||
pmichaud | 20:59 * [particle] wonders what the tracing overhead is | 21:12 | |
jnthn | pmichaud: substr rx70_tgt, rx70_tgt, rx70_off # we don't seem to use this in the code MARKED code path? | ||
pmichaud | jnthn: right -- as I said, I could potentially delay that | ||
i.e., to do that only when we're about to do an operation that requires inspecting the target | 21:13 | ||
(i.e., when we don't follow this codebath) | |||
*codepath | |||
I'm just thinking that can't be a significant part of the overhead. | |||
jnthn | I can't imagine asking for a string's length is expensive either, though. | ||
pmichaud | yes, that should be almost instantaneous, since we keep the length around | 21:14 | |
jnthn | Right. | ||
And the rest is just integer comparrisions and branches, which should also be almost instantaneous. | |||
Well, and assings and so on, but still, all just integer arithmetic | |||
*assigns | |||
pmichaud | okay | ||
I think that answers my questions a bit (more) | 21:15 | ||
21:15
ruoso left
|
|||
pmichaud | I'll go back and double-check the remaining methods that we call to see if they're slowing things down | 21:15 | |
but unless there's something there that's unnecessarily slow, it looks like the bulk of the time is method call overhead, and the only real option for improving this is to avoid method calls as much as possible (even if it violates encapsulation) | 21:16 | ||
...or wait for method call times to improve :) | 21:17 | ||
here's an example trace: | |||
1282248378.766728 19/0 START ws | 21:18 | ||
1282248378.766764 19/0 START MARKED name=ws | |||
1282248378.766801 19/0 PASS MARKED | |||
1282248378.766837 19/0 PASS ws at pos=19 | |||
jnthn | pmichaud: Thing is, every time we do !cursor_start, we do $P0 = lang.'HOW'() which in turn goes and does a hash lookup | ||
sorear has a 389K Hello.exe which runs in 1.56 seconds, does anyone care? | |||
pmichaud | sorear: sounds about as fast as rakudo! :-) | ||
jnthn | pmichaud: That's going to end up being a dynop that does a pointer follow and an index and is done. | 21:19 | |
pmichaud | jnthn: ultimately, that's probably going to end up having to be self.'new'() though | ||
jnthn | pmichaud: That's just one place where we're paying for P6object layering on Parrot's object model today rather than being "natively" implemented. | ||
pmichaud | or something .'new'() | ||
sorear | pmichaud: but rakudo doesn't have a --gen-app Hello.exe option. :) | ||
jnthn | pmichaud: Ultimately you won't want it written in PIR. | ||
pmichaud: Because hard-coded integer v-table offsets will be a nightmare headache. ;-) | 21:20 | ||
[particle] | all it does is say "hello, world!", but you can change the grammar at runtime. | ||
:) | |||
pmichaud | jnthn: well, sure. My point is that Cursor creation is going to need to go through the standard build sequence. | ||
jdv79 | i thought the reason to use parrot's implementation was to make it more inter-language friendly, no? | ||
jnthn | pmichaud: Oh, I totally agree. | ||
pmichaud | if that's faster, then \o/ | ||
jnthn | pmichaud: The point is I think that sequence can be fast. | ||
pmichaud | I very much look forward to it :) | ||
jnthn | Anyway, I think we're drowning in overhead there rather than doing anything inherently inefficeint. | 21:21 | |
Having a JIT to churn through those integer ops would be wonderful too of course. | |||
But I suspect the real overhead is in dispatch-y stuff. | 21:22 | ||
pmichaud | any suggestions how I could improve the lang.'HOW'() create-an-object part? | ||
i.e., would it be a Win to avoid that call altogether somehow? | |||
jnthn | Don't think we have a way without breaking encapsulation of P6object right now. | ||
Well, wait | |||
pmichaud | I don't mind if we break P6object encapsulation, if it's a big enough Win. | 21:23 | |
jnthn | $P0 = lang.'HOW'() | ||
parrotclass = getattribute $P0, 'parrotclass' | |||
cur = new parrotclass | |||
Oh...grr...no | |||
hnag on, let me check something | |||
masak | hey, it never struck me before: DESTROYALL submethods will usually be called with little or no memory left. | 21:24 | |
pmichaud | .sub 'HOW' :method :nsentry $P0 = typeof self $P1 = getprop 'metaclass', $P0 .return ($P1) | ||
masak | (from a discussion on #parrot) | ||
pmichaud | .end | ||
looks like .'HOW' is fairly efficient already. | |||
jnthn | pmichaud: It is, it's just the overhead of having to do a method call. | 21:25 | |
pmichaud: And a hash lookup | |||
pmichaud | maybe worth inlining here, since !cursor_start gets called An Awful Lot? | ||
jnthn | pmichaud: Rahter than having it a pointer or so away | ||
pmichaud: Well, it'd save a method call and thus a Context PMC for every time we call !cursor_start | |||
pmichaud | okay. | 21:26 | |
I'll look into that also. | |||
jnthn | pmichaud: Though this will end up as a dynop "get_how" or some such. | ||
pmichaud | At the moment I'm surprised at how much method call overhead seems to dominate parsing. | ||
[particle] | jnthn, pmichaud: is there a timeline on when a new parrot mop might be done? one of the cardinal folks is wondering, since the object model is where they're hung up | ||
pmichaud | I would've expected the parsing itself to be more costly. | ||
jnthn | Just about all the calls we ever make are on the invocant though? | ||
pmichaud | I don't understand the question. | 21:27 | |
[particle] | they can't subclass parrot;Class | ||
pmichaud | [particle]: oct/nov, I think. | ||
jnthn | [particle]: Aiming for Oct. | ||
pmichaud | jnthn: if you're asking if most of the calls are on self, then no. | ||
jnthn | pmichaud: Oh? | 21:28 | |
pmichaud | most of them are on the cursor object returned by !cursor_start | ||
jnthn | pmichaud: How much can we statically know about the type of that? | ||
pmichaud | very little. | ||
jnthn | oh damm. :-( | ||
That sucks. | |||
pmichaud | in general we can probably assume that it's the same type as self, though. | ||
jnthn | Yeah, but it's knowing when we can't... | 21:29 | |
treed | also, jnthn I am here too | ||
er, [particle] | |||
pmichaud | cursor_start expects to return the same type of cursor as the invocant | ||
and only does otherwise if :lang is specified | |||
and since we know that :lang isn't being specified here, we could assume 'self' | |||
[particle] | oh, look at that :) | ||
jnthn | Aha | ||
treed | (and highlighted on "cardinal") | 21:30 | |
jnthn | pmichaud: OK. The short story is, the more we know about the type of the thing we're calling on, the more likely we can dispatch it by v-table lookup. | ||
pmichaud | jnthn: got it. | ||
jnthn | pmichaud: That is, the model I'm designing actually takes gradual typing seriously. | ||
tadzik | treed: you are the Ruby on Parrot guy? | ||
treed | More or less. | ||
jnthn | pmichaud: And deeply. | ||
pmichaud: Same for representation polymorphism. | |||
treed | I haven't done much lately, due to being blocked on the object model. | ||
Tene | tadzik: He's the last guy to work on it. Before him, it was me. | ||
treed | There are some others who've worked on it too. | 21:31 | |
tadzik | I see. Anything new in it? It didn't work last time I took a look | ||
jnthn | treed: I'm very hopeful that what I'm working on will give you the flexibility to implement the model you need. | 21:32 | |
treed: In a sense, if it doesn't, I've got it wrong. | |||
treed | Heh. | ||
jnthn | *I'll have got it... | ||
21:32
patrickas joined
|
|||
treed | If you want to chat sometime about how the Ruby object model works, let me know. | 21:32 | |
pmichaud | jnthn: thanks for the review -- it helps a ton. | ||
jnthn | Yes, that would be helpful. | ||
pmichaud: Really? I didn't feel so helpful. :-) | |||
pmichaud: Or at least, didn't have a good "this is how" answer. :-) | |||
pmichaud | I was more looking for confirmation that I wasn't overlooking an obvious expensive step. | 21:33 | |
21:33
drbean joined
|
|||
jnthn | pmichaud: cursor_start does a lot of shuffling stuff around that is just more pricey than it really should be ATM. | 21:33 | |
pmichaud: It's not that it's badly written so far as I can tell. | 21:34 | ||
pmichaud | well, it's just binding attributes for the most part. | ||
jnthn | pmichaud: Just the primitives it's built on. | ||
Right | |||
sorear | treed: I however would love to hear about more object models. | ||
jnthn | treed: Yes, that'd be good to know. | ||
Tene | treed: I'm also interested in being around for that conversation. | 21:35 | |
tylercurtis also. | |||
Tene | It's storytime with treed! | ||
jnthn | :-) | ||
pmichaud grabs milk and cookies. | |||
jnthn grabs beer...what's new... ;-) | |||
treed | Heh. | ||
So every ruby object is an instance of an anonymous class, called its eigenclass. | 21:36 | ||
masak grabs an object. have something concrete to refer to during the story. | |||
treed | Which is derived from what you thought you said to derive the object from. | ||
masak | treed: one unique eigenclass per object? | ||
by the way, are we allowed to interrupt? :) | 21:37 | ||
treed | just a sec | ||
(work calls) | |||
And, yeah, one unique eigenclass per object. | 21:38 | ||
IIRC eigen- means self- | |||
sorear | So, "hello world" | ||
That's a string object? | 21:39 | ||
masak | ja, eigen- means self- | ||
sorear | And it has an eigenclass, which is not shared with any other string in the system? | ||
treed | I think so, although I suspect that eigenclasses may not actually be created until used. | ||
sorear knows essentially nothing about Ruby-the-language | |||
treed | You can add methods to any given object. | 21:40 | |
ANd when you do, they're added to the eigenclass. | |||
It would surprise me if the eigenclass actually existed until that point. | |||
sorear | so it's essentially a prototype OO system? | ||
treed | (I was going to implement it like that. Creating it on the fly as needed.) | ||
Kinda, yeah. | |||
So each class also has a metaclass, which is where class methods and data go. | 21:41 | ||
jnthn | treed: www.klankboomklang.com/2007/09/21/t...ton-class/ suggests that it's done lazily | ||
masak | so, eigenclass != metaclass in Ruby? | ||
sorear | Can you give an example of a simple user-defined class? | ||
treed | class Foo | ||
def bar | |||
puts 'hi' | |||
end | |||
masak: Nope. | 21:42 | ||
masak | they're the same? | ||
treed | ruby-doc.org/ruby-1.9/classes/Class.html | ||
Er. | |||
masak | rakudo: class Foo { method bar { say 'hi' } }; Foo.new.bar | ||
treed | that was an agreeing nope. | ||
p6eval | rakudo 90637b: OUTPUT«hi» | ||
masak | aha. | ||
treed | That has a diagram of classes and metaclasses at the basic level | ||
so each class has a metaclass and a superclass. | |||
And metaclasses have superclasses of their own. | |||
Ultimately leading to BasicObject. | 21:43 | ||
(Which is new in 1.9) | |||
tylercurtis | Do metaclasses also have metaclasses? | ||
treed | Nope. | ||
jnthn | Oh no, no strange loops. :-) | 21:44 | |
masak will be disappointed. :-) | |||
treed | Heh. | ||
masak | 'the buck stops here'. | ||
Tene | Aren't metaclasses instances of Class? | ||
treed | Yes. | ||
Tene | So they just all have the same metaclass (Class) | ||
masak | jnthn: I'm used to being disappointed in that way. most systems are depressingly non-loopy. | ||
treed | Ultimately. | ||
Tene | Yeah, from that document, "All metaclasses are instances of the class `Class’. " | 21:45 | |
treed | So, then I guess they could have a metaclass. | ||
In that way. | |||
Agh. | |||
Yeah. | |||
So, now imagine this, only for each thing, I also have to have a parrot thing. | 21:46 | ||
Tene | I don't know that that's any more or less meta- | ||
sorear | treed: How many addressable objects does your class statement create? | ||
treed | And you understand why I got stuck on complication. | ||
sorear: Hm. | |||
Addressable? | |||
sorear | The class, the metaclass, the class' eigenclass, the metaclass' eigenclass, ...? | ||
can be assigned to a variable | |||
treed | two, I think | ||
You can't assign an eigenclass to a variable. | 21:47 | ||
sorear | more objects could be created behind the scenes | ||
treed | Sure. | ||
The class is addressable, and the metaclass, via Class.class | |||
masak | the eigenclass isn't first-class? :) | ||
treed | Heh. | ||
Most people never even realize that it exists. :-P | |||
I've certainly never used it. | |||
I didn't even know about it until I started working on Cardinal. | 21:48 | ||
masak | man, we should demote junctions before people start realizing that they exist... :) | ||
sorear | btw I'm planning to make junctions non-addressable in Niecza, at least to start | ||
Tene | sorear: eigenclasses aren't made until you try to define instance-specific behavior. | ||
sorear | in Rakudo, class Foo { } creates two addressable objects - Foo (aka Foo.WHAT) and Foo.HOW | 21:49 | |
Tene | So just defining a class doesn't create any eigenclasses. | ||
sorear | also Foo.WHO, but that's not really part of the object system | ||
jnthn | Tene: That correlates nicely with what I'm reading. | ||
treed | Yeah, I think that's also the case with Ruby. | ||
You get a class placed in a namespace | |||
sorear | (Foo.WHO is the name of the implicit namespace created to hold our variables inside the class body) | ||
treed | and the metaclass which is accessible via Class.class | 21:50 | |
jnthn | treed: If you like, when I get further along, I could maybe take a crack at an implementation of the core of this. | ||
treed | I don't think it creates anything else until you use the eigenclass. | ||
jnthn: That'd be neat. | |||
Tene | So how do you define class methods in ruby? | ||
masak | treed: non-related question. sometimes I read on Twitter that people think that Ruby is the actual Perl 6. what is your view on this? | ||
treed | I'm so burned out on getting it to work. | ||
jnthn | treed: It'd be an interesting model test. | ||
treed | class Foo | ||
def Foo.class_method | |||
21:50
whiteknight left
|
|||
treed | end | 21:50 | |
end | |||
masak: Drugs? | |||
masak | treed: :D | ||
jnthn | treed: Yes, I can imagine this is hard to model with current Parrot. | ||
masak | treed++ | ||
treed | I kinda view Ruby as a hybrid between Python and Perl. | 21:51 | |
tylercurtis | Doesn't def self.class_method work also inside the class? | ||
Tene | jnthn: it wouldn't be so bad if you could instantiate subclasses of Class | ||
jnthn | treed: I very much hope to make things better. | ||
treed | But it's definitely more Pythonic than Perlish. | ||
masak | I'll answer that next time. "I'm sorry, but are you high?" | ||
treed | jnthn: The code exists on github in a branch if you want to see my current attempt. | ||
It's... ugly. | |||
jnthn | Tene: Yes, classes ended up less first-class in Parrot that I'd kinda hoped. | ||
treed | tylercurtis: I think so, yeah. | ||
Tene | I was rather disappointed when I noticed that. | ||
masak | treed: the use of special vars is quite Perlish. but it isn't used much in modern Ruby, it seems. | 21:52 | |
jnthn | treed: Depends if it does the right thing or will just confuse me. ;-) | ||
treed | Heh. | ||
Tene | Fixing the class restrictions on the exception workins was pretty easy, but I haven't merged that branch yet. | ||
That branch merge has been pending for... five months? | |||
treed | github.com/cardinal/cardinal/blob/i...lasses.pir | ||
I think that's the core of the nastiness. | |||
jnthn | treed: Are you using PCT for implementing this? | 21:53 | |
treed | I ... think so? | ||
masak | (also from #parrot) seems one of the few places where 'reverse iterators' are used is in BUILDALL. maybe the only place. we should perhaps think of moving away from that solution, so that reverse iterators can be deprecated. | ||
21:53
pmurias left
|
|||
treed | It's just the standard parrot set. | 21:53 | |
jnthn | treed: Yes, you are | ||
treed | P6 rules for grammar, NQP for actions, and PIR for writing libs | ||
Tene | jnthn: I never got it migrated to nqp-rx | ||
jnthn | treed: Though not nqp-rx | ||
treed | Ah, yeah. | ||
jnthn | Tene: Right. | ||
Tene: That may be helpful. | |||
treed | Was there ever a guide written for that. | ||
jnthn | Tene: I'll be putting the new MOP-y stuff in nqp-rx. | 21:54 | |
tylercurtis | The Squaak tutorial's up-to-date now. | ||
masak | yay | ||
treed | By "that" I mean converting from nqp to nqp-rx. | ||
sorear | treed: Sounds like the Rakudo and Ruby metamodels are quite similar | ||
treed | sorear: I never really grokked the Rakudo model. | ||
I ended up excising P6object because it didn't seem to do what I wanted. | |||
And had weird bugs. | 21:55 | ||
sorear | treed: Rakudo doesn't have eigenclasses, but an object's class pointer is mutable | ||
Tene | sorear: Rakudo doesn't so much have class-only methods. | ||
sorear | So you can get the same effect by deriving an anonymous class and setting it as the object's class | ||
Tene | iiuc, you can't define a method that you can call on Foo, but not on instances of Foo | ||
sorear | Tene: type objects are the big difference, yes | 21:56 | |
masak | Tene: there's :D and :U, though. | ||
Tene: (only spec so far, not in Rakudo) | |||
sorear | :D and :U suck. | ||
masak | no, :U suck! (SCNR) | ||
Tene | :D and :U seemed... hackish, to me, I guess. | ||
masak | I also have mixed feelings about them. | ||
sorear | and very, very ugly | ||
jnthn | I found them quite nice. | 21:57 | |
Just an adverb to the type name. | |||
masak | I might change my mind after I've tried them in practice. | ||
jnthn | *find | ||
masak: You shoudln't have to write them much... | |||
masak | no, :U shouldn't have to write them much! | 21:58 | |
jnthn | Then :Don't complain! :D | ||
masak | :P | ||
sorear | Over in Moose-land, Str:D is spelled Str | ||
jnthn | No, we don't have that one. | ||
sorear | If you want Maybe[Str], you have to say so | ||
much better huffman, IMO | |||
masak likes Maybe[Str] | |||
21:58
Holy_Cow left
|
|||
masak | unfortunately, I don't see how that'd mesh with type objects... | 21:59 | |
jnthn | Heh. I don't think type objects are going away any time soon. :P | ||
masak | right. :U | ||
21:59
_madmax_ joined
|
|||
jnthn | .oO( :U is a really difficult facial expression to form ) |
21:59 | |
masak | :∩ | 22:00 | |
sorear | there's an interesting cheat in Moose, initial values are excempt from type constraints | ||
it would make my Int $x = foo(); work, at least | |||
jnthn | masak: Oh noes, what have I set off... :P | ||
masak | :d | 22:01 | |
Tene | :D | 22:02 | |
yay puns :D | |||
D: oh no puns | |||
jnthn | Is that punctuation? | 22:03 | |
sorear | Now for the part where I add if ($M->isa('STD::Regex')) checks to every single backslash__S_foo action method | ||
masak groans | |||
Tene | emoticons. ":D" is happy, "D:" is upset. | ||
sorear | (: | ||
sbp | ‿̈ | 22:05 | |
treed | Whoa it's sbp. | ||
Small world. | 22:06 | ||
sbp | yup! | ||
[particle] | someone else highlighting "cardinal"? | ||
sbp | I crack Unicode jokes on #perl6 | ||
treed | Huh? | ||
sjohnson | y0 | ||
sbp | it's what I do | ||
treed | sbp isn't cardinal-related | ||
masak | sjohnson: hi! \o/ | ||
[particle] | wrong world | ||
sorear | sbp? | 22:07 | |
sjohnson | yo masak hows life | ||
sorear | treed: fwiw, I got to Perl 6 by following overlapping circles from #nethack | 22:08 | |
sbp | sup sorear? | ||
sorear | sbp: me without context as to "Whoa it's sbp" | ||
sbp | treed has been on one of my channels for years and years | ||
Tene too | |||
masak | sjohnson: life is being suspiciously kind and generous. how's with you? | ||
sjohnson | works a bit boring today, but seeing new things that p6 can do usually cheers me up | 22:09 | |
masak | sjohnson: allow me to cheer you up, then :) | 22:10 | |
rakudo: say Nil.defined # amazing, isn't it? :) | |||
p6eval | rakudo 90637b: OUTPUT«0» | 22:11 | |
masak | \o/ | ||
sjohnson | yeah i remember i was playing around with defined back then | ||
err, back a while ago. i gotta be careful with hashes | |||
rakudo: my %hash; say defined(%hash) | |||
p6eval | rakudo 90637b: OUTPUT«1» | ||
sjohnson | rakudo: my @list; say defined(@list) | 22:12 | |
masak | rakudo: say 42.?foo // "Ints don't have a .foo method, silly! :)" | ||
p6eval | rakudo 90637b: OUTPUT«1» | ||
rakudo 90637b: OUTPUT«Ints don't have a .foo method, silly! :)» | |||
masak | sjohnson: there's discussion about @list being undefined also. | ||
sjohnson | interesting... | ||
sjohnson pays attention | |||
( `ー´) | |||
sorear | .u ー | 22:13 | |
phenny | U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK (ー) | ||
22:15
stephenlb left
|
|||
squeeky | ( ゚ ヮ゚) | 22:16 | |
masak | sjohnson: there's a long ticket about it on RT. when I last showed it to pmichaud, he said that arrays and hashes will probably end up being undefined before use. | 22:17 | |
sjohnson: I suspect that it was my bitching about it not being that way that led TimToady to spec :D and :U. | |||
so maybe we can implement undefined Arrays and Hashes, close the ticket, unspec :D and :U, and live happily ever after :) | 22:18 | ||
22:19
drbean left
|
|||
jnthn | masak: If you unspec those, you still leave other problems that they solve behind. | 22:20 | |
22:20
tadzik left
|
|||
masak | jnthn: Foo $x where *.defined | 22:21 | |
jnthn: Bar $x where !*.defined | |||
jnthn | masak: I'm thinking more than :D and :U may be meaningful in a specail sense to the mult-dispatcher. | ||
masak: Remember ACCEPTS is one method we'd want to distinguish this way. | |||
masak: And Str | 22:22 | ||
masak | right. | ||
jnthn | We don't want every call to those falling back to a subset dispatch. | ||
22:22
stephenlb joined
|
|||
jnthn | :D and :U may well be different too. | 22:22 | |
That is, they may *really* mean "is a type object" and "is not a type object" rather than any higher level idea of what defined means. | |||
(Very speculatory.) | 22:23 | ||
So then it's not just ugly sugar for where *.defined :-) | |||
masak | if they really mean 'is a type object', I could see more use for them. | 22:28 | |
rakudo: say Int.WHICH; say Int.clone.WHICH; | 22:29 | ||
p6eval | rakudo 90637b: OUTPUT«9167464091674640» | ||
jnthn | masak: Would them meaning that feel objectional to you as a user? | ||
(To me as an implementor, that feels very helpful.) | 22:30 | ||
masak | jnthn: it kinda feels right. | ||
jnthn: it makes me feel better than them just meaning 'defined' and 'undefined'. | |||
don't know why. | |||
masak sleeps | |||
'night, #perl6 | |||
jnthn | night o/ | ||
22:30
masak left
22:34
patrickas left
|
|||
sorear | Tene: Why do you care about waltman? | 22:38 | |
22:38
blogometer joined
|
|||
Tene | sorear: I mostly don't. | 22:39 | |
I care at least a little bit about bring up less-false counterpoints to the uninformed anger. | |||
cognominal | A perl5 question. I want to convert a python extension to a Perl extensions. It seems that python has the equivalent of SV* but that any struct with starts with the fisrt fields of this SV equivalent can benefits from the garbage collecting while there only predefined SV derivative type. What is the way out? | 22:49 | |
s/with/which/ | |||
blogometer | I'm using felixge Node MySQL. Does it have mute button? | 22:50 | |
A lot of debugging messages. | |||
Oh, wrong window. | 22:51 | ||
cognominal | I thought that defining a new magic could work but it seems that all the magics are predefined : switches everywere? | ||
blogometer | Sorry. | ||
sorear | cognominal: you need to use 'ext' magic; in order to make sure you have your own magic, compare the vtable address | 22:54 | |
cognominal: also, the correct channel for hardcore Perl5VM hacking is #p5p on irc.perl.org | |||
cognominal | agreed but I knew that someone knowledgeable would help me here | 22:55 | |
thx | 22:56 | ||
sorear | see XS::Object::Magic on CPAN | ||
23:01
_madmax_ left
|
|||
cognominal | sorear++ # that's sounds what I want. | 23:02 | |
23:08
blogometer is now known as _bigeasy,
_bigeasy is now known as big_easy,
big_easy is now known as bigsleazy
|
|||
sorear | Oh, great. I just noticed there are actually THREE sets of backslash: rules. | 23:09 | |
23:09
bigsleazy is now known as blogometer
23:10
patrickas joined
23:11
kensanata joined
|
|||
sorear | rakudo: say 1 ~~ /\w/ | 23:11 | |
p6eval | rakudo 90637b: OUTPUT«1» | ||
23:12
lestrrat is now known as lest_away
|
|||
patrickas | rakudo: (<a b>, { .succ } ... * ).[^3].map(.perl).say | 23:14 | |
p6eval | rakudo 90637b: 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/kGZNEzCpLT» | ||
patrickas | rakudo: (<a b>, { .succ } ... * ).[^3].join(', ').say | ||
p6eval | rakudo 90637b: OUTPUT«a, b, c» | ||
patrickas | should the fist element returned be 'a' or <a b> ? | 23:15 | |
sorear | a | 23:17 | |
<a b> means "a", "b" | |||
squeeky | <cheap fast good> | 23:18 | |
23:18
jferrero joined
|
|||
patrickas | i know ... but does it flattem? | 23:18 | |
lue | rakudo: say 1 «=« [1,2,3] | ||
sorear | yes | ||
p6eval | rakudo 90637b: OUTPUT«1Cannot modify readonly value in '&infix:<=>' at line 1 in <anon> at line 204:CORE.setting in 'hyper' at line 1 in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
sorear | , always flattens | ||
jnthn | rakudo: say <cheap fast good>.pick(2) | ||
p6eval | rakudo 90637b: OUTPUT«cheapfast» | ||
patrickas | rakudo: (<a b> , 'c').perl.say | 23:19 | |
p6eval | rakudo 90637b: OUTPUT«(("a", "b"), "c")» | ||
patrickas | rakudo: (<a b> , 'c').elems.say | ||
p6eval | rakudo 90637b: OUTPUT«3» | ||
sorear | .perl is kinda special | ||
jnthn | In the first, note it's never been promoted from a Parcel | ||
sorear | it ignores all flattening information in what it sees | ||
jnthn | Nothing enforced flattening context | ||
.elems enforces it | |||
Tene | rakudo: (['a', 'b'], 'c').elems.say | ||
p6eval | rakudo 90637b: OUTPUT«2» | ||
Tene | rakudo: (['a', 'b'], 'c').perl.say | 23:20 | |
p6eval | rakudo 90637b: OUTPUT«(["a", "b"], "c")» | ||
lue | rakudo: say 1 «==« [1,2,3] | ||
p6eval | rakudo 90637b: OUTPUT«100» | ||
Tene | See the difference? | ||
lue | rakudo: say (1 «==« [1,2,3]).perl | ||
p6eval | rakudo 90637b: OUTPUT«[Bool::True, Bool::False, Bool::False]» | ||
23:20
hudnix joined
|
|||
patrickas | how can I explicitely promote form a parcel ? | 23:20 | |
in other words | 23:22 | ||
somewheer in my code I am doing: my $args = @lhs.iterator.list | |||
and it seems $args when I read from $args it "seems" I am getting <a b> as first element | 23:23 | ||
jnthn | patrickas: Anything that puts it in context would do that. | ||
Oh, hmm | |||
rgrau_ | rakudo: ([<a b>], { .succ } ... * ).[^3].join(', ').say | 23:24 | |
p6eval | rakudo 90637b: OUTPUT«a b, a c, a d» | ||
jnthn | rakudo: ('a', 'b', { .succ } ... * ).[^3].join(', ').say | ||
p6eval | rakudo 90637b: OUTPUT«a, b, c» | ||
jnthn | rakudo: (<a b>, { .succ } ... * ).[^3].join(', ').say | ||
p6eval | rakudo 90637b: OUTPUT«a, b, c» | ||
patrickas | the current series operator works fine | 23:25 | |
I am refactoring it | |||
jnthn | Ah, OK | ||
patrickas | and this is the only test not pasing in MY code | ||
jnthn | patrickas: How are you handling the LHS | ||
? | |||
.flat will put something in flattening context. | |||
patrickas | I'll try that | 23:26 | |
23:26
justatheory left
|
|||
lue | rakudo: my @a = (1 «==« [1,2,3]); say ( [+] @a ) | 23:29 | |
p6eval | rakudo 90637b: OUTPUT«1» | ||
lue | rakudo: my @a = (1 «==« [1,2,1]); say ( [+] @a ) | 23:30 | |
p6eval | rakudo 90637b: OUTPUT«2» | ||
23:30
_madmax_ joined
|
|||
lue | am I the only one who can't run rakudo with the latest PARROT_REVISION ? | 23:31 | |
patrickas | in all cases is it a bug ? | 23:32 | |
Tene | my parrot_revision is 48547 the last time I rebuilt | 23:33 | |
patrickas | I am handling @lhs like this | ||
our multi sub infix:<...>(@lhs, Whatever) {my $args = @lhs.iterator.list; say $args.elems,@lhs.elems;} ; (<a b>, 'c' ... * ); | |||
Tene | has it been updated since that? | ||
patrickas | rakudo: our multi sub infix:<...>(@lhs, Whatever) {my $args = @lhs.iterator.list; say $args.elems,@lhs.elems;} ; (<a b>, 'c' ... * ); | ||
p6eval | rakudo 90637b: OUTPUT«23» | ||
patrickas | should that ^^ output 33 ? | ||
lue | parrot revision 48559 here | ||
jnthn | patrickas: If you're putting a list in a scalar then I guess you're itemizing it. | 23:34 | |
lue | it's a parrot error concerning PackFile_unpack (wondering if it anyone else has this problem) | ||
jnthn | lue: That's normally a result of having left-over PBC files from an older Parrot. | 23:35 | |
sorear | PackFile_unpack errors are never bugs | ||
it just means you forgot to rebuild | 23:36 | ||
lue | I'm pretty sure I ran perl Configure.pl --gen parrot ; make ; make install like always | ||
patrickas | ok i'll work around by explicitly .flat-ing | ||
lue | [doing so again to make sure] | 23:37 | |
patrickas | rebuild, spectest and hope for the best | ||
what's funny is that the tests was for someting else (testing a block with arity 1) ... and it was the only one that caught my non flattenign bug! | 23:39 | ||
23:39
bluescreen joined
23:40
bluescreen is now known as Guest82885
|
|||
jnthn | We need more tests. ;-) | 23:40 | |
lue | .oO(would standardized tests be easier for a Perl 6 implementation?) |
23:41 | |
sorear | lue: you forgot the git clean -dfx | ||
lue | just ran it. It's funny, I never had to do that before. | 23:43 | |
patrickas | PASS \o/ | 23:48 | |
jnthn | patrickas: \o/ | ||
23:48
jferrero left
|
|||
sorear | std: / \X[23,34,46] / | 23:48 | |
p6eval | std 32064: OUTPUT«ok 00:01 116m» | ||
sorear | I wonder what that means., | 23:49 | |
squeeky | TAP 2.0 needs to mandate the 4 stages of test: PASS \o/, FAIL /o/, UNKNOWN |o_ and NA /o | 23:50 | |
treed | I don't get the UNKNOWN | ||
Is that like raising hand to ask a question | |||
squeeky | treed: .... think YMCA. | 23:51 | |
Tene | I don't get FAIL | 23:52 | |
squeeky | think I'll just go and facepalm in my sleep. | ||
patrickas | night all | 23:53 | |
23:53
patrickas left
|
|||
[Coke] | perl Configure.pl --gen-parrot does NOT remove the old parrot build. this can cause trouble on some revision updates. | 23:54 |