Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-06

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 babydrop So that leaves you with the postfix (...).Mix form, which sucks too, because on anything but a trivial Mix the
00:00 babydrop postfix is too far from the start for you to instantly parse the entire list as a mix
00:01 rburkholder joined #perl6
00:07 TimToady joined #perl6
00:08 Actualeyes joined #perl6
00:15 dalek mu: 7d28ceb | (Zoffix Znet)++ | misc/perl6advent-2016/schedule:
00:15 dalek mu: Claim zofspot
00:15 dalek mu:
00:15 dalek mu: "When a Rat Got Too Fat: Perl 6 For Accountants"
00:15 dalek mu: review: https://github.com/perl6/mu/commit/7d28cebcd8
00:23 pierre__ joined #perl6
00:24 babydrop my $m1 = (:weight(10.85), :speed(73.3 ), :lanes-filled(3)).Mix; my $m2 = (:weight(9.75 ), :speed(79.3 ), :lanes-filled(3)).Mix; say $m1 ∖ $m2;
00:24 babydrop m: my $m1 = (:weight(10.85), :speed(73.3 ), :lanes-filled(3)).Mix; my $m2 = (:weight(9.75 ), :speed(79.3 ), :lanes-filled(3)).Mix; say $m1 ∖ $m2;
00:24 camelia rakudo-moar 7ad4a8: OUTPUT«mix(weight(1.1))␤»
00:24 * babydrop doesn't follow that one at all...
00:30 babydrop Now I totally see why abstract wanted those changes to sym diff ops
00:30 babydrop :(
00:32 * babydrop is struggling to come up with a good use for Mixes :\
00:33 Actualeyes joined #perl6
00:36 babydrop never mind, got a good one :P
00:38 aborazmeh joined #perl6
00:38 aborazmeh joined #perl6
00:43 canopus joined #perl6
00:51 _28_ria joined #perl6
00:58 BenGoldberg joined #perl6
00:58 vcv_ Anyone doing www.adventofcode.com, specifically in Perl 6?
00:58 telex joined #perl6
00:59 babydrop vcv_: hahainternet
00:59 babydrop is
00:59 vcv_ Cool, posting solutions anywhere?
00:59 babydrop So far, I think they were struggling coming up with one :P
01:00 vcv_ darn, hoping to find others doing it so i can compare solutions in terms of Perl 6 features used
01:12 BenGoldberg joined #perl6
01:18 pierre__ joined #perl6
01:18 Ben_Goldberg joined #perl6
01:21 seatek joined #perl6
01:28 telex joined #perl6
01:39 babydrop New Perl 6 Advent Post: "Day 6 – Perl 6 Books — the Time is Ripe" https://perl6advent.wordpress.com/2016/12/06/day-6-perl-6-books-the-time-is-ripe/
01:41 skaji joined #perl6
01:41 lighttrr joined #perl6
01:42 BenGoldberg babydrop, Have you tried using MixHash instead of Mix?  Unlike Mix, it's mutable.
01:44 babydrop BenGoldberg: that doesn't help our poor mix routine ;)
01:44 babydrop or the method... which on MixHash is just as flimsy
01:50 cibs joined #perl6
01:51 BenGoldberg m: if 42 -> $_ { .say };
01:51 camelia rakudo-moar 7ad4a8: OUTPUT«42␤»
01:51 BenGoldberg m: if defined 42 -> $_ { .say };
01:51 camelia rakudo-moar 7ad4a8: OUTPUT«True␤»
01:53 * BenGoldberg wonders how hard it would be to create a syntactical wossname such as ifdef, which would act like 'if defined', *except* that the value passed to the block wouldn't be the True returned by defined.
01:53 * BenGoldberg wonders if he's making any sense.
01:53 babydrop BenGoldberg: with 42 { ... }
01:54 babydrop No need to creat anything :)
01:54 BenGoldberg m: with 0 { .say }
01:54 camelia rakudo-moar 7ad4a8: OUTPUT«0␤»
01:54 BenGoldberg m: with Any { .say }
01:54 camelia rakudo-moar 7ad4a8: ( no output )
01:54 BenGoldberg m: with Any { .say } else { say 'nope' }
01:54 camelia rakudo-moar 7ad4a8: OUTPUT«nope␤»
01:54 BenGoldberg Huh.
01:54 BenGoldberg babydrop++
01:56 * BenGoldberg will probably think better after dinner.
01:57 lucasb__ m: without Any {} else {}
01:57 camelia rakudo-moar 7ad4a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤"unless" does not take "else", please rewrite using "if"␤at <tmp>:1␤------> 3without Any {} 7⏏5else {}␤»
01:57 telex joined #perl6
01:57 lucasb__ "unless" does not take "else"
01:57 lucasb__ and it seems that neither does 'without'
01:58 babydrop That's by design.
01:58 lucasb__ I was trying to draw attention to the message mentioning "unless" when I actually typed "without"
01:59 babydrop Oh, didn't notice :)
01:59 pyrimidine joined #perl6
01:59 babydrop Would you report that as a bug, please?
01:59 lucasb__ well, it's not a serious one :)
02:00 babydrop I'd say a pretty serious one :)
02:00 pierre__ joined #perl6
02:01 babydrop It references the thing that's not in code and suggest usage for a operationally different construct.
02:01 lucasb__ that's code reuse
02:01 babydrop haha
02:01 lucasb__ TT reused a grammar production :)
02:03 pierre__ joined #perl6
02:11 AlexDaniel lucasb__: that's a bug, please report
02:12 skids joined #perl6
02:13 kalkin- joined #perl6
02:14 babydrop damn wordpress... my lines are too long for that narrow strip
02:20 vcv_ my %hash = a => 5, b => 3, z => 1, y => 1, x => 1; <<-- how can i get the keys from this hash in sorted order, where the sort is first by value, then by key if value is equal?  so i want to end up with a list (a b x y z)
02:21 vcv_ i know how to do it with a custom sort, but curious if there any sort of shorthand for sorting a hash by value, then key
02:21 AlexDaniel vcv_: may I ask why? :)
02:22 mspo sounds like a nice memory optimization
02:22 vcv_ trying to learn new tricks for advent of code
02:25 vcv_ Something like... %hash.sort: *.value, *.key;
02:25 AlexDaniel m: my %hash = a => 5, b => 3, z => 1, y => 1, x => 1; .say for %hash.pairs.sort({ ($^a.key cmp $^b.key) || $a.value cmp $b.value })
02:25 camelia rakudo-moar 7ad4a8: OUTPUT«a => 5␤b => 3␤x => 1␤y => 1␤z => 1␤»
02:26 japhb Absolutely honest question: Why are we still serving with Wordpress, given that everyone seems to hate it?  Just hysterical raisins?
02:26 AlexDaniel japhb: what else would you recommend?
02:28 japhb AlexDaniel: That depends on what we want from it.  There's a part of me that says "Just use Github Pages", but I have no idea how hard it would be to put commenting on there.  And if we still want it to be blog-like, there are other general blogging platforms that would work.  And as a base, there's always the option of serving static pages that we generate however we want.
02:29 AlexDaniel well, I think switching is not justified unless we switch to dogfood
02:30 japhb AlexDaniel: the last option I listed above was one variant of the dogfood branch
02:30 japhb (I realize that wasn't obvious.)
02:30 mspo you have mustache and pod6/markdown :)
02:30 Juerd The world needs a blog/cms that doesn't suck, and we need it to be written in Perl 6. Problem is, it'd be a huge project.
02:30 mspo how many lines would that take?
02:30 mspo Juerd: yes
02:31 babydrop What do I schedule my advent post as?
02:31 babydrop Oh
02:31 babydrop Never mind... got confused by dates.
02:31 AlexDaniel Juerd: right now I am starting a wiki engine, it will work nicely for blogs too
02:31 AlexDaniel Juerd: but it will take quite some time… :)
02:32 Juerd Publishing documents by itself is easy. Some templates, done. But to make it enduser friendly, you need user accounts, wysiwyg, scheduling, draft status, categories. And to make it nice for visitors, you need comments. And then you need moderation. Argh.
02:32 mspo maybe nailing down binary-based networking would be a good first sttep
02:32 mspo Juerd: then you also need tons of javascript
02:32 babydrop mspo++
02:33 mspo (binary networking for H2, you know)
02:33 Juerd And since Perl 6 doesn't quite perform well yet, most of it needs to be static generated content.
02:33 AlexDaniel Juerd: or just cached
02:33 babydrop For Advent writers: wrote a little script to convert a markdown rendered Gist to HTML stuff you can stick into Wordpress: https://gist.github.com/zoffixznet/bea4474a4aa35303ead0fbc36524d828
02:33 Juerd AlexDaniel: Believe me, caching really doesn't suffice if your platform is as heavy as Perl 6.
02:34 Juerd AlexDaniel: One little mistake (e.g. not normalizing urls in your caching mechanism) and you end up with a dead server.
02:34 AlexDaniel Juerd: what kind of data is this based upon?
02:35 AlexDaniel Juerd: like, what website did you have?
02:35 Juerd AlexDaniel: Experience with similar things, written in Java.
02:35 Juerd And Perl 6 now is much heavier than Java then.
02:35 Juerd Caching is hard, generating static content is easy. At least, if you make the design choice early. That's another reason for not going with caching.
02:36 mspo it's always a level
02:37 mspo should your perl6 server be listening on 80?  443?  doing its own TLS?
02:37 mspo it no, which protocl should apache use to talk to you, over what?
02:37 mspo etc
02:37 mspo too bad the mojo guys left :)
02:38 Juerd For most of the content, the web server should not be talking to your application at all.
02:40 Juerd The thing is, if you have caching, the hard part is invalidating the cache. And if you're doing cache invalidation right, you might as well just generate pages at that point. The easier solution is expiry based caching, but that tends to kill servers when everything expires together.
02:46 mspo smarter CDN know how to handle that (fastly)
02:46 mspo using a lot of tricks
02:46 mspo https://docs.fastly.com/guides/performance-tuning/request-collapsing
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:49 Juerd I don't think a CMS that depends on those tricks has a good chance of becoming popular.
02:49 mspo wordpress is popular because it's "easy"
02:49 mspo or like gui-driven
02:49 mspo I don't see an opportunity to repeat the wordpress magic
02:50 Juerd Oh, a lot of people are looking for alternatives for wordpress
02:50 mspo because the world is different now
02:50 mspo you say that and I think it sometimes too
02:50 mspo but go look at a job board :)
02:50 Juerd Different people are switching for different reasons. And yes, the majority is staying with wordpress.
02:50 mspo wordpress + RoR = tons of jobs
02:51 Juerd But for example Ghost is gaining popularity.
02:51 Juerd And Ghost's main feature seems to be simplicity.
02:51 Juerd We can do simple :)
02:51 Juerd If job boards are your guide, I wonder why you'd bother with Perl 6 at all :D
02:52 mspo it's some kind of mental illness I have
02:52 Juerd :)
02:52 Juerd Don't get better :)
02:52 mspo every part of wordpress except for actual wordpress is pretty amazing
02:53 mspo the jobs situation, the plugins and themes marketplaces
02:53 mspo those two things are very impressive
02:53 Juerd Well, wordpress itself is pretty amazing too. As in: it continues to amaze me.
02:53 mspo it fails to amaze me since I run it on a moderately popular site ;)
02:53 mspo scaling out is tricky
02:54 Juerd I wonder what moderately popular means :)
02:54 Juerd In terms of hits per second during peak hours, how much does it endure?
02:56 mspo well on moderately small aws instances I was having issues around 30 req/s if I remember correctly
02:56 Juerd Eek, 4 o'clock... Sorry, bed time for me.
02:57 Juerd 30 r/s is quite a lot!
02:57 mspo anyway if you have a NAS and memcache you can scale out
02:57 mspo and amazon has EFS now, which is a good enough (albeit slow) NAS
02:58 Juerd Good night!
02:58 mspo so now it's pretty easy to scale out (single region) ;)
02:58 mspo 'night
03:06 labster joined #perl6
03:19 noganex_ joined #perl6
03:21 pyrimidine joined #perl6
03:38 bjz joined #perl6
03:46 pierre__ joined #perl6
04:08 _28_ria joined #perl6
04:11 bpmedley joined #perl6
04:11 samcv do words like `deeply` `rw` `raw` `copy` they HAVE to come after `is` right? like `is export` etc
04:12 AlexDaniel right?
04:12 samcv pretty sure they must
04:12 samcv wanted to ask before i update the syntax highlight
04:14 AlexDaniel .oO( sub immerse deeply {  } )
04:14 geekosaur yes, they must. it's trait_mod:<is> in the grammar
04:15 samcv yeah looking at traits.pm
04:15 samcv yeah. seems to be they have to
04:18 geekosaur "is" is how the grammar knows to look for a trait_mod:<is>
04:24 cooper_ joined #perl6
04:25 Xliff_ZZzzZZZzzz samcv: Syntax highlight for what editor, if you don't mind?
04:26 samcv Atom. also the one github uses for syntax highlighting
04:27 Xliff Hmm... may want to try that.
04:27 samcv i'm probably not going to change it for now.. should be mostly fine, at least made any of those things that comes before => not highlight, in case somebody uses a key
04:27 samcv err as a key for pairs
04:28 Xliff Sublime Text used to have decent perl highlighting, but that was Perl5.
04:28 Xliff With Perl6 there are... issues.
04:28 samcv the atom highlighting is the best i think. Install "Perl 6 FE"
04:28 samcv well at least since i added fancy quotation marks and lots of quoting constructs :)
04:29 samcv Xliff, my changelog is here https://github.com/samcv/language-perl6fe/blob/testing/CHANGELOG.md just started working on it a week ago
04:29 Xliff Yeah. That's what's getting the Sublime Highlighting confused.
04:29 samcv so got a ton of things working that hadn't worked
04:29 Xliff samcv++
04:29 Xliff Now let's see if it installs on debian vm
04:29 samcv heh
04:30 samcv v1.9 isn't out yet. will be when MadCapJake gets out of hibernation again
04:31 samcv he needs to just give me commit access ;P
04:35 Xliff feck
04:35 Xliff Atom is x64 only. The VM is i386
04:35 samcv it's x64 only?
04:35 Xliff So back to sublime it is.
04:35 Xliff Yup
04:35 samcv you can't just compile it yourself???
04:35 Xliff Aparently not.
04:36 samcv i am sure you can though
04:36 samcv even if they don't provide packages for it
04:36 samcv what distro?
04:37 samcv oh Xliff you can use atom grammars in sublime
04:37 Xliff Debian
04:38 Xliff Oh really?
04:38 samcv just clone this into your packages folder for sublime
04:38 samcv git clone -b testing https://github.com/samcv/language-perl6fe.git
04:38 samcv i think that should magically work maybe
04:41 Xliff Will try.
04:42 samcv hmm i don't use it but idk how to enable packages or anything so
04:42 samcv but i think it should work
04:42 Xliff Nope. Not seeing it. Will check.
04:45 pierre__ joined #perl6
04:51 TimToady joined #perl6
04:54 samcv hmm i know atom uses similar to textmate and sublime can use textmate
04:54 samcv there must be a way but all i'm seeing are how to use a normal textmate thing in sublime and there must be some other package data it needs
04:55 samcv hmm
04:55 samcv Xliff, i will investigate ok
04:56 Xliff Yeah. ST3 switched to a custom package thingy.
04:56 Xliff So I am trying to build atom from src
04:56 samcv ah ok
04:56 Xliff Finally got the right version of nodejs and npm on the VM so things look like they are working.
04:57 pyrimidine joined #perl6
04:57 samcv cool
04:59 samcv so looks like textmate are xml files and atom ones are the same, but they use basically JSON (technically CSON)
04:59 samcv but CSON is just JSON with less brackets
04:59 samcv i might look into figuring that out, because they we would have perl 6 highlighting on sublime, textmate and atom
05:01 samcv that would be sick
05:02 samcv gonna get a textmate bundle. then use atom to convert it to atoms package format. then get some way to automate converting them
05:09 labster joined #perl6
05:18 arnsholt joined #perl6
05:29 inokenty joined #perl6
05:30 pyrimidine joined #perl6
05:34 pierre__ joined #perl6
05:34 mohae_ joined #perl6
05:56 Cabanossi joined #perl6
06:08 pyrimidine joined #perl6
06:11 pyrimidine joined #perl6
06:19 domidumont joined #perl6
06:21 timotimo babydrop: give me your wordpress account name or whatever i need and i'll give you access
06:24 pierre__ joined #perl6
06:25 domidumont joined #perl6
06:29 baest_ masak: wheee, at least my 2 secs of fame :D
06:30 timotimo i'm not quite sure why calling $sum = $sum + $_ over and over spends 18.7% in mp_mul_2d
06:43 timotimo ah, it comes from MVM_bigint_add via mp_set_long and set_int via MVM_bigint_mp_set_uint64
06:45 Xliff Wheee!
06:45 Xliff I can't get Atom to start.... and converting "cson" to something usable looks to be non-trivial. :/
06:45 timotimo m: say 1 << 32
06:45 camelia rakudo-moar 7ad4a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~<␤at <tmp>:1␤------> 3say 1 <<7⏏5 32␤»
06:45 Xliff I will bug samcv tomorrow.
06:45 timotimo m: say 1 +< 32
06:45 camelia rakudo-moar 7ad4a8: OUTPUT«4294967296␤»
06:45 samcv what, hi
06:45 Xliff Oh, hi.
06:46 Xliff I built atom. Started it. No GUI. EVAR
06:46 timotimo m: say (1 +< 32) - 1000000
06:46 camelia rakudo-moar 7ad4a8: OUTPUT«4293967296␤»
06:46 samcv you're on debian?
06:46 timotimo this shouldn't even reach bigint territory ...
06:46 Xliff So now I am looking at the grammar files and "TextMate support" covers a wide bit of real-estate.
06:46 bjz joined #perl6
06:46 Xliff The problem here is that the language-perl6fe is not directly usable by ST3
06:47 darutoko joined #perl6
06:47 Xliff m: say 1 +< 16
06:47 camelia rakudo-moar 7ad4a8: OUTPUT«65536␤»
06:47 Xliff m: say 1 +< 32
06:47 camelia rakudo-moar 7ad4a8: OUTPUT«4294967296␤»
06:47 Xliff m: say 1 +< 64
06:47 camelia rakudo-moar 7ad4a8: OUTPUT«18446744073709551616␤»
06:47 samcv i'm working on getting cson converted to xml now
06:47 Xliff samcv++ -- got bless you!
06:47 Xliff You have your first guinea pig right here.
06:47 samcv u: crying face
06:47 unicodable6 samcv, U+1F622 CRYING FACE [So] (😢)
06:47 unicodable6 samcv, U+1F62D LOUDLY CRYING FACE [So] (😭)
06:47 unicodable6 samcv, U+1F63F CRYING CAT FACE [So] (😿)
06:48 Xliff I have to add some nice smileys to wincompose
06:48 Xliff :(
06:48 samcv would be nice if unicodable6 stored all the stuff in a datastructure instead of havig to search all of them
06:48 Xliff Hrm.
06:48 samcv i wrote my own for my ircbot, and was a like 4x speed improvement from unicodable
06:48 samcv after deciding it was too slow
06:50 samcv why so hard to have a json2xml converter that works
06:50 samcv goddamit
06:50 RabidGravy joined #perl6
06:50 samcv it's like nobody has had this problem before
06:51 samcv xi did it though
06:52 samcv now to see if the datastructure is correct. had to first convert from cson to json, then find some json converter. actually had to download `xmlsh` which is... like some shell for xml?
06:52 samcv i couldn't find a standalone program that actually worked
06:54 timotimo oh, of course, the sum quickly reaches bigint territory because reasons
06:54 samcv tho textmate is actually plist type xml so goddamit
06:54 timotimo never mind, move along ...
06:57 Actualeyes joined #perl6
07:03 Tonik joined #perl6
07:05 domidumont joined #perl6
07:05 Xliff Dammit!~
07:05 Xliff VirtualBox doesn't support glx 1.3?!?
07:06 Xliff *sigh*
07:08 samcv m: my $str = '<member name="thing">'; $str ~~ s| ‘<member name="’ (.*?) ‘">’ |<key>$0</key>|; say $str;
07:08 camelia rakudo-moar 7ad4a8: OUTPUT«Use of Nil in string context␤  in code  at <tmp> line 1␤<key>␤»
07:08 samcv why does this not work?
07:09 samcv m: my $str = '<member name="thing">'; $str ~~ s| ‘<member name="’ (.*?) ‘">’ |<key>$0</key>|; say $str; say $0;
07:09 camelia rakudo-moar 7ad4a8: OUTPUT«Use of Nil in string context␤  in code  at <tmp> line 1␤<key>␤「thing」␤»
07:09 samcv m: my $str = '<member name="thing">'; $str ~~ s| ‘<member name="’ (.*?) ‘">’ |<key>$0</key>|; say $str; say $0.Str;
07:09 camelia rakudo-moar 7ad4a8: OUTPUT«Use of Nil in string context␤  in code  at <tmp> line 1␤<key>␤thing␤»
07:09 samcv it gets the match...
07:19 kurahaupo__ joined #perl6
07:25 dalek mu: 7ceee0e | ugexe++ | misc/perl6advent-2016/schedule:
07:25 dalek mu: Update schedule
07:25 dalek mu: review: https://github.com/perl6/mu/commit/7ceee0e16f
07:26 Xliff That's odd, coz this works: m: my $str = '<member name="thing">'; $str ~~ s| '<member name="' (.*?) '">' | <key> $0 </key> |; say $str
07:26 Xliff m: my $str = '<member name="thing">'; $str ~~ s| '<member name="' (.*?) '">' | <key> $0 </key> |; say $str
07:26 camelia rakudo-moar 7ad4a8: OUTPUT« <key> thing </key> ␤»
07:26 firstdayonthejob joined #perl6
07:26 Xliff m: my $str = '<member name="thing">'; say $str; $str ~~ s| '<member name="' (.*?) '">' | <key> $0 </key> |; say $str
07:26 camelia rakudo-moar 7ad4a8: OUTPUT«<member name="thing">␤ <key> thing </key> ␤»
07:27 Xliff It's a metachar issue.
07:27 Xliff m: my $str = '<member name="thing">'; $str ~~ s| '<member name="' (.*?) '">' | \<key\>$0\<\/key\> |; say $str
07:27 camelia rakudo-moar 7ad4a8: OUTPUT« <key>thing</key> ␤»
07:27 Xliff m: my $str = '<member name="thing">'; $str ~~ s| '<member name="' (.*?) '">' |\<key\>$0\<\/key\>|; say $str
07:27 camelia rakudo-moar 7ad4a8: OUTPUT«<key>thing</key>␤»
07:27 Xliff samcv: ^^
07:27 inokenty joined #perl6
07:29 wamba joined #perl6
07:30 pyrimidine joined #perl6
07:31 telex joined #perl6
07:31 samcv ah
07:31 samcv i thought the after section was literal
07:31 ribasushi joined #perl6
07:31 samcv i know it allows ' marks at least
07:31 samcv without quoting
07:32 breinbaas joined #perl6
07:34 CIAvash joined #perl6
07:35 Actualeyes joined #perl6
07:36 zgrep joined #perl6
07:37 pyrimidine joined #perl6
07:41 zgrep Question... perl6 regexes / grammars are very left-to-right oriented, right? Is there a way that I could convince them to be more right-to-left parsing?
07:42 masak zgrep: reverse the string before parsing? :)
07:42 zgrep I was indeed thinking of that, but that seems... not like the best solution. :P
07:42 masak could possibly also do something cool with the MOP to allow you to write the regexes in the natural direction
07:46 timotimo we already have magical string flipping for lookbehinds
07:47 zgrep Ooh... hmm...
07:48 masak when I last investigated lookbehinds, I concluded that it needed three different strategies to work in general -- one default and two increasingly worse fallbacks
07:48 masak but that was around 2011 so my memory is very fuzzy, and I might very well be wrong, too
07:48 timotimo so if you do something like .* <?after my whole regex> maybe that works? though perhaps it'll refuse to do a variable-width lookbehind??
07:49 samcv Xliff, wow sublime sucks. the file looks mostly correct but
07:49 samcv sublime says Error loading syntax file: Unrecognized plist element
07:49 samcv 10/10 helpful. doesn't tell me what line or even what key
07:50 zgrep Reversing the string is looking more alluring by the second. :P
07:50 samcv yeah just reverse the string haha
07:51 pyrimidine joined #perl6
07:52 samcv does perl 6 support variable width lookbehinds?
07:52 brillenfux joined #perl6
07:52 ribasushi joined #perl6
07:52 Xliff samcv: I've not been impressed with the internals, myself.
07:52 Xliff However I haven't been able to complain about the editor itself.
07:52 Xliff I'm still trying to get atom to work.
07:53 Xliff Sucks-but-works will beat Awesome-but-broken everytime. :/
07:53 samcv why do you need to use a vm?
07:53 zgrep Reversing the string seems like it might work for me... except some parts of my string *are* parsed left to right... :/
07:53 samcv what's the regex zgrep ?
07:54 zgrep It's not a regex in particular, I'm trying to make a grammar to parse k (kparc.com/k.txt).
07:54 samcv ah
07:57 zgrep In particular, the crucial line would probably be «grammar: E:E;e|e e:nve|te| t:n|v v:tA|V n:t[E]|(E)|{E}|N». Implementing that in a grammar causes perl 6 to go in an infinite loop, because n:t... t:n... and similar.
07:57 samcv infinite? or just really really slow?
07:57 samcv :P
07:57 zgrep Infinite, because t tries checking for n, then n tries checking for t, then t tries checking for n, etc.
07:58 zgrep Reordering things helps... but not by much...
07:58 * zgrep tries some more
07:58 samcv hmm
07:58 samcv can i see the file
07:59 samcv i see what you're trying to parse but the rest of the program?
07:59 zgrep Err, lemme try something out and see if that works.
07:59 zgrep The rest of the program is nonexistent, I'm just trying to get it to parse. :P
08:00 samcv oh
08:01 samcv what's the full grammar though
08:02 zgrep https://www.irccloud.com/pastebin/cN0CjWop/parse.p6
08:03 samcv thanks :)
08:03 ufobat joined #perl6
08:03 jonas1 joined #perl6
08:07 zgrep Maybe...
08:09 samcv well zgrep it looks like it's recursive..
08:10 zgrep samcv: Yes.
08:10 pierre__ joined #perl6
08:10 * zgrep tries to remove the left-recursion
08:10 kurahaupo__ joined #perl6
08:10 samcv like really recursive
08:11 samcv <expression> has <expression> in it
08:11 samcv it's gonna keep going
08:11 zgrep No, not that one.
08:11 zgrep That's right recursive, I think that for the way it's parsed, it's okay.
08:11 zgrep Assuming <nounish> and <verbish> aren't recursive, it'll be fine.
08:11 zgrep I think.
08:11 zgrep And aren't blank.
08:12 abraxxa joined #perl6
08:12 zgrep But I could probably remove that particular recursion with a few carefully places brackets and a +.
08:12 zgrep s/places/placed/
08:14 samcv expression is what's causing the problem
08:14 samcv but yeah. make it not infinetely recursive
08:15 zgrep expression's causing the problem? I see the left-recursion as being what's causing the problem, in particular through callable with regards to nounish and verbish.
08:15 samcv i mean it might help to make two tokens
08:15 zgrep At least, that's what Grammar::Tracer shows repeating a bunch of times. :P
08:16 zgrep Yeah, I think that'd do it...
08:19 _ramix_ joined #perl6
08:20 pierre__ joined #perl6
08:25 zakharyas joined #perl6
08:35 Xliff Aannnnd....
08:35 Xliff Atom STILL blows up in the VM because I can't get server glx to 1.3 *sigh*
08:35 Xliff Calling it a night.
08:40 zgrep samcv: Yeah, that'll do it. To quote some random thing on the internet «Again, the solution is simple. Rewrite at least one of the rules so that the first condition it tries to match is not itself a recursive situation».
08:40 samcv yeah you need more tokens or whatever
08:40 samcv so you can do what you want to do
08:42 zgrep This seems like a simple enough task that I *could* make it automatically figure out what to do... if I knew perl6 well enough to mangle regexen properly.
08:43 arnsholt The rule for recursive descent parsers is: You need to consume at least *one more character* before calling back into a rule you're already inside
08:43 zgrep Well, now that I know what I need to do, I'll sleep because I'm not awake enough to actually do it.
08:44 zgrep Thanks for helping.
08:44 arnsholt Although if you're parsing expressions, implementing an Operator Precedence layer a la HLL::Grammar.EXPR (from NQP) is probably more robust
08:45 * zgrep takes a look
08:45 pyrimidine joined #perl6
08:45 arnsholt The code is moderately hairy, but it's grokkable if you know how the algorithm works
08:45 arnsholt It's basically a shunting yard algorithm: https://en.wikipedia.org/wiki/Shunting-yard_algorithm
08:46 * lizmat clickbaits https://p6weekly.wordpress.com/2016/12/05/2016-49-its-looking-a-lot-like-blog-posts/
08:47 zgrep arnsholt: Oh, that... hmm...
08:47 DrForr What's this about grammars? :)
08:48 g4 joined #perl6
08:48 g4 joined #perl6
08:48 * arnsholt is actually working on something blog-posty on how to do it in Perl 6
08:49 arnsholt Was hoping I'd get it ready in time for the calendar, but doesn't look terribly promising, sadly =(
08:49 moritz lizmat++
08:49 dakkar joined #perl6
08:52 zgrep Not sure if precedence would help me with what I'm doing tremendously, because everything has the same precedence in what I'm parsing. It's right to left, pretty much always: 2*2+2 is 8.
08:55 moritz same precedence, right associativity
08:57 pyrimidine joined #perl6
08:58 arnsholt OPP can handle associativity too =)
09:06 arnsholt I'm a bit confused why you want to parse expressions with right-associativity though? That's kind of esoteric
09:09 bjz_ joined #perl6
09:18 TEttinger arnsholt: exponentiation?
09:20 arnsholt Well that's one of the few operators that usually are rassoc. But he did say he wanted 2*2+2 to evaluate to 8
09:20 arnsholt Which is less usual =)
09:21 DrForr Well, I know of at least one language (that I recently mentioned at a talk) that uses strictly r-to-l evaluation :) APL :)
09:22 abraxxa has anyone checked the segfault I've discovered last week?
09:22 arnsholt DrForr: Oh, that's interesting!
09:22 arnsholt Smalltalk is the opposite; all infixes are evaluated from left to right
09:23 DrForr (it could be l-to-r, I don't offhand remember but I kmow that it doesn't use precedence beyond parens.)
09:31 DrForr Indeed. Simplified the parsing, but it makes it hard to integrate with languages with multiple precedence levels.
09:42 sufrostico joined #perl6
09:42 arnsholt Yeah, Smalltalk has everything at the same precedence with the same associativity because it's just a different kind of method-call syntax
09:43 arnsholt "a + b" being just a send of the message "+" with the argument b to object a
09:43 El_Che DrForr: did you do a perl6 talk at the Lwp? If yes, how was the public?
09:46 AlexDaniel joined #perl6
09:47 DrForr Two, actually.
09:48 DrForr The first was a workshop, 2 hours long but due to the fact that it was over lunch I lost a few people after break. We started with ... counting... 15 people.
09:50 El_Che sounds nice. What subject?
09:51 DrForr 2-hour intro; I got a late start because I'd managed to lose my HDMI -> VGA adapter and had to rush around finding one.
09:51 El_Che DrForr: I have one on my laptopbag for fosdem :)
09:51 El_Che too bad I don't have mac cables
09:53 DrForr I need to get one when I'm back in the States; I keep forgetting the damn things.
09:54 El_Che no convertor in romania? :)
09:55 pyrimidine joined #perl6
09:59 dalek mu: a3ad9fa | drforr++ | misc/perl6advent-2016/schedule:
09:59 dalek mu: Adding Roman Numerals
09:59 dalek mu:
09:59 dalek mu: I'll just reprise a blog post because I'm going to be somewhat pressed for time. I *really* want to do Babylonian but that'd mean rewriting the Perl 6 core a bit. The other reason is that the cuneiform numbers aren't exactly common in Unicode fonts, so it won't play as well. But I *will* do it, damnit.
09:59 dalek mu: review: https://github.com/perl6/mu/commit/a3ad9faaa0
10:00 * DrForr sighs. At least I know what I'm doing tonight.
10:01 bjz joined #perl6
10:03 grondilu joined #perl6
10:09 arnsholt DrForr: Maybe Noto has cuneiform numerals?
10:09 arnsholt IIRC it does have cuneiform
10:10 arnsholt Indeed it does
10:10 DrForr Well, it's not going to go live until the 10th, so I've got time...
10:11 El_Che brian d foy's book is almost finance. $680 left for 10 days. Nice
10:11 arnsholt Nice!
10:12 * arnsholt is looking forward to looking at early versions
10:12 DrForr I already have :) *very* early :)
10:13 arnsholt Oooh! I'm jealous =)
10:14 Technaton joined #perl6
10:14 El_Che DrForr: is it a translation of the perl 5 (e.g. variable names in examples) or not related at all?
10:14 DrForr We're still doing outline work at this stage. (yes, I say 'we'.)
10:15 El_Che DrForr: mmm
10:17 notbenh joined #perl6
10:20 wamba joined #perl6
10:30 lucasb joined #perl6
10:32 lucasb how can I infinitely cycle an list of values?
10:32 lucasb I have <a b c> and want '( ... )[^10]' to give me back 'a,b,c,a,b,c,a,b,c,a'
10:33 lucasb what goes into the '...' there ? :)
10:33 lucasb sorry, it's a lazy question. I keep forgeting how to code the simple things
10:34 DrForr I see what you did there :)
10:35 lucasb double loaded lazy? :)
10:35 DrForr El_Che: Re: variable names, no, it's not going to be .. well, to be honest, what Will Braswell did with his "Learning RPerl."
10:35 rindolf joined #perl6
10:35 jnthn m: say (|<a b c> xx *)[^10]
10:35 camelia rakudo-moar b67c1e: OUTPUT«(a b c a b c a b c a)␤»
10:35 lucasb jnthn: exactly! thanks!
10:36 lucasb I have already asked this same question before and forgot the idiom...
10:38 El_Che DrForr: do you use synonimes for "slow" as variable names?
10:41 bjz joined #perl6
10:41 DrForr The only new variable I've used in the last week is $q, actually.
10:42 DrForr That's mpstly because the only module I've been working on in the last week or so has been Perl6::Parser, and it's mostly the remaining bug fixes before release to the ecosystem.
10:44 lucasb .oO( my $q = CGI->new )
10:45 DrForr No, I originally named the parsed tree $p, so I'm doing 'for $p.list -> $q { }' it was just a rational step.
10:46 El_Che I tend to avoid single char vars execpt in small loops (e.g. k,v)
10:46 lucasb yeah, I like sequenced variable names too
10:46 El_Che but that's not handy in a book with limited space of course
10:46 DrForr The file is over 7000 lines long, I just don't want to retype cr*pt.
10:47 DrForr This isn't for the book, although it'll probably get mentioned there.
10:51 lucasb m: say (|('__\\|/'.comb Xx 2) xx *)[^27].join
10:51 camelia rakudo-moar b67c1e: OUTPUT«____\\||//____\\||//____\\||//____\\||//____\\||//____␤»
10:52 lucasb I don't know, think of it as a little christmas decoration
10:58 pierre__ joined #perl6
10:59 pmurias joined #perl6
11:02 dalek mu: 3731994 | (Zoffix Znet)++ | misc/perl6advent-2016/schedule:
11:02 dalek mu: Clear out zofspots to make the schedule look more empty
11:02 dalek mu: review: https://github.com/perl6/mu/commit/3731994797
11:03 Ulti is there something a bit like categorize which is for folding an array into a hash?
11:03 Ulti m: say "hi 1 boo 2 fart 3".split(" ").rotor(2).categorize: *[0]
11:03 camelia rakudo-moar b67c1e: OUTPUT«{boo => [(boo 2)], fart => [(fart 3)], hi => [(hi 1)]}␤»
11:04 Ulti so you dont have the key in the value list and you don't assume there will be many you just overwrite
11:04 babydrop m: "hi 1 boo 2 fart 3".words.Hash.say
11:04 camelia rakudo-moar b67c1e: OUTPUT«{boo => 2, fart => 3, hi => 1}␤»
11:04 Ulti that doesnt do what I want though because there could be a whole list of values
11:04 Ulti not just one
11:05 Ulti its more like .rotor(6)
11:06 babydrop I've no idea what you mean then...
11:06 babydrop How does it know which ones are values?
11:06 Ulti its not just key value pairs
11:06 Ulti its a key with a lot of values as a list
11:07 Ulti babydrop thats what the categorize does
11:07 Ulti I tell it just the first value is the key
11:10 jnthn I think the bit I'm missing is how categorize doesn't do what you wish?
11:10 jnthn Hash.push may be on interest though
11:10 jnthn *of
11:11 jnthn Oh, categorize leaves the key part in the value
11:11 sena_kun joined #perl6
11:12 jnthn m: my %h; %h.push("hi 1 boo 2 fart 3".split(" ")); dd %h
11:12 camelia rakudo-moar b67c1e: OUTPUT«Hash %h = {:boo("2"), :fart("3"), :hi("1")}␤»
11:12 jnthn m: my %h; %h.push("hi 1 boo 2 fart 3 hi 4".split(" ")); dd %h
11:12 camelia rakudo-moar b67c1e: OUTPUT«Hash %h = {:boo("2"), :fart("3"), :hi($["1", "4"])}␤»
11:12 jnthn Is that more like it?
11:13 babydrop m: say "hi 1 2 boo 2 3 fart 3 4".split(" ").rotor(3).categorize(*[0]).Hash.map: { .key => [|.value.[0][1..*]] }
11:13 camelia rakudo-moar b67c1e: OUTPUT«(boo => [2 3] fart => [3 4] hi => [1 2])␤»
11:13 psch "it's more like .rotor(6)" sounds like the input data plainly isn't consistent..?
11:15 babydrop Not sure what happened to my Advent Highlighter URL. Here's anoither copy: https://gist.github.com/zoffixznet/93f338e576cbf5ba1a19364e4125bbc9
11:16 pyrimidine joined #perl6
11:16 DrForr Mmhmm, on the FB posting I mentioned the way to fix the URL.
11:17 babydrop I don't see any % after the zoffix and it was broken in #perl6 log too
11:20 xin0x joined #perl6
11:29 babydrop .seen [Coke]
11:30 pyrimidine joined #perl6
11:30 babydrop I guess the reign of ownerless yoleaux is over? or what happened? :)
11:30 pyrimidine joined #perl6
11:36 lukaramu joined #perl6
11:37 yoleaux2 joined #perl6
11:37 babydrop All hail the New Emperor of messaging!
11:38 babydrop .tell timotimo I think it's just zoffix (RE: wordpress account for weekly perms)
11:38 yoleaux2 babydrop: I'll pass your message to timotimo.
11:38 babydrop .tell [Coke] Your post is up soon. I have one already-written stashed away, I could schedule if you need more time. Lemme know
11:38 yoleaux2 babydrop: I'll pass your message to [Coke].
11:40 Ulti m: say "hi 1 2 3 boo 2 3 4 fart 3 4 5 fart 4 5 6".split(" ").rotor(4).categorize: *[0]
11:40 camelia rakudo-moar b67c1e: OUTPUT«{boo => [(boo 2 3 4)], fart => [(fart 3 4 5) (fart 4 5 6)], hi => [(hi 1 2 3)]}␤»
11:40 Ulti I only want one entry for fart and yeah the key doesn't need to be in the values
11:40 Ulti (I should have given a better example)
11:40 Ulti but hash.push is good to know!
11:41 babydrop m: say "hi 1 2 boo 2 3 fart 3 4 boo 5 6".split(" ").rotor(3).categorize(*[0]).Hash.map: { .key => [|.value».[1..*]] }
11:41 camelia rakudo-moar b67c1e: OUTPUT«(boo => [(2 3) (5 6)] fart => [(3 4)] hi => [(1 2)])␤»
11:42 Ulti right but thats doing a lot of work
11:42 Ulti I know I can transform what I ahve
11:42 Ulti you dont really need the categorize there
11:42 Ulti its more is there some options for categorize or a method I'm missing
11:43 Ulti not sure why but the verb fold constantly keeps coming to mind
11:43 psch m: say "hi 1 2 3 boo 2 3 4 fart 3 4 5 fart 4 5 6".split(" ").rotor([1,3]).Hash
11:43 camelia rakudo-moar b67c1e: OUTPUT«{boo => (2 3 4), fart => (4 5 6), hi => (1 2 3)}␤»
11:43 psch ah, but that still needs the .push
11:43 Ulti aha
11:43 Ulti that is a cool feature of rotor!
11:43 psch m: my %h; say %h.push("hi 1 2 3 boo 2 3 4 fart 3 4 5 fart 4 5 6".split(" ").rotor([1,3]))
11:43 camelia rakudo-moar b67c1e: OUTPUT«{boo => (2 3 4), fart => [(3 4 5) (4 5 6)], hi => (1 2 3)}␤»
11:43 lucasb Ulti: the number of values are fixed? for example, for every key, there will always be 2, or 3, etc. values?
11:44 Ulti yup
11:44 lucasb in this case, it's always 3, then?
11:44 Ulti its basically just a TSV with an ID I want to index on
11:44 Ulti lucasb well the constant will be different given what I'm working with
11:45 Ulti I mean the whole thing is just an intellectual exercise, I can get what I want with some combo I'm just looking for the most elegant.... rotor taking a spec like that is something I wasn't aware of
11:46 babydrop It can also backtrack
11:46 Ulti rotor++
11:46 brrt joined #perl6
11:47 Ulti though it does assume the key is the first column :D
11:47 babydrop http://perl6.party/post/Perl-6-.rotor-The-King-of-List-Manipulation
11:48 Ulti which isnt going to always be true for some reason lots of bioinformatics formats decided the 3rd or worse column is the ID
11:48 Ulti I hate bioinformaticians they just don't think much about anything they're doing and all formats evolve from human readable stuff
11:49 Ulti its a dream field for Perl 6
11:49 psch oh
11:50 psch m: <a b c>.rotor(-1)
11:50 camelia rakudo-moar b67c1e: OUTPUT«Cannot have elems < 1, did you mean to specify a Pair with => -1?␤  in block <unit> at <tmp> line 1␤␤»
11:50 psch m: <a b c>.rotor(1 => -1)
11:50 Ulti we should probably make m: act more like the REPL with an implied say
11:50 camelia rakudo-moar b67c1e: OUTPUT«(timeout)»
11:50 psch ah, misread one error in my /msg with camelia
11:50 psch m: <a b c>.rotor(1 => -2)
11:50 camelia rakudo-moar b67c1e: OUTPUT«.rotor position is out of range. Is: -1, should be in 0..Inf; (ensure the negative gap is not larger than the length of the sublist)␤  in block <unit> at <tmp> line 1␤␤»
11:51 psch but it's there, in the parens, so yeah, nothing to see :)
11:51 babydrop Ulti: that's been brought up many times and the answer is no. We need sinkage
11:51 Ulti sure but could just make another command :P
11:51 Ulti say:
11:51 psch which might behave differently in important cases..?
11:52 babydrop Ulti: well-volunteered! https://github.com/perl6/evalbot
11:52 Ulti happy to
11:52 Ulti thats easier than me learning NQP and all the ops
11:52 psch maybe just fork whateverable and make sayable6 :P
11:52 babydrop lol
11:52 Ven joined #perl6
11:52 Ven o/
11:52 Ulti I should get emobot back up and running
11:53 pmurias Ven: \o
11:53 Ven masak: do you have any idea for a 6advent blog post? I'm considering continuing my blogpost from last year (on quickcheck/6check), but I'd gladly take another topic.....
11:54 babydrop It should be easy enough. Just add an alias https://github.com/perl6/evalbot/blob/master/evalbot.pl#L101
11:54 Ven pmurias: debug me! :p https://github.com/perl6/nqp/compare/642f1e5115...0fe387b4e2#diff-0c0dab2d16946f0dca1bd043eca69b24R239
11:54 babydrop And change %program to -e 'put EVALFILE q|%program|' or something or other
11:56 pmurias Ven: thank you, fixed
11:57 dalek mu: c55d04f | (Zoffix Znet)++ | misc/perl6advent-2016/schedule:
11:57 dalek mu: Toss core hacking post
11:57 dalek mu:
11:57 dalek mu: This is a poor place for it and stuff for it ain't ready.
11:57 dalek mu: review: https://github.com/perl6/mu/commit/c55d04fc05
11:59 Technaton Hello, world! :) I am still on that A*-inspired dive into p6. Now, I am trying to make sense of the different list and hash types that are new in p6. What is, e.g., the difference between a MixHash and a simple hash that maps objects to real numbers? Or, what is faster: Finding the element with the lowest weight in a MixHash or finding and removing a particular item from an array? Hm. I am not even sure
11:59 Technaton how to do the latter. :)
11:59 moritz with a loop to find the index
11:59 Technaton Could somebody please point me at a piece of documentation? I haven't found anything wrt to finding and removing an element from any position in the array.
11:59 moritz and then call .splice to remove it
11:59 babydrop Technaton: if you wait 14 hours there'll be a detailed Advent Post about them :)
12:00 Technaton babydrop: Woohoo! :)
12:00 moritz but if you want to select by weight, a MixHash isn't optimized for that either
12:00 moritz it's optimized for access by key
12:00 psch m: my @a = ^6; say @a[@a.first(3, :k)]:delete; say @a
12:00 camelia rakudo-moar b67c1e: OUTPUT«3␤[0 1 2 (Any) 4 5]␤»
12:00 Technaton Is there something like an ordered set in p6?
12:00 babydrop As for the latter you want splice: https://docs.perl6.org/routine/splice
12:00 moritz what you seem to want is an ordered queue or something like
12:01 moritz and afaict there's no built-in data type for that in Perl 6
12:01 psch m: my @a = < a b c >; @a[@a.first('a', :k)]:delete; say @a.perl
12:01 camelia rakudo-moar b67c1e: OUTPUT«[Any, "b", "c"]␤»
12:01 moritz or a heap, maybe
12:01 psch but yes, that's just unsetting the container, not removing it
12:01 psch if you want e.g. ['b', 'c'] as the result in the latter example, splice is the right thing
12:02 arnsholt For A* the key data structure is a heap, IIRC. I don't think our standard library has one of those
12:02 arnsholt OTOH, implementing a binary min-heap should be pretty straightforward
12:03 Technaton Yeah, a heap would be very fitting for A*. I am happy to have chosen that algorithm, because it offers quite a number of points to deep-dive into p6. :)
12:04 Technaton Okay, thanks for the hints.
12:05 * Technaton whistles and begins to implement a binary heap in p6. :)
12:06 Technaton Oh no, there's already one in the modules directory! :(
12:07 Ulti always room to take a look and see if you can make a nicer one
12:07 moritz using other's code: where's the fun in that?
12:07 wamba joined #perl6
12:09 Technaton moritz: Yeah, that's true, and probably the funniest way of approaching any subject. But whenever I start learning something with that attitude, I never arrive at something finished, because its clear from the beginning that I do it only to learn things, so I stop when I learnt what I wanted to learn. This time, I am set to contribute Algorithm::AStar to the p6 modules directory, so I need more
12:09 Technaton discipline. And adding my own MinMaxHeap implementation is not really good style then. :)
12:12 moritz Technaton: agreed
12:24 brillenfux joined #perl6
12:26 kalkin- so I patched src/core/REPL.pm to support history file with Readline, but I don't know how to test it, because I don't know how to install with rakudobrew rakudo from custom source location
12:26 psch kalkin-: just install it with Configure.pl?
12:26 kalkin- psch: won't it mess up everything?
12:27 psch kalkin-: if you don't supply an explicit prefix it will install in $rakudo-repo/install
12:27 psch kalkin-: i don't know what rakudobrew does, but if you have your repo somewhere distinct from rakudobrew Configure.pl shouldn't mess anything up
12:27 kalkin- psch: but then I need to build zef which will use the custom rakudo-repo to pull in Readline
12:28 psch kalkin-: right, so you just adjust your PATH to point at the custom rakudo before rakudobrew rakudo vOv
12:28 kalkin- yes this makes sense
12:28 kalkin- will try that, thanks
12:32 pierre__ joined #perl6
12:38 rindolf joined #perl6
12:41 amalia__ joined #perl6
12:45 canopus joined #perl6
12:51 noganex joined #perl6
12:51 pmurias is copy & pasting stuff from the synopsis into the docs.perl6.org ok?
12:51 psch i'd say so, if it still works as described
12:51 psch i mean, much of what's in the synopses is in roast too
12:52 lucasb how do I use these bots to try a snippet in rakudo from, say, middle of 2015 ?
12:53 psch committable6: help
12:53 committable6 psch, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’
12:53 psch committable6: 2015.06 say "hello"
12:53 committable6 psch, ¦«2015.06»: hello
12:53 lucasb psch: thank you!
12:54 lucasb hmm, committable6 doesn't like private conversations. I'll have to use it in public
12:54 psch pmurias: fwiw, both perl6/doc and perl6/specs are (c) TPF under the artistic liccense 2.0
12:54 psch -c
12:56 prammer joined #perl6
12:57 lucasb committable6: 2015.09 say (0..9).rotor((3 => -1) xx *)
12:57 committable6 lucasb, ¦«2015.09»: «timed out after 10 seconds, output»:  «exit signal = SIGHUP (1)»
12:58 user9 joined #perl6
12:59 bjz_ joined #perl6
12:59 lucasb m: say (0..9).rotor(3 xx 100)
12:59 camelia rakudo-moar b67c1e: OUTPUT«((0 1 2) (3 4 5) (6 7 8))␤»
12:59 lucasb m: say (0..9).rotor(3 xx *)
12:59 eliasr joined #perl6
13:00 camelia rakudo-moar b67c1e: OUTPUT«(timeout)»
13:00 lucasb anyway, I thought I had some memory of rotor working with a lazy infinity list
13:01 lucasb but I may be mistaken
13:01 moritz m: say say (0..9).rotor(3 xx *).head(5)
13:01 moritz lucasb: it might work with an infinite list as base:
13:01 moritz m: say (0..9).rotor(3)
13:01 camelia rakudo-moar b67c1e: OUTPUT«(timeout)»
13:01 camelia rakudo-moar b67c1e: OUTPUT«((0 1 2) (3 4 5) (6 7 8))␤»
13:02 moritz m: say (0..*).rotor(3 => -1).head(5)
13:02 camelia rakudo-moar b67c1e: OUTPUT«((0 1 2) (2 3 4) (4 5 6) (6 7 8) (8 9 10))␤»
13:02 lucasb moritz: right. I meant specifically as argument list
13:02 babydrop lucasb: you can use committable6 in #zofbot
13:03 lucasb babydrop: thanks, I might use it there
13:06 dalek doc: 9de42a4 | (Pawel Murias)++ | doc/Language/operators.pod6:
13:06 dalek doc: Borrow parts of the description of ^^ from the synopsis to describe how it really behaves when all the arguments are false.
13:06 dalek doc: review: https://github.com/perl6/doc/commit/9de42a4fc5
13:06 lucasb nevermind, my memory is at fault. I think .rotor never worked with lazy infinity lists in the argument list
13:07 pmurias I'm not a technical writer so I appologise if I did anything incorrectly with my doc fix ;)
13:07 lucasb but it would be a reasonable feature, no? dunno if there's something that prevents it, technically
13:07 moritz pmurias: none of us are, to the best of my knowledge :-)
13:08 babydrop .ask AlexDaniel why not finish off your ticket and submit tests too? https://rt.perl.org/Ticket/Display.html?id=130260#ticket-history
13:08 yoleaux2 babydrop: I'll pass your message to AlexDaniel.
13:08 babydrop I do notice more spam in RT since the Great Mobile URL Reveal
13:09 DrForr That's Google's reweighting towards mobile devices?
13:10 pmurias moritz: when are the docs regenerated?
13:12 moritz pmurias: every five minutes, unless there's already a job running, iirc
13:13 moritz https://docs.perl6.org/build-log/?C=M;O=D has the logs
13:13 moritz currently takes about 6 minutes run time, so in ~15min the HTML should be up-to-date
13:15 pmurias .oO(pointing the user to a doc page explaining what the thing that the compiler is expecting would be awesome)
13:18 pyrimidine joined #perl6
13:19 babydrop .oO(we already have a mechanism for custom exception output, so that stuff can be done in module space...)
13:19 babydrop RAKUDO_EXCEPTIONS_HANDLER=WithDocLinks
13:20 babydrop RAKUDO_EXCEPTIONS_HANDLER=WithDocLinks::Chinese
13:20 babydrop ???
13:20 babydrop Profit!
13:20 pmurias afk&
13:22 espadrine joined #perl6
13:23 babydrop What would you call the `else` in if () else {}?
13:23 babydrop What noun is it?
13:23 babydrop If you wanted to tell someone "wrong $noun `else`...."
13:23 psch keyword?
13:23 babydrop good nuf. thnaks
13:23 DrForr token? Though 'keyword' is probably better.
13:24 jnthn "unexpected" may also be clearer than "wrong"
13:24 yoleaux2 5 Dec 2016 22:47Z <japhb> jnthn: You mentioned that concurrency was going to remain on your brain for at least the first half of 2017.  Do you have any idea how much remains in the "make it work reliably" category, and when you'll be able to work on "make it fast/scalable/efficient"?  I'm starting to write code that seems to be hitting non-linearities in the scheduler.
13:24 yoleaux2 5 Dec 2016 22:49Z <japhb> jnthn: Also, is it possible to reserve a single real thread for the main app thread?  I've got some high-concurrency code where the main thread (which actually does the I/O in this case) gets very janky, and I'm guessing that user-visible task is getting starved for CPU resources by lots of background tasks.
13:25 jnthn o.O
13:25 dalek doc/consistent-return-types: 1308514 | Altai-man++ | doc/Type/ (124 files):
13:25 dalek doc/consistent-return-types: Big signature return type unification.
13:25 dalek doc/consistent-return-types:
13:25 dalek doc/consistent-return-types: This commit affects all signatures that exist in the type documentation: it replaces "returns " occurences with "-->" form.
13:25 dalek doc/consistent-return-types:
13:25 dalek doc/consistent-return-types: See https://github.com/perl6/doc/issues/1024#issuecomment-264660360 for explanations.
13:25 dalek doc/consistent-return-types: review: https://github.com/perl6/doc/commit/13085149e0
13:25 dalek doc/consistent-return-types: f8448f2 | Altai-man++ | doc/Type/ (2 files):
13:25 dalek doc/consistent-return-types: Two typo fixes
13:25 dalek doc/consistent-return-types: review: https://github.com/perl6/doc/commit/f8448f2013
13:25 dalek doc/consistent-return-types: 88c2f5f | Altai-man++ | t/return-type.t:
13:25 dalek doc/consistent-return-types: Test for return type in signatures
13:25 dalek doc/consistent-return-types: review: https://github.com/perl6/doc/commit/88c2f5fcfd
13:25 babydrop weee, bot spam \o/
13:26 lucasb 'returns' is discouraged?
13:26 sena_kun lucasb, see the original discussion. :)
13:26 sena_kun lucasb, in general: no.
13:27 lucasb sena_kun: oh, I missed the link, I'll follow it. thanks
13:27 babydrop lucasb: there are plans to toss it in 6.d
13:27 babydrop m: say 'foobar' ~~ / 'foo' [<!before $<foo>='bar'> || <&die: ~$<foo>>]/;
13:27 camelia rakudo-moar 0ee6bc: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Cursor<66359552>␤  in block <unit> at <tmp> line 1␤␤»
13:27 jnthn .tell japhb The current scheduler is decidedly over-simplistic; it's not far off being "the simplest thing that could possibly work". Scalability is also a little bit limited by `await` not yet being non-blocking, which in turn makes us need a lot more real threads than we should.
13:27 yoleaux2 jnthn: I'll pass your message to japhb.
13:27 babydrop Can't capture a lookahead?
13:27 psch where "toss" means "deprecate", fwiw
13:28 babydrop Oh yeah,  sorry
13:28 jnthn ...deprecate "returns"? o.O
13:28 jnthn I...uh...might be arguing against that. :P
13:28 psch jnthn: TimToady apparently wanted to do so for 6.c already
13:28 xin0x joined #perl6
13:28 psch jnthn: in part because it can only parse types
13:29 jnthn There's other forms for when you want more than that, no? :)
13:29 sena_kun jnthn, it is not deprecated(yet), but we(I and AlexDaniel at least) just plan to change the default signature style in the docs, since they are non-consistent.
13:29 sena_kun I'll open the discussion now.
13:29 psch well, the only other form that can do more than parse types is --> in the signature
13:29 psch another argument was "if it's in the signature it's clearly visible as part of the contract with the caller"
13:30 psch mind, i'm just repeating the arguments as i understood them :)
13:30 jnthn sena_kun: Yes, documentation consistency is certainly good; I've no problem with the docs settling on one form.
13:30 psch the actual discussion was a bit more involved iirc, but that's the two main things i took away from it
13:30 jnthn "returns" just reads very nicely :)
13:34 jnthn .tell japhb Also, we never actually put stuff on the main application thread; it's not part of the pooling mechanism. Any jank you're seeing is probably due to plain old contention with other threads to get scheduled, or possibly GC stop-the-world leading to long pauses (though profiles I've looked at suggested the world-stopping ain't all that costly).
13:34 yoleaux2 jnthn: I'll pass your message to japhb.
13:35 jnthn .tell japhb Also be clear, when I say "contention with other threads to get scheduled", these are real kernel threads, so it's the OS scheduler, not something in Rakudo. Rakudo's job is more to pick a smarter number of such threads to do CPU-bound stuff.
13:35 yoleaux2 jnthn: I'll pass your message to japhb.
13:35 travis-ci joined #perl6
13:35 travis-ci Doc build failed. Altai-man 'Test for return type in signatures'
13:35 travis-ci https://travis-ci.org/perl6/doc/builds/181651969 https://github.com/perl6/doc/compare/138cd60d5e6c...88c2f5fcfdaf
13:35 travis-ci left #perl6
13:36 sena_kun https://github.com/perl6/doc/pull/1035 - opinions/agrees/disagrees are very welcome.
13:37 babydrop sena_kun: my two cents is a lot of those aren't accurate
13:37 babydrop m: say &sum.returns
13:37 camelia rakudo-moar 0ee6bc: OUTPUT«(Mu)␤»
13:37 babydrop Docs say it's Numeric:D
13:37 babydrop And what it really returns are Numeric and Junctions
13:38 sena_kun babydrop, didn't check the types yet, it's another big(I mean, BIG) issue to solve.
13:38 babydrop :)
13:38 psch m: say ([1,2,3].unshift).WHAT
13:38 camelia rakudo-moar 0ee6bc: OUTPUT«(Array)␤»
13:39 sena_kun We don't have return types everywhere and in some places they are broken. :/
13:39 sena_kun But it is still a different issue.
13:39 psch broken how?
13:39 sena_kun psch, s/broken/wrong/
13:40 psch wrt "should everything in CORE nominally declare its return type"... well, patch rakudo, profile it, see if we can take that
13:40 babydrop japhb: :o you didn't report the unless thing!
13:40 babydrop oh wait
13:40 babydrop lucasb: :o you didn't report the unless thing!
13:40 psch as for "should we doc *expected* return types" i'm inclined to say "no"
13:41 psch as in, if it doesn't show um in &funcname.returns, it shouldn't be in the docs
13:41 psch s/um/up/
13:41 moritz I take the opposite stance
13:41 moritz if we know what it returns, document it
13:41 moritz even if it's not enforced by the compiler
13:41 psch mind, roast is most likely not very vocal about that, so maybe we want to add that to roast iff we can have it like that in rakudo
13:41 babydrop psch: for patch rakudo, I already can say it's a "no". Most things return either something *or a Junction* and it's that Junction will render most return types inaccurate
13:41 moritz because it helps the reader to know what type is returned
13:42 babydrop In fact, that's why sum was broken at one point, it thought it could only handle Numerics
13:42 psch right, let me backpedal in so far that documenting it with actual syntax seems weird to me if that's not what the compiler says
13:43 moritz we also don't always show the same combinations of signatures in case of multis
13:43 SmokeMachine____ hi there! I saw here (https://github.com/perl6/mu/blob/master/misc/perl6advent-2016/schedule) that theres a few day without people to write...
13:43 psch 'cause if i see 'sub foo(--> BarType) { }' and the compiler says '&foo.returns == Mu' i'm confused
13:43 moritz sometimes there are more candidates for optimization that we don't show in the docs
13:44 moritz SmokeMachine____: yes. Want to claim a spot?
13:44 SmokeMachine____ I'd like to know if I could try to write something for any of these days...
13:44 psch moritz: right, which is why i'd say "if we can roast it we can doc it".  i've no idea how Junction plays in there though
13:44 babydrop SmokeMachine____: yes
13:44 psch m: sub f(--> Int) { (1|2) }; f()
13:44 camelia rakudo-moar 0ee6bc: OUTPUT«Type check failed for return value; expected Int but got Junction (any(1, 2))␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:44 psch j: sub f(--> Int) { (1|2) }; f()
13:44 babydrop SmokeMachine____: submit a PR (or commit directly), claiming a day
13:44 camelia rakudo-jvm 8ca367: OUTPUT«Type check failed for return value; expected Int but got Junction (any(1, 2))␤  in method throw at gen/jvm/CORE.setting line 27529␤  in sub  at gen/jvm/CORE.setting line 29880␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:45 moritz SmokeMachine____: and /msg me your email address so that I can give you write access to the blog
13:45 SmokeMachine____ My english isn't very good, so I'd need someone to review it..
13:45 babydrop SmokeMachine____: that's fine. We can help out :)
13:45 psch committable6: 2015.11 sub f(--> Int) { (1|2) }; f()
13:45 committable6 psch, ¦«2015.11»: Type check failed for return value; expected Int but got Junction␤  in sub f at /tmp/uqtvHCSLtS:1␤  in block <unit> at /tmp/uqtvHCSLtS:1␤ «exit code = 1»
13:45 psch well
13:45 psch if that never worked...
13:45 jnthn It's not meant to work
13:45 moritz m: sub f($x) { 1 + $x); say f(1|2)
13:45 camelia rakudo-moar 0ee6bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f($x) { 1 + $x7⏏5); say f(1|2)␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
13:46 moritz m: sub f(Int $x --> Int) { 1 + $x}; say f(1|2)
13:46 camelia rakudo-moar 0ee6bc: OUTPUT«any(2, 3)␤»
13:46 jnthn m: sub f($x --> Int) { 1 + $x }; say f(1|2)
13:46 camelia rakudo-moar 0ee6bc: OUTPUT«any(2, 3)␤»
13:46 moritz the autothreader does the extra work
13:46 babydrop dammit
13:46 babydrop I was wrong :o
13:46 jnthn And that works because autothreading happens "outside", if you like
13:46 psch yeah, before binding to the sig
13:46 moritz babydrop: you might not be entirely wrong, because if sum takes a slurpy, that might be handled differently
13:46 psch or, well, during maybe
13:46 jnthn Well, it's a failover during binding
13:47 babydrop m: sub f(@x --> Int) { [+] @x }; say f(1|2, 5, 3|5)
13:47 camelia rakudo-moar 0ee6bc: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:47 babydrop m: sub f(*@x --> Int) { [+] @x }; say f(1|2, 5, 3|5)
13:47 camelia rakudo-moar 0ee6bc: OUTPUT«Type check failed for return value; expected Int but got Junction (any(any(9, 11), any(1...)␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:47 babydrop oh *phew* :)
13:47 psch m: say [+] (1|2)
13:47 camelia rakudo-moar 0ee6bc: OUTPUT«any(1, 2)␤»
13:47 SmokeMachine____ ok! so Im doing that! :) (I'm  a little nervous...)
13:48 babydrop SmokeMachine____: I think the trick is to imagine your audience naked...
13:48 SmokeMachine____ :)
13:48 moritz babydrop: somehow I think that'd totally freak me out
13:48 DrForr With *this* crowd?...
13:48 babydrop :D
13:52 abraxxa1 joined #perl6
13:53 dalek mu: 4fa19f2 | (Fernando Correa de Oliveira)++ | misc/perl6advent-2016/schedule:
13:53 dalek mu: Adding me on day 22
13:53 dalek mu: review: https://github.com/perl6/mu/commit/4fa19f2ad0
13:53 dalek mu: fdcae64 | (Zoffix Znet)++ | misc/perl6advent-2016/schedule:
13:53 dalek mu: Merge pull request #22 from FCO/master
13:53 dalek mu:
13:53 dalek mu: Adding me on day 22
13:53 dalek mu: review: https://github.com/perl6/mu/commit/fdcae649b9
13:56 babydrop m: say 'foobar' ~~ / 'foo' [<!before 'bar'> || $<foo>='bar' <&die: ~$<foo>>]/;
13:56 camelia rakudo-moar 0ee6bc: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Cursor<43474064>␤  in block <unit> at <tmp> line 1␤␤»
13:56 babydrop hm, how come it doesn't capture the stuff?
13:57 babydrop The actual rule being this: https://gist.github.com/zoffixznet/7e368cb00e2e5385ef12473ebaa6cdba and I don't think it's matching, 'cause I'm getting weird compilation errors
13:57 babydrop oh
13:58 giraffe joined #perl6
13:58 babydrop m: say 'foobar' ~~ / 'foo' [<!before 'bar'> || $<foo>='bar' {} <&die: ~$<foo>>]/;
13:58 camelia rakudo-moar 0ee6bc: OUTPUT«Cursor<63601808>bar␤  in block <unit> at <tmp> line 1␤␤»
13:58 babydrop it's that bug
14:03 babydrop m: say 36754/37000
14:03 camelia rakudo-moar 0ee6bc: OUTPUT«0.993351␤»
14:04 babydrop m: say abs 36754-37000
14:04 camelia rakudo-moar 0ee6bc: OUTPUT«246␤»
14:04 babydrop $246 until LP6 is funded \o/
14:04 sufrostico joined #perl6
14:04 sufrosti1o joined #perl6
14:04 Ven ah, thanks for the reminder.
14:07 psch babydrop: what's bug there?
14:07 psch +a
14:07 babydrop the $/ not updated with captures unless you stick a {}
14:07 psch oh, alright
14:08 jnthn It's quite costly to update, so will want a bit of careful analysis
14:08 babydrop but I see another bug that I kinda chose to ignore. If I put a space between 'unless' and <.kok>, compilation fails saying unless interpreted as listop: https://gist.github.com/zoffixznet/fcceeda5c1d718810bce869e65607aec
14:09 babydrop It really doesn't like the <.kok>s...
14:09 * babydrop snickers
14:10 psch rule has sigspace..?
14:10 babydrop oohh.. thanks. Makes sense now :D
14:20 prammer joined #perl6
14:23 Skarsnik joined #perl6
14:24 Skarsnik Hello
14:24 babydrop Skarsnik: long time
14:24 babydrop .match() setting $/ ain't a bug, right? We made it that way on purpose.
14:25 Skarsnik I wanted to know if someone made a script/tool to test code against different version of rakudo?
14:27 pierre__ joined #perl6
14:27 psch committable6: help
14:27 committable6 psch, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’
14:27 psch Skarsnik: ^^^ that bot does that
14:28 Skarsnik Yeah, but it's more code that use 'lot' of modules
14:29 Skarsnik I am just curious of testing the speed gain since january of some of my stuff
14:29 psch in that case you probably have to build all point releases on your own
14:29 psch or, well, rely on someone that has those lying around anyway
14:37 kurahaupo__ joined #perl6
14:40 nicq20 joined #perl6
14:40 cdg joined #perl6
14:41 eveith joined #perl6
14:42 sufrostico joined #perl6
14:42 sufrosti1o joined #perl6
14:44 * [Coke] sees that zoffix has gone from 4 posts to 2 on the schedule. nice.
14:44 yoleaux2 11:38Z <babydrop> [Coke]: Your post is up soon. I have one already-written stashed away, I could schedule if you need more time. Lemme know
14:45 [Coke] there are now 2-4 gaps on the advent schedule. the first gap is in 2-3 days.
14:46 babydrop For p6doc experts: http://stackoverflow.com/questions/40991158/how-do-i-read-the-perl-6-docs-for-something-like-repo
14:47 babydrop FWIW, those types aren't documented
14:49 kurahaupo_ joined #perl6
14:49 kyclark joined #perl6
14:51 babydrop grrr
14:51 [Coke] (document return types) remember, it's roast, not the compiler that determines what return types are part of the spec.
14:51 babydrop no idea what my SO account it
14:51 babydrop Someone tell brian $*REPO is not an Installation.
14:52 babydrop m: say $*REPO.^name
14:52 camelia rakudo-moar 16fbd7: OUTPUT«CompUnit::Repository::Installation␤»
14:52 babydrop He probably is using .WHAT to view names
14:52 [Coke] me is bummed that all the last minute additions did NOT take the spots they were suggested to take. :|
14:53 babydrop Oh apparently my SO is linked to FB
14:53 lighttrr joined #perl6
14:54 ufobat nine, did you have slides for your talk at the lpw? are they going to be uploaded?
14:55 nine ufobat: yes and yes. Thanks for reminding me
14:55 babydrop [Coke]: kinda makes sense, since by taking those spots the people would have to churn out the article in like 30 hours
14:55 ufobat my pleasure :D
14:55 [Coke] babydrop: kind of like I am, yes. :|
14:56 [Coke] it beats the alternative of missing a day or you or I writing more.
14:56 [Coke] I figure I can still come up with something in time for the 8th.
14:56 nine ufobat: online now: http://niner.name/talks/Web%20development%20and%20Perl%206/
14:56 sufrostico joined #perl6
14:57 nine ufobat: most importantly, the examples directory contains much more example code than I showed.
14:57 ufobat ty :)
14:57 babydrop huggable: mu
14:57 huggable babydrop, nothing found
14:57 babydrop huggable: advent
14:57 huggable babydrop, https://github.com/perl6/mu/blob/master/misc/perl6advent-2016/schedule
14:57 sufrosti1o joined #perl6
14:57 [Coke] DrForr, brrt, RabidGravy, cygx, zostay, ugexe, jnthn, nige, tadzik, nkh, SmokeMachine____, AlexDaniel: if anyone can move up their advent post to fill the empty slots on the 9th and the 11th, that would probably be helpful.
14:57 lucasb babydrop++ fixing the 'unless' thing
14:58 lucasb babydrop: looks like a very complex patch. I wish could be as knowledgeable :)
14:58 perlpilot yay! Learning Perl 6 is fully funded!
14:58 El_Che \o/
14:59 lucasb $37,090
14:59 lucasb pledged of $37,000 goal
14:59 DrForr Indeed. At least one person on FB seems to be unconvinced, but .. someone always *will* be.
14:59 lucasb give my $90 back!
15:00 lucasb just kidding
15:00 DrForr I'll move mine up. I've got to write it tonight anyway.
15:00 lucasb I hope the indentation style used in the book will be something sane :)
15:01 moritz if somebody has a good idea for me, I'd be willing to write a second advent post
15:01 moritz if not, I might reuse the tictactoe example I used in my training course
15:01 dalek mu: da0e41f | drforr++ | misc/perl6advent-2016/schedule:
15:01 dalek mu: Moving  mine up, I've got to write it before I leave anyway.
15:01 dalek mu: review: https://github.com/perl6/mu/commit/da0e41f738
15:01 El_Che I hope the book will have syntax highlighting in the safari digital version
15:01 DrForr As the topic says.
15:02 moritz DrForr++
15:02 ufobat nine, "doesn't have an any('get', 'post')" - i added ANY to my last feature branch ;-)
15:03 [Coke] DrForr: sure you don't want to take #8 ? ;)
15:03 DrForr The module isolates the real hackery, I'm just planning to show where the numbers are in the grammar and how to play with that.
15:03 [Coke] and thanks for moving it up one, that helps.
15:03 nine ufobat: good to know :)
15:04 DrForr Well, what I've seen are just 3-4 paragraphs, sure. One moment.
15:05 nine ufobat: maybe I get bored enough to fix the glaring performance issue. I realize that I didn't even use that argument in the talk...
15:05 ufobat ha! i actually didnt know that it is that bad! :/
15:06 dalek mu: 5898cce | drforr++ | misc/perl6advent-2016/schedule:
15:06 dalek mu: Tighten up release schedule
15:06 dalek mu: review: https://github.com/perl6/mu/commit/5898cce2fa
15:06 DrForr Done.
15:06 nine ufobat: yeah, though all it's missing is probably a cache for the compiled templates.
15:07 [Coke] DrForr: WOOT
15:07 ufobat if so its not that hard to implement, i guess
15:07 * [Coke] luxuriates in his extra 24 hours!
15:08 DrForr I may actually change the title as I've got another idea I may do...
15:08 Lucas_One joined #perl6
15:09 * [Coke] ponders finishing a poker module for the advent calendar; ponders a retrospective that would address why we have parrot and pugs in our history and why that was a good thing, and finally pondering picking some random perl6 feature that doesn't already have an advent article on it.
15:11 DrForr I was thinking about snagging an operator from APL and showing both the syntax for custom operators and implementing it, I actually feel a bit better about that than having to point people to the bit of hackery involved in creating roles.
15:11 FROGGS joined #perl6
15:12 DrForr I know we have .comb and .permute operators, is there an operator to do C(2,5) and so on? (take 2 from a group of 5 elements)
15:13 moritz .combinations
15:13 moritz m: say (^5).combinations(2)
15:13 camelia rakudo-moar 16fbd7: OUTPUT«((0 1) (0 2) (0 3) (0 4) (1 2) (1 3) (1 4) (2 3) (2 4) (3 4))␤»
15:13 DrForr sorry, that's not quite what I mean. I meant generate the number of combinations, rather than a list of the combinations.
15:14 lucasb m: say +(^5).combinations(2)
15:14 camelia rakudo-moar 16fbd7: OUTPUT«10␤»
15:14 lucasb :D
15:15 [Coke] that's kind of wasteful, but I don't think there's one that just does the math.
15:15 lucasb combinations has a count-only method
15:15 DrForr Granted, but I was thinking of a use that didn't create a potentially-huge list.
15:15 lucasb so... it *does* just the math, no?
15:15 lucasb https://github.com/rakudo/rakudo/blob/nom/src/core/List.pm#L63
15:16 DrForr If there's a count-only method that's fine, and it'll do what I'm after.
15:16 [Coke] count-only on a non-lazy list has already done the math
15:16 [Coke] s/math/work/
15:16 khw joined #perl6
15:16 babydrop m: say (^500000).combinations(2)
15:16 camelia rakudo-moar 16fbd7: OUTPUT«((0 1) (0 2) (0 3) (0 4) (0 5) (0 6) (0 7) (0 8) (0 9) (0 10) (0 11) (0 12) (0 13) (0 14) (0 15) (0 16) (0 17) (0 18) (0 19) (0 20) (0 21) (0 22) (0 23) (0 24) (0 25) (0 26) (0 27) (0 28) (0 29) (0 30) (0 31) (0 32) (0 33) (0 34) (0 35) (0 36) (0 37) (0 38…»
15:16 babydrop m: say (^500000).combinations(2).elems
15:16 camelia rakudo-moar 16fbd7: OUTPUT«(timeout)»
15:17 [Coke] oh. huh. I see what the code is implying, but have no idea how that works. nifty. :)
15:17 babydrop yes, it just does the math
15:17 [Coke] lucasb++
15:17 babydrop I think it was the very first PR I sent to Rakudo (it was rejected for a better implementation, but still) :)
15:18 prammer joined #perl6
15:18 [Coke] ah, I see now. nifty.
15:18 wamba joined #perl6
15:18 lucasb m: say +combinations(10, 2)
15:18 camelia rakudo-moar 16fbd7: OUTPUT«45␤»
15:18 DrForr It's only the binomial distribution, so it's not a *hard* problem. I was just thinking that it's a simple way to generate Pascal's triangle, which is a good math'y thing.
15:18 chansen_ joined #perl6
15:19 [Coke] also, RabidGravy++ for having 2 posts on the schedule.
15:20 babydrop m: my $x = eager combinations(1000, 2); say now - INIT now
15:20 camelia rakudo-moar 16fbd7: OUTPUT«1.0414664␤»
15:20 babydrop m: my $x = eager combinations(1000, 2).elems; say now - INIT now
15:20 camelia rakudo-moar 16fbd7: OUTPUT«0.0101913␤»
15:20 babydrop m: say permutations(3000)
15:20 camelia rakudo-moar 16fbd7: OUTPUT«Cowardly refusing to permutate more than 20 elements, tried 3000␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
15:20 babydrop wat? :)
15:21 jonas1 joined #perl6
15:21 babydrop oh, it becomes a huge number OK :)
15:21 DrForr Uh, yeah, 3000! is ... non-trivial.
15:22 babydrop m: my $x = eager permutations(9); say now - INIT now
15:22 camelia rakudo-moar 16fbd7: OUTPUT«1.13294261␤»
15:22 babydrop m: my $x = permutations(9).elems; say now - INIT now
15:22 camelia rakudo-moar 16fbd7: OUTPUT«0.03242009␤»
15:22 lucasb the number has more digits than exists atoms in the universe and bugs in perl 6
15:22 babydrop That's what I wanted to show that .permutations also has a shortcut for count only
15:23 babydrop lucasb: heeeey...
15:23 lucasb babydrop: lol, kidding :)
15:24 DrForr Well, anything >10^80 meets that criterion :) Doesn't take much.
15:26 DrForr (atoms in the universe, that is. Bugs in perl 6 ... That may require tetration or beyond.
15:26 DrForr s/$/)
15:26 mspo can dc(1) do it?
15:27 babydrop New rule: you can't make fun of Perl 6 bugs unless you've fixed at least one during the week the joke is made :)
15:27 babydrop lucasb: DrForr so that means you owe a fix each.
15:28 * babydrop coughs
15:28 babydrop I guess I killed the party? :)
15:28 babydrop Fine fine...
15:28 * babydrop leaves to do stuff
15:28 DrForr I'm in the air for most of the rest of the week.
15:28 * psch .oO( ping perl6.party )
15:32 CIAvash joined #perl6
15:32 babydrop hmmm
15:32 babydrop m: say +permutations(30)
15:33 camelia rakudo-moar 16fbd7: OUTPUT«Cowardly refusing to permutate more than 20 elements, tried 30␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
15:33 babydrop m: say permutations(30).elems
15:33 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
15:33 babydrop m: say Failure.new.elems
15:33 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
15:33 babydrop that's sucky
15:33 FROGGS that should throw
15:34 babydrop Cool. Will make it :)
15:35 SourceBaby joined #perl6
15:35 Undercover joined #perl6
15:36 buggable joined #perl6
15:47 ggherdov joined #perl6
15:50 prammer joined #perl6
15:52 pyrimidine joined #perl6
15:54 pnu_ joined #perl6
15:55 mindos joined #perl6
15:56 babydrop FROGGS: should it throw-throw or just propagate the failure?
15:56 babydrop and by "it" I mean .list on Failure
15:56 babydrop m: say Failure.new.list
15:56 camelia rakudo-moar 16fbd7: OUTPUT«Failed␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
15:57 babydrop umm
15:57 cibs joined #perl6
15:57 * babydrop retraces whatever is causing the infiniloop in the fix
15:57 sufrostico joined #perl6
15:59 lighttrr joined #perl6
16:01 babydrop throw-throw, I guess, The alternative is to add a whole ton of methods. Basically anything that uses self.list in Any: https://github.com/rakudo/rakudo/blob/16fbd71/src/core/Any.pm#L53
16:01 lighttrr joined #perl6
16:02 Charlie joined #perl6
16:04 babydrop What's the difference between these two? one uses `self`, while the other binds to SELF and uses that? Why not self in both? https://github.com/rakudo/rakudo/blob/16fbd71/src/core/Any.pm#L52-L53
16:05 moritz babydrop: I think the one with \ doesn't containerize
16:06 moritz or scalarize, or whatever you call it
16:06 lighttrr joined #perl6
16:06 psch \ is equivalent to 'is raw'
16:06 psch as parameter sigil
16:07 psch the implicit binding to self is "normal" afaik, i.e. you get the same container-treatment that a $-sigil param gets
16:07 psch which, i think, is ro-rebinding
16:08 babydrop k, I think I get it :)
16:08 babydrop The docs for `raw` are weird: https://docs.perl6.org/routine/raw
16:09 cdg joined #perl6
16:09 moritz that's because raw is the introspection method on class Parameter
16:09 babydrop alright thanks
16:17 Skarsnik building each rakudo release take a while x)
16:18 babydrop build several at the same time.
16:21 babydrop hooo
16:21 babydrop my fix found a bug
16:21 babydrop in roast
16:21 lucasb ba dum tss
16:22 lucasb oops, my bad timing
16:22 babydrop in 6.c-errata too
16:23 babydrop m: use MONKEY; sub eval_elsewhere($code){ EVAL($code) }; my $arrayref is dynamic = list(1,2,3); dd eval_elsewhere('?(@$*arrayref)');
16:23 camelia rakudo-moar 16fbd7: OUTPUT«Bool::True␤»
16:23 babydrop that's the test and Bool::True is passing so all cool, right? But...
16:23 babydrop m: use MONKEY; sub eval_elsewhere($code){ EVAL($code) }; my $arrayref is dynamic = list(1,2,3); dd eval_elsewhere('(@$*arrayref)');
16:23 camelia rakudo-moar 16fbd7: OUTPUT«(Failure.new(exception => X::Dynamic::NotFound.new(name => "\$*arrayref"), backtrace => Backtrace.new),)␤»
16:23 babydrop It's actually a failure being masked by the ? op
16:24 babydrop well, the @ op I guess
16:24 psch m: use MONKEY; sub eval_elsewhere($code){ EVAL($code) }; my $arrayref is dynamic = list(1,2,3); dd eval_elsewhere('(@$arrayref)');
16:24 camelia rakudo-moar 16fbd7: OUTPUT«(1, 2, 3)␤»
16:24 babydrop coercer whategver
16:24 babydrop psch: Yeah, seems like just a typo in the name, right?
16:25 psch babydrop: i'd say so.  someone thought every dynamic variable must have a * twigil i'd guess
16:25 psch babydrop: unless you have another "but wait!" there..? :)
16:25 babydrop That's the tests: https://github.com/perl6/roast/blob/6.c-errata/S03-operators/context-forcers.t#L151-L152
16:25 AlexDaniel joined #perl6
16:25 psch curious that the comment doesn't have the *
16:26 psch oh wow that's old
16:26 psch Jul 26, 2013
16:26 babydrop It's also called "$arrayref"... so Perl 5ish :)
16:26 psch maybe the *-twigil did mean "look this up dynamically" back then :)
16:27 lucasb the *-twigil doesn't continue to mean "look this up dynamically" now?
16:28 psch lucasb: no, it's a declarative shorthand for the trait 'is dynamic'
16:28 babydrop psch: so do I just fix the test or do we need more eyeballs?
16:29 babydrop I suspect it's just a typo and the test was always broken. The failure being masked by @ coercer
16:29 psch babydrop: well, the commit from 2013 explicitly added the *
16:29 babydrop oh
16:29 psch babydrop: with something along the lines of "fix stuff"
16:29 psch https://github.com/perl6/roast/commit/2d48e36257a796cf77bcb5f0efd6c90044acb882
16:30 babydrop OK, I'll verify with lizmat
16:30 lucasb m: sub f { say EVAL '$foo' }; my $foo is dynamic = 42; f
16:30 camelia rakudo-moar 16fbd7: OUTPUT«42␤»
16:30 psch babydrop: so, yeah, i'm not sure about the semantics there.  fact is, * as twigil is similarly weird to how \ as parameter sigil is weird
16:31 psch babydrop: i.e. the whole "trait hiding behind a sigil/twigil" thing
16:31 babydrop aye
16:31 lucasb and... EVAL '$*foo' is an error
16:32 lucasb m: sub f { say $*foo }; my $*foo = 42; f
16:32 camelia rakudo-moar 16fbd7: OUTPUT«42␤»
16:32 lucasb babydrop: ah, so you'll just change '(@$*arrayref)' to '(@$arrayref)', right?
16:33 psch and, well...
16:34 psch m: my $*x is dynamic(False); sub f { say $*x }
16:34 camelia rakudo-moar 16fbd7: ( no output )
16:34 psch m: my $*x is dynamic(False) = 1; sub f { say $*x }
16:34 camelia rakudo-moar 16fbd7: ( no output )
16:34 psch m: my $*x is dynamic(False) = 1; sub f { say $*x }; f
16:34 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:34 babydrop lucasb: right, that's the question
16:34 psch that's just confusing to me tbh
16:34 psch m: my $x is dynamic(0) = 1; sub f { say $x }; f
16:34 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:35 babydrop That sub still sees $x without dynamical scope
16:35 psch oh right
16:35 lucasb well, the my declaration is before, so it's on the same scope of the sub
16:35 psch m: sub f { say $x }; my $x is dynamic(0) = 1; f
16:35 camelia rakudo-moar 16fbd7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3sub f { say 7⏏5$x }; my $x is dynamic(0) = 1; f␤»
16:35 psch m: sub f { say $*x }; my $*x is dynamic(0) = 1; f
16:35 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:35 psch soo that's fishy
16:35 psch cause apparently * is stronger than the trait which is weird
16:36 psch m: sub f(\x is copy) { x++ }; my $x = 0; f $x; say $x
16:36 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:36 babydrop m: sub f (\x is raw(0) { x = 42 }; f $
16:36 camelia rakudo-moar 16fbd7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f (\x is raw(0) 7⏏5{ x = 42 }; f $␤»
16:36 babydrop m: sub f (\x is raw(0)) { x = 42 }; f $
16:36 camelia rakudo-moar 16fbd7: ( no output )
16:36 babydrop I guess same here?
16:36 psch yeah
16:36 pyrimidine joined #perl6
16:36 psch i'm not if that's even reasonable to think about, though :)
16:36 TimToady m: sub f { say ::('$x') }; my $x is dynamic = 1; f
16:36 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:37 babydrop TimToady: do you know if the $* supposed to be there in these tests? https://github.com/perl6/roast/blob/6.c-errata/S03-operators/context-forcers.t#L151-L152
16:38 babydrop or should it be just plain $arrayref, since that's what the var is named
16:38 TimToady not supposed to have the *
16:38 babydrop \o/
16:38 TimToady in fact, that shouldn't work
16:38 TimToady the * on a dynamic var is only stripped at the last moment to look in GLOBAL and PROCESS
16:40 lucasb both 'my $x is dynamic(False)' and 'is dynamic(0)' actually *makes* a variable dynamic. are they suppose to be a no-op in this context?
16:40 TimToady also, seems to me that 'is dynamic(False)' could rightfully complain about something or other
16:40 TimToady looks to me like it's just ignoring the value
16:41 lucasb 'my $*x is dynamic(False)' is a contradiction, right? should be an error or one or the other should take precedence?
16:41 * TimToady suspects a lot of boolean traits actually ignore their value...
16:42 TimToady we should probably audit that...
16:42 babydrop TimToady: oh, one more Q: should Failure.new.list explode the failure instead of returning a 1-item list with failure in it?
16:42 lucasb like the code: 's :i($ignore-case) /foo/bar/' ?
16:42 babydrop m: say Failure.new.elems; # 'cause currently it causes this issue
16:42 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:42 geekosaur or possibly just relay the Failure?
16:43 TimToady lucasb: I don't see much use for a variable that might or might not be dynamic
16:43 babydrop And relaying the failure would involve adding more than a dozen of methods to Failure.pm, because there's a whole bunch of methods in Any that would infiniloop on trying to call .list again ont hat failure to get a List
16:43 babydrop like .elems, .Slip, .permutations, .combinations... there's a ton
16:44 babydrop so, I figured the easier way out is to explode
16:44 TimToady babydrop: in general, listifying should not be checking success/failure status, but pass that through to downstream for something iterating the list to check
16:44 TimToady so I think the current setup is correcterish
16:45 babydrop hm
16:45 kyclark joined #perl6
16:45 lizmat joined #perl6
16:45 babydrop m: say permutations(3000).elems
16:45 camelia rakudo-moar 16fbd7: OUTPUT«1␤»
16:45 babydrop ^ but then this doesn't iterate for anything.
16:45 babydrop m: say +permutations(3000)
16:45 camelia rakudo-moar 16fbd7: OUTPUT«Cowardly refusing to permutate more than 20 elements, tried 3000␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:45 babydrop ^ and if you try to get .elems using that method you get the Failure.
16:46 lizmat m: dd permutations(3000)
16:46 yoleaux2 15:35Z <gfldex> lizmat: neither do I or I would have proposed something. No worries, nobody is gonna die from a missing docs confusion.
16:46 camelia rakudo-moar 16fbd7: OUTPUT«Failure.new(exception => X::AdHoc.new(payload => "Cowardly refusing to permutate more than 20 elements, tried 3000"), backtrace => Backtrace.new)␤»
16:46 yoleaux2 16:32Z <babydrop> lizmat: would recall whether the $* twigils were meant to be here in this commit? The tests actually result in a Failure, which is masked by the @ coercert: https://github.com/perl6/roast/commit/2d48e36257a796cf77bcb5f0efd6c90044acb882#diff-d2d626064bd4db6d4a17aefcbe5e68e7R146
16:46 yoleaux2 16:33Z <babydrop> lizmat: conversation on that: https://irclog.perlgeek.de/perl6/2016-12-06#i_13691323
16:46 yoleaux2 16:33Z <babydrop> lizmat: so I'm wondering whether we fix the tests by removing the '*' from twigils or were they meant to work with the twigils and the tests need to be fudged...
16:46 yoleaux2 16:39Z <babydrop> lizmat: nevermind, TimToady answered in https://irclog.perlgeek.de/perl6/2016-12-06#i_13691502
16:46 TimToady well, maybe that's a good arg for list producers to die instead of fail in such cases
16:47 TimToady that is, if something like permutations is supposed to produce a list and fails completely, it should probably die outright, rather than pretend to return a list of one failure
16:48 mscha joined #perl6
16:48 TimToady poking the failure into the list is a kind of unwarranted mixing of semantic levels
16:49 TimToady distinguish this from processing a list where individual elements might be failures, but the list as a whole still works
16:49 lizmat TimToady: I'm not sure it pokes something into anything
16:49 TimToady in that case, it's fine to poke failures into the list
16:49 lizmat permutations returns either a Seq or a Failure
16:49 TimToady and I'm saying it should die instead of fail there, I suspect
16:50 lizmat but I see your point
16:50 lizmat yeah
16:51 TimToady we do failures so that both parallel and serial processes can preserve the independence of each case, but in this case there is no independence to preserve
16:51 jnthn The supply API takes care to keep the value channel and error channel distinct.
16:51 jnthn Not confusing them in iterable land seems also wise
16:51 babydrop hm... that test actually fails even without the $* twigil
16:51 babydrop m: use MONKEY; sub eval_elsewhere($code){ EVAL($code) }; { my $arrayref is dynamic = list(1,2,3); dd eval_elsewhere('(@($arrayref))'); }
16:51 camelia rakudo-moar 16fbd7: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Variable '$arrayref' is not declared␤at /home/camelia/EVAL_0:1␤------> 3(@(7⏏5$arrayref))␤»
16:51 babydrop m: use MONKEY; sub eval_elsewhere($code){ EVAL($code) }; my $arrayref is dynamic = list(1,2,3); dd eval_elsewhere('(@($arrayref))');
16:51 camelia rakudo-moar 16fbd7: OUTPUT«(1, 2, 3)␤»
16:52 babydrop m: use MONKEY; sub eval_elsewhere($code){ EVAL($code) }; my $arrayref  = list(1,2,3); dd eval_elsewhere('(@($arrayref))');
16:52 camelia rakudo-moar 16fbd7: OUTPUT«(1, 2, 3)␤»
16:52 TimToady as I demo'd above, ::() is sufficient, you don't necessarily need EVAL
16:52 jnthn I'd epxect that needs looing up with DYNAMIC::<$arrayref>
16:52 babydrop speaking of list producers...
16:52 TimToady that too
16:52 skids joined #perl6
16:52 babydrop m: say ?@(Failure.new)
16:52 camelia rakudo-moar 16fbd7: OUTPUT«True␤»
16:53 TimToady sure, but there you're explicitly creating a single-element list that happens to be a Failure
16:53 mscha m: my %hash; if %hash<long-key-name><another-long-key-name> && %hash<long-key-name><another-long-key-name> eq "foo" { say "bar" }
16:53 camelia rakudo-moar 16fbd7: ( no output )
16:53 mscha m: my %hash; if %hash<long-key-name><another-long-key-name> eq "foo" { say "bar" }
16:53 camelia rakudo-moar 16fbd7: OUTPUT«Use of uninitialized value $v of type Any 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␤»
16:53 babydrop Alright thanks.
16:53 mscha Is there an elegant way in Perl 6 to do this without repetition?
16:54 babydrop mscha: andthen
16:54 babydrop m: my %hash; if %hash<long-key-name><another-long-key-name> andthen $_ eq "foo" { say "bar" }
16:54 camelia rakudo-moar 16fbd7: ( no output )
16:54 jnthn m: my %hash; if quietly %hash<long-key-name><another-long-key-name> eq "foo" { say "bar" }
16:54 camelia rakudo-moar 16fbd7: ( no output )
16:54 TimToady m: my %hash; with %hash<long-key-name><another-long-key-name> { when "foo" { say "bar" } }
16:54 camelia rakudo-moar 16fbd7: ( no output )
16:55 babydrop m: my %hash; %hash<long-key-name><another-long-key-name> = 42; if %hash<long-key-name><another-long-key-name> andthen $_ eq "foo" { say "bar" }
16:55 camelia rakudo-moar 16fbd7: ( no output )
16:55 babydrop bah :(
16:55 TimToady m: my %hash; %hash<long-key-name><another-long-key-name> = 'foo'; with %hash<long-key-name><another-long-key-name> { when "foo" { say "bar" } }
16:55 camelia rakudo-moar 16fbd7: OUTPUT«bar␤»
16:55 mscha Thanks for the tips, all!  There sure IMTOWTDI... :)
16:56 babydrop m: my %hash = foo => 'bar';  if %hash<foo> andthen $_ eq "foo" { say "bar" }
16:56 camelia rakudo-moar 16fbd7: ( no output )
16:56 * babydrop doesn't get why that ain't working
16:57 babydrop m: my %hash = foo => 'bar';  if %hash<foo> andthen dd ($_) eq "foo" { say "bar" }
16:57 camelia rakudo-moar 16fbd7: OUTPUT«Bool::False␤»
16:58 TimToady foo ne bar
16:58 babydrop doh
16:58 babydrop m: my %hash = foo => 'bar';  if %hash<foo> andthen $_ eq 'bar' { say "bar" }
16:58 camelia rakudo-moar 16fbd7: OUTPUT«bar␤»
17:01 sufrosti1o joined #perl6
17:15 pyrimidine joined #perl6
17:16 lucasb I have a nqp repo dir and a revision tag "2016.11-75-g66308ea"
17:16 lucasb I want to clone this nqp local dir into another directory at the specified revision
17:17 timotimo git clone, then git checkout should do it
17:17 timotimo it'll complain about "detached head" state, but you can ignore it as long as you don't plan to git commit on it
17:17 lucasb timotimo: but git clone will clone everything, right?
17:18 lucasb is there a way to get *only* that revision?
17:18 lucasb this would save time/space
17:18 timotimo git clone on a local FS will usually use hard links if i'm not mistaken
17:18 timotimo you may want to check the help on git clone
17:18 timotimo otherwise use --depth=1, or just use cp instead of git
17:19 lucasb timotimo: alright, thanks!
17:19 lucasb BTW, unrelated...
17:20 lucasb if the HD drives of the server rakudo.org/downloads ever failed, is there backups of those tarballs?
17:21 geekosaur there's also --shared if you're not making any modifications (but if the original repo loses that branch, your copy goes dead)
17:22 lucasb geekosaur: I'll take a read at some git manpages. thanks
17:24 prammer joined #perl6
17:25 wamba joined #perl6
17:26 cdg joined #perl6
17:28 girafe joined #perl6
17:31 prammer joined #perl6
17:33 domidumont joined #perl6
17:33 lighttrr joined #perl6
17:34 lighttrr joined #perl6
17:38 babydrop lucasb: that's a very good question...
17:39 babydrop .seen pmichaud
17:39 yoleaux2 I saw pmichaud 31 Aug 2016 16:30Z in #perl6-dev: <pmichaud> [Coke]: +1 to the rt-introduction document you've drafted.  Yes, it means we may end up moving tickets from place to place.
17:41 John joined #perl6
17:42 itay2805 joined #perl6
17:56 lighttrr joined #perl6
17:59 prammer joined #perl6
18:01 lizmat joined #perl6
18:05 pyrimidine joined #perl6
18:14 nicq20 left #perl6
18:18 sena_kun joined #perl6
18:20 lighttrr joined #perl6
18:21 kyclark_ joined #perl6
18:25 John Hi
18:26 babydrop \o\
18:26 John I'm the "troll" who posted in: https://github.com/perl6/user-experience/issues/5
18:26 John I'm sorry if I caused anyone any offence, it wasn't my intention
18:27 babydrop John: it's cool
18:27 babydrop huggable: hug John
18:27 * huggable hugs John
18:27 John lol
18:27 babydrop John: I wasn't offended. I just locked the issue because that topic causes a lot of bikeshedding, when we could be writing code instead :)
18:28 John Right, i totally get it - to be honest i'm not even sure why it was up for discussion
18:28 babydrop People like discussing things :P
18:28 John regardless, it was locked after that guy who essentially dox'd me on github wrote a bunch of nonsense about something i posted on reddit
18:29 John If possible, could you take both posts down?
18:29 babydrop Sure.
18:29 John I'm just a bit concerned at where this is going
18:29 John thanks, apprechiate it
18:29 John huggable: hug babydrop
18:29 * huggable hugs babydrop
18:30 pyrimidine joined #perl6
18:32 John You handled that nicely babydrop, i'll say thank you again :)
18:32 John All the best
18:32 John left #perl6
18:33 babydrop Same to you.
18:34 pyrimidine joined #perl6
18:40 zgrep <arnsholt> I'm a bit confused why you want to parse expressions with right-associativity though? That's kind of esoteric <-- Because my goal is to eventually make a working interpreter for an APL-inspired language called k. http://kparc.com , https://en.wikipedia.org/wiki/K_(programming_language) :P
18:44 CIAvash joined #perl6
18:45 jonadab Right associativity isn't THAT esoteric.
18:45 jonadab Not at a "why would we bother to support this" level.
18:46 jonadab Granted, it's far less common than left associativity.
18:46 * [Coke] wonders how much effort it would take to port his parrot-based APL language to rakudo.
18:49 tojo joined #perl6
18:49 CIAvash Remember last week I added Perl 6 to AlternativeTo.net? The next day they removed it, today I found out the reason (as I guessed) was that they thought Perl 6 is a new version of Perl, and they already had a page for Perl, so they removed it :)
18:50 babydrop ouch :}
18:51 tojo playing around with trans: say "first.last@some.domain.address".trans(/\@|\./ => '-', :complement);
18:51 tojo put got this "Use of Nil in string context"
18:51 tojo what this mean?
18:51 tojo am i doing something wrong
18:51 babydrop tojo: it means a Nil was used as a string... but as to why.. Hm...
18:51 babydrop m: "first.last@some.domain.address".trans(/\@|\./ => '-', :complement);
18:51 camelia rakudo-moar bc13bb: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤»
18:53 tojo weird thing
18:53 babydrop something or other in the guts ain't working right
18:53 babydrop m: say "first.last@some.domain.address".trans([<@ .>] => "-", :complement);
18:53 camelia rakudo-moar bc13bb: OUTPUT«-----.----@----.------.-------␤»
18:53 babydrop is that what it's meant to output?
18:54 babydrop s: '', 'trans', \(/\@|\./ => '-', :complement)
18:54 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/bc13bb5/src/core/Str.pm#L2112
18:54 tojo babydrop: yeah, that's right
18:56 babydrop m: say "first.last@some.domain.address".trans(([<@ .>] => "-",), :complement);
18:56 camelia rakudo-moar bc13bb: OUTPUT«-----.----@----.------.-------␤»
18:56 babydrop oh, wrong one
18:56 babydrop m: "first.last@some.domain.address".trans((/\@|\./ => '-',), :complement);
18:56 camelia rakudo-moar bc13bb: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤»
18:56 babydrop s: "first.last@some.domain.address", 'trans', \((/\@|\./ => '-',), :complement);
18:56 SourceBaby babydrop, Something's wrong: ␤ERR: Cannot resolve caller sourcery(List, 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␤␤
18:56 babydrop heh
18:57 babydrop s: "first.last@some.domain.address", 'trans', \( (/\@|\./ => '-',), :complement )
18:57 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/bc13bb5/src/core/Str.pm#L2352
18:57 pyrimidine joined #perl6
18:57 babydrop that's weird... added spaces and it worked :/
18:57 lucasb say 'ab'.trans(/a/=>'', :complement)
19:01 babydrop m: '@.'.trans: (/./ => '-',), :c
19:01 camelia rakudo-moar bc13bb: ( no output )
19:01 babydrop golfed version
19:01 babydrop bah, I mean....
19:01 babydrop m: '@x'.trans: (/\@/ => '-',), :c
19:01 camelia rakudo-moar bc13bb: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤»
19:03 labster joined #perl6
19:06 tojo so i'm not the only one who's pondering this :) so it's probably rakudo issue and not in my syntax
19:07 babydrop tojo: yeah :) I'm raking in the guts ATM trying to find where it's from, in hopes to fix it :)
19:09 tojo babydrop: good, thx :)
19:11 babydrop tojo: as a workaround you can either use the list of strings variant above or stick a `quietly` before the method call
19:11 babydrop m: quietly say "first.last@some.domain.address".trans((/\@|\./ => '-',), :complement);
19:11 camelia rakudo-moar bc13bb: OUTPUT«-----.----@----.------.-------␤»
19:11 erdic joined #perl6
19:12 tojo babydrop: yeah true thx and that quietly is new one for me, good to know
19:18 RabidGravy boom
19:20 babydrop oh yeah, located the juicy bugglet
19:20 babydrop Tonight! We dine!
19:26 lighttrr joined #perl6
19:27 babydrop lucasb: why did you leave? I was gonna make you fix it :) You owe one bug fix for making fun of Perl 6's bugs, remember? :")
19:28 lucasb babydrop: did you find the cause of the Nil warning?
19:29 babydrop lucasb: yup
19:29 babydrop lucasb: the $/.chars: https://github.com/rakudo/rakudo/blob/bc13bb5/src/core/Str.pm#L2235
19:29 babydrop Since on failed matches the $/ is Nil
19:29 babydrop m: Nil.chars
19:29 camelia rakudo-moar bc13bb: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤»
19:30 lucasb right, babydrop++
19:30 babydrop And I found it by adding CONTROL { when CX::Warn { .die } } and running the code in perl6 --ll-exception that dumps the backtrace
19:31 kyclark joined #perl6
19:32 * babydrop guesses lucasb isn't anxiously spectesting a fix right this second...
19:34 babydrop or are you? :)
19:34 babydrop I don't wanna fix it if you're gonna fix it.
19:35 nine joined #perl6
19:35 lucasb babydrop: sorry, I don't have the knowledge to fix this. maybe someday I can contribute
19:36 erdic joined #perl6
19:36 Gothmog_ joined #perl6
19:36 babydrop ok :(
19:36 avar joined #perl6
19:37 domidumont joined #perl6
19:37 RabidGravy so only the 10 and 11 slots to fill for the Advent
19:38 stmuk_ DBIC needs perl6 module versioning! DBIx::Class<auth:ribi>
19:38 babydrop heh
19:38 lizmat not <auth:riba> ?
19:38 stmuk_ thats what I meant!
19:40 edehont joined #perl6
19:41 shlomif joined #perl6
19:42 lizmat http://lists.scsys.co.uk/pipermail/dbix-class/2016-December/012493.html   # background
19:43 babydrop oh boy! more drama from the dbix-class mailing lis5t
19:43 * babydrop makes a new batch of popcorn
19:43 babydrop tojo: bug's fixed now
19:45 rindolf joined #perl6
19:45 RabidGravy what the actual ....
19:45 RabidGravy isn't this how DBIC started in the first place?
19:46 tojo babydrop: oh! very nice :)
19:48 domidumont joined #perl6
19:49 babydrop "two forks developed in parallel, by noncooperating, openly adversarial teams"... can they make one of them in Perl 6? :)
19:51 RabidGravy I've got about half a dozen trial cuts for bits of orm
19:53 DrForr Scheduling is done and released for OSCON Austin 2017.
19:53 DrForr I'm in the other side of the same room.
19:54 babydrop Any Perl 6?
19:56 babydrop Oh, I see you in the speakers list :D
19:57 DrForr *only* Perl 6, as far as I can tell.
19:57 babydrop http://conferences.oreilly.com/oscon/oscon-tx/public/schedule/detail/56965
19:57 DrForr That's the one. I'm going with a more "practical" slant this year, whatever that means.
19:58 Neolite joined #perl6
20:01 pmurias the problem with :auth is who gets the unqualified module name
20:02 babydrop yea
20:03 babydrop future will tell, I guess
20:03 babydrop .oO( locking the installer to just <X Y Z> auths and ignoring all others. `use Foo::Bar` just uses the module installed )
20:07 Tonik joined #perl6
20:13 pyrimidine joined #perl6
20:13 RabidGravy does "sub EXPORT() { { 'Foo' => Foo but Bar }}" work?
20:13 babydrop Only one way to find out :D
20:15 RabidGravy there is, but I was hoping there was someone of the same crack induced persuasion who may have tried :)
20:15 babydrop heh
20:16 babydrop no doesn't work
20:16 * babydrop tries harder
20:16 babydrop nope
20:16 babydrop oh doh
20:16 [Coke] RabidGravy: also the 9 and 24 slots if people would like to save people from writing multiple articles.
20:17 babydrop weird
20:17 babydrop m: put "meow" but "moo"
20:17 camelia rakudo-moar 2e1b82: OUTPUT«meow␤»
20:17 babydrop m: put ("meow" but "moo")
20:17 camelia rakudo-moar 2e1b82: OUTPUT«meow␤»
20:17 babydrop m: ("meow" but "moo").put
20:17 camelia rakudo-moar 2e1b82: OUTPUT«meow␤»
20:18 babydrop Am I smoking crack?
20:18 babydrop m: put (42 but "moo")
20:18 camelia rakudo-moar 2e1b82: OUTPUT«moo␤»
20:18 babydrop m: ("meow" but "moo").Str.put
20:18 camelia rakudo-moar 2e1b82: OUTPUT«moo␤»
20:18 babydrop How does that work?
20:18 babydrop s: '', 'put', \()
20:18 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/bc13bb5/src/core/Mu.pm#L472
20:18 geekosaur overrides .Str but not .gist?
20:18 Skarsnik is there something to show a hash ordered by key?
20:19 babydrop geekosaur: yes, but .put uses .Str
20:19 babydrop RabidGravy: yeah, it works, I just confused myself with the above
20:19 babydrop s: &put, \('x')
20:19 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/bc13bb5/src/core/io_operators.pm#L42
20:19 geekosaur Skarsnik, probably not "stock" since hashes are supposed to be unordered
20:20 babydrop oh, it's cheating with Str!
20:22 babydrop I would sort'f consider that a bugglet TBH
20:22 babydrop "put uses .Str.... unless it's a Str or any of its subclasses"
20:23 babydrop workaround's easy tho, so a docbug
20:25 Skarsnik ok I did a my @tab = %hash; say @tab.sort x)
20:26 babydrop Skarsnik: why not %hash.sort?
20:26 babydrop cut out the middleman
20:26 babydrop m: my %h = <a b z c d 52 5>; say %h.sort
20:26 camelia rakudo-moar 2e1b82: OUTPUT«Odd number of elements found where hash initializer expected:␤Found 7 (implicit) elements:␤Last element seen: IntStr.new(5, "5")␤  in block <unit> at <tmp> line 1␤␤»
20:26 babydrop m: my %h = <a b z c d 52 5 z>; say %h.sort
20:26 camelia rakudo-moar 2e1b82: OUTPUT«(5 => z a => b d => 52 z => c)␤»
20:31 dalek doc: 9257760 | (Zoffix Znet)++ | doc/Type/Mu.pod6:
20:31 dalek doc: Clarrify .put does not call .Str on Str objects
20:31 dalek doc: review: https://github.com/perl6/doc/commit/925776060d
20:32 Ven joined #perl6
20:33 babydrop m: put "meow" but role { method ^name { dd "heh" } }
20:33 camelia rakudo-moar 2e1b82: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤    at <tmp>:1␤    ------> 3put "meow" but role { method7⏏5 ^name { dd "heh" } }␤meow␤»
20:33 babydrop :\
20:34 babydrop why is it useless :\
20:34 babydrop bisect: m: my $x = "meow" but role { method ^name($) { dd "heh" } }
20:34 bisectable6 babydrop, On both starting points (old=2015.12 new=2e1b82c) the exit code is 0 and the output is identical as well
20:34 bisectable6 babydrop, Output on both points: Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤    at /tmp/LwjJM0qICE:1␤    ------> m: my $x = "meow" but role { method<HERE> ^name($) { dd "heh" } }
20:34 Ven_ joined #perl6
20:35 Ven_ joined #perl6
20:36 babydrop s/role/class/;
20:36 AlexDaniel joined #perl6
20:36 babydrop m: put ("meow" but "moo") but class { method ^name($) { "Int" } }.new
20:36 camelia rakudo-moar 2e1b82: OUTPUT«meow␤»
20:37 babydrop How can I trick it from thinking what I have is a Str?
20:37 babydrop it got a multi that expects a Str:D I want it to use the multi for Any
20:37 Skarsnik hm I am confused/rusty, I pasted a string that I get as a %result.perl to a my $hash = blablab; but I get a weird hash
20:37 Skarsnik do I need to eval ?
20:38 babydrop Skarsnik: yes
20:38 babydrop Skarsnik: EVAL is the reverse of .perl
20:38 RabidGravy hmm my name isn't getting exported
20:39 babydrop m: my %hash = <a b c d e f g>; my %z = %hash.perl.EVAL; dd %z
20:39 camelia rakudo-moar 2e1b82: OUTPUT«Odd number of elements found where hash initializer expected:␤Found 7 (implicit) elements:␤Last element seen: "g"␤  in block <unit> at <tmp> line 1␤␤»
20:39 babydrop m: my %hash = <a b c d e f g z>; my %z = %hash.perl.EVAL; dd %z
20:39 camelia rakudo-moar 2e1b82: OUTPUT«Hash %z = {:a("b"), :c("d"), :e("f"), :g("z")}␤»
20:40 RabidGravy that is I can export something that ca used as a type
20:40 RabidGravy can't
20:40 babydrop damn, say() also cheats with Str :/
20:41 babydrop RabidGravy: works fine for me
20:41 babydrop RabidGravy: https://gist.github.com/zoffixznet/4171c4a92c6847a171cb84247d36242b
20:43 RabidGravy Hmm
20:44 RabidGravy yeah, I'm not seeing the name
20:45 babydrop You mean in my code? That it's still calling it Int?
20:46 babydrop whoa
20:46 babydrop "When invoking 2 '', provided outer frame 0x2915d18 (4 'EXPORT') does not match expected static frame 0x2915e20 (3 '')"
20:46 babydrop :D
20:46 babydrop That's by trying to use sub EXPORT() { { "Foo" => Int but class { method ^name($) { "Foo" } } } }
20:47 Xliff Does anyone here know if there is a way for Atom to mimic Sublime's right side nav window?
20:47 Xliff (I know it's OT, but...)
20:47 pyrimidine joined #perl6
20:47 babydrop Xliff: https://atom.io/packages/minimap
20:48 Xliff Thanks babyZof
20:53 Skarsnik https://gist.github.com/Skarsnik/88c3d956bee79a28025a380ad5511b9f hm I get a weird hash (the rakudo release path are supposed to be the key); a whole line is a key :(
20:54 RabidGravy ah, babydrop, it's colons, it doesn't export things with colons in the name right
20:54 RabidGravy which makes sense
20:55 cpage_ joined #perl6
20:55 cdg joined #perl6
21:05 babydrop RabidGravy, does it? Hoe come?
21:05 babydrop m: https://gist.github.com/Skarsnik/88c3d956bee79a28025a380ad5511b9f
21:05 camelia rakudo-moar 2e1b82: ( no output )
21:07 RabidGravy well I guess it doesn't try to pick the package parts
21:07 lighttrr joined #perl6
21:09 RabidGravy it would be good if it did though
21:14 spebern joined #perl6
21:15 ufobat nine, is youre examples/Bailador directory wrong, there are the Dancer examples
21:17 nine ufobat: nope, that's alright. It's not "Dancer" but "Dancr" which is the name of the example app in the Dancer tutorial
21:17 nine ufobat: FWIW it's confused me, too a couple of times
21:18 ufobat but it does use Dancer2:from<Perl5> so its Dancer not Bailador?
21:18 Xliff Wheee... minimap not showing up. Will wait for help on #atom.
21:20 [Coke] DrForr++, in case I didn't do that already
21:22 TEttinger joined #perl6
21:25 ufobat ah! dancr.pm6 vs dancr.pm6.html ;)
21:27 AlexDaniel .
21:27 yoleaux2 13:08Z <babydrop> AlexDaniel: why not finish off your ticket and submit tests too? https://rt.perl.org/Ticket/Display.html?id=130260#ticket-history
21:27 AlexDaniel babydrop: because I'm kinda busy :(
21:27 lizmat decommute&
21:29 AlexDaniel samcv: “would be nice if unicodable6 stored all the stuff in a datastructure instead of havig to search all of them” – why?
21:29 samcv faster to search through them
21:29 yoleaux2 30 Nov 2016 20:41Z <babydrop> samcv: if you're willing to improve rakudo.org (it's Wordpress), I'm sure we can find you an account :) RE: https://twitter.com/samcv6/status/804044061355044864
21:29 pyrimidine joined #perl6
21:29 AlexDaniel samcv: right now it is a bit slow because we are using the rakudo with debugging symbols
21:30 samcv i noticed i got a 2+x speed improvement when I loaded a hash on startup
21:30 AlexDaniel but I'd suggest to make rakudo faster instead of optimizing unicodable :P
21:30 samcv maybe more than that
21:30 samcv hah
21:30 samcv true
21:30 lighttrr joined #perl6
21:30 AlexDaniel unless we expect the number of symbols in unicode to double in the next years, I don't think there is an issue
21:30 samcv u: penguin
21:31 unicodable6 samcv, U+1F427 PENGUIN [So] (🐧)
21:31 AlexDaniel let's try without debugging symbols
21:31 samcv i don't think that's the issue. it searches through all the unicode symbols, and calling the unicode properties each time is slow for hundreds of thousands of times. would be better to store the text to search in some structure
21:32 samcv i'll be back in an hour or so
21:32 samcv maybe i'll test your unicodable6 vs what i did for my bot. https://github.com/samcv/keira-perl6-ircbot/blob/master/lib/IRCPlugin/Unicodable.pm6
21:32 AlexDaniel sure it will be better, but if I recall correctly it takes about 3 seconds to do a stupid sequential match
21:32 perlpilot AlexDaniel: as soon as we make contact with the aliens, we'll have whole new sets of glyphs in unicode, so it could double  ;)
21:32 [Coke] huh. did we lose the ability to make gists private?
21:33 samcv .tell babydrop will be back in an hour, i'm open to that! would be great
21:33 yoleaux2 samcv: I'll pass your message to babydrop.
21:33 AlexDaniel [Coke]: what gists?
21:33 [Coke] on gist.github.com
21:33 [Coke] I just accidentally made a public one, and there's no switch I can see to make it private.
21:34 setty1 joined #perl6
21:34 perlpilot [Coke]: by "we" you mean the perl6 group or just people in general?
21:34 RabidGravy I just thought you got the button upfront
21:34 * jnthn doesn't remember a switch to make it private, but still sees the button to make a new one secret
21:34 [Coke] anyone in general.
21:34 * [Coke] hurls https://github.com/blog/1837-change-the-visibility-of-your-gists for what he was expecting.
21:34 perlpilot I still see two buttons "Create secret gist" and "Create public gist"
21:35 [Coke] perlpilot: yes. I'm talking about changing an existing one.
21:35 perlpilot oh, yes, I see that now.  I'm slow :)
21:36 sufrostico joined #perl6
21:36 RabidGravy you can change a secret one to be public but not the other way round
21:36 sufrosti1o joined #perl6
21:36 bisectable6 joined #perl6
21:36 unicodable6 joined #perl6
21:36 evalable6 joined #perl6
21:36 committable6 joined #perl6
21:36 benchable6 joined #perl6
21:36 AlexDaniel let's see
21:36 AlexDaniel u: penguin
21:36 unicodable6 AlexDaniel, U+1F427 PENGUIN [So] (🐧)
21:36 AlexDaniel u: penguin
21:36 unicodable6 AlexDaniel, U+1F427 PENGUIN [So] (🐧)
21:37 AlexDaniel yeah, kinda slow :)
21:37 AlexDaniel but still kinda impressive that it can do it so fast
21:38 [Coke] I tweeted 'em, at least maybe the new feature page that google led me to will get cleaned up.
21:39 timotimo what page now?
21:41 AlexDaniel samcv: that being said, if we split the whole range into 8 chunks… we will be able to do it in about one second :D
21:42 AlexDaniel samcv: like, I know that this is not a proper solution, but it is so fun :)
21:42 [Coke] timotimo: the one I just hURLed above.
21:43 timotimo the gist feature?
21:46 [Coke] timotimo: the what now?
21:54 timotimo making gists public/private after the fact?
21:55 mscha m: say "hello, world".subst(/<[aeiou]>/, $0, :g);  # What am I doing wrong?
21:55 camelia rakudo-moar 4fd6e9: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤hll, wrld␤»
21:56 perlpilot mscha: what do you think is in $0 and why?  :)
21:56 timotimo m: $_ = "hello, world"; s/<[aeiou]>/ = $0; say $_
21:56 camelia rakudo-moar 4fd6e9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed replacement part; couldn't find final /␤at <tmp>:1␤------> 3hello, world"; s/<[aeiou]>/ = $0; say $_7⏏5<EOL>␤    expecting any of:␤        postfix␤»
21:56 timotimo m: $_ = "hello, world"; s{<[aeiou]>} = $0; say $_
21:56 camelia rakudo-moar 4fd6e9: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤hllo, world␤»
21:56 timotimo m: $_ = "hello, world"; s{(<[aeiou]>)} = $0; say $_
21:56 camelia rakudo-moar 4fd6e9: OUTPUT«hello, world␤»
21:56 mscha m: say "hello, world".subst(/(<[aeiou]>)/, $0, :g);  # What am I doing wrong?
21:56 camelia rakudo-moar 4fd6e9: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤hll, wrld␤»
21:56 timotimo m: say "hello, world".subst(/(<[aeiou]>)/, $0, :g);
21:56 camelia rakudo-moar 4fd6e9: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤hll, wrld␤»
21:56 perlpilot mscha: same question :)
21:57 timotimo ah, you alreday did that
21:57 mscha So, .subst can't refer to the original string?
21:57 timotimo AFAIK we never got a proper way to write to the $/ outside the .subst
21:57 jnthn Arguments are evaluated at the time of method calls
21:57 timotimo right
21:57 timotimo it'd have to be thunked
21:57 timotimo m: say "hello, world".subst(/(<[aeiou]>)/, -> $/ { $0 }, :g);
21:57 camelia rakudo-moar 4fd6e9: OUTPUT«hello, world␤»
21:58 timotimo m: say "hello, world".subst(/(<[aeiou]>)/, -> $/ { " $0 " }, :g);
21:58 camelia rakudo-moar 4fd6e9: OUTPUT«h e ll o , w o rld␤»
21:58 mscha Ah, OK, thanks!
21:58 jnthn m: say "hello, world".subst(/(<[aeiou]>)/, *[0], :g) # another way
21:58 camelia rakudo-moar 4fd6e9: OUTPUT«hello, world␤»
21:58 cooper_ joined #perl6
21:58 cooper_ joined #perl6
21:58 jnthn (*[0] being another way to write { $_[0] })
21:59 perlpilot mscha: m: say "hello, world".subst(/<[aeiou]>/, { " $_ "}, :g);  # also
21:59 perlpilot m: say "hello, world".subst(/<[aeiou]>/, { " $_ "}, :g);  # also
21:59 camelia rakudo-moar 4fd6e9: OUTPUT«h e ll o , w o rld␤»
22:00 AlexDaniel oh
22:01 RabidGravy I'd forgotten that I'd made  .at(DateTime $d -> Promise) in Chronic
22:03 RabidGravy which is good as I was going to write it again :)
22:03 bjz joined #perl6
22:05 RabidGravy so I only have to finish two modules for the later advent post :)
22:05 jnthn 'night, #perl6
22:05 timotimo gnite jnthn :)
22:05 RabidGravy toodles
22:06 firstdayonthejob joined #perl6
22:06 sufrostico joined #perl6
22:06 sufrosti1o joined #perl6
22:10 lighttrr_ joined #perl6
22:12 sufrostico joined #perl6
22:13 sufrosti1o joined #perl6
22:26 firstdayonthejob joined #perl6
22:36 yqt joined #perl6
22:38 pyrimidine joined #perl6
22:46 tailgate if I use $string.split(", ") on a string and the returned list contains Nil, how do I get rid of them?
22:47 timotimo https://docs.perl6.org/routine/split - check this out
22:47 timotimo it shouldn't contain Nil, though. just ""
22:53 kurahaupo__ joined #perl6
22:53 skids joined #perl6
22:56 kurahaupo__ joined #perl6
22:57 babydrop tailgate: if you do have Nil, I'd like to see an example
22:57 yoleaux2 21:33Z <samcv> babydrop: will be back in an hour, i'm open to that! would be great
22:58 babydrop m: dd quietly Nil.split: ", "; # 'cause even splitting a Nil doesn't give you a Nil
22:58 camelia rakudo-moar 4fd6e9: OUTPUT«("",)␤»
23:00 AlexDaniel m: say ‘x’.split(‘’ x -9999999999999999999)
23:00 camelia rakudo-moar 4fd6e9: OUTPUT«repeat count > 1073741824 arbitrarily unsupported...␤  in block <unit> at <tmp> line 1␤␤»
23:00 AlexDaniel xD
23:00 AlexDaniel m: say ‘’ x -9999999999999999999
23:00 camelia rakudo-moar 4fd6e9: OUTPUT«repeat count > 1073741824 arbitrarily unsupported...␤  in block <unit> at <tmp> line 1␤␤»
23:01 AlexDaniel I wonder why this does not warn
23:01 AlexDaniel m: say 42 x Nil
23:01 camelia rakudo-moar 4fd6e9: OUTPUT«␤»
23:01 AlexDaniel m: say 42 x Any
23:01 camelia rakudo-moar 4fd6e9: OUTPUT«␤»
23:02 AlexDaniel wait
23:02 AlexDaniel commit: HEAD~200,HEAD say 42 x Nil
23:02 committable6 AlexDaniel, ¦«HEAD~200,HEAD»:
23:02 AlexDaniel commit: HEAD~500,HEAD say 42 x Nil
23:03 committable6 AlexDaniel, ¦«HEAD~500»: Use of Nil in numeric context␤  in block <unit> at /tmp/RcAZ2vGcy9 line 1␤␤¦«HEAD»:
23:03 AlexDaniel bisect: say 42 x Nil
23:03 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=4fd6e94) because on both starting points the exit code is 0
23:03 bisectable6 AlexDaniel, bisect log: https://gist.github.com/a79b6900041204962d1284d95f6738a7
23:03 bisectable6 AlexDaniel, (2016-09-01) https://github.com/rakudo/rakudo/commit/631e2f770e83da5420b0b3ecfe611e6892a7df4f
23:03 AlexDaniel bisect: old=2016.10 say 42 x Nil
23:03 bisectable6 AlexDaniel, Bisecting by output (old=2016.10 new=4fd6e94) because on both starting points the exit code is 0
23:03 bisectable6 AlexDaniel, bisect log: https://gist.github.com/26674ebaf8f4165b564e734b2cc82071
23:03 bisectable6 AlexDaniel, (2016-10-16) https://github.com/rakudo/rakudo/commit/2dd0ddbbc2910564d08a9e0ac0cda15c7c2527fc
23:04 AlexDaniel commit: 2016.10,HEAD say 42 x Nil
23:04 committable6 AlexDaniel, ¦«2016.10»: Use of Nil in numeric context␤  in block <unit> at /tmp/Z14728_pyG line 1␤␤¦«HEAD»:
23:04 AlexDaniel babydrop: do you know what's happening here?
23:08 babydrop heh
23:09 yoleaux joined #perl6
23:09 babydrop Yup. The behaviour is that a type object gets interpreted as 0
23:09 babydrop Prior to my change in the above commit, the behaviour was the same, except it also did that for Failure objects, which made them silently slip away
23:10 AlexDaniel but we definitely want a warning there, right?
23:11 babydrop Nope. At least, IIRC the previous commit to that part prior to my change is moritz adding the explicit feature for type objects to be treated as zero.
23:12 babydrop There's probably a usecase for it, maybe moritz remembers what is was.
23:12 AlexDaniel … hmm…
23:13 babydrop Ahh
23:13 babydrop AlexDaniel: https://github.com/rakudo/rakudo/commit/2311372b5fde9c6b1801cf00840ed8c51bc75a69
23:13 babydrop so maybe see if there's a way to aboid that recursion while still getting the warnings, unless there's a test explicitly testing that type objects don't produce warnings
23:14 babydrop m: &infix:<x>.candidates».signature».gist.say
23:14 camelia rakudo-moar 4fd6e9: OUTPUT«(() ($x) ($s, Num:D $n) ($s, Any:D $n) ($s, Any:U $n) (Str:D $s, Int:D $repetition --> Str:D) (str $s, int $repetition --> str))␤»
23:15 babydrop s: &infix:<x>, \('', Any)
23:15 SourceBaby babydrop, Sauce is at https://github.com/rakudo/rakudo/blob/4fd6e94/src/core/Stringy.pm#L32
23:15 babydrop oh right, I need to be doing that on that commit :)
23:15 * babydrop goes back to playing Warframe
23:17 pyrimidine joined #perl6
23:21 pyrimidine joined #perl6
23:28 AlexDaniel m: say 42.roll(-1)
23:28 camelia rakudo-moar 4fd6e9: OUTPUT«(42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 …»
23:28 AlexDaniel what's the idea behind this
23:29 babydrop For someone who's too busy to commit a test, you sure have lots of time to break stuff :)
23:30 AlexDaniel Ah, I got the idea
23:30 ssotka joined #perl6
23:30 AlexDaniel m: say 42.roll(-18446744073709551613)
23:30 camelia rakudo-moar 4fd6e9: OUTPUT«(42 42 42)␤»
23:31 AlexDaniel babydrop: well, breaking stuff is what I do to relax between my coding bursts
23:31 babydrop AlexDaniel: it makes the assumption the number is positive and keeps decrementing it in an attempt to reach zero: https://github.com/rakudo/rakudo/blob/4fd6e94/src/core/List.pm#L1115
23:32 babydrop prolly should do something smarter here: https://github.com/rakudo/rakudo/blob/4fd6e94/src/core/List.pm#L1107
23:33 pmurias what would be the correct behavior? throw an exception? or have a subset in the signature?
23:33 AlexDaniel bisect: old=2015.10 say 42.roll(-1)
23:33 babydrop No subsets in the signature, it's slow
23:33 bisectable6 AlexDaniel, Bisecting by output (old=2015.10 new=4fd6e94) because on both starting points the exit code is 0
23:34 bisectable6 AlexDaniel, bisect log: https://gist.github.com/184042f8db7282eb04598fac8171b5bf
23:34 bisectable6 AlexDaniel, (2015-11-12) https://github.com/rakudo/rakudo/commit/f4e9d5e5074f3a34152ed472bf94b29679eb9692
23:34 babydrop We have an exception for that type of stuff
23:34 AlexDaniel oops
23:34 babydrop m: try ''.substr(42); say $!.^name
23:34 camelia rakudo-moar 4fd6e9: OUTPUT«X::OutOfRange␤»
23:34 babydrop That out, I s'pose will do
23:35 babydrop m: try [][-100]; say $!.^name
23:35 camelia rakudo-moar 4fd6e9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of a negative -100 subscript to index from the end; in Perl 6 please use a function such as *-100␤at <tmp>:1␤------> 3try [][-100]7⏏5; say $!.^name␤»
23:35 babydrop m: try '[][-100]'.EVAL; say $!.^name
23:35 camelia rakudo-moar 4fd6e9: OUTPUT«X::Obsolete␤»
23:35 babydrop heh
23:36 babydrop oh, well, yeah, not the todo but here: https://github.com/rakudo/rakudo/blob/4fd6e94/src/core/List.pm#L1095
23:36 babydrop (the doing smarter stuff I mean)
23:36 babydrop m: dd 42.roll: 500
23:36 camelia rakudo-moar 4fd6e9: OUTPUT«(42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,…»
23:37 babydrop m: dd Failure.new.roll.elems
23:37 camelia rakudo-moar 4fd6e9: OUTPUT«1␤»
23:37 babydrop maaan... this stuff keeps unraveling.
23:38 babydrop Maybe we need to audit what methods are aflicted with that issue.
23:38 babydrop TIL we have rotate.
23:39 babydrop m: say 'Perl 6'.comb.rotate
23:39 camelia rakudo-moar 4fd6e9: OUTPUT«No such method 'rotate' for invocant of type 'Seq'␤  in block <unit> at <tmp> line 1␤␤»
23:39 babydrop m: say 'Perl 6'.comb.List.rotate
23:39 camelia rakudo-moar 4fd6e9: OUTPUT«(e r l   6 P)␤»
23:39 babydrop m: say Failure.new.rotate.elems
23:39 camelia rakudo-moar 4fd6e9: OUTPUT«Failed␤␤Actually thrown at:␤  in any  at gen/moar/Metamodel.nqp line 3063␤  in block <unit> at <tmp> line 1␤␤»
23:42 babydrop m: dd [.elems, .pick.elems, .roll.elems, .eager.elems, .Slip.elems, .Array.elems, .List.elems, .Capture.elems, .rotor(42).elems ] given Failure.new
23:42 camelia rakudo-moar 4fd6e9: OUTPUT«[1, 1, 1, 1, 1, 1, 1, 0, 0]␤»
23:51 AlexDaniel ok, so
23:51 AlexDaniel m: say (2, 5, 8).rotor(1)
23:51 camelia rakudo-moar 4fd6e9: OUTPUT«((2) (5) (8))␤»
23:51 AlexDaniel makes sense
23:51 AlexDaniel m: say (2).rotor(1)
23:51 camelia rakudo-moar 4fd6e9: OUTPUT«((2))␤»
23:51 AlexDaniel ok
23:51 AlexDaniel m: say ().rotor(1)
23:51 camelia rakudo-moar 4fd6e9: OUTPUT«<anon|150046848>.new␤»
23:51 AlexDaniel what's that?
23:53 AlexDaniel bisect: say ().rotor(1)
23:53 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=4fd6e94) because on both starting points the exit code is 0
23:53 bisectable6 AlexDaniel, bisect log: https://gist.github.com/a0bb5a6b6898b39bb8fbdfc86374de4b
23:53 bisectable6 AlexDaniel, (2016-07-09) https://github.com/rakudo/rakudo/commit/405519ac197dea8f7f196311825c94a3157a3455
23:53 AlexDaniel oops!
23:56 * babydrop thinks we need a "You break it. You fix it" policy :)
23:57 AlexDaniel babydrop: I know a better one
23:57 babydrop AlexDaniel: are you recording these?
23:57 AlexDaniel babydrop: “You find it. You fix it”
23:58 AlexDaniel RT #130281 RT #130282 RT #130283
23:58 babydrop AlexDaniel++
23:58 babydrop m: dd Rakudo::Internals.EmptyIterator
23:58 camelia rakudo-moar 4fd6e9: OUTPUT«<anon|150046848>.new␤»
23:58 * babydrop has no idea what that is....
23:58 babydrop That's what ().rotor(1) gives
23:59 AlexDaniel babydrop: I don't know anything about the Failure thingy you were talking about some minutes ago
23:59 AlexDaniel babydrop: so perhaps you'll have to submit a ticket yourself, if it is needed
23:59 babydrop AlexDaniel: https://irclog.perlgeek.de/perl6/2016-12-06#i_13691543

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

Perl 6 | Reference Documentation | Rakudo