»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 kurahaupo_ left 00:03 sufrostico left, sufrosti1o left 00:05 sufrostico joined, sufrosti1o joined 00:06 |2701 left, |2701 joined, |2701 left, |2701 joined 00:07 kurahaupo` left 00:08 kurahaupo joined, kurahaupo left 00:10 Xliff left 00:11 BenGoldberg joined 00:18 Actualeyes left 00:22 BenGoldberg left 00:23 BenGoldberg joined 00:26 willthechill joined 00:27 pierre_ joined 00:36 xenowoolfy joined 00:39 xenowoolfy left 00:41 sufrosti1o left, Actualeyes joined, BenGoldberg left 00:42 sufrostico left 00:47 BenGoldberg joined
Zoffix teatime is tybalt :o 01:01
teatime there's some guy named mercutio in another channel 01:05
and I just couldn't resist any longer
Zoffix Oh, so you're not tybalt89 from #perl? 01:07
teatime correct, I am not.
Zoffix Ah :) He's a super l33t Perl 5 hax0r.... I thought he came to the Perl 6 side for a sec :)
teatime sorry to disappoint you :) 01:08
Zoffix Eh, at least now I know 'tybalt' is from Shakespear :P 01:09
nemo Zoffix: oh come on. you forgot that? Surely you watched the movie at least! ☺ 01:11
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
but I did enjoy being tybalt in 8th grade english class
also when we did the play 01:13
but mostly just in class
:)
01:16 itcharlie joined 01:22 aindilis joined 01:26 khw joined, BenGoldberg left 01:28 huggable left, huggable joined 01:31 yqt left 01:33 AlexDaniel left 01:40 finanalyst joined 01:47 ssotka left 01:49 molaf left 01:55 cpage_ joined 01:58 kid51 left 02:01 willthechill left, molaf joined 02:03 Sgeo_ left, Sgeo joined 02:04 noganex joined
MadcapJake is there syntax for deconstructing a pair? 02:04
timotimo pair is just like any other object. just have nameds for .key and .value in your signature bind 02:06
m: for @(:1foo, :2bar, :99whoa) -> (:key($foo), :value($bar)) { dd $foo; dd $bar }
camelia rakudo-moar e239f6: OUTPUT«Str $foo = "foo"␤Int $bar = 1␤Str $foo = "bar"␤Int $bar = 2␤Str $foo = "whoa"␤Int $bar = 99␤»
02:06 noganex_ left
MadcapJake cool, fat arrow format didn't work for some reason 02:08
m: for @(:1foo, :2bar, :99whoa) -> (key => $foo, value => $bar) { dd $foo; dd $bar }
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 Actualeyes left
timotimo oh, that's interesting 02:09
probably because it expects a type there
m: for @(:1foo, :2bar, :99whoa) -> (Str key => $foo, Any value => $bar) { dd $foo; dd $bar }
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
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␤»
MadcapJake m: for @(:1foo, :2bar, :99whoa) -> :('key' => $foo, 'value' => $bar) { dd $foo; dd $bar }
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␤»
sortiz Fat arrow works in signatures somewhere? 02:13
timotimo with quoted key is definitely not the right thing to do this :)
MadcapJake m: for @(:1foo, :2bar, :99whoa) -> :(key => $foo, value => $bar) { dd $foo; dd $bar }
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 $␤»
timotimo since that'll never be named parameter like
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␤»
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
sortiz Yes, but the signature is :$named 02:16
MadcapJake m: sub foo(named => $n) { say $n }; foo named => 'baz'
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
MadcapJake guess that's what I didn't get then xD 02:16
timotimo ah, so it doesn't work *there* either
that's fine, then
it's at least consistent 02:17
sortiz Ok, :)
timotimo i thought you could have => inside the signature
MadcapJake thanks sortiz & timotimo!
timotimo: I thought so too!
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!
timotimo and run the "grid" option?
MadcapJake haven't tried running it yet, I will do that in a bit
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…
timotimo and that's a --> arrow 02:21
sortiz Yep. That one. 02:22
02:25 Khisanth left 02:27 rindolf joined 02:39 Khisanth joined 02:50 obfusk left 02:56 obfusk joined
dalek Heuristic branch merge: pushed 30 commits to DBIish/data-sets by salortiz 02:56
02:57 zacts left 03:01 rindolf left 03:11 |2701 left 03:15 itcharlie left 03:16 astj left, rindolf joined, astj joined 03:27 molaf left 03:50 hotel joined, hotel_california left 04:04 hotel_california joined 04:05 hotel left 04:07 skids left 04:09 xiaomiao left 04:10 skids joined 04:11 pierre_ left 04:13 zacts joined, hotel joined 04:14 hotel_california left, xiaomiao joined 04:15 willthechill joined 04:16 skids left, hotel_california joined
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 hotel left
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 04:36 hotel_california left, hotel joined 04:39 buharin left 04:44 sno left 04:46 Cabanossi left, BenGoldberg left, jack_rabbit left 04:49 Cabanossi joined 04:52 CIAvash joined 04:53 buharin joined
teatime ok! so begins another day attempting to code stuff in p6 04:54
I never seem to get very far / make much progress :/ 04:55
04:57 khw left 05:21 mohae joined 05:24 mohae_ left 05:28 huggable left, huggable joined 05:34 araujo_ left 05:36 pierre_ joined 05:42 _dolmen_ joined, sortiz left 05:45 hotel_california joined 05:46 hotel left 06:07 zzzzzzzzz left 06:13 domidumont joined, sno joined
MadcapJake can you use match variables e.g., $0, $1 inside of subst or trans? 06:17
06:17 domidumont left 06:18 domidumont joined 06:19 hotel joined, hotel_california left
MadcapJake seems to work with subst but not with trans 06:21
06:21 _dolmen_ left
MadcapJake huh, no it's not working actually 06:22
m: "0 1 2 3 4".subst(/(\d)/, "N$0", :g).say
camelia rakudo-moar e239f6: OUTPUT«Use of Nil in string context in block <unit> at /tmp/ACejlZlfYp line 1␤N N N N N␤»
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␤»
MadcapJake m: "0 1 2 3 4".trans(/\d/ => "N$0").say
camelia rakudo-moar e239f6: OUTPUT«Use of Nil in string context in block <unit> at /tmp/XAuUbmFXFY line 1␤N N N N N␤»
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␤»
MadcapJake CIAvash: thanks! so I gotta use a block, eh?
teatime if you don't, you could only mean the $0 in scope when you made the method call
anything else would be insane :)
also, does trans work that way? that's weird, not what I expect 06:25
I suppose it does. 06:26
MadcapJake graphviz is neat but man I am constantly fighting syntax errors 06:28
(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";
camelia ( no output )
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
MadcapJake nice, that's quite clean looking 06:30
06:30 darutoko joined, grondilu joined 06:31 snarkyboojum joined 06:33 sno left 06:39 sno joined 06:41 snarkyboojum left
MadcapJake ok using -q2 and graphviz seems fine with it :) 06:41
06:48 _mg_ joined 06:49 rindolf left, jjido joined
moritz \o 06:51
I'm confused. Where on travis-ci.org/rakudo/rakudo/builds/130669288 can I find the build output? 06:52
or a link to the build output
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 06:54 hotel left 06:57 hotel joined
CIAvash moritz: each build job has build output apparently 06:57
06:58 hotel_california left
grondilu m: say 'N' <<~>> ^3 06:58
camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2)␤»
grondilu ^I'm surprised that works
moritz CIAvash: ah, so it was only the JVM jobs that failed
grondilu: why wouldn't it work?
grondilu because of different sizes
moritz m: say 'N' X~ ^3 06:59
camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2)␤»
moritz grondilu: well, <<op>> auto-extends
>>op<< doesn't
grondilu I thought what would have been acceptable was <<~<< in this case.
06:59 jjido left
moritz should also work 07:00
that only extends the LHS
m: say 'N' <<~<< ^3 07:01
camelia rakudo-moar e239f6: OUTPUT«(N0 N1 N2)␤»
07:02 _nadim joined
buharin hiho ;) 07:05
07:06 grondilu left 07:09 ssotka left
CIAvash moritz: Why are jvm builds for Mac in the 'Allowed Failures' list, but jvm builds for linux aren't? 07:11
moritz CIAvash: I have no idea 07:15
07:15 abraxxa joined 07:21 abraxxa left, abraxxa joined 07:26 finanalyst left 07:30 dakkar joined 07:34 ertgbfu joined
masak good morning, #perl6 07:39
teatime /me waves.
07:40 wamba left
moritz particles 07:41
07:42 spider-mario left 07:44 RabidGravy joined 07:46 rork joined
masak does a little bit of both, kinda 07:53
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 Actualeyes left, eyck left, eyck joined 07:56 dalek left 07:57 dalek joined, ChanServ sets mode: +v dalek 08:00 rork left 08:01 rork joined 08:02 Actualeyes joined 08:04 mohae left 08:06 pierre_ left, mohae joined 08:07 grondilu joined 08:10 pierre_ joined 08:12 dogbert17 left 08:16 wamba joined
stmuk "God does not play dice" 08:16
08:19 eyck left, eyck joined
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
CrAzYz_ Hello 08:21
08:31 hotel_california joined, CIAvash left
stmuk "God does not play bongo drums" 08:33
08:34 hotel left 08:35 CrAzYz_ left 08:38 CIAvash joined 08:46 espadrine joined 08:55 pierre_ left
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" 08:57
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:00
09:04 cognominal joined 09:17 pierre_ joined 09:19 snarkyboojum joined 09:20 xinming_ joined 09:23 espadrine_ joined, xinming left
huf iirc his point was that it behaves like itself 09:24
and there's no duality. we just dont have words that are accurate for things of that nature
i mean, does a slanted line have vertical-horizontal duality? :) 09:27
teatime hrm.
09:27 espadrine left
teatime is that a terrible analogy? 09:27
09:28 huggable left
teatime and that's an honest question :) 09:28
09:28 huggable joined 09:29 Actualeyes left
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:30
09:31 pierre_ left, araujo joined, araujo left, araujo joined, pierre_ joined
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:35 pierre_ left 09:36 pierre joined
huf masak: hmm. i remember a video lecture where he says what i wrote above 09:39
sortof
so *shrug*
maybe he said many things
perhaps he was like liszt
masak :)
fwiw, I've heard him says things like "it behaves like itself" too
say* 09:40
huf which reminds me, i havent checked the talk page of the liszt article on wiki in a while
perhaps there's a new hilarious development
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
huf: please don't be one of the unfortunate people who say "wiki" when they mean "Wikipedia" :P
huf ?
of course i mean wikipedia.
are you one of those unfortunate people who has problems with basic english? 09:42
masak :)
masak goes and does something productive instead
tadzik nooooo! 09:43
no productive!
We're losing him!
jnthn masak: Maybe write a blog? :D
huf comment on a daily mail article
masak strangles jnthn
jnthn: you need to make less mistakes like that! :P 09:44
_nadim Morning
masak good time-of-day, sir :) 09:45
jnthn :P 09:46
RabidGravy there is clearly only one "Wiki" c2.com/cgi/wiki - all the others should be qualified
masak what RabidGravy said 09:47
09:50 zakharyas left 09:53 pierre left 09:56 pierre joined, dustinm` left
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
09:59 mr-foobar joined 10:01 pierre left, TEttinger left
Zoffix That doesn't explain quantum eraser experiment :) 10:05
The whole thing is wacked. Particles going back in time as well as forward and interfering with itself 😂
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:06
10:10 pierre joined 10:11 stb joined 10:13 dustinm` joined 10:14 stb is now known as as 10:15 sno left
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:15
10:17 cognominal left
teatime grondilu: heh, do you feel like that statement paints Feynman in poor light? 10:18
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
grondilu I'm afraid I was trying to be funny but ended up being disrepectful.
teatime eh, I'm not being clear abuot what I mean either. but it's ok
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
since he famously stated that nobody really understand it.
10:35 mr-foobar left, pierre left 10:36 mr-foobar joined 10:37 telex left 10:38 telex joined 10:42 Actualeyes joined 10:43 dustinm` left 10:44 rindolf joined 10:49 sno joined, dustinm` joined
masak yes, maybe that was his main point 10:56
that it's about models, not about interpretations
and about accurate predictions, not about understanding
10:57 dalek left 10:58 dalek joined, ChanServ sets mode: +v dalek
RabidGravy gah, gptrixie runs awfully slowly on the raspberry pi 10:59
11:01 cdg joined
grondilu RabidGravy: everything runs terribly slowly on the pi. Realized it recently. 11:03
RabidGravy no JIT and less memory than most normal PCs 11:05
jnthn Probably lower memory bandwidth too
And smaller cache
timotimo i took the liberty to restart dalek after reducing the throttle bps a bit further 11:10
let's see if it still gets kicked for big commits
11:14 cdg left 11:20 kid51 joined 11:33 snarkyboojum left 11:36 dmc00 left 11:37 CIAvash left 11:43 |2701 joined 11:44 CIAvash joined, kid51 left 11:47 nadim joined 11:50 _nadim left 12:01 zakharyas joined 12:02 aries_liuxueyang left 12:24 nicqbot joined 12:34 aries_liuxueyang joined 12:41 sufrostico joined
buharin is thre some console perl course? 12:42
good
rjbs doc.perl6.org/language/5to6-perlfunc#exec 12:45
Is this really true, you can't exec from p6?
moritz you can, with nativecall
nemo can I assign `foo` to nativecall? ☺ 12:46
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
I just don't think anybody has done that yet :/ 12:48
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.
RabidGravy I accidentally did this morning
rjbs It came up because of a thing on p5p. I don't actually need it atm. :)
[Coke] ~~ to the rjbs-who-is-still-owed-a-meal!
rjbs :) 12:50
RabidGravy probably just point gptrixie at /usr/include/stdlib.h
12:52 ocbtec joined
perlpilot 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)
timotimo we shouldn't necessarily just keep that around 12:54
12:55 kaare_ joined
geekosaur just saying toat to me it makes sense for the POSIX specific stuff to live in the ecosystem instead of the core 12:55
12:56 s_kilk joined
perlpilot geekosaur: indeed. 12:56
12:56 sufrostico left, araujo_ joined
[Coke] oh, there are music nerds in this channel. Here's my kid's final project for (I think) music industry this year: 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
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:58 araujo_ left
[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
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 12:59
13:00 araujo__ joined, araujo left
[Coke] I think there might be a track of him making bass/vocal fry himself. but many trombone tracks, aye. 13:00
(recorded audio/video separately, recombined everything later.) 13:01
geekosaur used to play bass trombone...
13:01 Sgeo left 13:04 araujo_ left 13:06 hoelzro left 13:08 hoelzro joined 13:11 s_kilk left 13:12 araujo__ left 13:14 cognominal joined
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:16
diakopter Zoffix: I guess you could obfuscate and inline the anguish module in the victim's source code with a similar technique.. 13:18
Zoffix: another note: not all the Anguish characters appear invisible on the most popular browser (Chrome) on the most popular platform (Android) 13:20
13:20 molaf joined 13:23 njmurphy joined
[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
13:25 zakharyas left
[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:25
13:28 huggable left 13:33 CIAvash left
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:35
actually though i don't know if declaring a new module works from EVAL 13:37
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.
timo@schmand ~> perl6 -e 'use MONKEY-SEE-NO-EVAL; EVAL "use NativeCall"; say GLOBAL::.keys' 13:39
(NQPMatch NQPCursorRole HLL NativeCall QRegex NQPRegexMethod NQPCursor QAST NQPRegex)
^- leaky
13:39 lizmat joined
dalek rl6-most-wanted: b30d614 | titsuki++ | most-wanted/bindings.md:
Fix SDL2 link
13:47
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:50
I'm irrationally annoyed by that. 13:51
moritz feel free to wordsmith it to your satisfaction
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
I become more pedantic with each passing year... I'm beginning to think I should talk to a therapist about it :/
gregf_ hello 14:01
any reason why that module was named 'MONKED-SEE-NO-EVAL'
oops, typed it wrong.. 14:02
oh , its a pragma
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 :)
oh - monkeying. fair enough
14:04 skids joined 14:06 araujo joined, araujo left 14:11 CIAvash joined
gregf_ geekosaur: cheers 14:12
14:14 ZoffixW joined 14:17 jusafing joined
ZoffixW diakopter, but I don't need to obfuscate or inline the whole module: 14:18
m: sub prefix:<⁣> is tighter(&infix:<or>) is export {say "I'm in your code: $^a"}; ⁣my $credit_card = '3333-4444-4444-4444';
camelia rakudo-moar 280178: OUTPUT«I'm in your code: 3333-4444-4444-4444␤»
ZoffixW The only "tricky" part is importing the operator.
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
14:19 jcallen joined
masak by the way -- fun trick of the day: using a prefix op as a listop in order to loosen precedence 14:21
m: say -4 + 7
camelia rakudo-moar 280178: OUTPUT«3␤»
masak m: say prefix:<-> 4 + 7
camelia rakudo-moar 280178: OUTPUT«-11␤»
masak :D
nemo O_o
masak bows
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)
nine Written that way it's just a function call, so the parentheses are implicit 14:23
ZoffixW Ah, now I get it
masak aye
I wouldn't recommend using it in production 14:24
it's confusing
but kinda cool -- just wanted to show it's possible ;)
ZoffixW m: say prefix:<-> infix:<+> 4, 7
camelia rakudo-moar 280178: OUTPUT«-11␤»
ZoffixW neat
m: say infix:<-> infix:<+>(2+2), 5 14:25
camelia rakudo-moar 280178: OUTPUT«-1␤»
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␤␤»
psch aww
masak m: say [-] [+] 1,2,3 14:28
camelia rakudo-moar 280178: OUTPUT«6␤»
masak m: say prefix:<-> [+] 1,2,3
camelia rakudo-moar 280178: OUTPUT«-6␤»
psch oh, right, it's & as Junction again
14:28 Coleoid_n joined
psch m: say &[-]( [+] 1,2,3 ) 14:28
camelia rakudo-moar 280178: OUTPUT«-6␤»
psch that's a bit weird, though, to my eyes
i mean, that it needs parens like that 14:29
is that LTM again? or could it actually be something wrong in the "&[$op] means foofix:[$op]" code? 14:30
m: say &[-]
camelia rakudo-moar 280178: OUTPUT«sub infix:<-> (Mu $?, Mu $?) { #`(Sub+{<anon|47159072>}+{Precedence}|64765280) ... }␤»
psch oh, if it's just *in*fix maybe that explains enough..?
oh, duh. it's just nouned, so it doesn't invoke without parens 14:31
m: say ([+] (1,2,3)).&[-] 14:32
camelia rakudo-moar 280178: OUTPUT«-6␤»
psch m: say &[-] ([+] (1,2,3)) :
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
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␤ …»
moritz m: say [-] ([+] (1,2,3))
camelia rakudo-moar 280178: OUTPUT«6␤»
14:39 njmurphy left
rindolf m: say [-] (5) 14:50
camelia rakudo-moar 280178: OUTPUT«5␤»
rindolf m: say [-] (5,7)
camelia rakudo-moar 280178: OUTPUT«-2␤»
rindolf m: say [-] (5,7,10)
camelia rakudo-moar 280178: OUTPUT«-12␤»
14:50 sammers left
ZoffixW m: say [[[[[[-]]]]]] ((7,5),(10,5)) 14:55
camelia rakudo-moar 280178: OUTPUT«0␤»
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␤»
ZoffixW heh
m: say (7,5) [[[[[[-]]]]]] (10,5) 14:58
camelia rakudo-moar 280178: OUTPUT«0␤»
ZoffixW hmmm
m: say 7,5 [[[[[[-]]]]]] 10,5
camelia rakudo-moar 280178: OUTPUT«7-55␤»
ZoffixW :o
14:58 Celelibi left
ZoffixW Ah. So basically [] are ignored in infix ops 14:58
14:59 _matt joined 15:00 grondilu left, _matt is now known as matt_, CIAvash left
psch m: 1 [&say] 2 15:01
camelia rakudo-moar 280178: OUTPUT«12␤»
psch ZoffixW: well, [&op] is the infix form of &op, and infixifying and infix op... vOv
15:02 ptolemarch joined
psch s:2nd/and/an/ 15:02
ZoffixW Oh, I didn't know it was the infix form.
15:02 domidumont left
ZoffixW That's crazy! :D 15:02
m: 1 [&prefix:<+>] 2
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␤␤»
ZoffixW awww
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␤------> 0317⏏5 2␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ sta…»
timotimo but i'm trying to call 1 with 2!
15:03 sammers joined, Celelibi joined
geekosaur this isn't haskell :p 15:04
psch m: *.say [&map] (1, 2, 3)
camelia rakudo-moar 280178: OUTPUT«1␤2␤3␤»
gregf_ m: (1 + (2))
camelia rakudo-moar 280178: OUTPUT«WARNINGS for /tmp/4WLuUDQr7A:␤Useless use of "+" in expression "1 + (2)" in sink context (line 1)␤»
ZoffixW m: say '😂' [&join] <This is great>
camelia rakudo-moar 280178: OUTPUT«This😂is😂great␤»
15:06 pmurias joined 15:07 khw joined
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 ~ *] '😂'␤»
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␤»
ZoffixW I guess it's really particular about what can be placed inside
psch m: say '😂' [&(* ~ *)] '😂'
camelia rakudo-moar 280178: OUTPUT«😂😂␤»
ZoffixW Ahh
15:08 AlexDaniel joined
psch m: say 2 [&(sub { $^a + $^b})] 2 15:09
camelia rakudo-moar 280178: OUTPUT«4␤»
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)␤»
ZoffixW :o 15:11
AlexDaniel m: say [/] [-] [+] [*] # :)
camelia rakudo-moar 280178: OUTPUT«1␤»
psch /o\
ZoffixW wtf
arnsholt Oh, right. Reduction metaop 15:12
psch m: say [/]
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␤␤»
arnsholt That one took a bit to figure out
ZoffixW I still don't get it.
arnsholt ZoffixW: [+] is the sum operator
[*] product, etc.
m: say [*] 15:13
camelia rakudo-moar 280178: OUTPUT«1␤»
arnsholt The product of an empty list is 1 (1 being the identity for products)
timotimo yeah
arnsholt The rest of them are just applied to a list of a single element
timotimo and 0 is the identity for addition
psch m: say [*]; say [+] [*]; say [-] [+] [*]; say [/] 1
camelia rakudo-moar 280178: OUTPUT«1␤1␤1␤1␤»
timotimo (not relevant here, but interesting none-the-less)
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:<*>((),())
camelia rakudo-moar 280178: OUTPUT«0␤»
psch m: say infix:<*>(())
camelia rakudo-moar 280178: OUTPUT«0␤»
arnsholt That's different
ZoffixW m: say infix:<*>(
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␤»
ZoffixW m: say infix:<*>()
camelia rakudo-moar 280178: OUTPUT«1␤»
ZoffixW Alright then.. heh 15:15
arnsholt [*] is "my $p = 1; for @args -> { $p += $_ }; $p"
ZoffixW I see
arnsholt++
arnsholt Except *=, not += 15:16
dalek osystem: f428a5d | RabidGravy++ | META.list:
Add Device::Velleman::K8055

See github.com/jonathanstowe/Device-Velleman-K8055
15:18
AlexDaniel m: say ([×]-[×])
camelia rakudo-moar 280178: OUTPUT«0␤»
AlexDaniel it's time to start making a list of smileys that are valid in perl 6
RabidGravy weird 15:19
and *that* is my fiftieth module
or 52nd
timotimo did module 51 get released? or is the government still holding it back?
15:19 pmurias_ joined
RabidGravy I'm using it to control your minds 15:20
timotimo *gasp*
btw, i'm almost done making your coffee
15:21 ertgbfu left 15:23 pmurias left
tony-o how do i get in on having someone make coffee for me? 15:26
teatime tony-o: if you don't have a partner, might be easier to implement RFC2324. 15:28
or a mom, I guess, might substitute.
MadcapJake tony-o: panda install App::Mind::Control
tony-o teatime: nice rfc
she usually has me make the coffee for her
teatime :)
heh, my mom makes my coffee about half of the time, if I'm at her house, which is often. 15:29
tony-o my folks are too far to make free coffee worth the trip over just making some myself 15:30
MadcapJake: coffee is only the beginning for that module
+1 for Aquavit being in this RFC for alcohol 15:31
dalek c: 1f86474 | (Zoffix Znet)++ | doc/Type/Any.pod:
Remove impertinent text
timotimo teatime: you're having coffee for teatime?!
teatime it isn't teatime yet, and please don't pronounce my name that way, it makes me feel... stabby. 15:32
and you wouldn't like me when I'm stabby.
15:33 lostinfog joined
tony-o lighten up francis 15:33
ZoffixW ... stabby :o 15:34
ZoffixW backs away slowly
tony-o for reference, if you're not a bill murray fan: www.youtube.com/watch?v=0OnpkDWbeJs
lizmat ZoffixW: not sure why that mention of say truncating to 100 elems needed to be removed
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?
lizmat ?
15:34 pmurias_ left
jnthn Stabby! i.imgur.com/zezivkR.jpg 15:36
timotimo is that short for "standby"
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.
lizmat ah, ok, I just looked at the diff, not at its context :-) 15:38
15:38 Su-Shee joined
ZoffixW :) 15:38
lizmat ZoffixW++ Acme::Anguish
timotimo lizmat: maybe you should include one of the example programs written in anguish somewhere in between the regular text of the weekly :P
lizmat so is there a uniprop for invisible / zero width code points?
if not, maybe we should make one at the MoarVM level ? 15:39
Su-Shee good afternoon/evening.
lizmat timotimo: I'm going to refer to the associated blog post: that's scary enough :-)
Su-Shee do I want panda or zef?
gregf_ missed morning
teatime 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
Su-Shee, (personal opinion)
teatime I don't much get on w/ my fellow guilded assassins... they say I enjoy my work /too much/.
timotimo teatime: i remember seeing that! i forgot what that was from
ZoffixW Su-Shee, I think there's also redpanda available now. tadzik would know more.
Su-Shee ZoffixW: I want the "I'm an idiot and don't bother with complicated things" one, please :)
teatime timotimo: discworld; the video specifically is from Hogfather 15:41
timotimo oh!!
tadzik Su-Shee (IRC): redpanda is a close to cpanm as it gets, fwiw
I'm obviously biased
timotimo yes, i loved hogfather. i really need to watch it again soon
15:41 pmurias joined
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?
timotimo i think there's also panda2, which happened in the mean time
tadzik ZoffixW: it's a prototype, more like
but I find it useful in itself :)
15:42 x86 left
tadzik it's as small and focused as possible 15:42
ZoffixW Ah
tadzik Su-Shee: with rakudo itself, none :) panda is still what comes with Star
Su-Shee tadzik: ah. excellent. then I'm not bothering with anything else. 15:43
15:44 nicqbot left
tadzik panda is a little bit behind these days, I started a nice major rewrite, but it's not fully functional yet 15:44
15:45 ssotka joined
Su-Shee tadzik: I just want to install modules not by hand. 15:46
tadzik: but I'm seeing the one I need failing anyways so I don't need a module installer today it seems..
tadzik right
I recommend redpanda :)
Su-Shee: what is it that you need?
Su-Shee tadzik: the web framework with the name I always forget Bsomething. 15:47
ZoffixW Bailador
15:47 dogbert17 joined
ZoffixW It should succeed, I think it's just the Travis build for it is failing 15:47
tadzik hah :)
Su-Shee ok, I also have a stupid question about this one: 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
ZoffixW Su-Shee, it's just for dispatcher. 15:51
Su-Shee tadzik: well I just don't install anything red. :)
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:52
tadzik Su-Shee: reasonable :) 15:54
though why not just try for yourself? :)
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
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.
ZoffixW Su-Shee, never mind. I may be wrong. Lemme read the code
AlexDaniel ZoffixW: “Look, Ma! I'm a C Programmer!” is a great title, by the way
MadcapJake I wish Pair could be paremeterized
tadzik Su-Shee: fairy nuff
15:56 abraxxa left
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
Su-Shee: Re:HTTP::Server::Router (H:S:R)
Su-Shee ZoffixW: ^^^^ see, that's what I meant..
15:57 mr-foobar left, sno left
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
Su-Shee: it doesn't block until then, it just awaits and other requests are processed
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.
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"
so the route matching 'keep going until one returns true' phase of this request's handling is blocked until the promise is completed
but other requests will be handled normally meanwhile
Su-Shee mst: yeah, I'm too stipid to understand what that really means in all consequences, especially with threads in the mix.
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
tony-o Su-Shee: there is also this if you want something higher level than H:S:R too - github.com/tony-o/perl6-hiker 16:01
AlexDaniel ZoffixW: e.g. I can see the difference between ‘ ’ and ‘ ’
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'; }
RabidGravy Hmm the step on the GTK::Simple::Scale doesn't seem to work
mst Su-Shee: basically, they don't interact in any way you need to worry about 16:02
AlexDaniel m: say ‘hello’
camelia rakudo-moar 280178: OUTPUT«hello␤»
RabidGravy it seems to be 0.01 whatever you set it to
ZoffixW AlexDaniel, yeah, probably. But neither Sublime Text 2 nor Atom nor pico do 16:03
AlexDaniel ZoffixW: emacs does
Su-Shee mst: I cannot "not worry about". ;) either I understand a module or I can't use it.
16:03 _mg_ left
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:03
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 :)
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␤␤»
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 :)
MadcapJake m: subset IntPair of Pair where *.key ~~ Int and *.value ~~ Int; my IntPair @a = 10 => 11, 5 => 3;
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␤␤»
Su-Shee tony-o: it's the name of the thing?
mst Su-Shee: bah. was worth a try :)
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␤␤»
ZoffixW dafuq
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.
RabidGravy Ah got it
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?
ZoffixW timotimo, isn't that what I want?
Oh 16:09
I didn't even bother to read the where clause :)
m: subset IntPair of Pair where *.key ~~ IntStr and *.value ~~ IntStr; my @a of IntPair = 10 => 11, 5 => 3;
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␤␤»
ZoffixW :/
MadcapJake IntStr?
ZoffixW Ah
m: subset IntPair of Pair where { .key ~~ IntStr and .value ~~ IntStr }; my @a of IntPair = 10 => 11, 5 => 3;
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␤␤»
ZoffixW throws desk
m: say '22'.WHAT 16:10
camelia rakudo-moar 280178: OUTPUT«(Str)␤»
MadcapJake that needs to be a huggable factoid :P
ZoffixW heh. I actually have it bound to a key on my home keyboard.. :)
MadcapJake what is IntStr? 16:11
ZoffixW m: my IntStr $x = '22'; $x = 22; say $x
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␤␤»
tony-o Su-Shee: yes, that's the name
ZoffixW I was expecting that to work.
AlexDaniel where's huggable
ZoffixW broken
AlexDaniel poor creature
ZoffixW /notice huggable dunno
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 -_-
Su-Shee mst: not using it, I can't use what I don't understand, that would be silly.
MadcapJake I can't find any mention of IntStr in docs or syns
AlexDaniel m: subset IntPair of Pair where { .key ~~ IntStr }; my IntPair $a = 10 => 11
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␤␤»
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
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)
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.
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
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␤␤»
timotimo IntStr only gets created from &var
m: my IntStr $i = var('12')
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'?␤␤»
timotimo m: my IntStr $i = val('12')
camelia ( no output )
timotimo m: my IntStr $i = <12>
camelia ( no output )
timotimo m: my IntStr $i = '12'
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␤␤»
AlexDaniel m: my IntStr $i = <12>
camelia ( no output )
timotimo you have to request getting an allomorph like that
ZoffixW Oh, now I remember. Right
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 :)
MadcapJake what is val? (I feel like I am all the sudden in the wrong language channel, no docs, no syn mentions, lol)
ZoffixW heh
tony-o (or any other module, for that matter)
timotimo MadcapJake: design.perl6.org/S02.html#Allomorp..._semantics
MadcapJake timotimo: thank you! 16:17
ZoffixW m: subset IntPair of Pair where { try { .key == .key } and .value ~~ Int }; my IntPair $a = 42 => 11
camelia ( no output )
ZoffixW m: subset IntPair of Pair where { try { .key == .key } and .value ~~ Int }; my IntPair $a = 'meow' => 11
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␤␤»
ZoffixW \o/
Su-Shee tony-o: I can do that once I've understood it all. 16:18
MadcapJake lol nice
ZoffixW MadcapJake, that fails with non-Int numerics though :P needs .key.Int I guess
MadcapJake m: <1/2>.WHAT.say; < 1/2 >.WHAT.say
camelia rakudo-moar 280178: OUTPUT«(Rat)␤(RatStr)␤»
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
camelia rakudo-moar 280178: OUTPUT«(IntStr)␤»
psch m: say < 1 >.WHAT
camelia rakudo-moar 280178: OUTPUT«(IntStr)␤»
psch huh, i thought there was a difference there
MadcapJake psch: that shouldn't be IntStr in the first case though right?
psch MadcapJake: well, yeah, that's what i thought :) 16:20
16:20 AlexDaniel left
MadcapJake m: <1.0>.WHAT.say; < 1.0 >.WHAT.say 16:20
camelia rakudo-moar 280178: OUTPUT«(RatStr)␤(RatStr)␤»
MadcapJake m: <1e0>.WHAT.say; < 1e0 >.WHAT.say
camelia rakudo-moar 280178: OUTPUT«(NumStr)␤(NumStr)␤»
psch m: say < 8+9i >.WHAT; say <8+9i>.WHAT
camelia rakudo-moar 280178: OUTPUT«(ComplexStr)␤(Complex)␤»
dalek k-simple: 1a9fb5e | RabidGravy++ | lib/GTK/Simple.pm6:
Allow setting of "digits" on Scale widget
16:21
ZoffixW m: «1» .WHAT.say
camelia rakudo-moar 280178: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
ZoffixW m: «1».WHAT.say
camelia rakudo-moar 280178: OUTPUT«(IntStr)␤»
psch m: <1 2>.map({$_.WHAT.say}) 16:22
camelia rakudo-moar 280178: OUTPUT«(IntStr)␤(IntStr)␤»
RabidGravy there, can sensibly use the scale widget for a sequencer
psch m: < 1/2 1/2 >.map({$_.WHAT.say})
camelia rakudo-moar 280178: OUTPUT«(RatStr)␤(RatStr)␤»
psch m: <1/2 1/2>.map({$_.WHAT.say})
camelia rakudo-moar 280178: OUTPUT«(RatStr)␤(RatStr)␤»
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␤»
ZoffixW m: «1» .WHY
camelia ( no output )
ZoffixW :/
dalek c: 3a9c4f9 | (Jan-Olof Hendig)++ | doc/Type/ (3 files):
Fixed a bunch of broken links
16:27
gregf_ m: say [+] <1/2 1/2>
camelia rakudo-moar 280178: OUTPUT«1␤»
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;
camelia rakudo-moar 280178: OUTPUT«Potential difficulties:␤ Redeclaration of symbol @a␤ at /tmp/jW3bGP0etc:1␤ ------> 030 => 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 …»
gregf_ m: say <1/2 1/2>.map(*.^name)
camelia rakudo-moar 280178: OUTPUT«(RatStr RatStr)␤»
16:28 dakkar left
gregf_ m: say [+] <1/2 1/2 1> 16:28
camelia rakudo-moar 280178: OUTPUT«2␤»
ZoffixW MadcapJake, neat 16:29
16:30 pmurias left, pmurias joined
jdv79 what is wrong here?: gist.github.com/anonymous/7ab475f6...9003e776d6 16:30
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␤␤»
ZoffixW jdv79, do you get the same if you simply retry? 16:32
I recall seeing the Basic.t failures and they disappeared when I retried
jdv79 ill let you know
no 16:34
gregf_ is that subset for creating user defined datatypes? 16:35
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
gregf_ ah - sure
ZoffixW (my writing about subtypes: perl6.party/post/Perl-6-Types--Made...-madetypes ) 16:37
16:38 cdg left
ZoffixW s/types/sets/ 16:38
kaare_ Anybody here with control over modules.perl6.org/ ?
gregf_ oh wow
16:39 cdg joined
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␤»
kaare_ Could I request that either a) Updates always has a value, or b) N/A is sorted last when modules.perl6.org/#sort-col=6&sort-dir=d
16:40 AlexDaniel joined
jdv79 ugexe: gist.github.com/anonymous/e58689c6...2925ba5382 ? 16:40
its in META.list
16:41 Coleoid_n left
MadcapJake m: gist.github.com/MadcapJake/6091b34...98f2d2c0a7 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␤␤»
MadcapJake ZoffixW: any idea why ^^ fails?
gregf_ ZoffixW: thanks 16:42
16:42 Coleoid_m joined
MadcapJake it doesn't even appear to be entering my constraint, a `say` inside it produces nothing 16:43
woops, nvm now it's doing that at least :P 16:44
(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
and it dies properly if I place a string for a key/value
and it dies properly if I place a string for a key/value 16:46
oops, lol alt-tabbed to the wrong window
psch m: subset SInt of Int where * < 10; my SInt @a = 1, 2; say @a[0].WHAT
camelia rakudo-moar e39ce3: OUTPUT«(Int)␤»
psch MadcapJake: probably something like that ^^^
ZoffixW MadcapJake, it needs to be my @edges of IntPair
psch subsets aren't nominal in the same way classes are
...i'm not sure nominal is the right word there :/
Su-Shee uhm what's perldoc called in perl6? :)
ZoffixW Su-Shee, p6doc 16:47
Su-Shee ah
MadcapJake psch, ZoffixW: but shouldn't the check proceed again when in the sub signature?
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
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␤␤»
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]␤»
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:50
m: gist.github.com/zoffixznet/8965cd3...24db99f354 16:51
camelia rakudo-moar e39ce3: OUTPUT«[1 => 2 3 => 4 6 => 2]␤»
MadcapJake ahhh!! thanks! 16:54
gregf_ m: say <1 2 foo 1/2>.grep: { $_ ~~ Int } 16:55
camelia rakudo-moar e39ce3: OUTPUT«(1 2)␤»
ZoffixW m: say <1 2 foo 1/2>.grep: Int 16:58
camelia rakudo-moar e39ce3: OUTPUT«(1 2)␤»
gregf_ also, i can see that almost ever map, grep returns a seq. irrrespective of what the source Datastruct is 17:00
m: say ({foo => 1, bar => 2}.kv.map: -> $k,$v { $k => $v * $v }).^name #there hash to a Seq
camelia rakudo-moar e39ce3: OUTPUT«Seq␤»
ZoffixW Yup. It's kinda like a pipeline. You can do stuff and it'll pull the items through the pipeline 17:03
m: ^∞ .grep(* %% 2).map: { .say; $++ > 10 and die 'Had enough' }
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␤␤»
ZoffixW Note, it didn't grep the infinite list first before doing the map ^
*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
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
MadcapJake oh i'm doing WHICH like ACCEPTS 17:05
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:06
17:07 espadrine_ left
ugexe at least for me its able to find and install it, so thats my hunch 17:07
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)␤»
ZoffixW m: $++ and last or .say for ^∞ .grep(* %% 2).map: "And " ~ *
camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CPZmGJXQW3␤Undeclared routine:␤ or used at line 1␤␤»
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…»
AlexDaniel m: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; True }
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…»
AlexDaniel whoa, what
star: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; True }
camelia star-m 2016.01: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
AlexDaniel huh?
17:09 pmurias left
AlexDaniel can anybody shine a light on that? 17:10
[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
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⏏0510]␤»
psch aww
m: (^Inf .grep(* %% 2))[^10].say 17:12
camelia rakudo-moar e39ce3: OUTPUT«(0 2 4 6 8 10 12 14 16 18)␤»
[Coke] AlexDaniel: are you asking "what specifically changed to impact that between star 2016.01 and HEAD?
AlexDaniel [Coke]: yes
[Coke] No clue, but you could run git bisect to narrow it down.
ZoffixW FWIW, it's broken on my 2016.04-89-gec6c3b8
17:14 sufrostico joined
ZoffixW kaare_, no need, I'll fix it right now. 17:15
AlexDaniel [Coke]: I think I can do that 17:16
ZoffixW [Coke], we have a separate repo for the site itself: github.com/perl6/modules.perl6.org/
[Coke] ZoffixW: yes, that one.
ZoffixW++
jdv79 ugexe: zef update seems to help. maybe autoupdate as default might be nice. 17:17
or default to local search but fail out to a fetch
17:18 spider-mario joined
tony-o [Coke]: modules.zef.pm also lets you search for modules and browse their code 17:22
hoelzro wow, modules.zef.pm is really nice 17:26
17:26 eam left, eam joined
ZoffixW Agreed. 17:28
17:28 domidumont joined
mspo the main page could use an update 17:28
ZoffixW AlexDaniel, what's your opinion on code examples contrast? :) modules.zef.pm/modules/Alex%20Masla...elegramBot
mspo also the copyright?
17:29 domidumont left
tony-o what's wrong with the C? 17:29
17:29 domidumont joined
mspo the 2014 part 17:29
tony-o also, took out the one list item that was completed
mspo: that site has been there since 2014 :-)
ZoffixW Actually, it's not that bad on my other monitor...
mspo I suppose that's right 17:31
Su-Shee how do I make JSON the (default) auto-rendered in Bailador? 17:33
17:33 ianm left
mspo tony-o: used to trying to get copyright to say the current year 17:34
lizmat tadzik: do you have a URL for redpanda ? 17:36
tadzik lizmat: 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
lizmat tadzik: thanks
mspo tony-o: I think it depends if you are using implied copyright or registered copyright 17:38
tony-o: I think the general practice on the web is to always have the current year or 2014-$currentyear
tony-o: otherwise it gives (at least to me) an impression that the page hasn't been updated
for example on netbsd.org we use: Copyright © 1994-2016 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED 17:39
but we're a registered mark and stuff
that's the format I like, though
lizmat zef.modules.pm gives me a 501 17:40
?
kaare_ ZoffixW: Thanx
17:41 CIAvash joined
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
Su-Shee, also note: currently, Bailador has no support for async (unless ufobat added it in the past couple of weeks)
ugexe modules.zef.pm, not zef.modules.pm 17:42
mst if (async) { bailadout }
mspo Copyright © 2016 Apple Inc. All rights reserved.
tony-o mspo: i'll give it an update
17:42 ennio joined
mspo tony-o: ;) 17:43
Su-Shee oh dear god.. why on earth is FOLDING suddenly enabled in vim's perl 6 syntax highlighting?!
ZoffixW: haven't tried anything yet, I looked through the docs and examples and didn't find anything JSOn.. 17:44
17:44 ennio left
Su-Shee sorry, I have to first disable this messing with my editor configuration, brb unbelievable.. 17:44
moritz hasn't observed any folding 17:45
mst moritz: maybe yours was spindled and mutilated instead
Su-Shee moritz: I just opened a Blabla.p6 and all subs are folded by default.
jdv79 sounds annoying
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 :)
Su-Shee moritz: WELL WHAT CAN I SAY. IT FOLDS.
ZoffixW just tried
moritz Su-Shee: which makes me believe that with the version of vim and moon phase, it doesn't fold by default :-)
Su-Shee moritz: nobody else does.
jdv79 isnt it easy to turn off though anyway?
Su-Shee moritz: well I wouldn't KNOW BECAUSE IT NEVER HAPPENED 17:47
17:47 huggable joined
ZoffixW huggable, hug Su-Shee 17:47
huggable hugs Su-Shee
Su-Shee jdv79: yes now I have to actually look it up because of this silly nonsense :(
moritz: it happens only in gvim :(
Su-Shee goes looking for the maintainer to submit a bug report
moritz fwiw tis is vim and gvim 7.4 (from ubuntu 2016.04) 17:48
Su-Shee version 7.4.692 17:49
17:49 nicqbot joined
Su-Shee hmpf.. and if I install Bailador globally, it suddenly fails while it works perfectly fine as user with a local rakudo.. :( 17:50
oh dear lord I just looked into the perl 6 syntax.vim :) 17:52
ZoffixW Su-Shee, there's no way to change the default content type 17:53
ZoffixW read the code
Su-Shee ZoffixW: how do you mean you can't change the default content type? it's always text/html?! 17:55
17:56 _dolmen_ joined
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
i.e. if you don't want text/html you have explicitly ask for something else
Su-Shee ZoffixW: hm. ok.
tony-o ZoffixW: can you have a route that just calls that and then continues to search for other routes that fit?
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.
tony-o Su-Shee: that might be a little easier ^
Su-Shee tony-o: well that means that I have to type it about 600 times ;)
MadcapJake would be nice to be able to set a default 17:58
Su-Shee yes.
ZoffixW Su-Shee, no no, just put: get /^/ { content_type 'application/json'; return Nil; } at the start of the app
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.
first I need to actually make Bailador install.
after I disabled folding in all my vims.
MadcapJake why is it content_type instead of content-type? 18:01
ZoffixW Because screw consistency :)
Also, probably because that part was written before kebob case was a thing.
Su-Shee ZoffixW: that's not funny imho.
18:02 _mg_ joined
MadcapJake Su-Shee: I'm pretty sure ZoffixW is being sarcastic not funny 18:02
tony-o haha 18:03
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"
ZoffixW Su-Shee, I typoed my thing. Should be get /^/ => { content_type 'application/json'; False; } Here's the full 4 request methods: gist.github.com/zoffixznet/6658188...bd1077a706 18:05
Su-Shee ZoffixW: let me first actually HAVE Bailador :)
MadcapJake would be an easy PR to fix :) though then it would need to offer a deprecated content_type for the time being.
Su-Shee ZoffixW: why now false instead of nul? 18:06
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.
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 left, ilbot3 joined
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
ZoffixW m: say False.defined ?? 'yeah' !! 'nah' 18:08
camelia rakudo-moar e39ce3: OUTPUT«yeah␤»
jdv79 mojo would be excellent
Su-Shee tony-o: ok, it's out. never ever anything even remotely catalyst EVER again. I'm waiting for mojo.
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
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.
tony-o why not just use mojo, if you want nothing but mojo
lizmat And another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/05/17/...-progress/
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.
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 cdg left
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:10
dalek k-simple: 28bad1f | RabidGravy++ | lib/GTK/Simple.pm6:
Alter Switch creation_method so it works

I don't think it should actually be a descendent of ToggleButton it doesn't need the label, so will probably redo later
18:11
ZoffixW MadcapJake, github.com/ufobat/Bailador/blob/ma...ext.pm#L18 and here github.com/ufobat/Bailador/blob/ma...App.pm#L81
MadcapJake ZoffixW: thanks!
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: irclog.perlgeek.de/perl6/2016-05-08#i_12449184
Su-Shee ZoffixW: *sigh*
MadcapJake woah cloning url just moved on github O_O
tony-o suit yourself
ZoffixW MadcapJake, yeah, it's annoying :( 18:13
Su-Shee tony-o: yes. I'm trying. ;)
MadcapJake isn't one of the catalyst authors a regular in here?
Su-Shee MadcapJake: sure, mst is around and I thought sri was too..
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&
ZoffixW sri, decided to cut await themselves from Perl 6 entirely
18:16 jjido_ joined, iH2O joined 18:17 _dolmen_ left
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
18:17 iH2O left
Su-Shee tony-o: outdated docs which explain five tons of DBIC but no modern, contemporary webstuff... 18:17
tony-o: enough?
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.
tony-o Su-Shee: more than enough :-)
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
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
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.
mst: oh, yes you said you'd wanted to show me a thing with elegant catalyst and angular I think..
mst also, I don't remember even seeing you in the IRC channel 18:20
ZoffixW jdv79, what about what?
mst I'll admit it's a bit o a bugger to learn though
Su-Shee mst: also, we had this discussion 20 times already and I fail to make myself understood anyways.
jdv79 you said something that didn't make sense to me
14:14:17 < ZoffixW> sri, decided to cut await themselves from Perl 6 entirely
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'
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
CIAvash jdv79: irclog.perlgeek.de/perl6/2016-01-08#i_11853271
Su-Shee mst: yes and I see no reason anymore to learn more :(
mst: well I now have a large scale app in mojolicious..
mst: all is good.
ZoffixW CIAvash++
mst Su-Shee: have you got as far as re-using code between controllers via roles yet?
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.
mst Su-Shee: no, I mean, in Mojolicious
or do you just copy and paste between files?
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. ;)
tony-o MadcapJake: from the author field in the meta
18:24 ocbtec left
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
Su-Shee tony-o: I know mst very well and we had this discussion 20 times already.
18:24 jjido_ left
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
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
MadcapJake off to appointment
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
ZoffixW lizmat++ # good weekly
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.
mst and then I ask "what would contemporary stuff be then" and then I never get an answer 18:27
also it would help if you could stop blaming DBIC for riba going insane 18:28
ZoffixW heh
tony-o riba?
ZoffixW riba sushi
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.
mst Su-Shee: fair enough
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.
mst I'm just interested in when you get to 30 or 40 controllers how much the routing table gets ridiculous
esp. if there are multiple controllers with the same shape
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
Su-Shee mst: yes, and? I simply do not have made up my mind yet. that is really all.
mst: *sigh* ok. you are right.
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 ...
Su-Shee to shorten this and make it all easier.
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.
mst instead of this usual cycle of raging about how awful it is
then telling me you already told me how to fix it but still not giving me any suggestions
Su-Shee mst: somebody asked me specifically what caused me pain. I did answer that.
mst then going emo when I get annoyed at you being a dick about it
yaeh, try answering it with a little sympathy for the authors maybe
Su-Shee mst: I already told you some time ago. more than once.
tony-o guys .. 18:33
Su-Shee I'm not a guy.
tony-o people in the midwest refer to more than one person as 'guys'
i'm not insinuating you're a man
mst it's standard english usage, I know. Su-Shee still hates it.
you get used to it
Su-Shee ok, I'm going to do something else now. 18:34
18:34 Su-Shee left
tony-o mspo: now with current year for copyright 18:34
mst tony-o: moral of the story: don't ask su-shee about catalyst 18:35
18:35 jjido_ joined
mspo tony-o: nice 18:35
jdv79 oh wow. i just realized i thought Su-Shee was Shimmerfairy this whole time.
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
jdv79: really?
oh, misread that.
mspo tony-o: is there a way to browse all modules or similar?
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
tony-o jdv79: why is that?
jdv79 since sri bounced outta here
mspo now as in since that time sri rate quit from here? 18:38
or did he do it again in the last six months or os
tony-o ah
jdv79 looks like january
tony-o jdv79: well, again, i'd be happy to have input on: github.com/tony-o/perl6-hiker
and make it something people *want* to use
mspo I see where some of the confusion was with whta happened there 18:39
18:41 ianm joined
jdv79 does hicker sit on psgi or whatever its called in p6? 18:41
ZoffixW P6SGI
tony-o it sits on anything that uses HTTP::Server role
ZoffixW (what it's called; no idea about hiker)
tony-o and on top of HTTP::Server::Router
CIAvash lizmat++ 18:42
18:42 jjido_ left
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:45
18:46 abraxxa joined, abraxxa left
jdv79 i'd be looking for things like that maybe in a p6 web suite. 18:46
tony-o jdv79: what do you mean by async ua? 18:47
18:47 abraxxa joined 18:48 abraxxa left
jdv79 a non blocking UA. less of a thing in p6 but in p5 i can see that being useful. 18:48
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.
nice
18:49 itaipu joined
dalek href="https://modules.perl6.org:">modules.perl6.org: 2c79a16 | (Zoffix Znet)++ | public/js/main.js:
Sort N/A `Updated` dates as oldest, not newest
18:53
ZoffixW kaare_, all done ^. Should be live on the site in 0-2 hours 18:54
18:55 Woodi left
mspo mojo is really great 18:56
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
RabidGravy is there any reason in GTK::Simple that .show is only implemented for ::WIndow and not all Widgets?
mspo I f'ing love how mojo can be a cgi script, psgi, fcgi, or stand alone http 18:58
the whole helper + under setup is really sweet (speaking of routing features)
tony-o mspo: MadcapJake: the main module listing is no paginated so you can scroll through *all* of the modules now 18:59
mspo serverless sessions via sha256 19:00
builtin csrf
anyway, mojo is good :)
19:00 dha joined
RabidGravy there there 19:00
mspo tony-o: nice 19:01
dha where where?
19:01 sno joined
ZoffixW Plus, it handles RFC 2324 :) 19:02
github.com/kraih/mojo/blob/master/...nse.pm#L50 19:03
tony-o arguably the *most* important rfc
19:03 mr-foobar joined
nine mspo: is there any web framework that can't be used as cgi script, psgi, fcgi and stand alone http? 19:04
ZoffixW Bailador? :D 19:05
mst if it's PSGI, it can already do all of those
ZoffixW Ah
Never mind then.
mst Web::Simple and Dancer both rely on this
ZoffixW: we were talking perl5, AFAIK
mspo nine: I don't know
mst I think the last one of note that couldn't was Maypole 19:06
which came before Catalyst
19:06 ZoffixW left
mspo nine: it impressed me :) 19:06
19:06 kurahaupo joined
AlexDaniel has anybody thought about building rakudo for every single commit, so that you can quickly run git bisect? 19:08
hoelzro AlexDaniel: I usually keep a rakudo around for each release for the past year or so 19:09
gives me some milestones to give bisect a headstart
moritz AlexDaniel: I know that libreoffice does that (they call it "binary bisect")
... though not with rakudo :-)
AlexDaniel hmm how many commits are there since the first official release 19:10
perlpilot AlexDaniel: Which release is the first official one?
hoelzro 984 since 2015.12
AlexDaniel well I mean v6.c
hoelzro (if you count that)
[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
[Coke] 2015.12 was the first release that targetted 6.c
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 :(
moritz lizmat++ # p6weekly.wordpress.com/2016/05/17/...-progress/
mspo nine: I can only speak for me
nine: giving what I say any weight is up to you
AlexDaniel [Coke]: in other words, I have no idea how to use git bisect with rakudo
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
and also rm -rf ./install each time 19:14
(then you get the recommended nqp/moar version at each commit of rakudo)
Bisecting: 7 revisions left to test after this (roughly 3 steps)
dha lizmat - typo in p6weekly.wordpress.com/2016/05/17/...-progress/ - DrForr is "Jeff" not "Geoff"
[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
it whines about tools/build/install-jvm-runner.pl :/
[Coke] AlexDaniel: did you (cd nqp && git clean -xdf) ?
AlexDaniel oh
[Coke] yes, that's nqp, not rakudo
AlexDaniel thanks! 19:16
19:16 domidumont left 19:17 willthechill left
[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 kurahaupo left
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
[Coke] hoelzro: yah, that's work, though.
if you only have a dozen revisions... eh. 19:19
for automation, though, yes please.
hoelzro yeah, it's only helpful for a large range of revisions
19:19 ZoffixW joined
AlexDaniel perlpilot: yes 19:20
hoelzro it's definitely work - work I haven't gotten around to doing myself ;)
the ccache thing is pretty quick and easy
[Coke] hoelzro: I used it all the time on parrot, but moarvm is fast enough I never bothered. 19:21
(havingn switched hardware many times over the last 12 years or so)
moritz the slow thing is compiling rakudo's setting, and maybe the multi-staged NQP build 19:22
ccache doesn't help at all with either
hoelzro yeah
19:22 chee is now known as snes
hoelzro it shaves a few minutes off of a complex bisect is all 19:22
19:22 snes is now known as chee
hoelzro something like 1000 commits 19:22
[Coke] mmm. 19:23
ZoffixW Does compiling the setting benefit a lot from a ton of available cores?
[Coke] Bisecting: 0 revisions left to test after this (roughly 1 step) 19:24
oh. and this looks super suspicious.
hoelzro ZoffixW: sadly, I don't think so
psch ZoffixW: setting compilation is one process
ZoffixW Ah, too bad. 19:25
I could've spun up my 20-core linode
hoelzro [Coke]: I think the current step is counted in the "roughly 1 step" bit
[Coke] oh, it's not the one I thought it was. Here's the commit that changed AlexDaniel's behavior: github.com/rakudo/rakudo/commit/6d...41e7eb99b0
"Remove almost all push-exactly implementations" 19:26
psch ah, that's the .map: { ...; last } thing right?
AlexDaniel .grep, yes 19:27
psch right
AlexDaniel m: say ^∞ .grep(* %% 2).map: { last if $++ > 10; $_ }
camelia rakudo-moar e39ce3: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
AlexDaniel star: say ^∞ .grep(* %% 2).map: { last if $++ > 10; $_ }
camelia star-m 2016.01: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20)␤»
AlexDaniel no, not that one
star: say ^∞ .map: { last if $++ > 10; $_ }
camelia star-m 2016.01: OUTPUT«(...)␤»
ZoffixW m: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; $_ }
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 …»
ZoffixW star: say ^∞ .grep(* %% 2).grep: { last if $++ > 10; $_ }
camelia star-m 2016.01: OUTPUT«(2 4 6 8 10 12 14 16 18 20)␤»
AlexDaniel that one, yeah
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 …»
[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.
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␤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…»
psch m: ^∞ .grep: { state $x; say $x; last if $x++ > 10; }
camelia rakudo-moar e39ce3: OUTPUT«(Any)␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤»
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␤»
AlexDaniel 4 days for a thousand commits
psch m: say 1000.polymod(24, 60)
camelia rakudo-moar e39ce3: OUTPUT«(16 41 0)␤»
AlexDaniel I think I can handle that
psch doesn't *actually* understand polymod 19:31
AlexDaniel m: say 5000.polymod(60, 24) 19:32
camelia rakudo-moar e39ce3: OUTPUT«(20 11 3)␤»
AlexDaniel m: say 5000.polymod(60, 24) Z <minutes hours days>
camelia rakudo-moar e39ce3: OUTPUT«((20 minutes) (11 hours) (3 days))␤»
psch oh 19:33
...the order of args feels backwards
AlexDaniel psch: I don't understand it too, that's why I always just copy that example from doc.perl6.org/routine/polymod
ZoffixW Damn. Looks like .polymod can make my Number::Denominate A LOT smaller :( 19:35
And looks like a good article material \o/ 19:36
19:36 pyrimidine left
perlpilot ZoffixW++ 19:36
19:39 Ven joined 19:40 ZoffixW left 19:44 TEttinger joined 19:47 pyrimidine joined
[Coke] ... dammit, I have a 20 line helper script in perl6 that that will reduce to about 10 lines. :) 19:47
19:48 ianm left
timotimo sorry about that 19:48
moritz #sorrynotsorry ? 19:54
timotimo mhm 19:57
dalek c: 90918d3 | (Jan-Olof Hendig)++ | doc/Type/ (2 files):
Fixed typo and another broken link
20:06
20:06 dha left 20:07 kaare_ left 20:16 khw left
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:16
20:17 Ven left
timotimo skids: you can build a polydom that reverses your arguments :) 20:17
skids And the results.
20:18 yqt joined
timotimo ah, yeah, of course 20:18
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:19
20:20 darutoko left
timotimo right, i heard of that, too 20:21
was it J perhaps?
skids My memory is as bad as my concentration these days. Probably one is the cause of the other :-) 20:22
20:23 cdg joined
geekosaur was thinking it sounded like an APL / J type thing 20:25
20:25 ianm joined
mst sounds like J yes 20:26
<3 that
20:27 dha joined, chris2 left
[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)␤»
[Coke] m: say 2+3 R/ 1
camelia rakudo-moar e39ce3: OUTPUT«2.333333␤»
[Coke] ah, precedence, my old friend... 20:29
20:29 khw joined 20:32 ChanServ sets mode: +o mst, mst sets mode: -q *!*@gateway/web/irccloud.com/x-jkxdsvxreqinfjvh, mst sets mode: -o mst
MadcapJake Zoffix: is it normal that a fresh clone of Bailador has tons of errors 20:32
moritz hopes not 20:33
MadcapJake let me rephrase, s/errors/test failures/ 20:34
20:38 sortiz joined 20:39 ZoffixMobile joined
ZoffixMobile MadcapJake, weren't any failures when I installed it last week. 20:40
20:40 abraxxa joined 20:41 abraxxa left
sortiz \o #perl6 20:42
RabidGravy harr!
MadcapJake ZoffixMobile: yeah a freshly forked Bailador and I'm getting tons of failed tests
20:43 ianm left
ZoffixMobile *shrug* 20:43
20:43 CIAvash left
MadcapJake oh well, moving on then, should be doing something more productive I suppose :) 20:43
ugexe github.com/ufobat/Bailador/compare...2337ad2R13
MadcapJake it's more tests than just that: hastebin.com/eyezaweter.txt 20:46
20:46 nicqbot left
MadcapJake It could be because I'm not including the lib dir, how do I do that with prove? 20:48
Oh looks like `prove --exec "perl6 -Ilib" -r t` fixes a few of them
20:48 willthechill joined 20:49 dj_goku left
ugexe thats why it fails on blead anyway. 20 days ago it stopped working on 'rakudobrew build moar v6.c' 20:50
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:51
20:52 ZoffixMobile left 20:53 dj_goku joined, dj_goku left, dj_goku joined
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:55
20:57 Ven joined
timotimo yo MadcapJake, did you end up running my graph script? 20:58
MadcapJake timotimo: yeah it's amazing! 21:02
timotimo cool!
the decision to have nodes just be strings is a pretty big PITA when trying to make more things, tbh 21:03
like, want to build an A*? first build a node-name-to-coordinate function >_>
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
timotimo the code == your code? 21:04
don't forget to build a WHICH for your Node class so you can eqv them
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:05
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
timotimo you can really just spit out all nodes nad then all edges
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"
MadcapJake it's (or was) really slow doing that. that's why I'm looking for a simpler method
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:08
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:10
timotimo ah 21:11
yeah, it will (if and only if the graph is unweighted) 21:12
MadcapJake right, that is the kicker that makes this work
jnthn ARe you doing shortest path to root?
timotimo that's what he's doing currently, yeah 21:13
jnthn Yeah, the MoarVM heap analysis app uses that: github.com/jnthn/p6-app-moarvm-hea...l.pm6#L272 :)
MadcapJake haha! amazing! 21:14
timotimo its representation is different from an adjacency matrix, too
21:14 _mg_ left
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
MadcapJake jnthn: it's very very similar
jnthn :)
If speed/memory are an issue, mine has a few tricks
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)
The graphs in heap snapshots have well into the millions of edges. :) 21:17
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
MadcapJake oh xD one in the same, eh?
dalek k-simple: 1716816 | RabidGravy++ | lib/GTK/Simple.pm6:
Add the no-show-all accessors

Move the window_new and set_window_title so only defining once
21:19
k-simple: a6b5b6e | RabidGravy++ | .gitignore:
Just ignore the precomp
k-simple: f855cc6 | RabidGravy++ | lib/GTK/Simple.pm6:
move the .show() method into Widget

Add the .hide method
k-simple: 73019f8 | RabidGravy++ | lib/GTK/Simple.pm6:
All Widgets can be deleted
timotimo i wonder if those reports should go into #perl6-dev, too?
psch is gtk-simple special somehow?
21:20 lostinfog left
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
ah, that explains why it happens here at least
timotimo right
maybe we want to fully disable reports, too, for that
on the other hand
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 :)
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.
MadcapJake RabidGravy++ # so glad to see some love going into that module
timotimo RabidGravy: thank you very much for caring at least a little bit :)
we also don't have tests *cough*
but i don't really know how to test that stuff properly
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
RabidGravy yeah, the examples are somewhat like test surrogates
timotimo yeah, they aren't very good, either
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
timotimo: oh yeah that's a very good point :)
timotimo i mean, we can use xvnc for testing without popping up something user-visible 21:25
but it's wobbly
also has to have a window manager running, doesn't matter which one 21:26
MadcapJake looks like python has fedorahosted.org/dogtail/ for GUI testing GTK
timotimo except it mustn't be xwm (or what it's called) because you need to click to place windows
21:27 ocbtec joined
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)
psch: I mean moreso as a model for writing something in Perl 6, but you could do that xD
MadcapJake wonders if other GTK libraries in other languages even bother with user-side testing of GUI elements 21:30
timotimo *shrugs*
RabidGravy a lot more testing could be done without actually displaying the application window 21:32
without any contrivances
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:33
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
or different systems
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?
or something like that?
MadcapJake this is true, Gnome has been changing things like crazy lately, 3.20 has lots of CSS changes
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:36
MadcapJake has a Gnome Shell extension that uses xprop 21:38
it's super annoying as it gets stuck in xprop cursor mode all the time...
21:40 cpage_ left 21:41 cpage_ joined 21:43 _28_ria left 21:45 pmurias_ joined, cpage_ left 21:46 _28_ria joined
timotimo haha, damn 21:46
21:47 huggable left, huggable joined
jast hi there 21:48
how goes the dijkstra implementation?
21:48 cognominal left
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
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
21:50 lizmat left
jast here's what dijkstra does (the green node is the target node): en.wikipedia.org/wiki/Dijkstra's_a...mation.gif 21:50
that's a lot of nodes being looked at 21:51
and here's what A* does: en.wikipedia.org/wiki/A*_search_al...mation.gif
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
jast too bad 21:52
MadcapJake Here's how far I got with dijkstra's gist.github.com/MadcapJake/efbcb24...13a263c7c7 21:54
(which seemed to work for smaller graphs but was giving me a radius of -Inf for larger graphs)
jast one issue I'm seeing here is that you're using the "first" element from the set for the next iteration 21:58
21:58 Ven left
timotimo ooooh 21:59
awesome
jast in a disconnected graph that can give you completely bogus results, and in a weighted graph you can get incorrect costs
MadcapJake jast: oh? what should i be using?
timotimo i just used unshift to push new nodes into the list of things to get
instead of push which i had before 22:00
and i'm shifting to get the next one
it gets a very amusing-looking result indeed!
jast generally the element with the lowest estimated cost
MadcapJake ohhh
timotimo MadcapJake: you should try that, and see what it ends up doing
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
without weights the (b) bit doesn't matter
22:02 dha left
timotimo also the display code doesn't handle this case properly 22:02
jast what you're doing right now is starting with the very first node, build a path to some other node, remember that 22:03
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.
I can't think of any other requirements.
jast and if you don't do that, the patch you get is quite spurious
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
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
hence, for each node you have to remember what you've found to be the shortest path to it so far
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
should be Good Enough(tm) for many application
22:12 RabidGravy left
timotimo cool, i fixed the thing 22:14
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
where X is a prime number
22:17 willthechill left
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
if I'm reading it right
jast it should, yes
teatime thx much, sir
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
22:20 ggoebel116 joined
jast they're not nearly as simple, though 22:20
hobbs teatime: do note that with that simplest algorithm, hash('abc'), hash('abd'), hash('abe'), etc. are consecutive values 22:21
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
22:22 ptolemarch left
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:22
22:23 _28_ria left
jast and low bits in the input take a while to affect high bits in the output (as you build it up) 22:23
though that depends on the values of X and i
22:23 ggoebel115 left
teatime hahainternet: conveniently, that does not break my use-case :) 22:25
hahainternet teatime: glad to hear it ;)
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 22:27 awwaiid left
timotimo t.h8.lv/worst_pathfind_ever.png 22:31
jast not entirely sure what I'm seeing, but it does look... exploratory
timotimo yeah 22:32
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
oh, and if a node has been visited before from another node, i won't touch it 22:34
22:35 willthechill joined 22:37 itaipu left
timotimo t.h8.lv/fuzzy_pathfind.png - after inserting a node into the queue, have a 20% chance to shuffle the whole queue 22:37
22:41 willthechill left 22:44 willthechill joined 22:48 Actualeyes left 22:51 spider-mario left 22:55 BenGoldberg joined 22:56 pmurias_ left, willthechill left 23:02 jack_rabbit joined 23:03 cpage_ joined 23:05 rangerprice joined 23:06 firstdayonthejob left 23:07 rangerprice left, Sgeo joined, sortiz left 23:16 rindolf left 23:17 pmurias left 23:34 ocbtec left
TEttinger how is secrets of grindia, timotimo? 23:34
23:50 dwarring joined 23:52 lizmat joined 23:54 Xliff joined, Xliff left 23:56 Xliff joined
Xliff ¯\_(ツ)_/¯ 23:59
oops! Wrong channel! =) \o #perl6