»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
TimToady m: constant $i = 42; my $foo:bar«$i»; 00:00
camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤QAST::Var with scope '' NYI␤»
TimToady m: constant $i = 42; my $foo:bar[$i]; 00:01
camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤QAST::Var with scope '' NYI␤»
TimToady m: constant $i = 42; my $foo:bar($i)
camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤QAST::Var with scope '' NYI␤»
TimToady well, it's consistent anyway
00:02 mniip joined
s34n TimToady: how did we get a multi here? 00:02
TimToady dunno why the scope is '' though, should be 'my'
a proto rule automatically forces its subrules to be multi, you don't have to say 'multi' explicitly 00:03
s34n how did we get subrules? 00:04
TimToady I mean the candidate rules that match the name of the proto
(on the front)
s34n so mult-operator would become a subrule of mult-op? 00:05
because the name mult-op doesn't match mult-op:sym<times> to me 00:06
TimToady well, subrule is probably the wrong name for a candidate, since usually we mean something called directly via <foo> when we say "subrule"
the multies are called indirectly through the proto
s34n how does mult-op:sym<times> get connected to mult-op? 00:07
how are they associated with each other?
TimToady when the grammar calls <infix>, all the infix:sym<*> are really just alternate definitions that the proto knows about, and it arranges to call the candidates in order of which ones matched the longest token
geekosaur oh, it does do that 00:08
TimToady LTM just gives an ordering to call the candidates, but the first candidate must still match entirely, or it bombs out and goes to the next candidate, and so on
00:09 cdg left
s34n again, how are mult-op and mult-op:sym<times> associated with each other? 00:10
00:10 geekosaur left
ShimmerFairy s34n: via an explicit proto token mult-op {*} definition in the grammar 00:11
s34n given any identifier, how can I find all identifiers of the same name appended with a pair?
ShimmerFairy I'm not sure, actually. Most likely via methods in the MOP somewhere, though it may likely be difficult. 00:12
s34n $foo and $foo:bar<baz> can be associated somehow?
TimToady you don't have to worry about that, and shouldn't
it'd be like a parent class trying to determine all the possible methods of its derived classes 00:13
the whole point is that it's extensible by child classes
00:13 geekosaur joined
s34n TimToady: yes. i have to worry about with my current lack of understanding. I have to know if mult-operation will be associated with mult-op 00:13
dalek c: a27516d | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6:
doc colon pair as part of identifier
c: f1bf208 | (Wenzel P. P. Peppmeyer)++ | htmlify.p6:
remove workaround for Failure eating await
TimToady you mean because "mult-operation" starts with "mult-op"? 00:14
no
it must match everything before the :sym
accidental prefixes won't accidentally trigger any inadvertent behaviors 00:15
s34n so the fact that there's a pair included in the identifier makes a difference?
ShimmerFairy TimToady: Now I wonder what $a:b<c> provides for variables (I know why grammar rules make use of it, but don't see how that extends to variable names).
TimToady yes, it's a requirement for candidate tokens 00:16
s34n TimToady: what about mult-op:times ?
TimToady with variables, it only lets you sneak non-ident chars into the identity
s34n :times isn't a pair, so it doesn't count?
TimToady yes, that's a pair
it just defaults the value to True 00:17
00:17 kurahaupo left
dalek c: d9a6d8e | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6:
index S and R meta ops
00:17
ShimmerFairy All pairs written like :times defaults to a value of True, fwiw. (And :!times would be a False pair.)
TimToady m: dd :foo
camelia rakudo-moar 32c08b: OUTPUT«block <unit>␤»
TimToady m: dd (:foo)
camelia rakudo-moar 32c08b: OUTPUT«:foo␤»
TimToady m: print :foo 00:18
camelia rakudo-moar 32c08b: OUTPUT«Unexpected named parameter 'foo' passed␤ in block <unit> at <tmp> line 1␤␤»
TimToady m: print (:foo)
camelia rakudo-moar 32c08b: OUTPUT«foo True»
TimToady m: print (:!foo)
camelia rakudo-moar 32c08b: OUTPUT«foo False»
TimToady m: print (:42foo)
camelia rakudo-moar 32c08b: OUTPUT«foo 42»
00:19 kurahaupo joined, kurahaupo left
TimToady m: my $foo = 42; print (:$foo) 00:19
camelia rakudo-moar 32c08b: OUTPUT«foo 42»
s34n m: my $foo:bar<baz> = 42; says $foo:bar[baz];
camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤»
s34n m: my $foo:bar<baz> = 42; say $foo:bar[baz];
camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤»
00:20 zacts joined
TimToady m: my $foo:bar<baz> = 42; say $foo:bar('baz'); 00:20
camelia rakudo-moar 32c08b: OUTPUT«42␤»
TimToady [] does not quote
s34n :43foo is a pair? 00:21
TimToady as special form
mostly useful for s:2nd/foo/bar/
change the 2nd foo to bar
00:21 maddingue joined
TimToady but also used for .later(:3days) and such 00:22
s34n m: my $foo:bar<baz> = 42; say $foo:bar{baz};
camelia rakudo-moar 32c08b: OUTPUT«Block object coerced to string (please use .gist or .perl to do that) in any canonicalize_pair at src/Perl6/World.nqp line 4351␤Block object coerced to string (please use .gist or .perl to do that) in any canonicalize_pair at src/Perl6/World.nqp line 4…»
TimToady {} doesn't autoquote either
00:22 kurahaupo joined
TimToady but you can't just throw [] or {} in there in place of () anyway 00:23
s34n m: my $foo:bar<baz> = 42; say $foo:bar«baz»;
camelia rakudo-moar 32c08b: OUTPUT«42␤»
TimToady [] makes arrays, and {} makes blocks
00:25 paraboli` is now known as parabolize
s34n m: 'foofoo' ~~ s:2nd/foo/bar/; 00:25
camelia rakudo-moar 32c08b: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at <tmp> line 1␤␤»
s34n m: 'foofoo' =~ s:2nd/foo/bar/;
camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~␤at <tmp>:1␤------> 3'foofoo' =~7⏏5 s:2nd/foo/bar/;␤»
TimToady in all the bracketed forms, :foo(...) means the same as foo => (...), :foo[...] means foo => [...], :foo{...} means foo => {...} 00:26
and :foo<bar baz> means the same as foo => <bar baz>
m: $_ = 'foofoo'; s:2nd/foo/bar; .say 00:27
camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed replacement part; couldn't find final /␤at <tmp>:1␤------> 3$_ = 'foofoo'; s:2nd/foo/bar; .say7⏏5<EOL>␤ expecting any of:␤ infix stopper␤»
TimToady m: $_ = 'foofoo'; s:2nd/foo/bar/; .say
camelia rakudo-moar 32c08b: OUTPUT«foobar␤»
s34n I get that. Now I'm trying to understand your special :42foo
and the substitution baffles me 00:28
TimToady in what way?
m: $_ = 'foofoo'; s :2nd /foo/bar/; .say
camelia rakudo-moar 32c08b: OUTPUT«foobar␤»
s34n :2nd/foo/ becomes a pair, no? 00:29
TimToady m: $_ = 'foofoo'; s :nd(2) /foo/bar/; .say
camelia rakudo-moar 32c08b: OUTPUT«foobar␤»
s34n ah
TimToady the s/// operator looks specially for a subset of adverbs there
again, a special form, but based on a recurring pattern
as masak++ puts it, "Strangely Consistent" 00:30
s34n m: say :2nd;
camelia rakudo-moar 32c08b: OUTPUT«Unexpected named parameter 'nd' passed␤ in block <unit> at <tmp> line 1␤␤»
TimToady m: say (:2nd)
camelia rakudo-moar 32c08b: OUTPUT«nd => 2␤»
s34n m: say (:nd2); 00:31
camelia rakudo-moar 32c08b: OUTPUT«nd2 => True␤»
s34n m: say (:'this'try);
camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3say (:7⏏5'this'try);␤ expecting any of:␤ colon pair␤»
TimToady notice it has to distinguish :16<deadbeef> from :16deadbeef
dalek sectbot: e0be906 | (Daniel Green)++ | Perl6IRCBotable.pm:
Show any output even if the code segfaults
s34n m: say(:16<deadbeef>) 00:32
camelia rakudo-moar 32c08b: OUTPUT«3735928559␤»
ShimmerFairy s34n: it's just a funny form so you could write a :2nd adverb that's otherwise against the identifier rules. It also works out nice for DateTime, e.g. :5days
m: $_ = 'foofoofoo'; s :3st /foo/bar/; .say
camelia rakudo-moar 32c08b: OUTPUT«foofoobar␤»
TimToady yes, you can abuse it 00:33
AlexDaniel MasterDuke: timeouts you mean :)
00:34 Actualeyes left
MasterDuke AlexDaniel: hmm, should do either i think 00:34
dalek c: 066b3ba | (Wenzel P. P. Peppmeyer)++ | doc/ (4 files):
index \ in 4 different spots
00:35
zacts what optimization work is being done for rakudo? 00:37
and what progress has happened since last christmas?
AlexDaniel .seen huggable 00:39
yoleaux I saw huggable 22 Jul 2016 18:09Z in #perl6: <huggable> unmatched}, Added speed is as Some speed stats: tux.nl/Talks/CSV6/speed4.html
AlexDaniel zacts: take a look at this link
s34n zacts: Larry Wall recently stated that rakudo has become twice as fast since Christmas
TimToady well, it depends on what you're actually doing, of course
zacts cool! thanks 00:40
nice progress!
gfldex Pod::To::BigPage (what avoids class as hard as possible) is nearly 3x as fast these days
atually it's more then 3x because the docs have grown quite a bit too 00:41
00:42 kurahaupo left
s34n TimToady: so the pair in the identifier somehow makes the token subordinate to the proto? 00:43
TimToady precisely :) 00:46
s34n TimToady: but it has to be a pair. there's no other trigger?
TimToady correct, as currently implemented 00:47
doubtless there's some ways by sneaking in at the meta level to add other candidates, but we don't support that at the language level
and if you try to, we'll be sure to break it in the future :) 00:48
zacts installs perl6 00:53
s34n what does ~ mean inside a regex? 00:56
ShimmerFairy It's a way to group open/close delimiters together visually
e.g. / '(' ~ ')' <inner-stuff> / vs. / '(' <inner-stuff> ')' / . The specs claim improved diagnostics as another plus, but I don't know if that's actually implemented in reality. 00:57
TimToady m: say [ "stuff" 01:05
camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in array composer; couldn't find final ']' ␤at <tmp>:1␤------> 3say [ "stuff"7⏏5<EOL>␤ expecting any of:␤ statement end␤ statement modifier␤ …»
TimToady there's an example of it 01:06
Juerd How would you get a similar diagnostic from a simple regex match?
TimToady you have to define FAILGOAL to get a diagnostic instead of backtracking 01:07
it always used to fail immediately, but last year it was argued that backtracking was a more expected default
gfldex zacts: if you installed Perl 6 from any distro package please make sure it's not halve a year old. 01:09
zacts gfldex: I'm going to not use the distro version
I'm installing the latest via the perlbrew clone for p6 (I forget the name)
Juerd failgoal doesn't seem to be documented :(
zacts give me 15 min or so to finish up another project I'm working on
:-)
01:10 abruanese joined
AlexDaniel gfldex: actually, I see no problem with 6-month old rakudo 01:11
Juerd I like the ToC at the side in doc.perl6.org
Gives the whole site a much cleaner appearance
AlexDaniel maybe a bit slower, but otherwise OK
gfldex AlexDaniel: if you enjoy stepping in up to 6 month old bugs, you wont have anything to worry about
zacts regardless, I'm going to follow the latest rakudo 01:12
gfldex i'm quite happy to not have segfaults anymore just because i use `do await start`
AlexDaniel gfldex: oh, it was improved? :)
if so, then you're right
gfldex and most of the speed up (that I see) came with the bugfix that made the inliner inline things 01:14
01:14 molaf left
zacts ok I'm using rakudobrew 01:16
01:17 infina joined, infina left, infina joined 01:21 FROGGS left
gfldex m: subset FilledStr of Str where * ne ""; my FilledStr @a; @a.push("abc").push("");; 01:23
camelia rakudo-moar 32c08b: OUTPUT«Type check failed in assignment to @a; expected FilledStr but got Str ("")␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: sub niler{Nil}; subset FilledStr of Str where * ne ""; my FilledStr @a; @a.push("abc").push(Nil); say @a; 01:24
camelia rakudo-moar 32c08b: OUTPUT«[abc (FilledStr)]␤»
gfldex m: sub niler{Nil}; subset FilledStr of Str where * ne ""; my FilledStr @a; @a.push("abc").push(Nil); put @a;
camelia rakudo-moar 32c08b: OUTPUT«Use of uninitialized value @a of type FilledStr in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at <tmp> line 1␤abc ␤»
zacts which of panda or zef should a newbie like myself use? 01:25
gfldex zef
zacts ok
01:26 molaf joined
zacts so .pl6 for the filename extension? 01:30
or is it now .p6?
I'm following the Perl6 Introduction guide
gfldex most use .p6 and .pm6 01:31
zacts I just want to make sure it's still up-to-date
ok
perhaps this guide should be updated?
gfldex and .pod6 for pure pod stuff
IIRC there was communication with github folk to make github understand our files 01:32
AlexDaniel I've seen .pl6 several times but it looks weird
01:32 girafe left
AlexDaniel gfldex: github.com/perl6/doc/issues/167 01:33
zacts should I patch the guide?
gfldex zacts: it only matters for windows as they don't got a magic file. But the msi doesn't register the file ending, so there is no harm done for now.
AlexDaniel it feels like it is not going anywhere: github.com/github/markup/issues/907
gfldex zacts: it would help to be consistent to allow us registering the extension on windows
01:33 FROGGS joined
zacts ok 01:33
gfldex m: my $a := Nil; say "$a"; say "alive"; 01:34
camelia rakudo-moar 32c08b: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1␤␤alive␤»
gfldex m: my $a := Nil; spurt("$a.html"); say "alive"; 01:35
camelia rakudo-moar 32c08b: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1␤spurt is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub spurt at src/RESTRICTED.setting line 17␤ in block <unit> at <tmp> line 1␤␤»
zacts cool, I executed my first: say "hello, world!"; # script
so I have it installed, I'll have a look at the tutorials soon. Thanks
gfldex that's where I believe those 4 .html come from htmlify.p6 tries to create. 01:36
since Nil is so slippery, I have no idea how to catch it. 01:37
m: use Fatal; my $a := Nil; spurt("$a.html"); say "alive";
camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤Could not find Fatal at line 1 in:␤ /home/camelia/.perl6␤ /home/camelia/rakudo-m-inst-1/share/perl6/site␤ /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤ /home/camelia/rakudo-m-inst-1/share/perl6␤ CompUnit::Reposit…»
gfldex m: use fatal; my $a := Nil; spurt("$a.html"); say "alive";
camelia rakudo-moar 32c08b: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1␤spurt is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub spurt at src/RESTRICTED.setting line 17␤ in block <unit> at <tmp> line 1␤␤»
gfldex `use fatal` works 01:38
sadly I don't get a stacktrace to see where that Nil actually comes from. 01:39
dalek c: bf4874a | (Zoffix Znet)++ | doc/Language/containers.pod6:
Close unclosed X<> token
01:44
01:45 kalkin-_ joined, kalkin- left
gfldex there may be another problem that has killed the search on docs.perl6.org. Working on it. 01:49
01:50 Actualeyes joined
gfldex i was mistaken use fatal doesn't work to catch interpolation of Nil 01:51
is there anything else in the general area of use fatal that will turn Nil interpolation into somethign CATCHable?
01:53 zacts left
dalek sectbot: 6341f19 | (Daniel Green)++ | / (4 files):
Better handling of exit codes and signals
01:58
gfldex m: sub niler{Nil}; my Str:D $a = niler() // Failure.new('got nil'); spurt("$a.html"); say "alive"; 02:07
camelia rakudo-moar 32c08b: OUTPUT«Earlier failure:␤ got nil␤␤Final error:␤ Type check failed in assignment to $a; expected Str:D but got Failure (Failure.new(exception...)␤ in block <unit> at <tmp> line 1␤␤»
gfldex finally!
02:09 danaj joined 02:10 committabletest joined, committabletest left
dalek c: 4223e85 | (Wenzel P. P. Peppmeyer)++ | doc/ (4 files):
better index entries for \
02:13
02:19 User12222 joined
User12222 earnwithinvite.com/index.php?ref=150359 02:19
AlexDaniel spam ↑ 02:20
Xliff \o 02:22
02:23 ChanServ sets mode: +o geekosaur, geekosaur sets mode: +b *!*@gateway/web/freenode/ip.222.124.124.35, User12222 was kicked by geekosaur (User12222)), geekosaur sets mode: -o geekosaur 02:25 skids joined 02:43 skrshn_ joined
AlexDaniel gfldex: github.com/perl6/doc/issues/746#is...-234752825 ← it looks like &nbsp; turned into actual non-breaking space 02:43
making the comment almost impossible to understand :) 02:44
02:44 noganex_ joined 02:45 skrshn left
gfldex AlexDaniel: proving my point :-> 02:45
AlexDaniel not sure what was proven there 02:46
gfldex i would give much for smart quotes that read my mind
02:47 noganex left
gfldex AlexDaniel: that's not hearsay btw. I have seen that quite a few time at www.zerohedge.com/ (don't believe anything they write there). There are plenty of bloggers that enjoy some good copypasta-via-multiple-proxies. 02:48
AlexDaniel I see, but I don't think that it's something we are supposed to solve on our end 02:49
gfldex if you copypasta from one blog engine to another often enough, html-entities will get messed up eventually
02:55 kid51 left 03:10 labster left 03:14 labster joined, canopus left 03:16 zacts joined 03:20 cdg joined 03:21 canopus joined 03:25 ChanServ sets mode: +o geekosaur
zacts hello 03:25
03:26 geekosaur sets mode: -b *!*@gateway/web/freenode/ip.222.124.124.35, geekosaur sets mode: -o geekosaur
zacts am I banned? or was that a different message? 03:26
geekosaur that was me removing a temporary ban on a spammer from about an hour ago
zacts ah ok
cool
BenGoldberg m: my @x; @x.VAR.WHAT.say 03:27
camelia rakudo-moar 32c08b: OUTPUT«(Array)␤»
BenGoldberg m: my @x; @x.VAR.say
camelia rakudo-moar 32c08b: OUTPUT«[]␤»
TEttinger zacts has been baneed for being too wonderful 03:38
making us all look bad
banned even
it is good that you brought up the file ending thing before even writing your first script, that's helpful! 03:39
03:47 dvinciguerra_ left
dalek sectbot: 73a6a1a | (Aleks-Daniel Jakimenko-Aleksejev)++ | committable.pl:
Spell out the signal name

Now it will say this:
  «exit signal = SEGV (11)»
instead of just:
  «exit signal = 11»
03:51
03:58 committabletest joined, committabletest left 04:03 BenGoldberg left 04:09 khw left
zacts TEttinger: lol 04:09
04:14 zacts left
dalek sectbot: 465f84e | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (4 files):
Less utf8 encode/decode (just decode immediately)

Better than it was, but there are still ways to improve the code. For example, currently it may throw up on non-UTF8 data, which is less than awesome for git bisect (we do not want to care if it is correct UTF-8 or not, we just want to bisect).
04:20
04:26 benchable joined, committable joined, bisectable joined
s34n in a grammar, tokens can take arguments, right? 04:28
Is there a way to validate a token's argument? 04:29
04:32 skrshn_ left 04:49 Cabanossi left 04:53 Cabanossi joined 04:54 AlexDaniel left, cibs left 04:56 cibs joined 05:01 cooper left, cooper joined
llfourn s34n: tokens can be declared with a signature 05:11
the signature is a form of validation
token foo(Int $a) { ... } 05:12
05:12 CIAvash joined
konobi why did my mind suddenly jump to the idea of pki signatures for tokens instead of the proper signatures... o.O 05:21
05:26 cdg left 05:27 cibs left 05:29 cibs joined
geekosaur "validation" :p 05:29
konobi ah 05:32
s34n I was thinking, for lack of a better way to express it, of something like token foo(<$a=someothertoken>) { ... $a ... } 05:37
Woodi hi #perl6 :) 05:38
geekosaur not sure conflating the regex slang with signatures is a great idea 05:39
Woodi I have problem with matching \s\n after \w+ % \s ... is it OK ? pastebin.com/P1B1SzUR
s34n geekosaur: no. it isn't. (I made a clumsy excuse before doing so) 05:40
at any rate I figured out the proper way of doing it (I think) 05:41
I was just playing around with defining a markup tag. I want the beginning tag and ending tag to have the same name... 05:42
geekosaur wonders how relevant it is that n matches s 05:43
s34n so I have token btag { '<' <name=identifier> blah blah '>' }; token etag($name) { '<' '/' $name '>' }; token tag { (<btag>) ~ <etag($1[name])> [blah blah] } 05:46
s34n knows $1[name] needs cleaned up 05:47
konobi well, tokens are objects just like any other, no? 05:48
s34n maybe $0[$<name>] ?
I want to invoke etag with the 'name' capture from the preceding btag 05:49
konobi s34n: maybe look at "terms" 05:50
s34n named captures are still numbered, no? 05:51
I've read about nested numbered captures here: docs.perl6.org/language/regexes.ht...re_numbers 05:52
but the next section on named captures doesn't discuss nesting 05:53
oops. yes it does
geekosaur wouldn't that last be something like: token tag { <btag> ~ <etag($<btag>)> ... } 05:55
s34n geekosaur: no. it needs to match just the $<name> from $<btag> 05:56
can you backreference $<btag> like that within the regex?
geekosaur $<btag><name> perhaps, then? I think you can backref like that, yes; named shoul be no different from numbered in that respect 05:57
s34n ok. yes. I see you can
yeah. <etag($<btag><name>)>
so a naive markup language can be defined in <20 sloc, very readable 06:00
konobi can't you recurse with the tokens so that you can see upwards and downwards? 06:01
s34n konobi: ? 06:03
gist.github.com/anonymous/c4a46802...8ee0a9b6b5
06:06 skids left
konobi wouldn't the etag name be it's own token? 06:06
s34n the etag is its own token. the etag name? 06:07
konobi the $name aspect
s34n the name is just an identifier. what am I missing in your question? 06:09
konobi since you're just tokenizing at this point
s34n konobi: I'm not sure I understand your question. please explain it to me 06:11
konobi in a variable '$foo' there are 2 tokens... <sigil> and <identifier> so your identifier like the variable, is just a token. 06:13
s34n konobi: feel free to fork that gist if it helps
06:15 Tonik joined
s34n konobi: how would you change that gist? 06:18
konobi not sure... got a migraine, so i'm just not grokking properly 06:19
$nome -> <name> ? 06:20
06:27 wamba joined 06:43 holyghost joined
holyghost gm 06:44
06:44 telex joined 06:46 kaare__ joined 06:50 cibs left 06:52 cibs joined 06:55 s34n left 07:05 domidumont joined 07:07 hwcomcn joined 07:09 domidumont left 07:10 domidumont joined 07:15 darutoko joined 07:17 hwcomcn left 07:18 hwcomcn joined 07:19 hwcomcn left 07:20 hwcomcn joined 07:21 hwcomcn left 07:23 hwcomcn joined 07:26 hwcomcn left 07:27 hwcomcn joined 07:28 rupert160 joined
rupert160 hello team can I discuss a (maybe) bug here? 07:28
TEttinger yep, it's a bit sleepy right now though 07:29
might take a bit for someone (who has perl 6 experience, so not me) to answer 07:30
rupert160 It might be my code. so I was wanting to validate before I submit a bug
TEttinger good plan
rupert160 I'm learning perl6
so I can't be sure. 07:31
my $p1 = start {say "one"; sleep 3; say "three"}
my $p2 = start {say "two"; sleep 4: say "four"}
await $p2;
await $p1;
running that code isn't happy. but running it without "await $p2" is fine 07:32
So it's a "promise" question.
psch m: my $p1 = start { say "a"; sleep 3; say "b" }; my $p2 = start { say "c"; sleep 4; say "d" }; await $p2; await $p1 07:33
camelia rakudo-moar 32c08b: OUTPUT«a␤c␤b␤d␤»
psch well, i suppose i did the distribution of letters wrong :) 07:34
rupert160: what's your local rakudo version?
rupert160 Interesting that one works fine. 07:35
Rakudo version 2016.06-80-g2f00261
is mine
07:35 hwcomcn left
rupert160 thanks psch. 07:35
07:35 nine joined
rupert160 if yours works it must be my compiler. 07:35
psch m: say $*PERL.compiler 07:36
camelia rakudo-moar 32c08b: OUTPUT«rakudo (2016.07.1.39.g.32.c.08.b.1)␤»
07:36 hwcomcn joined
psch yeah, you're a bit behind, i'd suggest getting at least 2016.07.1 07:36
07:36 espadrine joined
rupert160 2016.06.80.g.2.f.00261 07:36
agreed
I'll upgrade and run again
thanks
07:36 hwcomcn left 07:37 hwcomcn joined 07:46 Tonik left
CIAvash nine: ping 07:54
nine CIAvash: pong 07:55
CIAvash nine: someone who uses rakudo star 2016-07 on Windows tried to install my module and ran into some issues. gist.github.com/CIAvash/b56b1c23a9...6e020ed563 07:57
at Testing WebService::FootballData some test files give some errors, Failed to rename file: operation not permitted 07:58
07:59 kurahaupo joined, GNUYawk joined
CIAvash do you know what's going on? 07:59
nine The rename is this one: github.com/rakudo/rakudo/blob/nom/...le.pm#L177 08:00
It renames the .tmp file over the existing file.
As far as I could find out when implementing that, this should work on Windows just as well. But I have no way of testing that. 08:01
It's been that way for 2 months without anyone reporting an issue. So I wonder if we just have almost no Windows users or if it is a machine specific issue. 08:02
08:03 rindolf joined
CIAvash For this specific case the problem was solved by skipping tests, because the problem only occurs on some test files 08:05
rupert160 have updated my raduko version anyway 08:07
nine It could be that the rename fails if the file in question is still open
By some other process that is. Maybe even by some antivirus software.
08:16 finanalyst joined 08:28 cyphase left 08:33 cyphase joined 08:35 colomon joined
Woodi here is very nice functional propaganda :) www.youtube.com/watch?v=7Zlp9rKHGD4 now I *want* to do functional programming however still no idea how... 08:35
konobi anyone know of any examples of trying to implement 'observables' in perl6? 08:37
08:40 colomon left 08:42 setty1 joined
holyghost konobi : Do you mean JDK observables ? 08:46
konobi like rxjs 08:47
CIAvash nine: I tried to reinstall WebService::FootballData on my Linux(Rakudo 2016.07.01), it passed the tests but with the same warnings as Windows. It seems this happens only for this module and for specific files(11-team.t, 16-league.t and 17-footballdata.t) gist.github.com/CIAvash/be1932aa0a...2e1366df28 08:49
holyghost konobi: As I thought, try wikipedia
There's Java examples there 08:50
The only thing you do is polling a list
You can also build futures into that
nine CIAvash: those warnings could be because some issue with the meta data. Can you run such a test with --ll-exception? 08:51
holyghost "do you want to be observed?", "no later" and so on
"no later, I don't know for sure
such things
afk 08:52
gfldex m: my $p1 = start { say "a"; sleep 3; say "b" }; my $p2 = start { say "c"; sleep 4; say "d" }; await $p1, $p2; 08:54
camelia rakudo-moar f1f750: OUTPUT«a␤c␤b␤d␤»
08:56 RabidGravy joined
gfldex rupert160: ^^^ please note that Promise provides a wide range of methods to say exactly how long (the implict) await should block. If you use more then one await, you can introduce a deadlock quite easyly. 08:57
konobi holyghost: oh yeah, i get it... i was just wondering if there were any examples of the concept being applied in perl6
08:59 spider-mario joined
CIAvash nine: It doesn't have any effect 09:01
nine: and here's the code gitlab.com/CIAvash/WebService-Foot...e/master/t 09:02
09:03 girafe joined 09:07 pmqs left 09:15 iH2O joined 09:16 iH2O left 09:19 pmqs joined
holyghost konobi: no, roles and subclass actors or something 09:20
09:21 holyghost left, holyghost joined
holyghost konobi: docs.perl6.org/language/objects 09:22
It's not Java AFAIK 09:23
You have to implement the pattern 09:24
konobi holyghost: you could also think of observables as a way to declare consumers/producers on a message bus, much like the one in the linux kernel, kdbus. kdbus is zero copy and fastest ipc mechanism available. 09:26
09:33 kurahaupo left
holyghost coolnes 09:34
09:35 kurahaupo joined
holyghost I am not into busses these days :-) 09:35
09:40 kurahaupo left 09:43 domidumont left
jnthn konobi: Supplies are observables, very much in the rxjs sense (though in reality more was borrowed from the original Rx, which is what I'm familiar with). 09:51
If you look through the set of Rx methods, you'll find Perl 6 equivalents of many of them :) 09:53
Supply.interval(0.5).tap(*.say); sleep 3 # Perl 6 for Observable.Interval(TimeSpan.FromSeconds(0.5)).Subscribe(Console.WriteLine); Thread.Sleep(3000); in Rx.NET :) 09:54
Though interval is one of the relatively few cases where we did take the name verbatim :) 09:55
konobi jnthn: oh... awesome 09:57
jnthn: could they use kdbus?
jnthn konobi: Depends what you mean by "use". Certainly supplies have been used already in modules to expose things like message queues. 09:58
konobi: Note that neither supplies nor Rx involve a message bus in the traditional sense. 09:59
konobi jnthn: well, if they were to all have some sort of bus, you could dynamically add things like an auditing observer 10:00
or forking some off for multiprocessing 10:01
10:02 trnh joined
konobi heh... distributed supply filters =0) 10:04
jnthn I suspect that's the kind of thing you could build on top of supplies. Really, they're just a chain of callbacks with a nice API for termination and errors, a bunch of useful combinators and - in Perl 6 - some syntactic support so you don't have to think in callbacks (react/suppl/whenever blocks). 10:05
They're really our ascynrhonous Seq
A Seq is a means of consuming values that you pull. Doesn't matter if they're lines from a file, rows from a database, etc. 10:06
konobi yup 10:07
jnthn Supply is a means of receiving values as they're produced. Doesn't matter if they're messages of a queue, ticks of a timer, file system notifications, incoming socket connections, etc.
konobi could also be a way to layer authorization checks against tainted inputs
jnthn back later 10:08
10:13 GNUYawk left
gfldex m: sub niler{Nil}; my $a = Str; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ }; 10:22
camelia rakudo-moar f1f750: OUTPUT«Use of uninitialized value $a of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.␤ in block <unit> at <tmp> line 1␤␤»
10:22 perlawhirl joined 10:29 girafe left 10:33 cyphase left
holyghost m: sub niler{Any} my $a = Str; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ }; 10:33
camelia rakudo-moar f1f750: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub niler{Any}7⏏5 my $a = Str; say("$a.html", "sometext")␤ expecting any of:␤ infix␤ infix stopper…»
10:34 colomon joined
holyghost m: sub{Any}; my $a = Str; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ }; 10:34
camelia rakudo-moar f1f750: OUTPUT«Use of uninitialized value $a of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.␤ in block <unit> at <tmp> line 1␤␤»
10:35 woolfy left 10:37 cyphase joined
holyghost sub{Any};my $a = "123"; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ }; 10:38
m: sub{Any};my $a = "123"; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ }; 10:39
camelia rakudo-moar f1f750: OUTPUT«123.htmlsometext␤alive␤»
holyghost easy if I understand
m: sub{Any};my $a = 123; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ }; 10:41
camelia rakudo-moar f1f750: OUTPUT«123.htmlsometext␤alive␤»
CIAvash nine: running test with --ll-exception on Windows gist.github.com/CIAvash/bf28a0c820...203f5b6a9f 10:43
10:44 darutoko left 10:46 colomon left, colomon joined 10:48 labster left 10:50 colomon left, colomon joined 10:54 kaare__ left
holyghost userfriendly.org 10:56
11:03 colomon left 11:04 holyghost left 11:05 colomon joined 11:13 colomon left 11:19 darutoko joined 11:20 colomon joined
konobi .tell pmurias finally got some time to look at the JS backend. see some good opportunities for improvement 11:34
yoleaux konobi: I'll pass your message to pmurias.
konobi btw, anyone know why nqp repo doesn't use git-subrepo (as posed to git-submodule) ? 11:35
11:43 Sgeo left 11:46 BenGoldberg joined 11:49 rindolf left
nine CIAvash: the warnings are fixed in github.com/rakudo/rakudo/commit/43debec892 11:51
CIAvash: they were actually a symptom of a more important issue
CIAvash: there's a small chance, this even fixed the Windows issue 11:52
11:54 colomon left 11:58 RabidGravy left 12:00 kaare__ joined 12:01 Sgeo joined 12:04 rupert160 left 12:12 rindolf joined 12:16 trnh left 12:17 trnh joined 12:18 colomon joined 12:21 colomon left 12:27 trnh left 12:32 kid51 joined 12:34 rindolf left 12:37 perlawhirl left 12:40 Jtf621 joined
Xliff Heya! What's the best way to see if an object has a specific attribute? 12:43
nine Xliff: define a role that makes the accessor mandatory and have all objects eligible do this role? 12:44
Xliff m: class A { has $.a1; has $.b1 }; my $a = A.new; say $a.can("a1") 12:45
camelia rakudo-moar 43debe: OUTPUT«(a1)␤»
Xliff m: class A { has $.a1; has $.b1 }; my $a = A.new; say $a.can("a2")
camelia rakudo-moar 43debe: OUTPUT«()␤»
Xliff nine: Yes. I was just thinking about that, but in some cases there are attributes that are common across all classes that I want to access in a general way. 12:46
psch m: class A { has $.a1; has $.b1 }; my $a = A.new; $a.^attributes.grep(*.name eq '$!a1').say
camelia rakudo-moar 43debe: OUTPUT«(Mu $!a1)␤»
Xliff What's wrong with using can() like I did above?
psch .can checks for methods
autogenerated accessors aren't real methods
Xliff So why did the test above, work? 12:47
psch oh
didn't see the first line
Xliff :)
psch well, they seem to show up there
so they are real enough for can
Xliff I *just* thought about it after that after I asked.
Previously, I was leaning toward your solution.
psch m: class A { has $!a1; has $.b1 }; my $a = A.new; say $a.can('a1'); $a.^attributes.grep(*.name eq '$!a1').say # this is what's wrong
camelia rakudo-moar 43debe: OUTPUT«()␤(Mu $!a1)␤»
psch well, it's really doing something different entirely
Xliff psch++ - That's true, but those attributes are private, so no public autogenerated accessors, right? 12:48
psch if you're asking with can you're asking for a method. the fact that the method in this case is an autogen'd accessor and thus corresponds with the Attribute is expected, but not necessarily always true
Xliff m: class A { has $!a1; has $.b1 }; my $a = A.new; say $a.can('a1'); say $a.can("b1"); $a.^attributes.grep(*.name eq '$!a1').say # this is what's wrong 12:49
camelia rakudo-moar 43debe: OUTPUT«()␤(b1)␤(Mu $!a1)␤»
Xliff OK.
psch m: class A { has $!foo; method foo } # ... :)
camelia rakudo-moar 43debe: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class A { has $!foo; method foo 7⏏5} # ... :)␤»
psch m: class A { has $!foo; method foo {} } # ... >_>
camelia ( no output )
psch it really depends on what you want to do, in any case
if you want to call a given method on a set of classes that might or might not have it i'd probably just use .? 12:50
Xliff Yeah. That's an insane use case, and I'm not that crazy ^_^
Yeah, but I need to do a .defined afterward. Not sure if .? would work.
So "$obj.maybe_not_attribute.defined" 12:51
So adding "$obj.can("maybe_not_attrubute") && …" would be an acceptable addition to the logic. 12:52
psch m: class A { has $.a = "foo" }; class B { }; my @a = A.new, B.new; @a [R//]= @a>>.?a; say @a.perl
camelia rakudo-moar 2b5687: OUTPUT«["foo", Any]␤»
12:53 Jtf621 left
psch hm, that Any suprises me a bit 12:53
Xliff Yeah. I'm getting a lot of Any values when I'm expecting nothing or Nil.
12:53 colomon joined
Xliff m: say Nil ~~ Any 12:54
camelia rakudo-moar 2b5687: OUTPUT«True␤»
psch oh
nah, that's fine in my case, it's list assignment
so of course the whole list gets the //
Xliff :D
12:54 colomon left
psch m: class A { has $.a = "foo" }; class B { }; my @a = A.new, B.new; @a [Z[R//]=] @a>>.?a; say @a.perl 12:54
camelia rakudo-moar 2b5687: OUTPUT«["foo", B.new]␤»
Xliff OK. So back to my crazy code. Thanks nine++. Thanks psch++
psch more metaops to the rescue :)
Xliff BTW -- R//?
psch m: say "foo" // "bar"; say Nil // "bar"; say "bar" R// Nil 12:55
camelia rakudo-moar 2b5687: OUTPUT«foo␤bar␤bar␤»
Xliff Hmmm... will have to read up on that. Is it documented anywhere?
psch R is just the reverse metaop
m: 5 R= my $x; say $x 12:56
Xliff O I C
camelia rakudo-moar 2b5687: OUTPUT«5␤»
Xliff LOL!
Great for folks who come from native languages that read R-> L
Juerd I feel it was specially crafted for use in obfuscation contests :)
Where's the RPN meta-op? 4 2 RPN+ 12:57
m: my $op = "+"; say $op; &infix:<<$op>>(4, 2) 13:00
camelia rakudo-moar 2b5687: OUTPUT«Use of uninitialized value $op of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at <tmp> line 1␤5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ infix:<> u…»
Juerd Why is $op seen as unitialized?
psch because the sub call needs the value of $x at compile time
13:00 pecastro joined
psch m: constant $op = "+"; say $op; &infix:<<$op>>(4, 2) 13:00
camelia rakudo-moar 2b5687: OUTPUT«+␤»
Juerd Ah
psch m: constant $op = "+"; say $op; &infix:<<$op>>(4, 2).say
camelia rakudo-moar 2b5687: OUTPUT«+␤6␤»
Juerd Is there a way to do it during runtime? Or, how do symbolic references work with operators? 13:01
psch m: constant $op = "+"; say $op; ::("&[$op]")(4, 2).say
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3constant $op = "+"; say $op; ::("&[7⏏5$op]")(4, 2).say␤ expecting any of:␤ double quotes␤ infix␤ infix noun␤ inf…»
psch well, lookup like that is weird, and lookup via the foofix longname is hard to decanonicalize :/ 13:02
m: constant $op = "+"; say $op; ::('&infix:<\qq[$op]>')(4, 2).say
camelia rakudo-moar 2b5687: OUTPUT«+␤6␤»
Juerd Wow :)
psch it works in this case, but e.g. &infix:['<'] obviously doesn't work with < >
13:03 AndyBotwin left
psch +delimiters for the longname 13:03
m: my $op = "+"; say $op; ::('&infix:<\qq[$op]>')(4, 2).say # un-constant'ed
camelia rakudo-moar 2b5687: OUTPUT«+␤6␤»
psch the &[] form is a grammar trick, the name doesn't exist as camelia says vOv
FSDO of "grammar trick", it's been a while since i looked at exactly how we do that 13:04
BenGoldberg m: (&::).say 13:05
camelia rakudo-moar 2b5687: OUTPUT«Nil␤»
BenGoldberg ?
Is :: a subroutine or isn't it?
psch it's not
design.perl6.org/S02.html#Interpol...into_names 13:07
not sure if it's documented yet
BenGoldberg m: (&::)();
camelia rakudo-moar 2b5687: OUTPUT«Cannot find method 'Nil' on object of type List␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg So it's just a syntactical thingy? 13:08
psch i'd say so. it's the same :: as in MY:: or SomePackage:: 13:09
moritz m: say &::.^name 13:14
camelia rakudo-moar 2b5687: OUTPUT«Nil␤»
moritz m: my &:: = { say 42 }; &::() 13:15
camelia rakudo-moar 2b5687: OUTPUT«Cannot find method 'Nil' on object of type List␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg That's a less than awesome error message :) 13:22
m: sub postfix::<add>($a, $b) { $a + $b }; say 2, 3 add; 13:24
camelia rakudo-moar 2b5687: OUTPUT«===SORRY!===␤Name postfix:: ends with '::' and cannot be used as a sub declaration␤»
BenGoldberg m: sub postfix:<add>($a, $b) { $a + $b }; say 2, 3 add;
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3tfix:<add>($a, $b) { $a + $b }; say 2, 37⏏5 add;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
psch m: sub postfix:<add>([$a, $b]) { $a + $b }; say (2, 3)add; 13:25
camelia rakudo-moar 2b5687: OUTPUT«5␤»
psch a postfix can't really take more than one argument 13:26
same for prefix
BenGoldberg So no reverse polish notation? 13:27
moritz m: sub prefix:<foo>(|c) is looser(&infix:<,>) { say c.perl }; foo 1, 2
camelia rakudo-moar 2b5687: OUTPUT«\((1, 2))␤»
psch oh, right, looser than infix:<,> is how
moritz++
moritz well, it's still just one argument, that happens to be a list though :-) 13:28
m: sub prefix:<foo>(|c) is looser(&infix:<,>) { say c[0].perl }; foo 1, 2
camelia rakudo-moar 2b5687: OUTPUT«(1, 2)␤»
psch ah
BenGoldberg m: prefix:<add>([$a, $b]) { $a + $b }; say add 1, 3;
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3prefix:<add>([7⏏5$a, $b]) { $a + $b }; say add 1, 3;␤»
BenGoldberg m: prefix:<add>([$a, $b]) is looser<,> { $a + $b }; say add 1, 3;
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3prefix:<add>([7⏏5$a, $b]) is looser<,> { $a + $b }; say a␤»
BenGoldberg m: sub prefix:<add>([$a, $b]) is looser<,> { $a + $b }; say add 1, 3; 13:29
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot find method 'EXISTS-KEY': no method cache and no .^find_method␤at <tmp>:1␤»
psch sub
moritz I don't think is looser<,> works that way
psch i we had that at one point
moritz m: sub prefix:<foo>(|c) is looser(&[,]) { say c[0].perl }; foo 1, 2
camelia rakudo-moar 2b5687: OUTPUT«(1, 2)␤»
psch jnthn wasn't happy about it
i don't know if we removed it either 13:30
13:30 pecastro left
BenGoldberg m: sub prefix:<add>([$a, $b]) is looser<&[,]> { $a + $b }; say add 1, 3; 13:30
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot find method 'EXISTS-KEY': no method cache and no .^find_method␤at <tmp>:1␤»
moritz IMHO looser(&[,]) is consise enough
BenGoldberg Why that error message?
moritz BenGoldberg: because you use <...> as a postfix
which is hash-access operation, but at compile time, where errors are weirder occasionally 13:31
BenGoldberg m: sub prefix:<add>(|c) is looser<&[,]> { join ",", c[0] }; say add 1, 3;
camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot find method 'EXISTS-KEY': no method cache and no .^find_method␤at <tmp>:1␤»
psch moritz: yeah, i agree. the <> form is also somewhat finicky with lookup
it's on src/core/operators.pm:638ff fwiw :)
13:31 holyghost joined
BenGoldberg m: sub prefix:<foo>(|c) is looser(&[,]) { say c[0].perl }; foo 1, 2 13:31
camelia rakudo-moar 2b5687: OUTPUT«(1, 2)␤»
BenGoldberg m: sub prefix:<foo>(|c) is looser(&[,]) { say flat c[0] }; foo 1, 2 13:32
camelia rakudo-moar 2b5687: OUTPUT«(1 2)␤»
BenGoldberg m: sub prefix:<foo>(|c) is looser(&[,]) { my ($a, $b) = c[0]; say "$a, $b" }; foo 1, 2
camelia rakudo-moar 2b5687: OUTPUT«1, 2␤»
BenGoldberg m: sub prefix:<add>(|c) is looser(&[,]) { my ($a, $b) = c[0]; $a + $b }; say add 1, 2
camelia rakudo-moar 2b5687: OUTPUT«3␤»
konobi .tell pmurias I've got a few implementation questions for you... i think there's some definite wins available i believe 13:34
yoleaux konobi: I'll pass your message to pmurias.
13:41 pecastro joined 13:42 Tonik joined
BenGoldberg m: ‚↗’.say 13:47
camelia rakudo-moar 2b5687: OUTPUT«↗␤»
13:57 kurahaupo joined 13:58 tbrowder left 14:00 smash joined, smash left 14:01 smash joined 14:08 dakkar joined
BenGoldberg m: say so 0e0 14:14
camelia rakudo-moar 478671: OUTPUT«False␤»
BenGoldberg m: say so "0e0"
camelia rakudo-moar 478671: OUTPUT«True␤»
BenGoldberg m: say so +"0e0"
camelia rakudo-moar 478671: OUTPUT«False␤»
14:17 Ven joined 14:19 kurahaupo_ joined 14:23 kurahaupo left
CIAvash nine++ the Windows issue is fixed too 14:27
14:30 rindolf joined
nine Yeah :) 14:33
14:34 khw joined
CIAvash :) 14:37
14:41 zakharyas joined 14:42 xinming left, xinming joined 14:46 avenj joined 14:47 hwcomcn left
kalkin-_ Is there something like super in Perl6? I want to basically do: class B is A { method f () { say "asd"; super.f() } } 14:47
timotimo you'll usually be able to go via "nextsame" and friends 14:48
if not, you can still type out the class name
self.A::f(...)
kalkin-_ ahh nextsame is the keyword I was searching. timotimo thanks
14:59 kurahaupo_ left 15:04 iH2O joined 15:11 skids joined 15:13 skrshn joined
skrshn async programming question: Is this (gist.github.com/skrisna/23ee95f857...82735838e) supposed to run on single thread or multiple? 15:14
15:14 iH2O left 15:15 zakharyas left
timotimo huh. for some reason github wants me to 2fa 15:16
i don't seem to have any 2fa keys on my phone any more :o
15:17 canopus left
gfldex the only thing you got from 2fa is that two deviced you don't really own are getting a rootkit you don't know about 15:17
timotimo right 15:18
moritz timotimo: they could send you a 2fa key by SMS :-) 15:22
15:22 canopus joined
timotimo right 15:23
but i don't think i have my phone number in their thingie 15:24
i did print out the 2fa recovery keys on a sheet of paper
however ... where the F did i put that :D
15:25 girafe joined
timotimo well, goodbye github account, i guess 15:26
awwaiid skrshn: I think start { ... } starts ONE new thread, the contents of that aren't parallelized 15:32
skrshn awwaiid: thanks. does grep spawn more threads? 15:33
awwaiid: I guess you already answered the question "contents of that aren't parallelized" 15:34
awwaiid skrshn: it does if it is mapping over a stream (whatever those are called). This was broken last time I tried, but you should be able to do like ^1000.race.map{...}, the .race takes some params to set the batch size and thread count 15:35
moritz timotimo: iirc there's a way to recover a github account as long as you still have access to an SSH key 15:37
timotimo: medium.com/@kaumac/how-to-recover-....ojx0w386c 15:38
timotimo: help.github.com/articles/recoverin...edentials/ seems to be more to the point 15:39
skrshn awwaiid: thanks. that answers my question.
moritz erm nope
parabolize supplies are the grep-able stream thingies
gfldex skrshn: start creates a Promise, not a thread. It's not that easy. 15:41
psch m: await start { say $*THREAD }; say $*THREAD
camelia rakudo-moar 478671: OUTPUT«Thread #3␤Thread #1 (Initial thread)␤»
awwaiid m: say (^10).race(batch => 1, degree => 10).map({ sleep(rand); $^a ** 2 }).list
camelia rakudo-moar 478671: OUTPUT«(36 4 64 1 25 9 81 16 0 49)␤»
psch it's true though, start doesn't create the thread, the scheduler just shoves the promise's code into a thread 15:42
gfldex skrshn: calling .result will block and get the Promise scheduled.
skrshn: see: github.com/rakudo/rakudo/blob/nom/...se.pm#L105 15:43
skrshn gfldex: thanks. So the thread is spawned when I do .result
awwaiid m: say (^10).race(batch => 1, degree => 4).map({ say $*THREAD; $^a ** 2 }).list.reduce(* + *) # map-reduce, the .list collapses 15:45
camelia rakudo-moar 478671: OUTPUT«Thread #3␤Thread #4␤Thread #5␤Thread #3␤Thread #5␤Thread #3␤Thread #5␤Thread #5␤Thread #6␤Thread #3␤285␤»
gfldex skrshn: it may or may not spawn a thread, it does not depend on the Promise if that happens.
skrshn: in fact it depends on the vm, and I don't speak moar.
psch skrshn: my advice is "stop thinking about threads". promises as an abstraction exist explicitily so you don't have to worry about what happens 15:46
awwaiid actually you can take out the .list in my example. So you can do .race.map({...}).reduce({...})
psch skrshn: that is, as long as you don't want to work on better async support on moar... :)
15:46 espadrine left
gfldex jnthn: is $*THREAD the OS level threadid or some interal id that scheduled to be mapped? 15:48
psch gfldex: child_tc->thread_id = 1 + MVM_incr(&tc->instance->next_user_thread_id); # MoarVM/src/core/threads.c:27, which underlies nqp::newthread 15:51
15:53 colomon joined
timotimo thanks! :) 15:53
skrshn thanks everyone! 15:54
15:55 finanalyst left 15:57 pmurias joined
pmurias konobi: great 15:57
yoleaux 11:34Z <konobi> pmurias: finally got some time to look at the JS backend. see some good opportunities for improvement
13:34Z <konobi> pmurias: I've got a few implementation questions for you... i think there's some definite wins available i believe
pmurias konobi: feel free to ask any questions you want 15:58
16:00 sena_kun joined 16:03 skrshn left 16:05 pmurias left 16:08 AlexDaniel joined
sena_kun Are there any docs about precompilation usage? 16:09
gfldex sena_kun: it's transparent. If you want to precompile by hand, there is no proper API for that but we got code examples if you feel adventurous. 16:10
sena_kun gfldex, I feel like nobody will accept my simple version of docs caching, so I'm going to investigate existing precompilation code in htmlify. At least some little insight about how it works will be good, I suppose. 16:12
gfldex sena_kun: see github.com/gfldex/perl6-pod-to-big...nepage#L63 16:13
16:13 RabidGravy joined
timotimo if we had a different method than "eval the code concatenated with '$=POD' at the end" for getting the pod contents, it'd be possible to pre-compile, i feel like 16:13
BenGoldberg If I ask camelia to run some code from a gist, twice, does the compiled version get cached?
gfldex timotimo: we already precompile the docs
timotimo we ... we do?
gfldex did you not notice how fast the html is delivered these days? :-> 16:14
timotimo i actually never rendered the docs myself, nor followed the time between doc changes and website updates :( 16:15
well, not never, but not in the last months
which just means that both those things are so good & pleasant, that i don't notice them at all 16:16
good job, doc tech team :D
16:17 pmurias joined
BenGoldberg Docs are one of those things where it doesn't make much sense to htmlify on the fly. 16:18
timotimo well, that was never part of the design, anyway
sena_kun gfldex, but precompilation is slightly different from caching, isn't it? Or github.com/perl6/doc/issues/717 can be closed? Or I'm missing something important with this discussion.
gfldex BigPage needs 21s with 2 threads with hot caches to produce all the html minus the /routine/ stuff. 16:19
16:20 dakkar left
gfldex it may actually be reasonable to produce html from parsed pod files directly. But there are more pressing issues right now. 16:20
sena_kun: it 16:21
sena_kun: it's something completely different (and mostrous)
sena_kun gfldex, I thought so. 16:22
gfldex sena_kun: if you want to work on the build process and create something cool, you could take the output of BigPage under html/perl6.xhtml and try to produce xmldiffs, that are also xhtml-fragments, and combine them to something presentable. That would allow us to produce diffs of the docs between Rakudo Star releases. 16:23
sena_kun gfldex, I just want to close doc issues. (: 16:24
AlexDaniel sena_kun: oh, really? I have something for you 16:26
sena_kun But it seems a bit interesting, maybe I'll try to do this. Thanks for advice.
AlexDaniel sena_kun: github.com/perl6/doc/issues/679
sena_kun AlexDaniel, isn't is for Zoffix more than for anyone else? 16:27
AlexDaniel sena_kun: why? Zoffix just moved this issue from RT to docs repo 16:28
sena_kun AlexDaniel, actual fix is already there. And I can't do actual writing, so only search/build issues, I suppose.
AlexDaniel sena_kun: so you may say that it's for zefram, but in reality anyone who does a proper review can close anything :) 16:29
sena_kun AlexDaniel, I sure can say that. (: Judging by your commit, it can be closed. Same as github.com/perl6/doc/issues/362, for example. 16:34
AlexDaniel sena_kun: I have closed both 16:40
sena_kun AlexDaniel, thanks. Also, can you take a look at github.com/perl6/doc/pull/725, please? 16:41
AlexDaniel sena_kun: sure 16:48
16:57 zakharyas joined 17:03 parabolize left
timotimo huh. github no longer supports FreeOTP? 17:03
17:04 trnh joined
timotimo oh 17:06
it shows me a barcode that neither FreeOTP nor the ZXCrossing barcode reader can recognize
17:26 rindolf left, domidumont joined 17:31 GNUYawk joined 17:33 rindolf joined
gfldex i iz propagandacat i tellz troof! gfldex.wordpress.com/2016/07/24/ni...d-harmful/ 17:35
17:37 zakharyas1 joined, domidumont left 17:39 GNUYawk left 17:42 zakharyas1 left, zakharyas1 joined
Xliff m: class A {}; class B {}; class C {}; my $c = C.new; given $c { when A {}; when B | C { say $_.^name }; } 17:43
camelia rakudo-moar 478671: OUTPUT«C␤»
17:46 zakharyas1 left 17:50 ufobat joined
ufobat oi :) 17:50
timotimo hey 17:52
jnthn gfldex: fwiw, psch' answer was right: $*THREAD certainly represents an OS thread, but its ID is an internal one. 17:54
gfldex jnthn: does that mean changes to $*THREAD may or may not indicate that two different or the same function run in different threads? 17:55
17:58 GNUYawk joined 17:59 trnh left
timotimo changing $*THREAD will do fuck all :) 18:02
oh, you mean seeing that $*THREAD has changed
gfldex in the sense of watching that change, yes 18:03
so threads are basicly: "What do I know."
ugexe i thought the same $*THREAD.id could represent 2 different threads over the course of a long running process, and that comparing to $*THREAD itself was the only way to know if it was the same thread 18:05
jnthn Right, if you want to compare if you have the same thread, comparing $*THREAD is the safe way. 18:08
Though if you know they're all thread pool threads that are for the application lifetime then looking at the ID is a good enough approximation 18:09
arnsholt pmurias++ # Obsoleting all the Parrot NQP bugs 18:13
18:15 wamba left 18:16 parabolize joined
sena_kun pod2onepage: command not found 18:17
Okay, so how we build docs now?
gfldex sena_kun: rakudobrew, panda or zef don't add the site/bin/ dir to your PATH
sena_kun: see github.com/perl6/doc/commit/0c09e8...061f998be8 18:18
sena_kun gfldex, thanks.
gfldex sena_kun: the location of site/bin/ may vary 18:19
18:27 cyphase left 18:29 cdg joined, cdg left 18:30 cdg joined
sena_kun By the way, in the readme we point to already missing WANTED file. Is this sentence version - pastie.org/private/dk0zxn8xmaaxtcwhkbtu6g good? 18:32
18:32 cyphase joined 18:35 cdg left, zakharyas left 18:36 cdg joined, rindolf left 18:42 rindolf joined 18:43 pyrimidine joined
dalek c: fc5b370 | Altai-man++ | README.md:
We don't have WANTED file anymore
18:48
18:49 pyrimidine left
AlexDaniel sena_kun: README also says “Do a `git grep TODO` in this repository” but we do not have TODO file anymore 18:55
sena_kun AlexDaniel, it has different meaning.
AlexDaniel ahhh
oops then ;) 18:56
sena_kun AlexDaniel, git grep TODO will give you TODO from all documentation, not just one file.
AlexDaniel though one might argue that we should create an issue for every such TODO… 18:57
gfldex AlexDaniel: you may want to grep first before you make such plans :-> 18:58
AlexDaniel sena_kun: anyway, so I looked at #725 and have some questions
gfldex: I did, there are not too many
sena_kun AlexDaniel, go ahead.
gfldex AlexDaniel: you also have to look for any Z<...> or =comment because they may not contain TODO 18:59
18:59 pyrimidine joined
AlexDaniel sena_kun: you do 「slurp $cache-filename;」 in 「process-pod-dir」, which means that it will be slurped several times per run. Any reason not to pull it somewhere higher? 19:00
sure it's not critical at all, but it kinda adds up to the weirdness of the whole htmlify code 19:02
gfldex AlexDaniel: that's needs to be rewritten in a separat module anyway because we would do much better to generate .pod instead of .html for /routine/* and listings. That would allow us to share that work with different renderes including LaTeX, what leads to pdfs and properly printable docs. 19:03
sena_kun AlexDaniel, hmm. It can be done, I think. I didn't want to make MAIN harder to read and was trying to tie problem in just one function.
AlexDaniel sena_kun: then, you have 「if $content ~~ m/$file ': ' (.+?)\n/ {」 to find a hash for some file. Which works, sure, but again it's not pretty. Instead, just use a hash. Therefore I recommend to hashes.info into hashes.json, will make life much easier 19:04
.oO(a hash of hashes, great)
19:05
% I mean
gfldex you could add caching via wrapping of slurp
actually, is it actually slurps pod files, it's not using precomp what is wrong. 19:06
sena_kun AlexDaniel, it's true, but I wanted to use plain text, because plain text is always a plain text. Yes, it can be rewrited with something better than just file to go through every time.
AlexDaniel gfldex: if so, perhaps you can write a comment on #725?
gfldex s/is/if/
19:09 pyrimidine left
sena_kun If precomp in Pod::To::BigTable already does all the work, then PR can sure be closed, since it's very rough solution. 19:11
19:15 darutoko left
pmurias re github.com/perl6/nqp/issues/85 , what would be an error message that is awesome enough? 19:19
timotimo something that doesn't say anything about compiler internals 19:20
rakudo often says things like "cannot use binding with this LHS/RHS"
moritz "Sorry, list binding is not supported in NQP"
though IMHO the error message currently isn't that bad
pmurias s/awesome/acceptable/, there a lot of different types of list bindings, and I'm not special casing every one 19:21
timotimo "nqp can only bind single variables on the LHS" 19:22
19:22 nebuchadnezzar joined
pmurias nqp-m: my %hash; %hash<foo> := 123; 19:22
camelia ( no output )
pmurias nqp-m: my %hash; %hash<foo> := 123; nqp::say(%hash<foo>)
camelia nqp-moarvm: OUTPUT«123␤»
moritz pmurias: if I were you, I wouldn't put too much energy into that issue 19:23
timotimo ah, hmm.
pmurias is too tired to come up with awesome error messages 19:25
19:28 edehont joined
dalek c: f17bc21 | (Wenzel P. P. Peppmeyer)++ | doc/Language/quoting.pod6:
tell that undefined values raise control exceptions in interpolations
19:34
19:35 RabidGravy left 19:36 labster joined
Hotkeys why does this happen? i.imgur.com/oVj4OA2.png 19:36
oops, didn't intend the rounded corners on that, oh well it still shows the issue
timotimo the REPL doesn't know about different-sized native variables yet 19:37
Hotkeys I see
neither do the docs apparently :p 19:38
timotimo hmm
19:42 tbrowder joined
tbrowder m: use MONKEY-SEE-NO-EVAL; EVAL "say { 5 + 5 }" 19:43
camelia rakudo-moar 478671: OUTPUT«10␤»
AlexDaniel tbrowder: note that { 5 + 5 } is evaluated before eval 19:49
m: say "say { 5 + 5 }" 19:50
camelia rakudo-moar 478671: OUTPUT«say 10␤»
19:51 TEttinger left, Tonik left
tbrowder I'm just trying to use the example in the docs (which shows no result at all)--I have no idea how it works or what is correct, but i could not get a non-error result in the perl6 REPL on my local host. 19:53
gfldex tbrowder: the REPL is lacking in general 19:54
tbrowder ok, good to know, but will it be fixed someday? 19:55
gfldex tbrowder: i'm very happy to fill the docs free of charge. Predictions howeverare booked under Consulting and as such are rather pricy. 19:57
joking aside, I personally would not invest time in a REPL because whenever I press F1 in vim, the current files is written do disk and executed. 19:59
20:00 Zoffix joined
Zoffix waves 20:00
moritz particles
gfldex heisenbergs 20:01
20:01 colomon left
Zoffix 39 GitHub notifications :o 20:01
gfldex we where busy while you where not looking
Zoffix we++ then :) 20:02
stmuk, yes, it's "Zoffix" :) and I hang on #perl6-dev more often than here. The alt nicks are in use only when I'm away from home and in hiding. Why? What did you want to .tell? RE: <stmuk> hmmm is there a .tell $zoffix-last-nick ?
20:03 colomon joined
Zoffix AlexDaniel, if it works, why fix it? :) RE 「"source-url": "…"」 in META6.json 20:03
tbrowder Zoffix: did you get my msg via .tell masked}? 20:05
Zoffix AlexDaniel, some sneak preview of the examples of new IRC::Client design. It's coming out surprisingly sexy: gist.github.com/zoffixznet/ae146b8...a5d52e25b2
tbrowder, I saw it when I grepped the channel log. 20:06
AlexDaniel MasterDuke: ↑
Zoffix I got a 4000-word blog post on it already. Just finishing off filters, promise support, and docs and I think it'll be ready to roll.
AlexDaniel Zoffix: cool. While you are at it, perhaps you can run it on the background and see what happens in like 10 hours? 20:07
20:07 molaf left
unmatched} . 20:10
yoleaux 22 Jul 2016 23:35Z <AlexDaniel> unmatched}: maybe this should be fixed, take a look: irclog.perlgeek.de/perl6/2016-07-22#i_12892188
23 Jul 2016 15:51Z <tbrowder> unmatched}: is that you, Zoffix?
23 Jul 2016 15:56Z <tbrowder> unmatched}: I'm aware of the problem, and I hope to work on it after I get the basic table working and accepted first. At the moment I don't know if that will require grammar work or not. I don't have the knowledge or experience enough yet to dig into the grammar and actions, but ShimmerFairy does. I will try an experiment later today which I hope will
Zoffix Huh, got this in the log: "0225 ◀▬▬ │ camelia (~p6eval@ns1.niner.name) has quit (Killed (Sigyn (Spam is off topic on freenode.)))" 20:11
arnsholt moritz++ # Axing Parrot entirely
20:12 cdg left, cdg joined
geekosaur Zoffix, yes, sigyn went a bit nuts and nuked camelia and some of the people using it. this has been corrected 20:13
Zoffix Ah, ok :)
20:14 mohae joined
moritz arnsholt: if you support this motion, please give the pull request a thumbs up/+1/whatever 20:14
dalek c: 92aa954 | (Tom Browder)++ | doc/Type/Cool.pod6:
add the result of the EVAL statement
20:15
moritz github.com/perl6/nqp/pull/298 # for reference, for those not in #perl6-dev 20:16
20:16 mohae_ left
arnsholt Speaking of, I should probably join #perl6-dev 20:17
AlexDaniel Zoffix: do you recommend doing everything with plugins or are there any reasons to make a subclass of IRC::Client?
tbrowder ref 20:18
20:20 mohae_ joined
Zoffix AlexDaniel, everything as plugins, I think. 20:20
moritz Zoffix: does IRC::Client support automatic reconnecting on connection loss?
Zoffix moritz, it will when I release the new design. Should be sometime this week. 20:21
tbrowder ref docs and non-breaking space: does it work with pod docs in travis? if so, which unicode code point should be used (or is an html entity to be injected somehow in the htmlify process)? 20:22
20:22 TEttinger joined, colomon left
Zoffix .u non-breaking space 20:22
yoleaux U+00A0 NO-BREAK SPACE [Zs] ( )
AlexDaniel Zoffix: is there any way to provide alternative nicks so that irc-to-me triggers on something else besides the current nickname?
20:23 mohae left
AlexDaniel Zoffix: for example, bisectable has “bisect” as its alt nick, so it works with “bisect:” too 20:23
tbrowder thnx, Zoffix [TM, realname?]
20:24 colomon joined, pyrimidine joined
Zoffix AlexDaniel, no, since it's not a nick. You'd just subscribe to irc-privmsg-channel ($ where /^ 'bisect' 'able'? <[,:]+\s> \s* $<code>=.+/) { ... run code... } 20:26
20:27 labster left
AlexDaniel Zoffix: please consider it. That's what p5 Bot::BasicBot does, and I find it really useful 20:28
20:30 kaare__ left, wamba joined 20:37 pyrimidine left
[Coke] Scrp;; emd 20:38
20:38 FROGGS left
[Coke] waves from the land of no air conditioning. :| 20:38
lizmat wonders where that is 20:39
20:39 spider-mario left 20:40 zacts joined, trnh joined
timotimo antarctica? 20:42
20:42 pyrimidine joined
mst oh. anybody got a suggestion for a grammar based JSON module that's easy to understand? I want something to read to learn 20:42
lizmat src/core/Rakudo/Internals/JSON.pm ? 20:44
[Coke] lizmat: my house, unfortunately. 20:45
lizmat [Coke]: well, ours hasn't got airco either
[Coke] in a run of several days of 30C+ temps
I haven't not had AC since I lived in texas. I'm melting. :)
20:46 trnh left, trnh joined
timotimo mst: i think JSON::Tiny is a good place to start 20:48
Zoffix mst, pretty much the same as Internals/JSON, but also got support for newer JS spec: github.com/moritz/json/tree/master.../JSON/Tiny
mst, and those two classes are used here: github.com/moritz/json/blob/master...iny.pm#L56 20:49
20:52 CIAvash left 20:53 ufobat left 20:55 jdv79 joined, zacts left 20:56 rindolf left 20:58 zacts joined 20:59 yqt joined 21:04 labster joined
timotimo seems like the hard drive consumption of the / partition of hack.p6c.org is getting better now that my fuzzing experiments have started more than 1 month ago 21:08
AlexDaniel www.xkcd.com/1700/ so true 21:11
21:11 wamba left 21:16 espadrine joined
gfldex sena_kun: i'm playing with xmldiff atm. Right now I'm creating a 16GB swap file. 21:16
21:16 cpage_ left
sena_kun gfldex, sorry, my only one laptop with 4 gb RAM and old hdd will be crushed for sure. 21:18
21:22 wamba joined 21:24 tbrowder left, kurahaupo joined 21:26 kurahaupo left, kurahaupo joined 21:28 djbkd joined
konobi pmurias: lo 21:28
21:29 BenGoldberg left
pmurias konobi: hi 21:30
21:31 kurahaupo left, colomon_ joined, kurahaupo joined 21:32 colomon left, colomon_ is now known as colomon
pmurias konobi: have you seen docs/HACKING-js? 21:34
konobi ah... lemme look
21:37 gfldex joined 21:39 kurahaupo_ joined 21:40 kurahaupo left 21:46 kurahaupo_ is now known as kurahaupo
timotimo NativeCall is confusing me 21:46
21:46 colomon left, aries_liuxueyang left
timotimo Native call expected return type with CArray representation, but got a CStruct (SDL_Rect) 21:47
however, the sub i'm trying to call there is annotated as "returns int32"
21:47 colomon joined, aries_liuxueyang joined
timotimo oh, of course 21:48
CArray of CStruct is not properly implemented yet
21:49 Zoffix left 21:55 cyphase left 21:56 cpage_ joined 21:59 cyphase joined
AlexDaniel is it possilbe to have multiple paragraphs in a table cell? 22:02
asking because this table is broken: docs.perl6.org/language/variables#..._variables 22:03
22:08 colomon left
timotimo m: my int @foo = 1, 2, 3, 4; say +@foo; 22:10
camelia rakudo-moar 478671: OUTPUT«4␤»
22:10 djbkd left 22:11 avenj left, girafe left
timotimo m: class test { has int @!foo; method frob { say +@!foo } }; test.new.frob 22:11
camelia rakudo-moar 478671: OUTPUT«0␤»
timotimo m: class test { has int @!foo; method frob { say @!foo > 10 } }; test.new.frob
camelia rakudo-moar 478671: OUTPUT«Cannot resolve caller Real(array[int]: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in method frob at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
22:12 djbkd joined
timotimo m: my @foo; my @bar; say @foo > @bar 22:12
camelia rakudo-moar 478671: OUTPUT«False␤»
timotimo seems like array is missing a method Array has
or maybe it comes from somewhere else
someone want to rakudobug that? 22:13
22:14 sena_kun left
lizmat m: my int @foo; my int @bar; say @foo > @bar 22:14
camelia rakudo-moar 478671: OUTPUT«Cannot resolve caller Real(array[int]: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
lizmat timotimo: yes, please, rakudobug it
will look at it tomorrow
22:17 TEttinger left 22:19 cdg_ joined
gfldex AlexDaniel: that table is ripped apart by the pod parser. Technically pod tables support pretty much anything. 22:19
AlexDaniel gfldex: I don't know how to fix it, so I created this: github.com/perl6/doc/issues/754 22:20
22:22 wamba left 22:23 cdg left
timotimo m: my %foo = Nil; 22:23
camelia rakudo-moar 478671: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw 1 element␤ in block <unit> at <tmp> line 1␤␤»
timotimo so that's not possible?
m: my %foo = Empty;
camelia ( no output )
timotimo makes more sense in my context anyway
22:23 cdg_ left
gfldex A Hash is a (fancy) list of containers, not a container in itself. 22:24
but then, I'm biased against Nil. :) 22:25
22:25 firstdayonthejob left
timotimo i only thought to use Nil because i saw your recent work regarding Nil 22:29
lizmat m: my %h{Any} = Nil => 42; dd %h 22:30
camelia rakudo-moar 478671: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = :Nil(42))␤»
lizmat hmmm
m: my %h{Any} = Empty => 42; dd %h
camelia rakudo-moar 478671: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = :Empty(42))␤»
22:31 colomon joined
gfldex AlexDaniel: you could try to sneak a =html block with a single <br/> in to get the paragraph displayed 22:32
ShimmerFairy AlexDaniel: I commented on the issue, so you know :) 22:33
22:34 espadrine left 22:36 harmil left, harmil joined, pmurias left
timotimo i can't nativecast into a Pointer[int32]? 22:39
m: use NativeCall; my $data = CArray[int32].new(1, 2, 3, 4); say nativecast(Pointer[int32], $data);
camelia rakudo-moar 478671: OUTPUT«NativeCall::Types::Pointer[int32]<0x4538980>␤»
timotimo ... well, here it seems to work
AlexDaniel ShimmerFairy: thanks
timotimo ah, no, just a logic error in my thing 22:41
22:44 Ven left
MasterDuke Zoffix, AlexDaniel: looks nice, i think the *ables could work with that pretty well. also, ++ for alt nicks 22:46
22:47 welton joined
ovibos m: my Str %h{List} = ('a', 'b') => 'c'; %h{('a', 'b')}; 22:49
camelia rakudo-moar 478671: OUTPUT«Type check failed in binding key; expected List but got Str ("a")␤ in block <unit> at <tmp> line 1␤␤»
ovibos m: my Str %h{List} = ('a', 'b') => 'c'; my List $l = ('a', 'b'); %h{$l};
camelia ( no output )
ovibos m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; say %h{$l};
camelia rakudo-moar 478671: OUTPUT«c␤»
ovibos is there any way to use a list as the key of a hash?
first example doesn't typecheck because the list is coerced to a str (i assume), second doesn't work because i think it's using the address of the list instead of the values 22:50
third works but i need to be able to construct the lists dynamically
lizmat m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; dd %h 22:52
camelia rakudo-moar 478671: OUTPUT«Hash[Str,List] %h = (my Str %{List} = (("a", "b")) => "c")␤»
lizmat looks to me it isn't coerced to a Str :-)
22:52 setty1 left
lizmat m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; dd %h{$l} 22:53
camelia rakudo-moar 478671: OUTPUT«Str %h = "c"␤»
lizmat m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; dd %h.keys[0]
camelia rakudo-moar 478671: OUTPUT«("a", "b")␤»
lizmat good night, #perl6!
ovibos it's coerced when you pass it literally 22:54
e.g. my first example
22:54 dvinciguerra_ joined 22:55 edehont left
AlexDaniel m: say ~ «hello world» 22:57
camelia rakudo-moar 478671: OUTPUT«hello world␤»
AlexDaniel m: say ~«hello world»
camelia rakudo-moar 478671: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3say ~«hello world»7⏏5<EOL>␤ expecting any of:␤ argument list␤ postfix␤»
AlexDaniel ↑ weird
Xliff Does anyone know why I can co-erce some repr('CPointer') classes to Numeric and not others? 23:04
I wish I had an easy golf for this, but I don't.
Cannot resolve caller Numeric(xmlDtdPtr: ); none of these signatures match:
(Mu:U \v: *%_)
23:06 avenj joined, avenj left, avenj joined
TimToady AlexDaniel: ~« is a hyper stringify 23:11
AlexDaniel ooooooh
did not look at it this way, now I see
TimToady and didn't get far enough to notice that hello and world were undefined routines
23:16 cyphase left 23:20 cyphase joined
dalek sectbot: d3a255f | (Daniel Green)++ | benchable.pl:
"Zoom" in on large performance differences between two commits
23:21
gfldex m: my Int:D $a = Nil; say "$a"; CONTROL { say "$a: $_" } 23:24
camelia rakudo-moar 957dc0: OUTPUT«Use of uninitialized value $a of type Int:D in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at <tmp> line 1␤: Use of uninitialized value $a of type Int:D in string context␤Any of .^name, .p…»
Xliff m: use NativeCall; class A is repr('CPointer') { }; say A ~~ Pointer; 23:26
camelia rakudo-moar 957dc0: OUTPUT«False␤»
timotimo oooh, i like the sound of that benchable commit 23:28
AlexDaniel it may be a bit too early to celebrate, but yeah 23:32
MasterDuke the graphs produced are not spectacular, the functionality should be ok 23:34
AlexDaniel the graphs will be spectacular soon :) 23:35
at least, I am working on it
timotimo in what way will they be spectacular? 23:36
AlexDaniel well, you'll see 23:37
timotimo OK! :) 23:38
23:47 ShimmerFairy joined
ShimmerFairy I wish the docs were more clear about what various roles expect of your class, e.g. the Numeric role. (Also, that P6 would actually define stubs for these roles for required methods.) 23:54
23:59 cyphase left