Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-06

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 RabidGravy well don't do that then
00:01 timotimo you can't really write every algorithm to be branchless :)
00:01 timotimo not without pain, at the very least :D
00:02 RabidGravy no but you have an asymetric architecure and clever compilers
00:03 obfusk joined #perl6
00:03 RabidGravy anyhow I'm whacked
00:03 RabidGravy toodles
00:03 timotimo toodles, mister gravy
00:20 kid511 joined #perl6
00:24 itcharlie joined #perl6
00:30 huggable joined #perl6
00:43 pierre_ joined #perl6
00:48 hotel joined #perl6
00:48 BenGoldberg joined #perl6
00:48 cpage_ joined #perl6
00:49 kurahaupo joined #perl6
00:50 avar joined #perl6
00:50 avar joined #perl6
00:50 literal joined #perl6
00:52 pRiVi joined #perl6
01:01 hotel_california joined #perl6
01:05 cdg joined #perl6
01:07 ZoffixWin stmuk, what needs to happen to have my blog posts that show up on http://pl6anet.org/ to be from perl6.party and not from blogs.perl.org? [Eventually] the .party posts will look better and they also offer in-browser modifiable and runnable code examples, so I rather have that as default.
01:09 hotel how do you use panda on windows again?
01:09 hotel I have to make some batch file right?
01:12 ZoffixWin hotel, does panda command not work|?
01:12 hotel no, it hangs
01:12 hotel and apparently this has been the case since 2013 http://perl6maven.com/getting-started​-with-rakudo-star-2013-01-on-windows
01:13 ZoffixWin :/
01:13 ZoffixWin hotel, what Perl are you on? Did you use R* installation? 2016.04?
01:13 hotel yeah
01:13 ZoffixWin And what exact command does it hang on? (What Windows are you on, BTW)?
01:13 hotel I think it's because windows tries to call the shell script and doesn't know what to do
01:13 hotel running panda update, or any panda command
01:14 hotel >windows X
01:14 ZoffixWin X?
01:14 ZoffixWin Oh 10
01:14 * ZoffixWin only has 7
01:15 hotel hm
01:15 timotimo there are 7 windows in my apartment, too
01:16 hotel weird, the fix on that link worked on my other computer
01:18 ZoffixWin fwiw, `panda` "works" on Win7, but fails to fetch HTTP::Tinyish for some reason :S http://i.imgur.com/Dsfzffp.png
01:19 ZoffixWin Oh... do I need some sort of git thing on Windows?
01:19 hotel git-scm.org
01:20 ZoffixWin That doesn't answer my question :D
01:20 * ZoffixWin doesn't use Windows for anything other than gaming
01:21 ZoffixWin I'm just saying we have no mention of needing git things on Download page. If it's a requirement, it should be mentioned
01:21 ugexe zef does not require git on windows, but will use it if available fwiw
01:21 hotel huh? http://puu.sh/oHMQy/a054f301d3.png
01:22 Ben_Goldberg joined #perl6
01:22 itcharlie zef bro
01:22 itcharlie thats what you need
01:22 hotel teach me the ways
01:22 ZoffixWin ugexe, how to get zef without panda or rakudobrew?
01:22 ZoffixWin or git things :P
01:22 ugexe ZoffixWin: download the .zip from github
01:23 ZoffixWin Right. Makes sense. ugexe++
01:23 hotel ZoffixWin, I guess they assume that if someone is using perl6 on windows they already have some sorta git thing? ¯\_(ツ)_/¯
01:23 ugexe zef can also install .zip archive links from github
01:23 ZoffixWin hotel, well... try zef: https://github.com/ugexe/zef
01:23 hotel yeah I'm there :)
01:24 Ben_Goldberg joined #perl6
01:26 hotel man, windows really hates files without extensions
01:26 gfldex i just got `Failed to open file /usr/local/src/rakudo/install/s​hare/perl6/site/precomp/.lock: permission denied` after rebuilding Rakudo
01:27 gfldex here the stacktrace: https://gist.github.com/gfldex/e​c7a4acd1a2536d439cbc8230d4a27a4
01:28 ugexe i suppose there is still a flaw though: if the source-url of a module is a git link (and all of them are that are not on cpan) it won't try to guess its archive url. this means you would have to `zef install https://github.com/xxx/yyy/master.zip` for each module (or manually s/// the urls in the package list)
01:28 hotel ugexe, I don't even anymore: http://puu.sh/oHNck/af950d0f43.png
01:30 Ben_Goldberg joined #perl6
01:30 hotel wow http://puu.sh/oHNhB/6f0c2c66e5.png
01:30 hotel also Im dumb
01:30 ugexe heh
01:30 ugexe stupid unzipper putting it in a stupid folder of the same name as the child folder
01:31 hotel yeah
01:34 sno joined #perl6
01:35 Actualeyes joined #perl6
01:38 hotel|chagrin interestingly, in order to get cmd to recognise that zef is on the path, I have to call it zef.pl6.bat
01:42 ugexe that is from rakudo itself i believe
01:42 hotel|chagrin putting zef.bat (which calls the other bat) in rakudo/bin works though...
01:46 ugexe here is a modified $HOME/.zef/store/p6c/packages.json that has all the git urls turned into their .zip https://gist.github.com/ugexe/c​408d997fcf5e77e6d285df0889a9bd3
01:46 hotel|chagrin but anyway, zef works so thanks :)
01:46 ZoffixWin \o/
01:46 ugexe strange about the .bat though, i'm able to invoke it with just `zef`
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 ugexe m: say comb //, "aesthetics"
01:48 camelia rakudo-moar 780f07: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qVZXxTgZTp␤Null regex not allowed␤at /tmp/qVZXxTgZTp:1␤------> 3say comb //7⏏5, "aesthetics"␤»
01:48 hotel it works if you use your own sub
01:48 ZoffixWin m: say comb /./, "aesthetics";
01:48 camelia rakudo-moar 780f07: OUTPUT«(a e s t h e t i c s)␤»
01:48 hotel m: sub foo($t) { return $t.comb; } say foo "hello";
01:48 camelia rakudo-moar 780f07: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FEm7QYd0td␤Strange text after block (missing semicolon or comma?)␤at /tmp/FEm7QYd0td:1␤------> 3sub foo($t) { return $t.comb; }7⏏5 say foo "hello";␤    expecting any of:␤        infix␤        …»
01:48 hotel m: sub foo($t) { return $t.comb }; say foo "hello";
01:48 camelia rakudo-moar 780f07: OUTPUT«(h e l l o)␤»
01:48 ZoffixWin :
01:49 ZoffixWin :\
01:49 ZoffixWin hotel, that's nonsense.
01:49 hotel how so?
01:50 ugexe looks like method comb and sub comb are missing that relation
01:50 ZoffixWin hotel, comb sub always needs a matcher. Method form breaks up into characters without a matcher.
01:50 ZoffixWin hotel, so instead of actually giving it a matcher, you're creating a whole 'nother sub just to call it with a default matcher that breaks up into characters
01:50 ugexe no matcher method comb has been touted for splitting a string into individual letters though
01:51 hotel ^
01:51 ZoffixWin It uses substr, yes: https://github.com/rakudo/rakud​o/blob/nom/src/core/Str.pm#L121
01:51 ugexe creating a new sub for it though is indeed pointless
01:51 ugexe m: say "hello".comb
01:51 camelia rakudo-moar 780f07: OUTPUT«(h e l l o)␤»
01:51 hotel hey I'm learning don't bite my head off
01:52 ZoffixWin ¯\_(ツ)_/¯
01:52 * ZoffixWin is just talking
01:52 ugexe i dont think anyone knows all of perl6, dont sweat it
01:52 hotel haha
01:52 ZoffixWin FWIW: http://perl6.party/post/20160425-Perl6-Comb-It
01:53 ZoffixWin surprisingly, I never bother to mention any usecase of the sub form of .comb :/
01:53 hotel I mean, of course I wouldn't make a sub to call comb normally, I was just making sure stuff worked :P
01:54 ZoffixWin hotel, IMO, you should rakudobug this. I see no reason why sub comb(Str) should not break up into chars: https://github.com/rakudo/rakudo/blob/c40374237bf9​86ef972a7e59aeb671eae72ac69f/src/core/Cool.pm#L338
01:54 ZoffixWin For consistency with the method form, it should
01:54 hotel what do you mean?
01:54 hotel like it shouldn't require a match?
01:55 grondilu tadzik: panda question: do I still have to run ./bootstrap.pl everytime I recompile rakudo
01:55 grondilu ?
01:55 Ben_Goldberg joined #perl6
01:55 ZoffixWin hotel, right. comb "blah"; should behave the same as "blah".comb; And it's possible, but simply not implemented. Report it: https://github.com/rakudo/rakudo/#reporting-bugs
01:55 hotel alright, wilco
01:56 ZoffixWin hotel++
01:56 ugexe or overengineer a solution with &comb.wrap or MONKEY-TYPING
01:56 ZoffixWin :)
01:58 grondilu nevermind I had a syntax error in my META.info
01:58 Ben_Goldberg joined #perl6
02:00 ugexe you can probably get a PR in with `multi sub comb(Cool $input, $limit = *) { $input.comb($limit) }` at https://github.com/rakudo/rakudo/blob/c40374237bf9​86ef972a7e59aeb671eae72ac69f/src/core/Cool.pm#L342 (untested)
02:01 ugexe that proto ($, $, $?) might not like that though
02:01 BenGoldberg_ joined #perl6
02:03 hotel protos are default signatures?
02:03 ZoffixWin That creates ambiguity between comb Int, $input. No $limit should be there. As in method form: https://github.com/rakudo/rakudo/blob/c40374237bf9​86ef972a7e59aeb671eae72ac69f/src/core/Cool.pm#L246
02:04 * ZoffixWin still has no idea wtf protos are :P
02:04 hotel oh
02:05 BenGoldberg joined #perl6
02:05 * hotel sets out to build an http server out of pieces of scrap metal and rusty tools
02:05 ZoffixWin heh... hotel++ # nice rt signature :PO
02:05 ugexe ($, $, $?) means 2 required positionals and an optional 3rd positional (like perl5)
02:06 ZoffixWin ugexe, what it means is clear, but why is it needed? What does it do?
02:06 * ZoffixWin submits a PR to fix the comb() stuff along with the tests in roast
02:06 ugexe proto itself is for handling dispatching, so it would affect nextsame/callsame etc type stuff
02:06 hotel I didn't think it was clear
02:07 ZoffixWin hotel, it's good enough
02:07 ugexe it also gives you a single item to `is export` and whatnot
02:07 hotel no I mean what the protos mean
02:07 ZoffixWin Ah
02:08 ugexe or do stuff like `proto foo { {*}.say }; multi method foo { "42" }`
02:08 ZoffixWin Yeah, I still have no clue. Even with ugexe's explanation. Wouldn't dispatching handle the same with multies and what not?
02:08 * ZoffixWin leaves this for "another day"
02:08 ugexe if you have multis from multiple roles/classes then i believe it helps act as the authority
02:08 hotel like a template or something?
02:09 ugexe thats how I use them
02:10 hotel cool
02:10 BenGoldberg joined #perl6
02:10 * hotel forgot how to import modules
02:10 ZoffixWin use blah;
02:11 ugexe `proto foo { {*}.say }; multi method foo(Int $a) { "42" }; multi method foo(Str $a) { "fourty two" }` -> xxx.foo(1) (says 42) xxx.foo("x") (says fourty two)
02:11 grondilu also the lexical scope must be defined on the proto
02:11 ugexe so you can also put some top level shared code in them
02:11 grondilu you can't do 'our multi'
02:11 hotel oh it's imperative not gerund
02:11 hotel ZoffixWin++
02:12 ugexe s/.say/.IO/ and it will always return an IO::Path
02:14 cpage_ joined #perl6
02:16 hotel m: my constant H = 10; say H;
02:16 camelia rakudo-moar 780f07: OUTPUT«10␤»
02:16 noganex_ joined #perl6
02:16 hotel so constants don't need sigils?
02:17 ZoffixWin nope
02:17 ZoffixWin m: my \Δ = 10; say Δ;
02:17 camelia rakudo-moar 780f07: OUTPUT«10␤»
02:19 hotel is \ shorthand for constant?
02:19 ZoffixWin I wouldn't say shorthand. I think it's something to do with having containerless variables or something
02:19 * ZoffixWin is too drunk to give good advice :P
02:20 hotel again? lol
02:20 ZoffixWin I'm quitting tomorrow! I promise!
02:20 ZoffixWin :P
02:23 hotel tomorrow's friday though
02:23 hotel can't expect you to :P
02:24 ZoffixWin For me, today is Friday :P I booked tomorrow off.
02:24 hotel what are the colon things in method calls again?
02:24 hotel oh gg
02:24 ZoffixWin Like foo.bar: 'blah'? They let you omit using parentheses
02:24 hotel my $listen = IO::Socket::INET.new(:listen, :localport(3333));
02:24 ZoffixWin Oh, those are just pairs
02:25 ZoffixWin my $listen = IO::Socket::INET.new(listen => True, localport => 3333);
02:25 hotel interesting
02:25 ZoffixWin named args
02:26 ZoffixWin m: sub foo (:$name, :$num) { say "\$name is $name and \$num is $num" }; foo :name<Foo> :num<42>
02:26 camelia rakudo-moar 780f07: OUTPUT«$name is Foo and $num is 42␤»
02:26 ZoffixWin m: sub foo (:$name, :$num) { say "\$name is $name and \$num is $num" }; foo :name<Foo> :42num
02:26 camelia rakudo-moar 780f07: OUTPUT«$name is Foo and $num is 42␤»
02:27 ZoffixWin (you don't need commas if all you got are named args)
02:27 ugexe m: sub foo(:a(:b(:$c))) { say $c; }; foo( a => 42 ) # also can do aliases
02:27 camelia rakudo-moar 780f07: OUTPUT«42␤»
02:27 ZoffixWin :o
02:28 ZoffixWin That's awesome ugexe++
02:28 ugexe handy for writing short versions of MAIN args
02:30 ugexe perl6 -e 'sub MAIN(:o(:$out)!) { say $out }' # Usage: -e '...' -o|--out=<Any>
02:33 nowan joined #perl6
02:41 ZoffixWin this is annoying... spectest in a VM eats so much CPU it interrupts my music in Windows host :/  Windows--
02:42 * ZoffixWin spins up 20-core 98GB-RAM Linode box just because he can o/
02:42 ugexe building jvm rakudo on windows would freeze my entire machine for a few seconds ever 10 seconds or so
02:43 ugexe also spins the fan up faster than any game i've put it through :x
02:45 hotel some spectests don't work on windows iirc
02:48 pierre_ joined #perl6
02:50 hotel is there a standard for using single quotes vs double quotes? I know double quotes do some extra fancy stuff, so is there really a reason to use single quotes?
02:51 * ZoffixWin uses single quotes when he doesn't expect to have "extra fancy stuff" to happen
02:52 hotel is there a benefit to doing that though?
02:52 ZoffixWin Lack of bugs due to accidental interpolation
02:52 hotel ah
02:53 ZoffixWin Lack of bugs due to accidental interpolation
02:53 ZoffixWin m: say "Email me at foobar@zoffix.com"
02:53 camelia rakudo-moar 780f07: OUTPUT«Email me at foobar@zoffix.com␤»
02:53 ZoffixWin :/
02:53 ZoffixWin Well, at least that was my reasoning back when using Perl 5 :P
02:54 ugexe m: say "C:\t\foo"
02:54 camelia rakudo-moar 780f07: OUTPUT«C:   oo␤»
02:54 Ben_Goldberg joined #perl6
02:54 ugexe email addresses always get me in perl5 too
02:54 ZoffixWin Ah, right, in P6 you need to have [] after arrays when interpolating
02:55 ugexe we get this one instead tho
02:55 ugexe m: say "{"
02:55 camelia rakudo-moar 780f07: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h8d2QyyEn0␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/h8d2QyyEn0:1␤------> 3say "{"7⏏5<EOL>␤    expecting any of:␤        double quotes␤        term␤»
02:55 hotel what are the rules for doing the thing where $foo.bar "baz"; works?
02:55 ZoffixWin Yup. Any time you try to put CSS in a interpolating heredoc :P
02:57 ZoffixWin m: class F { method bar ($x) {"Foo $x"}}; my $meow = F.new; sasy "$meow.bar("42")"
02:57 camelia rakudo-moar 780f07: OUTPUT«5===SORRY!5=== Error while compiling /tmp/m0WoB2HqNq␤Undeclared routine:␤    sasy used at line 1. Did you mean 'say'?␤␤»
02:57 ZoffixWin ..... "sasy"? 0.o
02:57 ZoffixWin Ohhh
02:57 ZoffixWin m: class F { method bar ($x) {"Foo $x"}}; my $meow = F.new; say "$meow.bar("42")"
02:57 camelia rakudo-moar 780f07: OUTPUT«Foo 42␤»
02:58 ZoffixWin use just () for method calls with no args
02:58 hotel rip in peace http://puu.sh/oHREW/24b14fb92e.png
02:58 hotel apparently the HTTP::Headers module doesn't add in the HTTP/1.1 part
02:58 ugexe m: class Foo { method bar { 42 }; }; say Foo.new."bar"() # ?
02:58 camelia rakudo-moar 780f07: OUTPUT«42␤»
02:59 ugexe ah
03:00 cpage_ joined #perl6
03:00 ZoffixWin For a 20-core 98GB-RAM box, Perl 5 is sure taking its sweet ass time installing and testing itself :/
03:01 hotel are you on a server? 0.0
03:02 milwaukee joined #perl6
03:02 hotel also http://downloadmoreram.com because it sounds like you don't have enough
03:02 ZoffixWin yeah. I'm on Linode.com
03:02 ZoffixWin pfft... what do you mean!? I have 98GB of it! :D
03:03 ZoffixWin Default perlbrew perl5 tests are just stupid
03:03 * ZoffixWin blames mst for all of this
03:03 ZoffixWin Why? Just 'cause I can! :P
03:03 hotel just download some more ram ^^
03:05 ugexe to be fair, HTTP/1.1 isnt a header line. then again neither is the status line but that is there (200 OK)
03:06 hotel oh good point
03:06 ugexe well, unless it in `Status: 200` or whatever format
03:07 * hotel is dumb again
03:07 BenGoldberg joined #perl6
03:07 ugexe i imagine his intention though is to have the http api separate so you can use 1.0 *or* 1.1. but its doubtful to work with 2.0
03:07 milwaukee joined #perl6
03:09 hotel|chagrin pshah who uses 2.0 anyway
03:10 hotel|chagrin also, for some reason, writing "HTTP/1.1 200 OK" to the client's connection makes it so that nothing else is written
03:10 ugexe need more streams to get those ads to you faster
03:10 BenGoldberg joined #perl6
03:11 ugexe maybe its only feeding a \n instead of \r\n?
03:12 ugexe if thats supposed to be the entire thing, it needs to be \r\n\r\n
03:13 hotel|chagrin https://gist.github.com/HotelCalifor​nia/544774c4be6d1e3717f2b79c27530eca
03:14 ugexe ah, yep
03:14 ugexe headers are separated from body by a double \r\n (\r\n\r\n)
03:14 hotel|chagrin oh
03:15 hotel|chagrin cool
03:15 ugexe you are sending a single \n
03:15 hotel|chagrin did not know that
03:15 ugexe many servers accept \n in place of \r\n i think though, so \n\n may work
03:15 ugexe https://github.com/ugexe/Perl6-Grammar​--HTTP/blob/master/t/01-http-grammar.t
03:15 ugexe there are some valid example requests
03:16 hotel|chagrin I'm reading a tutorial and translating from python
03:16 hotel|chagrin the guy used a docstring for his response so I missed the second newline
03:17 ugexe you can also use that grammar via `say Grammar::HTTP.parse($http-request)` to see if its a valid request
03:18 ugexe and if its not, put a `use Grammar::Tracer;` above it and it'll show you exactly how it gets parsed and where the match failed
03:18 hotel|chagrin oh that's what that does
03:24 cpage_ joined #perl6
03:27 cdg joined #perl6
03:29 BenGoldberg joined #perl6
03:31 ZoffixWin time TEST_JOBS=1000 make spectest
03:31 ZoffixWin real    3m51.235s
03:32 hotel well, guess it's time for bed
03:32 hotel|netteiru night
03:32 ZoffixWin Failures: https://gist.github.com/zoffixznet​/8b630dc6b6042519267746adfe65565e
03:32 ZoffixWin night
03:33 ZoffixWin time TEST_JOBS=100 make spectest
03:33 ZoffixWin 1m53.111s
03:33 ZoffixWin Failures: https://gist.github.com/zoffixznet​/5ee59ff139fd39db84f558dca01e6f75
03:35 BenGoldberg joined #perl6
03:39 ZoffixWin :o
03:40 ZoffixWin Fuck me.... Deleted the wrong Linode by mistake lol
03:40 ZoffixWin alcohol--
03:41 ZoffixWin Oh well... free upgrade!
03:42 sno joined #perl6
03:44 sno joined #perl6
03:48 astj joined #perl6
04:08 aries_liuxueyang joined #perl6
04:09 cdg joined #perl6
04:32 jack_rabbit joined #perl6
04:53 buharin joined #perl6
05:00 Cabanossi joined #perl6
05:00 astj_ joined #perl6
05:05 zacts joined #perl6
05:06 Actualeyes joined #perl6
05:13 astj joined #perl6
05:14 ufobat joined #perl6
05:18 ufobat morning :)
05:23 sortiz \o ufobat
05:24 aries_liuxueyang joined #perl6
05:26 rurban joined #perl6
05:26 pierre_ joined #perl6
05:29 MadcapJake trying to understand channels more and I am getting "Tried to read() on a socket from outside its originating thread" https://gist.github.com/MadcapJake/c29b76d​7eccf5af86e973c5da7c7f7a3#file-workers-pl6
05:29 nwc10 joined #perl6
05:30 nwc10 they're going to need a bigger hanger.
05:33 itcharlie left #perl6
05:36 buharin joined #perl6
05:47 Actualeyes joined #perl6
06:02 pierre_ joined #perl6
06:02 nwc10 https://twitter.com/elonmus​k/status/728459808270000128 :-)
06:11 Ven joined #perl6
06:20 firstdayonthejob joined #perl6
06:25 CIAvash joined #perl6
06:32 wamba joined #perl6
06:39 Ven > Invalid GC status observed; aborting
06:40 Ven ^ anyone used GTK::Simple in the past 6 months observed something akin to that?
06:40 Ven who*
06:51 sjoshi joined #perl6
07:00 masak mornz, #perl6
07:00 pierre_ joined #perl6
07:01 masak Ven: I got some segfaults recently when running on top of HTTP::Server::Tiny. but nothing GC-related
07:01 domidumont joined #perl6
07:04 abraxxa joined #perl6
07:06 domidumont joined #perl6
07:11 jack_rabbit joined #perl6
07:11 [particle] joined #perl6
07:12 sjoshi joined #perl6
07:15 xxpor joined #perl6
07:18 maybekoo2 joined #perl6
07:18 Relsak joined #perl6
07:31 pierre_ joined #perl6
07:47 rindolf joined #perl6
07:47 g4 joined #perl6
07:55 domidumont joined #perl6
07:56 chansen__ joined #perl6
08:00 darutoko joined #perl6
08:01 sno joined #perl6
08:02 RabidGravy joined #perl6
08:04 jnap__ joined #perl6
08:08 tadzik grondilu: I don't think it's necessary anymore; what happens if you don't? :)
08:33 stmuk ZoffixWin: submit a PR for https://github.com/stmuk/pl6an​et.org/blob/master/perlanetrc
08:34 tharkun joined #perl6
08:34 stmuk BTW your use of a comma rather than colon meant irssi didn't alert me there!
08:41 Emeric joined #perl6
08:42 nadim Morning all
08:47 moritz \o
08:51 RabidGravy ero
08:53 psch o/
08:53 psch m: role R { multi method foo(::?CLASS:U: ) { "foo" } }; class C does R { multi method foo(::?CLASS:D: ) { "bar" } }; say C.^can('foo').perl; say C.new.^can('foo').perl;
08:53 camelia rakudo-moar 780f07: OUTPUT«(method foo (::T  $: | is raw) { #`(Method|75023040) ... },)␤(method foo (::T  $: | is raw) { #`(Method|75023040) ... },)␤»
08:54 psch i kind of wish there were two elems in that method list
08:55 psch m: role R { multi method foo(::?CLASS:U: ) { "foo" } }; class C does R { multi method foo(::?CLASS:D: ) { "bar" } }; say C.foo; say C.new.foo
08:55 camelia rakudo-moar 780f07: OUTPUT«foo␤bar␤»
08:55 psch it works, but i need do know if i already added the :D candidate, 'cause i'm doing that during BUILD and only want to add when it's not around yet
08:55 psch s/do/to/
08:57 psch m: role R { multi method foo(::?CLASS:U: ) { "foo" } }; class C does R { submethod BUILD { self.^add_multi_method('foo', my method (::?CLASS:D: ) { "bar" }) } }; say C.foo; say C.new.foo  # ah, this is what i'm actually doing
08:57 camelia rakudo-moar 780f07: OUTPUT«foo␤Cannot call foo(C: ); none of these signatures match:␤    (C:U $: *%_)␤  in block <unit> at /tmp/OD8LWVDckN line 1␤␤»
08:57 psch ...well, minus "the role is also applied during BUILD" :)
09:01 Ven joined #perl6
09:05 pierre_ joined #perl6
09:06 jnthn psch: Wouldn't that add a multi method to the class (static) on every instantiation (dynmaic)?
09:06 psch jnthn: well, yes.  that's why i want to know how many candidates i already have, so i don't do that if it's been done with this specific Class + Role combination already
09:07 jnthn Also add_multi_method doesn't actually add it right away, it stores it up until compose time, to see if we end up with a proto
09:08 jnthn And doing such things at runtime will make the code need "no precompilation"
09:08 jnthn To work out reliabily, at least.
09:08 psch hm, so i probably just stick with different names for the methods
09:09 jnthn If you want to find out about what candidates a given proto controls, though, there's .candidates
09:09 nwc10 left #perl6
09:09 psch ...i though i tried that and didn't get anything
09:09 psch maybe did it on the List from find_method i guess
09:09 jnthn find_method doesn't return a List...that's can
09:10 psch ...i'll finish my coffee :)
09:10 jnthn ;-)
09:10 jnthn Not through my first today yet :)
09:11 psch well, the scenario is that i have a class C, that during BUILD mixes in one of multiple roles.  some of these roles supply methods that return C with a different role mixed in
09:12 john51 joined #perl6
09:12 psch well, actually BUILD adds the method, the role just knows which different role it has to be
09:13 psch and i had though "hey, maybe you can just reuse the method name for :U and :D so :U returns the role that have to be mixed in and :D returns the list of methods that return a C+{$thatrole}"
09:13 psch 'cause that'd be nice from a naming perspective :)
09:14 psch but yeah, i guess i'll just pull that into {$methodname}-roles and {$methodname}-methods
09:21 wamba joined #perl6
09:23 RabidGravy I'm having unhealthy thoughts about implementing something with POSIX message queues
09:28 pierre_ joined #perl6
09:30 RabidGravy actually I'm not sure it would work due to mq_notify requiring a struct one of who's members is a callback
09:35 cognominal joined #perl6
09:39 pierre_ joined #perl6
09:47 sortiz RabidGravy, Umm, I think that the SIGEV_SIGNAL case maybe work. The SIGEV_THREAD case requires MoarVM special support, thought.
10:12 kaare_ joined #perl6
10:19 Actualeyes joined #perl6
10:29 psch m: my $async = -> @a { say @a; sleep 1; say @a }; my @b = ^5; start { $async(@b) }; sleep 0.5; @b = 5..10; sleep 2  # how do i get ^5 both times..?
10:29 camelia rakudo-moar 780f07: OUTPUT«[0 1 2 3 4]␤[5 6 7 8 9 10]␤»
10:30 psch pointies don't default to 'is copy'?
10:30 moritz no
10:30 psch m: my $async = sub (@a) { say @a; sleep 1; say @a }; my @b = ^5; start { $async(@b) }; sleep 0.5; @b = 5..10; sleep 2
10:30 camelia rakudo-moar 780f07: OUTPUT«[0 1 2 3 4]␤[5 6 7 8 9 10]␤»
10:31 psch m: my $async = sub (@a is copy) { say @a; sleep 1; say @a }; my @b = ^5; start { $async(@b) }; sleep 0.5; @b = 5..10; sleep 2
10:31 camelia rakudo-moar 780f07: OUTPUT«[0 1 2 3 4]␤[0 1 2 3 4]␤»
10:31 psch ...and @-s don't either, apparently
10:34 boegel joined #perl6
10:35 colomon joined #perl6
10:46 wamba joined #perl6
10:49 sno joined #perl6
11:01 espadrine_ joined #perl6
11:08 masak psch: a thing *is* copied in the above code. it's just not the thing you expect.
11:09 masak m: sub foo(@a) { say(@a); bar(); say(@a) }; my @x = 1, 2, 3; sub bar { @x = 4, 5 }; foo()
11:09 camelia rakudo-moar 780f07: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Qh_U7BspgF␤Calling foo() will never work with declared signature (@a)␤at /tmp/Qh_U7BspgF:1␤------> 3my @x = 1, 2, 3; sub bar { @x = 4, 5 }; 7⏏5foo()␤»
11:09 masak m: sub foo(@a) { say(@a); bar(); say(@a) }; my @x = 1, 2, 3; sub bar { @x = 4, 5 }; foo(@x)
11:09 camelia rakudo-moar 780f07: OUTPUT«[1 2 3]␤[4 5]␤»
11:09 psch moritz: well, yes.  the array is copied, which copies "which container does @a[0] point to"
11:09 masak ^ simpler example, without threads
11:09 masak psch: I'm over here
11:09 psch masak: whoops, sorry :/
11:09 masak no, the array *reference* is copied
11:09 masak which isn't intuitive, but it's consistent
11:09 * psch purposefully avoided the word "reference"
11:09 psch instance probably?
11:09 masak you don't get two arrays, you get two references to the same array
11:10 psch anyway, yeah, i get it :)
11:10 masak I wouldn't avoid the word "reference" here, since it's key to understanding what's going on :P
11:11 psch masak: well, i don't like using it 'cause it's pragmatically overloaded from Perl 5
11:11 masak fairy nuff
11:11 psch as in, "list of arrayrefs" for ([1,2], [3,4])
11:11 masak that's the same meaning in Perl 6 in my mind, fwiw
11:12 psch then i probably have my own, weird, pragmatic for "arrayref" which means something more Perl 5-specific
11:13 masak you should look into that :P
11:13 psch m: sub f($x, @a is copy) { say $x; say @a }; my @c = ^5; my &g = &f.assuming(*, @c); g(1); @c = 5..^10; g(1)
11:13 camelia rakudo-moar e3ded7: OUTPUT«1␤[0 1 2 3 4]␤1␤[5 6 7 8 9]␤»
11:14 psch that's closer to my actual problem, fwiw.  taking the thready bits with me was not necessary...
11:14 psch not sure i can close over @c there
11:14 psch m: sub f($x, @a is copy) { say $x; say @a }; my @c = ^5; my &g = &f.assuming(*, my @ = @c); g(1); @c = 5..^10; g(1)
11:14 camelia rakudo-moar e3ded7: OUTPUT«1␤[0 1 2 3 4]␤1␤[0 1 2 3 4]␤»
11:14 psch actually yeah nvm
11:14 wamba joined #perl6
11:16 psch hm, curiously that doesn't actually work in my actual code :/
11:16 masak I've come to the reluctant conclusion that the only actual solution to reference/aliasing/ownership problems (besides going 100% immutable) is what Rust is doing
11:17 moritz how well does it work in Rust?
11:17 moritz from what I've heard, it seems to place a very heavy burden on the type system
11:18 masak it does force you to think about borrowing/ownership in about the same way as any strict type system forces you to think about return types and parameter types
11:18 masak beyond that, I'm not sure. ENEEDMORERUSTEXPERIENCE
11:18 awwaiid How about selective-immutable, OCaml style?
11:19 masak awwaiid: where can I read more about that?
11:19 boegel joined #perl6
11:19 masak awwaiid: all I know is that in Perl 6, we don't do a good enough job of tracking immutability.
11:20 masak moritz: probably https://github.com/servo/servo is a great showcase of a "real-world" project using borrowing in actual situations
11:20 awwaiid I might have made it sound more like a thing than it is -- basically in OCaml things are immutable by default and you go out of your way to use refs. So it is common to use Okaski's purely functional data structure (http://www.amazon.com/Purely-Functional-​Structures-Chris-Okasaki/dp/0521663504)
11:21 awwaiid masak: OCaml itself is written in OCaml, might be interesting to do a read through their code
11:21 masak aha.
11:21 masak well, I'd file that under "going 100% immutable", in a way
11:21 masak and refs are basically a mechanism for you to opt out of the immutability
11:22 masak I would say such a solution is not an option for Perl 6, because it'd change the core nature of the language too much
11:22 psch https://gist.github.com/peschwa/​f60774251b53e47496a0167ffd7265f7 # the first call to .riff inside the start in L19 has the original @chords, the second has the new one
11:22 awwaiid hm. yeah -- even their built-in hash is immutable
11:23 kid51 joined #perl6
11:23 awwaiid psch: what does "@inner-chords[$++ % *]" mean?
11:24 masak awwaiid: "modulo length of array"
11:24 awwaiid I mean ... my guess is it is modding an incrementing thing
11:24 masak yes, an incrementing anon state variable
11:24 moritz $ is an anonymous state var
11:24 moritz so it's just giving an incrementing sequence
11:24 psch awwaiid: yeah, it's incrementing a state variable and modulos it the array length to not go out of bounds
11:24 awwaiid ah. so $++ is incrementing the anon state. gotchya
11:24 awwaiid thanks
11:25 masak m: my @things = <a b c>; for ^10 { @things[$++ % *] = $++ }; say @things
11:25 camelia rakudo-moar e3ded7: OUTPUT«[9 7 8]␤»
11:25 grondilu joined #perl6
11:26 moritz : my @things = <a b c>; say @things[$++ % *] for ^10
11:26 moritz m: my @things = <a b c>; say @things[$++ % *] for ^10
11:26 camelia rakudo-moar e3ded7: OUTPUT«a␤b␤c␤a␤b␤c␤a␤b␤c␤a␤»
11:27 masak m: my @things = <a b c>; say @things[$++ % *] and @things[$++ % *] = "bacon" for ^10
11:27 camelia rakudo-moar e3ded7: OUTPUT«a␤b␤c␤bacon␤bacon␤bac​on␤bacon␤bacon␤bacon␤bacon␤»
11:31 awwaiid yeah. Makes sense. Kinda dense, but now that I'm looking at it I guess the line above it is for debugging/watching, so this would maybe normally be a one-liner
11:34 Ven joined #perl6
11:38 finanalyst joined #perl6
11:49 vendethiel joined #perl6
11:50 kurahaupo joined #perl6
11:54 psch oh, i see my error in the gist, actually
11:54 psch the .assuming is ran repeatedly
11:58 jdv79 assumptions are dangerous
12:00 [Sno] joined #perl6
12:10 sno joined #perl6
12:15 ZoffixWin joined #perl6
12:15 ZoffixWin joined #perl6
12:16 rindolf joined #perl6
12:17 * sortiz wondering why people use @foo almost only for Array and %foo only for Hash. Fear of immutability? Perl5 habit?
12:17 ZoffixWin Oh man. Waking up, reading logs and seeing this: http://irclog.perlgeek.de/p​erl6/2016-05-06#i_12441561
12:17 * ZoffixWin feels sorry for AlexDaniel spending time teaching huggable all the tricks
12:18 ZoffixWin sortiz, what else do you use them for?
12:18 moritz m: say Match ~~ Associative
12:18 camelia rakudo-moar d9803a: OUTPUT«False␤»
12:19 moritz I guess you could use them for Set as well
12:19 moritz and @ for Blob/Buf
12:20 sortiz ZoffixWin, my @foo is Array by default, but any Positional can be used, and the same for my %foo, where the default is Hash, but any Associative is valid.
12:20 moritz http://doc.perl6.org/type/Positional the type graph shows some arrows twice
12:20 moritz like NFKC => Uni
12:21 moritz oh, probably because they appear twice in type-graph.txt
12:21 ZoffixWin sortiz, oh. I guess Perl 5 habit then :P I didn't know they could do that
12:21 dalek ecosystem: 5ed988f | titsuki++ | META.list:
12:21 dalek ecosystem: Add App::AizuOnlineJudge to ecosystem
12:21 dalek ecosystem:
12:21 dalek ecosystem: See https://github.com/titsuki/p6-App-AizuOnlineJudge
12:21 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5ed988f03b
12:21 dalek ecosystem: 68a991f | titsuki++ | META.list:
12:21 dalek ecosystem: Merge pull request #203 from titsuki/add-aoj
12:21 dalek ecosystem:
12:21 dalek ecosystem: Add App::AizuOnlineJudge to ecosystem
12:21 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/68a991f188
12:21 dalek doc: 413a693 | moritz++ | type-graph.txt:
12:21 dalek doc: Remove double defintion of Uni and related types
12:21 dalek doc: review: https://github.com/perl6/doc/commit/413a6939e9
12:21 domidumont joined #perl6
12:21 cdg joined #perl6
12:22 grondilu I'm trying to use panda on windows and it fails installing a package.  Error seems to point at a lack of "prove" on my system.  I thought it was shipped in since it must have used it to install whatever aleaday is install, musn't it?
12:23 grondilu already is installed
12:23 moritz grondilu: how did you install panda?
12:23 grondilu I got it from rakudo*
12:23 grondilu (I suppose)
12:23 moritz grondilu: from the MSI?
12:23 grondilu yes
12:23 moritz grondilu: then it might not even have run prove on installation
12:24 grondilu though I did try to install rakudo (not star) previously
12:24 grondilu so maybe there are remnants or something
12:24 moritz do you have p5's prove installed?
12:24 stmuk grondilu: the windows panda doesn't work without --notest see http://www.perl6.org/downloads/ errata
12:24 grondilu ok
12:26 grondilu confirmed.  Works with --notests
12:27 sortiz m: my @l is List.new: |<a b c d e>; my @b is Buf; @b.push(|(1..10)); dd @l,@b; # For example ZoffixWin
12:27 camelia rakudo-moar d9803a: OUTPUT«()␤Buf.new(1,2,3,4,5,6,7,8,9,10)␤»
12:27 stmuk panda doesn't call prove correctly on Windows even when prove is installed .. zef is recommended
12:28 * grondilu never used zef
12:29 stmuk also see http://blogs.perl.org/users/itcharlie/2016/04/n​eed-perl6-modules-on-windows-then-use-zef.html
12:29 ZoffixWin sortiz, but what's the point of using @ in there?
12:31 ZoffixWin moritz, do you have easy access to this channel's IRC logs that you could zip up everything from November to today and give it to me? If I grep them for commands to huggable and then replay those to the new instances, I should be able to restore its database.
12:31 sortiz Mark them as Positional or Associative. Ie capables of subscripting.
12:32 ufobat ZoffixWin, i'd try to look into this this afternoon.
12:33 moritz ZoffixWin: I can try come up with something
12:33 ufobat ZoffixWin, have you tried something like "say $app.renderer.perl"?
12:33 ZoffixWin ufobat, no rush. I accidentally destroyed my server last night so I'll be a bit busy :P
12:33 ufobat oh sh... :(
12:33 sortiz ZoffixWin, Otherwise, why use different sigils in the first place?
12:34 ZoffixWin m: my $l = List.new: |<a b c d e>; say $l[2..3]
12:34 camelia rakudo-moar d9803a: OUTPUT«(c d)␤»
12:34 ZoffixWin sortiz, to get the default hash/array stuff. To me, sigils feel a bit misdesigned in Perl 6. Maybe I don't get what their purpose is
12:35 ZoffixWin sortiz, the $l above has subscribting capabilities, so I'm unsure what benefit there is in using a @l
12:36 sortiz m: my @l := <a b c>; .say for @l; my $l = <f g h>; .say for $l;
12:36 camelia rakudo-moar d9803a: OUTPUT«a␤b␤c␤(f g h)␤»
12:37 psch m: sub f(+@a) { say @a.perl }; my @a = <a b c d e>; my $l = List.new: |<a b c d e>; f @a; say f $l
12:37 camelia rakudo-moar d9803a: OUTPUT«["a", "b", "c", "d", "e"]␤[("a", "b", "c", "d", "e"),]␤True␤»
12:37 psch -spurious say
12:37 psch that's what's underlying sortiz++ example
12:37 moritz ZoffixWin: select ilbot_lines.line FROM ilbot_lines JOIN ilbot_day ON ilbot_day.channel = 38 WHERE ilbot_day.day >= '2015-11-01' AND ilbot_lines.line LIKE '%huggable' ORDER BY ilbot_lines.timestamp;
12:37 moritz ZoffixWin: does that look workable to you? or do you need more info?
12:37 moritz like, nickname, timestamp, whatever?
12:38 ZoffixWin moritz, looks good.
12:38 ZoffixWin sortiz, why did you use := instead of normal =?
12:38 MilkmanDan joined #perl6
12:38 andreoss joined #perl6
12:39 andreoss m: "".ord.chr.say
12:39 camelia rakudo-moar d9803a: OUTPUT«␤»
12:40 moritz ZoffixWin: http://moritz.faui2k3.org/tmp/huggable.txt.gz I hope that helps
12:40 sortiz m: my @a = <a b c>;  my @l := <a b c>; say @a.WHAT,@l.WHAT;
12:40 camelia rakudo-moar d9803a: OUTPUT«(Array)(List)␤»
12:40 lizmat m: "".ord.say
12:40 camelia rakudo-moar d9803a: OUTPUT«Nil␤»
12:40 andreoss for me it gives warning `Use of nil in a numeric context`
12:40 andreoss should it?
12:40 sortiz ZoffixWin, ^^^
12:40 lizmat m: Nli.chr
12:40 camelia rakudo-moar d9803a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JXsA3HLtxr␤Undeclared name:␤    Nli used at line 1. Did you mean 'Nil'?␤␤»
12:41 moritz .uni Q
12:41 lizmat m: Nil.chr
12:41 camelia rakudo-moar d9803a: OUTPUT«Use of Nil in numeric context  in block <unit> at /tmp/rs7mKswII4 line 1␤»
12:41 Skarsnik joined #perl6
12:41 ZoffixWin moritz, that looks weird :P
12:41 moritz ZoffixWin: agreed
12:41 lizmat andreoss: I think the warning is correct
12:41 andreoss m: "".ord.chr.say
12:41 camelia rakudo-moar d9803a: OUTPUT«␤»
12:41 ZoffixWin moritz, should that be LIKE '%huggable%' ?
12:41 lizmat "".ord returns Nil, Nil.chr attempts to use Nil as a number
12:41 moritz ZoffixWin: ah, yes
12:42 andreoss lizmat: what happens with ^Q inside the quotes?
12:42 ZoffixWin sortiz, thanks
12:42 lizmat andreoss: ^Q ?
12:42 moritz ZoffixWin: will re-hug :-)
12:43 moritz my mysql instance is just super slow :/
12:43 andreoss m: "".chars.say
12:43 camelia rakudo-moar d9803a: OUTPUT«5␤»
12:44 ZoffixWin m: "".uninames.say
12:44 camelia rakudo-moar d9803a: OUTPUT«(DEVICE CONTROL ONE DEVICE CONTROL ONE DEVICE CONTROL ONE DEVICE CONTROL ONE DEVICE CONTROL ONE)␤»
12:44 moritz oh, forgot a JOIN condition
12:45 moritz ZoffixWin: please re-download from the same URL
12:45 andreoss m: say elems qw[  ]
12:45 camelia rakudo-moar d9803a: OUTPUT«3␤»
12:46 ZoffixWin moritz++ got it. Thanks a lot!
12:46 andreoss m: say (qw[  ])».ord.chr.say
12:46 camelia rakudo-moar d9803a: OUTPUT«␤True␤»
12:46 andreoss m: say (qw[  ])».ord.chr.join.say
12:46 camelia rakudo-moar d9803a: OUTPUT«␤True␤»
12:47 andreoss m: say (qw[  ])».ord
12:47 camelia rakudo-moar d9803a: OUTPUT«(17 17 17)␤»
12:47 andreoss m: say (qw[  ])».ord».chr.join
12:47 camelia rakudo-moar d9803a: OUTPUT«␤»
12:50 andreoss some warnings are suppressed for camelia?
12:50 jnthn m: say (qw[Q Q Q]).ords».chr.join
12:50 camelia rakudo-moar d9803a: OUTPUT«Q Q Q␤»
12:51 jnthn Ah, qw
12:51 jnthn But on a string I suggest .ords rather than .comb>>.ord
12:52 moritz andreoss: no, camelia doesn't suppress anything
12:54 [Coke] left #perl6
12:55 [Coke] joined #perl6
12:55 wamba joined #perl6
13:02 itaipu joined #perl6
13:03 andreoss seems that Linenoise ignores literal symbols
13:04 andreoss i.e   and so on
13:04 sortiz Yep, Linenoise have serious problems with Unicode
13:05 rindolf joined #perl6
13:05 andreoss is control symbol from ASCII
13:06 moritz ASCII is a subset of Unicode :-)
13:06 andreoss of UTF-8 rather
13:07 moritz ASCII is both an encoding and a character repertoire
13:07 moritz in the latter role, it's a subset of Unicode
13:07 moritz in the former role, of UTF-8
13:08 itaipu joined #perl6
13:17 cdg joined #perl6
13:18 hotel joined #perl6
13:18 masak moritz: wow, I had never thought of that.
13:18 masak so ASCII numbers are *both* characters and codepoints, sort of?
13:19 moritz masak: aye
13:20 sufrostico joined #perl6
13:21 masak life was simpler back then
13:21 perlpilot but then we had to grow up
13:21 masak speak for yerself
13:21 masak :P
13:21 hotel Hey ZoffixWin, they're tearing apart the bug i reported :(
13:22 tadzik I'm still mildly amused when people treat me as a responsible grownup
13:22 perlpilot masak:  that's almost the defining characteristic of growing up: things aren't as simple as they once were.
13:24 masak perlpilot: I'm inclined to agree, provided I'm also allowed to point out that I really enjoy staying in touch with my inner child
13:25 ZoffixWin hotel, what's the URL again?
13:26 hotel https://rt.perl.org/Ticket/Display.html?id=128077
13:26 hotel I'm not smart enough to argue, lol
13:26 ZoffixWin hotel, I had tests and fixes for it last night, but I got too wasted before I committed anything
13:26 hotel Haha
13:26 hotel Well, time for school. Bbl
13:28 itaipu joined #perl6
13:31 kaare__ joined #perl6
13:33 perlpilot masak: sure!  Inner children are awesome!  Let them out as often as you can.  :)
13:33 kaare_ joined #perl6
13:33 timotimo but if you let them out, are they still "inner"?
13:34 perlawhirl joined #perl6
13:36 masak Children/InsideOut.pm
13:39 itaipu joined #perl6
13:40 AlexDaniel joined #perl6
13:41 wamba joined #perl6
13:43 kaare__ joined #perl6
13:47 pierre_ joined #perl6
13:48 zakharyas joined #perl6
13:51 prammer joined #perl6
13:51 dalek modules.perl6.org: 861d999 | (Richard Hainsworth)++ | templates/root/index.html.ep:
13:51 dalek modules.perl6.org: Update index.html.ep
13:51 dalek modules.perl6.org:
13:51 dalek modules.perl6.org: Add href to Citations Index page.
13:51 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/861d999331
13:51 dalek modules.perl6.org: 6714309 | (Zoffix Znet)++ | templates/root/index.html.ep:
13:51 dalek modules.perl6.org: Merge pull request #59 from finanalyst/master
13:51 dalek modules.perl6.org:
13:51 dalek modules.perl6.org: Add link in Modules page template to Citations Index page.
13:51 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/6714309721
13:53 ZoffixWin Any word on the merging of https://github.com/rakudo/rakudo/pull/743 ?
13:54 ZoffixWin I stupidly made it on `nom` branch and now it's kinda annoying to when I try to clone the repo again.
13:55 ZoffixWin I guess it's learning time to figure how to work around that \o/
13:56 ZoffixWin It depends on this merge to roast: https://github.com/perl6/roast/pull/113
14:00 perlpilot joined #perl6
14:00 smls joined #perl6
14:06 Ulti lizmat I notice you are replacing a lot of if/else with conditionals under the commit "streamline" is this actually a performance improvement?
14:06 masak conditionals -- as in ?? !!, yes?
14:06 Ulti yup
14:07 Ulti ternary operators
14:07 Ulti :P
14:07 timotimo yes, it is. it's a guaranteed "doesn't have curlies"
14:07 Ulti is that not something spesh can capture that there is a conditional with only assignment and optimize away the difference?
14:08 timotimo it's something the static optimizer should do, but it doesn't always do it yet
14:09 Ulti by curlies is that producing a closure every time even for control flow?
14:09 timotimo not necessarily
14:09 finanalyst joined #perl6
14:10 timotimo it can definitely cause lexical variables to stay lexical rather than be lowered to locals
14:10 masak I definitely like that we're reaping these short-term performance wins in the setting
14:10 timotimo if you're interested, you can look at the exact code we generate from those things with the spesh log
14:11 masak but sometimes I feel like we should keep a list of "code-degrading optimizations" we're making, so that in the future we can roll them back as the optimizer gets better at handling them
14:11 masak at least if we care about long-term setting niceness
14:11 timotimo anyway, ifs and curlies give us bigger code, which can push our simpler methods above the static inlining threshold
14:12 timotimo that won't trigger too often, but when it does, it's quite good
14:14 ugexe MadcapJake: data from a handle in one thread cant be used in another thread
14:15 ugexe it might appear to work sometimes, but thats because its really using the same thread (even if you put start { } around it)
14:15 Ulti thanks for the explanation
14:16 Ulti I'll remember that if I have some tight loops with that form of assignment
14:16 ugexe MadcapJake: https://github.com/MoarVM/MoarVM/issues/165
14:17 timotimo alternatively, feel free to hack on the static optimizer :)
14:17 perlawhirl Ulti: you did the perl6 commit for GlotIO, yeah?
14:18 Ulti yup
14:18 perlawhirl can the container export RAKUDO_ERROR_COLOR=0, so that compiler errors disaply nicely
14:19 perlawhirl right now they look like this: m===mSORRY!m===m
14:19 Ulti not sure but I can take a look
14:19 Ulti a better plan is not default terminal errors :P
14:19 Ulti all the graphical editors with erorr highlighting get that issue too
14:19 perlawhirl Well, for most terminal users it's a bonus, and doesn't cause issues if they don't use colours
14:19 timotimo why does the thing provide a tty if it can't do ansi colors? :P
14:19 Ulti could check for a tty and not use colours also
14:19 perlawhirl bet yeah, on by default seems an odd choice
14:20 Ulti but guess thats not portable
14:20 timotimo it already does, doesn't it?
14:20 Ulti dont think so
14:20 mr-foobar joined #perl6
14:21 ZoffixWin +1 on fixing GlotIO output to not include trash characters (whatever method used :P)
14:21 perlawhirl i think default-off colours is the most sane way
14:21 literal how do I succintly flatten the return values of zip()? basically I wanted to do something like for @foo Z @bar -> $k, $v { ... }
14:21 timotimo huh, you are right
14:21 teatime lots of things check for tty to decide whether to do colors
14:21 timotimo but we do have "isatty" now, i think
14:22 teatime perlawhirl: so I'd have to alias perl6="perl6 --color=auto" ?
14:22 teatime ah well, I already have like a dozen of those, so another won't hurt :)
14:22 geekosaur m: *IN.t.so.say
14:22 camelia rakudo-moar 7db7b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rAd6s9RaLA␤Two terms in a row␤at /tmp/rAd6s9RaLA:1␤------> 3*7⏏5IN.t.so.say␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤   …»
14:22 ZoffixWin literal, isn't -> ($k, $v) { do the trick?
14:22 geekosaur whoops
14:22 geekosaur m: $*IN.t.so.say
14:22 camelia rakudo-moar 7db7b4: OUTPUT«False␤»
14:22 literal ZoffixWin: ooh, indeed, that works. Thanks
14:24 perlawhirl Ulti: not it's an ENV var... so i think somehow the contanier literally needs to 'export RAKUDO_ERROR_COLOR=0' when it's created
14:24 perlawhirl my words aren't working, but i think that made sense
14:26 perlawhirl ahh, and i was responding to teatime, not Ulti
14:27 teatime oh wut
14:28 perlawhirl not sure how you'd fix it in something like Atom... maybe if you export the env var it just werks?
14:28 ugexe m: say Rakudo::Internals.NUMERIC-EN​V-KEY("RAKUDO_ERROR_COLOR")
14:28 camelia rakudo-moar 7db7b4: OUTPUT«Nil␤»
14:29 khw joined #perl6
14:30 perlawhirl if I may seque to another question, it seems NCurses does not like ANSI colors. is it known, or am i doing something wrong
14:30 teatime umm, I don't understand the question
14:30 perlawhirl i was just trying to use Term::ANSIColor'd strings with NCurses, and it spat out junk
14:30 teatime oh.
14:31 geekosaur yes
14:31 perlawhirl yes...? it has problems?
14:31 geekosaur ncurses has its own color management. it does not parse ANSI sequences, it *creates& them
14:31 perlawhirl oh... ok
14:31 geekosaur this is expected, it is not a bug, and trying to modify it so that it can un-ANSI just so it can re-ANSI would be frustrating and a source of bugs and unexpected behavior
14:32 geekosaur if you want ANSI color with ncurses, use the ncurses color mechanisms
14:32 teatime what is the default flavor of cream soda?  the red one.
14:32 perlawhirl alright.. i'll check the source / ncurses docs
14:33 geekosaur teatime, primary flavor is vanilla, red *may* have cherry added but not as primary flavor
14:34 teatime no, it's not cherry... I was thinking vanilla was probably the answer... vanilla isn't usually red, though, then?
14:34 geekosaur naturally? it's dark brown
14:35 geekosaur but that's in fairly concentrated form; depending on the source, the more diluted form could well be reddish
14:35 teatime not actual vanilla.  vanilla cream soda :)
14:35 geekosaur heh
14:35 geekosaur cream soda may be clear, brownish, or red/reddish
14:37 Ulti given things /win 2
14:38 Ulti wah
14:38 geekosaur with "real" cream sodas this reflects amount of vanilla and possibly other flavorings, and the source of the vanilla. these days its all artificial x.x
14:38 geekosaur *it's
14:38 Ulti perlawhirl: yeah I get what it needs, Docker most config is done through the environment its the preferred way to do things
14:39 perlawhirl cool beans
14:41 geekosaur oh, I should note that the curses color stuff looks overengineered. sadly, at the time when it was added, that was not actually overengineered; it reflected the actual limitations of terminals
14:41 grondilu joined #perl6
14:41 geekosaur things got a LOT simpler when terminals standardized on ANSI X3.64
14:42 teatime are you referring to 256-color mode and pallette setting
14:42 geekosaur but that only happened when real physical terminals mostly went away
14:42 teatime rather than the 24-bit color escape codes
14:42 geekosaur COLOR_PAIR and such
14:42 teatime 'cause the 24-bit escapes aren't widely supproted
14:43 geekosaur you are not talking about the (n)curses level
14:43 geekosaur which is what perlawhirl was asking about
14:43 teatime no, I am
14:43 teatime I am asking if you are referring to ncurses not using the 24-bit escapes
14:44 geekosaur I am referring to the curses API
14:44 teatime nevermind.
14:44 geekosaur whether it knows about and can use the escapes depends on whether the terminal description (terminfo) describes them in a way that (n)curses can understand
14:44 perlawhirl hrm, i might just use Term::Screen via Inline
14:45 geekosaur ...and since that too dates from the days of physical terminals, its ability to express such things is limited (it's possible but a lot of work)
14:46 teatime terminfo evolves, and is actually part of ncurses.
14:46 geekosaur yes, I am aware of that
14:48 Ulti perlawhirl: https://github.com/prasmus​sen/glot-containers/pull/7
14:48 Ulti that should do it I think
14:49 Ulti unfortunately I can't test it since the deployment of glot.io is fairly epic
14:49 Ulti since the Docker image needs to get rebuilt we might force a 2016.04 update too :)
14:49 perlawhirl 5 repo's combine to make it... kinda like Ultron
14:50 Ulti yup
14:50 perlawhirl 2016.04 bump is a good idea
14:50 Ulti had to go through three of them just to find the Dockerfile :'(
14:51 Ulti another plan is to actually implement the colour codes being converted to coloured <span> tags :3
14:51 molaf joined #perl6
14:54 perlawhirl pfft, they should made html understand ansi escape sequences in the first place :P
14:55 timotimo yes
14:55 smls Hm, the REPL fails to start up for me
14:55 smls It prints "To exit type 'exit' or '^D'" and then hangs
14:56 timotimo are you inside a "panda look"?
14:56 smls what's that?
14:57 timotimo it grabs a module for you and drops you in the module folder in a shell
14:57 smls No, I'm in my home folder
14:57 timotimo it sadly doesn't unlock the repo, so if you start a perl repl it'll usually hang waiting for the repo to become unlocked
15:00 awwaiid you should be able to see that if you do `strace perl6` -- you'll see it blocking on a .lock file
15:00 awwaiid if that is the case, that is
15:02 awwaiid So I see that "Bug #127190 for perl6: Perl 6 has 0 elements ( .hyper.grep )" is already filed -- is there any sort of work-around?
15:02 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127190
15:03 awwaiid m: say ^10 .race.grep: *.is-prime
15:03 camelia rakudo-moar 7db7b4: OUTPUT«()␤»
15:05 smls m: .say for ^10 .race.map({ next if .is-prime; $_ })
15:05 camelia rakudo-moar 7db7b4: OUTPUT«0␤1␤4␤6␤8␤9␤»
15:05 psch m: ^10 .race.grep( *.say );
15:05 camelia rakudo-moar 7db7b4: ( no output )
15:06 awwaiid I'm working on a talk submission and was going to use that as an example :)
15:06 psch whatever .grep does with whatever .race produces seems somewhat wrong... :)
15:06 * hoelzro wishes ack supported P6 regexes
15:06 timotimo awwaiid: no way at the moment, sorry :(
15:06 awwaiid ok cool
15:06 timotimo except if somebody goes in and fixes it, of course
15:06 geekosaur psch, I think that;s a known bug in race?
15:07 psch geekosaur: yeah, the tickets been linked a bit ago
15:07 awwaiid there are a ridiculous number of other features that I can pick to highlight
15:07 psch geekosaur: i was just curious, which is why i put the *.say into the grep, to see what arrives there anyway
15:07 timotimo yeah, though of course parallelism features are extra juicy
15:08 geekosaur ob "you have a problem and you decide to use threads. nonw owy ou  yoauv e hatwvo e ptrowbo plerombsle imns teinrtleearlveeda.ed."
15:09 ugexe heh
15:09 timotimo :)
15:10 awwaiid oh wait, if I put in a grpe it works
15:10 awwaiid m: (^10).race.map(* + 0).grep(*.is-prime)
15:10 camelia rakudo-moar 7db7b4: ( no output )
15:10 awwaiid m: (^10).race.map(* + 0).grep(*.is-prime).list.say
15:10 camelia rakudo-moar 7db7b4: OUTPUT«(2 3 5 7)␤»
15:11 teatime heh, how much code do you think will break when, at some point in the future, » etc. begin actually multi-threading :)
15:11 ugexe something about map itemizing differently than grep such that hypers worked slightly different on each
15:11 timotimo teatime: for the longest time we've made the execution order of >> things randomized
15:11 timotimo it no longer is randomized, if i recall correctly
15:11 teatime I was gonna say, ».say works for me when I do it
15:12 timotimo but since hyper still gives you the result order you wanted, it won't be that bad
15:12 timotimo only side-effects will be scrambled
15:15 hoelzro m: 'f3cd5fa' ~~ /<-:Letter - digit>/
15:15 camelia rakudo-moar 7db7b4: ( no output )
15:15 hoelzro m: 'f3cd5fa' ~~ /<-:Letter - Digit>/
15:15 camelia rakudo-moar 7db7b4: OUTPUT«Method 'Digit' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/RW10TqzI9S line 1␤␤»
15:15 hoelzro why is titlecase ok for Letter, but not for Digit?
15:15 timotimo wouldn't you need to :Digit?
15:15 timotimo because digit is also a method on Cursor?
15:15 hoelzro ahhh
15:15 timotimo whereas :Letter is a unicode property thing
15:16 hoelzro m: say '.' ~~ /<-:Letter - :Digit>/
15:16 camelia rakudo-moar 7db7b4: OUTPUT«Nil␤»
15:16 teatime dunno if relevant but <digit> also already pre-exists
15:16 hoelzro that *should* match, right?
15:16 hoelzro I'm trying to match any character that's neither a letter nor a digit
15:16 teatime no, . isn't in :Letter
15:16 teatime oh nm
15:16 hoelzro unless the leading - is complementing (:Letter - :Digit)
15:17 hoelzro ...in which case it would still match, right?
15:20 smls timotimo: After nuking rakudobrew and rebuilding, my REPL works again.
15:20 timotimo interesting. good to know, i guess
15:22 awwaiid hm
15:23 ZoffixWin m: say '.' ~~ /<-[\w]+[_]>/
15:23 camelia rakudo-moar 7db7b4: OUTPUT«「.」␤»
15:24 hoelzro awwaiid: did you see my comment on your PR?
15:24 awwaiid hoelzro: yes! But I haven't gotten a chance to fix it up yet. I missed .05 yet?
15:25 awwaiid hoelzro: think it would be ok to print out "Entering fallback REPL" if it does the fallback? I'm want us to know/debug any times it falls back
15:25 tomboy65 joined #perl6
15:26 dolmen joined #perl6
15:26 yqt joined #perl6
15:27 hoelzro awwaiid: .05 is a way's away =)
15:27 hoelzro I think that's a good idea
15:27 hoelzro something like "failed to load REPL.pm: $ERROR\nEntering fallback REPL"
15:28 timotimo hoelzro: well, very big changes should go in loooong before the release, to be fair
15:28 hoelzro timotimo: agreed
15:29 hoelzro I'm thinking of even waiting until .05 is out to merge, to maximize our window
15:33 awwaiid ok cool. I'll get the fallback back in there over the weekend.
15:33 skids joined #perl6
15:46 Relsak joined #perl6
15:49 awwaiid Request for review/edits/suggestions on my Strange Loop talk submission -- https://gist.github.com/awwaiid/​6d9c9965578e721077c132943fde504c
15:50 domidumont joined #perl6
15:51 perlpilot awwaiid++
15:52 perlpilot awwaiid: experimention -> experimentation
15:54 ZoffixWin left #perl6
15:54 awwaiid oh right, spelling
15:55 awwaiid perlpilot: updated
15:56 perlpilot awwaiid: How long is the talk?  This is a session or a workshop?
15:56 hoelzro awwaiid: sounds good (both the weekend work and SL talk idea)
15:57 smls awwaiid: Aren't the concurrency primitives taken from (or heavily inspired by) C#/.NET, as opposed to complete innovations?
15:57 awwaiid perlpilot: I'm putting in for a 40 minute talk. I could do a workshop, but felt like this is more likely to get accepted.
15:58 perlpilot awwaiid: So, is it going to be more of a survey of neat Perl 6 things or are you just going to focus on a few and mention that there are other neat things available?
15:58 awwaiid smls: don't know! I think the innovation is more about how they are integrated in. start {} I think is c#, but .race.map looks more like clojure core.async (standard libs that have the same rough api but work on an async/concurrent datatype)
15:59 awwaiid perlpilot: I'm leaving it open for myself, but I think the best use of time would be to do a deeper-dive into like 2 nonstandard features and a survey/bief-mention of some others.
15:59 perlpilot awwaiid: Sounds excellent!
16:00 awwaiid I think I'll make that clear on the thing
16:00 perlpilot awwaiid++
16:02 perlpilot I also like how you say "the production-ready Rakudo implementation of Perl 6".   The more we talk about the production-readiness, the better
16:03 awwaiid Yeah. That also let me talk about the back-ends
16:03 awwaiid gist updated with a note about deep-dive into 2 advanced/nonstandard topics
16:06 smls [Coke], masak, other RT veterans: It looks like we have a large number of open tickets that were automatically submitted for roast test failures, about a year ago. Are they still needed?
16:06 smls (e.g. #124685)
16:06 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124685
16:16 RabidGravy iirc it wasn't just failures but all the fudges
16:21 smls What was the idea behint RT'ing them all?
16:22 smls Isn't it more useful for implementors to run roast themselves and check the *current* failures/fudges?
16:22 RabidGravy yeah, you'd have thought so
16:23 psch smls: that's not always really feasible.  r-j spectest can take well over two hours, depending on machine and load
16:23 RabidGravy if there is a big list of those tickets it might be worth grepping the roast for the numbers and just closing the ones that ain't there any more
16:24 RabidGravy because I think the plan was that the tickets should be in the source
16:24 samb1 joined #perl6
16:24 smls psch: But is anyone keeping the list up-to-date (i.e. closing no longer applicable ones)?
16:26 pnu_ joined #perl6
16:26 milwauke` joined #perl6
16:26 awwaiid "Your talk proposal was successfully submitted" . I'll let y'all know if it gets accepted and then everyone can come over :)
16:26 prammer joined #perl6
16:27 psch smls: well, i do usually comment on a ticket when i it, and usually our bug admins are attentive enough to react to that (when i don't forget to cc the mailing list...)
16:27 psch +fix
16:27 jnthn smls: Certainly I closed a bunch of them when I dealt with the tests they were about in some way
16:27 smls ok
16:28 avalenn joined #perl6
16:28 apejens joined #perl6
16:30 llfourn joined #perl6
16:32 smls RabidGravy: It looks like it's 244 in total, that are still open
16:33 smls (search link here: https://gist.github.com/smls/ee​d26639e60f199613495a114856f41c)
16:33 kmwallio joined #perl6
16:35 Amnez777 joined #perl6
16:35 tharkun joined #perl6
16:45 sufrostico joined #perl6
16:46 newbie1 joined #perl6
16:46 ZoffixWin joined #perl6
16:47 ZoffixWin How can I just pop up a bunch of supplies and tell my program to sit and chill (and just repond to those supplies whenever they happen)? I tried by just sticking this loop {} but I now see my app is using 100% of CPU: https://github.com/zoffixznet/perl6-Bailador-De​v-AutoRestarter/blob/master/bin/rebailador#L16
16:48 takadonet joined #perl6
16:49 timotimo you need "react"
16:50 ZoffixWin I don't know how. The program exits right away
16:50 mst isn't this what forever/whenever are for?
16:51 timotimo mst: whenever goes into a "supply" or "react" block to listen to other supplies doing stuff
16:51 ZoffixWin hm. lemme try
16:52 timotimo yeah, you'd want to whenever your supplies inside the react block
16:52 jnthn ZoffixWin: Something like this: https://gist.github.com/jnthn/b​29e1628f21e93f2699b3858c79a62af
16:53 * perlpilot isn't aware of a "forever" block, but that would be a nice self-documenting alternative to loop {}
16:53 ZoffixWin Thanks. jnthn++ timotimo++ mst++
16:56 itaipu joined #perl6
16:59 mst ah, right, so you use 'react' to say 'within this, we're setting up reactive stuff' then 'whenever' inside that uses the taps to do things, and the reason zoffix' stuff was exiting was he hadn't added any listeners?
16:59 timotimo that sounds like the thing, yeah
16:59 timotimo an empty react block would immediately shut down, i expect
16:59 timotimo m: react { }; say "done"
16:59 camelia rakudo-moar ac36d2: OUTPUT«done␤»
17:00 mst oh damnation, I just helped somebody implement one of those horrible auto restarter things
17:00 * mst feels dirty now
17:00 timotimo hah
17:00 ZoffixWin hahahahaaa
17:00 ZoffixWin mst, why is it horrible?
17:00 ZoffixWin Manually restarting is horrible
17:01 mst Ctrl-C, up, enter doesn't bother me
17:01 ZoffixWin On EVERY change?
17:01 mst having my console log full of errors that are all complete lies so it obscures the real ones does bother me
17:01 tadzik haha, oh yes
17:02 tadzik "why doesn't it work? Oh,because this time it failed to recompile so nothing changed"
17:02 mst more "what's wrong now? oh, my app server screen is fully of errors, is that a real problem or just a failed recompile from three minutes ago when I saved the first file out of three I needed to change for this to compile again?"
17:03 mst I usually end up turning it off before I get as far as hitting tadzik's failure mode, but 'cold start the app please' is one of the standard ways I've found for letting junior devs discover they just wasted an hour
17:04 firstdayonthejob joined #perl6
17:04 mst of course, newbies *still* think it's a good idea and it makes them happy so I'd much prefer the feature existed so long as nobody mind me turning it off as hard as possible the first time I run into it :D
17:05 ZoffixWin No, I always know if it's a real problem because on each restart my restarter issues a message so all I need to follow is from end to the first restart message.
17:05 ZoffixWin And the error really should be chucked into the browser...
17:06 tharkun joined #perl6
17:06 itaipu joined #perl6
17:07 tadzik ahaha
17:07 smls m: say "abbbbb" ~~ /a b+/
17:07 camelia rakudo-moar ac36d2: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/pdoXjL8i5l:1␤    ------> 3say "abbbbb" ~~ /a7⏏5 b…»
17:07 smls ^^ Isn't that warning a little overzealous?
17:08 ZoffixWin Probably here: https://github.com/ufobat/Bailador/b​lob/master/lib/Bailador/App.pm#L115   Just pop the exception into the the message
17:08 timotimo smls: it can really help in real life circumstances
17:08 timotimo i've been saved by it at least twice so far
17:09 ZoffixWin smls, IMO yes, but I'm of the minority opinion :) It doesn't *always* happen. There's only some sequence of tokens that trigger it.
17:09 smls I'd consider putting a space there, good practive/style
17:09 smls a little weird to have the compiler advise me to do the opposite... :P
17:09 ZoffixWin smls, right, but the way to write that is / 'a' 'b'+ /
17:10 smls That's *too* verbose for my taste...
17:11 ZoffixWin m: say "abbbbb" ~~ m:Perl5:x/a b+/
17:11 camelia rakudo-moar ac36d2: OUTPUT«(「abbbbb」)␤»
17:11 timotimo m: say "abbbbb" ~~ m:/a 'b'+/
17:11 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YhoQq6rq8d␤Colons may not be used to delimit quoting constructs␤at /tmp/YhoQq6rq8d:1␤------> 3say "abbbbb" ~~ m:7⏏5/a 'b'+/␤    expecting any of:␤        colon pair (restricted)␤»
17:11 timotimo m: say "abbbbb" ~~ m/a 'b'+/
17:11 camelia rakudo-moar ac36d2: OUTPUT«「abbbbb」␤»
17:11 ugexe use all the modifiers
17:12 timotimo m: say "abbbbb" ~~ m/'a' b+/
17:12 camelia rakudo-moar ac36d2: OUTPUT«「abbbbb」␤»
17:12 * perlpilot wonders when that :Perl5 regex modifier will become problematic  (similar to how PCRE on #perl is problematic)
17:13 ZoffixWin it doesn't support character classes. That's one problem I encountered
17:13 ZoffixWin *named character classes [[:punct:]] and stuff like that
17:13 timotimo yeah, we didn't build it too far yet
17:14 perlpilot "best" might be to just use Inline::Perl5 for it now
17:14 timotimo yah
17:16 smls timotimo: Isn't the version without space *more* likely to trip up people? i.e. a newbie looking at /foo+/ might think it repeats the whole word.
17:16 timotimo huh. not sure
17:16 mst perlpilot: eh, you can always bounce people over to us :)
17:17 itaipu joined #perl6
17:17 AlexDaniel m: say ‘abbbbb’ ~~ /‘a’ b+/
17:17 camelia rakudo-moar ac36d2: OUTPUT«「abbbbb」␤»
17:18 geekosaur the real fun will be when people confuse m:p5 with pcre >.>
17:18 AlexDaniel say ‘abbbbb’ ~~ m+‘a’ b\++
17:18 AlexDaniel m: say ‘abbbbb’ ~~ m+‘a’ b\++
17:18 camelia rakudo-moar ac36d2: OUTPUT«False␤»
17:19 ZoffixWin m: say ‘abbbbb’ ~~ m+‘a’ b++
17:19 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VpQJqR_SQF␤Missing required term after infix␤at /tmp/VpQJqR_SQF:1␤------> 3say ‘abbbbb’ ~~ m+‘a’ b++7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
17:20 timotimo oh btw, it wouldn't be terribly hard to implement a m:PCRE :)
17:20 AlexDaniel m: say ‘abbbbb’ ~~ m+‘a’ b++
17:20 camelia rakudo-moar ac36d2: OUTPUT«「abbbbb」␤»
17:20 mst timotimo: SET THE CONFUSATRON TO ELEVEN
17:20 ZoffixWin m: say ‘abbbbb’ ~~ /a ​b+/;
17:20 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter ​ (must be quoted to match literally)␤at /tmp/7R3zM6shSZ:1␤------> 3say ‘abbbbb’ ~~ /a7⏏5 ​b+/;␤Unable to parse regex; couldn't find final '/'␤at /tmp/7R3zM6shSZ:1␤------> 3say …»
17:20 ZoffixWin awwww
17:20 timotimo :) :)
17:21 perlpilot mst:  Except currently you'll just be educating them on the fact that m:Perl5// is a bit of a lie.
17:21 perlpilot (Or ... I'll be doing that :)
17:21 ZoffixWin left #perl6
17:24 MadcapJake ugexe: thanks for the explanation and link! But I'm not really sure where I am accessing something outside of the thread.  The only thing I could think of would be @collected (which I could actually put inside the last start block)
17:24 cpage_ joined #perl6
17:24 ugexe MadcapJake: link? i didnt look at any code
17:24 MadcapJake Otherwise maybe it's the channels I am passing as references to the workers, but without being able to do that, I am struggling to see the usefulness of channels
17:24 MadcapJake https://gist.github.com/MadcapJake/c29b76d​7eccf5af86e973c5da7c7f7a3#file-workers-pl6
17:26 MadcapJake in debug, L16 (the $!chunks.poll call) is what sends the first "unable to read" error)
17:27 MadcapJake Though it doesn't always fail there, for some odd reason.
17:27 ugexe if $!chunks contains anything from another thread, then thats where its finally read
17:27 ugexe its not always failing there because sometimes it will happen in the same thread it originated in
17:28 AlexDaniel m: my $x = ‘’; for ^100000 { $x .= chop }; say ‘hello’ ~ $x ~ ‘world’ # awww, it works
17:28 camelia rakudo-moar ac36d2: OUTPUT«helloworld␤»
17:28 MadcapJake Well $!chunks is created inside the class but not inside the start block (inside of submethod BUILD)
17:29 itaipu joined #perl6
17:29 ugexe right, but what about anything $!chunks contains? if any of its elements were created in a different $*THREAD.id then that error happens
17:29 MadcapJake yeah that's gotta be it then. so you can't communicate across channels? that seems really limiting
17:30 MadcapJake what's send/receive/poll for if you can't do that?
17:30 ugexe yea its a pita, and a bug
17:30 ugexe well you can communicate across channels, just not with data that originated from handles i believe
17:31 MadcapJake yeah it's pulled from a text file
17:31 AlexDaniel m: ‘hello’.starts-with(‘’).say
17:31 camelia rakudo-moar ac36d2: OUTPUT«True␤»
17:32 AlexDaniel m: ‘hello’.ends-with(‘’).say
17:32 camelia rakudo-moar ac36d2: OUTPUT«True␤»
17:32 squirrel_ joined #perl6
17:33 sufrostico joined #perl6
17:34 ugexe you pretty much have to roll your own ipc... socket client/server is one way
17:35 jnthn It's the *handles* that can't be read on another thread
17:35 mst moarvm needs to expose something approximately like http://p3rl.org/IO::Pipely I think
17:35 mst or whatever the underlying libuv abstraction is
17:35 jnthn A Str or Buf can happily travel between threads.
17:35 * AlexDaniel wonders why Str.indent exists
17:35 MadcapJake jnthn: then what's going on because that's all I'm passing is strings
17:35 mst AlexDaniel: anti-leftpad insurance
17:36 * mst really wants access to libuv's unix domain socket / win32 named pipe abstraction
17:36 ugexe i dunno, i've never been able to get a buf from a socket on thread A to read on thread B
17:36 AlexDaniel mst: oh, well… OK, it makes sense. I guess
17:37 MadcapJake L38 calls lines on the handle and sends each line to a provider who rotates it between a series of workers
17:37 AlexDaniel that's actually pretty smart
17:38 mst http://xkcd.com/1676/ # ARBITRARY LENGTH NON BREAKING SNAKE
17:38 timotimo yes
17:39 mst ISAGN
17:39 hjst joined #perl6
17:40 MadcapJake timotimo: did you see the latest version of my shakespeare character counter?
17:41 AlexDaniel m: ‘🐍🐍🐍🐍hello’.indent(-4) # snakes not supported
17:41 camelia rakudo-moar ac36d2: OUTPUT«Asked to remove 4 spaces, but the shortest indent is 0 spaces  in block <unit> at /tmp/IanqvZxiAO line 1␤»
17:41 timotimo MadcapJake: i have not. though i might write my own version later today, if you give me your source data :)
17:42 MadcapJake http://ocw.mit.edu/ans7870/6/6.006/s08​/lecturenotes/files/t8.shakespeare.txt (5.3MB file)
17:43 timotimo thanks
17:43 MadcapJake I deleted the header and footer text too
17:44 MadcapJake timotimo: my latest version was an attempt to follow your advice of rotating between workers, so I'd be interested to know if I implemented it how you envisioned (though it doesn't work due to some weird thread problem that I don't understand)
17:44 [Coke] smls: yes, because any todo or fudged test in roast needs a ticket.
17:44 timotimo oh
17:44 [Coke] (or to be removed)
17:45 timotimo oh, is that workers.pl?
17:45 MadcapJake yeah
17:46 [Coke] (that said, the person who opened all those tickets did so on their own with only a little guidance. they've been greatly cleaned up since they were opened.)
17:46 timotimo i don't know why you have a central start block that divides data from $provider into all the workers' chunks
17:46 cpage joined #perl6
17:47 timotimo rather than having all workers .receive on the $provider
17:47 MadcapJake timotimo: I know why I did that: cus I don't know how to do this :P
17:47 timotimo :D
17:49 MadcapJake I thought that I needed to send to each worker separately, I didn't know I could have them all listen to one channel and it would divy up the work automatically
17:51 [Coke] (RT) if folks are looking to help work on the queue, I have a gist somewhere that would help.
17:52 [Coke] https://gist.github.com/coke/ac078396e8f216b83e9a ... needs some work, I'll polish that slightly.
17:55 smls [Coke]: I was just casually looking through old tickets... :P
17:55 zakharyas joined #perl6
17:55 smls For those that have been fixed, is leaving a comment and marking them "testneeded" still the best course of action?
17:56 [Coke] yes.
17:56 smls If it's just an LTA error, is it ok to mark it 'resolved' directly? (I did that today.)
17:56 [Coke] I mean, writing the test and closing out the ticket is best, but at least that, yes.
17:57 [Coke] I think that still needs a test, no.
17:57 smls ok
17:57 [Coke] we have to verify that the warning is, in fact, NLTA.
17:57 [Coke] thanks for going through tickets.
17:57 [Coke] Here's another thing: if there's no [TAG] in the subject, update the subject with one if there's an obvious existing one it should be.
17:58 zostay joined #perl6
17:59 [Coke] https://gist.github.com/coke/9a​cb95ea87fabeaec28c803a2a6953ac
17:59 [Coke] (there's all the current ones)
18:01 dj_goku joined #perl6
18:11 AlexDaniel m: say ‘⋛’.uniname
18:11 camelia rakudo-moar ac36d2: OUTPUT«GREATER-THAN EQUAL TO OR LESS-THAN␤»
18:11 MadcapJake lol why is there a symbol for that
18:12 AlexDaniel MadcapJake: there's another one
18:12 AlexDaniel m: say ‘⋚’.uniname
18:12 camelia rakudo-moar ac36d2: OUTPUT«LESS-THAN EQUAL TO OR GREATER-THAN␤»
18:12 timotimo that just means "those two things are orderable somehow"
18:14 perlpilot and depending on which one you use ... shows your bias
18:18 Joe_Perl joined #perl6
18:18 Joe_Perl Hello
18:19 timotimo hey there
18:19 Joe_Perl So i pretty much love perl6 but...
18:20 AlexDaniel m: .say for (0..0x1FFFF ==> grep { .uniname ~~ /MONKEY/ } ==> map {.chr.uniname})
18:20 camelia rakudo-moar ac36d2: OUTPUT«MONKEY␤MONKEY FACE␤SEE-NO-EVIL MONKEY␤HEAR-NO-EVIL MONKEY␤SPEAK-NO-EVIL MONKEY␤»
18:20 AlexDaniel why so many monkeys?
18:20 timotimo Joe_Perl: uh-oh, here it comes :)
18:21 Joe_Perl Perl6 would be my first programming language i seriosly learn and i want to make sure that if i put my time into then for some reason decide i want to learn a new language I wont be totally messed up by Perl6.
18:22 Joe_Perl Im just a hobiest but might transition into the IT field
18:22 MadcapJake the only thing Perl 6 will do is make you realize other languages aren't very powerful :)
18:22 lostinfog joined #perl6
18:23 timotimo all languages are equally powerful as long as they can do what brainfuck can :P
18:23 Joe_Perl I love Grammers they seem like a good compromise on Regex.
18:24 AlexDaniel compromise :o
18:24 MadcapJake timotimo: powerful in terms of the programmer not the computer
18:25 timotimo heh heh
18:26 MadcapJake Joe_Perl: Perl 6 grammars aren't a compromise on regex they are a tool that makes using regexes easier in some circumstances (where you need to parse things larger than one line)
18:27 AlexDaniel m: say ‘abbbbb’ ~~ m/‘a’ b+/ # you can still do your regexy stuff
18:27 camelia rakudo-moar ac36d2: OUTPUT«「abbbbb」␤»
18:27 MadcapJake grammars are to regexes what a general is to soldiers
18:28 mst wow, that's the worst metaphor I've seen in weeks
18:28 maybekoo2 joined #perl6
18:29 MadcapJake lol worst really? how is that so bad? let's see you come up with one :P
18:30 MadcapJake grammars organize regexes like a general organizes their soldiers, regexes capture text just like soldiers capture enemy combatants :)
18:31 perlpilot MadcapJake: What are the lieutenants and sergeants in this metaphor? they're the one who actually talk to soldiers.  :-)
18:31 itaipu joined #perl6
18:31 MadcapJake perlpilot: those are your tokens and rules! the actual regex literals are the soldiers :P
18:31 ugexe but what about actions
18:31 MadcapJake orders
18:31 perlpilot ugexe: obviously they are the intelligence community
18:31 cdg joined #perl6
18:31 MadcapJake hahaha
18:32 perlpilot MadcapJake: Work at this a bit and it could become a really good lightning talk  :)
18:33 cdg joined #perl6
18:33 perlpilot "Text as the enemy" works fairly well in any case
18:34 ufobat joined #perl6
18:34 MadcapJake yeah it does! I think it's a pretty good metaphor!
18:34 AlexDaniel well, if only it was part of military training
18:34 perlpilot speaking of training ... where's bootcamp in this metaphor?
18:35 MadcapJake Grammar::Debugger is bootcamp :)
18:35 perlpilot and what branch of the service are these soldiers in?  Air Force?  Marines?  Navy?  Army?
18:35 mst nah, bootcamp is for infantry
18:35 perlpilot Coast Guard?
18:35 mst bootcamp is an interactive grep tutorial
18:35 Joe_Perl At what scale (page traffic, database size etc.) would you need to worry about any speed deficits in perl6?
18:35 MadcapJake lol yes!
18:35 mst Grammar::Debugger is either officer training school, or more likely 'high command's post mortem team'
18:35 MadcapJake lol
18:36 perlpilot Joe_Perl: The question is a tad vague.
18:36 MadcapJake I'd say this is either Army or Coast Guard (two branches most likely to be capturing rather than just pummeling :)
18:37 perlpilot Then what are the Army Rangers?
18:38 MadcapJake unicode properties :)
18:38 perlpilot MadcapJake: you're certainly starting to live up to your nick  ;)
18:39 MadcapJake hahaha it actually was a nickname I had at work a few years back :)
18:42 itaipu joined #perl6
18:42 Joe_Perl I suppose what i have in my head is the story that " Twitter had to switch to scala because Ruby was too slow at scale" Im not saying im going to have a company that big its just a theoretical question.
18:43 mst Joe_Perl: yeah, and twitter would never have got that far if they hadn't used ruby first for fast prototyping
18:43 ugexe that same story holds true for how many companies?
18:43 mst Joe_Perl: you're learning exactly the opposite lesson to the truth here
18:43 Joe_Perl Im willing to learn
18:43 mst I just explained the point. what wasn't clear?
18:44 Joe_Perl So perl6 would not hold up at " twitter scale"?
18:44 ugexe if you get big enough then chances are you can afford to handle those consequences. if you don't then you didn't waste a bunch of time/effort on what essentially is premature optimization
18:45 Joe_Perl ugexe: good point
18:45 mst Joe_Perl: if you think that question matters, you didn't listen to me.
18:45 mst Joe_Perl: right, ugexe is making the same point I already did
18:45 mst twitter switched *when it got big enough to matter*
18:45 mst until then, worrying about twitter scale is masturbation, not programming
18:46 RabidGravy :-O
18:46 ugexe are we web scale enough?
18:46 mst and as with other forms of masturbation, best done privately and not in the office
18:46 timotimo we're not scale enough
18:46 RabidGravy it's a clear sign you're a team player
18:46 RabidGravy ;-)
18:47 pmurias joined #perl6
18:47 AlexDaniel .oO( web scale masturbation )
18:47 ugexe perl6 is great for prototyping at the very least
18:47 pmurias AlexDaniel: a large part of the internet is devoted to that ;)
18:48 mst AlexDaniel: funnily enough, a large part of youporn's early rise was because they had more efficient CDN usage than the competitition because of the tools they got via catalyst
18:48 timotimo perl catalyst, eh?
18:49 perigrin yes.
18:49 timotimo that's a neat story
18:49 timotimo why doesn't perl brag about porn sites all the time? :P
18:49 tadzik it is!
18:49 AlexDaniel huggable: dunno
18:49 perigrin because it was later re-written in PHP
18:49 AlexDaniel :(
18:49 tadzik (because they switched to php)
18:49 perigrin but with a much more sound architecture
18:49 perigrin tadzik: strangely they didn't, the company they sold the IP to did.
18:50 tadzik ah
18:50 mst well, because it was bought out by another porn company with an existing PHP codebase and an existing PHP team
18:50 mst at which point the port was totally reasonable
18:50 * mst remembers dropping into HN comments and telling people to stop complaining, I don't like PHP but they were still absolutely in the right business wise
18:51 perigrin I think they green-fielded the re-write ... but yeah
18:51 RabidGravy back in the last century if you had perl on your CV you were going to get a call from a recruiter about working on some "adult" web site at least once a week
18:51 ugexe the first time i was yelled at by mst was for not pasting my entire error logs, which i had edited out because i was developing a catalyst app for a porn company lol
18:51 RabidGravy :)
18:52 mst perigrin: yes, but *existing team*
18:53 perigrin mst: yeah, no the re-write was entirely justified.
18:53 mst if they'd listened to me the catalyst rewrite would've finished but *shrug*
18:53 mst they paid their bills while not listening
18:53 timotimo fantastic
18:54 RabidGravy I have a love/hate relationship with clients like that
18:54 tadzik heh, sex.pl was run by perl for a while too
18:54 tadzik but it was just a perl script generating a static html
18:55 mst ugexe: heh, I can see your reasoning but I hope in hindsight it's obvious why my brain was going "I doooon't caaaare I just want to fiinnd your buuuuggg" :D
18:56 edenc joined #perl6
18:56 timotimo tadzik: of course sex.pl would be run by perl :P
18:56 AlexDaniel or prolog…
18:56 timotimo or that
18:58 Amnez777 joined #perl6
19:00 RabidGravy or pl/1
19:01 ZoffixWin joined #perl6
19:02 ZoffixWin AlexDaniel, no huggable for a while. I accidentally nuked my entire server last night :) http://irclog.perlgeek.de/p​erl6/2016-05-06#i_12441561
19:02 ZoffixWin Luckily, moritz++ gave me all #perl6 logs mentioning addressing her, so I can reconstruct her database by re-issuing those commands.
19:03 ZoffixWin I hope you didn't add a ton of factoids in /msg :P
19:03 ufobat ZoffixWin, i just tried your OO example. and it works for me :-(
19:03 AlexDaniel ZoffixWin: where are your backups?
19:03 edenc joined #perl6
19:04 ZoffixWin heh, good question :P
19:04 ZoffixWin Technically, I didn't lose any data tho :P
19:05 sortiz m: my @a := List.from-iterator((loop { }).iterator); Mu; # Reify delayed, good.
19:05 camelia rakudo-moar ac36d2: OUTPUT«WARNINGS for /tmp/1ZGRZkg8yw:␤Useless use of constant value Mu in sink context (line 1)␤»
19:05 sortiz my @a := Array.from-iterator((loop { }).iterator); Mu; # Why try to reify?
19:05 sortiz m: my @a := Array.from-iterator((loop { }).iterator); Mu; # Why try to reify?
19:06 camelia rakudo-moar ac36d2: OUTPUT«(timeout)WARNINGS for /tmp/19TRs_9jEO:␤Useless use of constant value Mu in sink context (line 1)␤»
19:07 rindolf ZoffixWin: hi ,sup?
19:07 ZoffixWin \o
19:09 azawawi joined #perl6
19:09 azawawi hi
19:09 yoleaux 5 May 2016 21:50Z <arnsholt> azawawi: It's maintained in the sense that I'll accept patches and such, and help out to the extent that I have time. But I'm super-duper busy ATM, sadly, so I'm not actively hacking on it ATM
19:09 sortiz Any good reason why Array try to reify its iterator at creation?
19:09 rindolf azawawi: hi, sup?
19:10 ZoffixWin ufobat, are you sure you tried the class version? I've just tried it again of a clean perl6/Bailador install and I get the template error, because it's using wrong template renderer
19:10 azawawi rindolf: done
19:10 ufobat ZoffixWin, i updated the issue
19:10 ufobat with my example
19:10 azawawi just finished reading zmq ffi perl5 code
19:11 ZoffixWin ufobat, oh, well, it does start, but try going to http://localhost:3000/
19:11 ufobat it prints the renderer and its the ::Extended
19:12 ZoffixWin k, lemme try running your version
19:13 ufobat ZoffixWin, i added a say self.renderer.perl; in my / route and it printed the ::Extended as well
19:15 ZoffixWin I'll take a closer look once I'm done eating :)
19:15 ufobat enjoy the dinner :)
19:17 ufobat i've got a question regarding this issue. https://github.com/ufobat/Bailador/issues/79 . I assume that this erorr happends when you declare a class twice?
19:18 jjido joined #perl6
19:22 arnsholt azawawi: Speaking of ZMQ, maybe I should just give you a commit bit?
19:22 sortiz For anyone curious I'm asking what is the case of https://github.com/rakudo/rakudo/blob/1ee27e660a8d​ce3ae031775bd07afeb6956601c0/src/core/Array.pm#L53
19:22 azawawi arnsholt: cool :)
19:23 arnsholt You azawawi on GitHub as well?
19:23 azawawi yup
19:23 azawawi https://github.com/azawawi/
19:23 moritz ufobat: yes, it happens when two files have an our-scoped symbol Store
19:23 arnsholt azawawi: There you go. Have fun! =)
19:24 azawawi arnsholt: thanks :)
19:24 azawawi arnsholt: going to finish the book and then start hacking at it soon
19:24 ufobat moritz, could that happen if you install a module and have it in the lib directory at perl6 -Ilib .... for example?
19:25 moritz ufobat: well, a "use Store" should only load one version, either the installed *or* the local oen
19:25 azawawi arnsholt: been looking at what we need to support namely http://api.zeromq.org/4-1:_start and http://api.zeromq.org/3-2:_start
19:27 ufobat allright, thanks :)
19:28 grondilu joined #perl6
19:30 azawawi hmmm... I dont understand one thing. why does Debian skip versions https://packages.debian.org/sid/libzmq5 (libzmq5, libzmq3, no libzmq4)
19:30 moritz TIL that webkit uses WTF as an internal namespace: https://webkit.org/blog/6161/locking-in-webkit/
19:31 AlexDaniel azawawi: libzmq3 version is 4.0.5
19:32 AlexDaniel azawawi: maybe it is 4?
19:32 moritz "WTF stands for Web Template Framework"
19:32 AlexDaniel libzmq5 version is 4.1.4… hmm…
19:32 azawawi AlexDaniel: no i understand that... but why did they skip using libzmq2 and libzmq4? is that normal?
19:34 AlexDaniel azawawi: well the only reason to have different versions of the same program is if both are needed at the same time. E.g. python2 and python3
19:34 itaipu joined #perl6
19:34 AlexDaniel azawawi: I don't know why that happened in this particular case though
19:34 AlexDaniel but it could be anything
19:35 azawawi AlexDaniel: it seems the maintainer likes odd version numbers :)
19:42 rindolf moritz: heh, heh.
19:44 pmurias joined #perl6
19:59 ugexe ZoffixWin: i think thats a rakudo/CUR bug. i replied with more details
20:06 ufobat good night
20:08 ugexe it mostly boils down to CUR wants to handle all things precomp, so if something needs to be re-precompiled its CURs job to do it. total reinstallation (the only way a package manager can re-precompile in this situation) involves things other than precompiling that don't need to happen
20:09 mst part of me continues to wonder if that was a good plan, but OTOH trying to maintin precomp out of step with rakudo would be its own set of nightmares
20:09 ugexe if a workaround is implemented (such as reinstalling all reverse depends) it puts less pressure to fix what is clearly a problem
20:10 mst right, if CUR is going to own precomp, there should be a re-precomp method, which will re-precomp revdeps, I guess
20:10 mst or do you mean that re-precomp should've triggered during installation of something and didn't?
20:11 ugexe i would think it should have already happened; that the precomps get invalidated and thus re-precompiled
20:11 mst right
20:11 mst but we should probably expose a way to force it
20:11 mst because tish and tyops hapne
20:12 ugexe yeah. an api to precomp would be nice, especially for doing bad things like parallel precompilation
20:14 ugexe to quote latarian milton: its fun to do bad things
20:15 timotimo "shiny; let's be bad guys"
20:16 |2701 joined #perl6
20:17 lizmat masak: re http://irclog.perlgeek.de/p​erl6/2016-05-06#i_12443272 : I'll gladly convert these optimizations back to "proper" Perl 6 code  :-)
20:18 lizmat once we're sure the optimizer can handle them
20:18 lizmat like I've just done with (almost) all i = i + 1 -> ++i changes I did yesterday
20:19 maddingu1 joined #perl6
20:20 AlexDaniel lizmat: I was so happy to see that :)
20:22 Amnez777 joined #perl6
20:27 infina joined #perl6
20:27 infina joined #perl6
20:30 [Coke] timotimo++ serenity reference.
20:34 masak lizmat: cool. that's what I was hoping :)
20:35 masak in a perfect world, all the "natural" ways to write things will also be fast, and then we should be using them in the setting ;)
20:36 lizmat yup, agree  :-)
20:36 masak 'night, #perl6
20:37 lizmat night masak
20:37 sortiz night masak
20:39 itaipu joined #perl6
20:48 bazzaar joined #perl6
20:49 bazzaar \o
20:52 bazzaar .oO wonders if any good soul is enthused by the potential of using a perl6 grammar to parse a schema-only DB_dump file ?
20:55 mst interesting idea, you might want to look at the recdescent etc. parsers in the perl5 SQL::Translator module for bits to steal
20:55 timotimo yeah, especially stealing tests is worth a lot i bet
20:56 bazzaar thanks for the pointers, I'll take a look.
20:59 ZoffixWin Found my issue for why Bailador's class-y interface was failing me last night. I still had `use Bailador` in the file and it was setting up a default app and not my own or whatever.
20:59 hotel How do I give something optional arguments? or should I just use a multi?
20:59 bazzaar I've written and debugged such a grammar, ... only tested it against my own db schema though so probably not exhaustive
20:59 ZoffixWin hotel, named args are optional by default, positional args, just add '?' after them
20:59 hotel named argsare the ones with colons right?
21:00 hotel actually I'm probably better off using a multi
21:00 ZoffixWin m: sub foo ($a, $b?, :$yes) { say quietly "$a $b $yes" }; foo 42; foo 42, 45; foo 42, 45, :72yes;
21:00 camelia rakudo-moar ac36d2: OUTPUT«42  ␤42 45 ␤42 45 72␤»
21:01 ZoffixWin hotel, oh, or add a default value:
21:01 hotel yeah I know all about those, I come from python
21:01 ZoffixWin m: sub foo ($a, $c = 2, $b?, :$yes) { say quietly "$a $c $b $yes" }; foo 42; foo 42, 45; foo 42, 45, 555; foo 42, 45, :72yes;
21:01 camelia rakudo-moar ac36d2: OUTPUT«42 2  ␤42 45  ␤42 45 555 ␤42 45  72␤»
21:02 TEttinger joined #perl6
21:04 ZoffixWin I think I'm gonna repeat my Perl 5 mistake and make my own Perl 6 web framework....
21:05 ZoffixWin Bailador just doesn't fit into my brain.
21:05 moritz port Mojolicious to p6?
21:05 jjido joined #perl6
21:05 mst have a look at my Web::Simple stuff for ideas as well simply because it's probably the most flexible perl5 dispatcher in existence
21:05 mst and is already kinda slang-like in its own way
21:05 bazzaar Wondering if anyone has  a PG schema of their own, that they could run past my perl6 grammar, to flush out additional bugs
21:06 moritz bazzaar: what's a PG schema?
21:06 geekosaur postgresql
21:06 hotel so does this make sense? https://gist.github.com/HotelCalifor​nia/de0a73d67867e1cb7a81d9c4755aa421
21:06 ZoffixWin mst, will do
21:07 mst ZoffixWin: I suspect the controller lifecycle stuff from mojo will be worth grabbing, plus look at how catalyst uses role composition etc. to be more DRY for large scale apps, plus Web::Simple for my ideas of "a better dispatcher" (Mojo's dispatcher is a much easier API to an about-as-powerful-as-catalyst dispatcher, which is a different achievement)
21:07 moritz bazzaar: https://github.com/moritz/que​lology/blob/master/schema.sql old and nothing fancy in there
21:08 moritz also https://github.com/moritz/ilbot/b​lob/master/sql/schema.postgresql
21:08 moritz this one contains a function at least :-)
21:10 bazzaar moritz: wow, that was quick :-) .... will definitely use those, I see some things not in my schema
21:12 hotel anyone? 0w0
21:15 ZoffixWin hotel, not really. On lines 2 and 3 you're declaring class variables, you know that?
21:15 bazzaar sql [in the db_dump]  to build the db relations is relatively simple to parse, and I'm guessing would be quite alike between diff db_servers, and no database access necessary to be able to do all sorts of fun stuff with the db relations in perl6
21:15 hotel yeah?
21:16 ugexe hotel: it looks ok. you could also use `submethod BUILD` instead of new: submethod BUILD(Str :$!server-addr!, Int :$!server-port = 8080) { $!socket = ... }
21:16 hotel what's the difference between BUILD and new?
21:17 timotimo very big difference
21:17 timotimo for one, every class in the chain of derivation has their BUILD called
21:17 timotimo but only a single method new will be called
21:17 geekosaur new means you have to implement and orchestrate all the superclass building and such. BUILD is invoked byt he default new when it's time to initialize your class, with the superclasses already done
21:17 timotimo (the difference for submethods is that they don't get derived to subclasses)
21:18 hotel hm
21:18 timotimo BUILD is actually invoked via "self.bless", which your own method new will most likely call, too
21:18 hotel But if I don't have a hierarchy...
21:19 ugexe the short answer is you need to use `new` when you want to pass positional arguments, not all named
21:19 hotel ah
21:19 timotimo you can't get "no" hierarchy. you have to derive at least from Mu, but if you don't give any target to derive from, you'll derive from Any
21:20 Xliff_ In P6 BUILD is the better equivalent of an OO constructor, rather than new().
21:20 timotimo but Any doesn't do much in its construction, so it's n big deal
21:20 Xliff_ BUILD == assign values to attributes. new == perform actions required for the construction of a class instance.
21:20 Xliff_ At lest that's how I've begun to see it.
21:21 ugexe someone contrive a reason to sneak a BUILDALL in
21:21 Xliff_ ugexe, and BUILDALL does...?
21:22 ugexe call in the opposite order of BUILD, after its been initialized
21:22 hotel_california joined #perl6
21:22 hotel_california so then the body is the same in this case?
21:22 ugexe you dont need to `bless` in BUILD
21:22 * hotel has a garbage connection
21:22 hotel ah okay
21:23 Xliff_ Am I correct in assuming that bless is called by new, implicitly?
21:23 Xliff_ s/bless/self.bless/
21:23 ugexe BUILD is easier to subclass, so unless you really want positionals in your new you probably want to use BUILD
21:24 ugexe if you declare your own `new` method you have to call self.bless(|%_) yourself
21:25 mst hotel: short version: you should be using BUILD
21:25 hotel thanks all
21:25 mst hotel: if you think you can't use BUILD, you're probably wrong, ask here
21:26 mst hotel: then if we can't find a way to fix it without writing new(), then we can discuss doing it the hard way
21:26 * hotel didn't know about it before 5 minutes ago
21:32 Sgeo joined #perl6
21:38 jjido joined #perl6
21:42 yqt joined #perl6
21:45 * hotel fried his brain, will try again later
21:46 ugexe i posted a comment to your gist with an untested example
21:46 hotel nah, I got that part, just trying to translate from python to p6 while following a spec
21:47 hotel but thanks
21:49 cxreg the more I learn Go the more I wish it was Perl 6
21:56 kaare_ joined #perl6
21:59 mr-foobar joined #perl6
22:04 AlexDaniel .oO( the more you learn GO the more you wish it wasn't Go? )
22:04 AlexDaniel Go*
22:11 cxreg there are nice parts but those equivalent parts are also nice in p6
22:11 cxreg and the icky parts are better in p6 :p
22:11 AlexDaniel .oO( use perl 6 then? )
22:12 cxreg don't you live in a nice bubble :p  heh
22:17 RabidGravy I do :) apart from some tiny bits of C, Perl 5 and Javascript I've done nothing else but Perl 6 for a  year
22:18 RabidGravy (I probably should get a proper job at some point ;)
22:24 cxreg I've been binging on "recent stuff that people are hiring people to do"
22:24 cxreg there are precisely zero jobs asking for perl 6 experience
22:24 cxreg maybe one day
22:26 hotel what is the point of keeping a Supplier around? can I just say my $supply = Supplier.new.Supply;?
22:26 smls m: say "a" eqv "a"
22:26 camelia rakudo-moar ac36d2: OUTPUT«1␤»
22:27 smls ^^ Why is this returning 1 instead of True?
22:27 hotel why not use eq?
22:28 smls It's a golfed-down example :P
22:28 smls hotel: Re. Supplier, you need it because you cannot call .emit on a Supply directly.
22:28 geekosaur isn't there a ticket for that? some kind of nqp shenanigans iirc
22:29 protium joined #perl6
22:29 hotel ooh, I get it now
22:29 hotel smls++
22:32 cxreg m: say "a" eq "a"
22:32 camelia rakudo-moar ac36d2: OUTPUT«True␤»
22:33 hotel "The server MUST provide a sane Supply that emits Blob objects..." but only suppliers can emit?
22:34 cxreg m: say ("a" eqv "a") === True
22:34 camelia rakudo-moar ac36d2: OUTPUT«False␤»
22:34 cxreg m: say ("a" eq "a") === True
22:34 camelia rakudo-moar ac36d2: OUTPUT«True␤»
22:34 cxreg o_O
22:34 hotel lol
22:35 smls hotel: When you call the .emit method on the Supplier, it becomes available to all subscribers of the Supply.
22:35 cxreg i think that's a regression, i have an old build that returns True
22:35 hotel so basically I'm just supposed to have both
22:35 hotel or I guess I have to anyway
22:36 hotel just wondering why it says the supply should emit stuff
22:36 smls it is intended to mean the same thing
22:37 smls just doesn't use the language very precisely
22:37 hotel gotcha
22:37 smls You hand the Supply to the down/up-stream code, and keep the Supplier locally in your lexical scope where you want to emit stuff on the Supply.
22:39 ugexe cxreg: maybe related to this? https://github.com/rakudo/rakudo/commit/​fe2be65806d907efbbaa0adc4f0175c2e23c3a40
22:40 wamba joined #perl6
22:40 cxreg the issue isn't with ===, but with what eqv returns
22:41 ugexe er, sorry its the commit *after* that
22:42 ugexe https://github.com/rakudo/rakudo/commit/​463e7589a1c332e4135c265f624f8e99ae02c2b9
22:46 cxreg yes
22:46 cxreg at least it looks like a likely culprit
22:47 ugexe i got True for 2014.04 fwiw
22:47 hotel =:= ?
22:47 cxreg i had True in 2015.12
22:47 hotel m: say 10 =:= 11
22:47 camelia rakudo-moar ac36d2: OUTPUT«False␤»
22:48 hotel m: say 10 =:= 10
22:48 camelia rakudo-moar ac36d2: OUTPUT«True␤»
22:48 cxreg hotel: compares aliased containers
22:48 ugexe er 2016.04 heh
22:48 cxreg oh heh
22:48 ugexe i.e. it had to have happened in the last few weeks
22:49 hotel what are these so-called "containers" people keep talking about?
22:50 geekosaur m: my $a; say $a.VAR.^name
22:50 camelia rakudo-moar ac36d2: OUTPUT«Scalar␤»
22:52 hotel m: my $a; say $a.VAR
22:52 camelia rakudo-moar ac36d2: OUTPUT«Any␤»
22:53 cxreg m: say "a" =:= "a"
22:53 camelia rakudo-moar ac36d2: OUTPUT«True␤»
22:54 hotel bork I can't think anymore
22:57 geekosaur before you run away too far, consider
22:57 geekosaur m: my $a; say $a.^name
22:57 camelia rakudo-moar ac36d2: OUTPUT«Any␤»
22:57 hotel|out so it helps with introspection?
22:58 geekosaur a variable like $a normally gives you its value. but it's actually bound to a container --- that is how it can be mutable
22:58 cxreg say my name say my name
22:58 smls hotel: Basic value types like strings (Str) and integers (Int) are immutable in Perl 6. Item containers (also called "scalars") are what makes it possible to use Perl 6 for imperative programming nonetheless.
22:58 smls E.g. when you write «my $i = 42;», it stores an Int object representing the number 42, in the item container represented by the variable $i.
22:58 smls And then when you call «$i++», it does not modify the Int object (which is immutable), but replaces it with another Int object representing the number 43.
22:59 smls Every normal $ variable, and every slot of a @ variable, represents such a container.
23:00 hotel|out so /that's/ why you can't access the characters in a Str
23:00 hotel|out interesting nonetheless
23:08 AlexDaniel m: my $s = ‘abc’; $s.substr-rw(1, 1) = ‘z’; say $s
23:08 camelia rakudo-moar ac36d2: OUTPUT«azc␤»
23:08 AlexDaniel smls: how would you explain this? :)
23:08 kid51 joined #perl6
23:09 BenGoldberg joined #perl6
23:11 geekosaur don;t see how that proves smls wrong. substr's result doesn't know where it came from; substr-rw's is a proxy that knows and can make alterations to the container thereby
23:12 AlexDaniel geekosaur: no-no, it doesn't. I just thought that after a great explanation he can also give another great explanation for this :)
23:13 ugexe m: use MONKEY-TYPING; role StrList { method AT-POS($a) { return self.substr($a, 1) }; }; augment class Str { also does StrList; }; my $str = "abcd"; say $str[2]
23:13 camelia rakudo-moar ac36d2: OUTPUT«c␤»
23:21 zakharyas joined #perl6
23:22 sufrostico joined #perl6
23:23 jjido joined #perl6
23:27 hotel|out my phone's doing this weird thing where it drops or downloads corrupted audio packets when streaming but playback continues with long gaps of silence anyway
23:28 hotel|out if only android was built on perl6, this kind of thing wouldn't happen
23:31 ZoffixWin joined #perl6
23:32 literal m: class Foo is Str {}; my $foo = Foo("dsfsdf"); say $foo
23:32 camelia rakudo-moar ac36d2: OUTPUT«Cannot find method 'Foo'␤  in block <unit> at /tmp/gTydPtmEfn line 1␤␤»
23:32 literal how should I be doing this?
23:33 ZoffixWin I need to generate a date in HTTP Last Modified header format. I don't see any convenient methods in Dateish/DateTime... are there any subs that could make it easier than this:
23:33 ZoffixWin my $mod = DateTime.new("main.css".IO.modified); say $mod; printf "%s, %02d %s\n", <Mon Tue Wed Thu Fri Sat Sun>[.day-of-week-1], .day, <Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec>[.month-1]  given $mod;
23:33 ZoffixWin literal, Foo.new
23:34 literal ZoffixWin: is there no way to get a short-hand constructer like Str()?
23:35 ugexe method CALL-SAME($a) { self.new($a) }
23:35 ugexe er CALL-ME
23:36 ZoffixWin m: class _Foo is Str {}; sub Foo { _Foo.new: $^a }; my $foo = Foo("dsfsdf"); say $foo
23:36 camelia rakudo-moar ac36d2: OUTPUT«Default constructor for '_Foo' only takes named arguments␤  in block <unit> at /tmp/c_4MS2cjqk line 1␤␤»
23:36 * ZoffixWin wonders what that throws that error
23:36 literal I see. new() requires a named argument, what is it for Str? docs don't mention it
23:36 ugexe m: class Foo { has $.str; method CALL-ME($str) { self.new(str => $str); }; }; my $foo = Foo("asdf"); say $foo
23:36 camelia rakudo-moar ac36d2: OUTPUT«Foo.new(str => "asdf")␤»
23:37 ZoffixWin neat
23:38 grondilu joined #perl6
23:39 literal doesn't stringify like Str though
23:39 literal or .gistify
23:40 ugexe $.str handles /*/, its all in what you make it
23:40 ugexe maybe you really want to do role Stringy instead of inherit from Str
23:40 cdg joined #perl6
23:42 literal I see didn't know about Stringy
23:45 hotel|out roles are like interfaces right?
23:45 ZoffixWin <ZoffixWin> perlbot, eval: strftime '%a, %d %b %Y %T GMT', localtime
23:45 ZoffixWin <perlbot> ZoffixWin: Fri, 06 May 2016 23:45:15 GMT
23:45 ZoffixWin Is there similar simplicity in Perl 6?
23:47 ZoffixWin There just gotta be. I refuse to believe the person who decided we needed .weekday-of-month didn't think to add an easy way to format datetimes :/
23:48 hotel m: strftime "%a, %d %b %Y %T GMT", localtime
23:48 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sG8tFMlJeP␤Undeclared routines:␤    localtime used at line 1␤    strftime used at line 1␤␤»
23:48 * hotel shrugs
23:48 ZoffixWin Hmmmm
23:49 hotel https://doc.perl6.org/type​/Dateish#method_formatter ?
23:50 hotel if I'm reading that right you can set it to your own function?
23:50 hotel :S
23:50 ZoffixWin hotel, yes, but that function would have to be huge like this: https://github.com/rakudo/rakudo/​blob/nom/src/core/DateTime.pm#L10
23:50 ZoffixWin Which is what I'm trying to avoid :P
23:51 ZoffixWin It probably should belong in POSIX module: http://modules.perl6.org/dist/POSIX
23:51 ZoffixWin The strftime thing that is
23:51 hotel wow
23:54 hotel can't you use nativecall then?
23:54 hotel or do you need it to be really cross-platform? :P
23:55 ZoffixWin Why, is it not cross-platform in C?
23:55 ugexe i think he just wants all the date-style directives for %Y etc for sprintf
23:56 hotel idk
23:56 hotel guess it is then
23:56 hotel so can't you do a native call to strftime?
23:56 * ZoffixWin tries to hack something up and will submit a PR to POSIX
23:56 hotel lol
23:57 ZoffixWin hotel, well, I don't know C... So that will involve "learning things" :)
23:57 hotel|out http://man7.org/linux/man-​pages/man3/strftime.3.html
23:58 BenGoldberg Technically, you don't need to learn C.  You just need to learn the types used by C.
23:58 ZoffixWin Sure :)
23:59 BenGoldberg Some of it is a bit hard, I mean, 'char' is a type whose purpose is to hold a chararacter.  Mind blowing!

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

Perl 6 | Reference Documentation | Rakudo