Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-19

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:01 jeffythedragonsl joined #perl6
00:02 kalkin- joined #perl6
00:04 mawkish__ joined #perl6
00:12 mawkish__ joined #perl6
00:15 Sgeo joined #perl6
00:16 mawkish__ joined #perl6
00:20 mawkish__ joined #perl6
00:44 llfourn joined #perl6
00:47 itcharlie left #perl6
00:55 cdg joined #perl6
01:01 aborazmeh joined #perl6
01:01 aborazmeh joined #perl6
01:03 b2gills m: print $0 if "[abc]def" ~~ / \[ ( <-[\]]>+ ) \] /
01:03 camelia rakudo-moar e1df52: OUTPUT: «abc»
01:04 timotimo m: print $0 if "[abc]def" ~~ / '[' ( <- ']' > ) ']' /
01:04 camelia rakudo-moar e1df52: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3print $0 if "[abc]def" ~~ / '[' ( <-7⏏5 ']' > ) ']' /␤Unrecognized regex metacharacter - (must be quoted to match literally)␤at …»
01:04 timotimo m: print $0 if "[abc]def" ~~ / '[' ( <-']'> ) ']' /
01:04 camelia rakudo-moar e1df52: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3print $0 if "[abc]def" ~~ / '[' ( <-7⏏5']'> ) ']' /␤Unrecognized regex metacharacter - (must be quoted to match literally)␤at <t…»
01:04 timotimo mhm
01:05 ZzZombo_ joined #perl6
01:05 ZzZombo_ joined #perl6
01:10 ZzZombo_ joined #perl6
01:15 dogbert17 joined #perl6
01:17 bjz joined #perl6
01:27 bjz joined #perl6
01:29 agentzh joined #perl6
01:39 b2gills m: print $0 if "[abc]def]" ~~ / '[' ~ ']' ([ <!before ']'> . ]+) /
01:39 camelia rakudo-moar b9332a: OUTPUT: «abc»
01:44 TimToady m: print $0 if "[abc]def]" ~~ / '[' ~ ']' (.*?) /
01:44 camelia rakudo-moar b9332a: OUTPUT: «abc»
01:44 TimToady that seems simpler
01:45 TimToady and is not exactly backtracking, more like forward tracking...
01:45 llfourn joined #perl6
01:45 timotimo ya
01:46 TimToady though probably doesn't work in a grammar that defines FAILGOAL
01:49 timotimo TimToady: do we have a clue how we can emit regexes that don't actually compile to regexes?
01:49 timotimo for example, on the mailing list we just had someone want s|.*'/'||
01:49 timotimo that'd totally work as just a substr with an rindex
01:57 llfourn joined #perl6
02:01 TimToady not yet, but I'm working my way into regex/grammar optimization, now that I'm mostly done with braids
02:10 timotimo yup
02:21 kalkin- joined #perl6
02:22 kalkin- hi #perl6
02:22 kalkin- How do i read from a file descriptor which I obtained from a native call?
02:23 timotimo well, you can definitely use nativecall for regular libc functions like fprintf
02:24 timotimo we do have a "give me the native descriptor for this perl6-level IO thingie"
02:24 timotimo not sure about the other side
02:24 timotimo well, you can "/proc/self/fd/$num".IO.open(...)
02:24 timotimo but only on linux
02:24 kalkin- timotimo: i think the other side is missing
02:25 kalkin- timotimo: TIL about fd/$num
02:26 kalkin- timotimo: is linux only anyway, thanks!
02:26 kalkin- timotimo: is linux only anyway, thanks!
02:26 kalkin- ups
02:28 timotimo i hope it actually works out! :)
02:39 jiang joined #perl6
02:39 jiang p6:say 3
02:39 mr-foobar joined #perl6
02:40 avuserow p6: say 3 # need a space after the colon?
02:40 camelia rakudo-moar b9332a: OUTPUT: «3␤»
02:41 jiang p6: say 'oh, just like this ;-)';
02:41 camelia rakudo-moar b9332a: OUTPUT: «oh, just like this ;-)␤»
02:46 kalkin- /proc/self/fd/$num doesn't exist,  but /proc/$*PID/fd/$num does (checked via shell during runtime), but when accessing it i get permission denied
02:46 timotimo well, accessing it from a different thread surely won't work
02:46 timotimo how were you checking for it?
02:46 timotimo wow, just .say for dir /proc/self/fd gives me 0 through 13
02:46 timotimo impressive
02:46 user_ joined #perl6
02:46 user_ timotimo: "/proc/$*PID/fd/$inotify.fd()".IO;
02:46 timotimo huh, 0, 1, 2, 9, 11, and 12 are all /dev/tty
02:46 timotimo and one /dev/null, too
02:46 timotimo a few precomps are mmapped, that's not so surprising that they'd have fds
02:47 user_ btw the fd in question is shown in zsh as “18 -> anon_inode:inotify” which makes sense, but may be is in issue for rakudo/moarvm
02:48 kalkin- (stupid reconnects)
02:48 timotimo how do you mean? in issue?
02:49 timotimo gotta head home and get some sleep
02:50 kalkin- timotimo: thanks for helping will experiment further
02:50 timotimo sure thing
03:05 kalkin- just using read(2) seems to work for me
03:08 BenGoldberg joined #perl6
03:11 mr_ron joined #perl6
03:14 Ben_Goldberg joined #perl6
03:24 dalek joined #perl6
03:24 synopsebot6 joined #perl6
03:26 ZzZombo joined #perl6
03:26 ZzZombo joined #perl6
03:29 Ben_Goldberg joined #perl6
03:29 BenGoldberg s: EVAL("1"), "Str", ()
03:30 * BenGoldberg peers around for saucebot...
03:32 noganex_ joined #perl6
03:34 Ben_Goldberg joined #perl6
03:39 bjz_ joined #perl6
03:40 Ben_Goldberg joined #perl6
04:07 bjz joined #perl6
04:27 Cabanoss- joined #perl6
04:29 IRCFrEAK joined #perl6
04:29 IRCFrEAK left #perl6
04:39 raiph joined #perl6
04:44 labster joined #perl6
05:02 kurahaupo joined #perl6
05:08 kurahaupo_ joined #perl6
05:41 agentzh joined #perl6
05:46 bjz joined #perl6
05:59 mr-foobar joined #perl6
06:08 eroux joined #perl6
06:18 itaipu joined #perl6
06:37 bjz joined #perl6
06:39 Tonik joined #perl6
06:40 wamba1 joined #perl6
06:51 darutoko joined #perl6
06:52 samcv good * everyone. having been around the last day or two.
06:52 samcv NeuralAnomaly, status
06:52 NeuralAnomaly samcv, [✘] Next release will be in 3 weeks and 6 days. Since last release, there are 1 new still-open tickets (1 unreviewed and 0 blockers) and 32 unreviewed commits. See http://perl6.fail/release/stats for details
06:53 samcv don't see the latest builds on rakudo.org
06:56 llfourn joined #perl6
06:58 CIAvash joined #perl6
07:25 eroux joined #perl6
07:30 robertle joined #perl6
07:49 bjz joined #perl6
07:57 llfourn joined #perl6
08:11 moritz \o
08:12 moritz lol I blogged: https://perlgeek.de/blog-en/perl-6/201​7-008-file-directory-usage-graph.html
08:16 rindolf joined #perl6
08:21 xinming joined #perl6
08:26 Geth ¦ doc: titsuki++ created pull request #1203: Add example for sigspace
08:26 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1203
08:26 Geth ¦ doc: 52960cc5d0 | titsuki++ | doc/Language/grammars.pod6
08:26 Geth ¦ doc: Add example for sigspace
08:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/52960cc5d0
08:26 Geth ¦ doc: cef5f94dea | (Itsuki Toyota)++ | doc/Language/grammars.pod6
08:26 Geth ¦ doc: Merge pull request #1203 from titsuki/add-sigspace-example
08:26 Geth ¦ doc:
08:26 Geth ¦ doc: Add example for sigspace
08:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cef5f94dea
08:31 samcv sigspace is really weird in perl 6
08:32 samcv m: say 'blah here' ~~ m:s/   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «「blah here」␤»
08:32 samcv m: say 'blah here    ' ~~ m:s/   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «「blah here    」␤»
08:32 samcv both of these match, the last one matches the spaces but first one doesn't
08:32 samcv m: say 'blah here    ' ~~ m/   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «False␤»
08:32 samcv m: say 'blah here    ' ~~ /   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «Nil␤»
08:32 samcv m: say 'blah here    ' ~~ m/   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «False␤»
08:32 samcv m: say 'blah here    ' ~~ :s/   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «5===SORRY!5===␤Regex not terminated.␤at <tmp>:1␤------> 3 'blah here    ' ~~ :s/   blah  here   /7⏏5<EOL>␤Regex not terminated.␤at <tmp>:1␤------> 3 'blah here    ' ~~ :s/   blah  here   /7⏏5<EOL>␤Unable to parse regex; coul…»
08:32 samcv m: say 'blah here    ' ~~ /:s   blah  here   /
08:32 camelia rakudo-moar b9332a: OUTPUT: «「blah here    」␤»
08:33 samcv m: say 'blah here    ' ~~ m/:s   blah  here   /
08:33 camelia rakudo-moar b9332a: OUTPUT: «「blah here    」␤»
08:37 moritz m: say ' blah here ' ~~ m:s/ bla here /
08:37 camelia rakudo-moar b9332a: OUTPUT: «False␤»
08:37 moritz m: say ' blah here ' ~~ m:s/ blah here /
08:37 camelia rakudo-moar b9332a: OUTPUT: «「blah here 」␤»
08:37 moritz m: say ' blah here ' ~~ m/ :s blah here /
08:37 camelia rakudo-moar b9332a: OUTPUT: «「blah here 」␤»
08:38 andrzejku joined #perl6
08:38 samcv it's basically like \s+ when you have a space when doing sigspace
08:38 samcv well
08:38 samcv m: say 'blah' ~~ /:s blah/
08:38 camelia rakudo-moar b9332a: OUTPUT: «「blah」␤»
08:38 samcv m: say 'blah' ~~ /:s blah /
08:38 camelia rakudo-moar b9332a: OUTPUT: «「blah」␤»
08:38 samcv that still matches though?
08:39 samcv so it's like \s* at the last token but like \s+ on others?
08:39 samcv m: say 'blah' ~~ /:s b lah /
08:39 camelia rakudo-moar b9332a: OUTPUT: «Nil␤»
08:39 samcv m: say 'b lah' ~~ /:s b lah /
08:39 camelia rakudo-moar b9332a: OUTPUT: «「b lah」␤»
08:39 samcv m: say 'b lah  ' ~~ /:s b lah /
08:39 camelia rakudo-moar b9332a: OUTPUT: «「b lah  」␤»
08:41 samcv m: say ' '.match: /<ws>/
08:41 camelia rakudo-moar b9332a: OUTPUT: «「 」␤ ws => 「 」␤»
08:41 samcv m: say ' '.match: /<.ws>/
08:41 camelia rakudo-moar b9332a: OUTPUT: «「 」␤»
08:42 samcv m: say ' '.match: / /
08:42 camelia rakudo-moar b9332a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Null regex not allowed␤at <tmp>:1␤------> 3say ' '.match: / /7⏏5<EOL>␤»
08:42 samcv m: say ' '.match: /' '/
08:42 camelia rakudo-moar b9332a: OUTPUT: «「 」␤»
08:42 samcv m: say 'test '.match: /test<.ws>/
08:42 camelia rakudo-moar b9332a: OUTPUT: «「test 」␤»
08:42 samcv m: say 'test'.match: /test<.ws>/
08:42 camelia rakudo-moar b9332a: OUTPUT: «「test」␤»
08:42 samcv m: say 'test abc'.match: /test<.ws>/
08:42 camelia rakudo-moar b9332a: OUTPUT: «「test 」␤»
08:43 samcv m: say 'testabc'.match: /test<.ws>/
08:43 camelia rakudo-moar b9332a: OUTPUT: «Nil␤»
08:43 samcv so i guess end of string or start of string counts as whitespace
08:56 llfourn joined #perl6
09:01 RabidGravy joined #perl6
09:19 parv joined #perl6
09:20 andrzejku hi
09:20 andrzejku :)
09:20 parv unicorn is up
09:24 espadrine joined #perl6
09:28 IOninja samcv: that's because it was a compiler release, not Star
09:28 samcv kk
09:29 samcv parv, unicorn?
09:29 parv unicorn gundam (anime series; now "hunter x hunter" is on)
09:29 samcv ah
09:30 parv (in hindsight should have mentioned "gundam" instead)
09:37 RabidGravy Hmm
09:37 RabidGravy m: my $i = 0; say ((0 xx *).flatmap: { last if $i++ == 6; $i }).elems;
09:37 camelia rakudo-moar b9332a: OUTPUT: «Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
09:37 jjido joined #perl6
09:37 RabidGravy is that a recent change?
09:38 IOninja RabidGravy: no, but flat was failing to preserve laziness and that was fixed recently.
09:38 bjz_ joined #perl6
09:39 IOninja m: my $i = 0; say ((0 xx *).flatmap: { last if $i++ == 6; $i }).eager.elems;
09:39 camelia rakudo-moar b9332a: OUTPUT: «6␤»
09:41 andrzejku guys what do you know about perl6 and xmpp?
09:45 RabidGravy there's a module for it that someone recently revived, that's about it
09:45 ufobat joined #perl6
09:46 samcv i think i noticed that once IOninja. was it reifying it or just not preserving what is-lazy would give you?
09:46 RabidGravy IOninja, right that makes sense, so the code in DBIish that basically does that was working by accident then :)
09:49 IOninja samcv: not preserving .is-lazy, which caused things to reify stuff
09:49 samcv ah ok
09:49 IOninja m: my @a = (0 xx *).flat
09:49 camelia rakudo-moar b9332a: ( no output )
09:49 IOninja That used to hang
09:49 vktec left #perl6
09:49 IOninja m: sub (*@a) { }((0 xx *).flat)
09:49 camelia rakudo-moar b9332a: ( no output )
09:50 IOninja that too
09:50 sena_kun joined #perl6
09:51 rsaarelm left #perl6
09:56 cyphase joined #perl6
09:57 llfourn joined #perl6
10:00 sena_kun does :dba adverb still alive?
10:05 llfourn joined #perl6
10:06 ChoHag joined #perl6
10:11 moritz m: say 'bar' ~~ regex { :dba('foo') bar }
10:11 camelia rakudo-moar b9332a: OUTPUT: «Nil␤»
10:11 moritz m: say 'bar' ~~ regex {  bar }
10:11 camelia rakudo-moar b9332a: OUTPUT: «「bar」␤»
10:11 moritz huh
10:12 moritz untested at least
10:12 moritz Perl6::Grammar uses it quite a bit
10:15 sena_kun I'll file a roast issue now...
10:17 mr-foobar joined #perl6
10:18 sena_kun moritz, thanks.
10:24 moritz QAST::Regex(:rxtype(literal) :subtype())  \"foo\"
10:24 moritz m: say 'foobar' ~~ regex { :dba('foo') bar }
10:24 camelia rakudo-moar b9332a: OUTPUT: «「foobar」␤ 0 => 「foo」␤»
10:29 sena_kun joined #perl6
10:29 sena_kun I'm working on tilde explanation now. It says that tilde usage will produce a better error message, but how I can see it(the error message) when regex failed?
10:29 sena_kun m: say "abc" ~~ /a ~ (c) (b)/; say "ab" ~~ /a ~ (c) (b)/
10:29 camelia rakudo-moar b9332a: OUTPUT: «「abc」␤ 1 => 「b」␤ 0 => 「c」␤Nil␤»
10:29 Geth ¦ DBIish: 37d5c2079c | (Jonathan Stowe)++ | lib/DBDish/StatementHandle.pm6
10:29 Geth ¦ DBIish: Make fetchall-* methods eager
10:29 Geth ¦ DBIish:
10:29 Geth ¦ DBIish: The flatmap was accidentally reifying the lists until this was fixed
10:29 Geth ¦ DBIish: in https://github.com/rakudo/rakudo/commit/​ca102c51ae2a6a30df50f1fb039f398c5da329c6
10:29 Geth ¦ DBIish:
10:29 Geth ¦ DBIish: This is a naïve fix, but the tests would need to be rejigged if the
10:30 Geth ¦ DBIish: laziness wants to be preserved.
10:30 Geth ¦ DBIish:
10:30 Geth ¦ DBIish: Fixes #87
10:30 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/37d5c2079c
10:34 araraloren joined #perl6
10:42 ZzZombo What is "braid" and why do I feel bad about it in advance?
10:42 masak ZzZombo: my answer will be only as far as I understand :)
10:42 masak a braid is the total sum of all languages and slangs currently in effect
10:43 bwisti joined #perl6
10:43 masak like, say you just defined a new operator in your program. now you've technically extended the language with that operator.
10:43 masak that's like adding one little thread (your operator) to an already quite woven-together braid (Perl 6)
10:44 masak ZzZombo: the reason Perl 6 needs to invent a fairly new term for this is that it's trying to do something other languages are not (as far as I'm aware)
10:45 masak the thing it's trying is something like having the cake and eating it wrt everyone being able to extend the language while also minimally colliding with everyone else in doing so
10:45 ZzZombo well then
10:46 masak the closest thing in Perl 5 is something called "source filters". I know next to nothing about them, but I can say with certainty that they are not famous for their *composability*
10:47 masak I've gotten the eerie feeling that source filters are not very far removed from being regex-manipulations on source text -- someone feel free to enlighten me further on that point
10:47 masak hm, I wonder if someone has ever done something like source filters, but with PPI as a foundation :)
10:48 masak does PPI round-trip back to source text?
10:50 ZzZombo HELP! I'm here watching my cursor suddenly moving by itself towards the right bottom corner....
10:50 ZzZombo I am not holding the mouse and its resting on its pad
10:51 ZzZombo it's greased, there is no way it can somehow start to move by itself...
10:51 masak how long since you performed the Mousa Calibration Ritual?
10:51 masak Mouse*
10:51 ZzZombo what is that? Is that some thing related to the old devices with a track ball inside them?
10:52 masak maybe you need to reboot your fridge or toaster of they're IoT devices. they might interfere with the mouse.
10:52 ZzZombo WTF, this is so creepy.
10:53 araraloren ...
10:56 masak maybe it's your neighbor who has hacked the mouse. you did password-protect your mouse, right?
10:56 ZzZombo hunter2
10:56 masak all I see is asterisks
10:56 ZzZombo see, it works.
10:57 masak oh, that was a password? great!
10:57 jjido joined #perl6
11:08 IOninja wtf
11:08 masak ZzZombo: I know TimToady and possibly jnthn have been making braid-related Rakudo commits lately, but I don't know what prompted it
11:09 IOninja RabidGravy: that code looks insane to me. What's with the 0 xx * bit?
11:09 RabidGravy dunno
11:09 IOninja RabidGravy: also, that's the wrong commit. The fix is in https://github.com/rakudo/rakudo/commit/51b0aba
11:10 masak `0 xx *` just means "a fair amount of zeros" :)
11:10 IOninja RabidGravy: and why eager the fetchall? You'd think that to be a heavy operation that can benefit greatly from not fetching everything at the same time
11:10 IOninja masak: ... which aren't used in that code.
11:11 RabidGravy hence "naive fix"
11:12 masak huh.
11:12 IOninja masak: my thoughts exactl.y
11:12 masak if you mean that they aren't used for the .map, that just means that the `0` could've been anything
11:12 cibs joined #perl6
11:13 IOninja like repeat...until? Sure.
11:13 masak basically.
11:13 RabidGravy I didn't write the code, I'm sure whoever did had their reasons
11:16 RabidGravy it wasn't lazy before due to the flat losing the laziness so I was just preserving the tested behaviour
11:16 IOninja It was lazy.
11:17 IOninja star: my $x = (0 xx *).flat; say $x[^10]
11:17 camelia star-m 2016.10: OUTPUT: «(0 0 0 0 0 0 0 0 0 0)␤»
11:18 RabidGravy well the tests all assumed it wasn't
11:22 IOninja :/
11:29 agentzh joined #perl6
11:30 llfourn joined #perl6
11:31 jjido joined #perl6
11:37 Geth ¦ doc/tilde-explanation: 7453809342 | Altai-man++ | doc/Language/regexes.pod6
11:37 Geth ¦ doc/tilde-explanation: Remove information about :dba that is not in roast(now).
11:37 Geth ¦ doc/tilde-explanation: review: https://github.com/perl6/doc/commit/7453809342
11:40 lukaramu joined #perl6
11:50 RabidGravy m: say [(0 xx *)] eqv [];
11:50 camelia rakudo-moar b9332a: OUTPUT: «This type cannot unbox to a native integer: P6opaque, Failure␤  in block <unit> at <tmp> line 1␤␤»
11:51 RabidGravy any value in making that a more obvious message?
11:52 ufobat .seen zostay
11:52 yoleaux I saw zostay 11 Dec 2016 18:10Z in #perl6: <zostay> No. Hard to find time and when I do I keep running into obscure async bugs
11:52 ufobat :/
11:58 Geth ¦ perl6.org: 514039ce2e | (Steve Mynott)++ | 576 files
11:58 Geth ¦ perl6.org: Make it even more obvious we're reading an archive!
11:58 Geth ¦ perl6.org: review: https://github.com/perl6/p​erl6.org/commit/514039ce2e
11:58 IOninja s: &infix:<eqv>, \([(0 xx *)], [])
11:59 SourceBaby joined #perl6
11:59 Undercover joined #perl6
11:59 IOninja s: &infix:<eqv>, \([(0 xx *)], [])
11:59 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/​blob/b9332ae/src/core/Mu.pm#L871
12:00 IOninja RabidGravy: I'd say there should not be any error there.
12:00 sena_kun stmuk_, ping? did you commit https://github.com/perl6/p​erl6.org/commit/514039ce2e because of mine question?
12:01 IOninja m: say (0 xx *) eqv (0 xx *)
12:01 camelia rakudo-moar b9332a: OUTPUT: «Cannot eqv lazy Sequences␤  in block <unit> at <tmp> line 1␤␤»
12:01 stmuk_ if you are toddandmargo then yes :)
12:01 IOninja hm
12:01 RabidGravy IOninja, yeah I was just about to say that :)
12:02 IOninja ¯\_(ツ)_/¯
12:02 IOninja m: say [(0 xx *)].is-lazy
12:02 camelia rakudo-moar b9332a: OUTPUT: «True␤»
12:02 sena_kun stmuk_, ah, okay then. :)
12:03 RabidGravy and strangely I just typed that in the shell here too
12:04 sena_kun also, I double question above, since there are more people now. The tilde explanation(in specs, at least) says that "tilde usage will produce a better error message". but how I can see it(the error message) when regex failed?
12:04 sena_kun m: say "abc" ~~ /a ~ (c) (b)/; say "ab" ~~ /a ~ (c) (b)/
12:04 camelia rakudo-moar b9332a: OUTPUT: «「abc」␤ 1 => 「b」␤ 0 => 「c」␤Nil␤»
12:04 sena_kun m: say "abc" ~~ /a (b) (c)/; say "ab" ~~ /a (b) (c)/
12:04 camelia rakudo-moar b9332a: OUTPUT: «「abc」␤ 0 => 「b」␤ 1 => 「c」␤Nil␤»
12:05 IOninja sena_kun: it's produced in the grammar
12:05 jnthn m: grammar G { token TOP { a ~ c b } }; G.parse('a b')
12:05 yoleaux 18 Feb 2017 16:42Z <IOninja> jnthn: seems $foo.WHAT === Code doesn't detect thunks? Here's my version of infix:<orelse> but it still returns a thunk instead of executed thunk. Am I doing it wrong? https://gist.github.com/zoffixznet​/82ef0cfb76ef1cbb6717555fab557427
12:05 camelia rakudo-moar b9332a: ( no output )
12:05 yoleaux 18 Feb 2017 16:53Z <IOninja> jnthn: nevermind, I've got Blocks not Code
12:05 IOninja m: grammar { token TOP { '[' ~ ']' .+ }; method FAILGOAL (|c) { say c; exit } }.parse: '[meow'
12:05 camelia rakudo-moar b9332a: OUTPUT: «\("']' ")␤»
12:05 jnthn m: grammar G { token TOP { a ~ c b } }; G.parse('ab')
12:05 camelia rakudo-moar b9332a: ( no output )
12:05 IOninja m: grammar { token TOP { \[ ~ \] \w+ }; method FAILGOAL($goal) { die "cannot find $goal near position {self.pos}" }}.parse: '[moep bla]'
12:05 camelia rakudo-moar b9332a: OUTPUT: «cannot find \]  near position 5␤  in method FAILGOAL at <tmp> line 1␤  in regex TOP at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:05 jnthn Oh, right, you have to implement FAILGOAL
12:06 jnthn We used to generate this error by default
12:06 jnthn e.g. there was a default FAILGOAL that did "Cannot find ]" or so
12:06 andrzejku hi people :)
12:07 sena_kun jnthn, this default will be returned on some point or I can document it as "do it yourself"?
12:07 jnthn And pepole whined "oh but every other regex construct backtracks, why not this one", so we ended up changing it...
12:07 wigner joined #perl6
12:07 jnthn sena_kun: No, these days it's more like "you have the opportunity to give better errors by implementing FAILGOAL"
12:07 jnthn I suggest providing an example like the one IOninja just gave
12:08 sena_kun jnthn, FAILGOAL works only for ~ or is it a default method for failure errors in general?
12:08 jnthn sena_kun: Only for ~
12:09 sena_kun jnthn, noted. Thanks, folks, I'll finish it faster now.
12:09 jnthn sena_kun: The ~ is known as "goal matching syntax", which is where the name FAILGOAL came from
12:13 pmurias joined #perl6
12:15 ufobat .tell zostay what is the status of your HTTP-Request-Supply? i'd really love to have it on modules.perl6.org so we can have a async http p6w server
12:15 yoleaux ufobat: I'll pass your message to zostay.
12:28 araraloren joined #perl6
12:45 masak I think I was one of perhaps several who said "every other regex construct backtracks" :)
12:46 masak I remember arguing the point in an RT ticket somewhere
12:47 masak I think what stood out to me was that grammars already have a composable kind of failure mechanism (backtracking), and this one thing incongruously used exceptions instead
12:48 stmuk_ I think all the slangs in the ecosystem are broken now
12:49 stmuk_ is braid getting moved to 6.d?
12:55 pmurias stmuk_: I would be surprised if we support any backwards compability with slangs
13:01 sammers hi #perl6
13:02 DrForr Afternoon, sammers.
13:02 stmuk_ slangs aren't documented either so I guess its not really supported yet
13:07 sena_kun why is it broken? on latest rakudo mine just prints "Deprecated use of %*LANG<MAIN> assignment detected in use; module should export syntax using $*LANG.define_slang("MAIN",<grammar>,<actions>) instead". But it passess my tests. \0/
13:12 ZzZombo_ joined #perl6
13:12 ZzZombo_ joined #perl6
13:12 sammers is there anyway to get the pid from Proc::Async?
13:19 RabidGravy isn't there a .pid attribute?
13:19 RabidGravy on Proc
13:20 sammers yes
13:21 sammers but I am getting no such method for pid on Proc::Async
13:22 RabidGravy sorry, yes, confused myself there
13:22 pyrimidine joined #perl6
13:24 bjz joined #perl6
13:30 IOninja don't really see a way to get at the Proc... from reading the code.
13:32 IOninja stmuk_: nope, it was merged yesterday.
13:33 IOninja %*LANG is not a supported way to do anything. We can't restrict our efforts just because someone went ahead and used some part of guts.
13:33 IOninja And the warning suggests a proper way to do what the slang modules are doing.
13:33 espadrine_ joined #perl6
13:34 IOninja sena_kun: same with your warning.
13:35 sena_kun IOninja, yep, I understand it. But warning about deprecation is not "totally broken".
13:35 IOninja "If you have any code that depends on %*PRAGMAS or $*ACTIONS, it'll break."
13:35 IOninja "if you have code that sets %*LANG from a use, it'll emulate and warn"
13:35 sena_kun ah, okay.
13:35 IOninja "now that the release is out, I'm going to merge braids, so expect a bit of instability and/or warnings from slang modules"
13:35 zakharyas joined #perl6
13:36 Cabanossi joined #perl6
13:36 IOninja and there's at least one slang module that's currently crashing with some weird error....
13:36 DrForr Sigh, probably mine.
13:37 IOninja Slang::Tuxic
13:37 lizmat $ perl6 -MSlang::Tuxic -e 'say "hello world"'
13:37 lizmat hello world
13:38 lizmat not immediately obvious, or am I missing something
13:38 IOninja lizmat: [Tux] had issues with it: https://irclog.perlgeek.de/pe​rl6-dev/2017-02-19#i_14126519
13:38 * lizmat is still slightly dazed from jetlag
13:40 Cabanoss- joined #perl6
13:41 sena_kun I wonder why I've been mentioned in the release announce.
13:41 geekosaur joined #perl6
13:43 IOninja "The following people contributed to this release:"
13:43 IOninja Everyone who commited to doc, roast, moarvm, nqp, or rakudo are listed.
13:44 IOninja ordered by number of commits
13:44 sena_kun Yep. But I did nothing in rakudo repo. Ah, so doc contributions are counted too. Cool.
13:45 IOninja Yeah. This is a script that finds contributors: https://github.com/rakudo/rakudo​/blob/nom/tools/contributors.pl6
13:46 sena_kun My self-confidence was incremented today. \0/
13:46 IOninja \o/
13:50 tbrowder o/ salud, #perl6
13:50 sena_kun tbrowder, hello.
13:50 tbrowder hi, sena_kun
13:51 tbrowder my question for today involves initializing and assigning to arrays
13:52 tbrowder here's what i've tried
13:53 tbrowder m: my %r<a> = Array.new; %r<a>.push: 'b'
13:53 camelia rakudo-moar b9332a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Shaped variable declarations not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my %r<a>7⏏5 = Array.new; %r<a>.push: 'b'␤»
13:54 tbrowder what is solution?
13:54 IOninja m: m: my %r; %r<a>.push: 'b'; say %r
13:54 camelia rakudo-moar b9332a: OUTPUT: «{a => [b]}␤»
13:54 gfldex m: my %r = a => Array.new; %r<a>.push: 'b'; dd %r;
13:54 camelia rakudo-moar b9332a: OUTPUT: «Hash %r = {:a($["b"])}␤»
13:54 DrForr m: my %r<a> = (); %r.push: 'a'; # if you want to be explicit.
13:54 camelia rakudo-moar b9332a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Shaped variable declarations not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my %r<a>7⏏5 = (); %r.push: 'a'; # if you want to be␤»
13:54 masak tbrowder: problem was the `my %r<a>` part
13:55 masak tbrowder: you probably meant `my %r; %r<a> = []`
13:55 DrForr Oh, ne'er mind, that's what I get for copying...
13:55 gfldex you can do it if you assign a Pair of Str and Array in the initialiser
13:56 tbrowder masak: i tried the [] before and it didn't work either, maybe my rakudo is too old
13:56 IOninja m: m: my %r; my $z = %r<a>; $z.push: 'b'; say %r
13:56 camelia rakudo-moar b9332a: OUTPUT: «{}␤»
13:56 IOninja aww
13:56 IOninja m: m: my %r; my $z := %r<a>; $z.push: 'b'; say %r
13:56 camelia rakudo-moar b9332a: OUTPUT: «{a => [b]}␤»
13:56 gfldex tbrowder: the syntax my %foo<key1 key2 key3> is reserved for Hashes with compile time keys.
13:56 IOninja hehee :) Magic!
13:57 IOninja m: my %r; my %z; my $z := %r<a>; my $r := $z; %z<z> := $r; $z.push: 'b'; say %r; say %z
13:58 camelia rakudo-moar b9332a: OUTPUT: «{a => [b]}␤{z => [b]}␤»
13:58 IOninja ehehe way cool
13:58 IOninja hmmm
13:58 IOninja m: my %r; my $z; %r<a b c d e f g> := $z xx *; $z.push: 'b'; say %r;
13:58 camelia rakudo-moar b9332a: OUTPUT: «WARNINGS for <tmp>:␤Useless use of $z in sink context (line 1)␤Cannot bind to Hash slice␤  in block <unit> at <tmp> line 1␤␤»
13:59 tbrowder woe is me, all i want to do is have a hash of arrays formed programmatically, but i guess masak's solution is good for now
13:59 IOninja what you taking aboot... it's not useless!
13:59 IOninja m: my %r; my $z; %r{$_} := $z for <a b c d e f g>; $z.push: 'b'; say %r;
13:59 camelia rakudo-moar b9332a: OUTPUT: «{a => [b], b => [b], c => [b], d => [b], e => [b], f => [b], g => [b]}␤»
13:59 IOninja ehehe
13:59 IOninja That's pretty cool
13:59 DrForr m: my @foo = 1,2; my %r; %r<a> = @foo;
13:59 camelia rakudo-moar b9332a: ( no output )
14:00 IOninja tbrowder: you did see my version, right? You don't need any intializations. It'll autovivify automatically.
14:00 tbrowder i think so...let me look back
14:01 IOninja m: my %r; %r<a>.push: 42; %r<b>.append: 72, 89; %r<z> = [1, 2, 3, 4]; say %r
14:01 camelia rakudo-moar b9332a: OUTPUT: «{a => [42], b => [72 89], z => [1 2 3 4]}␤»
14:01 IOninja The only suckage is:
14:01 IOninja m: my %r; say $r<foo>.elems
14:01 camelia rakudo-moar b9332a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$r' is not declared. Did you mean '%r'?␤at <tmp>:1␤------> 3my %r; say 7⏏5$r<foo>.elems␤»
14:01 IOninja m: my %r; say %r<foo>.elems
14:02 camelia rakudo-moar b9332a: OUTPUT: «1␤»
14:02 IOninja m: my %r; %r<foo> andthen .elems.say
14:02 camelia rakudo-moar b9332a: ( no output )
14:02 tbrowder yes, i thought that was madak, sorry
14:02 IOninja m: my %r; %r<foo>:v.elems.say
14:02 camelia rakudo-moar b9332a: OUTPUT: «0␤»
14:02 tbrowder s/d/s/
14:02 IOninja m: my %r = foo => [<a b c>]; %r<foo>:v.elems.say
14:02 camelia rakudo-moar b9332a: OUTPUT: «3␤»
14:03 IOninja Oh, cool. No suckage then.
14:03 Geth ¦ doc/tilde-explanation: 49a1cef4fe | Altai-man++ | doc/Language/regexes.pod6
14:03 Geth ¦ doc/tilde-explanation: Add FAILGOAL explanation and example
14:03 Geth ¦ doc/tilde-explanation: review: https://github.com/perl6/doc/commit/49a1cef4fe
14:04 tbrowder my %r; %r<a>.push: 'b'
14:05 tbrowder m: my %r; %r<a>.push: 'b'
14:05 camelia rakudo-moar b9332a: ( no output )
14:05 sena_kun tbrowder, will you have some time for a review later?
14:06 sergot joined #perl6
14:06 tbrowder sena_kun: probably, just sitting around recovering from some winter crud
14:07 tbrowder anyone have strong feelings on best p6 http client?
14:10 sena_kun ah, I spent apathetically a whole day yesterday. but didn't do any work. :/
14:11 SmokeMachine moritz: I'm sorry, but I'm curious: why isn't Directory a child of File?
14:11 gfldex tbrowder: HTTP::Client does support https now, for small values of https that is.
14:11 Geth ¦ ecosystem: b93e3780f6 | (Ahmad M. Zawawi)++ | META.list
14:11 Geth ¦ ecosystem: farabi6: META.info -> META6.json
14:11 Geth ¦ ecosystem: review: https://github.com/perl6/e​cosystem/commit/b93e3780f6
14:12 sena_kun tbrowder, https://github.com/perl6/doc/pull/1190 this little peace and, more likely, https://github.com/perl6/doc/pull/1187, but the second is bigger(and older). Your help will be greatly appreciated.
14:12 sammers joined #perl6
14:12 tbrowder sena_kun: ok, it will be later today if that's ok
14:13 sena_kun tbrowder, any time you can and want is fine, it is me who is at fault here. :)
14:14 tbrowder gfldex: how small? i want a client that can handle com with acme server of letsencrypt
14:15 gfldex tbrowder: very little testing was done and don't expect man TLS related error messages.
14:15 gfldex *many
14:15 tbrowder well, i can try it...thanks
14:17 tbrowder gfldex: probably the https certs are larger than the expected payload
14:20 llfourn joined #perl6
14:21 kurahaupo__ joined #perl6
14:21 SmokeMachine m: my %r; %r.push: a => 'b'; say %r
14:21 camelia rakudo-moar b9332a: OUTPUT: «{}␤»
14:25 tbrowder m: my %r; %r<a>.push('a'); %r<a>.push('b'); my @a = %r<a>; say @a.perl
14:25 camelia rakudo-moar b9332a: OUTPUT: «[["a", "b"],]␤»
14:27 tbrowder IOninja, it looks like i keep pushing to the first array element
14:27 Cabanossi joined #perl6
14:28 khw joined #perl6
14:29 tbrowder IOninja: looks like consecutive pushes are to the first array element.
14:32 tbrowder m: my %r<a> = Array.new('a'); %r<a>.push: 'b'; say %r<a>.perl
14:32 camelia rakudo-moar b9332a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Shaped variable declarations not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my %r<a>7⏏5 = Array.new('a'); %r<a>.push: 'b'; say ␤»
14:33 SmokeMachine m: my %r; %r.push: a => 'b'; say %r # https://docs.perl6.org/type/Hash#method_push
14:33 camelia rakudo-moar b9332a: OUTPUT: «{}␤»
14:33 SmokeMachine m: my %r; %r.push: (a => 'b'); say %r
14:33 camelia rakudo-moar b9332a: OUTPUT: «{a => b}␤»
14:34 SmokeMachine Why is the () needed?
14:34 SmokeMachine m: my %r; push %r, a => 'b'; say %r
14:34 camelia rakudo-moar b9332a: OUTPUT: «{}␤»
14:35 SmokeMachine m: my %r; push %r: a => 'b'; say %r
14:35 camelia rakudo-moar b9332a: OUTPUT: «{}␤»
14:36 SmokeMachine m: my %h; push %h, 'd' => 5; dd %h # from the doc
14:36 camelia rakudo-moar b9332a: OUTPUT: «Hash %h = {:d(5)}␤»
14:36 AlexDaniel joined #perl6
14:36 SmokeMachine m: my %h; push %h, d => 5; dd %h
14:36 camelia rakudo-moar b9332a: OUTPUT: «Hash %h = {}␤»
14:37 sammers joined #perl6
14:37 tbrowder IOninja: i looked back at yr examples and still don't see a hash of arrays
14:37 SmokeMachine m: my %r; %r.push: 'a' => 'b'; say %r
14:37 camelia rakudo-moar b9332a: OUTPUT: «{a => b}␤»
14:38 SmokeMachine Why it works with '' but doesn't work without it?
14:38 ZzZombo joined #perl6
14:38 ZzZombo joined #perl6
14:39 SmokeMachine m: my %r; %r.push: a => 'b'; m: my %h; %h.push: 'a' => 'b'; dd %r, %h
14:39 camelia rakudo-moar b9332a: OUTPUT: «Hash %r = {}␤Hash %h = {:a("b")}␤»
14:39 tbrowder my examples have been with one key, but the need is for a basic hash of arrays, one mutable array per hash key
14:40 tbrowder how can that most painlessly and correctly be created incrementally? anyone?
14:41 tbrowder in p5 terms i believe: an HoA
14:44 SmokeMachine m: dd a => 4; dd 'a' => 4 # why?
14:44 camelia rakudo-moar b9332a: OUTPUT: «block <unit>␤:a(4)␤»
14:46 gfldex m: role R { method push($key, $value){ self.{$key}.push: $value; self } }; my %h does R; %h.push('A', 1); %h.push('B', 2); %h.push('A', 3); dd %h;
14:46 camelia rakudo-moar b9332a: OUTPUT: «Hash+{R} %h = {:A($[1, 3]), :B($[2])}␤»
14:46 gfldex tbrowder: ^^^
14:48 SmokeMachine gfldex: hash already has a push method, doesn't it?
14:48 gfldex SmokeMachine: yes
14:48 gfldex m: my %h; %h.push(a => 1); dd %h;
14:48 camelia rakudo-moar b9332a: OUTPUT: «Hash %h = {}␤»
14:49 gfldex i did expect it to add the Pair to the Hash.
14:49 timotimo SmokeMachine: because a => 4 is a named parameter and 'a' => 4 is a pair literal that'll be put into a positional parameter
14:49 SmokeMachine m: my %h; %h.push('A' => 1); %h.push('B' => 2); %h.push('A' => 3); dd %h;
14:49 camelia rakudo-moar b9332a: OUTPUT: «Hash %h = {:A($[1, 3]), :B(2)}␤»
14:50 SmokeMachine timotimo: ok, that makes sense...
14:50 gfldex timotimo: as stated in the docs :->
14:51 SmokeMachine gfldex: I didn't read everything... thanks... :(
14:51 timotimo yup, the docs say that
14:52 timotimo it's a common gotcha, especially for .push :)
14:52 gfldex luckily it wasn't me who wrote that
14:52 timotimo sooo, do the docs actually tell about s{abc} = "def"? i couldn't find anything about that form when i was answering that question on the users mailing list
14:52 * IOninja recalls writing that
14:53 gfldex timotimo: it's not in the docs because it's not in roast
14:53 SmokeMachine Couldn't the hash's push receive named parameters and act as it was positional pairs? I'm not sure if it's a good idea...
14:53 IOninja timotimo: last code example: https://docs.perl6.org/language/op​erators#s///_in-place_substitution
14:55 gfldex SmokeMachine: it could but then loads of ppl would not learn about the named-argument rule on Method
14:55 DrForr My mistake there, I'm afraid.
14:55 tbrowder ok, but why is, in my examples, %r<a>, not an array var?
14:56 SmokeMachine gfldex: thanks!
14:56 IOninja SmokeMachine: it'd make it much slower, lock us out from adding any options to the routine later on, and this quirk is present in literally all method calls, so adding support for that just in push is a drop in a bucket
14:56 IOninja tbrowder: which example exactly?
14:56 SmokeMachine IOninja: thanks!
14:57 timotimo OK, so there's a line in one of the examples... it's not very visible, though. like, it's not pointed out at all that that example is going to be presenting such a different syntax out of the blue
14:57 IOninja timotimo: well, it is, kinda. The last sentence is all about that syntax.
14:58 timotimo also: how the heck do we put it into the index?
14:58 timotimo i'd like it to have a heading of its own
14:59 tbrowder IOninja: my %r<a>; %r<a>.push: 'a'; # repeat push one or more times...
14:59 timotimo but "my %r<a>" doesn't even work?
15:00 tbrowder so no simple way to incrementally create a p6 HoA?, not good pr
15:01 timotimo of course there is?
15:01 timotimo let me try
15:01 Geth ¦ doc: 94a64bdbe3 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Method.pod6
15:01 Geth ¦ doc: index extra named arguments
15:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/94a64bdbe3
15:01 Geth ¦ doc: 1140358315 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Method.pod6
15:01 Geth ¦ doc: link to nextsame
15:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1140358315
15:02 timotimo m: my %h; %h<foo>.push(1); %h<foo>.push(2); %h<bar>.push(99); dd %h
15:02 camelia rakudo-moar b9332a: OUTPUT: «Hash %h = {:bar($[99]), :foo($[1, 2])}␤»
15:02 timotimo what's wrong with this?
15:02 tbrowder but there needs at least needs to be a good example in the docs which i'm happy to add if i knew how to make one :)
15:02 IOninja tbrowder: well, you keep using my %r<a> even though it's been pointed out to you that's not correct syntax.
15:04 IOninja tbrowder: which one keeps pushing to the first element?
15:04 tbrowder sorry, but isn't that what timotimo just did?
15:04 timotimo no
15:04 timotimo i used "my %h"
15:04 pmurias n "my %r<a>;" is the part that does not work
15:05 timotimo "my %h<foo>" would (in the future, when we've implemented that) be a declaration for a hash that only accepts the key "foo" and will never accept any other key
15:05 tbrowder oh, slapping forehead,...gross series of typos
15:06 tbrowder let me try again:
15:06 timotimo oh, i think i see what your problem is
15:06 timotimo m: my %h; %h<a>.push(1); %h<a>.push(2); my @a = %h<a>; my @b = @%h<a>; dd @a, @b;
15:06 camelia rakudo-moar b9332a: OUTPUT: «Array @a = [[1, 2],]␤Array @b = [Failure.new(exception => X::AdHoc.new(payload => "Type Seq does not support associative indexing."), backtrace => Backtrace.new)]␤»
15:06 timotimo whoops %)
15:07 timotimo m: my %h; %h<a>.push(1); %h<a>.push(2); my @a = %h<a>; my @b = @(%h<a>); dd @a, @b;
15:07 camelia rakudo-moar b9332a: OUTPUT: «Array @a = [[1, 2],]␤Array @b = [1, 2]␤»
15:07 timotimo tbrowder: your mistake was that the arrays in the hash are in an itemized container, so when you assigned to @a with "my @a = %h<a>" you were only putting a single item into @a
15:07 timotimo and you interpreted that as if %h<a> was a list with a list as its first element
15:08 tbrowder m: my %r; %r<a>.push: 'a'; %r<a>.push: '3'; say %r<a>.perl
15:08 camelia rakudo-moar b9332a: OUTPUT: «$["a", "3"]␤»
15:08 timotimo exactly
15:10 cibs joined #perl6
15:11 tbrowder timotimo: thanks for yr patience, and i'll go back and ensure my prog uses right syntax, also thanks IOninja
15:11 timotimo sure thing
15:18 lukaramu joined #perl6
15:22 pmurias 'use Test; plan(1); ok(1)' just started working in local rakudo.js :)
15:22 ZzZombo # Sleep a bit to prevent 100% CPU usage
15:22 ZzZombo sleep 0.05;
15:22 ZzZombo Surely there is a better way to do that, isn't there? Like yield in some languages.
15:23 pmurias ZzZombo: where is that used?
15:24 IOninja heh
15:25 timotimo you could use NativeCall; sub pthread_yield is native(Str) returns int32 {*}; pthread_yield();
15:27 IOninja And he's gone :)
15:27 ZzZombo https://github.com/azawawi/perl6-electro​n/blob/master/lib/Electron/App.pm6#L120
15:28 emeric joined #perl6
15:29 IOninja Looks normal to me.
15:30 ZzZombo Speaking of that module, how does it work? Isn't Electron is JS+HTML+Node.js, so can I, say, populate items in a combobox dynamically from Perl using that, or what does that actually allow you to do?
15:30 IOninja You could use Supply.interval if you want it non-blocking.
15:30 IOninja or show the .run into start
15:31 IOninja *shove
15:32 agentzh joined #perl6
15:32 Geth ¦ doc: f594c8e0bc | (Wenzel P. P. Peppmeyer)++ | doc/Type/Method.pod6
15:32 Geth ¦ doc: doc lastcall
15:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f594c8e0bc
15:33 gfldex ENODOC--
15:33 gfldex sadly I don't know what the current value of ENODOC is
15:37 pmurias ZzZombo: it seems to talk to electron using http
15:38 andrzejku hi, people
15:38 andrzejku what do you know about Larry Wall and Perl6?
15:39 pmurias ZzZombo: the js backend I'm working on should allow to run on electron directly, but it a bit away from being usable as a toy and a long way away from being usable for something serious
15:39 pmurias s/to run/running
15:40 AlexDaniel andrzejku: ¯\_(ツ)_/¯
15:40 ZzZombo What is Perl6 again? I forget.
15:41 * AlexDaniel googles
15:41 AlexDaniel “Larry Wall maintains a reference grammar known as STD.pm6”
15:41 AlexDaniel :S
15:42 gfldex andrzejku: i know that the biggest value for „Larry Wall“ is TimToady and the biggest value for Perl 6 is Rakudo.
15:43 andrzejku :)
15:43 gfldex andrzejku: „biggest“ in this context means „largest impact on mankind“
15:49 El_Che andrzejku: you may confuse Larry Wall with that guy with the same name that succesfully started a business with colourfull shirts and cool hats: https://i.ytimg.com/vi/HAXGD3JE7pU/hqdefault.jpg
15:56 Geth ¦ doc: 86ff9ff317 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod6
15:56 Geth ¦ doc: improve wording and examle
15:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/86ff9ff317
16:05 ZzZombo Is there a way to output something like 1000/3 as such, but 5/10 as 0.5?
16:07 tbrowder timotimo: my examples today were very shortened from the code i'm working with. here today we could see the array form with the say .perl syntax, but in my real code i was seeing just a string concatenation of the array contents. i vaguely remember having the same problem last year but unpacking the array in code took some magic...don't know what best
16:07 tbrowder practice is but i was creating a var like this: my @d = %r<a> which gave a single string but this works: my @d = @(%r<a>) which gave me the array elements
16:08 Geth ¦ doc: 31ac0d10c8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Pair.pod6
16:08 Geth ¦ doc: show how to handle colon lists
16:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/31ac0d10c8
16:08 tbrowder looks kind of like dereferencing AND i failed to say the hash var was returned from the sub that actually created it!!
16:08 andrzejku what do you think if the people programming Perl are smarter than for ex. Ruby?
16:09 andrzejku Perl6 suppose use more brain
16:10 tbrowder so i guess it is a reference, but i thought references were supposed to be kind of hidden for most uses, as in everything is kind of a reference
16:10 IOninja andrzejku: a nonsensical generalization.
16:10 sena_kun andrzejku, brainf-k supposes even heavier usage of brain activity. :)
16:11 IOninja m: .perl.say given <1000/3>, <5/10>
16:11 camelia rakudo-moar b9332a: OUTPUT: «(<1000/3>, 0.5)␤»
16:11 IOninja ZzZombo: ^
16:12 IOninja m: .subst(:g, /<[<>]>/, '').perl.say given <1000/3>, <5/10>
16:12 camelia rakudo-moar b9332a: OUTPUT: «"333.333333 0.5"␤»
16:12 IOninja m: .perl.subst(:g, /<[<>]>/, '').say given <1000/3>, <5/10>
16:12 camelia rakudo-moar b9332a: OUTPUT: «(1000/3, 0.5)␤»
16:13 IOninja m: .perl.trans(«<>» => '').say given <1000/3>, <5/10>
16:13 camelia rakudo-moar b9332a: OUTPUT: «(1000/3, 0.5)␤»
16:13 Geth ¦ doc: becaee574d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Pair.pod6
16:13 Geth ¦ doc: index colon-list in Pair
16:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/becaee574d
16:17 IOninja tbrowder: no referencing or dereferencing involved. %r<a> array is itemized, so you're providing just 1 item to @a. The `@` is a coercer, not dereferencer. You could also slip with `|
16:17 IOninja m: my %r = :a[<a b c>]; my @d = |%r<a>; dd @d
16:17 camelia rakudo-moar b9332a: OUTPUT: «Array @d = ["a", "b", "c"]␤»
16:17 IOninja m: my %r = :a[<a b c>]; my @d = @%r<a>; dd @d
16:17 camelia rakudo-moar b9332a: OUTPUT: «Array @d = [Failure.new(exception => X::AdHoc.new(payload => "Type Seq does not support associative indexing."), backtrace => Backtrace.new)]␤»
16:17 IOninja m: my %r = :a[<a b c>]; my @d = @(%r<a>); dd @d
16:17 camelia rakudo-moar b9332a: OUTPUT: «Array @d = ["a", "b", "c"]␤»
16:18 IOninja m: my %r = :a[<a b c>]; my @d = %r<a>.list; dd @d
16:18 camelia rakudo-moar b9332a: OUTPUT: «Array @d = ["a", "b", "c"]␤»
16:18 IOninja m: my %r = :a[<a b c>]; my @d = %r<a><>; dd @d
16:18 camelia rakudo-moar b9332a: OUTPUT: «Array @d = ["a", "b", "c"]␤»
16:21 tbrowder IOninja: thanks, that helps understand the array some better, i have to say the docs probaby could introduce arrays a little gentler, at least for me, haven't gotten head wrapped around itemization yet
16:24 IOninja If you have to boxes of crayons and I tell you to put one in the other, there are two ways to interpret it: shove the entire box into the other (so you retain information about the crayons inside of it) or move the crayons themselves, discarding one box. The former is itemization—treating something as one thing—the latter is the slipping of one array into another: you end up with one homogenous set of
16:24 IOninja elements.
16:24 IOninja *two boxes
16:26 IOninja m: my @box1 = <a b c>; my @box2 = <d e f>; @box1.push: @box2; say @box1
16:26 camelia rakudo-moar b9332a: OUTPUT: «[a b c [d e f]]␤»
16:26 IOninja m: my @box1 = <a b c>; my @box2 = <d e f>; @box1.push: |@box2; say @box1
16:26 camelia rakudo-moar b9332a: OUTPUT: «[a b c d e f]␤»
16:26 moritz of just use append
16:27 moritz my @box1 = <a b c>; my @box2 = <d e f>; @box1.append: @box2; say @box1
16:27 moritz m: my @box1 = <a b c>; my @box2 = <d e f>; @box1.append: @box2; say @box1
16:27 camelia rakudo-moar b9332a: OUTPUT: «[a b c d e f]␤»
16:27 moritz pyhton does pretty much the same thing, excep that Perl 6's "push" is called "append" in python, and Perl 6's "append" is spelled += in python
16:33 tbrowder okay, i'll experiment some more then, thanks
16:39 bwisti joined #perl6
16:41 timotimo there's also the "extend" method which maps to perl6's "append"
16:48 tbrowder sena_kun: pr 1190 looks good to me, too bad dba adverb isn't still usable!!
16:49 sena_kun tbrowder, it is usable(as I see it), just doesn't in roast yet. Thanks, I'll merge it right away.
16:49 sena_kun *isn't
16:49 tbrowder hm, can you add a test in roast?
16:50 sena_kun tbrowder, hmmm, maybe I can, but not today, I think. I'm working on my course paper now. :/ Added this to my todo-list.
16:52 tbrowder ok, maybe just add an issue and say you will work on it. good luck on paper...subject?
16:52 Geth ¦ doc/master: 4 commits pushed by Altai-man++
16:52 Geth ¦ doc/master: b6a62da38a | Draft of tilde character explanation
16:52 Geth ¦ doc/master: 7453809342 | Remove information about :dba that is not in roast(now).
16:52 Geth ¦ doc/master: 49a1cef4fe | Add FAILGOAL explanation and example
16:52 Geth ¦ doc/master: 2518c54b34 | Merge pull request #1190 from perl6/tilde-explanation
16:52 Geth ¦ doc/master: review: https://github.com/perl6/doc/c​ompare/becaee574d...2518c54b34
16:52 tbrowder or title?
16:55 sena_kun tbrowder, I've opened an issue already. Title, eeeh... It is a rough translation from Russian(Ukrainian? Both), but "Usage of refinement types for a static verification of code invariants". Or something along the lines.
16:56 sena_kun "of code properties" maybe fit better... anyway, not something interesting.
16:56 sena_kun s/fit/fits/
16:57 Geth ¦ doc: 1509c4d1d6 | (Wenzel P. P. Peppmeyer)++ | 47 files
16:57 Geth ¦ doc: add tags to Language/*.pod6
16:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1509c4d1d6
16:57 Geth ¦ doc: 238865ae7e | (Wenzel P. P. Peppmeyer)++ | doc/Language/unicode_entry.pod6
16:57 Geth ¦ doc: forgot one
16:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/238865ae7e
16:58 sena_kun -1 doc issue. only 216 left. \o/
16:58 tbrowder sounds like a page turner!
16:59 sena_kun tbrowder, glad to hear it!
17:01 tbrowder sena_kun: the pr 1187 looks ok to me, too. have you figured out the conflict?
17:01 tbrowder maybe try splitting into smaller prs
17:02 sena_kun tbrowder, it was my edits for output style, so I can fix it easily. The new web editor is very handy too.
17:04 Geth ¦ doc/master: 4 commits pushed by (Antonio Quinonez)++, Altai-man++
17:04 Geth ¦ doc/master: 61541cb149 | edits to grammar tutorial
17:04 Geth ¦ doc/master: 4c5fa87758 | Merge branch 'master' of https://github.com/perl6/doc into grammars-pod
17:04 Geth ¦ doc/master: 5a93f4d932 | Merge branch 'master' into grammar
17:04 Geth ¦ doc/master: ad90a3cfb4 | Merge pull request #1187 from antquinonez/grammar
17:04 Geth ¦ doc/master: review: https://github.com/perl6/doc/c​ompare/238865ae7e...ad90a3cfb4
17:09 ins64 joined #perl6
17:15 stmuk_ odd
17:16 stmuk_ https://mouq.github.io/slangs.html
17:19 ChoHag joined #perl6
17:21 ufobat joined #perl6
17:29 IOninja Odd what?
17:31 espadrine joined #perl6
17:33 stmuk_ well the footer says its generated from a repo it isn't
17:34 stmuk_ I was git greping perl/doc but its a different repo
17:36 IOninja probably just a copy-paste of a page that used to be in docs but was taken down for Christmas because we never finalized slangs API
17:38 pyrimidine joined #perl6
17:42 stmuk_ I don't think the content was actually ever in the docs repo itself but generally yes
17:51 timotimo no, you misread the footer
17:51 timotimo "using htmlify.p6 from perl6/doc on github"
17:52 timotimo that's the intended bracketing for that phrase
17:53 regnarg Plans for a Perl6 chromium-based web browser: https://github.com/regnarg/perl6-cef Currently it doesn't do much apart from initializing the CEF using NativeCall but it's a start...
17:54 IOninja cool
17:54 travis-ci joined #perl6
17:54 travis-ci Doc build errored. Altai-man 'Merge branch 'master' into grammar'
17:54 travis-ci https://travis-ci.org/antqu​inonez/doc/builds/203190820 https://github.com/antquinonez/doc/​compare/4c5fa87758bd...5a93f4d93261
17:54 travis-ci left #perl6
17:56 regnarg It might need some improvements to NativeCall, I think it's currently not possible to put function pointers to structs, which half of the CEF API is comprised of. But some callback code is in NativeCall already and shouldn't be hard to adapt.
17:58 timotimo i think you can nativecast a pointer to a function by giving a signature or something like that
18:00 regnarg I will more often need the opposite: put a pointer to a Perl6 function (callback) into a struct. I'm not sure whether it can be currently done with some casting because it requires generating a C wrapper function. But the required infrastructure is already there because you can already pass Perl6 callbacks as arguments to C functions (at least the docs say so).
18:00 timotimo nativecall does the c wrapper thing for you
18:01 AlexDaniel m: my @manna = :a1, :b2, :c3; dd @manna
18:01 camelia rakudo-moar 254f76: OUTPUT: «Array @manna = [:a1, :b2, :c3]␤»
18:01 AlexDaniel m: my @manna = :a1 :b2 :c3; dd @manna
18:01 camelia rakudo-moar 254f76: OUTPUT: «Array @manna = [:a1]␤»
18:01 AlexDaniel hm
18:01 timotimo you might have to create a function that takes a pointer and immediately returns it to appease nativecall?
18:01 RabidGravy I think there is support for callable attributes in CSTructs
18:01 IOninja There's a ticket for that.
18:01 regnarg That might run into problems with the lifetime of the C wrapper
18:02 AlexDaniel regnarg: nice!
18:02 regnarg It might get freed after the function returns
18:02 regnarg Specifically you cannot just keep a void pointer around because NativeCall would not know when to free the wrapper
18:03 regnarg So my guess is that some (possibly simple) changes to NativeCall would be needed.
18:03 regnarg But I might be wrong, haven't yet looked into the details.
18:03 timotimo no, the wrappers leak
18:03 IOninja AlexDaniel: https://rt.perl.org/Ticket/Displ​ay.html?id=129143#ticket-history and https://rt.perl.org/Ticket/Displ​ay.html?id=127143#ticket-history and https://rt.perl.org/Ticket/Displ​ay.html?id=127134#ticket-history
18:03 timotimo they get freed at end of life at the moment
18:03 IOninja more or less
18:03 regnarg Ok, in that case it might just happen to work
18:04 regnarg Even though it's probably not a robust solution in the long term
18:04 timotimo right, something clever is needed
18:04 regnarg I'll try that sometime soon
18:04 timotimo you want to just pass an anonymous block to a c function and not worry about it
18:04 AlexDaniel IOninja: so add RT #130816 to the list? :)
18:04 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130816
18:04 timotimo but you'll have to also assign it to a variable and manually free it at some point with some kind of API that we'll have to design
18:05 AlexDaniel not sure if I will ever be able to use chromium-based anything because it never respected my system settings, but this looks like a great project :)
18:06 mspo left #perl6
18:06 regnarg Chromium has a very good core (w.r.t. speed and security) but it UI and especially configurability is horrendous.
18:07 regnarg But the CEF API is quite flexible (you can intercept every key event, every request, and so on) so one should be able to build something more flexible atop it.
18:13 Util joined #perl6
18:14 Tonik joined #perl6
18:15 robertle i have some functionality i want to put in a module, but I sometimes need it exposed in an OO fashion, sometimes procedurally. I could put both in the same module, but is that a terrible idea? so you would "use MuStuff" which would give you a role "MyStuff" as well as a sub my-stuff
18:15 agentzh joined #perl6
18:15 robertle alternatively these could be two modules, e.g. Role::MyStuff and Module::MyStuff... not sure what is worse
18:17 DrForr I'd do the export module and have it be just a wrapper to methods in the main module.
18:20 RabidGravy yeah
18:20 robertle so two modules, the OO one wrapping thje procedural one?
18:23 regnarg Alternatively, you can use the export groups functionality
18:23 regnarg Or sets or how it is called
18:24 regnarg https://docs.perl6.org/language/modul​es#Exporting_and_Selective_Importing
18:25 regnarg and then the user does either    use MyModule :oop;   or use MyModule :procedural;   or even use MyModule :ALL;
18:25 regnarg It might be cleaner than two modules but it depends on the specifics
18:25 robertle oh wow, that sounds great I'll do that!
18:26 robertle specifics: it's like "Pluggable"
18:28 ChoHag joined #perl6
18:31 Geth ¦ doc: fdf275abd2 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Pair.pod6
18:31 Geth ¦ doc: make index entry user friendly
18:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fdf275abd2
18:49 rindolf joined #perl6
18:55 cibs joined #perl6
18:58 pmurias is there a reason for IO::Handle.write to return True rather then the amount of bytes written?
19:06 imcsk8 joined #perl6
19:07 AlexDaniel IOninja: ↑
19:07 AlexDaniel :)
19:07 mawkish__ joined #perl6
19:09 Geth ¦ doc: b8af670621 | (Wenzel P. P. Peppmeyer)++ | doc/Language/traps.pod6
19:09 Geth ¦ doc: show constant fat arrow trap
19:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b8af670621
19:13 mawkish__ joined #perl6
19:17 Geth ¦ doc: 84fbe82117 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Bag.pod6
19:17 Geth ¦ doc: link to Associative
19:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/84fbe82117
19:29 mawkish__ joined #perl6
19:30 Geth ¦ doc: 4afe7dd9b5 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
19:30 Geth ¦ doc: doc Any.Bag and Any.BagHash
19:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4afe7dd9b5
19:32 Geth ¦ doc: c95320f986 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/traps.pod6
19:32 Geth ¦ doc: “it's” → “its”
19:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c95320f986
19:34 regnarg ^ Language traps indeed ;-)
19:37 mawkish__ joined #perl6
19:40 Geth ¦ doc: dbfa3fbdf9 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
19:40 Geth ¦ doc: doc Any.Set|SetHash|Mix|MixHash
19:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/dbfa3fbdf9
19:40 Geth ¦ doc: f4f9d7b22d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
19:40 Geth ¦ doc: doc Any.Supply
19:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f4f9d7b22d
19:43 gfldex i just checked Any.pod6 with util/list-missing-methods.p6 and decided to look the other way
19:45 timotimo Any has all the methods
19:46 moritz we should really have called it All, not Any :-)
19:48 gfldex wait! I know Perl 6 so I can write a script that will generate all those docs!
19:48 TEttinger joined #perl6
19:49 mawkish__ joined #perl6
19:52 moritz maybe we could have scheme where for example Str methods that appear in Any are actually documented in Str, and there's an :inject<Any> somwhere that copies the docs to Any
19:52 moritz and some magic in htmlify to make that happen
19:55 Geth ¦ doc: 80d01ab35b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
19:55 Geth ¦ doc: doc Any.Array|List|Map
19:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/80d01ab35b
19:57 gfldex moritz: the method will show up on the page, just a little further down. And the information where the method actually comes from may be important to the reader.
20:05 mawkish__ joined #perl6
20:08 travis-ci joined #perl6
20:08 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'link to Associative'
20:08 travis-ci https://travis-ci.org/perl6/doc/builds/203219202 https://github.com/perl6/doc/com​pare/b8af6706210d...84fbe8211791
20:08 travis-ci left #perl6
20:08 jjido joined #perl6
20:08 Geth ¦ perl6-most-wanted: e4c5587f7d | (Tom Browder)++ | most-wanted/modules.md
20:08 Geth ¦ perl6-most-wanted: the p5 module is a good model
20:08 Geth ¦ perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/e4c5587f7d
20:08 Geth ¦ doc: ac7659bb01 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
20:08 Geth ¦ doc: fix Any.list|push
20:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ac7659bb01
20:11 mawkish__ joined #perl6
20:11 Geth ¦ doc: d2cc944053 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
20:11 Geth ¦ doc: doc Any.Hash|Slip|hash
20:11 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d2cc944053
20:16 bjz joined #perl6
20:17 mawkish__ joined #perl6
20:18 wamba1 joined #perl6
20:20 Geth ¦ doc: 8372fe9e78 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
20:20 Geth ¦ doc: fix Defined as:
20:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8372fe9e78
20:25 mawkish__ joined #perl6
20:27 labster joined #perl6
20:27 ins64 joined #perl6
20:27 Geth ¦ doc: bdf8ca8cb2 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
20:27 Geth ¦ doc: add methods that are TODO for Any
20:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bdf8ca8cb2
20:33 mawkish__ joined #perl6
20:33 agentzh joined #perl6
20:35 cibs joined #perl6
20:37 mawkish__ joined #perl6
20:43 ins64 joined #perl6
20:50 ins64 joined #perl6
20:57 mawkish__ joined #perl6
21:03 mawkish__ joined #perl6
21:06 SmokeMachine Is camelia going to run rakudo on js?
21:07 mawkish__ joined #perl6
21:12 bladardle joined #perl6
21:16 travis-ci joined #perl6
21:16 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'doc Any.Hash|Slip|hash'
21:16 travis-ci https://travis-ci.org/perl6/doc/builds/203231004 https://github.com/perl6/doc/com​pare/ac7659bb0160...d2cc94405337
21:16 travis-ci left #perl6
21:18 ChoHag joined #perl6
21:21 mawkish__ joined #perl6
21:29 travis-ci joined #perl6
21:29 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'fix Defined as:'
21:29 travis-ci https://travis-ci.org/perl6/doc/builds/203232955 https://github.com/perl6/doc/com​pare/d2cc94405337...8372fe9e78c9
21:29 travis-ci left #perl6
21:38 ins64 joined #perl6
21:49 ins64 joined #perl6
22:00 cale2 joined #perl6
22:04 Geth ¦ doc: 3085d7c9b6 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6
22:04 Geth ¦ doc: doc Any.min|max|minmax
22:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3085d7c9b6
22:12 geekosaur joined #perl6
22:20 BenGoldberg joined #perl6
22:23 mawkish__ joined #perl6
22:29 wamba1 joined #perl6
22:29 mawkish__ joined #perl6
22:41 Voldenet joined #perl6
22:41 Voldenet joined #perl6
22:49 BenGoldberg m: use NativeCall; dd cglobal('libc.so.6', 'errno', int32)
22:49 camelia rakudo-moar c1a0fa: OUTPUT: «2␤»
22:49 BenGoldberg m: use NativeCall; dd cglobal('libc.so.6', 'nosuchvar', int32)
22:49 camelia rakudo-moar c1a0fa: OUTPUT: «Cannot locate symbol 'nosuchvar' in native library 'libc.so.6'␤  in block  at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 422␤  in block <unit> at <tmp> line 1␤␤»
22:55 mawkish__ joined #perl6
22:59 mawkish__ joined #perl6
23:03 BenGoldberg m: use NativeCall; dd cglobal('libc.so.6', 'errno', int)
23:03 camelia rakudo-moar c1a0fa: OUTPUT: «2␤»
23:04 tbrowder ref run and shell: the docs say something like to use shell in lieu of run if you need special redirection or chars that need special interp by the shell.  but, since i started with p6 it always seems that run can't handle. much of anything
23:05 mawkish__ joined #perl6
23:05 tbrowder m: run "ps -C http o cmd="
23:05 camelia rakudo-moar c1a0fa: OUTPUT: «run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub run at src/RESTRICTED.setting line 14␤  in block <unit> at <tmp> line 1␤␤»
23:06 gfldex tbrowder: you need to separate arguments by hand for run
23:07 IOninja run <ps -C http o cmd=>
23:08 AlexDaniel .oO( run ‘ps’, ‘-C’, ‘http’, ‘o’, ‘cmd=>’ # no magic required )
23:09 mawkish__ joined #perl6
23:09 tbrowder hm, well, i'll try that, but the other issue is that the docs don't mention that you can use a shell invocation just like run to create a new Proc object
23:09 AlexDaniel “The return value is of type Proc.”
23:10 AlexDaniel https://docs.perl6.org/routine/shell
23:11 tbrowder yes, it does say that, but i think it also should show creating a new proc object just as run. any objections to adding it?
23:11 kanishka joined #perl6
23:13 mawkish__ joined #perl6
23:13 geekosaur joined #perl6
23:14 tbrowder also i have used run with just 2 args: 'cmd', 'cmd args'
23:15 Geth ¦ doc: 4a33f5e852 | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO.pod6
23:15 Geth ¦ doc: provide example for run
23:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4a33f5e852
23:15 BenGoldberg dd print => 1
23:15 tbrowder i'll go back and make sure i didn't make another dumb error
23:15 BenGoldberg m: dd print => 1
23:15 camelia rakudo-moar c1a0fa: OUTPUT: «block <unit>␤»
23:15 BenGoldberg m: dd 'print' => 1
23:15 camelia rakudo-moar c1a0fa: OUTPUT: «:print(1)␤»
23:17 mawkish__ joined #perl6
23:18 IOninja m: IO::Handle.new(:path<STDIN>)
23:18 camelia rakudo-moar c1a0fa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of <STDIN>; in Perl 6 please use $*IN.lines (or add whitespace to suppress warning)␤at <tmp>:1␤------> 3IO::Handle.new(:path<7⏏5STDIN>)␤»
23:19 IOninja Really? -_-
23:23 mawkish__ joined #perl6
23:26 timotimo that's a bad miss :D
23:27 kurahaupo__ joined #perl6
23:35 kurahaupo_ joined #perl6
23:35 tbrowder AlexDaniel: you are right, every little piece! no wonder i have so much trouble with run.
23:37 tbrowder i really think the docs need tweaking to favor shell for casual use--why should i want to break up complex shell commands piece by piece? got a good use case?
23:39 gfldex i just broke the highlighter :) https://docs.perl6.org/type/IO#sub_run
23:39 AlexDaniel tbrowder: no.
23:40 gfldex tbrowder: it's the other way around, use run for casual use and be really damn careful with shell
23:40 gfldex tbrowder: shell escapes are tricky
23:41 AlexDaniel tbrowder: you can read this blog post if you are interested: https://github.com/perl6/specs/pull/102
23:42 lep-delete joined #perl6
23:51 kybr joined #perl6
23:51 Ulti so whats the solution to avoiding %*LANG
23:53 tbrowder AD, i have read that blog post...
23:54 raiph joined #perl6
23:57 tbrowder btw, i can't remember ever using escapes in a shell command, ever, in or out of perl 5 or 6.  btw, glad to see p6 mkdir defaults to the -p arg that p5 didn't last time i looked.  that was one thing that always made me go to shell.
23:58 Actualeyes joined #perl6
23:58 kyan joined #perl6
23:59 AlexDaniel well, unless your path is fixed, you'll have a security hole right there…

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

Perl 6 | Reference Documentation | Rakudo