Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-17

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 woodruffw joined #perl6
00:02 pdcawley_ joined #perl6
00:05 lnrdo joined #perl6
00:07 shmibs joined #perl6
00:07 rodarmor joined #perl6
00:08 roguelazer joined #perl6
00:08 riatre joined #perl6
00:08 TeamBlast joined #perl6
00:13 woodruffw joined #perl6
00:23 skids joined #perl6
00:46 AlexDaniel Hotkeys: polymod?
00:46 AlexDaniel Hotkeys: polymod may be cool but…
00:47 AlexDaniel where is the documentation…
00:48 Hotkeys hiding in the S32
00:48 Hotkeys fairly minimal
00:48 timotimo hehe
00:48 AlexDaniel ah look, there is an opened issue about that! https://github.com/perl6/doc/issues/426
00:49 Hotkeys oh wow!
00:49 Hotkeys how'd you find that
00:49 timotimo he's a magician
00:49 Hotkeys :p
00:49 Hotkeys I don't think my text explanation is that great
00:49 AlexDaniel Hotkeys: that's the only explanation I know of
00:49 AlexDaniel Hotkeys: I've added a link to S32
00:50 Hotkeys you can link straight to https://design.perl6.org/S32/Numeric.html#polymod
00:50 Hotkeys I did my best to explain it in my post due to the fact that it wasn't in the docs actually
00:51 Hotkeys otherwise I would've just "see docs" probably
00:51 AlexDaniel or right! Thanks
00:51 AlexDaniel I was looking for that
00:51 Hotkeys But I wasn't really sure how to explain it
00:51 Hotkeys so i tried and then gave some examples
00:51 Hotkeys :p
00:51 AlexDaniel Hotkeys: well, another way to do that is to write the docs
00:51 AlexDaniel and then say “see docs”
00:52 Hotkeys Well yes
00:52 Hotkeys but I don't feel like I've explained it well enough, and the explanation in S32 seems a bit terse
00:53 Hotkeys AlexDaniel: http://irclog.perlgeek.de/perl6/2016-02-10#i_12020285
00:53 Hotkeys :p
00:54 AlexDaniel uhh
00:54 AlexDaniel perhaps we could also have something like “This thing is not documented yet”
00:54 AlexDaniel and then autogenerate a lot of stuff
00:54 colomon joined #perl6
00:54 Hotkeys autogenerating signatures and stuff would be nice
00:55 geraud joined #perl6
00:55 Hotkeys if possible
00:55 AlexDaniel so that at least the docs say that this thing exists
00:55 Hotkeys might be a ton of work though
00:59 woodruffw joined #perl6
01:00 pochi_ joined #perl6
01:00 AlexDaniel Hotkeys: ok I've just shaved off 2 characters
01:01 AlexDaniel Hotkeys: with a trick that you will definitely like
01:01 AlexDaniel m: {first 2..$^x-2: {[==] $x.polymod($_ xx*)}}(90).say
01:01 camelia rakudo-moar 4c2c9c: OUTPUT«14␤»
01:01 Hotkeys oh
01:01 Hotkeys right
01:01 AlexDaniel m: {first (2..$^x-2): {[==] $x.polymod($_ xx*)}}(90).say # old
01:01 camelia rakudo-moar 4c2c9c: OUTPUT«14␤»
01:01 Hotkeys I forgot you can do that
01:01 jameslenz joined #perl6
01:02 Hotkeys the whole 'method obj: args' notation
01:02 AlexDaniel yeah, I love it
01:02 Hotkeys now I gotta rewrite my de-golfing
01:02 Hotkeys :p
01:03 AlexDaniel haaa :)
01:04 AlexDaniel Hotkeys: just keep both versions and keep degolfing of the longer one
01:04 Hotkeys meh
01:04 Hotkeys it isn't that different
01:05 geekosaur joined #perl6
01:06 AlexDaniel Hotkeys: I don't think that you fixed the number of bytes :D
01:10 AlexDaniel Hotkeys: I hate it when you have to write something like “$_ xx *”. I wish there was something shorter :)
01:11 AlexDaniel like .xx or whatever
01:11 jameslenz joined #perl6
01:12 skids .oO($_.forevah)
01:13 colomon joined #perl6
01:14 maybekoo2 joined #perl6
01:16 timotimo $_.alot
01:19 AlexDaniel timotimo: http://hyperboleandahalf.blogspot.com.ee/2010/04/alot-is-better-than-you-at-everything.html
01:20 timotimo yup
01:20 Hotkeys 'gimme 3, $_'
01:21 Hotkeys ?p6> sub gimme($a, $b) { $b xx $a }; say gimme 3, 'a';
01:21 Hotkeys m: sub gimme($a, $b) { $b xx $a }; say gimme 3, 'a';
01:21 camelia rakudo-moar 4c2c9c: OUTPUT«(a a a)␤»
01:21 Hotkeys timotimo: AlexDaniel:
01:21 colomon joined #perl6
01:21 AlexDaniel Hotkeys: great name
01:23 Hotkeys ty
01:25 timotimo Hotkeys: i wonder if you can save one character by using $_ instead of $^x there
01:26 Hotkeys I don't think it will work in the closure
01:26 Hotkeys block
01:26 Hotkeys thing
01:26 timotimo are you sure?
01:26 Hotkeys I already use $_ in there
01:26 Hotkeys so it shouldn't right?
01:26 timotimo m: say {first 2..$_-2: {[==] $x.polymod($_ xx*)}}(90)
01:26 camelia rakudo-moar 4c2c9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_IqN5QqFRD␤Variable '$x' is not declared␤at /tmp/_IqN5QqFRD:1␤------> 3say {first 2..$_-2: {[==] 7⏏5$x.polymod($_ xx*)}}(90)␤»
01:26 timotimo oh, i didn't see you use $x in there, too
01:27 timotimo that makes more sense, yeah
01:27 Hotkeys ya
01:27 timotimo m: say {first 2..$^x-2: {[==] $x.polymod($_ xx*)}}(90)
01:27 camelia rakudo-moar 4c2c9c: OUTPUT«14␤»
01:27 timotimo still a pretty good solution
01:27 timotimo m: say {first 2..$^x-2: {[==]$x.polymod($_ xx*)}}(90)
01:27 camelia rakudo-moar 4c2c9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wekCKfyo0Z␤Two terms in a row␤at /tmp/wekCKfyo0Z:1␤------> 3say {first 2..$^x-2: {[==]7⏏5$x.polymod($_ xx*)}}(90)␤    expecting any of:␤        infix␤        infix stopper␤        statement …»
01:27 woodruffw joined #perl6
01:27 timotimo mhm
01:27 timotimo m: say {first 2..$^x-2:{[==] $x.polymod($_ xx*)}}(90)
01:27 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:27 timotimo that's certainly an ugly error!
01:28 timotimo m: my $x; say 2..$x-2:{say "test"}
01:28 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:28 timotimo m: my $x; say 2..$x-2:{}
01:28 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:28 timotimo m: $x-2:{}
01:28 camelia rakudo-moar 4c2c9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/C3BGMnhwoE␤Variable '$x' is not declared␤at /tmp/C3BGMnhwoE:1␤------> 3<BOL>7⏏5$x-2:{}␤»
01:28 timotimo m: $-2:{}
01:28 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:28 timotimo m: 2:{}
01:28 camelia rakudo-moar 4c2c9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oMo8b_38lw␤You can't adverb 2␤at /tmp/oMo8b_38lw:1␤------> 2:{}7⏏5<EOL>␤»
01:28 timotimo m: -2:{}
01:28 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:29 timotimo m: -:{}
01:29 camelia rakudo-moar 4c2c9c: OUTPUT«WARNINGS for /tmp/BKy4Cnc3Aw:␤Useless use of "-" in expression "-:{}" in sink context (line 1)␤»
01:30 timotimo m: ++1:{}
01:30 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:30 timotimo well, i think that's about as short as it can get?
01:34 maybekoo2 joined #perl6
01:36 skids m: _:{} #FTW!
01:36 camelia rakudo-moar 4c2c9c: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
01:37 jack_rabbit joined #perl6
01:37 timotimo not bad :)
01:50 cdg joined #perl6
01:52 telex joined #perl6
01:57 BenGoldberg joined #perl6
01:57 Actualeyes joined #perl6
02:04 kalkin-_ joined #perl6
02:15 jameslenz joined #perl6
02:20 jack_rabbit joined #perl6
02:23 woodruffw joined #perl6
02:23 Cabanossi joined #perl6
02:24 woodruffw joined #perl6
02:24 woodruffw joined #perl6
02:25 cdg joined #perl6
02:25 riatre joined #perl6
02:25 lnrdo joined #perl6
02:25 dalek joined #perl6
02:25 sno joined #perl6
02:25 daxim joined #perl6
02:25 lsm-desktop joined #perl6
02:25 notbenh joined #perl6
02:25 nowan joined #perl6
02:25 SHODAN joined #perl6
02:25 musca joined #perl6
02:25 bpmedley joined #perl6
02:25 jevin joined #perl6
02:25 Spot__ joined #perl6
02:25 pnu joined #perl6
02:25 solarbunny joined #perl6
02:25 baest joined #perl6
02:25 woodruffw joined #perl6
02:25 SHODAN joined #perl6
02:29 Ben_Goldberg joined #perl6
02:32 noganex joined #perl6
02:41 BenGoldberg joined #perl6
02:46 timotimo okay, so moarvm can now generate heap snapshot dumps in json. i've started on a script that parses its output and generates a bunch of objects. here's my script and example file: http://t.h8.lv/heap_to_graph.p6  /  http://t.h8.lv/heap_output.json.gz  (about 1.1 MB compressed)
02:46 timotimo feel free to come up with anything interesting. graphs, statistics analysis, ...
02:46 timotimo the script takes quite a while already to parse that example heap dump
02:46 molaf_ joined #perl6
02:47 timotimo i bet this could be trivially parallelized, for example
02:48 timotimo that'd just require the collectables part to wait up for the references part to have reached the required references it references
02:48 timotimo or something like that?
02:49 timotimo or, of course, to give the Collectable object the $from and $to (or $from and $length) attributes and later on referencing them "lazily"
02:50 timotimo 376.17user 0.83system 6:17.77elapsed 99%CPU (0avgtext+0avgdata 816228maxresident)k
03:09 geekosaur joined #perl6
03:21 sortiz joined #perl6
03:26 noganex_ joined #perl6
03:30 sortiz \o #perl6
03:34 dalek DBIish: 3504982 | (Salvador Ortiz)++ | lib/DBDish/Pg.pm6:
03:34 dalek DBIish: Pg: Fix named :dbname handling at connect
03:34 dalek DBIish: review: https://github.com/perl6/DBIish/commit/35049822a3
03:34 dalek DBIish: bf21be9 | (Salvador Ortiz)++ | lib/DBDish (2 files):
03:34 dalek DBIish: Hide some frames of the error handling path
03:34 dalek DBIish: review: https://github.com/perl6/DBIish/commit/bf21be9f72
03:43 woodruffw joined #perl6
03:46 labster joined #perl6
03:47 perlawhirl joined #perl6
03:49 rindolf joined #perl6
03:58 timotimo eep, the dot file that i'm generating is getting seriously gigantic
04:03 timotimo it aborted somewhere in the middle, though, so i can now get the dot file into a dot program and see what'll happen
04:03 timotimo about 300k links between nodes ...
04:03 timotimo about 50k nodes
04:03 timotimo neato straight-up refuses to work under these conditions
04:12 wamba joined #perl6
04:13 Juerd Would it upset people if I wrote >>=>>> instead of Z=>? :)
04:14 timotimo the "network simplex" thing is done running, i suppose it's nw trying to build the output image or something?
04:16 timotimo i can't tell what it's doing :\
04:17 timotimo i wonder why i sometimes get "this program is running in x32 mode" from strace?
04:31 abaugher joined #perl6
04:41 geekosaur joined #perl6
04:46 bjz joined #perl6
04:48 AlexDaniel Juerd: if you use » then not so much :)
04:52 AlexDaniel Juerd: I've always thought that Z is pretty straightforward, unlike » with its various ways to do things in different directions
04:52 AlexDaniel Juerd: or are you trying to make people upset on purpose?
04:56 tweakism .. I think it's kindof pretty, lul.
04:58 timotimo huh. i wanted to try to resolve the references in parallel in the background, but it turns out, that the second, third and fourth item in the collectables list have references to the first ~235k objects ...
04:59 aborazmeh joined #perl6
04:59 aborazmeh joined #perl6
05:16 lnrdo joined #perl6
05:16 roguelazer joined #perl6
05:19 ruoso joined #perl6
05:26 keix joined #perl6
05:27 timotimo 256.83user 1.11system 2:45.45elapsed 155%CPU (0avgtext+0avgdata 569524maxresident)k
05:27 timotimo ^- 155% cpu; hooray for perl6 concurrency :)
05:28 Hotkeys <AlexDaniel> Juerd: I've always thought that Z is pretty straightforward, unlike » with its various ways to do things in different directions
05:29 Hotkeys Or you could combine the two
05:29 Hotkeys in a wonderful Z»*» combo
05:29 Hotkeys or something
05:30 Hotkeys here's a wonderful jumble of meta-ops that I did in a golf http://codegolf.stackexchange.com/a/75038/46687
05:30 Hotkeys :D
05:33 Hotkeys just noticed I can replace [»+«] with [Z+]
05:33 Hotkeys that's what i get for having too much fun
05:35 lustlife joined #perl6
05:38 bjz joined #perl6
05:48 ufobat joined #perl6
05:48 keix joined #perl6
05:52 bjz joined #perl6
05:55 jack_rabbit joined #perl6
05:57 Cabanossi joined #perl6
06:00 AlexDaniel Hotkeys: is there actually no way to change »/» to X/ ?
06:00 musiKk_ joined #perl6
06:01 Hotkeys oh
06:01 Hotkeys I hadn't even thought of X/
06:01 Hotkeys I never remember X exists
06:01 Hotkeys yeah it works
06:01 AlexDaniel huh?
06:01 Hotkeys m: {[Z+](@^a Z»*»@^b) X/sum @b}([[0, 2], [3, 4], [0, 1], [1, 1]], [2, 6, 2, 10]).say
06:01 camelia rakudo-moar 4c2c9c: OUTPUT«(1.4 2)␤»
06:03 AlexDaniel really, wow
06:03 Hotkeys m: {[Z+](@^a ZX*@^b) X/sum @b}([[0, 2], [3, 4], [0, 1], [1, 1]], [2, 6, 2, 10]).say
06:03 camelia rakudo-moar 4c2c9c: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/ScT8OeX9Kb line 1␤␤»
06:03 Hotkeys aw
06:03 Hotkeys m: {[Z+](@^a ZX* @^b) X/sum @b}([[0, 2], [3, 4], [0, 1], [1, 1]], [2, 6, 2, 10]).say
06:03 camelia rakudo-moar 4c2c9c: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/773xdi1A9I line 1␤␤»
06:04 Hotkeys m: {[Z+](@^a Z[X*] @^b) X/sum @b}([[0, 2], [3, 4], [0, 1], [1, 1]], [2, 6, 2, 10]).say
06:04 camelia rakudo-moar 4c2c9c: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/8h1pQtk7tL line 1␤␤»
06:04 bjz joined #perl6
06:05 Hotkeys m: say [[0, 2], [3, 4], [0, 1], [1, 1]] ZX [2, 6, 2, 10]
06:05 camelia rakudo-moar 4c2c9c: OUTPUT«((([0 2] 2)) (([3 4] 6)) (([0 1] 2)) (([1 1] 10)))␤»
06:05 Hotkeys m: say [[0, 2], [3, 4], [0, 1], [1, 1]] ZX* [2, 6, 2, 10]
06:05 camelia rakudo-moar 4c2c9c: OUTPUT«((4) (12) (4) (20))␤»
06:05 AlexDaniel Hotkeys: I don't think that it is supposed to work in another case
06:06 AlexDaniel this trick is basically based upon the fact that you have exactly one element on the right side
06:06 Hotkeys fair
06:06 Hotkeys m: say [[0, 2], [3, 4], [0, 1], [1, 1]] Z»*» [2, 6, 2, 10]
06:06 camelia rakudo-moar 4c2c9c: OUTPUT«([0 4] [18 24] [0 2] [10 10])␤»
06:12 molaf joined #perl6
06:46 molaf joined #perl6
06:59 domidumont joined #perl6
06:59 FROGGS joined #perl6
07:03 abraxxa joined #perl6
07:04 domidumont joined #perl6
07:18 cibs joined #perl6
07:28 lsm-desktop joined #perl6
07:30 nakiro joined #perl6
07:37 firstdayonthejob joined #perl6
07:38 darutoko joined #perl6
07:57 cibs joined #perl6
07:57 espadrine joined #perl6
07:58 RabidGravy joined #perl6
08:02 bjz joined #perl6
08:02 ufobat is there anything that is done in parallel, unless you explicitly state so? i just know about the hyper operators, is there anything else that might run in parallel?
08:02 ufobat i am curently writing a little programm and all my parallel approaches are slower then the sequenzial one.
08:03 moritz we don't auto-parallelize anything right now
08:03 moritz just if you ask for it with .race or .hyper
08:04 moritz and one reason is that parallelization has quite an overhead on its own, and only makes sense for time consuming operations
08:07 ufobat i guessed its the overhead, yeah :(
08:08 Hotkeys junctions apparently can auto-thread
08:08 Hotkeys but I doubt they do right now
08:08 moritz right, they may, but they don't
08:13 ufobat http://pastebin.com/pmXPEKqr <- just in case you see something stupid in it or a reason whats obviously wrong in my parallalization attempt.
08:18 zakharyas joined #perl6
08:18 RabidGravy ufobat, on a first examination that isn't doing more than one thing at one
08:19 RabidGravy you await inside the loop, so it will only start one at a time
08:20 ufobat ah fuck... yes of course
08:20 moritz no wonder it's not faster :-)
08:20 noganex joined #perl6
08:21 moritz what you can do instead: $promise.then( -> $p { say "found the solution with {$_}" for $p.result }
08:21 moritz which returns another promise
08:22 moritz and then await for all of those secondary promises outside the loop
08:22 ufobat if i woudnt await them, i guess then the .then wont get executed?
08:23 moritz right
08:23 moritz your program might just exit before it ever gets around to executing them
08:24 ufobat okay, thanks for the suggestions! i will try them later
08:25 moritz ufobat: please let us know how it went
08:27 AlexDaniel in any case, just don't touch .hyper yet :D
08:29 moritz right, that's horribly broken ATM
08:34 firstdayonthejob joined #perl6
08:34 AlexDaniel .race is probably less broken, hmmm. After all of the things I experienced with .hyper I don't have enough hair left to try .race. It would be interesting to know if somebody is using .race for something more or less serious.
08:35 ely-se joined #perl6
08:35 bjz_ joined #perl6
08:37 maybekoo2 joined #perl6
08:39 Hotkeys AlexDaniel: I tried to use hyper at some point and it made me unhappy
08:40 Hotkeys So now I'll wait til that's all implemented properly
08:46 AlexDaniel I'm still wondering why .hyper is sometimes mentioned here as a possibility. With much better luck we could say that things do auto-parallelize right now. At least when people realize that they don't we will be able to say “right, NYI, but it gives you the right answer” instead of “yeah, you didn't know? Go rewrite your code.”
09:00 maybekoo2 joined #perl6
09:02 cpage_ joined #perl6
09:02 jkramer joined #perl6
09:02 jkramer Hello
09:02 moritz hi jkramer
09:02 jkramer I'm getting "Malformed UTF-8" when EVALFILE'ing a file that has only ASCII characters. Any ideas what can cause this?
09:03 dakkar joined #perl6
09:03 moritz jkramer: sounds like a bug in rakudo (unless you mixed up the file names or something)
09:04 jkramer Aaaaah yeah nevermind, my fault. It was reading a vim .swp file :D
09:05 moritz that might explain it :-)
09:07 FROGGS o/
09:07 FROGGS .seen azawawi
09:07 yoleaux I saw azawawi 14 Mar 2016 11:28Z in #perl6: <azawawi> arcetera: have fun
09:18 ufobat moritz, http://pastebin.com/rgrbuWiy vs http://pastebin.com/dDtjve4Z it's 9 times slower.
09:29 Ulti naaw I think there isn't enough RAM for the Raspberry Pi to compile stuff, guess I can make a huge swap file
09:32 AlexDaniel Ulti: just install it from the repo?
09:33 Ulti there is a repo for the Pi 3 and latest Rakudo build?
09:33 Ulti a better plan is to transpile
09:33 AlexDaniel well, you are probably using raspbian, right?
09:34 Ulti yeah
09:34 AlexDaniel 2015.02 is in debian unstable
09:34 Ulti orly
09:34 Ulti cool
09:34 AlexDaniel package “rakudo”
09:34 moritz but that's like, painfully old
09:34 AlexDaniel oops, I meant 2016.02
09:34 Ulti oh wait I thought you said 2016.02
09:34 Ulti hah
09:34 moritz that's *much* better :-)
09:34 Ulti yeah I saw 2016.01 hitting Debian a while ago
09:34 moritz 2015.02 is without GLR and precomp :-)
09:35 Ulti well the whole thing on ARM 64bit will be without JIT and on an embedded CPU so I doubt perf is going to be great regardless
09:36 diakopter____ joined #perl6
09:36 AlexDaniel Ulti: well, I kinda use it as a glue for various stuff. It is acceptable
09:37 AlexDaniel e.g. on raspberry zero I can dump a few thousands of bytes through SPI from Perl 6. That's not very fast but it's not too slow either.
09:38 Ulti AlexDaniel Raspbian is stable
09:38 AlexDaniel Ulti: like any other debian. Just add unstable repo and install rakudo
09:38 Ulti sure but I'd probably want to do that pinned
09:38 Ulti which is a bit of a pain
09:39 tweakism meh, once you've figure out and configured the pinning for that once, it's like riding a bike :)
09:40 Ulti :P
09:40 AlexDaniel Package: *␤Pin: release a=unstable␤Pin-Priority: 300
09:40 AlexDaniel that's it
09:40 AlexDaniel you wont get updates but hey
09:41 AlexDaniel that is, you'd have to apt-get install -t unstable rakudo when you want to upgrade it
09:44 tweakism AlexDaniel: I don't know if it's still the case, but I always preferred to aptitude install package/repo rather than -t repo (and I think the same syntax works for apt-get), as the behavior is a little different and you end up w/ fewer packages from unstable that way
09:45 tweakism AlexDaniel: (this may be out of date:)  -t sets the default distribtion for that command / run of apt, so when dependencies are needed it will look to e.g. unstable first for them
09:45 tweakism whereas with packagename/repo it will try to satisfy deps out of whatever you would normally install from byd efault, and only pull them from unstable if it has to
09:45 AlexDaniel tweakism: that might be true, I don't know :)
09:46 AlexDaniel I was sitting on unstable for years
09:46 tweakism although you might prefer the deps from unstable, since that's much more likely to have actually been tested etc. with the pkg from unstable
09:46 tweakism but I never really had any issues of any significance from pinning.  if you mention it in e.g. #debian these days, people throw a fit.
09:47 AlexDaniel like, the whole system is on unstable. I've tried mixing the repos some years ago but turns out that it is much better and easier if you just switch completely
09:47 tweakism it depends on whre you are in the release cycle, and moreso, on what sorts of things have changed in unstable
09:47 Vlavv_ joined #perl6
09:47 tweakism sometimes it's the case that there's a major low-level schism between stable and unstable, and you've get much of anythign from unstable w/o it trying to upgrade all of the base dependencies
09:48 tweakism I usually just want some obscure thing w/ few deps, or maybe even a noarch package, though
09:48 tweakism but yeah, I hear unstable runs pretty well.  I got burned once running it on my workstation and now I don't venture past testing, if I would be annoyed by the box being unavailable :)
09:49 tweakism my apt-get update uninstalled perl or something.. and of course apt is written in perl.
09:49 tweakism if that was it, though, nowadays I'd say 'well, obviously your fault for not watching what it's planning to do'
09:49 tweakism sorry to be off topic, you guys can continue now  >:)
09:50 moritz but, like, shouldn't apt depend on perl then? :-)
09:51 tweakism moritz: if someting in unstable breaks, it's kindof hard to justify much outrage :)
09:51 tweakism **meant earlier:  "and you can't get much of anything from unstable…"
09:52 AlexDaniel by the way, debian stretch freeze is expected to be on 2017-01-05 or so. This means that stable rakudo (according to debian) will jump from 2014.07 (not even v6.c) to something v6.d-ish.
09:52 AlexDaniel which is great
09:52 moritz tweakism: right, it's called *un*stable for reason :-)
09:53 AlexDaniel .oO( who knows, maybe debian stable was not called "shittyoldpackages" for a reason too? )
09:54 CQ joined #perl6
09:54 tweakism heh, actually... I installed my very first ever package from stable-backports today (as far as I can remember, anyway)
09:55 moritz AlexDaniel: TBH I mostly stopped worrying about that. I'm only interested in newer versions of my top 5 or so applications, and I typically find up-to-date install sources from them
09:55 moritz I'm currently annoyed about the old perl version in oldstable, but that's not Debian's fault. It's our fault for not having upgraded to stable everywhere
09:57 tweakism moritz: sometimes I wonder what keeps so many people on old-stable (debian itself is pretty trivial to upgrade, but I know people have their propreitary s/w and things they've forgotten how they set it up and stuff), and especially how people *could possibly* stand to be on old-stable
09:58 tweakism stable is pretty annoyingly stable already *chuckle*
09:58 AlexDaniel I can tolerate stable packages on servers but on my personal computer I want shiny things :)
09:58 moritz tweakism: in our case it's systems that changed "owner" to a different ops team, and they want to recreate them from scratch (and with configuration management) instead of simply upgrading
09:59 moritz tweakism: but that takes quite some time, and they are chronically understaffed
10:00 tweakism I haven't got it finished yet, but my current bootstrap process is pretty much, run a pre-seeded installer on the node, and then there's a (sigh) shell script to get the master up and running; it duplicates the logic for a lot of my states, however it also doesn't really have to do very much at all before salt is up and running and can start configuring the rest of the stuff that way
10:00 tweakism it's basically like, set hostname/passwords/enable firewall/install salt from official repo/set some options/start salt/run states
10:00 tweakism I'm probably forgetting steps
10:01 tweakism oh crap, wrong channel sorry
10:01 cpage_ joined #perl6
10:01 RabidGravy Say I've got something that is *supposed* to be a CStruct, but accessing the attributes gives rise to a segfault, is there any other way of examining it?
10:03 tweakism RabidGravy: is there any chance that the operation that should have allocated/initialized it failed, and maybe you missed the return/error code indicating that?
10:04 tweakism that would account for probably like, 70%+ of that class of error
10:04 tweakism although... is CStruct a perl thing?  if what I said doesn't make sense / apply, ignore me.
10:05 AlexDaniel tweakism: it's not too bad. Once upon a time I opened #python window and confused it with something else. Then a guy asks a question about the difference between ' and ", and so I start my lengthy explanation about interpolation and stuff while the whole channel is looking at me like I am the biggest idiot in the world.
10:06 AlexDaniel I'm not even sure if I explained myself. I think that I just ran away
10:06 tweakism LOL
10:06 tweakism that's pretty awesome
10:07 mst AlexDaniel: eh, just say "sorry if that didn't make sense, I should've indented it better@
10:07 mst THEN run away
10:07 tweakism I mean, not just the ' vs ", but the fundamental difference that perl *has* variable interpolation
10:13 andreoss joined #perl6
10:15 andreoss is there something like perl5's Test::Simpler to make a output of tests also contain the code which failed?
10:16 tweakism earlier, it was topical in another channel for me to take a pic of myself in a, quote, "funny hat"
10:16 tweakism I couldn't find my penguin hat, but I'd like to share the pic with you anyway:  http://i.imgur.com/DhY6tpT.png
10:16 tweakism ... owl's well that ends well.
10:17 RabidGravy tweakism, yes a CStruct is a Perl6 representation of a struct, no the allocation isn't faling, and the struct is coming back defined
10:18 tweakism RabidGravy: k, I was afraid of that after I spoke.  sorry.
10:19 mst andreoss: probably not yet; Test::Simpler was an insane Damian proof of concept rather than something anybody would actually use, so I suspect the porting priority is going to be the stuff that people use
10:19 RabidGravy *and* if I pretend it isn't a struct but actually a 64bit integer ( its a struct of two 32bit ints) it gives me exactly what I would expect
10:23 donaldh joined #perl6
10:23 zakharyas joined #perl6
10:31 RabidGravy and of course, because it's got a MIDI message as one of those ints, it's actually a 24bit int
10:32 andreoss mst: seems it's just reading the source file and looking for line which failed
10:34 andreoss m: $FILE.IO.slurp.say # quine
10:34 camelia rakudo-moar eed4eb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lSJVqi_gXE␤Variable '$FILE' is not declared␤at /tmp/lSJVqi_gXE:1␤------> 3<BOL>7⏏5$FILE.IO.slurp.say # quine␤»
10:34 andreoss m: $?FILE.IO.slurp.say # quine
10:34 camelia rakudo-moar eed4eb: OUTPUT«$?FILE.IO.slurp.say # quine␤»
10:34 moritz AlexDaniel: that's the cheating quine :-)
10:35 moritz AlexDaniel: and actually you need .print, because the .say adds an additional newline :-)
10:35 moritz sorry, meant andreoss
10:35 AlexDaniel o_o
10:38 mst http://klisp.org/ # SWEEEEEEEEEEET
10:47 wamba joined #perl6
10:49 andreoss m: $_=q‘say "\$_=q‘$_’; \$_.EVAL"’; $_.EVAL
10:49 camelia rakudo-moar eed4eb: OUTPUT«$_=q‘say "\$_=q‘$_’; \$_.EVAL"’; $_.EVAL␤»
10:51 fireartist joined #perl6
10:53 mst http://klisp.org/docs/Continuations.html#Continuations
10:53 mst $let/cc is fscking beautiful
10:53 RabidGravy Hmm, there's no NC test for "populate an array of struct passed as an argument"
10:55 rindolf joined #perl6
11:02 RabidGravy which is exactly what is failing here
11:05 RabidGravy I'll make the test in a bit, supermarket first :)
11:05 espadrine joined #perl6
11:25 domidumont1 joined #perl6
11:36 kaare_ joined #perl6
11:39 kid51 joined #perl6
11:51 pmurias_ joined #perl6
11:51 woodruffw joined #perl6
11:51 pmurias joined #perl6
11:52 pmurias mst: you should be able to use $let/cc in rakudo as all backends implement continuations
11:55 mr-foobar joined #perl6
12:05 jkramer Is there something like anonymous classes?
12:05 moritz jkramer: yes
12:05 moritz m: my $class = class { has $.x }; say $class.new(x => 42).perl
12:05 camelia rakudo-moar eed4eb: OUTPUT«<anon|71781632>.new(x => 42)␤»
12:08 jkramer Nice, but is there a way to get an instance at the same time? Like my $foo = class is Parent { some new methods }.new;
12:09 andreoss m: class Foo {}; my $x = (Int but Foo).new;
12:09 camelia rakudo-moar eed4eb: OUTPUT«Cannot mix in non-composable type Foo into object of type Int␤  in block <unit> at /tmp/f1BNqTb3mz line 1␤␤»
12:09 jkramer Sweet, thanks
12:09 andreoss m: class Foo {}; class Bar {}; my $x = (Bar but Foo).new;
12:09 camelia rakudo-moar eed4eb: OUTPUT«Cannot mix in non-composable type Foo into object of type Bar␤  in block <unit> at /tmp/tTfoLsOrjU line 1␤␤»
12:09 andreoss m: class Foo {}; class Bar {}; my $x = (Bar does Foo).new;
12:09 camelia rakudo-moar eed4eb: OUTPUT«Cannot use 'does' operator with a type object.␤  in block <unit> at /tmp/5bSBLbHSkU line 1␤␤»
12:10 jkramer He, didn't see the output was an error :D
12:10 _4d47 joined #perl6
12:11 andreoss m: class Foo {}; my $x = class { also is Foo ; } .new; say $x.perl
12:11 camelia rakudo-moar eed4eb: OUTPUT«<anon|81746704>.new␤»
12:13 jkramer Hooray, thanks
12:14 psch m: my $x = class :: is Int { } .new; say $x.^mro
12:14 camelia rakudo-moar eed4eb: OUTPUT«((<anon|70903392>) (Int) (Cool) (Any) (Mu))␤»
12:15 psch although 'also' is clearly fine as well :)
12:17 itaipu joined #perl6
12:29 cpage__ joined #perl6
12:36 zakharyas joined #perl6
12:44 hoelzro o/ #perl6
12:45 jkramer What exactly does this mean? "Cannot look up attributes in a type object"
12:46 psch m: class A { has $.a }; A.a
12:46 camelia rakudo-moar 2a2019: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/zEkZ43mlFj line 1␤␤»
12:46 psch m: class A { has $.a }; A.new.a
12:46 camelia rakudo-moar 2a2019: ( no output )
12:46 psch jkramer: you didn't .new
12:46 psch (or you got something that's not a value from somewhere else... :) )
12:48 jkramer Hmmm, weird. :) How'd you normally access an attribute declared as "has $!foo"? With $!foo, right?
12:49 jkramer I mean there's no accessors for this.
12:49 psch jkramer: yes, inside the class you can use the ! twigil, and yes, declared as 'has $!foo' it doesn't get an accessor
12:49 tmch joined #perl6
12:50 perlpilot jkramer: though, if you have no instance, no storage was allocated for $!a, so you can't get at an attribute
12:50 psch m: class A { has $!a; method foo { $!a } }; A.foo # like such
12:50 camelia rakudo-moar 2a2019: OUTPUT«Cannot look up attributes in a type object␤  in method foo at /tmp/Eobckispe6 line 1␤  in block <unit> at /tmp/Eobckispe6 line 1␤␤»
12:53 jkramer I'm confused. $.perl.say just gives me 'MyClass.new' without any content. The instance was created with MyClass.new(foo => $foo). Attribute foo was declared as $!foo but I didn't make a constructor. Does the default new not use $!attributes?
12:53 jkramer I mean fill them
12:53 timotimo that's correct. private attributes are not part of the API
12:53 timotimo .new however is part of the API
12:53 psch jkramer: correct, private attributes don't get included in the inherited .new and aren't inherited either
12:53 jkramer Aaaah that explains everything :)
12:54 sufrostico joined #perl6
12:54 timotimo there's a module in the ecosystem that lets you get settable private attributes, though
12:54 timotimo from the constructor, i mean
12:54 jkramer So I just replace the ! with .? What if I don't want accessors?
12:54 psch submethod BUILD
12:55 psch i don't know the details by heart, but afair that's one of the well documented bits
12:55 moritz http://doc.perl6.org/language/objects#Object_Construction
12:55 timotimo yeah, BUILD is the way to go if you want to set your private attributes from things supplied in the constructor
12:55 jkramer Ah ok. Thanks, I'll try.
12:56 moritz jkramer: I'm curious, what's your use case for private attributes that should be settable from the constructor?
12:56 jkramer moritz: I don't know, I just thought it's best practice to make stuff private that you don't want to be accessable from outside the class/instance
12:57 timotimo well, accessors are read-only by default already
12:57 moritz jkramer: but setting through the constructor is also a form of access
12:57 moritz it's just a write-only access
12:57 timotimo "write-once", even
12:57 moritz right
12:57 timotimo write-once-read-never?
12:57 moritz but I struggle to see where that makes sense
12:58 moritz I mean, if you allow write once, why not also allow reads?
12:58 moritz you might force your users to do extra bookkeeping if you hide those attributes, with no real benefit
12:58 moritz just because somebody said your stuff should be private, yo
12:58 jkramer moritz: Well in cases where you need the value to initialize stuff inside the class but there's no reason to make it accessible from the outside. It wouldn't hurt to make it accessable, just thinking it's best practice to hide stuff inside
12:59 moritz jkramer: IMHO it's best practise to give the user a good API
12:59 moritz jkramer: hiding things comes second
12:59 psch in that case can't you just do what you want to do with the values in .new and safe the result in a public attr..?
13:00 moritz psch: right, that's what I'm arguing for
13:00 perlpilot maybe it's a simulation where he doesn't want the users to have easy access to the gravitational constant, but rather perform experiments with available methods to discover it  ;)
13:05 jkramer But I'm need those attributes in other methods as well. But it doesn't really matter, I guess it doesn't hurt anyone to make the public.
13:05 mst pmurias: perl6 is still fundamentally applicative though
13:08 sufrostico joined #perl6
13:13 skids joined #perl6
13:14 pmurias mst: as opposed to being based on composing functions?
13:15 andreoss would semicolon inference be posible?
13:15 mst pmurias: as opposed to being operative, where a vau is passed its arguments in symbolic form unevaluated
13:16 psch m: 2.&[+](2) .say # where do the semicolons go?
13:16 camelia rakudo-moar 262723: OUTPUT«4␤»
13:17 psch andreoss: i think not, given "space before methodop is allowed" and "methodop without a preceding term means 'operate on $_'"
13:17 psch there's probably more comprehensive reasons, but that alone seems enough to make it nigh impossible without changing at least some current rules
13:18 mst andreoss: basically, no, but semicolon inference basically always turns out to be a terrible idea
13:18 jnthn .win 17
13:18 jnthn d'oh
13:18 mst jnthn: .lose Inf
13:18 jnthn /o\
13:19 jnthn .oO( But the internets taught me the opposite of "win" was "fail"... )
13:19 andreoss mst: perl-wise?
13:19 mst andreoss: well, it's also a terrible idea in javascript and anybody competent turns it off
13:19 mst I'm not sure I've seen any other attempt that isn't even worse than the JS disaster
13:19 timotimo you can turn it off?
13:20 timotimo i imagine there's linter plugins that help, but i didn't know you could straight-up turn it off
13:20 * jnthn recently ran across a sizable JavaScript codebase that uses the semicolonless style
13:20 timotimo semiconless, eh?
13:20 jnthn It was hilarious because it ended up with semicolons in utterly bizare places
13:21 jnthn Like
13:21 jnthn foo()
13:21 jnthn // blah comment crap
13:21 jnthn ;[a, b].map(...)
13:21 andreoss js would be worst example
13:21 mst timotimo: things like JSHint will scream about it
13:21 jnthn With ; there because otherwise it'd be an array index
13:21 timotimo that's ... clever?
13:22 mst andreoss: well, honestly, unless you go for -lots- of whitespace sensitivity in ugly ways, it's not going to work
13:22 perlpilot the author apparently liked their own special hoops to jump through rather than the normal hoops
13:22 jnthn Funnily enough we'd not have *that* problem in Perl 6 'cus you aren't allowed spaces before your post[circum]fixes :)
13:22 mst andreoss: "are you python? no? this isn't going to be pleasant" tends to be how it goes in practice
13:23 tweakism I don't think? this is still an issue, but one of the things that I hated most about javascript was it being invalid to have a comma after the last item in a list/sequence
13:23 tweakism I figure half the people here did, but heh
13:23 moritz tweakism: that's only an issue in json these days, iirc
13:23 timotimo i work on a project where we babelify with es2015 and that allows it, i believe
13:23 mst last time I checked it works ... except in IE, where it silently crashes
13:24 moritz oh, still?
13:24 mst a couple years ago I still needed to care for $customer's target platforms
13:24 mst but I've mostly recycled those neurons
13:24 mst so I could be wrong now
13:28 tweakism I have heard that crack is whack, but I have not been able to find the right perldoc page to confirm it.
13:33 pmurias joined #perl6
13:33 synopsebot6 joined #perl6
13:34 timotimo i can't tell when synopsebot6 was last in here :(
13:35 timotimo something must have kicked it out ... i don't think it has any code in it to require a heartbeat from the irc server in order to continue running
13:36 perlpilot aye, the synbot needs a few more smarts to keep from disappearing
13:37 timotimo do we have any clue who/what is 62.75.169.119 ?
13:37 timotimo the journal on hack.p6c.org shows a gigantic amount of "Connection closed by 62.75.169.119 [preauth]"
13:38 lizmat euve32551.vserver.de
13:39 stmuk_ German virtual hosting according to whois
13:39 timotimo yeah
13:39 timotimo i know what whois told me, but i have no clue what person it might belong to
13:39 timotimo i'm not quite sure what "preauth" means in this case
13:40 timotimo i don't think it means it was fail2banned. perhaps the script at that address expects a different public key from the server and aborts?
13:41 timotimo 14.5k matches of that ip and "preauth" in the journal in the last week i think
13:41 mst I think it means that that IP range has been switched to SASL being required due to lack of abuse responses from the hosting company
13:41 timotimo can you tell me where i could find that configuration?
13:43 timotimo huh, it seems related to nagios
13:44 timotimo moritz: do we have a nagios monitoring hack.p6c.org?
13:45 timotimo because /etc/nagios/nrpe.cfg has allowed_hosts with that IP in there
13:47 timotimo we do have the nrpe, the nagios remote plugin executor, running on hack
13:47 moritz timotimo: yes
13:48 timotimo so, is the "connection closed in preauth" just a "ping to see if the server is up"?
13:49 moritz no idea
13:49 mst oh, right, that was from sshd, not the bot log
13:49 moritz iirc it's bartolin's monitoring server that's checking on hack
13:51 stmuk_ its probably just a timeout from sshd for nagios checking that port
13:52 timotimo i expect it's faster than a timeout
13:55 stmuk_ ok a not completed ssh handshake then
13:55 mst yeah, sounds like connect(), yup, close()
14:07 RabidGravy joined #perl6
14:08 cdg joined #perl6
14:10 RabidGravy Boom!
14:11 moritz Crash, Boom, Bang!
14:11 moritz Roxette!
14:12 FROGGS joined #perl6
14:14 FROGGS o/
14:22 Upasaka joined #perl6
14:38 dalek doc: 58c0604 | (Mathieu Gagnon)++ | doc/Type/Hash.pod:
14:38 dalek doc: Fix 'state' link in type/Hash
14:38 dalek doc: review: https://github.com/perl6/doc/commit/58c0604363
14:44 laz78 joined #perl6
14:46 nadim joined #perl6
14:52 kennygillen joined #perl6
14:53 molaf joined #perl6
15:03 jkramer left #perl6
15:03 cpage_ joined #perl6
15:07 kennygillen joined #perl6
15:11 tweakism joined #perl6
15:19 lostinfog joined #perl6
15:22 nadim joined #perl6
15:23 pmurias joined #perl6
15:29 cdg joined #perl6
15:34 hori joined #perl6
15:43 musiKk_ joined #perl6
15:45 adu joined #perl6
15:47 spintronic joined #perl6
15:47 itaipu joined #perl6
15:50 khw joined #perl6
16:07 donaldh Hmmm https://doc.perl6.org/language/regexes doesn't mention greedy vs non-greedy quantifiers. Took me a while to find.
16:09 spintronic_ joined #perl6
16:13 spintronic_ joined #perl6
16:16 donaldh What are the preferred terms? greedy and non-greedy ?
16:16 jnthn greedy and frugal, I think
16:17 pmurias the synopsis uses greedy and frugal,
16:17 donaldh Where's the synopsis? Perhaps I can lift some text.
16:18 ugexe are there any notes anywhere about what has to be done different in SETTING ( i think )? for instance: needing to explicitly declare `proto` on a multi
16:18 donaldh Ah S05 methinks
16:23 arnsholt Yeah, S05 is the regex one
16:27 zacts joined #perl6
16:28 ugexe how should one accomplish the following (multiple roles with BUILD/BUILDALL):
16:28 ugexe m: role Foo { method BUILDALL(|) { nextsame; }; }; role Bar { method BUILDALL(|) { nextsame; }; }; class Baz does Foo does Bar { }
16:28 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vQ6O652A7T␤Method 'BUILDALL' must be resolved by class Baz because it exists in multiple roles (Bar, Foo)␤at /tmp/vQ6O652A7T:1␤»
16:29 ugexe for some reason i was thinking BUILD/BUILDALL would be... different? i dunno
16:29 zostay joined #perl6
16:31 zostay joined #perl6
16:39 dalek doc: b539fa5 | donaldh++ | doc/Language/regexes.pod:
16:39 dalek doc: Describe greedy vs frugal modifiers in regexes
16:39 dalek doc: review: https://github.com/perl6/doc/commit/b539fa5efd
16:40 avenj joined #perl6
16:41 avenj joined #perl6
16:41 dalek perl6-examples: 7556b6d | (Shlomi Fish)++ | categories/euler/prob288-shlomif.p6:
16:41 dalek perl6-examples: Fix a mixture of "\t"s and spaces.
16:41 dalek perl6-examples:
16:41 dalek perl6-examples: For indentation. Pleasure configure your text editors properly.
16:41 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/7556b6dc0a
16:41 dalek perl6-examples: d997e40 | (Shlomi Fish)++ | categories/euler/prob288-shlomif.p6:
16:41 dalek perl6-examples: Fix a regression in latest rakudobrews.
16:41 dalek perl6-examples:
16:41 dalek perl6-examples: Thanks to moritz from #perl6 on freenode for the analysis.
16:41 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/d997e40545
16:42 geekosaur "pleasure"? autoincorrect?
16:48 dalek doc: 2706fad | donaldh++ | doc/Language/regexes.pod:
16:48 dalek doc: Describe : for preventing backtracking
16:48 dalek doc: review: https://github.com/perl6/doc/commit/2706fad4e5
16:53 travis-ci joined #perl6
16:53 travis-ci Doc build failed. Donald Hunter 'Describe greedy vs frugal modifiers in regexes'
16:53 travis-ci https://travis-ci.org/perl6/doc/builds/116687904 https://github.com/perl6/doc/compare/58c0604363f3...b539fa5efd38
16:53 travis-ci left #perl6
16:57 travis-ci joined #perl6
16:57 travis-ci Doc build failed. Donald Hunter 'Describe : for preventing backtracking'
16:57 travis-ci https://travis-ci.org/perl6/doc/builds/116690761 https://github.com/perl6/doc/compare/b539fa5efd38...2706fad4e5f1
16:57 travis-ci left #perl6
16:58 itaipu joined #perl6
17:08 dalek doc: 98c244c | donaldh++ | doc/Language/regexes.pod:
17:08 dalek doc: Fix the index entries for frugal and backtracking
17:08 dalek doc: review: https://github.com/perl6/doc/commit/98c244c32d
17:10 sufrostico joined #perl6
17:25 travis-ci joined #perl6
17:25 travis-ci Doc build passed. Donald Hunter 'Fix the index entries for frugal and backtracking'
17:25 travis-ci https://travis-ci.org/perl6/doc/builds/116696067 https://github.com/perl6/doc/compare/2706fad4e5f1...98c244c32d4a
17:25 travis-ci left #perl6
17:31 SCHAAP137 joined #perl6
17:31 SCHAAP137 joined #perl6
17:33 tony-o joined #perl6
17:33 kerframil joined #perl6
17:35 zakharyas joined #perl6
17:53 itaipu joined #perl6
17:56 domidumont joined #perl6
18:00 laz78 joined #perl6
18:03 Lou_ joined #perl6
18:04 yqt joined #perl6
18:15 khw joined #perl6
18:17 adu joined #perl6
18:27 rindolf Hi all. How do I properly write this code -     return -1 + (0 .. $NUM_DIGITS).first: $s.substr(*, 1) ne $e.substr(*, 1);
18:27 rindolf ]
18:27 rindolf I'm getting: Method 'Int' not found for invocant of class 'Whatever'
18:27 timotimo yeah, you'd write it more like this:
18:27 timotimo .first: { $s.substr($^a, 1) ne $e.substr($a, 1) }
18:28 Vlavv_ joined #perl6
18:28 timotimo Whatever currying does not happen when you put the whatever star into an argument for a sub or method call
18:28 rindolf timotimo: so I need the { ... }
18:28 rindolf timotimo: why is it first $^a and then $a?
18:28 timotimo yes, i don't think you can do it without them
18:28 timotimo because the $^a is a "declaration", more or less; the second time it's optional
18:31 masak you could do the $^a the second time
18:31 masak but I'd consider that a bad habit
18:31 masak (because I was there when the need to be able to do `$a` without the `^` was discovered) :P
18:32 timotimo yeah, when you have it in another inner-er curly scope
18:32 masak aye
18:32 timotimo i think i might have been there, too
18:32 timotimo potentially for a re-run of that episode
18:32 masak I think I discovered it
18:32 timotimo do we have a catchy name for that?
18:32 masak for what?
18:33 timotimo the way you can accidentally re-declare such a variable in an inner scope
18:34 masak "accidental nested placeholder"?
18:35 masak :)
18:35 masak abbreviated ANP, naturally
18:35 TimToady I tend to use $_ when there's one argument anyway
18:35 TimToady for clarity
18:36 TimToady btw, if * did work there, it would be two arguments, not one
18:37 * masak .oO( even if it did work, it wouldn't work! )
18:42 rindolf TimToady, TimToady , masak [and all]: how do I create a new hash reference in p6?
18:43 rindolf timotimo: ^^^
18:43 perlpilot rindolf: same as in p5
18:44 rindolf perlpilot: but +{ } does not work.
18:44 rindolf perlpilot: it returns 0.
18:44 masak m: say {}
18:44 camelia rakudo-moar 595890: OUTPUT«␤»
18:44 perlpilot leave off the +
18:44 masak m: say {}.perl
18:44 camelia rakudo-moar 595890: OUTPUT«{}␤»
18:44 masak m: say {}.^name
18:44 camelia rakudo-moar 595890: OUTPUT«Hash␤»
18:44 masak rindolf: prefix:<+> has changed meaning from p5 to p6. to the better.
18:44 masak rindolf: in Perl 6, it means "numify" -- "turn into a number"
18:45 masak rindolf: (as it should. the p5 meaning -- "no-op" -- is insane)
18:45 perlpilot masak: except now that bites me sometimes when I try to do it in p5 :)
18:45 rindolf masak: ok, this should be in 5to6.
18:45 geekosaur yes
18:45 masak rindolf: definitely.
18:45 masak perlpilot: maybe write a source filter to fix Perl 5? :P
18:46 * masak .tongue ∈ .cheek
18:46 rindolf m: my $NUM_DIGITS = 3; my @cache = flat((0 .. $NUM_DIGITS*9).map: { [flat( (0 .. $NUM_DIGITS).map:{ {} }) ] });
18:46 camelia rakudo-moar 595890: ( no output )
18:47 rindolf m: my $NUM_DIGITS = 3; my @cache = flat((0 .. $NUM_DIGITS*9).map: { [flat( (0 .. $NUM_DIGITS).map:{ {} }) ] }); say @cache.perl;
18:47 camelia rakudo-moar 595890: OUTPUT«[]␤»
18:47 sno joined #perl6
18:47 rindolf Why is this empty?
18:47 perlpilot masak: I do not think ∈ means what you think it means ;)
18:47 rindolf Perl 6 keeps throwing me off.
18:47 masak perlpilot: I'm using it in the strictes Zermelo-Fraenkel sense imaginable.
18:48 firstdayonthejob joined #perl6
18:49 masak rindolf: I... don't know. I'm still struggling to read it propertly. a lot of nesting.
18:49 perlpilot rindolf: what masak said.  But my gut says you're trying too hard
18:50 masak m: my $NUM_DIGITS = 3; my @cache = (0 .. $NUM_DIGITS).map({ {} }); say @cache.perl
18:50 camelia rakudo-moar 595890: OUTPUT«[{}, {}, {}, {}]␤»
18:50 masak rindolf: this works... and it's simpler. :)
18:50 masak good? :)
18:50 rindolf perlpilot: turns out I didn't need the flat(...)
18:51 rindolf masak: and doesn't do the right thing.
18:51 masak well, I don't know what you want to do.
18:51 masak at least mine works :P
18:51 perlpilot rindolf: you want a 2d array of hashes?
18:51 masak m: my $NUM_DIGITS = 3; my @cache = [{} xx $NUM_DIGITS] xx $NUM_DIGITS; say @cache.perl
18:51 camelia rakudo-moar 595890: OUTPUT«[[{}, {}, {}], [{}, {}, {}], [{}, {}, {}]]␤»
18:52 masak \o/
18:52 * masak lurvs Perl 6
18:52 masak those hashes are even distinct!
18:52 rindolf perlpilot: yes.
18:52 masak rindolf: is the above adequate?
18:53 rindolf masak: I think so.
18:53 masak \o/
18:53 masak ...then if I were you, I'd go with my version :D
18:54 perlpilot rindolf: next time, maybe come in with a description like that rather than a Perl5y attempt and we may be able to get you where you want to go quicker  :)
18:54 masak was this an XY thing? I'm not good at classifying those?
18:54 masak s/\?$/./
18:55 perlpilot I wouldn't quite call it that.   More like too much Perl-5-think obscuring the Perl-6-way.
18:56 CIAvash joined #perl6
18:56 masak anyway, that sounds like an excellent thing for the (new and improved) #perl6 to help out with
18:57 perlpilot It's too bad something like  my @cache[3;5] = {} xx *; doesn't work.  That would be sweet.
18:57 perlpilot "Here's the shape of what I want and what I want in it, now fill it up"
18:58 rindolf perlpilot: I'll try to keep it in mind.
18:58 * masak vaguely recalls seeing something like that
18:58 * masak dives into S09
19:00 yqt joined #perl6
19:01 masak ...nope.
19:01 masak perlpilot: I agree there's a need/use case like that.
19:01 timotimo .o( a need case )
19:06 lizmat joined #perl6
19:08 FROGGS joined #perl6
19:09 tmch joined #perl6
19:10 teatime joined #perl6
19:11 perlpilot masak: why is #perl6 new and improved?
19:12 timotimo because #p6dev was split off
19:12 RabidGravy it was given a bit of a polish
19:12 masak perlpilot: what timotimo said.
19:12 timotimo now there is even less worry that large discussions and supporting newcomers and such could negatively impact developer productivity
19:13 masak it's classic evaporation: because the hot discussions moved elsewhere, #perl6 just got cooler :P
19:14 masak I'm only a dev because sometimes I can't help myself. at heart I'm a user.
19:14 perlpilot oh good, I thought there might be something I had missed
19:14 * masak .oO( we didn't say there wasn't ) :P
19:15 RabidGravy who was asking about MIDI other than tadzik?
19:16 timotimo i have a side-project brewing (extremely slowly) that also has a tiny bit to do with midi
19:16 timotimo but it's not perl6 related
19:17 perlpilot masak: perhaps if there's something I'm missing, I just need to aim better.  :)
19:18 sno joined #perl6
19:18 RabidGravy I've got the portmidi thing reading the stuff okay and just going to start sending in a bit
19:20 masak perlpilot: sometimes I wish I could go back in time and explain the modern definition of limits to Zeno.
19:22 perlpilot If you had done that, perhaps we would have time travel sooner  ;)
19:35 lichtkind__ joined #perl6
19:38 labster joined #perl6
19:39 zakharyas joined #perl6
19:39 bartolin timotimo: as moritz noted the connections from 62.75.169.119 are from my nagios server
19:39 bartolin timotimo: a while ago I set up some rudimentary monitoring for hack
19:40 skids joined #perl6
19:41 Ven joined #perl6
19:43 vendethiel joined #perl6
19:50 dalek perl6-most-wanted: e300108 | skinkade++ | most-wanted/modules.md:
19:50 dalek perl6-most-wanted: Add WIP for Crypt::Random
19:50 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/e300108a15
19:50 dalek perl6-most-wanted: 9fb5092 | RabidGravy++ | most-wanted/modules.md:
19:50 dalek perl6-most-wanted: Merge pull request #21 from skinkade/master
19:50 dalek perl6-most-wanted:
19:50 dalek perl6-most-wanted: Add WIP for Crypt::Random
19:50 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/9fb5092da2
20:04 kaare_ joined #perl6
20:08 spider-mario joined #perl6
20:08 cdg joined #perl6
20:10 dalecooper joined #perl6
20:14 ambs joined #perl6
20:14 musiKk_ joined #perl6
20:18 azawawi joined #perl6
20:18 azawawi hi
20:18 yoleaux 15 Mar 2016 10:07Z <FROGGS> azawawi: I'd like to extend your Selenium::WebDriver to support BlackBerry devices... and I think I'd need guidance on how to setup Firefox testing. Would be nice if we could chat a little
20:18 azawawi FROGGS: ping
20:19 frozen01 joined #perl6
20:19 FROGGS azawawi: hi
20:19 azawawi .tell RabidGravy 50 days github contribution streak achieved! :)
20:19 yoleaux azawawi: I'll pass your message to RabidGravy.
20:19 lizmat joined #perl6
20:19 RabidGravy Harr!
20:19 yoleaux 20:19Z <azawawi> RabidGravy: 50 days github contribution streak achieved! :)
20:19 * azawawi celebrates
20:20 ufobat when invoking this perl5ish thingy, isnt the error supposed to be "better"? -e 'my $foo = 12.4; say int($foo)' -> Cannot invoke this object in block <unit> at -e line 1
20:20 moritz ufobat: it used to, before we got the int type :-)
20:20 FROGGS azawawi: I got it working insofar that I can open tabs on my blackberry and request a page, locating an input field by name and put some text in it
20:21 azawawi FROGGS: using the current Firefox webdriver or extended?
20:21 frozen01 hexdump myfile  -> [0a 41 0a]. But after perl6 -pe 's/^\n//' myfile|hexdump -> [0a 41 0a] again. Why??
20:21 FROGGS azawawi: would be nice though to have some short guides on how to set up firefox/chome/IE-testing
20:21 FROGGS azawawi: using a minimal blackberry wrapper of the ::Wire
20:21 azawawi FROGGS: sure
20:21 ufobat ha! :)
20:21 azawawi FROGGS++
20:22 FROGGS azawawi: ... because the blackberry device runs an http server accepting the selenium commands
20:22 * azawawi starts wiping the dust of Selenium:: :)
20:22 azawawi FROGGS: ok it is easy
20:22 FROGGS azawawi: on what type of os do you develop?
20:22 azawawi FROGGS: https://sites.google.com/a/chromium.org/chromedriver/downloads
20:23 azawawi FROGGS: linux + windows
20:23 FROGGS k, I've got ubuntu 15.10 and windows 7 x64
20:23 azawawi FROGGS: i have MacOS X access only through travis CI :(
20:23 FROGGS tried to get selenium+firefox running but failed
20:24 FROGGS will try to set up the chromedriver tomorrow... I'm really tired today
20:24 vendethiel joined #perl6
20:24 bartolin .tell timotimo (log message about [preauth] on hack) I investigated a bit and the log messages seem valid to me: nagios does not try to authenticate
20:24 yoleaux bartolin: I'll pass your message to timotimo.
20:25 dalek perl6-examples: 67cfab0 | (Shlomi Fish)++ | categories/euler/prob551-shlomif.p6:
20:25 dalek perl6-examples: Add my solution to Euler#551.
20:25 dalek perl6-examples:
20:25 dalek perl6-examples: Somewhat based on the python solution in
20:25 dalek perl6-examples: https://github.com/shlomif/project-euler , but somewhat cleaner and much
20:25 dalek perl6-examples: slower (sigh).
20:25 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/67cfab061e
20:26 bartolin .tell timotimo I see three alternatives: 1) disable checks for ssh from said monitoring server 2) give nagios an account on hack, so it can authenticate 3) live with the log messages or disable them. I dislike 2) ...
20:26 yoleaux bartolin: I'll pass your message to timotimo.
20:28 azawawi FROGGS: take care. Please send me an email when you want help :)
20:30 ufobat it seems like i dont get my "stack" code example any faster with concurrency, i tried to use race() now which is just slightly slower then my linear approach
20:31 azawawi FROGGS: I think Find::Bundled is not needed right now. Also we can get a startup boost if i use my shiny new LibZip module (since it is native)
20:32 FROGGS azawawi: sounds awesome :o)
20:35 TEttinger joined #perl6
20:36 azawawi RabidGravy: you know what... i wrote a lot of tests in https://github.com/azawawi/perl6-selenium-webdriver/tree/master/t :)
20:41 azawawi RabidGravy: so you bought the new RPi 3? :)
20:41 RabidGravy nah, not got round to it yet
20:44 timotimo thanks bartolin
20:44 yoleaux 20:24Z <bartolin> timotimo: (log message about [preauth] on hack) I investigated a bit and the log messages seem valid to me: nagios does not try to authenticate
20:44 yoleaux 20:26Z <bartolin> timotimo: I see three alternatives: 1) disable checks for ssh from said monitoring server 2) give nagios an account on hack, so it can authenticate 3) live with the log messages or disable them. I dislike 2) ...
21:00 rindolf joined #perl6
21:05 bazzaar joined #perl6
21:05 bazzaar \o
21:08 bazzaar hi, trying to strip out zero width char <U+200B> from txt processed and loaded with perl6 (as seen in psql shell)
21:09 Hotkeys rakudobrew says I can specify a panda version but I can't seem to get it to work
21:10 Hotkeys by work I mean do anything other than use the current version
21:10 bazzaar tried a few variations  on @aa[3] ~~ s:g/ '\u200b'​ //;  ... no luck, can anyone point me in the right direction please
21:11 hoelzro bazzaar: what about /\c[0x200b]/ ?
21:11 timotimo "panda version"?
21:11 Hotkeys idk
21:12 Hotkeys panda won't build for me recently
21:12 Hotkeys and I'm trying to diagnose
21:12 hoelzro m: say ord('o').base(16); say 'foo'.subst(/\c[0x006f]/, '', :g)
21:12 camelia rakudo-moar 595890: OUTPUT«6F␤f␤»
21:12 Hotkeys and the rakudobrew help said I can 'rakudobrew build panda [panda-ver]
21:12 Hotkeys '
21:12 Hotkeys wait
21:12 Hotkeys I think I got it
21:12 timotimo i wasn't aware we're versioning panda
21:12 bazzaar hoelzro: thankyou, I will try it out.
21:13 SCHAPiE_ joined #perl6
21:14 Hotkeys timotimo: git commit is what I was assuming
21:14 Hotkeys and am apparently correct
21:14 timotimo right
21:16 Hotkeys some part of shell::command broke for windows recently, at least for me
21:16 Hotkeys so panda is refusing to build because of that
21:16 timotimo oh, damn
21:17 Hotkeys I'm not sure how recently actually
21:17 jnthn m: say 'foo'.subst(/\x6f/, '', :g) # shorter way to write hex escapes in regex
21:17 camelia rakudo-moar 595890: OUTPUT«f␤»
21:17 Hotkeys but I currently can't build panda
21:17 Hotkeys and at some point in the past I was able to :p
21:18 Hotkeys I tried with a commit sha from 24 days ago before new stuff from Shell::Command was merged to the one that comes with panda
21:18 Hotkeys and it worked
21:18 Hotkeys so at most 24 days
21:19 Hotkeys oh
21:19 jevin joined #perl6
21:20 Hotkeys apparently 7 days ago something was done to shell::command to fix windows stuff
21:20 Hotkeys let's see if the new version makes panda happy
21:20 timotimo "fix" :)
21:21 adu joined #perl6
21:21 bazzaar hoelzro, jnthn: thankyou both for your help, you fixed my problem, and I learnt some new perl6 tricks
21:23 sno joined #perl6
21:35 sno joined #perl6
21:38 BooK joined #perl6
21:45 jevin joined #perl6
21:47 chkk joined #perl6
21:48 bjz joined #perl6
22:03 ugexe m: role Bar { method bar { 1; }; }; role Foo[::T] does T { }; say Foo[Bar].new.bar; # Why doesn't this just apply role ::T?
22:03 camelia rakudo-moar 595890: OUTPUT«Unhandled exception: Method 'item' not found for invocant of class 'T'␤   at <unknown>:1  (/home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm:print_exception:4294967295)␤ from gen/moar/m-CORE.setting:21498  (/home/camelia/rakudo-m-in…»
22:04 ugexe is it because of role punning?
22:04 SCHAAP137 joined #perl6
22:05 jnthn ugexe: A mix of timing and ignorance.
22:05 jnthn ugexe: The does executes at compile time when T is unknown, and it appears the composition thingy isn't clued in about the fact it might encounter a type variable
22:06 jnthn ugexe: Probably fixable...somehow.
22:08 ugexe i see. thanks
22:17 AlexDaniel joined #perl6
22:48 vendethiel joined #perl6
23:08 arc__ joined #perl6
23:08 arcetera joined #perl6
23:18 numba1stunnaz71 joined #perl6
23:19 laz78 joined #perl6
23:20 nadim joined #perl6
23:25 cpage_ joined #perl6
23:34 sno joined #perl6
23:38 stmuk_ https://www.alchemistowl.org/pocorgtfo/pocorgtfo11.pdf - a valid pdf and ruby webserver!
23:39 edehont joined #perl6
23:40 arc__ joined #perl6
23:40 arcetera joined #perl6

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

Perl 6 | Reference Documentation | Rakudo