Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 skids joined #perl6
00:06 cpage_ joined #perl6
00:06 teatime "No failures!"  XD
00:07 ZoffixLappy sweet
00:07 ZoffixLappy Funny. I was just surprised myself my code worked the first time without a single error!
00:08 BenGoldberg joined #perl6
00:18 teatime (Real $a, Duration:D $b) and (Instant:D $a, Real:D $b)  <-- having these two different signatures for infix - causes me a bit of an issue when doing Instant - Duration...  any thoughts ?
00:19 ZoffixLappy joined #perl6
00:19 teatime oh... I bet I could make a (Instant, Duration) one and it would thus be more-specific, the problem is that these are equally specific I bet
00:20 * teatime wonders if there is a better way... some way to specifiy that in this case, (Instant:D $a, Real:D $b) should win ...
00:20 ZoffixLappy teatime, what's the issue?
00:22 teatime (Real $a, Duration:D $b) and (Instant:D $a, Real:D $b) are ambiguous.  (when I have Instant minus Duration)
00:22 teatime oh my 1st post was in between your disconnect
00:23 ZoffixLappy I looked at the log.
00:24 ZoffixLappy m: say 'test'
00:24 camelia rakudo-moar d1eeb3: OUTPUT«test␤»
00:24 ZoffixLappy Ugh. This wifi is less stable than.... unstable things
00:24 ZoffixLappy teatime, I see no possible way those are ambiguous
00:26 Ben_Goldberg joined #perl6
00:26 ZoffixLappy m: multi infix:<***> (Real $a, Duration:D $b) { say $a - $b.Real; }; multi infix:<***> (Instant:D $a, Real:D $b) { say $a.Real - $b; }; say 4.2 - Duration.new: 42;
00:26 camelia rakudo-moar d1eeb3: OUTPUT«-37.8␤»
00:27 ZoffixLappy Smart, Zoffix! Declare an op and don't actually use it :(
00:27 ZoffixLappy m: multi infix:<***> (Real $a, Duration:D $b) { say $a - $b.Real; }; multi infix:<***> (Instant:D $a, Real:D $b) { say $a.Real - $b; }; say 4.2 *** Duration.new: 42;
00:27 camelia rakudo-moar d1eeb3: OUTPUT«-37.8␤True␤»
00:27 ZoffixLappy teatime, works fine
00:28 BenGoldberg m: (now - INIT {now}).perl.say
00:28 camelia rakudo-moar d1eeb3: OUTPUT«Duration.new(<650/385101>)␤»
00:28 yoleaux 11 Apr 2016 23:54 EDT <AlexDaniel> BenGoldberg: it is parsed as a positional argument
00:29 ZoffixLappy FWIW, now - INIT now works too; no need for curlies
00:29 BenGoldberg m: now.perl.say
00:29 camelia rakudo-moar d1eeb3: OUTPUT«Instant.from-posix(<641162741406/439>, Bool::False)␤»
00:32 BenGoldberg m: now.sqrt.perl.say
00:32 camelia rakudo-moar d1eeb3: OUTPUT«38216.5879577031e0␤»
00:33 teatime ZoffixLappy: the operation that triggers the 'it's ambiguous' error is Instant - Duration, so which one should it pick, Instant - Real or Real - Duration ?
00:33 ZoffixLappy Neither
00:33 teatime then what?
00:33 ZoffixLappy Hmm.
00:33 ZoffixLappy m: multi infix:<***> (Real $a, Duration:D $b) { say $a - $b.Real; }; multi infix:<***> (Instant:D $a, Real:D $b) { say $a.Real - $b; }; say now *** Duration.new: 42;
00:33 camelia rakudo-moar d1eeb3: OUTPUT«Ambiguous call to 'infix:<***>'; these signatures all match:␤:(Real $a, Duration:D $b)␤:(Instant:D $a, Real:D $b)␤  in block <unit> at /tmp/jbl7dOKgmu line 1␤␤»
00:33 teatime ^^
00:34 ZoffixLappy yeah
00:34 teatime I think i could make a Instant Duration signature'd function
00:34 teatime but I'd rather just have the Instant Real function win out over Duration Real
00:34 ZoffixLappy m: multi infix:<***> (Real $a, Duration:D $b) { say $a - $b.Real; }; multi infix:<***> (Instant $a, Duration:D $b) { say $a.Real - $b.Real; }; multi infix:<***> (Instant:D $a, Real:D $b) { say $a.Real - $b; }; say 4.2 *** Duration.new: 42;
00:34 camelia rakudo-moar d1eeb3: OUTPUT«-37.8␤True␤»
00:34 BenGoldberg Why is it that Instant 'does Real', when it's obviously got a Rat in it?
00:35 ZoffixLappy Isn't Real a role, but Rat a type?
00:35 ZoffixLappy and Rat does Real?
00:35 BenGoldberg Hmm, nevermind then.
00:35 ZoffixLappy teatime, I see what's happening, it can't decide whether to coerce Instant into a Real or a Duration into a Real... Well, I'm guessing they both are doing Real.
00:36 teatime BenGoldberg: TBH, I also think that's a bit of an issue
00:36 teatime Rat seems to be a PITA to make work in the ecosystem of Numeric/Real roles
00:36 teatime at least if by 'work' you mean 'not turn into a Num at the drop of a hat an lose precision'
00:37 teatime but I'm not sure what the fix it... it seems like maybe there's other stuff that needs finished/finalized beforehand
00:37 BenGoldberg Maybe we should make it so that Reals are more likely to turn into Rats ;)
00:37 teatime ZoffixLappy: yeah exactly
00:37 ZoffixLappy But Real isn't a type
00:38 BenGoldberg m: 1e0.perl.say
00:38 camelia rakudo-moar d1eeb3: OUTPUT«1e0␤»
00:38 BenGoldberg m: 1e0.WHAT.say
00:38 camelia rakudo-moar d1eeb3: OUTPUT«(Num)␤»
00:39 teatime I have a patch nearly done, to try to improve Duration a little.
00:39 ZoffixLappy Cool
00:40 teatime but I haven't been able to learn enough to fix everything, heh.
00:40 teatime and possibly I went overboard on the tests
00:40 teatime they can be removed later though if need-be; I needed them to confirm it was behaving right.
00:41 ZoffixLappy What's the improvement?
00:41 cyberviking joined #perl6
00:42 teatime 1) Duration and Instant behave like value types,  2) Duration now becomes Rat instead of Num in explicit numeric context (unary +),  3) Added * and / operations to Duration, fixing #127339
00:42 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127339
00:44 ZoffixLappy Cool. teatime++
00:44 teatime also, when I did 127339, I am doing dimensionally-aware operations... which, I think I came up w/ a decent system for that hopefully is intuitive and not-annoying enough to just be the default, but possibly it will need to be an option whether to use the dimensionally-aware operations or not
00:44 teatime (i.e., Duration / Duration → unitless number)
00:48 kid51 joined #perl6
00:51 ZoffixLappy \o/ finished implementing the final bits of glot.io API's in GlotIO module. By far the nicest API I ever had to implement.
00:52 ZoffixLappy Now, all I need is tests... :) I'm following the BDD pattern.
00:52 ZoffixLappy Beer Driven Development :)
01:02 ZoffixLappy subtest in Test.pm6 needs a multi :( This looks so much nicer: https://gist.github.com/zoffixznet/10cfd20925efffb33160e778bbf9b8f6
01:02 ZoffixLappy or 'description', { block }. Having description at the end is awful.
01:04 Actualeyes joined #perl6
01:05 Xliff Does NativeCall have a sizeof() for repr('CStruct') classes?
01:09 Sqirrel joined #perl6
01:10 Xliff Hmmm....
01:10 Xliff Got this when running a script through p6-valgrind-m
01:10 Xliff http://pastebin.com/YjXbBbeE
01:10 Xliff Is this a known bug?
01:10 Xliff I will recompile rakudo and try again.
01:12 ZoffixLappy m: say <2 latest> ⊆ ('2', 'latest').Seq
01:12 camelia rakudo-moar d1eeb3: OUTPUT«False␤»
01:12 ZoffixLappy Huh?
01:12 ZoffixLappy m: say <2 latest> ⊆ <2 latest>.Seq
01:12 camelia rakudo-moar d1eeb3: OUTPUT«True␤»
01:12 ZoffixLappy What's the difference?
01:13 ZoffixLappy m: say <x2 latest> ⊆ ('x2', 'latest').Seq
01:13 camelia rakudo-moar d1eeb3: OUTPUT«True␤»
01:13 * ZoffixLappy guesses the types
01:13 geekosaur m: <2 latest>.perl.say
01:13 camelia rakudo-moar d1eeb3: OUTPUT«(IntStr.new(2, "2"), "latest")␤»
01:16 sortiz Xliff, if class Foo is repr('CStruct') { … }  you can use nativesizeof(Foo).
01:19 Xliff sortiz, thanks.
01:21 Xliff Awesome!
01:21 Xliff ok 10 - size of ogg_stream_state: 360
01:21 Xliff .tell timotimo The wordy struct idea for the $.header attribute worked! Thanks for the help!
01:21 yoleaux Xliff: I'll pass your message to timotimo.
01:30 AlexDaniel ZoffixLappy: yeah, it's not the first time I see somebody say “huh?” when IntStrs appear
01:31 ZoffixLappy :)
01:32 geekosaur every DWIM comes with a WAT...
01:33 geekosaur this is the WAT that comes with "perlish" string/number conflation
01:33 ZoffixLappy :)
01:34 ZoffixLappy I'm fine with it. This really came up during my writing a test. Were I to inspect my received data first, I wouldn't have been surprised.
01:38 molaf joined #perl6
01:40 Xliff http://pastebin.com/YjXbBbeE <- Not appearing anymore after updating rakudo to latest git.
01:41 AlexDaniel PASTEBIN! NOOOoooooooooo
01:41 Xliff AlexDaniel, got a better solution?! :p
01:42 ZoffixLappy Xliff, https://gist.github.com/ or http://fpaste.scsys.co.uk/
01:46 AlexDaniel Xliff: https://gist.github.com/
01:46 ZoffixLappy pastebin.com has been known for mangling the paste. Not to mention their aggressive adfest campaign
01:46 Xliff Wow. Using gist as a pastebin replacement is like using a sledgehammer to swat flies.
01:46 AlexDaniel what's the difference?
01:46 Xliff Yeah, well pastebin is a habit.
01:46 ZoffixLappy Why? Both store the same amount of data, except one is ad-free and has decent highlighting :)
01:46 AlexDaniel I mean, besides that you get a bit of extra functionality that you don't have to use
01:46 Xliff I will start using fpaste.
01:46 ZoffixLappy There's an fpaste module too :)
01:46 ZoffixLappy ShadowPaste or whatever it's called. Should be usable for App::Pastebin
01:46 Xliff Yeah. Was wondering about that, ZoffixLappy
01:46 ZoffixLappy Or App::Nopaste
01:46 Xliff Isn't one of the bots fpaste aware?
01:46 AlexDaniel There are also https://gitlab.com/explore/snippets and https://bitbucket.org/snippets
01:46 ZoffixLappy Unsure. Maybe not.
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:47 Xliff ZoffixLappy, I think it's here.
01:47 ZoffixLappy Nope. Tried twice. No announcement
01:48 AlexDaniel Xliff: what do you mean by “overkill”? You open the website, paste your content, save and share the link. What makes it an overkill?
01:48 ZoffixLappy I guess some bot needs to be here.
01:48 shadowpaste0 "AlexDaniel" at 217.168.150.38 pasted "Test" (1 line) at http://fpaste.scsys.co.uk/510359
01:48 ZoffixLappy :S
01:48 Xliff LOL
01:48 ZoffixLappy Sorcery!
01:49 Xliff Weird! I tried to paste something and the link doesn't work.
01:49 Xliff http://fpaste.scsys.co.uk/02873
01:50 AlexDaniel you have to provide your nickname I guess
01:50 Xliff I did.
01:50 ZoffixLappy Xliff, you've used nickname that stared with a capital letter
01:50 ZoffixLappy It's a spam protection.... of questionable usability.
01:50 shadowpaste0 "ZoffixLappy" at 217.168.150.38 pasted "Test" (1 line) at http://fpaste.scsys.co.uk/510361
01:50 AlexDaniel xD
01:50 ZoffixLappy wtf
01:50 AlexDaniel ZoffixLappy: oh look! You have the same IP address! How weird!
01:50 ZoffixLappy How did it even get "ZoffixLappy!" :S
01:50 shadowpaste0 "xliff" at 217.168.150.38 pasted "Self referential." (1 line) at http://fpaste.scsys.co.uk/510362
01:50 Xliff Huh
01:51 cdg joined #perl6
01:51 ZoffixLappy It checks against the IPs in the channel...
01:51 ZoffixLappy shadowpaste0, creepy!
01:51 Xliff Why didn't it get "Xliff" instead of "xliff"?
01:52 * ZoffixLappy is reminded of "a ghost in the machine" from iRobot.
01:53 ZoffixLappy "I, Robot"
01:54 teatime this is a pretty awesome slidedeck https://speakerdeck.com/sidnet/perl-6-the-butterfly-has-landed
01:54 teatime is the author someone here?
01:54 Xliff m: $a = 4.7382; say $a.unpack("WWWW");
01:54 camelia rakudo-moar d1eeb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6q20D17Eg8␤Variable '$a' is not declared␤at /tmp/6q20D17Eg8:1␤------> 3<BOL>7⏏5$a = 4.7382; say $a.unpack("WWWW");␤»
01:55 Xliff m: my $a = 4.7382; say $a.unpack("WWWW");
01:55 camelia rakudo-moar d1eeb3: OUTPUT«Method 'unpack' not found for invocant of class 'Rat'␤  in block <unit> at /tmp/KRWUkY7q6r line 1␤␤»
01:56 Xliff m: my $a = 4.7382; say $a.chars;
01:56 camelia rakudo-moar d1eeb3: OUTPUT«6␤»
01:56 Xliff m: my $a = 4.7382; say @$a.chars;
01:56 camelia rakudo-moar d1eeb3: OUTPUT«6␤»
01:59 tharkun joined #perl6
02:00 Xliff Is there any way to get the byte representation of a scalar without using pack/unpack?
02:00 ZoffixLappy Probably not. What do you mean by "byte representation"?
02:01 Xliff The internal representation of a value.
02:01 Xliff Generally for things like floats.
02:01 sortiz Only if the value is native
02:02 Xliff sortiz: That they are.
02:02 Xliff sortiz: What's the best way to do that, then?
02:03 sortiz In particular for num32 and num64 you can use a native 'array' to pass them to NC.
02:03 Xliff Ah. Thanks.
02:04 sortiz Both can be used in CArray and CStruct.
02:05 sortiz num32 is C float, and num64 is C double.
02:06 Xliff Right. Thanks.
02:09 sortiz m: my $b = Buf[num32].new(1e0,2e0); # And Bufs/Blobs of them will be supported soon, i hope.
02:09 camelia rakudo-moar d1eeb3: OUTPUT«Could not instantiate role 'Blob':␤Bufs with native num32 not yet implemented. Sorry. ␤  in any  at gen/moar/m-Metamodel.nqp line 2432␤  in any specialize at gen/moar/m-Metamodel.nqp line 2419␤  in any specialize at gen/moar/m-Metamodel.nqp line 26…»
02:10 djbkd joined #perl6
02:20 Xliff m: say for ^4
02:20 camelia rakudo-moar d1eeb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1WhUdItiQO␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at /tmp/1WhUdItiQO:1␤------> 3…»
02:20 Xliff m: .say for ^4
02:20 camelia rakudo-moar d1eeb3: OUTPUT«0␤1␤2␤3␤»
02:21 ZoffixLappy m: say $("created", "file_hash", "id", "language", "modified", "owner", "public", "title", "url") ⊆ ("modified", "id", "owner", "title", "language", "public", "files_hash", "created", "url").Seq
02:21 camelia rakudo-moar d1eeb3: OUTPUT«False␤»
02:21 ZoffixLappy Why is this false?
02:21 ZoffixLappy My impression of the power of ⊆ operator is diminishing every time I use it lol
02:22 sortiz Xliff, The documentation for 'array' is sparse, but the following should work:  sub fread(array[num64], size_t, size_t, FILE) is native; my $a = array[num64].new; $a[100] = 0e0; fread($a, 8, 100, $file); # With a proper $file :-)
02:23 ZoffixLappy m: say ("created", "file_hash", "id", "language", "modified", "owner", "public", "title", "url") ⊆ ("modified", "id", "owner", "title", "language", "public", "files_hash", "created", "url")
02:23 camelia rakudo-moar d1eeb3: OUTPUT«False␤»
02:23 ZoffixLappy This is most weird. Order doesn't matter to ⊆ op, does it?
02:26 geekosaur file_hash, files_hash
02:27 ZoffixLappy geekosaur++ thank you.
02:28 matiaslina joined #perl6
02:30 kent\n joined #perl6
02:30 kent\n joined #perl6
02:43 noganex_ joined #perl6
02:54 polyfloyd joined #perl6
02:55 Actualeyes left #perl6
03:11 cdg joined #perl6
03:30 MadcapJake does NativeCall work with .a (static) libraries?
03:31 jack_rabbit I'd be super surprised.
03:36 Hotkeys m: say ("created", "file_hash", "id", "language", "modified", "owner", "public", "title", "url") ⊆ ("created", "file_hash", "id", "language", "modified", "owner", "public", "title", "url")
03:36 camelia rakudo-moar d1eeb3: OUTPUT«True␤»
03:37 sortiz MadcapJake, No, the loader only work with dynamic ones.
03:45 gabiruh joined #perl6
03:56 zdm joined #perl6
03:58 nige1 joined #perl6
04:03 Xliff m: use NativeCall;
04:03 camelia rakudo-moar d1eeb3: ( no output )
04:09 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my @d = nativecast(CArray, $c); say "D: @d"
04:09 camelia rakudo-moar d1eeb3: OUTPUT«988246␤Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque␤  in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 39…»
04:09 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my $d = nativecast(CArray, $c); say "D: @d"
04:09 camelia rakudo-moar d1eeb3: OUTPUT«289968␤Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque␤  in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 39…»
04:11 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my CArray $d = nativecast(CArray, $c); say "D: @d"
04:11 camelia rakudo-moar d1eeb3: OUTPUT«199847␤Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque␤  in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 39…»
04:11 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my CArray[uint8] $d = nativecast(CArray[uint8], $c); say "D: @d"
04:11 camelia rakudo-moar d1eeb3: OUTPUT«776516␤Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque␤  in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 39…»
04:12 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my @d := nativecast(CArray[uint8], $c); say "D: @d"
04:12 camelia rakudo-moar d1eeb3: OUTPUT«334953␤Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque␤  in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 39…»
04:13 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
04:13 camelia rakudo-moar d1eeb3: OUTPUT«75038␤»
04:13 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
04:13 camelia rakudo-moar d1eeb3: OUTPUT«503003␤»
04:13 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
04:13 camelia rakudo-moar d1eeb3: OUTPUT«651175␤»
04:13 Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
04:13 camelia rakudo-moar d1eeb3: OUTPUT«247740␤»
04:13 sortiz m: use NativeCall; my uint64 $c; $c = (^2).pick; say $c.WHAT;
04:13 camelia rakudo-moar d1eeb3: OUTPUT«(Int)␤»
04:14 MadcapJake is there a simple way to get the proper path slash per OS?
04:14 Xliff m: use NativeCall; my uint64 $c; $c = rand * 1000000; say $c
04:14 camelia rakudo-moar d1eeb3: OUTPUT«This type cannot unbox to a native integer␤  in block <unit> at /tmp/Hx_vvsCC_k line 1␤␤»
04:14 Xliff m: use NativeCall; my uint64 $c; $c = (rand() * 1000000); say $c
04:14 camelia rakudo-moar d1eeb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LUgagQPEFo␤Unsupported use of rand(); in Perl 6 please use rand␤at /tmp/LUgagQPEFo:1␤------> 3use NativeCall; my uint64 $c; $c = (rand7⏏5() * 1000000); say $c␤»
04:15 Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
04:15 camelia rakudo-moar d1eeb3: OUTPUT«189742␤»
04:15 Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
04:15 camelia rakudo-moar d1eeb3: OUTPUT«103155␤»
04:15 Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
04:15 camelia rakudo-moar d1eeb3: OUTPUT«248620␤»
04:15 Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
04:15 camelia rakudo-moar d1eeb3: OUTPUT«434310␤»
04:15 Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
04:15 camelia rakudo-moar d1eeb3: OUTPUT«273894␤»
04:15 Xliff Weird. rand seems slower than (^x).pick
04:16 teatime MadcapJake: if you can, avoid thinking about it, use the available abstraction (in this case, IO::Path)
04:16 teatime MadcapJake: but re: your actual question, there are only really 2 in common use;  Windows with \ and *nix+Apple with /
04:16 MadcapJake yeah I think dir(test => ...) should cover me really
04:16 teatime MadcapJake: but paths are complicated enough that it's easier to just use the libs where people have thought more about the edge cases than I want to / am likely to.
04:17 MadcapJake right I just thought maybe there was an easy $*DISTRO.dir-sep (like there is path-sep)
04:18 sortiz m: say IO::Spec.dir-sep
04:18 camelia rakudo-moar d1eeb3: OUTPUT«Method 'dir-sep' not found for invocant of class 'IO::Spec'␤  in block <unit> at /tmp/_eUMzYxCs8 line 1␤␤»
04:18 ugexe m: say $*SPEC.dir-sep
04:18 camelia rakudo-moar d1eeb3: OUTPUT«/␤»
04:18 MadcapJake yes! I knew there had to be one somewhere :P
04:18 sortiz That :)
04:20 MadcapJake sortiz, ugexe, teatime: thanks!
04:20 Xliff Hrm.
04:20 Cabanossi joined #perl6
04:20 kjk_ joined #perl6
04:20 teatime hrm... does IO::Path not have a join function?
04:20 Xliff I'm trying to take a uint64 and get back 8 uint8s. What's the best way to do that?
04:21 Xliff In P5 I would use unpack, but I'd like to avoid "use experimental".
04:21 MadcapJake teatime: IO::Spec does
04:22 MadcapJake no docs unfortunately
04:23 teatime word.
04:23 skids m: 0xfedcba9876543210.polymod(256 xx *).fmt("%x").say
04:23 camelia rakudo-moar d1eeb3: OUTPUT«10 32 54 76 98 ba dc fe␤»
04:24 Xliff skids: Thanks.
04:24 * Xliff looks up polymod.
04:24 skids Probably is not fast.
04:26 kjk_ how do you refer to a method without calling it? other than getting a Method object from $obj.^methods is there a shorter or more direct way?
04:26 Xliff https://doc.perl6.org/ doesn't seem to have any writeup on polymod.
04:28 Xliff m: 0xfedcba9876543210.polymod(256 xx *).reverse.fmt("%x").say
04:28 camelia rakudo-moar d1eeb3: OUTPUT«fe dc ba 98 76 54 32 10␤»
04:29 Xliff skids: OK. That's mathematically correct... but doesn't account for ordering.
04:29 skids you mean endianness?
04:30 Xliff Yes
04:30 Actualeyes joined #perl6
04:30 Xliff I was hoping to cheat.
04:30 Xliff my uint64 $c; $c = (^1000000).pick; say $c; my @d = nativecast(CArray, $c);
04:31 Xliff But that gives me an error with the nativecast call.
04:31 Xliff my uint64 $c; $c = (^1000000).pick; say $c; my @d := nativecast(CArray, $c);
04:32 skids m: my @primes = (0..50).grep(*.is-prime); say $_,.polymod(@primes) for @primes
04:32 camelia rakudo-moar d1eeb3: OUTPUT«2(0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0)␤3(1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0)␤5(1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0)␤7(1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0)␤11(1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0)␤13(1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0)␤17(1 2 2 0 0 0 0 0 0 0 0 0 0 0 0…»
04:34 skids So you are trying to generate a CArray of 8 random uint8's?
04:38 sortiz m: use NativeCall;  Buf[uint8].new(nativecast(CArray[uint8],Buf[int64].new(0x1234567891011))[0..7]).say; # Ugly but work.
04:38 camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<11 10 89 67 45 23 01 00>␤»
04:41 skids sortiz++
04:42 skids IIRC there was at some point discussed (designed?) some sort of ".view" methid for buffers to see the same memory at different bit widths.
04:44 sortiz m: use NativeCall;  Buf[uint8].new(nativecast(CArray[uint8],array[num64].new(1.2345678e-4))[0..7]).say; # The bytes of a double ;-)
04:44 camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<90 8b 46 aa 85 2e 20 3f>␤»
04:45 sortiz skids, Some kind of poly-parameterized Blob?
04:46 * teatime debates internally about what to work on now.
04:46 skids Well more like several different Bufs/Blobs pointing to the same storage.
04:51 cdg joined #perl6
04:54 sortiz .oO( Blob/Bufs can't share storage, but unmanaged CArrays can. )
04:56 skids It would have to be some sort of built-in indirection/refcount to play nice with GC.
04:56 sortiz Yep
05:05 Xliff skids: No. I am trying to convert the uint to a character array.
05:06 skids So the question becomes what endianness gets used and why.
05:06 Xliff Hmmm.... Maybe try sortiz version.
05:07 Xliff Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
05:07 Xliff m: Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
05:07 camelia rakudo-moar d1eeb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0fvM8hYjk9␤Undeclared name:␤    CArray used at line 1. Did you mean 'Array', 'array'?␤Undeclared routine:␤    nativecast used at line 1␤␤»
05:07 Xliff m: use NativeCall; Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
05:07 camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<90 34 a2 02 00 00 00 00>␤»
05:08 Xliff m: use NativeCall; Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
05:08 camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<90 e4 e2 03 00 00 00 00>␤»
05:08 Xliff m: use NativeCall; Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
05:08 camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<90 74 eb 03 00 00 00 00>␤»
05:08 Xliff Nice!
05:13 Xliff m: use NativeCall; Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[^8]).say
05:13 camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<2e 5a 15 00 00 00 00 00>␤»
05:17 sortiz Xliff, btw  the slice is needed 'cus the returned CArray is 'unmanaged', so .elems doesn't work.
05:19 nine Good morning from a train to Vienna!
05:20 sortiz o/ nine, good trip!
05:21 dalek DBIish: a93a9d7 | (Salvador Ortiz)++ | / (2 files):
05:21 dalek DBIish: NativeLibs::Searcher: API cleaned up.
05:21 dalek DBIish: review: https://github.com/perl6/DBIish/commit/a93a9d7127
05:23 Xliff sortiz: Oh! Thanks! I was wondering about that!
05:23 Xliff OK. So here's the "final product"
05:23 Xliff https://gist.github.com/Xliff/53f4c7e86c2e0711b177ac89cbf5d87a
05:26 ryand joined #perl6
05:27 cyberviking joined #perl6
05:33 zdm joined #perl6
05:35 sortiz Xliff, the gist seem to miss a ')'.
05:38 sue_ joined #perl6
05:39 sortiz And you know the size of the struct so if $a isa ogg_stream_state_header,  Blob[uint8].new(nativecast(CArray[uint8], $a))[^nativesizeof(ogg_stream_state_header)]); should do the full trick.
05:46 djbkd joined #perl6
05:52 CIAvash joined #perl6
06:01 MadcapJake made some decent progress on CompUnit::Repository::GX tonight! Not ready for public consumption yet, but getting there.
06:01 MadcapJake g'night all!
06:01 nine \o/
06:11 sjoshi joined #perl6
06:17 ufobat joined #perl6
06:18 ufobat moring perl6 :D
06:19 teatime morning.
06:20 djbkd joined #perl6
06:24 webmind joined #perl6
06:24 wamba joined #perl6
06:27 _nadim joined #perl6
06:29 Sgeo joined #perl6
06:31 firstdayonthejob joined #perl6
06:38 Xliff sortiz: OOo! That should work with "self" then, right?
06:39 aleogen `should'
06:43 sortiz Xliff, Yep, I suppose
06:43 nakiro joined #perl6
06:44 Xliff # sortiz++
06:44 Xliff method as_blob2 {
06:44 Xliff return Blob[uint8].new(
06:44 Xliff nativecast(CArray[uint8], self))[
06:44 Xliff ^nativesizeof(ogg_stream_state_header)
06:44 Xliff ]
06:44 Xliff );
06:44 Xliff }
06:44 Xliff Ugh!
06:44 sue_ joined #perl6
06:47 sortiz You can remove 'return' :-)
06:48 geekosaur joined #perl6
06:50 domidumont joined #perl6
06:50 sortiz I see an extra ')'
06:55 domidumont joined #perl6
06:59 fireartist joined #perl6
06:59 _mg_ joined #perl6
07:03 cibs joined #perl6
07:07 rindolf joined #perl6
07:22 nige1 joined #perl6
07:24 SalamiTactics joined #perl6
07:27 djbkd joined #perl6
07:31 djbkd joined #perl6
07:33 zakharyas joined #perl6
07:34 jack_rabbit joined #perl6
07:35 wamba1 joined #perl6
07:37 ely-se joined #perl6
07:52 TEttinger joined #perl6
08:12 fireartist joined #perl6
08:12 RabidGravy joined #perl6
08:14 RabidGravy boom
08:14 moritz bang!
08:14 darutoko joined #perl6
08:18 DrForr Wait, boom *today*?
08:23 psch /o\
08:23 RabidGravy I'd say so
08:24 TEttinger yep, homestuck did end today
08:26 psch so i wasted part of boom day with writing documentation? :|
08:26 El_Che psch: future you will not realize that it's should be thankful :)
08:34 Actualeyes left #perl6
08:36 psch well, i suppose it depends on what exactly will go boom vOv
08:36 wamba joined #perl6
08:43 dakkar joined #perl6
08:44 * psch ponders commit directly to ecosystem
08:44 psch +ing
08:44 psch OTOH, it does feel kinda bad, adding something without a single test
08:45 psch then again, *someone* said "ship it!" yesterday vOv
08:45 RabidGravy :-*
08:46 RabidGravy a couple of things I've made I've really struggled to make tests
08:48 donaldh joined #perl6
08:52 donaldh_ joined #perl6
08:54 RabidGravy so it appears that whatever was wrong with PAUSE last night got fixed
08:59 psch humm, how do i test that an object does one of a few different roles
09:00 psch probably by not writing non-deterministic tests vOv
09:00 psch ...and hence testing for one specific role
09:01 RabidGravy ok $foo ~~ RoleOne|RoleTwo
09:01 psch it's weird that &does-ok doesn't handle a Junction as second argument :/
09:01 psch yeah, takes Mu for all but the msg
09:04 psch well, i'm ditching the test for now and instead vow to write deterministic tests in the future :P
09:09 psch three tests across two files... better than nothing.  also lots of minor typos in the Pod (and README.md, 'cause that's generated from the former currently :S )
09:09 dalek ecosystem: 6f7516a | peschwa++ | META.list:
09:09 dalek ecosystem: Update META.list
09:09 dalek ecosystem:
09:09 dalek ecosystem: Add Music::Helpers: https://github.com/peschwa/p6-Music-Helpers/
09:09 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6f7516a7c5
09:09 RabidGravy psch++
09:12 RabidGravy I have a horrible flashback to an occassion circa 2001 when Greg and I, completely slaughtered on absinthe persuaded MBM to upload something to CPAN *which module never worked again*
09:13 * psch can't parse the last part of that sentence
09:13 psch s/module// maybe?
09:14 RabidGravy http://cpansearch.perl.org/src/MATTBM/DNS-ZoneFile-0.95/README
09:14 psch still not sure what never worked again with that.  the module or the persuading..?
09:14 RabidGravy the module
09:15 psch well, my module does mostly work
09:15 psch and whenever it doesn't it's because it got asked to do something impossible :P
09:15 psch like finding a minor third from C4 in C major vOv
09:15 RabidGravy actually, yes that is a rather strange locution, spent too long in the presence of poetry
09:16 * DrForr just got his absinthe collection back from Amsterdam :)
09:16 psch (and it does count intervals only upwards, so $c4.is-interval($f3, P5) returns False)
09:17 psch i distinctly remember that being a thing in music class, and didn't bother to research :P
09:24 psch there's really a lot of weird in music theory
09:25 aleogen bachs chorales is all one needs
09:25 * DrForr mutters something about the circle of li...fifths.
09:25 RabidGravy the thing I struggled with was compound time
09:26 aleogen compound time and polyrhythms are the shiznite
09:26 aleogen I need to find people who don't hate me
09:26 RabidGravy I don't hate you, I don't know you :)
09:28 psch huh, compound time actually makes sense to me
09:28 psch i mean, i didn't know what exactly the difference between 3/4 and 6/8 was supposed to be
09:28 aleogen you take a cell, then you divide the FUCK out of it. Same thing with time.
09:28 aleogen It's pretty helpful
09:28 psch but it makes sense as X x X x X x vs X x x X x x
09:28 aleogen pretty clear if you map it out
09:28 aleogen :-)
09:29 aleogen 1 and 2 and 3 and vs 1 and a 2 and a
09:30 aleogen when you sing jitly, everything is crystal clear, just take your time
09:30 * aleogen puts down the orange
09:32 DrForr Then there's https://www.youtube.com/watch?v=BXFiq19-KSE :) (time signature e/π)
09:33 psch https://en.wikipedia.org/wiki/Fear_of_Fours '"Five", the most intricate yet, is in 5/8,5/8,5/8,5/8,5/8,6/8,5/8,6/8, which could also be written as 10/8,10/8,11/8,11/8.'
09:33 psch not quite as theoretical as e/pi i suppose :P
09:33 psch https://www.youtube.com/watch?v=hF4BkFh1FYs
09:34 DrForr IIRC he also experimented with sqrt(2)/2...
09:34 psch that's just mostly hilarious to me
09:35 psch the e/pi one
09:35 psch not that i can actually make sense of it, but it sounds funny :P
09:36 DrForr I guess you could say it was the first black MIDI :)
09:36 * DrForr follows up wth https://www.youtube.com/watch?v=mREi_Bb85Sk :)
09:38 Xliff Mmm.....
09:38 Xliff I love Lamb
09:38 darutoko- joined #perl6
09:39 DrForr I can do the first few bars on 'ukulele, but beyond that f*ck me :)
09:39 Xliff ^_^
09:40 zakharyas joined #perl6
09:40 DrForr https://www.youtube.com/watch?v=sss8uN6kkVQ
09:40 risou_ joined #perl6
09:40 autarch1 joined #perl6
09:40 sjn__ joined #perl6
09:41 bartolin_ joined #perl6
09:41 frederic1 joined #perl6
09:41 ingy1 joined #perl6
09:41 tim__ joined #perl6
09:42 cosimo_ joined #perl6
09:42 ilmari_ joined #perl6
09:42 jdv79_ joined #perl6
09:43 webmind_ joined #perl6
09:43 DrForr Actually I think I like https://www.youtube.com/watch?v=eff82NeIit8 better but d*mn.
09:44 stmuk joined #perl6
09:46 psch hah, in the suggestions is a 24:25 long video
09:46 psch titled "How to Play Ukulele"
09:46 nige1 joined #perl6
09:46 psch i *might* have some free time later, quickly learn it!
09:47 DrForr Only 24 minutes out of your life, go for it!
09:47 psch well, i suspect half of the video will be "practice for years"
09:47 psch or at least it should be :P
09:47 psch also, classical gas reminds me slightly of the dwarf fortress game song
09:48 psch ...which i kind am stuck with learning currently
09:48 psch cause it is damn hard as well
09:48 DrForr The song or the game?
09:48 psch https://www.youtube.com/watch?v=-6FXeupOp04&amp;nohtml5=False
09:48 Roamer` joined #perl6
09:48 psch ...both, actually
09:48 Timbus joined #perl6
09:48 psch but yeah, talking about the song :)
09:50 BooK joined #perl6
09:51 DrForr Ah, that's what I just found by happenstance.
09:52 ugexe joined #perl6
09:53 DrForr Well, they're both fingerpicking style on classical guitar, so there is that...
09:53 psch not just that, it does sound similar in pieces :P
09:53 psch but maybe my ears are just kinda bad vOv
09:54 DrForr Yeah, about 3 minutes in I can hear the similarities.
09:55 psch fwiw, it repeats at ~4:10 or so
09:55 ilogger2 joined #perl6
10:05 rudi joined #perl6
10:10 sjoshi joined #perl6
10:29 Xliff *Whew*
10:29 Xliff Now I just need to add tests for libvorbis and libvorbisenc.
10:29 Xliff Oh... and write tests for libogg.
10:29 Xliff Geez. I will spend more time writing the .t files than I did with the actual modules!
10:32 stmuk joined #perl6
10:33 wamba joined #perl6
10:33 RabidGravy that sounds about right :) I've got modules where the code in the tests is actually an order of magnitude larger
10:34 domidumont joined #perl6
10:34 donaldh joined #perl6
10:37 M-matthew joined #perl6
10:38 erdic joined #perl6
10:38 ChoHag joined #perl6
10:39 b2gills joined #perl6
10:46 Xliff RabidGravy, not surprising.
10:47 Xliff Ideally I'd want to test every routine in each lib, but that will be time consuming.
10:47 Xliff And there really is no organic way to do it.
10:47 Xliff Heck, even though much of this: https://bluishcoder.co.nz/2009/06/24/reading-ogg-files-using-libogg.html
10:48 Xliff But I won't know if things are really working right until I start implementing the tests for libvorbis.
10:50 sjoshi joined #perl6
10:51 awwaiid The trick is to write tests that you have hooked up the calls correctly and not worry about the calls themselves. In theory libvorbis and what not have their own test suites that verify that the functions do what they claim, handle edge cases, etc
10:51 moritz integration tests, so to say
10:52 moritz (though people mean different things when they say "integration tests")
10:53 awwaiid indeed, to both points :)
10:53 awwaiid I think it's all a *degree* of integration test no matter what :)
10:54 awwaiid (kinda like I think all refactoring is a degree of rewrite)
10:54 Xliff awwaiid++
10:55 Xliff I didn't think to look into the lib sources to see if they had tests/examples.
10:55 Xliff It's another direction to go.
10:55 awwaiid ya. Sometimes they can provide good examples too
10:56 awwaiid somtimes it is distracting because there are no tests :)
10:56 Xliff And, if I haven't said it before, I'll say it now: I'm Lazy™
10:57 Xliff Yeah. I'm more hoping there are samples for libvorbis.
10:57 Xliff Will find out soon enough.
11:03 awwaiid Unrelatedly -- I've mostly found Perl6 to be a superset of all the other languages. But yesterday I learned that Swift lets you use name variables with symbols directly. I thought we could do this in p6, but now understand that they "symbols" I had been using so far are regular letters in other languages
11:03 Xliff https://svn.xiph.org/trunk/vorbis/examples/decoder_example.c
11:03 Xliff Whee!
11:04 Xliff Is there a way to refer to a packages symbol table?
11:04 awwaiid Xliff: treat the package name like a hash, like Foo::.keys
11:04 Xliff Say I have variables: $.header00 to $.header35
11:04 Xliff awwaiid, these are attributes in a class.
11:05 _mg__ joined #perl6
11:05 Xliff And I want to access one of the $.header attributes, but I won't know which one I want until runtime.
11:05 Xliff And I really don't want to use EVAL
11:06 Xliff Although I expect that's the easiest answer.
11:06 jnthn self."$name"()
11:06 Xliff Ooh!
11:06 jnthn Just call the accessor method by name :)
11:07 RabidGravy yeah, I've got plenty-o tests like that
11:07 Xliff Uhh... are $. and $! attributes given default accessor methods?
11:07 awwaiid Xliff: yeah ... but in normal programs I'd suggest you are using your attributes when you should be using a hash
11:07 Xliff self."$header22"() would work?
11:08 Xliff awwaiid, It's NativeCall stuff, so I'm limited.
11:08 awwaiid ahh
11:08 Xliff particularly for repr('CStruct')
11:08 awwaiid I suspected that, so I hedged with "normal programs" :)
11:08 jnthn Xliff: Only $.foo has accessor methods
11:08 Xliff jnthn: OK, thanks.
11:09 Xliff Good to know! :D
11:09 jnthn Well, the better answer
11:09 jnthn has $.foo;
11:09 jnthn Is equivalent to
11:09 jnthn has $!foo;
11:09 jnthn method foo() { $!foo }
11:09 Xliff Oooooooo!
11:10 Xliff (゜◇゜)
11:10 dalek ecosystem: a16b02c | azawawi++ | META.list:
11:10 dalek ecosystem: Change File::HomeDir URL
11:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/a16b02c6d4
11:11 pRiVi joined #perl6
11:15 Xliff Oh dear god.... this site just pwned me.
11:15 Xliff http://japaneseemoticons.me/
11:16 Xliff =。:.゚(●ö◡ö●):.。+゚
11:18 Xliff ━╤デ╦︻(▀̿̿Ĺ̯̿̿▀̿ ̿)
11:19 Xliff_Zzzzzz 'night #perl6
11:25 kid51 joined #perl6
11:27 * RabidGravy concludes that the "add-document-attachment" for Sofa is going to have a rather clunky interface
11:32 rindolf joined #perl6
11:33 nienacko_ joined #perl6
11:34 jargan joined #perl6
11:35 nightfro` joined #perl6
11:35 ggoebel113 joined #perl6
11:36 kmwallio joined #perl6
11:36 domm_ joined #perl6
11:36 krakan joined #perl6
11:36 vendethiel joined #perl6
11:37 spanner___ joined #perl6
11:37 ocbtec joined #perl6
11:37 inokenty joined #perl6
11:37 a3r0 joined #perl6
11:37 ranguard joined #perl6
11:38 Gothmog_ joined #perl6
11:38 lucs joined #perl6
11:41 remmie joined #perl6
11:42 cosarara joined #perl6
11:43 psch joined #perl6
11:43 captain-adequate joined #perl6
11:45 krunen joined #perl6
11:49 Khisanth joined #perl6
12:05 cpage_ joined #perl6
12:08 RabidGravy harsh, but funny: http://classicprogrammerpaintings.tumblr.com/post/142548884409/larry-wall-presents-perl-6-1632-rembrandt-van
12:13 _mg_ joined #perl6
12:15 jdukart joined #perl6
12:17 jdukart left #perl6
12:23 lizmat joined #perl6
12:23 eyck joined #perl6
12:25 smls joined #perl6
12:26 masak RabidGravy: I don't get it.
12:27 El_Che masak: I do, but i would break my heart explaining it ;)
12:28 masak then don't bother.
12:29 masak "Don't let the bastards grind you down." -- TimToady :)
12:29 mr-foobar joined #perl6
12:30 DrForr Illegitimi non carborundum.
12:31 masak aye, that one.
12:32 CIAvash It's not autopsy of a dead language, is it?!
12:32 gfldex It's rather fitting actually. That painting marks the beginning of a new age where being sick had a reason beyond: "You pissed off god.".
12:33 sjoshi joined #perl6
12:33 smls Why is it that every time I try to write a multi-threaded Perl 6 program everything seems to work fine while I put the individual pieces together...
12:33 RabidGravy yeah I suspect that the author of the tumblr is familiar with art history *and* computer programming
12:33 smls ...but then when everything is in place and I feed it real-world data, I get crashes.
12:34 Woodi gfldex: this is a bit to harsh both to medicine and [Gg]ods? :)
12:34 smls :crying face emoticon:
12:34 sufrostico joined #perl6
12:35 gfldex I don't value gods high enough to give them the doubt of a capital
12:35 smls (How do I even start to debug a crash that says "Command terminated by signal 11" with no additional information?)
12:35 jnthn smls: Well, first loop up the name of signal 11... :)
12:35 jnthn *look
12:36 Woodi latest R* is 2016.01 but Debian have 2016.03... anyone know what was packaged ?
12:36 smls segmentation fault?
12:36 masak SIGSEGV
12:36 masak (so, yes)
12:37 jnthn OK, then run your program under ./perl6-gdb-m and/or ./perl6-valgrind-m
12:37 MadcapJake Where can I find some info on HAS?
12:38 masak MadcapJake: do you mean `has` as in `has $.x;` ?
12:38 moritz MadcapJake: probably in language/nativecall docs
12:38 MadcapJake I mean `HAS $.x`
12:40 MadcapJake moritz: thanks, it just embeds CStructs/CUnions into a CStruct/CUnion, right?
12:40 smls jnthn: perl6-gdb-m says  "~/.rakudobrew/moar-nom/install/bin/moar...(no debugging symbols found)"
12:40 smls Do I need to manually compile Rakudo for this?
12:41 smls s/Rakudo/Moar/
12:43 MadcapJake No, I use rakudobrew and perl6-gdb-m works for me
12:43 jnthn smls: Well, it can still give some basic info even without that
12:43 jnthn Like `bt` should work
12:44 smls This is for `bt full`: https://gist.githubusercontent.com/smls/9717e1ef17b1a3bb694c67fd89e75351/raw/af41a223b7ea9cf863ac0d6259ff012cedfca61f/race_crash
12:45 smls Also, the culprit is a   for (...).race(batch=>1) { ... }
12:45 smls if I remove the .race, it works fine.
12:46 smls Also, it reliably crashes with this large input data set, but never with this other smaller input data set.
12:46 grondilu m: say class { has $.x handles &infix:<+&> }.new(:x(13)) +& 4  # not sure if this is supposed to work.
12:46 camelia rakudo-moar d1eeb3: OUTPUT«Cannot call Numeric(<anon|49893024>: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/wzL5sK4Y9L line 1␤␤»
12:46 jnthn smls: Urgh, that looks like something deep/internal/nasty :(
12:47 jnthn smls: Could you try it with perl6-valgrind-m to see if it yields more clues?
12:47 smls ok
12:47 jnthn .race/.hyper are on my "stuff to give a good fixing up soon" list
12:48 jnthn But that kind of crash looks lower level still
12:48 MadcapJake smls: are you using slurpy/named arguments somewhere above the .race?
12:49 smls above?
12:50 MadcapJake scope-wise, directly outside (maybe even directly prior to the .race method call) or maybe even inside, just looking at MVM_args_slurpy_named in the trace
12:50 jnthn MadcapJake: Every method has a *%_, so that's pretty broad ;)
12:50 MadcapJake heh
12:51 jnthn It's some kind of memory corruption. I *hope* that perl6-valgrind-m can tell me the nature of it.
12:51 jnthn It's pretty unlikely by this point that it's a fault in smls' program.
12:54 ZoffixW joined #perl6
12:55 ZoffixW Proposal for a multi subtest in Test.pm6: https://rt.perl.org/Ticket/Display.html?id=127890
12:55 ZoffixW Woodi, it's probably just plain Rakudo, and not R*
13:00 smls jnthn: perl6-valgrind-m finds no errors (and in fact it looks like the program completed without crashing when run this way).
13:01 jnthn :(
13:01 jnthn It probably slows it down enough to hide the errors :/
13:02 cpage_ joined #perl6
13:03 smls Second run, same result. No crash with perl6-valgrind-m.
13:03 smls Still crashes reliably with perl6-m though.
13:03 mr-foobar joined #perl6
13:04 smls I guess I'll just wait for your .race overhaul, maybe it sorts itself out... :)
13:05 Actualeyes joined #perl6
13:06 [Coke] reminder, release this weekend. (Sunday)
13:06 ZoffixW R*?
13:07 [Coke] compiler
13:07 ZoffixW Hm
13:08 jnthn smls: The failure mode makes me suspect not...I know there's some concurrency bugs still to flush out, though.
13:08 * jnthn is trying to balance the many perf/reliability tasks :)
13:11 RabidGravy goats
13:12 ZoffixW rabid gravy goats? Sounds delicious...
13:15 Woodi is github-tadzik-panda a official panda or something other is ? had yesterday problems with tadzik's version...
13:15 ZoffixW I believe that's the official one, yes.
13:15 [Coke] official is a strong word, but yes, that one.
13:16 [Coke] what's the issue?
13:16 * perlpilot wonders where the unofficial pandas are
13:16 ZoffixW What's the meaning of colon in regexes?
13:16 ZoffixW m: say so '2016-04-13T13:13:48Z' ~~ /^ \d**4 '-' \d\d '-' \d\d 'T' \d\d ':' \d\d : \d\d 'Z' $/
13:16 camelia rakudo-moar ae2ae9: OUTPUT«False␤»
13:16 ZoffixW But if I quote the second ':' it matches
13:17 perlpilot ZoffixW: it's a "cut" operator
13:17 Woodi I had some problems with shield-something but trip ended with panda can't find panda or something like that :)
13:17 Woodi try again for more info :)
13:17 * Woodi will try
13:17 ZoffixW perlpilot, what does it do? Or is 'prevent backtracking' it?
13:18 [Coke] ZoffixW: http://docs.perl6.org/language/regexes#Preventing_backtracking%3A_%3A
13:18 perlpilot yes, you can't backtrack past it.
13:18 skids joined #perl6
13:18 ZoffixW Thanks.
13:19 [Coke] it's hard getting past all the ::'s on doc.perl6.org, but it's there under ": (regex)"
13:22 perlpilot It seems the other cut operators aren't mentioned, though I thought :, ::, and ::: were all implemented.
13:24 sufrostico joined #perl6
13:27 moritz are they?
13:27 moritz m: rx/a::b/
13:27 camelia rakudo-moar ae2ae9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZgKe23gtCP␤:: not yet implemented␤at /tmp/ZgKe23gtCP:1␤------> 3rx/a::7⏏5b/␤»
13:27 moritz nope
13:28 Woodi looks panda works now. maybe I had problems with PATH or zsh not seeing newly installed things...
13:28 RabidGravy I'd actually forgotten until just now that somewhere in the house I have an Alesis Micron
13:28 geekosaur hash -r
13:29 geekosaur Woodi ^^
13:29 perlpilot must've been my imagination then.
13:29 moritz perlpilot: iirc it was implemented in The Auld NQP (before NQP-rx)
13:30 moritz but probably also with a slightly different semantic than what is specced now
13:30 moritz that was before STD.pm6
13:31 cdg joined #perl6
13:31 Sgeo joined #perl6
13:35 noganex joined #perl6
13:35 maddingu1 joined #perl6
13:36 Vitrifurr joined #perl6
13:36 grondilu_ joined #perl6
13:37 skids1 joined #perl6
13:37 sufrosti1o joined #perl6
13:37 orbus_ joined #perl6
13:38 Gothmog__ joined #perl6
13:38 jferrero_ joined #perl6
13:40 mcsnolte joined #perl6
13:42 cdg joined #perl6
13:42 Amnez777- joined #perl6
13:42 domidumont joined #perl6
13:45 skarn joined #perl6
13:49 ryand joined #perl6
13:50 nakiro joined #perl6
13:50 rindolf joined #perl6
13:51 ilogger2 joined #perl6
13:51 shadowpaste joined #perl6
13:54 spebern joined #perl6
14:09 nakiro joined #perl6
14:09 mtj_ joined #perl6
14:09 sunnavy_ joined #perl6
14:10 dalek perl6-examples: 0bf61e3 | Ovid++ | categories/99-problems/P36-ovid.pl:
14:10 dalek perl6-examples: Switch from modulus % to more concise %% check.
14:10 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/0bf61e3303
14:13 Woodi vim just got DirectX support... and client-server abilities :>
14:14 RabidGravy erk
14:15 mohae joined #perl6
14:16 nakiro joined #perl6
14:17 tharkun joined #perl6
14:18 zakharyas joined #perl6
14:18 timotimo april first?
14:18 yoleaux 01:21Z <Xliff> timotimo: The wordy struct idea for the $.header attribute worked! Thanks for the help!
14:19 timotimo oh, neat
14:19 timotimo .seen froggs
14:19 yoleaux I saw FROGGS 27 Mar 2016 22:29Z in #perl6: <FROGGS> jnthn++
14:19 timotimo :S
14:20 teatime joined #perl6
14:29 RabidGravy kidnapped by aliens
14:31 domidumont joined #perl6
14:31 jolts joined #perl6
14:33 jolts joined #perl6
14:37 timotimo he's israeli, not vegetarian; he's israeli, kidnapped by aliens~
14:38 timotimo (Infected Mushroom - She Zoremet)
14:39 Gothmog_ joined #perl6
14:39 jferrero joined #perl6
14:41 sufrostico joined #perl6
14:57 ptolemarch joined #perl6
15:08 hoelzro o/ #perl6
15:08 yoleaux 12 Apr 2016 22:32Z <donaldh> hoelzro: http://irclog.perlgeek.de/perl6/2016-04-12#i_12326940
15:11 hoelzro donaldh: well, your patch has this line: my $self = self.bless(:compiler, :$multi-line-enabled);
15:11 hoelzro which just sets $.compiler to True
15:12 hoelzro what we want is something like :compiler(compiler), but that blows up in the same spectacular fashion that the current code does
15:12 hoelzro I don't know what is causing the failure; it's really odd
15:12 hoelzro I ended up adding a patch to just disable REPL6 on the JVM for now
15:12 hoelzro .tell donaldh http://irclog.perlgeek.de/perl6/2016-04-13#i_12330426
15:12 yoleaux hoelzro: I'll pass your message to donaldh.
15:12 pmurias joined #perl6
15:13 pmurias what are native references in Rakudo?
15:13 timotimo pmurias: it's an object that allows you to refer to a lexical or register or attribute or slot in a native array and use it as boxed objects without creating a copy
15:22 jnthn pmurias: Some tests in t/moar/02-qast-references.t
15:22 sufrostico joined #perl6
15:33 ilmari joined #perl6
15:34 dogbert17 joined #perl6
15:34 Sqirrel joined #perl6
15:35 zakharyas joined #perl6
15:35 cdg_ joined #perl6
15:35 TreyHarris joined #perl6
15:37 cpage__ joined #perl6
15:38 mr-fooba_ joined #perl6
15:38 mephinet- joined #perl6
15:39 jferrero_ joined #perl6
15:39 sufrosti1o joined #perl6
15:40 spanner__ joined #perl6
15:41 ggoebel113 joined #perl6
15:41 nd3i joined #perl6
15:41 CIAvash joined #perl6
15:42 nd3i New to p6; just came across this: class ... method new($token) {self.bless(*, token => $token);}
15:42 Actualeyes joined #perl6
15:42 nd3i what does the anything star mean in this context?
15:43 rindolf joined #perl6
15:43 timotimo it used to be necessary to supply that as the first argument, but that has been removed some time last year
15:43 timotimo can you tell us where you came across that? because that would want to be changed
15:45 nd3i Thanks. https://github.com/GildedHonour/TelegramBot/blob/master/lib/Telegram.pm6#L20
15:45 a3r0 joined #perl6
15:46 geekosaur joined #perl6
15:48 geekosaur joined #perl6
15:51 ugexe joined #perl6
15:52 tim__ joined #perl6
15:53 cyberviking joined #perl6
15:54 skarn joined #perl6
15:55 nige1 joined #perl6
15:55 _nadim joined #perl6
15:57 nd3i left #perl6
15:58 _nadim good afternoon, I was thinking of testing if declaring some arrays as str arrays would make a difference in run time. I just added 'str' in front of @array in some sub but I get this whci is a tad cryptic to me: expected Positional[str] but got Array ($[])
15:59 skids1 If you are going to constrain on str arrays, you'll need to provide str arrays when you call the sub.
16:00 skids1 Though IIRC things can get tacky right now even so.
16:03 skids1 m: sub a (Str @a) { @a.say }; my Str $s = "a"; a(Array[Str].new($s))
16:03 camelia rakudo-moar ae2ae9: OUTPUT«[a]␤»
16:03 skids1 m: sub a (Str @a) { @a.say }; my Str $s = "a"; a(Array.new($s))
16:03 camelia rakudo-moar ae2ae9: OUTPUT«Type check failed in binding @a; expected Positional[Str] but got Array ($["a"])␤  in sub a at /tmp/c6xtWHuNMR line 1␤  in block <unit> at /tmp/c6xtWHuNMR line 1␤␤»
16:03 ZoffixW joined #perl6
16:04 _nadim ah, let me try to declare the starting variable accordingly.
16:05 domidumont joined #perl6
16:05 xugan joined #perl6
16:06 ZoffixW m: sub a (@a where Str ~~ all * ) { @a.say }; my Str $s = 's'; my @a = $s; a @a;
16:06 camelia rakudo-moar ae2ae9: OUTPUT«[s]␤»
16:06 khw joined #perl6
16:06 ZoffixW m: sub a (@a where Str ~~ all * ) { @a.say }; my Str $s = 42; my @a = $s; a @a;
16:06 camelia rakudo-moar ae2ae9: OUTPUT«Type check failed in assignment to $s; expected Str but got Int (42)␤  in block <unit> at /tmp/9SAM67clux line 1␤␤»
16:06 ZoffixW Is this a bug? Why is it an Int?
16:07 skids1 m: my Str $s = 42
16:07 camelia rakudo-moar ae2ae9: OUTPUT«Type check failed in assignment to $s; expected Str but got Int (42)␤  in block <unit> at /tmp/mEh4qs2qQD line 1␤␤»
16:07 domidumont joined #perl6
16:07 skids1 42 looks like an Int to me.
16:07 jnthn Str ~~ all * # note that the * there is just an argument to all
16:08 moritz ZoffixW: "all *" is bound to disappoint you
16:09 raoulvdberge joined #perl6
16:10 ZoffixW CurtisOvidPoe, BTW, saw your prime example scroll by on GitHub.. P6 can let you modify parameters if you use `is copy` trait, so you won't need to declare $number just to store $number-to-factor in it: sub prime-factors(Int $number-to-factor is copy where...
16:10 ZoffixW moritz, why?
16:10 ZoffixW jnthn, but doesn't it work? It works if it's a Str in $s
16:11 ZoffixW m: sub a (@a where { Str ~~ all $_ } ) { @a.say }; my Str $s = 42; my @a = $s; a @a;
16:11 camelia rakudo-moar ae2ae9: OUTPUT«Type check failed in assignment to $s; expected Str but got Int (42)␤  in block <unit> at /tmp/Ck6O5QtQ8k line 1␤␤»
16:11 ZoffixW I'm not understanding what it's doing right here.
16:12 jnthn You're never getting to the call
16:13 jnthn my Str 4s = 42 # a plain assignment failure
16:13 ZoffixW OMG. Brainfart >_<
16:13 jnthn Mondays...
16:13 jnthn no, wait...
16:13 ZoffixW :)
16:14 moritz non-Mondays :-)
16:15 geekosaur hump days?
16:17 perlpilot Days that end in "y"
16:19 timotimo days that are fit to make you say "whhhyyyyyyy"
16:22 ZoffixW m: sub a ( @a where {all(.values) ~~ (Str|Int)} ) { @a.say }; my @a = <meow bar 42>, 42; a @a;
16:22 camelia rakudo-moar ae2ae9: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub a at /tmp/nZKxjhJLBa line 1␤  in block <unit> at /tmp/nZKxjhJLBa line 1␤␤»
16:22 ZoffixW How come this fails, even though ... $x where * ~~ Str|Int works fine for single values?
16:22 teatime this is a small (7-line) changeset.. I am curious to know if anything I'm doing here is fundamentally wrong:  https://github.com/rakudo/rakudo/pull/742/commits/06115f1d02262e4257f53ee95716a49e170c14cf
16:24 CIAvash joined #perl6
16:27 ZoffixW Ah, I need to slip in <meow bar 42>
16:28 ZoffixW Nope, not it. I give up
16:28 ZoffixW m: sub a ( @a where {all(.values) ~~ Int|Str} ) { @a.say }; my @a = <meow bar>, 42; a @a;
16:28 camelia rakudo-moar ae2ae9: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub a at /tmp/2K7qBGrAGL line 1␤  in block <unit> at /tmp/2K7qBGrAGL line 1␤␤»
16:30 perlpilot m: my @a = <meow bar>, 42; say @a.perl;
16:30 camelia rakudo-moar ae2ae9: OUTPUT«[("meow", "bar"), 42]␤»
16:30 zakharyas joined #perl6
16:31 geekosaur that's not it though, because I get it if I unroll that manually
16:34 tharkun joined #perl6
16:36 ZoffixW I'm guessing it has to do with    Junction ~~ Junction  case
16:36 geekosaur hm, possible
16:37 geekosaur hm, yes, that actually seems likely
16:37 ZoffixW m: my Int $x = 42; my Str $y = 'foo'; say so ( $x ~~ Int | Str ), ( $y ~~ Int | Str ), ( all($x, $y) ~~ Int | Str );
16:37 camelia rakudo-moar ae2ae9: OUTPUT«TrueTrueFalse␤»
16:41 Actualeyes joined #perl6
16:41 pmurias jnthn: thanks, existing tests are always great
16:49 pyrimidine joined #perl6
16:50 dalek doc/missing-doc: 1bb1550 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
16:50 dalek doc/missing-doc: Added documentation for sech and asech to Cool.pod
16:50 dalek doc/missing-doc: review: https://github.com/perl6/doc/commit/1bb155018a
16:52 hankache joined #perl6
16:52 dogbert17 hello #perl6
16:53 dogbert17 is anyone interested in taking a look at https://github.com/perl6/doc/commit/1bb155018a
16:54 ZoffixW dogbert17, the "or in method form" should be "or in sub form"
16:54 ZoffixW The invocant is what a method is called on
16:55 ZoffixW Looks good to me otherwise :) Thanks.
16:56 sftf joined #perl6
16:58 dogbert17 ZoffixW: thanks, now I just have to figure out how to make your suggested change without wrecking the commit history
16:58 Actualeyes joined #perl6
16:58 dogbert17 is it amend by any chance
16:59 ZoffixW *shrug*. Just add a new commit?
17:00 dogbert17 ok, will do
17:00 hoelzro dogbert17: make the change, git add -A, git commit --amend
17:00 timotimo oh, what's -A do?
17:00 dogbert17 hoelzro: will give it a shot
17:01 hoelzro updates any changed files that are already in the index
17:01 hoelzro so it's like git add ., but it won't add any new files to the repo
17:01 timotimo neat
17:05 wamba p6: my @a=^3;while @a.pick { $_.perl.say }
17:05 camelia rakudo-moar ae2ae9: ( no output )
17:06 wamba my @a=^3;while @a.pick { $_.perl.say }
17:06 wamba p6: my @a=^3;while @a.pick { $_.perl.say }
17:06 camelia rakudo-moar ae2ae9: ( no output )
17:06 wamba p6: my @a=^3;while @a.pick { $^a.perl.say }
17:06 camelia rakudo-moar ae2ae9: OUTPUT«2␤»
17:06 wamba p6: my @a=^3;while @a.pick { $^a.perl.say }
17:06 camelia rakudo-moar ae2ae9: ( no output )
17:06 wamba p6: my @a=^3;while @a.pick { $^a.perl.say }
17:06 camelia rakudo-moar ae2ae9: OUTPUT«1␤2␤»
17:07 wamba p6: my @a=^3;while @a.pick { $_.perl.say }
17:07 camelia rakudo-moar ae2ae9: OUTPUT«Any␤Any␤Any␤Any␤»
17:07 travis-ci joined #perl6
17:07 travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for sech and asech to Cool.pod'
17:07 travis-ci https://travis-ci.org/perl6/doc/builds/122840227 https://github.com/perl6/doc/commit/1bb155018a8b
17:07 travis-ci left #perl6
17:07 geekosaur while doesn't set a variable
17:07 geekosaur did you mean for?
17:08 wamba yes while not set $_
17:08 RabidGravy correct
17:08 wamba but i can use $^a
17:08 wamba its some documentation for it? sinopsis?
17:08 ZoffixW p6: my @a=^3;while @a.pick -> $_ { $_.perl.say }
17:08 camelia rakudo-moar ae2ae9: OUTPUT«1␤2␤»
17:09 perlpilot ZoffixW++ you beat me to it by secs
17:11 gregf_ m: my @a=^3; loop {  $_ = @a.pick; say $_; last if !$_; }
17:11 camelia rakudo-moar ae2ae9: OUTPUT«2␤1␤0␤»
17:11 perlpilot wamba: S04:392 start reading there for while loops specifically
17:11 synopsebot6 Link: http://design.perl6.org/S04.html#392_start_reading_there_for_while_loops_specifically
17:11 perlpilot heh
17:12 perlpilot wamba: S04:392
17:12 synopsebot6 Link: http://design.perl6.org/S04.html#line_392
17:12 perlpilot read there
17:12 perlpilot S04:392 # test
17:12 synopsebot6 Link: http://design.perl6.org/S04.html#392
17:12 perlpilot ah, should've remembered that
17:12 perlpilot oh, hrm.  that's not right either
17:14 perlpilot dogbert17: That's the first time I've ever seen "secant hyperbolicus".  Usually I see it as "hyperbolic secant"
17:15 sufrostico joined #perl6
17:16 dalek doc/missing-doc2: e551656 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
17:16 dalek doc/missing-doc2: Added documentation for sech and asech to Cool.pod
17:16 dalek doc/missing-doc2: review: https://github.com/perl6/doc/commit/e55165653e
17:16 dogbert17 messed it up a bit, ZoffixW's suggestion is now implemented
17:17 dogbert17 perlpilot: found it on google but I believe "hyperbolic secant" is more common
17:18 wamba perlpilot: Ty i found answer in S04-statements/if.t lines 115–197
17:19 wamba However, use of $_ with a conditional or conditionally repeating statement's block is not considered sufficiently explicit to turn a 0-ary block into a 1-ary function, so all these methods use the same invocant:
17:19 wamba if .haste { .waste }
17:19 wamba while .haste { .waste }
17:19 wamba thank you
17:20 dogbert17 is someone brave enough to merge this or should I give it a go myself (shudders slightly)
17:20 perlpilot wamba: consider contributing to doc.perl6.org  Having just figured this out yourself, you're probably in a good position to make it clear for others.
17:21 ZoffixW dogbert17, do it yourself :)
17:21 dogbert17 uh oh, ok :-)
17:22 ZoffixW https://xkcd.com/1597/
17:22 psch teatime: aside from the dimensionality decision of yours the PR looks fine to me.  and even with dimensionality decision it's not that i think it's wrong, it's just that i don't think myself experienced enough to anticipate common expectation.  in any case, seeing as that's the semantically most impactful part, i'd like someone else to review, too
17:23 psch well, and the "# (Unary plus)" comment feels slightly wrong-ish
17:23 teatime I have concerns about the dimensionality stuff too
17:23 teatime I think perhaps Duration.new should take a boolean flag defaulting to false to indicate whether operations on that object should return dimensionally correct results
17:24 teatime but I am just not sure.
17:24 perlpilot dogbert17: Also, if you haven't already, you may want consider adding yourself (via PR) to rakudo's CREDITS file
17:24 teatime on the one hand, I don't think someone should be surprised when Duration / Duration doesn't return a duration
17:24 teatime on the other hand, the cases where operations on them don't return Durations are so few, that people could manage to use Duration a lot before eventually getting surprised
17:25 * psch wonders if there's practical physicists around here...
17:25 teatime psch: when else is Numeric() used?  that's exactly the kind of stuff I am very iffy on.
17:25 dogbert17 perlpilot: maybe I will if this works :-)
17:25 dalek doc: e551656 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
17:25 dalek doc: Added documentation for sech and asech to Cool.pod
17:25 dalek doc: review: https://github.com/perl6/doc/commit/e55165653e
17:25 dalek doc: edc7dd4 | dogbert17++ | doc/Type/Cool.pod:
17:25 dalek doc: Merge pull request #450 from perl6/missing-doc2
17:25 dalek doc:
17:25 dalek doc: Added documentation for sech and asech to Cool.pod
17:25 dalek doc: review: https://github.com/perl6/doc/commit/edc7dd4278
17:26 teatime psch: fwiw, I'm fairly confident in the units mappings themselves.  it's just whether it should involve them at all that I dunno about.
17:26 sufrostico joined #perl6
17:26 psch teatime: i don't think it's really used much else, it's just that you're changing the thing that the thing you comment you changed uses to... change the thing..?
17:26 teatime lol huh?
17:26 spider-mario joined #perl6
17:26 psch teatime: understandably, maybe: prefix:<+>($) does call .Numeric, yes, but .Numeric is not equivalent to prefix:<+>
17:27 gregf_ m: temp $_ = 4444; loop { $_ = [+] .split(""); .say && last if $_ < 9; }
17:27 camelia rakudo-moar ae2ae9: OUTPUT«7␤»
17:27 teatime psch: I just couldn't find anything else that would trigger Numeric besides prefixing with plus
17:27 lizmat joined #perl6
17:27 psch take a prefix:<+>(Duration $) { Duration.new(rand) } for example
17:27 psch that doesn't do .Numeric anymore
17:27 psch the contract is that prefix:<+> calls Numeric, but prefix:<+> can be overloaded to do something else
17:27 teatime psch: the *goal* of providing Numeric() was to have Duration's return Rat's in numeric context rather than Num's, but the only thing it seemed to change is when you explicitly do +$dur
17:27 psch ...in any case, that's really minor anyway
17:28 teatime and, fair point.
17:28 psch and i still do agree that providing a .Numeric is the right choice
17:28 psch the comment is just slightly misleading :)
17:29 perlpilot teatime: btw, you should also consider adding yourself to CREDITS if you're not there already.
17:29 psch m: class C { method Numeric { 5 } }; say C.new + Duration.new(5)
17:29 camelia rakudo-moar ae2ae9: OUTPUT«10␤»
17:29 psch that's something i think matters there
17:29 wamba m: for <a b c> { my @a=^3;while @a.pick { ($^a,$_).perl.say }}
17:29 camelia rakudo-moar ae2ae9: OUTPUT«(2, "a")␤(1, "a")␤(1, "a")␤(2, "a")␤(1, "a")␤(2, "a")␤(1, "a")␤(1, "a")␤(1, "a")␤(1, "a")␤(2, "b")␤(1, "b")␤(1, "b")␤(1, "b")␤(1, "c")␤(2, "c")␤(2, "c")␤(2, "c")␤(2, "c")␤(2, "c")␤(2, "c")␤»
17:29 teatime it seems to me that having to provide all of these operators (and perhaps I need to provide all of the comparison operators as well, like Instant does) is quite duplicated effort in most cases... one way or another, they should largely map automatically to existing operators on Rat's, and/or be inferred from a smaller set of specified ones.
17:30 psch if you'd provided an unary plus (as the comment suggests) that would do something else
17:30 psch probably infix:<+>(Cool $, Cool $)
17:30 psch or maybe :(Any $, Any $)
17:30 teatime so I don't know what the right way is, but I feel pretty confident that the current way Duration/Instant is defining itself and its operations is not it.
17:31 teatime psch: I don't intend to provide a special unary plus operator; I just added thatc omment for consistency w/ the other commented operators.  but I agree w/ what you're saying, and will remove the comment.
17:31 psch teatime: to reiterate, i think your approach is fine, i'm just trying to explain why, if you had implemented what your comment there suggests, it would be wrong, which is why i think the comment is wrong
17:31 teatime ah k
17:32 teatime perlpilot: really?  lol yay
17:33 teatime psch: thx for having a look
17:35 psch :)
17:35 travis-ci joined #perl6
17:35 travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for sech and asech to Cool.pod'
17:35 travis-ci https://travis-ci.org/perl6/doc/builds/122846366 https://github.com/perl6/doc/commit/e55165653e08
17:35 travis-ci left #perl6
17:40 wamba m: my Int $a =123 but role { method Numeric { self.chars} }; say +$a, " ",-$a;
17:40 camelia rakudo-moar ae2ae9: OUTPUT«3 -123␤»
17:42 wamba m: my Int $a =123 but role { method Numeric { self.chars} }; say +$a, " ",-$a," ", 0 + $a;
17:42 camelia rakudo-moar ae2ae9: OUTPUT«3 -123 123␤»
17:42 psch wamba++
17:42 * psch doesn't want to think more about that :)
17:43 wamba :)
17:43 teatime I think it just demonstrates that unary + is the "explicit numeric context" operator while unary - is the traditional unary - operator
17:43 teatime unary prefix + I should say
17:45 teatime wamba: pretty cool you can do an 'anonymous class' that way though
17:46 psch m: my $x = class { }.new; say $x.WHAT # an actual anonymous class
17:46 camelia rakudo-moar ae2ae9: OUTPUT«(<anon|64623312>)␤»
17:47 teatime his is more anonymous; yours is called $x
17:47 teatime (j/k)
17:52 kaare_ joined #perl6
17:57 teatime anyone know a good open-source, user-friendly CAS I can throw expressions into and it will simplify them, equations and it will solve them?
17:57 teatime preferrably CLI
17:57 ribasushi joined #perl6
18:02 tokomer joined #perl6
18:02 wamba m: my $a = class { method Numeric { 1 }; method gist { sprintf " %.2f ", self.Numeric } }; say $a ; put $a.Numeric;
18:02 camelia rakudo-moar ae2ae9: OUTPUT« 1.00 ␤1␤»
18:02 kaare_ joined #perl6
18:02 masak teatime: https://en.wikipedia.org/wiki/List_of_computer_algebra_systems ?
18:04 wamba teatime: i know that i can do this, but is limeted
18:04 wamba m: my $a = class { method Numeric { 1 }; }; say $a ; put $a.nude;
18:04 camelia rakudo-moar ae2ae9: OUTPUT«(<anon|82375344>)␤Method 'nude' not found for invocant of class '<anon|82375344>'␤  in block <unit> at /tmp/QhXyayNV_D line 1␤␤»
18:05 zakharyas joined #perl6
18:05 wamba Thus I usually  prefer role.
18:05 awwaiid teatime: I got Maxima to work before. I think there's even an android version
18:06 awwaiid teatime: and then there is SAGE, which I think is quite a bit more expansive
18:08 psch m: my $x = class :: is Rat { method Numeric { 1 } }; put $x.nude
18:08 camelia rakudo-moar ae2ae9: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/sCpuEgM8kC line 1␤␤»
18:08 psch m: my $x = class :: is Rat { method Numeric { 1 } }.new; put $x.nude
18:08 camelia rakudo-moar ae2ae9: OUTPUT«P6opaque: no such attribute '$!numerator'␤  in block <unit> at /tmp/gAnpFwKcwT line 1␤␤»
18:08 * psch shrugs
18:08 kaare_ joined #perl6
18:08 psch the example seems somewhat contrived
18:08 psch of course, if you have a base class you want to work of augmenting it with an anon mixin is perfectly fine
18:08 psch but it doesn't seem like it should be a categorical decision
18:10 nige1 joined #perl6
18:21 molaf joined #perl6
18:21 MadcapJake I think I found a bug :O
18:22 RabidGravy just the one?
18:23 MadcapJake my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; my %d = %h<deps>.grep(*<name> ~~ 'foo'); %d.say
18:23 MadcapJake m: my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; my %d = %h<deps>.grep(*<name> ~~ 'foo'); %d.say
18:23 camelia rakudo-moar ae2ae9: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/yoLbh8_hgT line 1␤Cannot use Bool as Matcher with '.grep'.  Did you mean to use $_ inside a block?␤  in block <unit> at /tmp/yoLbh8_hgT line 1␤␤Ac…»
18:23 MadcapJake m: my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; my %d = %h<deps>.grep(*<name> eq 'foo'); %d.say
18:23 camelia rakudo-moar ae2ae9: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/836PT4r54t line 1␤␤»
18:23 MadcapJake hmm that second one works in my REPL
18:25 MadcapJake m: my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; %h<deps>.grep(*<name> eq 'foo').say
18:25 camelia rakudo-moar ae2ae9: OUTPUT«({hash => asdasdad, name => foo})␤»
18:25 MadcapJake how is that an odd number of elements?
18:26 MadcapJake oh it's still a list
18:27 MadcapJake either way, the POINT was that the ~~ doesn't work here where eq does, am I Doing It Wrong or is this a bug? :P
18:29 RabidGravy there are occasional precedence surprises with hashes
18:31 psch m: (
18:31 camelia rakudo-moar ae2ae9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SFZw9miKVS␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/SFZw9miKVS:1␤------> 3(7⏏5<EOL>␤»
18:31 tadzik joined #perl6
18:31 psch m: say (*<name> ~~ Str)("name" => "foo")
18:31 camelia rakudo-moar ae2ae9: OUTPUT«No such method 'CALL-ME' for invocant of type 'Bool'␤  in block <unit> at /tmp/WhjgkNyqIB line 1␤␤»
18:31 psch m: say (*<name> eq Str)("name" => "foo")
18:31 camelia rakudo-moar ae2ae9: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in whatevercode  at /tmp/HBAr3ck1c2 line 1␤False␤»
18:32 geekosaur did you expect that to work?
18:32 MadcapJake why does the error mention Bool? Where is that coming from?
18:33 MadcapJake that's the same error I was getting in grep: «Cannot use Bool as Matcher with '.grep'.»
18:33 geekosaur (*<name> ~~ Str)("name" => "foo")
18:33 geekosaur looks to me like the second set of parens are trying to do a function call
18:33 geekosaur on the result of the smartmatch, which is Bool
18:34 psch m: say (* ~~ Str).WHAT
18:34 camelia rakudo-moar ae2ae9: OUTPUT«(WhateverCode)␤»
18:34 psch m: say (*<name> ~~ Str).WHAT
18:34 camelia rakudo-moar ae2ae9: OUTPUT«(Bool)␤»
18:35 psch fwiw, i do find "*<key>" looks suspect :P
18:35 MadcapJake m: [{ a => 'foo' }, { a => 'bar' }, { a => 'baz'}].grep(*<a> ~~ 'bar').say
18:35 camelia rakudo-moar ae2ae9: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/3M9YsT0kei line 1␤Cannot use Bool as Matcher with '.grep'.  Did you mean to use $_ inside a block?␤  in block <unit> at /tmp/3M9YsT0kei line 1␤␤Ac…»
18:35 geekosaur indeed
18:35 MadcapJake m: [{ a => 'foo' }, { a => 'bar' }, { a => 'baz'}].grep(*{'a'} ~~ 'bar').say
18:35 camelia rakudo-moar ae2ae9: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/GnkXcIuh87 line 1␤Cannot use Bool as Matcher with '.grep'.  Did you mean to use $_ inside a block?␤  in block <unit> at /tmp/GnkXcIuh87 line 1␤␤Ac…»
18:36 MadcapJake m: [{ a => 'foo' }, { a => 'bar' }, { a => 'baz'}].grep({$_{'a'} ~~ 'bar'}).say
18:36 camelia rakudo-moar ae2ae9: OUTPUT«({a => bar})␤»
18:36 darutoko joined #perl6
18:36 psch m: say (*.<name> ~~ Str).WHAT
18:36 camelia rakudo-moar ae2ae9: OUTPUT«(Bool)␤»
18:37 [Sno] joined #perl6
18:37 MadcapJake ahh it's the assoc subscript
18:38 jevin_ joined #perl6
18:38 pRiVi_ joined #perl6
18:39 _jolts joined #perl6
18:39 spanner_ joined #perl6
18:39 kentnl joined #perl6
18:39 kentnl joined #perl6
18:40 jolts joined #perl6
18:40 _mg_ joined #perl6
18:40 eyck joined #perl6
18:40 au joined #perl6
18:40 ChoHag joined #perl6
18:40 ruoso joined #perl6
18:40 jdv79 joined #perl6
18:40 leedo joined #perl6
18:41 MadcapJake m: say (*<name> eq 'foo').WHAT
18:41 camelia rakudo-moar ae2ae9: OUTPUT«(WhateverCode)␤»
18:41 stmuk joined #perl6
18:41 hcit joined #perl6
18:41 jolts joined #perl6
18:41 siriu5b joined #perl6
18:41 siriu5b joined #perl6
18:41 lucs joined #perl6
18:41 MadcapJake seems to work okay as long as smart match isn't used
18:43 cognominal joined #perl6
18:44 jolts joined #perl6
18:44 Vitrifur joined #perl6
18:44 cosarara joined #perl6
18:44 jolts joined #perl6
18:45 chansen_ joined #perl6
18:45 jolts joined #perl6
18:47 Bucciarati joined #perl6
18:48 atta joined #perl6
18:48 mindos joined #perl6
18:49 M-matthew joined #perl6
18:49 M-Illandan joined #perl6
18:49 pnu joined #perl6
18:49 agentzh joined #perl6
18:49 agentzh joined #perl6
18:50 ggherdov joined #perl6
18:52 ptolemarch joined #perl6
18:52 araujo joined #perl6
18:53 mprelude joined #perl6
18:53 tony-o okay, you can browse source files and read colorful READMEs on modules.zef.pm - need to get search working and then i'll post it up
18:53 tony-o oops - meant for ugexe
18:53 jjido joined #perl6
18:54 inokenty joined #perl6
18:56 MadcapJake wow that site is beautiful
18:56 MadcapJake really fast too! are you using a client-side framework?
18:56 tony-o i'm using mojo
18:56 tony-o mojo code i wrote in 2014, at that
18:57 MadcapJake neat! I've never used it before
18:57 MadcapJake how do you get the download stats?
18:57 tony-o those are all made up
18:57 tony-o so are the test statuses etc
18:58 tony-o it's kind of hacked together, it was working when it was fully integrated and you could 'zef push' to publish your module..we abandoned that in 2014 bc of some stuff that was NYI
18:58 tony-o the test status stuff was also full suite on rotating VMs on a machine that i no longer have
18:59 tony-o win 7, 10, debian, osx
18:59 tony-o and freebsd
18:59 MadcapJake wow! that sounds awesome though
18:59 tony-o now it's just a module browser
19:00 MadcapJake still cool though, that readme viewer is realy slick
19:01 MadcapJake what are you using for syntax highlighting?
19:02 tony-o github
19:02 MadcapJake tony-o: linguist?
19:03 MadcapJake if it's linguist or highlights, you can use my language-perl6fe highlighter ootb
19:07 MadcapJake how expensive are .pm domains? I didn't even realize that TLD existed!
19:07 patrickz joined #perl6
19:08 MadcapJake heck I didn't even realize there was a Sanit Pierre and Miquelon that is a colony of France still! xD
19:13 ZoffixW joined #perl6
19:14 ZoffixW It never occurred to me to ask... but is it possible to write Android apps with Perl 6?
19:15 peteretep joined #perl6
19:16 psch ZoffixW: not on r-j.  there's no android jvm that supports invokedynamic
19:17 psch ZoffixW: i think you could crosscompile moar, but then you don't really have an android app, you have a Rakudo that can run scripts
19:17 psch ...although i did find someone who was working on backporting invokedynamic to dalvik, not sure what came of that though
19:18 raoulvdberge joined #perl6
19:18 psch that's ignoring that google probably wouldn't go with it in the first place, now that they have ART deployed pretty much everywhere
19:18 ZoffixW :(
19:20 ZoffixW I have a new plan! We start Butterfly Phone™, overtake Android and iOS market in smartphones, and only allow developers to use Perl 6 for their apps!
19:22 mst and if you keep your phone in a pocket next to your crotch and run a tight inner loop, you won't have to worry about contraception either
19:24 * psch assumed Butterfly Phone™ natively understand moar bytecode
19:24 psch +s
19:24 RabidGravy MadcapJake, I can remember back in the last century you cou;dn't get a .pm domain - technically it existed but afnic insisted that they would only let the one St. Pierre et Miquelon ISP have the tld, everyone else should have .fr
19:25 psch then you'd have an equivalent of the current android/ART situation :P
19:25 sortiz joined #perl6
19:27 psch https://bitbucket.org/jpilliet/android-292 was the JSR-292/invokedynamic on dalvik project btw
19:27 MadcapJake RabidGravy: according to gandi.net, pm domains are now open to anyone in "European Economic Area or Switzerland".  So that's an improvement!
19:27 MadcapJake still rules me out though :(
19:27 psch looks like they're still on it
19:27 psch and are even planning to get ART to work, which is neat
19:28 psch maybe they get snatched by google eventually and we do get R-J on android :P
19:28 psch ...actually, almost a year no commits vOv
19:30 MadcapJake rakudo-js could be wrapped in cordova or something :)
19:33 tony-o MadcapJake: give me a few minutes, i'm in a meetings
19:34 * psch .oO( ...then i will have r-js wrapped in cordova for android )
19:36 MilkmanDan joined #perl6
19:36 MadcapJake I think if we sell it right, rakudo-js could be really big/important.
19:36 psch definitely, although performance will probably play a role
19:38 ufobat m: IO::Path.new(".").WHAT.say
19:38 camelia rakudo-moar ae2ae9: OUTPUT«IO::Path is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/IPqNiBhUgP line 1␤␤»
19:39 ufobat well its (Path), why not (IO::Path) ?
19:40 RabidGravy .shortname
19:41 MadcapJake I think the only major performance issue will be compiling to JS, plenty of other languages have compile-to-js tools and do quite well. if it's a serious drag, maybe we should consider asm/webassembly
19:41 maybekoo2 joined #perl6
19:41 RabidGravy m: class Foo:Bar::Baz { }; say Foo::Bar::Baz.shortname'
19:41 camelia rakudo-moar ae2ae9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iSy7K7W6jR␤Cannot use adverb Bar on a type name (only 'ver' and 'auth' are understood)␤at /tmp/iSy7K7W6jR:1␤------> 3class Foo:Bar7⏏5::Baz { }; say Foo::Bar::Baz.shortname'␤    expecting any of:…»
19:42 RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.shortname'
19:42 camelia rakudo-moar ae2ae9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/udoAL5SXOO␤Two terms in a row␤at /tmp/udoAL5SXOO:1␤------> 3ar::Baz { }; say Foo::Bar::Baz.shortname7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
19:42 [Coke] trailing '
19:42 RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.shortname
19:42 camelia rakudo-moar ae2ae9: OUTPUT«Method 'shortname' not found for invocant of class 'Foo::Bar::Baz'␤  in block <unit> at /tmp/DFzPb8ryqu line 1␤␤»
19:42 RabidGravy DOH
19:42 nige1 joined #perl6
19:42 RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.short_name
19:42 camelia rakudo-moar ae2ae9: OUTPUT«Method 'short_name' not found for invocant of class 'Foo::Bar::Baz'␤  in block <unit> at /tmp/mXROE48Wmz line 1␤␤»
19:43 RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.^shortname
19:43 camelia rakudo-moar ae2ae9: OUTPUT«Baz␤»
19:43 * RabidGravy STUPID
19:44 ufobat ans .WHAT is identical to .^shortname?
19:44 RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.WHAT
19:44 camelia rakudo-moar ae2ae9: OUTPUT«(Baz)␤»
19:45 RabidGravy no
19:45 RabidGravy the .gist of a type is "({ self.shortname })"
19:45 pomJ joined #perl6
19:46 sortiz \o #perl6
19:47 Gothmog__ joined #perl6
19:47 Xliff_ joined #perl6
19:48 firstdayonthejob joined #perl6
19:49 RabidGravy splitters
19:49 ryand joined #perl6
19:50 ufobat alright, :-) my confusion is cleared up
19:52 ZoffixWin_ joined #perl6
19:52 ZoffixWin_ joined #perl6
19:52 RabidGravy Attachments done in Sofa, now authentication and it's good to go
19:53 ranguard_ joined #perl6
19:53 jstimpfl1 joined #perl6
19:54 krakan_ joined #perl6
19:54 richi238 joined #perl6
19:54 hcit_ joined #perl6
19:55 RabidGravy well, nearly.
19:55 yqt joined #perl6
19:56 nige1 Xliff and perlpilot  - have updated SixFix now - I think for the better - thanks for the feedback  - the easter egg is now a sidenote
19:59 diego_k joined #perl6
20:02 au_ joined #perl6
20:02 MadcapJake How would I ensure that a file is only being written to once at a time?
20:03 hcit joined #perl6
20:03 au joined #perl6
20:03 spanner_ joined #perl6
20:03 spider-mario joined #perl6
20:03 orbus_ joined #perl6
20:03 ranguard joined #perl6
20:03 krakan joined #perl6
20:03 bartolin_ joined #perl6
20:03 autarch1 joined #perl6
20:03 CurtisOvidPoe joined #perl6
20:03 tailgate joined #perl6
20:03 Xliff_Zzzzzz joined #perl6
20:03 ZoffixWin joined #perl6
20:03 gensym joined #perl6
20:03 cpage joined #perl6
20:03 arnsholt joined #perl6
20:03 jstimpfle joined #perl6
20:03 profan joined #perl6
20:03 richi235 joined #perl6
20:03 jnthn joined #perl6
20:03 diegok joined #perl6
20:03 khagan_ joined #perl6
20:05 MadcapJake how do I do file locking in Perl 6?
20:07 PotatoGim joined #perl6
20:08 hoelzro MadcapJake: does the file already exist?
20:08 MadcapJake yeah
20:09 MadcapJake I want to open it, insert some data, and write it back, but I want to make sure that no other process tries to write to it while my process it working on it
20:09 hoelzro hmm...I'm wondering if IO::Handle.lock would do the trick
20:09 mindos joined #perl6
20:11 mst MadcapJake: also consider write-new-file-and-rename
20:11 spanner_ joined #perl6
20:11 spider-mario joined #perl6
20:11 orbus_ joined #perl6
20:11 bartolin_ joined #perl6
20:11 autarch1 joined #perl6
20:11 CurtisOvidPoe joined #perl6
20:11 tailgate joined #perl6
20:11 gensym joined #perl6
20:11 cpage joined #perl6
20:11 arnsholt joined #perl6
20:11 profan joined #perl6
20:11 jnthn joined #perl6
20:11 khagan_ joined #perl6
20:12 MadcapJake sweet!
20:12 teatime file locking is difficult and full of caveats.  advisory locking is easier than mandatory.
20:12 MadcapJake mst: do you mean creating a temp and overwriting?
20:12 teatime mst's solution is excellent whenever you can apply it.
20:12 teatime because mv is an atomic operation
20:13 MadcapJake teatime: how do you mean?
20:13 teatime about which?
20:13 MadcapJake mv being an atomic op, how would that work?
20:14 cdg joined #perl6
20:15 teatime nothing else can like, write into the file at the same time you're mv'ing it, and have the end result be the file containing a mix of your and their output
20:15 teatime if another program opens the file around the same time you mv'd it, they'll definitely get either the file that existed before or the file you replaced it with, in full.
20:15 hoelzro create file + rename is probably the right way to go
20:16 MadcapJake but I want to make sure that no one even tries to write to it, because otherwise I'll have to write a whole bunch of code just to diff and merge
20:16 CurtisOvidPoe joined #perl6
20:16 spanner joined #perl6
20:16 MadcapJake s/tries/succeeds
20:17 M-tadzik joined #perl6
20:17 spider-mario joined #perl6
20:17 jnthn joined #perl6
20:17 arnsholt joined #perl6
20:17 MadcapJake If they just write to the old file, then it will disappear when the other process is mv'ing (overwriting), right?
20:17 bartolin joined #perl6
20:17 teatime I think you'd have to describe your specific situation in more detail to get an accurate answer about the best thing to do.
20:17 profan joined #perl6
20:17 khagan joined #perl6
20:18 teatime MadcapJake: mv doesn't overwrite quite exactly.  but yes, if you replace a file w/ a different file, modifications to the previous file you didn't account for are lost.
20:19 teatime MadcapJake: so are you thinking you want to:  1) lock the file, 2) read in the file and generate a new file that depends in some way on the old contents, 3) write the new file, 4) unlock the file.  ?
20:19 MadcapJake teatime: right!
20:19 teatime what kind of file/application is it?
20:19 MadcapJake a module manager for Perl 6
20:20 teatime you could try to ensure only one copy of your application (per user, perhaps) is running at a time
20:20 mst MadcapJake: ok, let me put it another way, since you're apparently being resistant to reality
20:20 mst MadcapJake: (1) I never said "don't lock as well"
20:21 mst MadcapJake: (2) write-and-mv is safe against your process dying mid-writing
20:21 mst MadcapJake: (3) this is why this is how 'vipw' and friends do it
20:21 mst MadcapJake: (4) your file is not more important than /etc/passwd so maybe consider they might be right
20:22 teatime yeah you could combine advisory locking with the mv approach, and call programs that don't follow your advisory locking protocol and thus randomly lose changes an instance of DIHWIDT
20:22 MadcapJake mst: Ok! not trying to be dismissive of reality but I *do* want an elegant solution that prevents me from yak shaving a merge/diff
20:22 teatime assuming you have control over specifying that kind of behavior
20:22 teatime what's in the file?
20:23 mst MadcapJake: yes, and that's what I'm trying to give you!
20:23 gensym joined #perl6
20:23 MadcapJake a JSON array of objects containing a folder name and a hash, my code is traversing the path and gathering the Perl 6 module short-name and adding it as a key-value in the newly added objects
20:24 MadcapJake mst: ok, so maybe I'm not following, so I would (1) copy the file to a temp, (2) lock the original, (3) modify the temp, (4) move back into place, and (5) unlock, is that right?
20:25 mst MadcapJake: no
20:25 mst MadcapJake: what
20:25 mst MadcapJake: lock the original. read the original. write the new version. move it into place. close() your filehandle to the original.
20:25 teatime I think a lot of apps would make the assumption that the only likely way two programs would be manipulating the installation at the same time would be 2 instances of the same program, take steps to detect that w/ a global lock file etc., and call it good.
20:26 orbus_ joined #perl6
20:28 MadcapJake I'm a little worried that if I lock the file, I could break the module downloading component as I can't control when it writes to the JSON :(
20:28 tailgate joined #perl6
20:28 autarch joined #perl6
20:28 teatime the 'module downloading component' isn't under your control?
20:29 MadcapJake teatime: this: https://github.com/whyrusleeping/gx
20:29 teatime also, you should probably just accept that you'll, at best, be able to do advisory locking.
20:30 teatime and even that has will have lots of gotchas.
20:30 teatime ^ how did that sentence come out of my brain.  I didn't backspace / rephrase at all.
20:31 MadcapJake teatime: what if, instead of modifying their json, I just add to META6
20:32 teatime I don't know what you're trying to do / overall goals, and it's probably not worth trying to give me enough of that understanding.
20:32 MadcapJake xD I do that kind of stuff all the time. My brain's personal favorite is writing the wrong word that is pronounced the same e.g., right/write
20:32 teatime oh, the github link is to your project?
20:32 MadcapJake teatime: no that's GX, it's a module management tool that supports any language
20:33 MadcapJake you just write a CLI tool that responds to the hooks they call
20:33 MadcapJake it's done over IPFS so it's a distributed network that works over numerous protocols and is resilient to the leftpad situation :)
20:37 MadcapJake if anyone is interested in helping out (esp with testing), I'd really appreciate it! For a distributed model to work, it needs to have some nodes! xD
20:37 Xliff__ joined #perl6
20:37 [particle]1 joined #perl6
20:38 sQuEE` joined #perl6
20:39 Util_ joined #perl6
20:40 arnsholt_ joined #perl6
20:40 charsbar_____ joined #perl6
20:41 esh_ joined #perl6
20:41 [ptc]_ joined #perl6
20:41 profan_ joined #perl6
20:41 diegok joined #perl6
20:41 agentzh_ joined #perl6
20:41 agentzh_ joined #perl6
20:41 ilbelkyr_ joined #perl6
20:41 hahainte1net joined #perl6
20:42 huf_ joined #perl6
20:42 lucs_ joined #perl6
20:42 shmibs_ joined #perl6
20:42 jferrero joined #perl6
20:43 obarb joined #perl6
20:45 emdashcomma_ joined #perl6
20:46 dustinm`_ joined #perl6
20:46 Shozan joined #perl6
20:47 captain-adequate joined #perl6
20:47 ZoffixWin_ Weeeeeee
20:47 m0ltar joined #perl6
20:49 skarn joined #perl6
20:49 cfloare joined #perl6
20:49 ponbiki joined #perl6
20:50 PerlJam joined #perl6
20:51 RabidGravy it's all going off
20:53 ingy joined #perl6
20:56 ZoffixWin joined #perl6
20:59 sufrostico joined #perl6
21:01 dalek doc/doc-fixes: 7282667 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
21:01 dalek doc/doc-fixes: Added documentation for cosech, acosech, cotanh and acotanh
21:01 dalek doc/doc-fixes: review: https://github.com/perl6/doc/commit/7282667a80
21:06 pmurias joined #perl6
21:07 pmurias MadcapJake: I plan to make rakudo-js support react.native
21:07 MadcapJake pmurias: sweeeet!
21:07 ZoffixWin pmurias++
21:08 dalek doc: 7282667 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
21:08 dalek doc: Added documentation for cosech, acosech, cotanh and acotanh
21:08 dalek doc: review: https://github.com/perl6/doc/commit/7282667a80
21:08 dalek doc: 71cab0c | dogbert17++ | doc/Type/Cool.pod:
21:08 dalek doc: Merge pull request #451 from perl6/doc-fixes
21:08 dalek doc:
21:08 dalek doc: Added documentation for cosech, acosech, cotanh and acotanh
21:08 dalek doc: review: https://github.com/perl6/doc/commit/71cab0c543
21:08 ZoffixWin dogbert17, if it makes it easier to you, you can push your commits directly to master. That's what we usually do, unless there are a whole lot of changes to existing content we make, where detailed reviewing before merge makes sense.
21:09 pmurias MadcapJake: althoug I have to first complete rakudo-js ;)
21:10 dogbert17 ZoffixWin: ok will do so when the changes are small and noncontroversial then :-)
21:10 perlpilot pmurias: Don't set the bar so high; it'll never be "complete" only "good enough for most practical purposes"  :)
21:12 atta joined #perl6
21:13 ZoffixWin Are there ways to specify compiler releases?
21:13 pmurias perlpilot: I'll likely work on react.js and react.native support once I complete the grant which will be "good enough for some practical purposes"
21:13 ZoffixWin In your code, I mean. Say your code only works with rakudo 2016.03 and later.
21:15 ZoffixWin I guess it doesn't matter that much.... since 6.d will be released some time this year. /me is pondering https://rt.perl.org/Ticket/Display.html?id=127890
21:16 RabidGravy yeah, you're kind of stuck with "use v6.c"
21:17 wamba m:my @x = ( 1, 0, (), 2, "", 3, ); while @x.shift { say $^a }
21:18 wamba m: my @x = ( 1, 0, (), 2, "", 3, ); while @x.shift { say $^a }
21:18 camelia rakudo-moar ae2ae9: OUTPUT«1␤»
21:18 wamba m: my @x = ( 1, 0, (), 2, "", 3, ).map:{ $_  but True }; while @x.shift { say $^a }
21:18 camelia rakudo-moar ae2ae9: OUTPUT«1␤0␤()␤2␤␤3␤»
21:18 travis-ci joined #perl6
21:18 travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for cosech, acosech, cotanh and acotanh'
21:18 travis-ci https://travis-ci.org/perl6/doc/builds/122898545 https://github.com/perl6/doc/commit/7282667a80de
21:18 travis-ci left #perl6
21:19 MadcapJake m: $*PERL.compiler.say #= ZoffixWin
21:19 camelia rakudo-moar ae2ae9: OUTPUT«rakudo (2016.03.117.gae.2.ae.92)␤»
21:20 RabidGravy ZoffixWin, though I guess something like "say $*PERL.compiler.version cmp v2016.03" in a BEGIN block
21:20 RabidGravy hahah
21:20 MadcapJake lol
21:20 ZoffixWin Cool. Thanks.
21:24 felher joined #perl6
21:26 sortiz Hi, I found that as soon as NativeCall::cglobal returns, the loaded native library is unloaded, so cglobal("somelib", "somesym", Pointer) returns a Pointer pointing to limbo, see: https://github.com/MoarVM/MoarVM/blob/master/src/core/nativecall.c#L622, design? bug? Should i try other channel?
21:27 awwaiid aww.... we don't have command line -i option for edit in place :(
21:27 perlpilot awwaiid: funny ... I was thinking about adding that the other day so that I could do more Perl 6 one-liners
21:28 awwaiid I'm working out a tutorial and the natural progression is REPL, one-liners, scripts, applications. One of my most common p5 one-liner is -pi -e
21:28 perlpilot awwaiid: The P5 command line options I use consist almost entirely of  -l -a -n -e -p -i -0
21:29 perlpilot so, if P6 had -a and -i  (and I guess -F), that would be awesome for one-liners
21:30 _28_ria joined #perl6
21:31 sufrostico joined #perl6
21:32 teatime lol, XKB... is it just me, or does the meaning of this seem beautifully inscrutable:  AnyOfOrNone(all)
21:32 teatime like, I can't even begin to guess what that might mean w/o looking it up.
21:33 awwaiid teatime: amazing
21:34 ZoffixWin "Note that key+AnyOfOrNone(all) is equivalent to just key, but key is much easier to read."   https://wiki.archlinux.org/index.php/X_KeyBoard_extension
21:34 ZoffixWin rofl
21:35 awwaiid hahaha
21:36 teatime ZoffixWin: lol!
21:38 RabidGravy yeah, this very evening I have used 'perl -pi -e' *to edit a bunch of Perl 6* files
21:38 awwaiid oooo meta
21:39 sQuEE joined #perl6
21:40 Sqirrel joined #perl6
21:41 Util joined #perl6
21:41 ruoso joined #perl6
21:41 diegok joined #perl6
21:42 bartolin joined #perl6
21:42 TEttinger joined #perl6
21:43 SHODAN joined #perl6
21:45 teatime is there a system in place to warn, but with a category so someone can suppress certain warnings?
21:46 cosarara joined #perl6
21:47 RabidGravy I'd recommend Lumberjack, but it's a tad slow at the moment
21:47 M-tadzik joined #perl6
21:48 teatime how does rakudo do it in src/core/* files
21:48 _nadim joined #perl6
21:49 lucs joined #perl6
21:49 hcit joined #perl6
21:50 teatime like, Mu.pm has:  warn "Use of uninitialized value of type {self.^name} in numeric context";
21:51 teatime so is there no way to disable that warning?
21:51 teatime other than to disable all warnings I suppose.
21:51 Praise joined #perl6
21:51 teatime which, that's fine actually; I can work with that.
21:52 teatime I do suppose rakudo warnings should be in ASCII, eh?  :)
21:53 ZoffixWin You can use quiet block
21:53 ZoffixWin Why ASCII?
21:54 * ZoffixWin points to the last part of the /topic
21:54 ZoffixWin Sorry, quietly block
21:54 ZoffixWin m: quietly say 52 + Any
21:54 camelia rakudo-moar 4f3f1c: OUTPUT«52␤»
21:55 maybekoo2 joined #perl6
21:58 wamba m: my @a:=[]; unless @a.shift { say "aa",$^a.so; say $^a;say @a };
21:58 camelia rakudo-moar 4f3f1c: OUTPUT«aaFalse␤(HANDLED) Cannot shift from an empty Array␤  in block <unit> at /tmp/iUYgurUbKl line 1␤␤[]␤»
21:59 ZoffixWin That's a Failure object there
21:59 wamba always false?
22:02 ZoffixWin Seems so: https://github.com/rakudo/rakudo/blob/nom/src/core/Failure.pm#L55
22:02 yqt joined #perl6
22:03 grondilu_ not sure I'm going to be able to reproduce it here, but I had issues with an infinite state @var.  I had to replace it with its literal expression.
22:04 grondilu joined #perl6
22:05 wamba ZoffixWin: you're right, http://doc.perl6.org/type/Failure#method_Bool
22:08 ZoffixWin There have been 194 files changed, 7641 insertions(+), 4251 deletions(-) in rakudo since Dec 27, 2015.
22:09 ZoffixWin Just pulled into my fork. If anyone curious about seemingly uninteresting info: https://gist.github.com/zoffixznet/21f44f6a3328ebb8c0863103f2d8dd16 :)
22:11 diakopter joined #perl6
22:11 bartolin joined #perl6
22:11 xiaomiao joined #perl6
22:12 Gothmog_ joined #perl6
22:12 Xliff__ What's the best way to deal with tests where if one fails, you want the entire .t file to stop execution?
22:12 Xliff__ I know there is skip-rest, but the problem is much of the file happens in a loop.
22:13 ZoffixWin Xliff__, stop and fail or stop and succeed?
22:13 Xliff__ stop and fail.
22:13 ZoffixWin There should be BAILOUT, or maybe I'm conflating P5 here
22:14 Xliff Right now I'm using die() after a flunk().
22:14 ZoffixWin die 'Aborting'; # should work  :D
22:14 Xliff LOL
22:14 Xliff OK.
22:14 ZoffixWin :D
22:14 Xliff Thanks, Zoffy.
22:15 dg joined #perl6
22:16 kid51 joined #perl6
22:16 ZoffixWin (and BAILOUT is a P5 thing.. never mind me)
22:17 ZoffixWin Oh!
22:18 ZoffixWin Xliff, looking at the sauce, looks like calling Test::die_on_fail(); at the start of your test should bailout on first failure
22:22 arnsholt_ Bailing out is part of the TAP protocol, so if it's not in Test.pm that's arguably a missing feature
22:23 ZoffixWin Does it work when you don't specify the number of tests? There's skip-rest(), but the docs say it only works when you specify the number of tests
22:24 teatime Can someone explain what ACCEPTS() does.  I don't get it.
22:26 RabidGravy if it exists on a type with the appropriate candidate it gets called with the LHS on the RHS of a smartmatch
22:26 RabidGravy e.g
22:27 RabidGravy m: class Foo { multi method ACCEPTS(Int $i) { say $i }};  1 ~~ Foo.new
22:27 camelia rakudo-moar 4f3f1c: OUTPUT«1␤»
22:28 RabidGravy it should return a Bool as appropriate
22:31 Xliff ZoffixWin, Oh, that's great! Thanks!
22:32 teatime what is the »ö« in the top-... it's camellia.
22:32 ZoffixWin Yes, that's the text version of the logo: https://raw.githubusercontent.com/perl6/mu/master/misc/camelia.txt
22:32 ZoffixWin In June this year, we may get a "butterfly" unicode char too
22:33 skids joined #perl6
22:33 teatime also yeah, once I finally figured out how to grep for unicode chars (hint: not with GNU grep.. perl did it tho!) I see there are some fail messages w/ unicode, so cool.
22:34 teatime my desire for it was just to use some fancy formatting like ² and ×, so it's nice to see that's not frowned upon :)
22:34 teatime ZoffixWin: I've seen fail, never quietly though..
22:34 tony-o MadcapJake: I am using Hihglight for syntax highlighting on modules.zef.pm
22:35 ZoffixWin `fail` returns a Failure, which is an Exception that doesn't always explode.
22:35 ZoffixWin quietly block mutes warnings
22:35 ZoffixWin m: say 25² × 3
22:35 camelia rakudo-moar 4f3f1c: OUTPUT«1875␤»
22:35 ZoffixWin teatime, ^ that stuff's in core :) How could we frown
22:36 teatime true
22:36 MadcapJake tony-o: https://github.com/atom/highlights or https://highlightjs.org/ ?
22:36 spebern joined #perl6
22:36 teatime but knowing Perl6 can handle unicode source code and input files, and knowing your user's terminal can display UTF diagnostic messages you print, are 2 different things.
22:36 * MadcapJake is going to get take-out &
22:37 teatime so I assumed there was a 'don't print high chars in rakudo diagnostics' rule
22:37 ZoffixWin True, but my personal opinion is the stuff that can't display it is outdated technology.
22:37 teatime I tend to agree.
22:38 teatime man, that's refreshing.
22:38 teatime perl6 is refreshing :)
22:38 RabidGravy there is no need to be backward compatible
22:39 tony-o MadcapJake: high.js - i believe it's the second link
22:39 Sgeo joined #perl6
22:40 MadcapJake ah ok, they don't have a perl 6 highlighter :(
22:40 MadcapJake looks quite a bit easier to write than codemirrors modes, I'll take a crack at it later tonight.
22:44 tony-o MadcapJake++
22:45 ZoffixWin How to kill your VM: TEST_JOBS=200 make spectest
22:49 ZoffixMobile joined #perl6
22:49 ZoffixMobile How to kill your Windows host: run TEST_JOBS=20 make spectest on your VM
22:50 ZoffixMobile lol... no processor left over for anything elsr
22:52 ZoffixWin Is this a normal failure mode for the testsuite? https://gist.github.com/zoffixznet/11c08ab05a536c9f24ce8eb653f083ca
22:55 skids the power failure has been there for a while.  First I have seen of the wrap failure, but I have not spectested in a week or so.
22:56 spebern joined #perl6
22:58 ZoffixWin "Failed test:  59" is not really helpful. I'm not counting them all!
22:58 tony-o ps ax | awk '{ print $0 }' | xargs kill
22:59 ZoffixWin heh
22:59 skids running it outside of prove can help.
23:00 au joined #perl6
23:01 ZoffixWin Thanks. It did.
23:01 ZoffixWin Seems to be nothing to do with the change I made.
23:03 ZoffixWin PR for #127890 https://github.com/rakudo/rakudo/pull/743
23:03 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127890
23:04 pierrot joined #perl6
23:16 arlenik joined #perl6
23:18 arlenik noob here.  perl6.org/language/modules is very confusing.  is there a better source?
23:20 _nadim joined #perl6
23:20 ZoffixWin arlenik, don't think so. What are you confused about specifically? That doc could be improved
23:21 RabidGravy I think that document tries to do too much, it could be three separate documents
23:22 RabidGravy anyhow bed time
23:22 RabidGravy toodles
23:22 timotimo at least two, yeah
23:22 timotimo gnite
23:22 Hotkeys there needs to be a page on enums in the docs I think
23:22 arlenik ZoffixWin: in my project i have lib/Vector.pm6 file.  I want to use it in lib/Point.pm6 file. doing  'use Vector;' in lib/Point.pm6 gives error.
23:22 Hotkeys unless they're supposed to be secret
23:22 ZoffixWin 'night
23:22 ZoffixWin arlenik, what's the error?
23:23 Hotkeys They're in the specs and i think the intro thing talks about them
23:23 MadcapJake arlenik: are you calling the script with -Ilib
23:23 ZoffixWin arlenik, you need to have -Ilib to your perl6 invocation or 'use lib "lib"' or similar somewhere
23:23 Hotkeys oh yeah
23:23 Hotkeys do 'use lib "lib"' it's a good line
23:23 Hotkeys v useful
23:24 ZoffixWin Hotkeys, they aren't supposed to be secret. If they ain't in the docs, I welcome you to write them :)
23:24 arlenik ZoffixWin: could not find Vector in: ...
23:24 ZoffixWin arlenik, that suggests you lib/ is not included in the search path.
23:24 ZoffixWin s/you/your/;
23:25 ZoffixWin pass -Ilib to perl6
23:25 arlenik MadcapJack: no.  I run 'perl6 Point.pm6' in the command line.
23:25 ZoffixWin arlenik, try 'perl6 -Ilib Point.pm6'
23:26 Hotkeys I've never run anything from inside the lib folder
23:26 ZoffixWin You need to tell perl6 where to find your custom modules. -I is a command line switch that lets you do that. You can also use     use lib 'whatever';    in your code to accomplish the same
23:26 MadcapJake arlenik: -Ilib will include anything in that's in the lib folder, you could supply it anything -I. will include any pm6 files in the same directory and so on
23:27 MadcapJake use lib is supposed to be kinda not-preferred though right?
23:27 timotimo that's right
23:27 timotimo normally you'd want to build a META6.json with a "provides" section
23:27 timotimo then you'll get it loadable without "use lib"
23:28 ZoffixWin Well, yeah. It's like you're hardcoding a system-specific path in your code.
23:28 ZoffixWin rather not do that
23:29 MadcapJake but if it's just a script with some supporting module files, a use lib would probably be fine
23:29 timotimo i'd prefer -Ilib for your perl6 invocation, but that's just me
23:30 MadcapJake another option is PERL6LIB env var
23:30 teatime ZoffixWin: did you mean to say you prefer 'use lib' over META6.json provides ?
23:30 teatime or am I mis-reading
23:31 timotimo well, if you're going to distribute your thing anyway, you won't get around a META6.json
23:32 ZoffixWin teatime, not at all.
23:32 timotimo but if it's just a script and two modules in the lib/ folder, then maybe you can skip it
23:32 MadcapJake arlenik: does any of that help? :)
23:32 teatime ah, k.
23:32 MadcapJake I'm not sure if it's correct but I like to think of `-I` as "Include this dir"
23:37 arlenik MadcapJake: yes, just got it all working. thanks much everyone.  btw, perl6 segfaults if i define cross() subroutine as multi in Vector.pm6
23:37 tony-o MadcapJake: i don't know how much you were playing around on the module browser but it should be syntax highlighting most documents, and a lot more browsable now
23:37 tony-o going to work on the search stuff tonight, or i might go ride my bike, probably one of those
23:38 MadcapJake bike schmike! ;)
23:38 tony-o racing bikes is a time commitment
23:38 Amnez777 joined #perl6
23:38 ZoffixWin arlenik, would you please report that as a bug? (https://github.com/rakudo/rakudo/#reporting-bugs). One way to do so is as simple as emailing the details to rakudobug@perl.org
23:39 arlenik ZoffixWin: sure, I will.
23:39 ZoffixWin Sweet. Thanks.
23:39 Xliff_ joined #perl6
23:39 timotimo wow, segfault
23:39 timotimo we surely don't want that :)
23:39 timotimo if you can give a test case of only one or two small files that causes it, that'd be great
23:40 tony-o MadcapJake: also, you'll see the stats are random, now.  enjoy
23:40 MadcapJake tony-o: I seriously love the styling and font, it looks really slick. I've played around a bit more, only a few modules are on there though
23:40 timotimo also the output of perl6 --version is always appreciated
23:40 tony-o MadcapJake: i have 500 some modules in the system, it's just paginated and not showing the pages - search + pagination will help a lot
23:41 tony-o i have a cron that updates from http://git.io/vf5FV
23:41 MadcapJake tony-o: yes! I've tried just guessing at some links but I'm not getting it right :P
23:42 tony-o haha - you can guess some of the more strictly named authors in METAs  - it goes on author in META + Module name with ':' replaced by '-'
23:42 MadcapJake tony-o: it'd be nice too if there was a user page that showed all your modules like https://www.npmjs.com/~madcapjake
23:42 tony-o i can make that happen
23:44 MadcapJake tony-o: npm allows multiple contributers but the first one is always the author (that's how i'd handle the authors field in META6)
23:44 tony-o works for me, some people don't have authors in their meta
23:44 tony-o for now, though, food.
23:45 MadcapJake tony-o: they're supposed to, it's apart of the long-form of distribution names
23:47 Xliff__ joined #perl6
23:48 teatime heh, P6 POD should totally allow unicode box drawing characters for tables, if it doesn't already
23:49 timotimo perl6 pod is in want of a rewrite
23:50 teatime tbh I've never been a fan of POD, but I'm pretty choosy about my plain-text minimalist markup
23:50 ZoffixWin [19:32:12] <ZoffixWin> teatime, not at all. # That meant that I did not meant I prefer 'use lib'
23:50 * ZoffixWin is having trouble catching up due to being drunk
23:51 * teatime would probably implement if he had any big modules w/ inline docs:  =begin markdown / =begin markdown-pandoc / =begin asciidoc
23:51 ZoffixWin I don't see much of the connection between META provides and 'use lib' TBH
23:54 teatime are any of the officialish docs written in anything other than POD ?
23:55 Juerd My issue with pod is that it isn't strongly bound to the actual code, and when you start interleaving it with the code, things get way too messy.
23:55 Juerd I'm constantly annoyed by POD when it's mixed with code, but when it's not mixed with code it's harder to keep it up to date and complete.
23:56 teatime I like python's docstrings, that was a good idea.
23:56 ZoffixWin POD mixed with code is the worst. One read without a syntax highlighter is enough to understand that.
23:57 Juerd And many things are already in my code, like method signatures. I shouldn't have to repeat them.
23:57 ZoffixWin I dunno... my opinion is the docs are entirely separate from code.
23:58 teatime ZoffixWin: the biggest problem with that is that the farther apart two related things are, the more likely they are to fall out of sync
23:58 ZoffixWin "Takes the snippet ID" wins my world over "method .get(Str $snippet-id)" any day
23:58 teatime is POD-in-code really that terrible, or is it the way people tend to do it that's terrible?
23:59 ZoffixWin teatime, without syntax highlighting POD-in-code is impossible to read. It's extremely hard to tell what is code and what is an example in the docs.
23:59 Juerd ZoffixWin: Depends on the kind of documentation. Rationale, example code, general caveats, see also's, etc, are not strictly bound to the code. But reference documentation for whichever API your module exports, definitely is.
23:59 teatime word.

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

Perl 6 | Reference Documentation | Rakudo