»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
geekosaur not very much; vt52s were ancient terminals, not very capable, and probably only supported for backward compatibility with old programs 00:00
TimToady the vt52 was better than the vt05 though 00:01
72x80, uppercase only
er, 72x20
timotimo ingy: dunno. when did you last run it?
geekosaur the one thing real vt52s had over real vt100s was speed... but that doesn't apply to xterm
rjbs THE INTRODUCTION OF MIXED CASE WAS WESTERN DECADENCE THAT I SOUNDLY REJECT
TimToady tell that to St Cyril 00:02
geekosaur (real vt100s had a 1MHz Z80 or something like that; they were often painfully slow, and you absolutely needed flow control)
lue Didn't (some of) those ALL-CAPS terminals use reverse video for capitalization? 00:03
geekosaur I think that was an Apple ][ innovation
timotimo TimToady: do you think "no warnings :p5" is good syntax to suppress warnings like "in perl6 please use 0o123 for octal values"? 00:04
lue If you're playing with ANSI codes right now, \e is the best one :)
rjbs I can only imagine how much more I'd have disliked writing longhand if I had to do it all in Glagolitic script.
TimToady timotimo: seems reasonable on first blush
timotimo good :) 00:05
the first implementation will be file-global rather than lexically-scoped, though
TimToady but that's against the Policy Manual
someone might complain 00:06
00:06 berekuk joined
lue
.oO(You won't notice unless you don't put 'no warnings' at the top of the file)
00:06
timotimo :) 00:07
or rather: "from here on out in this compilation unit"
BenGoldberg lue, I prefer \e over \e :) 00:11
ingy timotimo: running now 00:12
ingy ♥s compilation units 00:13
timotimo :)
that script isn't written in perl6, is it? :)
lue BenGoldberg: 25 does nothing for me :/ 00:14
BenGoldberg It turns off blink :) 00:15
ingy timotimo: crapped out on Task/Factors-of-a-Mersenne-number Icon section 00:16
this always happens
sloppy wiki editing breaks the Script
timotimo :( 00:17
lue: what should the behavior be if you specify some value other than True to the pair for :p5? 00:19
in no warnings, i mean
oh, actually :p5 turns into a pair object with the value Mu o_O
lue no warnings :!p5 == I like making useless statements. :) 00:20
timotimo that gives me a value of Mu, too o_O 00:21
lue == use warnings :p5 , to be more serious
Are you sure arglist case of use actually works in Rakudo? :) 00:22
timotimo well ... 00:23
kind of?
00:24 dpk joined
dpk hey everyone 00:24
sorry for yoleaux's extended absence
do you still want him here? 00:25
and: remind me if there's a prefix in here to disable logging that yoleaux should respect, please 00:26
(do you use [off] or # or something?)
BenGoldberg preflex: seen yoleaux
preflex yoleaux was last seen on #perl6 80 days, 5 hours, 4 minutes and 30 seconds ago, saying: 18:23Z <diakopter> Mouq: awesome work on stdsigspace Mouq++
BenGoldberg .ping
yoleaux There is no ping command; nor can this be construed as a response.
BenGoldberg We've certainly missed yoleaux, or at least, I have 00:27
dpk .private-prefix [off]
yoleaux dpk: OK, private-prefix for #perl6 set to '[off]' with paranoid mode off.
timotimo oh that's neat
lue dpk: we've been using preflex to leave messages in the interim, but we've missed the other stuff it does, esp. the .u option :)
.u ☃
yoleaux U+2603 SNOWMAN [So] (☃)
dpk :-) 00:28
BenGoldberg .u 2014
yoleaux U+2014 EM DASH [Pd] (—)
lue well, the "esp. .u" is for me at least :)
BenGoldberg r: say "Happy ", "—".ord
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«Happy 8212␤»
lue BenGoldberg: quit time-hopping. 00:29
BenGoldberg oops
TimToady .u 🐩💩
yoleaux U+1F429 POODLE [So] (🐩)
U+1F4A9 PILE OF POO [So] (💩)
BenGoldberg r: say "Happy ", "—".ord.hex
camelia rakudo-jvm eb1aa5: OUTPUT«No such method 'hex' for invocant of type 'Int'␤␤»
..rakudo-parrot eb1aa5: OUTPUT«No such method 'hex' for invocant of type 'Int'␤ in block at /tmp/pbGSa18DDO:1␤␤»
timotimo r: sub test(*%kwarg) { say %kwarg; return (1, 2, 3, 4) }; test[2]:foo
camelia rakudo-parrot eb1aa5: OUTPUT«().hash␤Unexpected named parameter 'foo' passed␤ in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2347␤ in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2313␤ in block at /tmp/6wqXGLdCSK:1␤␤»
..rakudo-jvm eb1aa5: OUTPUT«().hash␤Unexpected named parameter 'foo' passed␤ in sub postcircumfix:<[ ]> at gen/jvm/CORE.setting:2337␤␤»
timotimo r: sub test(*%kwarg) { say %kwarg; return (1, 2, 3, 4) }; test[2] :foo
camelia rakudo-jvm eb1aa5: OUTPUT«().hash␤Unexpected named parameter 'foo' passed␤ in sub postcircumfix:<[ ]> at gen/jvm/CORE.setting:2337␤␤»
..rakudo-parrot eb1aa5: OUTPUT«().hash␤Unexpected named parameter 'foo' passed␤ in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2347␤ in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2313␤ in block at /tmp/zTcM4TMmMt:1␤␤»
lue r: say "Happy ", "—".ord.base(16) 00:30
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«Happy 2014␤»
lue BenGoldberg: ^
(though if you want, say, leading zeros, you'd need .fmt("%02X") and such)
dalek kudo/moar-support: eeca2f1 | jonathan++ | src/ (3 files):
Partially fix p6isbindable on sigs with 'where'.

Fixes one of the tests that runs into the issue, but seemingly not the other.
00:32
00:33 rurban1 joined
timotimo should no warnings :p5 turn off this warning, too? 00:33
BenGoldberg has trouble imagining a need for leading zeros on the year
timotimo r: say :foo<>
camelia rakudo-jvm eb1aa5: OUTPUT«Potential difficulties:␤ Pair with <> really means an empty list, not null string; use :foo('') to represent the null string,␤ or :foo() to represent the empty list more accurately␤ at /tmp/cIOonKqWNF:1␤ ------> say :foo<>⏏…»
..rakudo-parrot eb1aa5: OUTPUT«Potential difficulties:␤ Pair with <> really means an empty list, not null string; use :foo('') to represent the null string,␤ or :foo() to represent the empty list more accurately␤ at /tmp/CnW8mJbNnA:1␤ ------> say :foo<>…»
lue BenGoldberg: that was just a general statement on when .base() is and isn't useful. 00:34
BenGoldberg :)
timotimo also, that octal prefix thing is the only one i can find that makes sense to get the p5 warning treatment
00:35 btyler left
lue timotimo: check X::Obsolete 00:35
timotimo ah, right
00:36 lysobit joined
lue Not that you should just block X::Obsolete; there might be non-P5-isms that use it too. 00:36
00:36 lysobit left
timotimo nah, there's obs, sorryobs and worryobs 00:37
i should only block worryobs
except that's not used even once :)
all other obsoletion problems are deadly
lue Maybe there's should be an X::Obsolete::P5 if it's too hard to block the buggers :) 00:38
timotimo gist.github.com/timo/0fbbe912e59722e1b8eb 00:39
jnthn dinner &
lue timotimo++ # maybe you'll accidentally implement all of 'no warnings' in the process? :P 00:40
timotimo probably not 00:41
it may be easy, though ;)
i think i'll just push it, aye?
actually, a spectest won't hurt
lue Yeah, though my senses are telling me perhaps in a non-main branch. I'm not an expert on rakudo's conventions with git though. 00:42
timotimo sure, doesn't make a big difference to me :)
so long as somebody ends up merging it before too long :P
dalek kudo/no_p5_warnings: d347325 | (Timo Paulssen)++ | src/Perl6/Grammar.nqp:
with "no warnings :p5", don't complain about 05 as not octal
00:43
lue At least until you get no warnings :p5; working I'd say. I don't want to accidentaly write warning-less code with 'no warnings' 00:44
timotimo ... but that already works?
lue Oh, your gist suggested otherwise.
timotimo it did?
oh, oops, yeah 00:45
gimme a sec and i'll revise it :)
lue can't wait for all the P5 warnings to be blocked by 'no warnings :p5', unless that's done too.
timotimo there you go
well, all other p5 warnings i found were actually fatal, so can't be blocked 00:46
lue Huh. Well, I in any case don't want to be told I've been victim of a P5-ism when I in fact don't know them. 00:47
timotimo feel free to send suggestions my way
lue There'll probably be some error-message-changing, the way I see it. I basically want to tell the compiler "I don't know Perl 5. Don't bring it up when I mess up. $, means I mis-typed, not that I'm thinking in P5 terms." 00:49
00:49 rurban1 left
timotimo ah, that's interesting, too 00:49
r: if (1) { ... } elif (2) { ... } 00:50
camelia rakudo-parrot eb1aa5: OUTPUT«===SORRY!=== Error while compiling /tmp/de7veJcehx␤In Perl 6, please use "elsif' instead of "elif"␤at /tmp/de7veJcehx:1␤------> if (1) { ... } elif ⏏(2) { ... }␤ expecting any of:␤ argument list…»
..rakudo-jvm eb1aa5: OUTPUT«===SORRY!=== Error while compiling /tmp/PG5TUE1zb6␤In Perl 6, please use "elsif' instead of "elif"␤at /tmp/PG5TUE1zb6:1␤------> if (1) { ... } elif ⏏(2) { ... }␤ expecting any of:␤ argument list␤ …»
timotimo well, you see how i've made it work, you could go ahead and do some changes yourself :P 00:51
lue Yeah :) I just need to fill out that CLA... (I *could* just set up a PR thing, but I'd rather just have access to the repo itself) 00:52
00:52 rurban1 joined
timotimo sure, that was pretty easy in my case at least :) 00:52
there were just three test files that aborted with "outdated version of Perl6::Grammar" wat.
00:52 beastd left
timotimo or was that "src/Perl6/Grammar.nqp"? 00:52
lue My first thought is to give .obs and friends a new argument, which would be the "P5-less warning" 00:54
dalek kudo/no_p5_warnings: 9c241ed | (Timo Paulssen)++ | src/Perl6/Grammar.nqp:
error out on unknown module for "no ..."
00:55
lue though there's also the option of hiding <.obs> messages and their triggers behind a "if $*PERL5_WARNINGS" or whatever, and let the parser give me the true P6 error. 00:56
timotimo sure
FWIW, it would be cool to have modules for different languages that make sensible suggestions based on what language(s) you're coming from :P
lue use warnings :FORTRAN 00:57
timotimo "can't import this name (did you mean to use 'use' instead?"
00:57 dpk left
lue timotimo: actually, if we want to do that, then perhaps we need a new module/pragma/thing. 'use fromlang :cpp' or something. 00:58
timotimo yeah
lue Kinda jumps out the realm of 'warnings' I'd think.
timotimo yes
that's why i said "have modules" 00:59
00:59 ajr_ left
timotimo i'm driving home now 00:59
lue Yeah, but I was thinking of modules being able to attach new arglists to an existing command, like 'use warnings :FORTRAN' or 'use fromlang :APL', and suggesting a different name to attach them to.
drive safe timotimo o/ 01:00
lue wonders if the P5 warnings/errors would be better implemented as a module loaded by default if such a reform happens, instead of a built-in-to-the-grammar feature. 01:01
thou It depends not on the module being written, but on the person sitting behind the keyboard. So more likely to be used as a command-line option than checked in, perhaps?
s/checked in/hard-coded in the file/
lue thou: sure. It's called perl6 -MFromLang::FORTRAN :D 01:02
Actually, I wonder how you would add a new arglist to an existing module name... "augment module warnings;" ?
01:03 jnap left
lue FROGGS: could/would I use "augment module warnings;" if I wanted to add :foo to the possible arglist items of warnings? ("use warnings :foo" then) 01:05
01:06 Alina-malina left 01:07 Alina-malina joined
timotimo arrived 01:17
lue timotimo: Just poking around in the source code, transforming the one <special_variable> (within an alternation) in Grammar.nqp to if $*P5_WARNINGS { <special_variable> } (or however it's done) is enough to block off a slew of P5-isms :) 01:19
01:20 berekuk left
lue r: say @: ; 01:20
camelia rakudo-jvm eb1aa5: OUTPUT«===SORRY!=== Error while compiling /tmp/9CTf2VsCGD␤Unsupported use of @: variable␤at /tmp/9CTf2VsCGD:1␤------> say ⏏@: ;␤ expecting any of:␤ argument list␤ prefix or term␤ prefix o…»
..rakudo-parrot eb1aa5: OUTPUT«===SORRY!=== Error while compiling /tmp/Qn3sIt_LBj␤Unsupported use of @: variable␤at /tmp/Qn3sIt_LBj:1␤------> say ⏏@: ;␤ expecting any of:␤ argument list␤ prefix or term␤ prefi…»
timotimo hmm
lue The errors resulting would look however they do for non-P5-related malformed sigil usages.
01:25 skids joined 01:27 rurban1 left 01:28 rurban1 joined
lue imagines the non-P5 error for <> would be "ambiguous use of wordlist operator. Please use () or < > for an empty list, or '' for a null string." 01:28
clsn Made signature matching match sub-signatures... and then thought about it... I think sub-signatures should not be matched. 01:40
Does that make sense? 01:41
lue &
01:46 BenGoldberg left
clsn sends in a bunch of the Rakudobugs he's been noticing and whining about here without submitting them. 02:00
japhb When comparing signatures, I see three use cases: 1) Are these two the same signature object? (should Just Work with ===, IIRC), 2) Are these two signatures equivalent, if not the same object? (I would expect eqv to do this), 3) Will these two signatures accept exactly the same spaces of arguments, or at least, that one is a true subset of the other? (I would expect .ACCEPT to do this.) 02:01
timotimo clsn: why are your rakudobugs always so hard? :(
clsn The way I see it, signature A should ACCEPT signature B iff any argument-string that works for B also works for A. To the extent that is determinable (we can't deal with constraints, for example). 02:02
japhb Sure
clsn But I don't think the return values enter into the picture, and I'm thinking that subsignatures also don't.
japhb Well -- except that subsignatures must be bindable as well, no? 02:03
clsn I've been working on Signature.ACCEPT; it's complicated (what about :a(:b($x)) vs :a($x), :b(x)? They don't match, but you have to detect it)
timotimo TimToady was just here about an hour ago or so :)
colomon clsn++ 02:04
02:04 jnap joined
japhb Yes, definitely clsn++ for this work 02:04
clsn But do the subsignatures necessarily mean anything? Suppose I had :(Dog $d (Int $height, Rat $weight)). That matches a Dog object, and binds its height and weight attributes, I think. But I could also have :(Dog $x (Str $name)). It still just matches a Dog object! Both signatures would take the same arguments. 02:05
I've also been working on Parameter.perl and Signature.perl. They're hairier than they look. 02:06
Thanks, guys.
timotimo \o/
clsn++ 02:07
clsn Hmm, maybe I'm not understanding what subsignatures do after all... 02:10
No, I think I'm using it right and Rakudo doesn't follow the spec yet... At least this part.
timotimo subsignatures can also go into deciding about multiness, no? 02:11
smls r: say (255, 255, 0)>>.base(16)>>.fmt("%02s").join; 02:12
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«FFFF00␤»
smls nice :)
timotimo er
r: say (255, 255, 0).fmt("%02x") 02:13
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«ff ff 00␤»
timotimo oh. not quite.
r: say (255, 255, 0)>>.fmt("%02x").join
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«ffff00␤»
smls ok, you win :)
even nicer
clsn r: class Dog { has Str $.name }; sub f(Dog $d (Str $name)) { say $name; }; my $fido=Dog.new(name=>"Fido"); f($fido);
timotimo happy to help :)
camelia rakudo-jvm eb1aa5: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature of parameter $d␤␤»
..rakudo-parrot eb1aa5: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature of parameter $d␤ in sub f at /tmp/PmESWyKB42:1␤ in block at /tmp/PmESWyKB42:1␤␤»
clsn As I read S06, that should work.
timotimo clsn: that needs to be a named parameter in the subsignature 02:14
clsn Not according to S06...
timotimo oh?
[Coke] r: $foo:: = 42;
camelia rakudo-jvm eb1aa5: OUTPUT«===SORRY!=== Error while compiling /tmp/Qnwkkvamra␤Variable '$foo' is not declared␤at /tmp/Qnwkkvamra:1␤------> $foo::⏏ = 42;␤ expecting any of:␤ postfix␤»
..rakudo-parrot eb1aa5: OUTPUT«===SORRY!=== Error while compiling /tmp/ATph_tuumB␤Variable '$foo' is not declared␤at /tmp/ATph_tuumB:1␤------> $foo::⏏ = 42;␤ expecting any of:␤ postfix␤»
clsn sub traverse ( BinTree $top ( $left, $right ) ) ... In this, $left and $right are automatically bound to the left and right nodes of the tree. If $top is an ordinary object, it binds the $top.left and $top.right attributes. If it's a hash, it binds $top<left> and $top<right>.
[Coke] ^^ pick a test file for that? 02:15
timotimo give me a direct link?
ah there
clsn (^^ quote from S06)
timotimo yeah, weird.
clsn Otoh, something like :([Int $a, Str $b]) is also a subsignature, and maybe a sensible one.
timotimo it doesn't seem like that example would be correct 02:16
clsn yeah, :([Int, Str]) works. 02:17
r: sub f([Int $a, Str $b]) { say "$a, $b" }; f([7,"x"])
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«7, x␤»
clsn That works fine.
r: sub f([Int $a, Str $b]) { say "$a, $b" }; f([7,8]) 02:18
camelia rakudo-jvm eb1aa5: OUTPUT«Nominal type check failed for parameter '$b' in sub-signature␤␤»
..rakudo-parrot eb1aa5: OUTPUT«Nominal type check failed for parameter '$b'; expected Str but got Int instead in sub-signature␤ in sub f at /tmp/WCnEN4LRzN:1␤ in block at /tmp/WCnEN4LRzN:1␤␤»
clsn And that is correctly rejected for sub-signature failure. So maybe I should be matching sub-signatures.
02:19 slavik left
clsn Hmm... It does work if you use named arguments, but you need to have them all or use a slurpy. 02:20
r: class Dog { has Str $.name }; sub f(Dog $d (Str :name($n))) { say $n; }; my $fido=Dog.new(name=>"Fido"); f($fido); 02:21
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«Fido␤»
clsn But if Dog is bigger...
r: class Dog { has Str $.name; has Int $.height }; sub f(Dog $d (Str :name($n))) { say $n; }; my $fido=Dog.new(name=>"Fido", height=>181); f($fido);
camelia rakudo-jvm eb1aa5: OUTPUT«Unexpected named parameter 'height' passed in sub-signature of parameter $d␤␤»
..rakudo-parrot eb1aa5: OUTPUT«Unexpected named parameter 'height' passed in sub-signature of parameter $d␤ in sub f at /tmp/aLJZUzNnQX:1␤ in block at /tmp/aLJZUzNnQX:1␤␤»
clsn It's an extra param. You either need to make sure you have _all_ the has-es, or else use a slurpy. 02:22
r: class Dog { has Str $.name; has Int $.height }; sub f(Dog $d (Str :name($n), *%_)) { say $n; }; my $fido=Dog.new(name=>"Fido", height=>181); f($fido);
camelia rakudo-parrot eb1aa5, rakudo-jvm eb1aa5: OUTPUT«Fido␤»
clsn I guess maybe I should leave sub-signature matching in.
02:26 smls left 02:32 slavik joined
[Coke] moritz: is rt.perl.org/Ticket/Display.html?id=112216 really settled enough to need a test yet? 02:32
02:34 jeffreykegler is now known as idiosyncrat 02:35 idiosyncrat is now known as jeffreykegler
dalek t--IRC/concurrency: b8c4bc2 | (Geoffrey Broadwell)++ | docs/ (2 files):
Fix minor doc typos
02:40
02:45 ilbot3 left
dalek kudo/nom: 536cb03 | coke++ | t/spectest.data:
Run passing test file
02:47
kudo/nom: 65e0393 | coke++ | t/spectest.data:
Run passing test file
02:56
[Coke] we could definitely use more eyes on RT. :| 03:01
03:03 dayangkun left 03:11 rylinaux left 03:16 dayangkun joined, rylinaux joined, rylinaux is now known as Guest80723 03:23 Guest80723 left 03:28 treehug88 joined
jnthn [Coke]++ 03:30
03:32 rylinaux_ joined
TimToady ilbot3 failure... 03:40
03:41 jnap left 03:43 rindolf joined
dalek ast: 5b745a5 | coke++ | S03-operators/custom.t:
add new test file for RT#112234
03:53
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=112234
dalek kudo/nom: 4f66cec | coke++ | t/spectest.data:
run new test file
03:54
[Coke] makes it up to 7 closed RTs today. 03:55
rakudo has 740 tickets. 03:56
r: print
camelia ( no output ) 03:57
dalek kudo/moar-support: 006e107 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Need to clone capture on MoarVM also.

Fixes S14-roles/parameterized-basic.t.
03:58
04:01 perigrin left
dalek kudo/moar-support: d09f92d | jonathan++ | src/vm/moar/ops/perl6_ops.c:
Add sanity check to avoid segfault.
04:01
04:11 jnap joined 04:13 rurban1 left 04:15 preflex_ joined, ChanServ sets mode: +v preflex_, preflex left, preflex_ is now known as preflex 04:16 jnap left
dalek p: 9431f78 | jonathan++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Convey frame name as is, even if empty.
04:18
04:18 perigrin joined
[Coke] jnthn: isn't it super late where you are? 04:22
jnthn [Coke]: 10:20pm
[Coke]: Oh...I'm not in Europe this week :) 04:23
dalek kudo/moar-support: 0e90c73 | jonathan++ | src/core/terms.pm:
Enable $*TMPDIR on Moar, now it doesn't blow up.
04:29
04:38 nnunley left
dalek pan style="color: #395be5">perl6-examples: 5f415ce | (Shlomi Fish)++ | euler/prob028-shlomif.pl:
[Euler] Add solution for Euler #028.
04:46
04:54 rindolf left 04:56 treehug88 left 05:12 jnap joined 05:16 jnap left 05:25 [Sno] left 05:37 berekuk joined
JimmyZ where is the irclog bot ... 05:39
05:41 jeffreykegler left 06:02 kaare_ left 06:03 kaare_ joined 06:12 jnap joined 06:17 SamuraiJack joined, jnap left 06:27 [Sno] joined 06:37 thou left 06:49 filly joined 07:01 eternaleye left 07:02 eternaleye joined 07:09 berekuk left 07:13 jnap joined 07:14 berekuk joined 07:18 jnap left 07:22 FROGGS left, lue left 07:37 darutoko joined 07:56 FROGGS joined 08:02 jeffreykegler joined, mberends left, berekuk left 08:04 filly left 08:11 zakharyas joined 08:14 jnap joined 08:19 jnap left 08:25 raydiak left, raydiak joined
FROGGS moritz: you have write access here? github.com/colomon/uri/pulls 08:31
08:33 jeffreykegler left 08:43 FROGGS[mobile] left 08:47 mberends joined
moritz FROGGS: merged, thanks 08:55
moritz should build a perl6-p to test and fix some more modules 08:57
09:01 LLamalessRider joined 09:02 sqirrel joined 09:06 dmol joined 09:12 haavik joined, kaleem joined
moritz mkdir /home/moritz/p6/rakudo/install/languages/perl6/lib: File exists at /home/moritz/perl5/perlbrew/perls/perl-5.18.1/lib/5.18.1/ExtUtils/Command.pm line 288. 09:14
make: *** [j-install] Error 17
something created /home/moritz/p6/rakudo/install/languages/perl6/lib as a regular file 09:15
09:15 jnap joined
FROGGS uhh 09:15
hoelzro ahoy #perl6
FROGGS o/
moritz a moarvm bytecode file, to be exact
I'm pretty sure that's not supposed to happen :-)
FROGGS moritz: how new is its mtime?
moritz Jan 03 09:16
09:19 sftp left, sftp joined 09:20 jnap left
FROGGS hmmm, I just can guess that Test.moarvm or lib.moarvm landed there as lib 09:20
09:22 FROGGS[mobile] joined 09:23 LLamalessRider left
hoelzro did anyone see my question about fixed-size arrays last night? 09:23
FROGGS I saw it but I have no answer for you 09:24
hoelzro ex. my @array[10] := MySpecialArray.new 09:25
^^ repeat
I would assume that they're incompatiable
*incompatible
if so, then I know how I can try and impl fixed-size arrays
09:26 denisboyun joined, aindilis left
hoelzro so I just tried the following: 09:27
my $fh = open 'shasums', :r; say $fh.lines[0]; say $fh.lines[0];
and the output differs
I understand that lines is a List 09:28
but shouldn't accessing each element via index return the same result?
either that, or I don't really understand Lists
09:29 jeffreykegler joined 09:30 jeffreykegler left 09:33 dakkar joined
FROGGS p: say lines[0]; say lines[0] 09:35
camelia rakudo-parrot 4f66ce: OUTPUT«Stille Nacht! Heilige Nacht!␤Alles schläft; einsam wacht␤»
FROGGS I guess lines() is supposed to shift
so you can do: while lines() -> $line { ... }
09:40 hummeleBop joined
tadzik cah uil> 09:40
hrm
FROGGS ? 09:41
tadzik wow, I wrote "can you?" so that about 3/4 of it is typos
moritz FROGGS: no, I guess that's not the background
thing is, lines() is a lazy list, and its generator advances a file handle
so if you only use up the first one, calling lines() again will start off where the previous one left 09:42
09:44 telex left 09:49 telex joined
hoelzro ooooooh 09:50
thanks for pointing that out mortiz
*moritz
wow, I somehow failed even with tab completion
tadzik it's a topy day
hoelzro you can ask a list if it's lazy, right? 09:51
tadzik why would you need to do that?
hoelzro well 09:52
I opened a 400,000 line file
and bound $fh.lines to @lines
the REPL helpfully started to print every damn line
tadzik haha
hoelzro avoiding that was the reason I bound it in the first place =)
so I was thinking it would be nice if the REPL had special behavior for lazy lists 09:53
tadzik well, you can always: my @a = lines(); 1; 09:54
but yeah, it would be nice if REPL was smarter 09:55
maybe lazy lists could just .gist-ify to the reified part, and then "..."
hoelzro that's what I ended up doing
tadzik: yes, that
exactly that
tadzik would be niec
hoelzro tadzik++ # sanity
tadzik damnit, typose
aaargh 09:56
hoelzro hahahhaa
someone's getting a visit from the typo fairy!
tadzik must be this staying up all night watching DS9
hoelzro fuck yes 09:57
DS9++
tadzik Worf appeared
hoelzro I just started watching it again myself
tadzik I'm not half as excited as when Riker appeared in one episode, but it's still nice
I found TNG characters to be a lot deeper
but I think I started to fully appreciate it once I was done with the entire series :) 09:58
FROGGS tadzik: is that season three or four? 10:01
ohh, you are talking about Thomas Riker, right?
10:01 pecastro joined
hoelzro honestly, I think the TNG characters are deeper 10:03
at least, some of the DS9 characters started to piss me off in the later seasons 10:04
FROGGS hmmm, I enjoyed both... but it took me a while to like DS9 10:05
tadzik FROGGS: Worf appears in 4th
FROGGS: dude, shhh! 10:06
FROGGS for example, the "I feel pain"-Diana sort of pissed me off too
hoelzro haha
I can...empathize with you there
tadzik Things that never happen in Star Trek: Deanna states something that isn't blatantly obvious
hoelzro finishes putting on sunglasses
tadzik hoelzro: something for you to save for later: (•_•) -> ( •_•)>⌐■-■ -> (⌐■_■) 10:07
hoelzro ah, thank you
I was too lazy to look it up myself
tadzik or I can nopaste you my entire ~/fatfaces 10:08
hoelzro sure, why not
FROGGS (⌐■_■) <--- can't we put a combining character there after the opening parenthesis?
tadzik I dunno
hoelzro: gist.github.com/anonymous/8416091 10:09
hoelzro sweet
whoa, that table toss is sweet 10:10
are lists the only lazy type in Perl 6? 10:12
I was thinking a lazy string type could also be handy 10:13
ex. if you have a Socket and you're parsing the stream as it's coming in 10:14
tadzik lazy strings :) 10:15
10:16 jnap joined
FROGGS a Socket makes me think of a buf or Blob or whatever it is called 10:16
tadzik blub
FROGGS because you might geht a chunk that ends in the middle of a utf8 multibyte thingy
it would explode as a string 10:17
tadzik yup
hoelzro hmm 10:18
good point
so maybe you get a lazy buf
10:20 jnap left
FROGGS and its buf.bytes would be Inf? 10:21
hmm, no
it just would be .infinite
(the buf, not its .bytes)
and it would stop being .infinite when the handle is closed? 10:22
hoelzro seems reasonable 10:23
10:23 daniel-s_ joined
tadzik or undefined 10:23
11:07 fhelmberger joined
masak good noon, #perl6 11:08
11:11 daniel-s_ left
FROGGS o/ 11:11
11:16 jnap joined 11:21 jnap left
hoelzro ahoy masak 11:24
mathw good not-quite-noon-here-yet #perl6 11:39
arnsholt o/ 11:43
11:44 LLamalessRider joined, LLamalessRider is now known as LLamaRider 11:46 LLamaRider left, LLamaRider joined 11:51 rindolf joined
dalek p: 6d42937 | (Arne Skjærholt)++ | src/vm/parrot/6model/reprs/CStruct.c:
Fix (very) outdated error message.
11:53
12:02 Koma joined 12:12 atroxaper joined
dalek p: d70f835 | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/ (4 files):
Move ArgType from NativeCallBody to NativeCall.
12:16
12:16 rurban1 joined 12:17 jnap joined 12:21 jnap left 12:29 telex left 12:32 telex joined
arnsholt Is there a way to get Rakudo/JVM to dump the -Java- stack trace on error? 12:33
It'd make debugging my JVM stuff so much easier 12:34
[Coke] --ll-exception might get you root cause, but probably not full stack. 12:47
12:52 grondilu joined
grondilu r: say pi.fmt("%+f") 12:52
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«3.141593␤»
grondilu eval: printf "%+f", 3.14 12:53
$ perl -wE 'printf "%+f\n", 3.14;'
+3.140000
arnsholt Yeah --ll-exception just gets me the full gory details of the Perl-level stack 12:54
grondilu was expecting the + sign with .fmt("%+f")
n: say pi.fmt("%+f")
camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: invalid format specifier␤ at /home/p6eval/niecza/lib/CORE.setting line 1403 (sprintf @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 750 (Cool.fmt @ 4) ␤ at /tmp/bKp7gC38Ly line 1 (mainline @ 3) ␤ at /home/p6eval/n…»
13:03 skids left 13:07 bibifuc_ joined
bibifuc_ hello #perl6 13:08
moritz: irclog.perlgeek.de/perl6/ is not updated anymore, is there a problem with the new log bot? 13:09
13:18 jnap joined 13:22 jnap left
timotimo hoelzro: you'll be happy to know, that a lazy string type is planned, it's called Cat 13:31
hoelzro heh 13:32
tadzik we should also have Sloths. Maybe like in Qt, Signals and Sloths 13:33
hoelzro haha
tadzik (☞゚ヮ゚)☞ 13:35
13:39 ajr joined 13:40 ajr is now known as Guest6419, Guest6419 is now known as ajr_, ilbot3 joined
moritz bibifuc_ seems like, yes :( 13:40
timotimo aaw :( 13:41
moritz: can the irclog website offer data it shows as html in json form, too?
moritz timotimo: yes 13:42
timotimo does it already?
moritz timotimo: just send an Accept: application/json header to the usual pages
s/pages/URLs/
timotimo does it work on the channel overview pages and the whole overview, too? :D
i need an extension for my browser that allows me to fiddle with headers like that :|
moritz it should.
why do you want json in your browser? 13:43
timotimo development purposes and generally trying things for fun :)
bibifuc_ irclog is back, thanks! 13:44
moritz it seems that ilbot3 isn't robust to network errors yet :( 13:45
13:50 denisboyun left, treehug88 joined 13:51 stevan_ left
timotimo moritz: could the overview page of a channel also output the amount of activity for each day, rather than just the urls? 13:53
moritz timotimo: would be possible, though the activity isn't always available as a precise number 13:54
timotimo ah? how imprecise is it? 13:55
moritz it's never available for today, and sometimes not available for yesterday 13:56
timotimo oh well, never mind then :P
this "advanced rest client" for chrome seems like a pretty powerful tool 13:58
especially nice tidbit: for the output it offers a "parsed" tab where it pretty-prints json for example
13:58 treehug88 left
timotimo and it remembers all the things you have 13:58
moritz timotimo: if you want to patch it to include the imprecise activiy numbers, lib/Ilbot/Frontend/JSON.pm in the moritz/ilbot repo is the place to go 14:00
14:05 zakharyas left 14:06 treehug88 joined
timotimo hm, this postman application is apparently also pretty good 14:10
14:11 Koma left 14:19 jnap joined
grondilu thinks sub ζ($s) { (state %){$s} //= [+] map * **-$s, 1..* } is probably the coolest function he's ever written on Rosetta code. Lots of Perl6 features in very few characters :) 14:21
(it's from rosettacode.org/wiki/Sum_of_a_series#Perl_6) 14:22
14:23 jnap left 14:24 treehug88 left, jnap joined 14:31 skids joined 14:37 kivutar joined 14:38 kbaker joined
TimToady state %{Int} might be better 14:43
but maybe not, depending on how an Int hashes :) 14:44
14:48 jeffreykegler joined
mathw tries to comprehend that, spends the next hour picking brain off the walls 14:48
14:48 jeffreykegler left
[Coke] flowingdata.com/2014/01/14/lexical-...languages/ for the language folks. 14:52
FROGGS sehr interessant! 14:54
tadzik muy interesante
FROGGS ohh, I mean "very interesting!" :o)
colomon someone needs to implement "is cached" in Rakudo so grondilu can stop using state everywhere 14:57
14:57 kaare_ left
FROGGS hehe -> flowingdata.com/2013/09/03/most-pop...-by-state/ 14:58
grondilu "cached" would be a nice trait to have indeed
but the problem with "cached" is that you need a generic way to create the key from the signature. That's not trivial, is it? 14:59
dalek Heuristic branch merge: pushed 125 commits to nqp/loop_labels by FROGGS 15:01
15:02 thou joined, btyler joined 15:03 treehug88 joined
grondilu (not to mention that for multi subs you may need several caches) 15:04
mathw maybe you could pass something to the trait to help it out 15:06
timotimo FROGGS: you're working on loop labels again \o/
FROGGS timotimo: yes, currently trying to get them working on jvm backend 15:07
dalek kudo-star-daily: a898b92 | coke++ | log/ (5 files):
today (automated commit)
timotimo that makes me happy :) 15:08
[Coke] \o/ lots of deprecation warnings gone.
timotimo if you have simple questions about jvm bytecode gen, i may be able to help you out a bit
15:08 sqirrel left
[Coke] looks like DBIsh is the only one left. 15:08
er, DBIish 15:09
FROGGS ahh, now I understand this "called at" list...
[Coke] FROGGS: you fixed eval in the code, but it's all over the test suite, also. 15:10
FROGGS [Coke]: yeah... I will PR that later if no one beats me to it
[Coke] FROGGS++ # awesome 15:11
3 more RTs to close out my quest.
gameification++
timotimo \o/ 15:13
15:18 rurban1 left
colomon This is his quest, to close those RTs; no matter how hopeless... 15:18
[Coke] colomon: turns out half of them just needed to be closed. easy peasy. 15:19
Someone else should try to close 10! ;)
timotimo you could suggest that as a stencil 15:21
15:24 zakharyas joined
[Coke] only people in this channel are going to do it. :P 15:25
15:27 kaleem left
timotimo people on this channel are going to benefit from gamification, still. 15:28
[Coke] I can't get to the perl realm. clicking on realms takes me to the a news feed rather than the realm choices. 15:32
ah. wrong button 15:33
timotimo: "hey timo, make that a stencil, will you"
(you're on teh list of people to ask)
timotimo er, i am? 15:38
oops :)
[Coke] you're a player. 15:39
questhub.io/realm/perl/quest/512211...a53a000029 - an ovid perl 6 quest
timotimo you need to ask the "realm keepers" on the left
masak is one of them, for example
masak I am? what does that mean? :) 15:41
some kind of admin?
timotimo you can create stencils, for example :)
masak admires his new superpower 15:42
creating... STENCILS... out of thin air.
15:42 ajr_ left
masak train & 15:43
tadzik Carl the Conjurer
or Conjuror
15:43 ajr joined 15:44 ajr is now known as Guest70682, Guest70682 is now known as ajr_
PerlJam how do people become a "realm keeper"? Maybe Coke should apply :) 15:45
timotimo they ask berekuk, i guess 15:46
jnthn arnsholt: I typically dump the backtrace in dieInternal or so.. 15:47
[Coke] PerlJam: you want to be an RT bugadmin? :P
timotimo r: my @data = 1,␤2,␤,␤,␤5,␤; say @data.perl; 15:57
camelia rakudo-jvm 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/o9tS_vheTp␤Preceding context expects a term, but found infix , instead␤at /tmp/o9tS_vheTp:3␤------> ,⏏<EOL>␤»
..rakudo-parrot 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/rgalVHz09r␤Preceding context expects a term, but found infix , instead␤at /tmp/rgalVHz09r:3␤------> ,⏏<EOL>␤»
timotimo r: my @data = 1,␤2,␤5,␤; say @data.perl;
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Array.new(1, 2, 5)␤»
timotimo mhm mhm
FROGGS Perl 5 accepts things like "my %hash = (1, 2, 3,=>4)", I implemented that yesterday in v5 16:01
16:01 treehug88 left
FROGGS I just made it collapse /[ \s* ',' | \s* '=>']/ to a single ',' or '=>' 16:02
m| ']/' | ']/+' | 16:03
16:03 Psyche^ left
timotimo hehe 16:03
i was just curious how far trailing comma in perl6 is taken
16:03 Psyche^ joined
timotimo hm. list comprehensions in perl6 ... 16:05
there's something sort of like it, but i don't recall seeing a nice compact description of it
how does nesting work, how does filtering work, how does mapping inside it work 16:06
tadzik I never got the idea of list comprehensions. I always see them as a poor excuse for map()
timotimo r: my @input = <hi there how are you>; my @output = $_.uc if $_.chars %% 2 for @input; say @output; 16:07
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«HI␤»
timotimo r: my @input = <hi there how are you today my good friend>; my @output = $_.uc if $_.chars %% 2 for @input; say @output;
tadzik em, poor ersatz
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«FRIEND␤»
timotimo r: my @input = <hi there how are you today my good friend>; my @output = ($_.uc if $_.chars %% 2 for @input); say @output;
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«HI MY GOOD FRIEND␤»
timotimo fair enough
i may even blug about this?
grondilu timotimo: consider writing .foo instead of $_.foo 16:10
skids even that use of for loop is no longer lazy, correct? 16:12
arnsholt jnthn: Oh, that'll work yeah. Cheers! 16:16
tadzik arnsholt!
arnsholt That's me =)
tadzik I need help with NativeCall, it's acting silly
gist.github.com/tadzik/8408820 16:17
it says "cannot load library", while it's clearly there
gist.github.com/tadzik/8409006 that's the code, which works for timotimo alright, but it fails on both my laptop and my work machine
arnsholt Both of you on Linux? 16:18
16:19 rurban1 joined
tadzik yeah 16:19
arnsholt sdlwrapper.so, is that a lib you've written, or thirdparty? 16:20
tadzik I've written
it's in the second gist
arnsholt Oh, right
tadzik running 'test.pl' compiles sdlwrapper.c into sdlwrapper.so, in the same way that zavolaj's testsuite does 16:21
arnsholt Oh, right. I see it now
16:23 kivutar left
arnsholt Just a sec. I have to install SDL-dev first 16:23
16:24 rurban1 left
tadzik okayo 16:24
arnsholt Good news is I get the same error as you
tadzik great! :)
arnsholt Bad news is I have to make dinner before I can dig into this =)
tadzik no hurry :)
arnsholt I have hacking time tonight though, so with luck I'll be able to figure it out
tadzik thanks! 16:25
16:25 [Sno] left 16:34 treehug88 joined 16:36 bjz joined
timotimo hm, i remember something about TheDamian having some time to spend on perl6, did i miss something? 16:37
16:38 bbkr left 16:47 spider-mario joined 16:48 zakharyas left
FROGGS java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: 40 16:55
clearly, I am not a JVM expert when it comes to write ops
16:55 kaleem joined
FROGGS tadzik: that sdlwrapper.so is not linked against libSDL 16:56
arnsholt Oh, good point! 16:58
masak timotimo: when was this? 16:59
arnsholt tadzik: What FROGGS said 17:01
I wrote a small test script that tries to load the lib, and it fails. dlerror(3) returns: "sdlwrapper.so: undefined symbol: SDL_SetVideoMode" 17:02
tadzik: Add -lSDL all the way at the end of $l_line and it works on my machine 17:06
FROGGS arnsholt: confirmed 17:10
17:10 kaleem left 17:11 FROGGS left
timotimo masak, some timelast year 17:11
arnsholt Which means that the real question is WTF made it work on timotimo's machine =)
17:12 stevan_ joined
arnsholt tadzik: Oh, and once it runs it complains about the Bool return types 17:13
timotimo yup 17:14
fwiw i added an SDL_delay for native call but after i removed that it continued working
17:15 locsmif joined 17:19 rurban1 joined 17:24 rurban1 left 17:27 LLamaRider left 17:29 [Sno] joined 17:38 berekuk joined, atroxaper left 17:42 FROGGS joined, ajr_ left
tadzik arnsholt: oh, hrm 17:42
I thought I added it there
yeah, it's there gist.github.com/tadzik/8409006#file-test-pl-L9
17:42 panchiniak joined
tadzik but right, gcc likes it to be in certain order :/ 17:43
17:43 ajr joined, ajr is now known as Guest36462 17:44 Guest36462 is now known as ajr_
arnsholt Yup 17:45
tadzik thanks, that helped :) 17:47
it's almost capable of one say() 60 times per second 17:48
arnsholt =D
There's a Zavolaj-bug on it being slow. If you find out why it's so slow, please add to that bug =) 17:49
tadzik yeah, 50 $i++-ses a second
so much for 60 fps graphical games
arnsholt: okay, I will :) 17:50
17:53 ajr_ left, pecastro left
arnsholt tadzik: Actually, once you get something semi-profilable, try to give it a whack with callgrind 17:55
17:56 berekuk left
tadzik arnsholt: oh wow 17:58
arnsholt: majority of time seems to be spent in find_method, that method is Nativecall's Posticircumfix:<()> 17:59
17:59 raiph joined
arnsholt Oh 18:01
tadzik feather.perl6.nl/~tjs/profile.dat, maybe I read it wrong
arnsholt I have NO idea how to read that thing 18:02
tadzik or: it's called from postcircumfix<()>
arnsholt But gimme a sec to install kcachegrind and we should be able to make sense of it all =)
tadzik did you mean: qcachegrind :)
kcachegrind wanted to install about 150 MB of dependencies, qcachegrind is 1.4 MB :P 18:03
arnsholt =D
I already had kcachegrind, it turns out 18:04
18:04 kivutar joined
arnsholt But yeah, 92% in postcircumfix:<( )> 18:04
tadzik and that's Self, not Inclusive
arnsholt And almost 65 in map_return_type 18:05
60% in infix:<===>??? 18:06
tadzik called from?
arnsholt map_return_type 18:07
tadzik hrm
arnsholt In you copy of NativeCall.pm6, what happens if you change all the === to ~~ on lines 95 and 96? 18:10
tadzik yeah, I'm experimenting with it now
18:11 dakkar left
tadzik it's equally slow 18:12
arnsholt Bah 18:13
tadzik then ACCEPTS is high on the list
18:13 berekuk joined
tadzik what if we reorder those? 18:13
int32 is probably way more common than anything else
or int 18:14
arnsholt Worth a try
18:14 mberends left
tadzik nope 18:15
18:15 darutoko left
tadzik how about nqp::istype(), or the likes of it? 18:15
this is probably as low-level as we can get
arnsholt Yeah, that sounds like a much better plan
tadzik and it has more benefits 18:16
both int32 and int give True for nqp::istype($a, Int)
so only one check, instead of 4
arnsholt Good idea =)
18:17 rurban1 joined
tadzik well, it's still as slow as it was, but the profiling output is different :P 18:18
arnsholt =) 18:19
FROGGS tadzik: btw, maybe we could resurrect this then? it was intended to go on perlgamedev.org: gamoscope.com/
tadzik FROGGS: sure :)
18:21 rurban1 left
tadzik arnsholt: that's weird 18:25
arnsholt What is?
tadzik qcachegrind says that "total ops cost" went from 1 200 000 to 545 000
FROGGS tadzik: if there is any interest to put something in the PerlGameDev organization on github, let me know 18:26
tadzik which sounds like a totally awesome thing
but it's exactly as slow
FROGGS: working on it :)
arnsholt All ops probably aren't equal 18:27
But it does sound weird
tadzik I can't profiling
well, postcircumfix() in NativeCall takes 78.37 Incl instead of 90.32 18:29
arnsholt That's good
tadzik but Self jumped from 3.62 to 8.09
That's baad
or maybe I misunderstand something 18:30
18:31 xinming left
tadzik i.imgur.com/0ZQmOUB.png helpful screenshot 18:31
arnsholt Probably just a consequence of map_return_type taking less time
tadzik left is master, right is patched
18:32 xinming joined
arnsholt I think it's a win 18:32
tadzik oh, btw
arnsholt Remember, self is time-in-self/total-time
tadzik method postcircumfix:<( )> does nqp::nativecall(nqp::decont(map_return_type($r.returns))
hoelzro jjj
tadzik I think that map_return_type can be cached/memoized/whatever
arnsholt And making map_return_type cheaper means total-time goes down, but time-in-self is unchanged
tadzik the returns won't just change in the middle of the program 18:33
arnsholt Yeah, that'll probably make sense
tadzik we shouldn't need to call it all the time
dalek ast: ff029b4 | coke++ | S16-filehandles/io_in_for_loops.t:
unskip passing moar tests
arnsholt I'm also thinking map_return_type doesn't have to be a multi 18:34
tadzik yay, it made things slower 18:35
what the frak
oh hell
I'm dumb as hell
of course it won't go faster, it's frame limited to 60 fps 18:36
static2.wikia.nocookie.net/__cb2013...cepalm.jpg
FROGGS is postcircumfix:<( )> called twice as often as map_return_type because of the call to its proto? 18:37
tadzik it's called half the times 18:38
the answer is: yes, but the other way around :)
arnsholt tadzik: Hooray for finding the problem, anyways =)
FROGGS p: say(nqp::isint(42)) 18:39
camelia rakudo-parrot 4f66ce: OUTPUT«0␤»
FROGGS p: say(nqp::isint(int8))
camelia rakudo-parrot 4f66ce: OUTPUT«1␤»
FROGGS p: say(nqp::isnum(int8))
camelia rakudo-parrot 4f66ce: OUTPUT«0␤»
FROGGS p: say(nqp::isnum(num8))
camelia rakudo-parrot 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/BfYvWdpfcU␤Undeclared routine:␤ num8 used at line 1␤␤»
FROGGS p: say(nqp::isnum(num32))
camelia rakudo-parrot 4f66ce: OUTPUT«1␤»
FROGGS p: say(nqp::isnum(num64))
arnsholt Ooooooh, that looks like a very useful op... 18:40
camelia rakudo-parrot 4f66ce: OUTPUT«1␤»
FROGGS :o)
tadzik ok
it seems to be about 10x faster
arnsholt tadzik: That'll boil down the ors in map_return_type to one of each
Heh, I'd call that a win
FROGGS 10x is very nice for this little bit of work
tadzik it can do 50000 calls to game_is_running in 1.6 seconds, instead of 12.4
and game_is_running is basically return 1 18:41
let's see if it still passes tests and whatnot...
arnsholt Do that
tadzik so basically my measurements were flawed from the start 18:42
I shouldn't have come to the conclusion that it's slow
but it still ended up well :D
18:42 rurban1 joined
arnsholt Doesn't look like I have the privs to give you a commitbit to Zavolaj, but if it passes the tests send me the patch and I'll apply it 18:42
There are probably some stupid things going on in the C code as well, but given this it looks like the Perl code is a good place to start 18:43
tadzik all tests pass
arnsholt \o/ 18:44
masak time to write more tests! :)
18:45 jeffreykegler joined
skids hehe. 18:45
arnsholt Oh, and for anyone following at home: This really shows the value of profiling. I had no clue one of the biggest offenders was *there* 18:46
I was rather suspecting the C code to do something stupid
tadzik I'm now testing it on strlen() to make sure that my stupid library is not clouding my judgement :)
arnsholt (Especially since jnthn wrote most of the Perl code =)
Yeah, probably a good idea
tadzik 50000 calls to strlen(""): 14.11 seconds on master, 0.86 with patches 18:47
r: 0.86 / 14.11
camelia ( no output )
tadzik r: say 0.86 / 14.11
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«0.060950␤»
tadzik that looks good enough to me
FROGGS tadzik: is that including isint / isnum?
tadzik FROGGS: istype, yes. But after all, it should have zero impact on the result 18:48
it's called once, and used to be called 50000 times :)
FROGGS ahh, k
tadzik so it hardly matters what it does :P
but I can't resist to micro-optimize it anyway
FROGGS damn, I don't know how to java :o( 18:49
arnsholt Wow. Almost 20x speedup
tadzik++ =)
tadzik I have to say, that gave me quite a motivational boost to work on things again :) 18:50
dalek volaj/reduce-overhead: 9e5af01 | tadzik++ | lib/NativeCall.pm6:
Drastically reduce nativecalling overhead
18:51
tadzik look, I have a commit bit :)
I'll reply to that slowness ticket 18:52
18:52 berekuk left
arnsholt Spiffy! 18:53
FROGGS marvelous! 18:54
arnsholt I love it when this happens
tadzik cdn.memegenerator.net/instances/400...222529.jpg 18:55
arnsholt A bit of collaboration, and an hour later the problem is solved \o/
tadzik yeah :)
FROGGS tadzik: btw, "return" is slow, slower than, say, nqp::isint($type) && Int || nqp::isnum($type) && Num || $type 18:56
tadzik FROGGS: oh?
FROGGS because you throw an exception there, rather than chain these opse
-e
tadzik oh :)
well, at this point I think I'd rather have it readable 18:57
FROGGS just wanted to mention it :o)
tadzik sure :)
useful for future reference
FROGGS I think it is worth stripping the return of the last statement in most cases
tadzik true
haha 18:58
when I put "return" before nqp::nativecall in the new version, it jumps to 1.23 seconds
so yeah, it's quite a thing :o
18:58 ajr joined
colomon tadzik++ arnsholt++ 18:58
tadzik 150% slower
18:59 ajr is now known as Guest82788
tadzik I now feel like removing return from _everywhere_ :P 18:59
FROGGS *g*
18:59 Guest82788 is now known as ajr_
arnsholt Oh, yeah 18:59
tadzik I wonder if we can teach that to the optimizer
arnsholt return does the whole "throw control exception" thing, whereas falling off the end of the block doesn't
FROGGS teach that the timotimo you mean :P
tadzik precisely :P 19:00
arnsholt tadzik: Try removing the returns from map_return_type and replacing it with a ternary?
FROGGS and I think an if/else might be preferable over an "return bla if blub; more code..."
tadzik arnsholt: no visible change 19:01
but it's only called once
19:01 denisboyun joined
FROGGS now since it is cached :o) 19:01
tadzik yeah 19:02
when I un-cached it, it takes 1.82 seconds
compared to 14.32
which makes me thing that caching is mostly unnecessary now that we have the other thing :D
19:03 treehug88 left
tadzik nqp::istype($type, Int) ?? Int !! nqp::istype($type, Num) ?? Num !! $type; 19:03
arnsholt Should work 19:04
FROGGS sure
tadzik seems to
arnsholt nqp::isint and ::isnum are probably even faster than istype 19:05
FROGGS p: say nqp::isint(42) 19:06
camelia rakudo-parrot 4f66ce: OUTPUT«0␤»
tadzik yeah, that
FROGGS that is a problem though
tadzik just checked it too :)
jnthn j: say nqp::isint 42 19:07
preflex jnthn: you have 2 new messages. '/msg preflex messages' to read them.
camelia rakudo-jvm 4f66ce: OUTPUT«1␤»
tadzik also, ternary is about 5% faster than if-elsif-else
FROGGS yeah, why not drop support for parrot :P 19:08
>.<
tadzik :>
FROGGS that was a joke btw, I almost hear ppl write rants about parrot getting dropped 19:09
tadzik I think that once Moar gets NativeCall, it'll be superior in every possible way
PerlJam FROGGS: what people? ;)
FROGGS PerlJam: ohh, I dunno, ppl :o) 19:10
tadzik: that is our dream and hope, yes
dalek volaj/reduce-overhead: bafb1d0 | tadzik++ | lib/NativeCall.pm6:
Micro-optimize map_return_type even further :)
FROGGS tadzik: and it should be reachable because even I can hack on Moar, where it is very hard for me to get into parrot 19:11
tadzik FROGGS: maybe I should try it too :) 19:15
I think I'll go get a beer or ten now, though :P
FROGGS tadzik: have fun! 19:18
tadzik thanks :)
19:20 SamuraiJack left 19:24 kivutar left 19:25 treehug88 joined 19:34 bluescreen10 joined 19:37 fhelmberger left
hoelzro where's the repo for the v5 project? 19:40
FROGGS hoelzro: github.com/rakudo-p5/v5
hoelzro thanks FROGGS 19:41
want to see how the improvements to the P6 detector fare against it =)
19:41 stevan_ left
FROGGS go ahead :o) 19:41
19:41 kivutar joined 19:49 lue joined
arnsholt hoelzro: I can't help but think statstical models would be good for that kind of thing 20:02
hoelzro they probably would
pygments uses a manual heuristic system 20:03
GitHub's linguist, OTOH...
uses a classifier
(I'm working on linguist atm)
arnsholt Neat. What kind of classifier, OOC?
hoelzro shrugs
I haven't read the impl
arnsholt 'sok
I can look it up later 20:04
20:04 fhelmberger joined, beastd joined
lee__ I thought github wrapped pygments? 20:04
hoelzro they do 20:05
but they don't use pygments' language identification system
lee__ ah, gotcha
20:06 mberends joined 20:10 fhelmberger left 20:24 rindolf left 20:28 ivan`` left 20:33 treehug88 left 20:34 treehug88 joined, bluescreen10 left 20:36 btyler left 20:41 pmichaud left 20:42 pmichaud joined 20:44 denisboyun left 20:50 zby_home_ joined, kivutar left 20:51 zby_home_ left, btyler joined, stevan_ joined 20:53 ivan`` joined 20:56 stevan_ left 21:01 kivutar joined 21:02 dayangkun left 21:04 berekuk joined
itz anyone near London, UK and interested in a perl 6 hackday msg me 21:05
21:05 stevan_ joined
ribasushi overheard in #london.pm 21:10
<ranguard> itz: is there a 30 second summary of Perl 6 status anywhere?
bigwigs ^^
:)
pmichaud ribasushi: maybe perl6.org/compilers/features ? 21:13
TimToady new MoarVM has very nearly caught up with JVM implementation of rakudo 21:14
at 98%
masak 30 seconds? oh geez. "We're putting a lot of work on the JVM, and Moar is shaping up nicely. Stand by for speed/stability improvements."
FROGGS yes about 98% test coverage :o)
21:15 jeffreykegler left
ribasushi I will quote the 3 of you ;) 21:16
arnsholt hoelzro: I looked up the Linguist classifier, and it looks like it's Naive Bayes from the comments at least
hoelzro interesting
good to know!
21:17 dayangkun joined
arnsholt With my background not quite what I'd have done, but given what they're doing probably quite good 21:17
21:21 fhelmberger joined
PerlJam ribasushi: I'd say that PErl 6 development is punctuated by more and frequent "Yay!" events than in the past. And fewer "Aigh!" events. :) 21:22
masak I'd still recommend a low profile for the most part, though. 21:23
underpromise and overdeliver.
ribasushi nod nod
masak: I wasn't looking for "marketing material"
more like "where is it at" overview for folks to look at 21:24
pmichaud's link is more or less that
21:25 fhelmberger left
PerlJam Hmm. Should we update features to be rakudo-backend aware? 21:27
21:28 hummeleBop left
[Coke] sighs, as his ticket work is negated by new tickets! 21:29
masak PerlJam: most likely, yes.
[Coke] blames masak, the ur-ticketor.
masak [Coke]: new tickets are good! remember, tickets are love.
the only ones who don't like new tickets are ostiches who prefer sand. 21:30
ostriches*
oh, and those with a tendency to shoot messengers. they also don't like new tickets.
[Coke] yes, yes, it's all good if you look at the tickets as individual things of joy rather than a list of X elements whose # is increasing at regular intervals. 21:31
I'd rather have a ticket for a bug than a bug without a ticket.
just let me be annoyed for 5s, ok? ;)
masak your 5s are up! 21:32
[Coke] DAMM- yay, thanks. 21:33
r: sub foo { my $s; for 1..3 { $s += $_ } } ; say foo()
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«6 6 6␤»
[Coke] (#77334)
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77334
masak I now realize that I've internalized this thinking that it almost takes effort to reconstruct "it's obvious" into "I'd rather have a reported error than an unreported one".
ribasushi masak: nice world you live in 21:34
folks these days like to close issues if they sit long enough because "we don't have the resource to fix it anyway" 21:35
fuckers.
[Coke] r: grammar G { regex foo { } }; say "alive" ; RT #78404
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=78404
camelia rakudo-jvm 4f66ce: OUTPUT«===SORRY!===␤Null regex not allowed␤at /tmp/hdgrwlkAZv:1␤------> grammar G { regex foo { ⏏} }; say "alive" ; RT #78404␤Undeclared name:␤ RT used at line 1␤␤␤»
..rakudo-parrot 4f66ce: OUTPUT«===SORRY!===␤Null regex not allowed␤at /tmp/ucxkXZy_Y7:1␤------> grammar G { regex foo { ⏏} }; say "alive" ; RT #78404␤Undeclared name:␤ RT used at line 1␤␤␤»
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=78404
[Coke] ooh, sweet.
that was from 2010. 21:36
masak ribasushi: um. wat.
[Coke] ribasushi: yes, I get that a lot.
"clearly no one wants it, or we'd have fixed it"
masak ribasushi: it may be horribly avant-garde, but in the #perl6 queue we close tickets when they pass a test.
[Coke] cfeclipse project did that. migrated issue queue to github, abandoned old trac. "if you want it fixed, you'll open a new ticket." 21:37
ribasushi masak: I kid you not, rampant among the "modern-perl" clique
masak :(
[Coke] LHF: go write a test for this: rt.perl.org/Ticket/Display.html?id=78404
masak I just discovered that in Perl 5 you can take a reference to a sub that isn't declared. 21:39
it only blows up when you call it.
[Coke] r: sub a($a, $b, $c) { say "boo!" }; my &b = &a.assuming(1); say &a.arity; say &b.arity; #RT #77744
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77744
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«3␤0␤»
[Coke] stillborked.
r: role A { role B {} }; A::B.new; say "alive" # RT #100468 21:40
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=100468
camelia rakudo-parrot 4f66ce: OUTPUT«Could not find symbol '&B'␤ in method <anon> at gen/parrot/CORE.setting:12135␤ in any at gen/parrot/Metamodel.nqp:2691␤ in any find_method_fallback at gen/parrot/Metamodel.nqp:2679␤ in any find_method at gen/parrot/Metamodel.nqp:946␤ in a…»
..rakudo-jvm 4f66ce: OUTPUT«Could not find symbol '&B'␤ in any find_method_fallback at gen/jvm/Metamodel.nqp:2607␤ in any find_method at gen/jvm/Metamodel.nqp:945␤ in any at gen/jvm/BOOTSTRAP.nqp:1658␤␤»
[Coke] r: class A { role B {} }; A::B.new; say "alive" # RT #100468
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=100468
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«alive␤»
masak by the way, on 2014-10-17, we're all gonna have a big party, OK? 21:42
FROGGS one day after my b-day? sure :o)
ribasushi masak: what's cooking?
masak FROGGS: I task you with remembering. 21:43
FROGGS I'll get us cake
masak ribasushi: Perl 5 will turn 20 on that day.
ribasushi ah right
masak not Perl. Perl *5*.
FROGGS man, this ol' piece of software :o)
masak aye.
ribasushi I celebrated its 18th birthday, when I finally could express my love within the realm of the law ;)
masak .oO( TMI ) 21:44
FROGGS yeah
ribasushi :D 21:46
[Coke] ... ew.
Not cool, bro. Not cool.
ribasushi hey, I did it in public and I did it in style: code.activestate.com/lists/perl5-porters/186203/ 21:47
21:47 kbaker left
ribasushi ah nice memories, a year+ later still makes my blood boil when I reread ;) 21:48
masak ribasushi: I'm only four paragraphs in, but I'm already ribasushi++ -ing you :) 21:49
ribasushi masak: thanks, sadly besides "making waves" this email did not achieve anything 21:52
I think I even said so somewhere in the thread
(or maybe it prevented totally raw uncooked signatures from going into core at the time, so maybe yay me) 21:54
masak in general terms, it's *extremely* hard to convince a large system to become smaller in the Saint-Exupéry sense. 21:55
PerlJam "What we need is smaller government!" ;) 21:57
ribasushi masak: right, don't make me write the same email on perl6.porters in 10 years! ;)
rjbs ribasushi: Sorry, I said pretty clearly in my reply that sigs as they were were in no danger of going into core. ;) 21:59
PerlJam heh
ribasushi rjbs: yes, I also do not equate you to p5.porters ;) 22:00
rjbs++ # rare glimpse of sanity on the p5p landscape
PerlJam ribasushi: and that's the problem: "rare glimpse" 22:01
ribasushi this.
PerlJam And I think rjbs' bus number is really really really really close to 1 ;)
ribasushi rjbs: you should teach our kids how to run #onionsketch, bus number and all ;) 22:02
rjbs Don't worry, I've been building a bus immunity.
ribasushi argh! *your
rjbs through constant exposure over the last 8 years
22:02 fhelmberger joined
PerlJam
.oO( rjbs and riba have kids together?!? ;)
22:03
rjbs pumpking: www.flickr.com/photos/rjbs/8091231934/ 22:04
[Coke] pictures rjbs as the dread pirate roberts.
22:04 berekuk left
rjbs pumpkinglet: www.flickr.com/photos/51035772155@N01/8127944961 22:04
22:06 skids left 22:08 berekuk joined, spider-mario left 22:11 raiph left, fhelmberger left 22:18 berekuk left
masak if rjbs and riba have kids together, that definitely explains the emotional tone of that email. :P 22:18
"keep the core small!" indeed.
ribasushi KEEP YOUR CORE TO YOURSELF 22:22
[Coke] apple core. Who's your friend? 22:23
perigrin points to ribasushi 22:25
"him"
22:25 berekuk joined
[Coke] beans ribasushi. 22:27
22:31 beastd left
timotimo tadzik++ arnsholt++ # making zavolaj faster 22:31
i started a quest on questhub for the return optimization btw 22:32
22:33 raiph joined, ajr_ left 22:37 locsmif left
japhb My brain is blanking: What's the syntax for setting a private attribute within a custom new (so self is the type object, as the instance hasn't been finished yet)? 22:40
timotimo you need to pass it to self.bless
japhb timotimo: What exact syntax? I'm not making bless properly happy. 22:41
timotimo either name_in_instance => $value_you_want
or :$name_in_instance_and_here
japhb Ah, so :$!var will fail.
timotimo yes indeed
japhb I think :$name only works for the public ones. 22:42
timotimo that will try to look up $!var in the instance
no, you're thinking of the wrong things
you just want to pass a pair to bless
you're not interacting with the instance you want to form yet
that only starts existing when you call bless
up until then, a custom new is no different from any other method
japhb r: class Foo { has $!bar; sub new($bar) { my $self = self.bless(:$bar) } }; say Foo.new("BAR").DUMP;
camelia rakudo-jvm 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/66Ar7pueCy␤'self' used where no object is available␤at /tmp/66Ar7pueCy:1␤------> { has $!bar; sub new($bar) { my $self = ⏏self.bless(:$bar) } }; say Foo.new("BAR"␤ exp…» 22:43
..rakudo-parrot 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/vQZrSAfnmh␤'self' used where no object is available␤at /tmp/vQZrSAfnmh:1␤------> { has $!bar; sub new($bar) { my $self = ⏏self.bless(:$bar) } }; say Foo.new("BAR"␤ …»
japhb r: class Foo { has $!bar; method new($bar) { my $self = self.bless(:$bar) } }; say Foo.new("BAR").DUMP;
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo<1>(:$!bar(Any))␤»
japhb Yeah, so that doesn't work.
r: class Foo { has $!bar; method new($bar) { my $self = self.bless(bar => $bar) } }; say Foo.new("BAR").DUMP;
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo<1>(:$!bar(Any))␤»
japhb As does that (thankfully, they *should* be equivalent).
So what am I doing wrong there? 22:44
timotimo i'm being spammed by people around me 22:45
my $self = self.bless() doesn't seem necessary
it's just important to return the value of self.bless at the end
japhb (And FWIW, I don't see anything wrong with making self.bless(:$!bar) Just Work. After all, it works that way for BUILD, which *also* is working with an incomplete instance.)
timotimo you're still in the wrong :) 22:46
new works *without* an instance
like, completely no instance at all whatsoever
japhb Oh, in my real code, I have some other initialization to do (to whit, launching a thread to manage the channel(s) this object owns).
timotimo BUILD has an incomplete instance, so you can use private variables o nself
gimme a second i've got communicative overload
r: class Foo { has $!bar; method new($bar) { self.bless(:$bar) }; say Foo.new("123"); 22:47
camelia rakudo-parrot 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/7rDuzUnQCi␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/7rDuzUnQCi:1␤------> self.bless(:$bar) }; say Foo.new("123");⏏<EOL>␤ expecting any …»
..rakudo-jvm 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/JncvF8qlAG␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/JncvF8qlAG:1␤------> self.bless(:$bar) }; say Foo.new("123");⏏<EOL>␤ expecting any of:…»
timotimo r: class Foo { has $!bar; method new($bar) { self.bless(:$bar) } }; say Foo.new("123");
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo.new()␤»
timotimo r: class Foo { has $.bar; method new($bar) { self.bless(:$bar) } }; say Foo.new("123");
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo.new(bar => "123")␤»
timotimo oh wait
japhb You'll have to .DUMP to see the private variable.
timotimo if you want to set private variables, you need a custom BUILD to set them 22:48
japhb s/variable/attribute/
OK, so now I've got chicken and egg.
timotimo because privates are not part of the public interface, so the constructor shouldn't know about them
no, i don't think so
japhb No, the constructor shouldn't accept them as *arguments*. It will have to know about them internally.
timotimo r: class Foo { has $!bar; method new($bar) { self.bless(:$bar) }; submethod BUILD(:$bar) { $!bar = $bar } }; say Foo.new("123").DUMP;
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo<1>(:$!bar("123"))␤»
timotimo that's how you do it
sorry for taking so long to remember that 22:49
japhb That's ... SO WRONG.
Not you. The massive pain to write that trivial concept.
timotimo if it doesn't come into the constructor, you can probably have only the BUILD
raydiak r: class Foo { has $!bar; submethod BUILD(:$!bar) { * }; }; say Foo.new(bar => "123").DUMP; 22:51
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo<1>(:$!bar("123"))␤»
japhb Right, but: I need to do this: 22:52
method new(Cool $path is copy) {
$path .= path;
my $handle = $path.open(:w);
my $channel = Channel.new;
my $self = self.bless(:$path, :$!handle, :$!channel);
... Launch threads ... 22:53
$self;
}
$.path is a public attribute, $!handle and $!channel are private.
timotimo yeah, that'll either need a custom BUILD or setters for those attributes
japhb >.< 22:54
timotimo :$!handle expands directly to handle => $!handle 22:55
which is not helpful
japhb timotimo: I know, I was just getting to the point of trying anything that *might* have syntactic relief. Because what I want to do is conceptually simple. I refuse to believe it's a horrible pain to do it. 22:56
timotimo see how raydiak did it with the :$!bar inside the signature and supplying only * as the implementation 22:57
japhb Or if it is, I've a bone to pick with a certain Mountain View resident. ;-)
raydiak that's what I was trying to point out...the :$!bar in a BUILD sig does the private attr setting implicity 22:58
japhb OK, so how do I combine that with the real work I have to do to build it
Yes, I know that.
timotimo you pass :$handle, :$channel to self.bless and write submethod BUILD(:$!path, :$!handle, :$!channel) { * }
well, and you pass :$path, too 22:59
you could also be mean and nonportable and nqp::setattr($self, MyClassName, '$!handle', $handle)
japhb Finally, something working. 23:00
That was ouchie.
timotimo i apologize :( 23:01
japhb The * does not appear necessary. 23:02
timotimo right
it's mostly an attitudinal there 23:03
"beh, whatevs"
23:05 stevan_ left 23:08 berekuk left
japhb W00t! Progress! 23:08
Four threads working together to do an HTTP GET through a connected socket, logging socket traffic to a separate file, all pieces communicating over channels./ 23:09
timotimo \o/ 23:10
23:11 treehug88 left
japhb Why does IO::Socket.recv only pull 512 bytes at a time? Why not say 64k, so as to at least pull an IP datagram all in one shot? 23:12
Oh, and sorry for any grumpiness, guys. I guess I get cranky whenever something seems more painful than what I used to do in Perl 5. ;-) 23:14
23:14 BenGoldberg joined
timotimo is that for parrot? 23:15
oh, of course not
it would be on the jvm, seeing as you're doing concurrent stuff
btyler the magic "t" word :)
although I was never familiar with parrot's threads, so I suppose it shouldn't be assumed right off 23:16
23:18 Some-body_ joined, Some-body_ is now known as DarthGandalf
timotimo we just don't have concurrent stuff atop parrot 23:19
japhb Rakudo and Parrot haven't really seen eye to eye where threads are concerned. 23:20
But it works on JVM, and (will soon) on Moar as well.
timotimo yup 23:21
raydiak I know the topic already moved on, but I don't like the extra mess of initializing private attrs from a constructor, either. kinda wish there was something like "has $!foo is init" or eqv which would do the same as adding :$!foo to BUILD 23:22
23:22 rurban1 left
raydiak (and an inverse of that, which prohibits initializing the attribute, whether public or private) 23:22
timotimo japhb: you do know that you can (ideally) pass a read size to recv as the first argument? 23:23
well, yeah, you can have has $!foobar = $.barfoo i think?
r: class Foo { has $.bar; has $!fasel = $.bar * 2; }; Foo.new(:bar(123)).DUMP.say 23:24
camelia rakudo-jvm 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/GOAHfZM0Ms␤Virtual call $.bar may not be used on partially constructed objects␤at /tmp/GOAHfZM0Ms:1␤------> ass Foo { has $.bar; has $!fasel = $.bar⏏ * 2; }; Foo.new(:bar(123))…»
..rakudo-parrot 4f66ce: OUTPUT«===SORRY!=== Error while compiling /tmp/VU7qDXrdHW␤Virtual call $.bar may not be used on partially constructed objects␤at /tmp/VU7qDXrdHW:1␤------> ass Foo { has $.bar; has $!fasel = $.bar⏏ * 2; }; Foo.new(:bar(12…»
timotimo nope.
sorry :(
raydiak r: class Foo { has $.bar; has $!fasel = $!bar * 2; }; Foo.new(:bar(123)).DUMP.say
camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Foo<1>(␤ :bar(▶123),␤ :$!fasel(246)␤)␤»
raydiak but it's ugly
and doesn't clearly indicate my purpose 23:25
and I can't use the name I really want in both places, can I?
23:25 rurban1 joined, rurban1 left
japhb timotimo: The !parrot section of method recv just does this: 23:29
if $!buffer.elems < $chars {
my $r := nqp::readfh($!PIO, nqp::decont(buf8.new), 512);
$!buffer ~= $r;
}
23:29 kaare_ joined
japhb Note the hardcoded 512 -- and lack of any loop. 23:29
I understand the lack of loop in general, that makes sense for .recv. 23:30
timotimo d'oh
japhb I mean, hardcoding at 512 doesn't seem to make sense unless the intent was to loop.
timotimo you're right
still better than on parrot where you can try to readline from a socket and maybe get a full line or not, but either way you don't have a line terminator at the end 23:31
so you cannot distinguish between "read a full line" and "read until the buffer was full and returned what was seen so far"
japhb Yeah, IO::Socket is kinda crazy with stuff like that.
Last time I really looked at the source I remember being rather >.< about the assumption that utf-8 code groups would not span multiple socket reads. 23:32
But I haven't reread that section recently.
btyler anyone else had any luck getting r-m built on OSX? I got further today than I ever have: all the way through building nqp-m and partially into r-m, but died working on container.c: gist.github.com/kanatohodets/7ace7...474452ed02 23:34
23:35 rurban1 joined 23:36 haavik left
btyler latest revs for MoarVM, nqp, and rakudo moar-support. happy to be remote hands if there's anything I could do to help fix up the OSX build 23:37
23:38 rurban2 joined
timotimo are there any ifdefs in the container.h or .c that would cause these functions to not be built? 23:39
23:40 rurban1 left 23:48 jeffreykegler joined
btyler timotimo: no ifdefs in the relevant moarvm source (src/6model/container.*). afk for 30 min, will continue poking then if anyone has ideas 23:54
23:54 btyler left 23:57 panchiniak left 23:59 raiph left