Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-03-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 DnAeillaxe except that it cannot gist the stuff because it breaks somewhere
00:00 IOninja lol
00:00 DnAeillaxe u: { so $_ > 0x000B and .chr ~~ /\n/ }
00:00 unicodable6 DnAeillaxe, U+000C <control-000C> [Cc] (control character)
00:00 unicodable6 DnAeillaxe, U+000D <control-000D> [Cc] (control character)
00:00 DnAeillaxe u: { so $_ > 0x000D and .chr ~~ /\n/ }
00:00 unicodable6 DnAeillaxe, U+0085 <control-0085> [Cc] (control character)
00:00 unicodable6 DnAeillaxe, U+2028 LINE SEPARATOR [Zl] (
)
00:00 unicodable6 DnAeillaxe, U+2029 PARAGRAPH SEPARATOR [Zp] (
)
00:01 DnAeillaxe u: { so $_ > 0x2029 and .chr ~~ /\n/ }
00:01 unicodable6 DnAeillaxe, Found nothing!
00:01 DnAeillaxe okay
00:01 DnAeillaxe e: say ‘hello
world’
00:01 evalable6 DnAeillaxe, Full output: https://gist.github.com/04a78a16e457c6a2beade2a3c25e60fe
00:01 evalable6 DnAeillaxe, rakudo-moar 212cc8ae5: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/FNiDpajJoH␤Unable …»
00:01 IOninja mc: say "\x[2029]" ~~ /\n/
00:01 committable6 IOninja, ¦2015.12: «「
」»
00:01 IOninja weird
00:01 DnAeillaxe so this one is broken as well
00:01 DnAeillaxe 2028 and 2029
00:02 mcmillhj joined #perl6
00:02 DnAeillaxe huggable: break my module :is: U+000A U+000B U+000C U+000D U+0085 U+2028 U+2029
00:02 huggable DnAeillaxe, Added break my module as U+000A U+000B U+000C U+000D U+0085 U+2028 U+2029
00:04 IOninja Are all these chars *supposed* to match \n or is it a bug?
00:04 bjz joined #perl6
00:12 IOninja .ask samcv Are all these chars *supposed* to match \n or is it a bug? U+000A U+000B U+000C U+000D U+0085 U+2028 U+2029
00:12 yoleaux IOninja: I'll pass your message to samcv.
00:12 TEttinger oh, this was a JSON thing? isn't that a known incompatibility between JSON and JS as their specs describe them, the handling of newlines?
00:13 samcv hmm
00:13 yoleaux 00:12Z <IOninja> samcv: Are all these chars *supposed* to match \n or is it a bug? U+000A U+000B U+000C U+000D U+0085 U+2028 U+2029
00:13 samcv hello all
00:14 samcv m: say 0x2029.chr ~~ /\n/
00:14 camelia rakudo-moar 212cc8: OUTPUT: «「
」␤»
00:14 samcv m: say so 0x2029.chr ~~ /\n/
00:14 camelia rakudo-moar 212cc8: OUTPUT: «True␤»
00:14 samcv weird...
00:14 samcv u: propdump U+2029
00:14 unicodable6 samcv, U+0070 LATIN SMALL LETTER P [Ll] (p)
00:14 unicodable6 samcv, U+0072 LATIN SMALL LETTER R [Ll] (r)
00:14 unicodable6 samcv, 15 characters in total: https://gist.github.com/4673bcd31beb2e334f7990d26ab7e8d7
00:14 samcv ugh how do i do this DnAeillaxe
00:15 samcv unidump U+2029
00:16 samcv unidump: U+2029
00:16 unicodable6 samcv, https://gist.github.com/a7bebca2f239625520f0d77c705e5288
00:16 samcv nope not what i watned
00:17 samcv m: say so 0x2029.chr ~~ /"\n"/
00:17 camelia rakudo-moar 212cc8: OUTPUT: «False␤»
00:17 samcv m: say so "\n" ~~ /"\n"/
00:17 camelia rakudo-moar 212cc8: OUTPUT: «True␤»
00:17 samcv IOninja,
00:18 samcv peculiar
00:19 * samcv wonders what the backslash n token is
00:23 IOninja :)
00:33 DnAeillaxe samcv: you don't do it yet!
00:33 DnAeillaxe samcv: the feature is experimental, so… :)
00:33 samcv OK
00:33 mcmillhj joined #perl6
00:33 DnAeillaxe samcv: but, even if it worked, it wouldn't be able to gist it
00:33 samcv why?
00:33 DnAeillaxe JSON::Tiny fails somewhere
00:34 samcv well it worked up there
00:34 DnAeillaxe … where?
00:34 samcv <samcv> unidump: U+2029
00:34 samcv <unicodable6> samcv, https://gist.github.com/a7bebca2f239625520f0d77c705e5288
00:34 samcv <samcv> nope not what i watned
00:35 DnAeillaxe samcv: yes-yes, it works! Unless the gist itself has U+2029 character
00:35 samcv it worked, it just did it for each character i typed
00:35 samcv only that character?
00:35 samcv oh cause it matches \n huh lol
00:35 DnAeillaxe I think all of these should break it in one way or another
00:35 DnAeillaxe huggable: break my module
00:35 huggable DnAeillaxe, U+000A U+000B U+000C U+000D U+0085 U+2028 U+2029
00:36 DnAeillaxe u: U+2028 U+2028 U+2028 U+2028
00:36 unicodable6 DnAeillaxe, U+2028 LINE SEPARATOR [Zl] (
)
00:36 unicodable6 DnAeillaxe, U+2028 LINE SEPARATOR [Zl] (
)
00:36 DnAeillaxe yep, doesn't work
00:36 samcv so i guess workaround is you could use $var ~~ /"\n"/ instead of /\n/
00:36 DnAeillaxe u: U+2085 U+2085 U+2085 U+2085
00:36 unicodable6 DnAeillaxe, U+2085 SUBSCRIPT FIVE [No] (₅)
00:36 samcv then it uses interpolation for the value instead of whatever the grammar rule for \n is
00:36 unicodable6 DnAeillaxe, U+2085 SUBSCRIPT FIVE [No] (₅)
00:36 unicodable6 DnAeillaxe, 4 characters in total: https://gist.github.com/377e30da740e85dc4dd9f4fd1561daa8
00:36 DnAeillaxe u: U+0085 U+0085 U+0085 U+0085
00:36 unicodable6 DnAeillaxe, U+0085 <control-0085> [Cc] (control character)
00:36 unicodable6 DnAeillaxe, U+0085 <control-0085> [Cc] (control character)
00:36 unicodable6 DnAeillaxe, 4 characters in total: https://gist.github.com/425b46e927add786fa44f498f26dd4db
00:37 DnAeillaxe hm
00:37 DnAeillaxe some of them are escaped I guess
00:37 DnAeillaxe but not U+2028 and U+2029
00:41 samcv ugh maybe this is the right spot? https://github.com/perl6/nqp/blob/master/src/QRegex/P6Regex/Actions.nqp#L436
00:42 samcv IOninja, is \n is regex special somehow? or should it only do the newline control code
00:43 IOninja No idea, sorry.
00:43 samcv well i guess i can find out if i break any spectests
00:44 mcmillhj joined #perl6
00:46 Possum joined #perl6
00:56 Geth ¦ perl6-most-wanted: cc520a35af | (Tom Browder)++ | most-wanted/modules.md
00:56 Geth ¦ perl6-most-wanted: remove module now in ecosystem
00:56 Geth ¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/cc520a35af
01:03 mcmillhj joined #perl6
01:24 mcmillhj joined #perl6
01:33 * IOninja is amused by $*SPEC.catfile being just an alias for .catdir
01:33 IOninja That was a clue to not add it! :)
01:36 DnAeillaxe samcv: I guess it was supposed to be similar to \s (which is trappy as well)
01:37 DnAeillaxe that is, it matches any kind of newline, including whatever unicode has to offer
01:38 cdg joined #perl6
01:39 DnAeillaxe u: a
01:39 DnAeillaxe right…
01:44 mcmillhj joined #perl6
01:54 IOninja S32-io/io-spec-win.t:is $win32.rootdir, '\\',  'rootdir is "\\"';
01:54 IOninja .oO( why?? )
01:55 IOninja this grant is unfun :(
01:55 * IOninja regrets signing up for it
01:57 IOninja \ works, so nevermind
02:03 mcmillhj joined #perl6
02:08 cdg joined #perl6
02:19 bjz joined #perl6
02:20 DnAeillaxe m: say “\c[MAN SHRUGGING, WOMAN SHRUGGING]”
02:20 camelia rakudo-moar d232f3: OUTPUT: «????‍♂️????‍♀️␤»
02:22 mcmillhj joined #perl6
02:30 Guest45613 joined #perl6
02:31 TEttinger joined #perl6
02:43 mcmillhj joined #perl6
02:46 BenGoldberg u: /\m/
02:46 unicodable6 BenGoldberg, Regexes are not supported yet, sorry! Try code blocks instead
02:46 BenGoldberg u: { $_ ~~ /\n/ }
02:46 unicodable6 BenGoldberg, Found nothing!
02:55 Cabanossi joined #perl6
02:57 DnAeillaxe BenGoldberg: it goes through integers
02:57 DnAeillaxe BenGoldberg: so that would be $_.chr ~~ instead of $_ ~~
02:58 DnAeillaxe BenGoldberg: but as already mentioned, it will fail with these weird characters…
02:58 DnAeillaxe BenGoldberg: https://github.com/zoffixznet/perl6-IRC-Client/issues/42 and https://github.com/perl6/whateverable/issues/115 , contributions welcome
03:02 mcmillhj joined #perl6
03:04 samcv m: say 0x2028.uniprop('Line_Feed')
03:04 camelia rakudo-moar d232f3: OUTPUT: «BK␤»
03:04 samcv BK, so unhelpful
03:05 samcv m: say 0x2028.uniprop('Line_Break')
03:05 camelia rakudo-moar d232f3: OUTPUT: «BK␤»
03:05 samcv Line_Break=Mandatory_Break
03:06 samcv somehow BK = Mandatory_Break. weird
03:14 SmokeMachine Sorry, I don't know anything about Unicode... but this stuff like BK, Ll, etc... wouldn't make sense to be a enum? If wouldn't, why?
03:15 SmokeMachine The properties too...
03:18 IOninja Why make it an enum?
03:20 SmokeMachine IOninja: the greatest motivation in my opinion would be to get all enumerated... (I don't know anything about that, I'm sorry if it's a idiot idea...)
03:21 IOninja SmokeMachine: why is that beneficial?
03:21 SmokeMachine And do not accept any Str on methods that receive it...
03:22 SmokeMachine And get compile error on a typo
03:22 mcmillhj joined #perl6
03:22 IOninja And use more memory.
03:22 SmokeMachine At least to make me know what are the possibilities...
03:22 IOninja And shit enough sigiless symbols into global namespace that you can forget about calling subs without parentheses
03:24 SmokeMachine Ok, sorry...
03:25 DnAeillaxe SmokeMachine: well, you're right that it is less than awesome
03:25 DnAeillaxe we just have to figure out what could possibly be more awesome…
03:25 DnAeillaxe for example, maybe an exception is better than nothing?
03:25 DnAeillaxe m: say 0x2028.uniprop('blaaargfooooooooot!')
03:25 camelia rakudo-moar d232f3: OUTPUT: «0␤»
03:26 SmokeMachine DnAeillaxe: yes! I think a exception would help... :)
03:27 DnAeillaxe or maybe a Nil, so that it blows up later… I don't know, but anything is probably better than 0
03:28 SmokeMachine Maybe a failure?
03:29 DnAeillaxe IOninja: interestingly, we already export signals
03:29 DnAeillaxe they all start with SIG, but still
03:30 SmokeMachine m: say SIGKILL
03:30 camelia rakudo-moar d232f3: OUTPUT: «SIGKILL␤»
03:41 noganex_ joined #perl6
03:42 mcmillhj joined #perl6
03:43 BenGoldberg u: { .chr ~~ /\n/ }
03:43 unicodable6 BenGoldberg, U+000A <control-000A> [Cc] (control character)
03:43 unicodable6 BenGoldberg, U+000B <control-000B> [Cc] (control character)
03:48 samcv u: { .uniprop('Line_Break') eq 'MB' }
03:48 unicodable6 samcv, Found nothing!
03:49 BenGoldberg u: { .chr.uniprop('Line_Break') eq 'MB' }
03:49 mcmillhj joined #perl6
03:49 unicodable6 BenGoldberg, «timed out after 30 seconds» «exit signal = SIGHUP (1)»
03:49 BenGoldberg Huh
03:50 DnAeillaxe BenGoldberg: yea, it's really-really hot
03:50 DnAeillaxe a lil bit off the track and it takes forever to finish :)
03:50 samcv how hot
03:51 DnAeillaxe well, the whole thing is repeated 1114112 times, so…
03:52 DnAeillaxe BenGoldberg: but .uniprop works on integers also, so no need to .chr it
03:53 DnAeillaxe (and it's faster this way!)
04:08 Cabanossi joined #perl6
04:22 wamba1 joined #perl6
04:23 faraco joined #perl6
04:23 faraco Hi guys, I made my own Perl 6 book list that I may gonna purchase in the future (when they are finished) at https://faracosite.wordpress.com/2017/03/13/perl-6-books/, is there any other book did I missed?
04:35 DnAeillaxe huggable: books
04:35 huggable DnAeillaxe, "Perl 6 At A Glance"  https://deeptext.media/perl6-at-a-glance/ (print only for now); "Perl 6 By Example": https://leanpub.com/perl6 (can order preview digital copies) ; "Think Perl 6: How to Think Like a Computer Scientist": http://shop.oreilly.com/product/0636920065883.do
04:35 DnAeillaxe mmm
04:36 DnAeillaxe faraco: “Perl 6 at a Glance” seems to be missing
04:36 DnAeillaxe faraco: we keep a list here too: https://perl6.org/resources/
04:37 DnAeillaxe (“Books published or in work”)
04:37 faraco DnAeillaxe++
04:38 Cabanossi joined #perl6
04:43 TEttinger DnAeillaxe: how do you decide on the permutation of letters to use?
04:44 cdg_ joined #perl6
04:57 samcv oh speaking of books i was gonna read moritz book
05:01 mcmillhj joined #perl6
05:02 DnAeillaxe m: say %ENV<ME>.comb.pick(*).join
05:02 camelia rakudo-moar d232f3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '%ENV' is not declared␤at <tmp>:1␤------> 3say 7⏏5%ENV<ME>.comb.pick(*).join␤»
05:02 DnAeillaxe m: say %*ENV<ME>.comb.pick(*).join
05:02 camelia rakudo-moar d232f3: OUTPUT: «eDeniAxlal␤»
05:02 DnAeillaxe TEttinger: I use this ↑
05:03 wamba1 joined #perl6
05:09 TEttinger cool, eDeniAxlal
05:15 DnAeillaxe ye let's fix it
05:21 mcmillhj joined #perl6
05:22 samcv was asked to write a unicode chapter for moritz book. i might take that up. would probably be good to get something down on paper
05:25 matt_ joined #perl6
05:26 rindolf joined #perl6
05:42 mcmillhj joined #perl6
05:43 bjz_ joined #perl6
05:47 hcit joined #perl6
06:00 curan joined #perl6
06:13 mcmillhj joined #perl6
06:17 jraglin joined #perl6
06:19 eroux joined #perl6
06:20 CIAvash joined #perl6
06:33 mcmillhj joined #perl6
06:34 ufobat joined #perl6
06:50 RabidGravy joined #perl6
06:51 jraglin joined #perl6
06:53 mcmillhj joined #perl6
06:54 domidumont joined #perl6
07:04 wamba1 joined #perl6
07:06 ufobat good monring
07:14 mcmillhj joined #perl6
07:16 faraco morning
07:22 moritz samcv: please do!
07:22 samcv uhm what would you recommend I read moritz
07:23 samcv also what's `12-unicode-canary.md` for
07:24 faraco What is the advantage dealing with UTF8 and UTF9 when your code won't be mixed with non ASCII characters?
07:24 moritz samcv: I needed it to find characters that the leanpub toolchain would successfully render
07:24 samcv what is utf9
07:24 samcv ah ok
07:24 samcv what were your results?
07:25 faraco I read that 3 months ago, someone mentioned utf9, I'm not even sure if that even exist, haha.
07:25 samcv ascii is utf-8
07:25 samcv but not all utf-8 is ascii
07:25 samcv oh ok. lol
07:25 moritz samcv: I had to settle with Arabic-Indic digits, ,because Bengali wouldn't render
07:25 samcv moritz, did you tell them it made you sad :(
07:26 samcv so you're publishing through leanpub?
07:26 moritz samcv: not yet
07:26 moritz samcv: yes
07:26 samcv kk
07:26 moritz re recommendations, anything from chapter 3 onwards, to get some feeling for the style
07:27 moritz I can also send you a PDF version if you prefer reading that over markdown
07:27 samcv yeah that would be nice
07:27 faraco Will there be a chapter on 'Packging your Perl 6 modules with examples'.
07:27 faraco I know that, the doc covers it up pretty good.
07:29 samcv moritz, when are you scheduled to release?
07:30 moritz samcv: I want the manuscript to be complete in May, but I don't have any hard deadlines
07:30 samcv ok cool
07:30 samcv if you give me commit access I will add some sections to the unicode chapter
07:31 moritz samcv: you should have commit access already
07:31 moritz also, feel free to revamp it if you think there's a better approach
07:31 jraglin joined #perl6
07:32 samcv oh ok
07:34 mcmillhj joined #perl6
07:38 samcv moritz, you can have pictures right?
07:39 Cabanossi joined #perl6
07:39 moritz samcv: yes
07:39 moritz included with ![description](images/path-to-image.extension)
07:41 samcv ok cool. That may be useful in describing graphemes
07:41 samcv and showing the different components of a visible character
07:41 samcv in at least two scripts
07:41 moritz +1
07:41 samcv i'm thinking latin and hangul
07:49 jraglin joined #perl6
07:54 mcmillhj joined #perl6
08:06 g4 joined #perl6
08:09 Cabanossi joined #perl6
08:15 mcmillhj joined #perl6
08:32 DrForr .tell spebern Sadly I have not had the time. Or rather, if I'm being honest, I've been focused on the perltidy/perl-parser stuff. I have something at home that's halfway rewritten to post-GLR where I've brute-forced the grammar actions to do what I want, but it's incomplete.
08:32 yoleaux DrForr: I'll pass your message to spebern.
08:32 DrForr .tell spebern And thank you *very* much for your enthusiasm for the project, it's really refreshing.
08:32 yoleaux DrForr: I'll pass your message to spebern.
08:32 eroux joined #perl6
08:33 mcmillhj joined #perl6
08:52 dakkar joined #perl6
08:53 mcmillhj joined #perl6
08:55 girafe joined #perl6
08:58 mr-foobar joined #perl6
09:14 bjz joined #perl6
09:14 mcmillhj joined #perl6
09:24 ZzZombo joined #perl6
09:24 ZzZombo joined #perl6
09:28 movl joined #perl6
09:29 wamba1 joined #perl6
09:33 mcmillhj joined #perl6
09:37 koki1 joined #perl6
09:38 Cabanossi joined #perl6
09:39 Sound joined #perl6
09:39 mr-foobar joined #perl6
09:51 cdg joined #perl6
09:53 mcmillhj joined #perl6
09:54 cdg joined #perl6
10:03 mxco86 joined #perl6
10:07 abraxxa joined #perl6
10:08 Cabanossi joined #perl6
10:14 mcmillhj joined #perl6
10:22 astj joined #perl6
10:23 astj joined #perl6
10:30 abraxxa joined #perl6
10:32 cdg_ joined #perl6
10:33 jonas1 joined #perl6
10:34 ufobat joined #perl6
10:34 mcmillhj joined #perl6
10:36 jonas1 joined #perl6
10:38 Cabanossi joined #perl6
10:55 mcmillhj joined #perl6
11:00 andrzejku joined #perl6
11:06 mcmillhj joined #perl6
11:08 Cabanossi joined #perl6
11:17 mcmillhj joined #perl6
11:28 mcmillhj joined #perl6
11:37 mniip joined #perl6
11:40 wamba1 joined #perl6
11:45 cschwenz joined #perl6
11:48 cschwenz out of random curiosity is there a Perl6 version of WWW::Mechanize in any state of completeness?  or is Selenium::WebDriver the current Perl6 way to do screen-scraping
11:48 cschwenz ?
11:51 mcmillhj joined #perl6
11:53 Cabanossi joined #perl6
12:04 lukaramu joined #perl6
12:07 DrForr cschwenz: Not that I've heard, at least not yet.
12:10 andrzejku joined #perl6
12:11 mxco86 joined #perl6
12:17 mcmillhj joined #perl6
12:19 kaushal joined #perl6
12:19 kaushal Hi
12:19 DrForr Afternoon, kaushal.
12:19 kaushal How perl6 is different from the earlier versions of perl?
12:20 kaushal I am new to perl. Do i need to know the older version of perl in order to learn perl6?
12:20 DrForr Very different. We like to say they're in the same family, but don't be confused by the differences.
12:21 kaushal DrForr: Hi
12:21 DrForr It helps to know perl5 to get the basic ideas, but they're really two different languages.
12:21 kaushal oh ok
12:22 kaushal DrForr: so in perl land there is only two different language perl5 and perl6?
12:23 DrForr Only? Well, yes, there's "just" the two.
12:23 kaushal ok
12:23 kaushal DrForr: so what are the key differences between perl5 and perl6?
12:23 kaushal when was perl6 officially launched?
12:23 DrForr December 2015.
12:24 kaushal So should i start learning perl5 or perl6?
12:24 DrForr What do you want to do with it?
12:24 kaushal system administration
12:25 kaushal DrForr: what are the key differences between perl5 and perl6?
12:25 kaushal is perl6 object oriented programming language?
12:26 Woodi_ kaushal: for personal scripts, statistics perl6 is ok, for extremal production perl5
12:26 DrForr It can be, but most of the objects can have functions called on them without needing OO syntax.
12:26 Woodi_ hi #perl6 :)
12:26 kaushal ok
12:26 DrForr Eeh, if you're doing sysadmin most of the tasks aren't going to require serious performance so I'd say that 6 would work just as well as 5.
12:26 kaushal so do i need to know perl5 first to understand perl6?
12:27 Woodi kaushal: no :)
12:27 kaushal Woodi: ok
12:27 DrForr No, in fact it can be a handicap.
12:27 kaushal Woodi: so any tutorial to start learning perl6?
12:27 kaushal is perl 6 addressed by Perl6 or perl6 or ....?
12:27 Woodi https://learnxinyminutes.com/docs/perl6/
12:27 moritz "Perl 6"
12:28 kaushal moritz: ok
12:28 moritz preferably with a non-breaking space :-)
12:28 DrForr Safari has at least two :) perl6.org has a list of online tutorials you can do as well.
12:28 kaushal moritz: so Perl6 or Perl 6?
12:28 moritz and I'm writing a book which should be quite helpful already: https://leanpub.com/perl6
12:28 moritz kaushal: "Perl 6"
12:28 kaushal moritz: ok
12:29 kaushal moritz: Thank you so much
12:29 DrForr There are also some introductory talks on YouTube.
12:30 kaushal I am yet to know the differences between Perl 5 and Perl 6
12:30 kaushal Any key distinction between Perl 5 and Perl 6?
12:30 DrForr It's awfully hard to condense into a few lines of IRC.
12:30 kaushal DrForr: Please share me the YouTube talks
12:30 mcmillhj joined #perl6
12:30 kaushal DrForr: ok
12:31 kaushal DrForr: Any webpage to explain it?
12:31 DrForr Yes, perl6.org has a bunch of tutorials and explanations.
12:31 DrForr The basic difference is that in Perl 6 everything is an object, you can't say that about 5.
12:32 kaushal DrForr: ok
12:32 * moritz hasn't ever found a language where everything is an object
12:32 DrForr (but if you don't want to use $foo.do-stuff() form, you can usually still use non-OO references.
12:32 kaushal moritz: ok
12:33 kaushal moritz: so Perl 6 is a language where every stuff is referenced by a object?
12:33 kaushal moritz: not even JAVA?
12:33 DrForr Well, yes, I'm sure you could find some things in 6 that aren't "objects", but for the majority it works.
12:33 DrForr Java isn't an acronym AFAIK.
12:33 moritz kaushal: not even java
12:33 kaushal moritz: correct me if i am understanding it completely wrong
12:33 kaushal moritz: ok
12:33 moritz in most languages, variables aren't proper objects
12:34 moritz function invocations aren't objects
12:34 moritz and so on
12:34 kaushal moritz: DrForr i got inspired to learn Perl 6
12:34 DrForr Party on!
12:34 moritz "all" is *very* broad term, and seldomly warranted in that context
12:34 * kaushal remains obliged to moritz and DrForr
12:34 moritz s/all/everything/
12:34 kaushal I really appreciate your help and guidance
12:35 DrForr https://www.youtube.com/results?search_query=introduction+to+perl+6 # has a bunch of videos.
12:35 moritz no problem
12:35 DrForr https://www.youtube.com/watch?v=hR9UdvxMAbo
12:35 kaushal DrForr: so start referring to https://docs.perl6.org/
12:36 DrForr That's for documentation, intros are on the main page...
12:36 kaushal ok
12:37 faraco joined #perl6
12:38 Cabanossi joined #perl6
12:39 kaushal so Perl 6 is a interpreter or compiler?
12:39 DrForr compiler.
12:39 kaushal DrForr: ok
12:39 kaushal DrForr: Perl 5 is interpreter?
12:39 perlpilot kaushal: you might want to make sure your definition of "compiler" matches everyone elses :)
12:39 DrForr It's also a compiler, it just doesn't save the compiled tree.
12:40 kaushal so what i thought is perl is a interpreted language
12:40 kaushal it executes line by line
12:41 andrzejku joined #perl6
12:41 kaushal Perl 6 compiler is written in C programming language?
12:41 DrForr No, perl 5 compiles into an optree, it's not like BASIC or shell.
12:41 moritz kaushal: both Perl 5 and Perl 6 compile into an intermediate format
12:42 moritz kaushal: in Perl 5, there's then an interpreter for this binary op tree
12:42 moritz kaushal: in Perl 6, there's an interpreter that can swap in a Just-in-time compiler
12:42 faraco praise to NQP
12:42 kaushal ok
12:42 * [Coke] wonders how to make irssi not run out of backscroll, forcing him to go to the irc logs.
12:42 moritz most modern dynamic languages have some kind of hybrid model between compiler and interpreter
12:43 kaushal ok
12:43 andrzejku joined #perl6
12:43 DrForr [Coke]: You can enable log.
12:43 moritz and even static languages with a runtime such as C# and java go there
12:43 kaushal moritz: so Perl 6 compiler is written in C?
12:43 faraco The only feature I found is nice with irssi is Pg up button, heh :P
12:44 itaipu joined #perl6
12:44 DrForr kaushal: One layer is written in C, the rest written in NQP standing for 'Not Quite Perl'.
12:44 kaushal DrForr: ok
12:44 kaushal binary op tree?
12:44 kaushal Does it stand for Binary Operations tree?
12:45 DrForr That's for perl5, and it's not binary, but it is a tree.
12:45 cschwenz think of it more as perl5's version of an AST
12:45 moritz kaushal: only a small part of the Perl 6 compiler is written in C
12:46 kaushal moritz: ok
12:46 moritz some of the runtime environment (which we call MoarVM)
12:46 moritz the rest si written in a subset of Perl 6 called NQP
12:46 kaushal so NQP is a language to write Perl 6 compiler?
12:47 moritz yes
12:47 cschwenz left #perl6
12:47 Peter_R joined #perl6
12:50 * nine has found Perl 6 to be incredibly useful for system administration tasks
12:52 ZzZombo Am I doing this right?
12:52 ZzZombo m: say ?('ASD' ~~ *.match(<DOT COLON>.any))
12:52 camelia rakudo-moar d232f3: OUTPUT: «False␤»
12:52 DrForr nine: Agreed, speed isn't quite as important as quick hacks, so perl6 works well.
12:52 ZzZombo m: say ?('DOT' ~~ *.match(<DOT COLON>.any))
12:52 camelia rakudo-moar d232f3: OUTPUT: «True␤»
12:53 kaushal nine: ok
12:54 moritz m: say so 'DOT' eq ANY <DOT COLON>;
12:54 camelia rakudo-moar d232f3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    ANY used at line 1. Did you mean 'Any'?␤␤»
12:54 moritz m: say so 'DOT' eq anz <DOT COLON>;
12:54 camelia rakudo-moar d232f3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    anz used at line 1. Did you mean 'any'?␤␤»
12:54 moritz m: say so 'DOT' eq any <DOT COLON>;
12:54 camelia rakudo-moar d232f3: OUTPUT: «True␤»
12:54 kaushal nine: any specific tutorial of Perl 6 for system administration tasks?
12:54 nine At the very base of our IT infrastructure, there's a couple of Perl 6 scripts kicked off by puppet responsible for creating and provisioning all our server VMs.
12:55 ZzZombo moritz: great.
12:55 nine It was a real joy writing those.
12:55 moritz nine: sounds great. Please blog about it some day!
12:55 kaushal nine: I will appreciate if you can share me some docs or tutorials?
12:57 nine kaushal: that's the beauty :) You don't need much of those. The features I liked most are https://docs.perl6.org/language/functions#index-entry-MAIN and https://docs.perl6.org/type/IO$COLON$COLONPath Also https://docs.perl6.org/type/Proc
12:59 mcmillhj joined #perl6
12:59 nine MAIN subs give you fully automated usage messages and type checked command line parameters ("Do I have to write 4G or 4 for 4 GiB of RAM? Ah, just try and look at the error message...").
13:00 cog__ joined #perl6
13:00 DrForr nine: Yeah, I need to do that a bit more for Perl6::Tidy.
13:00 El_Che nine: the only problem it's that's not very UNIX like. Forced switches before params is bad
13:02 nine El_Che: that's only an issue if you think that the alternative is people taking loads of time to add proper argument parsing. In sysadmin reality the only alternative is having no checks at all and just explode at runtime...
13:03 nine El_Che: also the UNIX way actually _is_ to force switches before params. We are all spoiled by GNU software
13:03 El_Che nine: don't get me wrong, it's great to have it. But I like to have consistent cli interfaces (in my case Perl5, Perl6 and Go)
13:03 El_Che nine: gnu, indeed
13:04 El_Che Perl5: Getopt::Long, Go with docopt (a python port)
13:04 El_Che Go has the same problem, hence the lib
13:04 El_Che multi MAIN is so nice, that's why I mention it
13:05 El_Che Go flags are meh, so bringing an external library makes sense
13:05 * tadzik plugs in Getopt::Type
13:05 El_Che Perl 6 Main is fantastic
13:05 tadzik marrying shell conventions to perl conventions is always kind of icky
13:06 tadzik and MAIN tries very hard to find a common ground
13:07 El_Che I don't think that allow to mix switches and params would break anything for those that like switches before params
13:07 DrForr took me a few minutes to figure out that Bool :$option was what I wanted though, I'll have to add that to docs proper later on.
13:11 Peter_R joined #perl6
13:34 aborazmeh joined #perl6
13:34 aborazmeh joined #perl6
13:34 lukaramu_ joined #perl6
13:39 eroux joined #perl6
13:41 kaushal joined #perl6
13:43 mscha joined #perl6
13:44 mscha m: sub foo(int $n) { say 'bar' x $n }; foo(2);
13:44 camelia rakudo-moar d232f3: OUTPUT: «barbar␤»
13:44 mscha m: multi foo(int $n) { say 'bar' x $n }; foo(2); # oops
13:44 camelia rakudo-moar d232f3: OUTPUT: «Cannot resolve caller foo(Int); none of these signatures match:␤    (int $n)␤  in block <unit> at <tmp> line 1␤␤»
13:44 mscha multi foo(int $n) { say 'bar' x $n }; foo(2.int);  # Oops again
13:45 mscha m: multi foo(int $n) { say 'bar' x $n }; foo(2.int);  # Oops again
13:45 camelia rakudo-moar d232f3: OUTPUT: «No such method 'int' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
13:45 mscha m: multi foo(int $n) { say 'bar' x $n }; my int $i = 2; foo($i); # This works, but is there no easier way?
13:45 camelia rakudo-moar d232f3: OUTPUT: «barbar␤»
13:45 IOninja Would be cool to see comparison to Perl 6's regexes in this list: https://www.johndcook.com/blog/regex-perl-python-emacs/
13:45 itaipu joined #perl6
13:46 IOninja m: multi foo(int $n) { say 'bar' x $n }; foo my int $ = 2;
13:46 camelia rakudo-moar d232f3: OUTPUT: «barbar␤»
13:47 mscha OK, that's *slightly* better.
13:47 IOninja heh
13:47 rashipi joined #perl6
13:47 mscha There is no syntax for int literals, is there?  Or a (documented) way to cast an Int to an int?
13:47 moritz int/Int literals are allomorphs
13:48 moritz which means you can use them for both
13:48 moritz m: my int $x = 42;
13:48 camelia rakudo-moar d232f3: ( no output )
13:48 mscha Except in the above case.
13:48 mscha Or is that a bug in multi?
13:48 IOninja Not a bug.
13:50 * moritz doesn't understand allomorphs well enough to comment
13:51 IOninja I can rake for a ticket where jnthn++ explained why this is not a bug...
13:52 IOninja Ticket: https://rt.perl.org/Ticket/Display.html?id=129844
13:52 IOninja Explanation why not a bug: https://irclog.perlgeek.de/perl6-dev/2016-10-25#i_13462673
13:54 andrzejku joined #perl6
13:55 moritz IOninja++, jnthn++
13:59 cdg joined #perl6
13:59 mscha OK, so my options are: a) use temporary int variable; b) don't use multi; or c) just use Int instead of int
13:59 rashipi Perl 6 is also fantastic for sysadmin stuff because it's a very good glue language.
13:59 IOninja lolwut
14:00 IOninja mscha: yeah, pretty much
14:01 rashipi It calls C, Perl 5, Python and Shell easily. Can't do that in other languages.
14:03 perlpilot m:  multi foo(int $n) { say 'bar' x $n }; foo(int $ = 42);
14:03 camelia rakudo-moar d232f3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3 foo(int $n) { say 'bar' x $n }; foo(int7⏏5 $ = 42);␤    expecting any of:␤        infix␤        in…»
14:03 perlpilot mscha: it is a shame you can't say foo(42::int) or something to indicate you want an int without a temp var.
14:04 IOninja heh
14:04 IOninja And what about 999999999999999999999999:int?
14:04 IOninja ::int
14:05 perlpilot a compiler error to tell you that you're insane :)
14:07 perlpilot (unless you happen to be running on platform where native ints support that number ;)
14:07 IOninja I don't understand why you invented a whole new syntax just for this one thing.
14:09 nine Our coercers are just plain methods, so it would be 99999999999999999999.int
14:09 jnthn The coercion syntax int(9999) may be the most natural
14:09 jnthn m: int(999)
14:09 camelia rakudo-moar d232f3: OUTPUT: «Cannot invoke this object (REPR: P6int; int)␤  in block <unit> at <tmp> line 1␤␤»
14:10 jnthn Would have to teach the compiler to recognize it of course
14:10 domidumont joined #perl6
14:21 araraloren joined #perl6
14:23 rashipi jnthn: When are you writing a new 6guts post? I'm missing them.
14:23 IOninja And that would just call Int.int, wouldn't it? Can method calls be constant-folded?
14:25 jnthn No, which is why I suggested the coercer syntax
14:25 jnthn rashipi: Already started writing one on the non-blocking await changes; just needs getting around to finishing it
14:26 rashipi jnthn: Noice, I'm looking forward to it.
14:26 jnthn rashipi: Just that it competes for my attention with fixing stuff :)
14:26 domidumont joined #perl6
14:26 IOninja m: m: multi foo(int $n) { say 'bar' x $n }; sub prefix:<n:> (Int:D $n --> int) { my int $z = $n; $z }; foo n:2
14:26 camelia rakudo-moar d232f3: OUTPUT: «Cannot resolve caller foo(Int); none of these signatures match:␤    (int $n)␤  in block <unit> at <tmp> line 1␤␤»
14:26 IOninja Seems can't return an int?
14:27 jnthn Hm, I'd thought we could...
14:27 jnthn At VM level you certainly can :)
14:27 jnthn So if something's in the way of that it'll be in Rakudo
14:39 Cabanossi joined #perl6
14:41 sufrostico joined #perl6
14:41 sufrosti1o joined #perl6
14:43 eroux joined #perl6
14:53 araraloren joined #perl6
14:55 gdonald joined #perl6
14:56 wamba1 joined #perl6
15:02 skids joined #perl6
15:06 ranguard out of interest, any plans (or even if it's possible) for http://webassembly.org/ support :) ?
15:06 * ranguard remembers someone talking about p6 in the browser?
15:09 rashipi ranguard: Here is the last update on rakudo-js: http://blogs.perl.org/users/pawel_murias/2017/02/rakudojs-update---we-passed-a-first-roast-test.html
15:10 ranguard rashipi: nice - thanks
15:10 rashipi np
15:15 sufrostico joined #perl6
15:15 rjbs joined #perl6
15:16 bdmatatu joined #perl6
15:27 mscha m: my int $i = 42; say $i ~~ int; say $i ~~ Int;
15:27 camelia rakudo-moar d232f3: OUTPUT: «False␤True␤»
15:34 cdg joined #perl6
15:39 Cabanossi joined #perl6
15:43 kyan joined #perl6
15:49 bdmatatu joined #perl6
15:51 bdmatatu left #perl6
16:08 [particle] left #perl6
16:09 Cabanossi joined #perl6
16:09 imcsk8 joined #perl6
16:09 [particle] joined #perl6
16:10 eDeniAxlal joined #perl6
16:12 melezhik joined #perl6
16:19 andrzejku joined #perl6
16:29 eroux joined #perl6
16:31 itaipu joined #perl6
16:39 khw joined #perl6
16:42 profan joined #perl6
16:53 rashipi Whedn there's an error in the REPL, it should say <REPL> in the error messages instead of <unknown file>.
16:56 IOninja Well volunteered!
16:59 [Coke] rashipi: most of the REPL code is in Perl 6 and implemented here: https://github.com/rakudo/rakudo/blob/0f37dd38e06153a9e901db28418052fe85841e2b/src/core/REPL.pm
16:59 rashipi Where does it generate the error messages?
17:00 * [Coke] would start at repl-eval and look in there.
17:02 IOninja rashipi: probably in src/core/Exception.pm there's a print-exception routine or something like that
17:03 IOninja oh
17:03 IOninja src/Perl6/Optimizer.nqp:343:            (nqp::isnull($file) ?? '<unknown file>' !! $file),
17:03 IOninja src/Perl6/World.nqp:1098:            $file := '<unknown file>';
17:04 [Coke] I imagine that's covering -e also, though.
17:04 rashipi How can it be determined we are running in the REPL?
17:04 rashipi Does the code set a flag?
17:05 IOninja probably something to do with $?FILE
17:05 Ulti anyone else having build issues on macOS?
17:05 Ulti been that way since before the weekend
17:06 Ulti I nuked to be in a different place of build woes so its possibly something changing in Mac
17:06 Ulti its on the gen moar stage
17:07 IOninja Well, what's the error?
17:07 [Coke] there was a "weird" change to the moarvm build recently. try blowing away your moar src and re-cloning.
17:07 Ulti its readline
17:08 Ulti and awk
17:08 Ulti o___O
17:08 IOninja hm, no idea.
17:08 rashipi Maybe setting $file to '<REPL>' in REPL.new?
17:08 Ulti its on a configure
17:09 Ulti like generating a Makefile is triggering this by the looks of it
17:09 [Coke] I found a new font for us to use on the doc site! (http://minimatype.com/)
17:09 Ulti could be something funky with my homebrew setup
17:09 [Coke] (... kidding)
17:09 [Coke] Ulti: did you try removing the moar src directory yet?
17:09 IOninja m: "foo/bar/ber/bez/../../../foo".IO.resolve.say
17:09 camelia rakudo-moar d232f3: OUTPUT: «"/home/camelia/foo/bar/ber/bez/../../../foo".IO␤»
17:10 IOninja Is it supposed to get rid of all the ../../..?
17:11 Ulti [Coke]: yeah assuming thats what rakudobrew nuke does
17:12 Ulti gawk is literally being changed with my brew --upgrade so fingers crossed its just my env thats lame
17:12 rashipi Is anyone testing the builds in MacOS?
17:12 Ulti me? ;3
17:12 IOninja :)
17:13 Ulti but yeah I am not a vanilla mac person
17:13 rashipi Ulti: From what i understood, the devs don't have the hardware to test it.
17:13 IOninja err
17:13 Ulti well I build near enough daily
17:13 Ulti against head
17:13 IOninja You understood wrong.
17:14 rashipi Sorry for that.
17:15 IOninja Ah, OK, it needn't remove it. "Note that this does *not* collapse x/../y sections into y. This is by design. If /foo on your system is a symlink to /bar/baz, then /foo/../quux is actually /bar/quux, not /quux as a naive ../-removal would give you"
17:15 IOninja rjbs++ # File::Spec I can mooch knowledge off of.
17:16 wamba1 joined #perl6
17:16 IOninja rashipi: I don't have Mac hardware (yet) so *compiler* releases aren't tested on it (yet), but lizmat++ develops on Mac and does several spectests almost daily and stmuk++ I believe also has a Mac and tests Rakudo Star releases on it.
17:17 rashipi Thanks for clearing the misconception.
17:18 timotimo https://travis-ci.org/search/rakudo
17:18 timotimo we build every commit with macs
17:18 IOninja oh, doh. Of course! There's travis :)
17:19 timotimo do we also have rakudo no appveyor for windows tests? or is that only moarvm?
17:19 IOninja We did, but there was some sort of glitch with perl
17:19 * IOninja looks
17:19 timotimo can someone explain to me why searching for rakudo shows me rakudo/rakudo, but when i click on "rakudo" it'll tell me "this is not an active repository and you're not allowed to activate it"?
17:19 timotimo like, it was just there a second ago
17:19 timotimo why are you doing this to me
17:20 IOninja Looks like they were resolved.
17:20 IOninja timotimo: because we're not using master
17:20 timotimo oooooooh
17:20 IOninja Yeah, we got apvoyert: https://ci.appveyor.com/project/moritz/rakudo
17:20 timotimo it does have "default branch" set to "nom", though?
17:20 IOninja Hm, no idea then.
17:21 IOninja But it was that way for ages and I figured it was because of that...
17:21 timotimo but if the fix is just to use "Branches" or "Build History" instead of "Current" ... i can live with that
17:21 [Coke] yes, nom is default.
17:21 timotimo but it's still very annoying :)
17:21 timotimo maybe we should reach out to travis support?
17:21 [Coke] timotimo: what URL are you clicking on that is giving you an error?
17:21 timotimo https://travis-ci.org/rakudo/rakudo
17:23 [Coke] https://github.com/travis-ci/travis-ci/issues/5629
17:24 [Coke] https://github.com/gratipay/gratipay.com/issues/3989
17:25 [Coke] perhaps someone with admin rights on the rakudo/rakudo build on travis's site can click a button to fix it.
17:26 timotimo i don't have the rights, alas
17:26 timotimo but thanks for digging
17:26 [Coke] me either. :)
17:26 [Coke] nor do I see how to add who has rights. (if they're pulling everything from github, hopefully any github admins have rights)
17:33 moritz I've clicked "activate repository"
17:38 Cabanossi joined #perl6
17:40 cdg_ joined #perl6
17:44 robertle joined #perl6
17:54 Ven joined #perl6
18:00 timotimo omg it worked!
18:00 timotimo \o/
18:03 * moritz feels like a monkey who managed to hit the right key on the keyboard
18:09 rashipi moritz: isn't that all we ever do?
18:11 moritz rashipi: sometimes, the monkeys are better trained
18:11 rashipi In the animated sitcom "The Jetsons", they pictured George Jetson working in the most bizarre ocuppation they could imagine: he would push a button all day. Little they know how correct they were.
18:13 Ven joined #perl6
18:14 timotimo imagine if the complete government would be replaced by something based on machine learning, but there'd still have to be people pushing a button all day every day (no screen, no read-outs, no nothing, just a button) because "machines can't be ethical" so "a human has to be part of the process"? :D
18:15 rashipi It seems the US is that way looking from the outside. The State acts on it's own, but there's got to be an ellected button pusher to give it legitimacy.
18:16 * eDeniAxlal presses the button
18:16 DrForr Push the button, Frank.
18:16 timotimo it's time to galvanize!
18:19 cdg joined #perl6
18:25 profan joined #perl6
18:33 eroux joined #perl6
18:34 Ven joined #perl6
18:48 mr-foobar joined #perl6
18:53 Ven joined #perl6
19:02 RabidGravy boo!
19:05 rashipi ????
19:13 Ven joined #perl6
19:24 labster joined #perl6
19:24 agentzh joined #perl6
19:30 * [Coke] wonders how many sixers are going to be caught in this storm in the US
19:31 RabidGravy what storm is that?
19:31 timotimo uh oh, i hadn't heard of that yet
19:32 [Coke] weather channel calls it "Stella"
19:32 * [Coke] is expecting up to about .6m of snow
19:32 DrForr No idea.
19:33 Ven joined #perl6
19:36 timotimo *shrug*, between 0.3m and 1.5m of snow it hardly makes a difference :P
19:40 RabidGravy it was actually a delightful spring day in London
19:40 [Coke] ... said no one ever!
19:41 * [Coke] was going to follow that up with "having never been in London", but I actually was in Heathrow momentarily last year, so whoops.
19:41 RabidGravy shame I spent it in the office
19:43 RabidGravy the fun thing about STOMP is that the message exchange semantics are entirely absent from the spec so you have to implement all the things
19:45 rashipi Why not use HTTP instead?
19:45 sufrostico joined #perl6
19:48 timotimo you could say that for basically any high-level protocol
19:48 * geekosaur trying to walk to store before it hits here
19:48 geekosaur got a few hours yet
19:49 sufrosti1o joined #perl6
19:49 rashipi timotimo: Exactly!
19:49 timotimo ssh? why not http?
19:50 rashipi HTTP 2.0 is a good fit.
19:50 timotimo a little bit, yeah
19:51 RabidGravy I like forward to seeing someones implementation ;-p
19:52 RabidGravy look even
19:52 rashipi Even supports the same authentication method: https://tools.ietf.org/html/rfc6091
19:53 Ven joined #perl6
19:53 RabidGravy but you'd still have to define a Pub/Sub protocol and the messaging semantics
19:53 Cabanossi joined #perl6
19:54 rashipi Yes, none of them go there.
19:54 moritz amqp is pretty detailed
19:55 moritz and yes, it's complicated compared to STOMP
19:57 bjz_ joined #perl6
19:58 cdg joined #perl6
19:59 rashipi amqp does have something going for it that can't be done with HTTP/REST
19:59 moritz and AMQP 0.9 has pretty detailed behavioral specs
19:59 moritz which AMQP 1.0 tossed
20:02 [Coke] is there an easy way to compare the precedence of two operators?
20:02 * lizmat starts on the Perl 6 Weekly
20:02 espadrine joined #perl6
20:04 lizmat m: say &[+].prec<prec> cmp &[*].prec<prec>   # Coke
20:04 camelia rakudo-moar d232f3: OUTPUT: «Less␤»
20:04 lizmat [Coke] ^^^
20:07 TEttinger joined #perl6
20:07 [Coke] lizmat++
20:09 [Coke] so, 1==my $a =3; shows false, but == 's prec is higher than ='s
20:09 [Coke] m: say 1==my $a=3;
20:09 camelia rakudo-moar d232f3: OUTPUT: «False␤»
20:09 [Coke] m: say 1==my $a=1;
20:09 camelia rakudo-moar d232f3: OUTPUT: «True␤»
20:09 [Coke] m: say &infix:<==>.prec<prec> cmp &infix:<=>.prec<prec>
20:09 camelia rakudo-moar d232f3: OUTPUT: «More␤»
20:09 [Coke] (trying to compose a reply to Sean McAfee on perl6-users)
20:09 IOninja m: dd [&infix:<==>.prec<prec>, &infix:<=>.prec<prec> ]
20:10 camelia rakudo-moar d232f3: OUTPUT: «["m=", "e="]␤»
20:10 IOninja m: my $a = 1; say 1== $a =42;
20:10 camelia rakudo-moar d232f3: OUTPUT: «Cannot modify an immutable Bool␤  in block <unit> at <tmp> line 1␤␤»
20:12 Geth ¦ doc: bca510bc51 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod6
20:12 Geth ¦ doc: Remove duplicate mention of ∘
20:12 Geth ¦ doc:
20:12 Geth ¦ doc: Once is enough.
20:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bca510bc51
20:13 Ven joined #perl6
20:13 [Coke] Anyone know what m= and e= mean?
20:13 timotimo these letters are just there because alphabet
20:14 lizmat [Coke]: afaik they have no meaning, just relative weights
20:14 [Coke] m: dd [&infix:<*>, &infix:<+>]
20:14 camelia rakudo-moar d232f3: OUTPUT: «[sub infix:<*> (Mu $?, Mu $?) { #`(Sub+{<anon|53374288>}+{Precedence}|55561456) ... }, sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|53374288>}+{Precedence}|55561296) ... }]␤»
20:15 [Coke] m: dd [&infix:<*>.prec<prec>, &infix:<+>.prec<prec>]
20:15 camelia rakudo-moar d232f3: OUTPUT: «["u=", "t="]␤»
20:15 [Coke] ah, so this all checks out.
20:15 liAealneDx [Coke]: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L3878-L3908
20:16 pecastro joined #perl6
20:17 [Coke] er, wait, if == is higher, is this really being parsed as (1==my $a) = 3 ?
20:17 [Coke] m: (1==my $a) = 3; say $a;
20:17 camelia rakudo-moar d232f3: OUTPUT: «Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤Cannot modify an immutable Bool␤  in block <unit> at <tmp> line 1␤␤»
20:17 [Coke] m: 1==my $a = 3; say $a;
20:17 camelia rakudo-moar d232f3: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "1==my $a = 3" in sink context (line 1)␤3␤»
20:19 RabidGravy moritz, I guess the thing with amqp is that brokers like RabbitMQ will retain the exchange semantic, whereas say ActiveMQ which have always been multi-protocol can have more flexible semantics easier
20:23 RabidGravy I keep meaning to get Net::AMQP to negotiate, but so many yaks
20:23 statisfiable6 joined #perl6
20:23 liAealneDx statisfiable6: libmoar
20:23 statisfiable6 liAealneDx, OK! Working on it…
20:24 statisfiable6 liAealneDx, https://gist.github.com/9e9d11180e161bd4212d309e97a02c11
20:25 liAealneDx oops, no data…
20:25 liAealneDx let's try again :P
20:25 statisfiable6 joined #perl6
20:25 liAealneDx statisfiable6: libmoar
20:25 statisfiable6 liAealneDx, OK! Working on it…
20:26 statisfiable6 liAealneDx, https://gist.github.com/bac10db61919a463cf50820181492fc5
20:27 liAealneDx maybe I shouldn't graph it over rakudo commits, but whatever. This was the fastest way to get it done :P
20:29 [Coke] that looks like a bigger change than it is since the x axis starts at 3-ish.
20:29 [Coke] ... y-axis. whoops
20:29 liAealneDx statisfiable6: libmoar0
20:29 statisfiable6 liAealneDx, OK! Working on it…
20:30 liAealneDx let's start it on y then
20:30 liAealneDx on 0*
20:30 statisfiable6 liAealneDx, https://gist.github.com/609cdca96c23662481cb0d0a31bbb669
20:31 liAealneDx [Coke]: it is a significant change anyway
20:33 Ven joined #perl6
20:35 Geth ¦ whateverable: aa374ae6f3 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Statisfiable.p6
20:35 Geth ¦ whateverable: Slight reworking of Statisfiable
20:35 Geth ¦ whateverable:
20:35 Geth ¦ whateverable: Now statisfiable won't ping out when it is busy. In addition, now it
20:35 Geth ¦ whateverable: should be a bit easier to add new graphs.
20:35 Geth ¦ whateverable:
20:35 Geth ¦ whateverable: Also, implement a graph requested in issue #94. It is needlesly using
20:35 Geth ¦ whateverable: rakudo commits for X steps, but that's not a big deal.
20:35 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/aa374ae6f3
20:42 sufrostico joined #perl6
20:46 sufrosti1o joined #perl6
20:47 gdonald joined #perl6
20:49 sufrostico joined #perl6
20:51 labster joined #perl6
20:53 Ven joined #perl6
20:54 Cabanossi joined #perl6
21:03 pecastro joined #perl6
21:05 Ven joined #perl6
21:11 liAealneDx uhh! Writing emails is hard!
21:13 liAealneDx m: sub infix:<±> { Range.new: $^a - $^b, $a + $b }; say 5 ± 2
21:13 camelia rakudo-moar d232f3: OUTPUT: «3..7␤»
21:14 liAealneDx m: sub infix:<±> { Range.new: $^a - $^b, $a + $b }; say 4 ~~ 5 ± 2
21:14 camelia rakudo-moar d232f3: OUTPUT: «True␤»
21:14 liAealneDx m: sub infix:<±> { Range.new: $^a - $^b, $a + $b }; say 0 ~~ 5 ± 2
21:14 camelia rakudo-moar d232f3: OUTPUT: «False␤»
21:21 itaipu joined #perl6
21:22 grondilu is there a EOF constant and can I use it with a here-document to say everything up to the rest of the file?
21:22 grondilu I know I could do "say q:to/^EOF$/;" and end with a literal 'EOF' but that looks dumb
21:24 RabidGravy Hmm
21:26 jnthn Wasn't there some Pod-y solution for that, like =finish and then $=finish to access it?
21:26 jnthn Pretty sure there's not a way with heredocs, though
21:27 mcmillhj joined #perl6
21:28 IOninja yeah, =finish
21:28 * lizmat concurs
21:30 IOninja .oO( concurrent lizmat... )
21:30 lizmat hehe, multi-processing I'm afraid  :-)
21:35 RabidGravy m: class Foo { }; say Foo.new.WHICH.Str.ords.join("").Int.base(16)
21:35 camelia rakudo-moar d232f3: OUTPUT: «243F20D7F906232F367A16E␤»
21:36 RabidGravy is that too dumb for getting a fairly amonymous unique id?
21:37 jnthn For what lifetime?
21:37 jnthn Or what usage?
21:37 RabidGravy for the lifetime of the program
21:37 jnthn Will the object's lifetime be shorter?
21:38 jnthn The .WHICH contains a memory address, and we allocate memory in pools
21:38 jnthn Fixed size buckets, essentially
21:38 RabidGravy well, it's actually a cheating-arse way of creating outbound stomp messages message-id
21:38 moritz m: say (class { }).WHERE
21:38 camelia rakudo-moar d232f3: OUTPUT: «140004429043048␤»
21:38 jnthn So there's a reasonable chance it'll get re-used for a future message
21:39 jnthn If they just need to be unique within the process, then can you not just use Concurrent::Iterator?
21:39 perlpilot RabidGravy: https://github.com/retupmoca/P6-UUID   ;-)
21:39 RabidGravy well Ideally it would be universally unique
21:39 jnthn And my $id-source = concurrent-iterator(100000..*); $id-source.pull-one to get another one
21:39 jnthn Oh
21:39 jnthn Then maybe use a UUID moudle :)
21:40 jnthn *module
21:40 RabidGravy yeah, I was just being lazy :)
21:41 RabidGravy maybe add it to the inbound message
21:41 IOninja RabidGravy: FWIW .join("") is same as .join
21:42 dct joined #perl6
21:46 adu joined #perl6
21:50 adu joined #perl6
21:50 RabidGravy jnthn, anyhow I may imminently in a position to make Stomp::Server actually be y'know a server :)
21:51 RabidGravy it's a bit meh at the moment but nothing a good refactor can't sort out
21:54 jnthn :-)
21:54 jnthn Cool
21:54 jnthn Meanwhile I've a new little module to add to the ecosystem tomorrow
21:54 jnthn But for now, time to rest :)
21:57 zakharyas joined #perl6
21:57 moritz good idea
21:59 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/03/13/2017-11-tidy-da-tags/
22:04 kyan joined #perl6
22:05 IOninja lizmat++ good weekly
22:06 LeCamarade joined #perl6
22:10 liAealneDx NeuralAnomaly: status
22:10 NeuralAnomaly liAealneDx, [✘] Next release will be in 4 days and 6 hours. Since last release, there are 57 new still-open tickets (19 unreviewed and 0 blockers) and 76 unreviewed commits. See http://perl6.fail/release/stats for details
22:11 tramdas joined #perl6
22:11 tramdas how to use a suspend statement in perl6?
22:12 liAealneDx lizmat++
22:12 liAealneDx tramdas: suspend?
22:13 tramdas yes...i want suspend the current task
22:15 mcmillhj joined #perl6
22:18 liAealneDx tramdas: I guess someone smarter than me will be able to answer your question (eventually) :) That being said, I can give you some ideas, but for that I'd have to know what problem you're trying to solve.
22:18 liAealneDx huggable: xy
22:18 huggable liAealneDx, nothing found
22:18 liAealneDx huggable: xy problem
22:18 huggable liAealneDx, 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.
22:22 sufrostico joined #perl6
22:23 sufrosti1o joined #perl6
22:23 geekosaur what is a task, here?
22:24 mcmillhj joined #perl6
22:24 geekosaur also is this actually suspend as in yield the cpu, or suspend as in produce a partial result?
22:29 tramdas suspend as in partial result...say a condition is not matched then i need to suspend the current task
22:30 hobbs joined #perl6
22:33 Todd joined #perl6
22:34 Todd Hi All.  Question on matching.  Can I preassign variable names like I can in "for" loops?  something like
22:34 Todd perl6 -e 'my $x="ab12cd"; $x -> $a, $b, $c ~~ m/(ab)(12)(cd)/; say "$x\n\$0=<$0>\t\$1=<$1>\t\$2=<$2>\n";'
22:36 liAealneDx $<x>=ab
22:36 IOninja $x ~~ /$<a>=(ab) $<b>=(12) $<c>=(cd)/; say "$x\n$<a>\n$<b>\n$<c>"
22:36 liAealneDx ummm… you probably want [] in this case ↑
22:37 rindolf Todd: hi! Are you ToddAndMargo from the perl6-users list?
22:39 Cabanossi joined #perl6
22:39 Todd The very same!
22:39 samcv hello Todd
22:40 Todd I am putting together a note on the various ways to use matching.  The last part is using different variable names other than $0, $1 etc..
22:40 IOninja don't matter. It doesn't set $0
22:40 liAealneDx m: "ab12cd" ~~ m/$<a>=[ab] $<b>=[12] $<c>=[cd]/; say $<a>; say $<c>
22:40 camelia rakudo-moar d232f3: OUTPUT: «「ab」␤「cd」␤»
22:41 IOninja m: 'abc' ~~ /$<foo>=(.+)/; say $/[0]; say $<foo>
22:41 camelia rakudo-moar d232f3: OUTPUT: «Nil␤「abc」␤»
22:41 liAealneDx hm
22:41 IOninja tramdas: whyyyy are you messaging me?
22:42 tramdas is there something like a 'suspend' statement in perl6 so i can stop the current task
22:42 IOninja jesus
22:42 liAealneDx :S
22:42 rindolf Todd: ah, I see - I am Shlomi Fish
22:43 IOninja tramdas: no one knows what you're talking about. Try using words other than "suspend statement" instead of messaging people and repeating yourself.
22:43 IOninja m: "ab12cd" ~~ m/$<a>=ab $<b>=12 $<c>=cd/; say $<a>; say $<c>
22:43 camelia rakudo-moar d232f3: OUTPUT: «「a」␤「c」␤»
22:43 IOninja Don't need anything really ^
22:43 liAealneDx ouch
22:43 liAealneDx no
22:43 IOninja :)
22:43 tramdas need an unconditional release
22:43 liAealneDx well, unless you really meant just ‘a’ to be captured
22:44 sufrostico joined #perl6
22:44 sufrosti1o joined #perl6
22:44 liAealneDx IOninja: interesting… I remember there was some case where you had to use [] instead of (), but cannot remember now
22:44 liAealneDx (or otherwise it would capture it in $0 unnecessarily)
22:45 tramdas now u get it?
22:45 liAealneDx hmm this one is interesting
22:45 liAealneDx m: "abab12cd" ~~ m/$<a>=[ab]+ $<b>=(12) $<c>=(cd)/; say $/
22:45 camelia rakudo-moar d232f3: OUTPUT: «「abab12cd」␤ a => 「abab」␤ b => 「12」␤ c => 「cd」␤»
22:45 IOninja tramdas: no
22:45 liAealneDx m: "abab12cd" ~~ m/$<a>=(ab)+ $<b>=(12) $<c>=(cd)/; say $/
22:45 camelia rakudo-moar d232f3: OUTPUT: «「abab12cd」␤ a => 「ab」␤ a => 「ab」␤ b => 「12」␤ c => 「cd」␤»
22:45 Voldenet joined #perl6
22:45 Voldenet joined #perl6
22:46 liAealneDx IOninja: ↑ weird, right?
22:46 IOninja nope.
22:46 liAealneDx okay :D
22:46 IOninja In the second case the + is outside the capture, while in the first case it's part of it
22:47 liAealneDx :O
22:47 liAealneDx well, that's far from being obvious… but okay
22:47 Todd perl6 -e 'my $x="ab12cd"; $x ~~ m/$<a>=(ab)+ $<b>=(12)+ $<c>=(cd)/; say "$x\n\$0=<$0>\t\$1=<$1>\t\$2=<$2>\n";'
22:47 Todd I am missing something
22:47 IOninja lol, and he copied the one with the issue
22:48 liAealneDx Todd: no +
22:48 Todd perl6 -e 'my $x="ab12cd"; $x ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say "$x\n\$0=<$0>\t\$1=<$1>\t\$2=<$2>\n";'
22:48 IOninja Todd: you're using wrong variables
22:48 Todd no joy
22:49 IOninja Where do you see <$0> in my answer to you?
22:49 Todd mumble, mumble (copy and paste!)
22:50 Todd Variable '$a' is not declared   where do I put the "my"?
22:52 BenGoldberg joined #perl6
22:52 IOninja You can't be serious, Todd.
22:53 IOninja night all. \o
22:53 BenGoldberg Hello, good evening ;)
22:53 Todd Yes I am.  In loop "for @Array -> $line" there is no "my"
22:54 BenGoldberg m: for ^3 -> my $line { .say }
22:54 camelia rakudo-moar d232f3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'my' in parameter declaration.␤at <tmp>:1␤------> 3for ^3 -> my7⏏5 $line { .say }␤»
22:54 liAealneDx Todd: just using $<a>=(ab) will declare it, kind of
22:55 Todd changed to
22:55 Todd perl6 -e 'my $a; my $b; my $c; my $x="ab12cd"; $x ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say "$x\n\$a=<$a>\t\$b=<$b>\t\$c=<$c>\n";'
22:55 Todd and am getting "Use of uninitialized value $a of type Any in string context."
22:55 geekosaur because it's $<a> etc,
22:56 geekosaur which expands to $/<a> same as $0 expands to $/[0]
22:56 Todd what do you mean?
22:56 geekosaur you have <$a> and friends in your say
22:56 geekosaur they need to be <$<a>> etc.
22:56 geekosaur it is $<a> NOT $a
22:56 liAealneDx look…
22:56 liAealneDx m: my $x="ab12cd"; $x ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say "$x\n\$a=$<a>\t\$b=$<b>\t\$c=$<c>"
22:56 camelia rakudo-moar d232f3: OUTPUT: «ab12cd␤$a=ab       $b=12   $c=cd␤»
22:57 liAealneDx Todd: here ↑
22:57 Todd perl6 -e 'my $a; my $b; my $c; my $x="ab12cd"; $x ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say "$x\n\$a=<$<a>>\t\$b=<$<b>>\t\$c=<$<c>>\n";' ab12cd $a=<ab>$b=<12>$c=<cd>
22:57 Todd that worked
22:58 liAealneDx :-|
22:58 Todd Is there a way to get "$a" without the "<>"?
22:58 geekosaur not without reaassigning it
22:58 liAealneDx Todd: you don't need “my $a; my $b; my $c;” there…
22:58 Todd I just noticed
22:58 geekosaur match results always go into $/
22:59 BenGoldberg m: 'av12cd' ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say $<a>;
22:59 camelia rakudo-moar d232f3: OUTPUT: «Nil␤»
22:59 geekosaur (although I think you can capture the result instead, it's still *shaped* like $/)
22:59 BenGoldberg m: 'ab12cd' ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say $<a>;
22:59 camelia rakudo-moar d232f3: OUTPUT: «「ab」␤»
22:59 geekosaur and $<a> is a reference into $/
22:59 BenGoldberg m: my $result = 'ab12cd' ~~ m/$<a>=(ab) $<b>=(12) $<c>=(cd)/; say $result<a>;
22:59 camelia rakudo-moar d232f3: OUTPUT: «「ab」␤»
23:00 geekosaur this is necessary because you can match multiple times etc. $/ will keep those multiple matches straight. what happens if you were to somehow assign into an external variable $a?
23:01 Todd Inquiring minds want to know!
23:01 labster joined #perl6
23:02 geekosaur in otherr worse, you expect us to solve that one for you? I can think of several alternatives, none of which is sufficient for all cases
23:02 grondilu_ joined #perl6
23:02 geekosaur $/ handles all such cases in a rational way
23:02 geekosaur it doesn't require reading the mind of the user
23:04 Todd I am not sue what you are getting at.  I was curious how to assign to an external variable.  I already wrote down the $<a> method in my note
23:05 Todd sure not sue
23:05 geekosaur and my answser was "you don't" and an example of why
23:05 geekosaur your response seems to be "of course you do, so how?"
23:06 Todd Well, that solves it.  And don't forget I think you guys know all and see all.
23:07 Todd Thank you guys for the help!  I will post my notes over on the mailing list.  (I do come up with some weird one, don't I!)
23:08 Cabanossi joined #perl6
23:09 Todd bye bye, till I hit my head on a wall again
23:11 geekosaur and I should probably stop trying to answer questions; dopamine storm = no patience to speak of :(
23:11 b2gills $<a> is short for $/{ qw' a ' }
23:11 lucs I've had some success with the following, not quite sure how to understand it though:
23:11 geekosaur (among other things)
23:11 lucs m: my ($a, $b) = @('as12df 345' ~~ / (\d+) .*? (\d+) /); print "$a $b"
23:11 camelia rakudo-moar d232f3: OUTPUT: «12 345»
23:12 geekosaur you're deconstructing the $/ - shaped thing that a smartmatch produces
23:12 b2gills m: $/ = { a => 1, b =>2 };   say     $<  a  b  >
23:12 camelia rakudo-moar d232f3: OUTPUT: «(1 2)␤»
23:12 geekosaur there's should be some documentation for it somewhere
23:44 adu joined #perl6
23:52 samcv this is an insane patent https://www.google.com/patents/US20040230959 in 2004...
23:52 samcv how can you even patent that
23:53 geekosaur uspto doesn't even care these days
23:53 samcv quick guys lets patent all our operatorssss
23:53 geekosaur you can patent anything and it's up to everyone else to challenge it in court
23:53 samcv then sue MS if they decode to steal them!
23:53 samcv s/decode/try
23:53 geekosaur which basically enables barefaced theft by corporations
23:53 Cabanossi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo