Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-10-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 releasable6 joined #perl6
00:22 cdg joined #perl6
00:32 mcmillhj joined #perl6
00:39 Xal joined #perl6
00:48 mcmillhj joined #perl6
00:54 Herby__ joined #perl6
00:56 cdg joined #perl6
01:00 AlexDaniel- glue? huh?
01:00 AlexDaniel- pilne: I don't think the answer is correct. I'm really confused now
01:01 AlexDaniel- what do you guys mean by glue?
01:02 pilne is nativecall intended to help with "hotspots" by leveraging the (usually) higher performance "c" can offer, or is it meant to just allow the functionality that the c-code provides? FFI isn't always blazing fast (:
01:03 AlexDaniel- FFI may not be as fast, but the stuff that you're running is as fast as it can get
01:03 AlexDaniel- at least that's how I understand it
01:03 AlexDaniel- so yes, you can rewrite a chunk of your code that's otherwise slow in C and then use that from nativecall
01:04 AlexDaniel- and as long as you're not doing too many calls through nativecall, it should really speed things up for you
01:04 AlexDaniel- s/from nativecall/through nativecall/
01:04 mcmillhj joined #perl6
01:08 geekosaur pilne, that was what I meant when I said glue
01:08 pilne gotcha
01:08 geekosaur generally when we are dealing with hotspots we use nqp instead of perl 6, because C has no reasonable way to deal with MOP, or undefined, or ...
01:09 geekosaur you *could* hypothetically deal with a hotspot that way, but you lose so much that you might as well just have written in C to start with
01:10 AlexDaniel- not just hypothethically. If you're crunching numbers then it's a reasonable way to go
01:11 pilne true, and i'm guessing that if i can get my brain around perl6 i could theoretically learn nqp as well
01:13 geekosaur you can think of perl 6 as a lot of sugar for nqp ('not quite perl6').
01:13 geekosaur it forces you do handle a lot of things yourself, but is still much more perl 6 than C or etc.
01:14 pilne does that go as deep down the rabbit hole as "everything is a function that is sugaring various twisted depths of the lambda calculus" that haskell is? (:
01:14 geekosaur *to handle
01:15 geekosaur mm. there are some similarities, but it's not lambda calculus. it has a vastly simplified object system, for example
01:15 pilne whew, i stand a fighting chance (:
01:16 pilne haskell, and advanced macro-ing magiks in lisps are the two things i'm yet to say i'm able to confidently understand.
01:16 geekosaur like, anything involving the meta-object protocol is not present at nqp level; it's part of the perl 6 sugar on top
01:40 llfourn joined #perl6
01:40 finanalyst joined #perl6
01:40 finanalyst l6
01:42 bitrauser_ joined #perl6
01:54 finanalyst Hi. I'm trying to run the Linux command uuidgen 10x and get the result into an array.
01:54 AlexDaniel- finanalyst: alright. What have you tried so far?
01:54 finanalyst tried my $i=shell 'for i in {1..10}; do uuidgen; done' but get '{1..10}'
01:54 finanalyst if my $i=shell 'for i in 1 2 3 4 5 ; do uuidgen; done', I get a list of 10 uuid
01:54 bmurphy1976 joined #perl6
01:54 AlexDaniel- finanalyst: ok, what about something like this
01:54 finanalyst sorry, not all there. my $i=shell 'for i in 1 2 3 4; do uuidgen; done', :out; for $i.out.lines { .say }
01:55 ilbot3 joined #perl6
01:55 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 geekosaur I don't see a version that only word splits before interpolation
01:58 bmurphy1976 Thanks.  I had no luck finding it either hence why I popped in here to see if I had missed something obvious
01:58 bmurphy1976 I can live with the quotes.  It's not like bash is any better ;)
02:07 AlexDaniel- uhhh…
02:07 cdg joined #perl6
02:08 AlexDaniel- .tell bmurphy1976 I recommend not to use «» anywhere. If it happens that you forget the quotes, then you're screwed during run time. But if you split stuff yourself there's no possibility that it will go wrong
02:08 yoleaux AlexDaniel-: I'll pass your message to bmurphy1976.
02:08 AlexDaniel- .tell bmurphy1976 also, if your example above you're missing -- between your command and your file arguments
02:08 yoleaux AlexDaniel-: I'll pass your message to bmurphy1976.
02:10 AlexDaniel- .tell bmurphy1976 otherwise it won't work with filenames starting with “-”. In other words, all shell pitfalls apply. … and if so, why make your life harder by bringing in this idiotic quoting from shells?
02:10 yoleaux AlexDaniel-: I'll pass your message to bmurphy1976.
02:19 a3r0 joined #perl6
02:24 cdg joined #perl6
02:35 noganex joined #perl6
02:39 ufobat_ joined #perl6
02:55 mcmillhj joined #perl6
03:07 ChoHag joined #perl6
03:09 teatime Are there any valid codepoints that, encoded standalone (in a one-codepoint-long string), would not make a valid unicode string?
03:10 TEttinger 0xffff
03:11 TEttinger dunno if that's a valid codepoint, but probably not
03:11 TEttinger maybe a surrogate
03:20 wamba joined #perl6
03:20 Herby_ left #perl6
03:22 piojo joined #perl6
03:25 teatime TEttinger: I'm not sure precisely which category 0xFFFF fits into... but yes, that is an example of an illegal/invalid character.
03:25 teatime and the very last codepoint in the BMP, so if you only wanna search the BMP, use it as your top value
03:25 teatime a useful optimization, but you are then exluding valid existing unicode codepoints in the supplementary planes
03:34 atroxape_ joined #perl6
03:37 atroxape_ left #perl6
03:38 atroxape_ joined #perl6
03:38 atroxape_ left #perl6
03:39 atroxaper joined #perl6
03:41 mcmillhj joined #perl6
03:44 azawawi joined #perl6
03:44 azawawi hi
03:45 Cabanoss- joined #perl6
03:47 azawawi https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md   # Seems like the direction Atom is taking with future language integrations (autocomplete, find definitions, warning/error diagnostics, ..etc)
03:52 teatime did I seriously just say that in #perl6
03:53 teatime .tell TEttinger my appologies, I was confused and thought you answered the question in #ruby that led me to ask my question here.  sorry :)
03:53 yoleaux teatime: I'll pass your message to TEttinger.
03:54 TEttinger oh heh
03:54 yoleaux 03:53Z <teatime> TEttinger: my appologies, I was confused and thought you answered the question in #ruby that led me to ask my question here.  sorry :)
03:54 TEttinger I'm uh not in #ruby
03:59 AlexDaniel- teatime: define “valid unicode string”
04:02 teatime AlexDaniel-: yeah, that was a sub-question, is there such a thing.  but if not, is there a def. of "valid grapheme cluster"?>
04:03 teatime was just curious, I can read the specs for sure
04:04 darkmorph joined #perl6
04:04 ch3ck3r joined #perl6
04:08 AlexDaniel- teatime: well, not really. You can create a string with any code point actually
04:08 AlexDaniel- teatime: *but* it does not mean that you can encode it as valid utf-8
04:08 AlexDaniel- for example
04:08 AlexDaniel- m: my $x = “\xD800” # by itself it's alright
04:08 camelia rakudo-moar 4b8a0e: ( no output )
04:08 dj_goku joined #perl6
04:08 dj_goku joined #perl6
04:08 AlexDaniel- m: my $x = “\xD800”; $x.encode # but this is not ok
04:08 camelia rakudo-moar 4b8a0e: OUTPUT: «Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55296 (0xD800)␤  in block <unit> at <tmp> line 1␤␤»
04:08 AlexDaniel- and therefore you can't print it also
04:09 AlexDaniel- m: my $x = “\xD800”; say $x.uniname # but this is not ok
04:09 camelia rakudo-moar 4b8a0e: OUTPUT: «<Non Private Use High Surrogate-D800>␤»
04:09 AlexDaniel- teatime: another limit you may be interested to know about is the amount of codepoints in a grapheme
04:10 AlexDaniel- technically, you can have as many as you want to, but rakudo has an arbitrary limit
04:10 AlexDaniel- which is around 1024 or something like that
04:11 AlexDaniel- m: my $x = “\x0303” x 1030;
04:11 camelia rakudo-moar 4b8a0e: OUTPUT: «Too many codepoints (1030) in grapheme␤  in block <unit> at <tmp> line 1␤␤»
04:11 AlexDaniel- m: my $x = “\x0303” x 1024;
04:11 camelia rakudo-moar 4b8a0e: OUTPUT: «Too many codepoints (1024) in grapheme␤  in block <unit> at <tmp> line 1␤␤»
04:11 AlexDaniel- m: my $x = “\x0303” x 1023;
04:11 camelia rakudo-moar 4b8a0e: ( no output )
04:11 AlexDaniel- ya
04:12 AlexDaniel- teatime: that's all I know. Maybe samcv will be able to tell you about some other interesting facts
04:13 AlexDaniel- teatime: now, if you're thinking that you can store stuff in base 0x10FFFF, then you're correct, with some exceptions however
04:14 AlexDaniel- one is stuff that you can't store in utf-8 of course, and another is normalization
04:14 thou joined #perl6
04:14 AlexDaniel- so rakudo is free to reorder stuff and swap code points according to unicode rules, so you can't really roundtrip arbitrary things
04:15 AlexDaniel- but that's explained here https://docs.perl6.org/language/traps#All_Text_is_Normalized_By_Default
04:15 AlexDaniel- and UTF8-C8 is something you may want to know about
04:20 AlexDaniel- teatime: speaking of valid/invalid strings, another limit comes to mind
04:20 AlexDaniel- m: my $x = ‘x’ x 4294967295
04:20 camelia rakudo-moar 4b8a0e: ( no output )
04:20 AlexDaniel- m: my $x = ‘x’ x 4294967296
04:20 camelia rakudo-moar 4b8a0e: OUTPUT: «Repeat count (4294967296) cannot be greater than max allowed number of graphemes 4294967295␤  in block <unit> at <tmp> line 1␤␤»
04:21 AlexDaniel- so if you want to store a 10GB string, you just can't
04:21 AlexDaniel- or you can… depending on what encoding we're talking about :)
04:21 AlexDaniel- and what characters you have there
04:22 AlexDaniel- codepoints rather
04:22 AlexDaniel- anyway o/
04:39 skids joined #perl6
04:43 aborazmeh joined #perl6
04:43 aborazmeh joined #perl6
04:43 xtreak joined #perl6
04:43 cdg joined #perl6
04:51 samcv hello
04:51 samcv hi teatime
05:19 wamba joined #perl6
05:25 cdg joined #perl6
05:32 patrickz joined #perl6
05:46 cdg joined #perl6
06:06 domidumont joined #perl6
06:07 domidumont joined #perl6
06:14 AlexDaniel- joined #perl6
06:25 lowbro joined #perl6
06:25 lowbro joined #perl6
06:43 xtreak_ joined #perl6
06:51 wamba joined #perl6
06:54 xtreak joined #perl6
07:06 HoboWithAShotgun joined #perl6
07:11 darutoko joined #perl6
07:12 xtreak_ joined #perl6
07:13 xtreak joined #perl6
07:29 leont joined #perl6
07:31 dakkar joined #perl6
07:33 cdg joined #perl6
07:41 |oLa| joined #perl6
07:48 zakharyas joined #perl6
07:53 sproctor joined #perl6
07:59 wamba joined #perl6
08:10 jeromelanteri joined #perl6
08:13 rba joined #perl6
08:14 xtreak joined #perl6
08:16 xtreak joined #perl6
08:19 HoboWithAShotgun m: say sqrt(2) * sqrt(2) == 2
08:19 camelia rakudo-moar 4b8a0e: OUTPUT: «False␤»
08:19 HoboWithAShotgun m: say sqrt(2) * sqrt(2) =~= 2
08:19 camelia rakudo-moar 4b8a0e: OUTPUT: «True␤»
08:19 HoboWithAShotgun m: say ( sqrt(2) * sqrt(2) ).Rat == 2
08:19 camelia rakudo-moar 4b8a0e: OUTPUT: «True␤»
08:20 HoboWithAShotgun m: say 2**0.5 * 2**0.5 == 2
08:20 camelia rakudo-moar 4b8a0e: OUTPUT: «False␤»
08:20 eater m: say (sqrt(2) * sqrt(2))
08:20 camelia rakudo-moar 4b8a0e: OUTPUT: «2␤»
08:20 eater m: say (sqrt(2) * sqrt(2)) == 2
08:20 camelia rakudo-moar 4b8a0e: OUTPUT: «False␤»
08:20 eater :D
08:21 eater wat
08:21 timotimo m: say (sqrt(2) * sqrt(2)) - 2
08:21 camelia rakudo-moar 4b8a0e: OUTPUT: «4.44089209850063e-16␤»
08:21 timotimo m: say (sqrt(2) * sqrt(2)) eq 2
08:21 camelia rakudo-moar 4b8a0e: OUTPUT: «True␤»
08:21 eater m: say (sqrt(2) * sqrt(2)).nude
08:21 camelia rakudo-moar 4b8a0e: OUTPUT: «No such method 'nude' for invocant of type 'Num'. Did you mean any of these?␤    none␤    note␤␤  in block <unit> at <tmp> line 1␤␤»
08:21 eater oh
08:21 eater it's not a Rat
08:21 timotimo yeah
08:21 timotimo we don't have rat-giving trig either
08:22 eater why doesn't sqrt return a Rat?
08:22 eater m: say sqrt(2).Rat * sqrt(2).Rat
08:22 camelia rakudo-moar 4b8a0e: OUTPUT: «1.9999990␤»
08:22 eater :D
08:24 HoboWithAShotgun well, it's a crux. you can define pi as some large rational, but then you end up having rounding errors elsewhere
08:24 timotimo m: say pi.^name
08:24 camelia rakudo-moar 4b8a0e: OUTPUT: «Num␤»
08:24 HoboWithAShotgun like angles in a triangle not addding up to 180°
08:24 timotimo m: say pi.Rat(0.0000001).nude
08:24 camelia rakudo-moar 4b8a0e: OUTPUT: «(103993 33102)␤»
08:25 timotimo m: say pi.Rat(0.001).nude
08:25 camelia rakudo-moar 4b8a0e: OUTPUT: «(333 106)␤»
08:25 timotimo m: say pi.Rat(0.1).nude
08:25 camelia rakudo-moar 4b8a0e: OUTPUT: «(22 7)␤»
08:59 abraxxa joined #perl6
09:15 mcmillhj joined #perl6
09:16 kybr joined #perl6
09:20 xtreak joined #perl6
09:22 margeas joined #perl6
09:23 aborazmeh joined #perl6
09:23 aborazmeh joined #perl6
09:23 leont joined #perl6
09:27 vivus-ignis joined #perl6
09:27 rgrau joined #perl6
09:29 wamba joined #perl6
09:30 jonas1 joined #perl6
09:31 mcmillhj joined #perl6
09:50 domidumont joined #perl6
09:56 zakharyas joined #perl6
10:03 astj joined #perl6
10:04 astj joined #perl6
10:09 ShalokShalom joined #perl6
10:11 llfourn joined #perl6
10:22 sproctor joined #perl6
10:24 cdg joined #perl6
10:33 HoboWithAShotgun how do i tell wether &($handler) contains something callable?
10:33 HoboWithAShotgun &($handler).defined seems to be always true
10:34 xtreak joined #perl6
10:36 moritz $handler ~~ Callable
10:41 traxex joined #perl6
10:41 HoboWithAShotgun m: class c { has $.handler; }; my $m = c.new.^methods.first({ .name ~~ "handler" }); $m.defined.say
10:41 camelia rakudo-moar 4b8a0e: OUTPUT: «True␤»
10:41 HoboWithAShotgun there. how do i test wether $m contains something i can call
10:43 robertle joined #perl6
10:44 kerframil joined #perl6
10:45 moritz if first() doesn't find a method, it'll return something undefined
10:45 moritz so $m.defined seems like a good test to me
10:45 moritz (and .^methods should only ever return callable stuff)
10:45 moritz m: class c { has $.handler; }; my $m = c.new.^methods.first({ .name ~~ "mishandler" }); $m.defined.say
10:45 camelia rakudo-moar 4b8a0e: OUTPUT: «False␤»
10:46 HoboWithAShotgun but the handler method is always there
10:47 HoboWithAShotgun question is wether the attribute the methode refers to has a value
10:47 moritz well, you need to call it to get to the attribute
10:47 HoboWithAShotgun yeah
10:48 HoboWithAShotgun i just realized that too
10:48 moritz m: class c { has $.handler; }; my $o = c.new; my $m = $o.^methods.first({ .name ~~ "handler" }); say $m($o) ~~ Callable
10:48 camelia rakudo-moar 4b8a0e: OUTPUT: «False␤»
10:48 moritz m: class c { has $.handler; }; my $o = c.new(handler => sub () {} ); my $m = $o.^methods.first({ .name ~~ "handler" }); say $m($o) ~~ Callable
10:48 camelia rakudo-moar 4b8a0e: OUTPUT: «True␤»
10:49 moritz btw call by name is easier this way:
10:49 moritz m: class c { has $.handler; }; my $o = c.new(handler => sub () {} ); say $o."handler"() ~~ Callable
10:49 camelia rakudo-moar 4b8a0e: OUTPUT: «True␤»
10:57 tyil melezhik: hi
10:58 melezhik tyil: hi :)
10:58 yoleaux 10 Oct 2017 17:58Z <tyil> melezhik: nice article on sparrowdo, I might check it out when I have time to spare
10:58 tyil ^ I am doing that, as you may have noticed
10:58 melezhik ok, thanks!
10:58 tyil I have tried to clean up the code in the bootstrap script, travis is currently taking a look at it
10:58 melezhik sure, I have already noticed you made a fork ...
10:59 tyil I want to be clear on this that I only tested it on my funtoo laptop
10:59 tyil not on any other target
10:59 melezhik yeah, I see
11:00 tyil wouldnt want to break it for everyone but me :<
11:00 melezhik yeah, anyway I will review once you make a MR ...
11:01 tyil alright
11:01 tyil thanks for the support so far, hope I can help you back a little as well
11:01 tyil .hug melezhik
11:01 * huggable hugs melezhik
11:03 lowbro joined #perl6
11:03 lowbro joined #perl6
11:04 melezhik tyil: a quick examination of your fork gives me a sense that you're better in bash/sh programming then me ((: , but of course I will check thoroughly
11:04 melezhik tyil: see ya
11:05 tyil ttyl :>
11:10 pmurias joined #perl6
11:25 rindolf joined #perl6
11:25 * pmurias starts working on NativeCall for the js backend
11:26 mst I am faintly terrified by that statement, and I meant that as a compliment.
11:28 okl joined #perl6
11:33 Geth ¦ ecosystem: a21fe95eca | (Jarkko Haapalainen)++ (committed using GitHub Web editor) | META.list
11:33 Geth ¦ ecosystem: Add CommandLine::Usage
11:33 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/a21fe95eca
11:35 HoboWithAShotgun is there something akin to a method container? something you can add callables to and when you call it, all contained get called with the same arguments
11:35 HoboWithAShotgun like what c# does, someclass.someevent += handler
11:51 moritz iirc jnthn++ developed an AOP-inspired meta class for a talk once that did similar things
11:51 moritz but my memory is blurred, don't know where to find it
11:53 Geth ¦ doc: b5437dc762 | (Will "Coke" Coleda)++ | doc/Type/Signature.pod6
11:53 Geth ¦ doc: Fix signature typo, can't have two invocants
11:53 Geth ¦ doc:
11:53 Geth ¦ doc: Found by running xt tests.
11:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b5437dc762
11:53 synopsebot Link: https://doc.perl6.org/type/Signature
11:53 Geth ¦ doc: e7b5321d08 | (Will "Coke" Coleda)++ | xt/words.pws
11:53 Geth ¦ doc: learn new exception type
11:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e7b5321d08
11:54 xtreak joined #perl6
12:00 zakharyas joined #perl6
12:01 zakharyas1 joined #perl6
12:18 traxex joined #perl6
12:19 smonff joined #perl6
12:20 buggable joined #perl6
12:21 smonff left #perl6
12:21 smonff joined #perl6
12:25 buggable joined #perl6
12:26 eliasr joined #perl6
12:26 buggable joined #perl6
12:30 buggable joined #perl6
12:31 buggable joined #perl6
12:32 releasable6 joined #perl6
12:33 buggable joined #perl6
12:34 buggable joined #perl6
12:36 traxex joined #perl6
12:43 quotable6 joined #perl6
12:48 mson joined #perl6
12:52 wamba joined #perl6
12:53 mcmillhj joined #perl6
12:54 flatwhite joined #perl6
12:56 Geth ¦ doc: 52863626db | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
12:56 Geth ¦ doc: Remove useless "note that"
12:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/52863626db
12:56 synopsebot Link: https://doc.perl6.org/language/operators
13:05 harrison joined #perl6
13:08 cdg joined #perl6
13:16 cdg_ joined #perl6
13:20 Geth ¦ doc: cdf2a42039 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
13:20 synopsebot Link: https://doc.perl6.org/language/operators
13:20 Geth ¦ doc: Document `temp`'s behaviour with delayed reads
13:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cdf2a42039
13:22 cpage_ joined #perl6
13:22 void1 joined #perl6
13:24 borisd joined #perl6
13:24 borisd hello, i'm looking for nine , are you here?
13:25 traxex joined #perl6
13:26 jnthn borisd: On vacation, iirc
13:26 borisd jnthn: ok, thx... does he read his cpan-mail?
13:27 borisd i guess so, right? :-P
13:28 jnthn No idea, but I'd guess so. Though if I was on vacation I'm not sure I'd be spending it reading mine ;-)
13:40 wamba joined #perl6
13:42 ShalokShalom joined #perl6
13:47 smonff joined #perl6
13:49 Brumbazz joined #perl6
13:50 Cabanossi joined #perl6
13:54 Brumbazz Hi, I'm trying to get the following perl6 code to work, but I have no clue what I'm duing wrong..  https://pastebin.com/aP5FAuBJ I want to evaluate the regex expression in the variable $str.  I then want to capture the word "THIS" such that I can print it out if the regex matches. Thanks in advance :)
14:00 thunktone joined #perl6
14:01 moritz Brumbazz: you can't add captures in <{...}>
14:01 moritz Brumbazz: a workaround is to assign the <{...}> construct itself to a capture
14:01 moritz m: my $str = '\'Who is \'(.*?)\?'; if "Who is THIS?" ~~ / $<who>=<{$str}> / { print "match ! $<who>[0]"; }
14:01 camelia rakudo-moar 4b8a0e: OUTPUT: «match ! THIS»
14:01 moritz ... and yet another regex detail I didn't cover in my book
14:02 Brumbazz moritz:  Thanks a lot :)
14:02 Brumbazz Do you have a link to your book ?
14:03 moritz Brumbazz: https://www.amazon.com/Parsing-Perl-Regexes-Grammars-Recursive/dp/1484232275
14:03 moritz not yet published though (in production phase right now)
14:03 borisd Hey moritz , seems you just got an email from reb, thats me he is talking about :-)
14:04 moritz borisd: I did not get an email
14:04 Brumbazz moritz:  thanks :> Alright :)
14:04 Brumbazz thanks again, it works!
14:04 moritz borisd: in case somebody is still using my old moritz@faui2k3.org: that doesn't work anymore. Please use moritz.lenz@gmail.com instead
14:05 borisd moritz: yep, he used the old one, I'll tell him
14:05 moritz borisd: thanks
14:07 borisd moritz: you should have the mail now... it's still in a very early stage of planning. Stay tuned... maybe give a short reply. thx
14:10 Aaronepower joined #perl6
14:11 borisd p6: say "bye bye";
14:11 camelia rakudo-moar 37689a: OUTPUT: «bye bye␤»
14:11 borisd :-)
14:11 mspo joined #perl6
14:12 leont joined #perl6
14:15 skids joined #perl6
14:26 atroxaper joined #perl6
14:32 darkmorph joined #perl6
14:38 epony joined #perl6
14:44 aindilis joined #perl6
14:50 Cabanossi joined #perl6
15:03 thunktone joined #perl6
15:18 wamba joined #perl6
15:35 Cabanossi joined #perl6
15:44 andrzejku joined #perl6
15:55 okl joined #perl6
16:00 arg_ joined #perl6
16:01 arg_ how do I combine commandline arguments: ./program -abc
16:02 arg_ From: sub MAIN(:a($a), :b($b), :c($c)) { ... }
16:03 ugexe you cant unless there is a 3rd party module
16:03 ugexe -abc is the same as :$abc
16:04 arg_ I thought that would be --abc
16:04 atroxaper arg_: there are no such functionality out of the box, as I know.
16:04 ugexe the `-` vs `--` doesn't have a real distinction
16:04 ugexe although maybe its intended to have such
16:04 mempko joined #perl6
16:05 ugexe but there is nothing stopping you from doing :foo(:bar(:$bar)), so it can't really make an assumption about aliases
16:05 strangemk2 joined #perl6
16:05 arg_ you cannot share them though
16:06 ugexe what do you mean
16:06 arg_ sub MAIN(:ab(:a($a)), :ab(:b($b))) { ... }
16:07 ugexe right, i wasnt suggesting to do what I showed above. that was meant to show that the default behavior likely can't just translate multi options with `-` without making &MAIN signature work different than all other routines
16:09 atroxaper Does somebody know why my module is not appear in modules.perl6.org? There are no scan running for several days (https://modules.perl6.org/update.log)
16:09 wander joined #perl6
16:09 ugexe you could grep @*ARGS for .starts-with('-') && not .starts-with('--'), then split on nothing (.comb) and prefix each option with a `-`
16:10 dogbert17 joined #perl6
16:10 ugexe such that when MAIN gets called it doesnt see -abc, but -a -b -c
16:12 wander arg_: https://docs.perl6.org/language/functions#index-entry-MAIN
16:12 ugexe something like: @*ARGS = @*ARGS.map({ $arg.starts-with('-') && not $arg.starts-with('--') ?? $arg.substr(1).comb.map({"-$_"}).Slip !! $arg })
16:13 wander I think -abc and --abc both pass named para abc
16:13 ugexe rather: @*ARGS = @*ARGS.map(-> $arg { $arg.starts-with('-') && not $arg.starts-with('--') ?? $arg.substr(1).comb.map({"-$_"}).Slip !! $arg })
16:14 wander and I am curious of https://github.com/perl6/doc/issues/1595
16:16 ugexe things would be easier if we could just start identifiers with - and -- :P
16:17 ugexe sub MAIN(:$--foo, :$-foo) { $-foo -= --$--foo }
16:18 cdg joined #perl6
16:22 wander hah, with sigil it may be implemented one day
16:24 wander but identifiers like barely --foo parsed difficultly
16:25 wander and so far, as mentioned in issue #1595, --foo equals -foo
16:26 committable6 joined #perl6
16:26 epony joined #perl6
16:26 wander (when trying to pass named para to sub MAIN
16:32 mniip joined #perl6
16:35 [Coke] I have a bunch of proc-async jobs I create. I want to max out how many I am trying to run at a given time. Is there a better way to do this than keeping an array of X running jobs, waiting for one of them to finish, picking that one, removing it from the list, add another one to the list, loop until done?
16:35 [Coke] (starting the job only when adding it to the running list)
16:38 arg_ ugexe: I just get "This type cannot unbox to a native string: P6opaque, Bool".
16:41 jnthn [Coke]: I'm sure there's a module that does that for you
16:42 [Coke] Ah. Proc::Q seems likely.
16:43 wander @*ARGS = @*ARGS.map(-> $arg { $arg.starts-with('-') && !$arg.starts-with('--') ?? $arg.substr(1).comb.map({"-$_"}).Slip !! $arg }); say @*ARGS;
16:43 wander arg_: ^^ works for me
16:43 wander it convert -abc into -a -b -c
16:43 [Coke] .tell zoffix Proc::Q fails its tests here.
16:43 yoleaux [Coke]: I'll pass your message to zoffix.
16:45 ugexe perl6 -e '@*ARGS = @*ARGS.map(-> $arg { ($arg.starts-with("-") && not $arg.starts-with("--")) ?? $arg.substr(1).comb.map({"-$_"}).Slip !! $arg }); say @*ARGS.perl; sub MAIN(Bool:D :a(:$aa)!, Bool:D :b(:$bb)!, Bool:D :c(:$cc)!) { say $aa; say $bb; say $cc }'
16:46 ugexe as wander points out: it was precedence issue with `.. not .. ?? .. !!`. so !$arg ... or (not $arg ...) both fix your problem
16:48 rgrau joined #perl6
16:48 wamba joined #perl6
16:48 cdg joined #perl6
16:49 * [Coke] tries to drop back to 2017.09 and see if that works.
16:49 arg_ ugexe: I had to parenthesise: ($_.starts-with('-') && not $_.starts-with('--'))??
16:49 arg_ it works now (:
16:55 itaipu joined #perl6
17:01 Geth ¦ doc/master: 5 commits pushed by 陈梓立++, (Patrick Spek)++
17:01 Geth ¦ doc/master: b9531b2133 | [WIP] Try to fix intro of non-string keys of Hash
17:01 Geth ¦ doc/master: 09f25dbdae | Add example in method keysof
17:01 Geth ¦ doc/master: feba7d3dd4 | Update Hash.pod6
17:01 Geth ¦ doc/master: d414052f9f | Update Hash.pod6
17:01 Geth ¦ doc/master: cbf99c8615 | Merge pull request #1602 from W4anD0eR96/patch-4
17:01 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/cdf2a42039...cbf99c8615
17:01 TimToady HoboWithAShotgun: you can use .wrap to put wrappers around methods, but that's about all the support we put in originally for AOP (other than attempting to specify when the compiler could start assuming routines wouldn't be wrapped for optimization purposes)
17:01 mcmillhj joined #perl6
17:02 TimToady other than that, Modules Will Happen :)
17:03 robertle joined #perl6
17:05 eroux joined #perl6
17:10 domidumont joined #perl6
17:14 cog_ joined #perl6
17:15 mcmillhj joined #perl6
17:20 wamba joined #perl6
17:20 Cabanossi joined #perl6
17:20 dogbert17 joined #perl6
17:26 thunktone joined #perl6
17:41 nadim joined #perl6
17:50 kyan joined #perl6
17:51 wamba joined #perl6
18:03 rba joined #perl6
18:04 troys joined #perl6
18:04 mcmillhj joined #perl6
18:06 HoboWithAShotgun joined #perl6
18:12 Praise joined #perl6
18:12 Praise joined #perl6
18:17 vivus-ignis joined #perl6
18:23 cdg_ joined #perl6
18:26 El_Che can PR's be sent to rakudo.org website?
18:26 El_Che I don't see it on github
18:28 timotimo do you have rakudo forked on github?
18:28 El_Che yes
18:28 timotimo it should offer you to make a pr when you go to the "branches" list and select that branch
18:29 timotimo from the "compare" view
18:29 El_Che I mean the website contant, not rakudo itself
18:30 BackEMF joined #perl6
18:31 timotimo oh!
18:31 timotimo no, that lives in a wordpress
18:32 El_Che I see https://github.com/nxadm/rakudo-pkg/releases was added, but it's not a aref, just text. Small fix :)
18:32 timotimo where is it?
18:33 timotimo found it
18:33 El_Che http://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Linux
18:33 ggoebel joined #perl6
18:33 El_Che also, maybe we should also mention the Linux subsystem on windows. Should I send you a paragraph?
18:34 timotimo you may. refresh the page to see how i worded the link
18:35 El_Che Or maybe: If you use the Linux Subsystem of Windows 10, you can install the Ubuntu 16.04 package (run /opt/rakudo/bin/fix_windows10 after the install).
18:36 timotimo where do i put that?
18:36 El_Che ubuntu 16.04 has rakudo 2015.11 on  the repo's and we don't want people installing that
18:37 El_Che Following the last sentence of the paragraph ("modules you might wish to use.")
18:38 pilne joined #perl6
18:39 timotimo hm, you think we can somehow disambiguate ubuntu's package vs the package from your repo?
18:39 zakharyas joined #perl6
18:39 El_Che good point
18:40 El_Che Or maybe: If you use the Linux Subsystem of Windows 10, you can install nxadm's Ubuntu 16.04 package (run /opt/rakudo/bin/fix_windows10 after the install).
18:40 timotimo yeah, that's good
18:41 mcmillhj joined #perl6
18:41 Geth ¦ doc: a57e71904b | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Proc/Async.pod6
18:41 Geth ¦ doc: Revert "Don't recommend code that does not work"
18:41 Geth ¦ doc:
18:41 Geth ¦ doc: This reverts commit 70084290cf881af88546d507fc2ba4448bfa7aaf.
18:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a57e71904b
18:41 synopsebot Link: https://doc.perl6.org/type/Proc/Async
18:41 Geth ¦ doc: b63da2ad13 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Proc/Async.pod6
18:41 Geth ¦ doc: Prevent frustration with older Rakudo versions
18:41 Geth ¦ doc:
18:41 Geth ¦ doc: See RT #132016.
18:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b63da2ad13
18:41 synopsebot RT#132016 [resolved]: https://rt.perl.org/Ticket/Display.html?id=132016 [TESTNEEDED] Supply.merge and signals ( signal(SIGTERM).merge(signal(SIGINT)) )
18:43 timotimo have a look, i updated the page
18:44 timotimo we should probably also link to the unix subsystem for windows stuff from the windows section above?
18:44 El_Che yeah, I was thinking about that
18:46 El_Che (I case you want to run Raudo on the Linux Sybsystem of Windows 10, look under nxadm's rakudo-pkg" <- link to Linux & Unix-like oeprating systems
18:49 timotimo check a look
18:49 mcmillhj joined #perl6
18:53 void1 joined #perl6
18:54 BackEMF left #perl6
18:57 cognominal joined #perl6
19:03 vivus-ignis joined #perl6
19:04 mr-foobar joined #perl6
19:06 astj joined #perl6
19:10 ChoHag joined #perl6
19:15 El_Che thx timotimo
19:15 zakharyas joined #perl6
19:15 timotimo YW, thanks for your contributions :)
19:18 zakharyas joined #perl6
19:24 lizmat joined #perl6
19:26 rgrau joined #perl6
19:28 mr-foobar joined #perl6
19:31 piojo joined #perl6
19:36 tyil .tell melezhik the funtoo  build is going to be more of a pain to fix than I anticipated, Funtoo recently updated its package manager, and the docker images havent accounted for this change yet
19:36 yoleaux tyil: I'll pass your message to melezhik.
19:42 evalable6 joined #perl6
19:42 setty1 joined #perl6
19:47 piojo joined #perl6
19:56 mr-fooba_ joined #perl6
20:04 cdg joined #perl6
20:08 cdg_ joined #perl6
20:17 strangemk2 joined #perl6
20:25 vivus-ignis joined #perl6
20:35 Cabanossi joined #perl6
20:41 lizmat_ joined #perl6
21:06 Rawriful joined #perl6
21:15 [equa] joined #perl6
21:19 [equa] joined #perl6
21:24 mcmillhj joined #perl6
21:27 Geth joined #perl6
21:30 Geth joined #perl6
21:32 Geth joined #perl6
21:36 audiatorix joined #perl6
21:47 pilne i am guessing, that hosting a perl6 app takes a server that one has a lot of freedom of choice to install things on?
21:48 pilne unlike the dime-a-dozen options for things like perl5/php/python
21:52 [equa] yeah. my favorite host doesn't support perl6 despite having a lot of other languages
21:53 [equa] hell, they have 4 different schemes but still only perl 5
21:53 pilne i see there is a heroku buildpack, not sure how current/good it is, and heroku isn't quite my favorite solution overall, but other than that i'm coming up blank on the googlefu
21:53 pilne lol, talk about a fragmented ecosystem, love a lot about scheme outside of that
21:54 [equa] oh, and two different non-scheme lisps
21:54 [equa] still been trying to find a perl 6 host, actually
21:55 HoboWithAShotgun allright. you don't have to wonder your mouse event loop be slow if you have a fat Dump of the entire widget tree in there
21:55 Geth joined #perl6
21:55 ugexe hackerrank lets you submit answers in something called LOLCODE but not perl6
21:56 Geth joined #perl6
21:58 mcmillhj joined #perl6
21:58 jdv79 wasn't there a lolcode compiler for parrot
21:59 jdv79 or was that some other lame lang on the first versions of nqp
22:01 jdv79 yeah, parrot looks like
22:02 HoboWithAShotgun ... to disk
22:14 mcmillhj joined #perl6
22:27 Levex joined #perl6
22:29 mcmillhj joined #perl6
22:33 skids joined #perl6
22:38 char_var[buffer] joined #perl6
23:08 evalable6 joined #perl6
23:28 evalable6 joined #perl6
23:35 Cabanossi joined #perl6
23:48 epony joined #perl6
23:53 Geth_ joined #perl6
23:54 ShadowManu joined #perl6
23:57 ShadowManu have a good day fellow programmer folks. I'm intending to use a scripting language for automating Continuous Integration (and Delivery) tasks. In particular, I will be playing with AWS, so mostly its about running commands and connecting through network. I had either bash (because of tradition), or javascript (because of own usage) but I don't feel them suited for comfy scripting. I was taking a look at learning perl and comes th
23:58 Juerd ShadowManu: Your line ends after 'comes the' because of the message length limitation of IRC.
23:59 timotimo :(
23:59 ShadowManu joined #perl6
23:59 Juerd Welcome back

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

Perl 6 | Reference Documentation | Rakudo