Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-09-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 ash_gti joined #perl6
00:02 Aaronepower joined #perl6
00:03 cpage_ joined #perl6
00:07 char_var[buffer] joined #perl6
00:07 japhb I implemented the first non-trivial Str.Numeric.  When true allomorphs became a thing, the bulk of that code was moved into val(Str:D).  I claim no responsibility for the non-number-parsing bits of val().
00:08 japhb That said, at one point long ago I had a crazy Str.Numeric test that I used to like to demo.  I wonder if I can find it again ...
00:12 japhb Gah, search history for the irclogs is cut off
00:12 Zoffix :(
00:12 japhb I wonder if I can recreate it ...
00:12 Zoffix Do it :)
00:20 cdg joined #perl6
00:22 japhb This is only a partial, but my bus stop is coming up ....
00:22 japhb m: say +'0xf.8*:2[1,0]**0b11/0o200+2.0e2i'
00:22 camelia rakudo-moar c39db8: OUTPUT: «0.96875+200i?»
00:22 Zoffix ehehe :) neat :)
00:22 japhb IT.  GETS.  WORSE.   ;-)
00:23 Zoffix japhb++
00:23 raschipi m: say +<0xf.8*:2[1,0]**0b11/0o200+2.0e2i>
00:23 camelia rakudo-moar c39db8: OUTPUT: «0.96875+200i?»
00:24 raschipi m: say <0xf.8*:2[1,0]**0b11/0o200+2.0e2i>
00:24 camelia rakudo-moar c39db8: OUTPUT: «0xf.8*:2[1,0]**0b11/0o200+2.0e2i?»
00:25 Zoffix it's a ComplexStr (which keeps the original string as its stringy representation)
00:25 raschipi yep
00:26 raschipi m: say +<0xf.8*:2[1,0]**0b11/0o200+0xf.8*:2[1,0]**0b11/0o200i>
00:26 camelia rakudo-moar c39db8: OUTPUT: «0.96875+0.96875i?»
00:29 aindilis joined #perl6
00:42 ash_gti joined #perl6
00:46 ash_gti joined #perl6
00:55 committable6 joined #perl6
00:55 committable6 joined #perl6
00:57 snarkyboojum joined #perl6
01:06 raschipi m: say +<0xf.8*:2[1,0]**0b11/0o200+0xf.8*:2[1,0]**0b11/0o200i >
01:06 camelia rakudo-moar c39db8: OUTPUT: «0.96875+0.96875i?»
01:07 raschipi I thought adding a space made it quoting instead of a ComplexStr constructor?
01:12 Actualeyes joined #perl6
01:13 Cabanossi joined #perl6
01:21 cdg joined #perl6
01:30 taki joined #perl6
01:50 Cabanossi joined #perl6
01:50 BenGoldberg joined #perl6
01:51 ilbot3 joined #perl6
01:51 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!
02:03 cdg joined #perl6
02:12 cuonglm joined #perl6
02:17 cuonglm Hi, anyone faces the issue with latest rakudo
02:17 cuonglm m: Buf.new(200).decode('utf8')
02:17 camelia rakudo-moar c39db8: OUTPUT: «Malformed termination of UTF-8 string?  in block <unit> at <tmp> line 1??»
02:18 cuonglm m: with '/tmp/test'.IO { .spurt: Buf.new: 200; dd .open.slurp }
02:18 camelia rakudo-moar c39db8: OUTPUT: «""?»
02:19 cuonglm I traced the source and found the method which does the decode stream in MoarVM
02:19 cuonglm MVM_string_utf8_decodestream
02:20 cuonglm but I stuck there
02:20 noganex_ joined #perl6
02:20 raschipi It's complaining because 0b11001000 isn't proper utf-8
02:21 cuonglm raschipi: Yes, but decode from a file just return empty string
02:21 cuonglm instead of malformed utf8 string
02:22 raschipi What's in the file?
02:22 teatime ^^ he did a demo
02:23 piojo2 joined #perl6
02:24 raschipi You need to use utf-c8 if it's not proper unicode. It's a pain in the ass, Perl6 doesn't deal with broken Unicode at all. It just complains and refuses to do anything.
02:24 raschipi utf8-c8
02:27 cuonglm raschipi: it's a different problem
02:27 cuonglm I mean the behavior is not consistent in this case
02:27 teatime cuonglm: I think he's right.  by default slurp decodes utf8; you can specify :bin if you don't want that.
02:28 cuonglm teatime: but calling .decode('utf8') raise an error
02:28 teatime but, yeah, your two examples have the same fail and inconsistent.
02:28 cuonglm why does not .slurp raise one?
02:29 Geth ¦ doc: c0bee454cd | (Will "Coke" Coleda)++ | doc/Type/IO/Handle.pod6
02:29 Geth ¦ doc: use nbsp
02:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c0bee454cd
02:38 [Coke] .seen Altai-man?
02:38 yoleaux I haven't seen Altai-man? around.
02:38 [Coke] .seen Altai-man
02:38 yoleaux I haven't seen Altai-man around.
02:42 jdv79 moritz: around?
02:43 Cabanossi joined #perl6
02:44 raschipi Altai-man irc nick is sena-kun
02:44 raschipi .seen sena-kun
02:44 yoleaux I saw sena-kun 16 Feb 2017 16:43Z in #perl6: <sena-kun> btw, I'll merge https://github.com/perl6/doc/pull/1192 as, it seems, nobody is against and we planned it for a while. After the merge https://github.com/perl6/doc/issues/776 will be closed.
02:47 [Coke] .tell sena-kun the grep signature added to Any in the docs has an extra --> ; the method sig doesn't compile. you can see the error with "perl6 xt/examples-compilation.t doc/Type/Any.pod6"
02:47 yoleaux [Coke]: I'll pass your message to sena-kun.
02:52 cuonglm jnthn: would you mind helping us resolve this problem
02:58 zoll joined #perl6
03:00 teatime I would have expected both of those to return a Failure; neither do.  but then, I am a n00b.
03:01 jdv_bot joined #bottest-jdv
03:01 jdv79
03:01 jdv79 ?
03:05 cuonglm teatime: I think it should be a Failure, too. Anyway, either Failure or empty string, it must be consistent
03:10 Xliff joined #perl6
03:10 Xliff \o
03:12 raschipi_ joined #perl6
03:12 Xliff Is starting a new thread after the current sub exits as simple as: sub a { ... #do someting; start { ... #more something; } }
03:12 Xliff Where "a" is also executed via start
03:27 jdv79 Zoffix: just backlogged.  i think i found the issues with the utf8 logging
03:27 jdv79 told moritz cause i can't do it
03:27 jdv79 hopefully soon.  and yeah, logs are hosed since july 21 or so.
03:28 jdv79 gotta love mysql
03:29 pierrot joined #perl6
03:30 AlexDaniel joined #perl6
03:41 xinming joined #perl6
03:45 cdg joined #perl6
03:46 teatime .tell Zoffix re: IRC::Client::Plugin::Factoid and maybe IRC::Client :  Curious if you were aware that bots aren't supposed to reply to NOTICE's, and if so how come you chose to do otherwise.  Also curious if the Factoid plugin is still something you're actively using/developing; I'm planning some changes, willing to coordinate design changes and pushing them upstream if you'd like.
03:46 yoleaux teatime: I'll pass your message to Zoffix.
03:58 Cabanossi joined #perl6
04:00 llfourn joined #perl6
04:07 u-ou- joined #perl6
04:07 u-ou- hi
04:12 sjn hello
04:32 cdg joined #perl6
04:48 Geth ¦ doc: 176b25c312 | (Samantha McVey)++ | doc/Type/utf8.pod6
04:48 Geth ¦ doc: Document utf8 type
04:48 Geth ¦ doc:
04:48 Geth ¦ doc: Fixes issue #1516
04:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/176b25c312
04:52 skids bisect: sub f ($a = 42) { $a.perl.say; }; f(Nil)
04:52 bisectable6 skids, On both starting points (old=2015.12 new=c39db87) the exit code is 0 and the output is identical as well
04:52 bisectable6 skids, Output on both points: «Nil»
04:53 skids commit: releases sub f ($a = 42) { $a.perl.say; }; f(Nil)
04:54 committable6 skids, ¦releases (22 commits): «Nil»
05:07 cdg joined #perl6
05:14 leah2 joined #perl6
05:17 xinming joined #perl6
05:20 moritz \o
05:20 cdg joined #perl6
05:21 raschipi \o
05:22 cpage_ joined #perl6
05:29 ilbot3 joined #perl6
05:29 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!
05:29 ilbot3 joined #perl6
05:29 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!
05:30 teatime raschipi: somewhere, no doubt :)
05:31 moritz m: say "UTF-8 test: €";
05:31 camelia rakudo-moar c39db8: OUTPUT: «UTF-8 test: €␤»
05:31 moritz jdv79++ # that fixed it, thanks!
05:31 raschipi YAY! moritz++ jdv79++ jdv79++ jdv79++
05:32 raschipi ␤␤␤␤␤␤␤␤␤␤
05:32 teatime if both Readline and Linenoise are installed, which does the REPL use?  (i.e., which is better)
05:32 masak those are two unrelated questions :P
05:33 teatime fair enough :)  curious about both, then, but most interested in the second.
05:35 moritz rakudo tries to load readline first
05:35 moritz and my experience with linenoise is that it doesn't deal with non-ASCII very well
05:37 wamba joined #perl6
05:38 teatime ah right.  thanks.
05:42 xtreak joined #perl6
05:52 domidumont joined #perl6
05:57 cdg joined #perl6
05:59 domidumont joined #perl6
06:00 nadim joined #perl6
06:01 leont joined #perl6
06:02 lowbro joined #perl6
06:02 lowbro joined #perl6
06:02 Actualeyes joined #perl6
06:04 espadrine joined #perl6
06:05 ufobat joined #perl6
06:14 Cabanossi joined #perl6
06:18 geekosaur joined #perl6
06:24 sumdoc joined #perl6
06:24 astj joined #perl6
06:24 sumdoc Help from the experts
06:25 sumdoc Here https://github.com/bduggan/p6-jupyter-kernel/issues/14
06:25 sumdoc Reevant question and more details here https://stackoverflow.com/questions/46057436/running-perl-6-kernel-in-docker
06:30 Xliff Is starting a new thread after the current sub exits as simple as: sub a { ... #do someting; start { ... #more something; } }
06:33 xtreak joined #perl6
06:35 ChoHag joined #perl6
06:35 moritz Xliff: start { } creates a promise; that might get scheduled on another thread, or it might not
06:36 moritz and you should do something with the promise that start { } returns
06:36 Xliff OK, so how do you insure that something is done on another thread?
06:36 Xliff Or is that even something worth worrying about (ie, leave it to rakudo)
06:36 moritz depends on what you want to achieve
06:37 Xliff 'k
06:37 moritz but typically you don't want to worry about it
06:37 Xliff I'm trying to develop a flood fill that doesn't take forever.
06:37 moritz and let the thread scheduler take care of it
06:37 Xliff So I'm toying with threading.
06:37 Xliff No code, just logically.
06:38 Xliff So can you start a thread, then start another thread and then wait for both to finish?
06:38 Xliff I don't know if await {} blocks.
06:39 sumdoc "p6: my $string = "The problem is a bit difficult"; say "The input contains " ~ $string.words.elems ~ " elements.";"
06:39 Xliff I have been shying away from start/awake/promise/suppy/tap for a while. They hurt
06:39 sumdoc rakudo: my $string = "The problem is a bit difficult"; say "The input contains " ~ $string.words.elems ~ " elements.";
06:39 camelia rakudo-moar c39db8: OUTPUT: «The input contains 6 elements.␤»
06:39 sumdoc rakudo: my $string = "The problem is a bit difficult"; say "The input contains " ~ $string.words.elems ~ " elements.";
06:39 camelia rakudo-moar c39db8: OUTPUT: «The input contains 6 elements.␤»
06:40 sumdoc camelia p6: my $string = "The problem is a bit difficult"; say "The input contains " ~ $string.words.elems ~ " elements.";
06:40 camelia sumdoc: rakudo-moar c39db8: OUTPUT: «The input contains 6 elements.␤»
06:41 sumdoc camelia p6: my $string = "The problem is a bit difficult"; say "The input contains " ~ $string.words.elems ~ " elements.";
06:41 camelia sumdoc: rakudo-moar c39db8: OUTPUT: «The input contains 6 elements.␤»
06:41 moritz Xliff: await blocks, yes
06:43 lizmat_ joined #perl6
06:44 cdg joined #perl6
06:52 u-ou- joined #perl6
06:55 astj joined #perl6
06:57 Xliff moritz: So await blocks are non-blocking?
06:58 astj joined #perl6
06:59 moritz there are no await blocks
06:59 moritz await is a simple statement
06:59 Xliff Oh!
06:59 Xliff await actually takes a list. So I start each task, keep the promises, and pass the list to await.
06:59 geekosaur joined #perl6
06:59 Xliff Docs are useful. :P
07:00 Xliff <- :P
07:01 Xliff I guess I'll have to implement this without concurrency, first.
07:01 Xliff :/
07:01 Xliff moritz++
07:11 darutoko joined #perl6
07:13 Cabanossi joined #perl6
07:18 cuonglm joined #perl6
07:20 cdg joined #perl6
07:21 xtreak joined #perl6
07:22 astj joined #perl6
07:24 lizmat joined #perl6
07:25 Geth ¦ doc: 1894585092 | (Samantha McVey)++ | doc/Type/utf8.pod6
07:25 Geth ¦ doc: Try and improve the search for utf8 class
07:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1894585092
07:27 abraxxa joined #perl6
07:38 cdg joined #perl6
07:57 xtreak joined #perl6
07:59 nine Is this something worth pursuing? https://gist.github.com/niner/a75aebd0e91af200df21b233d82aa5af
08:00 nine One of the examples from this gist: sub ls($dir?, :$l, :$help) is command { * }; like(ls(:help).out.lines[0], /Usage/);
08:01 jonas1 joined #perl6
08:01 moritz nine: it looks very nice :-)
08:02 xtreak joined #perl6
08:03 xtreak joined #perl6
08:03 nine We have so nice command line parsing, but running external commands is still kinda cumbersome and error prone. This could e.g. help catch typos.
08:06 robertle joined #perl6
08:07 moritz just have to be careful with things that are both Perl 6 built-ins and command shell commands ("grep" and "sort" come to mind)
08:10 teatime nine: random thought:  if you're assuming GNU conventions, have it pass "--" as the first positional argument so that your positionals can't be interpreted as flags
08:10 nine Good thing, these are lexical. Also an sub grep-cmd(...) is command('grep') { * } can work around that
08:11 teatime you could support different conventions (e.g., some commands use single dash for -long-options), but I feel like the ROI is quickly diminishing
08:11 nine teatime: that depends on the command. I fear, support for '--' is not universal enough to have it included by default. But another trait may help. Something short and sweet...
08:12 nine Yeah, this is really a "make simple things easy" thing
08:12 AlexDaniel joined #perl6
08:15 teatime nine: and of course short and long options can take arguments.  but that shouldn't be a problem.
08:15 dakkar joined #perl6
08:16 teatime nine: it's interesting... my initial reaction was "No, I don't really think so..." but I am coming around maybe.
08:16 nine Arguments are actually already implemented :) Just not tested yet...
08:17 teatime oh nice, I thought this was just a hypothetical design spec :)
08:17 cdg joined #perl6
08:18 nine Oh, and for really non-standard arugments, one can just write a sub tar(:$c, :$v, :$f) { return Native::Command::Prepared(:name<tar>, :args(...)); } and give it the same interface for running that way
08:19 moritz note that GNU tar also supports -c -v -f :-)
08:20 nine Values now tested, too: like(ls('lib', :format<verbose>).out.lines[0], /total/);
08:20 moritz but having that flexibility certainly helps
08:20 nine moritz: I know, but I can't think of an example for a weird command
08:20 wamba joined #perl6
08:24 teatime nine: dd?
08:25 teatime also ps kindof; it behaves differently when given "BSD-style" (dashless) flags
08:30 moritz I think I'd map ps as simply ps('el')
08:30 zakharyas joined #perl6
08:30 moritz or ps(:a, :u, :x, :f) for option-style passing
08:31 moritz dd is more interesting, yes
08:33 sumdoc I have written on running Perl 6 notebook. See here: https://sumdoc.wordpress.com/2017/09/06/how-to-run-perl-6-notebook/
08:33 sumdoc Feedback?
08:35 * moritz tries it
08:37 timotimo neat
08:37 timotimo though it sounds like using docker is the only way to run the perl6 notebook from the first lines of the post
08:37 timotimo is that just me?
08:38 moritz probably not
08:38 moritz just look at the dockerfile and see what it does
08:39 moritz sloow download, I get less then 1 MBit/s from dockerhub
08:40 xtreak joined #perl6
08:40 timotimo no i mean
08:40 jast turns out hosting large blobs for something very popular takes a little bit of bandwidth...
08:40 timotimo the article makes it sound like you have to have docker if you want to run a perl6 notebook
08:40 jast however, Dockerfile refers to the declarative file defining how the actual image is built
08:41 jast and I guess you knew that, I wasn't paying enough attention :)
08:41 moritz timotimo: not to me
08:41 timotimo that's good, then :)
08:42 moritz jast: I would have thought that Docker used a beefy CDN for that :)
08:42 jast someone needs to pay for that, too :)
08:44 nine To me the article even sounds like perl6 notebook is closely tied to docker
08:45 nine https://duckduckgo.com/?q=PERL+6+NOTEBOOK&amp;ia=software gives the same impression
08:47 nine Of course I have no idea what a Perl 6 notebook actually is :) So there's nothing to distract me from its dockerness
08:49 moritz wow, works very nicely
08:49 moritz a jupyter notebook is like a web-based REPL
08:50 moritz originally known as ipython
08:50 moritz if you're familiar with the graphical execution environment from Mathematica or Maple: it's similar to that
08:50 lizmat joined #perl6
08:51 sumdoc timotimo moritz Edited the post. Ofcourse docker is not only the way to run the notebook. I have edited the post.
08:51 sumdoc nine Edited the post.
08:52 rindolf joined #perl6
08:53 timotimo looks good!
08:53 sumdoc timotimo Thanks
08:55 nine sumdoc: thanks!
08:55 moritz sumdoc++
08:56 moritz wow, rakudo-in-jupyter uses lots of CPU in idle state :(
08:57 moritz no syscalls
08:57 Skarsnik joined #perl6
08:58 pmurias joined #perl6
08:59 sumdoc moritz CPU ? Could that be problem in the Perl 6 kernel or in rakudo itself?
08:59 moritz sumdoc: I'd guess the Perl 6 kernel
09:00 moritz unless it's some sort of socket bug in rakudo or moar
09:00 cdg joined #perl6
09:03 sumdoc moritz OK
09:03 El_Che Who twits from the Perl 6 news feed?
09:04 El_Che the guy/gal is fast
09:04 El_Che zoffix?
09:04 cuonglm Does perl6 -e 'dd $*IN.opened()' 0<&-
09:04 cuonglm returns Bool::True normal?
09:04 [particle] joined #perl6
09:05 cuonglm most standard unix tools will honor it
09:05 cuonglm echo 1 | grep 1 0<&-
09:05 cuonglm give you
09:05 cuonglm grep: (standard input): Bad file descriptor
09:05 greppable6 cuonglm, Found nothing!
09:05 moritz El_Che: me
09:06 cuonglm greppable6: what do you mean?
09:06 greppable6 cuonglm, https://gist.github.com/9c4b7bd93581c2ac71dc27b79a54687b
09:06 El_Che moritz: direct from #perl6 to the tweetsphere :)
09:06 xtreak joined #perl6
09:06 moritz cuonglm: what does 0<&- even do?
09:06 Aaronepower joined #perl6
09:07 moritz El_Che: :-)
09:07 cuonglm moritz: it closes command standard in
09:07 cuonglm that's why grep complains about bad file descriptor
09:08 moritz cuonglm: does the shell close the file descriptor before launching the process?
09:09 moritz if yes, that sounds like a bug in rakudo
09:10 jnthn I suspect .opened only tracks if the thing was opened at some point and .close wasn't yet called on it
09:12 cuonglm jnthn: yep, I check the source and see it checks whether $!PIO is true, which only set to null when close fd
09:13 cuonglm moritz: yes, it does
09:13 cuonglm sounds like perl5 also doesn't honor it
09:13 cuonglm perl -e 'close(STDIN)' 0<&-
09:14 cuonglm jnthn: But I think the problem is nqp itself
09:16 pmurias what does the 'is onlystar' trait do?
09:16 cuonglm jnthn: nqp -e 'nqp::closefh(nqp::getstdin());' 0<&-
09:16 timotimo it is set if a sub's body is { * }
09:16 timotimo i.e. "only a star"
09:17 jnthn cuonglm: What were you expecting that to do?
09:17 sproctor joined #perl6
09:17 pmurias how is inlining possible in the existance of .wrap?
09:18 cuonglm jnthn: it should report an error, like something like grep does in echo 1 | grep 1 0<&-
09:18 jnthn cuonglm: Closing something that's already closed is never an error.
09:18 jnthn cuonglm: I'm betting if you try to read from it you'll get an error though?
09:19 Actualeyes left #perl6
09:19 cuonglm jnthn: no error at all
09:19 cuonglm perl6 -e 'dd $*IN.read()' 0<&-
09:20 BooK m: my $c = { cos $^a }; say &$c(0);
09:20 camelia rakudo-moar c39db8: OUTPUT: «1␤»
09:20 BooK m: my $c = { cos * }; say &$c(0)
09:20 camelia rakudo-moar c39db8: OUTPUT: «Cannot resolve caller cos(Whatever); none of these signatures match:␤    (Numeric \x)␤    (Cool \x)␤    (num $x --> num)␤  in block <unit> at <tmp> line 1␤␤»
09:21 BooK what's the difference?
09:21 jnthn Hm, curious. That goes straight down to https://github.com/MoarVM/MoarVM/blob/master/src/io/syncfile.c#L140
09:21 moritz BooK: * doesn't unfold its magic in an argument list
09:21 moritz because there are cases where we want to be able to pass it to a routine, like in (^10).pick(*)
09:21 cuonglm jnthn: also, echo 1 | perl6 -e 'say $*IN.readchars' 0<&- just hang
09:21 jnthn Which is checking the return code from read, which implies the read down at *that* level isn't complaining either.
09:21 BooK so 1 + * does, but not cos(*) ?
09:22 moritz BooK: correct
09:22 moritz use &cos :-)
09:22 cuonglm jnthn: sounds like nqp does something with stdin under the hood
09:22 BooK aha!
09:22 jnthn cuonglm: Well, that'd be consistent with read returning 0
09:22 jnthn cuonglm: We don't do anything with stdin
09:22 moritz BooK: or if you have multiple arguments, you can use .assuming to pre-fill some arguments
09:22 BooK oh, I thought you meant &cos(*) :-)
09:22 moritz no, just &cos
09:23 moritz it's already a reference to the callable
09:23 cuonglm jnthn: is there any case where nqp::closefh raise an error
09:23 AlexDaniel joined #perl6
09:23 timotimo cuonglm: calling it on something that's not an fh
09:23 timotimo m: use nqp; nqp::closefh("hello")
09:23 camelia rakudo-moar c39db8: OUTPUT: «close requires an object with REPR MVMOSHandle (got Str with REPR P6opaque)␤  in block <unit> at <tmp> line 1␤␤»
09:25 cuonglm timotimo: yes, but in case it always get a fh
09:25 jnthn https://github.com/MoarVM/MoarVM/blob/master/src/io/syncfile.c#L473 is where the VM-level handle is populated with the fd, and that's called from https://github.com/MoarVM/MoarVM/blob/df404cab9899bec5ca0cfc174dcfe3596cd38abe/src/io/fileops.c#L327 which is called from https://github.com/MoarVM/MoarVM/blob/e0ece7f8288a643b419d739d2fe2143ee7510ea8/src/moar.c#L341
09:25 Sgeo joined #perl6
09:25 cuonglm timotimo: because I grep 'TODO' in rakudo source code, and got this line on IO/Handle.pm
09:25 cuonglm timotimo: nqp::closefh($!PIO), # TODO: catch errors
09:26 BooK moritz: my $c = *.cos  ; say &$c(0); # worked, but
09:26 BooK m: my $c = { &cos.assuming(*) } ; say &$c(0);
09:26 camelia rakudo-moar c39db8: OUTPUT: «sub __PRIMED_ANON ($) { #`(Sub+{Callable[Mu]}|72360416) ... }␤»
09:26 BooK I guess one too many levels of indirection
09:26 jnthn It can actually throw: https://github.com/MoarVM/MoarVM/blob/master/src/io/syncfile.c#L239
09:26 BooK ah $c(0)
09:26 moritz m: my $c = &cos; say $c(0)
09:26 camelia rakudo-moar c39db8: OUTPUT: «1␤»
09:26 jnthn But it clearly isn't in this case
09:27 moritz m: my $c = *.cos; say $c(0) # method form
09:27 camelia rakudo-moar c39db8: OUTPUT: «1␤»
09:27 moritz m: my $c = &cos.assuming(); say $c(0)
09:27 camelia rakudo-moar c39db8: OUTPUT: «1␤»
09:27 moritz m: my $c = &cos.assuming(*); say $c(0)
09:27 camelia rakudo-moar c39db8: OUTPUT: «1␤»
09:28 moritz BooK: these are the possibilities I can think of right now
09:28 moritz m: my &a = &atan2.assuming(*, 0.5); say a(1); say atan2(1, 0.5)
09:28 camelia rakudo-moar c39db8: OUTPUT: «1.10714871779409␤1.10714871779409␤»
09:31 Aaronepower joined #perl6
09:31 cuonglm jnthn: how can I check a nqp op return code
09:32 cuonglm jnthn: the nqp ops document does not tell anything about return code, just the ops signature
09:32 jnthn Then it probably doesn't have one
09:33 jnthn Though can check the mapping in the compiler docs
09:33 jnthn But if there is a return code then the op just evaluates to it
09:33 jnthn s/compiler docs/compiler/
09:33 cuonglm jnthn: thanks
09:34 cuonglm also, I have a question this morning, I think you can help
09:34 cuonglm m: Buf.new(200).decode('utf8')
09:34 camelia rakudo-moar c39db8: OUTPUT: «Malformed termination of UTF-8 string␤  in block <unit> at <tmp> line 1␤␤»
09:34 cuonglm m: with '/tmp/test'.IO { .spurt: Buf.new: 200; dd .open.slurp }
09:34 camelia rakudo-moar c39db8: OUTPUT: «""␤»
09:34 cuonglm decode from a stream return empty string for an invalid utf 8
09:34 jnthn That one's RT'd
09:35 cuonglm jnthn: I dig into the source of MoarVM
09:35 jnthn Thanks, any help is welcome, especially if it leads to patches :)
09:36 cuonglm jnthn: I stuck at MVM_string_utf8_decodestream
09:36 jnthn Stuck how?
09:36 cuonglm jnth: https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8.c#L320
09:36 cuonglm jnthn: https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8.c#L320
09:37 lizmat joined #perl6
09:37 cuonglm jnthn: I doesn't fully understand how it works, I think the problem comes from this loop https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8.c#L467
09:38 lizmat_ joined #perl6
09:39 cuonglm jnthn: if I increase the number to2000000
09:39 cuonglm then an error raised
09:39 cuonglm m: with '/tmp/test'.IO { .spurt: Buf.new: 2000000; dd .open.slurp }
09:39 camelia rakudo-moar c39db8: OUTPUT: «Malformed UTF-8␤  in block <unit> at <tmp> line 1␤␤»
09:40 lizmat__ joined #perl6
09:43 lizmat joined #perl6
09:43 Cabanossi joined #perl6
09:44 sumdoc joined #perl6
09:44 sumdoc How to install perl 6 modules directly from github with zef?
09:46 cdg joined #perl6
09:49 sumdoc How to install perl 6 modules directly from github with zef?
09:49 Skarsnik zef install url doest not work?
09:50 sumdoc Which url to use? Is it the same as cloning url like the one with git clone?
09:50 sumdoc Skarsnik
09:51 Skarsnik no idea
09:59 Aaronepower joined #perl6
10:02 xtreak joined #perl6
10:13 astj joined #perl6
10:13 Aaronepower joined #perl6
10:13 Cabanossi joined #perl6
10:14 astj joined #perl6
10:15 someuser joined #perl6
10:16 stux|RC-only joined #perl6
10:18 Zoffix .
10:18 yoleaux 03:46Z <teatime> Zoffix: re: IRC::Client::Plugin::Factoid and maybe IRC::Client :  Curious if you were aware that bots aren't supposed to reply to NOTICE's, and if so how come you chose to do otherwise.  Also curious if the Factoid plugin is still something you're actively using/developing; I'm planning some changes, willing to coordinate design changes and pushing them upstream if you'd like.
10:20 teatime \o
10:20 Zoffix teatime, because replies to NOTICE are useful to me and I couldn't care less what the RFC no one is following strictly says. I'm not developing Factoid at the time, though IIRC it does have a DESIGN document that describes functionality it was planned to have
10:21 teatime fair enough, I kindof figured that on the NOTICEs
10:26 Aaronepower joined #perl6
10:26 ShalokShalom_ joined #perl6
10:31 Aaronepower joined #perl6
10:38 abraxxa joined #perl6
10:41 stmuk releasable6: next?
10:41 releasable6 stmuk, I cannot recognize this command. See wiki for some examples: https://github.com/perl6/whateverable/wiki/Releasable
10:41 jnthn releasable6: status
10:41 stmuk releasable6: status
10:41 releasable6 jnthn, Next release in 10 days and ≈8 hours. 1 blocker. Changelog for this release was not started yet
10:41 releasable6 stmuk, Next release in 10 days and ≈8 hours. 1 blocker. Changelog for this release was not started yet
10:41 releasable6 jnthn, Details: https://gist.github.com/86e9e538e421f9e427eda9a0ddd99be2
10:41 releasable6 stmuk, Details: https://gist.github.com/c83291df8738109e92e8e3bf4eb04e45
10:41 stmuk snap!
10:41 jnthn hah
10:43 Cabanossi joined #perl6
10:45 pmurias jnthn: did you think about randomizing our hashes (so that the hash lookup can't be O(n)'ed by malicious) data, or is that waiting for a volunteer? ;)
10:46 Aaronepower joined #perl6
10:46 jnthn Waiting for a victi^Wvolunteer :)
10:46 jnthn I'm fully in agreement with it happening
10:47 timotimo re-hash everything every time we major gc
10:47 jnthn :P
10:47 jnthn It's just a case of picking a random seed (and making sure it really is that) at startup, I think?
10:48 jnthn Though whoever does this should really talk to the Perl 5 folks that worked on this
10:48 jnthn Since there were subtleties
10:52 imcsk8 joined #perl6
10:53 eliasr joined #perl6
10:55 Zoffix Spotted this in my grocery store last night and, seeing it's made in Toronto, I'm convinced there's a bunch of people betting each other on which outrageous company name they can get away with: http://i.imgur.com/qcu4G6V.jpg
10:57 Geth ¦ whateverable: daeee06e3e | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Releasable.p6
10:57 Geth ¦ whateverable: Add “next” as one of the options
10:57 Geth ¦ whateverable:
10:57 Geth ¦ whateverable: Also, stop caring about the case.
10:57 Geth ¦ whateverable:
10:57 Geth ¦ whateverable: Issue #231, test needed.
10:57 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/daeee06e3e
10:57 margeas joined #perl6
10:57 releasable6 joined #perl6
10:58 mtj_ joined #perl6
11:00 AlexDaniel joined #perl6
11:01 AlexDaniel ????
11:01 AlexDaniel hm, interesting. ␤ is now working in the clog
11:01 AlexDaniel but not ????
11:03 stmuk_ joined #perl6
11:04 pmurias randomising hashes will also be usable to users (and roast test writers) as they will be no longer able to hard code hash order in tests
11:04 timotimo aye
11:04 jnthn Aye
11:06 cdg joined #perl6
11:08 Aaronepower joined #perl6
11:08 AlexDaniel .tell jdv79 Nice! You're awesome! But what about ?????
11:08 yoleaux AlexDaniel: I'll pass your message to jdv79.
11:09 AlexDaniel .tell jdv79 ( U+1F355 SLICE OF PIZZA [So] (????) )
11:09 yoleaux AlexDaniel: I'll pass your message to jdv79.
11:09 AlexDaniel m: error!
11:09 camelia rakudo-moar c39db8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3error7⏏5!␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement modifier loop␤»
11:11 AlexDaniel .tell jdv79 and while you're at it… any chance of improving the handling of irc colors? (“5===SORRY!5===” https://irclog.perlgeek.de/perl6/2017-09-06#i_15124087 )
11:11 yoleaux AlexDaniel: I'll pass your message to jdv79.
11:13 pmurias should 'a' x 1073741824 working be specced?
11:15 pmurias the test description is "repeat count equal to the NQP limit works"
11:15 pmurias and we die for ones that are bigger then the NQP limit
11:20 pmurias seems like very MoarVM specific behavior
11:24 itaipu joined #perl6
11:25 Zoffix pmurias: yeah, roast shouldn't mention such implementation details. That test could be moved to rakudo's test suit, unless we wish to spec some limits as mandatory for all implementations to follow
11:29 Zoffix (by implementation detail I mean writing the spec that says "language must behave like this because NQP behaves like this at this time")
11:40 Ulti has anyone other than timo checked out this tweet https://twitter.com/antonijnb/status/892815456121348097
11:40 Ulti perl6 --target=parse spt  made my laptop literally meltdown and I had to kill it after 22m53.092s
11:40 timotimo oof
11:40 Ulti if you do target ast it pops out straight away!
11:41 El_Che Ulti: literally?
11:41 timotimo could be we have an infinite loop or infinite recursion somewhere
11:41 Ulti and the total "time" for running with empty input is about 650ms but with only 40ms of that being the actual code
11:41 Ulti El_Che: literally
11:41 Ulti there is something lurking in the deep
11:41 Ulti and it had 100% CPU residency
11:41 Ulti it wasnt just sat there
11:41 El_Che the laptop is liquified and now in a cup? :)
11:42 Ulti hah
11:42 Ulti well its now really hot to touch
11:42 Ulti even on the keyboard side
11:42 El_Che I imagine
11:43 Cabanossi joined #perl6
11:43 cono is there any reason why am I getting Nil instead of any? http://paste.org.ru/?kxwxig
11:45 Zoffix Ulti: I don't see anyone asking what version the user uses :) For all we know, they're running 2013 version from dist's repos
11:46 Zoffix cono: that's new behaviour. Nil means lack of value; Any is just the default default default-typed variables have
11:46 Zoffix And you get that default if you assign a Nil into such a variable
11:48 cono m: my $x = Any; $x.say
11:48 camelia rakudo-moar c39db8: OUTPUT: «(Any)␤»
11:48 Zoffix m: my $x = Nil; $x.say
11:48 camelia rakudo-moar c39db8: OUTPUT: «(Any)␤»
11:48 Zoffix m: my $x is default(42) = Nil; $x.say
11:48 camelia rakudo-moar c39db8: OUTPUT: «42␤»
11:48 Zoffix m: my Int $x = Nil; $x.say
11:48 camelia rakudo-moar c39db8: OUTPUT: «(Int)␤»
11:49 cono totally lost :D
11:51 cono m: sub qwe() {return Any}; my $x = qwe(); $x.say
11:51 camelia rakudo-moar c39db8: OUTPUT: «(Any)␤»
11:51 Zoffix cono: you can tell the variable what ita default value is. Since Nil means no value, if you assign it to the variable, you get its default value. The default default is a type object of the same type as explicit type constraint on the variable, unless there isn't one, in which case it's Any
11:51 sena_kun joined #perl6
11:52 cono ok, but I'm getting Nil instead of Any
11:52 timotimo Zoffix: this problem is the other way around
11:52 timotimo maybe something in the way the regex engine calls action methods
11:53 Zoffix cono: In other words, there's nothing special about Any to mandate it beimg returned
11:53 Zoffix cono: oh sorry, I should've read your code more carefully
11:53 cono but why its returned from sub but returns Nil when I'm doing it in Actions.make
11:53 cono yeah :)
11:53 timotimo m: "hi" ~~ /../; make Any; say $/.made.perl
11:53 camelia rakudo-moar c39db8: OUTPUT: «Nil␤»
11:53 timotimo m: "hi" ~~ /../; make 1; say $/.made.perl
11:54 camelia rakudo-moar c39db8: OUTPUT: «1␤»
11:54 timotimo m: "hi" ~~ /../; make Nil; say $/.made.perl
11:54 camelia rakudo-moar c39db8: OUTPUT: «Nil␤»
11:54 timotimo okay, more likely about the make sub or method
11:54 Zoffix I know the answer
11:54 * Zoffix types
11:55 Zoffix cono: so all the stuff I explained about Nil being more appropriate than Any to return and that being new behaviour..... it's implemented using too broad a stroke and assumes that any type object being made means no match
11:56 Zoffix cono: and it needa to be fixed in rakudo to return a Nil only when the value it's testing is an NQPMu, right now it's using nqp::isconcrete
11:56 Zoffix and Any ain't it
11:56 timotimo oh, interesting
11:56 timotimo that's also the bug that hit YAMLish
11:56 cuonglm joined #perl6
11:57 Zoffix bisect: '' ~~ /^/; say $/.made
11:57 bisectable6 Zoffix, Bisecting by output (old=2015.12 new=c39db87) because on both starting points the exit code is 0
11:57 cono yes, i'm trying to use YAMLish and found this in the tests :)
11:57 Zoffix Yeah, same commit as what affected YAMLish
11:57 bisectable6 Zoffix, bisect log: https://gist.github.com/8e36dcbd2d11b8a8c7c16dc24de8b51d
11:57 bisectable6 Zoffix, There are 20 candidates for the first “new” revision. See the log for more details
11:57 Zoffix c: 2017.06 '' ~~ /^/; say $/.made
11:57 committable6 Zoffix, ¦2017.06: «No such method 'gist' for invocant of type 'NQPMu'. Did you mean 'isa'?␤  in block <unit> at /tmp/9iYM9kyYWZ line 1␤ «exit code = 1»»
11:58 Zoffix bisect: old=2017.06,new=HEAD '' ~~ /^/; say $/.made
11:58 bisectable6 Zoffix, Bisecting by exit code (old=2017.06 new=c39db87). Old exit code: 1
11:58 bisectable6 Zoffix, bisect log: https://gist.github.com/0dcd9f5ec89096b4f87f0d26a8cba701
11:58 bisectable6 Zoffix, (2017-08-21) https://github.com/rakudo/rakudo/commit/5db5b1dbfa0b625130573574e2409972387e9f75
11:58 Zoffix Chatting on phone while walking ain't fun :)
11:59 cuonglm Zoffix: Hi there
11:59 cuonglm Zoffix: I have a discussion with jnthn about a RT ticket you raise
11:59 cuonglm m: with '/tmp/test'.IO { .spurt: Buf.new: 200; dd .open.slurp };
11:59 camelia rakudo-moar c39db8: OUTPUT: «""␤»
12:00 Zoffix cono, Yeah, it's that commit ^. The isconcrete needs to be changed to something that tests for NQPMu and then your problem will be fixed
12:00 cuonglm but
12:00 cuonglm m: with '/tmp/test'.IO { .spurt: Buf.new: 2000000; dd .open.slurp };
12:00 camelia rakudo-moar c39db8: OUTPUT: «Malformed UTF-8␤  in block <unit> at <tmp> line 1␤␤»
12:00 cuonglm work as expected
12:01 timotimo m: '' ~~ /^/; say $/.made ~~ Mu
12:01 camelia rakudo-moar c39db8: OUTPUT: «True␤»
12:01 timotimo m: '' ~~ /^/; say $/.made ~~ Any
12:01 camelia rakudo-moar c39db8: OUTPUT: «True␤»
12:01 cuonglm Zoffix: I trace the source and found the function do the decode stream here https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8.c#L320
12:01 timotimo oh, that's not where nqpmu lives
12:01 cuonglm Zoffix: any suggestion how to fix?
12:02 cono Zoffix: thanks. Will take a look. But not sure that I get it :)
12:08 Zoffix cuonglm: no, no idea. Perhaps samcv++ would know more
12:09 Zoffix timotimo: perhaps the fix should be in NQP somewhere? The reason it started giving NQPMu was due to Match + Cursor merge
12:09 Zoffix cono: the reason you're not getting Any in your program is because of a bug in rakudo :)
12:10 Zoffix cono: you could work around it by `make`ing only objects, not type objects.
12:10 timotimo i assume NQPMu will show up as derived from rakudo's Mu, but we can just accept any value that's not nqp::isconcrete, but derived from rakudo's Any
12:11 Zoffix c: 2017.06 '' ~~ /^/; say $/.made.^mro
12:11 committable6 Zoffix, ¦2017.06: «No such method 'gist' for invocant of type 'NQPMu'. Did you mean 'isa'?␤  in block <unit> at /tmp/0iP3SXsXk4 line 1␤ «exit code = 1»»
12:11 Zoffix c: 2017.06 '' ~~ /^/; say $/.made.^mro.map: {.^name}
12:11 cuonglm Zoffix: How to notice samcv, I'm in Vietnam, a different timezone with all of you :(
12:11 committable6 Zoffix, ¦2017.06: «(NQPMu)»
12:11 [Coke] you can use ".tell samcv <message>"
12:11 Zoffix cuonglm: type .tell samcv your message  and the bot will relay the message
12:12 Zoffix .tell cuonglm Tôi có một anh chị em ruột người Việt Nam.
12:12 yoleaux Zoffix: I'll pass your message to cuonglm.
12:13 cuonglm .tell Zoffix "Thật ngạc nhiên, bạn có thể nói tiếng Việt"
12:13 yoleaux 12:12Z <Zoffix> cuonglm: Tôi có một anh chị em ruột người Việt Nam.
12:13 yoleaux cuonglm: I'll pass your message to Zoffix.
12:13 Zoffix :)
12:13 yoleaux 12:13Z <cuonglm> Zoffix: "Thật ngạc nhiên, bạn có thể nói tiếng Việt"
12:13 Cabanossi joined #perl6
12:15 wamba joined #perl6
12:15 piojo2 joined #perl6
12:16 Zoffix c: 2017.06 use nqp; '' ~~ /^/; dd nqp::istype($/.made, Mu)
12:16 committable6 Zoffix, ¦2017.06: «0»
12:16 Zoffix timotimo: that looks like a decent enough test on its own, eh? Since all Rakudo objects are Mus
12:17 * Zoffix hackety hacks
12:17 timotimo hmm.
12:17 timotimo we have to type all variables Mu if we want to assign a thing from nqp
12:17 timotimo which led me to believe that nqp objects would have to typecheck true as Mu
12:17 jdv79 moritz: did you alter the table?
12:17 yoleaux 11:08Z <AlexDaniel> jdv79: Nice! You're awesome! But what about ?????
12:17 yoleaux 11:09Z <AlexDaniel> jdv79: ( U+1F355 SLICE OF PIZZA [So] (????) )
12:17 yoleaux 11:11Z <AlexDaniel> jdv79: and while you're at it… any chance of improving the handling of irc colors? (“5===SORRY!5===” https://irclog.perlgeek.de/perl6/2017-09-06#i_15124087 )
12:18 jdv79 .tell AlexDaniel i'm guessing the 4 byte unicode fix just hasn't been implemented yet
12:18 yoleaux jdv79: I'll pass your message to AlexDaniel.
12:19 jdv79 .tell AlexDanial i don't have ddl write type privs on the db so its all moritz
12:19 yoleaux jdv79: I'll pass your message to AlexDanial.
12:29 raschipi joined #perl6
12:29 MARTIMM joined #perl6
12:34 [Coke] m: class utf8 does Blob[uint8] {}
12:34 camelia rakudo-moar c39db8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤P6opaque: missing attribute protocol in compose of utf8␤at <tmp>:1␤»
12:34 [Coke] .tell samcv the class definition you give for utf8 in the docs doesn't compile.
12:34 yoleaux [Coke]: I'll pass your message to samcv.
12:38 wamba joined #perl6
12:43 Zoffix .tell cono the latest and greatest Rakudo has a fix for your issue. You should be getting your Any again: https://github.com/rakudo/rakudo/commit/d0d105b8b6
12:43 yoleaux Zoffix: I'll pass your message to cono.
12:44 Zoffix .oO( make Match's .made Any again! )
12:47 Skarsnik hm nobody did a orm yet?
12:47 zakharyas joined #perl6
12:50 perlpilot joined #perl6
12:51 timotimo there's one called "quicky"
13:01 AlexDaniel joined #perl6
13:02 xtreak joined #perl6
13:04 cdg joined #perl6
13:10 moritz jdv79: I added a "CHARSET utf8" to an IN parameter of the stored proc
13:12 cdg_ joined #perl6
13:21 Skarsnik_ joined #perl6
13:25 squashable6 joined #perl6
13:28 Cabanossi joined #perl6
13:34 MARTIMM joined #perl6
13:36 MARTIMM using zef I would like to install from a github branch instead from the master to test installation before merging into master. does anyone know how to do this ?
13:38 Zoffix MARTIMM: I know one way. Switch to the branch on github and use the "Download ZIP" url..   zef install https://github.com/zoffixznet/perl6-WWW/archive/test-delete-me.zip
13:39 Zoffix (or make it manually:  https://github.com/$USERNAME/$REPO/archive/$BRANCH.zip
13:39 Zoffix )
13:39 Zoffix MARTIMM: or if you got a local checkout of it, run    zef install .
13:39 MARTIMM zoffix: do I have to prepare an archive after switching to that branch?
13:40 Zoffix MARTIMM: no, github makes it automagically
13:40 MARTIMM Zoffix: thanks I'll immediately
13:49 Sound joined #perl6
13:51 Skarsnik_ I am always confused. I need to use self in Role to acess the object attribute?
13:55 pmurias joined #perl6
14:07 telex joined #perl6
14:10 MARTIMM m: role A { has $!x = 10;};class B does A method x {say $!x;}; A.new.x;
14:10 camelia rakudo-moar 80a325: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse class definition␤at <tmp>:1␤------> 3role A { has $!x = 10;};class B does A7⏏5 method x {say $!x;}; A.new.x;␤»
14:11 moritz MARTIMM: need { before "method x"
14:11 MARTIMM m: role A { has $!x = 10;};class B does A { method x {say $!x;}}; A.new.x;
14:11 camelia rakudo-moar bfee5a: OUTPUT: «No such method 'x' for invocant of type 'A'␤  in block <unit> at <tmp> line 1␤␤»
14:12 jnthn B.new ?
14:12 MARTIMM m: role A { has $!x = 10;};class B does A { method x {say $!x;}}; B.new.x;
14:12 camelia rakudo-moar bfee5a: OUTPUT: «10␤»
14:12 Skarsnik_ m: role A { has $!x = 10; method foo{ say $!x}};class B does A { }; my B $b .= new; $b.foo;
14:12 camelia rakudo-moar bfee5a: OUTPUT: «10␤»
14:14 Skarsnik_ I get Cannot look up attributes in a StorableStory type object
14:14 Skarsnik_ on a larger code when trying to access an attribue
14:14 bisectable6 joined #perl6
14:14 Skarsnik_ SS is B in this case
14:15 moritz then you forgot a .new somewhere
14:15 Skarsnik_ that actually the issue x)
14:15 Skarsnik_ thx
14:16 Skarsnik_ the method is a constructor
14:16 Skarsnik_ that why x)
14:18 robertle joined #perl6
14:20 Skarsnik I am not sure to understand how to do stuff after a self.bless? do I need to call self everytime I want to access something in the method?
14:20 eroux joined #perl6
14:21 timotimo self.bless is just a call on the type object that self will be at that time
14:21 timotimo after that you have an object that you can handle, but self is still just the type object
14:24 moritz right, you can call methods on the return value of self.bless
14:24 llfourn joined #perl6
14:25 jdv79 moritz: can you alter that table to utf8mb4?  i think that would help.
14:25 Skarsnik m: role A { has $!x = 10; method init{$!x = 42}; method new-stuff{ self.bless.init}};class B does A { }; my B $b .= new-stuff;;
14:25 camelia rakudo-moar bfee5a: OUTPUT: «Type check failed in assignment to $b; expected B but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
14:26 Skarsnik m: role A { has $!x = 10; method init{$!x = 42}; method new-stuff{ my $s = self.bless; $s.init; $s}};class B does A { }; my B $b .= new-stuff;;
14:26 camelia rakudo-moar bfee5a: ( no output )
14:26 Skarsnik I see
14:29 Skarsnik hm
14:29 Skarsnik m: role A { has $.x = 10; method init{$.x = 42}; method new-stuff{ my $s = self.bless; $s.init; $s}};class B does A { }; my B $b .= new-stuff;;
14:29 camelia rakudo-moar bfee5a: OUTPUT: «Cannot modify an immutable Int (10)␤  in method init at <tmp> line 1␤  in method new-stuff at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:30 Skarsnik m: role A { has $.x = 10; method init{$!x = 42}; method new-stuff{ my $s = self.bless; $s.init; $s}};class B does A { }; my B $b .= new-stuff;;
14:30 camelia rakudo-moar bfee5a: ( no output )
14:30 jdv79 whoa, that table is 1.5GB?!
14:31 APic lol
14:31 APic Nice
14:31 moritz jdv79: this will come with quite a downtime
14:31 moritz jdv79: and ideally I'd like to test it first somehow
14:31 jdv79 yeah.  probably a a dump and load or a copy and transform
14:32 jdv79 i don't rmember exactly what would work - been a while since i've done that sort of thing
14:32 Skarsnik m: class C {has $.c}; role A { has $.x = 10; method init{$!x = 42}; method new-stuff{ my $s = self.bless; $s.init; $s}};class B is C does A { }; my B $b .= new-stuff;;
14:32 camelia rakudo-moar bfee5a: ( no output )
14:32 jdv79 that box doesn't seem too fast either:(
14:33 moritz well, it's a VM with non-local storage
14:33 Skarsnik I am not sure how to reproduce the error I get :(
14:34 moritz and 2GB RAM
14:34 Skarsnik Type check failed in binding to parameter '<anon>'; expected QDORM::QDBStorable but got StorableStory (StorableStory.new(_qd...)
14:34 Skarsnik in method  at /home/skarsnik/perl6/qdorm/lib/QDORM.pm (QDORM) line 93
14:34 Skarsnik . This point to an attribute definition x)
14:34 Skarsnik rah I hate when it cp new line x)
14:36 jdv79 moritz: well, let me know if i can help anymore.  basically its s/utf8/utf8mb4/ in a few places...
14:36 moritz jdv79: I'm creating a new copy of the ilbot_lines, called ilbot_lines_mb4, and I'm copying over the data
14:36 jdv79 probably including the one you just added:)
14:36 jdv79 cool
14:36 zakharyas joined #perl6
14:37 Skarsnik https://gist.github.com/Skarsnik/214745ebbb5d2d7ef353d1a1cb908e9d
14:38 Kyo91 joined #perl6
14:39 moritz jdv79: maybe we should continue this discussion in #ilbot to not interrupt the other discussions
14:42 xinming joined #perl6
14:42 ilbot3 joined #perl6
14:42 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!
14:43 moritz another Unicode test: ????
14:44 wamba joined #perl6
14:45 moritz nope :(
14:47 moritz seems I also need "set names utf8mb";
14:48 ilbot3 joined #perl6
14:48 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!
14:50 moritz ? - U+1F4A9 - PILE OF POO
14:50 ChoHag joined #perl6
14:52 rindolf joined #perl6
14:53 moritz m: say 42
14:53 camelia rakudo-moar bfee5a: OUTPUT: «42␤»
14:55 Actualeyes joined #perl6
14:58 Cabanossi joined #perl6
15:05 gregf_ joined #perl6
15:10 Ptolemarch joined #perl6
15:14 cpage joined #perl6
15:15 cpage__ joined #perl6
15:21 Aaronepower joined #perl6
15:22 sena_kun m: m: sub int_32() {};
15:22 camelia rakudo-moar bfee5a: ( no output )
15:22 sena_kun m: sub int-32() {};
15:22 camelia rakudo-moar bfee5a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub int7⏏5-32() {};␤    expecting any of:␤        new name to be defined␤»
15:22 sena_kun is it by-design in such cases?
15:23 sena_kun ah.
15:23 sena_kun m: sub foo-13() {};
15:23 camelia rakudo-moar bfee5a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub foo7⏏5-13() {};␤    expecting any of:␤        new name to be defined␤»
15:23 sena_kun understood~
15:28 khw joined #perl6
15:35 Zoffix foo-13 is not a valid identifier so - gets interpreted as a - and it complains you didn't give it a block for the sub
15:43 Ptolemarch joined #perl6
15:45 Ptolemarch joined #perl6
15:51 elenha joined #perl6
15:55 smls joined #perl6
15:57 smls What is the recommended way to deal with duplicate tickets in rt.perl.org?
15:57 jnthn Merge them
15:58 jnthn (Somehwere on the jumbo tab, iirc)
15:58 smls Even if it makes the resulting comment chain confusing?
15:58 mcmillhj joined #perl6
15:59 moritz smls: that's one reason I always quote an article I'm replying to
16:01 smls Ok, I'll remember to do that.
16:09 Geth ¦ doc: 85741773a9 | (Samantha McVey)++ | doc/Type/utf8.pod6
16:09 Geth ¦ doc: Make sure the utf8 class definition isn't tested
16:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/85741773a9
16:13 dogbert2 joined #perl6
16:13 Cabanossi joined #perl6
16:14 skids joined #perl6
16:26 Geth ¦ doc/molecules-patch-2: d15be280c7 | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Type/IO/Socket/Async.pod6
16:26 Geth ¦ doc/molecules-patch-2: Does this resolve #1538?
16:26 Geth ¦ doc/molecules-patch-2:
16:26 Geth ¦ doc/molecules-patch-2: Does simply removing the `if` statement resolve #1538?
16:26 Geth ¦ doc/molecules-patch-2: review: https://github.com/perl6/doc/commit/d15be280c7
16:26 Geth ¦ doc: molecules++ created pull request #1540: Does this resolve #1538?
16:26 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1540
16:29 AlexDaniel joined #perl6
16:30 skids Could someone close RT#124572 ? ... the test was wrong post-GLR and now fixed via roast 346f05833.  I can't close those subject-line-only tickets.
16:30 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124572
16:33 AlexDaniel skids: done
16:33 skids Thanxo
16:34 AlexDaniel skids: thanks for working on these tickets. They're really annoying :)
16:34 skids Only umpteen hundred to go :-)
16:52 pmurias every closed one counts :)
16:57 Sound joined #perl6
17:00 vike joined #perl6
17:01 weabot joined #perl6
17:01 Geth ¦ doc: 4a008cc20c | (Jan-Olof Hendig)++ | type-graph.txt
17:01 Geth ¦ doc: Add atomicint to type-graph.txt
17:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4a008cc20c
17:02 weabot How would I go about opening a FIFO in perl6?
17:02 weabot for writing
17:06 Geth ¦ doc: 761ee2dceb | (Jan-Olof Hendig)++ | doc/Type/atomicint.pod6
17:06 Geth ¦ doc: Fix indentation
17:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/761ee2dceb
17:06 Geth ¦ doc: 99cd781c71 | (Jan-Olof Hendig)++ | doc/Type/atomicint.pod6
17:06 Geth ¦ doc: Make atomic subs searchable
17:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/99cd781c71
17:06 teatime if you mean a unix named pipe, don't you just open/use it *exactly* like a file
17:06 weabot that's what I would think
17:06 weabot > my $inf = open("in", :w);
17:06 weabot Failed to tell in filehandle: 29
17:08 teatime hmm
17:09 cognominal joined #perl6
17:12 teatime weabot: works here, I'm on a dev version though newer than newest rakudo star
17:12 weabot hmm
17:12 weabot this is on a tiny debian 9 VPS
17:12 teatime hehe, same here precisely.
17:13 weabot yeah it's on 2016.12
17:13 weabot I'll see if I can find a more recent packaged version
17:14 Skarsnik should work probably?
17:14 teatime check out the installation instructions, they were newly revamped.  there's a link to some packages, however they install everything in /opt, so I didn't bother with them.
17:14 weabot would be worth it I think
17:15 Zoffix huggable: deb
17:15 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
17:15 Zoffix weabot: ^ you can grab latest packages there. There've been lots of changes to IO since 2016.12
17:15 weabot thanks
17:21 weabot it works now! :D thank you
17:21 APic ?
17:21 marcusramberg https://gist.github.com/marcusramberg/47d5268e4302c8618a1befd0401fa0a6 had to force some tests to install Cro (am at Oslo.pm talk)
17:22 Zoffix \o/
17:23 timotimo Unhandled exception: const_iX NYI  -  that looks like a version discrepancy between rakudo and moarvm
17:23 timotimo but that usually explodes violently every single thing you run and not just in some test or other
17:24 timotimo hm, or maybe it's bytecode corruption
17:28 marcusramberg this is after downloading and building rakudo-star according to the instructions on http://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Source
17:29 marcusramberg I tried using rakudo from arch first, but seems it's horribly broken.
17:31 timotimo strange, we should investigate
17:35 geekosaur weabot, teatime, rakudo was recently changed to enable buffering based on seekability. sounds like either the check is wrong or you have version skew causing it to misbehave
17:36 Zoffix Sounds like upgrade to latest release worked. The previous version was 2016.12
17:36 marcusramberg https://gist.github.com/marcusramberg/fcbf3d7f86729d83474d7892940c0f8a seems the tests were complaining for a reason.
17:37 Zoffix Fun tip: do not create a directory named "aux" in your repo or you'll waste 15 minutes trying to figure out why Windows git refuses to checkout
17:37 weabot geekosaur it was an older version, but yeah, the latest worked
17:37 moritz Zoffix: same with "con", "prn" and a few others
17:37 DerAlex joined #perl6
17:38 moritz CON PRN AUX NUL COM{1..9} LPT{1..9}
17:39 Zoffix yeah :)
17:39 APic :)
17:39 * geekosaur sometimes really wishes AVAILDEV=NO had caught on
17:42 timotimo marcusramberg: yes, you need a newer rakudo to have these methods
17:42 timotimo (i should know, i implemented them! :) )
17:44 Zoffix So Cro doesn't work on latest Star?
17:45 espadrine joined #perl6
17:45 rindolf Hi all
17:45 geekosaur Zoffix, I think that was expected and even announced (indirectly)
17:45 geekosaur as in "needs most recent development rakudo"
17:46 rindolf marcusramberg: which version of rakudo does arch have?
17:46 Zoffix Ah
17:46 marcusramberg rindolf: 2017.07
17:46 Zoffix marcusramberg: to get latest and greatest, you could build latest development commit with https://github.com/zoffixznet/r#linux
17:46 rindolf marcusramberg: rakudo seems fine on my fedora 26 x86-64 system
17:46 marcusramberg ok, so I need rakudo head. gonna give it a try
17:47 rindolf marcusramberg: ah, recent enough
17:47 marcusramberg rindolf: apparently not recent enough for Cro.
17:49 rindolf marcusramberg: ah
17:49 rindolf :(
17:49 geekosaur cro requires rakudo at least as new as the commit from just before Cro's announcement
17:49 rindolf geekosaur: heh
17:50 timotimo given how easy it was i kind of wish i had done it like a year ago
17:51 timotimo (give the async sockets methods to ask for ports and hostnames of both ends)
17:54 Rawriful joined #perl6
17:54 timotimo no use beating myself up about it. lotsa stuff i could have put in earlier
17:59 marcusramberg hopefully Cro will work for a while with the next release of Rakudo.
18:01 Zoffix huggable: star
18:01 huggable Zoffix, Estimated Rakudo Star releases for 2017: .01, .04, .07 & .10
18:01 Zoffix Prolly.
18:02 Zoffix I mean… we don't change stuff willy nilly and break everything every month. It just happened the author of Cro depended on bleeding-edge features.
18:04 * Zoffix is afraid of getting quoted in places :}
18:04 timotimo i wonder how badly cro would break if it didn't have these methods. like, what is it used for, exactly?
18:04 timotimo like, if it's just for debug output or something ... that'd be easy to stub
18:05 timotimo yup, it's for logging
18:06 timotimo annoying if it's gone, but not a reason to not work at all; wonder what the next problem would be if we just stubbed it in
18:09 raschipi Zoffix, I'm gathering quotes...
18:10 Zoffix raschipi: I'm charging $10 per quote now. Let me know where to send the invoice ;)
18:11 timotimo marcusramberg: git clone git@github.com:croservices/cro-core as well as cro-ssl and patch lib/Cro/SSL.pm6 and lib/Cro/TCP.pm6 respectively to return some random value from the four methods {peer,socket}-{host,port}
18:11 raschipi You own me one, already then?
18:11 raschipi I accept your offer.
18:18 leont joined #perl6
18:19 moritz Zoffix: "' # there you go, two quotes already
18:22 * Zoffix sends moritz an invoice for $20
18:25 raschipi I got dibs on one of those quotes.
18:25 jnthn Yeah, Cro depends on 2017.08 at least. In part for the feature mentioned, but far more so because working on it uncovered a nasty memory leak that was also fixed in 2017.08, and you'd really not want to run it with that leak.
18:26 jnthn (Where by "at least" I mean it should work on that release, and anything more recent would be fine too)
18:26 andrzejku joined #perl6
18:27 wamba joined #perl6
18:27 cdg joined #perl6
18:31 devmikey joined #perl6
18:31 zakharyas joined #perl6
18:33 TEttinger joined #perl6
18:33 El_Che I have 2017.08 Rakudo pkgs for linux users that want to try Cro: https://github.com/nxadm/rakudo-pkg/releases/ (marcusramberg)
18:34 smls Zoffix: Regarding zoffixznet/r: Wouldn't it make sense to use && instead of semicolons in the 'update-perl6' alias?
18:34 smls So it'll stop at the first error.
18:39 Aaronepower Are there any good resources for making classing based on Grammars? I can't seem to use `say` in any of the methods?
18:39 nine Of course users of openSUSE Tumbleweed only need to upgrade their rakudo package to the latest and users of openSUSE leap can find the package in the devel:languages:perl6 repository.
18:39 Aaronepower Action Objects specifically.
18:40 Zoffix smls: yeah, I good point
18:41 vike joined #perl6
18:45 moritz Aaronepower: I'm kinda writing a book about the whole topic (grammars, action classes) right now
18:46 moritz on https://perl6book.com/ you can sign up for a mailing list, so you'll be informed once it comes out
18:49 El_Che moritz: you've got a apress deal for that book too?
18:51 moritz El_Che: yes
18:51 El_Che nice
18:54 Geth ¦ doc: fe7a5e3bdd | (Jan-Olof Hendig)++ | doc/Type/atomicint.pod6
18:54 Geth ¦ doc: Fix typo
18:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fe7a5e3bdd
18:59 tak_ joined #perl6
19:00 * Zoffix is reminded to get cracking on The White Book
19:01 Zoffix I think Along with The White Book, The Gray Book, and The Black Book, there's bee The Green Book, which is half-a-book sided intro to absolute programming beginners who'd read it before going to The White Book
19:03 Zoffix s/bee/be/; s/sided/sized/;
19:03 geekosaur best read while listening to the white album?
19:04 Zoffix Hehe.
19:09 Aaronepower joined #perl6
19:27 nadim joined #perl6
19:28 Cabanossi joined #perl6
19:29 lancew joined #perl6
19:32 Aaronepower Can anyone help explain why this says Nil? https://paste.rs/zH1
19:37 leont I guess nothing in it allows for the space between the hours and the minutes
19:39 smls joined #perl6
19:41 geekosaur Grammar::Tracer shows it matching the 1 and then failing afterward, so more likely the space between the digits and the time unit
19:43 Aaronepower leont: Oh my god.
19:43 geekosaur oh wait, no such. hm
19:44 Aaronepower leont: But wait. minutes and hours are both rule I thought that allowed whitespace?
19:44 geekosaur still, it's the minutes rule and then the hours rule failing, both apparently after matching <digit?
19:44 Sound joined #perl6
19:45 geekosaur oh, I think I know. bet ltm doesn't work over multiple productions...
19:45 Aaronepower geekosaur: ltm?
19:45 geekosaur longest token matching
19:45 geekosaur but that didn't work either, so hm.
19:46 geekosaur basically I was ondering if it matched 'hr' and succeeded (but trace doesn't show that, so that was wrong anyway) and then failed on the next part and didn't backtrack to retry with 'hrs'
19:51 leont I think .make should be .made (second last line)
19:51 Geth ¦ doc: a912956225 | skids++ | 2 files
19:51 Geth ¦ doc: Give Seq.skip its own documentation
19:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a912956225
19:51 geekosaur leont, actually removing that to check directly was first thing I tried, but still Nil
19:56 Zoffix Aaronepower: you're calling .make at the end, it should be .made
19:58 cdg joined #perl6
19:58 Zoffix :/ how does that code even compile? It should complain about .make having too few arguments
19:59 Aaronepower Zoffix: One time it did.
19:59 Zoffix Ah, k, nevermind
19:59 Zoffix It goes to Nil.make
20:00 cdg_ joined #perl6
20:04 smls committable6: releases say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:05 Zoffix Aaronepower: backtracking is why you get Nil
20:05 Zoffix rules/tokens don't backtrack
20:06 Aaronepower Zoffix: Is there no way to do that with Grammars?
20:06 Zoffix Aaronepower: you could use `regex` instead of token/rule
20:06 leont fg
20:06 Zoffix Aaronepower: if I change hours and minutes tokens to regex it starts to match, though dies telling me invalid digit
20:07 Zoffix leont: bash: fg: current: no such job
20:07 smls Looks like bisectable6 isn't in the channel, and committable6 doesn't respond...
20:07 bisectable6 joined #perl6
20:07 committable6 joined #perl6
20:07 Zoffix smls: try again
20:08 smls bisectable6:  say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:08 bisectable6 smls, On both starting points (old=2015.12 new=bfee5a1) the exit code is 1 and the output is identical as well
20:08 bisectable6 AlexDaniel, MasterDuke: I'm acting stupid on #perl6. Help me.
20:08 bisectable6 smls, No! It wasn't me! It was the one-armed man! Backtrace: https://gist.github.com/e9da7b646e88ea74efcf26d846eb746f
20:08 Aaronepower Zoffix: Can you show that code? I did the same thing and it still is Nil
20:08 smls committable6: releases say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:09 raschipi joined #perl6
20:11 Zoffix Aaronepower: https://gist.github.com/zoffixznet/dd2252f167233b007dd9993bbb2986ad
20:13 raschipi ?
20:13 committable6 joined #perl6
20:13 Zoffix mc: say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:13 committable6 AlexDaniel, MasterDuke: I'm acting stupid on #perl6. Help me.
20:13 committable6 Zoffix, No! It wasn't me! It was the one-armed man! Backtrace: https://gist.github.com/6286db6b3844931a4515953647160786
20:14 Zoffix smls: I guess there's some sort of a bug in Pastebin::Gist that makes it turn up bad request when the bot tries to paste
20:14 Zoffix m: say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:14 camelia rakudo-moar bfee5a: OUTPUT: «5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Bogus statement␤at /home/camelia/EVAL_0:1␤------> 3<BOL>7⏏5"ా"␤    expecting any of:␤        prefix␤        term␤»
20:15 Zoffix mc: die "meow"
20:15 committable6 Zoffix, ¦2015.12: «meow␤  in block <unit> at /tmp/HhfBpxjm7x line 1␤ «exit code = 1»»
20:15 Zoffix mc: warn "meow" for ^10
20:15 committable6 Zoffix, https://gist.github.com/ea603c951fd07120078905f13b53e02a
20:16 Zoffix committable6: releases say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:16 committable6 AlexDaniel, MasterDuke: I'm acting stupid on #perl6. Help me.
20:16 committable6 Zoffix, No! It wasn't me! It was the one-armed man! Backtrace: https://gist.github.com/332ecce36bad6569ec8fe15a1b9b1004
20:16 Zoffix at least it doesn't hang now :)
20:17 timotimo did someone post the nuclear option again? :(
20:17 timotimo or was it the telugu vowel sign aa?
20:17 Zoffix .oO( is one-armed man more dangerous than un-armed man? )
20:17 timotimo in any case, my terminal is busted yet again %)
20:18 Zoffix timotimo: the telugu I'm guessing
20:18 grondilu joined #perl6
20:18 timotimo looks just like
20:18 grondilu m: class Real {}
20:18 camelia rakudo-moar bfee5a: ( no output )
20:18 grondilu m: class Rat {}
20:18 camelia rakudo-moar bfee5a: ( no output )
20:18 grondilu m: class Int {}
20:18 camelia rakudo-moar bfee5a: OUTPUT: «===SORRY!===␤This type cannot box a native integer: P6opaque, Int␤»
20:19 grondilu what is the policy regarding redefining core types?
20:19 timotimo grondilu: it basically immediately uses an Int for something
20:19 Zoffix grondilu: "it still needs polish"
20:19 timotimo if you replace Int it better have a box target for ints
20:19 leont You just voided your warranty!
20:19 Aaronepower Zoffix: Are you running v6.c?
20:20 Aaronepower Zoffix: Because that code gives me Nil.
20:20 Zoffix grondilu: related ticket: https://rt.perl.org/Ticket/Display.html?id=130020#ticket-history
20:20 smls Zoffix, timotimo:  The bug relating to the TELUGU VOWEL SIGN AA that I meant to bisect:  https://rt.perl.org/Ticket/Display.html?id=132041
20:21 Zoffix Aaronepower: running 2017.05-389-g326faed and I get this: https://gist.github.com/zoffixznet/95dedcf1b4a6bf2d5149f846673cb065
20:21 smls Maybe Whateverable itself is affected by the same bug, or a variation of it.
20:21 Aaronepower Zoffix: I'm running 2017.07
20:21 Zoffix Aaronepower: though strangely, if I add <.ws> tokens between digit and hr/min, I get Nil and I'd thought that'd not affect it that much :/
20:22 Aaronepower It really shouldn't be this difficult to parse out numbers from strings.
20:22 Zoffix Aaronepower: heh, it isn't :)
20:23 * grondilu goes for 'Integer' as a name
20:24 Zoffix grondilu: oh, I guess the ticket I linked to isn't 100% related, sorry
20:24 raschipi grondilu: P6 has your back
20:24 Zoffix But it's in the same vein of "user trying to mess with core" type of stuff.
20:25 Zoffix m: class Int {}
20:25 camelia rakudo-moar bfee5a: OUTPUT: «===SORRY!===␤This type cannot box a native integer: P6opaque, Int␤»
20:25 Zoffix m: my class Int {}
20:25 camelia rakudo-moar bfee5a: OUTPUT: «===SORRY!===␤This type cannot box a native integer: P6opaque, Int␤»
20:25 Zoffix timotimo: isn't the replacement lexical? Why is it trying to unbox anything in the first place?
20:26 perlpilot m: constant Int = Int;
20:26 camelia rakudo-moar bfee5a: ( no output )
20:26 perlpilot m: constant Int = Str;
20:26 camelia rakudo-moar bfee5a: OUTPUT: «===SORRY!===␤This type cannot box a native integer: P6opaque, Str␤»
20:26 perlpilot cute
20:27 * grondilu sometimes wishes there was a --no-core option
20:27 raschipi grondilu: write a .txt file
20:28 Zoffix Aaronepower: basically, you're trying to parse the number and then looking for the postfix modifier (min/hr) if you fail to find it you need to backtrack to match the number again for the other token. And I'm guessing the failure to match I'm seeing is because after failing to match one token, it goes for <digit> again and fails to match that. Just rewrite your grammar to not require backtracking. As one Tim
20:28 Zoffix said: backtracking in grammars is a smell
20:29 * leont wrote a YAML parser that's about 95% backtracking free :-)
20:31 smls bisectable6:  say so try "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
20:31 bisectable6 smls, On both starting points (old=2015.12 new=bfee5a1) the exit code is 0 and the output is identical as well
20:31 bisectable6 smls, Output on both points: «False»
20:31 leont Apparently 77 tokens, 3 rules and 1 regex
20:33 Juerd What does "P6opaque: no such attribute '$!reified' in type List when trying to get a value" mean?
20:36 Zoffix Juerd: internal bug that shouldn't be visible to end users
20:36 Zoffix Juerd: are you running latest-enough version?
20:36 Juerd Zoffix: Few days ago
20:36 grondilu how do I enforce method return type on child classes?
20:36 Zoffix Hm
20:36 Juerd m: my %h = <a 1 b 2>; "a" ~~ /%h/
20:36 Zoffix m: say "foobar" ~~ /foo <.ws> bar/
20:36 camelia rakudo-moar bfee5a: OUTPUT: «P6opaque: no such attribute '$!reified' in type List when trying to get a value␤  in block <unit> at <tmp> line 1␤␤»
20:36 camelia rakudo-moar bfee5a: OUTPUT: «Nil␤»
20:37 Zoffix I thought <ws> matched zerospaces.
20:37 Zoffix m: my %h = <a 1 b 2>; "a" ~~ /@%h/
20:37 camelia rakudo-moar bfee5a: ( no output )
20:37 grondilu m: class Foo { method f(--> Int) {...} }; class :: is Foo { method f { "foo!" } }.new.f
20:37 camelia rakudo-moar bfee5a: ( no output )
20:37 grondilu m: class Foo { method f(--> Int) {...} }; class :: is Foo { method f { "foo!" } }.new.f.say
20:37 camelia rakudo-moar bfee5a: OUTPUT: «foo!␤»
20:37 grondilu ^see what I meaN
20:37 grondilu ?
20:38 Zoffix Juerd: vaguelly recall reporting that issue but don't see the ticket
20:38 grondilu or do I have to repeat the --> type for all children?  That'd be dull.
20:39 Zoffix grondilu: have to repeat
20:39 Zoffix Though, I would've expected this to carp:L
20:39 Zoffix m: class { proto method f(--> Int) {*}; multi method f { "foo!" } }.new.f.say
20:39 camelia rakudo-moar bfee5a: OUTPUT: «foo!␤»
20:40 Juerd m: my %unit2sec = <day 86400 hr 3600 min 60>; my @units = %unit2sec.keys; my $sec = [+] gather { for "1hr 30 min" ~~ m:g/$<num> = (\d+) \s* $<unit> = @units s? \s*:/ { take .<num> * %unit2sec{.<unit>} } }; say $sec;
20:40 camelia rakudo-moar bfee5a: OUTPUT: «5400␤»
20:40 Juerd TIMTOWTDI and I like simple regexes for simple strings :)
20:40 Zoffix m: class Foo { proto method f() { given {*} -> Int $_ { $_ } } }; class :: is Foo { proto method f(--> Int) {*}; multi method f { "foo!" } }.new.f.say
20:40 camelia rakudo-moar bfee5a: OUTPUT: «foo!␤»
20:41 * Zoffix stares
20:41 Zoffix Oh, I left in other proto
20:41 Zoffix m: class Foo { proto method f() { given {*} -> Int $_ { $_ } } }; class :: is Foo { multi method f { "foo!" } }.new.f.say
20:41 camelia rakudo-moar bfee5a: OUTPUT: «Type check failed in binding to parameter '$_'; expected Int but got Str ("foo!")␤  in method f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
20:41 Zoffix At least that works (not to be used in real code tho, I think, too dirty)
20:42 Juerd Aaronepower: See ^ for a grammerless alternative. Doesn't check for wellformedness, though.
20:42 Zoffix .ask jnthn are return type checks in protos simply NYI or are they not meant to work? This doesn't die: class { proto method f(--> Int) {*}; multi method f { "foo!" } }.new.f.say
20:42 yoleaux Zoffix: I'll pass your message to jnthn.
20:43 Aaronepower Juerd: The point of doing this is to learn grammars. As this is just a precursor to a much more complex struture.
20:43 Aaronepower structure*
20:43 Juerd Am I misremembering that a %hash in a regex matches any of its keys? The simplest attempt borks and I can't find documentation for it.
20:43 Juerd Aaronepower: The completely ignore my suggestion :)
20:43 Zoffix Aaronepower: my take on that grammar that uses proto regex for units. Though I'm a grammar noob: https://gist.github.com/zoffixznet/8c3e1a873e1b1a4ce2985f09c83bc444
20:44 Aaronepower Zoffix: Okay, why use sym?
20:44 perlpilot m: my %h = a => 1, b => 3;  say "a" ~~ %h; say "x" ~~ %h;
20:44 camelia rakudo-moar bfee5a: OUTPUT: «True␤False␤»
20:45 perlpilot Juerd: ^^^
20:45 Zoffix Juerd: found the ticket: https://rt.perl.org/Ticket/Display.html?id=131243#ticket-history
20:45 Juerd perlpilot: /%h/ though
20:45 Aaronepower Zoffix: Also I thought the point of rule was to do exactly what token time-op is doing?
20:45 Zoffix Aaronepower: dunno, you had it in your original example, so I left it in (it sums up all the differn time tokens)
20:46 Aaronepower Zoffix: No I didn't?
20:46 Zoffix Aaronepower: " method TOP($/) { make $<time-op>>>.made.sum }"
20:47 Aaronepower Zoffix: I said sym. Like why use unit:sym<mins> over just token mins?
20:47 Juerd Meh, rt :(
20:47 Juerd When I click reply, I get an almost empty page.
20:48 Zoffix Aaronepower: yeah, me too (re `rule`), but looks like <ws> token doesn't match empty space. You could override it and make it match tho: https://gist.github.com/zoffixznet/c82217a616ad878620f71b35c8da5893
20:48 perlpilot Juerd: according to S05, "The use of a hash variable in patterns is reserved."
20:48 Juerd perlpilot: Too bad :|
20:48 Zoffix Or maybe it matches it only some times, I've no idea. Waiting for moritz++'s book to learn all the things :)
20:48 grondilu m: class Number { has Real $.value }; class Fraction is Number { has Rat $.value; }; class Integer is Number { has Int $.value; }; say Integer.new(:value(1))
20:48 camelia rakudo-moar bfee5a: OUTPUT: «Integer.new(value => 1, value => 1)␤»
20:49 grondilu hum, sorry, I failed to reproduce an error I had locally.
20:49 Zoffix :)
20:50 Zoffix Aaronepower: oh sym.. Sorry, I'm blind :) Less repetition and easier to extend. Now, you can even mix in a role that adds more time units and the grammar will still work.
20:51 Juerd Zoffix: Why not just use <ws>? instead?
20:51 Zoffix Aaronepower: there's an example here: https://docs.perl6.org/language/grammars#Protoregexes
20:51 Zoffix Juerd: I did use it in the first example
20:51 * Zoffix relocates
20:51 Juerd Zoffix: Phrased differently: why override?
20:51 Aaronepower Zoffix: Yes, I've read those examples a lot of times. I haven't found them very helpful tbh.
20:52 grondilu m: class Number { has Real $.value }; class Fraction is Number { has Rat $.value; }; class Integer is Fraction { has Int $.value; }; say Integer.new(:value(1))
20:52 camelia rakudo-moar bfee5a: OUTPUT: «Type check failed in assignment to $!value; expected Rat but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
20:52 Zoffix Aaronepower: modularity basically. Why add another method into the class when you can add a bunch of if/else statements and provide all functionallity from a single method?
20:53 Zoffix Aaronepower: but TIMTOADY
20:53 * Zoffix &
20:53 Juerd To me, it makes sense that <ws> would match whitespace, and not a lack thereof. A modifier can be used to match something or nothing, but because a modifier cannot turn a token that's \s* into \s+, it makes sense to have the token be \s+ and allow a ? to effectively turn it into \s*
20:54 Zoffix Juerd: we were matching with a `rule` tho, which has implict <ws> that you can't `?` hence the override
20:54 * Zoffix &
20:54 grondilu m: class Foo { has Rat $.value }; class :: is Foo { has Int $.value }.new(:value(0)).say
20:54 camelia rakudo-moar bfee5a: OUTPUT: «Type check failed in assignment to $!value; expected Rat but got Int (0)␤  in block <unit> at <tmp> line 1␤␤»
20:54 grondilu ^not quite sure this is ok
20:54 Juerd Zoffix: implicit <.ws> iirc, but if you don't need that, you probably shouldn't use rules :D
20:55 Juerd (I personally don't use sigspace (and thus rule { ... }) because I don't fully understand when exactly <.ws> is implied.
20:55 Juerd )
20:59 lancew Hi all, has anyone tried building rakudobrew on a DigitalOcean droplet before? I'm close but the build fails: https://gist.github.com/lancew/1bba0d35d4cab961a57e9fd8e82513a0
21:00 sena_kun lancew, just a wild guess, but it seems there's not enough RAM.
21:00 sena_kun lancew, how much does your droplet have?
21:01 lancew ahhh... yeah smallest RAM
21:01 sena_kun "Killed" looks like OOM.
21:01 Zoffix You need ~1.4GB ram+swap
21:01 Zoffix lancew: what OS is this on?
21:01 sena_kun lancew, you can try with a swap.
21:01 lancew 512mb ram
21:02 sena_kun https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04 - but consider red square text *very* good. I'd rather build it locally and then deployed the results.
21:03 perlpilot Juerd: I've had that problem with :sigspace in the past too.  It takes some getting used to.
21:03 Zoffix You don't have to build. There are packages for many systems
21:04 ruoso___ m: my ($e) = grep { $_ eq 1 }, (1, 2, 3); say $e.WHAT
21:04 camelia rakudo-moar bfee5a: OUTPUT: «(Int)␤»
21:04 Zoffix Juerd: it gets applied if there's whitespace after token
21:04 Zoffix Juerd: err.. after "atom"
21:04 Zoffix (what's an atom; dunno)
21:06 lancew sena_kun, ok trying the swapfile route, thanks
21:06 zakharyas joined #perl6
21:07 grondilu m: class Foo { has $.x }; class :: is Foo { submethod BUILD(:$y) { $!x = $y } }.new(:y)
21:07 camelia rakudo-moar bfee5a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Attribute $!x not declared in class <anon|78696080>␤at <tmp>:1␤------> 3oo { submethod BUILD(:$y) { $!x = $y } }7⏏5.new(:y)␤    expecting any of:␤        horizontal whitespace␤        postf…»
21:07 grondilu isn't $!x inherited from Foo?
21:07 lancew Zoffix, the version on there is Ubuntu so pretty old. :-(
21:08 lancew sena_kun, wyou think maybe I build locally then scp up the .rakudobrew dir?
21:09 Zoffix huggable: deb
21:09 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
21:09 perlpilot Zoffix, Juerd: My way of thinking about it now is "It gets applied after a matching thing."  so, for / ( foo ) /, if :sigspace were in effect it would be equivalent to /(foo<.ws>)<.ws>/  (I think :)
21:09 Zoffix lancew: ^ use those debs. Freshly squeezed :)
21:09 Zoffix perlpilot: ah. Thanks
21:09 lancew Zoffix++
21:09 ash_gti joined #perl6
21:09 sena_kun lancew, well, it's up to you in the end. But I'd do so. Consider I am not an expert, I just have the smallest droplet too and did some things with it. :)
21:10 Zoffix grondilu: it's private. You can't access it directly from subclass
21:10 sena_kun lancew, and yes, package is >>>>>> better than buliding.
21:10 sena_kun *building/transferring
21:10 sena_kun even.
21:10 grondilu Zoffix I did write has $.x
21:11 grondilu m: class Foo { has $.x }; class :: is Foo { submethod BUILD(:$y) { $.x = $y } }.new(:y)
21:11 camelia rakudo-moar bfee5a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Virtual method call $.x may not be used on partially constructed object (maybe you mean $!x for direct attribute access here?)␤at <tmp>:1␤------> 3s :: is Foo { submethod BUILD(:$y) { $.x7⏏5 = $y …»
21:11 grondilu so it's public
21:11 grondilu oh wait that error message is better
21:12 grondilu hum not that much actually
21:12 Zoffix grondilu: ah, missed it. $.x means "autogenerate public acceasor for private attribute $!x". You can access it in subclass, but only through that accessor
21:13 Aaronepower Are there any good examples of a multi file cli project with tests?
21:16 Zoffix buggable: eco zef
21:16 buggable Zoffix, zef 'It's like [cpanm] wearing high heels with a tracksuit': https://github.com/ugexe/zef 1 other matching results: https://modules.perl6.org/s/zef
21:16 Zoffix Aaronepower: that comes to mind ^
21:16 ruoso___ m: my $a = (1,2,3); my $e; ($e) = grep { $_ }, @$a; say $e.WHAT
21:16 camelia rakudo-moar bfee5a: OUTPUT: «(Seq)␤»
21:16 ruoso___ m: my $a = (1,2,3); my ($e) = grep { $_ }, @$a; say $e.WHAT\
21:16 camelia rakudo-moar bfee5a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my ($e) = grep { $_ }, @$a; say $e.WHAT\7⏏5<EOL>␤    expecting any of:␤        postfix␤»
21:16 ruoso___ m: my $a = (1,2,3); my ($e) = grep { $_ }, @$a; say $e.WHAT
21:16 camelia rakudo-moar bfee5a: OUTPUT: «(Int)␤»
21:17 ruoso___ why would the first get me a Seq and the second an Int?
21:17 Zoffix ruoso___: my with () does special things
21:17 ruoso___ hmm... I really wasn't expecting those not to be equivalent
21:17 Zoffix :)
21:18 ruoso___ so what is the correct syntax for the case where I'm not declaring the variable at the same time?
21:18 Zoffix ruoso___: to do what? Unpack a list?
21:19 lancew :-) # perl6 -v
21:19 lancew This is Rakudo version 2017.08 built on MoarVM version 2017.08.1
21:19 ruoso___ do a simple list assignment from grep
21:19 ugexe bind will work
21:19 lancew # install_zef_as_root
21:19 lancew Cloning into 'zef_root'...
21:19 lancew remote: Counting objects: 8914, done.
21:19 lancew remote: Compressing objects: 100% (7/7), done.
21:19 lancew remote: Total 8914 (delta 1), reused 5 (delta 1), pack-reused 8906
21:19 lancew Receiving objects: 100% (8914/8914), 1.59 MiB | 2.48 MiB/s, done.
21:19 Zoffix ruoso___: well, that's what you get. You get the Seq in it
21:19 lancew Resolving deltas: 100% (5476/5476), done.
21:19 lancew Checking connectivity... done.
21:19 lancew ===SORRY!===
21:19 lancew not enough memory
21:19 lancew :-(
21:19 Zoffix 0.o
21:20 timotimo oops
21:20 Zoffix ruoso___: what are you trying to do with the list assignment? Unpack the list so the first item is stored in $X?
21:21 ruoso___ yes
21:21 Aaronepower Zoffix: To use multiple files do I have to have a META6.json?
21:21 Zoffix m: my $a = (1,2,3); my $e; $e = $a.first: *.so; say $e.WHAT
21:21 camelia rakudo-moar bfee5a: OUTPUT: «(Int)␤»
21:21 ugexe m: my $a = (1,2,3); my $e := grep { $_ }, @$a; say $e.WHAT
21:21 camelia rakudo-moar bfee5a: OUTPUT: «(Seq)␤»
21:22 Zoffix m: my $a = (1,2,3); my $e; $e = $a.grep({ $_ })>$a; say $e.WHAT
21:22 camelia rakudo-moar bfee5a: OUTPUT: «(Bool)␤»
21:22 Zoffix bah, my keyboard is glitching again
21:22 Zoffix m: my $a = (1,2,3); my $e; $e = $a.grep({ $_ }).head; say $e.WHAT
21:22 camelia rakudo-moar bfee5a: OUTPUT: «(Int)␤»
21:22 Zoffix That's two ways
21:23 ruoso___ I guess $a.first: is the most idiomatic
21:23 Zoffix ruoso___: basically, the mistake you're making is assuming Perl's (I'm guessing) automatic flattening semantics. We just do it differently.
21:23 ruoso___ well, not quite
21:23 ruoso___ since I'm creating a left-value with the same dimensions
21:24 ruoso___ I was expecting it to do (a, b, c) = (d, e, f)
21:24 lizmat and it doesn't ?
21:24 ruoso___ not with grep
21:24 ruoso___ it doesn't interpolate the Seq as a list
21:25 Zoffix ruoso___: but (a) is not a list, it's jsut a
21:25 Zoffix m: my $a = (1,2,3); my $e; ($e,) = grep { $_ }, @$a; say $e.WHAT
21:25 camelia rakudo-moar bfee5a: OUTPUT: «(Int)␤»
21:25 ruoso___ aha!
21:25 Zoffix Guess I should've showed this example :)
21:25 Zoffix Sorry. I had my own brain fart
21:25 ruoso___ That was what I was missing
21:26 Zoffix Yeah, comma is significant in this case to make a list thingy
21:26 perlpilot I guess it is strange that my ($e) = ... acts different from my $e; ($e) = ...
21:26 perlpilot But Perl 6 is strange ;)
21:26 Zoffix There might be a ticket for that actually
21:26 * Zoffix calls it a day
21:26 Zoffix \o
21:26 ruoso___ yeah, I'd consider that to be a bug
21:28 ruoso___ but the important bit was actually me missing that it's the comma that create lists, not the parenthesis
21:28 ruoso___ which interestingly enough is the same semantics python has
21:31 Aaronepower What is Perl6's cargo or npm? zef seems to only handle external projects. What is the correct way to create a new perl6 project?
21:31 sena_kun Aaronepower, Ddt module?
21:31 Aaronepower sena_kun: I don't know what that is.
21:32 sena_kun https://github.com/kalkin/Ddt/
21:32 sena_kun Or https://github.com/skaji/mi6
21:33 perlpilot Does ddt talk to CPAN yet?
21:34 sena_kun Dunno.
21:34 lizmat mi6 does
21:34 perlpilot yeah, some amalgam of ddt and mi6 would be perfect.  :)
21:35 Aaronepower sena_kun: The problem I have is I can't seem to get those to work, zef doesn't add them to the PATH.
21:36 sena_kun Aaronepower, can't help with that with such an information amount, unfortunately. Is filling a github's issue an option?
21:37 ugexe zef is not going to set users PATH
21:37 ugexe it tells you where it installed bin scripts to, which you can then add to your PATH
21:38 Aaronepower ugexe: I've added `~/.perl6/bin` to the PATH but that isn't even a folder that exists.
21:38 ugexe did zef tell you it installed anything there?
21:38 Aaronepower ugexe: Nope
21:38 ugexe so why did you add that path?
21:39 Aaronepower ugexe: Because someone here said that was the problem.
21:40 ugexe when you install something with zef it will tell you where at the end. see: https://travis-ci.org/ugexe/zef/jobs/271885999#L1627
21:43 lizmat joined #perl6
21:46 Aaronepower ugexe: Hmm, apparently homebrew rakudo places bin scripts in a different place than elsewhere. Thanks.
21:48 ash_gti joined #perl6
22:02 dogbert2 joined #perl6
22:14 jameslenz joined #perl6
22:15 Khisanth joined #perl6
22:20 [Coke] samcv: is RT #129878 closable?
22:20 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=129878
22:30 samcv yeah that's closable [Coke]. it was fixed with another rt
22:30 samcv that was the same issue
22:52 konsolebox joined #perl6
22:54 ash_gti hmm, I'm seeing something odd with `IO::Notification.watch-path`, when it detects a change its appending the filename to itself: IO::Notification::Change $file = IO::Notification::Change.new(path => "foo.p6/foo.p6", event => FileChangeEvent::FileChanged)
22:54 ash_gti I passed in 'foo.p6' as the path to watch
22:55 ash_gti does that need to be a relative path? './foo.p6'?
22:58 Cabanossi joined #perl6
23:01 wamba joined #perl6
23:01 Zoffix ash_gti: you could try. I was under the impression IO::Notification was for watching directories and you'd just look for changes to the file you're interested in.
23:01 Zoffix (IO::Notification wants some lovin'; it didn't get any during IO Grant work)
23:02 BenGoldberg joined #perl6
23:04 ash_gti yea, just doing: 'foo.p6'.IO.watch.act { dd $^file; };  is having the filename repeated
23:06 jnthn I suspect it's somewhere assuming it's watching a directory
23:08 Zoffix ash_gti: thanks for reporting. I filed a bug ticket for this: https://rt.perl.org/Ticket/Display.html?id=132043
23:12 ash_gti thanks for filing the bug
23:19 raschipi joined #perl6
23:28 Cabanossi joined #perl6
23:40 AlexDaniel joined #perl6
23:48 pompomcrab joined #perl6
23:51 pompomcrab question: is there a way to have "normal" module file names instead of i.e. /usr/local/perl6/share/perl6/site/sources/550EDE9A5964CAD65D8DE06101C62DC9A1145D0A
23:52 pompomcrab i want to edit some lines in an installed module to debug a thing and it would be easier to find which file if the file name wasn't a hash
23:53 teatime sigh, I wish I knew of a terminal emulator that both 1) can be resized in single-pixel increments, and 2) wasn't generally lame or dog-slow
23:55 geekosaur pompomcrab, that's not even the actual installed module that perl 6 will use; *that* is bytecode
23:56 geekosaur so no, you can;t usefully edit an installed module, name or no name
23:56 ash_gti https://github.com/perl6/nqp/blob/d93277beeb8bd697b835b680694d7a65b5b9f7e7/docs/ops.markdown#watchfile seems to be a bit inconsistent with other docs, that only mentions files, not directories
23:58 Cabanossi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo