Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-06

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 timotimo at least they had lots of space on the discs for code ... except they put lots of FMV in there :D
00:02 pilne and they were limited on how much they could cram in the RAM as well, it really was quite a feat
00:04 roguelazer joined #perl6
00:04 timotimo oh, of course
00:04 timotimo i didn't consider that
00:05 pilne although i still have a code-crush on mr. carmack of Id fame
00:06 timotimo he's a cool one
00:10 mr-foobar joined #perl6
00:11 ugexe geekosaur: `PERL6LIB="inst#/home/perl6/custom" perl6 -e "use Text::Table::Simple; say 'ok'"` or `PERL6LIB="CompUnit::Repository::Tar#repos/Perl6-Text--Table--Simple.tar.gz" perl6 -e "use Text::Table::Simple; say 'ok'"`
00:12 ugexe (e.g. short identifier version, and full class-name version)
00:14 ugexe and does `PERL6LIB="..." prove -e 'perl6' ...` even carry the PERL6LIB env var through to new processes?
00:14 ugexe thought it would have to be (export PERL6LIB="..." prove -e 'perl6' ...)
00:21 raschipi If you put the variable asignement in the same line in the shell, it's exported to the command being executed right after it.
00:21 raschipi If it's in a line of it's own, you'll need to export it to get it to affect multiple commands.
00:22 timotimo and if you're using fish, it forces you to put "env" in front of any such assignments that go before a command
00:24 raschipi Well, that means it doesn't have the feature at all.
00:25 raschipi env is a program that does it, external to fish.
00:35 mcmillhj joined #perl6
00:41 Cabanossi joined #perl6
00:41 TEttinger joined #perl6
00:42 colomon is there a standard idiom for “run to completion” for Procs spawned by run?
00:42 colomon seems like $proc.out.slurp works, but that seems roundabout
00:49 raschipi The docs have 'say $p.out.slurp: :close;'
00:52 Geth ¦ doc: flussence++ created pull request #1361: Small IO guide formatting fix
00:52 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1361
01:00 lookatme joined #perl6
01:00 lookatme morning .o/
01:08 ugexe so run '...';
01:08 sivoais joined #perl6
01:10 aborazmeh joined #perl6
01:10 aborazmeh joined #perl6
01:14 mr-foobar joined #perl6
01:25 colomon ugexe: “so run” definitely doesn’t do it?
01:31 colomon afk
01:42 tardisx joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:53 mcmillhj_ joined #perl6
02:11 mr-foobar joined #perl6
02:33 labster joined #perl6
02:40 TEttinger joined #perl6
02:40 Cabanossi joined #perl6
02:43 mr-foobar joined #perl6
02:43 noganex joined #perl6
03:10 Cabanossi joined #perl6
03:11 mr-foobar joined #perl6
03:22 fatguy joined #perl6
03:22 Geth ¦ doc: 791f267502 | (Will "Coke" Coleda)++ | xt/code.pws
03:22 Geth ¦ doc: learn new code snippet
03:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/791f267502
03:41 ugexe m: say now; say so run "perl6", "-e", "sleep 5"; say now
03:41 camelia rakudo-moar 8efffb: OUTPUT: «Instant:1496720499.957286␤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␤␤»
03:43 mr-foobar joined #perl6
03:44 ugexe really just need to sink it
03:47 ugexe say now; run( "perl6", "-e", "sleep 5", :out ) andthen *.out.close; say now
03:47 evalable6 ugexe, rakudo-moar 8efffb1d1: OUTPUT: «(exit code 1) Instant:1496720959.972139␤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/xLUoZS2u4V line 1␤»
03:53 [Coke] .tell pmurias build for rakudo/js fails on OS X for me.
03:53 yoleaux [Coke]: I'll pass your message to pmurias.
03:55 Cabanossi joined #perl6
03:56 [Coke] (ah, due to self-signed certs)
03:56 Cabanoss- joined #perl6
04:11 fatguy is there 'Carp' 'Croak' in perl 6 ?
04:19 zengargoyle_ there are Exceptions...
04:19 zengargoyle_ m: fail "oops"
04:19 camelia rakudo-moar 8efffb: OUTPUT: «oops␤  in block <unit> at <tmp> line 1␤␤»
04:20 zengargoyle_ i think they work a bit different than die/carp/croak but basically handle the same purpose.
04:27 KDr2 joined #perl6
04:37 curan joined #perl6
04:40 mr-foobar joined #perl6
05:06 fatguy look the same
05:16 Cabanossi joined #perl6
05:23 lowbro joined #perl6
05:23 lowbro joined #perl6
05:30 khisanth_ joined #perl6
05:43 mr-foobar joined #perl6
05:46 Cabanossi joined #perl6
05:51 xtreak joined #perl6
05:52 BenGoldberg joined #perl6
05:56 nadim joined #perl6
05:58 lookatme joined #perl6
06:04 BenGoldberg joined #perl6
06:11 domidumont joined #perl6
06:12 mr-foobar joined #perl6
06:16 domidumont joined #perl6
06:34 domidumont joined #perl6
06:34 wamba joined #perl6
06:42 fatguy how to set schema using DBlish ?
06:43 mr-foobar joined #perl6
06:47 dj_goku joined #perl6
06:47 dj_goku joined #perl6
06:47 wtw joined #perl6
06:50 hahainternet joined #perl6
06:50 m0ltar joined #perl6
06:52 shmibs joined #perl6
07:08 Actualeyes joined #perl6
07:12 mr-foobar joined #perl6
07:14 moritz fatguy: what do you mean by "set schema"?
07:16 lizmat colomon: could it be that the program you run is async?  in other words, it returns immediately and keeps playing?
07:16 Cabanossi joined #perl6
07:17 lizmat run() appears to wait until completion for me:
07:17 lizmat $ time perl6 -e 'run <sleep 10>'
07:17 lizmat real0m10.160s
07:18 simonm_ joined #perl6
07:18 * lizmat clickbaits https://p6weekly.wordpress.com/2017/06/05/2017-23-fulfilled-tap/
07:18 tyil already read it
07:19 tyil oh wait
07:19 tyil its tuesday
07:19 tyil lizmat: p6 meetup tonight in amsterdam?
07:19 lizmat yes, afaik
07:19 tyil eater: ^
07:19 lizmat we'll be going there
07:19 tyil u must cum
07:20 lizmat there's only the tiny matter of not having one with a key to TechInc at 6pm
07:20 tyil hmm
07:20 tyil isnt there a p6 module to solve this
07:29 eater /f then
07:30 eater k
07:36 pecastro joined #perl6
07:41 lizmat eater tyil looks like the key issue at TechInc tonight is fixed
07:41 cgfbee joined #perl6
07:42 tyil lizmat: yay :D
07:42 tyil otherwise just apply TIMTOWTDI to the opening the door :'D
07:42 lizmat actually, it's 3 doors we need to get through  :-)
07:43 mr-foobar joined #perl6
07:43 fatguy moritz: https://www.postgresql.org/docs/current/static/ddl-schemas.html
07:45 moritz fatguy: I guess you could execte the "SET search_path ..." with a .do call
07:46 Cabanossi joined #perl6
07:46 leont joined #perl6
07:46 leont I'm trying to name a role Scalar, and rakudo is rather complaining about it
07:46 leont Is that supposed to be illegal?
07:48 leont HMmm, minimal test case doesn't bomb, let's see if I can find the trigger
07:48 khw joined #perl6
07:48 fatguy moritz: ok, so there's no parameter to handle that 'set search_path' on .connect call ?
07:49 salv0 joined #perl6
07:52 lizmat benchable6: help
07:52 benchable6 lizmat, Like this: benchable6: f583f22,HEAD my $a = ‘a’ x 2¹⁶; for ^1000 {my $b = $a.chop($_)} # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Benchable
07:53 moritz fatguy: not that I'm aware of
07:53 lizmat benchable6: 2017.05,HEAD my @w = ^50 .map( { my $now = now; run <<perl6 -e "">>; ((now - $now) * 1000).Int }); say @w.sum/@w
07:53 benchable6 lizmat, starting to benchmark the 2 given commits
07:53 benchable6 lizmat, benchmarked the given commits, now zooming in on performance differences
07:53 benchable6 lizmat, ¦2017.05: ««run failed, exit code = 1, exit signal = 0»» ¦HEAD: ««run failed, exit code = 1, exit signal = 0»»
07:53 domm1 fatguy: you could do "alter database foo set search_path to bar,public", but that's probably not what you want
07:56 fatguy moritz: thanks !
07:56 lizmat committable6: help
07:56 committable6 lizmat, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’ # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Committable
07:57 fatguy domm1: yes, i just want to change it on particular connection
07:57 lizmat m: my @w = ^50 .map( { my $now = now; run <<perl6 -e "">>; (now - $now) * 1000 }); say (@w.sum/@w).fmt("%.2f")
07:57 camelia rakudo-moar 8efffb: 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␤␤»
07:57 lizmat argh
07:57 g4 joined #perl6
07:57 g4 joined #perl6
07:58 parv joined #perl6
08:00 leont evalable6: role Scalar {}; my $foo;
08:00 evalable6 leont, rakudo-moar 8efffb1d1: OUTPUT: «(exit code 1) ===SORRY!===␤You cannot create an instance of this type (Scalar)»
08:00 leont That is a bug, right?
08:01 dakkar joined #perl6
08:01 leont It shouldn't look up the Scalar container by name in the local namespace, that doesn't make sense
08:04 moritz that's not quite ironed out, I think
08:11 mr-foobar joined #perl6
08:41 mr-foobar joined #perl6
08:46 Cabanossi joined #perl6
09:06 pmurias joined #perl6
09:06 pmurias hi
09:06 yoleaux 03:53Z <[Coke]> pmurias: build for rakudo/js fails on OS X for me.
09:07 pmurias [Coke]: how does it fail?
09:09 wamba joined #perl6
09:09 lookatme joined #perl6
09:11 mr-foobar joined #perl6
09:13 kst joined #perl6
09:22 robertle joined #perl6
09:24 xtreak joined #perl6
09:30 xtreak_ joined #perl6
09:33 lizmat joined #perl6
09:42 mr-foobar joined #perl6
09:46 Cabanossi joined #perl6
10:09 rindolf joined #perl6
10:12 mr-foobar joined #perl6
10:13 tbrowder hi, #perl6!
10:14 tbrowder two questions ref current state of IO:
10:15 kurahaupo_ joined #perl6
10:16 tbrowder 1. how can i get the line number of a file handle, "$fh.ln"? i think i read that in Znet's final grant report but i don't see it in docs (need to search...)
10:19 astj_ joined #perl6
10:19 tbrowder 2. i just saw that file handles don't automatically close when going out of scope, is that ever going to change?
10:20 nine tbrowder: 2. no. That's just an artifact of Perl 6 not using reference couting.
10:20 jnthn On 2 - no, because that relies on reference counting.
10:20 jnthn heh ;)
10:23 tbrowder ok, i need to change my habits! thanks
10:23 jnthn And resons not to reference count are 1) avoiding the circular reference problem, 2) it can become a huge source of contention in parallel programs, and 3) because it'd prevent Perl 6 from running on things like the JVM which are themsleves not reference counted.
10:24 nine OTOH we have LEAVe phasers
10:33 samcv tbrowder, if you use slurp then use slurp(:close) for example if slurping a file handle
10:34 samcv if you do: my $cmd = run 'echo', 'hi', :in, :out; if you don't access .in or .out do you still need to close them?
10:34 jnthn samcv: Yes
10:34 samcv ok :)
10:35 samcv i have not done that most times
10:35 jnthn Well, yes-ish in that Proc is about to be re-worked in terms of Proc::Async
10:35 tbrowder samcv: thanks. but why would slurp not auto close?
10:35 jnthn Which may well end up making it "not matter"
10:35 samcv tbrowder, that's how it works
10:35 samcv idk
10:35 jnthn slurp does auto-close if you use the slurp($filename) or slurp($some-io-path)
10:35 wamba joined #perl6
10:35 samcv yeah
10:35 jnthn It's only .slurp on an already opened handle that does not
10:35 jnthn So if you
10:35 samcv that doesn't ever return a handle though
10:35 jnthn my $stuff = slurp('filename') you're totally fine
10:36 cognominal joined #perl6
10:36 tbrowder ok, my use of slurp so far is safe.
10:36 jnthn It's only my $fh = open 'filename', :r; my $stuff = $fh.slurp; that would leak a handle if .close isn't called
10:37 tbrowder on the run output, my use says the out and err are strings, not file handles, so why do they need to be closed? lazy?
10:39 tbrowder ignore my ? on run for the moment, got to check my veracity...
10:41 AlexDaniel joined #perl6
10:42 tbrowder ok, ref run: doesn't .slurp-rest close the file?
10:43 mr-foobar joined #perl6
10:46 jnthn That'd need :close, although a plain .slurp works just as well as .slurp-rest these days, and .slurp(:close) isn't much longer than .slurp-rest
10:46 Cabanossi joined #perl6
10:50 tbrowder i don't see slurp :close in docs...
10:51 nadim joined #perl6
10:51 tbrowder ref non-auto close on file handles needs a mention in "Traps..."
10:52 jnthn https://docs.perl6.org/routine/slurp#class_IO%3A%3AHandle
10:59 tbrowder oops, picked sub slurp! thanks. :close is not searchable
11:02 lizmat joined #perl6
11:14 mr-foobar joined #perl6
11:16 Cabanossi joined #perl6
11:28 Zoffix joined #perl6
11:29 Zoffix tbrowder: we don't need to put everything in traps. It's not a trap. It's how the language works. The handle closure is mentioned in at least two places.
11:30 Zoffix tbrowder: it's not lack of auto-close, buylt close on GC, not scope leave. And many routines offer :close argument
11:30 Zoffix tbrowder: and .slurp-rest will be deprecated on 6.d. Use slurp
11:31 Zoffix tbrowder: .err and .out on Proc are IO::Pipes. I've no idea how you get them to be stringa.
11:35 tbrowder Zoffix: ref yr last comment: i said ignore the question because i remembered i was working on the slurped file (pipe)
11:38 tbrowder Zoffix: any way to get line number on a file handle?
11:38 colomon lizmat: I don’t think so?  certainly it doesn’t if you call it directly from the command line.
11:40 Zoffix tbrowder: no
11:41 tbrowder t'anks
11:41 Zoffix tbrowder: you can use lines.kv on data
11:41 Zoffix and the index will be line number - 1
11:42 mr-foobar joined #perl6
11:42 tbrowder ah, that's it: k is index, v is string, n'est ce pas?
11:42 Zoffix yes
11:42 Zoffix left #perl6
11:43 tbrowder thanks (still looking for need to close file handle in docs...)
11:43 * colomon wonders why he has never had problems with too many file handles open from “run”…
11:45 timotimo .o( the loneliness~ of the long distance runner~ )
11:45 tbrowder ah, there it is in your new IO doc!!
11:45 araraloren joined #perl6
11:46 raschipi joined #perl6
11:46 araraloren ^_^
11:46 Cabanossi joined #perl6
11:53 raschipi colomon: You just never hit the limit, probably.
11:53 yoleaux 10:01Z <Zoffix> raschipi: no, I don't want chdir to do any magiks with '-' paths. IMO the fact that it .open treats it magically is unwanted in itself
11:54 timotimo the limit might also differ between distros
11:57 lizmat colomon: well, I don't have another explanation
11:57 raschipi Zoffix: Fair enough. I was just interested in what the plans were.
12:00 vetmaster joined #perl6
12:00 raschipi Debian has a recommended limit of 20 filehandles open at the same time for each user in a multi-user system.
12:01 raschipi So it can be very low.
12:01 zakharyas joined #perl6
12:01 vetmaster could you suggest some docs on working with extracted tokens/rules?
12:02 vetmaster I saw one two days ago, but today I can't find it again..
12:03 wamba joined #perl6
12:08 Geth ¦ doc: 285a45c77a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
12:08 Geth ¦ doc: Duplicate note about the need to close handle
12:08 Geth ¦ doc:
12:08 Geth ¦ doc: in .open docs
12:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/285a45c77a
12:09 Geth ¦ doc: bc1d0e8266 | flussence++ (committed by Zoffix Znet) | doc/Language/io-guide.pod6
12:09 Geth ¦ doc: Add missing `=for code` on one paragraph (#1361)
12:09 Geth ¦ doc:
12:09 Geth ¦ doc: On https://docs.perl6.org/language/io-guide this bit was rendering as plain body
12:09 Geth ¦ doc: text. I decided against putting `=begin code`..`=end code` around the whole area
12:09 Geth ¦ doc: in case someone else might want to add exposition in between later.
12:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bc1d0e8266
12:12 mr-foobar joined #perl6
12:19 zengargoyle_ raschipi: is that 20 total or per user process?
12:22 raschipi Each user.
12:22 raschipi Enforced by pam_limits
12:22 zengargoyle_ that's pretty low, i don't think i've ever seen a limit set below 1024 in my life.
12:23 nine That's ridiculously low
12:23 zengargoyle_ is that diferent than `ulimit -n` or something?
12:23 raschipi It's just documented, not enforced by default.
12:24 raschipi It's what the users are allowed to set in their ulimit.
12:24 zengargoyle_ that's only like 6 processes with in/out/error
12:25 vetmaster joined #perl6
12:25 raschipi The example is for a multi-user system where aumini, faculty and staff have remote access, so it's extreme.
12:29 kurahaupo raschipi: per user or per user process? the latter seems more likely
12:29 Geth ¦ doc: 259d86899d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
12:29 Geth ¦ doc: Fix example output; dogbert17++
12:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/259d86899d
12:30 raschipi limits.conf(5)
12:30 kurahaupo per-user limits that share across processes generally need to be enforced by a quota server; limits.conf sounds more like per process
12:33 ilmari according to the man page the limits are per-session (except maxlogin, which is system wide)
12:33 kurahaupo (and the limit is the number of filedescriptors, each of which may be shared between prices and with multiple fd numbers, so the controlling tty counts as only 1, even if it's used for stdin, stdout & stderr)
12:33 ilmari nproc wouldn't make much sense per-process
12:33 tbrowder ref using IO.lines.kv for file line number in k: any clever way to increment it before the block so first line is number 1 instead of 0?
12:33 kurahaupo processes*
12:34 kurahaupo 20 open files per process was the typical limit in 1980's Unix systems
12:35 [Coke] tbrowder: at that point, I'd just have my own var. either way you're adding 1 to something every time through the loop.
12:38 firefu joined #perl6
12:39 [Coke] If someone's looking for a way to help out the docs with only knowing a little perl 6, https://github.com/perl6/doc/issues/1366 could use some work. Happy to answer any questions about individual code blocks that aren't currently compiling.
12:40 raschipi Reading the docs for pam_limits, it says these limits are for each user session, and the max number of sessions can also be configured.
12:41 Geth ¦ doc: 16e596268a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
12:41 Geth ¦ doc: Fix .extension examples; dogbert17++
12:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/16e596268a
12:43 mr-foobar joined #perl6
12:43 tbrowder [Coke] thanks, at least the kv method allows scoping thr line number var, a bit of cleanness.
12:46 pmurias [Coke]: any hints how rakudo.js is failing to build on your machine? ;)
12:46 Cabanossi joined #perl6
12:47 [Coke] pmurias: noted immediately after; self-signed certs (when grabbing js modules to install)
12:47 [Coke] so I can't install any (most?) of the JS you pull in, so boom.
12:48 tbrowder ah, Zoffix just showed a clever way to avoid an increment: "once next;" as the first expression in the block...trying it now...
12:48 [Coke] This is on $dayjob's laptop, so it's possible there's a security issue other users won't face.
12:48 rightfold Did a fun exercise :) https://glot.io/snippets/eqjxhomm0r
12:48 [Coke] tbrowder: then you lose your first line.
12:50 [Coke] rightfold: I am glad you had fun, but that looks like brain hurty math.
12:51 [Coke] (and I had an engineering degree with lots of math.)
12:51 rightfold For this you need to understand lambda calculus and elementary set theory.
12:51 tbrowder i would lose it anyway with an increment, and this should be more efficient
12:51 nadim joined #perl6
12:52 tbrowder for purists
12:54 tbrowder i'm used to emacs alwas counting lines from 1 (and i think other gnu tool also) while most every thing else is indexed from zero
12:56 mcmillhj joined #perl6
12:56 tbrowder yep, grep does the same with -n
13:02 xtreak joined #perl6
13:04 Xiaoyafeng joined #perl6
13:04 Xiaoyafeng Hi! I
13:04 Xiaoyafeng Hi!
13:05 pmurias [Coke]: what's your node.js/npm version?
13:06 Xiaoyafeng I have a question: how set lib directory in nativecall like gcc-L does?
13:08 daxim andrewalker, I don't know whether this counts as impolitely sticking my fingers into your pot; I want to request some db design constraints for your grant which I think will be useful and potentially save some extra work down the road:
13:08 daxim 1. comments need to be hierarchical and addressable, this way we can import the "use.perl.org" articles and comment archive without loss of fidelity.
13:08 daxim 2. user management needs to support merging identities, because on b.p.o article authors and commenters are already different identities and this is a favourable moment to clean up some mess.
13:08 daxim if you agree, no need to edit the grant proposal, I think the constraints are compatible with the text as is.
13:09 Xiaoyafeng Oops.....
13:09 Xiaoyafeng p6:say 3
13:10 Xiaoyafeng .
13:10 andrewalker daxim: yes, I agree. It's really weird that b.p.o. authors and commenters are different identities, this should definitely be fixed. And 1. also makes sense, shouldn't be a problem.
13:11 xtreak joined #perl6
13:11 daxim excellent
13:11 andrewalker daxim: thanks for the input :)
13:11 aborazmeh joined #perl6
13:11 aborazmeh joined #perl6
13:12 mr-foobar joined #perl6
13:13 xtreak joined #perl6
13:14 raschipi Xiaoyafeng: "-I path" adds the path to the module search path
13:15 mspo left #perl6
13:16 skids joined #perl6
13:17 raschipi For nativecall, you can use the full path.
13:18 webart joined #perl6
13:32 Geth ¦ doc: 1463ef1272 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
13:32 Geth ¦ doc: List \qq[] as an easier alternative for avoid interpolation issues
13:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1463ef1272
13:41 mr-foobar joined #perl6
13:42 zengargoyle_ at least way back when, if you had your own .so that wasn't in a regular place, and if it was one you built yourself and were going to install with a module...  you put it under resources/lib/*.so
13:43 Geth ¦ doc: b6507d5bf8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
13:43 Geth ¦ doc: Add IO::Path stringification to traps
13:43 Geth ¦ doc:
13:43 Geth ¦ doc: 'cause it's unlikely people will end up reading IO::Path.Str docs,
13:43 Geth ¦ doc: and misused stringification isn't instantly apparent.
13:43 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b6507d5bf8
13:44 zengargoyle_ and then wrote a sub library to find it in %?RESOURCES and then used is native(&library).
13:44 hartenfels joined #perl6
13:47 Geth ¦ doc: 725cb4e056 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
13:47 Geth ¦ doc: reword; fix broken L<>
13:47 Geth ¦ doc: review: https://github.com/perl6/doc/commit/725cb4e056
13:49 zengargoyle_ seems like it would be nice if is native checked the normal .so loading and then tried from %?RESOURCES{"lib/$libname"} automagically.
13:50 vetmaster I want to get all symbols except "/", "-" and "." literally
13:50 vetmaster <-["/" | "-" | "."]>+
13:50 vetmaster compiler says that's wrong
13:51 vetmaster <-["/" | "-⏏" | "."]>+
13:51 vetmaster WAIDW?
13:51 araraloren m: say "ABC/as" ~~ m/<-["/" "-" "."]>+/;
13:51 camelia rakudo-moar e0f68e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place it as the first or last thing␤at <tmp>:1␤------> 3say "ABC/as" ~~ m/<-…»
13:51 araraloren m: say "ABC/as" ~~ m/<-[/\-\.]>+/;
13:51 camelia rakudo-moar e0f68e: OUTPUT: «「ABC」␤»
13:52 araraloren quote is unnecessary
13:52 vetmaster ok
13:55 [Coke] pmurias: node v6.10.3, npm 3.10.10
14:01 Cabanossi joined #perl6
14:02 eyck joined #perl6
14:04 travis-ci joined #perl6
14:04 travis-ci Doc build failed. Zoffix Znet 'Add IO::Path stringification to traps
14:04 travis-ci https://travis-ci.org/perl6/doc/builds/239970312 https://github.com/perl6/doc/compare/1463ef1272fc...b6507d5bf8fb
14:04 travis-ci left #perl6
14:06 kyan joined #perl6
14:08 vetmaster how to match a token after a literally written string?
14:08 vetmaster the string: " ~ "
14:09 vetmaster I try doing this: <" ~ "> <token>
14:09 moritz just " ~ " <token>
14:11 mr-foobar joined #perl6
14:12 tbrowder another question: is there any safe way to "alias" a built-in sub or method so that one can have "default" settings such as :close on .spurt? subclass maybe?
14:12 raiph joined #perl6
14:13 araraloren wrap ?
14:15 araraloren m: sub f(:$close) { say $close; }; f; &f.wrap(sub (|c) { callwith(|c, :close); };); f;
14:15 camelia rakudo-moar 211063: OUTPUT: «(Any)␤Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at <tmp> line 1␤␤»
14:15 araraloren m: sub f(:$close) { say $close; }; f; &f.wrap(sub (|c) { callwith(|c, :close); }); f;
14:15 camelia rakudo-moar 211063: OUTPUT: «(Any)␤True␤»
14:15 araraloren tbrowder, ↑
14:15 tbrowder as in a sub?  i think that would do it in lots of cases, but how about adverbs on containers?
14:17 tbrowder ah, wrap, more advanced usage to play with...
14:17 tbrowder thanks, araraloren
14:18 cyphase joined #perl6
14:22 araraloren em, tbrowder, also wrap maybe not lightweight
14:22 araraloren m: sub f(:$close) { say $close; }; my &z = -> |c { f(|c, :close); }; &z();
14:22 camelia rakudo-moar 211063: OUTPUT: «True␤»
14:22 travis-ci joined #perl6
14:22 travis-ci Doc build failed. Zoffix Znet 'reword; fix broken L<>'
14:22 travis-ci https://travis-ci.org/perl6/doc/builds/239971719 https://github.com/perl6/doc/compare/b6507d5bf8fb...725cb4e0568b
14:22 travis-ci left #perl6
14:31 Actualeyes joined #perl6
14:32 lizmat joined #perl6
14:33 cyphase joined #perl6
14:34 AlexDaniel joined #perl6
14:41 Skarsnik joined #perl6
14:43 Zoffix joined #perl6
14:43 Zoffix I don't get why that ^ fails. The =end code is for the =begin code :/
14:44 Geth ¦ doc: deeca520d9 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
14:44 Geth ¦ doc: Fix L«»
14:44 Geth ¦ doc: review: https://github.com/perl6/doc/commit/deeca520d9
14:44 Zoffix Never mind
14:44 Zoffix left #perl6
14:45 Zoffix joined #perl6
14:46 Zoffix tbrowder: you want .assuming https://docs.perl6.org/routine/assuming
14:46 Zoffix Don't wrap core routines. It affects the entire program. https://perl6.party/post/Exploiting-Perl-6-Code-From-Down-The-Dependency-Chain
14:46 Zoffix left #perl6
14:49 domidumont joined #perl6
14:53 Geth ¦ doc: 82895bb2b3 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Callable.pod6
14:53 Geth ¦ doc: Include named params in .assuming docs
14:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/82895bb2b3
14:56 khw joined #perl6
15:02 Geth ¦ doc: 6a870130f7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Callable.pod6
15:02 Geth ¦ doc: Add examples of other Callables in .assuming docs
15:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6a870130f7
15:03 tbrowder Zoffix: that's it! and i assume you can assign the callable to a var?
15:04 skids joined #perl6
15:04 tbrowder Thanks!
15:05 tbrowder anyone working on a p6 linter?
15:08 Geth ¦ doc: d4391cf568 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Callable.pod6
15:08 Geth ¦ doc: Fix .assuming example
15:08 Geth ¦ doc:
15:08 Geth ¦ doc: Not sure why I wrote half of it talking about .wrap >_<
15:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d4391cf568
15:09 tbrowder i'm starting my own simple one to catch my stupid mistakes, first two are mismatched pod =begin/=end pairs, second is unclosed open :w
15:10 perlpilot tbrowder: you using DrForr's Perl 6 parser?
15:11 tbrowder s/two are/one is/
15:24 simonm joined #perl6
15:31 tbrowder no, i haven't tried it yet; would it catch those?
15:32 cdg joined #perl6
15:36 travis-ci joined #perl6
15:36 travis-ci Doc build passed. Zoffix Znet 'Include named params in .assuming docs'
15:36 travis-ci https://travis-ci.org/perl6/doc/builds/239998632 https://github.com/perl6/doc/compare/deeca520d9e9...82895bb2b39d
15:36 travis-ci left #perl6
15:40 Juerd How can I have a subtype of Array with a few extra methods, and then declare a @-sigiled variable?
15:44 TeamBlast joined #perl6
15:47 travis-ci joined #perl6
15:47 travis-ci Doc build passed. Zoffix Znet 'Fix L«»'
15:47 travis-ci https://travis-ci.org/perl6/doc/builds/239994371 https://github.com/perl6/doc/compare/725cb4e0568b...deeca520d9e9
15:47 travis-ci left #perl6
15:48 lizmat joined #perl6
15:49 araraloren Juerd, maybe augment : https://docs.perl6.org/syntax/augment
15:49 jnthn Argh, not augment :P
15:50 jnthn m: class MyArray is Array { method hi() { say "it's me!" } }; my @a is MyArray; say @a.hi
15:50 camelia rakudo-moar f974dc: OUTPUT: «it's me!␤True␤»
15:50 jnthn ah, two says
15:50 jnthn But anyways, like that :)
15:51 perlpilot Juerd: you can also mixin a role with your extra methods into an already declared @array.
15:52 Juerd Ah, "is". Thanks!
15:53 araraloren That's greater than augment!
15:53 Juerd Yeah, I'd rather not augment for such a specific use case :)
15:53 Juerd I need a stack of things, and it needs to be pretty-printed and checked for consistency. I like to use methods instead of functions for something like that.
15:55 raschipi Juerd: Write a Str(MyArray: --> Str) method in that derived class and you'll be able to interpolate it.
15:56 araraloren jnthn, Is there anyway to do what RAII does ?
15:56 Juerd raschipi: Oooh, very fancy!
15:57 Juerd raschipi: I've written Str's for my other classes but for some reason I didn't think of it for this one :)
15:57 araraloren jnthn, Or Perl6 will add some operator like `with` in python or C#
15:59 perlpilot araraloren: Perl 6 already has such things, they're just spelled different.  :-)
15:59 jnthn I think adding something like Python's with or C#'s using would be the way to go for Perl 6
15:59 jnthn We already took with :)
16:00 rightfold In F# you write `use` instead of `let`
16:00 rightfold No body but just a variable declaration
16:01 araraloren perlpilot, do you mean DESTROY, but that's depend on GC. Actually it's not useful for RAII
16:01 araraloren jnthn, Oh, great!
16:03 jnthn using isn't bad
16:03 jnthn closing may work
16:03 rightfold One could imagine `use $x = f();` as sugar for `my $x = f(); LEAVE { $x.close(); }`.
16:04 jnthn But I tend to leave the naming bits of language design to others and worry about the semantics, where there's less bikeshedding ;)
16:04 perlpilot araraloren: I was thinking more about our various phasers, but yeah, that would be more verbose than python's `with`
16:05 travis-ci joined #perl6
16:05 travis-ci Doc build passed. Zoffix Znet 'Add examples of other Callables in .assuming docs'
16:05 travis-ci https://travis-ci.org/perl6/doc/builds/240001971 https://github.com/perl6/doc/compare/82895bb2b39d...6a870130f72a
16:05 travis-ci left #perl6
16:06 Juerd Is there a shortcut to get .^name without the package?
16:08 sivoais joined #perl6
16:08 raschipi Juerd: Tell us what you really want.
16:09 Juerd Objects that stringify to the last part of their class name
16:09 perlpilot Juerd: like a Foo::Bar::Baz object would stringify to "Baz" ?
16:09 Juerd Yes
16:09 Juerd In my use case, Command::is-at that stringifies to is-at, or Command::help that stringifies to help
16:10 jnthn m: class Foo::Bar {}; say Foo.^shortname
16:10 camelia rakudo-moar f974dc: OUTPUT: «Foo␤»
16:10 Juerd Almost :)
16:10 jnthn m: class Foo::Bar {}; say Bar.^shortname # even :)
16:10 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Bar used at line 1. Did you mean 'Bag'?␤␤»
16:10 jnthn grr!
16:10 jnthn m: class Foo::Bar {}; say Foo::Bar.^shortname # even :)
16:10 camelia rakudo-moar f974dc: OUTPUT: «Bar␤»
16:10 jnthn There we go
16:10 Juerd Great, thanks :)
16:10 jnthn It really is time to go home for dinner :)
16:14 araraloren night .
16:14 araraloren \o.
16:15 travis-ci joined #perl6
16:15 travis-ci Doc build passed. Zoffix Znet 'Fix .assuming example
16:15 travis-ci https://travis-ci.org/perl6/doc/builds/240004461 https://github.com/perl6/doc/compare/6a870130f72a...d4391cf56871
16:15 travis-ci left #perl6
16:23 cdg joined #perl6
16:26 Juerd I don't understand why try { something that dies; CATCH { error handling } } dies after the error handling
16:27 Juerd I put in the CATCH hoping it would prevent the dieing :)
16:27 Skarsnik yeah it's weird
16:27 tbrowder um, Perl6::Parser fails using zef install Perl6::Parser, cant't find Perl::Parser::Factory
16:28 Juerd Is there a way of handling errors that in effect causes the rest of the try block to be skipped, as eval { ... } would do in Perl 5?
16:29 Skarsnik I think it was supposed to happen ?
16:30 itaipu joined #perl6
16:33 Skarsnik the catch is not outside the try?
16:33 Juerd Should it be?
16:33 Skarsnik I do'nt remember ^^
16:33 raschipi Juerd: do you have a default in the CATCH block?
16:34 Juerd No
16:34 raschipi CATCH is a phaser, it will run when there's an exception and goes inside the block.
16:34 Skarsnik https://docs.perl6.org/language/exceptions#index-entry-try_blocks-try
16:34 Skarsnik inside
16:34 raschipi So the CATCH won't catch anything.
16:36 raschipi Without 'when' or default, the exception is raised again.
16:36 Juerd m: ().tail.this-method-probably-doesn't-exist
16:36 camelia rakudo-moar f974dc: ( no output )
16:36 stmuk_
16:36 Juerd Is that not supposed to blow up?
16:36 stmuk_ l
16:36 stmuk_ oops
16:38 raschipi Juerd: That returns a failure, it will blow up if you try to use the value.
16:39 raschipi m: say so ().tail.this-method-probably-doesn't-exist
16:39 camelia rakudo-moar f974dc: OUTPUT: «False␤»
16:39 Juerd m: my $x = ().tail.this-method-probably-doesn't-exist; say $x;
16:39 camelia rakudo-moar f974dc: OUTPUT: «(Any)␤»
16:39 Juerd Doesn't look like a failure though
16:40 Zoffix joined #perl6
16:40 Zoffix Juerd: you're missing `default` {} block in your CATCH. Could that be the reason?
16:40 raschipi It's returning Nil, which is a failure. It will fail if you test for either truth or definedness.
16:40 Zoffix Nil isn't a Failure. it's a Nil
16:41 Zoffix And calling non-existent method on Nil returns a Nil
16:41 raschipi Yeah, I'm realizing that now. Shouldn't it be a failure? Or just Nil?
16:41 raschipi Oh, Ok, Nil itself is special cased.
16:42 Zoffix Well, unless it's a Failure. Then calling a method on it explodes it
16:42 Zoffix (Failure is Nil)
16:44 raschipi So, Juerd: it's Nil all the way down.
16:44 Zoffix And unless you hit the brokenedness...
16:44 Zoffix m: Nil.contains: 42
16:44 camelia rakudo-moar f974dc: OUTPUT: «Invocant of method 'contains' must be an object instance of type 'Cool', not a type object of type 'Nil'.  Did you forget a '.new'?␤  in block <unit> at <tmp> line 1␤␤»
16:45 raschipi ().tail returns Nil, so you can call any method on it and it will just return Nil.
16:46 Cabanossi joined #perl6
16:47 Zoffix tbrowder: that's because its META file is missing most of the files the distro provides. Clone it. fix the meta file `provides` key to list all the files, then run zef install . and send a PR to DrForr_++ to fix the issue
16:48 cdg joined #perl6
16:54 Zoffix m: {{{ die; CATCH { .^name.say } }; CATCH { "oh hello".say } }; CATCH { default { .^name.say } } }; CATCH { 'meows'.say }
16:54 camelia rakudo-moar f974dc: OUTPUT: «X::AdHoc␤oh hello␤X::AdHoc␤»
16:54 Zoffix TIL
16:56 raschipi m: {{{ die; CATCH { .^name.say } }; CATCH { "oh hello".say } };  }; CATCH { 'meows'.say }
16:56 camelia rakudo-moar f974dc: OUTPUT: «X::AdHoc␤oh hello␤meows␤Died␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:56 raschipi m: {{{ die; CATCH { .^name.say } }; CATCH { "oh hello".say } };  }; CATCH {  default {'meows'.say} }
16:56 camelia rakudo-moar f974dc: OUTPUT: «X::AdHoc␤oh hello␤meows␤»
16:58 raschipi m: {die 'croak'; }; CATCH {  default { .payload.say} }
16:58 camelia rakudo-moar f974dc: OUTPUT: «croak␤»
16:59 lizmat joined #perl6
17:00 raschipi A CATCH block outside the block will catch the exception because it's raised again when nothing inside the block deals with it.
17:00 nowan joined #perl6
17:01 wamba joined #perl6
17:06 Zoffix left #perl6
17:09 ZofBot joined #perl6
17:10 eliasr joined #perl6
17:10 Juerd Re default { }: I left the default out because I had only one generic error handler.
17:11 Juerd I find it aesthetically unpleasing to have CATCH { default { ... } }, but apparently I have little choice
17:11 raschipi That's exactly what default is for
17:11 Juerd Right - I thought it'd be like given/when, where default can be left out.
17:11 raschipi If you wanted to get an specific type of exception, you would use CATCH{ when X::Specific { ...} }
17:12 Juerd Nope, I just want to print an error message and abort a current transaction.
17:12 Juerd This program may not die.
17:12 Juerd Adding default { }, although it doesn't look very elegant, solves the issue :)
17:13 raschipi Throw an specific type of Exception and catch just that.
17:14 raschipi https://docs.perl6.org/type/Exception --> creating your own exceptions is easy.
17:15 raschipi class X::YourApp::SomeError is Exception {method message() {"A YourApp-Specific error occurred: out of coffee!";}}
17:16 zakharyas joined #perl6
17:17 raschipi If any other type of exception ends up raised, note or log it at least, to aid debugging
17:17 raschipi Besides reverting the transaction.
17:17 Juerd raschipi: Normally I would do that, but it doesn't fit this use case very well.
17:18 Juerd A generic approach works well here, and saves me lots of code.
17:18 raschipi Don't forget to log what happened, at least.
17:19 pilne joined #perl6
17:20 andrei joined #perl6
17:20 Juerd raschipi: Not even relevant in this case. It's an interactive thing, and the operator has to deal with any fallout anyway, and after that, it will never again matter...
17:21 raschipi You know things can be resumed from the poin t where they were raised, right?
17:21 andrei my @a = <aa bb cc> ;  for @a ( -> $x { $x.say } )
17:21 andrei why that above does not work?
17:22 raschipi andrei: It's expecting a block after the 'for @a', but it finds '('
17:23 andrei I am a beginner, sorry. I thought parenthesis are just for grouping
17:23 andrei The block is -> $x { $x.say }
17:23 raschipi They can group where P6 expects a group
17:23 raschipi m: my @a = <aa bb cc> ;  for @a -> $x { $x.say }
17:23 camelia rakudo-moar f974dc: OUTPUT: «aa␤bb␤cc␤»
17:23 andrei This is misterious...
17:24 raschipi Do you know any other programming language?
17:24 wamba joined #perl6
17:24 andrei Yes, some Python
17:24 grumble joined #perl6
17:24 kaare_ joined #perl6
17:25 andrei and some Haskell
17:25 andrei In Haskell, parehtesis are just for precedence... I guess P6 is more like Python than Haskell !
17:26 andrei Where should I read about the use of parenthesis in P6 ?
17:26 raschipi The message it gives is very clear in my opinion: for @a⏏ ( -> $x { $x.say } ) expecting any of: block or pointy block; infix; infix stopper
17:27 andrei Thank you. But I want to know, exactly under which circumstances I can use ( ... ) parenthesis?
17:27 hahainternet Rust doesn't support variable₁ … useless
17:29 andrei my @a = <aa bb cc> ;  for @a { -> $x { $x.say } }
17:29 andrei returns Nil , why ?  I would think
17:29 andrei that the value of the block would be the anonymous function  -> $x { $x.say }
17:30 andrei so, naively it would be the same as just  my @a = <aa bb cc> ;  for @a  -> $x { $x.say }
17:30 raschipi m: my @a = <aa bb cc> ;  my $b = do for @a { -> $x { $x.say } }; say $b.^name
17:30 camelia rakudo-moar f974dc: OUTPUT: «List␤»
17:31 raschipi Returns a List of 3 subroutines
17:31 raschipi m: my @a = <aa bb cc> ;  my $b = do for @a { -> $x { $x.say } }; say $b
17:31 camelia rakudo-moar f974dc: OUTPUT: «(-> $x { #`(Block|59054240) ... } -> $x { #`(Block|59054312) ... } -> $x { #`(Block|59054384) ... })␤»
17:32 raschipi m: my @a = <aa bb cc> ;  my $b = do for @a { -> $x { $x.say } }; say $b[0]()
17:32 camelia rakudo-moar f974dc: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
17:32 raschipi m: my @a = <aa bb cc> ;  my $b = do for @a { -> $x { $x.say } }; say $b[0]('j')
17:32 camelia rakudo-moar f974dc: OUTPUT: «j␤True␤»
17:33 raschipi So, the value of the block is an anonymous function, and it executes 3 times, a
17:33 raschipi and returns 3 anonymous functions
17:34 andrei Yes, thanks, this makes sense
17:34 raschipi Parethesis can go in 2 places: after a name, they mean 'call a function'
17:35 raschipi m: my $a = { $^x ** 2}; $a(2)
17:35 camelia rakudo-moar f974dc: ( no output )
17:35 raschipi m: my $a = { $^x ** 2}; say $a(2)
17:35 camelia rakudo-moar f974dc: OUTPUT: «4␤»
17:36 andrei Yes ! And second place ?
17:36 raschipi They change what in an expression is executed first.
17:37 andrei i.e. precedence?
17:37 raschipi If you put a space after the name, they change from the first meaning to the other.
17:37 raschipi Yes, they change precedence.
17:37 andrei Nice, I see
17:37 andrei But, what exactly happens when I say:  for @a -> $x { $x.say }     ?
17:38 raschipi m: my $a = { $^x ** $^y }; say $a(2,3); say $a (2,3)
17:38 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3$a = { $^x ** $^y }; say $a(2,3); say $a7⏏5 (2,3)␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end…»
17:38 andrei Is this just idiomatic? Can I split this into separate groups, to understand the logic?
17:38 nine andrei: @a.map: -> $x { $x.say }; is what happens
17:39 raschipi Perl6 expects the keyword (for), then an expression, then a block
17:40 raschipi ( is part of expressions, so it finds the keyword, an expression (@a), and then another expression starts.
17:40 raschipi Which is not what it expects.
17:42 raschipi If it finds the '{' or '-->', that's the start of a block, so it's happy.
17:42 raschipi This is because they want to avoid "backtracking" as much as possible
17:42 andrei By the way, this works fine:   my @a = <aa bb cc> ;  for (@a) -> $x { $x.say }
17:42 andrei No problem surrounding @a with ()
17:43 grondilu_ joined #perl6
17:43 raschipi So it has to know what follows is a block before even looking inside.
17:44 raschipi Like I said, () are part of expressions, so no problem putting them where expressions are next. But can't put them where blocks are expected.
17:44 eveo joined #perl6
17:44 eveo left #perl6
17:44 raschipi Taking away the spca between the 'for' and the ( changes it's meaning from the second case to first.
17:45 raschipi space*
17:45 andrei Yes, that I understand
17:46 andrei However, I dont understand how come   -> $x { $x.say }   is not just an expression ? This is just lambda, right, anonymous function?
17:46 andrei Anonymous function is not an expression ?
17:46 raschipi The practical answer is that requiring that it be this way makes parsing Perl6 easier/faster
17:46 Cabanossi joined #perl6
17:46 TimToady it's a lambda, yes, but it's the only place where Perl 6 allows two terms in a row
17:47 TimToady so it must be parsed specially
17:47 andrei what does it mean  " two terms in a row " ?
17:47 TimToady m: 42 43
17:47 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 427⏏5 43␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement modifier …»
17:47 raschipi In an expression, things are either terms or operators.
17:48 TimToady most of the time, we require an infix of some sort between any two terms
17:48 andrei Ahh, I see...
17:48 TimToady has to do with the concept of self-clocking code
17:48 TimToady knowing whether we expect a term or an infix allows us to separate those namespaces
17:49 TimToady otherwise we could never distinguish /foo/ from division
17:49 TimToady that's true even in Perl 5
17:49 andrei So, you mean , $x and { $x.say } are two terms, right?
17:49 TimToady yes, so we specially allow the first expression to be terminated by { or ->
17:50 TimToady so you can't just poke any old expression into the second slot
17:50 raschipi Why 'for TERM BLOCK' and not 'for TERM, BLOCK'?
17:50 andrei Yes, why indeed?
17:51 TimToady it's ugly
17:51 raschipi Everyone would mio
17:51 TimToady and there's always map if you need it
17:51 raschipi *mock Perl6 for ugly systax
17:51 ZofBot joined #perl6
17:53 andrei So, after the "for" keyword is the only place where P6 allows two terms in a row ?
17:53 TimToady it would also become impossible to parse for 1, 2, 3, ->{}, 5, 6
17:53 TimToady well, it would parse, but it wouldn't make semantic sense
17:55 TimToady whereas with the current syntax, we know the block is special with a glance, and don't have to figure out whether it's just a term in the list
17:55 TimToady we reuse this idea for many kinds of block-oriented syntax, so it's not just a special feature of "for"
17:56 setty1 joined #perl6
17:56 TimToady so not just "for", but "given", "with", "if", "CATCH", and so on
17:57 andrei I see. Thanks a lot, I think this cleared my confusion.
17:57 TimToady m: with %*ENV<HOME> { .say }
17:57 camelia rakudo-moar f974dc: OUTPUT: «/home/camelia␤»
17:57 TimToady same thing
17:58 TimToady m: with %*ENV<HOME> -> $foo { $foo.say }
17:58 camelia rakudo-moar f974dc: OUTPUT: «/home/camelia␤»
17:59 TimToady that's how P6 is designed: we don't mind special syntax, but when we put in special syntax, we try to use it lots of places so that it justifies its mental load
18:00 lizmat joined #perl6
18:00 andrei have to run now unfortunately, thank you guys
18:00 TimToady you also see this in places like re-using weird pair syntax all over
18:00 TimToady ciao
18:04 espadrine_ joined #perl6
18:05 raschipi joined #perl6
18:12 ZofBot joined #perl6
18:16 Cabanossi joined #perl6
18:21 obra joined #perl6
18:29 itaipu joined #perl6
18:37 vetmaster joined #perl6
18:37 domidumont joined #perl6
18:39 vetmaster how to split file content by newlines efficiently?
18:39 vetmaster *contens
18:39 vetmaster **contents
18:41 moritz .lines
18:43 domidumont1 joined #perl6
18:43 setty1 joined #perl6
18:46 Cabanossi joined #perl6
18:47 simonm joined #perl6
18:48 domidumont joined #perl6
18:49 drrho joined #perl6
18:51 obra joined #perl6
19:02 vetmaster why that does not work : <pos> % [', '*]
19:03 vetmaster m: grammar A { rule TOP { <pos> % [', '*] } rule pos { \w+ } };
19:03 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing quantifier on the left argument of %␤at <tmp>:1␤------> 3grammar A { rule TOP { <pos> %7⏏5 [', '*] } rule pos { \w+ } };␤»
19:03 vetmaster ?
19:04 vetmaster camelia says "missing quantifier on the left argument"
19:04 moritz the % is a modifier to a quantifier
19:04 moritz so you first need a quantifier
19:04 moritz <pos>* % ', '   maybe?
19:05 vetmaster ah yes
19:05 vetmaster it should be equal to <pos> ', ' <pos> ', ' ...
19:05 vetmaster <pos>*, of course
19:11 moritz m: say so "a, bc, d" ~~ / ^ [\w+]* % ', ' $ /
19:11 camelia rakudo-moar f974dc: OUTPUT: «True␤»
19:11 geekosaur % changes * from "any number of the preceding token" to "any number of the preceding token, each separated by the following token"
19:11 rightfold m: my @xs = 1, 2; my @ys = @xs, 3; @ys.perl.say
19:11 camelia rakudo-moar f974dc: OUTPUT: «[[1, 2], 3]␤»
19:15 vetmaster m: my @xs = 1, 2; my @ys = @xs, 3; say @ys;
19:15 camelia rakudo-moar f974dc: OUTPUT: «[[1 2] 3]␤»
19:15 vetmaster m: say A x 20;
19:15 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    A used at line 1␤Undeclared routine:␤    x used at line 1␤␤»
19:15 vetmaster m: say 'A' x 20
19:15 camelia rakudo-moar f974dc: OUTPUT: «AAAAAAAAAAAAAAAAAAAA␤»
19:15 vetmaster m: say 'A' xx 20
19:15 camelia rakudo-moar f974dc: OUTPUT: «(A A A A A A A A A A A A A A A A A A A A)␤»
19:16 vetmaster m: say 'A' xxx 20
19:16 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say 'A'7⏏5 xxx 20␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤ …»
19:16 vetmaster m: say "abc\ndef\nabc\ndef"
19:16 camelia rakudo-moar f974dc: OUTPUT: «abc␤def␤abc␤def␤»
19:16 vetmaster m: say "abc\ndef\nabc\ndef".lines
19:16 camelia rakudo-moar f974dc: OUTPUT: «(abc def abc def)␤»
19:17 vetmaster m: say "abc\ndef\nabc\n\n\n\def".lines
19:17 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence: '\d'␤at <tmp>:1␤------> 3say "abc\ndef\nabc\n\n\n\7⏏5def".lines␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
19:17 vetmaster m: say "abc\ndef\nabc\n\n\n\ndef".lines
19:17 camelia rakudo-moar f974dc: OUTPUT: «(abc def abc    def)␤»
19:20 geekosaur m: dd "abc\ndef\nabc\n\n\n\ndef".lines
19:20 camelia rakudo-moar f974dc: OUTPUT: «("abc", "def", "abc", "", "", "", "def").Seq␤»
19:28 moritz m: say ' ' ~~ /<sp>/
19:28 camelia rakudo-moar f974dc: OUTPUT: «No such method 'sp' for invocant of type 'Match'. Did you mean 'so'?␤  in block <unit> at <tmp> line 1␤␤»
19:29 vetmaster m: grammar A { rule TOP { <latin>* } token latin {\w+} }; say A.parse('word');
19:29 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3grammar A { rule TOP { <latin>* }7⏏5 token latin {\w+} }; say A.parse('word'␤    expecting any of:␤        infix␤ …»
19:29 vetmaster m: grammar A { rule TOP { <latin>* }; token latin {\w+} }; say A.parse('word');
19:29 camelia rakudo-moar f974dc: OUTPUT: «「word」␤ latin => 「word」␤»
19:29 vetmaster m: grammar A { rule TOP { <latin>* }; token latin {\w+} }; say A.parse('word /test/');
19:29 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
19:30 vetmaster Why A matches 'word' in the first case, but don't match one in the second case?
19:30 dct joined #perl6
19:30 vetmaster * doesn't
19:31 Geth ¦ specs: 9c2105171e | (Moritz Lenz)++ | S05-regex.pod
19:31 Geth ¦ specs: Remove <sp> as an alias for \s
19:31 Geth ¦ specs:
19:31 Geth ¦ specs: Nobody has bothered implementing it even though it
19:31 Geth ¦ specs: would have been trivial. There are no tests for it either.
19:31 Geth ¦ specs:
19:31 Geth ¦ specs: This means the community has not accepted it, so
19:31 Geth ¦ specs: we can stop pretending :-)
19:31 Geth ¦ specs: review: https://github.com/perl6/specs/commit/9c2105171e
19:31 geekosaur vetmaster, it doesn't return a partial match if the whole expression fails. and if you use parse, you are asserting the grammar matches the entire input string
19:32 geekosaur so TOP matches 'word' and then fails because what follows doesn't match, and that fails the whole grammart
19:46 vetmaster m: grammar A { rule TOP {"/" \w+ "/"}; }; A.parse('/test/')
19:46 camelia rakudo-moar f974dc: ( no output )
19:46 vetmaster m: grammar A { rule TOP {"/" \w+ "/"}; }; say A.parse('/test/');
19:46 camelia rakudo-moar f974dc: OUTPUT: «「/test/」␤»
19:48 perlpilot m: grammar A { rule TOP { <latin>* }; token latin {\w+} }; say A.subparse('word /test/');
19:48 camelia rakudo-moar f974dc: OUTPUT: «「word 」␤ latin => 「word」␤»
19:48 perlpilot vetmaster: maybe you wantted subparse instead?
19:49 perlpilot (caveat lector, I've only been paying attention here about 5 seconds :)
19:52 kyclark joined #perl6
19:57 obra joined #perl6
20:00 cdg_ joined #perl6
20:00 avalenn joined #perl6
20:05 nowan joined #perl6
20:05 vetmaster m: my $test_str = "абыл кай \/об. Ч\/";
20:05 camelia rakudo-moar f974dc: ( no output )
20:06 vetmaster m: my $test_str = "абыл кай /об. Ч/";
20:06 camelia rakudo-moar f974dc: ( no output )
20:06 vetmaster works good
20:06 vetmaster "абыл кай /об. Ч/" ~~ /^<-[\/]>+/;
20:06 vetmaster m: "абыл кай /об. Ч/" ~~ /^<-[\/]>+/;
20:06 camelia rakudo-moar f974dc: ( no output )
20:08 tbrowder [Coke]: you're right, the '
20:13 tbrowder the "once next" trick does appear to start index from one but it also skips the first value, so it's not useful. this does what i need wiith min fuss: "for ... lines.kv -> $i is copy, $line is copy { ++$i;  # do stuff to the line}"
20:14 [Coke] tbrowder++
20:17 cdg joined #perl6
20:18 perlpilot tbrowder: Zoffix's "once next" trick included an empty element as the first element in the list too.   for "", lines.kv -> $i, $line { once next; ... }
20:18 vetmaster m: grammar A { rule TOP {<latin>+ % [" ~ "*]}; token latin { \w+ }; }; A.parse('test');
20:18 camelia rakudo-moar f974dc: ( no output )
20:18 vetmaster m: grammar A { rule TOP {<latin>+ % [" ~ "*]}; token latin { \w+ }; }; say A.parse('test');
20:18 camelia rakudo-moar f974dc: OUTPUT: «「test」␤ latin => 「test」␤»
20:19 vetmaster m: grammar A { rule TOP {<latin>+ % [" ~ "*]}; token latin { \w+ }; }; say A.parse('test ~ another');
20:19 camelia rakudo-moar f974dc: OUTPUT: «「test ~ another」␤ latin => 「test」␤ latin => 「another」␤»
20:19 vetmaster m: grammar A { rule TOP {<latin>+ % [" ~ "*]}; token latin { \w+ }; }; say A.parse('test ~ another test');
20:19 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
20:19 vetmaster m: grammar A { rule TOP {<latin>+ % [" ~ "*]}; token latin { <-[~]>+ }; }; say A.parse('test ~ another test');
20:19 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
20:20 vetmaster m: grammar A { rule TOP {<latin>+ % ["~ "*]}; token latin { <-[~]>+ }; }; say A.parse('test ~ another test');
20:20 camelia rakudo-moar f974dc: OUTPUT: «「test ~ another test」␤ latin => 「test 」␤ latin => 「another test」␤»
20:21 vetmaster m: grammar A { rule TOP {<latin>+ % ["~ "*]}; token latin { <-[~]>+ }; }; say A.parse('testing grammar ~ another test');
20:21 camelia rakudo-moar f974dc: OUTPUT: «「testing grammar ~ another test」␤ latin => 「testing grammar 」␤ latin => 「another test」␤»
20:21 perlpilot tbrowder: er ... for ("", |lines()).kv    # it would work better if I used all the right syntax  :)
20:22 vetmaster m: grammar A { rule TOP {<latin>+ % ["~ "*]}; token latin { <-[/~]>+ }; }; say A.parse('testing grammar ~ another test');
20:22 camelia rakudo-moar f974dc: OUTPUT: «「testing grammar ~ another test」␤ latin => 「testing grammar 」␤ latin => 「another test」␤»
20:22 vetmaster m: grammar A { rule TOP {<latin>+ % ["~ "*]}; token latin { <-[/~]>+ }; }; say A.parse('testing grammar ~ another test /abc/');
20:22 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
20:22 vetmaster m: grammar A { rule TOP {<latin>+ % ["~ "*] .*}; token latin { <-[/~]>+ }; }; say A.parse('testing grammar ~ another test /abc/');
20:22 camelia rakudo-moar f974dc: OUTPUT: «「testing grammar ~ another test /abc/」␤ latin => 「testing grammar 」␤ latin => 「another test 」␤»
20:23 tbrowder ok, i missed that, looks like that does work, but noiser to me than the simple increment. thanks all.
20:23 perlpilot tbrowder: yeah, it's "clever" and that's usually a sign you shouldn't use it :)
20:25 tbrowder yeah, i'm just a simple man and i have to read my code much later when I've forgotten the glamorous stuff
20:26 timotimo m: sub keyshift($kv, $n) { ($kv.key + $n) => $kv.value }; for <a b c d e f g>.kv>>.keyshift(1) -> $k, $v { say "$k: $v" }
20:26 camelia rakudo-moar f974dc: OUTPUT: «No such method 'keyshift' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
20:26 timotimo m: sub keyshift($kv, $n) { ($kv.key + $n) => $kv.value }; for <a b c d e f g>.kv>>.&keyshift(1) -> $k, $v { say "$k: $v" }
20:26 camelia rakudo-moar f974dc: OUTPUT: «No such method 'key' for invocant of type 'Int'. Did you mean 'keys'?␤  in sub keyshift at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:26 timotimo oh, of course, not a pair
20:26 ugexe m: my $line = "a\nb\nc\nd"; for $line.lines.kv -> $i, $l { once redo; say $i } # seems weird
20:26 camelia rakudo-moar f974dc: OUTPUT: «0␤b␤c␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
20:26 timotimo m: sub keyshift($kv, $n) { ($kv[0] + $n), $kv[1] }; for <a b c d e f g>.kv>>.&keyshift(1) -> $k, $v { say "$k: $v" }
20:26 camelia rakudo-moar f974dc: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in sub keyshift at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in sub keyshift at <tmp> line 1␤ …»
20:26 timotimo ah, hyper descends into pieces
20:27 timotimo m: sub keyshift($kv, $n) is nodal { ($kv[0] + $n), $kv[1] }; for <a b c d e f g>.kv>>.&keyshift(1) -> $k, $v { say "$k: $v" }
20:27 camelia rakudo-moar f974dc: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in sub keyshift at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in sub keyshift at <tmp> line 1␤ …»
20:27 timotimo hmm.
20:27 timotimo m: sub keyshifter($n) { sub shifter($kv) { ($kv[0] + $n), $kv[1] } }; for <a b c d e f g>.kv.map(keyshifter(1)) -> $k, $v { say "$k: $v" }
20:27 camelia rakudo-moar f974dc: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in sub shifter at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in sub shifter at <tmp> line 1␤  i…»
20:27 * timotimo takes it to the local shell
20:28 timotimo would have been much easier with .pairs
20:29 timotimo ah, i didn't realize .kv is already flat
20:29 timotimo well, that makes a lot of sense
20:30 robertle joined #perl6
20:30 timotimo m: sub keyshifter($n) { sub shifter($a, $b) { slip($a + $n, $b) } }; for <a b c d e f g>.kv.map(keyshifter(1)) -> $k, $v { say "$k: $v" }
20:30 camelia rakudo-moar f974dc: OUTPUT: «1: a␤2: b␤3: c␤4: d␤5: e␤6: f␤7: g␤»
20:31 raschipi .kv returns a zip between the line numbers and the values. Asigning it to a hash will pair them up.
20:31 timotimo of course
20:31 timotimo this is explicitly about iterating over a .kv and wanting to have it start at 1 rather than 0
20:31 timotimo at least that's how i interpreted the situation
20:35 raschipi Why not zip it with a 1..* range explicitly instead of calling .kv?
20:35 timotimo because then you'd have to call some operator (like a +) on the value as well
20:35 timotimo and that won't work very well for anything from strings to random objects
20:35 timotimo oh
20:35 timotimo you mean it totally differently from how i understood it
20:36 raschipi say (<a b c d e f g> Z 1..*)
20:36 evalable6 raschipi, rakudo-moar f974dcc63: OUTPUT: «((a 1) (b 2) (c 3) (d 4) (e 5) (f 6) (g 7))»
20:37 lizmat joined #perl6
20:39 raschipi m: ( 1..* Z <a b c d e f g>).map: -> $k , $v { say "$k: $v" }
20:39 camelia rakudo-moar f974dc: OUTPUT: «1 a: 2 b␤3 c: 4 d␤5 e: 6 f␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
20:39 raschipi m: ( 1..* Z, <a b c d e f g>).map: -> $k , $v { say "$k: $v" }
20:39 camelia rakudo-moar f974dc: OUTPUT: «1 a: 2 b␤3 c: 4 d␤5 e: 6 f␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
20:39 perlpilot m: for 1..* Z <a b c d e f g> -> ($k, $v) { say "$k: $v" }
20:39 camelia rakudo-moar f974dc: OUTPUT: «1: a␤2: b␤3: c␤4: d␤5: e␤6: f␤7: g␤»
20:40 perlpilot (since that's what you really wanted :)
20:40 perlpilot the minute vagaries of syntax may still trip people up though
20:42 raschipi The only way to avoid that is to not write Perl6.
20:42 perlpilot raschipi++
20:45 perlpilot with the zip trick, you can pick your starting index too ...
20:45 perlpilot m:  for -5..* Z <a b c d e f g> -> ($k, $v) { say "$k: $v" }
20:45 camelia rakudo-moar f974dc: OUTPUT: «-5: a␤-4: b␤-3: c␤-2: d␤-1: e␤0: f␤1: g␤»
20:46 obra joined #perl6
20:46 perlpilot which is useful for the same reason languages like pascal (and its progeny) and early Perl 5 allowed it  (to make some algorithms simpler)
20:47 raschipi m:  for 'a'...'z' Z <a5 b4 c3 d2 e1 f0 g5> -> ($k, $v) { say "$k: $v" }
20:47 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Only identical operators may be list associative; since '...' and 'Z' differ, they are non-associative and you need to clarify with parentheses␤at <tmp>:1␤------> 3for 'a'...'z' Z7⏏5 <a5 b4 c3 d2 …»
20:48 raschipi m:  for ('a'...'z') Z <a5 b4 c3 d2 e1 f0 g5> -> ($k, $v) { say "$k: $v" }
20:48 camelia rakudo-moar f974dc: OUTPUT: «a: a5␤b: b4␤c: c3␤d: d2␤e: e1␤f: f0␤g: g5␤»
20:59 timotimo m: for <a b c d e f g> Z[R,] 1..* -> $k, $v { say "$k: $v" }
20:59 camelia rakudo-moar f974dc: OUTPUT: «1 a: 2 b␤3 c: 4 d␤5 e: 6 f␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
20:59 timotimo heh. whoops :)
20:59 timotimo m: for flat <a b c d e f g> Z[R,] 1..* -> $k, $v { say "$k: $v" }
20:59 camelia rakudo-moar f974dc: OUTPUT: «1: a␤2: b␤3: c␤4: d␤5: e␤6: f␤7: g␤»
21:09 TEttinger joined #perl6
21:27 Geth ¦ doc: 81c2d2394d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlvar.pod6
21:27 Geth ¦ doc: Use better idiom than .kv for numering lines; raschipi++
21:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/81c2d2394d
21:31 Geth ¦ doc: 2b130cf5f6 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
21:31 Geth ¦ doc: Reformat signature of IO::Handle.open
21:31 Geth ¦ doc:
21:31 Geth ¦ doc: So it fits on screen
21:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2b130cf5f6
21:35 mcmillhj joined #perl6
21:40 AlexDaniel joined #perl6
21:42 tbrowder .tell DrForr_ you have a new PR for Perl6::Parser
21:42 yoleaux tbrowder: I'll pass your message to DrForr_.
21:46 Cabanossi joined #perl6
21:49 AlexDani` joined #perl6
21:51 mcmillhj joined #perl6
22:07 mcmillhj joined #perl6
22:09 ceevusee joined #perl6
22:24 Geth ¦ doc: dce339cc23 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
22:24 Geth ¦ doc: Remove trailing ws; Fixes #1367
22:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/dce339cc23
22:31 Geth ¦ doc: 804dce6400 | (Kris Shannon)++ (committed using GitHub Web editor) | doc/Language/io-guide.pod6
22:31 Geth ¦ doc: Small grammar and syntax changes
22:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/804dce6400
22:31 Geth ¦ doc: 7fdfdb5e03 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
22:31 Geth ¦ doc: Fix typo; Fixes #1363
22:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7fdfdb5e03
22:39 Geth ¦ doc: 1a5ee4fd39 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/io-guide.pod6
22:39 Geth ¦ doc: Fix minor factual info; Fixes #1362
22:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1a5ee4fd39
22:40 raschipi joined #perl6
22:45 eveo joined #perl6
22:47 eveo .tell jnthn would you be able to resolve this ticket? The question is is it guaranteed `run` will never use the shell to execute stuff. https://github.com/perl6/doc/issues/1208#issuecomment-281522376
22:47 yoleaux eveo: I'll pass your message to jnthn.
22:47 eveo left #perl6
22:53 nadim joined #perl6
23:05 mcmillhj joined #perl6
23:10 skids joined #perl6
23:14 rightfold m: class C { has $.x! }; C.new(x => 1); C.new()
23:14 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3class C { has $.x!7⏏5 }; C.new(x => 1); C.new()␤    expecting any of:␤        constraint␤        infix␤        infix …»
23:14 rightfold m: class C { has $.x is required }; C.new(x => 1); C.new()
23:14 camelia rakudo-moar f974dc: OUTPUT: «The attribute '$!x' is required, but you did not provide a value for it.␤  in block <unit> at <tmp> line 1␤␤»
23:14 rightfold Ok nice
23:26 mcmillhj joined #perl6
23:30 pecastro joined #perl6
23:31 Cabanossi joined #perl6
23:39 Actualeyes left #perl6
23:42 mcmillhj joined #perl6
23:48 itaipu joined #perl6
23:53 BenGoldberg joined #perl6
23:58 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo