Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-04

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:03 Geth ¦ modules.perl6.org: 86dddb247f | (Zoffix Znet)++ | update-modules.perl6.org
00:03 Geth ¦ modules.perl6.org: Temporarily always force full rebuild
00:03 Geth ¦ modules.perl6.org:
00:03 Geth ¦ modules.perl6.org: For some reason it appears to never full rebuild even when commit
00:03 Geth ¦ modules.perl6.org: message has `[REBUILD]` in it.
00:03 Geth ¦ modules.perl6.org:
00:03 Geth ¦ modules.perl6.org: Temporarily force the value to 1, to start eliminating suspects.
00:03 Geth ¦ modules.perl6.org:
00:03 Geth ¦ modules.perl6.org: Part of #76
00:03 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/86dddb247f
00:08 Geth ¦ modules.perl6.org: 13c48046df | (Zoffix Znet)++ | 2 files
00:08 Geth ¦ modules.perl6.org: Add MODULES_PERL6_DO_NOT_REMOVE_OLD_DISTS env var
00:08 Geth ¦ modules.perl6.org:
00:08 Geth ¦ modules.perl6.org: To be used a debugging aid to the live site
00:08 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/13c48046df
00:09 Zoffix ohhhhh... oh ok
00:09 Zoffix Yeah, it only deletes at the end by matching the build ID, so actually it's safe to kill it
00:09 Geth ¦ modules.perl6.org: 15f5404e1d | (Zoffix Znet)++ | 2 files
00:09 Geth ¦ modules.perl6.org: Revert "Add MODULES_PERL6_DO_NOT_REMOVE_OLD_DISTS env var"
00:09 Geth ¦ modules.perl6.org:
00:09 Geth ¦ modules.perl6.org: This reverts commit 13c48046df719075aebdb2e846326cee4d481be7.
00:09 Geth ¦ modules.perl6.org:
00:09 Geth ¦ modules.perl6.org: On second thought, not needed.
00:09 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/15f5404e1d
00:13 Geth ¦ modules.perl6.org: a02751d7e3 | (Zoffix Znet)++ | update-modules.perl6.org
00:13 Geth ¦ modules.perl6.org: [REBUILD] Undo always-rebuild
00:13 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/a02751d7e3
00:14 Zoffix :S
00:14 Zoffix Now it's just screwing with me. Full rebuild works when starting by hand :\
00:16 Geth ¦ modules.perl6.org: 160e2ced47 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/AppVeyor.pm
00:16 Geth ¦ modules.perl6.org: [REBUILD] Clean up AppVeyor postprocessor docs
00:16 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/160e2ced47
00:16 * Zoffix sacrifices a small mammal and starts a rythmic chant
00:23 Zoffix \o/ hey it worked \o/
00:29 ijneb joined #perl6
00:32 mr-foobar joined #perl6
00:37 lookatme joined #perl6
00:37 lookatme morning
00:37 ijneb howdy lookatme!
00:37 ijneb again lol
00:37 lookatme hey ijneb
00:38 lookatme yeah, again :)
00:42 lookatme ijneb, so you are learning Perl 6 ?
00:43 Zoffix k. seems to be working now and appveyor update came through. No idea why it was broke tho. Ghost in the code, I guess.
00:47 entonian joined #perl6
00:51 jameslenz joined #perl6
00:53 ugexe buffer 3
00:55 Zoffix /win3
00:55 buggable Zoffix, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 23 hours, 4 minutes, and 19 seconds
00:55 Zoffix :)
01:06 mr-foobar joined #perl6
01:07 TEttinger joined #perl6
01:13 Cabanossi joined #perl6
01:32 w_o_w joined #perl6
01:35 Geth_ ¦ perl6-examples: mattwhisenhunt++ created pull request #50: Change URL to a real http address
01:35 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/pull/50
01:38 protium /win3
01:38 buggable protium, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 22 hours, 21 minutes, and 39 seconds
01:50 Cabanossi joined #perl6
01:52 ilbot3 joined #perl6
01:52 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:57 mspo wow package namespaces really start to sound like a good idea with all that npm stuff :)
02:05 lookatme ?_?
02:08 http_GK1wmSU joined #perl6
02:11 http_GK1wmSU left #perl6
02:22 BenGoldberg joined #perl6
02:25 pelev joined #perl6
02:28 Ben_Goldberg joined #perl6
02:32 Ptolemarch joined #perl6
02:43 Cabanossi joined #perl6
02:45 ryu0 /win3
02:45 buggable ryu0, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 21 hours, 14 minutes, and 30 seconds
02:47 lookatme What is `win3` for ?
02:47 lookatme /win3
02:47 buggable lookatme, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 21 hours, 12 minutes, and 24 seconds
02:48 lookatme /win5
02:48 buggable lookatme, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 21 hours, 11 minutes, and 58 seconds
02:48 lookatme /win
02:49 Geth ¦ ecosystem/html-escape: 95a3903c17 | moznion++ | META.list
02:49 Geth ¦ ecosystem/html-escape: Add HTML::Escape
02:49 Geth ¦ ecosystem/html-escape: review: https://github.com/perl6/ecosystem/commit/95a3903c17
02:50 Geth ¦ ecosystem: moznion++ created pull request #357: Add HTML::Escape
02:50 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/357
02:58 noganex_ joined #perl6
02:59 raschipi joined #perl6
03:01 raschipi lookatme: the win stuff is for a lottery that awards an imaginary wd-40 can, the number is the chosen ticket.
03:02 skids joined #perl6
03:07 BenGoldberg Well, Since my imagination is full of bubble gum, I could definitely use an imaginary can of WD-40, so...
03:07 BenGoldberg /win
03:07 BenGoldberg /win3
03:07 buggable BenGoldberg, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 20 hours, 52 minutes, and 39 seconds
03:07 lookatme /win99
03:07 buggable lookatme, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 20 hours, 52 minutes, and 21 seconds
03:08 BenGoldberg Actually, I'd want a *different* ticket number, to avoid sharing my imaginary spray lube....
03:08 BenGoldberg /win42
03:08 buggable BenGoldberg, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 20 hours, 51 minutes, and 37 seconds
03:09 raschipi g'night
03:19 awwaiid Sorry I forgot to send a reminder -- tomorrow is the ICFP Contest, which is specifically designed for people to show off their favorite language / programming tech. http://icfpcontest.org . This is a 72 hour marathon challenge, starting at 12:00 UTC (in 8 hours 40ish minutes) when the problem will be announced. You can participate with any team in any location
03:26 Cabanossi joined #perl6
03:34 pharv joined #perl6
03:55 Cabanossi joined #perl6
04:10 zengargoyle lazyirc: do we have flock and compress/gzip like IO?
04:12 vendethiel joined #perl6
04:23 zengargoyle /win666
04:23 buggable zengargoyle, Thank you for entering Accidental /win Lottery! The next draw will happen in 3 weeks, 6 days, 19 hours, 36 minutes, and 48 seconds
04:46 cpage_ joined #perl6
04:56 RockyBalboa joined #perl6
04:57 lizmat joined #perl6
04:59 astj joined #perl6
05:01 RockyBalboa Hello, world! I have a quick question. If I do that: https://gist.github.com/anonymous/56ca994d88b01758c7a18772fa55c069 ; will the child sub be defined each time I call the parent sub (and that may lead to poor performances)? Or only at compile time? Thx for your help. :)
05:03 zengargoyle yes i would expect.
05:03 zengargoyle new sub each time.
05:04 RockyBalboa Ok! Thank you very much, zengargoyle :)
05:04 zengargoyle i think...
05:06 zengargoyle method-y might have variables from method-x....
05:07 zengargoyle sub method-x($a) { sub method-y { $a ~ "hello" }; return "say" ~ method-y }
05:08 RockyBalboa Yes, I think your are right then, there is obviously some context involved here, so the sub is redefined each time. (Ohhh and btw, these are not methods, sorry, I'm just starting Perl 6).
05:08 zengargoyle there are ways to make method-y not be created each time, but depends on your usage....
05:09 zengargoyle maybe perl6 is smart enough to know that it doesn't change and doesn't make new sub each time.... not sure...
05:11 zengargoyle usually... sub x { return sub y {} } means you want y to change each time...
05:13 RockyBalboa And if I do EVALFILE a few times on the same file that doesn't change, will the file be evaluted each time from scratch or is there some kind of caching?
05:15 xtreak joined #perl6
05:16 zengargoyle m: sub x($a) { state $x = 0; sub y { "world" ~ $x++ }; return "hello" ~ y }; say x(1), x(2);
05:16 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld1?»
05:18 RockyBalboa Ohhh that's nice this state variable! :)
05:18 RockyBalboa It amazes me all these features in Perl6!
05:20 zengargoyle m: sub x($a) { state $x = 0; state &y = sub { "world" ~ $x++ }; return "hello" ~ y }; say x(1), x(2);
05:20 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld1?»
05:21 * zengargoyle expected that to work.. :P
05:24 * zengargoyle has no clue how to make method-y only once.... :/
05:26 zengargoyle i think maybe it is only compiled once, but it has access to the lexical scope....  so it's the same sub { ... $x++ ... } as a compiled thing, but the $x++ is still the outside thing....
05:27 RockyBalboa What is this amperand &y sigil here? A kind of block/lamda var?
05:27 zengargoyle m: sub x($a) { my $x = 0; state &y = sub { "world" ~ $x++ }; return "hello" ~ y }; say x(1), x(2);
05:27 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld1?»
05:27 * zengargoyle ouch
05:28 zengargoyle m: sub x($a) { my $x = 0; &y = sub { "world" ~ $x++ }; return "hello" ~ y }; say x(1), x(2);
05:28 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unsupported use of y///; in Perl 6 please use tr///?at <tmp>:1?------> 3 { "world" ~ $x++ }; return "hello" ~ y 7?5}; say x(1), x(2);?»
05:28 zengargoyle m: sub x($a) { my $x = 0; my &y = sub { "world" ~ $x++ }; return "hello" ~ y }; say x(1), x(2);
05:28 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld0?»
05:29 zengargoyle m: sub x($a) { my $x = 0; first my &y = -> { "hello" ~ $x++} ; return "hello" ~ y }; say x(1), x(2);
05:29 camelia rakudo-moar 5d200f: OUTPUT: «hellohello0hellohello0?»
05:31 RockyBalboa Thanks zengargoyle, I am going to study the doc in depth. I just started Perl 6 yersteday, so I need more work to understand the synthax (&, -> and so). :)
05:32 zengargoyle RockyBalboa: it's the wrong time of the day for experts....  you would probably get a better answer in a few hours...
05:32 RockyBalboa Ok lol. Are they all sleeping? :-P
05:32 zengargoyle it's 05:32 UTC and most experts are in UTC-ish timezone and asleep.... :P
05:32 RockyBalboa Where are U form?
05:33 zengargoyle west coast USA.
05:33 zengargoyle it's only 22:33
05:33 zengargoyle but east coast people are asleep too. :)
05:33 RockyBalboa Ohhh ok! :) Here 07:33 Switzerland time
05:34 zengargoyle ah, yes, you'll have better help in a few hours... :)
05:34 RockyBalboa Yeah sometimes I like to watch NHL playoff hockey, and I can only follow the western games, because of time zone :-P
05:34 zengargoyle i'm just here to play and fill up the logs.
05:35 RockyBalboa Ohhh I see lol
05:35 RockyBalboa So have a good night, thx for you help. CU later maybe :)
05:35 zengargoyle and tell people it doesn't really get rolling for a few more ours..  best of luck.
05:36 lowbro joined #perl6
05:36 lowbro joined #perl6
05:38 zengargoyle m: sub x($a) { my $x = 0; constant &y = -> { "hello" ~ $x++} ; return "hello" ~ y }; say x(1), x(2);
05:38 camelia rakudo-moar 5d200f: OUTPUT: «hellohello0hellohello1?»
05:39 zengargoyle m: sub x($a) { my $x = 0; constant &y = -> { "world" ~ $x++} ; return "hello" ~ y }; say x(1), x(2);
05:39 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld1?»
05:40 zengargoyle m: sub x($a) { my $x = 0; once my &y = -> { "world" ~ $x++} ; return "hello" ~ y }; say x(1), x(2);
05:40 camelia rakudo-moar 5d200f: OUTPUT: «Cannot invoke this object (REPR: Uninstantiable; Callable)?  in sub x at <tmp> line 1?  in block <unit> at <tmp> line 1??»
05:40 zengargoyle m: sub x($a) { my $x = 0; my &y = once -> { "world" ~ $x++} ; return "hello" ~ y }; say x(1), x(2);
05:40 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld1?»
05:40 * zengargoyle grrr
05:42 zengargoyle m: sub x($a) { my $x = 0; my &y = -> { "world" ~ once $x++} ; return "hello" ~ y }; say x(1), x(2);
05:42 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld0?»
05:43 RockyBalboa You can eval code with camelia bot ?! OMG
05:43 RockyBalboa m: say "Hello, World!";
05:43 camelia rakudo-moar 5d200f: OUTPUT: «Hello, World!?»
05:44 RockyBalboa I guess we better not try some infinite loop :P
05:44 zengargoyle BuildTheRobots: really, i think it is 'compiled' once as far as work goes, but has access to the lexical scope...
05:45 zengargoyle so no extra work, it is not compiling method-y each time... only once.  but in the compiled code, variables may be outside....
05:46 zengargoyle it's not an optimization sort of thing you need worry about...
05:47 zengargoyle part of perl 6 is that the parser is one pass only.
05:47 zengargoyle except for thing like EVAL i guess.
05:47 zengargoyle m: say 1 ... Inf
05:47 camelia rakudo-moar 5d200f: OUTPUT: «(...)?»
05:48 zengargoyle m: say flat 1 ... Inf
05:48 camelia rakudo-moar 5d200f: OUTPUT: «(...)?»
05:48 zengargoyle m: say  flat 1 .. Inf
05:48 camelia rakudo-moar 5d200f: OUTPUT: «(...)?»
05:48 zengargoyle m: .say for 1 .. Inf
05:48 * zengargoyle hopes it times out.....
05:48 camelia rakudo-moar 5d200f: OUTPUT: «(timeout)1?2?3?4?5?6?7?8?9?10?11?12?13?14?15?16?17?18?19?20?21?22?23?24?25?26?27?28?29?30?31?32?33?34?35?36?37?38?39?40?41?42?43?44?45?46?47?48?49?50?51…»
05:49 RockyBalboa Thx! That's nice! :)
05:49 zengargoyle they make the bot safe enough.... there are many things you can't do... :)
05:50 zengargoyle and if you break it, it's probably a bug they want to know about....
05:51 RockyBalboa We can "use MyModule;" in an evaluated file, so it seems compiled too, not just interpreted at runtime.
05:51 zengargoyle yes, there is no interpreter...
05:51 RockyBalboa LOOL. Poor Camelia. :P
05:51 zengargoyle this is why the `perl6` REPL is sort of broken...
05:52 zengargoyle each line you type is a new { .... } scope that is compiled and then executed.
05:52 RockyBalboa Ok! Sorry, I am used to Ruby, I'm just starting to understand Perl. But I really like all the stuff in there so far! That's amazing all we can do. Ruby is much more narrowed.
05:53 zengargoyle yes, Perl 5 or 6 rocks! :)  (we're so much better.... )
05:53 * zengargoyle is biased.
05:54 zengargoyle you will like it more and more.
05:54 zengargoyle and wish it was a bit faster and a bit more 'production' ready because it's so nice.
05:55 RockyBalboa Yeaahh I think so. :) It's very cool!
05:55 RockyBalboa I am trying to port a micro homemade web framework from Ruby to Perl 6.
05:56 RockyBalboa Perl 6 grammar is very cool! I mean it's so easy and fast to build a template engine with that!
05:57 wamba joined #perl6
05:57 zengargoyle yes, a bit slow compared to say perl 5 regex or PCRE, but nice and hopefully gets faster.
05:58 zengargoyle i did a strange AI visual box stacking thing using a Grammar because when you have Grammar everything is a Grammar. :)
05:59 RockyBalboa Ruby is kind of slow too, but it's definitly fast enough for the web. How does Perl 6 compare to Ruby right now with performances?
06:00 lookatme :)
06:00 ryu0 And Perl6 leaves it open to the possibility of being ported to other major VMs.
06:00 zengargoyle i don't do much web stuff, but i think Ballidor is the 'framework' sort of thing at the moment.
06:01 ryu0 I just hope the current major implementation is the one they settle on.
06:01 RockyBalboa Looool. Yeaahhh Grammar is this hammer thing: everyithing look like a nail :P
06:01 ryu0 They've gone through a lot over the years.
06:03 zengargoyle i am Perl 5 hacker, but i got the memo that Perl 6 would take long time (15 years -ish) but waited and am mostly happy.
06:03 RockyBalboa Yes what a long road :-/
06:04 zengargoyle i did not jump to Ruby because it was slow-ish and i saw Matz?? once complain about Rails and popularity and having to maintain a 'used' language.
06:04 ryu0 Me, i'm entirely new to Perl and not too experience with dynamic typing. I've largely used static typed languages to date.
06:04 zengargoyle he wrote Ruby for himself and was a bit *something* about other people using it because it means he can't do whatever he wants.
06:04 lookatme Perl 6 is quite stable. I have a script( a process manager) running with old rakudo version. It has running well about 2 x 31 x 24 hours.
06:05 ryu0 lookatme: hopefully it's more useful than a PHB. =p
06:05 RockyBalboa I never used Perl 5, started with C/Java/PHP, then Ruby, and here I am (I am a mostly a web developer) :P
06:06 zengargoyle lookatme: i ran into everything that changed....
06:06 ryu0 RockyBalboa: how much did you use C? It is the main language I am adept with.
06:07 zengargoyle i've had to change all 3 of my modules because of changes to certain things.... :)
06:08 lookatme :)
06:08 ryu0 p6: say [+] "a", "b"
06:08 camelia rakudo-moar 5d200f: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3?5a' (indicated by ?)?  in block <unit> at <tmp> line 1??»
06:09 zengargoyle but it gets better and better, so i'm mostly happy camper.
06:09 ryu0 Huh. Thought it would concatenate.
06:09 zengargoyle m: say [~] <a b>
06:09 camelia rakudo-moar 5d200f: OUTPUT: «ab?»
06:09 lookatme yeah, it must be!
06:09 RockyBalboa For example, a 30 lines template engine I use in my web framework written in Ruby: https://gist.github.com/anonymous/5ba0f6b905d233426ae3c60fab07ecd6 I will try to port my stuff to Perl 6 and publish it
06:09 zengargoyle ~ is string concat... + is number...
06:09 ryu0 Ah, so that's it. D uses the same syntax for appending strings.
06:10 lookatme RockyBalboa, Perl 6 now is strong type language
06:10 ryu0 Made more sense to me since concatenation is not really like addition.
06:10 RockyBalboa @zengargoyle: ohhh I just have the basics in C, not much an expert :P
06:10 ryu0 1, different types. and 2, it's not commutative.
06:11 ryu0 p6: say ("a" ~ "b") == ("b" ~ "a")
06:11 camelia rakudo-moar 5d200f: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3?5ab' (indicated by ?)?  in block <unit> at <tmp> line 1??»
06:11 ryu0 ... then what's equality?
06:11 zengargoyle eq
06:11 ryu0 Oh, it's a keyword.
06:11 ryu0 How pascalish.
06:12 ryu0 p6: say ("a" ~ "b") eq ("b" ~ "a")
06:12 camelia rakudo-moar 5d200f: OUTPUT: «False?»
06:12 ryu0 say (1+2) eq (2+1)
06:12 evalable6 ryu0, rakudo-moar 5d200f1e5: OUTPUT: «True»
06:12 ryu0 ... Huh.
06:12 zengargoyle m: say ("a" ~ "b") cmp ("b" ~ "a")
06:12 camelia rakudo-moar 5d200f: OUTPUT: «Less?»
06:12 RockyBalboa m: 'hello' eq 'hello'
06:12 camelia rakudo-moar 5d200f: OUTPUT: «WARNINGS for <tmp>:?Useless use of "eq" in expression "'hello' eq 'hello'" in sink context (line 1)?»
06:12 zengargoyle m: say so ("a" ~ "b") cmp ("b" ~ "a")
06:12 camelia rakudo-moar 5d200f: OUTPUT: «True?»
06:12 zengargoyle eh...
06:12 zengargoyle m: say so ("a" ~ "b") === ("b" ~ "a")
06:12 camelia rakudo-moar 5d200f: OUTPUT: «False?»
06:13 zengargoyle m: say ("a" ~ "b") === ("b" ~ "a")
06:13 camelia rakudo-moar 5d200f: OUTPUT: «False?»
06:13 ryu0 do any perl6 implementations support compiling standalone executables yet?
06:13 lookatme ryu0, no
06:13 zengargoyle ryu0: not to my knowledge...  and i ask the same frequently. :)
06:13 ryu0 huh. Hope it gets it one day.
06:14 zengargoyle it's more that MoarVM is still changing so much and nobody has the time.
06:14 zengargoyle but it is on the roadmap and should be relatively easy.
06:14 ryu0 It's not a priority for what I intend to do so i don't really care but it would add more options.
06:14 RockyBalboa Just a few basics questions. Indentation: 4 spaces? Naming: kebab-case? File naming: .p6, .pm6 ? I think it would be cool to have some kind of conventions guideline
06:15 ryu0 zengargoyle: so what options exist for exposing C APIs to rakudo?
06:16 zengargoyle no indentation arguments.  kebab-case since we can.  Camel::Case for modules, UPPER for special things, i use pl6 and pm6 just to make vim do the right thing.
06:16 lookatme I prefer .p6 amd .pm6
06:16 lookatme and
06:16 zengargoyle ryu0: it's called NativeCall
06:17 ryu0 Ah.
06:17 ryu0 thanks.
06:17 zengargoyle and it's pretty simple sub foo () is native ('libfoo.so', :version(1)
06:17 zengargoyle but not even that hard, but not even that simple.... :)
06:18 RockyBalboa Ok thanks lookatme! Yes, I found too that Vim didn't synthax highlight .pm files, only .pm6
06:19 lookatme Hmm, I use emacs, don't know that
06:19 zengargoyle ryu0: i have a module that builds C code into a .so and includes it in the install and calls function.....
06:20 lookatme It's quite easy use NativeCall make a binding for C library
06:20 RockyBalboa We have for example, DBIish ".allrows" method, why not ".all-rows" ? It sometimes confusing having kebacase or singlewordcase? And if you had some snake_case naming, it quickly confusing. :-/
06:20 zengargoyle Algorithm::Trie::libdatrie  -- it not the best, but if i can manage... it's not too hard... :)
06:22 zengargoyle yeah, everybody has their own naming by habit, Perl 5 does not do kebab-case so some do snake_case out of habit.
06:22 zengargoyle or finger memory... :)
06:22 zengargoyle i cringe if a class is not Camel::Case
06:23 zengargoyle but also 'lowercase' package/module/namething are technically reserved for internal use.
06:24 zengargoyle for pragmas like 'use foo;'
06:24 nattefrost joined #perl6
06:24 RockyBalboa Yes, but overall, all the core libs are very consistent CamelCase for class and kebab-case for the rest. Pyhton API is much more a mess
06:24 zengargoyle and all UPPER are sorta reserved for special things like 'use MONKEY-SEE-NO-EVAL'
06:25 RockyBalboa Yes, like use lib::MyClass? It will look on my local lib dir?
06:26 zengargoyle eww, no..
06:27 zengargoyle ./lib is just for organizing.... then you do 'use MyClass;' and run with `perl6 -Ilib` to include the lib....
06:27 RockyBalboa Ok! :)
06:27 zengargoyle lib is not part of the name....  if you install your program... it will be MyClass and not lib::MyClass....
06:27 zengargoyle it works... but not a good idea and doesn't work for long.... :)
06:28 RockyBalboa Ok lol thx! :)
06:28 zengargoyle that might be leftover Perl 5 module layout thing....  ./bin ./lib ./t  are just where everybody and every tool expects things to go.
06:28 RockyBalboa So I am just starting this Perl 6 Fundamentals book :P
06:29 RockyBalboa See U later, have a good night zen, thx again!
06:29 RockyBalboa Ok /bin, /lib, /t !
06:29 zengargoyle RockyBalboa: check out App::Mi6
06:30 zengargoyle it is developer tool that makes directories, runs tests, makes thing 10x easier than doing it yoursefl.
06:30 RockyBalboa Oh and another cool stuff in Perl 6: multi sub! :)
06:30 RockyBalboa Ok thx, I will add that to my stuff :P
06:30 nige joined #perl6
06:31 zengargoyle have a nice day.
06:31 RockyBalboa U2 :)
06:31 RockyBalboa Or night :P
06:33 zengargoyle lookatme: where in the world are you?
06:34 n1ge have been trying to get rakudobrew + zef + Bailador to work well together - I can't seem to get a combination that is working ... does anyone know of a combination of versions that work from a scratch install on linux?
06:36 n1ge I needed to use TWEAK - which was the motivation for upgrading rakudo / moarvm / zef - and I'm currently on day 3 of yak shaving
06:37 szabgab joined #perl6
06:37 zengargoyle i have never used Bailador so not sure...
06:38 szabgab hello there!
06:38 n1ge hi :-)
06:38 zengargoyle woot
06:39 szabgab There seem to be some memory leaks in Bailador I've started to track down
06:39 szabgab I wonedr if this makes any sense: http://www.mail-archive.com/perl6-users@perl.org/msg04118.html
06:39 zengargoyle oh, ask szabgab i think.
06:39 n1ge yes - I saw the memory leaks message
06:39 zengargoyle yeah, zef install Bailador fails for me....
06:40 n1ge yes - it's a bit of a bummer
06:40 n1ge I was running it with ubic (perl5) - which would usefully keep the Bailador app up and running
06:41 zengargoyle it's like the weather... wait a few days and it will change... :P
06:41 szabgab zengargoyle: have you opened an issue with the output of the failure?
06:41 n1ge so it was just about managing - to do the job
06:41 nadim_ joined #perl6
06:42 zengargoyle szabgab: i just now tried for the first time...  much checking before complaining. :)
06:43 n1ge indeed - normally I'm happy to wait (key trait of a Perl 6 early adopter)
06:43 szabgab :) We seem to keep bumping into various installation issues, but I hope we are solving them. (Actually I am only talking others are doing the solving :)
06:43 zengargoyle i've never used it before and i'm probably on recent-enough rakudobrew built perl6 and new-ish zef but still ....
06:44 zengargoyle szabgab: ah, i just thought i remembered your name coming up in regards to Bailador... :)
06:45 szabgab The thing is that I even see the Travis flucktuating between success and  failure in a rather unpredictable way. A change to the README file and the report might change.
06:46 zengargoyle have you talked to ugexe?
06:46 lookatme zengargoyle, Hmm?
06:46 szabgab anyway, if there are issues with Bailador I can try to help here, but I was mostly interested in that memory usage code.
06:48 nadim_ .tell sena_kun can you please try the zef install Data::Dump::Tree again? Should work now.
06:48 zengargoyle i'll try install Bailador again with verbose and debug and maybe file bug if i can figure out where-ish.
06:48 n1ge thanks Gabor - generally Bailador was working OK - ubic did help with keeping it alive
06:49 n1ge thanks zengargoyle will give that a go
06:49 zengargoyle there has been a high variability in latest rakudobrew + zef + things....
06:49 n1ge (before I give go a go ;-) )
06:50 lookatme zengargoyle, I'm in China. <- you mean this ?
06:50 zengargoyle and i think that why some try to point people to lastest YYYY-MM release ... :)
06:50 zengargoyle lookatme: yeah, timezone...  i see you more than others... just curious..
06:51 zengargoyle i tend to be very late nigth and catch opposite sides of the world. :)
06:52 darutoko joined #perl6
06:52 lookatme zengargoyle, Oh, it's 2pm here
06:54 n1ge Gabor - there are a couple of things on the bailador wishlist
06:54 n1ge I've missed some things from Mojolicious - the flash and easily moving controllers into other files (did this with roles in the end)
06:55 zengargoyle Bailador.... t/20-cli.t Failed test:  6 Non-zero exit status: 1
06:55 szabgab that t/20-cli is known to be problematic
06:56 zengargoyle at t/20-cli.t line 127
06:56 n1ge - it does the trick for me mostly - as the backend perl5 service talks to the db etc
06:56 Cabanossi joined #perl6
06:56 szabgab try      zef install --serial Bailador
06:56 zengargoyle ah, for me zef fails because that.
06:56 rindolf joined #perl6
06:56 zengargoyle one moment.
06:57 szabgab I have plenty of time. I am tying to install the Redis module now :)
06:58 zengargoyle so it's deps inside of the temp CuR?  still waiting...
06:58 n1ge ok - trying zef install -serial Bailador now
06:59 szabgab doubldash !
06:59 n1ge yep - got that
06:59 zengargoyle oh, try zef --deps-only Bailagor; zef install Bailador...
07:00 zengargoyle ah, too late. :P
07:00 szabgab that would probably also a good idea
07:00 n1ge will try that next ;-)
07:00 szabgab what zengargoyle  wrote
07:00 szabgab but I guess those two do effectively the same
07:01 n1ge ok trying zen version now
07:01 zengargoyle yep, installed: 1 bin/ script [bailador] installed to
07:01 zengargoyle well, serial is each at once as one thing, --deps-only would still be all of them at once but just not the Bailador code.
07:02 zengargoyle depends on where the actual problem is i guess.....
07:02 zengargoyle this is probably a ugexe thing.
07:02 szabgab as far as we understood it is that in the t/20 we ru perl6 exeternally and that command does not see the not-yet installed dependencies
07:03 szabgab and this seems to be new in zef
07:03 szabgab and I think it has been fixed in the GitHub of Bailador.
07:04 zengargoyle szabgab: makes sense...
07:04 szabgab Get ugexe release it :)
07:04 zengargoyle https://gist.github.com/86ca199c8fc77757d40b05690b4ee487
07:04 zengargoyle install log i hope.
07:05 zengargoyle i got :ver<0.0.9>:auth<>:api<>
07:06 szabgab looks good to me :)
07:07 zengargoyle i wonder if zef prefers cpan and git does HEAD and somebody didn't bump versions... (if it's fixed in git)
07:08 zengargoyle i could see zef pulling 0.0.9 from cpan instead of git when 0.0.9 in git is diferent because .....
07:11 szabgab and I see I am mixing up nicknames again..
07:12 szabgab apparently it is not fixed in git, but zef prefers cpan, and it would not see our fix anyway because we use a dev branch
07:13 zengargoyle gah, uninstall and install from git works, but dependencies already installed now. :P
07:13 szabgab but there is no fix in git yet and maybe it is not even the problem in Bailador
07:13 zengargoyle oh, nm. :P
07:13 szabgab Now I am confusing myself as well :)
07:14 szabgab The issue is clearly that t/20-cli does not see the dependencies
07:14 szabgab Unless they were really installed earlier
07:14 zengargoyle like using $^X in perl6 right?
07:15 andrzejku joined #perl6
07:15 szabgab The only question why and who should fix this
07:15 szabgab $^X is not $*EXECUTABLE but yes
07:15 szabgab s/not/now/
07:15 zengargoyle i think i get it.
07:16 zengargoyle but yeah, not my fixability. :)
07:16 zengargoyle and the answer for the moment is --serial
07:17 zengargoyle or mayby (--deps-only; Bailador)
07:17 n1ge ec2 instance chugging along in the background - doing the zef install Bailador set now
07:17 n1ge step
07:19 * zengargoyle really needs to get my lxc instances back up and ready for perl 6 stuff...
07:22 zengargoyle i would like to see the --deps-only case vs --serial.  my understanding is that --serial negates some mulitprocessing magic.
07:22 zengargoyle i.e. --deps-only would use all your cores while --serial is just one at a time.
07:25 xtreak joined #perl6
07:29 n1ge hmm - no worky - https://pastebin.com/AGH94zd1
07:31 lookatme It's test failed ?
07:31 zengargoyle wow, All candidates are currently installed.
07:32 zengargoyle how is `zef install --deps-only Bailador` come back with that?
07:37 zengargoyle still fails though... what's the `perl6 -v` on that box?  i only know travis which builds *everything* from scratch.
07:38 http_GK1wmSU joined #perl6
07:38 n1ge This is Rakudo version 2017.07-126-g86cb136 built on MoarVM version 2017.07-293-g3f33a84
07:38 n1ge implementing Perl 6.c.
07:39 zengargoyle hehe, i'm 2017.07-54-g640641876
07:40 http_GK1wmSU left #perl6
07:41 zengargoyle you *might* want to try 2017-07 tag and stick to the release rather than building the absolutely latest if you don't know you need the absolute latest.
07:41 nadim joined #perl6
07:42 zengargoyle unless you're testing an just willing to report broken...  picking the rakudo of the day is a rough gamble.
07:43 n1ge yes - zen - to be honest I've tried lots of different versions 2017.01, 2017.05, 2017.07 etc
07:44 zengargoyle those errors look a lot like network/firewall problem.
07:44 zengargoyle expected a <h1> title, got nothing.
07:44 n1ge I probably should have kept a log of failures on different versions / combinations - made various bug reports along the way though
07:46 zengargoyle there is no compile error or start error or load failure but a failure to get a '<h1>Bailador App</h1>' response.
07:46 ChoHag joined #perl6
07:46 zengargoyle i would think that the test can't talk to the server from that.
07:47 zengargoyle unless that testing is not a server but more direct access through an instance... (no network involved)
07:48 n1ge ok - that's possible
07:49 n1ge it seems to install with the serial flag
07:49 zengargoyle that's just my guess... :)
07:49 zengargoyle or what i would be looking at first.
07:49 n1ge although it noted: WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
07:49 n1ge in any event starting the app causes this ...
07:50 n1ge ===SORRY!===
07:50 n1ge P6M Merging GLOBAL symbols failed: duplicate definition of symbol Response
07:52 zengargoyle that sounds like two modules both try to do someting like class Response is export without using namespaces.
07:53 n1ge yes - I need HTTP::UserAgent - I think there may be a clash there
07:53 n1ge the Bailador app uses that to talk to the backend REST service
07:55 zengargoyle yeah, my fuu would be download all the things and grep for Response and complain loudly at whomever dediced to export that name unqualified. :P
07:56 cschwenz joined #perl6
07:57 n1ge yep :-)
07:57 zengargoyle i feel your graar.
07:58 n1ge think I need to wait for a change in the ecosystem weather
07:58 zengargoyle if it's doable, you could 'need HTTP::UserAgent' and maybe use long names...
07:58 baest joined #perl6
08:00 zengargoyle avoid the export/import bits.  i'm not sure this would work...
08:00 n1ge yes - that could work - thanks for your help zengargoyle - much appreciated
08:00 Geth ¦ ecosystem: 95a3903c17 | moznion++ | META.list
08:00 Geth ¦ ecosystem: Add HTML::Escape
08:00 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/95a3903c17
08:00 Geth ¦ ecosystem: be1d0eae6c | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
08:00 Geth ¦ ecosystem: Merge pull request #357 from perl6/html-escape
08:00 Geth ¦ ecosystem:
08:00 Geth ¦ ecosystem: Add HTML::Escape
08:00 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/be1d0eae6c
08:00 sena_kun joined #perl6
08:00 zengargoyle good luck. :)
08:01 zengargoyle and then complain. :P
08:01 n1ge 17 years waiting - what's a few days - I'll be back ;-)
08:02 zengargoyle find where and complain or it won't get fixed.
08:02 zengargoyle squeaky wheel gets the grease.
08:02 n1ge yep - that too
08:11 Cabanossi joined #perl6
08:13 zakharyas joined #perl6
08:24 nige joined #perl6
08:30 vendethiel- joined #perl6
08:32 dustinm` joined #perl6
08:35 astj joined #perl6
08:38 nadim ugexe: your help would be appreciated for this one https://github.com/jonathanstowe/Test-META/issues/27#issuecomment-319090770
08:43 mcmillhj joined #perl6
08:46 nige joined #perl6
08:48 vendethiel joined #perl6
08:50 ufobat joined #perl6
08:53 nige joined #perl6
08:55 xtreak joined #perl6
08:55 RockyBalboa joined #perl6
08:56 Cabanossi joined #perl6
08:57 edehont joined #perl6
09:00 RockyBalboa Hello! Two quick questions :)
09:00 RockyBalboa 1. Is there a sub to unaccent a string? Like converting from "âé" to "ae"?
09:00 RockyBalboa 2. How can I interpolate a string when there is no space around? my $var = "hello"; say "$helloworld"; # doesn't work
09:02 ryu0 hm.
09:03 ufobat didn't get what you mean in 2
09:03 ryu0 Thought so.
09:04 ryu0 m: my $var = "hello"; say "{$var}world"
09:04 camelia rakudo-moar 5d200f: OUTPUT: «helloworld?»
09:04 ufobat m: $hi = "foo"; say "$hi"
09:04 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$hi' is not declared?at <tmp>:1?------> 3<BOL>7?5$hi = "foo"; say "$hi"?»
09:04 ufobat m: my $hi = "foo"; say "$hi"
09:04 camelia rakudo-moar 5d200f: OUTPUT: «foo?»
09:04 ryu0 ufobat: his question is related to a similar problem in shell scripts.
09:04 ufobat your reply makes sense :)
09:04 ryu0 Turns out perl6 uses a similar construct.
09:04 ufobat or code
09:05 ryu0 ${var} in shell; {$var} in perl6
09:05 RockyBalboa Perfet! Thx a lot ryu0, I tried ${var} and it failed, but your
09:05 RockyBalboa but your solution works :)
09:05 ufobat i've got a LibCurl question, what is the equivalent for 'curl -k'
09:05 ryu0 RockyBalboa: i got the hint from the REPL output: Unsupported use of ${var}; in Perl 6 please use {$var}
09:06 ryu0 maybe it was valid in perl5.
09:06 konsolebox joined #perl6
09:06 RockyBalboa OMG I didn't even read the error message => lesson learned :)
09:07 ryu0 I also found out the think perl book is free if you don't mind using the digital version.
09:07 ryu0 http://greenteapress.com/wp/think-perl-6/
09:07 ryu0 i assume this is the book website.
09:08 RockyBalboa Thanks ryu0! It will help
09:08 ryu0 it's funny. sometimes amazon tries to sell you a kindle version of a book that the author has released for free.
09:09 moritz and why shouldn't they try?
09:09 * ryu0 shrugs.
09:10 RockyBalboa I bought "Perl 6 at a Glance" and "Perl 6 Fundamentals": they are nice too. "Think Perl 6" seems more for people that are new to programming
09:10 pecastro joined #perl6
09:10 ryu0 maybe so.
09:10 ryu0 i've always preferred books that take time to explain the language.
09:10 ryu0 even though i'm no longer a beginner.
09:11 moritz RockyBalboa: thanks for buying my book! :-)
09:11 moritz RockyBalboa: It would be very helpful if you could write a review on amazon
09:14 RockyBalboa Ohhh Moritz is here! :))) Thanks for you work! I'm just starting Perl 6 today (and working on some Sudoku too lol). I will write a review yes. :)
09:14 ryu0 moritz: really? which is yours?
09:14 zengargoyle m: say "âé".samemark('a')
09:14 camelia rakudo-moar 5d200f: OUTPUT: «ae?»
09:14 RockyBalboa Perl 6 Fundamentals
09:15 moritz ryu0: what RockyBalboa said
09:15 zengargoyle m: say samemark(""âé", 'a')
09:15 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse expression in argument list; couldn't find final ')' ?at <tmp>:1?------> 3say samemark(""7?5âé", 'a')?    expecting any of:?        infix?        infix stopper?»
09:15 zengargoyle m: say samemark("âé", 'a')
09:15 camelia rakudo-moar 5d200f: OUTPUT: «ae?»
09:16 zengargoyle RockyBalboa: Q1 ^^
09:16 moritz I'm also writing https://leanpub.com/perl6regex right now
09:17 moritz at about 80 pages A4 now
09:17 Altreus Pretty sure I bought one of these books but I have no idea where it is :(
09:17 moritz (and negotiating with apress if they publish it)
09:17 ryu0 RockyBalboa: so you went to the applied books?
09:18 ryu0 RockyBalboa: what's the benefit there? i usually prefer reading about my tools before trying to use them.
09:18 moritz not everybody wants to read 200 pages about how variables, loops, condtionals and subroutines work if they already know that from other languages
09:19 moritz but somebody new to programming needs those 200 pages
09:19 moritz so IMHO it makes sense to have different books for different audiences
09:19 ryu0 I see.
09:20 ryu0 i always thought those were meant for people already familiar with the language.
09:20 RockyBalboa Thx a lot zengargoly! Not sleeping yet? :)
09:20 moritz ryu0: at least "Perl 6 Fundamentals" is targeted at programmers who are familiar with other languages
09:21 moritz I've made https://perl6book.com/ to explain the differences :-)
09:21 zengargoyle RockyBalboa: my internal clock is weird.
09:21 ryu0 Maybe my mindset is from having to use C where language subleties can make or break your program in major ways.
09:21 RockyBalboa Yes, like Morirtz said, I didn't want an introduction to OOP and SO. "Just bring PERL 6" :)
09:22 RockyBalboa moritz: Ok nice, I bookmarked your book about regexes :)
09:22 ryu0 There was a lot to learn that wasn't even covered in the ANSI C book that I remember.
09:23 ryu0 Mostly related to machine architecture.
09:23 zengargoyle and since we don't have a translation army, a multitude of examples can be better than a paragraph of english for some....
09:25 RockyBalboa i just skimmed through "Think Perl 6": it looks cool too, more like a language reference yes
09:25 ryu0 i've had people complain about 400 page books being too long, when i've seen ones for C++, C#, or Java that can easily exceed 600.
09:26 * zengargoyle has 1978 edition of K&R C Programming sitting on shelf. :P
09:26 RockyBalboa "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."
09:26 ryu0 "And one of those remaining hours will be spend ensuring I learn how to not cut off my hand."
09:27 RockyBalboa :))))
09:27 ryu0 C joke.
09:28 ryu0 RockyBalboa: bored?
09:28 ryu0 if you're interested i can entertain you with some C language trivia.
09:28 AlexDaniel for some reason I'm always using {$foo} instead of ${foo}
09:29 RockyBalboa A lot of C people in there! :)
09:29 AlexDaniel I wonder if it is significantly slower
09:29 ryu0 int x <:50:> = {};
09:29 ryu0 Is this valid C? If so, what is it using?
09:29 RockyBalboa And you guys, do you like C++?
09:29 ryu0 Not really, but it's tolerable.
09:30 lookatme I'm C++ developer
09:30 zengargoyle i skipped it because when it was new it was just a bunch of pre-processor wrapper around plain C.
09:30 RockyBalboa I don't have enought knowledge, I come from web dev (PHP/Ruby/JS) and now... Perl 6
09:30 ryu0 C++ wasn't standardized until 1998.
09:31 zengargoyle hah, standard.
09:31 ryu0 For what that's worth.
09:31 zengargoyle yeah, C++ was a thing at least in early 90's
09:31 zengargoyle it just wasn't much more than macros/pre-processing.
09:32 ryu0 Anyone care to try to answer my C trivia question? ;)
09:32 zengargoyle an int x[50];
09:32 zengargoyle ?
09:33 ryu0 yes, it's an array.
09:33 ryu0 Can you name what feature I used?
09:33 RockyBalboa I had to learn a bit of FORTRAN for computation. That one is old too :)
09:33 zengargoyle probably NULL.
09:33 zengargoyle trigraph
09:33 ryu0 digraph actually, but close.
09:33 zengargoyle <: == [   :> == ]
09:33 ryu0 trigraph is when the sequence is 3.
09:33 ryu0 digraph when the sequence is 2.
09:33 zengargoyle same diff. :P
09:33 ryu0 <: = [
09:33 ryu0 :> = ]
09:33 RockyBalboa lol
09:34 ryu0 Also applies to C++ since it inherits from C.
09:34 zengargoyle it's C version of Texas.
09:34 ryu0 but in practice you shouldn't be using these. they just make code harder to understand.
09:35 zengargoyle wait until you get a load of p6 unicode. :)
09:36 ryu0 ... it makes p5 seem readable? =p
09:37 zengargoyle nah, p6 has much more spaces.
09:37 ryu0 i noticed some of the perl6 examples regarding REs look like vim/sed/ed style patterns.
09:37 lookatme What would happened when I call slurp-rest on Proc.out after Proc exit with -1?
09:37 zengargoyle and no short $X vars... makes one-liner's in p6 a pain. :P
09:37 RockyBalboa Hey what do you suggest as a good IRC client for terminal?
09:37 ryu0 RockyBalboa: what are you using now?
09:38 ryu0 Ah? The mozilla IRC client extension?
09:38 zengargoyle i use irssi, but no reason.
09:38 RockyBalboa I am using the chat from per6.org... Last time I used IRC, it was like in 1999 with mIRC. I didn't know IRC was still in use!
09:38 ryu0 IRC isn't dead by a long shot.
09:39 RockyBalboa That a good surprise yes!
09:39 ryu0 hexchat is a decent cross-platform GUI irc client.
09:39 ryu0 successor to xchat.
09:39 RockyBalboa IRSSI! Oh that's exactly what I was looking for!
09:39 ryu0 but if you really want command line, i'd suggest weechat probably.
09:39 RockyBalboa Yeah something like Vim but for IRC
09:39 ryu0 it's a bit friendlier to people not used irssi's minimalism.
09:40 zengargoyle lookatme: i'd guess Nil or an Exception.
09:40 ryu0 weechat has more whistles out of the box like a nick list.
09:40 RockyBalboa Ok I will try them thx
09:40 ryu0 irssi doesn't have that setup by default.
09:40 vendethiel joined #perl6
09:41 ryu0 also, weechat comes not only in an ncurses version but also in gui ones too.
09:41 ryu0 anyway.
09:41 zengargoyle run('foo', :out).out.slurp-rest.perl.say
09:42 RockyBalboa Ok thx! I check that. It's cool to see there are all these guys on IRC (and not on Facebook)
09:42 ryu0 Facebook... bleh.
09:42 zengargoyle m: run('foo', :out).out.slurp-rest.perl.say
09:42 camelia rakudo-moar 5d200f: OUTPUT: «run is disallowed in restricted setting?  in sub restricted at src/RESTRICTED.setting line 1?  in sub run at src/RESTRICTED.setting line 14?  in block <unit> at <tmp> line 1??»
09:42 RockyBalboa :)
09:42 zengargoyle doh! it's ""
09:43 ryu0 p6: "Beetlejuice!" x 3
09:43 camelia rakudo-moar 5d200f: OUTPUT: «WARNINGS for <tmp>:?Useless use of "x" in expression "\"Beetlejuice!\" x 3" in sink context (line 1)?»
09:43 ryu0 aww.
09:43 ryu0 p6: say "Beetlejuice!" x 3
09:43 camelia rakudo-moar 5d200f: OUTPUT: «Beetlejuice!Beetlejuice!Beetlejuice!?»
09:43 ryu0 'lol
09:43 ryu0 cheesy example.
09:44 nowan joined #perl6
09:45 RockyBalboa m: my $username = 'RockyBalboa'; say "You should get back to work, {$username}!";
09:45 camelia rakudo-moar 5d200f: OUTPUT: «You should get back to work, RockyBalboa!?»
09:45 RockyBalboa CU later guys, thx :)
09:45 AlexDaniel m: say "You should get back to work, %*ENV<ME>!";
09:45 camelia rakudo-moar 5d200f: OUTPUT: «You should get back to work, AlexDaniel!?»
09:45 RockyBalboa Haha nice Alex!
09:47 ryu0 m: say "Help me, AlexDaniel. You're my only hope."
09:47 camelia rakudo-moar 5d200f: OUTPUT: «Help me, AlexDaniel. You're my only hope.?»
09:47 ryu0 lol
09:48 * AlexDaniel already has his superman suit on
09:50 zengargoyle lol, funny story since it's late.  i knew somebody who called tighty-whiteys "dun-dun-dun's" because superman.
09:55 lookatme zengargoyle, seems like it hang on
09:55 lookatme I'll do more test later
10:01 ijneb joined #perl6
10:11 Cabanossi joined #perl6
10:12 zengargoyle .tell lookatme also try just .slurp  -- i think .slurp-rest and .slurp have merged into the same thing....  i know i used slurp-rest once upon a time and was told to use just slurp...
10:13 AlexDaniel where's yoleaux ?
10:13 zengargoyle .tell lookatme but Proc is something i haven't played with much so...
10:14 prabh joined #perl6
10:17 prabh Hi
10:17 prabh How can I contribute in perl coding?
10:18 AlexDaniel prabh: start using it for your projects :)
10:19 prabh ok
10:19 zengargoyle ask questions and write docs.
10:19 jaffa4 joined #perl6
10:21 Zoffix blog about it
10:22 jaffa4 hi all.. what is the state of Perl6?
10:22 * zengargoyle needs a blog.
10:23 Zoffix fix issues: https://github.com/issues?utf8=%E2%9C%93&amp;q=is%3Aopen+is%3Aissue+user%3Aperl6+
10:23 * zengargoyle needs to just get a VPS.
10:23 Zoffix jaffa4: we generally try to be stateless pirates
10:23 Zoffix ^_^
10:24 Zoffix jaffa4: "stable and actively developed". Is that what you mean?
10:24 jaffa4 Is it used widely now?
10:26 Zoffix jaffa4: it's less than 2 years old. What would "widely" mean?
10:26 jaffa4 world domaination... number 1
10:26 lizmat Rakudo Perl 6 is considered a big language  :-)
10:28 Zoffix jaffa4: it's not the 90s anymore. I don't think any language can be an absolute number 1 anymore. We have just too many different domains, each with its own leaders
10:28 zengargoyle i would say like early JVM.  remember when it was nice and worked but was horribly slow and had rough edges.  now it's good.  perl 6 is on same sort of path.  it's nice, maybe a bit slow and rough, but always getting better and better.
10:29 jaffa4 is it as fast as Perl 5 at least?
10:29 Zoffix I don't feel the roughness anymore. At least compared to like a year ago, when any time I tried to write a program bugs happened.
10:29 Zoffix jaffa4: you're very good at asking very vague questions :)
10:30 jaffa4 does the same program run in Perl 6 as fast as Perl 5?
10:30 zengargoyle yeah, more tooling. and waiting for certain expected bits to be realized (like maybe native shaped arrays) or such.
10:30 Zoffix jaffa4: what task exactly? A few might be faster. Many might be slower. A lot has to do with the languages not being equivalent. Perl doesn't deal in graphemes; we do. You can bench line reading, but you're not measuring the same things
10:30 xtreak joined #perl6
10:31 Zoffix jaffa4: "the same program" is tough to come by. An empty Rakudo program in Perl 5 would need to load dozens of modules.
10:31 Zoffix jaffa4: but in general, I'd say the answer is "not yet".
10:31 jaffa4 yes, I am asking in general
10:32 Zoffix jaffa4: there's still work to do to optimize things. And Perl folks aren't standing still either. A new grant to work on Rakudo's stability in performance was just approved, so there's at least 200 hours of work yet to be done :) http://news.perlfoundation.org/2017/07/grant-extension-approved-perl-.html
10:33 Zoffix s/stability in/stability and/;
10:33 prabh What are the cool features of perl6 ?
10:33 Slaash joined #perl6
10:34 Zoffix m: sub infix:<¯\(°_o)/¯> { @_.pick }; say 'Coke' ¯\(°_o)/¯ 'Pe 'Pepsi';
10:34 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3 { @_.pick }; say 'Coke' ¯\(°_o)/¯ 'Pe '7?5Pepsi';?    expecting any of:?        infix?        infix stopper?        postfix?        statement …»
10:34 Zoffix bah. My broken terminal ruins everything :)
10:34 Zoffix m: sub infix:<¯\(°_o)/¯> { @_.pick }; say 'grammars' ¯\(°_o)/¯ 'ease of concurrency';
10:34 camelia rakudo-moar 5d200f: OUTPUT: «grammars?»
10:34 zengargoyle make it good, make it work, make it work fast.  it's mostly good in idea.  it mostly works in practice.  it gets faster every time i look.
10:35 Zoffix prabh: my favourite "cool" feature is how consice the language is without going into the unreadable code golf territory. Compared to Perl, some of my programs I converted ended up half the size
10:35 Zoffix concise
10:36 zengargoyle there is a lot of do the simplest thing that works correctly and then go back and do more complicated thing that works correctly but is faster.
10:36 Zoffix There's even a poster on the subject: https://raw.githubusercontent.com/perl6/marketing/master/TablePosters/Rakudo-Concise/Rakudo-Concise-300ppi.png
10:37 Zoffix prabh: another is I somehow no longer have Unicode problems I tend to have in other languages
10:38 Zoffix 'cause Rakudo was designed with Unicode in mind from scratch, whereas in many popular langs of today it's mostly a bolted-on hack
10:38 zengargoyle heh, yeah, what's a Unicode problem?
10:38 El_Che zengargoyle: it's like a Unicorn but less cute
10:39 Zoffix m: await ^4 .map: { start sleep 1 }; say now - INIT now
10:39 zengargoyle biggest unicode problem i have is terminal fonts. :P
10:39 camelia rakudo-moar 5d200f: OUTPUT: «1.00311816?»
10:40 zengargoyle and typing the **** things.
10:40 Zoffix prabh: and that's my other favourite feature ^. 4 sleeps of 1 second that took just 1 second to run. Ease of parallelism and concurrency in Rakudo is handy. Something also that was in mind from the start.
10:41 Zoffix prabh: actually, we have a marketing brochure that probably answers your question better than my rambling :D https://github.com/perl6/marketing/blob/master/Brochures/Perl6-PR-Brochure/Perl6-PR-Brochure.pdf
10:42 jaffa4 is there perl 6 conference now?
10:42 zengargoyle modules are Name:ver<1.0.0>:auth<github:zengargoye>:api<2>  and many modules of same name an different versions and different authors can be used at the same time in different bits of your code....
10:43 Zoffix jaffa4: yeah, it's part of The Perl Conference. Latest one in Amsterdam is days from happening (or maybe even started already): http://act.perlconference.org/tpc-2017-amsterdam/
10:44 ufobat where are ubuntu rakudo packages?
10:44 zengargoyle use Foo:ver<1.0> in legacy bits of code and Foo:ver<2.0> in new bits of code.  use Bar:from<Perl5> and use Perl5 modules, same goes for Python.
10:45 Zoffix huggable: deb
10:45 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
10:45 Zoffix ufobat: ^ there
10:45 ufobat rakudo.org is pretty missleading :/
10:45 ufobat regarding finding the ubuntu package
10:45 Slaash left #perl6
10:46 Zoffix ufobat: the messenging bot is ded, but I left you a message with a hint for how to work around the resource thing. Apparently there *is* a way to access the meta: https://irclog.perlgeek.de/perl6/2017-08-02#i_14960004
10:46 Zoffix ufobat: that site is in need of updates ( https://rt.perl.org/Ticket/Display.html?id=130500#ticket-history )
10:46 ufobat my coworker just complains he coudnt find a ppa for ubuntu
10:46 ufobat thanks :)
10:48 jaffa4 do the original Perl6 developers work on Perl6 stilll?
10:48 Zoffix jaffa4: some, yeah
10:48 Zoffix Including Larry Wall
10:48 zengargoyle ufobat: yeah, i dont' think there's a Debian package whatever either, but the .deb are there and making a full per-distro support their special package manager logic just to get a .deb is a bit much.
10:48 Zoffix Tons of new ones too :)
10:49 Zoffix w00t \o/ managed to repro the disappearing appveyor issue on modules.perl6.org locally \o/
10:49 ryu0 ufobat: there isn't a PPA really, but there are packages.
10:49 zengargoyle making a Debian repo just to hold one .deb is a PITA specific work just for one thing.
10:49 Slaash joined #perl6
10:50 ryu0 I could probably throw together a PPA.
10:51 ryu0 but not right this moment.
10:51 zengargoyle ppa may be easier... :)  i gave up trying to 'repo' the two .debs i make.... not worth the hassle!
10:51 ryu0 zengargoyle: yea. but i have a background doing linux packaging. shouldn't be too hard.
10:52 zengargoyle cool, better you than me. :P
10:52 ryu0 i had to fiddle with the packages for rakudo awhile to figure out how it fits together. it's not as easy as perl5 is.
10:52 ryu0 maybe that'll be fixed as it matures but you can't really package it directly from rakudo star as it is.
10:53 ryu0 because it insists on writing directly to the root directories during the build.
10:53 ryu0 and debian packages don't work like that.
10:53 Zoffix ewww
10:53 Zoffix I think star isn't what you're meant to package, tho? Package rakudo compiler itself + zef + whatver modules
10:53 zengargoyle yeah, there's a lot of automatic building if it's not already there.
10:53 zengargoyle doesn't fakeroot handle that?
10:54 ryu0 it fakes root, but it still won't let you write to /usr/bin directly.
10:54 ryu0 and the existing stuff uses hard-coded pathes so best workaround is to split into separate packages.
10:54 enheh joined #perl6
10:54 zengargoyle eh... it writes to ./fakeroot/usr/bin
10:54 ryu0 ... you don't know what fakeroot does, do you?
10:55 ryu0 it's used to pretend you're root so files in an archive show up a root user or so.
10:55 ryu0 useful when doing make install and such.
10:55 zengargoyle the one time i did try, fakeroot manage to wrangle /etc scripts /usr/bin scripts.
10:55 ryu0 i tried though.
10:55 zengargoyle ah, maybe rakudo has no DESTDIR like......
10:56 zengargoyle i can see it now.
10:56 ryu0 Yes, and rakudo star also tries to build moarvm and pqp
10:56 ryu0 and then it expects them to be installed in the root directories.
10:56 ryu0 See the problem now?
10:56 zengargoyle yes, but only if you ask.
10:56 andreoss joined #perl6
10:56 ryu0 which is the case if they don't already exist as packages.
10:57 ryu0 regardless i'll give it a spin later. should be doable regardless.
10:57 zengargoyle i only did manual build moar, build nqp, build rakudo as separate steps.... but it worked.
10:58 ryu0 manual always works, but in an automated environment you usually have to work within a greater set of restrictions.
10:58 zengargoyle there should be a 'once' in there... i did it once.  but i don't see a real problem with 3 packages.
10:59 ryu0 afaik, rakudo star really isn't designed with this in mind right now.
10:59 ryu0 i assume it'll get addressed eventually.
10:59 zengargoyle ah, 'rakudo star'.  i was thinking just rakudo iself.
10:59 ryu0 yes.
10:59 zengargoyle nm.
11:00 ryu0 that's what i tried the first time.
11:00 noganex joined #perl6
11:00 ryu0 think i should try to package all the addons rakudo star likes to include?
11:00 ryu0 i was thinking only zef seems essential.
11:01 zengargoyle i sorta think rakudo star is gone.  there was once a Task::Star that installed all of the rakudo star modules, but it was deemed a bad idea and removed.
11:01 zengargoyle i don't even know what rakudo star is now.
11:02 ryu0 still exists. it's a bundle of convenience.
11:02 ryu0 http://rakudo.org/downloads/star/?asset=star
11:03 zengargoyle yeah, i just think they used to have a Task::Star bundle such that moar+nqp+rakudo+zef+install Task::Star == rakudo star.
11:03 ryu0 ah.
11:04 ryu0 i'm tempted to package them individually and then add a meta package to depend on the components of the whole set.
11:04 zengargoyle and you could do same with moar+nqp+rakudo+zef+ recommended modules ...
11:04 ryu0 so people can choose what parts they want.
11:06 ryu0 why not? ubuntu provides free hosting for PPAs at launchpad.net
11:06 zengargoyle in the end... there are a few special modules you might want, debuggers and the like, and a few other JSON or WWW type things, and all the rest are acutally dependencies that would get installed automatically anyways... :)
11:07 ryu0 yea, i suppose. i can take requests for extras but i'd just package the foundation first.
11:07 ryu0 hm. reminds me.
11:07 ryu0 i'll need to split the dev files too. :)
11:08 ryu0 this'll be fun when i get some time.
11:08 zengargoyle i think the choice of useful modules varies widely from person to person, but maybe like Term::ANSIcolor is just something you're eventually going to want, or some other package will want, so might as well install it now.
11:08 zengargoyle and Readline for the REPL
11:08 ryu0 yea. Linenoise seems silly to install when you got readline available.
11:10 zengargoyle i think there are GPL vs BSD license things there but yeah,
11:10 ryu0 true enough, but i doubt it'll matter for just usage.
11:11 ryu0 it's not even part of rakudo's normal distribution.
11:11 ryu0 kinda like a GPLed plugin if you will.
11:12 Geth_ ¦ perl6-examples: 0d47b45137 | mattwhisenhunt++ (committed using GitHub Web editor) | categories/cookbook/20web-automation/20-01-fetching-uri.pl
11:12 Geth_ ¦ perl6-examples: Change URL to a real http address
11:12 Geth_ ¦ perl6-examples:
11:12 Geth_ ¦ perl6-examples: http://perl6.org is getting redirected to https://perl6.org.
11:12 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/0d47b45137
11:12 Geth_ ¦ perl6-examples: 82eeb3018c | (Zoffix Znet)++ (committed using GitHub Web editor) | categories/cookbook/20web-automation/20-01-fetching-uri.pl
11:12 Geth_ ¦ perl6-examples: Merge pull request #50 from mattwhisenhunt/patch-1
11:12 Geth_ ¦ perl6-examples:
11:12 Geth_ ¦ perl6-examples: Change URL to a real http address
11:12 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/82eeb3018c
11:12 zengargoyle yeah, but could be included in full in some dist with rakudo/nqp/moar/etc other Artistic/etc license without worry and all self inclusive.
11:13 zengargoyle but LineNoise is bad with unicode so i don't think of it much. :P
11:14 ryu0 i'm surprised editline wasn't mentioned though.
11:14 ryu0 it's a BSD licensed readline alternative.
11:16 lizmat ryu0: probably because nobody in the Perl 6 bubble knew about it ?
11:16 zengargoyle don't think i've ever heard of it.
11:16 zengargoyle heh
11:16 ryu0 really? i guess i know a lot about linux libraries from reading a lot...
11:17 ryu0 http://thrysoee.dk/editline/
11:18 zengargoyle ugg, tell you something, last $WORK had a readline.a that wasn't GNU readline and was from the '80s
11:18 zengargoyle confused me to no end for a while.
11:19 zengargoyle program uses readline but doesn't do readline arrrrgh.
11:19 ryu0 let me guess. it was a getline/fgets clone?
11:21 zengargoyle i didn't dive into the details once i realized it was just somebodys code from ancient times.
11:22 ryu0 let me guess. it uses K&R style functions?
11:22 astj joined #perl6
11:22 zengargoyle much like the command processor that did TAB completion on a command in a way that is different from any other thing i've ever seen.
11:23 ryu0 stuff like how arguments used to be declared and defined between the ) and {. lol
11:23 ryu0 i've only seen that convention in a few rare places.
11:23 ryu0 BASH uses it extensively in some places.
11:23 zengargoyle i $WORKed at .edu that had Sun network over thickwire in '87 and still has some same code running today.
11:23 ryu0 I've also seen it in BSD code.
11:24 ryu0 ANSI C changed the rules.
11:24 ryu0 but K&R style is still legal C.
11:24 zengargoyle and is on the earliest maps of the internet when there was only like 5 lines...
11:25 zengargoyle it's not COBOL or anything, but there was tons of code that has been used since mid '80s unchanged.
11:26 xtreak joined #perl6
11:27 nhywyll joined #perl6
11:28 markmont joined #perl6
11:30 * zengargoyle is old and doen't know why K&R C is such a bad thing. :)
11:31 ryu0 same reason pre-standardized C++ is a bad thing. =p
11:31 zengargoyle by the time it was ANSI C 98 i was doing mostly Perl. :)
11:33 ryu0 zengargoyle: uh, ANSI C arrived in 89/90. It's also called C89/C90.
11:33 ryu0 Do you mean C99?
11:33 ryu0 Or C++98?
11:33 http_GK1wmSU joined #perl6
11:34 zengargoyle i probably should have picked up some C++
11:34 zengargoyle oh, yeah, C99
11:34 TimToady joined #perl6
11:34 ryu0 have you given D a look?
11:35 zengargoyle i learned from the '78 K&R
11:35 http_GK1wmSU left #perl6
11:37 zengargoyle no D, for the most part i often look and say meh and really i don't have the use case for that.
11:37 ryu0 fair enough.
11:37 ryu0 i've been looking for an all-in-one high level language, and i thought perl6 might be what i'm looking for.
11:39 ryu0 including a flavoring of functional but doesn't force me into that model all the time.
11:40 lichtkind joined #perl6
11:41 zengargoyle i think it will get there.  if moar can JIT along the same lines of old JVM was dog slow, now it's fast.
11:42 araraloren joined #perl6
11:42 zengargoyle and in my mind, the parts of p6 that are written in p6 were originally CS101 code, correct, works, not necessarily the fastest thing.
11:43 zengargoyle bits and pieces keep getting improved, VM keeps getting better.  not sure where JVM backend stands, but that's a thing, JS backend is a thing in progress.
11:49 ryu0 was compiling directly to native code ever considered?
11:52 zengargoyle don't know.  i think you could say that perl6 is written in perl6 is written in nqp and nqp is an abstract syntax tree.  whether you could turn that into raw native code, i don't know.
11:52 AlexDani` joined #perl6
11:53 ryu0 wouldn't surprise me if it didn't. seems like that's more common with static typed languages.
11:53 zengargoyle i think the vm does do some native code replacement.  if i read jnthn's blog posts correctly.
11:54 Geth ¦ doc: scmorrison++ created pull request #1434: routine link creates hard links
11:54 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1434
11:54 zengargoyle there is JIT and inlining of code and some native bits.  but that's all way above my head... :)
11:54 jnthn Yeah, we do JIT compilation
11:54 jnthn So hot bits of code are typically turned into machine code
11:54 ryu0 maybe eventually they'll also target CIL too.
11:55 ryu0 if JVM works out.
11:55 araraloren The compiler will compile some code to native code according some indicator
11:56 meemoo joined #perl6
11:56 lichtkind moritz,  ping
11:56 jnthn Not only that, it may compile multiple versions of it specialized for certain input types. :)
11:56 lichtkind cheers jnthn
11:56 jnthn On MoarVM, at least.
11:56 jnthn o/ lichtkind
11:56 araraloren I know a little about JIT
11:57 araraloren they have optimization base on Path or Method
11:57 jnthn fwiw, I've been doing a bunch of work on that area recently, so will write some blog pots about it soon
11:57 jnthn *posts :)
11:57 araraloren jnthn++, sound greater
11:57 araraloren sounds great
12:01 ufobat zengargoyle, ryu0 yeah i know, its fine, i just wanted to mention that he (my coworker) is complaining in other words some users would expect that to be there. BTW there are official ubuntu packages that have a 2015.xx
12:02 ryu0 ufobat: i'm aware. i'm planning to make a PPA for people to use a more recent version.
12:03 ufobat kk
12:03 ufobat :) awesome!
12:03 araraloren ryu0, there are binary package for Ubuntu
12:03 ryu0 araraloren: i saw.
12:04 araraloren yeah
12:04 ryu0 doesn't have the full advantages of a PPA though.
12:08 slaash joined #perl6
12:11 zengargoyle ufobat: i understand, it's put a line in a textbox or file and forget about it.  i think there are acually Debian people looking into the whole packaging thing so that recent rakudo+etc and precompiled modules are in the standard places.
12:13 zengargoyle ufobat: i.e. people much better than i are working on it on the Debian side of things... :)
12:16 zengargoyle and maybe ubuntu borrow debian when done. :)
12:18 zengargoyle m: sub x($a) { state $x = 0; state &y = sub { "world" ~ $x++ }; return "hello" ~ y }; say x(1), x(2);
12:18 camelia rakudo-moar 5d200f: OUTPUT: «helloworld0helloworld1?»
12:20 zengargoyle parting question for the others... can &y be done only once yielding 'helloworld0helloworld0"?
12:21 * zengargoyle goes to bed...
12:21 AlexDani` joined #perl6
12:21 araraloren good night!
12:22 ufobat zengargoyle, i coudn't do it as well..
12:23 konsolebox joined #perl6
12:23 ufobat i just wrote a useful little tool for my $daylightjob and my coworker wanted to use it as well. and he is already not perl6 loving and failing to install it quickly made it even worse for him
12:23 ufobat at least he likes my tool ;)
12:25 Slaash joined #perl6
12:27 sherwool joined #perl6
12:29 xtreak joined #perl6
12:35 lizmat ufobat: installing rakudo, or the specific modules ?
12:36 Zoffix .tell zengargoyle m: sub x($a) { state $x = 0; state &y = sub { "world" ~ once $x++ }; return "hello" ~ y }; say x(1), x(2);
12:36 nebuchadnezzar zengargoyle: yes, we need to find a proper way to handle packages, it looks like we will do like Emacs or Python packages, byte-compile at install time
12:36 * Zoffix misses yoleaux
12:38 zengargoyle Zoffix: i did that one, but desired someting that operated on sub level like; my &y = once sub { ... }
12:38 * zengargoyle really gong to bed now. :)
12:38 Zoffix zengargoyle: what are you trying to do exactly?
12:39 Zoffix huggable: xy problem
12:39 huggable Zoffix, You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. So, you ask about Y in order to solve X, which doesn't make sense. You should ask about X.
12:39 ufobat rakudo
12:41 Aaronepower joined #perl6
12:45 Geth ¦ modules.perl6.org: b6d153d023 | (Zoffix Znet)++ (committed using GitHub Web editor) | lib/ModulesPerl6/DbBuilder/Dist/Source/GitHub.pm
12:45 Geth ¦ modules.perl6.org: [REBUILD] Do not loose has_appveyor status...
12:45 Geth ¦ modules.perl6.org:
12:45 Geth ¦ modules.perl6.org: ... went going through half-build due to no new commits
12:45 Geth ¦ modules.perl6.org:
12:45 Geth ¦ modules.perl6.org: Fixes https://github.com/perl6/modules.perl6.org/issues/76#issuecomment-320154980
12:45 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/b6d153d023
12:45 Zoffix s/loose/lose/;
12:48 Zoffix s/went/when/; sheesh.. I need typing lessons
12:52 setty1 joined #perl6
13:05 lichtkind lizmat: i now change Perl6::Doc as  agreed
13:06 zakharyas joined #perl6
13:07 lizmat lichtkind: is that a question ?
13:08 lichtkind lizmat, judt a message :) . see foreward  to see you the xxx :)
13:09 astj joined #perl6
13:11 Cabanossi joined #perl6
13:14 wamba joined #perl6
13:22 enheh joined #perl6
13:26 cdg joined #perl6
13:27 lizmat as do I  :-)
13:30 Geth ¦ modules.perl6.org: 30e49f7e52 | (Zoffix Znet)++ (committed using GitHub Web editor) | lib/ModulesPerl6/DbBuilder/Dist/Source/GitHub.pm
13:30 Geth ¦ modules.perl6.org: OCD
13:30 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/30e49f7e52
13:32 Geth ¦ modules.perl6.org: 1e1d67f1ec | (Zoffix Znet)++ (committed using GitHub Web editor) | bin/build-project-list.pl
13:32 Geth ¦ modules.perl6.org: Decrease dist fetch interval
13:32 Geth ¦ modules.perl6.org:
13:32 Geth ¦ modules.perl6.org: The original limit was to account for us having more dists in the future,
13:32 Geth ¦ modules.perl6.org: but there's actually an API end point we can poll to figure out the
13:32 Geth ¦ modules.perl6.org: limits. So reduce the interval for now and will implement smarter
13:32 Geth ¦ modules.perl6.org: rate limiter that uses that endpoint later.
13:32 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/1e1d67f1ec
13:32 Zoffix m: say 868*2/60
13:32 camelia rakudo-moar 5d200f: OUTPUT: «28.933333?»
13:32 Zoffix half hour shaved
13:33 Zoffix Can probably shave even more once I add smarter rate limiter :)
13:33 moritz do we use the public API, or through an account?
13:34 moritz ISTR that rate limits were higher when you use API tokens
13:36 Zoffix Account
13:38 rindolf joined #perl6
13:40 moritz ok
13:42 g0d355__ joined #perl6
13:46 moritz yay, Perl 6 Fundamentals now officically "In Stock" on Amazon: https://www.amazon.com/dp/1484228987
13:46 moritz Zoffix: now you should be able to write a review, should you still be willing :-)
13:46 Zoffix \o/
13:48 grumble joined #perl6
13:52 mcsnolte joined #perl6
13:53 skids joined #perl6
13:54 itaipu joined #perl6
14:00 Kyo91 joined #perl6
14:00 jferrero joined #perl6
14:02 pecastro joined #perl6
14:06 astj joined #perl6
14:09 mspo is sprintf the best built-in "template" system?
14:10 Zoffix mspo: yeah. There's fmt method though that's an alternative way to use sprintf
14:10 Zoffix m: :foo.fmt("%s ? %s").say
14:10 camelia rakudo-moar 5d200f: OUTPUT: «foo ? True?»
14:11 mspo I'd just like named parameters instead
14:11 Zoffix Ah.
14:11 skids Close around a qq?
14:12 Zoffix m: {"$:key ? $:value"}(:foo.Pair).say
14:12 camelia rakudo-moar 5d200f: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1?  in block <unit> at <tmp> line 1??»
14:12 Zoffix m: {"$:key ? $:value"}(:key<meow>, :value<foos>).say
14:12 camelia rakudo-moar 5d200f: OUTPUT: «meow ? foos?»
14:13 mspo m: say sprintf("%s, and %s", "foo", "bar");
14:13 camelia rakudo-moar 5d200f: OUTPUT: «foo, and bar?»
14:13 Zoffix Doesn't give you formatting options tho.
14:14 Zoffix m: {sprintf "%.4f ? %.4f", $:key, $:value}(:42key, :70value).say
14:14 camelia rakudo-moar 5d200f: OUTPUT: «42.0000 ? 70.0000?»
14:14 Zoffix heh
14:15 skids m: {"$:key ? {$:value.fmt("%2.2d")}"}(:key<meow>, :value<45.2>).say
14:15 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Placeholder variable $^value may not be used here because the surrounding block takes no signature?at <tmp>:1?------> 3{"$:key ? {$:value.fmt("%2.2d")}7?5"}(:key<meow>, :value<45.2>).say?    …»
14:15 zakharyas joined #perl6
14:15 skids hrmf
14:16 Zoffix That error sucks
14:16 mspo m: say sprintf("%2\$s, and %1\s", "foo", "bar");
14:16 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unrecognized backslash sequence: '\s'?at <tmp>:1?------> 3say sprintf("%2\$s, and %1\7?5s", "foo", "bar");?    expecting any of:?        postfix?»
14:16 Zoffix m: "{$:x}"
14:16 camelia rakudo-moar 5d200f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Placeholder variable $^x may not be used here because the surrounding block takes no signature?at <tmp>:1?------> 3"{$:x}7?5"?    expecting any of:?        horizontal whitespace?        sta…»
14:17 mspo m: say sprintf("%2\$s, and %1\$s", "foo", "bar");
14:17 camelia rakudo-moar 5d200f: OUTPUT: «bar, and foo?»
14:17 mspo okay, explicit numerics aren't bad
14:18 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131838
14:21 AlexDaniel ?
14:22 AlexDaniel «?»²
14:24 ufobat moritz, i can buy it "used for 3dollars cheeper? :D
14:25 Zoffix hah, what a scam,
14:25 Zoffix I get "5 Used from $20.64"
14:26 Cabanossi joined #perl6
14:27 Zoffix I guess not really a scam, since you're getting a new book instead of used.
14:27 Zoffix Still a lie and fake numbers.
14:30 Zoffix grrrrr
14:31 Zoffix modules site refused to do full rebuild again. The hell is its problem :/
14:31 brabo joined #perl6
14:33 Zoffix wonder if there's any problem with the bash script https://github.com/perl6/modules.perl6.org/blob/master/update-modules.perl6.org#L18
14:34 devmikey joined #perl6
14:36 Geth ¦ modules.perl6.org: 6be4574b90 | (Zoffix Znet)++ (committed using GitHub Web editor) | TODO-IDEAS.md
14:36 Geth ¦ modules.perl6.org: [REBUILD] Remove Koality from TODO
14:36 Geth ¦ modules.perl6.org:
14:36 Geth ¦ modules.perl6.org: It was already implemented and subsequently killed
14:36 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/6be4574b90
14:44 Exodist joined #perl6
14:51 enheh left #perl6
14:53 nhywyll joined #perl6
14:56 Cabanossi joined #perl6
15:03 TEttinger joined #perl6
15:08 itaipu joined #perl6
15:21 Zoffix :|
15:22 Zoffix Above commit didn't trigger full build
15:24 Zoffix Ohhhhh
15:25 Zoffix *phew* finally figured it it out: updater script pulls, starts the builder script with the full rebuild flag set, BUT, if the previous run is currently running, the builder script just exits and the next time it's started it no longer sees the commit for rebuild
15:27 moritz the danger of having rebuilds take longer than the interval they're scheduled for
15:28 Zoffix :)
15:28 Zoffix gonna fix it shortly
15:33 AlexDaniel https://www.cs.cmu.edu/%7Etom7/papers/sigbovik2011tom7whatwords.pdf :)
15:49 Geth ¦ modules.perl6.org: 2863c4b697 | (Zoffix Znet)++ | bin/build-project-list.pl
15:49 Geth ¦ modules.perl6.org: [REBUILD] Fix failures in full-rebuild-from-commits
15:49 Geth ¦ modules.perl6.org:
15:49 Geth ¦ modules.perl6.org: The bash script pulls and based on commit message titles tells the
15:49 Geth ¦ modules.perl6.org: build script to do a full rebuild. However, if another build run
15:49 Geth ¦ modules.perl6.org: is currently running, the build script will just exit. The next
15:49 Geth ¦ modules.perl6.org: build run now won't see those commits and no full rebuild is done.
15:49 Geth ¦ modules.perl6.org:
15:49 Geth ¦ modules.perl6.org: Fix by leaving a marker file lying around when we're bailing out due
15:49 Geth ¦ modules.perl6.org: to another run being active and a full rebuild was requested.
15:49 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/2863c4b697
15:54 moritz Zoffix++
15:55 Zoffix well, it's not yet working for some reason. I don't see it create any marker files :D
15:57 setty1 joined #perl6
16:00 araraloren joined #perl6
16:01 sivoais joined #perl6
16:01 Geth ¦ modules.perl6.org: f270659f11 | (Zoffix Znet)++ | TODO-IDEAS.md
16:01 Geth ¦ modules.perl6.org: [REBUILD] Fix typo
16:01 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/f270659f11
16:02 Zoffix ok, that did work. OK. I think all good now
16:05 Kyo91_ joined #perl6
16:09 Zoffix AlexDaniel: did you mail or email your CLA? You can *email* it and that generally has fast turn around time, so you could do that so you have the keys to the repo in time for release
16:09 Zoffix huggable: CLA
16:09 huggable Zoffix, http://www.perlfoundation.org/contributor_license_agreement  print it out, sign it, scan it in. Email to trademark -at- perlfoundation.org
16:12 AlexDaniel Zoffix: I snail mailed it. Yep, you are right, I should probably send another one via email…
16:15 astj joined #perl6
16:16 TimToady joined #perl6
16:23 [Coke] moritz: I can already buy your book used.
16:25 Zoffix :)
16:25 meemoo joined #perl6
16:26 Cabanossi joined #perl6
16:26 moritz [Coke]: I know. I think there are vendors who sell every book used, and speculate that they can obtain a copy in time, or get a bulk discount on a new book or so
16:29 moritz or make their margin through inflated shipping costs or whatever
16:29 Zoffix or lure in buyers who may have thought price for new is too high and would've left; smaller margin, but better than zero
16:30 moritz or that, yes
16:30 Zoffix or make buyers of new books feel like they're getting a good deal buy paying just $3 more bucks for a new instead of used copy
16:30 Zoffix s/deal buy/deal by/;
16:31 ryu0 \o/ moarvm packaged for my PPA. Now to let to build.
16:32 lichtkind greeting moritz
16:32 Zoffix ryu0: BTW, saw some earlier convo about letting the user pick which parts they want to install... keep in mind a particular rakudo release typically requires a particular nqp release (which often requires a particular release of moarvm). The only mix-and-matching to be done is MoarVM backend vs. JVM or JavaScript backenedd
16:32 moritz \o lichtkind
16:32 lichtkind moritz i currently rewrite Perl6::Doc wher shoud in point beside .doc.perl6.org?
16:32 meemoo joined #perl6
16:33 lichtkind any deep links to recommend
16:34 ryu0 Zoffix: OK. I was planning to only update these when there's a new rakudo star bundle.
16:34 Zoffix Ah.
16:34 ryu0 Since that seems to be what most people would be using.
16:34 Zoffix FWIW, rakudo star releases are quarterly and rakudo+nqp+moarvm releases are monthly
16:35 ryu0 I noticed.
16:35 ryu0 But monthly seems a bit excessive to me.
16:35 moritz lichtkind: well, https://perl6book.com/ has an overview of Perl 6 books, so that might be worth a link
16:35 Zoffix Certainly what they should be using :) Though I see a lot of people sporting random dev commits that happened to be HEAD when they ran rakudobrew :)
16:36 ChoHag joined #perl6
16:36 moritz lichtkind: http://perl6intro.com/ and https://learnxinyminutes.com/docs/perl6/ are pretty popular too
16:37 lichtkind yes intro i know too do you have access to the author since he doesnt respond to me
16:38 Zoffix .seen hankache
16:38 Zoffix Who runs the yoleaux bot, again?
16:38 timotimo yoleaux still goe
16:38 Zoffix huggable: yoleaux
16:38 huggable Zoffix, nothing found
16:38 Zoffix bah
16:38 moritz lichtkind: not more than his email address and IRC nick; I guess you have those too
16:38 timotimo https://github.com/dpk/yoleaux - maybe?
16:38 http_GK1wmSU joined #perl6
16:38 Zoffix lichtkind: this is their twitter: https://twitter.com/hankache
16:39 Zoffix oh, right, user dpk on IRC
16:39 * Zoffix sent a /msg
16:41 edehont joined #perl6
16:42 meemoo joined #perl6
16:44 kaare_ joined #perl6
16:44 haha joined #perl6
16:47 lichtkind thanks moritz
16:50 brrt joined #perl6
16:51 haha_ joined #perl6
16:57 Zoffix So AppVeyor doesn't use the same user/repo as GitHub?
16:57 Zoffix e.g this project https://github.com/ugexe/Perl6-Net--HTTP appears to have just a single hyphen before HTTP on appveyor https://ci.appveyor.com/project/ugexe/Perl6-Net-HTTP/branch/master
16:58 Zoffix And https://github.com/sergot/openssl has a badge linking to https://ci.appveyor.com/project/skinkade/openssl/branch/master (different username).
16:58 Zoffix How does it know which project is what? Is there a way to figure it out if all you got is the gihub repo and its contents?
17:01 Zoffix k, there's a way to get the badge by tacking on `github/` into the URL: https://ci.appveyor.com/api/projects/status/github/ugexe/Perl6-Net--HTTP
17:01 * Zoffix looks for a way to do that same with history
17:02 ramillies joined #perl6
17:02 Zoffix Ohohoh. Actaully, we can cheat with the badge, by getting it in SVG format and figuring out status like that :P
17:06 haha_ joined #perl6
17:13 andreoss joined #perl6
17:13 pilne joined #perl6
17:15 Zoffix damn. badge can say "running"?
17:16 Zoffix I guess it's OK actually. We can make the site use that and refetch later
17:17 Zoffix ah. Makes my job easier https://www.appveyor.com/blog/2014/11/26/customizing-text-of-build-status-badges/
17:21 moritz passingText=failed :-)
17:22 espadrine joined #perl6
17:24 ramillies Hello everybody. Could you please explain what this error message means: "Serialization Error: missing static code ref for closure 'run' (gen/moar/stage2/NQPHLL.nqp:1866)"?
17:25 ramillies (I'm sorry I can't provide more context, it seems to happen only in one piece of code at one place if the code is supposed to do what I want... :--( )
17:26 ramillies (and that piece of code works OK when isolated from the rest of the module.)
17:27 Zoffix ramillies: that sounds like an internal error that regular users are never meant to see :/
17:27 Zoffix ramillies: what's your rakudo version? perl6 -v
17:27 ramillies The newest one, 2017.07.
17:28 ramillies Exactly "This is Rakudo version 2017.07-126-g86cb1363d built on MoarVM version 2017.07-293-g3f33a841"
17:28 Zoffix err
17:28 Zoffix ramillies: well, you're using a random dev commit and are hitting some bug.
17:28 Zoffix m: say $*PERL.compiler.version
17:28 camelia rakudo-moar 5d200f: OUTPUT: «v2017.07.129.g.5.d.200.f.1.e.5?»
17:28 Zoffix ramillies: it would be helpful if you could provide some code that reproduces that error
17:29 ramillies I see. That was what rakudobrew gave me. // The bad thing is that I can provide only a whole module.
17:29 ramillies (Terminal::Print to be exact)
17:29 [Coke] and also verify that it still happens against a stock 2017.07 install.
17:29 ramillies Whenever I try to extract a MWE it behaves exactly as intended.
17:29 Zoffix ramillies: but as far as resolving your problem, you could try a tested, stable release. (rakudobrew build moar 2017.07; rakudobrew switch moar-2017.07)
17:30 Zoffix ramillies: extract it into a module that you still precompile
17:30 ramillies OK, thank you. Currently trying.
17:30 ugexe always rakudobrew nuke moar $whatever first
17:30 Zoffix ramillies: the "serialization error" is something that happens with precompilkation
17:30 ugexe moar-$whatever rather
17:30 Zoffix ugexe: how come?
17:31 Zoffix rakudobrew is designed for running multiple versions, I mean :/
17:31 ugexe because otherwise it will rebuild the moar-$whatever, which seems to cause weird problems
17:31 ugexe so it doesn't hurt to run it first, and it helps if they happen to already have it installed
17:31 Zoffix huh, never had them
17:33 ramillies OK, nuked and going anew.
17:34 ugexe there is also the hail mary `rm -rf ~/.perl`
17:34 ugexe er ~/.perl6
17:35 Zoffix update-perl6 is aliased to `rm -fr ~/.perl6; rm -fr ~/.zef; rm -fr ~/.rakudobrew/; git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef; zef install TAP::Harness; zef install WWW'
17:35 Zoffix that's my alias. Though normal users need to specify a proper release
17:39 ramillies The stable compiler is now installed, still rebuilding zef and pulling prerequisites.
17:40 ramillies And that one sadly gives something quite similar: "Code ref '' does not exist in serialization context."
17:42 hoelzro joined #perl6
17:43 Zoffix ramillies: do you have any BEGIN blocks or constants? You said you can share the module? What's the code
17:45 * Zoffix wags the "you didn't run tests" at the previous hackers of modules.perl6.org :)
17:45 Zoffix *figner
17:45 awwaiid Remind me -- I used to have MAIN(IO() $file where :e) { ... }, is there a new way to do htat (take a paramter filename that exists and turns into an IO)
17:45 Zoffix tho I guess the tests suck; too specific 'cause I was going for 100% coverage
17:46 ramillies Yes, there is one.
17:46 Zoffix awwaiid: that's still the way
17:46 ramillies I'll put the code on github shortly.
17:48 awwaiid Zoffix: oh. you're right htat works. I was trying to do `subset FileName of IO() where :e;` which didn't work out so well
17:50 ramillies OK, I managed to extract quite a manageable chunk (30 lines).
17:50 Zoffix yeah, that won't work
17:50 Zoffix The coercer would go to the signature but even then, it'd have to have method FileName on Str :/
17:53 Geth ¦ ecosystem: 514f75a791 | loren++ (committed using GitHub Web editor) | META.list
17:53 Geth ¦ ecosystem: Change URL
17:53 Geth ¦ ecosystem:
17:53 Geth ¦ ecosystem: change to master branch
17:53 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/514f75a791
17:54 ramillies https://gist.github.com/ramillies/edb326b001fde7b6921b04ed8c176035 — Here it is.
17:55 Geth ¦ modules.perl6.org: 2ee3f47d16 | (Zoffix Znet)++ | 3 files
17:55 Geth ¦ modules.perl6.org: Fix failure to fetch AppVeyor status / Add 'pending' status
17:55 Geth ¦ modules.perl6.org:
17:55 Geth ¦ modules.perl6.org: Turns out we can't just use github-username/repo-name as names for
17:55 Geth ¦ modules.perl6.org: AppVeyor project as they can differ. Haven't found a way to get to
17:55 Geth ¦ modules.perl6.org: data via REST API, but the badge URL allows "github/" specifier that
17:55 Geth ¦ modules.perl6.org: does work. So I fixed that problem by parsing the SVG badges.
17:55 Geth ¦ modules.perl6.org:
17:55 Geth ¦ modules.perl6.org: <…commit message has 5 more lines…>
17:55 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/2ee3f47d16
17:55 Zoffix hopefully that works; tests are bitrotten so I can't even tell which are my failures and which aren't.
17:56 Zoffix ramillies: why the BEGIN block?
17:57 ramillies It's a little piece of Terminal::Print.
17:57 ramillies And there it is to query tput capabilities only once, when the module is compiled.
17:57 ramillies I guess at least.
17:58 ramillies This is just an excerpt that manages to still reproduce the bug.
17:58 ramillies (so the code has no actual sense to it)
18:00 ramillies (Btw. note that this MUST be loaded as a module — if you make an ordinary script out of it, the error won't manifest)
18:00 Zoffix Yeah, I reproed it. Trying to golf it down more.
18:02 haha_ why do you like rakudo? because the syntax is fun?
18:03 Zoffix hehe "Missing serialize REPR function for REPR ConditionVariable (Lock::ConditionVariable)"
18:03 Zoffix haha_: because it's concise yet still readable.
18:03 lostinfog joined #perl6
18:03 Zoffix As the poster says: https://raw.githubusercontent.com/perl6/marketing/master/TablePosters/Rakudo-Concise/Rakudo-Concise-300ppi.png
18:03 ugexe wouldnt that be serializing all the failures?
18:04 araraloren I start an appveyor build, it build failed with error: Could not find Text::Tabs at line 3 in:
18:05 haha_ Zoffix: that sounds good enough.
18:05 nadim joined #perl6
18:05 Zoffix buggable: eco Text::Tabs
18:05 buggable Zoffix, Text::Tabs 'Perl 6 port of Perl's Text::Tabs': https://github.com/Altai-man/perl6-Text-Tabs
18:05 Zoffix araraloren: did you add it to `depends` meta section?
18:05 Zoffix or whatever it was
18:05 araraloren yeah, I added, it was ok on travis
18:05 haha_ i actually like how someone explained why OOP is at the heart of the rakudo. - Because Larry likes it :D
18:06 Zoffix OK, golfed one of the issues: unit module Foo; BEGIN shell 'dir', :out;  That gives `Missing serialize REPR function for REPR ConditionVariable (Lock::ConditionVariable)`
18:06 astj joined #perl6
18:06 araraloren I copy the appveyor config from ugexe repo
18:07 Zoffix no idea
18:07 araraloren https://github.com/araraloren/perl6-terminal-table/blob/master/.appveyor.yml
18:08 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131839
18:09 araraloren https://gist.github.com/araraloren/f793d1e3172209228f293d0908a07cd2
18:09 araraloren build log
18:09 Zoffix yey, gofled the other one too. ugexe++ indeed that was a failure
18:12 devmikey joined #perl6
18:14 Zoffix ramillies: well, I filed two tickets to fix two core bugs. https://rt.perl.org/Ticket/Display.html?id=131840 and https://rt.perl.org/Ticket/Display.html?id=131839
18:14 ugexe araraloren: you have dependencies. you need to install them
18:14 Zoffix ramillies: if you change that `fail` to `die` that should avoid your bug (and probably what you want there anyway)
18:15 araraloren ugexe, how to install ? use zef ?
18:15 ugexe yes
18:16 ramillies OK, thank you. As to "die", that's exactly what I didn't want.
18:16 ramillies The idea was that the exception should be thrown only when those capabilities are actually about to be used.
18:16 Geth ¦ modules.perl6.org: 24c2161504 | (Zoffix Znet)++ | TODO-IDEAS.md
18:16 Geth ¦ modules.perl6.org: [REBUILD] Trigger full rebuild
18:16 Geth ¦ modules.perl6.org:
18:16 Geth ¦ modules.perl6.org: To rebuild bad appveyor statuses
18:16 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/24c2161504
18:17 ugexe return a 0 or 1, unless you want to have the exceptions serialized. throw your exception outside of BEGIN based on that
18:18 ramillies Thanks, I'll try that.
18:18 ugexe araraloren: https://github.com/ugexe/Perl6-CompUnit--Repository--Tar/blob/master/.appveyor.yml#L19
18:18 araraloren ugexe, thanks very much
18:22 Geth ¦ modules.perl6.org: c758b7949d | (Zoffix Znet)++ | 2 files
18:22 Geth ¦ modules.perl6.org: Remove a bunch of duplicated CSS
18:22 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/c758b7949d
18:24 * Zoffix broke something
18:25 Zoffix ah; I fixed my test code but forgot to copy to real code -_-
18:25 Geth ¦ modules.perl6.org: c4756595ed | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/AppVeyor.pm
18:25 Geth ¦ modules.perl6.org: [REBUILD] Fix typo
18:25 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/c4756595ed
18:26 ugexe ramillies: i'd suggest checking at runtime - the availability of tput depends on the env
18:28 ugexe you could use `once { }`... here is one pattern I experimented with https://gist.github.com/ugexe/90b41dbf217c96f03282cc60f621390c#file-xxx-pl6-L35
18:31 ugexe basically use the proto to handle the logic for what to do if it knows its multis won't work, and once { } makes sures it only needs to makes the system call to check once
18:36 ramillies ugexe: Thanks, it's not my code so I didn't want to change it more than necessary. I'll still have to read up on the "proto" in order to understand the example.
18:37 ramillies (and I don't get the '{*}' construct either...)
18:37 ugexe the proto is not neccesary if you are not repeating this pattern much
18:38 ugexe you could do `die "xxx" unless once { do-check() }` as the first statement of your routine
18:39 Zoffix ramillies: the `{*}` is where the body of the matching candidate "goes". So that code reads run the candidate's code if this condition is true
18:39 Zoffix I got work yoleaux will end its robotstrike soon
18:40 ramillies Ah so, thanks.
18:40 Zoffix m: proto foo (|) { say "and.. "; {*}; say " and.. "; {*}; say "weeee" }; multi foo (Int $x) { say $x }; multi foo(Str $s) { say "[STR $s]" }; foo 42; foo "meows"
18:40 camelia rakudo-moar 5d200f: OUTPUT: «and.. ?42? and.. ?42?weeee?and.. ?[STR meows]? and.. ?[STR meows]?weeee?»
18:42 ramillies A nice example, thank you.
18:42 nadim joined #perl6
18:50 sufrostico joined #perl6
18:51 tbrowder hi, #perl6
18:51 Zoffix \o\\
18:52 tbrowder hi, Z!  i want to try nativevcall to use an openssl function. is there
18:52 CacoS joined #perl6
18:53 tbrowder any special handling to grab stdout and stderr with that interface like there is with proc run?
18:56 Cabanossi joined #perl6
18:57 haha_ what do you think of the rakudo mascot? i remember how i forgot perl6 when i opened the website and saw that butterfly. it took like 2 years until i found it again and considered it as a normal language. now i kinda like it. it looks crazy.
18:58 [Coke] tbrowder: have you seen the eco SSL modules?
18:59 tbrowder yes, and i'm looking at maybe a PR if I can grok what's happening
19:00 tbrowder i can use proc run but a native call iface is probably safer, no?
19:00 robertle joined #perl6
19:01 ugexe capture the stdout of the process like you would capture output from any other non-proc source I would think
19:02 ugexe the 'ol temp $*OUT = class :: { method print(|c) { $some-storage-var ~= c.join } }
19:03 Zoffix haha_: looks fine to me; the color saturation is a bit too much on the eyes, but I like the benefits an awful logo brings. It gives people who are just there to complain about anything something to complain about, so you can just tune them out; without a logo they'd start complaining about feature X, drawing people into a heated discussion :)
19:04 Zoffix There's also a write up somewhere about the logo being a cultural hack to weed out the (what I call) "elitist types"; they can't bring themself to fly the banner of butterfly :D
19:05 skids SSH stdout/stdin handling is somehwat special.  There's some safeguards in there specifically to fudge up people trying to programmatically use password-based auth methods.
19:05 skids (when not using a vt)
19:05 * jnthn is now confused if this is about OpenSSL or OpenSSH... :)
19:06 skids No, it is I who is confused
19:06 jnthn hah
19:06 Zoffix haha_: plus, I can't say I spend much time looking at that butterfly :) Here's a book cover I designed for "The White Book". It's a butterfly, but a completely different one: http://i.imgur.com/HsivBCT.jpg
19:06 jnthn If it's SSH I wrote a module to do that, and you can use it rather a lot like Proc::Async :)
19:07 tbrowder i'm looking at x509 functions, nothing with ssh
19:10 skids Oh just write your own ASN.1 parser (snicker)
19:12 haha_ zoffix: that's an interesting thought
19:12 jnthn tbrowder: Native calling them is likely the more robust way in so far as all it needs is the library. I doubt that the C API thinks in terms of stdout/stderr and so forth, though. OTOH, this is OpenSSL, which has to be one of the less fun C libraries I've done Perl 6 bindings with :P
19:13 haha_ there should be more people like zoffix
19:15 [Coke] agreed, zoffix is on my clone-if-possible list.
19:16 Zoffix Ugh. Spotted another appveyor update bug: the links to results on the modules.perl6.org page link to url + github username/repo; and the same trick of adding `github/` to the URL that works for badges doesn't work for project page :/
19:17 Zoffix so some of those links are 404s
19:20 Zoffix damn: "Do you mean default AppVeyor page and not badge? If yes, we do not provide this URL route, because we don't know what to do when more than one AppVeyor project uses single repository. This is very common"
19:20 wamba joined #perl6
19:22 brabo joined #perl6
19:22 ufobat joined #perl6
19:24 brabo joined #perl6
19:43 haha joined #perl6
19:43 Zoffix OK. I don't know a solution to that, so I re-opened the appveyor Issue: https://github.com/perl6/modules.perl6.org/issues/76#issuecomment-320336909
19:45 brrt joined #perl6
19:49 xinming joined #perl6
19:50 andrzejku joined #perl6
19:50 andrzejku hi
19:50 andrzejku people
19:50 andrzejku the Perl6 module file shouldn't be runnable right?
19:53 timotimo do you mean +x posix permissions?
19:54 [Coke] modules don't need to be executable. script could be.
19:57 astj joined #perl6
19:58 andrzejku I mean implementation fact
19:58 andrzejku when I name something as pm6
19:58 andrzejku and p6
19:58 andrzejku so convention is all p6 should be executable
20:01 skids Personally, if I'm going to install a script, I'm not going to use a suffix at all, because it adds nothing to the CLI UX.
20:01 andrzejku I know I know
20:02 andrzejku I just ask about convention
20:03 cpage_ joined #perl6
20:03 skids Convention? It's hard enough to get people not to just use "pm" :-)  But yes, .pm6 files are not expected do anything when loaded alone/directly.  They can, but don't have to.
20:05 andrzejku :<
20:06 andrzejku skids I know thats possible to say lets fuck all conventions and write how we want and what we want
20:06 andrzejku but I suppose the homogenous convention can help people to understand your code structure better
20:09 geekosaur more than that; some platforms force such conventions on you (e.g. windows does things by file extension)
20:10 cpage_ joined #perl6
20:16 ramillies Zoffix: I don't want to sound scary, but please try this one: echo 'unit module Foo; die; CATCH { }' > Foo.pm6; perl -I. -MFoo -e ''
20:16 ramillies I get "Cannot invoke this object (REPR: Null; VMNull)" with this.
20:16 andreoss joined #perl6
20:17 ugexe i think you mean perl6 -I
20:17 ramillies (s/perl/perl6/ in the first)
20:18 ramillies exactly
20:18 Zoffix ramillies: I'm on the bus ATM. Would you report it as a bug?
20:18 Zoffix huggable: rakudobug
20:18 huggable Zoffix, Report bugs by emailing to <rakudobug@perl.org>
20:18 * Zoffix &
20:19 ramillies Sure. I just wanted to ask first.
20:21 ugexe echo 'module Foo { die; CATCH { default { say $_ } }; }' > Foo.pm6; works though
20:23 ramillies Looks like the bug manifests only if there is a CATCH but the die is not caught.
20:26 ugexe scoping matters too
20:26 ugexe unit module Foo; would not work in my example
20:26 ugexe had to be module Foo { }
20:28 ramillies Hm, I just tried and you're right.
20:29 ramillies Actually it seems that if it's 'module Foo { }', it works OK, if 'unit module Foo;', the bug manifests.
20:29 ramillies (and I thought these two are equivalent...)
20:30 ramillies 'module Foo { die; CATCH { } }' will work too.
20:37 andreoss m: class Foo::A {}; my $a = "A"; say Foo::{$a}.new;
20:37 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A.new?»
20:38 andreoss m: class Foo::A {}; my $a = "C"; say Foo::{$a}.new;
20:38 camelia rakudo-moar abf1cf: OUTPUT: «Any.new?»
20:38 andreoss is it a bug?
20:38 andreoss m: class Foo::A {}; my $a = "C"; say "Foo::{$a}.new".EVAL;
20:38 camelia rakudo-moar abf1cf: OUTPUT: «Could not find symbol '&C'?  in block <unit> at EVAL_0 line 1?  in block <unit> at <tmp> line 1??»
20:39 AlexDaniel joined #perl6
20:39 nadim Take the poll /if you have nothing better to do on a Friday evening), https://www.facebook.com/groups/1595443877388632/permalink/1952277848371898/
20:41 El_Che I don't have a facebook account to vote (do I exist?) so I'll vote here: =>
20:41 El_Che :)
20:42 nadim haha!
20:43 nadim nobody said "duh, where are the unicode arrows?" yet
20:44 skids Also no facebook.  I'm kind torn between => and infix :.  A case could be made for adverbial, but not without the corresponding parens.  Definitely not -.
20:45 nadim skids: I agred with you I also like the idea of :name(123)
20:46 nadim although it is a bit noisy
20:46 skids definitely '=>' if your keys aren't idents.
20:46 andreoss m: class Foo::A {}; my $a = "Foo::C"; say {$a}.new;
20:46 camelia rakudo-moar abf1cf: OUTPUT: «Cannot make a Block object using .new?  in block <unit> at <tmp> line 1??»
20:47 nadim unicode ? looks nice in a terminal but dreadful in my irc client
20:49 ufobat m: sub foo (|a, :%e) { a.perl.say }; foo(1, :e( a => 1))
20:49 camelia rakudo-moar abf1cf: OUTPUT: «Too many positionals passed to 'foo'; expected 1 argument but got 1?  in sub foo at <tmp> line 1?  in block <unit> at <tmp> line 1??»
20:49 ufobat 1 > 1 is True
20:49 skids andreoss: https://docs.perl6.org/language/control#blocks
20:50 andreoss m: class Foo::A {}; my $a = "C"; say Foo::{$a}.new;
20:50 camelia rakudo-moar abf1cf: OUTPUT: «Any.new?»
20:50 andreoss should this be Any?
20:50 andreoss not a compile-time error
20:52 andreoss or runtime rather
20:53 skids Indirect name lookups just tell you what is in the stash.  If the stash is empty at that name, it's Any, which is the default value for Stash values.
20:56 Cabanossi joined #perl6
20:57 nadim and here is a stash dump http://imgur.com/fthEDkK
20:58 lizmat nadim++
21:00 andreoss so this kind of lookups is not okay for a factory
21:04 ugexe your factory wouldn't know that getting an Any means it failed?
21:13 Kyo91_ joined #perl6
21:15 geekosaur andreoss, if you are accessing the symbol table ("stash") directly, of course all bets are off
21:16 geekosaur m: class Foo::A {}; my $a = "C"; say Foo::{$a}:exists
21:16 camelia rakudo-moar abf1cf: OUTPUT: «False?»
21:16 geekosaur m: class Foo::A {}; my $a = "A"; say Foo::{$a}:exists
21:16 camelia rakudo-moar abf1cf: OUTPUT: «True?»
21:19 nhywyll joined #perl6
21:20 nhywyll joined #perl6
21:37 wamba joined #perl6
21:39 cpage_ joined #perl6
21:42 wamba joined #perl6
21:44 markmont joined #perl6
21:45 astj joined #perl6
21:50 ramillies left #perl6
21:53 andreoss m: class Foo::A {}; my $a = "A"; say Foo::{$a}:exists ?? Foo::{$a}.new !! die;
21:53 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A.new?»
21:53 andreoss too wordy
21:56 Cabanossi joined #perl6
21:58 nadim m: class Foo::A {}; my $a = "A"; say Foo::{$a}.?new ;
21:58 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A.new?»
21:58 nadim shorter
21:59 nadim m: class Foo::A {}; my $a = "B"; say Foo::{$a}.?new ;
21:59 camelia rakudo-moar abf1cf: OUTPUT: «Any.new?»
21:59 andreoss it won't die
21:59 nadim m: class Foo::A {}; my $a = "B";  Foo::{$a}.?new or die;
21:59 camelia rakudo-moar abf1cf: ( no output )
21:59 andreoss m: class Foo::A {}; my $a = "A"; say (my Foo::A $ = Foo::{$a}.new)
21:59 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A.new?»
22:00 andreoss m: role Foo {}; class Foo::A is Foo {}; my $a = "C"; say (my Foo $ = Foo::{$a}.new)
22:00 camelia rakudo-moar abf1cf: OUTPUT: «Type check failed in assignment; expected Foo but got Any (Any.new)?  in block <unit> at <tmp> line 1??»
22:00 nadim m: class Foo::A {}; my $a = "B";  die ;
22:00 camelia rakudo-moar abf1cf: OUTPUT: «Died?  in block <unit> at <tmp> line 1??»
22:01 nadim m: class Foo::A {}; my $a = "B"; say Foo::{$a}.?new ;
22:01 camelia rakudo-moar abf1cf: OUTPUT: «Any.new?»
22:01 nadim m: class Foo::A {}; my $a = "B"; say Foo::{$a}.?new ~~ Any or die;
22:01 camelia rakudo-moar abf1cf: OUTPUT: «True?»
22:01 nadim m: class Foo::A {}; my $a = "B"; say Foo::{$a}.?new ~~ Any and die;
22:01 camelia rakudo-moar abf1cf: OUTPUT: «True?Died?  in block <unit> at <tmp> line 1??»
22:02 andreoss is there a way to make a type assertion without `my Type $ = ...`?
22:02 andreoss and still return the value
22:02 nadim what do you want the type assertion for?
22:03 andreoss to avoid returning Any in this case
22:05 yoleaux joined #perl6
22:05 dpk joined #perl6
22:05 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a}.?new ;  $x !~~ Any and $x} ; my $x = factory() ; dd $x ;
22:05 camelia rakudo-moar abf1cf: OUTPUT: «Bool $x = Bool::False?»
22:06 yoleaux 31 Jul 2017 21:06Z <Zoffix> nadim: nicq20++ fixed the Hash.ACCEPTS: Hash issue you were having. It now does `eqv` of two hashes.
22:06 dpk fixed yoleaux
22:06 dpk sorry it took so long, i was on a wild goose chase all evening
22:07 nadim Zoffix: nice work with the Hash, I can take away the work around :)
22:08 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a}.?new ;  $x ~~ Any ?? () !! $x} ; my $x = factory() ; dd $x ;
22:08 camelia rakudo-moar abf1cf: OUTPUT: «List $x = $( )?»
22:08 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a}.?new ;  $x ~~ Any ?? |() !! $x} ; my $x = factory() ; dd $x ;
22:08 camelia rakudo-moar abf1cf: OUTPUT: «Slip $x = $(slip( ))?»
22:08 dpk (out putting up placards for my $political-party ahead of upcoming election; almost finished, when a politician from another party sees us and tells us we can't do that yet, by law it's only allowed from 7 weeks before the election and we're 7 weeks and two days away; argument ensues; we have to go round and take all of them down or he'll get the public order office to come and fine us all)
22:08 dpk (so i was not at my computer because i was wasting time putting up and then taking down posters all evening)
22:09 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a}.?new ;  $x ~~ Any ?? return !! $x} ; my $x = factory() ; dd $x ;
22:09 camelia rakudo-moar abf1cf: OUTPUT: «===SORRY!===?Cannot find method 'ann' on object of type NQPMu?»
22:09 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a}.?new ;  $x ~~ Any ?? return Any !! $x} ; my $x = factory() ; dd $x ;
22:09 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:09 nadim m: class Foo::A {}; my $a = "A"; sub factory { my $x = Foo::{$a}.?new ;  $x ~~ Any ?? return Any !! $x} ; my $x = factory() ; dd $x ;
22:09 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:10 nadim m: class Foo::A {}; my $a = "A"; sub factory { my $x = Foo::{$a}.?new ;  $x} ; my $x = factory() ; dd $x ;
22:10 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A $x = Foo::A.new?»
22:10 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a}.?new ;  $x} ; my $x = factory() ; dd $x ;
22:10 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any.new?»
22:11 nadim m: class Foo::A {}; my $a = "B"; sub factory { my $x = Foo::{$a} ;  $x} ; my $x = factory() ; dd $x ;
22:11 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:11 nadim m: class Foo::A {}; my $a = "A"; sub factory { my $x = Foo::{$a} ;  $x} ; my $x = factory() ; dd $x ;
22:11 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A $x = Foo::A?»
22:13 nadim m: class Foo::A {}; my $a = "A"; sub factory { my $x = Foo::{$a} ;  $x ~~ Any ?? $x !! $x.new} ; my $x = factory() ; dd $x ;
22:13 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A $x = Foo::A?»
22:14 nadim m: class Foo::A {}; my $a = "A"; sub factory { Foo::{$a}  ~~ Any ?? Any !! Foo::{$a}.new} ; my $x = factory() ; dd $x ;
22:14 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:16 nadim m: class Foo::A {}; my $a = "A"; sub factory { dd Foo::{$a} } ; my $x = factory() ; dd $x ;
22:16 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A?Any $x = Any?»
22:17 nadim m: class Foo::A {}; my $a = "A"; sub factory { dd Foo::{$a} === Any } ; my $x = factory() ; dd $x ;
22:17 camelia rakudo-moar abf1cf: OUTPUT: «Bool::False?Any $x = Any?»
22:18 nadim m: class Foo::A {}; my $a = "A"; sub factory { Foo::{$a} === Any ?? Foo::{$a} !! Any} ; my $x = factory() ; dd $x ;
22:18 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:18 nadim m: class Foo::A {}; my $a = "A"; sub factory { Foo::{$a} === Any ?? Foo::{$a}.new !! Any} ; my $x = factory() ; dd $x ;
22:18 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:19 nadim m: class Foo::A {}; my $a = "A"; sub factory { Foo::{$a} === Any ?? Any !! Foo::{$a}.new} ; my $x = factory() ; dd $x ;
22:19 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A $x = Foo::A.new?»
22:20 nadim andreoss: is the above good enough?
22:23 nadim m: class Foo::A {};  sub factory($a) { Foo::{$a} === Any ?? Any !! Foo::{$a}.new} ; my $x = factory('A') ; dd $x ;
22:23 camelia rakudo-moar abf1cf: OUTPUT: «Foo::A $x = Foo::A.new?»
22:23 nadim m: class Foo::A {};  sub factory($a) { Foo::{$a} === Any ?? Any !! Foo::{$a}.new} ; my $x = factory('B') ; dd $x ;
22:23 camelia rakudo-moar abf1cf: OUTPUT: «Any $x = Any?»
22:25 nadim andreoss: and you get to return what you want on error, including generating an exception if you prefer
22:25 Zoffix nadim: FWIW, camelia takes a /msg, if you didn't want to flood the channel.
22:26 Zoffix It was nicq20++ that fixed the hash thing
22:26 Zoffix dpk++ thanks for fixing the bot :D
22:26 nadim yes I have been spamming like a pig :)
22:26 nadim good to know, thanks Zoffix
22:26 nadim nicq20++
22:29 andreoss https://paste.debian.net/979898/
22:30 andreoss could .factory be a meta-method of some kind?
22:31 cpage_ joined #perl6
22:32 nadim Zoffix: I worked around the Hash eqv by using ===. Now I wonder if I shouldn't short cut eqv for Arrays and other containers. it doesn't make sense to flatten Array or Hashes that are equivalent, and if that is needed a block can do it
22:32 andreoss also is something like `method factory(...) return self.WHAT` possible?
22:37 nadim andreoss: the code you posted will return a Failure, is it what you want it to do?
22:38 andreoss yes, i want it to complain instead of returning Any.new, because the latter daesn't make sense at all to me
22:39 andreoss but the error message is cryptic though
22:39 nadim It doe not have to return Any.new, see the example I posted above, you can get an Any instead, and that is not defined
22:41 andreoss yeah, i saw it
22:42 andreoss but i would prefer the compiler cheching it for me instead (i.e checking the type of the value being returned)
22:43 nadim and, IMHO, the example you nopasted makes no sense, having a role does not make sense.
22:43 andreoss why?
22:44 Zoffix .tell ufobat please report the bugs you find, so they could be fixed. I filed your 1 > 1 True as https://rt.perl.org/Ticket/Display.html?id=131842
22:44 yoleaux Zoffix: I'll pass your message to ufobat.
22:45 nadim you're using the role as a factory name container. you add the role to A and then you call the role directly thus making the use of the role on A completely moot
22:46 nadim even if you called the factory method through A but demanded a B it would not make sense, why would A give you a B object just because they have the same role?
22:46 andreoss this way it wrong yes
22:47 andreoss it's
22:50 nadim andreoss: also, you write "I prefer the compiler checking the type of the value being returned" but you're writing a factory that returns different types! Did you mean the type of the value being assigned? in that case you can type the receipient of  the factory call.
22:51 andreoss it's supertype in this case
22:52 nadim someone need to confirm but I do not think Foo::A is a sub type of Foo. let's check.
22:52 Altreus Can someone point me in the right direction to understand the difference between Str:D and Str:D: in a signature?
22:53 nadim Altreus: did you type the same thing twice?
22:53 Altreus no, one has a colon after the Definite smiley
22:54 Altreus I'm noticing that the :D version is a sub and the :D: version is a method
22:54 Altreus does it simply mean this is the invocant object?
22:54 Altreus So Str:D: means it's invoked as a method on a Str:D
22:54 nadim m: class Foo::A {};  my $x = Foo::A.new ; dd $x ~~ Foo ;
22:54 camelia rakudo-moar abf1cf: OUTPUT: «Bool::False?»
22:55 nadim andreoss: you can see above that Foo is not the suprclass of Foo::A
22:55 andreoss there's no Foo
22:56 andreoss m: class Foo { } ; class Foo::A is Foo {};  my $x = Foo::A.new ; dd $x ~~ Foo ;
22:56 camelia rakudo-moar abf1cf: OUTPUT: «Bool::True?»
22:56 nadim m: ?lass Foo {} ; class Foo::A {};  my $x = Foo::A.new ; dd $x ~~ Foo ;
22:56 camelia rakudo-moar abf1cf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Illegally post-declared type:?    Foo used at line 1?Undeclared routine:?    ?lass used at line 1. Did you mean 'last'???»
23:00 andreoss Altreus: yes http://design.perl6.org/S06.html#Invocant_parameters
23:00 zengargoyle .tell moritz clicky clicky purchased dead tree.
23:00 yoleaux zengargoyle: I'll pass your message to moritz.
23:02 Altreus OK, great, thanks :)
23:04 nadim andreoss: https://nopaste.linux-dev.org/?1160341
23:04 andreoss m: class Foo {  multi method bar(Foo:U:) { say "hi" };  multi method bar(Foo:D:) { say "bye" }}; Foo.new.bar; Foo.bar;
23:04 camelia rakudo-moar abf1cf: OUTPUT: «bye?hi?»
23:05 Zoffix Altreus: it's basically same as in Perl's object, the invocant is just the first arg to the routine, except in Rakudo you don't have to specify it (and can refer to it via `self` in the method). But you can use the "invocant marker" (the extra colon you noticed) to specify what sort of the invocant the method is for. This, for example, can be used in multi method dispatch. The `:D` on the type means instances
23:05 Zoffix only and `:U` means only the type objects, so you can write:
23:05 Zoffix m: class Foo { multi method what-is-it(Foo:D:) {say "tis an instance" }; multi method what-is-it(Foo:U:) { say "tis a type object" } }; Foo.what-is-it; Foo.new.what-is-it
23:05 camelia rakudo-moar abf1cf: OUTPUT: «tis a type object?tis an instance?»
23:05 nadim but a factory call that exits the program that wild is also non sense
23:06 Zoffix m: class Foo { method what-is-it ($arg) {say "arg is $arg" } }; Foo.what-is-it: 70; Foo.new.what-is-it: 42
23:06 camelia rakudo-moar abf1cf: OUTPUT: «arg is 70?arg is 42?»
23:07 Zoffix m: class Foo { method what-is-it ($self: $arg) {say "arg is $arg; invocant is $self.gist()" } }; Foo.what-is-it: 70; Foo.new.what-is-it: 42
23:07 camelia rakudo-moar abf1cf: OUTPUT: «arg is 70; invocant is (Foo)?arg is 42; invocant is Foo.new?»
23:07 Altreus Zoffix: and sub what-is-it (Foo:D) would be outside of the class entirely?
23:07 Zoffix Altreus: yeah, it'd just be a lexical sub
23:07 Altreus I'm seeing it in the Str documentation, you see, so that's where there's a sub and a method
23:08 Altreus This is why substr(Str:d) and Str:D.substr both do things
23:08 Altreus Str:D: just doesn't look like it knows whether or not it's happy about it
23:08 Zoffix :D
23:09 Zoffix s: '', 'substr', \(1)
23:09 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/abf1cfe/src/core/Cool.pm#L74
23:09 Zoffix s: &substr, \('', 1)
23:09 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/abf1cfe/src/core/Str.pm#L3035
23:09 Zoffix ^ there are both a method defined in a class (Str is a subclass of Cool) as well as a separate sub defined.
23:10 Zoffix The result is you can use both a method call or a sub; whatever floats your boat
23:10 Zoffix (not all methods have subs; just the common ones)
23:11 skids joined #perl6
23:11 Altreus there's a lot to learn ????
23:12 BenGoldberg joined #perl6
23:12 Altreus the default for an argument is :_, I assume?
23:12 Zoffix :) Yeah, there's lots of stuff in core that in Perl you'd normally load up from some module (e.g Moose)
23:13 Altreus So (Str:) is (Str:_:)
23:13 Altreus that one looks *really* sad :(
23:13 Zoffix Altreus: currently yes, but there's a proposal for 6.d language version to make the default on `%` and `@` sigiled params to default to `:D`   https://github.com/perl6/6.d-prep/blob/master/TODO/FEATURES.md#sigils-imply-d
23:14 Altreus because it would basically never make sense to provide Array when an @ is requested?
23:14 Zoffix right
23:14 Altreus okay I think I'm getting it at least somewhat
23:14 Zoffix \o/
23:15 Altreus I've already used my $var = do if $long-construct -> $n {...} else {...{
23:16 Altreus uh, }
23:16 Altreus I dunno if I like it though but that's step 2
23:16 Altreus apparently it's bedtime :P
23:16 Altreus ttfn
23:17 andreoss m: constant Foo: = Metamodel::ClassHOW.new_type(name => 'Foo'); Foo.^compose; class Foo::A is Foo {};
23:17 camelia rakudo-moar abf1cf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Missing initializer on constant declaration?at <tmp>:1?------> 3constant Foo:7?5 = Metamodel::ClassHOW.new_type(name => ?»
23:17 andreoss m: constant Foo := Metamodel::ClassHOW.new_type(name => 'Foo'); Foo.^compose; class Foo::A is Foo {};
23:17 camelia rakudo-moar abf1cf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?'Foo::A' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed)?at <tmp>:1?»
23:18 andreoss why it's not composed?
23:20 Exodist joined #perl6
23:24 zengargoyle Zoffix: the sub thing was somebody else's question an i was just trying to tease out better answers.  guess you had to be there to figure out just what the asker wanted to know.
23:25 zengargoyle probably like split code into sub for clarity but not run sub each time or something like that.
23:25 zengargoyle maybe my sub foo and state $foo = foo(); or similar i guess...
23:27 zengargoyle i didn't really get the what they wanted either.... :)
23:28 Zoffix hehe
23:29 zengargoyle the joys of being around when everybody else is asleep. :P
23:30 geekosaur andreoss, if you're messing with a *HOW directly, I imagine there is more involved than just .^compose
23:31 andreoss m: constant Foo := Metamodel::ClassHOW.new_type(name => 'Foo'); Foo.^compose; say Foo.new;
23:31 camelia rakudo-moar abf1cf: OUTPUT: «Foo.new?»
23:34 zengargoyle i'm torn on rakudobrew vs package, but think rakudobrew just needs instructions to 'build moar 2017.07' release instead of default moar-nom.
23:35 zengargoyle or to have a 'latest-release' tag sort of thing to default to.  let the wise select 'moar-nom'
23:36 zengargoyle because rakudobrew, perlbrew, rbenv, etc.... the install and switch is very common and the truth is often "never trust OS packages".
23:36 * zengargoyle apologies to packaging people. :)
23:40 zengargoyle and makes me think of old question of Task::Foo type modules and having zef do best-effort install.  i.e. install this list of modules, but don't barf i one fails, skip and just say at the end that these installed and these failed.
23:41 zengargoyle because if you 'nuke moar' then you've lost all the modules you had.... and need to attempt to get back to what you had before nuke.
23:42 zengargoyle and that shouldn't fail if Grammar::Debug or whatnot fails with new build because all of zef install is one transaction or serial.
23:48 zengargoyle Zoffix: so, if you brand as 'Rakudo Perl 6' what happens when there is 'Not-Rakudo Perl 6'.  and all of your searches now go to a specific implementation?
23:50 zengargoyle how does one search for 'Perl 6' when everything is branded 'Rakudo Perl 6' but their needs are 'web-asm-magic Perl 6'.
23:52 zengargoyle that is why i'd go more for "Camelia Perl 6" where it's trademarked or whatnot and there can be no actual 'camelia' 'perl6'.  then Rakudo and web-asm-magic can both state that they are Camelia (Perl 6) implementations....
23:54 zengargoyle there may be rakudo/moar and rakudo/js but in the future there may be bobs-your-uncle/squeakvm.
23:57 zengargoyle the branding modifier whould not be an instance of implementation.
23:58 AlexDaniel zengargoyle: well, at first I didn't understand it too… I still cringe, but at least I get the idea now
23:58 * zengargoyle ends musings.
23:59 AlexDaniel zengargoyle: so the idea is not to pick a *better* name, but to *change* it, no matter to what
23:59 zengargoyle yeah, sorta get the idea.
23:59 AlexDaniel and sure, we can call it “tweak” if it sounds better…

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

Perl 6 | Reference Documentation | Rakudo