Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-17

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 sufrostico joined #perl6
00:05 sufrosti1o joined #perl6
00:06 |2701 joined #perl6
00:06 |2701 joined #perl6
00:08 kurahaupo joined #perl6
00:11 BenGoldberg joined #perl6
00:23 BenGoldberg joined #perl6
00:26 willthechill joined #perl6
00:27 pierre_ joined #perl6
00:36 xenowoolfy joined #perl6
00:41 Actualeyes joined #perl6
00:47 BenGoldberg joined #perl6
01:01 Zoffix teatime is tybalt :o
01:05 teatime there's some guy named mercutio in another channel
01:05 teatime and I just couldn't resist any longer
01:07 Zoffix Oh, so you're not tybalt89 from #perl?
01:07 teatime correct, I am not.
01:07 Zoffix Ah :) He's a super l33t Perl 5 hax0r.... I thought he came to the Perl 6 side for a sec :)
01:08 teatime sorry to disappoint you :)
01:09 Zoffix Eh, at least now I know 'tybalt' is from Shakespear :P
01:11 nemo Zoffix: oh come on. you forgot that? Surely you watched the movie at least! ☺
01:12 Zoffix No, I avoided it and wrote scathing feedback to my school about how awful the movie was.
01:12 teatime never seen the movie
01:12 teatime but I did enjoy being tybalt in 8th grade english class
01:13 teatime also when we did the play
01:13 teatime but mostly just in class
01:13 teatime :)
01:16 itcharlie joined #perl6
01:22 aindilis joined #perl6
01:26 khw joined #perl6
01:28 huggable joined #perl6
01:40 finanalyst joined #perl6
01:55 cpage_ joined #perl6
02:01 molaf joined #perl6
02:03 Sgeo joined #perl6
02:04 noganex joined #perl6
02:04 MadcapJake is there syntax for deconstructing a pair?
02:06 timotimo pair is just like any other object. just have nameds for .key and .value in your signature bind
02:06 timotimo m: for @(:1foo, :2bar, :99whoa) -> (:key($foo), :value($bar)) { dd $foo; dd $bar }
02:06 camelia rakudo-moar e239f6: OUTPUT«Str $foo = "foo"␤Int $bar = 1␤Str $foo = "bar"␤Int $bar = 2␤Str $foo = "whoa"␤Int $bar = 99␤»
02:08 MadcapJake cool, fat arrow format didn't work for some reason
02:08 MadcapJake m: for @(:1foo, :2bar, :99whoa) -> (key => $foo, value => $bar) { dd $foo; dd $bar }
02:08 camelia rakudo-moar e239f6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S3MY1hFldx␤Invalid typename 'key' in parameter declaration.␤at /tmp/S3MY1hFldx:1␤------> 3for @(:1foo, :2bar, :99whoa) -> (key7⏏5 => $foo, value => $bar) { dd $foo; dd $␤»
02:09 timotimo oh, that's interesting
02:09 timotimo probably because it expects a type there
02:09 timotimo m: for @(:1foo, :2bar, :99whoa) -> (Str key => $foo, Any value => $bar) { dd $foo; dd $bar }
02:09 camelia rakudo-moar e239f6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fQLfecT9WF␤Malformed parameter␤at /tmp/fQLfecT9WF:1␤------> 3for @(:1foo, :2bar, :99whoa) -> (Str7⏏5 key => $foo, Any value => $bar) { dd $f␤    expecting any of:␤        constraint␤        fo…»
02:11 Actualeyes joined #perl6
02:12 MadcapJake m: for @(:1foo, :2bar, :99whoa) -> ('key' => $foo, 'value' => $bar) { dd $foo; dd $bar }
02:12 camelia rakudo-moar e239f6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CyGR_fSlx6␤Preceding context expects a term, but found infix > instead␤at /tmp/CyGR_fSlx6:1␤------> 3or @(:1foo, :2bar, :99whoa) -> ('key' =>7⏏5 $foo, 'value' => $bar) { dd $foo; dd $b␤»
02:12 MadcapJake m: for @(:1foo, :2bar, :99whoa) -> :('key' => $foo, 'value' => $bar) { dd $foo; dd $bar }
02:12 camelia rakudo-moar e239f6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FhfcHMAeYw␤Preceding context expects a term, but found infix > instead␤at /tmp/FhfcHMAeYw:1␤------> 3r @(:1foo, :2bar, :99whoa) -> :('key' =>7⏏5 $foo, 'value' => $bar) { dd $foo; dd $b␤»
02:13 sortiz Fat arrow works in signatures somewhere?
02:13 timotimo with quoted key is definitely not the right thing to do this :)
02:13 MadcapJake m: for @(:1foo, :2bar, :99whoa) -> :(key => $foo, value => $bar) { dd $foo; dd $bar }
02:13 camelia rakudo-moar e239f6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hmkofT9oP4␤Invalid typename 'key' in parameter declaration.␤at /tmp/hmkofT9oP4:1␤------> 3for @(:1foo, :2bar, :99whoa) -> :(key7⏏5 => $foo, value => $bar) { dd $foo; dd $␤»
02:13 timotimo since that'll never be named parameter like
02:14 MadcapJake m: sub foo(:$named) { say $named }; foo named => 'baz' # this works, sortiz, is that what you mean?
02:14 camelia rakudo-moar e239f6: OUTPUT«baz␤»
02:15 sortiz Yep, but that isn't a signature, that is a capture, no?
02:15 timotimo not capture syntax, just invocation syntax
02:15 zakharyas joined #perl6
02:16 sortiz Yes, but the signature is :$named
02:16 MadcapJake m: sub foo(named => $n) { say $n }; foo named => 'baz'
02:16 camelia rakudo-moar e239f6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BwQkaTfsZr␤Invalid typename 'named' in parameter declaration.␤at /tmp/BwQkaTfsZr:1␤------> 3sub foo(named7⏏5 => $n) { say $n }; foo named => 'baz'␤»
02:16 BenGoldberg joined #perl6
02:16 MadcapJake guess that's what I didn't get then xD
02:16 timotimo ah, so it doesn't work *there* either
02:16 timotimo that's fine, then
02:17 timotimo it's at least consistent
02:17 sortiz Ok, :)
02:17 timotimo i thought you could have => inside the signature
02:17 MadcapJake thanks sortiz & timotimo!
02:17 MadcapJake timotimo: I thought so too!
02:19 timotimo did you check out my script?
02:19 MadcapJake btw still digesting your graph.pl6, this graph stuff just doesn't want to become clear for my brain!
02:19 timotimo and run the "grid" option?
02:19 MadcapJake haven't tried running it yet, I will do that in a bit
02:20 timotimo but i made it so pretty to look at!
02:20 sortiz The only arrow I've seen in signatures is the thin one for returns…
02:21 timotimo and that's a --> arrow
02:22 sortiz Yep. That one.
02:27 rindolf joined #perl6
02:39 Khisanth joined #perl6
02:56 obfusk joined #perl6
02:56 dalek Heuristic branch merge: pushed 30 commits to DBIish/data-sets by salortiz
03:15 itcharlie left #perl6
03:16 rindolf joined #perl6
03:16 astj joined #perl6
03:50 hotel joined #perl6
04:04 hotel_california joined #perl6
04:10 skids joined #perl6
04:13 zacts joined #perl6
04:13 hotel joined #perl6
04:14 xiaomiao joined #perl6
04:15 willthechill joined #perl6
04:16 hotel_california joined #perl6
04:16 ugexe m: my $a := Buf.new(1,2,3,4).subbuf(2-*); say $a eqv 1; say $a; say "done"; # this caught me by surprise
04:16 camelia rakudo-moar e239f6: OUTPUT«False␤From argument to subbuf out of range. Is: { ... }, should be in 0..4; use *-2 if you want to index relative to the end␤  in block <unit> at /tmp/xpeW4FCY2a line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/xpeW4FCY2a line 1␤␤»
04:18 ugexe m: my $a := Buf.new(1,2,3,4).subbuf(2-*); say $a eqv Buf.new(1,2,3,4).subbuf(2-*);
04:18 camelia rakudo-moar e239f6: OUTPUT«True␤»
04:31 ssotka joined #perl6
04:36 hotel joined #perl6
04:49 Cabanossi joined #perl6
04:52 CIAvash joined #perl6
04:53 buharin joined #perl6
04:54 teatime ok!  so begins another day attempting to code stuff in p6
04:55 teatime I never seem to get very far / make much progress :/
05:21 mohae joined #perl6
05:28 huggable joined #perl6
05:36 pierre_ joined #perl6
05:42 _dolmen_ joined #perl6
05:45 hotel_california joined #perl6
06:13 domidumont joined #perl6
06:13 sno joined #perl6
06:17 MadcapJake can you use match variables e.g., $0, $1 inside of subst or trans?
06:18 domidumont joined #perl6
06:19 hotel joined #perl6
06:21 MadcapJake seems to work with subst but not with trans
06:22 MadcapJake huh, no it's not working actually
06:22 MadcapJake m: "0 1 2 3 4".subst(/(\d)/, "N$0", :g).say
06:22 camelia rakudo-moar e239f6: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/ACejlZlfYp line 1␤N N N N N␤»
06:23 MadcapJake m: "0 1 2 3 4".trans(/\d/ => "N$0")
06:23 camelia rakudo-moar e239f6: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/B7uD4os7Wy line 1␤»
06:23 MadcapJake m: "0 1 2 3 4".trans(/\d/ => "N$0").say
06:23 camelia rakudo-moar e239f6: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/XAuUbmFXFY line 1␤N N N N N␤»
06:24 CIAvash m: "0 1 2 3 4".subst(/(\d)/, -> $/ {"N$0"}, :g).say
06:24 camelia rakudo-moar e239f6: OUTPUT«N0 N1 N2 N3 N4␤»
06:24 MadcapJake CIAvash: thanks! so I gotta use a block, eh?
06:24 teatime if you don't, you could only mean the $0 in scope when you made the method call
06:24 teatime anything else would be insane :)
06:25 teatime also, does trans work that way?  that's weird, not what I expect
06:26 teatime I suppose it does.
06:28 MadcapJake graphviz is neat but man I am constantly fighting syntax errors
06:29 MadcapJake (I think I might be hitting them while spurting though)
06:29 CIAvash m: S:g/(\d)/N$0/ given "0 1 2 3 4";
06:29 camelia rakudo-moar e239f6: ( no output )
06:30 CIAvash m: say S:g/(\d)/N$0/ given "0 1 2 3 4";
06:30 camelia rakudo-moar e239f6: OUTPUT«N0 N1 N2 N3 N4␤»
06:30 wamba joined #perl6
06:30 MadcapJake nice, that's quite clean looking
06:30 darutoko joined #perl6
06:30 grondilu joined #perl6
06:31 snarkyboojum joined #perl6
06:39 sno joined #perl6
06:41 MadcapJake ok using -q2 and graphviz seems fine with it :)
06:48 _mg_ joined #perl6
06:49 jjido joined #perl6
06:51 moritz \o
06:52 moritz I'm confused. Where on https://travis-ci.org/raku​do/rakudo/builds/130669288 can I find the build output?
06:52 moritz or a link to the build output
06:53 CIAvash m: say 'N' «~» "0 1 2 3 4".comb(/\d/)
06:53 camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2 N3 N4)␤»
06:53 hotel_california joined #perl6
06:57 hotel joined #perl6
06:57 CIAvash moritz: each build job has build output apparently
06:58 grondilu m: say 'N' <<~>> ^3
06:58 camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2)␤»
06:58 grondilu ^I'm surprised that works
06:58 moritz CIAvash: ah, so it was only the JVM jobs that failed
06:58 moritz grondilu: why wouldn't it work?
06:58 grondilu because of different sizes
06:59 moritz m: say 'N' X~ ^3
06:59 camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2)␤»
06:59 moritz grondilu: well, <<op>> auto-extends
06:59 moritz >>op<< doesn't
06:59 grondilu I thought what would have been acceptable was <<~<< in this case.
07:00 moritz should also work
07:00 moritz that only extends the LHS
07:01 moritz m: say 'N' <<~<< ^3
07:01 camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2)␤»
07:02 _nadim joined #perl6
07:05 buharin hiho ;)
07:11 CIAvash moritz: Why are jvm builds for Mac in the 'Allowed Failures' list, but jvm builds for linux aren't?
07:15 moritz CIAvash: I have no idea
07:15 abraxxa joined #perl6
07:21 abraxxa joined #perl6
07:30 dakkar joined #perl6
07:34 ertgbfu joined #perl6
07:39 masak good morning, #perl6
07:39 teatime /me waves.
07:41 * moritz particles
07:44 RabidGravy joined #perl6
07:46 rork joined #perl6
07:53 * masak does a little bit of both, kinda
07:54 masak I still find it interesting that Feynman didn't seem to buy into the wave-particle duality thing
07:54 teatime it seems to be a recurring pattern, that even brilliant -ists, don't buy into the newest, paradigm shifting -ism that comes late in their career.
07:55 eyck joined #perl6
07:57 dalek joined #perl6
08:01 rork joined #perl6
08:02 Actualeyes joined #perl6
08:06 mohae joined #perl6
08:07 grondilu joined #perl6
08:10 pierre_ joined #perl6
08:16 wamba joined #perl6
08:16 stmuk "God does not play dice"
08:19 eyck joined #perl6
08:21 moritz and Einstein was never really convinced by Quantum Mechanics
08:21 jast quantum mechanics doesn't even necessarily disagree with that
08:21 CrAzYz_ joined #perl6
08:21 CrAzYz_ Hello
08:31 hotel_california joined #perl6
08:33 stmuk "God does not play bongo drums"
08:38 CIAvash joined #perl6
08:46 espadrine joined #perl6
08:57 TEttinger "God does not play dice with the universe. He prefers Amber, a diceless role-playing game, and he uses the title Storyteller instead of Dungeon Master"
09:00 masak teatime: not sure that's it with Feynman, though. he just seemed to think that "it's particles", and that the wave-particle duality was something of a misunderstanding, or a hand-wavy non-explanation, or both
09:04 cognominal joined #perl6
09:17 pierre_ joined #perl6
09:19 snarkyboojum joined #perl6
09:20 xinming_ joined #perl6
09:23 espadrine_ joined #perl6
09:24 huf iirc his point was that it behaves like itself
09:24 huf and there's no duality. we just dont have words that are accurate for things of that nature
09:27 huf i mean, does a slanted line have vertical-horizontal duality? :)
09:27 teatime hrm.
09:27 teatime is that a terrible analogy?
09:28 teatime and that's an honest question :)
09:28 huggable joined #perl6
09:30 psch well, the line through the origin does look parallel to the y axis viewed from the y axis' perspective, as well as to the x axis from the x axis' perspective...
09:31 araujo joined #perl6
09:31 araujo joined #perl6
09:31 pierre_ joined #perl6
09:32 TEttinger or a 3-dimensional line viewed through 2 dimensions
09:32 masak huf: I was watching a video where he said "no, it's a particle. not a duality" or some such
09:36 pierre joined #perl6
09:39 huf masak: hmm. i remember a video lecture where he says what i wrote above
09:39 huf sortof
09:39 huf so *shrug*
09:39 huf maybe he said many things
09:39 huf perhaps he was like liszt
09:39 masak :)
09:39 masak fwiw, I've heard him says things like "it behaves like itself" too
09:40 masak say*
09:40 huf which reminds me, i havent checked the talk page of the liszt article on wiki in a while
09:40 huf perhaps there's a new hilarious development
09:41 masak he carried pretty strongly a meme that's close to "shut up and calculate" -- namely that it's OK to make theories and see them predict things, but it's less OK to ask "whyy" or "what is it, really"?
09:41 masak huf: please don't be one of the unfortunate people who say "wiki" when they mean "Wikipedia" :P
09:41 huf ?
09:41 huf of course i mean wikipedia.
09:42 huf are you one of those unfortunate people who has problems with basic english?
09:42 masak :)
09:42 * masak goes and does something productive instead
09:43 tadzik nooooo!
09:43 tadzik no productive!
09:43 tadzik We're losing him!
09:43 jnthn masak: Maybe write a blog? :D
09:43 huf comment on a daily mail article
09:43 * masak strangles jnthn
09:44 masak jnthn: you need to make less mistakes like that! :P
09:44 _nadim Morning
09:45 masak good time-of-day, sir :)
09:46 jnthn :P
09:46 RabidGravy there is clearly only one "Wiki" http://c2.com/cgi/wiki - all the others should be qualified
09:47 masak what RabidGravy said
09:56 pierre joined #perl6
09:59 Ulti naw I missed the off topic :( in the two slit experiment the Feynman interpretation is the particle just goes through both slits existing in both places until it interferes with itself and there's nothing wrong with that... its just how it works (get over it)
09:59 mr-foobar joined #perl6
10:05 Zoffix That doesn't explain quantum eraser experiment :)
10:05 Zoffix The whole thing is wacked. Particles going back in time as well as forward and interfering with itself 😂
10:06 Zoffix 1000 years from now, people will laugh at how dumb we were and our quantum mechanics will sound just as stupid as the Aristotelian four materials or whatever he thought everything was made out of.
10:10 pierre joined #perl6
10:11 stb joined #perl6
10:13 dustinm` joined #perl6
10:15 grondilu The Feynman interpretation of quantum mechanics is :  I have no idea what it means and since I'm so smart if anyone tells you he does, he's probably fooling himself.
10:18 teatime grondilu: heh, do you feel like that statement paints Feynman in poor light?
10:19 grondilu now that I think about it, that was a poor paraphrasing on my part.
10:19 teatime because I don't, and was wondering if it was your intention to
10:19 grondilu I'm afraid I was trying to be funny but ended up being disrepectful.
10:19 teatime eh, I'm not being clear abuot what I mean either.  but it's ok
10:21 grondilu in any case I was reacting to someone above talking about the Feynman interpretation of QM, when it seems to me there is not such thing whatsoever.
10:21 grondilu since he famously stated that nobody really understand it.
10:36 mr-foobar joined #perl6
10:38 telex joined #perl6
10:42 Actualeyes joined #perl6
10:44 rindolf joined #perl6
10:49 sno joined #perl6
10:49 dustinm` joined #perl6
10:56 masak yes, maybe that was his main point
10:56 masak that it's about models, not about interpretations
10:56 masak and about accurate predictions, not about understanding
10:58 dalek joined #perl6
10:59 RabidGravy gah, gptrixie runs awfully slowly on the raspberry pi
11:01 cdg joined #perl6
11:03 grondilu RabidGravy: everything runs terribly slowly on the pi.  Realized it recently.
11:05 RabidGravy no JIT and less memory than most normal PCs
11:05 jnthn Probably lower memory bandwidth too
11:05 jnthn And smaller cache
11:10 timotimo i took the liberty to restart dalek after reducing the throttle bps a bit further
11:10 timotimo let's see if it still gets kicked for big commits
11:20 kid51 joined #perl6
11:43 |2701 joined #perl6
11:44 CIAvash joined #perl6
11:47 nadim joined #perl6
12:01 zakharyas joined #perl6
12:24 nicqbot joined #perl6
12:34 aries_liuxueyang joined #perl6
12:41 sufrostico joined #perl6
12:42 buharin is thre some console perl course?
12:42 buharin good
12:45 rjbs https://doc.perl6.org/language/5to6-perlfunc#exec
12:45 rjbs Is this really true, you can't exec from p6?
12:45 moritz you can, with nativecall
12:46 nemo can I assign `foo` to nativecall? ☺
12:47 rjbs thanks
12:47 moritz rjbs: the plan is to write a POSIX module that makes the useful but not-on-windows functions available, like fork and exec
12:48 moritz I just don't think anybody has done that yet :/
12:49 arnsholt Yeah, I was about to ask if this wasn't one of those "Windows doesn't work that way" things
12:49 rjbs Cool.
12:49 RabidGravy I accidentally did this morning
12:49 rjbs It came up because of a thing on p5p.  I don't actually need it atm. :)
12:49 * [Coke] ~~ to the rjbs-who-is-still-owed-a-meal!
12:50 rjbs :)
12:50 RabidGravy probably just point gptrixie at /usr/include/stdlib.h
12:52 ocbtec joined #perl6
12:53 perlpilot https://github.com/cspencer/perl6-posix was a start
12:53 geekosaur I imagine there's a fair number of p5-ers who are happy to consider Windows a second class citizen (p5 and earlier are *very* Unix/POSIX-oriented at heart)
12:54 timotimo we shouldn't necessarily just keep that around
12:55 kaare_ joined #perl6
12:55 geekosaur just saying toat to me it makes sense for the POSIX specific stuff to live in the ecosystem instead of the core
12:56 s_kilk joined #perl6
12:56 perlpilot geekosaur: indeed.
12:56 araujo_ joined #perl6
12:57 [Coke] oh, there are music nerds in this channel. Here's my kid's final project for (I think) music industry this year: https://youtu.be/tUp--IlEa2E ... I have never played that game, so the song was unfamiliar to me.
12:57 perlpilot geekosaur: though I'm probably one of those windows-as-second-class people as you've described, I can think of a time or two when I had to use Windows and having the Win32 namespace with all of those useful routines was invaluable.   I expect that Perl 6 may be seen as more platform agnostic with nice modules for the various OS or system flavors
12:58 geekosaur because so much of p5's core being thin wrappers over POSIX APIs has always made it an odd fit at best on Windows (not to mention leading to things like ithreads, which more or less was intended to emulate fork() on Windows)
12:58 timotimo [Coke]: oh, yeah, undertale is massively popular right now :D
12:59 [Coke] He recorded all the tracks at home, so I'm pretty familiar with it -now-, of course. :)
12:59 timotimo :D
12:59 araujo_ joined #perl6
12:59 timotimo at first i was impressed by how low you could go with a trombone, but then it turned out it seems to be an extra track added to it
13:00 araujo__ joined #perl6
13:00 [Coke] I think there might be a track of him making bass/vocal fry himself. but many trombone tracks, aye.
13:01 [Coke] (recorded audio/video separately, recombined everything later.)
13:01 * geekosaur used to play bass trombone...
13:08 hoelzro joined #perl6
13:14 cognominal joined #perl6
13:16 nine rjbs: this was the first time I've seen someone ask about exec. Usually people want to fork(), but forking and threads don't mix so well.
13:18 diakopter Zoffix: I guess you could obfuscate and inline the anguish module in the victim's source code with a similar technique..
13:20 diakopter Zoffix: another note: not all the Anguish characters appear invisible on the most popular browser (Chrome) on the most popular platform (Android)
13:20 molaf joined #perl6
13:23 njmurphy joined #perl6
13:25 [Coke] even if you get a user to use it, you still have to get them to put the whitespace in their code to invoke the sneaky variants.
13:25 [Coke] (unless the concern is that you're invoking sneaky -looking- code... but at that point, I would argue that hardly anyone is looking at the source regardless)
13:35 diakopter [Coke]: but someone could commit the whole exploit package to an open source module and the diff would be basically invisible.. and then you could commit the innocuous-looking regex/EVAL in another commit
13:37 diakopter actually though i don't know if declaring a new module works from EVAL
13:38 diakopter signs I'm IRCing from my phone: thing like "i" (which I normally expect the phone keyboard to autocorrect) aren't corrected
13:38 timotimo hmm.
13:39 timotimo timo@schmand ~> perl6 -e 'use MONKEY-SEE-NO-EVAL; EVAL "use NativeCall"; say GLOBAL::.keys'
13:39 timotimo (NQPMatch NQPCursorRole HLL NativeCall QRegex NQPRegexMethod NQPCursor QAST NQPRegex)
13:39 timotimo ^- leaky
13:39 lizmat joined #perl6
13:47 dalek perl6-most-wanted: b30d614 | titsuki++ | most-wanted/bindings.md:
13:47 dalek perl6-most-wanted: Fix SDL2 link
13:47 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/b30d6142b5
13:50 teatime heh, it doesn't actually *say* it, but 5to6-perlfunc sortof seems to imply that `shell($command);exit();` is equivalent to `exec($command)`.
13:51 teatime I'm irrationally annoyed by that.
13:51 moritz feel free to wordsmith it to your satisfaction
13:52 teatime I mean, it does say the former "emulates" the latter... I suppose that is clear enough, to anyone who knows what exec() is to begin with, which is the intended audience.
13:52 teatime I become more pedantic with each passing year... I'm beginning to think I should talk to a therapist about it :/
14:01 gregf_ hello
14:01 gregf_ any reason why that module was named 'MONKED-SEE-NO-EVAL'
14:02 gregf_ oops, typed it wrong..
14:02 gregf_ oh , its a pragma
14:03 geekosaur part pun, part warning that you're monkeying around with internals, part making you do extra work to enable something dangerous
14:03 gregf_ still, - strict, warnings, diagnostics make a lot of sense :)
14:03 gregf_ oh - monkeying. fair enough
14:04 skids joined #perl6
14:06 araujo joined #perl6
14:11 CIAvash joined #perl6
14:12 gregf_ geekosaur: cheers
14:14 ZoffixW joined #perl6
14:17 jusafing joined #perl6
14:18 ZoffixW diakopter, but I don't need to obfuscate or inline the whole module:
14:18 ZoffixW m: sub prefix:<⁣> is tighter(&infix:<or>) is export {say "I'm in your code: $^a"}; ⁣my $credit_card = '3333-4444-4444-4444';
14:18 camelia rakudo-moar 280178: OUTPUT«I'm in your code: 3333-4444-4444-4444␤»
14:18 ZoffixW The only "tricky" part is importing the operator.
14:19 ZoffixW In my mind, this whole thing was being exploited by, say, a disgruntled employee... but maybe I'm just thinking about screwing my employer way more often than others ^_^
14:19 jcallen joined #perl6
14:21 masak by the way -- fun trick of the day: using a prefix op as a listop in order to loosen precedence
14:21 masak m: say -4 + 7
14:21 camelia rakudo-moar 280178: OUTPUT«3␤»
14:21 masak m: say prefix:<-> 4 + 7
14:21 camelia rakudo-moar 280178: OUTPUT«-11␤»
14:21 masak :D
14:21 nemo O_o
14:21 * masak bows
14:22 * ZoffixW didn't even know you could use things as a list op
14:22 nemo but, eh, I guess that's really not any different from the perfectly acceptable -(4+7)
14:23 nine Written that way it's just a function call, so the parentheses are implicit
14:23 ZoffixW Ah, now I get it
14:23 masak aye
14:24 masak I wouldn't recommend using it in production
14:24 masak it's confusing
14:24 masak but kinda cool -- just wanted to show it's possible ;)
14:24 ZoffixW m: say prefix:<-> infix:<+> 4, 7
14:24 camelia rakudo-moar 280178: OUTPUT«-11␤»
14:24 ZoffixW neat
14:25 ZoffixW m: say infix:<-> infix:<+>(2+2), 5
14:25 camelia rakudo-moar 280178: OUTPUT«-1␤»
14:27 psch m: say &[-] [+] 1,2,3
14:27 camelia rakudo-moar 280178: OUTPUT«Cannot call Numeric(Sub+{<anon|47159072>}+{Precedence}: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/x0YpqgtFgq line 1␤␤»
14:27 psch aww
14:28 masak m: say [-] [+] 1,2,3
14:28 camelia rakudo-moar 280178: OUTPUT«6␤»
14:28 masak m: say prefix:<-> [+] 1,2,3
14:28 camelia rakudo-moar 280178: OUTPUT«-6␤»
14:28 psch oh, right, it's & as Junction again
14:28 Coleoid_n joined #perl6
14:28 psch m: say &[-]( [+] 1,2,3 )
14:28 camelia rakudo-moar 280178: OUTPUT«-6␤»
14:28 psch that's a bit weird, though, to my eyes
14:29 psch i mean, that it needs parens like that
14:30 psch is that LTM again?  or could it actually be something wrong in the "&[$op] means foofix:[$op]" code?
14:30 psch m: say &[-]
14:30 camelia rakudo-moar 280178: OUTPUT«sub infix:<-> (Mu $?, Mu $?) { #`(Sub+{<anon|47159072>}+{Precedence}|64765280) ... }␤»
14:30 psch oh, if it's just *in*fix maybe that explains enough..?
14:31 psch oh, duh.  it's just nouned, so it doesn't invoke without parens
14:32 psch m: say ([+] (1,2,3)).&[-]
14:32 camelia rakudo-moar 280178: OUTPUT«-6␤»
14:32 psch m: say &[-] ([+] (1,2,3)) :
14:32 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n_rep1443v␤Two terms in a row␤at /tmp/n_rep1443v:1␤------> 3say &[-]7⏏5 ([+] (1,2,3)) :␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤  …»
14:35 cdg joined #perl6
14:36 moritz m: say &[-] ([+] (1,2,3))
14:36 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UZ0CX6DdyX␤Two terms in a row␤at /tmp/UZ0CX6DdyX:1␤------> 3say &[-]7⏏5 ([+] (1,2,3))␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤    …»
14:36 moritz m: say [-] ([+] (1,2,3))
14:36 camelia rakudo-moar 280178: OUTPUT«6␤»
14:50 rindolf m: say [-] (5)
14:50 camelia rakudo-moar 280178: OUTPUT«5␤»
14:50 rindolf m: say [-] (5,7)
14:50 camelia rakudo-moar 280178: OUTPUT«-2␤»
14:50 rindolf m: say [-] (5,7,10)
14:50 camelia rakudo-moar 280178: OUTPUT«-12␤»
14:55 ZoffixW m: say [[[[[[-]]]]]] ((7,5),(10,5))
14:55 camelia rakudo-moar 280178: OUTPUT«0␤»
14:57 psch m: say [-]([+] (1,2,3)); say &[-]([+] (1,2,3)) # clearly this means prefix:<&> is the negation operator
14:57 camelia rakudo-moar 280178: OUTPUT«6␤-6␤»
14:57 ZoffixW heh
14:58 ZoffixW m: say (7,5) [[[[[[-]]]]]] (10,5)
14:58 camelia rakudo-moar 280178: OUTPUT«0␤»
14:58 ZoffixW hmmm
14:58 ZoffixW m: say 7,5 [[[[[[-]]]]]] 10,5
14:58 camelia rakudo-moar 280178: OUTPUT«7-55␤»
14:58 ZoffixW :o
14:58 ZoffixW Ah. So basically [] are ignored in infix ops
14:59 _matt joined #perl6
15:01 psch m: 1 [&say] 2
15:01 camelia rakudo-moar 280178: OUTPUT«12␤»
15:01 psch ZoffixW: well, [&op] is the infix form of &op, and infixifying and infix op... vOv
15:02 psch s:2nd/and/an/
15:02 ptolemarch joined #perl6
15:02 ZoffixW Oh, I didn't know it was the infix form.
15:02 ZoffixW That's crazy! :D
15:02 ZoffixW m: 1 [&prefix:<+>] 2
15:02 camelia rakudo-moar 280178: OUTPUT«Too many positionals passed; expected 0 or 1 arguments but got 2␤  in block <unit> at /tmp/F1YCIN7VUD line 1␤␤»
15:02 ZoffixW awww
15:03 timotimo m: 1 2
15:03 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0hEyPkDVVE␤Two terms in a row␤at /tmp/0hEyPkDVVE:1␤------> 17⏏5 2␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        sta…»
15:03 timotimo but i'm trying to call 1 with 2!
15:03 sammers joined #perl6
15:03 Celelibi joined #perl6
15:04 geekosaur this isn't haskell :p
15:04 psch m: *.say [&map] (1, 2, 3)
15:04 camelia rakudo-moar 280178: OUTPUT«1␤2␤3␤»
15:04 gregf_ m: (1 + (2))
15:04 camelia rakudo-moar 280178: OUTPUT«WARNINGS for /tmp/4WLuUDQr7A:␤Useless use of "+" in expression "1 + (2)" in sink context (line 1)␤»
15:04 ZoffixW m: say '😂' [&join] <This is great>
15:04 camelia rakudo-moar 280178: OUTPUT«This😂is😂great␤»
15:06 pmurias joined #perl6
15:07 khw joined #perl6
15:07 ZoffixW m: '😂' [* ~ *] '😂'
15:07 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6znmqMIyGG␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/6znmqMIyGG:1␤------> 3'😂' [*7⏏5 ~ *] '😂'␤»
15:08 ZoffixW m: '😂' [{$^a ~ $^b}] '😂'
15:08 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sAlATcTicP␤Missing infix inside []␤at /tmp/sAlATcTicP:1␤------> 3'😂' [7⏏5{$^a ~ $^b}] '😂'␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
15:08 ZoffixW I guess it's really particular about what can be placed inside
15:08 psch m: say '😂' [&(* ~ *)] '😂'
15:08 camelia rakudo-moar 280178: OUTPUT«😂😂␤»
15:08 ZoffixW Ahh
15:08 AlexDaniel joined #perl6
15:09 psch m: say 2 [&(sub { $^a + $^b})] 2
15:09 camelia rakudo-moar 280178: OUTPUT«4␤»
15:10 psch m: say 2 [&({class :: { has $.a; has $.b; method new($a, $b) { self.bless(:$a, :$b) } }.new($^a, $^b)})] 2
15:10 camelia rakudo-moar 280178: OUTPUT«<anon|74919456>.new(a => 2, b => 2)␤»
15:11 ZoffixW :o
15:11 AlexDaniel m: say [/] [-] [+] [*] # :)
15:11 camelia rakudo-moar 280178: OUTPUT«1␤»
15:11 psch /o\
15:11 ZoffixW wtf
15:12 arnsholt Oh, right. Reduction metaop
15:12 psch m: say [/]
15:12 camelia rakudo-moar 280178: OUTPUT«No zero-arg meaning for infix:</>␤  in block <unit> at /tmp/HRsQHJ7jK_ line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/HRsQHJ7jK_ line 1␤␤»
15:12 arnsholt That one took a bit to figure out
15:12 ZoffixW I still don't get it.
15:12 arnsholt ZoffixW: [+] is the sum operator
15:12 arnsholt [*] product, etc.
15:13 arnsholt m: say [*]
15:13 camelia rakudo-moar 280178: OUTPUT«1␤»
15:13 arnsholt The product of an empty list is 1 (1 being the identity for products)
15:13 timotimo yeah
15:13 arnsholt The rest of them are just applied to a list of a single element
15:13 timotimo and 0 is the identity for addition
15:13 psch m: say [*]; say [+] [*]; say [-] [+] [*]; say [/] 1
15:13 camelia rakudo-moar 280178: OUTPUT«1␤1␤1␤1␤»
15:13 timotimo (not relevant here, but interesting none-the-less)
15:14 arnsholt Semi-relevant, probably. Can be surprising that [*] and [+] have different values before you stop to think about it
15:14 ZoffixW m: say infix:<*>((),())
15:14 camelia rakudo-moar 280178: OUTPUT«0␤»
15:14 psch m: say infix:<*>(())
15:14 camelia rakudo-moar 280178: OUTPUT«0␤»
15:14 arnsholt That's different
15:14 ZoffixW m: say infix:<*>(
15:14 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_w55ty28QR␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/_w55ty28QR:1␤------> 3say infix:<*>(7⏏5<EOL>␤    expecting any of:␤        argument list␤»
15:14 ZoffixW m: say infix:<*>()
15:14 camelia rakudo-moar 280178: OUTPUT«1␤»
15:15 ZoffixW Alright then.. heh
15:15 arnsholt [*] is "my $p = 1; for @args -> { $p += $_ }; $p"
15:15 ZoffixW I see
15:15 ZoffixW arnsholt++
15:16 arnsholt Except *=, not +=
15:18 dalek ecosystem: f428a5d | RabidGravy++ | META.list:
15:18 dalek ecosystem: Add Device::Velleman::K8055
15:18 dalek ecosystem:
15:18 dalek ecosystem: See https://github.com/jonathan​stowe/Device-Velleman-K8055
15:18 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f428a5d316
15:18 AlexDaniel m: say ([×]-[×])
15:18 camelia rakudo-moar 280178: OUTPUT«0␤»
15:18 AlexDaniel it's time to start making a list of smileys that are valid in perl 6
15:18 RabidGravy weird
15:19 RabidGravy and *that* is my fiftieth module
15:19 RabidGravy or 52nd
15:19 timotimo did module 51 get released? or is the government still holding it back?
15:19 pmurias_ joined #perl6
15:20 RabidGravy I'm using it to control your minds
15:20 timotimo *gasp*
15:20 timotimo btw, i'm almost done making your coffee
15:26 tony-o how do i get in on having someone make coffee for me?
15:28 teatime tony-o: if you don't have a partner, might be easier to implement RFC2324.
15:28 teatime or a mom, I guess, might substitute.
15:28 MadcapJake tony-o: panda install App::Mind::Control
15:28 tony-o teatime: nice rfc
15:28 tony-o she usually has me make the coffee for her
15:28 teatime :)
15:29 teatime heh, my mom makes my coffee about half of the time, if I'm at her house, which is often.
15:30 tony-o my folks are too far to make free coffee worth the trip over just making some myself
15:30 tony-o MadcapJake: coffee is only the beginning for that module
15:31 tony-o +1 for Aquavit being in this RFC for alcohol
15:31 dalek doc: 1f86474 | (Zoffix Znet)++ | doc/Type/Any.pod:
15:31 dalek doc: Remove impertinent text
15:31 dalek doc: review: https://github.com/perl6/doc/commit/1f86474329
15:31 timotimo teatime: you're having coffee for teatime?!
15:32 teatime it isn't teatime yet, and please don't pronounce my name that way, it makes me feel... stabby.
15:32 teatime and you wouldn't like me when I'm stabby.
15:33 lostinfog joined #perl6
15:33 tony-o lighten up francis
15:34 ZoffixW ... stabby :o
15:34 * ZoffixW backs away slowly
15:34 tony-o for reference, if you're not a bill murray fan: https://www.youtube.com/watch?v=0OnpkDWbeJs
15:34 lizmat ZoffixW: not sure why that mention of say truncating to 100 elems needed to be removed
15:34 lizmat ?
15:34 yoleaux 14 May 2016 11:10Z <RabidGravy> lizmat: if you get a minute is there any chance of giving the "Noise Gang" a mention in the p6w next week?
15:36 jnthn Stabby! http://i.imgur.com/zezivkR.jpg
15:36 timotimo is that short for "standby"
15:36 ZoffixW lizmat, it's an extra text to read that adds zero useful information to the understanding of the `flat` method being described. The extra information is even irrelevant to the code example shown.
15:38 lizmat ah, ok, I just looked at the diff, not at its context  :-)
15:38 Su-Shee joined #perl6
15:38 ZoffixW :)
15:38 lizmat ZoffixW++ Acme::Anguish
15:38 timotimo lizmat: maybe you should include one of the example programs written in anguish somewhere in between the regular text of the weekly :P
15:38 lizmat so is there a uniprop for invisible / zero width code points?
15:39 lizmat if not, maybe we should make one at the MoarVM level ?
15:39 Su-Shee good afternoon/evening.
15:39 lizmat timotimo: I'm going to refer to the associated blog post: that's scary enough  :-)
15:39 Su-Shee do I want panda or zef?
15:39 gregf_ missed morning
15:40 teatime https://www.youtube.com/watch?v=M0mU3393PGk  <-- for those who do not know me by reputation alone, a brief introductory video.
15:40 ZoffixW Su-Shee, zef
15:40 ZoffixW Su-Shee, (personal opinion)
15:40 teatime I don't much get on w/ my fellow guilded assassins... they say I enjoy my work /too much/.
15:40 timotimo teatime: i remember seeing that! i forgot what that was from
15:40 ZoffixW Su-Shee, I think there's also redpanda available now. tadzik would know more.
15:40 Su-Shee ZoffixW: I want the "I'm an idiot and don't bother with complicated things" one, please :)
15:41 teatime timotimo: discworld; the video specifically is from Hogfather
15:41 timotimo oh!!
15:41 tadzik Su-Shee (IRC): redpanda is a close to cpanm as it gets, fwiw
15:41 tadzik I'm obviously biased
15:41 timotimo yes, i loved hogfather. i really need to watch it again soon
15:41 pmurias joined #perl6
15:42 ZoffixW tadzik, is redpanda the New and Improved(tm) version of panda you were telling about awhile back?
15:42 Su-Shee tadzik: never used cpanm, admittedly .. which one is going to be the official one coming with rakudo?
15:42 timotimo i think there's also panda2, which happened in the mean time
15:42 tadzik ZoffixW: it's a prototype, more like
15:42 tadzik but I find it useful in itself :)
15:42 x86 left #perl6
15:42 tadzik it's as small and focused as possible
15:42 ZoffixW Ah
15:42 tadzik Su-Shee: with rakudo itself, none :) panda is still what comes with Star
15:43 Su-Shee tadzik: ah. excellent. then I'm not bothering with anything else.
15:44 tadzik panda is a little bit behind these days, I started a nice major rewrite, but it's not fully functional yet
15:45 ssotka joined #perl6
15:46 Su-Shee tadzik: I just want to install modules not by hand.
15:46 Su-Shee tadzik: but I'm seeing the one I need failing anyways so I don't need a module installer today it seems..
15:46 tadzik right
15:46 tadzik I recommend redpanda :)
15:46 tadzik Su-Shee: what is it that you need?
15:47 Su-Shee tadzik: the web framework with the name I always forget Bsomething.
15:47 ZoffixW Bailador
15:47 dogbert17 joined #perl6
15:47 ZoffixW It should succeed, I think it's just the Travis build for it is failing
15:47 tadzik hah :)
15:50 Su-Shee ok, I also have a stupid question about this one: https://github.com/tony-o/perl6-http-server-router a) it's threaded and b) it expects a promise. that makes it completely asynchron in my book - why does it say "no further processing is done until the promise is kept/broken"?
15:50 tadzik most of my experience with travis for perl 6 projects is that when travis says that "Build fails" it means that Travis failed
15:51 ZoffixW Su-Shee, it's just for dispatcher.
15:51 Su-Shee tadzik: well I just don't install anything red. :)
15:52 Su-Shee ZoffixW: yes but shouldn't it just go on dispatching and matching routes and not stop at all? (unless syntax error or something ok :)
15:54 tadzik Su-Shee: reasonable :)
15:54 tadzik though why not just try for yourself? :)
15:54 ZoffixW Su-Shee, when it's trying to match the routes, it finds the first one that matches and calls it, you have control over whether it should try to match further routes by returning True, False, or Promise. True means you handled the request and no further routes should be matched. False means it should go look for more routes that match. And it'll await Promise.  So "processing" in this context is processing the request for this route, not the whole app
15:55 araujo joined #perl6
15:55 araujo joined #perl6
15:55 ZoffixW Oh
15:55 Su-Shee tadzik: because I'm considering to try and use some perl 6 in production so anything "red" is a no go.
15:55 ZoffixW Su-Shee, never mind. I may be wrong. Lemme read the code
15:55 AlexDaniel ZoffixW: “Look, Ma! I'm a C Programmer!” is a great title, by the way
15:55 tadzik Su-Shee: fairy nuff
15:55 MadcapJake I wish Pair could be paremeterized
15:56 tony-o Su-Shee: no other routes or anything are executed until the Promise that is passed to the route is broken or kepy
15:56 tony-o Su-Shee: Re:HTTP::Server::Router (H:S:R)
15:56 Su-Shee ZoffixW: ^^^^ see, that's what I meant..
15:57 Su-Shee tony-o: yes but that makes it block? aren't promises and threads supposed to make it all shiny non-blocking asynchron?
15:57 tony-o Su-Shee: sorry, until the Promise the is *returned* from the route is broken or kept
15:57 tony-o Su-Shee: it doesn't block until then, it just awaits and other requests are processed
15:58 ZoffixW Ok, then my explanation was correct :D
15:58 Su-Shee ok, then I'm too stupid and don't get it, thanks though.
15:59 tony-o Su-Shee: not stupid, just the way it works is that it doesn't stop any other processing :-)
15:59 mst Su-Shee: I believe what they mean is "the promise is treated as a deferred true/false value and if the promise fails, route matching continues where it left off"
15:59 mst so the route matching 'keep going until one returns true' phase of this request's handling is blocked until the promise is completed
15:59 mst but other requests will be handled normally meanwhile
15:59 Su-Shee mst: yeah, I'm too stipid to understand what that really means in all consequences, especially with threads in the mix.
16:00 tony-o mst: thank you
16:00 AlexDaniel ZoffixW: as for the invisible stuff, I think that every decent text editor for programming should be displaying that kind of unicode crap
16:01 tony-o Su-Shee: there is also this if you want something higher level than H:S:R too - https://github.com/tony-o/perl6-hiker
16:01 AlexDaniel ZoffixW: e.g. I can see the difference between ‘ ’ and ‘ ’
16:01 ZoffixW Su-Shee, all three of these routes match '/blah'. But only 'Hello, World!' will be printed because second route returns True. A Promise in the mix only delays the handling of this particular request, not other ones. route '/:whatever' => sub { say 'Hello, '; False; }; route '/:another-whatever' => sub { say 'World!'; True }; route '/:yet-another-whatever' => sub { say 'Nope'; }
16:01 RabidGravy Hmm the step on the GTK::Simple::Scale doesn't seem to work
16:02 mst Su-Shee: basically, they don't interact in any way you need to worry about
16:02 AlexDaniel m: say ‘hello’
16:02 camelia rakudo-moar 280178: OUTPUT«hello␤»
16:02 RabidGravy it seems to be 0.01 whatever you set it to
16:03 ZoffixW AlexDaniel, yeah, probably. But neither Sublime Text 2 nor Atom nor pico do
16:03 AlexDaniel ZoffixW: emacs does
16:03 Su-Shee mst: I cannot "not worry about". ;) either I understand a module or I can't use it.
16:03 mst Su-Shee: pretend each request is in its own process. pretend it was using IO::Async. then the route matching is 'foreach my $route (@routes) { my $ret = $route->(); if ($ret->isa('Future')) { $ret = $loop->await($ret); } if ($ret eq 'true') { return; # done } elsif ($ret eq 'false') { next } else { die "huh?"} }
16:04 Su-Shee tony-o: what's "hikes"?!
16:04 mst Su-Shee: I'm not sure what interactions you're imagining tbh, which makes it hard for me to tell you why they wouldn't happen :)
16:05 MadcapJake m: my Pair @a where {for $_ -> (Int :key($), Int :value($)) {}} = 10 => 11, 5 => 3 # can't seem to get this to work
16:05 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to @a; expected <anon> but got Pair (10 => 11)␤  in block <unit> at /tmp/oyicM6vrb7 line 1␤␤»
16:06 tony-o Su-Shee: model view http server in p6
16:06 Su-Shee mst: I didn't get to imagining anything, I just read through the short description and didn't understand the consequences but as I said, that's my problem, I'm not versed enough in threads and promises. and no, explaining it a third time with IO::Async doesn't quite help because I haven't understood that either yet :)
16:06 MadcapJake m: subset IntPair of Pair where *.key ~~ Int and *.value ~~ Int; my IntPair @a = 10 => 11, 5 => 3;
16:06 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to @a; expected IntPair but got Pair (10 => 11)␤  in block <unit> at /tmp/O8i7odTNmO line 1␤␤»
16:06 Su-Shee tony-o: it's the name of the thing?
16:06 mst Su-Shee: bah. was worth a try :)
16:07 ZoffixW m: subset IntPair of Pair where *.key ~~ Int and *.value ~~ Int; my @a of IntPair = 10 => 11, 5 => 3;
16:07 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to @a; expected IntPair but got Pair (10 => 11)␤  in block <unit> at /tmp/mflc3caNab line 1␤␤»
16:07 ZoffixW dafuq
16:07 Su-Shee mst: sorry, I don't get complex things so fast and not with just three sentences. there is a reason why I'm whining for a book.
16:07 RabidGravy Ah got it
16:08 timotimo ZoffixW: the pair literal will turn your key into a Str for you
16:08 MadcapJake timotimo: is there any way to turn that off?
16:08 ZoffixW timotimo, isn't that what I want?
16:09 ZoffixW Oh
16:09 ZoffixW I didn't even bother to read the where clause :)
16:09 ZoffixW m: subset IntPair of Pair where *.key ~~ IntStr and *.value ~~ IntStr; my @a of IntPair = 10 => 11, 5 => 3;
16:09 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to @a; expected IntPair but got Pair (10 => 11)␤  in block <unit> at /tmp/lFfdJQdEOA line 1␤␤»
16:09 ZoffixW :/
16:09 MadcapJake IntStr?
16:09 ZoffixW Ah
16:09 ZoffixW m: subset IntPair of Pair where { .key ~~ IntStr and .value ~~ IntStr }; my @a of IntPair = 10 => 11, 5 => 3;
16:09 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to @a; expected IntPair but got Pair (10 => 11)␤  in block <unit> at /tmp/ne1kU_EVOH line 1␤␤»
16:09 * ZoffixW throws desk
16:10 ZoffixW m: say '22'.WHAT
16:10 camelia rakudo-moar 280178: OUTPUT«(Str)␤»
16:10 MadcapJake that needs to be a huggable factoid :P
16:10 ZoffixW heh. I actually have it bound to a key on my home keyboard.. :)
16:11 MadcapJake what is IntStr?
16:11 ZoffixW m: my IntStr $x = '22'; $x = 22; say $x
16:11 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to $x; expected IntStr but got Str ("22")␤  in block <unit> at /tmp/78pT1YU4Hs line 1␤␤»
16:11 tony-o Su-Shee: yes, that's the name
16:11 ZoffixW I was expecting that to work.
16:11 AlexDaniel where's huggable
16:11 ZoffixW broken
16:11 AlexDaniel poor creature
16:11 ZoffixW /notice huggable dunno
16:12 mst Su-Shee: I guess a reasonable interim plan is 'always return true or false, don't use the promise bit yet'
16:12 ZoffixW It's the damn joining bug -_-
16:12 Su-Shee mst: not using it, I can't use what I don't understand, that would be silly.
16:12 MadcapJake I can't find any mention of IntStr in docs or syns
16:12 AlexDaniel m: subset IntPair of Pair where { .key ~~ IntStr }; my IntPair $a = 10 => 11
16:12 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to $a; expected IntPair but got Pair (10 => 11)␤  in block <unit> at /tmp/hbCp44JMnx line 1␤␤»
16:13 mst Su-Shee: yep. just saying you can still use the rest of it in the meantime :)
16:13 tony-o Su-Shee: you don't need to use the Promise bit of the routing, as mst said, you can just return True/False depending on whether or not the request requires further processing
16:14 ZoffixW MadcapJake, it's an Str that has the Int inside of it, like '22' or '42'.
16:14 MadcapJake ZoffixW: ok, looking at rakudo source (surprised it's never mentioned in syns or docs though)
16:14 Su-Shee mst: I'm reading through all modules I could use and then use the one I either understand or which has a really nice API or great docs I can read 5 times.
16:15 ZoffixW But for some reason it's not working right for me now :/
16:15 MadcapJake m: my IntStr $i = '12'; # ZoffixW: it doesn't seem to work though
16:15 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to $i; expected IntStr but got Str ("12")␤  in block <unit> at /tmp/KbjOxvtxYZ line 1␤␤»
16:15 timotimo IntStr only gets created from &var
16:15 timotimo m: my IntStr $i = var('12')
16:15 camelia rakudo-moar 280178: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Mo6k_0ritU␤Undeclared routine:␤    var used at line 1. Did you mean 'VAR', 'val'?␤␤»
16:15 timotimo m: my IntStr $i = val('12')
16:15 camelia rakudo-moar 280178: ( no output )
16:15 timotimo m: my IntStr $i = <12>
16:15 camelia rakudo-moar 280178: ( no output )
16:15 timotimo m: my IntStr $i = '12'
16:15 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to $i; expected IntStr but got Str ("12")␤  in block <unit> at /tmp/hpGxAg36Wj line 1␤␤»
16:15 AlexDaniel m: my IntStr $i = <12>
16:15 camelia rakudo-moar 280178: ( no output )
16:15 timotimo you have to request getting an allomorph like that
16:15 ZoffixW Oh, now I remember. Right
16:16 tony-o Su-Shee: i'd be happy to improve my docs for hiker or H:S:R if you have feedback for it
16:16 Su-Shee also, not using the promises part doesn't exactly make me understand them ;) then I still use something I don't understand :)
16:16 MadcapJake what is val? (I feel like I am all the sudden in the wrong language channel, no docs, no syn mentions, lol)
16:16 ZoffixW heh
16:16 tony-o (or any other module, for that matter)
16:16 timotimo MadcapJake: https://design.perl6.org/S02.ht​ml#Allomorphic_value_semantics
16:17 MadcapJake timotimo: thank you!
16:17 ZoffixW m: subset IntPair of Pair where { try { .key == .key } and .value ~~ Int }; my IntPair $a = 42 => 11
16:17 camelia rakudo-moar 280178: ( no output )
16:17 ZoffixW m: subset IntPair of Pair where { try { .key == .key } and .value ~~ Int }; my IntPair $a = 'meow' => 11
16:17 camelia rakudo-moar 280178: OUTPUT«Type check failed in assignment to $a; expected IntPair but got Pair (:meow(11))␤  in block <unit> at /tmp/CBmyfBcQhg line 1␤␤»
16:17 ZoffixW \o/
16:18 Su-Shee tony-o: I can do that once I've understood it all.
16:18 MadcapJake lol nice
16:18 ZoffixW MadcapJake, that fails with non-Int numerics though :P needs .key.Int I guess
16:18 MadcapJake m: <1/2>.WHAT.say; < 1/2 >.WHAT.say
16:18 camelia rakudo-moar 280178: OUTPUT«(Rat)␤(RatStr)␤»
16:19 MadcapJake so <> with a single value is really the val circumfix operator? This explains our qw discussion the other day
16:19 psch m: say <1>.WHAT
16:19 camelia rakudo-moar 280178: OUTPUT«(IntStr)␤»
16:19 psch m: say < 1 >.WHAT
16:19 camelia rakudo-moar 280178: OUTPUT«(IntStr)␤»
16:19 psch huh, i thought there was a difference there
16:19 MadcapJake psch: that shouldn't be IntStr in the first case though right?
16:20 psch MadcapJake: well, yeah, that's what i thought :)
16:20 MadcapJake m: <1.0>.WHAT.say; < 1.0 >.WHAT.say
16:20 camelia rakudo-moar 280178: OUTPUT«(RatStr)␤(RatStr)␤»
16:20 MadcapJake m: <1e0>.WHAT.say; < 1e0 >.WHAT.say
16:20 camelia rakudo-moar 280178: OUTPUT«(NumStr)␤(NumStr)␤»
16:20 psch m: say < 8+9i >.WHAT; say <8+9i>.WHAT
16:20 camelia rakudo-moar 280178: OUTPUT«(ComplexStr)␤(Complex)␤»
16:21 dalek gtk-simple: 1a9fb5e | RabidGravy++ | lib/GTK/Simple.pm6:
16:21 dalek gtk-simple: Allow setting of "digits" on Scale widget
16:21 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/1a9fb5e167
16:21 ZoffixW m: «1» .WHAT.say
16:21 camelia rakudo-moar 280178: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
16:21 ZoffixW m: «1».WHAT.say
16:21 camelia rakudo-moar 280178: OUTPUT«(IntStr)␤»
16:22 psch m: <1 2>.map({$_.WHAT.say})
16:22 camelia rakudo-moar 280178: OUTPUT«(IntStr)␤(IntStr)␤»
16:22 RabidGravy there, can sensibly use the scale widget for a sequencer
16:22 psch m: < 1/2 1/2 >.map({$_.WHAT.say})
16:22 camelia rakudo-moar 280178: OUTPUT«(RatStr)␤(RatStr)␤»
16:22 psch m: <1/2 1/2>.map({$_.WHAT.say})
16:22 camelia rakudo-moar 280178: OUTPUT«(RatStr)␤(RatStr)␤»
16:26 ZoffixW m: «1» .WHO
16:26 camelia rakudo-moar 280178: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
16:26 ZoffixW m: «1» .WHY
16:26 camelia rakudo-moar 280178: ( no output )
16:26 ZoffixW :/
16:27 dalek doc: 3a9c4f9 | (Jan-Olof Hendig)++ | doc/Type/ (3 files):
16:27 dalek doc: Fixed a bunch of broken links
16:27 dalek doc: review: https://github.com/perl6/doc/commit/3a9c4f9c59
16:27 gregf_ m: say [+] <1/2 1/2>
16:27 camelia rakudo-moar 280178: OUTPUT«1␤»
16:27 MadcapJake m: my subset IntPair of Pair where {val("$_.key()") ~~ Int and .value ~~ Int}; my IntPair @a = 10 => 12, 11 => 13; say @a; my IntPair @a = a => 1, b => 2;
16:27 camelia rakudo-moar 280178: OUTPUT«Potential difficulties:␤    Redeclaration of symbol @a␤    at /tmp/jW3bGP0etc:1␤    ------> 0 => 12, 11 => 13; say @a; my IntPair @a7⏏5 = a => 1, b => 2;␤[10 => 12 11 => 13]␤Type check failed in assignment to @a; expected IntPair but got …»
16:27 gregf_ m: say <1/2 1/2>.map(*.^name)
16:27 camelia rakudo-moar 280178: OUTPUT«(RatStr RatStr)␤»
16:28 gregf_ m: say [+] <1/2 1/2 1>
16:28 camelia rakudo-moar 280178: OUTPUT«2␤»
16:29 ZoffixW MadcapJake, neat
16:30 pmurias joined #perl6
16:30 jdv79 what is wrong here?: https://gist.github.com/anonymous​/7ab475f6d6d3ccd53a33989003e776d6
16:31 ZoffixW m: my subset IntPair of Pair where { .key ~~ Int and .value ~~ Int}; my IntPair @a = class :: is Pair {};
16:31 camelia rakudo-moar 280178: OUTPUT«Cannot look up attributes in a type object␤  in method key at /home/camelia/rakudo-m-inst-2/share​/perl6/runtime/CORE.setting.moarvm line 1␤  in block <unit> at /tmp/6iUj9fGKxb line 1␤␤»
16:32 ZoffixW jdv79, do you get the same if you simply retry?
16:32 ZoffixW I recall seeing the Basic.t failures and they disappeared when I retried
16:32 jdv79 ill let you know
16:34 jdv79 no
16:35 gregf_ is that subset for creating user defined datatypes?
16:36 gregf_ like so: my subset Foo of Int where { }; and class Foo is Int {} ; # are these quivalent?
16:36 ZoffixW gregf_, nope, you can't instantiate a subset
16:36 gregf_ ah - sure
16:37 ZoffixW (my writing about subtypes: http://perl6.party/post/Perl-6-Types--M​ade-for-Humans#subsets:tailor-madetypes )
16:38 ZoffixW s/types/sets/
16:38 kaare_ Anybody here with control over http://modules.perl6.org/ ?
16:38 gregf_ oh wow
16:39 cdg joined #perl6
16:39 gregf_ m: my subset Foo of Int where { $_ > 0 }; class Bar is Int {}; my Foo $f = 10; my Bar $b = Bar.new(10); say $b ~~ $f; # something like this
16:39 camelia rakudo-moar e39ce3: OUTPUT«True␤»
16:39 kaare_ Could I request that either a) Updates always has a value, or b) N/A is sorted last when http://modules.perl6.org/#​sort-col=6&amp;sort-dir=d
16:40 AlexDaniel joined #perl6
16:40 jdv79 ugexe: https://gist.github.com/anonymous​/e58689c64a600886a3699e2925ba5382 ?
16:40 jdv79 its in META.list
16:41 MadcapJake m: https://gist.github.com/MadcapJake​/6091b344f6d530f3745e5598f2d2c0a7
16:41 camelia rakudo-moar e39ce3: OUTPUT«Constraint type check failed for parameter '@e'␤  in sub foo at /tmp/YKONqmG9yd line 12␤  in block <unit> at /tmp/YKONqmG9yd line 14␤␤»
16:41 MadcapJake ZoffixW: any idea why ^^ fails?
16:42 gregf_ ZoffixW: thanks
16:42 Coleoid_m joined #perl6
16:43 MadcapJake it doesn't even appear to be entering my constraint, a `say` inside it produces nothing
16:44 MadcapJake woops, nvm now it's doing that at least :P
16:45 MadcapJake (ofc, still not sure why it's failing, the two constraint conditions are `die` statements so should be throwing those errors rather than the generic "Constraint type check..." error
16:45 MadcapJake and it dies properly if I place a string for a key/value
16:46 MadcapJake and it dies properly if I place a string for a key/value
16:46 MadcapJake oops, lol alt-tabbed to the wrong window
16:46 psch m: subset SInt of Int where * < 10; my SInt @a = 1, 2; say @a[0].WHAT
16:46 camelia rakudo-moar e39ce3: OUTPUT«(Int)␤»
16:46 psch MadcapJake: probably something like that ^^^
16:46 ZoffixW MadcapJake, it needs to be my @edges of IntPair
16:46 psch subsets aren't nominal in the same way classes are
16:46 psch ...i'm not sure nominal is the right word there :/
16:46 Su-Shee uhm what's perldoc called in perl6? :)
16:47 ZoffixW Su-Shee, p6doc
16:47 Su-Shee ah
16:47 MadcapJake psch, ZoffixW: but shouldn't the check proceed again when in the sub signature?
16:48 MadcapJake ZoffixW: `of` produces the same error
16:48 psch m: subset SInt of Int where * < 10; my SInt @a = 1, 2; sub f(@a where all(*) ~~ SInt) { @a }; say f @a
16:48 camelia rakudo-moar e39ce3: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub f at /tmp/Fb2kDa9KB3 line 1␤  in block <unit> at /tmp/Fb2kDa9KB3 line 1␤␤»
16:49 ZoffixW m: subset SInt of Int where * < 10; my SInt @a = 1, 2; sub f(@a where { .all ~~ SInt }) { @a }; say f @a
16:49 camelia rakudo-moar e39ce3: OUTPUT«[1 2]␤»
16:50 ZoffixW MadcapJake, because you have the same issue on the sub sig too. And `of` won't work the same way there, so use that method ^
16:51 ZoffixW m: https://gist.github.com/zoffixznet​/8965cd3aad133a84ffba5f24db99f354
16:51 camelia rakudo-moar e39ce3: OUTPUT«[1 => 2 3 => 4 6 => 2]␤»
16:54 MadcapJake ahhh!! thanks!
16:55 gregf_ m: say <1 2 foo 1/2>.grep: { $_ ~~ Int }
16:55 camelia rakudo-moar e39ce3: OUTPUT«(1 2)␤»
16:58 ZoffixW m: say <1 2 foo 1/2>.grep: Int
16:58 camelia rakudo-moar e39ce3: OUTPUT«(1 2)␤»
17:00 gregf_ also, i can see that almost ever map, grep returns a seq. irrrespective of what the source Datastruct is
17:00 gregf_ m: say ({foo => 1, bar => 2}.kv.map: -> $k,$v { $k => $v * $v  }).^name #there hash to a Seq
17:00 camelia rakudo-moar e39ce3: OUTPUT«Seq␤»
17:03 ZoffixW Yup. It's kinda like a pipeline. You can do stuff and it'll pull the items through the pipeline
17:03 ZoffixW m: ^∞ .grep(* %% 2).map: { .say; $++ > 10 and die 'Had enough' }
17:03 camelia rakudo-moar e39ce3: OUTPUT«0␤2␤4␤6␤8␤10␤12␤14␤16␤18␤20␤22␤Had enough␤  in block <unit> at /tmp/xj_FgS2UZD line 1␤␤»
17:03 ZoffixW Note, it didn't grep the infinite list first before doing the map ^
17:04 ZoffixW *the entire infinite list
17:04 MadcapJake m: my class Foo { has $.a; method WHICH(Foo $o) { $o.a === $!a }}; my Foo @a = flat Foo.new(:a($++)) xx 5, Foo.new(:4a); @a.say
17:04 camelia rakudo-moar e39ce3: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method WHICH at /tmp/fczzYrMBZP line 1␤  in block <unit> at /tmp/fczzYrMBZP line 1␤␤»
17:05 ianm joined #perl6
17:05 MadcapJake oh i'm doing WHICH like ACCEPTS
17:06 ugexe jdv79: maybe need to update the package list with `zef update` (or set auto-update to 1 in the config). there might be a package list in ~/.zef/store/<cs-name> already from a previous install... maybe zef should output the age of such indexes to make that more apparent
17:07 ugexe at least for me its able to find and install it, so thats my hunch
17:08 AlexDaniel m: say ^∞ .grep(* %% 2).map: { last if $++ > 10; $_ }
17:08 camelia rakudo-moar e39ce3: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
17:08 ZoffixW m: $++ and last or .say for ^∞ .grep(* %% 2).map: "And " ~ *
17:08 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CPZmGJXQW3␤Undeclared routine:␤    or used at line 1␤␤»
17:09 AlexDaniel m: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; True }'
17:09 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ulUXwUdLPc␤Strange text after block (missing semicolon or comma?)␤at /tmp/ulUXwUdLPc:1␤------> 3* %% 2).grep: { last if $++ > 10; True }7⏏5'␤    expecting any of:␤        infix␤        infix s…»
17:09 AlexDaniel m: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; True }
17:09 camelia rakudo-moar e39ce3: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 15…»
17:09 AlexDaniel whoa, what
17:09 AlexDaniel star: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; True }
17:09 camelia star-m 2016.01: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
17:09 AlexDaniel huh?
17:10 AlexDaniel can anybody shine a light on that?
17:11 [Coke] kaare_: that's a reasonable request; can you open a ticket on the ecosystem (right?) github project for it?
17:11 ZoffixW It's cool that `say` actually makes it stop eventually
17:11 pmurias joined #perl6
17:11 psch m: ^Inf .grep(* %% 2)[^10]
17:11 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NxTAjM3vUe␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/NxTAjM3vUe:1␤------> 3^Inf .grep(* %% 2)[^7⏏10]␤»
17:11 psch aww
17:12 psch m: (^Inf .grep(* %% 2))[^10].say
17:12 camelia rakudo-moar e39ce3: OUTPUT«(0 2 4 6 8 10 12 14 16 18)␤»
17:12 [Coke] AlexDaniel: are you asking "what specifically changed to impact that between star 2016.01 and HEAD?
17:12 AlexDaniel [Coke]: yes
17:12 [Coke] No clue, but you could run git bisect to narrow it down.
17:12 ZoffixW FWIW, it's broken on my 2016.04-89-gec6c3b8
17:14 sufrostico joined #perl6
17:15 ZoffixW kaare_, no need, I'll fix it right now.
17:16 AlexDaniel [Coke]: I think I can do that
17:16 ZoffixW [Coke], we have a separate repo for the site itself: https://github.com/perl6/modules.perl6.org/
17:16 [Coke] ZoffixW: yes, that one.
17:16 [Coke] ZoffixW++
17:17 jdv79 ugexe: zef update seems to help.  maybe autoupdate as default might be nice.
17:17 jdv79 or default to local search but fail out to a fetch
17:18 spider-mario joined #perl6
17:22 tony-o [Coke]: modules.zef.pm also lets you search for modules and browse their code
17:26 hoelzro wow, modules.zef.pm is really nice
17:26 eam joined #perl6
17:28 ZoffixW Agreed.
17:28 domidumont joined #perl6
17:28 mspo the main page could use an update
17:28 ZoffixW AlexDaniel, what's your opinion on code examples contrast? :) http://modules.zef.pm/modules​/Alex%20Maslakov/TelegramBot
17:28 mspo also the copyright?
17:29 tony-o what's wrong with the C?
17:29 domidumont joined #perl6
17:29 mspo the 2014 part
17:29 tony-o also, took out the one list item that was completed
17:29 tony-o mspo: that site has been there since 2014 :-)
17:29 ZoffixW Actually, it's not that bad on my other monitor...
17:31 mspo I suppose that's right
17:33 Su-Shee how do I make JSON the (default) auto-rendered in Bailador?
17:34 mspo tony-o: used to trying to get copyright to say the current year
17:36 lizmat tadzik: do you have a URL for redpanda ?
17:37 tadzik lizmat: https://github.com/tadzik/App-redpanda
17:37 tony-o mspo: should the (c) be the current year always?  i'm not familiar with that kind of thing _at all_ and mostly put it in there in jest
17:37 lizmat tadzik: thanks
17:38 mspo tony-o: I think it depends if you are using implied copyright or registered copyright
17:38 mspo tony-o: I think the general practice on the web is to always have the current year or 2014-$currentyear
17:38 mspo tony-o: otherwise it gives (at least to me) an impression that the page hasn't been updated
17:39 mspo for example on netbsd.org we use: Copyright © 1994-2016 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED
17:39 mspo but we're a registered mark and stuff
17:39 mspo that's the format I like, though
17:40 lizmat zef.modules.pm gives me a 501
17:40 lizmat ?
17:40 kaare_ ZoffixW: Thanx
17:41 CIAvash joined #perl6
17:41 tony-o lizmat: retry please, i was restarting the mojo
17:41 ZoffixW Su-Shee, not tried, but what about app.context.response.headers<Content-Type> = 'application/json'; ? That assumes you're using the DSL interface for Bailador
17:41 ZoffixW Su-Shee, also note: currently, Bailador has no support for async (unless ufobat added it in the past couple of weeks)
17:42 ugexe modules.zef.pm, not zef.modules.pm
17:42 mst if (async) { bailadout }
17:42 mspo Copyright © 2016 Apple Inc. All rights reserved.
17:42 tony-o mspo: i'll give it an update
17:42 ennio joined #perl6
17:43 mspo tony-o: ;)
17:43 Su-Shee oh dear god.. why on earth is FOLDING suddenly enabled in vim's perl 6 syntax highlighting?!
17:44 Su-Shee ZoffixW: haven't tried anything yet, I looked through the docs and examples and didn't find anything JSOn..
17:44 Su-Shee sorry, I have to first disable this messing with my editor configuration, brb unbelievable..
17:45 * moritz hasn't observed any folding
17:45 mst moritz: maybe yours was spindled and mutilated instead
17:45 Su-Shee moritz: I just opened a Blabla.p6 and all subs are folded by default.
17:45 jdv79 sounds annoying
17:46 moritz Su-Shee: this is a pretty new home directory, with only 10 lines of .vimrc, none of which relate to folding
17:46 ZoffixW Su-Shee, what I said doesn't work :)
17:46 Su-Shee moritz: WELL WHAT CAN I SAY. IT FOLDS.
17:46 * ZoffixW just tried
17:46 moritz Su-Shee: which makes me believe that with the version of vim and moon phase, it doesn't fold by default :-)
17:46 Su-Shee moritz: nobody else does.
17:46 jdv79 isnt it easy to turn off though anyway?
17:47 Su-Shee moritz: well I wouldn't KNOW BECAUSE IT NEVER HAPPENED
17:47 huggable joined #perl6
17:47 ZoffixW huggable, hug Su-Shee
17:47 * huggable hugs Su-Shee
17:47 Su-Shee jdv79: yes now I have to actually look it up because of this silly nonsense :(
17:47 Su-Shee moritz: it happens only in gvim :(
17:47 * Su-Shee goes looking for the maintainer to submit a bug report
17:48 moritz fwiw tis is vim and gvim 7.4 (from ubuntu 2016.04)
17:49 Su-Shee version 7.4.692
17:49 nicqbot joined #perl6
17:50 Su-Shee hmpf.. and if I install Bailador globally, it suddenly fails while it works perfectly fine as user with a local rakudo.. :(
17:52 Su-Shee oh dear lord I just looked into the perl 6 syntax.vim :)
17:53 ZoffixW Su-Shee, there's no way to change the default content type
17:53 * ZoffixW read the code
17:55 Su-Shee ZoffixW: how do you mean you can't change the default content type? it's always text/html?!
17:56 _dolmen_ joined #perl6
17:56 ZoffixW Su-Shee, yeah. Well, unless we're talking about different things. In your route, you can call content_type('application/json') to change content type for that route. If you don't specify that, you'll get text/html by default and you can't change that default
17:56 ZoffixW i.e. if you don't want text/html you have explicitly ask for something else
17:56 Su-Shee ZoffixW: hm. ok.
17:56 tony-o ZoffixW: can you have a route that just calls that and then continues to search for other routes that fit?
17:57 ZoffixW Oh, yeah. That
17:57 Su-Shee ZoffixW: it's an api, I literally never need html. but ok, doesn't matter, then I call it by hand.
17:57 tony-o Su-Shee: that might be a little easier ^
17:57 Su-Shee tony-o: well that means that I have to type it about 600 times ;)
17:57 MadcapJake would be nice to be able to set a default
17:58 Su-Shee yes.
17:58 ZoffixW Su-Shee, no no, just put:     get /^/ { content_type 'application/json'; return Nil; } at the start of the app
17:59 tony-o Su-Shee: i meant that calling it once at the beginning of the app (so that it is the first route) and then telling bailador to continue processing with other routes
18:00 Su-Shee ok.
18:00 Su-Shee first I need to actually make Bailador install.
18:00 Su-Shee after I disabled folding in all my vims.
18:01 MadcapJake why is it content_type instead of content-type?
18:01 ZoffixW Because screw consistency :)
18:01 ZoffixW Also, probably because that part was written before kebob case was a thing.
18:01 Su-Shee ZoffixW: that's not funny imho.
18:02 _mg_ joined #perl6
18:02 MadcapJake Su-Shee: I'm pretty sure ZoffixW is being sarcastic not funny
18:03 tony-o haha
18:04 Su-Shee so. next problem.
18:04 MadcapJake Just saying, in this instance, he's (assuming) not trying to say "who cares!" rather trying to say "yeah that's weird and probably should change"
18:05 ZoffixW Su-Shee, I typoed my thing. Should be  get /^/ => { content_type 'application/json'; False; }    Here's the full 4 request methods: https://gist.github.com/zoffixznet​/66581883ccb27c16a285bcbd1077a706
18:05 Su-Shee ZoffixW: let me first actually HAVE Bailador :)
18:05 MadcapJake would be an easy PR to fix :) though then it would need to offer a deprecated content_type for the time being.
18:06 Su-Shee ZoffixW: why now false instead of nul?
18:06 Su-Shee MadcapJake: I'm not going to put any effort into Bailador, I just need something until either Web::Machine or Mojolicious is ported to perl 6 or both.
18:07 Su-Shee I just want to see if it's actually feasable to actually have perl 6 stuff somewhere in production..
18:07 tony-o Su-Shee: hiker is close to mojo in syntax, it's not as solid (yet) but i am trying to not get stuck in just duplicating functionality
18:07 ilbot3 joined #perl6
18:07 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!
18:07 MadcapJake ZoffixW: a few glances at Bailador codebase and I'm not really seeing how text/html is the default (I was trying to see how easy it would be to add a means for changing the default)
18:07 tony-o after going through some catalyst project stuff, it has elements from there too
18:08 ZoffixW m: say False.defined ?? 'yeah' !! 'nah'
18:08 camelia rakudo-moar e39ce3: OUTPUT«yeah␤»
18:08 jdv79 mojo would be excellent
18:08 Su-Shee tony-o: ok, it's out. never ever anything even remotely catalyst EVER again. I'm waiting for mojo.
18:08 ZoffixW Su-Shee, hm... Actually, that might be wrong. I looked at the content type but not whether it got rendered. The docs do say Nil, but when I had Nil, I was getting warnings in the log, so I changed it, but I think False doesn't work and it should be Nil
18:09 tony-o Su-Shee: it does autoloading for routes, unlike mojo - that's the similarity. lol
18:09 Su-Shee I want the simplicity of mojolicious and its code, just in perl 6. nothing MORE, nothing cooler.
18:09 tony-o why not just use mojo, if you want nothing but mojo
18:09 lizmat And another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016​/05/17/2016-20-packaging-progress/
18:09 Su-Shee tony-o: as I just said, I'm trying to see if it's feasable to use something in perl 6 in production. at the moment everything IS mojo.
18:10 ZoffixW MadcapJake, Bailador::App has immutable $.context that is Bailador::Context that creates a Proxy for each request and that proxy has default text/html for content type
18:10 Su-Shee tony-o: I'm trying every 6 months for a decade now. it's time again.
18:10 tony-o well, i'd ask you not dismiss hiker simply because it has one element of catalyst in it - i find mojo's route handling rather clunky
18:11 dalek gtk-simple: 28bad1f | RabidGravy++ | lib/GTK/Simple.pm6:
18:11 dalek gtk-simple: Alter Switch creation_method so it works
18:11 dalek gtk-simple:
18:11 dalek gtk-simple: I don't think it should actually be a descendent of ToggleButton
18:11 dalek gtk-simple: it doesn't need the label, so will probably redo later
18:11 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/28bad1f44c
18:11 ZoffixW MadcapJake, https://github.com/ufobat/Bailador/bl​ob/master/lib/Bailador/Context.pm#L18 and here https://github.com/ufobat/Bailador/​blob/master/lib/Bailador/App.pm#L81
18:11 MadcapJake ZoffixW: thanks!
18:12 Su-Shee tony-o: and I utterly despise catalyst after working with it so everything saying "it's like in catalyst": no.
18:12 ZoffixW Su-Shee, FWIW, my recent attempt to have perl6.party served by Bailador resulted in utter failure: http://irclog.perlgeek.de/p​erl6/2016-05-08#i_12449184
18:12 Su-Shee ZoffixW: *sigh*
18:12 MadcapJake woah cloning url just moved on github O_O
18:12 tony-o suit yourself
18:13 ZoffixW MadcapJake, yeah, it's annoying :(
18:13 Su-Shee tony-o: yes. I'm trying. ;)
18:13 MadcapJake isn't one of the catalyst authors a regular in here?
18:13 Su-Shee MadcapJake: sure, mst is around and I thought sri was too..
18:14 tony-o i'm curious what pain you had with catalyst that was so bad that auto module loading is a deal breaker
18:14 lizmat afk&
18:14 ZoffixW sri, decided to cut await themselves from Perl 6 entirely
18:16 jjido_ joined #perl6
18:16 iH2O joined #perl6
18:17 Su-Shee tony-o: clunkiless, difficulties to actually get behind the magic and see what's going on, ugly syntax, utterly non-lightweight or elegant, lack of "folklore" (best practices, articles actually showing great style, ability to google and research a problem), horrible irc channel, the entire thing works so completely different from any other web framework I used (I used 20 or so) that I can't really transfer experience..
18:17 iH2O left #perl6
18:17 Su-Shee tony-o: outdated docs which explain five tons of DBIC but no modern, contemporary webstuff...
18:17 Su-Shee tony-o: enough?
18:18 tony-o ah, well the syntax is closer to mojo and i'm more than happy to update docs and develop best practices if the thing starts getting used
18:18 Su-Shee ZoffixW: understandable.
18:18 tony-o Su-Shee: more than enough :-)
18:18 mst Su-Shee: you keep saying this, I keep asking what you'd like as an example for contemporary webstuff, you keep not answering me and then later insulting catalyst some more
18:19 jdv79 ZoffixW: what about sri?
18:19 mst it's kinda disappointing that you keep telling me everything's wrong but won't explain what 'not wrong' would even look like
18:19 Su-Shee mst: as you know, I gave up on catalyst, never use it again and threw it all out and ported things to mojolicious.
18:19 Su-Shee mst: oh, yes you said you'd wanted to show me a thing with elegant catalyst and angular I think..
18:20 mst also, I don't remember even seeing you in the IRC channel
18:20 ZoffixW jdv79, what about what?
18:20 mst I'll admit it's a bit o a bugger to learn though
18:20 Su-Shee mst: also, we had this discussion 20 times already and I fail to make myself understood anyways.
18:20 jdv79 you said something that didn't make sense to me
18:20 jdv79 14:14:17 < ZoffixW> sri, decided to cut await themselves from Perl 6 entirely
18:21 ZoffixW [14:15:18] <Su-Shee> MadcapJake: sure, mst is around and I thought sri was too..
18:21 tony-o MadcapJake: you can now view users' profiles on modules.zef.pm - you can click the author (as long as it's not: 'Not in meta'
18:21 mst unfortunately, the things that make catalyst so much more powerful for large scale apps are also things I've never figured out how to teach easily
18:21 CIAvash jdv79: http://irclog.perlgeek.de/p​erl6/2016-01-08#i_11853271
18:21 Su-Shee mst: yes and I see no reason anymore to learn more :(
18:21 Su-Shee mst: well I now have a large scale app in mojolicious..
18:21 Su-Shee mst: all is good.
18:21 ZoffixW CIAvash++
18:21 mst Su-Shee: have you got as far as re-using code between controllers via roles yet?
18:22 MadcapJake tony-o: COOOL!
18:22 Su-Shee mst: I threw all catalyst out. we don't have any catalyst anymore but in three old applications. I stopped using it a year ago.
18:22 mst Su-Shee: no, I mean, in Mojolicious
18:22 mst or do you just copy and paste between files?
18:23 MadcapJake tony-o: how are you figuring author out?
18:23 Su-Shee mst: are you setting a trap that I walk right into the wrong answer so you can yell at me? ;) the question suggests that. ;)
18:23 tony-o MadcapJake: from the author field in the meta
18:24 mst Su-Shee: no, I'm trying to guesstimate how much code re-use you're tdoing and how, because 'large scale' is a variable concept
18:24 tony-o Su-Shee: doubtful, he seems interested in making things better
18:24 Su-Shee tony-o: I know mst very well and we had this discussion 20 times already.
18:25 mst but we haven't had it since you ended up with large mojo apps and I was trying to get a feel for the current state
18:25 MadcapJake tony-o: but the META6 spec says it should be an "authors" key with an array of author strings
18:25 mst if I was trying to set a trap for you, I'd use a bear trap with kitten pics as bait,much less hassle
18:25 * MadcapJake off to appointment
18:25 tony-o i can see his side of that as well, it's frustrating to hear "it's outdated and sucks" and then not know what you can do to improve upon it
18:25 ZoffixW lizmat++ # good weekly
18:26 tony-o i also don't have the whole story, you guys may have discussed that in the past.
18:26 Su-Shee tony-o: I didn't say it's outdated, I said the docs aren't explaining contemporary stuff. feature-wise, it can do to my knowledge everything what is nice to have these days.
18:27 mst and then I ask "what would contemporary stuff be then" and then I never get an answer
18:28 mst also it would help if you could stop blaming DBIC for riba going insane
18:28 ZoffixW heh
18:28 tony-o riba?
18:28 ZoffixW riba sushi
18:28 Su-Shee mst: I don't even know how to answer your question because there's more than just roles to do code re-use. I toyed with different ways and haven't decided on one yet because I haven't decided on weighting between controller and model in many cases yet.
18:28 mst Su-Shee: fair enough
18:29 mst well, usually, there's roles, or there's superclasses, which are usually just a way to emulate roles in inferior languages
18:29 Su-Shee mst: I told you at least three examples of contemporary stuff and I did ONLY say that the docs explain DBIC in details instead of it. I didn't say ANYTHING just now about DBIC itself or riba.
18:29 mst I'm just interested in when you get to 30 or 40 controllers how much the routing table gets ridiculous
18:29 mst esp. if there are multiple controllers with the same shape
18:30 ZoffixW 40 controllers :o
18:30 mst Su-Shee: yeah, you said 'DBIC instead of X', lots of contemporary stuff still has an SQL database behind it, 'DBIC as well as X' would've been reasonable
18:30 Su-Shee mst: yes, and? I simply do not have made up my mind yet. that is really all.
18:30 Su-Shee mst: *sigh* ok. you are right.
18:31 Su-Shee I'm sorry, I'm just too unexperienced to deal with catalyst, so I gave up too early. I also don't read docs properly so it's my fault.
18:31 mst ...
18:31 Su-Shee to shorten this and make it all easier.
18:32 mst maybe if you could just say "I didn't get the hang of it and didn't find examples that worked for me"
18:32 Su-Shee also, I'm probably too ignorant for roles and will therefore screw up my mojo app as well. it'll be shitty.
18:32 mst instead of this usual cycle of raging about how awful it is
18:32 mst then telling me you already told me how to fix it but still not giving me any suggestions
18:32 Su-Shee mst: somebody asked me specifically what caused me pain. I did answer that.
18:32 mst then going emo when I get annoyed at you being a dick about it
18:32 mst yaeh, try answering it with a little sympathy for the authors maybe
18:32 Su-Shee mst: I already told you some time ago. more than once.
18:33 tony-o guys ..
18:33 Su-Shee I'm not a guy.
18:33 tony-o people in the midwest refer to more than one person as 'guys'
18:33 tony-o i'm not insinuating you're a man
18:33 mst it's standard english usage, I know. Su-Shee still hates it.
18:33 mst you get used to it
18:34 Su-Shee ok, I'm going to do something else now.
18:34 Su-Shee left #perl6
18:34 tony-o mspo: now with current year for copyright
18:35 mst tony-o: moral of the story: don't ask su-shee about catalyst
18:35 jjido_ joined #perl6
18:35 mspo tony-o: nice
18:35 jdv79 oh wow.  i just realized i thought Su-Shee was Shimmerfairy this whole time.
18:36 mspo tony-o: I'm convinced that this page is much more up to date :)
18:36 tony-o mst: i really want some feedback on hiker :-p
18:36 tony-o jdv79: really?
18:36 tony-o oh, misread that.
18:36 mspo tony-o: is there a way to browse all modules or similar?
18:37 tony-o mspo: once i paginate search you can see them all from the main 'modules' page
18:37 jdv79 anyway, so i guess a p6 port of mojo has even less of a chance of happening now
18:37 tony-o jdv79: why is that?
18:37 jdv79 since sri bounced outta here
18:38 mspo now as in since that time sri rate quit from here?
18:38 mspo or did he do it again in the last six months or os
18:38 tony-o ah
18:38 jdv79 looks like january
18:38 tony-o jdv79: well, again, i'd be happy to have input on: https://github.com/tony-o/perl6-hiker
18:38 tony-o and make it something people *want* to use
18:39 mspo I see where some of the confusion was with whta happened there
18:41 ianm joined #perl6
18:41 jdv79 does hicker sit on psgi or whatever its called in p6?
18:41 ZoffixW P6SGI
18:41 tony-o it sits on anything that uses HTTP::Server role
18:41 ZoffixW (what it's called; no idea about hiker)
18:41 tony-o and on top of HTTP::Server::Router
18:42 CIAvash lizmat++
18:45 jdv79 i haven't used mojo in a real way yet but it seems well thought out (async UA, job queue, ::Lite, websocket support, low on deps, etc...).
18:46 abraxxa joined #perl6
18:46 jdv79 i'd be looking for things like that maybe in a p6 web suite.
18:47 tony-o jdv79: what do you mean by async ua?
18:47 abraxxa joined #perl6
18:48 jdv79 a non blocking UA.  less of a thing in p6 but in p5 i can see that being useful.
18:49 tony-o well, i think i have one of those in hiker :-)
18:49 jdv79 just the fact that there is a UA in the dist suggests the author(s) were thinking more completely about the problem domain.
18:49 jdv79 nice
18:49 itaipu joined #perl6
18:53 dalek modules.perl6.org: 2c79a16 | (Zoffix Znet)++ | public/js/main.js:
18:53 dalek modules.perl6.org: Sort N/A `Updated` dates as oldest, not newest
18:53 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/2c79a1623e
18:54 ZoffixW kaare_, all done ^. Should be live on the site in 0-2 hours
18:56 mspo mojo is really great
18:57 tony-o agreed, i'm like a lot of things about catalyst but it doesn't have a dinosaur farting rainbows at me when it doesn't do what i expect
18:57 ZoffixW :D
18:57 RabidGravy is there any reason in GTK::Simple that .show is only implemented for ::WIndow and not all Widgets?
18:58 mspo I f'ing love how mojo can be a cgi script, psgi, fcgi, or stand alone http
18:58 mspo the whole helper + under setup is really sweet (speaking of routing features)
18:59 tony-o mspo: MadcapJake: the main module listing is no paginated so you can scroll through *all* of the modules now
19:00 mspo serverless sessions via sha256
19:00 mspo builtin csrf
19:00 mspo anyway, mojo is good :)
19:00 dha joined #perl6
19:00 RabidGravy there there
19:00 mspo tony-o: nice
19:01 dha where where?
19:01 sno joined #perl6
19:02 ZoffixW Plus, it handles RFC 2324 :)
19:02 ZoffixW https://github.com/kraih/mojo/blob/ma​ster/lib/Mojo/Message/Response.pm#L50
19:03 tony-o arguably the *most* important rfc
19:03 mr-foobar joined #perl6
19:04 nine mspo: is there any web framework that can't be used as cgi script, psgi, fcgi and stand alone http?
19:05 ZoffixW Bailador? :D
19:05 mst if it's PSGI, it can already do all of those
19:05 ZoffixW Ah
19:05 ZoffixW Never mind then.
19:05 mst Web::Simple and Dancer both rely on this
19:05 mst ZoffixW: we were talking perl5, AFAIK
19:05 mspo nine: I don't know
19:06 mst I think the last one of note that couldn't was Maypole
19:06 mst which came before Catalyst
19:06 mspo nine: it impressed me :)
19:06 kurahaupo joined #perl6
19:08 AlexDaniel has anybody thought about building rakudo for every single commit, so that you can quickly run git bisect?
19:09 hoelzro AlexDaniel: I usually keep a rakudo around for each release for the past year or so
19:09 hoelzro gives me some milestones to give bisect a headstart
19:09 moritz AlexDaniel: I know that libreoffice does that (they call it "binary bisect")
19:09 moritz ... though not with rakudo :-)
19:10 AlexDaniel hmm how many commits are there since the first official release
19:10 perlpilot AlexDaniel: Which release is the first official one?
19:10 hoelzro 984 since 2015.12
19:10 AlexDaniel well I mean v6.c
19:10 hoelzro (if you count that)
19:11 [Coke] AlexDaniel: four steps left here in your bisect.
19:11 AlexDaniel just 984! Come on. Will take a couple of days to get done on my machine
19:11 [Coke] 2015.12 was the first release that targetted 6.c
19:12 nine mspo: that sounds like "Perl 6 supports variables of different names! It impresses me" :)
19:12 AlexDaniel [Coke]: oh. I actually got stuck with some “The following untracked working tree files would be overwritten by checkout” errors :(
19:12 moritz lizmat++ # https://p6weekly.wordpress.com/2016​/05/17/2016-20-packaging-progress/
19:12 mspo nine: I can only speak for me
19:12 mspo nine: giving what I say any weight is up to you
19:12 AlexDaniel [Coke]: in other words, I have no idea how to use git bisect with rakudo
19:13 moritz you might need a git clean -xdf # attention, deletes files
19:13 [Coke] alexdaniel;if you're rebuilding nqp & moar & rakudo each time, you need to git clean nqp & moar each time you build rakudo so it's not trying to use an inappropriate Makefile
19:14 [Coke] and also rm -rf ./install each time
19:14 [Coke] (then you get the recommended nqp/moar version at each commit of rakudo)
19:14 [Coke] Bisecting: 7 revisions left to test after this (roughly 3 steps)
19:14 dha lizmat - typo in https://p6weekly.wordpress.com/2016​/05/17/2016-20-packaging-progress/ - DrForr is "Jeff" not "Geoff"
19:15 [Coke] (I ended up just removing the offending files it was talking about)
19:15 AlexDaniel I figured out the rm -rf ./install part and git clean -xdf also. Same error
19:15 AlexDaniel it whines about tools/build/install-jvm-runner.pl :/
19:15 [Coke] AlexDaniel: did you (cd nqp && git clean -xdf) ?
19:15 AlexDaniel oh
19:15 [Coke] yes, that's nqp, not rakudo
19:16 AlexDaniel thanks!
19:17 [Coke] note that moar could also need the same treatment. (but hasn't seemed to yet)
19:17 hoelzro if you're cleaning full each time, using ccache for building Moar makes a *huge* difference
19:18 perlpilot AlexDaniel: do you believe that bisects will be common in the future?
19:18 hoelzro there's also no reason you couldn't keep built Moars/NQPs around if NQP_REVISION has been seen before
19:18 [Coke] hoelzro: yah, that's work, though.
19:19 [Coke] if you only have a dozen revisions... eh.
19:19 [Coke] for automation, though, yes please.
19:19 hoelzro yeah, it's only helpful for a large range of revisions
19:19 ZoffixW joined #perl6
19:20 AlexDaniel perlpilot: yes
19:20 hoelzro it's definitely work - work I haven't gotten around to doing myself ;)
19:20 hoelzro the ccache thing is pretty quick and easy
19:21 [Coke] hoelzro: I used it all the time on parrot, but moarvm is fast enough I never bothered.
19:21 [Coke] (havingn switched hardware many times over the last 12 years or so)
19:22 moritz the slow thing is compiling rakudo's setting, and maybe the multi-staged NQP build
19:22 moritz ccache doesn't help at all with either
19:22 hoelzro yeah
19:22 hoelzro it shaves a few minutes off of a complex bisect is all
19:22 hoelzro something like 1000 commits
19:23 [Coke] mmm.
19:23 ZoffixW Does compiling the setting benefit a lot from a ton of available cores?
19:23 [Coke] Bisecting: 0 revisions left to test after this (roughly 1 step)
19:24 [Coke] oh. and this looks super suspicious.
19:24 hoelzro ZoffixW: sadly, I don't think so
19:24 psch ZoffixW: setting compilation is one process
19:25 ZoffixW Ah, too bad.
19:25 ZoffixW I could've spun up my 20-core linode
19:25 hoelzro [Coke]: I think the current step is counted in the "roughly 1 step" bit
19:25 [Coke] oh, it's not the one I thought it was. Here's the commit that changed AlexDaniel's behavior: https://github.com/rakudo/rakudo/commit/​6d120cab6d0bf55a3c96fd3bd9c2e841e7eb99b0
19:26 [Coke] "Remove almost all push-exactly implementations"
19:26 psch ah, that's the .map: { ...; last } thing right?
19:27 AlexDaniel .grep, yes
19:27 psch right
19:27 AlexDaniel m: say ^∞ .grep(* %% 2).map: { last if $++ > 10; $_ }
19:27 camelia rakudo-moar e39ce3: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
19:27 AlexDaniel star: say ^∞ .grep(* %% 2).map: { last if $++ > 10; $_ }
19:27 camelia star-m 2016.01: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
19:27 AlexDaniel no, not that one
19:27 AlexDaniel star: say ^∞ .map: { last if $++ > 10; $_ }
19:27 camelia star-m 2016.01: OUTPUT«(...)␤»
19:27 ZoffixW m: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; $_ }
19:27 camelia rakudo-moar e39ce3: OUTPUT«(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 …»
19:27 ZoffixW star: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; $_ }
19:27 camelia star-m 2016.01: OUTPUT«(2 4 6 8 10 12 14 16 18 20)␤»
19:27 AlexDaniel that one, yeah
19:28 psch m: say ^∞ .grep: { last if $++ > 10; $_ }
19:28 camelia rakudo-moar e39ce3: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 …»
19:28 [Coke] so if we didn't fail any stresstests it wasn't a 6.c-breaking change, but we should decide which of those behaviors is correct.
19:29 psch m: say ^∞ .grep: { state $x; say $x; last if $x++ > 10; }
19:29 camelia rakudo-moar e39ce3: OUTPUT«(Any)␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤1​3␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤​27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40​␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52…»
19:29 psch m: ^∞ .grep: { state $x; say $x; last if $x++ > 10; }
19:29 camelia rakudo-moar e39ce3: OUTPUT«(Any)␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤»
19:30 AlexDaniel m: say 1000×5÷60÷24 # so I've just measured, a full build from scratch takes less than 5 minutes on my machine
19:30 camelia rakudo-moar e39ce3: OUTPUT«3.472222␤»
19:30 AlexDaniel 4 days for a thousand commits
19:30 psch m: say 1000.polymod(24, 60)
19:30 AlexDaniel I think I can handle that
19:30 camelia rakudo-moar e39ce3: OUTPUT«(16 41 0)␤»
19:31 * psch doesn't *actually* understand polymod
19:32 AlexDaniel m: say 5000.polymod(60, 24)
19:32 camelia rakudo-moar e39ce3: OUTPUT«(20 11 3)␤»
19:32 AlexDaniel m: say 5000.polymod(60, 24) Z <minutes hours days>
19:32 camelia rakudo-moar e39ce3: OUTPUT«((20 minutes) (11 hours) (3 days))␤»
19:33 psch oh
19:33 psch ...the order of args feels backwards
19:33 AlexDaniel psch: I don't understand it too, that's why I always just copy that example from http://doc.perl6.org/routine/polymod
19:35 ZoffixW Damn. Looks like .polymod can make my Number::Denominate A LOT smaller :(
19:36 ZoffixW And looks like a good article material \o/
19:36 perlpilot ZoffixW++
19:39 Ven joined #perl6
19:44 TEttinger joined #perl6
19:47 pyrimidine joined #perl6
19:47 [Coke] ... dammit, I have a 20 line helper script in perl6 that that will reduce to about 10 lines. :)
19:48 timotimo sorry about that
19:54 moritz #sorrynotsorry ?
19:57 timotimo mhm
20:06 dalek doc: 90918d3 | (Jan-Olof Hendig)++ | doc/Type/ (2 files):
20:06 dalek doc: Fixed typo and another broken link
20:06 dalek doc: review: https://github.com/perl6/doc/commit/90918d311f
20:16 skids I think polymod's order of args is very logical.  However, I have had some golfs where I wish it were backwards or more often where the results would be backwards.
20:17 timotimo skids: you can build a polydom that reverses your arguments :)
20:17 skids And the results.
20:18 yqt joined #perl6
20:18 timotimo ah, yeah, of course
20:19 skids I remember there was some language that supported some sort of "under" combinator such that "2 + 3 under /" was 1/(1/2+1/3)
20:21 timotimo right, i heard of that, too
20:21 timotimo was it J perhaps?
20:22 skids My memory is as bad as my concentration these days.  Probably one is the cause of the other :-)
20:23 cdg joined #perl6
20:25 * geekosaur was thinking it sounded like an APL / J type thing
20:25 ianm joined #perl6
20:26 mst sounds like J yes
20:26 mst <3 that
20:27 dha joined #perl6
20:28 [Coke] m: 2+3 R/ 1
20:28 camelia rakudo-moar e39ce3: OUTPUT«WARNINGS for /tmp/b_jkjijkM_:␤Useless use of "+" in expression "2+3 R/" in sink context (line 1)␤»
20:28 [Coke] m: say 2+3 R/ 1
20:28 camelia rakudo-moar e39ce3: OUTPUT«2.333333␤»
20:29 [Coke] ah, precedence, my old friend...
20:29 khw joined #perl6
20:32 MadcapJake Zoffix: is it normal that a fresh clone of Bailador has tons of errors
20:33 * moritz hopes not
20:34 MadcapJake let me rephrase, s/errors/test failures/
20:38 sortiz joined #perl6
20:39 ZoffixMobile joined #perl6
20:40 ZoffixMobile MadcapJake, weren't any failures when I installed it last week.
20:40 abraxxa joined #perl6
20:42 sortiz \o #perl6
20:42 RabidGravy harr!
20:42 MadcapJake ZoffixMobile: yeah a freshly forked Bailador and I'm getting tons of failed tests
20:43 ZoffixMobile *shrug*
20:43 MadcapJake oh well, moving on then, should be doing something more productive I suppose :)
20:43 ugexe https://github.com/ufobat/Bailador/co​mpare/9e9600bb5cbf...abb3a40aa095#dif​f-a0fe77cc705ebed45311f09632337ad2R13
20:46 MadcapJake it's more tests than just that: http://hastebin.com/eyezaweter.txt
20:48 MadcapJake It could be because I'm not including the lib dir, how do I do that with prove?
20:48 MadcapJake Oh looks like `prove --exec "perl6 -Ilib" -r t` fixes a few of them
20:48 willthechill joined #perl6
20:50 ugexe thats why it fails on blead anyway. 20 days ago it stopped working on 'rakudobrew build moar v6.c'
20:51 MadcapJake using -Ilib removed all but those caused by one error: "Internal error: zeroed target thread ID in work pass" in 01-route-existence.t
20:53 dj_goku joined #perl6
20:53 dj_goku joined #perl6
20:55 sortiz MadcapJake, that error intermittent, and not Bailador related. Anyway my install attempt fails t/05-post-content with "Could not find symbol '&dispatch_request' in block <unit> at t/05-post-content.t line 13"
20:57 Ven joined #perl6
20:58 timotimo yo MadcapJake, did you end up running my graph script?
21:02 MadcapJake timotimo: yeah it's amazing!
21:02 timotimo cool!
21:03 timotimo the decision to have nodes just be strings is a pretty big PITA when trying to make more things, tbh
21:03 timotimo like, want to build an A*? first build a node-name-to-coordinate function >_>
21:03 MadcapJake I'm now using a similar Hash-based approach and then I'm having Nodes be a class with some convenience methods.  It really has cleaned up the code quite a bit
21:04 timotimo the code == your code?
21:04 timotimo don't forget to build a WHICH for your Node class so you can eqv them
21:05 MadcapJake yeah, I've rewritten this thing like 4 times but now I'm getting close to solving this.  It also supports "rendering" to a dot file throughout breadth-first-search algo so I can visualize what's going on
21:06 timotimo no need to actually traverse the graph breadth-first-like
21:06 MadcapJake much appreciated for the graphviz tip and also your edges map (much better than traversing an adjacency matrix
21:06 timotimo you can really just spit out all nodes nad then all edges
21:06 timotimo adjecency matrix isn't bad; it's very good for checks "are those two nodes connected?", but not terribly good for "give me all neighbours"
21:06 MadcapJake it's (or was) really slow doing that. that's why I'm looking for a simpler method
21:08 MadcapJake the BFS will allow me to traverse from the "root" (here being just any node that initiates the BFS) and stop as soon as I reach the ending node
21:10 MadcapJake so I only traverse just as needed and it does it in a "tiered" fashion wherein it adds to the queue everything from the next layer of neighbors so it *should* properly find the first closest path...I think :P
21:11 timotimo ah
21:11 timotimo yeah, it will (if and only if the graph is unweighted)
21:12 MadcapJake right, that is the kicker that makes this work
21:12 jnthn ARe you doing shortest path to root?
21:13 timotimo that's what he's doing currently, yeah
21:13 jnthn Yeah, the MoarVM heap analysis app uses that: https://github.com/jnthn/p6-app-moar​vm-heapanalyzer/blob/master/lib/App/​MoarVM/HeapAnalyzer/Model.pm6#L272 :)
21:14 MadcapJake haha! amazing!
21:14 timotimo its representation is different from an adjacency matrix, too
21:15 jnthn Yeah, no idea how relevant the impl I have there is to what you're doing. :)
21:15 timotimo it's basically one array of nodes and one array of indices to other nodes, and each node has a "start of references" and "amount of references" thing for the other array
21:15 MadcapJake jnthn: it's very very similar
21:15 jnthn :)
21:15 jnthn If speed/memory are an issue, mine has a few tricks
21:16 timotimo so it might be ->B,->C,->D,->A,->B,->C for the references and then for the nodes it could be A,0,3;B,4,1;C,5,1;D,6,1 or something
21:16 jnthn (Uses native/packed arrays)
21:17 jnthn The graphs in heap snapshots have well into the millions of edges. :)
21:18 MadcapJake wow! what's a packed array? I'm using the native arrays anywhere possible (not in Hash keys)
21:18 timotimo a native array is a packed array
21:18 MadcapJake oh xD one in the same, eh?
21:19 dalek gtk-simple: 1716816 | RabidGravy++ | lib/GTK/Simple.pm6:
21:19 dalek gtk-simple: Add the no-show-all accessors
21:19 dalek gtk-simple:
21:19 dalek gtk-simple: Move the window_new and set_window_title so only defining once
21:19 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/1716816aeb
21:19 dalek gtk-simple: a6b5b6e | RabidGravy++ | .gitignore:
21:19 dalek gtk-simple: Just ignore the precomp
21:19 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/a6b5b6e747
21:19 dalek gtk-simple: f855cc6 | RabidGravy++ | lib/GTK/Simple.pm6:
21:19 dalek gtk-simple: move the .show() method into Widget
21:19 dalek gtk-simple:
21:19 dalek gtk-simple: Add the .hide method
21:19 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/f855cc610f
21:19 dalek gtk-simple: 73019f8 | RabidGravy++ | lib/GTK/Simple.pm6:
21:19 dalek gtk-simple: All Widgets can be deleted
21:19 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/73019f8da8
21:19 timotimo i wonder if those reports should go into #perl6-dev, too?
21:19 psch is gtk-simple special somehow?
21:20 MadcapJake it's in Perl 6 org
21:20 psch 'cause i think having every module report here and in #perl6-dev would be kind of insane eventually
21:20 psch ah, that explains why it happens here at least
21:20 timotimo right
21:20 timotimo maybe we want to fully disable reports, too, for that
21:20 timotimo on the other hand
21:20 MadcapJake Maybe there should be a #perl6-modules for things like DBIish, gtk-simple, etc
21:21 timotimo it'd be fantastic if more people contributed to it :)
21:22 RabidGravy I'm going to spend tomorrow adding more widgets, need combo box, status bar and a couple of others for my plans for world domination
21:22 teatime reporting modules, which have wide audience/interest, here, would mirror #perl.  and then you can report core to #p6dev per current config.
21:22 MadcapJake RabidGravy++ # so glad to see some love going into that module
21:22 timotimo RabidGravy: thank you very much for caring at least a little bit :)
21:22 timotimo we also don't have tests *cough*
21:22 timotimo but i don't really know how to test that stuff properly
21:23 MadcapJake xprop maybe?
21:23 teatime might have the advantage of making it even easier for people interested in both (or only one) to keep them separate, too, timotimo
21:23 RabidGravy yeah, the examples are somewhat like test surrogates
21:23 timotimo yeah, they aren't very good, either
21:24 timotimo MadcapJake: thing is i don't want to pop up a bunch of windows for the user when they're just installing some random modules and GTK::Simple happens to be a dependency
21:24 MadcapJake xprop and xdotool could be used to test GTK stuff
21:24 MadcapJake timotimo: oh yeah that's a very good point :)
21:25 timotimo i mean, we can use xvnc for testing without popping up something user-visible
21:25 timotimo but it's wobbly
21:26 timotimo also has to have a window manager running, doesn't matter which one
21:26 MadcapJake looks like python has https://fedorahosted.org/dogtail/ for GUI testing GTK
21:26 timotimo except it mustn't be xwm (or what it's called) because you need to click to place windows
21:26 ocbtec joined #perl6
21:27 psch ...writing tests with Inline::Python would probably be a first :)
21:27 MadcapJake (not sure if dogtail pops up a window or not though)
21:27 MadcapJake psch: I mean moreso as a model for writing something in Perl 6, but you could do that xD
21:30 * MadcapJake wonders if other GTK libraries in other languages even bother with user-side testing of GUI elements
21:30 timotimo *shrugs*
21:32 RabidGravy a lot more testing could be done without actually displaying the application window
21:32 RabidGravy without any contrivances
21:33 MadcapJake I would say that doing some accessibility/usability testing is really more for GTK development, GTK::Simple development, or per-project, but not something that should be done on installation.
21:34 timotimo we'd need *some* kind of exercise for the binding to make sure newer gtk releases don't tickle some bug in it
21:34 timotimo or different systems
21:34 timotimo what if we have an int32 somewhere where it really has to be an int64 and only on some systems it ends up filling the upper 32bit with garbage?
21:34 timotimo or something like that?
21:34 MadcapJake this is true, Gnome has been changing things like crazy lately, 3.20 has lots of CSS changes
21:35 RabidGravy yeah you could a lot of that without actually running the main application
21:35 MadcapJake if we really want to do GTK apps, we need at least some means of managing Glade, but moreso we need to do a full GObject Introspection module
21:38 * MadcapJake has a Gnome Shell extension that uses xprop
21:38 MadcapJake it's super annoying as it gets stuck in xprop cursor mode all the time...
21:41 cpage_ joined #perl6
21:45 pmurias_ joined #perl6
21:46 _28_ria joined #perl6
21:46 timotimo haha, damn
21:47 huggable joined #perl6
21:48 jast hi there
21:48 jast how goes the dijkstra implementation?
21:49 MadcapJake jast: Not good :) I actually ended up going breadth-first-search because my nodes were unweighted (and I couldn't figure out how to account for that)
21:49 jast if you have lots of connections, dijkstra isn't going to be very smart about it
21:50 jast you can use something like A* if you have some kind of heuristic (for example, an air distance for graph nodes representing places)
21:50 jast here's what dijkstra does (the green node is the target node): https://en.wikipedia.org/wiki/Dijkstra's_algor​ithm#/media/File:Dijkstras_progress_animation.gif
21:51 jast that's a lot of nodes being looked at
21:51 jast and here's what A* does: https://en.wikipedia.org/wiki/A*_search_alg​orithm#/media/File:Astar_progress_animation.gif
21:51 MadcapJake yeah I wish I could do A* but there's no way to tell which way is the right way in my problem
21:51 firstdayonthejob joined #perl6
21:52 jast too bad
21:53 MadcapJake Here's how far I got with dijkstra's https://gist.github.com/MadcapJake​/efbcb2400c061c30fc9cb713a263c7c7
21:54 MadcapJake (which seemed to work for smaller graphs but was giving me a radius of -Inf for larger graphs)
21:58 jast one issue I'm seeing here is that you're using the "first" element from the set for the next iteration
21:59 timotimo ooooh
21:59 timotimo awesome
21:59 jast in a disconnected graph that can give you completely bogus results, and in a weighted graph you can get incorrect costs
21:59 MadcapJake jast: oh? what should i be using?
21:59 timotimo i just used unshift to push new nodes into the list of things to get
22:00 timotimo instead of push which i had before
22:00 timotimo and i'm shifting to get the next one
22:00 timotimo it gets a very amusing-looking result indeed!
22:00 jast generally the element with the lowest estimated cost
22:00 MadcapJake ohhh
22:00 timotimo MadcapJake: you should try that, and see what it ends up doing
22:01 jast which ensures (a) you use an element that is directly reachable from what you've looked at so far and (b) you don't accidentally try the worst path first
22:01 jast without weights the (b) bit doesn't matter
22:02 timotimo also the display code doesn't handle this case properly
22:03 jast what you're doing right now is starting with the very first node, build a path to some other node, remember that
22:04 jast then in the next iteration you pick a completely random node without actually checking that it's one of the nodes you already estimated before
22:04 teatime hrm, I need a really simple hash function myhash(Int $i, Str $s) that will return an Int 0..^$i for a given $s... does not need to be even a little cryptographically strong, etc.  Although two strings containing the same characters in different orders, as well as two different strings of the same length, should generally return different outputs.  and at least rough uniform distribution is desirable.
22:04 teatime I can't think of any other requirements.
22:04 jast and if you don't do that, the patch you get is quite spurious
22:05 teatime oh, and this algo would actually have to be implemented in shell (zsh)... so I really should not have asked here :)
22:05 jast another thing is that for an iterative implementation, a single @path isn't going to cut it
22:05 jast that will work if you happen to go through the nodes such that you immediately find the best path... but if you don't you may have to backtrack and explore a different path
22:05 jast hence, for each node you have to remember what you've found to be the shortest path to it so far
22:08 jast teatime: you can use something simple if you can assume that input strings will be more or less uniformly distributed... if not, grab a random mixing function somebody has come up with, and do a 'mod $i' when it's done
22:08 jast should be Good Enough(tm) for many application
22:14 timotimo cool, i fixed the thing
22:17 jast teatime: the really simple functions typically are of this form (pseudocode): hash=0; string.each char: hash = (X * hash + char) mod i
22:17 jast where X is a prime number
22:18 jast this is not ideal, especially for short strings... but you could do quite a bit worse
22:18 teatime ok, and looks like that will avoid hash('cba') == hash('abc')
22:19 teatime if I'm reading it right
22:19 jast it should, yes
22:19 teatime thx much, sir
22:20 jast another class of very well-known algs that avoid the same thing are cyclic checksums, based on polynomials, e.g. CRC32 and Adler32 (famously used in zlib)
22:20 ggoebel116 joined #perl6
22:20 jast they're not nearly as simple, though
22:21 hobbs teatime: do note that with that simplest algorithm, hash('abc'), hash('abd'), hash('abe'), etc. are consecutive values
22:22 hobbs which can be a real problem if you're doing something like hashing string values of consecutive numbers, and hoping for them not to go in consecutive bins :)
22:22 jast yeah, unlike with most of the more fancy algorithms, small changes at the end don't cause big changes in the hash value
22:23 jast and low bits in the input take a while to affect high bits in the output (as you build it up)
22:23 jast though that depends on the values of X and i
22:25 teatime hahainternet: conveniently, that does not break my use-case :)
22:25 hahainternet teatime: glad to hear it ;)
22:25 hobbs it's a good argument for using a slightly more robust hash even when you don't think you have any attackers, though. You never know when patterns in your data will do something weird
22:26 _28_ria joined #perl6
22:31 timotimo http://t.h8.lv/worst_pathfind_ever.png
22:31 jast not entirely sure what I'm seeing, but it does look... exploratory
22:32 timotimo yeah
22:32 timotimo i modified the code to visit the first of a nodes' neighbours immediately after the node, but only if it hasn't been visited yet
22:34 timotimo oh, and if a node has been visited before from another node, i won't touch it
22:35 willthechill joined #perl6
22:37 timotimo http://t.h8.lv/fuzzy_pathfind.png  -  after inserting a node into the queue, have a 20% chance to shuffle the whole queue
22:44 willthechill joined #perl6
22:55 BenGoldberg joined #perl6
23:02 jack_rabbit joined #perl6
23:03 cpage_ joined #perl6
23:05 rangerprice joined #perl6
23:07 rangerprice left #perl6
23:07 Sgeo joined #perl6
23:34 TEttinger how is secrets of grindia, timotimo?
23:50 dwarring joined #perl6
23:52 lizmat joined #perl6
23:54 Xliff joined #perl6
23:56 Xliff joined #perl6
23:59 Xliff ¯\_(ツ)_/¯
23:59 Xliff oops! Wrong channel! =) \o #perl6

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

Perl 6 | Reference Documentation | Rakudo