»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by Juerd on 28 August 2009.
crythias serious question: In the operator section of the manual, what does >>: - converts (decimal) numbers to another base, number of base follows after the ":"<< mean? 00:02
I read it to say 10:2 outputs 1010 or something. 00:03
quietfanatic Do you mean in S03? I can't find anythig like that there. 00:06
crythias no. I mean something else. Sorry. I know it's not in S03... now...
00:07 NorwayGeek is now known as NorwayGeek|Away
crythias www.perlfoundation.org/perl6/index....able_index 00:08
quietfanatic Okay, I see. 00:10
That's probably talking about :16(FACE) and kin 00:11
rakudo: :16(FACE) 00:12
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub FACE␤» 00:13
quietfanatic rakudo: :16<FACE>
p6eval rakudo 834929: ( no output )
quietfanatic rakudo: say :16<FACE>
p6eval rakudo 834929: OUTPUT«64206␤»
quietfanatic Okay, it takes a string in angles or an expression in parens.
00:16 payload left 00:18 justatheory joined
crythias I'm just curious how I'd guess that from the english statement? 00:19
quietfanatic It doesn't say what kind of operator it is. 00:23
00:25 nErVe left 00:42 TiMBuS joined 00:43 payload joined
dolmen rakudo: say (1/7) 00:45
p6eval rakudo 834929: OUTPUT«0.142857142857143␤»
dolmen rakudo: say (1/7).perl
p6eval rakudo 834929: OUTPUT«1/7␤»
dolmen rakudo: say (1/7).WHAT
p6eval rakudo 834929: OUTPUT«Rat()␤»
dolmen rakudo: say (7*(1/7)).WHAT
p6eval rakudo 834929: OUTPUT«Rat()␤»
dolmen rakudo: say (7*(1/7))
p6eval rakudo 834929: OUTPUT«1␤»
dolmen rakudo: say (7*(1/7)).WHAT 00:46
p6eval rakudo 834929: OUTPUT«Rat()␤»
dolmen rakudo: say (7*(1/7)).^methods
p6eval rakudo 834929:
..OUTPUT«StrnewpredsecnudenumeratorsuccNumdenominatorperlrindexsqrtasinintatanhcoshcosecgrepvaluescharsrootsreverseisaucfirstkvsamecasetancoscapitalizefmtbytesflipdoesp5choplcasinhacotanreducecotanhchracotanh:d:e:fcombfloorasechatanacosroundchoptanhsplitmatchacoshwordscancotanatan2lcfirstuc…
dolmen rakudo: say (7*(1/7)).Num
p6eval rakudo 834929: OUTPUT«1␤»
dolmen rakudo: say (7*(1/7)).Num.WHAT
p6eval rakudo 834929: OUTPUT«Num()␤»
00:48 sbp left, nsh left 00:49 nsh joined, sbp joined 00:50 nsh left 00:51 nsh_ joined 00:55 Whiteknight joined 00:57 dolmen left 01:31 rhr left 01:33 rhr joined 01:52 awwaiid joined 01:56 tak11 left 02:08 Whiteknight left 02:34 wormphlegm joined 02:38 jaldhar left 02:41 jaldhar joined 02:49 wormphlegm left 03:06 xomas_ joined
pugs_svn r28436 | jimmy++ | [zh-cn/syn/]deleted old file. 03:21
03:34 xomas_ left 03:37 crythias left 03:38 jaldhar left 03:39 jaldhar joined 03:47 JimmyZ joined
diakopter rakudo: definition 03:49
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub definition␤»
diakopter rakudo: non-existent
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub non-existent␤»
quietfanatic rakudo: ロ 03:50
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub ロ␤»
quietfanatic rakudo: ー 03:51
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub ー␤»
quietfanatic rakudo: suь 03:52
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub suь␤»
quietfanatic rakudo: ѕub 03:53
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub ѕub␤»
quietfanatic std: ѕub
p6eval std 28436: OUTPUT«Undeclared routine:␤ ѕub used at line 1␤ok 00:01 95m␤»
04:06 nihiliad left 04:07 alester joined
diakopter rakudo: lapsarian 04:08
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub lapsarian␤»
diakopter ORLY? well they all must've been raptured away.
or not. 04:17
vijs: say " lt","a" lt "b" lt "c", "a" lt "a" lt "b"," le","a" le "b" le "b", "a" le "b" le "a"," gt","c" gt "b" gt "a", "c" gt "c" gt "b"," ge","b" ge "b" ge "a", "c" ge "b" ge "c"," eq","a" eq "a" eq "a", "a" eq "b" eq "b"," ne","a" ne "b" ne "a", "a" ne "a" ne "b" 04:19
p6eval vijs 28436: OUTPUT« lt10 le10 gt10 ge10 eq10 ne10␤»
04:26 justatheory left 04:47 molaf joined 04:54 mberends joined 05:00 JimmyZ_ joined, jaldhar left 05:01 jaldhar joined 05:06 lucs_ is now known as lucs 05:13 alester left 05:14 lucs left
mberends looks for diakopter 05:18
05:18 alester joined 05:20 ihrd joined, xomas_ joined 05:21 JimmyZ left 05:22 ihrd left 05:25 justatheory joined 05:27 charsbar left, charsbar joined 05:29 iblechbot joined 05:38 lucs joined 05:39 justatheory left 05:54 iblechbot left
mikehh rakudo (834929c) builds on parrot r41511 - make test / make spectest_smolder (up to 28436 -> #28158) PASS - Ubuntu 9.04 amd64 06:23
06:25 patspam joined 06:40 icwiener joined 06:41 molaf left 06:58 Rugxulo joined 07:02 xinming_ is now known as xinming 07:04 agentzh joined 07:08 zamolxes joined 07:09 patspam left 07:10 alester left 07:18 Rugxulo left 07:32 frew__ joined 07:43 abra joined 07:59 Zloyrusskiy joined 08:04 frew__ left
mberends bad news for Cheese Speleology (btw, love that term ;) : ./proto test <project> fails on many, many projects 08:13
08:15 zamolxes left 08:17 abra left 08:50 Zloyrusskiy left 08:59 am0c joined 09:00 Zloyrusskiy joined
moritz_ vijs: say 3 if 1 < 2 09:06
p6eval vijs 28436: OUTPUT«3␤»
moritz_ vijs: say 3 if 1 < 2 < 4
p6eval vijs 28436: OUTPUT«3␤»
moritz_ vijs: say 3 if 1 < 2 < 0
p6eval vijs 28436: ( no output )
09:10 zaphar_ps left 09:18 ejs joined 09:32 Jedai joined 09:49 ShaneC joined
ShaneC is it possible to get at environmental variables in rakudo right now? 09:51
moritz_ ShaneC: yes 09:52
rakudo: say %*ENV<PATH>
p6eval rakudo 834929: OUTPUT«/usr/local/bin:/usr/bin:/bin:/usr/games␤»
ShaneC thanks
moritz_ you're welcome 09:53
10:01 am0c left 10:03 am0c joined 10:08 agentzh left 10:23 meppl joined
pugs_svn r28437 | jimmy++ | [zh-cn/syn/S02-bits.pod]added Chinese translation to S02, hadn't do much work. 10:33
10:37 JimmyZ_ left
Woodi hi ppls, can i ask why so many different p6 implementations ? haskel and js lastly... 10:50
diakopter mberends: hi! 10:53
mberends diakopter: rehi!
diakopter thanks for all the operators..
mberends I tried to proceed to the x operator, but got stuck :( 10:54
diakopter how far did you get
mberends the js method was to be called do_Replication according the error message when it's missing, but adding that did not work 10:55
diakopter oh...
the do_ prefix is only for ones that are 'pre-resolved' 10:56
mberends also, the error messages mentioned my last additions, so I thought I might have not done them quite right ..
diakopter: I get it
diakopter so you'd have to add a function to interp.js 10:57
mberends btw, it would be easy to stringify "True" and "False", any reason why not?
diakopter the spec is to stringify them to 1,0
mberends ok, then Elf is wrong 10:58
10:58 Muse\ joined
diakopter Replication would a function on the 'disp' ("bytecode" dispatch) object 10:59
mberends I have to go away for a few hours, but I'm looking forward to more vivjs hacking this euro-evening. Leave Replication to me as a nice yak to shave, it should be away from your critical path. 11:00
diakopter Replication:function(){ switch(this.phase) { case 0: /* init phase; generate/return next continuation */; case 1: /* finalize/process results */ } },
mberends ooh :)
diakopter that's the general form of the expression "node type" handlers in interp.js
they always return an array, either 1 or 2 entries 11:01
1 entry if they're _done_; two if they're still to be considered "inside"
ttyl; have fun with Replication 11:02
mberends I'm not sure exactly what "inside" means, but "the source code is the documentation"
diakopter the general solution would be to generate a Concatenation node iteratively 11:03
(like __NIBBLER does, except x times)
mberends yep, got as far as that yesterday, but could not find the hook
diakopter the continuation returning model is there to avoid stack overflow in JS
mberends ok 11:04
diakopter so "inside" means "keep it on the stack"
aka, assign this node as the .invoker of whatever node it returns, if it returned 2
return [this.do_next, this]; // what that means 11:05
mberends ok, that rings a bell. must go now, will backlog later &
diakopter return [this.invoker]; // the continuation node is done; aka "return" from a non-trampolined/stackless function call
l8r
mberends *thinks* he groks most of the above ;) 11:06
diakopter still hacking on Test.pm.js 11:07
Woodi diakopter: maybe you can explain why p6 in js is coming ? just for fun ? 11:08
diakopter Woodi: yep, something like that 11:10
Woodi and this is only one motivation ? do not tell if it's secret :)
diakopter it's not secret
I'm spending my time on Perl 6 because it's challenging to me 11:11
and extremely fun to be involved in the community
Woodi i looked on p6 operators list... no other language have something like this :)
diakopter the reason I chose JavaScript is that I'm excited about the performance of newer JS engines such as V8 11:12
Woodi i think it will scary new users like "ugly regexps" in p5...
how V8 compares to p5 or python ? 11:13
perfirmance i mean
diakopter well 11:14
Woodi ok :)
good hacking :)
diakopter I'd point you to the alioth language shootout game 11:15
Woodi k, i will check it
diakopter where the JS programs on V8 were dominating 11:19
until a recent upgrade (which made readline() on V8 conform to the Tracemonkey readline())
which broke some of my microbenchmark programs on that site which were tailored to V8's readline 11:20
I really need to post updated versions of those programs
in regex-dna, JavaScript/V8 was the fastests of *all* the languages, including C/C++
I don't think Python beat it on any 11:21
Perl beat it on 1, I think
11:21 abra joined 11:23 ejs1 joined
diakopter Woodi: see above 11:27
TiMBuS why cant google get the v8 team to write a jit for androids VM :( 11:31
diakopter TiMBuS: it has it, I thought
TiMBuS nope
dalvik runs painfully slow
diakopter what JS engine does android use? 11:32
I thought it used chrome/v8
TiMBuS oh, no not for the browser 11:33
i mean the VM the entire phone uses
im not sure what the browser uses. probably not v8 11:34
diakopter why wouldn't it; there's a version that emits arm
11:34 payload left 11:36 masak joined
masak oh hai, #perl6 11:36
colomon o?
o/
masak :)
TiMBuS i dunno diakopter, it doesnt seem to have it tho.. 11:37
masak interesting how the question mark actually looks like an arm scratching one's head.
diakopter launches LiveAndroid in vmware 11:38
colomon if we could standardize o? as head scratching, it could save me a lot of typing here...
TiMBuS but more to the point: dalvik needs a jit. the iphone just puts my phone to shame in the speed department atm 11:39
diakopter colomon: :) 11:40
Woodi: no; I was wrong on that; Python/Perl beat JS/V8 on pidigits, since both of those use GMP; JS/V8 emulates bigints in pure JS 11:43
interestingly, the JS/V8 edition of pidigits is roughly 32x slower than the python edition 11:45
Woodi: I just uploaded the fixed regex-dna.v8; check the charts in a day or two, and you'll be impressed 11:47
Woodi diakopter: i checked on alioth and it's sad that perl is far far down.. 11:48
implementing jit like in v8 into parrot would be nice 11:49
diakopter v8 doesn't really JIT; it immediately compiles all JS code directly to architecture-specific machine code, linked to its C++ runtime 11:50
Woodi just installed Chrome
diakopter: yes, i mean compilation to native + "loops inlining"
diakopter: looks that inlining works better then optimisations in gcc ;) 11:51
12:04 am0c left 12:11 Whiteknight joined, ejs1 left
masak rakudo: role Maybe[::T] { has T $!value; has Bool $.has-value; method just(T $value) { self.bless(*, :$value, :has-value(True)) }; method nothing { self.bless(*, :has-value(False)) }; method value { die unless $.has-value; $!value } }; my Maybe[Int] $m1 .= just(5); given $m1 { when .has-value { say .value } } 12:13
p6eval rakudo 834929: OUTPUT«5␤»
masak Haskell in Perl 6.
pugs_svn r28438 | Kodi++ | [t/spec/S04-statements/try.t] Moved tests of CATCH blocks to 12:22
r28438 | /t/spec/S04-exception-handlers/catch.t and removed uses of try
r28438 | from them (try is redundant if the block thus prefixed contains a
r28438 | CATCH).
r28438 |
r28438 | [t/spec/S04-exception-handlers/catch.t] Added some more tests.
masak phenny: tell mberends that I still have plans for a few changes in Temporal. my idea is to evolve the spec, the test suite and Rakudo at the same time in a sort of fait-accompli. really only blocking on sufficiently long string of consecutive tuits. 12:23
phenny masak: I'll pass that on when mberends is around.
carlin rakudo: my $s = IO::Socket::INET.new; $s.open('127.0.0.1', 80); my $c = $s.accept(); 12:25
p6eval rakudo 834929: OUTPUT«Null PMC access in isa()␤in Main (/tmp/ot3MSEq8Ix:0)␤»
12:30 Zloyrusskiy left, NorwayGeek|Away left, meppl left 12:31 NorwayGeek joined, abra left 12:33 jan_ left
moritz_ Kodi++ 12:38
12:41 abra joined, iblechbot joined
pugs_svn r28439 | moritz++ | [t/spec/S04-exception-handlers/catch.t] fixed a few syntax errors. Also sting appending is ~=, not =~ 12:42
dalek kudo: a61b17f | moritz++ | t/harness:
[t/harness] only provide extra_properties when we use ::Archive
12:43
kudo: 0331d60 | moritz++ | docs/ChangeLog:
[docs] ChangeLog updates
12:48
masak rakudo: saharan-climate-in-antarctica-but-we're-working-on-it 12:53
p6eval rakudo 834929: OUTPUT«Could not find non-existent sub saharan-climate-in-antarctica-but-we're-working-on-it␤»
12:54 nihiliad joined
masak phenny: tell mberends that as for the Cheese Speleology and the many failing tests, that's actually good news. looking forward to setting up the regular smoker and seeing people start to care about all-green status and other reasons for pride. 12:55
phenny masak: I'll pass that on when mberends is around.
moritz_ wants command line completion for ./proto install s<tab> 12:59
masak moritz_: that's not very far-fetched, you know. 13:00
moritz_ masak: I know
masak I'm not saying I personally know how to extend the bash tab completer, but it can definitely be done.
jnthn keeps wishing more things did that...
13:02 JimmyZ joined
masak tab completion is like a slow drug... :) 13:02
before you know it, you want it everywhere.
jnthn didn't try slow drugs yet
;-)
masak and when you don't get it, you get very cranky.
jnthn: still on those fast drugs, are you? :P 13:03
jnthn wishes irssi tab completation was smart enough to finish whole sen<tab>
masak (scnr)
jnthn (Korean Food)++ # making up for the pouring rain all day 13:04
masak we have sunshine here, but sadly no Koeran Food.
though I did read some Korean news this morning.
people are being reunited across the North/South border.
59 years after the split. 13:05
jnthn Aye, I read that one too.
masak as topsy-turvy as this world seems sometimes, it's nice to watch the positive developments between N/S Korea, and between Mainland China and Formosa. 13:06
jnthn When they're positive ones, yes. 13:07
masak they're a great lot more positive than in the past 60 years.
overall. 13:08
jnthn Yes, true.
I hope that'll be sustained rather than a blip.
masak mm.
moritz_ Installing proto...sh: -c: line 0: unexpected EOF while looking for matching `'' 13:09
jnthn tries to work out masak's use of Formosa rather than Taiwan
moritz_ I get that for some projects I want to install 13:10
pugs_svn r28440 | jimmy++ | [Spec]added C<...> format for Unicode code point number. 13:11
jnthn WikiPedia only says "also known as"...well, I knew that much. :-)
masak jnthn: actually, I have no preferences as to the name. I find "Formosa" a very pretty name. and it's far away from all debates about whose island it is.
jnthn The second bit is what I was wondering about more. 13:12
masak jnthn: about a year ago, I wrote a small essay on the PRC/RoC relations. I find it enormously fascinating. 13:15
jnthn masak: Published anywhere, or private?
masak jnthn: not published, as far as I know. but it's probably in Swedish. I'll check. 13:16
how unfair. mberends creates a bug in a branch, and GitHub sends me an issue ticket. :P 13:17
moritz_ masak: he ;-)
13:18 Matt-W_ is now known as Matt-W
cognominal I see there is zh-tw and a zh-cn, what's the difference? the speak a different language? 13:21
13:21 arthur-- joined
cognominal or is that more like en-en and en-us? 13:21
masak cognominal: from what I understand, the two variaties of Mandarin are still mutually understandable.
cognominal: but the biggest difference is in the sets of hanzi used. 13:22
(characters)
cognominal: Taiwan uses the traditional variety, Mainland uses a simplified script.
JimmyZ hello masak, could you see my pm?
masak JimmyZ: reading it now.
JimmyZ thanks.
cognominal masak: interesting 13:23
masak JimmyZ: if you don't highlight me, it might take me a while to notice it. :)
JimmyZ ;)
cognominal somehow a dictature may help for a deep language reform
masak cognominal: yes, and not very surprising. the simplified hanzi are, after all, a communist invention.
cognominal: but there was some surprising news a while ago that Taiwan might switch too.
jnthn masak: (swedish) so at the end of it, do you hope for a bra slut? ;-) 13:31
masak *rimshot* 13:32
others: sv:'bra slut' means en:'good ending'. :)
13:34 NorwayGeek left, NorwayGeek joined
masak yet another Twitter spambot tweeting the cranky-editorial thing. :) 13:37
13:37 c9s left
masak for some reason, that amuses me. 13:37
13:39 arthur-_ left
jnthn ponders joining Twitter now and then 13:40
cognominal what scares me is that if programs that learn english by statical analysis will get a more and more skewed view bty analyzing output from bots. There will be probably some strange attractor at work but the result will not be prestty. 13:41
worse, they could try to learn from my broken english.
jnthn, a blizkost twitter channel would be nice. 13:42
moritz_ jnthn: sometimes I ponder that too. And then I remember that IRC is a large enough time sink already :) 13:43
13:43 mauke joined
jnthn Yeah 13:44
masak everything's time sinks. that's how time works.
huf where's it all coming from then? 13:45
cognominal ...that's how time sucks
Woodi can i compile rakudo_2009_09 with parrot-1.4 ? 13:48
moritz_ Woodi: no
Woodi: the rakudo 2009-09 release needs parrot-1.6 13:49
the 2009-08 release needs parrot-1.5
etc.
Woodi ok, thanx
14:00 Whiteknight left 14:01 am0c joined
diakopter std: role Maybe[::T] { has T $!value; has Bool $.has-value; method just(T $value) { self.bless(*, :$value, :has-value(True)) }; method nothing { self.bless(*, :has-value(False)) }; method value { die unless $.has-value; $!value } }; my Maybe[Int] $m1 .= just(5); given $m1 { when .has-value { say .value } } 14:02
p6eval std 28440: OUTPUT«Potential difficulties:␤ Possible obsolete use of .= as append operator; in Perl 6 please use ~= instead at /tmp/5g1xHDgf9h line 1:␤------> alue; $!value } }; my Maybe[Int] $m1 .= ⏏just(5); given $m1 { when .has-value { s␤ok 00:02 104m␤»
diakopter std: role Maybe[::T] { has T $!value; has Bool $.has-value; method just(T $value) { self.bless(*, :$value, :has-value(True)) }; method nothing { self.bless(*, :has-value(False)) }; method value { die unless $.has-value; $!value } }; my Maybe[Int] $m1 .= just(5); given $m1 { when .has-value { say .value } } 14:03
p6eval std 28440: OUTPUT«Potential difficulties:␤ Possible obsolete use of .= as append operator; in Perl 6 please use ~= instead at /tmp/eoQYDlCNtZ line 1:␤------> alue; $!value } }; my Maybe[Int] $m1 .= ⏏just(5); given $m1 { when .has-value { s␤ok 00:02 104m␤»
masak wonders why STD.pm's .= warning triggers on that piece of code 14:04
diakopter doesn't know either
jnthn Not sure what heuristic it's using.
masak if only the source was published online somewhere! 14:05
14:05 [particle] left 14:06 [particle] joined
masak oh, there's my sarcasm hat. on my head. I wondered where'd it'd got to. 14:06
masak reads STD.pm source 14:07
aha! it suppresses the warning if the .= is before a 'new'.
but since the Maybe code uses custom 'new' methods, it warns. 14:08
moritz_ maybe it should only warn if the following is string literal
masak seems to me it should check whether it's in a 'my' (or similar) declaration instead.
maybe.
jnthn well 14:09
if the following is not a sub call of some kind.
(that gets transformed to a method call)
14:11 c9s_ joined, abra_ joined 14:14 abra left
mberends phenny, I've seen all the messages, thanks 14:16
phenny mberends: 12:23Z <masak> tell mberends that I still have plans for a few changes in Temporal. my idea is to evolve the spec, the test suite and Rakudo at the same time in a sort of fait-accompli. really only blocking on sufficiently long string of consecutive tuits.
mberends: 12:55Z <masak> tell mberends that as for the Cheese Speleology and the many failing tests, that's actually good news. looking forward to setting up the regular smoker and seeing people start to care about all-green status and other reasons for pride.
jnthn bot fails at intelligence. News at 11. 14:17
masak hugs phenny
moritz_ hugme: hug phenny 14:18
hugme hugs phenny and blushes
jnthn hugme: hug phenny
hugme hugs phenny
jnthn
.oO( Oh great, now I get to try and work out how to make phenny blush )
14:19
phenny: hug moritz_
erm
hugme: hug moritz_
moritz_ :-)
hugme hugs moritz_
jnthn hugme: hug moritz_
hugme hugs moritz_ and blushes
jnthn ah
moritz_ jnthn: it's a random feature
mberends jnthn: hug Pugs
14:19 abra_ left
jnthn hugme: hug Pugs 14:19
hugme hugs Pugs
14:19 abra joined
pugs_svn r28441 | jimmy++ | [zh-cn/syn/S02-bits.pod]added a bit translation, masak++ for helping me. 14:19
jnthn moritz_: cute :-) 14:20
14:20 Patterner left 14:24 JimmyZ_ joined, Lorn joined 14:25 meteorjay left 14:31 Psyche^ joined, Psyche^ is now known as Patterner
mberends masak: [Temporal] great, I'm also preparing to climb in, but not as a Spec author, just an implementer 14:34
masak mberends: if you want, we could pool our resources, for great justice.
mberends masak: [Cheese Speleology] +1, "./proto test all" is not far off, and the nagging of project authors to clear their bitrot can increase 14:35
masak I already have a git repo; I could prep it with the ideas I have about Temporal, and you can help me implement it. :)
mberends ok
masak mberends: did you see the moritzbug for './proto install svg-match'? 14:36
mberends the one about Test.pm?
moritz_ the one about shell escapes causing an error 14:37
see the issue list
mberends moritz_, where is the issue list? 14:39
14:39 alester joined
masak mberends: github.com/masak/proto/issues 14:39
14:39 jan joined 14:40 jan is now known as Guest11096
mberends ah thanks, will reproduce locally and (hopefully) fix. Only in installed-modules branch, though. 14:41
14:42 JimmyZ left
mberends must go again, will backlog l8r & 14:42
14:43 NorwayGeek left 14:48 Zloyrusskiy joined, Zloyrusskiy left 14:49 alester left, TiMBuS left 14:58 rfordinal3643 joined 15:02 rfordinal3643 left 15:07 JimmyZ_ left 15:16 JimmyZ joined 15:20 s1n_mini joined 15:23 alester joined, NorwayGeek joined 15:28 __ash__ joined 15:35 awwaiid left 15:37 justatheory joined
masak standard Perl 6 object creation doesn't catch typos in attribute names. 15:42
you might think I'm irritatedly pointing this out after vainly trying for half an hour to understand a logical bug caused by such a typo. 15:43
but actually, that's not the case.
I just happened to think about it after reading A12, and while producing a class hierarchy for Squerl.
isn't that one of the main complaints of many Perl 5 OO approaches, that they don't catch typos in attribute names? 15:44
rakudo: say "OH HAI".Str 15:47
p6eval rakudo 0331d6: OUTPUT«Str()<0x2b28ca8bccb0>␤»
masak couldn't it be argued that the stringification of a Str should be that Str?
hm, or maybe not.
rakudo: say ~'OH HAI' 15:48
p6eval rakudo 0331d6: OUTPUT«OH HAI␤»
jnthn I'm a little surprised by that.
masak maybe that's the ultimate difference between ~ and .Str, that the former only calls the latter if self !~~ Str
15:49 ejs1 joined
masak if that's the case, then I have a new Best Practice for Perl 6: use only ~ inside custom .Str methods! :) 15:49
it's shorter, and it DTRT. 15:50
pugs_svn r28442 | jimmy++ | [zh-cn/syn/S02-bits.pod]added translation for Whitespace and Comment, which most is done. 15:53
15:57 JimmyZ left
__ash__ do you have to override '~' differently than .Str? 15:57
phenny __ash__: 25 Sep 08:33Z <jnthn> tell __ash__ yes, it's fine if you do that. :-)
moritz_ no 15:58
rakudo: class A { method Str { 'foo' } }; say 'bar' ~ A.new() ~ 'baz'
p6eval rakudo 0331d6: OUTPUT«barfoobaz␤»
__ash__ cool, got ya 15:59
16:00 jrtayloriv left 16:06 ejs left
masak the reason for the Best Practice, unless that's not already obvious from the above, is that ~ probably Does What You Mean more often than Str. 16:06
in an AST-like hierarchy of types, it might not always be possible to predict when one'll get a Str and when not. using ~ avoids unpleasant surprises. 16:07
16:07 mauke left
mikehh rakudo (0331d60) builds on parrot r41528 - make test / make spectest_smolder (up to 28442 -> #28189) PASS - Ubuntu 9.04 amd64 16:15
16:22 synth^3 joined 16:25 jrtayloriv joined 16:32 masak left 16:39 synth^2 left 16:52 alester left 16:55 payload joined 17:00 rhr_ joined 17:04 ejs1 left 17:05 NorwayGeek left 17:06 abra_ joined 17:12 rhr left 17:19 am0c__ joined 17:22 am0c left 17:23 abra left 17:24 sparc joined 17:26 abra_ left
Woodi hi ppls, it is possible rakudo build not finish in 4h on Pentium 3, 700 Mhz ? 17:28
moritz_ Woodi: is parrot already built?
Woodi yes, 1.6
now "work" on generating src/gen_setting.pm... 17:29
moritz_ is it swapping?
Woodi no i think, just 50% mem sometimes 60% 17:30
moritz_ well, the build is not fast, and compiling src/gen_setting.pm is the slowest step, but... 4h is a bit much 17:31
on a 3 GHz machine (or so) it takes about 100s to build rakudo
17:31 __ash__ left
moritz_ rakudo: say 3e9 / 700e6 * 100 / 60 # time in minutes it should take, by crude estimation 17:32
p6eval rakudo 0331d6: OUTPUT«7.14285714285714␤»
pugs_svn r28443 | Kodi++ | [docs/feather/syn_index.html] Added an id attribute so the main table can be bookmarked. 17:33
17:33 __ash__ joined 17:34 pmurias joined
moritz_ nermal.org/misc/javascript.jpg 17:35
Woodi nice desk :)
17:36 ejs joined
moritz_ not mine ;-) 17:36
__ash__ moritz_: don't you love javascripts magic ';'
17:37 eiro left
moritz_ maybe I'd love JS if most compilers implemented the standard, nothing more and nothing less 17:37
17:37 NorwayGeek joined
Woodi maybe it can be swapping... 17:38
moritz_ what operation system do you use? 17:39
Woodi Debian of course
moritz_ oh # just actually associated the nick ;-)
Woodi nah, just incidentally 17:40
s/y/i/
17:40 ejs left 17:41 NorwayGeek left
__ash__ moritz_: which standard? most implement the basic JS standard, but then there is a separate DOM standard, only FF really goes above and beyond that with the 'new stuff' (like generators or the let statement in FF3.0) 17:42
17:42 Woodi left
moritz_ __ash__: isn't there an ECMA standard? 17:43
__ash__: for example firefox allows trailing comma in lists, other compilers die when they see that
__ash__ yeah, even IE6 follows the ECMA-262 3rd edition
moritz_ very annoying, and cost me hours of debugging time (being used to perl, mostly) 17:44
__ash__ thats firefox being non-strict with the standard
moritz_ and that's part of my complaints, yes
__ash__ FF can be put into a strict mode
moritz_ how? 17:45
__ash__ one sec, i forget 17:47
you need to take FF out of quirksmode, just add a strict doctype and it should be in strict mode 17:51
17:52 eiro joined
moritz_ so when the Render Mode is "Standards compliance mode" the JS should also be strict? 17:54
__ash__ it is more strict, but it still lets you do a = [1, ]; 17:55
i could of sworn there was a way to make it throw an error for that, hmmm
moritz_ anyway, I just compiled and installed v8, in the hope that it checks a bit more strictly 17:56
dammit, it does not
d8> a = [1, ];
1
17:56 pmurias left 17:57 pmurias joined
diakopter mberends: hi 17:58
__ash__ moritz_: what happens if you do "use strict"; in v8?
does it change that behavior?
moritz_ __ash__: use strict; is a parse error 17:59
__ash__ you need quotes around it
"use strict";
if it has that feature, it might not, i think spidermonkey does, but i don't know about v8 18:00
moritz_ __ash__: still doesn't complain 18:01
18:03 Whiteknight joined
__ash__ well, i am not sure how to check for that one then 18:03
18:04 eiro left
mberends diakopter: rehi, just got back here. how's things with you? 18:04
18:04 eiro joined
diakopter good 18:05
moritz_ hm, is there a nice command line checker for javascript? (static code analysis, like Perl::Critic or so)
mberends it's a bit distracting here, but I'm gonna attempt operator <x> 18:06
pmurias moritz_: you mean a syntax checker or a style checker? 18:09
moritz_ pmurias: both ;-) 18:10
pmurias: a strict syntax checker would be a good start
__ash__ moritz_: www.jslint.com/rhino/index.html try hat if you want, it might work with v8, but it says it works with rhino 18:15
jslint is what a lot of people use, but it is really strict about some things that people consider more of a style thing
although in javascript a lot of times bad style = broken code, but thats not strictly tue 18:16
s/tue/true
moritz_ v8 compiles it, but the style of passing arguments from the command line seems to be different :( 18:17
another reason not to like js :/ 18:18
18:19 pmurias left, pmurias joined
diakopter :P 18:22
what're the command line arg styles differences 18:23
I thought it was d8 --nodebugger -- arg1 arg2
and they appear in the toplevel Arguments object, named arguments 18:24
moritz_ $ d8 jslint.js foo.js
Usage: jslint.js file.js
diakopter d8 jslint.js -- foo.js
I'm fairly sure it's the same in rhino 18:25
moritz_ diakopter: thanks
$ d8 jslint.js -- foo.js
Uncaught: "ReferenceError: readFile is not defined", jslint.js line 515 column 7
diakopter ha
moritz_ runs away screaming
diakopter yeah it's written for rhino 18:26
do this:
moritz_ all the way to rhino :)
diakopter d8 --nodebugger -e 'var readFile=read' jslint.js -- foo.js
moritz_ diakopter++ # my hero, that seems to work 18:27
diakopter usually google v8 team tries to match rhino
diakopter does everything possible to steer moritz_ away from jvm :) 18:29
moritz_ diakopter: don't worry, it's not on my list of worthy targets right now
diakopter I mean rhino
s/rhino/rhino and tracemonkey and webkit's jsc[.exe]/ 18:30
oops, that subsitution was for the line about the google v8 team matching rhino 18:31
moritz_: the --nodebugger switch makes d8 somewhat more efficient, or so I've been told 18:32
(obviously, b/c the debugger is disabled) 18:33
18:34 pmurias left, pmurias joined
diakopter __ash__: actually IE is the one that doesn't match the ECMA-262 3rd ed standard. "Array elements may be elided at the beginning, middle or end of the element list. Whenever a comma in 18:37
the element list is not preceded by an AssignmentExpression (i.e., a comma at the beginning or after
another comma), the missing array element contributes to the length of the Array and increases the index
of subsequent elements. Elided array elements are not defined."
__ash__ ah, well shame on them then
*never uses IE unless my boss at work forces me to check our sites in it* 18:38
moritz_ so a = [1, ]; should create an array of length 2 in js?
diakopter sec
moritz_ it does not in v8 18:39
__ash__ no, length 1 according to the JS spec, empty spots don't extend the size of the arrayyyy
array*
moritz_ ok
but [1, , 2] is length 3
(also in v8) 18:40
diakopter it says "Array elements may be elided at the ... end of the element list.... Elided elements are not defined.", *but* only contributed to the length of the array if the elided element is not the last one. :) 18:42
so, a trailing comma is "valid" ES3, but shouldn't contribute to the array length. 18:43
but it's not valid JSON :)
JSON is a bit more strict
moritz_ I noticed that.
diakopter the ES5 standard (to be declared officially finalized by ECMA *TOMORROW*) states it more explicitly that the *last* trailing comma doesn't contribute to the length. 18:44
wait, or was it last Monday
18:45 icwiener_ joined 18:51 masak joined 18:57 rml` joined 18:58 zerhash left 18:59 s1n_mini left 19:01 icwiener left 19:04 rml` left 19:05 Lorn left 19:10 molaf joined, molaf left, molaf joined
mberends masak, could you do some Temporal musing in temporal-flux-perl6syn within a few days? Maybe your blue-sky use cases. See also perldoc DateTime ;) 19:12
masak oh, I see also a lot of things. :)
but yes, I can.
I think I will have tuits coming up.
mberends I think autarch++ got it pretty much right already 19:13
masak I think so, too. 19:15
what I mostly want to add is convenience.
of the sort that I imagine autarch would oppose, from what I read of his changes.
mberends yep. easy constructors.
masak aye.
moritz_ hugme: list projects 19:16
hugme moritz_: I know about json, november, perl6-examples, proto, svg-matchdumper, svg-plot, temporal-flux-perl6syn, tufte
masak that's why I want a working implementation (and tests) backing me up showing that the features I want to add are both realistic and convenient.
moritz_ hugme: show temporal-flux-perl6syn 19:17
hugme moritz_: the following people have power over 'temporal-flux-perl6syn': TimToady, [particle], masak, moritz_, pmichaud. URL: github.com/masak/temporal-flux-perl6syn/
Tene hi masak 19:19
masak Tene: oh hai. I'm writing up a Web.pm weekly post. 19:20
Tene masak: I'm traveling this week, so I have free evenings. :)
masak cool.
Tene masak: what's my next priority for web stuff? Mysql?
masak that would be nice, yes. 19:21
I think I will successively take steps backwards in the coming weeks, to try to bring an overview to the whole project, and see if we can wrap it up nicely. 19:22
Tene masak: I've been working on plumage, so we can get sql libs available that way, instead of shipped with Parrot.
masak that sounds ideal.
Tene as parrot wants to ship no unnecessary libs.
masak nod.
I see no problem with doing things the way they're planned to be sooner rather than later. :) 19:23
Tene plumage right now can... invoke "svn co" or "git clone", if you have a metadata file... and that's all. :P 19:24
so it's got a ways to go
masak :)
Tene but, I'll keep you updated. might work on squerl. 19:25
sqerl?
spellingql?
masak squerl :) 19:27
which can still be renamed, if someone has a better suggestion. :)
Tene masakql! 19:28
masak :P
that might be fine... until someone finds the first bug. :/
Tene masql -- the 'l' is silent.
moritz_ masaklqbug? 19:29
masak did you guys notice the "better" in my sentence? :P
Tene tt#1: masak doesn't wash my dishes. 19:30
masak that's a TODO. known issue.
mberends esskewl! 19:31
masak would go well with LolDispatch and OmgBlog, I guess... 19:32
but I'm not sure how I could explain it to the Sequel people. :) 19:33
19:34 Muse\ left 19:35 abra joined
masak by the way, the reporting of line numbers in Rakudo is slightly less than awesome. 19:35
sometimes the numbering is off by a few lines. sometimes the number is simply 0.
moritz_ primarily it's missing way too often
Tene I was pondering earlier "A Lolcat's guide to Perl 6" 19:36
moritz_ Tene: that would be kew^WAwesom^WGrand!
19:37 am0c__ left 19:39 __ash__ left 19:41 frew__ joined 19:43 rhr joined, pmurias_ joined 19:44 pmurias left 19:45 pmurias_ is now known as pmurias, pmurias_ joined
pmurias diakopter: do you intend to make vivjs a compiler? (I could help with it) 19:46
19:50 molaf left
sjohnson perhaps the perl6 mascot => lolcat 19:50
19:51 molaf joined
moritz_ rakudo: class DualVar { has $.Str; has $.Num }; say DualVar( Str => 'a', Num => 3.4); 19:52
p6eval rakudo 0331d6: OUTPUT«invoke() not implemented in class 'DualVar'␤in Main (/tmp/w4YbVCPajp:0)␤»
moritz_ rakudo: class DualVar { has $.Str; has $.Num }; say DualVar.new( Str => 'a', Num => 3.4);
p6eval rakudo 0331d6: OUTPUT«a␤»
19:56 rhr_ left
masak oh, and I'm starting to appreciate the separation between $_ and self. 20:15
it's often quite handy.
moritz_ rakudo: say 'aaaa' ~~ m/a**3..*/ 20:16
p6eval rakudo 0331d6: OUTPUT«aaaa␤»
mberends pmurias, surely V8 is a compiler, we just have to figure out how to save the binary? 20:17
masak rakudo: sub foo(Pair *@a) {}; foo 20:20
p6eval rakudo 0331d6: OUTPUT«Parameter type check failed; expected Pair, but got List for @a in call to foo␤in sub foo (/tmp/Onbpf7hlpV:1)␤called from Main (/tmp/Onbpf7hlpV:0)␤»
20:20 abra left
masak I'd argue that the above should work. 20:20
pmurias mberends: js can run in browsers
masak rakudo: sub foo(Int *@a) {}; my Int @b; foo(|@b) 20:22
p6eval rakudo 0331d6: OUTPUT«Parameter type check failed; expected Int, but got List for @a in call to foo␤in sub foo (/tmp/eG74o3tlj9:1)␤called from Main (/tmp/eG74o3tlj9:0)␤»
masak perhaps a clearer example.
20:22 s1n_mini joined
masak submits rakudobug 20:22
20:25 xomas_ left 20:30 NorwayGeek joined 20:32 s1n_mini left 20:37 hanekomu joined
moritz_ pmichaud: currently rakudo.org attracts way too much comment spam - something must be done. Even disabling comments entirely woudl be better than what we have now. 20:46
masak rakudo.org has comments? 20:47
moritz_ 90% spam
20:47 frew__ left
moritz_ actually not anymore, because I just deleted a lot of them 20:48
20:51 molaf left
masak oh no, an action-at-a-distance syntax error! 21:08
I'm starting to feel I'm not meant to be blogging my progress today.
21:15 pmurias left, pmurias joined
masak sleep & 21:20
21:20 masak left 21:48 NorwayGeek is now known as NorwayGeek|Away 21:50 iblechbot left 21:51 __ash__ joined 21:52 jaldhar left 21:53 jaldhar joined 22:02 icwiener_ left 22:05 scottp joined
scottp Hey team. Anyone know of a good reference on the net on "Why use Perl6" - I am trying to find a short reason to add to a talk. 22:06
Juerd scottp: "It's fun." 22:07
22:08 icwiener joined 22:21 hanekomu_ joined 22:25 pmurias_ left
scottp I think it is a missing topic from perl6.org - for me it is just obvious: and "It's fun" is right up there. But it is not obvious to others. 22:25
22:25 pmurias_ joined 22:30 tak11 joined 22:40 hanekomu left 22:44 ihrd joined 22:48 PacoLinux left
japhb Linguistics question: When changing prose (in this case, descriptions from function documentation) from "Returns foo" to "Return foo", what attribute of the verb is altered? 22:51
Juerd Depends on context. 22:59
Mood, number, or person. 23:00
japhb Oh?
Mood I think was the one I was looking for.
Thanks, Juerd. 23:01
Juerd np 23:02
23:16 ihrd left 23:18 icwiener left 23:20 zerhash joined
diakopter pmurias_: I don't know 23:24
how would it look
pmurias: how would it look
pmurias diakopter: you mean the emitted code? or the compiler? 23:26
diakopter either/both
scottp How about this as a one liner intro: "Perl 6 is fun. It's here now. It's fully functional. It has a fantastic, open and fun community. It's ready to use now. "
diakopter mberends: hi
pmurias i'm thinking of using smopish tricks to get stacklessness 23:28
we could have a polymorphic runloop like while(1) {interpreter.continuation.eval()} 23:29
23:30 ihrd1 joined
pmurias and use a switch statement to resume in the right place in the continuation 23:30
diakopter pmurias: that's exactly what it's doing now.. 23:31
pmurias diakopter: you have seen how yeast code looks like?
diakopter pmurias: nope 23:32
what is yeast code
pmurias the stuff mildew emits out using the --yeast option 23:33
diakopter pmurias: seriously though, interp() in interp.js is a polymorphic runloop
and each of its continuations use their .phase property to move among phases
pmurias diakopter: i've seen interp(), it's quite similiar 23:34
diakopter pmurias: however, it could be streamlined/optimized a bit by assigning the disp[this.T] function directly to the node as an .eval() method, like you say
which would optimize long-running code a good bit 23:35
pmurias the difference is that instead of having a continuation for each ast node we would have a continuation for a block of code
23:35 ihrd1 left
diakopter pmurias: OH, I see... good idea.. generate the methods 23:35
the only problem is the JS stack 23:36
well, the real work of the compiler would be to detect/generate those continuation points in each function
23:36 ihrd2 joined
lisppaste3 pmurias pasted "a bit of --yeast code" at paste.lisp.org/display/87814 23:37
23:37 ihrd2 left
diakopter ok 23:38
pmurias diakopter: by default every method call generates a continuation point
diakopter oh, cool. 23:39
pmurias but if we now that a method doesn't need to the stack we can skip it
diakopter pmurias: sounds good... feel free to work on it; I'm not opposed to using eval() on generated JS if it's faster than keeping it in the "native" loop 23:41
right now I'm gonna get back to Test.pm functionality... it's trickier than I anticipated. I still think I can have it done soon (today). 23:42
23:44 hanekomu_ left
quietfanatic rakudo: eval (sub ѕub ($ѕub, $sub) { $ѕub.(&substr[0], $sub) }, &ѕub) ~ (ѕub sub ($sub, $ѕub) { $ѕub.($sub, $ѕub.comb) }, &ѕub); say $! 23:47
p6eval rakudo 0331d6: OUTPUT«Could not find non-existent sub ѕubstr␤»
23:48 __ash__ left 23:49 scottp left 23:50 ruoso left
quietfanatic A hint: this works too. 23:54
rakudo: eval (sub ѕub ($ѕub, $sub) { $ѕub.(&substr[0], $sub) }) ~ (ѕub sub ($sub, $ѕub) { $ѕub.($sub, $ѕub.comb) }, &ѕub); say $!
p6eval rakudo 0331d6: OUTPUT«Could not find non-existent sub ѕubstr␤»
diakopter std: eval (sub ѕub ($ѕub, $sub) { $ѕub.(&substr[0], $sub) }, &ѕub) ~ (ѕub sub ($sub, $ѕub) { $ѕub.($sub, $ѕub.comb) }, &ѕub); say $! 23:56
p6eval std 28443: OUTPUT«ok 00:02 130m␤»
23:56 nihiliad left
diakopter std: (sub ѕub ($ѕub) { $ѕub.(&substr[0], $sub) }, &ѕub) 23:56
p6eval std 28443: OUTPUT«Potential difficulties:␤ Variable $sub is not predeclared at /tmp/9t76vNYzTP line 1:␤------> (sub ѕub ($ѕub) { $ѕub.(&substr[0], $sub⏏) }, &ѕub)␤ok 00:03 130m␤»
diakopter WIN 23:57
23:57 scottp joined
quietfanatic Well, I all but gave that trick away last night. 23:57
23:59 Whiteknight left