»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:02 RabidGravy left
lizmat zengargoyle: well, it may be a bit weird, but there *is* a bug there, I think, and it's not in your part of the code :-) 00:15
00:15 dbrock joined, n0tjack left 00:16 mordo left 00:18 cognominal joined
lizmat good night. #perl6! 00:24
zengargoyle [perl #126454] [BUG] Channel: earliest $channel { ... } does not go away at end of scope -- and done 00:28
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126454
zengargoyle sorta hampers my /r/dailyprogrammer puzzle solver. :( 00:29
00:30 ghur left
zengargoyle but at least it works that first time. :P 00:31
00:32 pollei joined 00:34 lizmat left 00:37 tokuhirom joined
raiph .ask psch have you read gist.github.com/sorear/5947073 ? 00:38
yoleaux raiph: I'll pass your message to psch.
00:41 tokuhirom left 00:45 cognominal left 00:46 cognominal joined 00:48 aborazmeh joined, aborazmeh left, aborazmeh joined 00:52 colomon left 00:53 colomon joined 00:55 leont left, edehont left 01:08 yqt left 01:09 Actualeyes joined 01:10 BenGoldberg left, Ben_Goldberg joined
uruwi Back 01:12
01:12 tokuhirom joined
psch raiph: no, i hadn't, thanks for bringing it up 01:17
yoleaux 00:38Z <raiph> psch: have you read gist.github.com/sorear/5947073 ?
psch raiph: a first reading shows many idea fitting with what i arrived and implemented (or planned to implement) myself, which is a good thing i suppose 01:18
raiph: unfortunately, r-j current suffers from a too large CORE.setting to fit into one .class file, which means there's some rather deep general codegen stuff to solve first 01:19
konobi mmm... missed pmurias again 01:26
yoleaux 23 Oct 2015 20:03Z <pmurias> konobi: how should I profile node.js applications (to see if there are any low hanging speedups for nqp-js)
01:28 BenGoldberg_ joined 01:31 Ben_Goldberg left 01:32 BenGoldberg joined 01:34 BenGoldberg_ left 01:38 BenGoldberg left, BenGoldberg joined 01:44 kid51 left
raiph psch: I stumbled on that "goals" gist by accident. Perhaps we'd best add a copy of it to perl6/nqp/docs? 01:47
konobi pmurias drop me a PM... i should have all that infor for you. 01:51
psch raiph: yeah, it's probably good to at least guarantee it doesn't get lost 01:53
raiph: i'll probably eventually try and integrate it with the existing jvminterop.md, though 01:55
raiph just found another, not jvm specific, but still great info: gist.github.com/sorear/5747025
psch well, less conjectural
raiph psch: afaict the jvminterop doc is what's done, the gist I shared would be javainteropgoals.md; of course, if you've achieved some of the goals there are presumably corresponding removals/additions to these two docs 01:57
psch raiph: yeah, that's what i mean. the second paragraph of "General Object Features" was mostly implemented pre-GLR 01:58
with the first solution in the paragraph
raiph both docs were last updated 2 years ago
psch many of the marshal-{in,out} bits also worked 01:59
yup, i had neglected that. it's mostly in the advent blog post :/
02:00 llfourn joined
dalek p: d6361dc | peschwa++ | docs/jvminterop-goals.md:
Preserve design and implementation goals for jvminterop.

  raiph++ for bringing this up. Some parts in there were already done pre-GLR,
but jvminterop broke during GLR and neither NQP nor Rakudo have fully recovered yet. This means both jvminterop-goals.md as jvminterop.md will need some attention as soon as we have a stable enough nqp-j and perl6-j.
02:02
raiph pcsh++ 02:08
er, psch++
( I now see that a later version of gist.github.com/sorear/5747025 is already in the perl6/nqp/docs directory ) 02:17
02:30 tokuhiro_ joined
dalek p: 0c4e80b | peschwa++ | docs/jvminterop-goals.md:
Line wrap at 80 characters, to make it actually readable.
02:32
02:34 tokuhiro_ left 02:40 telex left 02:42 telex joined 02:48 aindilis left, SuzieQueue joined 02:50 O47m341 left, aindilis joined
tony-o did pack('b*' go away? 02:50
02:52 xiaoyafeng left 02:54 yuppie left 03:03 Actualeyes left 03:10 adu joined 03:15 TEttinger joined
geekosaur is pack fully implemented yet? 03:17
(i.e. it may not be there but that doesn't necessarily mean it went away...)
03:19 prevost joined
Juerd m: pack("v", 0x20ac) 03:27
camelia ( no output )
Juerd m: say pack("v", 0x20ac).gist
camelia rakudo-moar cd7766: OUTPUT«Buf:0x<ac 20>␤»
Juerd geekosaur: ^
03:28 colomon left
Juerd I don't know if it's "full" enough for your needs. It doesn't do everything that Perl 5's pack does yet. 03:28
geekosaur I think you wanted to aim that at tony-o
Juerd Oh, right :)
03:29 kaare_ joined, yeahnoob joined 03:30 adu left, colomon joined 03:39 kmel joined, Actualeyes joined 03:40 BenGoldberg left 03:55 khw left 04:07 adu joined 04:10 prevost left
kmel If we create a class that has variables with no twigils: class { has $var } 04:11
how can we use these attributes?
are they accessible outside the class? Inside only? Not accessible at all? 04:12
I am asking because ! makes it private so accessible inside only
and . creates a getter so makes it accessible outside 04:13
what about no twigil?
tony-o ahh, okay so maybe NYI 04:14
kmel: the $ is the twigil.., what do you mean without twigils?
m: class A { has $!b = 5; method b { $!b; }; }; say A.new.b; 04:16
camelia rakudo-moar cd7766: OUTPUT«5␤»
kmel tony-o: $ is the sigil
AlexDaniel m: class A { has $b = 5; method b { $b; }; }; say A.new.b;
camelia rakudo-moar cd7766: OUTPUT«5␤»
AlexDaniel tony-o: look, no twigil
tony-o $ is still a twigil
m: my \r = 5; say r; 04:17
camelia rakudo-moar cd7766: OUTPUT«5␤»
tony-o that's no twigil
AlexDaniel tony-o: what's a sigil then? :)
tony-o ah damnit
i'll go back to implementing unpack b*
kmel AlexDaniel: is there a way to access an attribute outside the class without a getter? 04:19
AlexDaniel kmel: hmmm, maybe without a twigil it is a class variable 04:20
m: class A { has $b = 5; }; say A.b;
camelia rakudo-moar cd7766: OUTPUT«Method 'b' not found for invocant of class 'A'␤ in block <unit> at /tmp/Gj5nu6ecMH:1␤␤»
AlexDaniel no idea actually
kmel AlexDaniel: thanks 04:21
AlexDaniel kmel: did you find how to make it work?
ok, so let's try this 04:23
m: class A { has $b = 0; method foo { $b += 5 }; method get { $b } }; my $x = A.new; my $y = A.new; $x.foo; say $y.get; 04:25
camelia rakudo-moar cd7766: OUTPUT«0␤»
AlexDaniel m: class A { my $b = 0; method foo { $b += 5 }; method get { $b } }; my $x = A.new; my $y = A.new; $x.foo; say $y.get;
camelia rakudo-moar cd7766: OUTPUT«5␤»
AlexDaniel ok, class attributes are declare with “my”
then what is this twigilless thing? 04:26
declared*
ugexe m: class Foo { has $bar = 1; }; say Foo.^attributes;
camelia rakudo-moar cd7766: OUTPUT«(Mu $!bar)␤»
kmel AlexDaniel: not yet. still reading docs and trying to figure out how classes work 04:27
AlexDaniel ugexe: what does that mean? $foo is a synonym to $!foo?
ugexe yes 04:29
m: class Foo { has $bar = 1; method get { say $!bar; }; }; Foo.new.get;
camelia rakudo-moar cd7766: OUTPUT«1␤»
kmel ugexe: then why use ! in the first place? 04:30
if all attributes are private by default?
raiph aiui, declaring a $bar in a class is the same as $!bar but gives you a $bar alias
04:30 pollei left
ugexe ah raiph++ 04:30
kmel class Foo { has $bar = 99; method get { say $!bar; }; }; Foo.new.get; 04:31
ugexe probably constructors too 04:32
kmel m: class Foo { has $bar = 99; method get { say $!bar; }; }; Foo.new.get;
camelia rakudo-moar cd7766: OUTPUT«99␤»
kmel m: class Foo { has $bar = 99; method get { say $bar; }; }; Foo.new.get;
camelia rakudo-moar cd7766: OUTPUT«99␤»
kmel m: class Foo { has $!bar = 99; method get { say $bar; }; }; Foo.new.get;
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2sBdLRTUSx␤Variable '$bar' is not declared. Did you mean '$!bar'?␤at /tmp/2sBdLRTUSx:1␤------> 3 Foo { has $!bar = 99; method get { say 7⏏5$bar; }; }; Foo.new.get;␤»
04:32 CiNN joined
kmel m: class Foo { has $bar = 99; method get { say $!bar; }; }; Foo.new.get; 04:33
camelia rakudo-moar cd7766: OUTPUT«99␤»
raiph design.perl6.org/S12.html#Attributes
kmel m: class Foo { has $bar = 99; has $!bar = 1; method get { say $!bar; }; }; Foo.new.get; 04:35
camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Package 'Foo' already has an attribute named '$!bar'␤»
kmel ok that;s 04:36
summary: has $x is private just as has $!x 04:37
AlexDaniel m: class Foo { has $!bar = 99; has $bar = 1; }
camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Package 'Foo' already has an attribute named '$!bar'␤»
04:37 secwang joined
AlexDaniel kmel: ok, which one should I prefer? :) 04:38
kmel only difference is: has $x can be used later as either $x or $!x
but has $!x will always need to be referenced as S!x
llfourn AlexDaniel: use $!x :) has $x is just some auto aliasing which is going to be confusing in most cases
tokuhirom is there a way to generate infinite list from existed list? 04:39
i want to generate `a,b,c,a,b,c,..*` from <a b c>
llfourn m: my @list = <a b c> xx *; say @list[42]; 04:40
camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
kmel AlexDaniel: Honestly I will try not to use ! since it attributes are private by nature.
AlexDaniel kmel: but that's good?
llfourn m: my @list = <a b c>.flat xx *; say @list[42]; 04:41
camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
AlexDaniel llfourn: <a b c> is already flat
kmel AlexDaniel: i am not sure. I will use it and see where and when it breaks
AlexDaniel: that's the only way to really know the difference
AlexDaniel kmel: well, nothing will break, but you will have internals exposed to everyone 04:42
tony-o m: class A { has $!priv = 5; }; Attribute.new(:name('$!priv'), :type(Mu), :package(A)).get_value(A.new).say;
camelia rakudo-moar cd7766: OUTPUT«5␤»
llfourn m: my @list = <a b c> xx *; say @list.flat[42]; 04:43
camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
tony-o m: class A { has $!priv = 5; }; my A $a .=new(priv => 100); say $a.^attributes[0].get_value($a);
camelia rakudo-moar cd7766: OUTPUT«5␤»
tony-o meh, something like that works
kmel AlexDaniel: how so?
tony-o if you want to get a private var from a class kmel ^
kmel tony-o: thanks 04:44
tony-o requires you know the type and everything, though
to some extent
04:46 CiNN left 04:47 secwang left
kmel got to go to work 04:47
have a nice day 04:48
laters
04:48 kmel left
llfourn does anyone know how to do what tokuhirom asked? 04:49
AlexDaniel llfourn: well, I'm trying
llfourn ah k me too :)
04:50 secwang joined 04:51 adu left
AlexDaniel m: my @list1 = <a b c>; my @list = map {@list1[$_ % @list1.elems]}, (0..*); say @list[42]; 04:52
camelia rakudo-moar cd7766: OUTPUT«a␤»
AlexDaniel m: my @list1 = <a b c>; my @list = map {@list1[$_ % @list1.elems]}, (0..*); say @list[42..50];
camelia rakudo-moar cd7766: OUTPUT«(a b c a b c a b c)␤»
AlexDaniel tokuhirom: ^ this maybe?
04:53 secwang left
llfourn AlexDaniel: nice! 04:54
tokuhirom AlexDaniel: Ah, yes! it's what i was looking for!
AlexDaniel tokuhirom: but you have to make sure that @list1 does not change
is .flat broken? 04:58
llfourn m: say (<a b c> ~~ [<a b c>].flat) 04:59
camelia rakudo-moar cd7766: OUTPUT«False␤»
llfourn m: say (<a b c> ~~ |[<a b c>])
camelia rakudo-moar cd7766: OUTPUT«True␤»
llfourn AlexDaniel: maybe..
AlexDaniel m: my @list = <a b c> xx 100; say @list.flat.flat.flat.flat[42];
camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
AlexDaniel m: say (<a b>, 'c').flat.elems; 05:01
camelia rakudo-moar cd7766: OUTPUT«3␤»
05:02 dayangkun left 05:03 pollei joined 05:04 dayangkun joined, secwang joined 05:07 raiph left
llfourn m: my $list = (<a b c> xx *).flatmap: { .flat }; say $list[42]; 05:09
camelia rakudo-moar cd7766: OUTPUT«a␤»
llfourn AlexDaniel: ah-ha!
m: my $list = (<a b c> xx *).flatmap: { .flat }; say $list[40..50];
camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
AlexDaniel tokuhirom: ^
tokuhirom wow 05:10
AlexDaniel m: my $list = (<a b c> xx *).flatmap: { $_ }; say $list[40..50];
camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
AlexDaniel this does not really make any sense 05:11
m: my $list = (<a b c> xx *).flat; say $list[40..50];
camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
AlexDaniel OK, this does
llfourn you don't even need .flat... :P
oh even better!
tokuhirom ah
m: my $list = (|<a b c> xx *); say $list[40..50];
llfourn dunno why I never tried that...
camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤» 05:12
AlexDaniel m: my $list = flat <a b c> xx *; say $list[40..50];
camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
llfourn that's pretty cool 05:13
AlexDaniel indeed, that works as well!
m: my $list = |<a b c> xx *; say $list[40..50]
camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
AlexDaniel I wonder why it took us so much time to get that…
llfourn I only tried flat on the <a b c> not on the whole thing :\
but as you pointed out that made no sense because it was already flat 05:14
05:14 SuzieQueue left
llfourn m: my $x = <a b c> xx *; say $x.WHAT 05:19
camelia rakudo-moar cd7766: OUTPUT«(Seq)␤»
05:25 secwang left 05:31 llfourn left, llfourn joined 05:43 quuxman_ is now known as quuxman 05:45 diana_olhovik joined 05:56 AlexDaniel left 05:58 diana_olhovik left
dalek osystem: 842ac10 | tony-o++ | META.list:
Huffman Encoding with PP6
05:59
06:01 [Sno] left 06:07 lizmat joined 06:10 quester joined 06:26 aborazmeh left 06:29 davido_ joined, itz_stmu1 joined 06:31 itz_stmuk left 06:57 geraud left 06:58 Actualeyes left, bjz joined, FROGGS_ left 07:01 rindolf joined 07:03 bjz left
lizmat good *, #perl6! 07:04
llfourn hi lizmat :D 07:08
lizmat llfourn o/
07:09 secwang joined, quester left
llfourn how does one say not match: /[!<.ident>|'-']/ <= I'm trying to match a variable name 07:09
[!...] doesn't work obviously 07:10
m: 'a b'.subst(/<![\w]>+/,'',:g) 07:11
camelia rakudo-moar cd7766: OUTPUT«Memory allocation failed; could not allocate 974225408 bytes␤»
lizmat wow
llfourn while trying to figure it out I found that that hangs on forever :D 07:12
lizmat no, it just takes longer on your machine :-)
llfourn I see :\
lizmat ah, it's the old + quantifier on a zero-width match 07:13
bug
llfourn ill submit it :)
lizmat no need, there are several already
llfourn lizmat: ah ok
when I said "I'm trying to match a variable name" I meant im trying to remove all sigils and twigils etc from a variable name with .subst 07:14
07:17 secwang left
llfourn figures it out by instead doing a positive match and capture 07:19
07:20 domidumont joined 07:21 CIAvash joined 07:22 softmoth left 07:23 domidumont left 07:24 edehont joined
dalek kudo/nom: 00d0cc7 | lizmat++ | src/core/asyncops.pm:
Make the awaiterator block in sink context

One step closer to replacing await by the awaiterator. Unfortunately, the awaiterator at the moment does not take Channels. Not sure how to effectively and efficiently fix that yet.
07:25
07:28 quester joined 07:29 espadrine_ joined 07:30 firstdayonthejob joined 07:31 bjz joined, pollei left 07:32 bjz left 07:36 [Sno] joined
lizmat commute to EuroOSCON 07:37
07:37 lizmat left 07:39 FROGGS joined
ChoHag I have an object which is a Str with a role mixed in that does Positional. elems, AT-POS and EXIST-POS are all defined. How can I loop through all of its elements? 07:39
[Tux] test 50000 38.446 38.328 07:40
test-t 50000 39.040 38.923
07:41 bjz joined 07:47 davido_ left
moritz ChoHag: you need to mix-in Iterable if you want it to be iterated over by map, for et. al 07:50
ChoHag: but seriously, Str with Positional mixed in? Don't you want a proper, custom type instead? 07:51
ChoHag I don't know.
I have too little programming time available to put serious thought into things, and I *do* want it to seem in most instances like a string, and in particular to be coercable to from a string. 07:52
07:53 bjz left
ChoHag Generally the object will be looked at like it's a string or the final element of the list will be used in various additional calls. 07:54
The fact that it's Positional is mostly an under-the-hood thing.
Is there an example anywhere of writing an iterator? 07:57
And is it worth upgrading from a pre-GLR perl? I'm wary of doing so lest I break code which currently works and get distracted working on that rather than this. 07:58
moritz ChoHag: not quite an example, but doc.perl6.org/type/Iterator documents the interface
ChoHag: and yes, post-GLR is the future. 07:59
07:59 bjz joined
ChoHag I know it's the future, but is it the present and does it have an impact on writing an Iterator? 08:04
The only/main thing I think I didn't get from the docs page is where/how to create the Iterator object.
But you're right, documenting this stuff in the document rather than relying on examples is preferable. 08:05
08:05 Actualeyes joined
moritz ChoHag: the Iterable object must have a method "iterator" 08:05
ChoHag: and yes, post-GLR is the present too, and it's required for a sane iterator API
ChoHag In that case: fiddlesticks. 08:06
Here I go shaving another yak.
08:08 sitaram joined 08:13 bjz left 08:15 darutoko joined, dbrock left, bjz joined 08:21 bjz left, andreoss joined 08:24 bjz joined 08:29 lizmat joined
lizmat waves from the Perl booth at EuroOSCON 08:29
mrf waves back 08:30
DrForr waves from ... well, his office. Exciting, I know. 08:31
mrf DrForr: I don't think its fair that you have an exciting office. 08:32
08:33 ely-se joined 08:36 sergot_ is now known as sergot
DrForr Well, we *do* have a foosball table and X-Box. 08:36
mrf Well la de da :D 08:38
ChoHag My office has a 4 year old. 08:42
It's certainly exciting.
sergot hi #perl6 \o
08:43 edehont left
sergot timotimo: do you work on the qt-profiler? 08:43
ChoHag Is the GLR merged into 2015.10? 08:47
FROGGS ChoHag: yes, was merged in 2015.09 already
ChoHag Oh. Yeah I haven't been able to pay much attention recently. 08:48
08:49 softmoth joined 08:50 g4 joined 08:54 softmoth left
lizmat ChoHag o/ 08:54
ChoHag Hi. 08:55
e: class Foo is Iterator { multi method pull-one { "the other" } } 08:57
m: class Foo is Iterator { multi method pull-one { "the other" } }
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H0IKLurIXR␤Method 'pull-one' must be implemented by Iterator because it is required by a role␤at /tmp/H0IKLurIXR:1␤»
moritz ChoHag: "does Iterator", not "is Iterator" 08:58
it's a role
ChoHag m: class Foo does Iterator { multi method pull-one { "the other" } }
camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Method 'pull-one' must be implemented by Foo because it is required by a role␤»
moritz m: class Foo does Iterator { method pull-one { "the other" } } 08:59
camelia ( no output )
moritz if you want multis, you need your onw proto there
ChoHag Oh right.
09:01 dakkar joined 09:03 quester left
llfourn I'm currently getting a hang on test 17 with: perl t/harness --verbosity=5 --moar t/spec/S05-transliteration/trans.rakudo.moar 09:04
ChoHag Right well (does Iterable)'s .map calls iterator but (does Iterator)'s pull-one seems to be ignored.
Are there any other parts of Iterator which need to be implemented for basic operation?
09:05 TEttinger left 09:07 espadrine_ left, espadrine joined 09:13 TEttinger joined, espadrine left 09:15 risou is now known as risou_awy, risou_awy is now known as risou 09:18 lolisa joined 09:29 cognominal left 09:31 tokuhiro_ joined 09:33 domidumont joined 09:34 cognominal joined 09:35 tokuhiro_ left 09:41 espadrine joined 09:42 brrt joined
brrt \o 09:42
timotimo heyo 09:50
tokuhirom, try this for an infinite list of a bunch of things:
m: my @list = <a b c>.Slip xx *; say @list[99]
camelia rakudo-moar cd7766: OUTPUT«a␤»
tokuhirom Slip! 09:51
timotimo .tell AlexDaniel you can use .Slip for the <foo bar baz> xx * thing to make it flat: <foo bar baz>.Slip xx * will give you a lazy list of these three elements repeated
yoleaux timotimo: I'll pass your message to AlexDaniel.
timotimo sergot: i've dug into the code a tiny bit, but not really much; do you have a specific question? 09:53
09:54 nowan_ joined 09:55 rindolf left, RabidGravy joined
rarara_ Hello, I have a question about the MAIN function: can it have an indefinite number of arguments? 09:56
09:56 bjz_ joined 09:57 bjz left
brrt ohai timotimo 09:57
timotimo yeah, you can just use a *@rest parameter for your MAIN multi-sub, rarara_ 09:58
09:58 nowan left
timotimo ohai brrt 09:58
09:58 rindolf joined 09:59 nowan joined 10:02 nowan_ left 10:03 yeahnoob left 10:05 dakkar left 10:06 edehont joined
sergot timotimo: no, I just wanted to get back to it recently :) 10:09
timotimo sounds good to me
i had started on a view for garbage collection data, but didn't get it to workh
10:10 lizmat left
timotimo and also we're lacking a widget that can show multiple colors for a single progress bar 10:10
dalek ast/curli: aa1a8a3 | (Stefan Seifert)++ | / (3 files):
Don't use lib from inside a module
timotimo so if you want to fiddle around with painting manually ... ;)
dalek Heuristic branch merge: pushed 16 commits to rakudo/curli by niner
10:11 dakkar joined 10:15 rurban joined 10:16 donaldh joined 10:18 pmurias joined 10:28 spider-mario joined 10:31 Zoffix joined 10:37 ParsonsNose joined, lucasb_ joined, softmoth joined 10:40 bjz_ left, ely-se left 10:41 dayangkun_ joined, softmoth left 10:42 bjz joined, dayangkun left
dalek p: 57a0c2f | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
[js] Make nqp::elems work correctly on things that have a 'is positional_delegate'.
10:44
p: c8354e8 | (Pawel Murias)++ | t/nqp/73-delegation.t:
Test that nqp::elems works correctly on things that have a 'is positional_delegate'.
p: 63f8d26 | (Pawel Murias)++ | t/nqp/11-sub.t:
Print out a nice test number when outputing tap with a print from a test file.
p: 8401f08 | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::freshcoderef.
p: 6333c7e | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::markcodestub. (The serialization doesn't yet take it into account).
p: 354b474 | (Pawel Murias)++ | src/QAST/Var.nqp:
Dump the value/default of a QAST::Var when dumping the AST.
10:46 zakharyas joined 10:47 weihan joined 10:51 azawawi joined
azawawi hi #perl6 10:51
how do I copy a folder recursively in Perl 6?
dalek ast/curli: cbe5c5a | lizmat++ | S02-types/WHICH.t:
Add test for new X::Pragma::CannotPrecomp class
10:52
ast/curli: fa871fd | lizmat++ | S02-types/WHICH.t:
Add X::Package::UseLib
ast/curli: 57a7ba6 | (Stefan Seifert)++ | S11-compunit/compunit-dependencyspecification.t:
Test CompUnit::DependencySpecification
ast/curli: ad02a52 | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
First tests for CompUnit::Repository
ast/curli: 75a4abd | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
Test if $*REPO is a CompUnit::Repository
ast/curli: 140314a | (Stefan Seifert)++ | / (3 files):
Don't use lib from inside a module
timotimo azawawi: personally, i'd shell out to cp; there's no way you'll implement every last little thing that's necessary for a proper copy; like soft/hard links, ACLs and extended attributes, selinux context, ... 10:53
or perhaps even rsync
azawawi timotimo: so basically depend on OS commands to do it as a first step until someone actually implements it :) 10:55
timotimo i think "copy a directory recursively" is one of those things that looks ridiculously simple at the surface, but has a whole bunch of details that can go wrong 10:56
and also you'd have to make a decision up front what kind of copying would be enough for you
nine also cp has --reflink=auto which may speed up copying tremendously on file systems like btrfs 10:57
timotimo is a reflink a bit like a hardlink, but more like "copy on write"? 10:58
nine It's exactly a copy on write. Which is why it works with a copy on write file system like btrfs or zfs
timotimo fair enough
10:59 lizmat joined
rarara_ timotimo: what is the * in the *@rest parameter of MAIN multi ? 11:01
11:01 Actualeyes left
nine m: "Whfg nabgure Crey unpxre".trans("a .. z" => "n .. za .. m", "A .. Z" => "N .. ZA .. M") 11:01
camelia ( no output )
timotimo it makes it a slurpy
there's slurpy positional parameters, like *@args, and there's slurpy named parameters, like *%kwargs 11:02
rarara_ great!
and what is the use of a non-slurpy @ parameter?
timotimo comparable to python where it'd be *args and **kwargs 11:03
that's for when you want to pass an array
llfourn m: say "Whfg nabgure Crey unpxre".trans('a .. z' => 'n .. za .. m', 'A .. Z' => 'N .. ZA .. M')
camelia rakudo-moar cd7766: OUTPUT«Whfg nnbgure Crey unpxre␤»
timotimo m: sub two_arrs(@one, @two) { say +@one; say +@two }; two_arrs <foo bar baz> <a b c d e f>
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RsmSfg3N_u␤Two terms in a row␤at /tmp/RsmSfg3N_u:1␤------> 3two }; two_arrs <foo bar baz> <a b c d e7⏏5 f>␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
timotimo m: sub two_arrs(@one, @two) { say +@one; say +@two }; two_arrs <foo bar baz>, <a b c d e f>
camelia rakudo-moar cd7766: OUTPUT«3␤6␤»
azawawi timotimo: i see. thanks for the info. 11:04
rarara_ timotimo thank you 11:05
timotimo you're welcome :)
lizmat llfourn nine can confirm the hang, but no idea why 11:07
11:07 kid51 joined
lizmat or how it could relate to the work I've done 11:07
llfourn lizmat: I'm on OS X
timotimo i've had a transliteration spectest OOM on me, too
llfourn lizmat: but I ran it on a debian container -- the test fails but it doesn't hang I think 11:08
lizmat: actually scratch that this hangs on my deb as well >perl6 -e "'Whfg nabgure Crey unpxre'.trans('a .. z' => 'n .. za .. m', 'A .. Z' => 'N .. ZA .. M')" 11:10
dalek kudo/nom: f2ac7ee | lizmat++ | src/core/Supply.pm:
Implement :vent-at for Supply.throttle
llfourn but the test fails more gracefully
in the harness -- dunno why
....but running the harness manually in my deb container like erl t/harness --fudge --moar --verbosity=5 t/spec/S05-transliteration/trans.t also hangs 11:11
llfourn has no idea
11:14 ely-se joined, Actualeyes joined 11:17 leont joined, dolmen joined
dolmen I'm discovering the DateTime type: doc.perl6.org/type/DateTime 11:17
I'm surprised to see there isn't a TimeZone object 11:18
How are we supposed to handle dailylight saving time? Manually? 11:19
(Manually = without core support)
except this MAJOR issue, I like this API 11:21
11:21 dakkar left
dolmen (Date / DateTime api) 11:21
lizmat llfourn: it looks like it is picking the wromg MMD candidate... not the one that starts with a Pair :-( 11:22
leont dolmen: AFAIK the primitives are there to build a DateTime::Timezone module 11:24
llfourn lizmat: I think I understand. So it loops in the MMD. Glad you found it :)
brrt dolmen: timezones are provided as integers... what is missing to you
(let's just say that i would not a priori agree with the thesis that a timezone should be an object) 11:26
llfourn brrt: handling daylight savings? your UTC offset is not static... 11:28
timotimo unless you represent a timezone as "the whole thing", you can't implement traversal along the timeline "properly"
brrt but timestamps, which is what a datetime object is, do have a static UTC offset 11:29
11:29 donaldh left
brrt a clock object may have a timezone object, but for a timestamp object that is not true 11:29
dolmen brrt: my timezone is Europe/Paris. It was UTC+2 until saturday night and is now UTC+1. Will be back to UTC+2 in march. This happens every year. This is called daylight saving time. 11:30
brrt i'm familiar with the process
:-)
dolmen brrt, when building a localtime object what matters is the timezone, not its offset right now
brrt disagreeish 11:31
dolmen brrt, DateTime.now.truncated-to('month') will not be DWIM if it returns a value in UTC+1 instead of UTC+2 11:32
brrt hmm.... i can see why that would be so. but then you're talking about calendar services, not timestamping 11:33
11:33 zakharyas left
brrt basically, we're blending the functions of 'immutable representation of a certain point in time' and 'calculating jumps on a timeline' 11:34
dolmen brrt, timezone name is also very important for DateTime formatters
brrt and they're not the same
hmm.. i can see why you would say that. but again, that's beside the point (imho) 11:35
anyway, i have to go
my opinions on this are not nearly as strong as i suggest
:-) 11:36
11:36 brrt left
llfourn dolmen: pretty much every language's main datetime thing handles TZ. I don't think you are crazy for expecting it. 11:36
dolmen brrt, DateTime are for human. Computer just need an Instant and an epoch
llfourn the decision was made (I'm guessing) so that implementations didn't have to worry about all those headaches and that one good community module could handle it for all of them 11:37
11:38 rurban left
llfourn like DateTime in perl 5, moment.js etc 11:38
dolmen DateTime in perl 5 hase DateTime::TimeZone 11:39
RabidGravy there is a DateTime::TimeZone in the ecosystem 11:40
llfourn dolmen: ok I thought it was part of it all I remember is that when you parse a datetime string you can set which timezone it's meant to be in
dolmen: my point was that DateTime was a community module
RabidGravy if it doesn't do everything that is required, may I suggest sending patches to make that happen?
llfourn RabidGravy: according to spec it's not meant to handle TZ 11:41
mrf Datetime has a lot of issues with the method of its implementation. I would recommend speaking with zephram on '
#london.pm if you want to know more
11:41 CIAvash left 11:42 CIAvash joined
RabidGravy llfourn, DateTime::TimeZone er? 11:43
11:43 colomon left
dolmen yes mrf is doing huge work with timezone in Perl 5, such as building infrastructure to rely on timezones available (an kept up to date) in the operating system 11:43
s/yes mrf/mrf: yes, Zefram/
llfourn RabidGravy: orite sorry I misinterpreted :)
dolmen is going to lunch
mrf I generally would defer to Zefram on any Time related discussions. 11:44
11:44 dayangkun_ left 11:46 eiro left 11:47 tokuhiro_ joined, colomon joined, dakkar joined 11:49 colomon left 11:51 tokuhiro_ left, colomon joined 11:55 kid51 left 11:59 eiro joined 12:03 rurban joined
RabidGravy is "is does of returns as handles will trusts hides" the complete list of "trait introducing words" or are there others hidden in the grammar? 12:04
llfourn RabidGravy: looking at the grammar atm and that seems to be it 12:06
RabidGravy this gleaned by 'grep proto src/core/traits.pm | grep -v '#' | sed -e 's/.*<//' -e 's/>.*//' | paste -s -d " " - -' for reference ;-) 12:07
llfourn grepping Grammar.nqp revlease the same although trusts doesn't seem to be there 12:08
reveals*
12:08 ollej left
RabidGravy cheers 12:09
lucasb_ is "as" still a thing?
RabidGravy well apparently 12:10
lucasb_ btw, nice pipeline. I like pipelines :) 12:11
RabidGravy multi sub trait_mod:<as>(Parameter:D $param, $type)
:)
12:12 TEttinger left 12:15 ollej joined 12:17 yqt joined
azawawi quick q, how do get a character array from a Perl 6 string? 12:19
dalek kudo-star-daily: e8c874a | coke++ | log/ (8 files):
today (automated commit)
rl6-roast-data: 071969c | coke++ | / (9 files):
today (automated commit)
nine azawawi: Str.comb
lucasb_ m: sub f(::Int() $x) { say $x }; f(Int()) 12:22
camelia rakudo-moar cd7766: OUTPUT«(Int(Any))␤»
lucasb_ m: sub f($x as Int()) { say $x }; f(Int())
camelia rakudo-moar cd7766: OUTPUT«(Int(Any))␤»
azawawi nine: thanks though it is no intuitive
lucasb_ ^^ just showing an interesting thing I found. coercion types as first class things :)
I know, it doesn't make sense to mix "as" and Type() syntax 12:23
nine azawawi: true. No one seems to think first of a hair comb when trying to split a string into characters
azawawi nine: and split has extra '' behavior around an array 12:24
m: say "Perl 6".split('').perl;
camelia rakudo-moar cd7766: OUTPUT«("", "P", "e", "r", "l", " ", "6", "").Seq␤»
12:25 softmoth joined
pink_mist would have expected there to be a :trim argument to split 12:27
(and that that was how comb was implemented) 12:29
12:30 softmoth left 12:32 lolisa left
RabidGravy comb is somewhat the reverse of split, though the degenerate case has a similar effect 12:32
12:36 Begi1114 joined 12:37 kolikov joined
kolikov Hi perl6 ! 12:38
12:38 AlexDaniel joined
lucasb_ Just for the record, nevermind my previous example of using ::Int() as paramenter type. It is totally wrong. 12:38
12:39 Skarsnik joined, CIAvash left
lucasb_ m: sub f(::Int $x) {} 12:39
camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
lucasb_ m: sub f(::Int() $x) { say $x }; f('abc')
camelia rakudo-moar cd7766: OUTPUT«abc␤»
lucasb_ the first one is ok: you can't capture a type in Int, because Int already exists 12:40
the second one I don't know what it means. ::Int() should be the same type of the argument, which is a string
12:44 loren joined
lucasb_ m: sub f(::foo() $x) { say ::('foo()') }; f('abc') 12:46
camelia rakudo-moar cd7766: OUTPUT«(Str)␤»
lucasb_ ^^ See? the type Str got captured in a type called 'foo()'. it has nothing to do with coercions. don't know why the parentheses are allowed :) 12:47
12:47 sufrostico joined
llfourn I didn't even know you could capture the type in subs o.o 12:48
kolikov m: say ('a','b','c').first:k: /a/;
camelia rakudo-moar cd7766: OUTPUT«a␤»
kolikov should not :k cature the index of list since 2015.43 ?? 12:49
ShimmerFairy m: say ('a','b','c').first: :k, /a/; 12:50
camelia rakudo-moar cd7766: OUTPUT«0␤»
ShimmerFairy ^^^ that's how you use adverbs when using .foo: syntax
kolikov Thanks ShimmerFairy :)
ShimmerFairy you're welcome :) 12:51
lucasb_ m: 'oh'.say:a:b:c 12:53
camelia rakudo-moar cd7766: OUTPUT«oh␤»
lizmat the .trans hang seems xx related 12:54
12:54 zakharyas joined
lucasb_ ^^ don't know where those adverds end up; they are silently ignored 12:54
Skarsnik hm, I have a dumb question about Nativecall. why str in CStruct does not work to represent const *char? but Str work, I mean it does not corrupt the data. 12:55
lizmat m: (my $ = "foo") xx -1 # the hang is found
camelia ( no output )
lizmat huh? 12:56
hangs for me locally
star: dd (my $ = "foo") xx -1 12:57
camelia star-m 2015.09: OUTPUT«().Seq␤»
lizmat m: dd (my $ = "foo") xx -1
camelia rakudo-moar cd7766: OUTPUT«Seq $var = ().Seq␤»
azawawi github.com/azawawi/perl6-selenium-...les/ex02.t # Automated Firefox testing is now working. Have fun :) 12:59
13:00 ][Sno][ joined, [Sno] left 13:05 acrussell left
lizmat azawawi++ 13:07
RabidGravy azawawi++ # nice job
13:07 rurban left
mrf score azawawi++ 13:07
kolikov m: say ('aa','a').first(:kv,/^^ a $$/); 13:08
camelia rakudo-moar cd7766: OUTPUT«Unexpected adverb 'kv' passed to first on List␤ in block <unit> at /tmp/twM_W2ukEc:1␤␤Actually thrown at:␤ in block <unit> at /tmp/twM_W2ukEc:1␤␤»
kolikov m: say ('aa','a').first(:p,/^^ a $$/);
camelia rakudo-moar cd7766: OUTPUT«1 => a␤»
AlexDaniel .tell timotimo “azawawi: personally, i'd shell out to cp” – noooo… use “run”, you don't need the shell to call “cp“ command… 13:09
yoleaux 09:51Z <timotimo> AlexDaniel: you can use .Slip for the <foo bar baz> xx * thing to make it flat: <foo bar baz>.Slip xx * will give you a lazy list of these three elements repeated
AlexDaniel: I'll pass your message to timotimo.
13:10 edehont left
lizmat kolikov: that seems wrong :-) 13:10
13:10 aborazmeh joined, aborazmeh left, aborazmeh joined, rurban joined
kolikov first() returns list or pair ? 13:11
dalek kudo/nom: 421022d | lizmat++ | src/core/Str.pm:
Make sure all candidates have same invocant sig
13:12
kudo/nom: c93e637 | lizmat++ | src/core/List.pm:
Fix for hang in t/spec/S05-transliteration/trans.t
13:12 nowan_ joined
lizmat kolikov: ah, yes: grep allows for kv, but for first it doesn't make much sense 13:13
as it always returns a single thing, not a List
so if you want the position, you would need to use :p 13:14
13:14 edehont joined
kolikov - lizmat the adverb (:k,:p,:v) is not specifying the return type in that case ? 13:15
13:15 nowan left
lizmat well, depends on what you're firsting on, of course 13:17
but it always returns a single scalar
13:17 nowan joined
lizmat :kv would then be a really odd one out, so I figured I'd better no do it 13:17
13:19 nowan_ left
kolikov - lizmat , ok suits me fine, and the error message on adverb is quite explict, so ... :) 13:20
takadonet morning all 13:21
13:21 domidumont left 13:22 domidumont joined 13:25 domidumont left, telex left 13:26 domidumont joined, telex joined 13:27 Alina-malina left, domidumont left 13:29 domidumont joined 13:32 n0tjack joined, travis-ci joined, travis-ci left, tokuhiro_ joined 13:36 sufrostico left 13:37 tokuhiro_ left 13:38 skids joined 13:39 sufrostico joined
azawawi AlexDaniel: ping 13:40
AlexDaniel yes
azawawi AlexDaniel: maybe you need to use shell if you need globbing?
AlexDaniel azawawi: for quick and dirty scripts, maybe 13:41
azawawi: otherwise you can find your files in perl6 and then just pass them to run 13:42
AlexDaniel has to go
azawawi AlexDaniel: thanks and cya 13:43
13:45 azawawi left
lizmat .tell masak hejki told us to say hi to you at EuroOSCON 13:46
yoleaux lizmat: I'll pass your message to masak.
n0tjack .tell yoleaux define recursion 13:48
yoleaux n0tjack: Thanks for the message.
lucasb_ no recursion :(
n0tjack lucasb_: it was just TCO'd away ;) 13:49
13:50 pmurias left
gfldex m: gist.github.com/gfldex/57c6deea4b5244f69d09 13:53
camelia rakudo-moar cd7766: OUTPUT«1) f has been entered␤3) here be dragons␤6) no, I'm dead␤»
gfldex should the LEAVE be executed in that case?
i'm asking because without the CATCH it is 13:54
pink_mist design.perl6.org/S04.html#Phasers mentions it should also fire LEAVE when there are exceptions, so I'd expect that to also be true for handled exceptions 13:56
lizmat yeah, jnthn fixed some bugs related to that not too long before is holiday 13:58
m: use nqp; sub a is raw { nqp::list(1,2,3) }; dd nqp::atpos(a,0) # works as expected
camelia rakudo-moar cd7766: OUTPUT«Int $var = 1␤»
lizmat m: use nqp; class A { method a is raw { nqp::list(1,2,3) } }; dd nqp::atpos(A.a,0) # but not when it's a class method ? 13:59
camelia rakudo-moar cd7766: OUTPUT«This type does not support positional operations␤ in block <unit> at /tmp/aeUoqsG7zP:1␤␤»
PerlJam gfldex: if you s/die/fail/ the LEAVE phaser gets executed too
lizmat timotimo masak moritz : is there a reason for this, or is this some bug / NYI ?
moritz lizmat: no idea 14:01
gfldex PerlJam: is that intentional?
lizmat it's stopping me from moving internal subs to class methods in Rakudo::Internals
14:01 riatre joined
PerlJam gfldex: I dunno. 14:01
14:02 softmoth joined
PerlJam gfldex: I would have expected the LEAVE phaser to fire no matter what. 14:02
lizmat m: use nqp; class A { our sub a is raw { nqp::list(1,2,3) } }; dd nqp::atpos(A::a,0) # our subs work, but are like 20x slower
camelia rakudo-moar cd7766: OUTPUT«Int $var = 1␤»
lizmat so not really an option :-(
14:03 ][Sno][ is now known as [Sno]
lucasb_ gfldex: Isn't the problem that 'exit 1' inside CATCH? If you remove it, then I think LEAVE gets executed. 14:06
bbarker So what Linux distributions are people using Rakudo Star on with relative ease? 14:07
gfldex lucasb_: that does indeed work. However, that just moves the bug around. 14:10
leont Meh. MAIN doesn't support having both short and long ended names arguments apparently ( :l(:$lib)) )
moritz bbarker: Debian (though I build R* from source)
leont Is that intentional or an oversight? 14:11
moritz leont: doesn't sound intentional
RabidGravy bbarker, I primarily use Fedora though have Debian on the raspberry pis
Skarsnik Hello, hm what did I do wrong with named argument? pastebin.com/NKN3EaSD 14:12
14:12 raiph joined
RabidGravy Skarsnik, there are no named arguments to print_xml 14:13
named arguments are prefixed by :
eg print_xml (:$xmldoc, :$cpt = 0, :$tag_only = False)
gfldex Skarsnik: see design.perl6.org/S06.html#Named_arguments 14:14
Skarsnik I think I stumble on an old doc or I did not see you have to do something special in the declaration 14:15
thx
hm, can't use the ordered call when there are tagged as named? 14:16
14:16 ely-se left
gfldex .oO( Death to all old docs! Long live the revolution! ) 14:17
n0tjack Skarsnik: named and positional arguments are distinct in p6 -- an argument is either named or it is position 14:18
al
Skarsnik: you can mix the two; positional arguments first, then named arguments 14:19
Skarsnik Another question: I want to use the tests from another module (html::parser::xml) for the module I am writing (does the same thing) should I do a fake h:p:x module that call mine. Or is thre a way to replace the call in some way? 14:22
lizmat FROGGS: so how serious is the irclog.perlgeek.de/perl6/2015-10-24#i_11428957 issue that psch mentioned? 14:23
I've been able to build JVM until now, will that soon change ? 14:24
FROGGS lizmat: I can't build perl6-j since saturday...
14:25 aborazmeh left
FROGGS lizmat: maybe this depends on the jvm one uses 14:25
lizmat oh? hmmm...
bbarker Thanks moritz and RabidGravy
FROGGS lizmat: cd77669d09d38e5ddb89ee8f6c8392bacebdf829 works, while the patch afterwards results in a "Class file too large" 14:26
lizmat is double checking
dalek rl6-roast-data: e9eb244 | coke++ | / (9 files):
today (automated commit)
14:27
FROGGS lizmat: I use oracle jdk atm btw
lizmat argh, confirmed 14:29
14:29 tokuhirom left
FROGGS lizmat: as I understand we split methods already, but not classes 14:29
jdv79 does it make sense to have some sort of write once attr trait? 14:30
its like to have the attr type obj determine the class (.= new) and that's hard to do when you want immutable attrs 14:31
s/like/nice/
[Coke] tries a jvm build on his local box. 14:32
14:34 ely-se joined 14:37 khw joined
[Coke] ayup, class file too large. 14:41
llfourn also has Class file too large!
leont Meh, I just wanted to build my first perl6-j today! 14:44
RabidGravy jdv79, on the face of it that wouldn't be too hard to make: trait applies a role to the Attribute object that over-rides the set-value to do it with a flag to indicate it has been set once 14:48
14:49 Begi1114 left
RabidGravy or something like that 14:50
jdv79 maybe i'll try to do that someday. right now maybe i'll just multi in a setter that dies if the attr is defined.
14:52 Aggressively_Alp joined
lizmat I'm working on the P6W, please let me know of anything newsworthy! 14:52
[Coke] lizmat: the release.
lizmat hehe... like I could forget that :-) 14:53
RabidGravy I for one have nothing useful to report, lots of crack induced ideas but they don't count
gfldex lizmat: it may be worth to note that rosettacode got some Perl 6 love. Some post-GLR fallout has been fixed but there may be more and help, both with spotting and with fixing, is very welcome.
14:54 ParsonsNose left 14:55 Aggressively_Alp left 14:58 g4 left 15:04 ely-se left
lizmat one way to fix the JVM size issue, is to make the core smaller by expelling some features to lib and autoload them when needed 15:04
Sets/Bags/Mixes come to mind there, e.g. ?
15:07 thowe left
FROGGS really really hates javascript... in a browser... on a phone... when it is buggy and does not report errors 15:08
15:10 uruwi left
RabidGravy yeah, I think the only javascript I've every actually enjoyed was some Node server stuff I made in my last job 15:10
15:11 ely-se joined 15:13 CIAvash joined
tony-o i like javascript, i don't like that copying a jquery widget makes people think they *know* js 15:15
boggard the server side is the last place i'd want to see javascript.
ely-se nowhere is where I want to see JavaScript
tony-o replace it with ecmascript 15:16
FROGGS I like javascript when I am able to debug it
ely-se JavaScript is ECMAScript
tony-o i know..
ely-se FROGGS: :)
leont FROGGS: I once had to deal with a javascripted system where the main HTML inlined about half a megabyte of minified javascript, and that's without external libs such as jquery, and without the iframes :-/ 15:17
FROGGS ohh dear 15:18
though, I have to support BlackBerry, beat that :P
leont Needless to say, I never really understood what was going on, but it produced pretty graphs 15:19
15:22 weihan left, lucasb_ left
hoelzro o/ #perl6 15:23
lizmat hoelzro o/
rarara_ Hello, in an action, the input object returns an "orig", a "to" and a "from" field. If I want to extract the matched text should I do ".orig.substr(.from, .to).subst("\n","", :g) given $match;" or is there a cheaper way? 15:24
15:24 zakharyas left
hoelzro o/ lizmat 15:25
15:25 abaugher left
FROGGS rarara_: just do ~$/ 15:25
rarara_ FROGGS could you explain me a bit?
RabidGravy "stringify the match object" 15:26
15:26 yqt left, abaugher joined
ely-se line noise 15:26
rarara_ ok
dakkar a propos of grammars… has anyone tried to write a grammar to parse something indentation-dependent, like Python? 15:27
FROGGS rarara_: ~$/ is like $/.Str, and $/ usually is your match object
dakkar (I'd like to have a ReStructured Text parser)
FROGGS rarara_: and .orig.substr(.from, .to) is basically what Match.Str does internalls
internally*
leont dakkar: I have a YAML parser
dalek c: e5dd523 | (Lloyd Fournier)++ | doc/Language/faq.pod:
Noted spec on faq
dakkar leont: that may be enough to give me some idea; link? 15:28
FROGGS dakkar: there is snake, which is written in nqp and is a Pythonish thing
rarara_: if your input param is $_, then just call .Str on that one
rarara_: or $match.Str
RabidGravy I think we need a COBOL parser
dakkar leont: oh, YAMList, found it 15:29
s/t,/h,/
RabidGravy just for shits and giggles
15:29 tokuhirom joined, AndyDee joined
leont RabidGravy: writing a hybrid environment that allows one to switch from COBOL to a modern language gracefully may actually be a viable thing, TBH 15:30
dakkar leont: yep, that trick with :temp $*yaml-indent is exactly what I was missing 15:31
now I "only" have to understand it properly :)
leont Yeah, it took some experimentation to get it to work :-)
15:31 edehont left 15:34 tokuhirom left
ely-se parsing COBOL is easy 15:34
RabidGravy leont, it's entirely possibly that one could just feed github.com/antlr/grammars-v4/tree/...er/cobol85 to DrForr's ANTLR4 and take it from there
15:35 AlexDaniel left
DrForr pricks his ears up. 15:36
dakkar leont: what lifetime / storage / visibility does a «my $*foo» have?
DrForr It's in the corpus/ directory, I believe.
15:36 AlexDaniel joined
leont dakkar: it's dynamic, that's why I explicitly define them in parse/subparse 15:37
dakkar "dynamic" does not mean much to me… I'm missing things :) 15:38
the actual doubt I have: if two threads run that grammar at the same time, will they interfere?
leont "not lexical"
No
It's looked up in the callstack, going up until it finds a $*variable with the right name
dakkar finally, non-package 'local' :) 15:39
DrForr RabidGravy: The last main issue I've got to fix is parsing stops at 'mode' tokens.
RabidGravy :) 15:40
15:46 petercommand left, petercommand joined
[Coke] hopes he's not the only one who reads "awaiterator" in Doofenschmirtz's voice. 15:53
lizmat: what is Supply.throttle(:$vent-at) do? (needs docs for docs.perl6.org/type/Supply#method_throttle) 15:54
*does 15:55
lizmat it gives the value at which any buffered messages are bled of to the bleed supply
*off
15:57 ely-se left
[Coke] "bleed" also doesn't appear anywhere in the Supply docs. 15:57
nor "message" 15:58
I'll open a doc ticket.
16:03 n0tjack left 16:04 |Tux| left 16:08 |Tux| joined, yqt joined 16:10 moznion left
RabidGravy is there an example in the spec test (or elsewhere) of EVALing a class definition in a string and trying to use it? 16:12
16:14 Alina-malina joined
RabidGravy or is that even possible? I might be missing something as I can't get it to work 16:14
16:16 domidumont left
RabidGravy never mind, getting confused between shell quotes and perl quotes 16:17
[Coke] if you're EVAL'ing a class definition, you should look into using the MOP directly instead. 16:19
RabidGravy normally yes, but this is for a basic test of some method traits (i.e. that it compiles) 16:21
[Coke] ok
16:22 raiph left
[Coke] looks for MOP in the spec test suite and fails to find anything. 16:24
RabidGravy ew
hahainternet so if i was implementing a class which does Positional, is there any good example I can look at? I'm sure there is in the source but i'd like to find something clean and readable to a non perl6-er 16:27
16:30 diana_olhovik joined
RabidGravy hahainternet, github.com/zostay/perl6-ArrayHash/...ayHash.pm6 does Positional *and* Associative just for fun 16:34
dalek c: b22d12a | (Lloyd Fournier)++ | doc/Type/Callable.pod:
doc .assuming
RabidGravy if you only want Positional you can ignore the *-KEY methods ;-)
16:34 pollei joined
hahainternet RabidGravy: looks good, but i'm confused as to how positional is defined 16:35
the only method listed under its role is 'of'
but this is called with no args, no return and is passed through by your example
i guess i'm missing something key here
ah, doc.perl6.org/language/subscripts#Custom_types 16:36
would be nice if there was some easy association between Positional -> these methods
16:37 andreoss left 16:38 DrParisInHolland joined 16:39 quuxman left 16:41 loren left 16:42 loren joined 16:43 diana_olhovik left
rarara_ is it correct that: my $seq = ~$/; is read only? how to copy the content? 16:46
16:46 loren left 16:49 lizmat left 16:51 lizmat joined
psch rarara_: what content to you want to change? 16:51
hahainternet RabidGravy: ok so lets say i do class MyClass is Array
16:51 rhr left
hahainternet but i want to be ale to catch 'after push' 16:51
i could have sworn i saw this in p6 docs, method modifiers?
but i can't find it again now
psch rarara_: ~$/ gives you the stringified last match object, which is a Str, which are immutable
rarara_ psch I found a workaround 16:52
I think I understand the rule 16:53
now
16:54 perigrin left, n0tjack joined
lizmat commute to AmsterdamX.PM& 16:54
16:54 lizmat left
n0tjack I know I've asked this before but I forgot the answer: how do I do weighted random selection? 16:54
psch m: say <a a a b b c>.Bag.pick: 3 16:55
camelia rakudo-moar cd7766: OUTPUT«(c b a)␤»
psch m: say <a a a b b c>.Bag.pick: 3
camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
psch m: say <a a a b b c>.Bag.pick: 3
camelia rakudo-moar cd7766: OUTPUT«(b a c)␤»
psch what are the odds
m: say <a a a b b c>.Bag.pick: 3
camelia rakudo-moar cd7766: OUTPUT«(a a a)␤»
RabidGravy hahainternet, there are no "method modifiers" per se, there is a wrap() on a Method, but in this case you probably want something like:
n0tjack hmm, I was thinking more along the lines of {foo => 1.23 , bar => 4.56, baz => 1e6} 16:56
16:56 kolikov left
n0tjack which would almost always pick baz 16:56
16:56 xfix joined
psch m: (foo => 1.23 , bar => 4.56, baz => 1e6).Bag.pick(3) 16:56
camelia rakudo-moar cd7766: OUTPUT«Type check failed in assignment; expected Int but got Rat␤ in block <unit> at /tmp/W_ADKmaxpn:1␤␤»
psch hm, Mix?
RabidGravy m: class G is Array { method push(|c) { my $f = callsame; say "push"; $f }}; my $g = G.new; $g.push("h"); say $g.perl
camelia rakudo-moar cd7766: OUTPUT«push␤$["h"]␤»
psch m: (foo => 1.23 , bar => 4.56, baz => 1e6).Mix.pick(3)
camelia rakudo-moar cd7766: OUTPUT«.pick is not supported on a Mix␤ in block <unit> at /tmp/Z_uRWv9Mpj:1␤␤Actually thrown at:␤ in block <unit> at /tmp/Z_uRWv9Mpj:1␤␤»
psch no
n0tjack timtoady showed me a cool method but it slipped my mind :/ 16:57
hahainternet RabidGravy: yeah i'm with you, callsame is what i was looking for
although i must say i'm a little confused about the signature of push
seems like it'd never work with a string 16:58
16:59 mayuresh joined
hahainternet (not the one you list, but the one on doc.perl6.org/type/Array#routine_push ) 16:59
mayuresh hello, again! :)
guess what, i am back.
relatively speaking, the other other project's community is very grumpy 17:00
i love it out here a lot more
psch n0tjack: not sure, i guess you'd have to browse the clog
17:00 diana_olhovik_ joined
n0tjack psch: Eh, I'll whip something up 17:00
mayuresh i am going to continue pursuing my interest in developing the 'pxn'. :) 17:01
n0tjack first step is to find a cute way to sort %h.keys by %h.values
mayuresh btw, how does timtoady manage to stay so slim inspite of his love for pepsi?
hahainternet n0tjack: sort on kv, compare keys in the sort block? seems logical
i'm no p6 expert though laff
mayuresh mr. wall must be quite disciplined in the amount of pepsi he consumes, i guess. 17:02
17:02 rhr joined
psch m: my %h = foo => 1.23 , bar => 4.56, baz => 1e6; %h.antipairs.sort.say 17:03
camelia rakudo-moar cd7766: OUTPUT«(1.23 => foo 4.56 => bar 1000000 => baz)␤»
psch but then the value is the key and the key is the value :P
17:04 dha joined
mayuresh psch, that's quite like yin-yang, isn't it? 17:04
n0tjack psch: antipairs, cute :)
psch mayuresh: it might be yang-yin like.. :) 17:05
mayuresh :D
if you like that kind of stuff, check out medium.com/@mayureshkathe
17:06 diana_olhovik_ left
mayuresh it has some pretty wild ideas about reality and existence. :) 17:06
psch uh, i was just making a pun, not getting philosophical :)
mayuresh lol :D
n0tjack making a pun? in a perl channel? scandal! 17:07
mayuresh very!
hahainternet RabidGravy: yeah so it looks like the only thing that confuses me (i noticed i need an |@ ?) is the subroutine signature of push
tony-o wtf did i just look at
psch n0tjack: as the .Bag error above alludes to, .Bag works with Ints, which means normalizing your weights could get you .Bag.pick, which might be good enough
tony-o hahainternet: you need the |@ if you want to push the elements flatly onto the array 17:08
psch n0tjack: not sure if normalizing is less work than reimplementing a Rat-aware weighted random though :)
hahainternet tony-o: no i get the flattening, what i mean is: doc.perl6.org/type/Array#routine_push
if i am 'overriding' ie wrapping this
tony-o ah ^
hahainternet what's with its complex signature that i don't understand :)
ok, a defined array (Whch is not what i'm pushing), but **@values just reminds me of python
just some docs pointers would be fine thx
tony-o are you confused by the sub/method sigs? 17:09
n0tjack psch: Yeah, normalizing works fine
tony-o or the Array:D thing
n0tjack psch: Right now I'm fiddlign with doing it directly ([\+] %h.values) X/ ([+] %h.values) firstless 1.rand; 17:10
RabidGravy I'm not sure that the doc is completely up to date with the actual implementation, it's a multi
mayuresh this channel does have nice people, knowledgeable and intelligent, yet well grounded.
n0tjack though firstless isn't as pretty as I'd like it to be
mayuresh: yeah, then you have me.
;)
hahainternet tony-o: Array:D: just means a defined array afaik, i'm confused by **@values
gfldex hahainternet: design.perl6.org/S06.html#Multidime...st_binding
mayuresh :D
hahainternet gfldex: ok so that's as i expected
but surely this doesn't work with .push("Hi") 17:11
that's not an array in any dimensions
17:11 jnthn joined
tony-o it does, it's slurping all values into an array when that method is called 17:11
m: sub r (*@a) { @a.perl.say; }; r("hi");
camelia rakudo-moar cd7766: OUTPUT«["hi"]␤»
n0tjack anyone who complains about perl6's startup time clearly is not being forced to use Eclipse in any other part of their profession :/
mayuresh of the past 40 hours, i slept only 5, and spent the rest trying to figure out that other project's community. didn't like it as much there. 17:12
eclipse is painful, groan.
tony-o n0tjack: eclipse start up times are probably 40% of wikipedia's page read time
RabidGravy hahainternet, it's a multi with single value candidates
mayuresh infact, even netbeans is better.
but p6 via rakudo+moarvm doesn't have too many problems on my machine.
hahainternet RabidGravy: but where are the single value candidates? 17:13
n0tjack all my company's tools are Eclipse based
hahainternet are they just not listed in the docs?
n0tjack I mean once it's going it's full featured and very configurable
but also brittle
hahainternet or are they seamless calls to another function, append or whatever
tony-o it sucks to use. vim++
mayuresh but i still feel uncomfortable about the fact that they are two separate projects and disparate code bases.
RabidGravy hahainternet, that's what I meant when I said "I'm not sure that the doc is completely up to date with the actual implementation, it's a multi" ;-) 17:14
mayuresh perhaps a result of having worked with smalltalk! ;)
hahainternet RabidGravy: roger that
RabidGravy :)
hahainternet RabidGravy: answered my question thoroughly too, thank you very much for your time, and you tony-o and gfldex
i'll just assume there's a multi with (|@values) or similar hanging about ;)
certainly meets my requirements 17:15
17:15 Alina-malina left
hahainternet one other thing, the reply with my p6 version doesn't do so well with up/down keys and history, is this something that exists already that i'm missing 17:15
or is it something for the future
[Coke] install the Linenoise module 17:16
mayuresh heya [coke]!
how have you been?
17:17 ^elyse^ joined
hahainternet [Coke]: didn't even have panda :( 17:17
shows how well my rakudo setup is configured
n0tjack eclipse on a remote desktop with a shakey wifi connection == productivity 17:18
mayuresh n0tjack, how about eclipse on a remote desktop over a packet-radio link?
n0tjack mayuresh: gives me plenty of time to practice perl6... 17:19
mayuresh :D
17:19 llfourn left 17:21 ^elyse^ left
mayuresh i think, as the leader is, so is his community, else either the community dies off, or the leader gets the boot. 17:21
that's why the perl community is so nice.
FROGGS OT: does somebody know of a datamatrix decoder for javascript? or that can be ported to javascript in a reasonable amount of time? 17:22
mayuresh froogs, search for "marijn haverbeke".
he's good at writing such stuff, might be able to help you.
i meant, froggs! 17:23
:\
17:23 mbrock joined
ugexe m: (^5).map: { if $^a > 3 { say $_; say $^a; }; } # this seems strange 17:23
camelia rakudo-moar cd7766: OUTPUT«(Any)␤True␤»
FROGGS mayuresh: I'll get in touch with him, thank you :o)
mayuresh froggs, you are welcome. :)
17:24 kaare_ left, kaare_ joined
RabidGravy is there some non-obvious way I can intercept the parameter binding for a routine? like I want to do something to the parameter value before it gets bound? 17:25
moritz RabidGravy: you can wrap a routine
RabidGravy: and/or bind to a capture parameter, which binds as raw as possible 17:26
RabidGravy what I have in mind is a parameter trait, so wrapping doesn't help there
RabidGravy looks at Parameter 17:27
17:27 llfourn joined 17:28 virtualsue joined
tony-o hahainternet: this seems relevant: doc.perl6.org/type/Signature#Slurpy...Parameters 17:29
psch hm, can we already declare coercion for user types?
that's what RabidGravy's question makes me think about, fwiw
RabidGravy psch, that's part of what I want to do actually 17:30
psch RabidGravy: what's the other part(s), ooc? 17:31
RabidGravy you *can* do coercion of user types, but Foo(Str) requires a .Foo method
on Str
17:31 dakkar left
mayuresh so, if i understood it right, the p6 specification evolved as the prototype implementations succeded or failed! 17:31
tony-o hahainternet: design.perl6.org/S06.html#Multidime...st_binding 17:32
RabidGravy psch, so I want to capture the parameter binding to apply a role that makes that happen (for the coercion case)
it's all fun until someone gets hurt 17:33
[Coke] does not like coercions, and would prefer if the callers passed in the declared type. 17:34
moritz twitter.com/TheLandonHarris/status...0155154432 # this tweet is in context of Patrick Rothfuss not being very fast with writing his sequels, and people telling him what (not) to do to get them out faster
but I couldn't help thinking of TimToady++'s last keynote :-) 17:35
RabidGravy [Coke], yeah infact multis make this so easy coercions are largely un-neccessary except for the very simplest of cases 17:36
mayuresh moritz, can you please share a link for that last keynote?
tony-o m: sub r ($a where { "binding".say; $_; }) { $a.say; }; r("hello"); # RabidGravy
camelia rakudo-moar cd7766: OUTPUT«binding␤hello␤»
RabidGravy tony-o, of course 17:37
:)
dha moritz - Rothfuss is supposed to be on the next JoCo cruise. I haven't read his books, but he's interesting to listen to, so I say to hell with the books, let him go on cruises. :-) 17:38
tony-o not sure if that gets you to your goal, i'm working and only half reading
17:38 patrickz joined
moritz dha: I quite enjoyed his books, it's some of the best High Fantasy (I guess) since... dunno, LOTR comes to mind :-) 17:38
dha I've heard good things. I just haven't read much fiction in a while, and the PR stuff looks like a big commitment... 17:39
Maybe I should read some before the cruise.
moritz mayuresh: www.youtube.com/watch?v=RvCkvXvqi3...ZW3tMj30Z2 17:40
boggard can we please go back to calling him jonathan coulton?
tony-o negative 17:41
mayuresh moritz, thanks for that link.
RabidGravy tony-o, possibly but it helps me understand what is going on, I hadn't actually considered it to be open to abuse like that ;-)
boggard :(
mayuresh oh, mr. wall has a pony tail!
dha boggard- I tend to. But I call the cruise JoCo
17:41 AndyDee left
tony-o RabidGravy: the other thing that might work is wrapping or augmenting Attribute.new 17:42
dha As, it seems, that is what it is called. More specifically "JoCo Cruise Crazy"
tony-o m: class A { has $!priv = 'private'; }; my A $a .=new; say Attribute.new(:name('$!priv'), :type(Mu), :package(A)).get_value($a); 17:43
camelia rakudo-moar cd7766: OUTPUT«private␤»
tony-o m: class A { has $!priv = 'private'; }; my A $a .=new; say Attribute.new(:name('$!priv'), :type(Mu), :package(A)).^methods;
camelia rakudo-moar cd7766: OUTPUT«(<anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> compose apply_handles get_value set_value container has-accessor readonly package inlined WHY set_why Str gist)␤»
tony-o set_value ^^
17:44 patrickz left
RabidGravy yaw 17:44
17:44 FROGGS left 17:46 n0tjack left 17:47 llfourn left 17:48 n0tjack joined 17:51 nowan_ joined 17:52 xfix left
boggard :( 17:52
17:52 n0tjack left 17:53 n0tjack joined 17:54 nowan left
mayuresh mr. wall's keynote is really a lot of fun. 17:55
positive and enthusiastic. 17:56
very infectious.
:)
RabidGravy it's the crack, it can't be helped
mayuresh crack?? 17:57
is that some kind of a drug?
tony-o poor version of cocaine
RabidGravy er, yes
ugexe sodium bicarbonate and cocaine
mayuresh umnn, wouldn't that just make it coca cola!
hmnn, or as in mr. wall's case, probably "pepsi". ;) 17:58
ugexe well you have to heat it up and whip the mixture while it bubbles unlike coca cola
mayuresh perhaps coca cola is pre-heated and then cooled to make it easy to consume! 17:59
:)
18:00 espadrine left 18:01 moznion joined
mayuresh i tried coca cola, pepsi and thumbs-up. 18:07
prefer pepsi, it's smoother and sweeter. 18:08
boggard rc>*
mayuresh thumbs-up is very much indian, spicy.
coca cola, was very salty.
boggard salty?
mayuresh yeah, it felt like very acrid
guess, that's like a combination of salty and sour. 18:09
boggard rc cola is still the best.
and you're the only person i've ever heard describe coca cola as "salty". 18:10
[Coke] coke zero is best cola.
I admit... I may be slightly biased.
mayuresh what's "coke zero"?
is that like diet-coke?
boggard, yeah, very acrid.
dha I... think so. But more... zero-y. 18:11
?
*shrug*
boggard diet coke is very much NOT the same as coke zero.
[Coke] zero calorie coke (phenylaline and acesulfame potassium)
diet coke has different syrup and different fake sweetener.
18:11 mbrock left
tony-o [Coke]++ 18:11
18:12 ][Sno][ joined
[Coke] it is zero calorie (yay, diabetes!) and tastes like I remember Coke tasting before new coke/coke classic 18:12
I am sure it doesn't, but it is best cola. :)
boggard they use the same sweetener.
foodwatch.com.au/blog/additives-and...-zero.html
[Coke] opens one of the 7 remaining cans on his desk.
18:13 lucasb_ joined
boggard coke zero has less caffeine 18:13
mayuresh you have 7 cans on your desk! radical.
dha less caffeine? what's the point?
tony-o i'm still on coffee today
itz_stmu1 has been experimenting with Pepsi Max since it's significantly cheaper in his part of the world
[Coke] boggard: no, diet coke has no ace-k
boggard [full disclosure: i don't caffeine]
[Coke] they both have aspartame, though, sure. 18:14
boggard [Coke]: /me shrugs
18:14 [Sno] left
boggard that link said they both have ace-k 18:14
and i don't drink colas personally
dha I find diet sodas generally vile.
mayuresh dha +1.
dha But I don't drink a lot of soda nowadays anyway. Tea. Lots of tea. 18:15
moritz likes Irn Bru. Scotland has infected me.
boggard i prefer for me carbonated beverages to contain alcohol instead of caffeine.
TimToady note that's a .au site, rules could be different down under
mayuresh rotflmao. :D
18:16 kjs_ joined
novapatch i'm at the Internationalization & Unicode Conference (#IUC39) this week, which will give me a chance to show off unicode in p6 18:17
TimToady \o/
18:18 Oatmeal joined, Oatmeal left
novapatch twitter.com/novapatch/status/658705447986294785 18:19
18:19 Oatmeal joined, Oatmeal left
TimToady novapatch: if you really wanted to show off, you'd use smartquotes around the 3 chars :) 18:21
itz_stmu1 likes Club Mate. Germany has infected me.
[Coke] opens RT #126461 for the jvm build bug
timotimo .o( just gimme a pepsi free ) 18:23
yoleaux 13:09Z <AlexDaniel> timotimo: “azawawi: personally, i'd shell out to cp” – noooo… use “run”, you don't need the shell to call “cp“ command…
novapatch TimToady: oh my! :D
TimToady I find it slightly hilarious that the followup tweet thinks 𠮟 is two characters 18:24
timotimo AlexDaniel: i said "shell out to" to circumvent having to decide between shell(), run(), QX, P::A, .. ;)
the left half of 𠮟 looks like the "char not found in font" symbol you sometimes get to see :D
mayuresh i am connected via "ircii", and all those weird characters are painful. ;) 18:25
they just show up as little light coloured diamonds.
TimToady irssi does much better
timotimo also, when typing on the LHS of that character in my input line, all letters appeared in the same spot consecutively and when i hit "end" to type text afterwards, the cursor was far to the right with a lot of blank space after that symbol :D
lucasb_ I only see question marks and boxes with hexadecimals in it. someday I'll get my fonts & encoding configuration right.
TimToady we plan to drag the world kicking and screaming into the 1990s 18:26
mayuresh :D
boggard ascii for life.
mayuresh boggard, +1.
timotimo to be fair, i also get the diamond in this setup i have here 18:27
but i think it's probably gnome-terminal's fault?
maybe it's more likely that it's missing fonts
TimToady I'm using gnome-terminal, and it seems fine
boggard imho, we're missing a great opportunity to use computing as a tool to twist humanity's arm into using a single character set.
18:28 FROGGS joined
TimToady actually, that's precisely what we're doing, only that single characer set is not ASCII :P 18:29
mayuresh :)
boggard sorry, i meant a single character set of reasonable size. 18:30
FROGGS o/
dha Maybe we should just simplify it down to a single character.
mayuresh o/
boggard \o/
TimToady Unicode is of reasonable size, if you're a sufficiently good reasoner.
FROGGS takes a closer look at his wardrobe
mayuresh :) 18:32
18:34 kmel joined 18:35 xfix joined
boggard 7 bits oughta be enough for anybody. 18:36
FROGGS and 64k RAM...
boggard 640k
18:37 brrt joined
mayuresh boggard, you should be in the "forth" channel. 18:37
dha In my day, we stored data on cassette tapes, AND WE LIKED IT.
boggard mayuresh: i didn't know forth was still a thing. 18:38
mayuresh it very much is, check the channel, they have it out here too.
brrt ohai #perl6
FROGGS hi brrt
novapatch is it a known issue that extended grapheme clusters are not (yet) supported?
m: say «நி กำ षि "\r\n"»».chars
camelia rakudo-moar cd7766: OUTPUT«(2 2 2 2)␤»
18:39 rurban left
brrt i'm afraid i must insist with regards to the datetime offset being static 18:39
boggard either way, i profess my love of ascii and consequent hatred of utf8 as someone whose native tongue doesn't play well with ascii.
brrt or rather
FROGGS novapatch: is that related? rt.perl.org/rt3/Ticket/Display.html?id=125927
brrt that i must insist in the difference between a calendar or clock object and a time-instant
18:40 nowan_ left
TimToady novapatch: I believe so; jnthn++ has been working on that in some branch or other 18:40
18:40 nowan joined
brrt a time-instant *must* have a static utc-offset if the timezone thing is meaningful at all 18:40
leont Proc::Async really needs a merge option for std{out,err}. Merging the streams later kills the synchronization that would exist on a properly merged stream
18:41 yqt left, yuppie joined, yuppie left, yuppie joined
TimToady novapatch: and it's definitely in the plan to fix it 18:41
novapatch FROGGS: yes, in fact that uses one of the same examples 18:42
FROGGS leont: same goes for Proc, but I have no idea how to merge streams using libuv
novapatch: do you want to add your examples or shall I?
leont AFAIK proc already handles that
novapatch FROGGS: feel free, thanks 18:43
FROGGS leont: that's news to me
leont It just passes the new stdout as stderr
novapatch TimToady: great. \r\n is bound to surprise some :) 18:44
leont Mind, I haven't tested if it works correctly, but it looks correct at first sight
FROGGS leont: that should be the code I added, and using the :merge option makes moar segfault :S 18:45
18:46 kjs_ left
leont goes testing it 18:46
FROGGS erl6 -e 'say shell("ls", :merge).out.lines'
Abgebrochen (Speicherabzug geschrieben)
err, that's lacking a p 18:47
lucasb_ cool, erlang 6
leont Hmmm, it seems you're right.
FROGGS lucasb_: :D
18:47 kjs_ joined
leont I thought I had tested it, but I quickly moved on to !err (which to me is more sensible in TAP anyway, I'd really like a better solution to how to present that :-/ 18:48
n0tjack m: say :4th;
camelia rakudo-moar cd7766: OUTPUT«Unexpected named parameter 'th' passed␤ in block <unit> at /tmp/hTWOJkziKC:1␤␤»
n0tjack m: say (:4th);
camelia rakudo-moar cd7766: OUTPUT«th => 4␤»
n0tjack heh weird
m: say (:really :stacked); 18:50
camelia rakudo-moar cd7766: OUTPUT«(really => True stacked => 1)␤»
timotimo weird. 18:54
FROGGS :S 18:55
n0tjack m: say (:a :b :c :d :e);
camelia rakudo-moar cd7766: OUTPUT«(a => True b => 1 c => 1 d => 1 e => 1)␤»
n0tjack heh
FROGGS I dont like the code where that is handled
timotimo well, the place we hunt stacked adverbs needs a tiny adjustment ... 18:56
18:56 domidumont joined
timotimo i've had my hands in that code ... i'm not proud of what i've done 18:56
n0tjack the benefit of being a "user" and not a "contributor" is clean hands and a blissful ignorance
FROGGS well, I'm not saying there is an obvious cleaner solution... I just say that I do not enjoy working at it :o) 18:57
TimToady n0tjack: but once you've said that, your conscience can no longer be clean :)
n0tjack TimToady: I'm sorry, I can't hear you through this thick layer of ignorance. 18:58
timotimo FROGGS: yeah 18:59
rindolf Hi all, sup?
mayuresh o/
FROGGS hi rindolf
rindolf FROGGS: how are you?
FROGGS rindolf: fine, thanks :o) 19:00
19:01 pyrimidine_ is now known as pyrimidine
n0tjack m: say (:a0 (:a1 (:a2) ) ); 19:06
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PILfTLwkil␤Two terms in a row␤at /tmp/PILfTLwkil:1␤------> 3say (:a07⏏5 (:a1 (:a2) ) );␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement mo…»
n0tjack m: say (:a0(:a1(:a2)));
camelia rakudo-moar cd7766: OUTPUT«a0 => a1 => a2 => True␤»
n0tjack sup with that
mayuresh gah, that's killed my terminal colours.
i gotta go now, it's past mid-night, time to sleep.
n0tjack I get a0 => a1 => a2 => True but I don't get why whitespace is significant 19:07
19:07 dha left
mayuresh and yeah, i am now not going away, ever again, hopefully ... :) 19:07
n0tjack night mayuresh
mayuresh :)
FROGGS gnight mayuresh
n0tjack: because :foo( ... ) composes a pair 19:08
mayuresh froggs; hope you receive help from marijn for your javascript problem.
FROGGS mayuresh: we'll see :o)
19:08 mayuresh left
n0tjack FROGGS: and :foo(...) doesn't? 19:08
I thought adverbs were just pairs "attached" to something
timotimo it does, but :foo (...) doesn't
FROGGS n0tjack: and :foo (... is a pair (foo => True) followed by a term 19:09
so, two terms in a row
n0tjack ah, ah, I see
thanks
19:11 dha joined
n0tjack m: say (:0xDEADBEEFhi); 19:11
camelia rakudo-moar cd7766: OUTPUT«xDEADBEEFhi => 0␤»
n0tjack m: say (:1e6hello); 19:12
camelia rakudo-moar cd7766: OUTPUT«e6hello => 1␤»
rindolf Can anyone tell me how to make this program faster? The original Perl 5 script (same dir) runs much faster - bitbucket.org/shlomif/project-eule...ew-default
n0tjack m: say (:1.23hithere);
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lcjUA0_l7_␤Malformed radix number␤at /tmp/lcjUA0_l7_:1␤------> 3say (:17⏏5.23hithere);␤ expecting any of:␤ number in radix notation␤»
dalek kudo/nom: ab91aea | FROGGS++ | src/Perl6/Actions.nqp:
fix T(Foo) when T was captured as ::T
timotimo huh, perl6 has no expmod built-in? 19:13
FROGGS m: sub foo(::T $a) { say T(Cool) }; foo 42 # that's what the patch fixes
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xHKd2LQhIn␤Target type too complex to form a coercion type␤at /tmp/xHKd2LQhIn:1␤------> 3sub foo(::T $a) { say T(Cool)7⏏5 }; foo 42 # that's what the patch fixes␤»
timotimo rindolf: if you're interested to do a bit of digging yourself, you can try running perl6 --profile
rindolf timotimo: OK. 19:14
timotimo i may do digging myself later today
but don't bet on it
n0tjack rindolf: Off the top of my head, I can't remember where I read it, but I believe p6 has exp_mod built-in 19:15
FROGGS n0tjack: the colon of a pair constructor must be followed by an identifier
n0tjack FROGGS: not in the case of e.g. :4th
that's th => 4
I was just probing the boundaries of what counts as a number
FROGGS true
n0tjack turns out, just decimal integers
timotimo rindolf: i have a patch almost-working that makes for loops over ranges faster again
rindolf n0tjack: OK, it isn't called a lot. 19:16
timotimo rindolf: until then you can get the same result by writing your for loops as "loop (my $low_ds = 0; $low_ds < $DIGITS_SUM; $low_ds = $low_ds + 1) { ... }"
19:16 kjs_ left
rindolf timotimo: ah. 19:16
timotimo: that's ugly. 19:17
timotimo yes, it is
in the future, the code will be transformed in the background for you when compiling
and it won't be ugly at all any more
until then, with that change you can measure how big the impact of that might be
19:18 tokuhiro_ joined 19:19 CIAvash left 19:20 vendethiel joined, espadrine joined
timotimo rindolf: can you tell me your timings for both scripts and what exact version of rakudo and moarvm you have? 19:21
19:23 tokuhiro_ left
rindolf timotimo: how do I tell that? 19:23
timotimo just "time perl6 foobar.p6" and then "time perl foo.pl" 19:24
rindolf timotimo: it's real 0m2.652s for perl 5.
timotimo it'd also be interesting to know if any of those variables need to hold big integers, or if you could type them all as "int" 19:25
rindolf timotimo: www.shlomifish.org/Files/files/text...91.html.xz - this is the perl 6 profile
timotimo with that, i'll be off for a little commute
rindolf timotimo: they can all be ints.
well, 64-bit ones. 19:26
timotimo if your system is 64bit, so are our ints
ah, it's "only" 18 megabytes big 19:27
... browser is churning ...
rindolf: we have a "fast path" in moarvm for big integers that fit into 32bits, where the upper 32bit of what is otherwise the pointer to a big int thingie get turned into a flag 19:28
but it's still very costly in comparison to a native int, as those are stored in exactly 64bit in ram while they are being calculated with (though our boxing-removal may not be perfect, or even good)
lucasb_ m: my ::foo $x 19:29
camelia ( no output )
lucasb_ ^^ should this die, since foo is not known at compile time?
19:30 pollei left
n0tjack m: say ::whaa; 19:32
camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol whaa␤»
n0tjack m: say my ::whaa;
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5===␤Type 'whaa' is not declared␤at /tmp/_ZaBDd6G77:1␤------> 3say my ::whaa7⏏5;␤Malformed my␤at /tmp/_ZaBDd6G77:1␤------> 3say my ::whaa7⏏5;␤␤»
[Coke] m: my ::foo $x = 3; say "alive"; 19:33
camelia rakudo-moar cd7766: OUTPUT«Type check failed in assignment to $x; expected foo but got Int␤ in block <unit> at /tmp/67hS_O6N2e:1␤␤»
[Coke] That seems not unreasonable.
timotimo perhaps it gets stubbed there?
19:34 espadrine left, travis-ci joined, travis-ci left
lucasb_ m: class Str {}; class Bool {}; class Num {}; say 'hi' 19:36
camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
lucasb_ sorry, nonsense eval :) 19:37
19:40 n0tjack left 19:41 domidumont left 19:42 domidumont joined
zengargoyle is there anything like --profile for the rakudo level? ala NTYProf? (wish i could understand the --profile stuff ) 19:43
19:43 _dolmen_ joined 19:44 brrt left, pyrimidine left, lucasb_ left, pyrimidi_ joined, llfourn joined, domidumont left
FROGGS zengargoyle: try: perl6-m --profile-compile -e 'say 42' 19:45
19:45 n0tjack joined, domidumont joined
timotimo i think zengargoyle means a line-profiler 19:45
[Coke] What do you mean "for the rakudo level"? it's there...
19:49 llfourn left 19:50 cognominal left 20:00 cognominal joined, Skarsnik left
zengargoyle yeah, more like NYTProf or something that shows which subroutines / lines of my code are the time takers 20:00
my poor laptop can't even load the --profile-compile for a non-trivial program. 20:01
20:04 cognominal left
RabidGravy I don't think so 20:04
20:05 domidumont left
jnthn zengargoyle: It *does* show you the subroutines that are the time takers; if you just want to restrict it to subroutines in your script then type (some chars from) the name of your script into the name filter box at the to of the routines tab. It mostly *looks* overwhelming 'cus it includes where time is spent inside of the Perl 6 built-ins too 20:06
yoleaux 20 Oct 2015 21:31Z <tony-o> jnthn: i've submitted a PR for Grammar::Debugger to fix Grammar::Tracer for most recent rakudo build
23 Oct 2015 02:39Z <[Coke]> jnthn: When you return, if you can build a tarball of the last moarvm tag we did while you were gone and upload that to the moarvm download site, jnthn++
25 Oct 2015 21:00Z <vendethiel> jnthn: on your blog, jnthn.net/papers/2008-fpw-rakudo-slides.pdf is broken
20:06 kjs_ joined
vendethiel I did say that. 20:06
Hi, #perl6.
20:07 pyrimidi_ is now known as pyrimidine, darutoko left 20:08 ][Sno][ left
jnthn is never going to manage to backlog 8 days worth, so will patiently wait for lizmat++ to post the p6weekly to find out what happened :) 20:12
[Coke] again is stymied by not being able to use panda on the work network. 20:14
zengargoyle yeah, the --profile is 1.8M and won't filter on my subroutines, the --profile-compile is 34M and too much for my machine 20:17
[Coke] switched to non work network; tried to install IO::Socket::SSL - dies with a Find::Bundled not found.
20:18 apotheon left
jnthn zengargoyle: "won't filter"? 20:18
[Coke] We could probably add something to the profile.html that lets you exclude the setting, or pick a specific file
jnthn zengargoyle: --profile-compile is not likely to be of interest
[Coke]: Aye, or build entirely different frontends to the info :)
zengargoyle i type one of my subroutine names in the search box and it isn't there...
jnthn zengargoyle: Maybe it wasn't called?
zengargoyle definately called. 20:19
20:20 lichtkind joined, apotheon joined, dha left
[Coke] looks like a panda bug - IO::Socket::SSL depends on openssl, which depends on Find::Bundled, but that isn't installed. 20:21
zengargoyle i have a 'is-solved()' that's called a bunch and on the #routines section all i see is is-lazy and is-absolute
jnthn zengargoyle: Then I'd be interested on how to reproduce it; I've not yet known the profiler to *miss* stuff, and if it is then I'd like to fix it 20:22
retupmoca [Coke]: 'panda update'?
[Coke]: Find::Bundled is new as of this past weekend 20:23
20:23 n0tjack left, yqt joined
zengargoyle i'll gather up some stuff it's a problem sover for a /r/dailyprogrammer challenge that uses some of the concurrency stuff. 20:24
[Coke] if ppanda is smart enough to grab the latest version of the code, why doesn't it grab the corresponding version of META.info ?
zengargoyle i'd rather you look at rt.perl.org/Public/Bug/Display.html?id=126454 which i found while working on it. :) 20:25
[Coke] Or report that the META.info has changed, and that perhaps a panda update is in order?
jnthn zengargoyle: Well, I wasn't planning earliest to survive until Christmas...
flussence jnthn: tl;dr of this week: a bunch more of lizmat++'s "x% faster" commit messages, someone asking for a solaris tracing feature in moarvm, a long debate over qx{} being nasty and should go away etc, some other stuff
20:26 Hor|zon left
jnthn flussence: Thanks. Did TimToady++ weigh in on the qx thing? 20:27
(if you saw)
FROGGS I didn't see nothing 20:28
flussence I haven't paid much attention [or that tl;dr would be more l :)], don't think so though
jnthn k
I hope he isn't hoping to leave me to rule on that :P
20:29 apotheon left
flussence oh and lizmat made an await-ish thingy that works in for loops, that looked kinda neat. 20:29
jnthn Yeah, I saw it in the commit log, but I sure ain't clever enough to review concurrency stuff this evening :)
[Coke] cosimo: if I want http_proxy support, will LWP::Simple support that?
20:30 kjs_ left
[Coke] I know tickets about it were closed, but it's not working here. :) 20:30
20:31 geraud joined
RabidGravy jnthn, also funny deadlock thing in require tickled by creating URI objects in a thread 20:32
20:33 ^elyse^ joined
jnthn In...require? As in the require keyword? 20:34
FROGGS jnthn: there is a Lock in CompUnit.load IIRC
so, probably yes
RabidGravy yeah, so it seems, though this may be a mis-diagnosis
jnthn k...RT'd?
RabidGravy RT #126390 20:35
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126390
jnthn OK, thanks
20:35 apotheon joined
FROGGS RabidGravy: let that man rest :o) 20:37
jnthn Well, not going to work on any of these tonight, just getting an idea of what's been going on :) 20:38
itz_stmu1 wb jnthn++
jnthn And what people hope might get my tuits in the nearish future :)
RabidGravy no, no. the house isn't on fire ;-) 20:39
itz_stmu1 precomp!
zengargoyle jnthn: cool, i'll worry about earliest or whatever at a later date. here's the code i was trying to profile: gist.github.com/zengargoyle/88083f...5507d63ef4
kmel how do i install p6doc?
FROGGS itz_stmu1: others are working on it :o)
itz_stmu1 others++
kmel panda install pedoc?
RabidGravy yeah
kmel p6doc**
PerlJam kmel: yeah, withouth the typo
heh, typo irony 20:40
RabidGravy downloads the data and everything
20:40 [Sno] joined, itz_stmu1 is now known as itz_stmuk
jnthn smiles at d70ff74d4c. Ain't nothin' wrong 'bout U+0027 ;) 20:41
kmel weird, it doesn't show in panda list
jnthn zengargoyle: Thanks; added to my "to look at" list :) 20:42
20:42 kjs_ joined
kmel done. thanks PerlJam RabidGravy 20:43
[Coke] jnthn: that particular one got reverted. 20:45
FROGGS spectests a fix for RT #126383
[Coke] ilmari++'s note made sense at first, but I got a comment on the commit with citations!
they are still unicody, though.
20:45 zengargoyle left 20:46 zengargoyle joined
RabidGravy [Coke], that comment tickled me, it just shows how geeks will form armed camps of conflicting opinion on the slightest pretext 20:48
[Coke] With great vim, even. 20:49
RabidGravy same as people really quite seriously freaking out over the number spaces after a full-stop in English text
FROGGS RabidGravy: NUMBER *OF* SPACES! ò.ó
FROGGS .oO( RAGE!!11 ) 20:50
boggard number of spaces? how are spaces delimited?
FROGGS *g*
boggard i figured empty space would be a continuous quantity, not a discrete one. or are we talking about quantum lengths here?
s/quantum/planck/ 20:51
sorry, it's monday.
RabidGravy some of us learned to type on typewriters 20:52
20:52 n0tjack joined
PerlJam mechanical or electric? 20:53
FROGGS heh, imagine a unicode extension :o)
boggard well now you're talking about typesetting, not english text in general.
RabidGravy mechanical
n0tjack m: »ö«; 20:54
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MTxXc3RTlw␤Missing infix inside hyper␤at /tmp/MTxXc3RTlw:1␤------> 3»7⏏5ö«;␤ expecting any of:␤ infix␤ infix stopper␤»
boggard english text can also be hand printed, or even hand written in script. in these contexts, "number of spaces" is meaningless.
geekosaur *eyeroll*
n0tjack m: sub infix:<ö> ($a, $b) { say "surprise!"}; »ö«;
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DlxOGF3P7J␤Preceding context expects a term, but found infix »ö« instead␤at /tmp/DlxOGF3P7J:1␤------> 3fix:<ö> ($a, $b) { say "surprise!"}; »ö«7⏏5;␤»
RabidGravy readies the pedant bat
geekosaur also from the age of mechanical typewriters. kids these days wouldn't believe...
boggard perhaps you may find this distinction pedantic, but i think it's very much relevant in the context of spacing following a full stop.
20:55 Sgeo joined
dalek kudo/nom: 6902d51 | FROGGS++ | src/Perl6/ (2 files):
handle genertic types in coercions on params

As in: sub foo(::T $a, T() $b) { ... } - fixes RT #126383
20:55
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126383
n0tjack I say split the difference: 1.5 spaces after a period.
20:55 rindolf left
boggard particularly since most modern desktop publishing solutions take care of kerning intelligently in a way that renders this whole debate moot. 20:55
kerning != 'number of spaces'. 20:56
20:56 Sgeo__ left
boggard the very idea that some quantified 'number of spaces' should follow a full stop is now dated. 20:56
n0tjack m: say "We must all learn to compromise.  All of us.";
camelia rakudo-moar cd7766: OUTPUT«We must all learn to compromise.  All of us.␤»
n0tjack heh
[Coke] but given that how it renders often has little to do with the bytes in the file, eh. I was raised on 2 spaces for typing out documents, but try hard to keep it to one when doing anything electronic. 20:57
20:57 kaare_ left
n0tjack types two out of habit, not religion 20:57
.u  
yoleaux U+2002 EN SPACE [Zs] ( )
boggard so, if we're talking about plain text in a file, indeed, kerning isn't something that should be encoded in the file bytes.
that's why using 2 spaces makes no sense.
geekosaur back in typewriter days it mattered, at least to some authorities who would reject manuscripts if you didn't use 2 spaces 20:58
n0tjack m: say "\x200A";
camelia rakudo-moar cd7766: OUTPUT« ␤»
n0tjack .u   20:59
yoleaux U+200A HAIR SPACE [Zs] ( )
Hotkeys I just use one space and let microtype handle making everything look nice
geekosaur had to retrain himself to not automatically 2-space after . or :
20:59 ilbot3 left, patrickz joined
Hotkeys Then again I didn't grow up in the age of the typewriter 20:59
20:59 ilbot3 joined
n0tjack I didn't either, but my teachers did 20:59
boggard in an era of typewriters and monospaced fonts, it made sense. but that aera is over. 21:00
Hotkeys I just write all the documents for which I care about presentation in latex
it handles it well enough
n0tjack boggard: in certain contexts it still makes sense. on one mailing list I participate in, the web interface renders everything monospaced (because there's such a high code:prose ratio).
21:00 kjs_ left
boggard valid point, but i'm still not sure how i feel about that. 21:01
dalek ast: 7f43444 | FROGGS++ | S06-signature/type-capture.t:
add tests for foo(::T, T(Any)) { ... }
boggard i never really understood the justification for the whole 'two spaces after a full stop' thing to begin with. 21:02
patrickz Hi! I want to do a "use lib '../lib';" which works irrespective of the cwd. Does Perl6 offer anything or do I need to fiddle using $*PROGRAM or similar?
n0tjack boggard: in monospaced text, it really is easier to pick out the beginning of sentences that way.
one thing I never understood was indenting the first line of a para.
unless the para is directly beneath the former with no intervening blank lines. then it makes sense. 21:03
moritz m: say $*PROGRAM.parent
camelia rakudo-moar cd7766: OUTPUT«"/tmp".IO␤»
moritz patrickz: nothing explicitly built in, afaict
FROGGS patrickz: seems to work here: 21:04
~/dev/rakudo$ perl6 -e 'BEGIN chdir ".."; use lib "$*CWD/../lib"; say @*INC[0]'
file#/home/froggs/dev/../lib
~/dev/rakudo$ perl6 -e 'BEGIN chdir ".."; use lib "../lib"; say @*INC[0]'
file#../lib
moritz eeks, don't chdir in BEGIN
FROGGS :o)
moritz unless you really want to confuse yourself :-) 21:05
21:05 firstdayonthejob left
n0tjack m: [xx] (3,2,1); 21:05
camelia ( no output )
patrickz use lib $*PROGRAM.parent ~ '../lib'; # That does it
n0tjack m: say [xx] (3,2,1);
camelia rakudo-moar cd7766: OUTPUT«((3 3))␤»
n0tjack m: say [xx] (4,3,2,1); 21:06
camelia rakudo-moar cd7766: OUTPUT«(((4 4 4) (4 4 4)))␤»
n0tjack m: say [Rxx] (4,3,2,1);
camelia rakudo-moar cd7766: OUTPUT«(((1 1) (1 1) (1 1)) ((1 1) (1 1) (1 1)) ((1 1) (1 1) (1 1)) ((1 1) (1 1) (1 1)))␤»
patrickz moritz: Thanks!
gfldex are there any operators beside // and [//] that look for definedness?
moritz gfldex: andthen, orelse iirc 21:07
n0tjack m: say Nil iirc 3; # nope
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6mVcAhvo_T␤Two terms in a row␤at /tmp/6mVcAhvo_T:1␤------> 3say Nil7⏏5 iirc 3; # nope␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
n0tjack though now I'm gonna make an iirc op 21:08
FROGGS :P
Hotkeys lol
FROGGS gnight 21:09
boggard n0tjack: but in what situation do you ever find yourself scanning over a large block of monospaced text and looking specifically for the start of each sentence?
RabidGravy will it occasionally give a different result in case it didn't remember correcty
21:09 FROGGS left
boggard is that a use case that we should base typesetting around? 21:09
Hotkeys Just be happy that it isn't what it originally was--3 spaces
n0tjack boggard: one doesn't look for the start of sentences, they present themselves to you. same reason we break stuff up into paras. you're not looking for the "start of a new para", but introducing para breaks makes the entire structure more obvious and approachable.
boggard: I imagine that's the origin of capitalization after a period as well. 21:10
boggard heh, another useless feature of written language :P
n0tjack 90% of edits I make on StackExchange are to break up impenetrable walls-o'-text into paras, just so I can see if there's even a question being asked. 21:11
boggard let's double the glyph count for.. for what? to make full stops even more apparent?
21:11 Begi1114 joined, skids left
n0tjack boggard: written language wasn't designed under a "glyph count budget", and when those constraints were introduced, we got all sorts of cool innovations (headlinese, telegraph abbrvs). 21:12
21:12 raiph joined
boggard imho s/cool/terrible/ 21:12
n0tjack boggard: many rules which seem arbitrary, not only in orthography but many spheres of thought, were introduced to address some problem (which may no longer be apparent).
[Coke] decommutes 21:13
n0tjack boggard: I think if you go and study orthography and grammar, not typesetting, you'll change that opinion.
n0tjack [RCoke] # Recommutes [Coke]
RabidGravy so I make a 107 character glib comment about geeks taking polarised views and the next half hour expends several thousand characters reinforcing it ;-p 21:14
21:15 Ven joined
n0tjack RabidGravy: just means you have well-established opinions ;) 21:15
boggard regarding capitals in english?
n0tjack (PS: dude ... you just counted the number of characters in your comment ;)
RabidGravy :-O 21:16
wc counted it for me
n0tjack oh, did it raise its hand, then?
boggard i'd be fascinated to see if that's possible. capitalization pains me, as should be evident.
n0tjack wish my terminal were more proactive....
leont n0tjack: capitals are older than periods, in fact they're older than lower-case ;-)
RabidGravy e e cummins hated capitals too
paris mostly, but occasionally E 21:17
n0tjack leont: But when and why was the convention of capitalizing the 1st word in a sentence introduced?
leont: It's only speculation, but makes sense to me to visually indicate sentence breaks
I always found it odd that "E prime"'s primary purpose was to eschew Es.
RabidGravy I'd say it originates from handwritten script of much importance 21:18
Hotkeys a lot of the time when typing I don't capitalize the start of sentences
boggard if European languages, except for Ancient Greek and Latin, did not make the case distinction before about 1300.
n0tjack me either.
Hotkeys or punctuate individual sentences
I still can't resist capitalizing "I" though
n0tjack Hotkeys: Well, going back far enough, words weren't broken up either
RabidGravy which I think is also why the spaces on paragraphs comes from, to make room for hand illumination of the starting character
n0tjack Hotkeys: and sometimes they did the zig-zag thing on paper
21:18 travis-ci joined 21:19 travis-ci left
n0tjack but as the technology developed, more rules insisting on structure and consistency were introduced and enforced 21:19
"proper spelling" wasn't even a thing til like what, the 18th century/
Hotkeys I like the old cramming style of some letters where they wrote both vertically and horizontally over one another to fit more content on a small letter paper
boggard There was no fixed capitalisation system until the early 18th century.
Hotkeys it isn't really part of the language structure
but still neat
n0tjack I mean heck, go back far enough (or even to all those weird countries over there -->) and vowels were optional 21:20
21:20 Ven left
RabidGravy n0tjack, France? 21:21
n0tjack [#perl6] m: say "\x200A";
Hotkeys vowels are still mostly optional if you write in shorthand :p
n0tjack RabidGravy: your monitor is oriented improperly ;)
moritz srsl?
RabidGravy (because I don't think Bexleyheath is a country....)
n0tjack Hotkeys: clrly tht wld b cnfsng ...
Hotkeys not really 21:22
21:22 Hor|zon joined
n0tjack RabidGravy: I'm sitting here thinking you made up "Bexleyheath" altogether 21:22
Hotkeys ambiguous words can usually be written with a vowel in them
n0tjack I know, I was making a (ineffective) pun
Hotkeys lol
esp. since yours was pretty much unambiguous :p 21:23
21:23 cognominal joined
Zoffix giggles 21:23
Wrote to codeeval.com, asking to add P6 and this is the response: "Hello Zoffix, Right now Pearl 6 is not in our product roadmap. We generally review new languages once every quarter or so and discuss adding those that look like they're gaining traction or interest from our community. Warmly, Jeff" (yes, they wrote "Pearl" :P)
n0tjack I feel like if there are really places named "Bexleyheath", we should get hobbits, too
Hotkeys maybe it got corrected automatically
21:24 Ven joined
Hotkeys I like when names are spelt entirely unlike their pronunciation 21:24
eg. Featherstonehaugh
pronounced "Fanshaw"
boggard regarding "optional vowels", are you talking about languages which had abjads but not alphabets?
21:25 bjz left
n0tjack Hotkeys: www.youtube.com/watch?v=mOd3lwluQIw 21:25
boggard i'd argue that that's not really a fair comparison, at least not any more than bringing up some logographic system.
n0tjack no, alphabetic languages where vowels were not written 21:26
modern Hebrew is an example, even today
only little kids write the "vowels" (actually diacritical marks) so that they learn how words are pronounced 21:27
21:27 Hor|zon left
n0tjack adults don't, except in extremely ambiguous cases 21:27
21:27 Ven left
Hotkeys n0tjack: i've seen this vid 21:29
very good
n0tjack His "just glue some gears on it and call it steampunk" is pretty good too 21:31
21:32 AlexDaniel left, lucasb_ joined 21:33 firstdayonthejob joined
Hotkeys I'm not sure if this counts as a shibboleth but you can tell if someone isn't from southern ontario if they pronounced "toronto" as [tərɑnto] instead of [trɑnə]/[trɑno] 21:34
21:34 cognominal left
n0tjack Hmm, I'm from NYC and I use the two-syllable pronunciation 21:35
Hotkeys Do you pronounce the second 't'
RabidGravy Lunnan
n0tjack I guess I've been there enough to have picked that up
21:35 Begi1114 left
lucasb_ m: 42++ 21:35
camelia rakudo-moar cd7766: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤ in block <unit> at /tmp/KO3KCGECrT:1␤␤»
n0tjack no, toronno
TimToady but have you been to Atlanna?
lucasb_ ^^ Clearly a LTA message, since there is no $a in my code. It should say something like that message "Cannot modify an immutable Int"
Hotkeys the second 't' is usually the giveaway
3 syllable is acceptable too as long as you miss the second 't'
n0tjack: you are an honorary ontarian 21:36
congrats
n0tjack Hotkeys: Thanks. Sorry.
oregonians have the same quip about their state: uruhgun, not ore-ah-gon 21:37
or worse, ore-ay-gon
Hotkeys I've always say ore-uh-gun
never heard ur-uh-gun
s/say/said
TimToady maybe east of the cascades 21:38
n0tjack ore-uh-gun is also acceptable so long as the first two syllables overlap a bit
Hotkeys er
it's more like uh
TimToady not west of the cascades
Hotkeys origin but with a hard 'g' sound
n0tjack TimToady: how do you say it
TimToady Just like it's spelled :P
and I've lived in Oregon, as have many of my relatives... 21:39
n0tjack I had a friend, Alan Dzjima, who used to say that
(JAY-mah ... duh)
21:39 cognominal joined
gfldex m: sub f1(){Failure.new('WELP!')}; sub f2(){ $_ ~~ Failure }; my $s = f1() orelse f2(); dd $s; # this mistake will be common 21:39
camelia rakudo-moar cd7766: OUTPUT«Failure $var = Failure.new(exception => X::AdHoc.new(payload => "WELP!"), backtrace => Backtrace.new)␤»
gfldex i would prefere ($s = f1() over (f1() orelse f2()) 21:40
Hotkeys I say [orəgɪn]
I think I did that right
n0tjack learning IPA is on my list.. but it's a long list 21:41
Hotkeys had to for my intro ling class a couple weeks ago
RabidGravy lI don't say it often enough to have an opinion, even though my brother in law lives in Portland
21:41 tokuhirom joined
Hotkeys did well on my transcription test but actually finding the letters on the computer is still an adventure 21:41
n0tjack hmm, would be fun to make a slang that spoke IPA 21:42
Hotkeys ?
n0tjack in p6
make an IPA grammar
have it speak the sounds
Hotkeys lol
there's quite a few sounds in the IPA
that'd be an interesting project 21:43
RabidGravy festival binding crossed my mind a couple of times
n0tjack or maybe make a phonetic-spelling grammar, fairly liberal, that tried its best to render the appropriate IPA
21:43 AlexDaniel joined
n0tjack Hotkeys: I'd restrict the scope to spoken English 21:43
Hotkeys that becomes difficult because of how many dialects of english there are
en.wikipedia.org/wiki/Internationa...h_dialects
check out that vowel chart
n0tjack Yeah, I know, but I think (?) all I have to do is map char : sound file 21:44
RabidGravy they don't have "Estuarine" 21:45
21:46 tokuhirom left
Hotkeys They don't have a lot of american dialects either 21:46
I think they went with the most general
RP, GA, etc.
RabidGravy en.wikipedia.org/wiki/Estuary_English 21:47
AlexDaniel .tell jnthn No, there was no input from TimToady yet. Although I like my pull request the way it is, there are a couple of things to think about: “out” or “runout”, “runout” or “run-out”, and whether qx// should still exist with “no strict”.
yoleaux AlexDaniel: I'll pass your message to jnthn.
Hotkeys I like this dialect 21:48
n0tjack alright, I'm going to go pick an argument with a programming language 21:49
I'll see y'all tomorrow
21:49 tokuhiro_ joined
Zoffix \o 21:49
21:49 n0tjack left
cognominal m: my @a; .say for @a.^roles 21:49
camelia rakudo-moar cd7766: OUTPUT«(Positional)␤Method 'iterator' must be implemented by Iterable because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp:2661␤ in any apply at gen/moar/m-Metamodel.nqp:2671␤ in any compose at gen/moar/m-Metamodel.…»
cognominal sounds weird 21:50
leont It's a more general issue that I've hit before
m: role Foo { method bar {...} }; my Foo @bar; @bar.perl.say 21:51
camelia rakudo-moar cd7766: OUTPUT«Method 'bar' must be implemented by Foo because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp:2661␤ in any apply at gen/moar/m-Metamodel.nqp:2671␤ in any compose at gen/moar/m-Metamodel.nqp:2807␤ in any make_…»
21:53 tokuhiro_ left
[Coke] I just looked up estuary english, and thought "what? I grew up right next to the thames, what are they... oh. the one in OLD england." 21:54
21:54 cognominal left 21:55 cognominal joined
lucasb_ when you 'say' a role, it tries to create a class out of it? that's why this message? 21:55
m: say Iterable
camelia rakudo-moar cd7766: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp:2661␤ in any apply at gen/moar/m-Metamodel.nqp:2671␤ in any compose at gen/moar/m-Metamodel.nqp:2807␤ in…»
lucasb_ I don't know why it needs to create a class just to say it 21:56
bartolin leont: I believe that's RT #116220 21:57
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=116220
RabidGravy [Coke], yeah the one about a mile in <- direction from here ;-)
PerlJam lucasb_: roles aren't instantiable things.
leont bartolin: thanks!
bartolin yw :-) 21:58
RabidGravy PerlJam, no but you might want to that latter example
a role is avalid typeconstraint
lucasb_ PerlJam: I understand that, but they are auto-punnable 21:59
kmel m: class Human { has $!name; method new ($name) { self.bless(:$name); } }; my $john = Human.new(name => 'John'); say $john;
camelia rakudo-moar cd7766: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in method new at /tmp/xa4BCi9iyS:1␤ in block <unit> at /tmp/xa4BCi9iyS:1␤␤»
RabidGravy i.e. some object that does the role
I use it quite a lot
kmel any idea what is wrong in my code?
RabidGravy no, :$name in the signature of new 22:00
kmel m: class Human { has $!name; method new (:$name) { self.bless(:$name); } }; my $john = Human.new(name => 'John'); say $john; 22:01
camelia rakudo-moar cd7766: OUTPUT«Human.new␤»
kmel ah! thanks RabidGravy
PerlJam kmel: your original code would have worked witht my $john = Human.new("John");
RabidGravy you want has $.name to make sense though 22:02
kmel m: class Human { has $!name; method new ($name) { self.bless(:$name); } }; my $john = Human.new('John'); say $john;
camelia rakudo-moar cd7766: OUTPUT«Human.new␤»
RabidGravy m: class Human { has $.name; method new ($name) { self.bless(:$name); } }; my $john = Human.new('John'); say $john; 22:03
camelia rakudo-moar cd7766: OUTPUT«Human.new(name => "John")␤»
gfldex m: my \ain't-a-good-name = 1; dd ain't-a-good-name
camelia rakudo-moar cd7766: OUTPUT«Int $var = 1␤»
gfldex m: my \ain't-a-good-name = 1; say ain't-a-good-name.VAR.name
camelia rakudo-moar cd7766: OUTPUT«Method 'name' not found for invocant of class 'Int'␤ in block <unit> at /tmp/M1mevF40q6:1␤␤»
kmel PerlJam indeed! this is why i overrided new(). I got lost.
22:03 xfix left
kmel RabidGravy yes $.name makes sense. I was just reading doc.perl6.org/language/objects and trying to understand how OO works in perl 6 22:05
i was trying to see if blessing new works for both ! and . 22:06
RabidGravy it won't show you the attribute in .perl for a "private" attribute 22:07
kmel why does it say that it is not a good practice to bless new() ? 22:08
22:08 Zoffix left
RabidGravy because you typically don't need to 22:08
22:08 pmurias_ joined, pmurias joined 22:09 pmurias_ left
kmel "However this is considered poor practice, because it makes correct initialization of objects from subclasses harder" 22:09
RabidGravy yes
pmurias konobi: what time do you tend to hang out on #perl6?
gfldex i found rakudo tends to be smarter then i am. So i let it do as much automaticly as i can.
RabidGravy for the most part you can provide a "submethod BUILD" 22:10
kmel I didn't reach subclasses yet so i'll have to take it as it is :)
RabidGravy to do the initialisation
you don't need to provide a new() at all, though typical reasons might include providing multi candidates for different kinds of arguments 22:11
dalek p: b26314e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
[js] Implement if $expr -> $value {...} and similiar.
p: cfcf500 | (Pawel Murias)++ | t/nqp/88-more-if-tests.t:
Test if/unless with passing an argument to the block.
p: 3de27a4 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
[js] make compose support associative and positional delegates.
p: 8cfb66e | (Pawel Murias)++ | src/vm/js/nqp-runtime/code-ref.js:
[js] make code refs boolify to 1
p: b5b9064 | (Pawel Murias)++ | tools/missing-js-tests:
[js] update tools/missing-js-tests
kmel so just to make it clear, blessing new() is not good practice or a constructor that accepts positional arguments is not good practice?
RabidGravy blessing new? 22:12
you mean self.bless ?
kmel yup self.bless
sorry not used to the lingo yet
RabidGravy well, if I was to want to make a constructor with positionals I'd do something like "multi sub new($foo) { self.new(:$foo) } 22:13
"
which should just work 22:14
m: class B { has $.ff; multi method new($ff) { self.new(:$ff) } }; say B.new("rarr") 22:15
camelia rakudo-moar cd7766: OUTPUT«B.new(ff => "rarr")␤»
RabidGravy I meant multi *method* above
kmel aha ok 22:16
pmurias find it strange that a lot of people want to define constructors with positionals
* finds
kmel and multi will not override the original constructor? 22:17
RabidGravy no, that's the point of multi
well as long as the signature is distinct
and then I think you would get an error if it can't determine which to dispatch to 22:18
22:18 lucasb_ left
kmel RabidGravy: thanks for your help 22:19
22:19 ^elyse^ left
kmel i will go back to my playground now :) 22:19
22:20 vendethiel left
RabidGravy pmurias, occasionally if one value is sufficiently distinct (such as a unique ID or something) to be unamibuous I might 22:20
kmel pmurias: i think it's easier that way 22:21
pmurias RabidGravy: with a single argument (especially for an object that is constructed a lot) it makes sense 22:23
22:23 Hor|zon joined
pmurias kmel: easier, you mean takes less typing to call the constructor? 22:23
kmel pmurias: yes. But don't rely too much on my answer. I am still learning how it works. 22:25
pmurias: and apparently it is bad practice 22:26
RabidGravy well it's probab;y less typing to make the attributes "public" and not have to do anything at all
m: class B { has $.foo }; say B.new(foo => "bar);
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1sKE7vH3by␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/1sKE7vH3by:1␤------> 3B { has $.foo }; say B.new(foo => "bar);7⏏5<EOL>␤ expecting any of:␤ doub…»
RabidGravy m: class B { has $.foo }; say B.new(foo => "bar");
camelia rakudo-moar cd7766: OUTPUT«B.new(foo => "bar")␤»
geraud m: my Int:D $answer; say $answer; 22:27
camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QhKZiGOEyv␤Variable definition of type Int:D requires an initializer␤at /tmp/QhKZiGOEyv:1␤------> 3my Int:D $answer7⏏5; say $answer;␤ expecting any of:␤ constraint␤»
kmel RabidGravy: but even if you make them public $.var you still have to do self.bless
geraud my Int:D $answer=42; say $answer
RabidGravy no you don't as the above just showed 22:28
22:28 Hor|zon left
kmel m: class B { has $.foo }; say B.new("bar"); 22:28
camelia rakudo-moar cd7766: OUTPUT«Default constructor for 'B' only takes named arguments␤ in block <unit> at /tmp/DrsX08q5Cw:1␤␤»
kmel see ^^ 22:29
if you want to pass positionals you have to do self.bless either private or public
RabidGravy right, but *if you don't use positionals* it's less typing
no, you don't 22:30
kmel no?
i think i am a bit lost
RabidGravy you create a multi candidate of the new() which takes the positionals and pass that to the named candidate of new() 22:31
m: class B { has $.ff; multi method new($ff) { self.new(:$ff) } }; say B.new("rarr")
camelia rakudo-moar cd7766: OUTPUT«B.new(ff => "rarr")␤»
kmel ah yes yes yes the previous example
RabidGravy I mean if you really wanted to make *more* typing you could call the .CREATE, find the appropriate .BUILD and call that with the arguments (just like bless does) 22:33
but that would be silly
kmel RabidGravy: I definitely need to continue reading the docs.
RabidGravy: Thanks :) 22:34
RabidGravy anyway I'm whacked, catch you all later 22:38
kmel see you later 22:40
22:42 RabidGravy left 22:43 Actualeyes left, espadrine joined 22:44 telex left, telex joined
dalek p: 1c943c5 | (Pawel Murias)++ | src/vm/js/ (24 files):
[js] Remove the leftovers from the pre-rewrite nqp-js, at this point I'm not using that for inspiration anymore.
22:44
22:51 patrickz left
dalek osystem: 2bf2aae | (Matt Oates)++ | META.list:
Added Text::Homoglyph
22:53
Ulti :P 22:54
Ulti is playing with doing some steganography with the ^ above 22:55
23:02 lichtkind left
dalek kudo-star-daily: 4e4b147 | coke++ | log/ (8 files):
today (automated commit)
23:03
23:14 kmel left, ab6tract joined
ab6tract kmel: you can think of new as a class-specific constructor space 23:15
there is a submethod BUILD where you put constructor stuff that you want to get run regardless if the constructor is in an inherited class or not 23:16
it sounds bit crazy, but that seems to be the practical distinction
another way to look at it is: when you write a .new method you have access to any constructor parameters *before* binding 23:17
which is usually enough: munge them in some small way and then send them as named arguments to self.bless . which calls submethod BUILD from the top to bottom of the class hierarchy. the 'original' BUILD, so to speak, which is always called during self.bless, will automatically assign the value of a named argument to the instance variable of the same name 23:21
. o ( do we use the term 'instance variable' when discussing Perl 6? or is that Rubyism? )
23:22 yakudza left
ab6tract kmel: I hope that's at least somewhat useful 23:23
23:24 Hor|zon joined, virtualsue_ joined
psch ab6tract: afaiu, all Attributes are instance variables 23:25
23:25 yakudza joined
ab6tract right, 'attributes' 23:25
thanks psch 23:26
23:26 virtualsue left, virtualsue_ is now known as virtualsue 23:29 Hor|zon left
gfldex review of the following is very welcome: rosettacode.org/wiki/Create_an_obje...ion#Perl_6 23:38
23:40 ingy left 23:43 Alina-malina joined, tokuhirom joined
ShimmerFairy gfldex: looks like you accidentally forgot to close the last code box, unless you meant to have wikimarkup for Python in there :) 23:44
gfldex well spotted of what was just fixed 23:45
i should have scrolled a little further :)
23:47 pmurias left, virtualsue left, espadrine left, tokuhirom left
ShimmerFairy gfldex: aside from that, I like the use of delegation and FALLBACK, though I'm not entirely sure how the FALLBACK example relates to the problem description as I understand it :) 23:48
23:50 yqt left 23:51 lizmat joined 23:52 TEttinger joined
gfldex ShimmerFairy: Magic Methods are methods that appear out of nowhere. That's at least how I understand it. 23:53
lizmat is back from EuroOSCON, AmsterdamX and social meeting :-) 23:54
I will try to get the P6W out before going to bed
23:59 _dolmen_ left