Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-08

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:00 [Coke] OHAI am I off the hook?
00:00 yoleaux 7 Dec 2016 23:36Z <babydrop> [Coke]: seems like we found a volunteer to fill up the last spot (tbrowder) so you're off the hook for your article
00:00 [Coke] YAY
00:00 sufrostico joined #perl6
00:00 [Coke] tbrowder++ babydrop++
00:00 sufrosti1o joined #perl6
00:04 cognominal joined #perl6
00:04 kurahaupo_ joined #perl6
00:07 Actualeyes joined #perl6
00:15 skaji Hi!
00:15 skaji If I create a promise (eg: my $p = start {...}), do I have to wait it (i.e. await $p)? Or can I safely ignore it?
00:16 skaji As you know, if we use fork and create a child process, we have to wait it, otherwise it will exist as a defunct process. So I asked
00:21 pierre__ joined #perl6
00:22 babydrop skaji: safely ignore
00:22 babydrop skaji: I have 90% confidence in that answer :)
00:24 babydrop hm, 99% :) I just ran for ^1000 { start sleep 99999 } a few times and don't see any residuals in ps :)
00:24 pyrimidine joined #perl6
00:27 dalek mu: cad653a | (Will Coleda)++ | misc/perl6advent-2016/schedule:
00:27 dalek mu: tbrowder++ taking last open slot!
00:27 dalek mu: review: https://github.com/perl6/mu/commit/cad653a163
00:28 cpage_ joined #perl6
00:28 [Coke] m: say (0..0x1FFFF).sort(*.uniname.chars)[*-1].chr.uniname;
00:29 camelia rakudo-moar 0428b7: OUTPUT«ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM␤»
00:29 [Coke] huh.
00:29 skaji babydrop: thank you. It's true that I mentioned fok(2) and wait(2),
00:29 skaji but I'm worried about any resouce leaks around promises
00:30 skaji (we cannot be sure by ps(1), I think)
00:31 pyrimidine joined #perl6
00:38 cpage_ joined #perl6
00:41 babydrop skaji: but I start doesn't fork, it uses threads. I don't much about it, but in the last year that I've been here, I never saw anyone mention even once that starts had to be awaited to aboid zombies
00:47 skaji It's my bad about the example. please forget about fok/wait example.
00:48 skaji I'm just worried about any resouce leak in perl6 around promises.
00:48 skaji (away from IRC)
00:50 [Coke] ok. if you're really worried, please try them out, measure any leaks.
00:51 [Coke] But you probably don't need to be worried. Why are you worried?
00:51 canopus joined #perl6
00:52 cognominal joined #perl6
00:54 skaji If I create a long running program, I want to make sure no resouce leak occur.
00:55 sydney_falk joined #perl6
00:57 dalek doc: a50ac42 | coke++ | doc/Type/Cool.pod6:
00:57 synopsebot6 Link: http://doc.perl6.org/type/Cool
00:57 dalek doc: update uniname/uninames docs.
00:57 dalek doc:
00:57 dalek doc: jnthn++ - closes #1019
00:57 dalek doc: review: https://github.com/perl6/doc/commit/a50ac42f1f
01:06 geekosaur [08 00:41:12] <babydrop> skaji: but I start doesn't fork, it uses threads. I don't much about it, but in the last year that I've been here, I never saw anyone mention even once that starts had to be awaited to aboid zombies
01:06 geekosaur maybe on a buggy (or 2.4 kernel) linux. threads are not processes
01:07 geekosaur hm, but you might still leak threads in some sense, I guess. would that be a libuv bug, or are threads using POSIX APIs directly?
01:10 aborazmeh joined #perl6
01:10 aborazmeh joined #perl6
01:11 geekosaur POSIX threads do not necessarily have to be pthread_join()ed, it depends on the underlying implementation. in the old LinuxThreads hack, you did have to or you would leak clone()d processes
01:12 geekosaur in 2.6 and later kernels I don't know offhand, much less other OSes
01:14 Celelibi joined #perl6
01:16 babydrop ah
01:17 geekosaur some of them might leak only thread local storage, and for some of *those* that might just be malloc() blocks whose address was only "known" to that thread
01:18 [Coke] m: say Perl.new().perl;
01:18 camelia rakudo-moar 0428b7: OUTPUT«Perl.new(compiler => Compiler.new(id => "43B4C1CEBB4FDBD96A813C805EA0537FAB635F5B.1481146226.73448", release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => v2016.11.156.g.0428.b.79, signature => Blob, desc => Str), name …»
01:18 geekosaur but if threads are an abstraction via libuv (which they might well be; Windows threads are not POSIX threads) then you'd need to know what libuv requires to properly clean up a thread, and maybe that is already being done
01:21 pierre__ joined #perl6
01:22 babydrop New Advent Post: "Day 8 — How to Make, Use, and Abuse Perl 6 Subsets": https://perl6advent.wordpress.com/2016/12/08/how-to-make-use-and-abuse-perl-6-subsets/
01:22 cognominal joined #perl6
01:28 BenGoldberg joined #perl6
01:28 lucasb joined #perl6
01:30 Ben_Goldberg joined #perl6
01:30 lucasb m: say $*IN.slurp-rest.chars
01:30 camelia rakudo-moar 0428b7: OUTPUT«1134␤»
01:30 lucasb m: say $*ARGFILES.slurp.chars
01:30 camelia rakudo-moar 0428b7: OUTPUT«1134␤»
01:31 BenGoldberg m: dd $*IN
01:31 camelia rakudo-moar 0428b7: OUTPUT«IO::Handle <element> = IO::Handle.new(:path(IO::Special.new(what => "<STDIN>")),:chomp)␤»
01:31 BenGoldberg m: dd $*ARGFILES
01:31 camelia rakudo-moar 0428b7: OUTPUT«IO::ArgFiles.new(:path(Any),:chomp)␤»
01:32 lucasb with $*IN I have to use '.slurp-rest', but with $*ARGFILES, I have to use '.slurp'
01:32 lucasb $*IN.slurp and $*ARGFILES.slurp-rest gives error
01:32 BenGoldberg m: $*ARGFILES.readline.say
01:32 camelia rakudo-moar 0428b7: OUTPUT«No such method 'readline' for invocant of type 'IO::ArgFiles'␤  in block <unit> at <tmp> line 1␤␤»
01:32 BenGoldberg m: $*IN.readline.say
01:32 camelia rakudo-moar 0428b7: OUTPUT«No such method 'readline' for invocant of type 'IO::Handle'␤  in block <unit> at <tmp> line 1␤␤»
01:33 BenGoldberg m: $*IN.get.say
01:33 camelia rakudo-moar 0428b7: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
01:33 BenGoldberg m: $*IN.get.say
01:33 camelia rakudo-moar 0428b7: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
01:34 BenGoldberg m: say IO::ArgFiles ~~ IO::Handle
01:34 camelia rakudo-moar 0428b7: OUTPUT«False␤»
01:34 BenGoldberg m: say IO::ArgFiles.WHAT
01:34 camelia rakudo-moar 0428b7: OUTPUT«(ArgFiles)␤»
01:35 BenGoldberg wut?
01:35 geekosaur m: say IO::ArgFiles ~~ IO::Path
01:35 camelia rakudo-moar 0428b7: OUTPUT«False␤»
01:36 BenGoldberg Why did .WHAT produce (ArgFiles) instead of (IO::ArgFiles)?
01:36 geekosaur hm, it lied to you
01:36 geekosaur my class IO::ArgFiles is IO::Handle {
01:37 Unavowed joined #perl6
01:37 BenGoldberg s: $*ARGFILES, 'slurp', ()
01:37 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(IO::ArgFiles, Str, List); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
01:37 geekosaur however it's doing weird things internally to fake being a single Handle, which is probably why it fails
01:37 geekosaur right it has no slurp-rest, probably because it can't
01:38 BenGoldberg s: $*ARGFILES, 'slurp'
01:38 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/0428b79/src/core/IO/ArgFiles.pm#L124
01:38 geekosaur not the way it is currently implemented at least
01:38 lucasb for the record, locally IO::ArgFiles ~~ IO::Handle evaluates to true. camelia said False because of the restricted setting
01:39 lucasb geekosaur: my point is just in the inconsistency in naming
01:39 babydrop BenGoldberg: because .WHAT returns a type object, which when gisted shows only the shortname
01:39 babydrop Use .^name if you mean the name
01:39 lucasb I belive that $*IN.slurp-rest and $*ARGFILES.slurp works exactly the same
01:40 BenGoldberg m: say IO::Handle
01:40 camelia rakudo-moar 0428b7: OUTPUT«IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method gist at src/RESTRICTED.setting line 33␤  in block <unit> at <tmp> line 1␤␤»
01:40 babydrop m: say Supplier::Preserving
01:40 camelia rakudo-moar 0428b7: OUTPUT«(Preserving)␤»
01:40 lucasb I mean, in this case, I had to be explicity inconsistent in methods names, because of the way the classes were written
01:40 geekosaur lucasb, those two do not, but ArgFiles slurp-rest could sanely be an alias for slurp
01:41 geekosaur that is, slurp for ArgFiles is not the same as slurp for an actual Handle
01:41 lucasb yes, is slurps *all* the files
01:41 lucasb ... in the argument list
01:41 geekosaur yes, which  means it slurps them into a list and concatenates the list
01:42 geekosaur (I hope that's lazy, or that's going to bite someone HARD at some point)
01:42 geekosaur actually it slurp-rest-s them, but note that it is working on *multiple* handles, not just one
01:42 geekosaur potentially
01:43 geekosaur in the precise case of no parameters, yes, it is "exactly" the same. in any other case, it is not the same
01:44 tbrowder ok, anyone wanting a preview and chance to critique the 12 Dec P6 Advent can see my blog gist on github.
01:46 pierre__ joined #perl6
01:47 babydrop tbrowder: what's the URL?
01:50 * BenGoldberg wonders how to concatenate a list lazily.
01:51 MasterDuke BenGoldberg: gather/take maybe?
01:52 geekosaur well, what it actually does is open every argument file and slurp-rest it, then reduce the resulting list with [~]
01:53 BenGoldberg Suppose I've got a Range, such as ^Inf.  How would I produce the [~] of that Range, without things blowing up?
01:53 geekosaur I am afraid to ask what happens if someone does $*ARGFILES.slurp in a script passed several 1TB files :)
01:54 * BenGoldberg thinks they get a frikkin big string.
01:54 babydrop BenGoldberg: produce to... what end?
01:55 babydrop I mean, you can't finish "producing" an infinite string.
01:55 babydrop I think the Cat type is supposed to be for something like that, innit?
01:55 kaare_ joined #perl6
01:55 babydrop Or FatCat
01:56 babydrop Yeah: https://design.perl6.org/S32/Containers.html multi cat ( @values --> Cat )
01:57 babydrop Returns a Cat object, a concatenated version of the list that does the Str interface, but generates the string lazily to the extent permitted by the pattern of access to the string.
01:57 babydrop m: cat
01:57 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    cat used at line 1. Did you mean 'cas'?␤␤»
01:57 babydrop NIY
01:57 BenGoldberg The common term in computer science for a String-like class which actually contains a list of strings internally is a Rope.
02:03 BenGoldberg A Rope created by slurping an ArgFiles should be able to lazily (without reading every single file into memory) do anything a Str can do, *except* .chars, .ords, .rindex, .end-with, or other methods which naturally need the end of the string.
02:10 samcv is there any case you have ` = <` where the < is not the start of <this> style quoting?
02:10 samcv can anybody think of any?
02:10 kalkin- joined #perl6
02:11 samcv need to make sure if i add this syntax highlighting rule that i don't accidently run highlighting for the entire rest of the document
02:11 geekosaur I think not, it would be Two Terms In A Row
02:11 samcv yeah that's what i thought
02:11 BenGoldberg m: say <$IO>;
02:11 camelia rakudo-moar 0428b7: OUTPUT«$IO␤»
02:11 BenGoldberg m: say <$*IO>;
02:11 camelia rakudo-moar 0428b7: OUTPUT«$*IO␤»
02:11 geekosaur although... someone might conceivably come up with something, actually
02:12 * BenGoldberg wonders if maybe that should produce a warning that you're trying to do a perl5-style readline.
02:13 samcv that sounds like it would have to check any < > quoted string to make sure it didn't have that?
02:13 geekosaur samcv, it's safe to do that
02:13 geekosaur m: sub term:<*($a, $b) {$a + $b} say 1 <* 3
02:13 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at <tmp>:1␤------> 3sub term:<*($a, $b) {$a + $b} say 1 <* 37⏏5<EOL>␤    expecting any of:␤        colon pair␤   …»
02:13 geekosaur m: sub term:<*($a, $b) {$a + $b}; say 1 <* 3
02:13 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at <tmp>:1␤------> 3ub term:<*($a, $b) {$a + $b}; say 1 <* 37⏏5<EOL>␤    expecting any of:␤        colon pair␤   …»
02:13 * BenGoldberg shrugs.  I think people would figure out what they're dong wrong ;)
02:13 geekosaur oh, I did that wrong, wait
02:13 MasterDuke m: "foo123bar" ~~ /$<num> = <digit>+/; say $<num>
02:13 camelia rakudo-moar 0428b7: OUTPUT«[「1」 「2」 「3」]␤»
02:13 geekosaur m: sub term:<< <* >>($a, $b) {$a + $b}; say 1 <* 3
02:13 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3erm:<< <* >>($a, $b) {$a + $b}; say 1 <*7⏏5 3␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤    …»
02:14 geekosaur m: sub infix:<< <* >>($a, $b) {$a + $b}; say 1 <* 3
02:14 camelia rakudo-moar 0428b7: OUTPUT«4␤»
02:14 samcv this isn't applied inside regex almost certain but i'll double check that
02:14 BenGoldberg m: sub infix:[ <* ] { $^a + $^b }; say 4 <* 5;
02:14 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at <tmp>:1␤------> 3 infix:[ <* ] { $^a + $^b }; say 4 <* 5;7⏏5<EOL>␤    expecting any of:␤        quote words␤  …»
02:14 geekosaur ok, you have a potential problem :)
02:14 BenGoldberg m: sub infix:<< <* >> { $^a + $^b }; say 4 <* 5;
02:14 camelia rakudo-moar 0428b7: OUTPUT«9␤»
02:14 BenGoldberg m: sub prefix:<< <* >> { $^a }; my $foo = <* 5;
02:14 camelia rakudo-moar 0428b7: ( no output )
02:15 geekosaur right, so several ways it could happen, none in stock rakudo
02:15 samcv damn.
02:16 BenGoldberg I think it's reasonable for syntax highlighters to ignore infix/prefix/etc subs.
02:16 samcv this is going to be hard to get that quoting working over multiple lines
02:16 samcv my $foo = <* 5; this would match
02:16 samcv hmm but that's not a stock operator though... hmm
02:17 BenGoldberg If you want it to work "perfectly", you'll have to actually parse the code the same way Rakudo does...
02:17 samcv my $swap = <-> $a, $b { ($a, $b) = ($b, $a) };
02:17 samcv this though
02:18 samcv though that's a special case I could add in since it's an operator. though it might already highlight as an operator, i'll have to check
02:18 geekosaur that one even if it misparses is safe, though
02:18 samcv yeah that one conflicts
02:18 geekosaur but I don't think <- can happen
02:18 samcv for sure
02:18 BenGoldberg Of course nothing prevents you from using STD.pm, and supplying your own actions object to generate highlighted text from the parse tree.
02:19 samcv atom doesn't support that though
02:19 samcv it's basically regex based but you can have recursive rules and stuff
02:20 samcv and include 'rules' that you create by name to apply to a matched section
02:20 * BenGoldberg is guessing that this 'atom' of which you speak is not the 'atom' which competes with RSS.
02:20 samcv yesterday i got all the q/qq/Q quoting constricts generating from a script, where i have an array with a ton of quoting constricts heh
02:20 geekosaur atom.io
02:21 geekosaur wannabe javascript's answer to emacs :p
02:21 samcv heh
02:21 geekosaur (ok, coffeescript...)
02:21 samcv i wish it wasn't based on electron but. i like it. and coding in vim is not fun
02:21 samcv haha geekosaur
02:21 samcv so i can trivially add new delimiters for both #`( and q( ). so that's great. will save me so much time
02:22 samcv applying fixes to all of them, since Q qq and q all need seperate rules
02:23 samcv but it uses ruby's regex engine, the oniguruma library for the syntax highlighting. and uses the same type grammars as textmate
02:23 samcv though the file is in CSON instead of mac plist style xml
02:23 samcv which idk if is a good thing. because having to escape things for all the regex twice sucks
02:24 samcv i just have a from-json and to-json p6 executable using JSON::Tiny to unescape and reescape things
02:24 samcv because you have the CSON escaping... then you have to do the escaping for the regex
02:24 samcv and both have seperate things needing escaping
02:25 BenGoldberg So atom has node.js integrated into it... which means you can use node.js's child_process module to start external programs.  Which means you can run perl6 from within atom!
02:26 samcv yep
02:26 pyrimidine joined #perl6
02:26 samcv i've never programmed node.js or javascript before though
02:26 tbrowder babydrop: https://gist.github.com/tbrowder/4d0091ca6ef87863e43e4b32fce640a7
02:26 samcv i might need to learn so i can make atom the best editor for perl 6
02:27 samcv mostly just so there is some editor that is awesome for perl6
02:27 BenGoldberg Since perl6 can parse perl6 far more easily than atom can, why not run an external perl6 program to read and parse the file in the editor, and capture it's output?
02:28 samcv that won't let me get syntax highlighing though.. since they're sorta seperate parts
02:28 samcv the syntax grammars and the rest of it
02:28 samcv plus that sounds slow :P
02:28 samcv idk maybe there is someee way to do it but
02:29 BenGoldberg Hmm... so your highlighter is *only* allowed regex, and not arbitrary code?  That sux.
02:29 seatek joined #perl6
02:29 samcv well. it works actually awesomely. but
02:29 samcv would be nice if there were more things
02:30 samcv BenGoldberg, check out the changelog https://github.com/samcv/language-perl6fe/blob/master/CHANGELOG.md for the last 3 weeks i've been working on it
02:30 samcv so sure it's not optimal.. but usually you can work around not being able to do anything non regex, since you can have subrules
02:31 samcv though i wish it were documented better. partially learning as i go along
02:34 samcv the biggest problem is not being able to do variable length lookbehind
02:34 samcv tbqh
02:35 * BenGoldberg is looking at your README.md, and your screenshots.  Your font has a very strange way of showing @
02:35 pierre__ joined #perl6
02:36 samcv i still don't know how i'm going to deal with not being able to do \s* positive lookbehind though
02:36 samcv ahhh
02:37 samcv though technically i could do (?=\s|\s\s|\s\s\s\s...)
02:38 samcv i have been considering doing that actually.. unless somebody knows how to do such a thing in only rubyish regex
02:38 samcv oh and i can't do \s*(capture here) either, because then the \s* gets included in the match :P
02:39 samcv though i guess i 'could' highlight blankspace but that's kind of dumb
02:39 samcv may interfere with other matches below it not sure
02:41 xtreak joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:56 samcv actually... i can use \K to discard text before that point in the string. that will work.
02:59 pierre__ joined #perl6
03:02 SmokeMachine____ What format should I write for the advent calendar? Markdown? Pod? HTML? Or what?
03:03 mspo wordpress-ese
03:10 SmokeMachine____ So, should I enter the text on a wordpress' post entry page?
03:11 bisectable6 joined #perl6
03:11 committable6 joined #perl6
03:12 evalable6 joined #perl6
03:12 unicodable6 joined #perl6
03:13 pecastro joined #perl6
03:17 noganex joined #perl6
03:22 cognominal joined #perl6
03:40 cdg joined #perl6
03:45 Ben_Goldberg joined #perl6
03:46 sunnavy joined #perl6
03:48 Ben_Goldberg joined #perl6
03:50 zt joined #perl6
03:53 pierre__ joined #perl6
03:56 pierre__ joined #perl6
04:00 BenGoldberg joined #perl6
04:11 Sgeo joined #perl6
04:12 pierre__ joined #perl6
04:15 pierre__ joined #perl6
04:42 pyrimidine joined #perl6
04:45 xtreak joined #perl6
04:47 pierre__ joined #perl6
05:03 giraffe joined #perl6
05:03 giraffe joined #perl6
05:07 cognominal joined #perl6
05:27 brillenfux joined #perl6
05:31 pyrimidine joined #perl6
05:32 xtreak joined #perl6
05:35 Sgeo_ joined #perl6
05:39 mawkish joined #perl6
05:39 girafe2 joined #perl6
05:52 Sgeo joined #perl6
05:54 Cabanossi joined #perl6
05:54 zgrep left #perl6
05:59 pierre__ joined #perl6
06:05 cognominal joined #perl6
06:19 b7j0c joined #perl6
06:19 darutoko joined #perl6
06:19 xtreak joined #perl6
06:20 tyil samcv: atom wont be a best editor for anything tho
06:20 b7j0c perl6: my uint8 $u = 65535;
06:20 camelia rakudo-jvm 8ca367: OUTPUT«Error while reading '/home/camelia/p6eval-token': No such file or directory at /home/camelia/rakudo-j-inst/bin/eval-client.pl line 10.␤»
06:20 camelia ..rakudo-moar 0428b7: ( no output )
06:20 b7j0c perl6: my uint8 $u = 65535;
06:20 camelia rakudo-moar 0428b7, rakudo-jvm 8ca367: ( no output )
06:20 b7j0c perl6: my uint8 $u = 65535; say $u;
06:20 camelia rakudo-jvm 8ca367: OUTPUT«65535␤»
06:20 camelia ..rakudo-moar 0428b7: OUTPUT«255␤»
06:23 wamba joined #perl6
06:24 cognominal joined #perl6
06:27 aborazmeh joined #perl6
06:27 aborazmeh joined #perl6
06:30 xtreak joined #perl6
06:39 Tonik joined #perl6
06:40 bjz joined #perl6
06:41 xtreak joined #perl6
06:41 cibs joined #perl6
06:42 dalek ecosystem: df64bd8 | (Asato Wakisaka)++ | META.list:
06:42 dalek ecosystem: add SQL::NamedPlaceholder to ecosystem.
06:42 dalek ecosystem: ref: https://github.com/astj/p6-SQL-NamedPlaceholder
06:42 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/df64bd8c56
06:42 dalek ecosystem: ea32246 | Altai-man++ | META.list:
06:42 dalek ecosystem: Merge pull request #271 from astj/add-sql-namedplaceholder
06:42 dalek ecosystem:
06:42 dalek ecosystem: Add SQL::NamedPlaceholder
06:42 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ea32246376
06:51 RabidGravy joined #perl6
06:53 FROGGS joined #perl6
06:54 cognominal joined #perl6
06:56 domidumont joined #perl6
07:06 CIAvash joined #perl6
07:09 bjz joined #perl6
07:10 moritz tbrowder: if you don't have access to the p6advent blog yet, please /msg me your email address. Thanks!
07:24 domidumont joined #perl6
07:29 domidumont joined #perl6
07:31 fatguy joined #perl6
07:41 fatguy is this the right channel to ask about rakudo-star docker image ? i have a problem can't run docker run -it rakudo-star -e 'say "Hello!"'
07:49 FROGGS should be the right channel, yes
07:50 cognominal joined #perl6
07:54 labster joined #perl6
07:56 fatguy great, in the web documentation it show it can run the command, but it failed with exec: "-E": executable file not found in $PATH
07:56 fatguy https://hub.docker.com/_/rakudo-star/
07:57 CIAvash joined #perl6
07:57 fatguy sorry its : exec: "-e": executable file not found in $PATH
07:57 FROGGS I'm not a docker expert and last time I tried I had problems too and gave up
07:58 FROGGS ohh
07:58 brrt hmmm
07:58 FROGGS can you try this: docker run -it rakudo-star perl6 -e 'say "Hello!"'
07:59 brrt waitaminute, isn't -e interpreted as 'entrypoint' for docker
07:59 FROGGS is it?
07:59 FROGGS I dunno
07:59 FROGGS then the error message makes no sense to me
07:59 brrt let me check
08:01 brrt hmm, not entirely sure, it is --entrypoint
08:01 brrt so i'm not sure what -e does
08:01 timotimo so docker run -it rakudo-star -- perl6 -e 'say "hello!"'? or maybe put it into quotes?
08:01 timotimo apparently it's trying to execute -e as the executable
08:01 fatguy it can now with : docker run -it rakudo-star perl6 -e 'say "Hello!"'
08:01 brrt yeah, suspected as much
08:02 fatguy great, thanks
08:02 brrt :-)
08:18 ufobat joined #perl6
08:19 g4 joined #perl6
08:26 wamba joined #perl6
08:27 zakharyas joined #perl6
08:38 cognominal joined #perl6
08:40 cibs joined #perl6
08:40 dakkar joined #perl6
08:41 Alikzus joined #perl6
08:42 samcv which part of rakudo is running 'chdir'? it seems that bad things happen if the folder the shell is in does not exist
08:43 timotimo we don't chdir, because we are multithreaded and the cwd is a thing that only exists once per process
08:43 timotimo hm. at least we do that on the jvm
08:43 samcv err yeah i mean gets the current directory or whatever
08:43 samcv shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
08:43 timotimo oh, ok
08:43 samcv this is what i get running perl6 -e
08:43 timotimo we do actually have chdir in moarvm
08:44 samcv yeah there should be some check to make sure the directory exists before trying to do something to it. it assumes the cwd exists
08:44 samcv and just either prints an error out or just goes into a loop
08:44 samcv of error messages
08:45 timotimo hm. we don't allow you to chdir into something that doesn't exist, right?
08:45 timotimo at what point should we do the check for current-directory-existingness?
08:45 samcv at least when it starts
08:45 samcv not sure if it will error if you delete the cwd while it's running
08:46 samcv i'm guessing not. but at least startup sounds important
08:46 timotimo ok so the test plan is "mkdir remove-this; cd remove-this; rm -r ~/remove-this; perl6 -e 'say q/hi/'"?
08:46 samcv yeah
08:47 timotimo timo@schmand ~/delete-this> rm -rf ~/delete-this/
08:47 timotimo fish: getcwd() failed with errno 2/No such file or directory
08:47 timotimo %)
08:48 samcv is that a shell error you're getting?
08:48 timotimo yes, fish is my shell
08:48 samcv or is that the moar error
08:49 samcv perl
08:49 samcv err oops. didn't mean to type here
08:57 pmurias joined #perl6
08:57 nine nine@sphinx:~> mkdir remove-this; cd remove-this; rm -r ~/remove-this; perl6 -e 'say q/hi/'
08:57 nine shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
08:57 nine hi
08:58 nine Looks like perl6 does better at this than bash?
08:58 pmurias anyone wants to run roast/S32-num/power.t on Mac OS X? I want to check if a Mac OS X specific bug has been fixed
09:06 samcv nine, you mean regarding the directory thing?
09:06 rindolf joined #perl6
09:06 timotimo i think the shell-init thing is happening before rakudo even comes up?
09:07 samcv well
09:07 samcv you can run python, irb etc and have no issues. that shell-init eror is just one generated by the shell, but the shell continues to operate fine
09:08 nine Oohh...it's because perl6 is a shellscript!
09:08 timotimo ah, of course
09:08 samcv oh no
09:08 xtreak joined #perl6
09:09 nine > mkdir remove-this; cd remove-this; rm -r ~/remove-this; /home/nine/rakudo/install/bin/moar  --execname="perl6" --libpath="/home/nine/rakudo/install/share/nqp/lib" --libpath="/home/nine/rakudo/install/share/perl6/lib" --libpath="/home/nine/rakudo/install/share/perl6/runtime" /home/nine/rakudo/install/share/perl6/runtime/perl6.moarvm -e 'say q/hi/'
09:09 nine hi
09:09 timotimo hi nine
09:09 nine :)
09:09 samcv yeah it starts fine if I run #!/bin/sh
09:09 samcv exec /home/samantha/perl6/bin/moar  --execname="$0" --libpath="/home/samantha/perl6/share/nqp/lib" --libpath="/home/samantha/perl6/share/nqp/lib" --libpath="/home/samantha/perl6/share/perl6/lib" --libpath="/home/samantha/perl6/share/perl6/runtime" /home/samantha/perl6/share/perl6/runtime/perl6.moarvm "$@"
09:09 samcv that whole thing
09:09 timotimo yeah
09:09 brrt another fine argument for having a compiled-binary perl6 :-)
09:10 timotimo yeah :3
09:10 samcv yeah.. i could see this biting somebody in the ass
09:10 samcv if it were a long running program or something
09:10 samcv that was cd'd into a nonexistant dir, or even otherwise
09:10 samcv then it tries to launch another perl6 program from in it
09:11 timotimo if we compile in the complete invocation, it'll also look a whole lot nicer in htop and ps
09:11 samcv yeah
09:12 timotimo because the whole four libpaths thing won't gobble up so much screen real estate that you have to scroll sideways for a minute before you see what the p6 file being run actually is
09:13 zakharyas joined #perl6
09:15 rurban joined #perl6
09:18 pierre__ joined #perl6
09:24 jonas1 joined #perl6
09:29 bjz_ joined #perl6
09:35 tadzik m:  class Awesome { has $.awesomeness-level }; my $obj1 = Awesome.new: :10000awesomeness-level;
09:35 camelia rakudo-moar 0428b7: ( no output )
09:35 tadzik wat
09:35 tadzik how does that parse :o
09:35 timotimo what wat?
09:35 timotimo you remember :2nd?
09:35 timotimo and :3rd?
09:36 tadzik oh
09:36 tadzik yeah
09:36 timotimo that's how :)
09:36 timotimo i'm glad this rule exists, because it's pretty and cool
09:42 moritz "you think this is cute today" :-)
09:47 arnsholt Hehe
09:48 arnsholt My favourites are :1rd :2st and :3nd
09:48 timotimo m: say (:-10th)
09:48 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3say (:7⏏5-10th)␤    expecting any of:␤        colon pair␤»
09:48 timotimo ^-  ;(
09:50 pmurias joined #perl6
09:51 xtreak joined #perl6
09:51 pyrimidine joined #perl6
09:53 cognominal joined #perl6
09:56 cibs joined #perl6
09:58 Ven joined #perl6
10:01 mawkish joined #perl6
10:03 cibs joined #perl6
10:03 wamba joined #perl6
10:07 Ven joined #perl6
10:13 arnsholt timotimo: I wonder why negative numbers aren't allowed. Rakudo-bug, or intentional limitation in the grammar for some reason?
10:13 timotimo yeah, good question. clearly the rule is implemented as "when you have a number after the :, it's that"
10:14 timotimo but number as in "\d"
10:15 moritz m: say (:5.5th)
10:15 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed radix number␤at <tmp>:1␤------> 3say (:57⏏5.5th)␤    expecting any of:␤        number in radix notation␤»
10:15 timotimo also interesting
10:17 jnthn Intentionally only for positive integers, afaik
10:17 moritz in base ten, no less :-)
10:19 jnthn Given people find the form confusing enough already when used beyond :1st/:2nd/:3th, I'm not sure expanding further on it is going to curry much favor. :P
10:20 timotimo hmm
10:20 timotimo could definitely be put into a slang, though :)
10:20 moritz curry
10:20 moritz hm
10:20 moritz time for lunch pretty soon... :-)
10:20 jnthn Also I think there's a ambiguity if you allow complex numbers :P
10:20 jnthn *an
10:21 jnthn Oh, and exponents too :)
10:21 moritz or hex numbers
10:21 jnthn Oh yes :)
10:22 jnthn m: say :0xBEEF
10:22 camelia rakudo-moar 0428b7: OUTPUT«Unexpected named argument 'xBEEF' passed␤  in block <unit> at <tmp> line 1␤␤»
10:22 timotimo aaw man
10:22 jnthn m: dd :0xBEEF
10:22 camelia rakudo-moar 0428b7: OUTPUT«block <unit>␤»
10:22 jnthn uh
10:22 jnthn m: say :0xBEEF .perl
10:22 camelia rakudo-moar 0428b7: OUTPUT«:xBEEF(0)␤»
10:22 jnthn Nice :P
10:22 timotimo ah, dd has a thing where with no parameters it says where it is?
10:22 timotimo m: dd
10:22 camelia rakudo-moar 0428b7: OUTPUT«block <unit>␤»
10:23 jnthn Yeah, but it's a sub so I'm surprised it both accepts named parameters (not the default for a sub) and then ignores them...
10:24 bjz joined #perl6
10:40 wamba joined #perl6
10:41 dogbert17_ joined #perl6
10:41 dogbert17_ o/
10:41 dogbert17_ any speshialists around?
10:42 * dogbert17_ the silence is deafening :)
10:44 dogbert17_ RT #130294 works if spesh is disabled
10:44 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130294
10:46 AlexDaniel joined #perl6
10:51 timotimo could you try disabling spesh a bit more fine-grainedly?
10:52 timotimo as in, first turn off SPESH_INLINE, then SPESH_OSR, then both?
10:52 timotimo and maybe see if disabling only the JIT will also cause it to still explode
11:04 AlexDaniel m: say :10<15_x>
11:04 camelia rakudo-moar 0428b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid base-10 character '_': 157⏏5_x. Please use one of 0..9␤at <tmp>:1␤------> 3say :10<15_x>7⏏5<EOL>␤»
11:04 AlexDaniel LTA :/
11:07 timotimo indeed
11:08 jnthn How so? It says which char it didn't like and shows the exact location and tells you what to use?
11:08 pmurias jnthn: it says it doesn't like '_' while it really doesn't lik 'x'
11:08 jnthn No, it doesn't like _ either
11:08 jnthn m: say :10<15_000>
11:08 camelia rakudo-moar 0428b7: OUTPUT«15000␤»
11:08 jnthn Oh...I didn't know you could do that
11:08 jnthn OK, fair enough :)
11:09 cognominal joined #perl6
11:09 rurban joined #perl6
11:09 babydrop m: use nqp; say nqp::radix_I(16, '15_x', 0, 0)[2]
11:09 camelia rakudo-moar 0428b7: OUTPUT«===SORRY!===␤Arg count 4 doesn't equal required operand count 6 for op 'radix_I'␤»
11:09 babydrop m: use nqp; say nqp::radix(16, '15_x', 0, 0)[2]
11:09 camelia rakudo-moar 0428b7: OUTPUT«2␤»
11:09 babydrop m: use nqp; say nqp::radix(16, '15_x', 0, 0)[0]
11:09 camelia rakudo-moar 0428b7: OUTPUT«21␤»
11:10 AlexDaniel babydrop: hey, wanna see a trick?
11:10 babydrop m: use nqp; say nqp::radix(10, '15_x', 0, 0)[0]
11:10 camelia rakudo-moar 0428b7: OUTPUT«15␤»
11:10 AlexDaniel m: say :10<2*3**4>
11:10 camelia rakudo-moar 0428b7: OUTPUT«162␤»
11:10 babydrop Nope
11:10 AlexDaniel well, there you go anyway :P
11:10 babydrop m: use nqp; say nqp::radix(10, '15_000', 0, 0)[0]
11:10 camelia rakudo-moar 0428b7: OUTPUT«15000␤»
11:11 babydrop m: use nqp; say nqp::radix(16, '15x', 0, 0)[2]
11:11 camelia rakudo-moar 0428b7: OUTPUT«2␤»
11:11 babydrop Well, the error's not in my code at least :}
11:11 babydrop Makes sense since 15_ is not valid, so it stops there.
11:12 babydrop AlexDaniel: it's kinda strange that with all the weird stuff that form supports that it doesn't support basic negatives
11:12 pmurias jnthn: is 'use nqp' or 'use MONKEY-GUTS' the recommended form?
11:14 * babydrop lickbates "Day 8 — How to Make, Use, and Abuse Perl 6 Subsets": https://perl6advent.wordpress.com/2016/12/08/how-to-make-use-and-abuse-perl-6-subsets/
11:15 * timotimo already licked that earlier today
11:15 AlexDaniel m: say :10<0o1_2.3_4*0b1_0**0x4>
11:15 camelia rakudo-moar 0428b7: OUTPUT«167␤»
11:17 AlexDaniel babydrop: but I see no bugs so far :)
11:18 jnthn pmurias: Well, `use nqp` is certainly more explicit about what you expect
11:18 jnthn And a lot shorter to type :)
11:19 zakharyas joined #perl6
11:19 donaldh joined #perl6
11:20 pmurias jnthn: was wondering if rakudo should suggest the user to use 'use MONKEY-GUTS' instead of 'use nqp' when it sees a nqp:: call
11:21 * nine likes how the latest 2 Inline::Perl5 bug reports could be resolved by "There's no bug there at all." and "It's a bug in the Perl 5 module you use."
11:22 timotimo hah
11:24 jnthn pmurias: I'm happy enough with `use nqp`. I mean, conceivably some future implementation could expose a completely different set of guts.
11:28 NeuralAnomaly joined #perl6
11:30 AlexDaniel babydrop: so um… where did your comments go?
11:32 babydrop AlexDaniel: I've used my connections to remove them.
11:32 babydrop "* babydrop blocks out all of LP6 drama and focuses on code from now on"
11:32 pmurias m: "-10.3x1".parse-base(10)
11:32 camelia rakudo-moar 0428b7: OUTPUT«Invalid base-10 character '1': 10.3x7⏏1. Please use one of 0..9␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
11:32 AlexDaniel yea but the first one was kinda nice
11:32 AlexDaniel :)
11:33 pmurias AlexDaniel: ^^ a related error somewhere else in the code
11:33 timotimo huh, what is LP6?
11:33 AlexDaniel pmurias: haha
11:34 babydrop Keep laughing! Just wait until you need tech support :P
11:34 AlexDaniel m: ‘-10.3z’.parse-base(10)
11:34 camelia rakudo-moar 0428b7: OUTPUT«Invalid base-10 character '': 10.3z7⏏. Please use one of 0..9␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
11:34 babydrop I suspect that's failing to account for the minus
11:34 AlexDaniel yup
11:35 babydrop timotimo: a book
11:35 pmurias babydrop: yes, found that looking from the code and seeing bugs in math where the exception is thrown
11:35 babydrop :)
11:36 timotimo oooh that thing
11:36 donaldh joined #perl6
11:42 AlexDaniel yea… yea… ok RT does not like unicode
11:43 babydrop Wow, far out. titsuki++ is running a Japanese Perl 6 Advent: http://qiita.com/advent-calendar/2016/perl6
11:43 * AlexDaniel clicks 「Download (untitled)」 … ok that's a bit better
11:44 timotimo sweet
11:45 lucasb joined #perl6
11:46 pyrimidine joined #perl6
11:46 noganex_ joined #perl6
11:48 zakharyas joined #perl6
11:50 pmurias if brian d foy doesn't get the tpf grant does he write the book (or was the grant intended just add the money to the kickstarter campaign if it wasn't full)?
11:54 cognominal joined #perl6
11:55 samcv something i just discovered is that Linenoise doesn't support unicode either
11:55 * moritz has no idea
11:55 samcv though readline does
11:56 samcv if you try and backspace a unicode char with too many bytes it just totally garbles the whole line, and pressing enter will get malformed utf errors
11:56 samcv rlwrap or readline work fine tho
11:57 timotimo yeah, we can make linenoise do pretty "funny" things with backspace ;(
11:57 samcv i'm not sure, i don't have a linenoise package on my system installed other than the p6 module. does it include linenoise with it? i thought it didn't
11:58 samcv and was just bindings but
11:58 lukaramu joined #perl6
11:58 timotimo i think the linenoise perl6 package brings source code it compiles along with it
11:58 samcv oh it does seem to have the .so file in the module
11:58 samcv well there's a utf-8 fork of linenoise
11:59 AlexDaniel … just use readline then? :)
11:59 samcv haha
11:59 samcv but then no tab completion
11:59 samcv and Linenoise is in Star right?
11:59 samcv not readline?
12:01 timotimo um, don't we have tab completion in linenoise?
12:02 samcv that's what i meant
12:03 samcv AlexDaniel, said to use readline then :P
12:03 timotimo don't we also have tab completion in readline?
12:03 samcv gonna try out the utf-8 fork
12:03 samcv no
12:04 timotimo damn it :<
12:04 AlexDaniel hmmm… tab completion of what?
12:05 pmurias why doesn't linenoise accept utf-8 by default?
12:05 AlexDaniel actually, readline functionality is gone now…
12:06 AlexDaniel ahhh no
12:06 samcv gonna try the utf-8 fork. it's supposed to be able to do unicode 9 even
12:06 AlexDaniel I just had to wait a minute
12:06 samcv pmurias, it's a long standing bug
12:06 samcv bug was opened in 2012
12:07 * pmurias thought Linenoise was a pure Perl 6 thing but it's a binding :/
12:07 CIAvash joined #perl6
12:08 timotimo linenoise was created because "readline is too fat, we can't possibly need as much code for basic readline functionality"
12:08 timotimo and then reality hit :(
12:08 FROGGS joined #perl6
12:12 lucasb dogbert17, dogbert17_: hi, are you around?
12:14 pmurias timotimo: the linenoise README doesn't make it look like a quality piece of code :/
12:15 timotimo oh?
12:16 dogbert17_ lucasb: I'm around intermittently, pretending to do some $work
12:16 lucasb dogbert17_: did you has a 32 bit machine? I tried to reproduce your snippet
12:16 lucasb I get a segfault too
12:16 dogbert17_ I do indeed
12:17 dogbert17_ will try the disable thingies that timotimo suggested unless someone, e.g. AlexDaniel, has already done that
12:17 timotimo thanks
12:17 timotimo i was about to ask that :)
12:18 lucasb dogbert17_: can you try to reproduce if these still segfaults for you? https://gist.github.com/anonymous/b32db0a4841361a1a33553377ed0eafd
12:18 mr-foobar joined #perl6
12:19 lucasb I can make them segfault in my 32 bit machine, but not in camelia :|
12:19 timotimo well, camelia runs on a 64bit system
12:19 lucasb timotimo: right, as I expected :)
12:20 lucasb dogbert17_: both snippets fail here. the subroutines are kind of nonsensical... I was just trying to golf your example a little bit more
12:21 lucasb disable thingies that timotimo? I disabled spesh, but it made no difference, still segfaults
12:22 timotimo MVM_SPESH_INLINE_DISABLE MVM_SPESH_OSR_DISABLE MVM_JIT_DISABLE
12:22 timotimo trying those out
12:22 lucasb will do, thanks
12:23 lucasb timotimo: just doing '$ MVM_SPESH_INLINE_DISABLE=1 MVM_SPESH_OSR_DISABLE=1 MVM_JIT_DISABLE=1 perl6 file.pl' is enough?
12:23 tokomer joined #perl6
12:23 pmurias .oO(maybe if linenoise wast 1100 lines of Perl 6 instead of C it might actually work properly?)
12:23 timotimo please try different combinations
12:23 timotimo all of those are independent of each other
12:23 lucasb ah, ok :D lol
12:24 lucasb env vars with huge names :)
12:24 samcv ok well their example works fine with utf-8 in this branch
12:25 timotimo well, we've got an idea what to do about the problem, then?
12:25 rurban joined #perl6
12:25 samcv but i think it's not getting compiled in. need to change the gcc flags idk
12:25 dogbert17_ lucasb: your first example segfaults
12:26 dogbert17_ lucasb: thx for helping out
12:26 lucasb since I'm on a 32 bit and there's no JIT for this platform, I guess MVM_JIT_DISABLE=1 doesn't make a difference (?)
12:26 lucasb dogbert17_: thank you for reporting the issue
12:27 timotimo ah, you're right about that
12:28 dogbert17_ lucasb: the program I used is my attempt to golf my solution to Project Euler Problem 28, I use it to keep track of lizmat's awesome array optimization work
12:29 lucasb dogbert17_: I think I solved #28 in other language :) let me see...
12:30 dogbert17_ lucasb: a shaped array turned out to be useful to my solution, took almost 7 minutes a few months ago but after lizmat started to rewrite things the same code is down to 1:35 mins
12:31 lucasb ah, here, euler #28: 1 + 3.step(1001, 2).flat_map {|i| (i*i).step(by: -(i-1)).take(4) }.reduce(:+)
12:31 lucasb what a lovely language :)
12:32 moritz m: say 1 + 3.step(1001, 2).flat_map {|i|  (i*i).step(by: -(i-1)).take(4) }.reduce(:+)
12:32 camelia rakudo-moar a98724: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3say 1 + 3.step(1001, 2).flat_map7⏏5 {|i|  (i*i).step(by: -(i-1)).take(4) }.␤    expe…»
12:33 lucasb you need a rubybot for that
12:33 moritz m: say 1 + 3.step(1001, 2).flat_map: -> \i {  (i*i).step(by: -(i-1)).take(4) }.reduce(&[+])
12:33 camelia rakudo-moar a98724: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 01, 2).flat_map: -> \i {  (i*i).step(by:7⏏5 -(i-1)).take(4) }.reduce(&[+])␤    expecting any of:␤     …»
12:37 andrzejku joined #perl6
12:38 dogbert17_ my solution was considerably more stupid, tried to fill the matrix according to spec and then calc the sum
12:38 ufobat what does private mean for a attribute of a class? it doesnt have private setters/getters, right? so does it mean i can only acces private members of self or also of $others?
12:39 ufobat m: class F{has $!f; method set(F:D $f) {$!f = $f}; method x() { if $!f and not $!f!f {say "just one child"}}}; my $f = F.new(); my $g = F.new(); $f.set($g);
12:39 camelia rakudo-moar a98724: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤No such private method 'f' for invocant of type 'F'␤at <tmp>:1␤------> 3 = $f}; method x() { if $!f and not $!f!7⏏5f {say "just one child"}}}; my $f = F.ne␤»
12:41 lucasb $!f!f ?
12:41 lucasb ah, got it. sorry
12:44 lucasb well, 'has $!foo' doesn't generate accessor methods, so you can only access them directly by saying $!foo
12:44 samcv ok so it looks like this utf-8 linenoise will work, but there is a linenoiseSetEncodingFunctions() function that has to be called to enable the utf-8 functionality
12:44 lucasb so, I don't expect it to be possible to access private vars in other same-class objects, no
12:48 ufobat lucasb, i should just write a private accessor for it, right?
12:53 grondilu joined #perl6
12:53 canopus joined #perl6
12:55 lucasb I thought it was possible to initialize private attrs in the constructor, but I think I may be mistaken
12:55 lucasb m: class C { has $!foo; method m() { $!foo } }; say C.new(foo=>10).m
12:55 camelia rakudo-moar a98724: OUTPUT«(Any)␤»
12:55 dogbert17_ are these spesh setting environment vars?
12:56 lucasb dogbert17_: yes. 'moar -h' shows a list of them
12:58 lucasb ufobat: I think yes, if you do 'method !foo() { $!foo }', you'll be able to call $other!foo for other same-class object
13:00 ufobat it works, yes! thanks! :)
13:00 rurban left #perl6
13:05 sena_kun joined #perl6
13:07 babydrop lucasb: it's not done automatically, but you can do that with BUILD or TWEAK submethods
13:07 babydrop m: class C { has $!foo; submethod TWEAK(:$!foo) {}; method m() { $!foo } }; say C.new(foo=>10).m
13:07 camelia rakudo-moar a98724: OUTPUT«10␤»
13:11 [Coke] AlexDaniel: is the mojibake in 130298 intentional?
13:12 babydrop "AlexDaniel │ yea… yea… ok RT does not like unicode"
13:13 babydrop I'll "Take" the ticket, since I know what it's about.
13:14 babydrop (the mojibake are quotes and the eject char showing error location)
13:15 babydrop oh, reading the description, I guess there's also poo somewhere :/
13:16 * babydrop giggles
13:17 babydrop "Hi, I’m Adrian from StrictThemes, WordPress themes makers. I have your email from your github public profile and I saw you are WordPress developer."
13:18 AlexDaniel [Coke]: you can click 「Download (untitled)」 and see what this ticket is about…
13:19 babydrop m: multi foo (Int) is default {say "here"}; multi foo (Int) {say "there"}; foo 42
13:19 camelia rakudo-moar a98724: OUTPUT«here␤»
13:19 babydrop m: multi foo (Int) {say "here"}; multi foo (Int) is default {say "there"}; foo 42
13:19 camelia rakudo-moar a98724: OUTPUT«there␤»
13:19 babydrop Neat.
13:20 babydrop TIL
13:20 lucasb babydrop: thanks. I was waiting someone introduce TWEAK to me
13:20 moritz I tend to use that to dismabiguate dispatch for allomorphs (the "is default")
13:21 AlexDaniel hmmm
13:21 AlexDaniel so what does it do exactly?
13:21 moritz it disambiguates ambiguous dispatches
13:24 pmurias babydrop: that's what fooling around with WordPress leads to ;)
13:24 jnthn If a multi-dispatch is about to report an ambiguous dispatch error, it checks if any of them have the is default trait. If that gets it down to 1 candidate, it chooses that one.
13:24 jnthn It's a last-gasp resolution mechanism
13:26 babydrop Suddenly everyone knows of that feature? :/
13:26 AlexDaniel yea
13:27 * babydrop wishes someone would speak up when AlexDaniel and I were slinging hacks around to work around
13:29 AlexDaniel babydrop: perhaps I should start compiling a list of features nobody knows about
13:29 [Coke] what do we call java's "inner classes" in Perl 6? (ala Promise's Vow class)
13:29 kyclark joined #perl6
13:30 dalek doc: 4d72090 | (Zoffix Znet)++ | doc/Language/glossary.pod6:
13:30 synopsebot6 Link: http://doc.perl6.org/language/glossary
13:30 dalek doc: Mention `is default` for MMD resolution
13:30 dalek doc:
13:30 dalek doc: Glossary isn't the best place, but it's the only one that shows up for `multi-dispatch` search
13:30 dalek doc: review: https://github.com/perl6/doc/commit/4d72090d78
13:30 babydrop AlexDaniel: that'd be handy ;)
13:30 kyclark Is Zoffix around?
13:30 yoleaux 2 Dec 2016 11:14Z <gfldex> kyclark: please don't teach your students to use ‚:‘ in file names. That will end in tears.
13:31 AlexDaniel <zoffixable> *bleep blop* Current nickname is “babydrop”
13:31 arnsholt Oh, heh. : is a valid path separator on HFS+
13:31 kyclark yoleaux, that was the output of a program.  Probably would have been better to run a shell script to rename them.
13:31 kyclark babydrop, I get a 404 on http://modules.perl6.org/dist/Subset::Common linked from the Advent article
13:31 babydrop kyclark: sup?
13:32 lucasb m: multi f is default {10}; multi f is default {20}; multi f is default {30}; say f
13:32 camelia rakudo-moar a98724: OUTPUT«30␤»
13:32 babydrop kyclark: oh, it's missing the 's': https://github.com/bradclawsie/Subsets-Common
13:32 jnthn [Coke]: Sometimes "nested classes", but if a "my" is stuck on the thing then "lexical class" is sometimes also used
13:32 babydrop I'll fix it in 9 hours, 'cause I forgot to commit my last minute changes and I don't wanna risk wordpress messing up the article if I change it right now :(
13:33 jnthn [Coke]: "inner class" is maybe good to not use in so far as in Java there's a relationship between the enclosing and enclosed iirc
13:33 jnthn [Coke]: Whereas in Perl 6 there's not any OO-level relationship there
13:34 lucasb the number of 'defaults' changes the outcome
13:34 lucasb if it's an even number, 3, 5, 7, no error. if it's a odd number, 2, 4, 6, then error :)
13:35 lucasb ^^ Noticed the multiple 'multi's all with 'is default' ?
13:37 prammer joined #perl6
13:43 babydrop lucasb: that's hilarious :) Please report that bug
13:45 lucasb babydrop: https://gist.github.com/anonymous/a0fb2f2c5db9aed32132698a0a7f47ca
13:45 AlexDaniel wtf what? XDDD
13:46 lucasb oops, made a mistake with 'sub i' return 0+1i
13:46 cognominal joined #perl6
13:47 AlexDaniel oh, ok
13:47 lucasb updated: https://gist.github.com/anonymous/0a4db00dde55d0ac227e53a8ca2fccd2
13:47 donaldh joined #perl6
13:48 AlexDaniel soo
13:48 AlexDaniel m: https://gist.githubusercontent.com/anonymous/0a4db00dde55d0ac227e53a8ca2fccd2/raw/0911af8f6a2efdd2d26dad159f16d0986bf0e0d3/file.pl6
13:48 camelia rakudo-moar a98724: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3https:7⏏5//gist.githubusercontent.com/anonymous/0␤    expecting any of:␤        colon pair␤»
13:48 lucasb the Nil values returned are because of the 'Ambiguous call to 'f'; these signatures all match' exceptions
13:48 AlexDaniel eval: https://gist.githubusercontent.com/anonymous/0a4db00dde55d0ac227e53a8ca2fccd2/raw/0911af8f6a2efdd2d26dad159f16d0986bf0e0d3/file.pl6
13:48 evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
13:48 evalable6 AlexDaniel, rakudo-moar a987242: OUTPUT«f = Nil␤g = 30␤h = Nil␤i = 50␤j = Nil␤k = 70»
13:48 AlexDaniel commit: all https://gist.githubusercontent.com/anonymous/0a4db00dde55d0ac227e53a8ca2fccd2/raw/0911af8f6a2efdd2d26dad159f16d0986bf0e0d3/file.pl6
13:48 committable6 AlexDaniel, Successfully fetched the code from the provided URL.
13:48 committable6 AlexDaniel, https://gist.github.com/94faf952835288612d00d9ccb7a079a9
13:51 dogbert17_ m: https://gist.github.com/dogbert17/41042137f44394a0094c1cc1c05055bb # lucasb
13:51 camelia rakudo-moar a98724: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3https:7⏏5//gist.github.com/dogbert17/41042137f443␤    expecting any of:␤        colon pair␤»
13:51 dogbert17_ m: https://gist.github.com/dogbert17/41042137f44394a0094c1cc1c05055bb
13:51 camelia rakudo-moar a98724: OUTPUT«(signal SEGV)»
13:52 dogbert17_ lucasb timotimo ^^
13:53 lucasb dogbert17_: right, your snippets even segfaults camelia
13:54 [Coke] jnthn: I think lexical captures the one limitation there is, ja?
13:54 [Coke] so we can use that. :)
13:54 dogbert17_ lucasb: have you tried the spesh settings?
13:55 mr_ron joined #perl6
13:55 jnthn [Coke]: In the case of vow, sure
13:55 jnthn [Coke]: It's declared with my iirc
13:55 lucasb dogbert17_: only the spesh disable; didn't make a difference
13:55 jnthn m: say Promise::Voew
13:55 camelia rakudo-moar a98724: OUTPUT«Could not find symbol '&Voew'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:55 jnthn m: say Promise::Vow
13:55 camelia rakudo-moar a98724: OUTPUT«Could not find symbol '&Vow'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:55 jnthn Yeah
13:55 jnthn So you can't talk about it directly
13:58 mr_ron babydrop: (hopefully reaching right person)  In Subset::Helper the message is 'note'd and sort of wondered why use of 'say' instead of 'note' for say ’This ain't no website containing "Perl 6"!‘; # guessing not that important
13:58 mr_ron ... referring to advent post
13:59 babydrop mr_ron: note sends to STDERR and say sends to STDOUT
13:59 mr_ron yes - know difference and Subset::Helper decides to 'note' to STDERR
14:00 babydrop OK
14:00 wamba joined #perl6
14:00 mr_ron seems like same use case I guess
14:03 babydrop mr_ron: I've just used `say` in the article because I knew it'll show up twice, will be LTA and I'd suggest a die instead. Last commit to Subset::Helper was half a year ago, when I barely knew Perl 6, so I've used a warning.... because I guess I thought throwing in it was bad?
14:04 dogbert17_ lucasb: confusing so maybe it's not a spesh bug at all then
14:05 Technaton I always thought that the UTF-8 characters-as-methods were a funny byproduct of Perl6 being full UTF-8-aware, but after reading Day 7 of the perl 6 advent calendar, I am not so sure anymore. How do you type ∈ without copying it from the character table application? :)
14:05 yoleaux 7 Dec 2016 01:02Z <babydrop> Technaton: the blog post I mentioned a day ago, is up: https://perl6advent.wordpress.com/2016/12/07/set-in-your-ways-perl-6s-setty-and-baggy-types/
14:05 Technaton Wow, yoleaux is a really cool away-bot. :D
14:07 babydrop Technaton: there are some answers here: https://www.reddit.com/r/perl6/comments/5gwurz/perl_6_advent_day_7_set_in_your_ways_perl_6s/dawh3oj/
14:07 babydrop .oO( wonder why do people assume the only way to type the 10FFFF Unicode chars is to copy-paste them from somewhere... )
14:07 babydrop m: say 0x10FFFF
14:07 camelia rakudo-moar a98724: OUTPUT«1114111␤»
14:08 babydrop that's a lot of copy-pastin'
14:08 dogbert17_ timotimo lucasb the crash is in 0xb7d287a8 in MVM_fixed_size_alloc ()
14:09 wamba joined #perl6
14:09 Technaton babydrop: Well, I don't have them on my keyboard, not even with Shift+Meta. To be honest, the only time I really want a set intersection symbol is in TeX, where I type \(A \cap B\)…
14:09 moritz Tex2Perl6!
14:09 Technaton I guess I need to read up on xmodmap.
14:10 babydrop Technaton: I've met a few people who use weird unicode stuff liberally in just normal conversations...
14:10 babydrop So I guess if you can be bothered to select what you use, typing that stuff can be trivial
14:13 pmurias "bothered to select what you use"?
14:13 pmurias what does that mean?
14:15 moritz somebody goes to effort to look up some Unicode characters that they want to use
14:15 moritz then they find an input method that works for those
14:15 babydrop pmurias: if you pre-configure some keys to type chars you like to use
14:15 moritz nobody regularly uses the whole Unicode repertoire
14:15 AlexDaniel Technaton: do you know about compose key?
14:15 AlexDaniel Technaton: that's what you should configure
14:16 Technaton AlexDaniel: Yes, I know the compose key; I use it regularly for accented characters such as 'é'.
14:16 Technaton I never know I could use it to coax X into emitting unicode symbols, such as ⅔.
14:16 AlexDaniel <Multi_key> <i> <n>: "∈"U2208# ELEMENT OF
14:17 babydrop Don't work on my compose...
14:17 AlexDaniel yes, it's not there by default, I think
14:17 babydrop Ah
14:17 Technaton Yep, seems like it.
14:17 AlexDaniel but if you use the .XCompose file I linked in my reddit answer
14:17 AlexDaniel then you'd most of the stuff you'd ever want to type
14:18 AlexDaniel and the rest you just add yourself :)
14:18 AlexDaniel (or send a PR for that project)
14:18 sufrostico joined #perl6
14:18 sufrosti1o joined #perl6
14:19 Technaton Nice! That's a pretty decent list. Thanks for sharing it in the first place. :)
14:19 AlexDaniel C-x 8 RET and type “element of” in emacs, that works too
14:20 AlexDaniel does not support unicode 9 yet I think
14:20 Technaton I don't want to start an editor war, but I am more a VIM guy actually.
14:20 [Coke] did someone hURL https://docs.perl6.org/language/unicode_entry yet?
14:20 Technaton The .xmodmap is the cleanest solution anyways.
14:20 moritz Technaton: Ctrl+k, :help digraphs
14:21 moritz :help :digraphs actually
14:21 AlexDaniel [Coke]: no
14:22 Technaton This is incredibly cool.
14:22 Technaton Thanks! :)
14:22 babydrop FWIW, last I tried that XCompose advice in unicode_entry I completely messed up compose entry in my system
14:22 babydrop The " It might be necessary to install a xim bridge as well, such as uim-xim." part..
14:24 babydrop will find time to test it and improve on it
14:25 AlexDaniel .oO( ???? this should be taught at school )
14:25 babydrop IME most people hate stuff they learned in school.
14:26 jnthn B2Kenky
14:26 jnthn argh
14:26 jnthn (yes, password, no, not valuable, yes, already changed) :P
14:27 babydrop :)
14:31 sufrostico joined #perl6
14:31 sufrosti1o joined #perl6
14:35 kyclark Is this the best way to use a block to create an alternate? https://gist.github.com/kyclark/8c281911e977c21d1a03bddca8059ac5
14:35 kyclark So if the user does not specify an “out” file, I want to generate one from the input name/location
14:35 moritz just write to a.out. It worked for the C compilers, it'll work for you :-)
14:36 moritz no, just kidding. Your approach is fine
14:36 kyclark So “do {}” is the Right Way?
14:36 moritz yes
14:36 kyclark Rock on.
14:37 lizmat joined #perl6
14:39 timotimo dogbert17_: perfect. for the fixed size alloc we have a few debugging mechanisms that you can turn on
14:44 dogbert17_ timotimo: is the --valgrind and the FSA flag?
14:45 timotimo yes, either one, or the other
14:45 timotimo if the latter is turned on, the former can't do anything
14:47 sufrostico joined #perl6
14:51 prammer joined #perl6
14:52 nebuchadnezzar joined #perl6
14:54 sufrosti1o joined #perl6
15:03 dj_goku joined #perl6
15:05 sufrostico joined #perl6
15:07 sufrosti1o joined #perl6
15:14 dogbert17_ timotimo: does this help? https://gist.github.com/dogbert17/034403915825b39206d38ed5ea54efd6
15:17 timotimo huh
15:22 dogbert17_ timotimo: I can run perl6-gdb-m and do a 'bt full' if you want
15:23 timotimo hm, let's try it
15:23 dogbert17_ ok, hold on
15:26 dogbert17_ timotimo:
15:26 dogbert17_ https://gist.github.com/dogbert17/ad41e9631d70720020e2a87dd43b86fc
15:28 skids joined #perl6
15:29 babydrop .tell lizmat disregard RE 125938. someone else helpfully tested that.
15:29 yoleaux babydrop: I'll pass your message to lizmat.
15:29 prammer joined #perl6
15:29 timotimo hum.
15:29 timotimo the first paste, what flags did you use? the FSA debug thing, or --valgrind?
15:29 dogbert17_ --valgrind
15:30 dogbert17_ btw, did jnthn release the superfix he made yesterday?
15:31 timotimo can you do the FSA debug flag instead?
15:31 eliasr joined #perl6
15:31 dogbert17_ ok
15:34 pyrimidine joined #perl6
15:35 dogbert17_ timotimo: same result, perhaps I'm doing something wrong, what happens if you run it?
15:36 timotimo let me build latest everything first
15:37 wamba joined #perl6
15:37 jdv79 is it possible to get profiler output when the prog is terminated via ctrl-c
15:37 dogbert17_ cool, a possibly interesting piece of info, if you insert e.g. say 'hallo' as the first line in init-array, the code works ... at least for me
15:37 timotimo jdv79: difficult ;(
15:38 jdv79 i have to say it.  Devel::NYTProf does it:)
15:38 jdv79 i guess its ok.  just annoying.
15:38 timotimo right
15:38 timotimo here's the thing:
15:38 timotimo currently moar gets a bit confused when there's more than one thread
15:38 babydrop catch the signal and exit? Would that work?
15:38 babydrop oh
15:38 timotimo when you tap the signal, you let moar start its event-loopy thread
15:39 babydrop right
15:39 timotimo and BAM, your profile becomes mostly useless
15:43 perlpilot babydrop: did you remove your comment to bdf's TPF grant proposal?
15:46 lucasb no comments
15:47 AlexDaniel perlpilot: yup
15:49 jdv79 is the async stuff resource hungry?
15:49 jdv79 just noticed the load is spiking a bit and it doesn't seem like it should
15:50 timotimo hm, we had a bug once where threads would busy-loop waiting for things to do
15:50 timotimo that should long since have been fixed
15:50 jnthn A year ago at least
15:50 timotimo you could potentially figure out what's making the load go up by running perf over it
15:50 timotimo i.e. perf record -g perl6 blahblah, then perf report -g
15:51 babydrop perlpilot: "* babydrop blocks out all of LP6 drama and focuses on code from now on"
15:51 babydrop perlpilot: and yes the comment was removed upon my request.
15:51 AlexDaniel perlpilot: kinda sad, isn't it?
15:52 timotimo oh cool i get the segfault, too
15:52 babydrop No, it's awesome. All the bugs I can fix \o/
15:53 timotimo dogbert17_: for some reason i thought this only b0rked on 32bit systems so i didn't think to try
15:53 prammer joined #perl6
15:53 dogbert17_ timotimo: it borks on 64 bit as well, I just had to make the array a little larger
15:54 timotimo now to find out why we're assuming we can write past the allotted space
15:55 timotimo i haven't had a good look at the memory region stuff since it was added
15:55 dogbert17_ and why does a simple say statement make the problem go away
15:58 timotimo well, this is all about the layout of frames on the stack
15:59 perlpilot AlexDaniel: Are you pushing people to apply for TPF grants?  (you can do that anyway, whether there's 10k just sitting around or not :-)
15:59 timotimo you're adding a call to something, so at least one more frame gets added to the stack
16:00 AlexDaniel perlpilot: I have never thought there is enough money that somebody could possibly consider asking for extra 10k on top of 37k he gets for some work already
16:02 perlpilot Regardless of what bdf is asking for, the TPF does have funding that people can apply for.
16:03 perlpilot Didn't Karen secure a large donation before she stepped down as president?
16:03 babydrop perlpilot: and yet makk was here a few months ago saying there's trouble getting funding for marketing stuff or something?
16:03 AlexDaniel what does it mean? Is it some kind of infinite resource or what?
16:03 perlpilot AlexDaniel: infinite? no.  But small, finite and mandated to fund Perl projects, yes.
16:03 babydrop perlpilot: I'm under the impression the TPF doesn't have a ton of funding (for Perl 6). So saying "anyone can apply for it" to me rings with "...to replace the current work being"
16:04 babydrop being done
16:04 babydrop being funded
16:04 dj_goku joined #perl6
16:06 * dogbert17_ hopes timotimo figures it out
16:06 timotimo well, it's already acting very funny to say the least
16:06 babydrop In fact, if you read the Perl 6 specific fund it actually states its initial objective is to fund jnthn++'s work: http://www.perlfoundation.org/perl_6_core_development_fund
16:07 babydrop And in eligibility it states "To be eligible the applicant must be a contributor to Perl 6."
16:07 jnthn I don't think the application was filed against that fund, though?
16:07 jnthn iiuc it was filed as a general grant
16:09 jnthn Looks that way from reading it, anyways
16:10 babydrop Well, I've no idea Perl 6 work could be funded by some "general grant".
16:11 timotimo using a region at 0xcac8830; going from 0xcae8830 (0xcac8c30) to 0xcae8830
16:11 timotimo using a region at 0xcac8830; going from 0x61cb518 (0xcac8c30) to 0xcae8830
16:11 timotimo here's where it asplodes
16:12 jnthn I'm sure somebody can correct me on the details if they know better, but so far as I understand it TPF both has a general grants process for any Perl related thing, which is operated on a quarterly process or something
16:12 timotimo jnthn: what you see here is the address of the allocated blob (i.e. where the CallStackRegion lives), the current alloc pointer, the poister to the very first alloc in parenthesis and the alloc_limit at the end
16:12 jnthn Together with targetted grants programs that have their own rules
16:12 timotimo jnthn: got a clue how the alloc pointer might be able to jump backwards to a previous region?
16:12 babydrop jnthn: noted
16:12 jnthn Such as the Perl 6 dev fund that funds my work, and the Perl 5 Core Maint Fund
16:12 timotimo there's only one thread ...
16:13 jnthn timotimo: Well, it jumps backwards when you exit that region, no?
16:14 jnthn timotimo: That is, when you pop the last callframe in the second region off the call stack, you should find yourself back in the first again
16:14 timotimo ah
16:14 timotimo maybe in that case we sometimes don't change the alloc limit properly
16:14 timotimo ah, yes
16:14 timotimo callstack_region_prev never changes the alloc_limit
16:15 timotimo uh
16:15 timotimo derp. it shouldn't
16:18 timotimo using a region at 0xcac8830; going from 0xcae8830 (0xcac8c30) to 0xcae8830
16:18 timotimo panic! we destroyed a frame on(?) the callstack and fell out of it!
16:19 timotimo using a region at 0xcac8830; going from 0x61cb518 (0xcac8c30) to 0xcae8830
16:19 timotimo for some reason we're calling frame_destroy on a non-promoted stack frame that's not on our currently active region
16:22 jnthn Is it really non-promoted, or is it considered so because it was promoted and the memory got zeroed?
16:22 timotimo i can have a look
16:22 jnthn (That is, is its address in the region)
16:22 jnthn That MVM_gc_debug_find_region could help you know if it's in a fromspace somewhere
16:23 timotimo its address is in an earlier region
16:23 cdg joined #perl6
16:24 cdg_ joined #perl6
16:25 * timotimo reads up on the x command in gdb
16:25 timotimo oh, i can just cast it to the right type
16:26 tbrowder ref advent calendar:  i've seen the bad reports here about wordpress, and i have babydrop's gistmd2html code and i'm ready to create my draft.  some questions first:   1. Can we see the actual format of a good looking entry somewhere?  (I see slightly varying formats for the entries so far.)  2. Does the author add "Day N -- {$title}" or just "{$title}"?
16:26 tbrowder 3. Will I see a good (as published) preview before publishing?
16:26 timotimo it's not completely nulled
16:27 perlpilot tbrowder: 3. yes. 2. normally the author adds, but I don't know with the script.
16:27 perlpilot tbrowder: and for completeness 1.  dunno  :-)
16:28 timotimo FWIW, the frame it points to via its ->caller is also at a wildly different address from the currently active stack region
16:28 timotimo and its flags are also 0
16:30 babydrop tbrowder: (1) here's the markup generated by the script that I simply pasted into Wordpress's HTML box: https://gist.github.com/zoffixznet/64de2db8242754e790b35f366604121e which is for this entry: https://perl6advent.wordpress.com/2016/12/07/set-in-your-ways-perl-6s-setty-and-baggy-types/
16:30 pmurias babydrop: re problem founding marketing AFAIR the big problem with that is getting a grant for every small expense is a lot of trouble
16:31 babydrop tbrowder: (2) Yes, add the Day N — (3) yes, there's two ways of viewing the previes. First is the "previe in the editor" and once you schedule your post, you can go to scheduled posts and there'll be anotehr preview button that will lead to a proper-looking page with your article preview
16:31 babydrop (the first preview thing is fine, it's just slightly narrower than the final article, I think)
16:31 Ven joined #perl6
16:34 khw joined #perl6
16:37 timotimo dogbert17_: i have to head out for a bit, but at least i have sort of a clue now about what happens
16:38 babydrop b2gills: you around?
16:38 zakharyas joined #perl6
16:39 b2gills yes
16:40 babydrop m: say i³ ≅ i*i*i
16:40 camelia rakudo-moar 7511b4: OUTPUT«True␤»
16:40 babydrop b2gills: in your ticket, are you saying the nearly-zero number we get is inaccurate and there's some way to get exact zero? I tried with Perl 5's Math::Complex and it gives the same result, due to log/exp involved the floating point noise occurs.
16:41 b2gills m: say [*] i xx 3; say i ** 3
16:41 camelia rakudo-moar 7511b4: OUTPUT«-0-1i␤-1.83697019872103e-16-1i␤»
16:41 babydrop I see there's DemMoivre's theorem for integer powers, but it involves cos/sin, which I think would have the same problem
16:42 babydrop s: &prefix:<[*]>, \(i xx 3)
16:42 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/7511b43/src/core/metaops.pm#L176
16:42 tbrowder babydrop and perlpilot: thanks for the help
16:42 b2gills If the conclusion is *won't fix* I will accept it
16:42 babydrop OK. I'll search around some more if there's any trick for it.
16:45 b2gills I'm just saying that any number raised to a Positive Integer power is the same as multiplying that many copies together.
16:45 mohae joined #perl6
16:47 babydrop m: dd i.polar
16:47 camelia rakudo-moar 7511b4: OUTPUT«(1e0, 1.5707963267949e0)␤»
16:47 babydrop neat
16:48 geekosaur the usual answer is to provide multiple ways to do it. for example Haskell has 3 different power operators, each with different constraints, to handle the various cases that come up
16:48 geekosaur ^ ^^ **
16:49 babydrop yikes
16:49 geekosaur and even that isn't sufficient for all use cases, as different algorithms for the floating point cases work better in different circumstances
16:51 geekosaur (aaaand we're back in the sewer that is numerical methods again. complete with alligators.)
16:55 babydrop hm, ruby gives 0-1i and python gives -0-1i
16:55 b2gills m: multi infix:<**> ( Complex $c, Int $i --> Complex ){ if 0 <$i < 10²⁰ { my Complex $a; $a *= $c for ^$i; $a } else { $c ** $i.Num } }; say i ** 3 # We could add a :( Complex, Int ) case to &[**]
16:55 camelia rakudo-moar 7511b4: OUTPUT«-0-1i␤»
16:57 pyrimidine joined #perl6
16:57 AlexDaniel babydrop: do they? Or do they just show very small numbers as 0?
17:00 babydrop AlexDaniel: good point
17:01 [Coke] jnthn: is correct. there are specific funds that can only fund certain things. (Hague grant. Core perl 5. Core Perl 6). grants for these go through a process that in the past, went through Karen. There is also the grants committee, which handles non-specific grants; there is no requirement that they be perl 5 or perl 6. Just that they benefit the perl community.
17:01 babydrop b2gills: I tested that method and that makes the code 92 times slower (for base 30)
17:01 babydrop b2gills: so, I'm not really seeing the gain here.
17:01 pyrimidi_ joined #perl6
17:02 b2gills m: say (i ** 3).reals».fmt('%.30f'); say (1 ** 3).reals».fmt('%f')
17:02 camelia rakudo-moar 7511b4: OUTPUT«(-0.000000000000000183697019872103 -1.000000000000000000000000000000)␤No such method 'reals' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
17:02 [Coke] the grants committee does not have a specific fund. They rank grants received in order they would prefer them funded each time period as they are reviewed. The treasurer/board then lets us know which ones can be funded. approved-but-not-funded go into a pile for next time, when they might be funded.
17:02 b2gills m: say (i ** 3).reals».fmt('%f')
17:02 camelia rakudo-moar 7511b4: OUTPUT«(-0.000000 -1.000000)␤»
17:02 [Coke] I am on the GC, happy to answer questions so people don't have to speculate.
17:02 babydrop b2gills: but that uses different methods. There's no logs/exp involved in in pow of an int
17:03 babydrop rindolf just gave me an algo to try...
17:03 * babydrop tries
17:05 dj_goku joined #perl6
17:05 b2gills Again if the decision is *won't fix* I'll accept it. It was just ever so slightly annoying that I had to add a few more bytes to my entry. (I don't even know if that was necessary as I didn't ask the OP)
17:06 [Coke] also, I say this occasionally: I don't see a lot of perl 6 grant requests come through the general process. By all means, submit Perl 6 proposals. They're held to the same standards as the Perl 5 proposals.
17:07 babydrop [Coke]: thanks for the clarification
17:08 b2gills I think fewer people who only know the sixth version of Perl follow the Perl Foundation
17:08 b2gills s/know/know only/
17:09 babydrop m: say 8.5440512 / 0.1401583
17:09 camelia rakudo-moar 7511b4: OUTPUT«60.96000879␤»
17:09 babydrop :(
17:09 babydrop no good
17:10 mst b2gills: can we please stick to calling it perl6 and not pretending it's a version of the same thing as perl5
17:10 b2gills babydrop: to that I say: meh, the current result is good enough
17:10 mst I really don't want to go back to the stupid-ass arguments of the before times
17:10 babydrop b2gills: OK. Closing the ticket as won't fix.
17:11 babydrop ^ that 60x was loss to that algo I've just tried. so... at least I tried :)
17:11 rurban1 joined #perl6
17:13 b2gills mst: I wrote it that way to drastically reduce the word count while keeping it understandable, I normally type 「Perl[Compose][space][space]6」 and 「Perl[Compose][space][space]5」
17:14 mst b2gills: 'perl6' or 'Perl 6' don't bother me, 'sixth version of perl' is both longer and contributes to the silly people being silly about things
17:14 mst and I've found that being pedantic about it at this level saves me from having to go put actual fires out later
17:15 dogbert17 timotimo: hopefully you can figure it out
17:16 b2gills mst: Which is why I always point out the differences on posts/comments whenever I see them ( i.e. I'm a fellow pedantic firefighter most of the time )
17:16 mst b2gills: :D
17:19 girafe joined #perl6
17:30 kyclark joined #perl6
17:35 dj_goku joined #perl6
17:35 dj_goku joined #perl6
17:36 noganex joined #perl6
17:40 tbrowder i'm getting paranoid here and would appreciate one or two sets of eyes on my advent blog for 12 dec. anyone willing to help please  msg me privately and i'll give my e-mail or phone number
17:42 [Coke] I'm happy to proof a copy.
17:43 cognominal joined #perl6
17:44 domidumont joined #perl6
17:46 moritz tbrowder: do you have access to https://perl6advent.wordpress.com/wp-admin/ already?
17:47 tbrowder moritz: i can get there, yes
17:49 tbrowder i guess [Coke] can too, so that seems  the best way to get other eyes on it
17:50 HoboWithAShotgun joined #perl6
17:51 HoboWithAShotgun rakudo: print (1/3).WHAT;
17:51 camelia rakudo-moar 7511b4: OUTPUT«Use of uninitialized value of type Rat in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤»
17:51 babydrop heh
17:51 babydrop nice nick
17:51 babydrop m: say (1/3).nude
17:51 camelia rakudo-moar 7511b4: OUTPUT«(1 3)␤»
17:51 babydrop m: say (1/3).^name
17:51 camelia rakudo-moar 7511b4: OUTPUT«Rat␤»
17:52 babydrop .WHAT gives you a type object which is not defined
17:52 HoboWithAShotgun (1/3) looks definitly defined to me
17:52 babydrop HoboWithAShotgun: sure, but you're calling .WHAT on it
17:52 babydrop HoboWithAShotgun: and it tells Rat, which is a type object, and type objects are not defined
17:53 babydrop m: say Rat.defined
17:53 camelia rakudo-moar 7511b4: OUTPUT«False␤»
17:53 babydrop m: dd ⅓.WHAT
17:53 camelia rakudo-moar 7511b4: OUTPUT«Rat␤»
17:55 babydrop m: say ⅓.WHAT.new: 2, 3
17:55 camelia rakudo-moar 7511b4: OUTPUT«0.666667␤»
17:55 AlexDaniel you could have used 「say」 instead
17:55 AlexDaniel m: say (1/3).WHAT
17:55 camelia rakudo-moar 7511b4: OUTPUT«(Rat)␤»
17:55 babydrop m: print (1/3).WHO
17:55 camelia rakudo-moar 7511b4: OUTPUT«Rat»
17:55 HoboWithAShotgun I thought say and print differ only by the newline
17:55 AlexDaniel well, or that
17:56 AlexDaniel HoboWithAShotgun: no, one calls .gist, other .Str
17:56 timotimo huh, what.
17:56 babydrop HoboWithAShotgun: no, that's in Perl 5. In Perl 6 print and put differ by newline and say is a "for humans" type of output that uses .gist output (except for Str, which are output as is)
17:56 timotimo someone's claiming ruby 2.3 rounds 2.5 up to 3 and ruby 2.4 rounds 2.5 down to 2
17:57 babydrop m: say 2.5.round
17:57 camelia rakudo-moar 7511b4: OUTPUT«3␤»
17:59 HoboWithAShotgun "one calls .gist, other .Str" is apparently false, rakudo: my $x = 1/3; say $x.Str; say $x.gist;
17:59 HoboWithAShotgun rakudo: my $x = 1/3; say $x.Str; say $x.gist;
17:59 camelia rakudo-moar 7511b4: OUTPUT«0.333333␤0.333333␤»
17:59 HoboWithAShotgun see?
17:59 babydrop HoboWithAShotgun: for some objects .Str and .gist outputs are the same :)
17:59 AlexDaniel m: my $x = 1/3; say $x; put $x
17:59 camelia rakudo-moar 7511b4: OUTPUT«0.333333␤0.333333␤»
17:59 babydrop m: my $x = 1/3 but role { method Str { "tis a Str!" }; method gist { "tis a gist!" } }; say $x.Str; say $x.gist;
17:59 camelia rakudo-moar 7511b4: OUTPUT«tis a Str!␤tis a gist!␤»
17:59 babydrop HoboWithAShotgun: ^ see
18:00 b7j0c joined #perl6
18:01 babydrop HoboWithAShotgun: so... um.. is the shotgun loaded? :)
18:01 HoboWithAShotgun i find it both amazing and disturbing how you just created an adhoc role in "one line"
18:01 babydrop ehehehe :)
18:01 AlexDaniel m: my $x = 1/3 but role { method Str { "tis a Str!" }; method gist { "tis a gist!" } }; say $x; put $x; print $x
18:01 camelia rakudo-moar 7511b4: OUTPUT«tis a gist!␤tis a Str!␤tis a Str!»
18:01 babydrop m: print 42 but "Look ma'! No roles!"
18:01 camelia rakudo-moar 7511b4: OUTPUT«Look ma'! No roles!»
18:01 babydrop ^_^
18:01 [Coke] tbrowder: fyi, day 12 is currently an empty draft here.
18:02 HoboWithAShotgun i need a book for this. is there a camel-book equivalent by now?
18:02 babydrop HoboWithAShotgun: there are 3 or four books in progress. I know one of them is meant to be done by August
18:02 [Coke] not yet. kickstarter just funding for a "Learning Perl 6" book, which I think we can expect next year if it hits.
18:03 moritz HoboWithAShotgun: if you're interested in news about Perl 6 books, please sign up for the mailing list at https://perl6book.com/
18:03 babydrop HoboWithAShotgun: there's a post on that: https://perl6advent.wordpress.com/2016/12/06/day-6-perl-6-books-the-time-is-ripe/
18:03 [Coke] I think someone might be working on the camel, but no word on progress.
18:03 dj_goku joined #perl6
18:03 dj_goku joined #perl6
18:08 tbrowder [Coke] (and moritz): yes, i will put in content in a bit--running it through babydrop's filter now.  I'll let you know when it's there. In the meantime, consider the tile which i'm mulling over several variants: "[How to Avoid|| Avoiding || Avoid ] Namespace Pollution [with || in] Perl 6 Modules"
18:08 tbrowder s/tile/title/
18:10 babydrop m: "{('How to Avoid', 'Avoiding', 'Avoid').pick} Namespace Pollution {('with', 'in').pick} Perl 6 Modules".say
18:10 camelia rakudo-moar 7511b4: OUTPUT«How to Avoid Namespace Pollution in Perl 6 Modules␤»
18:11 babydrop m: "{('How to Avoid', 'Avoiding', 'Avoid').pick} Namespace Pollution {('with', 'in').pick} Perl 6 Modules".say
18:11 camelia rakudo-moar 7511b4: OUTPUT«Avoiding Namespace Pollution with Perl 6 Modules␤»
18:11 * babydrop votes for that second one
18:12 aindilis joined #perl6
18:12 tbrowder heh heh, great pick! i'm gonna try that with the Florida Lottery!
18:13 b7j0c m: my uint8 $u = 256; say $u;
18:13 camelia rakudo-moar 7511b4: OUTPUT«0␤»
18:13 tbrowder well, i'll use the advent quantum secret santa idea
18:14 b7j0c native types (uint8 etc) seem uninspired...if you overflow one, you just get a silent unintended consequence
18:14 babydrop b7j0c: well, they're native :/
18:14 b7j0c i've been playing with them in code and i'm ready to put them in the "considered harmful" basket
18:14 babydrop heh
18:15 pmurias hmm, should RAKUDO_MONKEY_BUSINESS turn on *all* the monkey pragmas?
18:15 b7j0c is it just a matter of not having the implementation polished? or is failing silently conformant with the spec?
18:15 babydrop m: use MONKEY-BUSINESS; nqp::say("")
18:15 camelia rakudo-moar 7511b4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Could not find nqp::say, did you forget 'use nqp;' ?␤at <tmp>:1␤------> 3use MONKEY-BUSINESS; nqp::say("")7⏏5<EOL>␤»
18:15 babydrop pmurias: prolly not
18:16 geekosaur m: use MONKEY; nqp::say("")
18:16 camelia rakudo-moar 7511b4: OUTPUT«␤»
18:16 babydrop b7j0c: it's by design. They're native types. You get same overflows in C (sans whatever bugs we still have in our natives)
18:16 geekosaur b7j0c, I think the intended use case is with e.g. NativeCall, where conformance with the actual platform behavior is a feature
18:17 jdv79 i think my load issue is just running a few threads of kinda not well performing code
18:17 jdv79 XML and HTTP::Tinyish to be exact
18:17 babydrop m: say Blob.new: 666
18:17 camelia rakudo-moar 7511b4: OUTPUT«Blob:0x<9a>␤»
18:17 jdv79 pretty sure it doesn't need to peg a core to fetch some rss and parse out some bits
18:18 babydrop ^ another location where overflows work
18:18 geekosaur the whole point of the more abstract types is to avoid the native behavior of native types; you use native types when you need the native behavior or you need to interface with code using native types
18:19 Sgeo joined #perl6
18:19 b7j0c what is the "native behavior of native types"?
18:19 HoboWithAShotgun what's the reasoning behind the existence of "$obj.method: args" and why does moritz call it "idiomatic"?
18:20 babydrop HoboWithAShotgun: as opposed to what?
18:20 babydrop That's a way to call a method with some args in Perl 6.
18:20 HoboWithAShotgun as opposed to object.method(args)"
18:20 babydrop eww gross
18:21 babydrop HoboWithAShotgun: well, the : way is less typing and less reading. So sure, I'd say it's idiomatic to use it frequently at the end of the chain.
18:21 HoboWithAShotgun i find it really hard to parse
18:21 babydrop The only point I found it's LTA is when it's followed by a block, like whenever $foo.grep: /x/ { blah blah }
18:22 geekosaur b7j0c, what the CPU does
18:22 geekosaur but that question in and of itself makes me think you are missing the point
18:22 b7j0c what CPU?
18:22 geekosaur ...
18:22 pmurias b7j0c: the CPU the code is running on
18:22 babydrop b7j0c: the processor that's executing the code.
18:23 b7j0c no i get that, but i guess i am probing a bit as to some expectation of a particular platform working in a certain way
18:23 geekosaur b7j0c, yes it is absolutely possible to make Perl 6 treat even those types the way it does its own types.
18:23 b7j0c maybe next week a CPU works differently
18:23 babydrop HoboWithAShotgun: it's especially helpful with nested stuff:  .grep(*.contains("foo")) vs .grep(*.contains: 'foo') or even .grep: *.contains: 'foo'
18:23 geekosaur b7j0c, you've just landed in the C-flavored soup that is why autoconf/cmake/etc. exist
18:24 geekosaur it's a complete mess with very few guarantees. unfortunately it's also the only way you can interface with non-Perl code
18:24 HoboWithAShotgun ok, but now i want to call a method on that
18:24 geekosaur (barring things like ASN.1 --- which is its own kind of absolute mess)
18:25 babydrop HoboWithAShotgun: put parens on! :)
18:25 b7j0c yeah, i suppose what i wish was perl6 had more types beyond Int/Uint...i know you can make subsets, but it would have been nice for Uint8, Uint16 etc to be already there
18:25 babydrop HoboWithAShotgun: where is moritz calling it idomatic BTW?
18:25 b7j0c or at the very least, a Byte type
18:26 b7j0c very handy in Go for example
18:26 HoboWithAShotgun here: https://perlgeek.de/blog-en/perl-6/
18:26 babydrop b7j0c: and what would they do instead of overflowing? Throw an exception?
18:26 b7j0c yes, imho
18:26 b7j0c thats what subsets do, right?
18:26 babydrop b7j0c: well, IMO it's a trivial module to make. In fact, this stuff might already be in Subsets::Common
18:27 b7j0c yes, i wrote that
18:27 babydrop b7j0c: yeah, the subset of UInt where * < 255; is .....
18:27 b7j0c but i wish it wasn't needed
18:27 babydrop ... well, then you know it better than I :)
18:27 [Coke] I do like that the p5 advent is all christmas themed. I may have already said that.
18:27 pyrimidine joined #perl6
18:27 * geekosaur notes that the Haskell equivalent types also don't bother with such. mostly because the primary use cases end up being talking to C or to the network and you're going to land in native types at some point either way
18:28 babydrop b7j0c: well, we can't pack up every thing in the universe into core Perl 6 in case someone decides typing half a line of code is too much work ;)
18:28 geekosaur (well, also because doing it properly needs more than Haskell. that's more Agda level types)
18:28 b7j0c true but Haskell also lets you trivially define types as I have in Subsets::Common that are first-class citizens
18:28 b7j0c subsets i see as second-class citizens
18:28 [Coke] ... why?
18:29 b7j0c runtime checked instead of compile?
18:29 babydrop HoboWithAShotgun: I think you misread moritz's article. It says "you can write .method() as .method:"... and then goes on with "idiomatic form of the small Sudoku formatter", which uses both versions
18:29 b7j0c i mean, they really aren't types at all, more like sugar on functions
18:29 [Coke] rakudo does what it can at compile time, and the rest and run time. doesn't mean more stuff won't move to compile time later.
18:29 b7j0c that would be awesome!@
18:29 tbrowder [Coke] and moritz: the complete draft is there now
18:30 [Coke] rest *at* runtime
18:30 pmurias babydrop: aren't checked sized types much more efficent when integrated into the compiler?
18:30 [Coke] tbrowder: ok. meeting 3-4 that I have to actually prep for, will look this evening. ping me if you don't hear back.
18:30 AlexDaniel and if I recall correctly there is no guarantee that subset checks are run time
18:30 babydrop right
18:31 babydrop They will be compile time if it can be done, as I recall jnthn++ saying
18:31 b7j0c that would be a game changer
18:31 AlexDaniel b7j0c: oh, you sound like a right person to work on this!
18:31 b7j0c i'm too much of an idiot
18:31 AlexDaniel bummer
18:31 tbrowder [Coke] will do--no rush i think, draft is saved (whew!).  i assume one shouldn't schedule it until all tweaks are done?
18:32 babydrop woooo
18:32 * babydrop just got this year's Hacktoberfest shirt o/
18:33 babydrop And a bunch of Octocat stickers \o/ \o/
18:36 pyrimidine joined #perl6
18:38 babydrop pic of the design that I mentioned is much more toned down than last years https://twitter.com/zoffix/status/806930851585986561
18:39 HoboWithAShotgun rakudo: say <a b c>[*/2]
18:39 camelia rakudo-moar 7511b4: OUTPUT«b␤»
18:39 HoboWithAShotgun scary
18:40 babydrop heh
18:40 babydrop rakudo: say <a b c>[*.first: *.is-prime]
18:40 camelia rakudo-moar 7511b4: OUTPUT«Nil␤»
18:40 babydrop oh right
18:40 babydrop rakudo: say <a b c>[*.grep(*.is-prime)[0]]
18:40 camelia rakudo-moar 7511b4: OUTPUT«Nil␤»
18:40 babydrop :(
18:41 babydrop oh right
18:41 babydrop dammit.. my trick won't look cool now after all the struggles!
18:41 babydrop rakudo: say <a b c>[(^*).first: *.is-prime]
18:41 camelia rakudo-moar 7511b4: OUTPUT«c␤»
18:42 babydrop rakudo: say (^2000).[(^*).first: *.is-prime, :end]
18:42 camelia rakudo-moar 7511b4: OUTPUT«1999␤»
18:42 babydrop rakudo: say (^20000).[(^*).first: *.is-prime, :end]
18:42 camelia rakudo-moar 7511b4: OUTPUT«19997␤»
18:43 labster joined #perl6
18:44 babydrop rakudo: say (^20000).[(^*).first: :end, *.first: :end, *.first: :end, *.first: :end, *.is-prime]
18:44 camelia rakudo-moar 7511b4: OUTPUT«Effective index out of range. Is: 19998, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:44 babydrop heh
18:45 babydrop m: say 3.first: :end
18:45 camelia rakudo-moar 7511b4: OUTPUT«Index out of range. Is: 2, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:46 babydrop s: (3,), 'first', \(:end)
18:46 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/7511b43/src/core/Any-iterable-methods.pm#L1127
18:47 babydrop weird, don't see a bug there
18:47 babydrop m: say (3,).first: :end
18:47 camelia rakudo-moar 7511b4: OUTPUT«3␤»
18:47 babydrop oh
18:47 babydrop s: 3, 'first', \(:end)
18:48 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/7511b43/src/core/Any-iterable-methods.pm#L1127
18:48 babydrop ...
18:48 babydrop oh ROFL
18:48 babydrop Now I see it :D
18:49 babydrop it's the cheetsy-doodle + to get .elems
18:49 babydrop I'm just talking to myself here, right? :)
18:49 babydrop It's OK. I enjoy my own company...
18:49 timotimo it's good, yeah
18:49 * babydrop fixes the bug
18:52 HoboWithAShotgun No, don't fix it. Squash it!!eleven!!111
18:53 dalek perl6-most-wanted: 02786c3 | (David Warring)++ | most-wanted/modules.md:
18:53 dalek perl6-most-wanted: Want Math::Units
18:53 dalek perl6-most-wanted:
18:53 dalek perl6-most-wanted: Would happily trade CSS::Declarations::Units (CSS::Declarations module) for something more general purpose.
18:53 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/02786c349a
18:53 HoboWithAShotgun i'ms till trying to understand the code you posted at 12 minutes ago
18:55 HoboWithAShotgun i'ms till trying to understand the code you posted at 12 minutes ago
18:56 HoboWithAShotgun what is the value of the whatever in the indexation?
18:56 babydrop HoboWithAShotgun: the number of elements in the list
18:57 TimToady HoboWithAShotgun: to understand when to use : instead of (), you have to take into account what we call "end weight" in linguistics, which are situations where you don't want to keep information on your mental stack
18:57 HoboWithAShotgun so (^*) is a range from 0 to the number of elements
18:58 cognominal joined #perl6
18:58 babydrop HoboWithAShotgun: to.. number of elements - 1
18:58 TimToady this works well with method arguments that are complete blocks, for instance, so you can just end them with a lonely } instead of having to remember to put });
18:58 babydrop m: say (^2000).[{(0..($^elems-in-the-list-1)).first: :end, { $^index-number-from-zer-till-elems-in-the-list-minus-one.is-prime}}]
18:58 camelia rakudo-moar 7511b4: OUTPUT«1999␤»
18:58 babydrop HoboWithAShotgun: ^ longer version. The { ... } are code blocks
18:59 dwarring joined #perl6
18:59 babydrop m: say (^2000).[sub ($elems-in-the-list) {(0..($elems-in-the-list-1)).first: :end, sub ($index-number-from-zer-till-elems-in-the-list-minus-one) { $index-number-from-zer-till-elems-in-the-list-minus-one.is-prime}}]
19:00 camelia rakudo-moar 7511b4: OUTPUT«1999␤»
19:00 babydrop an even longer version with subs instead of blocks :)
19:00 babydrop m: say ^3
19:00 camelia rakudo-moar 7511b4: OUTPUT«^3␤»
19:00 babydrop m: say eager ^3
19:00 camelia rakudo-moar 7511b4: OUTPUT«(0 1 2)␤»
19:00 effbiai joined #perl6
19:00 effbiai joined #perl6
19:00 babydrop ^ that's what that op does
19:00 babydrop (makes a Range object)
19:00 babydrop huggable: Range
19:00 huggable babydrop, Interval of ordered values: https://docs.perl6.org/type/Range
19:01 TimToady babydrop: superstitious parens around ($elems-in-the-list-1)
19:01 babydrop TimToady: thanks!
19:01 TimToady and that's a really good place for space around infix:<->
19:01 babydrop heheh
19:01 HoboWithAShotgun Oh, hi TimToady. :-) I still have the canvas bag you signed a couple of years ago in lisbon.
19:01 TimToady or why not just use ..^ there?
19:02 babydrop TimToady: I just tried to be a bit more verbose about what's going on
19:02 TimToady heh, was just in lisbon for Web Summit, 58,000 people...
19:02 HoboWithAShotgun for some reason my cat loves to sleep on it.
19:03 TimToady residual sharpie smell is probably catnippy :)
19:06 Cabanossi joined #perl6
19:06 dj_goku joined #perl6
19:06 dj_goku joined #perl6
19:13 HoboWithAShotgun TimToady. A stern word. I have a Perl camel tatooed. That ugly butterfly won't make it I'm afraid. Seriously, what on earth?
19:13 andrzeju_ joined #perl6
19:13 perlpilot HoboWithAShotgun: next you'll be complaining that it's called "Perl 6" ...
19:14 prammer joined #perl6
19:14 babydrop HoboWithAShotgun: the butterfly is proving a good deterrent of snobby elitists
19:14 HoboWithAShotgun indeed. it should be Perl VI ;-)
19:14 babydrop m: dd 3.first
19:14 camelia rakudo-moar 7511b4: OUTPUT«3␤»
19:14 babydrop m: dd 3.first: :p
19:14 camelia rakudo-moar 7511b4: OUTPUT«3␤»
19:14 jonadab perlpilot:  Funny you should say that.  We really should have Perl 7 by now.
19:14 babydrop m: dd 3.first: {True}, :p
19:14 camelia rakudo-moar 7511b4: OUTPUT«0 => 3␤»
19:14 babydrop ^ another bugglet in .first
19:14 * babydrop presses the "Take" button on imaginary ticket
19:15 jnthn babydrop: Where's the bug in that one?
19:16 jnthn oh, `3.first: :p`
19:16 babydrop Yeah, adverbs broke without a matcher
19:16 jnthn Yeah, I only read the line about your ^ :)
19:16 babydrop :)
19:16 prammer joined #perl6
19:16 dogbert17 jnthn: did you release yesterdays superbugfix?
19:17 jnthn release?
19:17 jnthn It's in MoarVM master
19:17 jnthn Ah, maybe you mean "did MOAR_REVISION get bumped"...
19:17 jnthn I can't remember :P
19:18 dogbert17 yes, did MoarVM get bumped :)
19:18 jnthn Just checked; yes
19:19 jnthn Or at least, it seems so
19:19 dogbert17 can't see your commit in 'git log', must be blind
19:19 dj_goku joined #perl6
19:19 dj_goku joined #perl6
19:19 jnthn Well, NQP_REVISION certainly got bumped
19:20 jnthn Though not by me :)
19:20 dogbert17 does an NQP_REVISION bump imply a MoarVM one as well
19:20 jnthn pmurias++ did it for pow_I fixes, and that bump brought my commits along for the ride :)
19:21 jnthn Ah, I meant MOAR_REVISION got bumped, I checked that first :)
19:21 dogbert17 I just can't see the large blog post like commit in there
19:21 jnthn But yeah, looking at the commit IDs, HEAD Rakudo has it
19:21 dogbert17 aha
19:22 jnthn The blog post style commit message was in the Moar repo. I did actually start writing a blog post about the fix last night
19:22 jnthn But it got late and I had to sleep before I could finish it :)
19:22 jnthn Hopefully tonight.
19:23 dogbert17 cool
19:30 cognominal joined #perl6
19:35 lizmat joined #perl6
19:39 mspo this is under discussion in #erlang: https://www.hackerrank.com/challenges/john-and-fences
19:39 mspo feels like a one-liner in perl6?
19:41 domidumont joined #perl6
19:45 moritz mspo: I don't see it yet (how it can be a one-liner)
19:45 labster joined #perl6
19:46 b7j0c would be nice to see perl6 in hackerrank!
19:46 b7j0c ...but at least they have perl5 in most of it
19:47 krakan joined #perl6
19:50 zacts joined #perl6
19:51 mspo moritz: some kind of combo of set ops?
19:54 pyrimidine joined #perl6
19:55 girafe joined #perl6
19:55 wamba joined #perl6
19:57 babydrop I don't see how that can be modeled in a Setty/Baggy since they're unordered
19:58 aindilis joined #perl6
19:58 * babydrop gets a headache and closes the page
20:00 zakharyas joined #perl6
20:02 moritz I believe this is a working solution, though brute force and rather crude: http://perlpunks.de/paste/show/5849bc36.2194.259
20:02 * moritz wonders if the problem is amendable to dynamic programming
20:03 mspo yes
20:06 babydrop m: Failure.new.sink
20:06 camelia rakudo-moar 8cb3e1: OUTPUT«Failed␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
20:06 babydrop m: sink Failure.new
20:06 camelia rakudo-moar 8cb3e1: ( no output )
20:06 * babydrop feels trapped in a bug loop, fixing one bug uncovers another :o
20:08 TEttinger joined #perl6
20:10 geekosaur .oO 99 bugs in the code in the node... take one down, patch it around, 101 bugs in the code in the node
20:10 pmurias babydrop: which bug are you chasing down?
20:11 * pmurias considers fixing up the InvalidCharacter exceptions
20:12 babydrop pmurias: already chased. first without matcher forgets about adverbs, but as I was writing the test I noticed sink Failure doesn't explode it, while Failure.sink does
20:12 babydrop well, I assume it's a bug and not some weird feature :P
20:21 pyrimidine joined #perl6
20:27 dalek doc: 55a5a09 | (Zoffix Znet)++ | doc/Type/List.pod6:
20:27 synopsebot6 Link: http://doc.perl6.org/type/List
20:27 dalek doc: Document the matcher-less .first()
20:27 dalek doc:
20:27 dalek doc: - Existed in Rakudo since pre-Christmas
20:27 dalek doc: - Adverb handling on it fixed in https://github.com/rakudo/rakudo/commit/ababb246a3
20:27 dalek doc: review: https://github.com/perl6/doc/commit/55a5a09e95
20:32 babydrop m: Failure.new.eager
20:32 camelia rakudo-moar ababb2: ( no output )
20:33 babydrop That's why sink Failure.new doesn't explode, it ends up calling .eager
20:34 prammer joined #perl6
20:40 espadrine joined #perl6
20:41 cognominal joined #perl6
20:44 hankache joined #perl6
20:51 SmokeMachine____ joined #perl6
20:53 b7j0c left #perl6
20:58 Tonik joined #perl6
21:01 pyrimidine joined #perl6
21:22 rindolf joined #perl6
21:22 firstdayonthejob joined #perl6
21:36 bjz joined #perl6
21:40 mohae_ joined #perl6
21:49 moritz tic tac toe in Perl 6: http://perlpunks.de/paste/show/5849d55d.40ff.242
21:50 moritz I now have a persistent threat to blog about that, should a hole appear in the advent calendar :-)
21:51 moritz speaking of which, brrt, who is your article coming along?
21:52 moritz 2 hours 8 minutes left...
21:52 bjz joined #perl6
21:56 moritz if things get tight, maybe ask if you can swap with titsuki on day 11, the post seems to be ready
21:57 moritz time for sleep here
21:59 firstdayonthejob joined #perl6
22:00 RabidGravy moritz, do you want the 12th?  I was just going to wing it anyway?
22:13 rurban joined #perl6
22:18 Lucas_One left #perl6
22:23 avuserow joined #perl6
22:35 cognominal joined #perl6
22:36 MasterDuke joined #perl6
22:41 cognominal joined #perl6
22:41 matiaslina joined #perl6
22:53 brrt moritz: I'm nearing done-ness, actually
22:54 timotimo cool
22:54 brrt oh, sleeping already
23:02 brrt timotimo: i'd be very grateful if you could proofread my post when i've finished it
23:04 perlawhirl joined #perl6
23:07 firstdayonthejob joined #perl6
23:11 cognominal joined #perl6
23:14 titsuki moriz: Sorry, I noticed that I mistook the operation and posted my advent post.
23:15 Actualeyes joined #perl6
23:19 rburkholder joined #perl6
23:21 titsuki moriz: I've already changed the release date of my post.
23:25 cognominal joined #perl6
23:31 vcv_ ok, I'm missing something very obvious here...
23:31 vcv_ m: my @grid = (0, 0), (0, 0); @grid[0][0] = 1;
23:31 camelia rakudo-moar 345f6a: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
23:33 TimToady m: my @grid = [0, 0], [0, 0]; @grid[0][0] = 1;
23:33 camelia rakudo-moar 345f6a: ( no output )
23:33 TimToady lists are immutable, arrays are not
23:34 vcv_ Thanks. Brain fart.
23:34 TimToady more precisely, an array will have assignable intermediate containers, while a list will have just whatever was in the list
23:35 vcv_ and if i had used scalars in place of literals, i would have been able to assign?
23:35 TimToady yes
23:35 vcv_ Thank you.
23:35 TimToady m: my int @grid = (0, 0), (0, 0); @grid[0][0] = 1;
23:35 camelia rakudo-moar 345f6a: OUTPUT«This type cannot unbox to a native integer: P6opaque, List␤  in block <unit> at <tmp> line 1␤␤»
23:35 TimToady interestin'
23:36 pyrimidine joined #perl6
23:36 TimToady m: my int @grid[2;2] = (0, 0), (0, 0); @grid[0][0] = 1;
23:36 camelia rakudo-moar 345f6a: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
23:36 TimToady say wot?
23:36 brrt titsuki: ping
23:37 TimToady m: my int @grid[2;2] = (0, 0), (0, 0); @grid[0;0] = 1;
23:37 camelia rakudo-moar 345f6a: ( no output )
23:37 TimToady there we go
23:37 titsuki brrt: hi
23:39 pyrimidi_ joined #perl6
23:40 timotimo brrt: i can try
23:40 timotimo brrt: tell me when it happens
23:40 cognominal joined #perl6
23:41 vcv_ m: my Bool @grid[50;6] is default(False);
23:41 camelia rakudo-moar 345f6a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤is default on shaped Array[Bool] not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my Bool @grid[50;6] is default(False)7⏏5;␤    expecting any of:␤        constraint␤»
23:41 vcv_ darn
23:41 Actualeyes joined #perl6
23:43 khw joined #perl6
23:45 brrt hi. if you want you can publish your post today, that will have no severe effects
23:45 brrt i'm *just* done
23:46 brrt tsitsuki: ^
23:46 brrt we can switch then
23:48 dalek mu: 437662a | (Tom Browder)++ | misc/perl6advent-2016/schedule:
23:48 dalek mu: slight change to title
23:48 dalek mu:
23:48 dalek mu: chosen by Zoffix (babydrop) via his Perl 6 title randomizer code
23:48 dalek mu: review: https://github.com/perl6/mu/commit/437662ae3d
23:51 titsuki brrt: thank you for your advice, but I'll publish my post on 11 th.
23:54 brrt alright, no problem
23:54 brrt i'll do mine in the coming 5 minutes :-)
23:55 samcv where should I look for the code in perl6 that matches left and right delimiters? Pi => 'Pf' or Ps => 'Pe'; for unicode. such as in #`( or q{} things?
23:56 vcv_ What's the syntax for getting the last n elements of an array/list?  @array[..*-n], @array[*-n..*] neither work
23:56 samcv for each Pi codepoint not all the matching Pf ones are 1 codepoint higher, so curious what it uses to find the paired ones
23:58 samcv vcv_, you want the .tail method
23:58 brrt timotimo: https://perl6advent.wordpress.com/?p=5675
23:58 brrt but, i'm going to hit the publish button; my own damn fault for being late :-)
23:59 timotimo brrt: odd line break in the first line
23:59 vcv_ darn, was hoping for a syntax using subscript.  ok thanks

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

Perl 6 | Reference Documentation | Rakudo