Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-01-31

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 pyrimidine joined #perl6
00:08 Cabanossi joined #perl6
00:14 cdg joined #perl6
00:32 agentzh joined #perl6
00:37 pyrimidine joined #perl6
00:44 aborazmeh joined #perl6
00:44 aborazmeh joined #perl6
00:46 dugword joined #perl6
00:47 Geth doc: 29295940fe | (Will "Coke" Coleda)++ | 2 files
00:47 Geth doc: Don't generate .png typegraph files
00:47 Geth doc: review: https://github.com/perl6/doc/commit/29295940fe
00:47 Geth doc: 525e94eec1 | (Will Coleda)++ | 2 files
00:47 Geth doc: Merge pull request #1131 from perl6/coke/pngless
00:47 Geth doc:
00:47 Geth doc: Don't generate .png typegraph files
00:47 Geth doc: review: https://github.com/perl6/doc/commit/525e94eec1
00:56 cyphase joined #perl6
00:57 Geth doc: antquinonez++ created pull request #1171: added line breaks to grammar_tutorial
00:57 Geth doc: review: https://github.com/perl6/doc/pull/1171
01:04 bpmedley joined #perl6
01:06 astj joined #perl6
01:11 cdg joined #perl6
01:12 LeCamarade joined #perl6
01:12 Geth doc/master: 4 commits pushed by Altai-man++
01:12 Geth doc/master: b921779b79 | Great comment style unification: Part 1.…
01:12 Geth doc/master: 4d1bcfc6f7 | Merge branch 'master' into comments…
01:12 Geth doc/master: e468490bb1 | Merge branch 'master' into comments…
01:12 Geth doc/master: a0efe96978 | Merge pull request #1165 from Altai-man/comments…
01:12 Geth doc/master: review: https://github.com/perl6/doc/c​ompare/525e94eec1...a0efe96978
01:13 astj joined #perl6
01:13 LeCamarade joined #perl6
01:40 agentzh joined #perl6
01:40 brokenchicken wtf.. travis just emailed me about a failed build... of a commit from JAN 19!
01:41 cale2 So "grep" is perl's version of "filter"
01:41 cale2 I was wondering for the longest time why there was no filter
01:41 brokenchicken .oO( must've been delayed by Donald's administration... )
01:43 cale2 as someone that doesn't have a background in unix admin stuff, that's something I found confusing
01:44 brokenchicken Filter's a strange name since you're doing the opposite.
01:47 cale2 `'`'`'`'`'` filter onlySingleQuotes '''''
01:47 cale2 Just depends on how you write your filtering function
01:48 BenGoldberg joined #perl6
01:48 cale2 Like you're filtering out the bad stuff
01:48 cale2 where does "grep" even come from?
01:48 cale2 "get representation"
01:49 BenGoldberg global regular expression print
01:50 cale2 Is grep just one of those things that you'd never think to change? Because it's so loved and gives warm fuzzy feelings, etc
01:51 BenGoldberg Perl has always had a grep builtin...
01:52 cale2 Just wondering how many things are in the language because "it's always been that way"
01:52 BenGoldberg You could of course add some sort of alias, like "filter", but most programmers are used to the name grep.
01:53 cale2 I guess P6 isn't necessarily about starting completely over. More like revolution rather than evolution
01:53 cale2 or the other way around haha
01:53 BenGoldberg The *feature* grep is important, the *name* grep slightly less so.  Removing that feature entirely would be stupid.
01:53 BenGoldberg Renameing it, while possible, is kinda pointless.
02:01 mst joined #perl6
02:02 mst joined #perl6
02:05 masak TimToady: sorry about the miscategorization of your hat. can I call it an "Aussie hat" next time? :)
02:06 user__ joined #perl6
02:06 masak TimToady: any thoughts on BEGIN firing per expansion? do you mind the semi-consensus that emerged yesterday (that it does)?
02:07 masak another thing that pushed me in that direction was: we don't mind at all that END fires per expansion.
02:12 brokenchicken What's an expansion?
02:13 masak brokenchicken: it's when code returned from a macro gets put in the code where the macro call was.
02:13 brokenchicken Ah
02:15 masak it's an old Lisp term.
02:16 masak little bit misleading, since the result can be smaller, bigger, the same size or even divergent
02:18 brokenchicken No, makes sense to me :)
02:18 cale2 the new rakudo star release says advanced macros aren't implemented yet. what does that mean exactly?
02:18 masak TimToady: also, there are two kinds of consistency at odds here for quasis with BEGIN blocks without unquotes. they could fire ASAP (once) or per expansion.
02:18 cale2 simple macros work, but advanced ones dont?
02:19 masak cale2: there's no short answer. but somewhat simply, I wouldn't want to use the macros that are implemented so far.
02:19 masak cale2: if you're *really* interested in Perl 6 macros, then the development of 007 is worth paying attention to.
02:20 masak it has some cutting-edge insights into macros and slangs that sometimes leak over into this channel.
02:20 masak implementation of all those new things will commence in Rakudo at some point. don't know exactly when.
02:21 masak cale2: "advanced macros" are based off something called the Qtree. it's an AST structure for the program.
02:22 cale2 Is it basically Racket macros in perl6?
02:28 travis-ci joined #perl6
02:28 travis-ci Doc build errored. Will Coleda 'Merge pull request #1131 from perl6/coke/pngless
02:28 travis-ci https://travis-ci.org/perl6/doc/builds/196794815 https://github.com/perl6/doc/com​pare/c17ac0beaade...525e94eec1d5
02:28 travis-ci left #perl6
02:35 brokenchicken hmmm... moar configure failed :/
02:36 brokenchicken don't really say why
02:36 brokenchicken Ahhh  git error: fatal: unable to access 'https://github.com/libuv/libuv.git/': Failed connect to github.com:443; Connection timed out
02:36 samcv :\
02:37 LeCamarade joined #perl6
02:37 Cabanossi joined #perl6
02:41 hartenfels joined #perl6
02:42 _28_ria joined #perl6
02:46 MasterDuke joined #perl6
02:46 dugword joined #perl6
02:47 travis-ci joined #perl6
02:47 travis-ci Doc build errored. Altai-man 'Merge pull request #1165 from Altai-man/comments
02:47 travis-ci https://travis-ci.org/perl6/doc/builds/196797707 https://github.com/perl6/doc/com​pare/525e94eec1d5...a0efe96978ce
02:47 travis-ci left #perl6
02:56 _28_ria joined #perl6
02:58 LeCamarade joined #perl6
03:08 Cabanossi joined #perl6
03:18 cibs joined #perl6
03:21 dugword joined #perl6
03:29 xtreak joined #perl6
03:34 LeCamarade joined #perl6
03:37 avuserow joined #perl6
03:39 noganex_ joined #perl6
03:48 cdg joined #perl6
03:59 xtreak_ joined #perl6
04:01 xtreak joined #perl6
04:02 Cabanoss- joined #perl6
04:12 solarbunny joined #perl6
04:20 itcharlie1 joined #perl6
04:29 brokenchicken POTATO!
04:55 _28_ria joined #perl6
04:56 itcharlie1 left #perl6
04:57 dugword joined #perl6
05:00 Cabanoss- joined #perl6
05:02 agentzh joined #perl6
05:30 labster joined #perl6
05:32 samcv brokenchicken, what's the best way to create all possible orderings of an array?
05:33 samcv m: my @a = 1,2,3; @a.op # (1,2,3), (1,3,2), (3,2,1), (3,1,2) etc
05:33 camelia rakudo-moar 3e28b1: OUTPUT«No such method 'op' for invocant of type 'Array'␤  in block <unit> at <tmp> line 1␤␤»
05:37 masak cale2: re "grep" -- I feel your confusion, FWIW.
05:38 masak cale2: I had that function/method as "grep" in 007 for a long while too, until I took a fresh look at it and decided that the name doesn't make sense unless you have a very specific (Unix-y) history.
05:38 masak "filter" ain't perfect, no, but it's probably the least bad among the various contenders.
05:39 samcv a Grep is a goblin like creature
05:39 samcv well that's what the name sounds like at least
05:39 samcv masak, any clue how to generate all possible orders of a list in p6?
05:40 masak my s/grep/filter/ commit at the time explains my reasoning: https://github.com/masak/007/commit/90​97babbf1ec69391ec57706be7f531438bb9b77
05:40 masak samcv: I believe that's a built-in these days
05:40 masak m: say [1, 2, 3].permutations.perl
05:40 camelia rakudo-moar 3e28b1: OUTPUT«((1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)).Seq␤»
05:41 samcv nice
05:41 masak yeah, we're nice that way
05:41 samcv prolly gonna use that for my bitfield packing
05:41 masak Perl 6 no longer has the problem that there are too *few* built-ins :P
05:42 masak I think sometimes we're slightly bad at holding back and looking for that wonderful generalization that could reduce the built-ins a tad more
05:42 masak perhaps that's an inevitable consequence of the community having as much steerage as it does
05:42 samcv i think that's the most trivial way to do it. since it's much easier to write a function to compute how items in a bitfield will be padded than to write something to try and find the best possible ordering programmatically
05:42 samcv heh
05:43 masak also, I happened to see the .kxxv method name the other day, and was reminded how I wanted to institute an "ugliest built-in name ever" prize :P
05:43 masak (no, I don't have a better suggestion)
05:43 samcv heh
05:45 TEttinger yay bitfields
05:46 TEttinger is this for unicode stuff, samcv?
05:46 samcv yea
05:50 agentzh joined #perl6
05:52 Vynce joined #perl6
05:58 _28_ria joined #perl6
05:58 CIAvash joined #perl6
06:20 Geth doc: antquinonez++ created pull request #1172: edits to exceptions pod
06:20 Geth doc: review: https://github.com/perl6/doc/pull/1172
06:25 bjz joined #perl6
06:31 agentzh joined #perl6
06:32 domidumont joined #perl6
06:35 hartenfels1 joined #perl6
06:38 domidumont joined #perl6
06:52 RabidGravy joined #perl6
06:53 travis-ci joined #perl6
06:53 travis-ci Doc build passed. Antonio Quinonez 'edits to exceptions pod'
06:53 travis-ci https://travis-ci.org/antqu​inonez/doc/builds/196846373 https://github.com/antquino​nez/doc/commit/bd26cbe7509b
06:53 travis-ci left #perl6
06:55 xtreak joined #perl6
07:00 masak m: macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl
07:00 camelia rakudo-moar 3e28b1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Use of macros is experimental; please 'use experimental :macros'␤at <tmp>:1␤------> 3macro7⏏5 swap($a, $b) { quasi { ({{{$a}}}, {{{$b␤»
07:00 domidumont joined #perl6
07:00 masak m:use experimental :macros; macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl
07:00 masak m: use experimental :macros; macro swap($a, $b) { quasi { ({{{$a}}}, {{{$b}}}) = {{{$b}}}, {{{$a}}} } }; my $w = 5; my $z = 10; swap $w, $z; say [$w, $z].perl
07:01 camelia rakudo-moar 3e28b1: OUTPUT«[10, 5]␤»
07:01 masak \o/
07:06 * masak tried the corresponding macro in 007, and found a bug :P
07:12 wamba joined #perl6
07:15 hchienjo joined #perl6
07:17 jraglin joined #perl6
07:20 darutoko joined #perl6
07:31 mr-foobar joined #perl6
07:35 domidumont joined #perl6
07:37 agentzh joined #perl6
07:48 e1 joined #perl6
07:57 samcv masak, i want to use a macro to simplify this:
07:57 samcv macro dump($a) { $a.VAR.^name ~ $a.gist }
07:57 samcv i try this and i get "Too few positionals passed; expected 3 arguments but got 2"
07:58 masak m: my $a = [1, 2, 3]; say :$a.perl
07:58 camelia rakudo-moar 3e28b1: OUTPUT«:a($[1, 2, 3])␤»
07:58 masak :)
07:58 samcv that doesn't answer my question
07:58 masak agreed
07:58 samcv tho :\
07:59 masak I notice that your macro doesn't have a quasi
07:59 samcv i know .perl, but i am doing some custom dumping, and want to macro it
07:59 * samcv has no clue what quasi does
07:59 masak they are the thing you put your generated code in
07:59 masak otherwise the code just ends up running as part of the macro call
07:59 samcv m: macro dump($a) { quasi { $a.VAR.^name ~ $a.gist } }; my $var = 'test'; say dump($var)
07:59 camelia rakudo-moar 3e28b1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Use of macros is experimental; please 'use experimental :macros'␤at <tmp>:1␤------> 3macro7⏏5 dump($a) { quasi { $a.VAR.^name ~ $a.gi␤»
08:00 samcv m: use experimental :macros; macro dump($a) { quasi { $a.VAR.^name ~ $a.gist } }; my $var = 'test'; say dump($var)
08:00 camelia rakudo-moar 3e28b1: OUTPUT«ScalarAST.new␤»
08:00 samcv :\
08:00 samcv what's the closest to c's #define ?
08:00 samcv i literally only need verbatim insertion
08:00 masak m: use experimental :macros; macro dump($x) { quasi { say VAR({{{$x}}}).name, ": ", {{{$x}}}.perl } }; my $foo = "OH HAI"; dump($foo)
08:00 camelia rakudo-moar 3e28b1: OUTPUT«$foo: "OH HAI"␤»
08:01 masak there ya go
08:01 samcv so many {{{}}}
08:01 masak feel free to write it in any other way that works
08:01 samcv what works ;P
08:01 TimToady masak: the consensus view seems fine to me
08:01 samcv ?
08:01 masak also, you're welcome ;)
08:01 masak TimToady: cool
08:02 geekosaur samcv, quasi "quotes" code for later evaluation (at run time); {{{ }}} is what "unquotes" stuff to be substituted into the quoted code
08:02 masak samcv: you're not the first person to complain about the {{{ }}}
08:02 masak samcv: there's a lighter syntax being thrown around in 007 (though NYI): `unquote(...)`
08:03 samcv can we have a 'define'?
08:03 geekosaur in common lisp, quasi is `() and {{ }}} is ,@ or , depending on whether lists are to be "flattened" or not (respectively)
08:03 samcv that can do less fancy things?
08:03 masak samcv: no :)
08:03 samcv :|
08:03 masak samcv: at least, I'm not going to implement one
08:03 masak someone else might get a kick out of repeating C's mistakes. not me.
08:03 samcv i guess i'll just have to type lots of braces
08:03 samcv haha
08:03 masak no-one is forcing you to use macros
08:04 samcv well i can't reliably do .VAR.^name without them
08:04 samcv if I make a sub even is pure i often get some random thing outputted that's not the variable's name
08:04 masak this is true
08:05 masak VAR(...).name is a very macro-ish wish to have
08:05 masak note that it's .name, too, not .^name as you wrote
08:05 TimToady goodness, it's tomorrow already
08:06 samcv no it is .name
08:06 samcv m: my $var; say $var.VAR.^name; say $var.VAR.name;
08:06 camelia rakudo-moar 3e28b1: OUTPUT«Scalar␤$var␤»
08:06 samcv oh. yeah
08:06 samcv sorry i got mixed up
08:07 samcv i will take my macros where I can get them though ;)
08:07 khw joined #perl6
08:09 masak samcv: I wouldn't be so cranky about `#define` if I didn't deeply believe that what Perl 6 is aiming for is strictly better ;)
08:09 samcv agreed lol
08:09 samcv i just want less {{}} tbh
08:10 geekosaur perl6 specifically went with that because it was ugly (and therefore highly obvious that Something Weird is going on)
08:10 samcv ah
08:10 samcv <----begin weirdness---->
08:10 geekosaur because $x means the $x at the time the expanded macro is evaluated, but {{{$x}}} is the $x at the time the macro is being expanded
08:11 masak "ugly" here can actually be taken to mean "doesn't collide with normal language syntax"
08:11 masak see http://strangelyconsistent.or​g/blog/macros-placeholdeeers
08:12 lolo78 joined #perl6
08:16 xtreak joined #perl6
08:20 samcv masak, are you implying perl 5 uses macros to do sprintf?
08:22 masak no, not implying that
08:22 samcv "Don't believe me when I say that all templating syntax sucks? Fine, I'll bring you examples:" not sure what you mean by this?
08:22 geekosaur no, the %-escapes in the format string are a similar templating notion
08:22 samcv it's just a bad way to template items into the string?
08:22 samcv ah
08:22 samcv yeah that's pretty bad
08:23 geekosaur and TT as the second example :)
08:24 samcv wow python's is really weird
08:25 tojo joined #perl6
08:25 arnsholt samcv: I know! What weirdness did you trip over today?
08:25 samcv https://docs.python.org/3/libr​ary/string.html#formatstrings
08:26 TimToady joined #perl6
08:27 tojo how can I take class name from variable? something like this: my $obj = $classname.new
08:27 samcv m: my $var = 'te'; say $var.WHAT.name;
08:27 camelia rakudo-moar 3e28b1: OUTPUT«No such method 'name' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
08:27 samcv m: my $var = 'te'; say $var.WHAT.^name;
08:27 camelia rakudo-moar 3e28b1: OUTPUT«Str␤»
08:27 samcv like that kind of class name?
08:28 masak m: my $var = 'te'; say $var.^name
08:28 camelia rakudo-moar 3e28b1: OUTPUT«Str␤»
08:28 masak samcv: no need for .WHAT
08:29 samcv oh. ok
08:29 tojo sorry, bad question.. i hold a class name in variable and want to use that to make object from that class name
08:30 tojo for 'Foo', 'Bar' -> $t { my $obj = $t.new; }
08:31 masak m: for Int, Str -> $t { say $t.new }
08:31 camelia rakudo-moar 3e28b1: OUTPUT«0␤␤»
08:31 masak m: for Int, Str -> $t { say $t.new.perl }
08:31 camelia rakudo-moar 3e28b1: OUTPUT«0␤""␤»
08:32 CIAvash tojo: ::($t).new
08:33 samcv is there a page on perl 6 special methods and stuff?
08:33 samcv like .^methods and uh, how to get the possible signatures of a method or sub
08:33 tojo CIAvash: yes! that worked, thanks :)
08:34 samcv tojo, https://docs.perl6.org/language/p​ackages#index-entry-%3A%3A%28%29
08:35 dakkar joined #perl6
08:36 parv joined #perl6
08:37 tojo samcv: thx! that page didn't come up on my previous searches
08:41 gfldex samcv: .^ is the same as .HOW, so you need to get the *HOW and look that up in the docs
08:41 gfldex most of the time you will be looking for https://docs.perl6.org/type/M​etamodel$COLON$COLONClassHOW
08:43 samcv what am i doing wrong here https://gist.github.com/b34f​9f7a9a5ee6c9b6da7b56cae47b3d
08:43 samcv stderr: Too few positionals passed; expected 2 arguments but got 1
08:45 gfldex samcv: you are trying to call $c in line 9
08:46 samcv well i created the variable on line 7
08:48 gfldex samcv: try this https://gist.github.com/gfldex/0​06d385aa45969b8487b27b5727cda17
08:48 samcv yeah i was about to try that
08:49 KDr2 joined #perl6
08:49 g4 joined #perl6
08:49 g4 joined #perl6
08:50 gfldex samcv: actually, your version should have worked to
08:52 as__ joined #perl6
08:52 as__ radudo: my $x = 42; say $x[0];
08:53 as__ rakudo: my $x = 42; say $x[0];
08:53 camelia rakudo-moar 3e28b1: OUTPUT«42␤»
08:53 samcv also what's the shortcut for getting the last element of an array?
08:53 as__ Guys is it because there is a default circumfix for []?
08:53 gfldex [*-1]
08:53 gfldex or .tail(1)
08:54 samcv [*-1] seems a lot faster
08:54 gfldex as__: yes
08:55 gfldex method calls are always dynamic and can't be inlined
08:55 moritz they can, heuristically, at run time
08:56 gfldex does that depend on traits?
08:57 geekosaur as__, it's because there's code to pretend that a scalar is a single-element list when used in a place that requires a list
08:58 as__ aha ok thanks!
08:58 parv is there any plan for ";" to be the implicit default on perl6 prompt (REPL), as "my $x = 2" gives error but not with ";"?
09:02 hartenfels parv: `my $x = 2` on the REPL doesn't give me any errors.
09:02 ocbtec joined #perl6
09:04 jonas2 joined #perl6
09:07 parv after definition+assignment with ";" (my $x = 2;), there is no problem afterwords. with any new variables sans end ";".
09:08 rindolf joined #perl6
09:08 parv where can i post screenshot without an account?
09:09 hartenfels parv: you could post the text to pastebin.
09:10 aindilis` joined #perl6
09:15 parv error: http://pastebin.com/DTWXN2ws
09:16 mxco86 joined #perl6
09:16 hartenfels parv: It works fine for me, maybe your Perl 6 is really old? What do you get when you run `perl6 -v`?
09:16 parv i am using rakudo ae9d517
09:17 domidumont joined #perl6
09:19 hartenfels I'm not sure then, because it's supposed to work I think.
09:21 parv actual version output: http://pastebin.com/sEZ1NuW0
09:21 parv thanks for trying, hartenfels
09:27 pyrimidi_ joined #perl6
09:35 zakharyas joined #perl6
09:50 user10 joined #perl6
09:51 xtreak joined #perl6
09:54 breinbaas joined #perl6
09:56 carl_ joined #perl6
09:56 carl_ working?
09:56 carl_ hello beings
09:57 samcv hello
09:57 samcv hi carl_
09:58 carl_ quick question...
09:58 carl_ want to do something like this:   if $a.WHAT eq (Int) {}  , but no good.
09:58 moritz if $a ~~ Int { }
09:59 moritz that's a type check that propery respects subtypes
09:59 carl_ ~~ ? I'll look it up
09:59 moritz it's the smart-match operator
10:00 devtom30 joined #perl6
10:03 wamba joined #perl6
10:06 parv is there really no way to compile+install rakudo/star from github to get the latest rakudo/rakudo?
10:08 parv else, i woud need to gather & install the bits myself to add to plain rakudo install.
10:08 samcv ok this isn't going to work. using permutations. gonna have to actually write something to pack the bits myself :\ oh well
10:09 samcv yeah i guess i can see how they can add up...
10:09 samcv and sadly permutations is naive to repeated numbers
10:09 samcv m: (1,1).permutations
10:09 camelia rakudo-moar 3e28b1: ( no output )
10:09 samcv m: (1,1).permutations.say
10:09 camelia rakudo-moar 3e28b1: OUTPUT«((1 1) (1 1))␤»
10:09 stmuk_ parv: there is a Task::Star which resembles Rakudo Star although I suspect the module is dsynced
10:10 parv stmuk_: thanks, i will check that.
10:10 geekosaur desynched and currently broken
10:10 stmuk_ there is a report on twitter that 2017.01 release doesn't work in at least VS15 (fixed after release)
10:11 stmuk_ doesn't compile I mean
10:13 domidumont joined #perl6
10:13 parv rakudo/star/README is frankly misleading in that "perl Configure.pl" dies noting that I tried to run it from clone of the git repo. (of course
10:13 parv )
10:14 samcv .tell AlexDaniel East_Asian_Width property has just been merged into MVM
10:14 yoleaux samcv: I'll pass your message to AlexDaniel.
10:15 stmuk_ parv: I don't see why it's misleading .. it's intended to catch a common mistake .. not handle people being "clever" :)
10:15 rba_ joined #perl6
10:16 moritz parv: in the early days of R*, people would regularly clone the star repo and expected it to behave like the tarball
10:16 moritz hence the current behavior
10:20 timotimo eco: fig
10:20 timotimo ah, it's wig!
10:21 timotimo .tell cale2 have a look at the wig module :)
10:21 yoleaux timotimo: I'll pass your message to cale2.
10:22 geekosaur joined #perl6
10:22 parv well, i am back to plain rakudo then: https://github.com/rakudo/star/issues/28 (--xform error on FreeBSD 11)
10:22 stmuk_ you could install gmake from ports
10:23 timotimo um
10:23 timotimo parrot hasn't been in rakudo star for a few years
10:24 timotimo also, if it's only to be used by the release creator, what's your problem with it?
10:24 parv timotimo: it's the tar option that causes the similar error (with MoarVM)
10:24 timotimo oh? but why do we need that?
10:24 timotimo just to throw out the version number?
10:24 stmuk_ the easiest fix is to look for gnu make and die with an error saying to install it
10:24 wamba joined #perl6
10:25 timotimo why would gnu make magically give your tar executable a --xform option?
10:25 stmuk_ because it's a gnu make only option
10:25 timotimo parv: i think you're missing the point of rakudo star
10:26 timotimo what.
10:26 parv timotimo: only the bug submitter mentions that "only to be used by the release creater" without any follow up
10:26 timotimo http://rakudo.org/2017/01/30/anno​unce-rakudo-star-release-2017-01/
10:26 timotimo you download this
10:27 parv timotimo: i am aware of that release.
10:27 parv in any case, i am not trying any more to complile myself rokudo star.
10:27 timotimo what do you mean by "gather & install the bits"?
10:28 timotimo you can also just install rakudo manually, and then use the "install all modules" part of rakudo star to get the modules
10:28 parv find zef/panda etc.; then install it locally.
10:28 timotimo not necessarily
10:29 parv ?
10:29 timotimo oh, rakudo star does use zef for that
10:29 timotimo my apologies
10:31 Ulti whoa tests down to 0.8s
10:31 timotimo stmuk_: i still don't understand why installing gnu make would change how the tar command works. or does gnu make also come with gnu tar?
10:32 parv stmuk_: were the gmake comments meant for me? (at least gmake 4.2.1 is installed here, FWIW)
10:33 timotimo yes, they were
10:35 stmuk_ it was a typo for gnu tar
10:35 stmuk_ need coffee
10:35 parv stmuk_: ah, ok.
10:42 wamba joined #perl6
10:43 timotimo that makes more sense, then
10:46 bjz joined #perl6
10:51 zakharyas joined #perl6
10:51 patzim joined #perl6
10:53 patzim @SmokeMachine: Wrt. implementation of P6W: https://github.com/zostay/Smack
10:55 ufobat joined #perl6
11:00 timotimo a nonbreaking space would be a good idea in the title
11:00 timotimo it breaks just between Perl and 6 for me %)
11:02 samcv what is the best way to iterate through a list, possibly removing items from the list
11:02 astj joined #perl6
11:02 samcv doing for ^@array.elems will stop matching up when i remove elements, but i'm not sure how to remove an item from the array by doing `for @array`
11:03 timotimo i'd just map, or even grep
11:03 jnthn samcv: I'd probably @array .= grep: { ... } and hand back False to remove
11:03 arnsholt I think I'd do a grep removing elements, and then do the map
11:04 samcv well i need to do things to those elements
11:04 samcv process those items
11:04 samcv not _just_ remove them
11:04 jnthn You can in a grep?
11:04 samcv ok you think that would be suited fine?
11:04 samcv seems a little weird to me
11:04 arnsholt If the processing is disjoint from the decision to remove or not, I'd filter first and then process
11:05 arnsholt (Incidentally, it might be easier to help with a bit more context about what the problem you're solving is)
11:05 samcv they are not disjointed
11:06 timotimo if by "process, not just remove" you mean that you need to change individual values, i'd go with map and return Empty when you want to remove elements
11:06 samcv ok i have an Array of numbers, and I need to go through the array of numbers, and remove all the easy numbers and put it into another array
11:06 samcv no changing values
11:06 pyrimidine joined #perl6
11:06 samcv trying to write something to pack a bitfield
11:06 timotimo m: my @a = ^10; @a .= map({ $_ %% 3 ?? $_ ** 2 !! Empty }); say @a
11:06 camelia rakudo-moar 3e28b1: OUTPUT«[0 9 36 81]␤»
11:07 jnthn Maybe .categorize?
11:07 jnthn (Which is for breaking a list into sub-lists matching conditions)
11:07 samcv hmm
11:07 samcv that may work
11:08 devtom30 left #perl6
11:09 samcv let me try categorize
11:09 samcv maybe that'll work for finding ones that are divisible by 8 cleanly, but then i will need to go through and find any complements
11:09 samcv such as 3 and 7 = 8 for example
11:11 samcv such as 3 and 7 = 8 for example
11:11 samcv oops sent that twice
11:11 DrForr https://www.youtube.com/watch?v=vYmhapbBrig
11:13 samcv categorize is pretty cool
11:13 timotimo it's very good
11:14 samcv i'm trying to think what to look up for mathematical theory on this sort of thing
11:14 timotimo hm. bin packing?
11:14 samcv i mean if i take out all 8's and 16's for example, is there any chance of me losing some packing?
11:15 samcv well just this sort of thing
11:15 samcv like fitting certain numbers into another number
11:15 samcv most efficiently
11:16 samcv also fitting like 2d shapes into the smallest size
11:16 timotimo i would have assumed they fit like 1d shapes
11:16 samcv err
11:16 samcv yeah
11:16 samcv 1d shapes but
11:17 samcv it would be nice to know for sure that taking out all 8's and 16's will never prohibit one best possible packing
11:17 timotimo what do you fit stuff into?
11:17 samcv pretty sure it will? but idk. there must be some way to prove it
11:17 samcv 8 bits
11:17 timotimo ah
11:17 timotimo then you can transform the problem into another problem
11:18 arnsholt Oh. You have a series of field bit-widths, and want an algorithm to find the smallest number of bytes needed to pack them
11:18 samcv pretty sure divisible by 8 things will be fine
11:18 samcv yes
11:18 samcv more importantly the ordering
11:18 timotimo i.e. "fit all those 1, 2, 3, 4, 5, 6, 7 wide things into N 8-wide bins"
11:18 samcv of the smallest bytes
11:18 timotimo is the same as
11:18 timotimo "fit all those 1, 2, 3, 4, 5, 6, 7, 8, or 16 wide things into N + 10 8-wide bins"
11:18 timotimo i.e. just pretend those extra bins were never even there
11:19 timotimo and just sprinkle your 8- and 16-bit wide things at the end or beginning
11:20 samcv yeah, also want to know if i take out 4+4 and 3+6, will that also definitevely be the best?
11:20 samcv i mean i know by themself, but hmm. i'm thinking i may need to sort odd and even
11:20 timotimo you mean 3+5?
11:20 samcv yes
11:20 timotimo i'd say so
11:20 timotimo there's this dynamic programming thing
11:21 timotimo where a perfect sub-solution can be part of a perfect super-solution
11:21 timotimo i.e. a solution that has one 8-bit bin filled up with 4 + 4 can be as perfect as that sub-solution for that single 8-bit bin
11:22 samcv yeah
11:23 samcv i want to say that is true, but some part of me wants to look at a mathematical proof for it lol
11:24 SmokeMachine patzim: thanks!
11:26 gregf_ joined #perl6
11:27 jast if you have M bins of size N each and ignore elements of size i*N (for integer i), that's equivalent to packing the remaining elements into M-i bins
11:27 jast in other words, these elements don't really contribute anything interesting to the result
11:27 Ulti samcv: so long as the number you're removing isnt prime it shouldn't be a big deal?
11:28 Ulti because there's always some box that fits a different multiple
11:28 samcv many of them will be prime. but that is a good point
11:28 samcv so should do all the non-prime ones first
11:28 samcv then deal with the other ones last
11:28 Ulti also I wasnt following what you're actually up to other than the abstract thought problem :3
11:28 samcv oh
11:29 samcv packing C bitfields in for our unicode database rewrite
11:29 samcv for MVM
11:29 xtreak joined #perl6
11:30 rba_ joined #perl6
11:30 Ulti not sure im fully clear
11:30 Ulti is the problem the numbers are sparse?
11:30 Ulti so like you have lots of integers where you could fit the variety into 5bits but they use integers 8bits wide?
11:31 timotimo something like that, yeah
11:31 samcv i have bins of size 8, i need to fit a series of numbers, most of them 1-8 into the minimum nubber of bins
11:31 samcv so need to do like 4+4 = 8, 2+2+2+2 = 8, 2+6= 8, but then also deal with all the odd numbers
11:32 moritz greedy approaches are typical
11:32 moritz so you start with placing all the big chunks
11:32 rba_ joined #perl6
11:33 Ulti so in that example you can think of addition as a hash digest is there a reason something like that wouldnt work
11:33 moritz and when there's space left (for example when packing an 8-bin with 5, 3 remains), you do that recursively with all the chunks that are small enough to fit in the remaining space
11:33 samcv yeah
11:33 DrForr Keeping in mind that the optimal algorithm for bin packing is NP-hard, so from a practical standpoint heuristics are the only way to go.
11:34 samcv NP?
11:34 DrForr Non-Polynomial.
11:34 samcv ah
11:34 samcv ok so just try and not find optimum and find close to optimum :)
11:34 DrForr Another way of saying the number of steps *rapidly* tends to infinity as the number of bins goes up.
11:34 arnsholt (Non-deterministic polynomial, actually)
11:35 samcv yeah
11:35 arnsholt But in practical terms, non-polynomial, yes =)
11:35 DrForr I sit corrected.
11:35 Ulti samcv: is this meant to be an on the fly thing or you want to do it once to find a good representation for an encoding?
11:35 timotimo only once
11:35 samcv yeah it's done only once
11:35 timotimo well, whenever the unicode db source data changes
11:35 Ulti ahh thats a lot easier so you have all the data
11:35 samcv yep
11:35 Ulti if its all internal though you dont really need to keep the representation consistent between the db changes?
11:36 DrForr This also sounds close to packing a C bit struct :)
11:36 timotimo correct, Ulti
11:37 samcv well it should generate the same thing every time
11:37 samcv but it doesn't have to be consistent between the numbers changing
11:37 samcv that it packs in
11:37 Ulti any reason you dont just enumerate all the things :S
11:37 Ulti surely thats easiest
11:37 samcv just try all combinations?
11:37 samcv is that what you mean? tried it. like
11:37 samcv over 9k years
11:37 Ulti yeah systematically enumerate whatever the space is
11:37 samcv was fine when it did like 8 different ones
11:38 samcv but then past like 15....
11:38 samcv waited 20 minutes then killed the program
11:38 samcv there's gonna be like 30+
11:38 samcv could be 50
11:38 Ulti im assuming from recent things this is like all combos of combining emojii or something?
11:38 samcv well. like a lot of them are boolean, some are enums
11:39 samcv hold on let me find something to show you
11:41 Ulti also has no one come up with an encoding for this already? thats kind of surprising
11:42 samcv Ulti, https://gist.github.com/samcv/1c2070ff0bb4​7f28358920f2a61d14c3#file-bitfield-h-L183
11:42 samcv an encoding?
11:43 samcv so if you know c, the :2 means that takes up only 2 bits width
11:43 samcv and binary properties take up only 1 bit
11:43 samcv and all the characters which have identical property values have rows in the bitfield deduplicated
11:44 sufrostico joined #perl6
11:45 sena_kun joined #perl6
11:45 samcv though to be honest what takes the most space in my proof of concept is storing the values of each cp -> bitfield row
11:46 samcv like for every codepoint you have to store which bitfield row it is mapped to, for all the unicode codepoints, which is a huge number
11:46 samcv i have it fixed for the name lookup at least, but need to implement the same for the bitfield rows
11:51 bjz_ joined #perl6
11:54 jast example heuristic: pack all 8/16 bit fields. pack the largest unpacked field that will still fit in the currently open bin; leave bin incomplete if not possible. repeat until all fields are packed. the basic idea of this heuristic is the idea that large fields will not become easier to pack later, when there's less choice of what to pack them together with. it's easy to come up with examples for which it will perform poorly, but it should be okay if you have enough
11:54 ufobat joined #perl6
11:55 timotimo add a phase of wiggling stuff about randomly at the end in the hopes of finding something better :P
11:55 timotimo "okay, add an hour of random experimentation here, see if we find anything better"
11:57 samcv lol
11:57 jast that's actually not that easy, you have to generate mutations that fulfill the constraints
11:58 timotimo nah, just check the constraints after generating each mutation
11:59 jast virtually all of them will have to be eliminated, though
11:59 jast alternatively you could backtrack but chances are that the bad packings don't happen near the end of that process
11:59 timotimo *shrug* ;)
12:01 jast well I guess you could turn it into a search problem, change the heuristic into a score function and try the "best" packing first
12:01 jast then apply dynamic pruning rules and other fancy things like that
12:02 jast and down the rabbit hole we go
12:04 DrForr Heuristics FTW.
12:05 jast tree search is about optimizing brute force using heuristics and formal reasoning, it's pretty neat but easy to get wrong
12:05 rurban joined #perl6
12:05 rurban left #perl6
12:06 astj joined #perl6
12:09 samcv i gotta go to bed now guys
12:09 samcv thanks for all your help :)
12:12 SmokeMachine I've read constraints and heuristic and would propose to use https://modules.perl6.org/#q=ProblemSolver but that's nothing related... :(
12:14 parv joined #perl6
12:16 SmokeMachine S/propose/suggest/
12:20 masak TimToady: would you also be fine with BEGIN-in-quasi firing only at expand time, even if it could fire sooner? that is, which consistency do we aim for in that case?
12:25 xtreak joined #perl6
12:27 rba_ joined #perl6
12:33 astj joined #perl6
12:34 gregf__ joined #perl6
12:36 lukaramu joined #perl6
12:38 bjz joined #perl6
12:44 agentzh joined #perl6
12:51 rba_ joined #perl6
13:15 * lizmat clickbaits https://p6weekly.wordpress.com/2017/0​1/30/2017-05-a-week-of-blue-mondays/
13:18 cdg joined #perl6
13:19 * brokenchicken clicks
13:20 brokenchicken m: "\c[Grinning cat Face]".say
13:20 camelia rakudo-moar f22170: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [Grinning cat Face]␤at <tmp>:1␤------> 3"\c[Grinning cat Face7⏏5]".say␤»
13:20 cdg joined #perl6
13:21 brokenchicken star: class Foo::Bar {}; my Foo::Bar $a .= new; dd $a
13:21 camelia star-m 2016.10: OUTPUT«Foo::Bar $a = Foo::Bar.new␤»
13:21 brokenchicken star: class Foo::Bar {}; class { my Foo::Bar $.a .= new }.new
13:21 camelia star-m 2016.10: ( no output )
13:21 brokenchicken star: class Foo::Bar {}; class { my Foo::Bar $.a .= new }.new.qa
13:21 camelia star-m 2016.10: OUTPUT«No such method 'qa' for invocant of type '<anon|62232192>'␤  in block <unit> at <tmp> line 1␤␤»
13:21 brokenchicken star: class Foo::Bar {}; class { my Foo::Bar $.a .= new }.new.a
13:21 camelia star-m 2016.10: ( no output )
13:23 brokenchicken star: class Foo::Bar {}; class { has Foo::Bar $.a .= new }.new.a
13:23 camelia star-m 2016.10: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo::Bar␤»
13:23 brokenchicken ah
13:34 wamba joined #perl6
13:35 mr-foobar joined #perl6
13:48 geekosaur joined #perl6
13:49 astj joined #perl6
13:51 khw joined #perl6
13:52 d^_^b joined #perl6
13:52 d^_^b joined #perl6
14:00 KDr2 joined #perl6
14:16 skids joined #perl6
14:17 SmokeMachine I remember that!
14:17 brokenchicken Well, it *was* just last week :P
14:18 stmuk_ anyone know if the ORA Perl 6 for CS book is available in any sort of ebook draft form?
14:20 perlpilot http://shop.oreilly.com/product/0636920065883.do talks about "Early Release Ebook"
14:20 perlpilot unless you also mean "free"
14:21 stmuk_ yes I noticed that! maybe needs a safari (if it's caled that now) signup
14:25 mienaikage joined #perl6
14:25 * moritz read the first 120~ pages of an early version as a technical review
14:25 moritz like, before O'Reilly was involved
14:27 lizmat stmuk_: I understand that the first 7 chapters will become available as an early version ebook within days
14:28 lizmat fwiw, I've proofread the entire book
14:30 brokenchicken Is it good?
14:30 * lizmat is slighlt biased
14:31 brokenchicken And is it for total programming beginners or all levels?
14:31 moritz it's a very introductory book
14:31 brokenchicken Hmm.
14:31 stmuk_ its a port of a similarly named python book I think?
14:31 moritz it's about leraning to program, and Perl 6 takes a second place after that
14:31 moritz stmuk_: yes
14:32 stmuk_ actually it does look a bit Noddy
14:32 lizmat chapter names are:
14:32 lizmat 1. The way of the program
14:32 perlpilot btw, I'm encouraged by all of the Perl 6 books out there.   It gives me hope that many people will use Perl 6.
14:32 DrForr This explains a conversation I had a few weeks ago.
14:32 lizmat 2.
14:32 lizmat Variables, expressions and statements
14:33 lizmat 3. Functions and subroutines
14:33 lizmat 4. Conditionals and recursion
14:33 stmuk_ python one is http://interactivepython.org/cour​selib/static/thinkcspy/index.html
14:34 lizmat 5. Fruitful subroutines
14:34 lizmat 6. Iteration
14:34 perlpilot "fruitful subroutines"?  That's an interesting title.
14:34 lizmat 7. Strings
14:34 perlpilot seems a bit out of place with the other, more boring titles
14:35 moritz vegetableful subroutines would be a bit weird
14:35 lizmat m: sub a { say "Hello World" }   # not fruitful
14:35 camelia rakudo-moar f94cb2: ( no output )
14:35 brokenchicken perlpilot: yeah, especially written by people who aren't regulars in this channel :)
14:35 lizmat m: sub a { "Hello World" }   # fruitful
14:35 camelia rakudo-moar f94cb2: ( no output )
14:36 brokenchicken I also notice this channel's average usercount has grown by ~15 people since December
14:36 lizmat regulars here would be people who know how to program  :-)
14:36 moritz functions that return a value, rather than having a side effect, I guess
14:37 stmuk_ http://www.openbookproject.net/th​inkcs/python/english2e/ch05.html
14:37 stmuk_ yes
14:41 mienaikage left #perl6
14:41 cale2 joined #perl6
14:41 stmuk_ there are a bunch of "learn $foo the hard way" books as well
14:42 user9 joined #perl6
14:45 gregf_ joined #perl6
14:46 SmokeMachine lizmat: I'm not sure... I'm connected here all the time...
14:47 lizmat :-)
14:51 Dandel_ joined #perl6
14:53 Dandel_ skids, you around?
14:54 mienaikage joined #perl6
14:54 skids o/
14:55 brokenchicken \o
14:55 Dandel_ I was wanting to ask ya a few things about an old project that you where working on a few years back.
14:55 cale2 Think Perl 6 book says it delves into declarative programming and grammars even
14:55 yoleaux 10:21Z <timotimo> cale2: have a look at the wig module :)
14:57 cale2 wig module? huh?
14:57 brokenchicken buggable: eco wig
14:57 buggable brokenchicken, wig 'where is grep: Make grep prettier, put a wig on it!': https://github.com/0racle/p6-wig
14:59 lizmat cale2: chap 14: regexes and grammars
15:00 lizmat cale2: chap 15: functional programming
15:01 skids Dandel_: which one?
15:01 Dandel_ GGI.
15:01 skids Ahah.  Yeah that was some time ago :-)
15:02 Dandel_ all I'm doing is trying to get in contact with the contributors so i can map things into git.
15:02 skids Sure, what do you need?
15:03 Dandel_ Just the current contact information you want to use for git.
15:03 brokenchicken What's the name of <>? As in $blah<>? Also, is its purpose just to decontarize or is that a sideeffect?
15:03 zakharyas joined #perl6
15:03 skids skids is my git uid as well.
15:03 Dandel_ I figured.
15:04 skids Or ... oh you mean email?
15:04 Dandel_ ya
15:05 Dandel_ I was wanting to get current email addresses... I plan on updating the tree once I get the map to also mention which old devs do not wish to be contacted again :)
15:08 DrForr On boston-pm there's a posting about http://rakudo.org/2017/01/30/anno​unce-rakudo-star-release-2017-01/ being blocked by WBRS with 'Reason: BLOCK-MALWARE', 'Threat Type: othermalware'
15:09 brokenchicken :(
15:10 pyrimidine joined #perl6
15:10 brokenchicken Um. WBRS being what?
15:10 DrForr WBRS seems to be Cisco firewall filtering, not sure what else. Where should I forward the message?
15:10 brokenchicken WBRS 100.1 FM in google has "this site may be hacked" message under it
15:11 DrForr "Web Reputation Filters" appears in the message, there's really nothing else useful that I see in the message.
15:11 DrForr It's not appropriate for rakudo-bugs, where should it get sent?
15:12 mspo wordpress can get quietly hacked
15:12 brokenchicken DrForr: well, does it even need to be sent?
15:12 DrForr (I suspect there's no real solution because it's bayesian.)
15:12 brokenchicken DrForr: wtf is WBRS?
15:13 mspo http://rakudo.org/how-to-get-rakudo/  doesn't have checksums and doesn't use https
15:14 DrForr brokenchicken: The message doesn't mention what the filtering system is. I believe it's Cisco blocking, but I don't know.
15:14 brokenchicken Yeah, it's pretty frustrating to have such a simple problem unsolved for months.
15:14 brokenchicken DrForr: but what's WBRS?
15:14 mspo http://www.cisco.com/c/en/us/suppo​rt/docs/security/web-security-appl​iance/118028-technote-wsa-00.html
15:15 rurban joined #perl6
15:15 DrForr brokenchicken: You can repeat your question as often as you like. The message does *not* state what it is, all I can do is guess that it's a Cisco filter.
15:15 mspo could be more related to the hosting IP and not specifically rakudo.org
15:15 DrForr All I'm asking is "Is there a security@ or admin@ email address that I should forward this to?"
15:17 mspo DrForr: is http://www.pmichaud.com/ also blocked?
15:17 wamba joined #perl6
15:17 mspo or http://www.pmwiki.org/ (wikis are also often quietly hacked)
15:18 DrForr mspo: brokenchicken: I did not make this discovery, I have no more information than what I passed along. This is a report to boston.pm that I'm mentioning, I have no more information than that.
15:18 brokenchicken DrForr: but what's WBRS?
15:18 brokenchicken :)
15:19 mspo DrForr: I would send it to pmichaud guy
15:19 brokenchicken DrForr: sorry, I thought WBRS was some organization at first :)
15:19 mspo and also consider ssl and checksums on rakudo :)
15:19 brokenchicken DrForr: and mention that we need Wordpress upgrade and HTTPs
15:19 brokenchicken He's a bunch of bot messages.
15:19 mspo or maybe some kind of perl6-based blog
15:19 DrForr I know Patrick, I don't have his email to hand. What is it?
15:20 brokenchicken Rakudo releases are signed, though I see not R*..
15:23 wamba joined #perl6
15:25 DrForr (privately if you like) It's not a download of a specific file, but it could very well simply be blocking the site because of a download link that's not over https, yes.
15:25 brokenchicken [rakudo@power ~]$ grep wp-login access-logs/rakudoperl.org | wc -l
15:25 cyphase joined #perl6
15:25 brokenchicken 384
15:25 brokenchicken [rakudo@power ~]$ grep downloads access-logs/rakudoperl.org | wc -l
15:25 brokenchicken 214
15:26 brokenchicken Wonder if our WP install is up to date... I know php is waaaay out of date :(
15:27 moritz it's not
15:27 brokenchicken yeah :(
15:28 brokenchicken And more bots try the wp-login page than people downloading releases
15:28 DrForr I've dealt with that on tau-station before, WP seems to be fairly stable but I'd still make sure to do a full backup of DB and web directory, because it may not come back. And breaking templates is *always* a concern.
15:28 brokenchicken wow "Akismet has protected your site from 872,376 spam comments already." :)
15:30 dugword joined #perl6
15:33 DrForr Also, I don't see pmichaud's email address in the IRC logs, anyone willing to send it my way privately?
15:36 brokenchicken There's one listed on github profile: https://github.com/pmichaud
15:40 AlexDaniel joined #perl6
15:42 DrForr sorry if I was a little churlish. News from home is not fun.
15:42 AlexDaniel heh… somebody just wrote “poophole optimizer”
15:42 yoleaux 10:14Z <samcv> AlexDaniel: East_Asian_Width property has just been merged into MVM
15:44 mspo I use http simple auth on wp-login to stop a *ton* of bot traffic
15:44 mspo but it didn't stop a sql injection (or something, i'm not sure really) from hitting one of my sites *badly* over this weekend
15:45 cale2 I like this: https://github.com/0racle/p6-wig
15:46 cale2 It feels like it belongs in the language with the "where" guards on parameters and subsets as well
15:47 cale2 "where" in subsets and params is basically the same thing as grep anyway. `.where` shouldn't even be a method. It should just be re-used as a keyword for most types
15:47 brokenchicken 0.o
15:49 AlexDaniel samcv: great! Amazing! Now I have to find why I needed that…
15:50 [Coke] u { / ROMAN NUMERAL /}
15:51 AlexDaniel u: { / ROMAN NUMERAL / }
15:51 AlexDaniel hm, maybe not that
15:51 AlexDaniel u: { .uniname ~~ / ROMAN NUMERAL / }
15:51 unicodable6 AlexDaniel, https://gist.github.com/047d​fa7d80ea019d36fd35e4a870ef23
15:51 unicodable6 AlexDaniel, Oops, something went wrong!
15:51 AlexDaniel hey why so slow
15:52 [Coke] u: { .uniname ~~ / 'ROMAN NUMERAL' /}
15:52 unicodable6 [Coke], U+2160 ROMAN NUMERAL ONE [Nl] (Ⅰ)
15:52 unicodable6 [Coke], U+2161 ROMAN NUMERAL TWO [Nl] (Ⅱ)
15:52 unicodable6 [Coke], https://gist.github.com/5476​fccd59fe9f5214c61662c7801d28
15:52 brokenchicken prints a billion of warnings, I'm guessing.
15:52 brokenchicken Oh, just one.
15:53 AlexDaniel hm, but still it timed out for some reason
15:54 AlexDaniel ah, right
15:54 AlexDaniel u: ROMAN NUMERAL
15:54 unicodable6 AlexDaniel, U+2160 ROMAN NUMERAL ONE [Nl] (Ⅰ)
15:54 unicodable6 AlexDaniel, U+2161 ROMAN NUMERAL TWO [Nl] (Ⅱ)
15:54 unicodable6 AlexDaniel, https://gist.github.com/df0d​b785c43d5745c159ee8e7b4891fb
15:54 AlexDaniel no need for a code block
15:55 AlexDaniel the one without a code block is optimized to do the whole thing in about two seconds
15:55 AlexDaniel the other one may be pretty slow, depends on what you write
15:56 Geth doc: df9d1155b8 | (Zoffix Znet)++ | doc/Language/operators.pod6
15:56 Geth doc: Formatting fix: Markdown -> POD
15:56 Geth doc: review: https://github.com/perl6/doc/commit/df9d1155b8
15:58 matt__ joined #perl6
16:00 geekosaur joined #perl6
16:01 perigrin w/ 48
16:01 brokenchicken m: say quietly ($ = 42) ~~ S/4/2/; say $/; say $_
16:01 camelia rakudo-moar f94cb2: OUTPUT«Potential difficulties:␤    Smartmatch with S/// is not useful. You can use given instead: S/// given $foo␤    at <tmp>:1␤    ------> 3say quietly ($ = 42) ~~ 7⏏5S/4/2/; say $/; say $_␤False␤22␤(Any)␤»
16:01 brokenchicken You can't even quiet this warning? Laaame
16:03 perlpilot It's compile-time.  quietly only works at run-time.
16:03 AlexDaniel I'm not even sure why does it have to run at all
16:04 wamba joined #perl6
16:04 AlexDaniel I mean, what's the point of proceeding when there's that?
16:05 brokenchicken AlexDaniel: are you talking about my warning?
16:05 AlexDaniel yea
16:05 brokenchicken AlexDaniel: then I don't follow. The warning is a lie.
16:05 brokenchicken You can get the result from $/
16:06 AlexDaniel but why not use given instead?
16:07 * brokenchicken doesn't understand the question
16:07 * perlpilot doesn't understand either
16:08 AlexDaniel m: say S/4/2/ given ($ = 42); say $/; say $_
16:08 camelia rakudo-moar f94cb2: OUTPUT«22␤22␤(Any)␤»
16:08 AlexDaniel and look, you're not getting a useless False
16:09 AlexDaniel the error message says that smartmatching with S/// is not useful. What's useful about getting False here?
16:09 Geth doc: 08cfdd8e8a | (Zoffix Znet)++ | doc/Language/operators.pod6
16:09 Geth doc: Minor clarifications for S/// / s///
16:09 Geth doc:
16:09 Geth doc: - Mention the operators set $/
16:09 Geth doc: - Reword the warning explanation: saying there's no way to get the result is a lie, as it can be obtained from $/.
16:09 Geth doc:     I'm not even sure why the warning exists at all. Feels the original design that set result into $/ did not
16:09 Geth doc:     prescribe a warning for S///
16:09 Geth doc: review: https://github.com/perl6/doc/commit/08cfdd8e8a
16:10 brokenchicken AlexDaniel: but it's not useless. And your given reverses the arguments, making it read backwards and you did it just to avoid the warning that lies :)
16:10 AlexDaniel /o\
16:10 AlexDaniel the result of ~~ is useless
16:10 brokenchicken No, it tells you whether any changes were done
16:10 pyrimidine joined #perl6
16:10 brokenchicken But you don't need to use it
16:10 AlexDaniel brokenchicken: so what's False in this case?
16:11 brokenchicken $x ~~ s/a/b/; say $x
16:11 brokenchicken $x ~~ S/a/b/; say $/
16:11 brokenchicken I don't see why you think one version is useless and needs to be rewritten with `given` while the other is fine
16:11 bwisti joined #perl6
16:11 brokenchicken AlexDaniel: return = "is result after changes the same as the original string"
16:13 brokenchicken It basically ends up being Str ~~ Str
16:13 AlexDaniel which is the opposite of what regexes usually do
16:13 AlexDaniel but at least I see your point now
16:13 brokenchicken hehe
16:14 brokenchicken But my jorney to this point started with this:
16:14 AlexDaniel m: given $ = 42 { S/4/2/ }; say $/; say $_
16:14 camelia rakudo-moar f94cb2: OUTPUT«22␤(Any)␤»
16:14 brokenchicken m: say <a1 a2 a3>.map({S/huh//});
16:14 camelia rakudo-moar f94cb2: OUTPUT«(a1 a2 a3)␤»
16:14 brokenchicken m: say eager <a1 a2 a3>.map({S/huh//});
16:14 camelia rakudo-moar f94cb2: OUTPUT«(a3 a3 a3)␤»
16:14 brokenchicken Note, this is NOT a bug :)
16:14 brokenchicken Or
16:15 brokenchicken m: my $fun = <a1 a2 a3>.map({S/huh//}); say $fun[^1]; say $fun[^2]; say $fun[^3];
16:15 camelia rakudo-moar f94cb2: OUTPUT«(a1)␤(a2 a2)␤(a3 a3 a3)␤»
16:15 brokenchicken also not a bug :)
16:15 AlexDaniel why isn't it a bug by the way
16:15 AlexDaniel ah
16:15 AlexDaniel I see…
16:16 brokenchicken And pondering wtf S/// returns $/ anyway. And I came to conclusion original design intended for $/ to be obtained the result from, and no warning :)
16:16 brokenchicken Hm. OTOH it still doesn't need to return it
16:16 ChoHag joined #perl6
16:18 brokenchicken And I was gonna say worth seeing if spectests explode, but now I remember we got like just a couple of tests for S///
16:18 brokenchicken .seen FROGGS
16:18 yoleaux I saw FROGGS 17 Jan 2017 21:11Z in #perl6: <FROGGS> dataf3l: to this: http://hg.dyncall.org/pub/dyncall/dyncall/fi​le/011b5e3a8548/dyncall/dyncall_callf.c#l91
16:19 AlexDaniel c: 2015.07 say ($ = 42) ~~ S/4/2/; say $/; say $_
16:19 committable6 AlexDaniel, ¦«2015.07»: False␤22␤(Any)
16:19 AlexDaniel ok let's see what was the motivation behind it exactly
16:19 AlexDaniel bisect: old=2015.07 say ($ = 42) ~~ S/4/2/; say $/; say $_
16:19 bisectable6 AlexDaniel, Bisecting by output (old=2015.07 new=f94cb21) because on both starting points the exit code is 0
16:19 bisectable6 AlexDaniel, bisect log: https://gist.github.com/3477​b17991231dcdfed428afd0dad75e
16:19 bisectable6 AlexDaniel, (2015-10-13) https://github.com/rakudo/rakudo/commit/​f54ff83371a6510a74adda65d0ff44427990bada
16:20 AlexDaniel ok that commit message isn't super helpful
16:20 brokenchicken hehe
16:20 brokenchicken Well, kinda is. It proves my point the warning wasn't a part of original design :)
16:20 perlpilot yeah, you were being far too optimistic
16:21 AlexDaniel now I remember, the message was a bit different initially
16:21 AlexDaniel and then was changed because of my complaints I think
16:21 AlexDaniel bisect: old=f54ff833 say ($ = 42) ~~ S/4/2/; say $/; say $_
16:21 bisectable6 AlexDaniel, Bisecting by output (old=f54ff83 new=f94cb21) because on both starting points the exit code is 0
16:21 bisectable6 AlexDaniel, bisect log: https://gist.github.com/c5f4​9e9a3da6e94fdab2dd823990b2a7
16:21 bisectable6 AlexDaniel, (2015-12-04) https://github.com/rakudo/rakudo/commit/​587f700e9cd5c12a0e9f98fc183702a3ed6723f3
16:21 brokenchicken bisect: old=2014.01 new=2015.12 S/4/2/.VAR.name.say given "x"
16:21 bisectable6 brokenchicken, Bisecting by exit code (old=2014.01 new=2015.12). Old exit code: 1
16:22 AlexDaniel no… no… it only goes to 2015.07
16:22 brokenchicken oh, oops :)
16:22 AlexDaniel it will give you the best answer it can
16:23 perlpilot Getting rid of that worry will make compilation a tiny bit faster  ;)
16:23 * brokenchicken looks for the ABORT button
16:23 abraxxa great, libgd2 2.2.1 on Ubuntu  doesn't install gdlib-config any more which is required by GD
16:23 AlexDaniel brokenchicken: it's fine, it should make it :)
16:24 ilmari abraxxa: I'd expect that to be in libgd-dev
16:24 abraxxa ilmari: it was
16:24 koki1 joined #perl6
16:24 abraxxa ilmari: search for gdlib-config: http://changelogs.ubuntu.com/changelogs/pool/mai​n/libg/libgd2/libgd2_2.2.1-1ubuntu3.2/changelog
16:24 abraxxa 2.2.1-1: Don't install obsolete gdlib-config
16:25 ilmari abraxxa: oh, when you said libgd2 I thought you meant libgd2, not some vaguely related other package
16:25 AlexDaniel .oO( come on!! )
16:25 bisectable6 brokenchicken, bisect log: https://gist.github.com/7d39​88cf257d6eed6345cb9434dfb296
16:25 bisectable6 brokenchicken, There are 209 candidates for the first “new” revision. See log for more details
16:25 abraxxa what vaguely related other package?
16:25 brokenchicken wooo
16:25 AlexDaniel \o/
16:26 AlexDaniel bisect: old=587f700e9 say ($ = 42) ~~ S/4/2/; say $/; say $_
16:26 bisectable6 AlexDaniel, Bisecting by output (old=587f700 new=f94cb21) because on both starting points the exit code is 0
16:26 bisectable6 AlexDaniel, bisect log: https://gist.github.com/5f1c​53cd786e20055697180458940705
16:26 bisectable6 AlexDaniel, (2016-01-05) https://github.com/rakudo/rakudo/commit/​ac4f9f8fe4bee1c0cad1a98c042b10ac9584db28
16:26 ilmari abraxxa: libgd-dev
16:26 AlexDaniel haha… “Zoffix++, AlexDaniel++”
16:26 brokenchicken AlexDaniel: so I can still run my last query if I change 2015.12 to 2015.07?
16:27 AlexDaniel brokenchicken: you mean 2014.01 to 2015.07?
16:27 brokenchicken mhm
16:27 abraxxa ilmari: moved to #perl-help as I've initially mixed up the channels
16:27 AlexDaniel commit: all S/4/2/.VAR.name.say given "x"
16:27 AlexDaniel what are you looking for exactly
16:28 committable6 AlexDaniel, https://gist.github.com/7280​de5b08abec1b010904a5d603000e
16:28 brokenchicken To see whether when S/// was implemented it was returning $/
16:28 brokenchicken Or more precisely, explanation for why it returns $/ :)
16:29 AlexDaniel brokenchicken: looking at committable output, it was implemented in 2015.06 and that's the initial behavior
16:29 brokenchicken bisect: old=2015.05 new=2015.06 S/4/2/.VAR.name.say given "x"
16:29 bisectable6 brokenchicken, Bisecting by exit code (old=2015.05 new=2015.06). Old exit code: 1
16:29 AlexDaniel that will give you the same 209 candidates, as it has nothing in between
16:29 bisectable6 brokenchicken, bisect log: https://gist.github.com/1eb6​ff11bc6aba4b519d5491b61d3e5e
16:29 bisectable6 brokenchicken, There are 209 candidates for the first “new” revision. See log for more details
16:30 brokenchicken AlexDaniel: ah, so pre-Christmas only release commits have builds?
16:30 AlexDaniel brokenchicken: 2015.07~HEAD and all tags are built
16:30 AlexDaniel so you can use 2014.02 but not 2014.02^ :)
16:31 brokenchicken Well, there's always New and Improved™ GitHub blame :)
16:31 wamba joined #perl6
16:31 AlexDaniel was it changed?
16:32 AlexDaniel “view blame prior to this change”
16:32 AlexDaniel finally
16:32 brokenchicken Yeah, recently. They made it much easier to view previous commits
16:32 perlpilot brokenchicken: S/// returns $/ probably because s/// returns $/.   The real problem is ... why isn't $/ a Match with S/// and why does it contain the entire string intead of just the matching part.
16:33 dugword joined #perl6
16:33 brokenchicken perlpilot: because S/// returns the resultant string.
16:34 perlpilot Sure, but that has nothing to do with $/
16:34 zakharyas joined #perl6
16:34 brokenchicken I see what you're saying.
16:35 perlpilot m: my $foo = "blah"; $foo ~~ s/a/u/;  say $/;
16:35 camelia rakudo-moar f8b346: OUTPUT«「a」␤»
16:35 perlpilot I'd expect the S/// variant to behave identically
16:35 perlpilot (I mean with respect to $/)
16:35 brokenchicken m: my $foo = "blaaaaaah"; $foo ~~ s:g/a/u/;  say $/;
16:35 camelia rakudo-moar f8b346: OUTPUT«(「a」 「a」 「a」 「a」 「a」 「a」)␤»
16:35 brokenchicken Agreed.
16:36 AlexDaniel yea
16:36 brokenchicken And that'll fix the .map({S///}) thing too
16:36 * brokenchicken will fix it after lunch
16:40 brokenchicken And the warning on S/// will make sense :D
16:40 brokenchicken on ~~ S///
16:40 perlpilot brokenchicken++
16:42 brokenchicken perlpilot++
16:46 agentzh joined #perl6
16:49 pyrimidine joined #perl6
16:58 Sound joined #perl6
17:01 zakharyas joined #perl6
17:02 noro joined #perl6
17:03 TimToady masak: I thought that was the consensus I was already agreeing to
17:10 girafe joined #perl6
17:13 wizard_ joined #perl6
17:19 perlpilot brokenchicken: Here's a rough hack at fixing S///  https://gist.github.com/perlpilot​/bb541544ae518421bfd4cb64a6eb1b27
17:20 perlpilot brokenchicken: I'd commit it, but I don't have the time to really test it out.
17:20 matt___ joined #perl6
17:20 brokenchicken awww, you took all the fun out of it :) I was *just* booting up my VM :)
17:20 ggoebel joined #perl6
17:21 brokenchicken Never heard of QAST::Node tho, so heh :)
17:22 brokenchicken What's it do? The my $Sname := QAST::Node.unique("__Sname"); part?
17:22 perlpilot makes a unique identifier.
17:22 perlpilot each call you'll get something like  __Sname_1  __Sname_2 __Sname_3 etc.
17:23 perlpilot anyway, like I said, it's a rough hack.  You'll do better I'm sure.
17:23 perlpilot :)
17:33 brokenchicken Now you put me under pressure to do better! :)
17:36 Geth doc: 0abaf2508f | (Christopher Bottoms)++ | doc/Language/5to6-perlfunc.pod6
17:36 Geth doc: Mention "chomp in-place"
17:36 Geth doc:
17:36 Geth doc: Also touched up definition to ensure it is clear that the target itself isn't returned.
17:36 Geth doc: review: https://github.com/perl6/doc/commit/0abaf2508f
17:40 perlpilot brokenchicken: I figure you've been touching the code lately and I can't remember the last time I did anything more than update a string  (though git tells me it's been
17:40 perlpilot a while)
17:41 brokenchicken Yeah, but I barely know what I'm doing :P
17:42 perlpilot fair enough  :)
17:45 domidumont joined #perl6
17:46 wamba joined #perl6
17:50 labster joined #perl6
17:59 Geth doc/master: 4 commits pushed by Altai-man++
17:59 Geth doc/master: 039ec62c90 | added line breaks…
17:59 Geth doc/master: 1c170df724 | reformatted some =items…
17:59 Geth doc/master: 98b6e38fb8 | reformatted with fold program…
17:59 Geth doc/master: 06b079bf9b | Merge pull request #1171 from antquinonez/master…
17:59 Geth doc/master: review: https://github.com/perl6/doc/c​ompare/0abaf2508f...06b079bf9b
18:00 sena_kun Hmm, shouldn't it show the original contributor, not the person who did a merging?
18:00 brokenchicken What do WANTED/wanted subs do in Perl6/Actions?
18:01 TimToady tell things they're not in sink context
18:02 brokenchicken Thanks.
18:02 TimToady it's basically an interleaved top-down 2nd pass
18:03 TimToady interleaved with the 1st bottom-up pass, that is
18:03 TimToady (to the extent that the 1st pass is bottom-up, which it is from the standpoint of Actions, if not always from the parser's point of view)
18:08 brokenchicken sena_kun: it reports the pusher, which is accurate. On 1-2 commit merges, it'd report individual authors.
18:09 sena_kun brokenchicken, oh, okay.
18:09 brokenchicken sena_kun: this is the whole webhook: https://gist.github.com/zoffixznet​/4e9304cce30db1421f4b15c38b821219 The pusher is given as a separate hash, and I'm unsure how reliable it'd be to pick through individual comits to find authors
18:10 brokenchicken sena_kun: hmm... it could @all-authors.unique in the message maybe? Abridging them if they're too long
18:11 brokenchicken This is the line in code https://github.com/perl6/geth/blob/m​aster/lib/Geth/Plugin/GitHub.pm6#L92 and that object is populated here: https://github.com/perl6/geth/blob/mas​ter/lib/Geth/GitHub/Hooks.pm6#L96-L114
18:12 brokenchicken Eh, looks simple enough :) I'll do it
18:12 sena_kun brokenchicken, it is rare(afaik) to have a crowd of people in one PR. I just thought that the actual contributor did more than pusher in this case.
18:12 brokenchicken Agreed :)
18:12 sena_kun brokenchicken, ah, I wanted to try it.
18:13 sena_kun After your proper explanation.
18:15 Geth joined #perl6
18:16 eroux_ joined #perl6
18:17 Geth joined #perl6
18:17 brokenchicken .oO( need to add tests to it... )
18:17 Geth doc/master: 4 commits pushed by (Antonio Quinonez)++, (Antonio Quinonez)++, (Antonio Quinonez)++, Altai-man++
18:17 Geth doc/master: 039ec62c90 | added line breaks…
18:17 Geth doc/master: 1c170df724 | reformatted some =items…
18:17 Geth doc/master: 98b6e38fb8 | reformatted with fold program…
18:17 Geth doc/master: 06b079bf9b | Merge pull request #1171 from antquinonez/master…
18:17 Geth doc/master: review: https://github.com/perl6/doc/c​ompare/0abaf2508f...06b079bf9b
18:17 brokenchicken oops, forgot unique :P
18:18 Geth joined #perl6
18:20 Geth joined #perl6
18:20 Geth doc/master: 4 commits pushed by (Antonio Quinonez)++, Altai-man++
18:20 Geth doc/master: 039ec62c90 | added line breaks…
18:20 Geth doc/master: 1c170df724 | reformatted some =items…
18:20 Geth doc/master: 98b6e38fb8 | reformatted with fold program…
18:20 Geth doc/master: 06b079bf9b | Merge pull request #1171 from antquinonez/master…
18:20 Geth doc/master: review: https://github.com/perl6/doc/c​ompare/0abaf2508f...06b079bf9b
18:20 brokenchicken yey
18:20 sena_kun It was quick! brokenchicken++
18:21 pyrimidine joined #perl6
18:21 agentzh joined #perl6
18:21 eroux_ joined #perl6
18:26 brokenchicken My OCD senses are disturbed by that extra space before Geth's stuff :}
18:26 _eroux_ joined #perl6
18:26 brokenchicken AlexDaniel: how about sticking some fancy pants Unicode char there instead? :)
18:26 AlexDaniel u: zero width space
18:26 unicodable6 AlexDaniel, U+200B ZERO WIDTH SPACE [Cf] (​)
18:26 unicodable6 AlexDaniel, U+FEFF ZERO WIDTH NO-BREAK SPACE [Cf] ()
18:26 brokenchicken heh
18:27 brokenchicken u: box
18:27 unicodable6 brokenchicken, U+2327 X IN A RECTANGLE BOX [So] (⌧)
18:27 unicodable6 brokenchicken, U+237D SHOULDERED OPEN BOX [So] (⍽)
18:27 unicodable6 brokenchicken, https://gist.github.com/aa02​1254726f35a59eb1d9520b7b328d
18:27 AlexDaniel u: bullet
18:27 unicodable6 AlexDaniel, U+2022 BULLET [Po] (•)
18:27 unicodable6 AlexDaniel, U+2023 TRIANGULAR BULLET [Po] (‣)
18:27 unicodable6 AlexDaniel, https://gist.github.com/63fd​72e1328055bd1b5d4fd05811ba8c
18:29 brokenchicken ▶ geth: f3eec4957b | (Zoffix Znet)++ | 2 files
18:29 brokenchicken ▶ geth: Report all authors when we don't print full commits
18:29 brokenchicken ▶ geth: review: https://github.com/perl6/geth/commit/f3eec4957b
18:29 AlexDaniel maybe ¦ ?
18:29 brokenchicken u: ¦
18:29 unicodable6 brokenchicken, U+00A6 BROKEN BAR [So] (¦)
18:30 AlexDaniel that's even latin-1
18:30 AlexDaniel so should render like everywhere
18:31 brokenchicken OK
18:32 telex joined #perl6
18:33 cdg joined #perl6
18:33 Geth joined #perl6
18:39 FROGGS joined #perl6
18:40 pyrimidine joined #perl6
18:42 brokenchicken What does QAST::Op.new( :op('p6scalarfromdesc'), QAST::Op.new( :op('null') ) ) do? That op is mentioned without any description in rakudo/docs
18:43 brokenchicken Makes a scalar from descriptor? What's a descriptor?
18:43 labster joined #perl6
18:43 El_Che brokenchicken: on a perl5 channel? you're in a good mood :)
18:44 brokenchicken brokenchicken: hm?
18:44 brokenchicken What?
18:44 El_Che brokenchicken: didn't you post a "screw you guys, I'm going home" some time ago?
18:45 El_Che (it good to see you there, it's not a critique)
18:45 brokenchicken El_Che: where?
18:45 El_Che #perl
18:45 brokenchicken I'm not there
18:45 El_Che ah ok, someone with a similar nick
18:45 El_Che not making sense, then
18:45 El_Che :)
18:46 * El_Che ignores El_Che
18:46 brokenchicken ... and I thought *I* was sleep deprived :P
18:46 El_Che sadly, that part is true
18:52 avuserow joined #perl6
19:01 andrzejku joined #perl6
19:01 cdg_ joined #perl6
19:07 agentzh joined #perl6
19:09 brokenchicken Who's Github's ronaldxs on IRC? It's m-nom or something like that
19:10 brokenchicken don't seem to b ehere
19:19 zakharyas joined #perl6
19:19 domidumont joined #perl6
19:22 rurban1 joined #perl6
19:29 cibs joined #perl6
19:29 mr_ron joined #perl6
19:30 mr_ron ronaldxs - mr_ron
19:30 yoleaux 24 Jan 2017 20:47Z <brokenchicken> mr_ron: now that I remember more specific test files, a lot of them depend on the test file located in t/spec. This is used for auxiliary files locations for some test files, like module loading ones, and the ones that include t/spec/packages
19:31 brokenchicken Ah, right :)
19:31 brokenchicken But I no longer have a question. Was just wondering what @already_fudged was about, but read the code :)
19:31 pyrimidine joined #perl6
19:34 rurban joined #perl6
19:36 brokenchicken mr_ron: FWIW we also have #perl6-dev
19:41 TEttinger joined #perl6
19:43 brokenchicken What's QAST::Op.new( :op('locallifetime'), ? Don't see it in docs
19:45 rurban left #perl6
19:46 brokenchicken *crickets* :)
19:47 brokenchicken Maybe I should try learning this stuff from the other end...
19:48 brokenchicken MoarVM -> nqp -> Perl 6
19:50 pyrimidine joined #perl6
19:50 brokenchicken wonder if you can write programs with just MoarVM, no other stuff
19:51 perigrin if I understood right MoarVM was a very very thin layer beneath npq
19:52 perlpilot You can make fire with two sticks, but why when there's other incendiary devices to help you?   :)
19:54 brokenchicken perlpilot: to discover how fire is made :)
19:54 agentzh joined #perl6
19:55 jdv79 i have this in a role:  "has Hash $!state; method !state { return-rw $!state }"
19:55 jdv79 is there anthing wrong with that?
19:56 brokenchicken jdv79: well, why do you think somethiong's wrong with it?
19:56 jdv79 eventually i get this error from a consuming class:  P6opaque: no such attribute '$!state' in type Agent::AtomAgent when trying to get a value
19:56 jdv79 because that
19:56 brokenchicken jdv79: is it the same for method !state is rw { $!state } ?
19:56 jdv79 having trouble golfing it
19:56 jdv79 takes a while to manifest.  i'll try that
19:56 cdg joined #perl6
19:56 brokenchicken 0.o wow
19:59 jdv79 nah.  same error.
19:59 * brokenchicken has no idea
20:00 brokenchicken jdv79: "takes a while to manifest". So it works fine some of the time? Concurrent code?
20:00 jdv79 its concurrent, yes.
20:01 jdv79 well, the role is composed into half a dozen classes and its not always the same ones that bork
20:02 jdv79 forgot to try with max threads set to 1 y'day
20:02 cdg_ joined #perl6
20:03 brokenchicken Does that even work? It'll prolly just deadlock.
20:04 astj joined #perl6
20:04 jdv79 its chugging along just fine.
20:04 brokenchicken weird, I had deadlocks in roast when max threads was too low
20:04 jdv79 oh, a failed json parse segfaulted.  well, that's at least probably not related
20:05 brokenchicken m: role Foo { has Hash $!state; method !state { return-rw $!state } }; for ^100000 .hyper: :batch { $ = class :: does Foo { method x { self!state } }.new.x }; say "nada"
20:05 jdv79 I'm running something like two dozen start blocks at once
20:05 camelia rakudo-moar 015231: OUTPUT«(signal XCPU)»
20:05 jdv79 weird
20:05 brokenchicken maybe to do with await
20:06 brokenchicken m: role Foo { has Hash $!state; method !state { return-rw $!state } }; for ^10000 .hyper: :batch { $ = class :: does Foo { method x { self!state } }.new.x }; say "nada"
20:06 camelia rakudo-moar 015231: OUTPUT«(timeout)»
20:08 brokenchicken m: for ^20 { await start await start sleep 2 }
20:08 camelia rakudo-moar 015231: OUTPUT«(timeout)»
20:08 jdv79 nope, even with 1 thread it can error
20:08 jdv79 cmon:(
20:08 brokenchicken m: use v6.d.PREVIEW; for ^20 { await start await start sleep 2 }
20:08 brokenchicken hm.. weird. I thought that'd work
20:08 camelia rakudo-moar 015231: OUTPUT«(timeout)»
20:08 * jdv79 needs food
20:09 jdv79 lunch &
20:09 brokenchicken m: use v6.d.PREVIEW; for ^5 { await start await start sleep 2 }
20:09 camelia rakudo-moar 015231: ( no output )
20:09 brokenchicken m: use v6.d.PREVIEW; for ^5 { await start await start sleep 2 }; say now - INIT now;
20:10 camelia rakudo-moar 015231: OUTPUT«10.01377108␤»
20:10 brokenchicken Oh, I'm dump
20:10 brokenchicken m: await do for ^20 { start await start sleep 2 }; say now - INIT now
20:10 camelia rakudo-moar 015231: OUTPUT«8.008532624␤»
20:11 brokenchicken wonder how it ends up with 8s
20:11 brokenchicken m: await do for ^20 { start await start sleep 1 }; say now - INIT now
20:11 camelia rakudo-moar 015231: OUTPUT«3.007262␤»
20:11 brokenchicken m: await do for ^20 { start await start sleep 3 }; say now - INIT now
20:11 camelia rakudo-moar 015231: OUTPUT«9.00744710␤»
20:11 brokenchicken m: use v6.d.PREVIEW; await do for ^20 { start await start sleep 3 }; say now - INIT now
20:11 camelia rakudo-moar 015231: OUTPUT«6.009234␤»
20:15 pyrimidine joined #perl6
20:16 brokenchicken m: use v6.d.PREVIEW; await do for ^100 { start await start sleep .01 }; say now - INIT now
20:16 camelia rakudo-moar 015231: OUTPUT«0.1125727␤»
20:16 brokenchicken aha!
20:16 brokenchicken m: await do for ^100 { start await start sleep .01 }; say now - INIT now
20:16 brokenchicken there's the goodness of 6.d :P
20:16 camelia rakudo-moar 015231: OUTPUT«(timeout)»
20:21 Tonik joined #perl6
20:24 RabidGravy what's the scope visibility of " use v6.d.PREVIEW;" ? CompUnit or global?
20:25 brokenchicken compunit
20:25 brokenchicken you can have one file run 6.c and another 6.d.PREVIEW
20:26 brokenchicken m: use lib </tmp/foo>; use c; use d;
20:26 camelia rakudo-moar 015231: OUTPUT«SETTING::src/core/asyncops.​pm␤SETTING::src/core.d/await.pm␤»
20:26 brokenchicken :)
20:26 RabidGravy so if I have a module with 6.d.PREVIEW it doesn't matter what the code that uses ir does?
20:26 brokenchicken Right
20:27 RabidGravy cool that will make testing easier :)
20:27 brokenchicken Not sure how far we can get away with it. E.g. your module returns a 6.c core `Str` object that's then operated by 6.d stuff that expects 6.d Strs with (potentially) different methods and stuff
20:28 Geth ¦ doc/coke/bughunt: 107764ae79 | (Will "Coke" Coleda)++ | README.md
20:28 Geth ¦ doc/coke/bughunt: Update our symptoms
20:28 Geth ¦ doc/coke/bughunt: review: https://github.com/perl6/doc/commit/107764ae79
20:29 brokenchicken m: '/tmp/foo/d.pm6'.IO.spurt: 「use v6.d.PREVIEW; sub EXPORT { { '&await' => &await } }」
20:29 camelia rakudo-moar 015231: ( no output )
20:29 brokenchicken m: use lib </tmp/foo>; use d; await start say "hi"
20:29 camelia rakudo-moar 015231: OUTPUT«hi␤»
20:30 brokenchicken m: use lib </tmp/foo>; use d; say &await.file
20:30 camelia rakudo-moar 015231: OUTPUT«SETTING::src/core.d/await.pm␤»
20:30 brokenchicken hehe
20:30 brokenchicken a 6.d `await` in 6.c land....
20:31 lukaramu joined #perl6
20:31 cibs joined #perl6
20:32 brokenchicken ooh
20:32 brokenchicken m: use lib </tmp/foo>; use d; say (start say "hi").^does("Awaitable")
20:32 camelia rakudo-moar 015231: OUTPUT«hi␤False␤»
20:33 nowan_ joined #perl6
20:35 brokenchicken m: '/tmp/foo/d.pm6'.IO.spurt: 「use v6.d.PREVIEW; sub EXPORT { { '&new-await' => &await.cando(\(class :: does Awaitable {method get-await-handle {}}.new))[0] } }」
20:35 camelia rakudo-moar 015231: ( no output )
20:36 brokenchicken m: use lib </tmp/foo>; use d; new-await start say "hi"
20:36 camelia rakudo-moar 015231: OUTPUT«===SORRY!===␤When invoking 2 '', provided outer frame 0x2a117e8 (4 'EXPORT') does not match expected static frame 0x2a118f0 (3 '')␤»
20:36 brokenchicken Hehe. NOW it's starting to crack :P
20:40 brokenchicken Hm. That's weird really. 'Cause in that previous version, with &await' => &await... It's exporting the proto too, eh?
20:40 brokenchicken And since it didn't crap out, I'm guessing the await start called a 6.c candidate
20:40 brokenchicken This is all mind-bending a bit :P
20:43 brokenchicken And what else I realize. This use v6.*-per-file limitation needs a better eval bot...
20:43 brokenchicken whoa.. it's quittin' time :o
20:48 nowan joined #perl6
20:56 cdg joined #perl6
20:57 andrzejku joined #perl6
21:08 pmurias joined #perl6
21:08 cdg_ joined #perl6
21:11 labster joined #perl6
21:13 cdg joined #perl6
21:31 Geth ¦ doc: aae50f7b9c | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod6
21:31 Geth ¦ doc: link to identifier
21:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/aae50f7b9c
21:31 Geth ¦ doc: 8553738991 | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6
21:31 Geth ¦ doc: doc interpolation of colon pairs in identifiers
21:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8553738991
21:32 samcv morning all o/
21:33 RabidGravy Ooh the non-blocking await really breaks HTTP::Server::Tiny
21:34 mst non blocking await?
21:35 El_Che mst: https://github.com/rakudo/rakudo/pull/1004
21:36 mst aha!
21:37 RabidGravy It winds up with a rather scary "Attempt to unlock mutex by thread not holding it"
21:39 Geth ¦ doc: 938c8ea728 | (Wenzel P. P. Peppmeyer)++ | 2 files
21:39 Geth ¦ doc: link to identifier
21:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/938c8ea728
21:39 Geth ¦ doc: 041c1591e1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod6
21:39 Geth ¦ doc: fix typo
21:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/041c1591e1
21:39 Geth ¦ doc: 1be171ca36 | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod6
21:39 Geth ¦ doc: more linking to identifier
21:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1be171ca36
21:42 labster joined #perl6
21:46 cale2 how do I search for the X operator?
21:46 cale2 it's not coming up on the docs search
21:47 RabidGravy https://docs.perl6.org/language/operators​#index-entry-X_%28cross_meta_operator%29
21:47 RabidGravy "cross"
21:47 skids joined #perl6
21:47 cale2 RabidGravy: it shows up in search when you type "xx" in the search box
21:47 cale2 could be something to look into
21:48 cale2 wait it was the wrong routine
21:48 cale2 So there's no texas variant of the cross operator :/
21:49 espadrine_ joined #perl6
21:52 gfldex cale2: it in the javascript definition, so it must be a javascript problem
21:56 samcv m: 'a'.uniprop('East_Asian_Width').say
21:56 camelia rakudo-moar 015231: OUTPUT«Na␤»
21:56 samcv cool
21:58 pmurias joined #perl6
22:00 curt_ joined #perl6
22:01 cdg joined #perl6
22:02 AlexDaniel samcv: what's “Na”?
22:03 samcv uh
22:03 samcv idk i forget
22:03 samcv i have my ucd rewrite resolving all the short names into long names at least, so hopefully it won't always be as unhelpful
22:04 curt_ m: try { my $proc = Proc::Async.new('cat', :r, :w); my $done = $proc.start; say "try sending"; await $proc.say("hi there"); say "worked"; $proc.close-stdin; await $done; CATCH { default { say "caught"; } } }; say "done";
22:04 camelia rakudo-moar 015231: OUTPUT«caught␤done␤»
22:04 samcv AlexDaniel, see http://unicode.org/Public/UNI​DATA/PropertyValueAliases.txt
22:04 samcv it apparently means Narrow
22:04 curt_ m: try { my $proc = Proc::Async.new('nothing', :r, :w); my $done = $proc.start; say "try sending"; await $proc.say("hi there"); say "worked"; $proc.close-stdin; await $done; CATCH { default { say "caught"; } } }; say "done";
22:04 camelia rakudo-moar 015231: OUTPUT«caught␤done␤»
22:04 samcv m: '≔'.uniprop('ea').say
22:04 camelia rakudo-moar 015231: OUTPUT«N␤»
22:05 samcv N is neutral
22:07 Vynce joined #perl6
22:08 cdg joined #perl6
22:11 cale2 I want to zip two strings of different length to Pairs
22:11 AlexDaniel samcv: by the way, I want to teach unicodable to dump all properties of a character. Where do I get the list of properties?
22:11 cale2 m: 'cale'.comb Z 'helloworld'.comb
22:11 camelia rakudo-moar 015231: OUTPUT«WARNINGS for <tmp>:␤Useless use of "Z" in expression ".comb Z 'helloworld'.comb" in sink context (line 1)␤»
22:12 cale2 m: say 'cale'.comb Z 'helloworld'.comb
22:12 camelia rakudo-moar 015231: OUTPUT«((c h) (a e) (l l) (e l))␤»
22:12 samcv AlexDaniel, second column http://unicode.org/Public/U​NIDATA/PropertyAliases.txt
22:12 samcv or
22:12 cale2 m: say 'cale'.comb Z 'he'.comb
22:12 camelia rakudo-moar 015231: OUTPUT«((c h) (a e))␤»
22:12 gfldex m: 'cale'.comb «=>» 'helloworld'.comb
22:12 camelia rakudo-moar 015231: ( no output )
22:12 AlexDaniel m: say roundrobin 'cale'.comb, 'helloworld'.comb
22:12 camelia rakudo-moar 015231: OUTPUT«((c h) (a e) (l l) (e l) (o) (w) (o) (r) (l) (d))␤»
22:12 samcv or see here https://github.com/perl6/roast/issues/195
22:12 gfldex m: dd 'cale'.comb «=>» 'helloworld'.comb
22:12 camelia rakudo-moar 015231: OUTPUT«(:c("h"), :a("e"), :l("l"), :e("l"), :c("o"), :a("w"), :l("o"), :e("r"), :c("l"), :a("d"))␤»
22:12 cale2 AlexDaniel: thanks
22:13 samcv so basically all the ones in the 2nd column plus  Emoji
22:13 samcv Emoji_Presentation
22:13 samcv Emoji_Modifier
22:13 samcv Emoji_Modifier_Base
22:13 samcv plus Numeric_Value_Numerator and Numeric_Value_Denominator
22:13 cale2 gfldex I need it to always favor one side. what the heck is that operator haha
22:13 AlexDaniel samcv: but… any way to get it from perl 6?
22:13 samcv no way
22:13 AlexDaniel :'(
22:14 gfldex => is the Pair constructor and «» is the hyper that doesn't care about length of arguments
22:15 cale2 «» <- not to be confused with something else, as I discovered
22:15 timotimo cale2: but the cross operator is already texas?
22:15 rba_ joined #perl6
22:15 cale2 timotimo, try searching for it in the docs
22:15 samcv AlexDaniel, also there's NFG_QC too
22:15 timotimo aye, it's missing
22:15 timotimo but that has nothing to do with the fact that X is in ASCII
22:16 gfldex timotimo: it's not, it's in the javascript index
22:16 cale2 timotimo: type "xx" and you can find something similar
22:16 gfldex for whatever reason jquery is acting up
22:16 timotimo xx is very unsimilar, actually
22:16 gfldex "X " does work
22:16 cale2 yeah, but "xx" and you see the single "x"
22:16 timotimo but x and X aren't the same thing
22:17 Actualeyes joined #perl6
22:17 AlexDaniel m: say ‘cale’.comb »=>» ‘helloworld’.comb
22:17 camelia rakudo-moar 015231: OUTPUT«(c => h a => e l => l e => l)␤»
22:17 cale2 m: say 'cale'.comb Z 'he'.comb # I need the left side to remain the same length, but the right side to cycle forever
22:17 camelia rakudo-moar 015231: OUTPUT«((c h) (a e))␤»
22:17 AlexDaniel m: say ‘cale’.comb «=>« ‘helloworld’.comb
22:17 camelia rakudo-moar 015231: OUTPUT«(c => h a => e l => l e => l c => o a => w l => o e => r c => l a => d)␤»
22:17 gfldex the search is case insensitive
22:17 gfldex m: say ‘cale’.comb Z[=>] ‘helloworld’.comb
22:17 camelia rakudo-moar 015231: OUTPUT«(c => h a => e l => l e => l)␤»
22:17 cale2 AlexDaniel: Sorry, I need the left side to be the one determining the length
22:18 AlexDaniel cale2: so use »=>» then
22:18 avuserow joined #perl6
22:18 cale2 gfldex: that's the solution
22:18 cale2 what is going on with that extra arrow next to Z?
22:19 brokenchicken makes a pair
22:19 cale2 m: say ‘cale’.comb Z[=>] ‘he’.comb
22:19 AlexDaniel it's a pair operator
22:19 camelia rakudo-moar 015231: OUTPUT«(c => h a => e)␤»
22:19 gfldex it's the inner operator of the meta Z
22:19 cale2 wait, still doesn't work...
22:19 gfldex meta Z is not the same thing as Z
22:19 AlexDaniel »=>» is what you want
22:19 brokenchicken m: say ‘cale’.comb Z=> ‘he’.comb
22:19 camelia rakudo-moar 015231: OUTPUT«(c => h a => e)␤»
22:19 cale2 m: say ‘cale’.comb »=>» ‘he’.comb
22:19 camelia rakudo-moar 015231: OUTPUT«(c => h a => e l => h e => e)␤»
22:19 brokenchicken gfldex: what does the [] on it do?
22:19 AlexDaniel m: say 5 [+] 2
22:19 camelia rakudo-moar 015231: OUTPUT«7␤»
22:20 AlexDaniel nothing
22:20 brokenchicken OK
22:20 cale2 »=>» that doesn't work because it just repeats the last letter. I need the right list to cycle
22:20 gfldex brokenchicken: precedence, so it forces => to be the inner operator of the meta chain
22:20 timotimo Z=> and Z[=>] is the same thing, but the latter is more readable
22:20 brokenchicken meta chain?
22:20 * brokenchicken feels outta the loop :o
22:20 AlexDaniel m: say ‘cale’.comb »=>» ‘XY’.comb
22:20 camelia rakudo-moar 015231: OUTPUT«(c => X a => Y l => X e => Y)␤»
22:21 AlexDaniel cale2: are you reading it correctly?
22:21 cale2 Yeah, that worked. I read it wrong haha
22:22 cale2 m: say ‘cale’.comb»=>»‘XY’.comb
22:22 camelia rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3say ‘cale’.comb»7⏏5=>»‘XY’.comb␤    expecting any of:␤        method arguments␤        postfix␤»
22:22 brokenchicken .tell RabidGravy be sure to report your breakages so we iron everything out in v6.d.PREVIEW and not leave it until v6.d ;)
22:22 yoleaux brokenchicken: I'll pass your message to RabidGravy.
22:22 cale2 m: say ‘cale’.comb»=>» ‘XY’.comb
22:22 camelia rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3say ‘cale’.comb»7⏏5=>» ‘XY’.comb␤    expecting any of:␤        method arguments␤        postfix␤»
22:22 AlexDaniel cale2: nope, you need whitespace there
22:22 cale2 I thought hyper operator was supposed to butt up against
22:22 cale2 list>>.map(stuff)
22:23 AlexDaniel that's not that
22:23 timotimo that's hyper methodcall
22:23 timotimo method calls have only allowed you to put a space in front since half a year or maybe a whole year
22:23 rurban joined #perl6
22:23 cale2 m: say ‘cale’.comb >>=>>> ‘XY’.comb
22:23 camelia rakudo-moar 015231: OUTPUT«(c => X a => Y l => X e => Y)␤»
22:23 cale2 m: say ‘cale’.comb >> => >> ‘XY’.comb
22:23 camelia rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~>␤at <tmp>:1␤------> 3say ‘cale’.comb >>7⏏5 => >> ‘XY’.comb␤»
22:23 timotimo for that case you can use [ ] around => to make it more readable
22:23 cale2 m: say ‘cale’.comb >>[=>]>> ‘XY’.comb
22:23 camelia rakudo-moar 015231: OUTPUT«(c => X a => Y l => X e => Y)␤»
22:23 cale2 nice
22:24 cale2 y'all are getting very haskelly with these operators
22:24 gfldex brokenchicken: see http://design.perl6.org/S03.h​tml#Nesting_of_metaoperators
22:24 * AlexDaniel doesn't see how adding another two non-letter characters is going to help with readability, but I'll note that…
22:25 gfldex ENODOC on nesting metaoperators btw
22:25 gfldex @a >>[>]>> $b      # oh yeah
22:25 cale2 m: say ‘cale’.comb >>[=>]>> ‘QRSTUVQXYZ’.comb
22:25 camelia rakudo-moar 015231: OUTPUT«(c => Q a => R l => S e => T)␤»
22:25 Vynce1 joined #perl6
22:25 cale2 perfect
22:26 brokenchicken m: my @a <a b c>; my @b = 1, 2, 3; say @a [X+]= @b
22:26 camelia rakudo-moar 015231: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3my @a <a b c>7⏏5; my @b = 1, 2, 3; say @a [X+]= @b␤    expecting any of:␤        prefix␤        term␤»
22:26 brokenchicken m: my @a = <a b c>; my @b = 1, 2, 3; say @a [X+]= @b
22:26 camelia rakudo-moar 015231: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:26 cale2 I'm sure there is an intuitive explanation for the hyper operator. It's just not clear on first glance.
22:27 brokenchicken m: my @a = 10, 20, 30; my @b = 1, 2, 3; say @a [X+]= @b
22:27 camelia rakudo-moar 015231: OUTPUT«[11 12 13 21 22 23 31 32 33]␤»
22:27 brokenchicken m: my @a = 10, 20, 30; my @b = 1, 2, 3; say @a X[+=] @b
22:27 camelia rakudo-moar 015231: OUTPUT«(11 13 16 21 23 26 31 33 36)␤»
22:27 cale2 Why not instead make a "cycle" method that repeats a list infinitely. Then you don't need "hyper" at all.
22:27 brokenchicken cale2: see rotor
22:28 cale2 brokenchicken: I did. I thought that was for chunking
22:28 lizmat m: dd ((1,2,3) xx *)[^10]
22:28 camelia rakudo-moar 015231: OUTPUT«((1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3))␤»
22:28 brokenchicken lizmat++
22:28 lizmat m: dd (|(1,2,3) xx *)[^10]
22:28 camelia rakudo-moar 015231: OUTPUT«(1, 2, 3, 1, 2, 3, 1, 2, 3, 1)␤»
22:28 brokenchicken gfldex: what about "meta Z is not the same thing as Z". I thought Z was just the meta Z with infix:<,> op
22:29 samcv do Augmenting built-in classes make executed code slower?
22:29 lizmat brokenchicken: internally it works a bit more optimized, but otherwise Z is the same as Z,
22:29 lizmat afaik
22:29 samcv or just compiling? also curious about custom operators
22:29 agentzh joined #perl6
22:29 samcv aside from compilation speed, is there any speed reduction from using them?
22:30 lizmat samcv: creating a custom operator means cloning the grammar
22:30 gfldex i believe to remember that meta Z behaves differently with LoLs but that may just have been a bug
22:30 lizmat which is still a lot of work at compile time
22:30 samcv what about run-time?
22:31 gfldex the inliner should inline them
22:31 timotimo hyper operators will attempt to mirror the incoming structure
22:31 lizmat I recall a check in the setting that makes sure we didn't clone the grammar during setting building
22:31 brokenchicken cale2: you're right; the `xx` is the right tool
22:31 timotimo (which is why they also work on hashes)
22:31 brokenchicken Also I notice a bug with .rotor:
22:31 brokenchicken mc: m: dd (1,2,3).rotor(3 => -3)[^10]
22:31 committable6 brokenchicken, ¦«2015.12»: ((1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3))
22:31 brokenchicken m: m: dd (1,2,3).rotor(3 => -3)[^10]
22:31 camelia rakudo-moar 015231: OUTPUT«Rotorizing gap is out of range. Is: -3, should be in -2..^Inf; ␤Ensure a negative gap is not larger than the length of the sublist␤  in block <unit> at <tmp> line 1␤␤»
22:31 lizmat because of its runtime ramifications, so I think there are some runtime ramifications as well
22:32 brokenchicken m: m: dd (1,2,3).rotor(3 => -3, :partial)[^10]
22:32 camelia rakudo-moar 015231: OUTPUT«Rotorizing gap is out of range. Is: -3, should be in -2..^Inf; ␤Ensure a negative gap is not larger than the length of the sublist␤  in block <unit> at <tmp> line 1␤␤»
22:32 timotimo once the grammar is cloned, it's no performance issue
22:32 brokenchicken m: m: dd (1,2,3).rotor(3 => -2, :partial)[^10]
22:32 camelia rakudo-moar 015231: OUTPUT«((1, 2, 3), (2, 3), (3,), Nil, Nil, Nil, Nil, Nil, Nil, Nil)␤»
22:32 jnthn Only slightly longer startup time because of deserializing the extra stuff
22:32 jnthn And even then you probably won't hit it unless you EVAL
22:32 samcv so this https://github.com/samcv/UCD/​blob/master/lib/Operators.pm6 should not be  acause of slowness?
22:32 jnthn 'cus we lazily deserialize
22:32 samcv unless EVAL?
22:33 jp_ joined #perl6
22:33 lizmat brokenchicken: that last one feels wrong ?
22:33 lizmat ah, no, actually, that's correct
22:33 brokenchicken lizmat: yeah, seems an off-by-one
22:33 jnthn samcv: Those operator defs should only cuase compile-time slowdown; for runtime they'll dispatch just like normal operators
22:33 cale2 m: say |'brokenchicken'.comb xx 20
22:33 camelia rakudo-moar 015231: OUTPUT«(b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i c k e n b r o k e n c h i ...)␤»
22:34 cale2 m: say |'brokenchicken'.comb xx *
22:34 camelia rakudo-moar 015231: OUTPUT«(...)␤»
22:34 samcv kk thanks jnthn
22:34 gfldex cale2: please note that `say` is a wee bit magic
22:34 jnthn samcv: About EVAL - I just mean that if you precompile a module with custom operators used in it, then it will include the language tweaks as part of its precompilation.
22:34 lizmat brokenchicken: off by one how ?
22:34 brokenchicken lizmat: Actually, not even an off-by-one, but it's checking the negative gap against the positive step instead of whether or not it went past the start of the list
22:35 brokenchicken mc: dd (^10).rotor(5, 4 => -5, :partial)[^10]
22:35 committable6 brokenchicken, ¦«2015.12»: ((0, 1, 2, 3, 4), (5, 6, 7, 8), (4, 5, 6, 7, 8), (9,), Nil, Nil, Nil, Nil, Nil, Nil)
22:35 jnthn samcv: But since we lazily load stuff then you'll probably only pay for that if you actually need the language
22:35 brokenchicken lizmat: ^ like there it isn't even an infinite list
22:35 jnthn samcv: EVAL being something that needs it, because an EVAL is done in terms of the enclosing language.
22:35 brokenchicken mc: dd (^10).rotor(2, 1 => -2, :partial)[^10]
22:35 committable6 brokenchicken, ¦«2015.12»: ((0, 1), (2,), (1, 2), (3,), (2, 3), (4,), (3, 4), (5,), (4, 5), (6,))
22:35 brokenchicken m: dd (^10).rotor(2, 1 => -2, :partial)[^10]
22:35 camelia rakudo-moar 015231: OUTPUT«Rotorizing gap is out of range. Is: -2, should be in -0..^Inf; ␤Ensure a negative gap is not larger than the length of the sublist␤  in block <unit> at <tmp> line 1␤␤»
22:35 bjz joined #perl6
22:36 brokenchicken Sad that ain't any test for that behaviour :(
22:36 lizmat yeah, otherwise I would have noticed during the refactor
22:37 cale2 What is more intuitive between these two: $secret.comb Z |$keyword.comb xx *     OR     $secret.comb >>[=>]>> $keyword.comb
22:37 Vynce joined #perl6
22:37 brokenchicken cale2: the first one
22:37 brokenchicken cale2: but I don't really program Perl 6...
22:38 cale2 brokenchicken: you say that often, but you clearly do haha
22:38 gfldex hyperops are candidates for autothreading, so asking for intuition is wrong
22:39 timotimo right, hyper operators are hyper, while Z and X metaops are lazy
22:39 brokenchicken Hm. GitHub added repository "topics" for ease of discovaribility
22:39 timotimo oh? interesting
22:39 jp_ Hi, I have a question. I don't understand why I have to add {;} in a regex to get the "correct" behavour. You can see my test case at :  https://gist.github.com/anonymous​/fca80723f43a7b76ad80a3c674c50469
22:40 gfldex https://github.com/blog/2309-introducing-topics
22:40 jp_ If you have any idea ...
22:41 timotimo if that's the case, you might want to use || instead of | in some places
22:41 brokenchicken m: say 84+131+84+63+153+4
22:41 camelia rakudo-moar 015231: OUTPUT«519␤»
22:41 timotimo with {;} (even though {} should also work) you can force the declarative prefix to end earlier than it otherwise would
22:41 jp_ good to know...
22:42 brokenchicken cale2: well, in the past ~9 months I wrote 519 lines of Perl 6 code. All for a single project :) https://github.com/perl6/geth Hardly what'd I'd call "programming"
22:42 timotimo the | alternation will first go into the branch that has the longest match in its declarative prefix
22:42 jp_ ok
22:42 brokenchicken What's a declarative prefix?
22:43 timotimo everything from the beginning to the first non-declarative piece
22:43 brokenchicken OK :)
22:43 * brokenchicken has no idea which pieces are declarative :o
22:43 timotimo || for example is non-declarative
22:43 timotimo it's imperative, because it has an "order of execution" to it
22:44 timotimo { say "hi" } is imperative, because nobody knows what a piece of code is able to do
22:44 brokenchicken some comp-sci stuff.
22:44 timotimo backreferences are also not declarative
22:44 Actualeyes joined #perl6
22:44 brokenchicken OK. I think I get it. Thanks.
22:45 brokenchicken [ 'foo' | 'bar' ] is declarative. [ $meow ] ain't. [ .+ ] is
22:45 timotimo $meow could be declarative
22:45 timotimo but for that we'd have to recompile the NFA every time we do a match
22:45 brokenchicken Ah
22:45 timotimo (in other words every time $meow could have changed)
22:47 mr_ron Warning on mixed | and || and related documentation needs https://github.com/perl6/doc/issues/1141
22:47 brokenchicken What's QAST::Op.new( :op('locallifetime'), ? It's not documented.
22:48 brokenchicken It's here: https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Actions.nqp#L7845
22:49 Geth ¦ perl6.org: hankache++ created pull request #71: Link to "Think Perl 6" page on oreilly.com
22:49 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/pull/71
22:49 timotimo it's for defining when local variables can be considered dead
22:49 Geth ¦ perl6.org: dcfc23ce69 | (Naoum Hankache)++ | source/resources/index.html
22:49 Geth ¦ perl6.org: Link to "Think Perl 6" page on oreilly.com
22:49 Geth ¦ perl6.org: review: https://github.com/perl6/p​erl6.org/commit/dcfc23ce69
22:49 Geth ¦ perl6.org: fcf6628f0f | lizmat++ | source/resources/index.html
22:49 Geth ¦ perl6.org: Merge pull request #71 from hankache/patch-1
22:49 Geth ¦ perl6.org:
22:49 Geth ¦ perl6.org: Link to "Think Perl 6" page on oreilly.com
22:49 Geth ¦ perl6.org: review: https://github.com/perl6/p​erl6.org/commit/fcf6628f0f
22:52 TimToady brokenchicken: for instance, I think the temporary setting of $_ on the right side of ~~ uses that
22:53 Geth ¦ perl6.org: 8afc235eb2 | (Zoffix Znet)++ | source/resources/index.html
22:53 Geth ¦ perl6.org: s{http://}{https://}
22:53 Geth ¦ perl6.org:
22:53 Geth ¦ perl6.org: Where sites offer it
22:53 Geth ¦ perl6.org: review: https://github.com/perl6/p​erl6.org/commit/8afc235eb2
22:53 timotimo ^- good call
22:54 Geth ¦ perl6.org: ca5dfe73fa | (Zoffix Znet)++ | source/resources/index.html
22:54 Geth ¦ perl6.org:  s{http://}{https://}
22:54 Geth ¦ perl6.org: review: https://github.com/perl6/p​erl6.org/commit/ca5dfe73fa
22:54 brokenchicken Thanks.
23:04 jp_ Hi again, I have another testcase with the same grammar parsing another text where this is when I activate the Grammar::Tracer that I get the result I want.  You can find my testcase at https://gist.github.com/anonymous​/27c7c108022c58e7bb6bef1c491a5064.
23:05 jp_ ( Note this time this is when I drop the {;}  that I get the "good" result ...
23:06 kyan joined #perl6
23:07 lizmat brokenchicken: re rotor allowing negative gap beyond the step forwar
23:07 lizmat d: that would imply that all values of the source iterator should be cached :-(
23:08 brokenchicken yup, which is why I didn't say it has to be fixed :P~
23:08 RandalSchwartz joined #perl6
23:08 brokenchicken The merlyn has graced us with his presence!
23:08 RandalSchwartz "rakudobrew build moar" doesn't seem to have updated anything in "bin/*" since January 3rd.
23:08 RandalSchwartz is there something I should change?
23:09 brokenchicken RandalSchwartz: maybe run rakudobrew rehash?
23:09 brokenchicken I dunno. It is meant to update bin/*?
23:09 RandalSchwartz that's what was building my copy of "perl6"
23:09 brokenchicken The rehash thing updates its shims
23:09 RandalSchwartz in "bin/*"
23:10 brokenchicken Hm. You can run perl6 -v to see which version you got
23:10 brokenchicken m: say $*PERL.compiler.version
23:10 camelia rakudo-moar 015231: OUTPUT«v2017.01.127.g.0152316␤»
23:10 brokenchicken should be something along those lines ^ with 127 being the number of commits since 2017.01 compiler release
23:10 RandalSchwartz This is Rakudo version 2017.01-127-g0152316f5 built on MoarVM version 2017.01-25-g70d4bd53
23:10 brokenchicken Yup, You got HEAD
23:10 RandalSchwartz Ahh.  So, somehow, that's newer than the bin. :)
23:11 RandalSchwartz I was worried since the bin wasn't being updated
23:11 RandalSchwartz thanks
23:11 brokenchicken Looks like ~/.rakudobrew/bin/perl6 is a Perl 5 script that just figures out The Right Thing to become and execs into it
23:12 RandalSchwartz ok
23:14 brokenchicken lizmat: I mean, I guess it's useful to have X ways to use rotor than X-1 ways, but there weren't any tests and I'm guessing .rotor would need to be completely changed after your rewrite and there weren't any roast tests
23:15 lizmat yeah, it would have to change rather significantly
23:15 lizmat but nothing unoverseeable
23:15 lizmat it's just that none of the examples in the doc use this feature, and there are no tests for it
23:15 brokenchicken yeah
23:16 lizmat so I'm going to leave this up to TimToady to decide upon, as he wrote the original List.rotor handler
23:16 lizmat if my memory servers me correctly
23:17 RandalSchwartz left #perl6
23:17 lizmat *serves
23:20 pyrimidine joined #perl6
23:21 Actualeyes joined #perl6
23:22 lizmat brokenchicken: perhaps the solution is to reinstate a separate candidate for List.rotor
23:23 brokenchicken ¯\_(ツ)_/¯  up to you and TimToady :)
23:28 lep-delete joined #perl6
23:30 lizmat hmmm..  appears List.rotor was a co-production of nine, brokenchicken and me
23:31 lizmat brokenchicken: in any case, it appears from the error message "Ensure a negative gap is not larger than the length of the sublist"
23:31 lizmat that you should not be able to do 2 => -3
23:31 brokenchicken Sounds good :)
23:41 as__ joined #perl6
23:41 as__ How can I redefine the $?TABSTOP in my code
23:41 as__ ?
23:42 brokenchicken Never saw those redefined, since they're compile-time constants.
23:42 brokenchicken as__: how come you want to?
23:44 [Coke] m: $?TABSTOP=4; # nope
23:44 camelia rakudo-moar b9d927: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at <tmp> line 1␤␤»
23:45 timotimo m: my constant $?TABSTOP = 8;
23:45 camelia rakudo-moar b9d927: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Constants with a '?' twigil not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my constant $?TABSTOP = 87⏏5;␤»
23:45 timotimo seems to be allowed only in the core setting
23:46 as__ so kinda not possible
23:46 [Coke] m: my constant $?HI = 3; $?HI=4;
23:46 camelia rakudo-moar b9d927: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Constants with a '?' twigil not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my constant $?HI = 37⏏5; $?HI=4;␤»
23:46 as__ it may be useful for heredocs with tabs instead of spaces
23:47 timotimo i'm not sure if heredocs and tabs mix well already
23:47 as__ more precisely, with mixture of tabls and spaces
23:47 timotimo i.e. whether "\t    \t   \t" is the same as "\t\t\t"
23:47 timotimo yeah
23:47 as__ a tab is assumed as 8 spaces
23:48 brokenchicken m: "\tx\n  y".indent(-2).uninames.say
23:48 camelia rakudo-moar b9d927: OUTPUT«(SPACE SPACE SPACE SPACE SPACE SPACE LATIN SMALL LETTER X <control-000A> LATIN SMALL LETTER Y)␤»
23:49 lizmat I seem to recall that the use of $?TABSTOP was for Str.indent and Str.de-indent
23:49 lizmat oops, scratch de-indent
23:50 lizmat I'm not sure why Str.indent uses $?STABSTOP instead of a $*TABSTOP that gets its initial value from $?TABSTOP
23:50 as__ https://perl6advent.wordpress.com/2013/12/04/d​ay-04-heredocs-theredocs-everywheredocs-docs/ reads "(Tabs are considered to be 8 spaces long, unless you change $?TABSTOP. "
23:51 brokenchicken hehehe STABSTOP :P
23:51 lizmat well, and there you go, you can't
23:51 lizmat because before Christmas we weren't sure you *could* change something like $?FOO in your own code
23:51 brokenchicken And it's pretty easy to workaround it
23:51 as__ like how?
23:51 lizmat so we made it illegal until we figure it out
23:52 brokenchicken m: "\tx\n  y".subst(:g, /^(\s+)/, { .[0].subst: "\t", " " x 4 }).indent(-2).uninames.say
23:52 camelia rakudo-moar b9d927: OUTPUT«(SPACE SPACE LATIN SMALL LETTER X <control-000A> LATIN SMALL LETTER Y)␤»
23:52 brokenchicken Sorry, ^^ not ^
23:52 brokenchicken m: "\tx\n  y".subst(:g, /^^(\s+)/, { .[0].subst: "\t", " " x 4 }).indent(-2).uninames.say
23:52 camelia rakudo-moar b9d927: OUTPUT«(SPACE SPACE LATIN SMALL LETTER X <control-000A> LATIN SMALL LETTER Y)␤»
23:52 as__ Yes but not in heredocs before the closing label
23:52 as__ or how do you call it?
23:54 brokenchicken as__: personally, I wouldn't be mixing tabs and spaces in my code so would never encounter that issue with heredocs
23:55 as__ theory is more important for me than practice at the moment :) just figured out that you cannot mix it and wanted to know how to deal with that
23:55 brokenchicken as__: we have an acronym for that: DITHWIDT—Doctor, It Hurts When I Do This
23:56 brokenchicken You'd have to indent your heredoc with, say, a tab on one line, then not-8 spaces on another to ever encounter this.

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo