»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:04 skids joined 00:06 cpage_ joined
teatime "No failures!" XD 00:06
ZoffixLappy sweet 00:07
Funny. I was just surprised myself my code worked the first time without a single error!
00:08 BenGoldberg joined 00:15 ZoffixLappy left
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:18
00:19 ZoffixLappy joined
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:19
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?
teatime (Real $a, Duration:D $b) and (Instant:D $a, Real:D $b) are ambiguous. (when I have Instant minus Duration) 00:22
oh my 1st post was in between your disconnect 00:23
ZoffixLappy I looked at the log.
m: say 'test' 00:24
camelia rakudo-moar d1eeb3: OUTPUT«test␤»
ZoffixLappy Ugh. This wifi is less stable than.... unstable things
teatime, I see no possible way those are ambiguous
00:26 Ben_Goldberg joined, BenGoldberg left
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
00:26 Ben_Goldberg is now known as BenGoldberg
camelia rakudo-moar d1eeb3: OUTPUT«-37.8␤» 00:26
ZoffixLappy Smart, Zoffix! Declare an op and don't actually use it :( 00:27
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;
camelia rakudo-moar d1eeb3: OUTPUT«-37.8␤True␤»
ZoffixLappy teatime, works fine
BenGoldberg m: (now - INIT {now}).perl.say 00:28
camelia rakudo-moar d1eeb3: OUTPUT«Duration.new(<650/385101>)␤»
yoleaux 11 Apr 2016 23:54 EDT <AlexDaniel> BenGoldberg: it is parsed as a positional argument
ZoffixLappy FWIW, now - INIT now works too; no need for curlies 00:29
BenGoldberg m: now.perl.say
camelia rakudo-moar d1eeb3: OUTPUT«Instant.from-posix(<641162741406/439>, Bool::False)␤»
BenGoldberg m: now.sqrt.perl.say 00:32
camelia rakudo-moar d1eeb3: OUTPUT«38216.5879577031e0␤»
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
teatime then what?
ZoffixLappy Hmm.
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;
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␤␤»
teatime ^^
ZoffixLappy yeah 00:34
teatime I think i could make a Instant Duration signature'd function
but I'd rather just have the Instant Real function win out over Duration Real
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;
camelia rakudo-moar d1eeb3: OUTPUT«-37.8␤True␤»
BenGoldberg Why is it that Instant 'does Real', when it's obviously got a Rat in it?
ZoffixLappy Isn't Real a role, but Rat a type? 00:35
and Rat does Real?
BenGoldberg Hmm, nevermind then.
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.
teatime BenGoldberg: TBH, I also think that's a bit of an issue 00:36
Rat seems to be a PITA to make work in the ecosystem of Numeric/Real roles
at least if by 'work' you mean 'not turn into a Num at the drop of a hat an lose precision'
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 ;)
teatime ZoffixLappy: yeah exactly
ZoffixLappy But Real isn't a type
BenGoldberg m: 1e0.perl.say 00:38
camelia rakudo-moar d1eeb3: OUTPUT«1e0␤»
BenGoldberg m: 1e0.WHAT.say
camelia rakudo-moar d1eeb3: OUTPUT«(Num)␤»
teatime I have a patch nearly done, to try to improve Duration a little. 00:39
ZoffixLappy Cool
teatime but I haven't been able to learn enough to fix everything, heh. 00:40
and possibly I went overboard on the tests
they can be removed later though if need-be; I needed them to confirm it was behaving right.
ZoffixLappy What's the improvement? 00:41
00:41 cyberviking joined
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: rt.perl.org/rt3//Public/Bug/Displa...?id=127339
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
(i.e., Duration / Duration → unitless number)
00:48 kid51 joined 00:50 mcsnolte left
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:51
Now, all I need is tests... :) I'm following the BDD pattern. 00:52
Beer Driven Development :)
subtest in Test.pm6 needs a multi :( This looks so much nicer: gist.github.com/zoffixznet/10cfd20...78bbf9b8f6 01:02
or 'description', { block }. Having description at the end is awful.
01:04 Sqirrel left, Actualeyes joined
Xliff Does NativeCall have a sizeof() for repr('CStruct') classes? 01:05
01:09 Sqirrel joined
Xliff Hmmm.... 01:10
Got this when running a script through p6-valgrind-m
pastebin.com/YjXbBbeE
Is this a known bug?
I will recompile rakudo and try again.
ZoffixLappy m: say <2 latest> ⊆ ('2', 'latest').Seq 01:12
camelia rakudo-moar d1eeb3: OUTPUT«False␤»
ZoffixLappy Huh?
m: say <2 latest> ⊆ <2 latest>.Seq
camelia rakudo-moar d1eeb3: OUTPUT«True␤»
ZoffixLappy What's the difference?
m: say <x2 latest> ⊆ ('x2', 'latest').Seq 01:13
camelia rakudo-moar d1eeb3: OUTPUT«True␤»
ZoffixLappy guesses the types
geekosaur m: <2 latest>.perl.say
camelia rakudo-moar d1eeb3: OUTPUT«(IntStr.new(2, "2"), "latest")␤»
sortiz Xliff, if class Foo is repr('CStruct') { … } you can use nativesizeof(Foo). 01:16
Xliff sortiz, thanks. 01:19
Awesome! 01:21
ok 10 - size of ogg_stream_state: 360
.tell timotimo The wordy struct idea for the $.header attribute worked! Thanks for the help!
yoleaux Xliff: I'll pass your message to timotimo.
01:26 molaf left 01:27 sufrostico left, cyberviking left
AlexDaniel ZoffixLappy: yeah, it's not the first time I see somebody say “huh?” when IntStrs appear 01:31
ZoffixLappy :)
geekosaur every DWIM comes with a WAT... 01:32
this is the WAT that comes with "perlish" string/number conflation 01:33
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:34
01:35 khw left 01:38 molaf joined
Xliff pastebin.com/YjXbBbeE <- Not appearing anymore after updating rakudo to latest git. 01:40
AlexDaniel PASTEBIN! NOOOoooooooooo 01:41
Xliff AlexDaniel, got a better solution?! :p
ZoffixLappy Xliff, gist.github.com/ or fpaste.scsys.co.uk/ 01:42
AlexDaniel Xliff: gist.github.com/
ZoffixLappy pastebin.com has been known for mangling the paste. Not to mention their aggressive adfest campaign
Xliff Wow. Using gist as a pastebin replacement is like using a sledgehammer to swat flies.
AlexDaniel what's the difference? 01:43
Xliff Yeah, well pastebin is a habit.
ZoffixLappy Why? Both store the same amount of data, except one is ad-free and has decent highlighting :)
AlexDaniel I mean, besides that you get a bit of extra functionality that you don't have to use
Xliff I will start using fpaste.
ZoffixLappy There's an fpaste module too :)
ShadowPaste or whatever it's called. Should be usable for App::Pastebin
Xliff Yeah. Was wondering about that, ZoffixLappy 01:44
ZoffixLappy Or App::Nopaste
Xliff Isn't one of the bots fpaste aware?
AlexDaniel There are also gitlab.com/explore/snippets and bitbucket.org/snippets
ZoffixLappy Unsure. Maybe not. 01:45
01:45 ilbot3 left
AlexDaniel nope, but I'll make it fpaste aware once somebody actually starts using fpaste 01:45
Xliff As far as pastebin and ads go, I use Stylish for Chrome and a theme that ditches them.
AlexDaniel nowadays it seems like there's no good reason to use something besides github gists… 01:46
Xliff I typically use gists when I have something to share.
ZoffixLappy I have adblock too, but it witnessed it mangling content a couple of times
AlexDaniel Xliff: you can create secret gists
Xliff Weird. Never had a problem with pastebin mangling content. 01:47
AlexDaniel, I know.
ZoffixLappy Well. fpaste has #perl6 in the channel selector, but I've no idea what network it's for :)
Xliff But for pasting blobs of text... it seems overkill.
01:47 ilbot3 joined
Xliff ZoffixLappy, I think it's here. 01:47
ZoffixLappy Nope. Tried twice. No announcement
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.
shadowpaste0 "AlexDaniel" at 217.168.150.38 pasted "Test" (1 line) at fpaste.scsys.co.uk/510359
ZoffixLappy :S
Xliff LOL
ZoffixLappy Sorcery!
Xliff Weird! I tried to paste something and the link doesn't work. 01:49
fpaste.scsys.co.uk/02873
AlexDaniel you have to provide your nickname I guess 01:50
Xliff I did.
ZoffixLappy Xliff, you've used nickname that stared with a capital letter
It's a spam protection.... of questionable usability.
shadowpaste0 "ZoffixLappy" at 217.168.150.38 pasted "Test" (1 line) at fpaste.scsys.co.uk/510361
AlexDaniel xD
ZoffixLappy wtf
AlexDaniel ZoffixLappy: oh look! You have the same IP address! How weird!
ZoffixLappy How did it even get "ZoffixLappy!" :S
shadowpaste0 "xliff" at 217.168.150.38 pasted "Self referential." (1 line) at fpaste.scsys.co.uk/510362
Xliff Huh 01:51
01:51 cdg joined
ZoffixLappy It checks against the IPs in the channel... 01:51
shadowpaste0, creepy!
Xliff Why didn't it get "Xliff" instead of "xliff"?
ZoffixLappy is reminded of "a ghost in the machine" from iRobot. 01:52
"I, Robot" 01:53
teatime this is a pretty awesome slidedeck speakerdeck.com/sidnet/perl-6-the-...has-landed 01:54
is the author someone here?
Xliff m: $a = 4.7382; say $a.unpack("WWWW");
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");␤»
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␤␤»
Xliff m: my $a = 4.7382; say $a.chars; 01:56
camelia rakudo-moar d1eeb3: OUTPUT«6␤»
Xliff m: my $a = 4.7382; say @$a.chars;
camelia rakudo-moar d1eeb3: OUTPUT«6␤»
01:58 perlawhirl left 01:59 tharkun left, tharkun joined
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"?
Xliff The internal representation of a value. 02:01
Generally for things like floats.
sortiz Only if the value is native
Xliff sortiz: That they are. 02:02
sortiz: What's the best way to do that, then?
sortiz In particular for num32 and num64 you can use a native 'array' to pass them to NC. 02:03
Xliff Ah. Thanks.
sortiz Both can be used in CArray and CStruct. 02:04
num32 is C float, and num64 is C double. 02:05
Xliff Right. Thanks. 02:06
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 02:19 yqt left
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…»
Xliff m: .say for ^4
camelia rakudo-moar d1eeb3: OUTPUT«0␤1␤2␤3␤»
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␤»
ZoffixLappy Why is this false?
My impression of the power of ⊆ operator is diminishing every time I use it lol
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:22
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␤»
ZoffixLappy This is most weird. Order doesn't matter to ⊆ op, does it?
geekosaur file_hash, files_hash 02:26
ZoffixLappy geekosaur++ thank you. 02:27
02:28 matiaslina joined 02:30 kent\n joined, kent\n left, kent\n joined 02:32 ZoffixLappy left 02:40 kid51 left 02:41 cdg left 02:43 noganex_ joined 02:46 noganex left 02:52 polyfloyd left 02:54 polyfloyd joined 02:55 Actualeyes left 03:06 BenGoldberg left 03:12 cdg joined 03:16 cdg left 03:19 matiaslina left 03:22 MasterDuke left
MadcapJake does NativeCall work with .a (static) libraries? 03:30
jack_rabbit I'd be super surprised. 03:31
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␤»
sortiz MadcapJake, No, the loader only work with dynamic ones. 03:37
03:43 gabiruh left 03:45 gabiruh joined 03:56 zdm joined 03:58 nige1 joined
Xliff m: use NativeCall; 04:03
camelia ( no output )
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…»
Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my $d = nativecast(CArray, $c); say "D: @d"
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…»
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…»
Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c; my CArray[uint8] $d = nativecast(CArray[uint8], $c); say "D: @d"
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…»
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…»
Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c 04:13
camelia rakudo-moar d1eeb3: OUTPUT«75038␤»
Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
camelia rakudo-moar d1eeb3: OUTPUT«503003␤»
Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
camelia rakudo-moar d1eeb3: OUTPUT«651175␤»
Xliff m: use NativeCall; my uint64 $c; $c = (^1000000).pick; say $c
camelia rakudo-moar d1eeb3: OUTPUT«247740␤»
sortiz m: use NativeCall; my uint64 $c; $c = (^2).pick; say $c.WHAT;
camelia rakudo-moar d1eeb3: OUTPUT«(Int)␤»
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
camelia rakudo-moar d1eeb3: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/Hx_vvsCC_k line 1␤␤»
Xliff m: use NativeCall; my uint64 $c; $c = (rand() * 1000000); say $c 04:15
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␤»
Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
camelia rakudo-moar d1eeb3: OUTPUT«189742␤»
Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
camelia rakudo-moar d1eeb3: OUTPUT«103155␤»
Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
camelia rakudo-moar d1eeb3: OUTPUT«248620␤»
Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
camelia rakudo-moar d1eeb3: OUTPUT«434310␤»
Xliff m: use NativeCall; my uint64 $c; $c = (rand * 1000000).Int; say $c
camelia rakudo-moar d1eeb3: OUTPUT«273894␤»
Xliff Weird. rand seems slower than (^x).pick
teatime MadcapJake: if you can, avoid thinking about it, use the available abstraction (in this case, IO::Path) 04:16
MadcapJake: but re: your actual question, there are only really 2 in common use; Windows with \ and *nix+Apple with /
MadcapJake yeah I think dir(test => ...) should cover me really
04:16 Cabanossi left
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:16
MadcapJake right I just thought maybe there was an easy $*DISTRO.dir-sep (like there is path-sep) 04:17
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␤␤»
ugexe m: say $*SPEC.dir-sep
camelia rakudo-moar d1eeb3: OUTPUT«/␤»
MadcapJake yes! I knew there had to be one somewhere :P
sortiz That :)
MadcapJake sortiz, ugexe, teatime: thanks! 04:20
Xliff Hrm.
04:20 Cabanossi joined, kjk_ joined
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?
In P5 I would use unpack, but I'd like to avoid "use experimental". 04:21
MadcapJake teatime: IO::Spec does
no docs unfortunately 04:22
teatime word. 04:23
skids m: 0xfedcba9876543210.polymod(256 xx *).fmt("%x").say
camelia rakudo-moar d1eeb3: OUTPUT«10 32 54 76 98 ba dc fe␤»
Xliff skids: Thanks. 04:24
Xliff looks up polymod.
skids Probably is not fast.
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 doc.perl6.org/ doesn't seem to have any writeup on polymod.
m: 0xfedcba9876543210.polymod(256 xx *).reverse.fmt("%x").say 04:28
camelia rakudo-moar d1eeb3: OUTPUT«fe dc ba 98 76 54 32 10␤»
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
Xliff I was hoping to cheat. 04:30
my uint64 $c; $c = (^1000000).pick; say $c; my @d = nativecast(CArray, $c);
But that gives me an error with the nativecast call. 04:31
my uint64 $c; $c = (^1000000).pick; say $c; my @d := nativecast(CArray, $c);
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…»
skids So you are trying to generate a CArray of 8 random uint8's? 04:34
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>␤»
skids sortiz++ 04:41
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:42
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>␤»
sortiz skids, Some kind of poly-parameterized Blob? 04:45
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 04:52 molaf left
sortiz
.oO( Blob/Bufs can't share storage, but unmanaged CArrays can. )
04:54
04:55 cdg left
skids It would have to be some sort of built-in indirection/refcount to play nice with GC. 04:56
sortiz Yep
05:01 kjk_ left
Xliff skids: No. I am trying to convert the uint to a character array. 05:05
skids So the question becomes what endianness gets used and why. 05:06
Xliff Hmmm.... Maybe try sortiz version.
05:07 Sgeo left
Xliff Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say 05:07
m: Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
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␤␤»
Xliff m: use NativeCall; Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
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
camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<90 e4 e2 03 00 00 00 00>␤»
Xliff m: use NativeCall; Buf[uint8].new(nativecast(CArray[uint8], array[uint64].new((^10000000).pick))[0..7]).say
camelia rakudo-moar d1eeb3: OUTPUT«Buf[uint8]:0x<90 74 eb 03 00 00 00 00>␤»
Xliff Nice!
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:13 ryand left
sortiz Xliff, btw the slice is needed 'cus the returned CArray is 'unmanaged', so .elems doesn't work. 05:17
nine Good morning from a train to Vienna! 05:19
sortiz o/ nine, good trip! 05:20
dalek Iish: a93a9d7 | (Salvador Ortiz)++ | / (2 files):
NativeLibs::Searcher: API cleaned up.
05:21
Xliff sortiz: Oh! Thanks! I was wondering about that! 05:23
OK. So here's the "final product"
gist.github.com/Xliff/53f4c7e86c2e...89cbf5d87a
05:26 ryand joined 05:27 cyberviking joined 05:31 skids left, zdm left 05:33 zdm joined
sortiz Xliff, the gist seem to miss a ')'. 05:35
05:38 sue_ joined
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:39
05:40 cyberviking left 05:45 djbkd left 05:46 djbkd joined 05:52 CIAvash joined 05:55 mohae left
MadcapJake made some decent progress on CompUnit::Repository::GX tonight! Not ready for public consumption yet, but getting there. 06:01
g'night all!
nine \o/
06:11 sjoshi joined 06:12 djbkd left 06:14 sue_ left 06:15 AlexDaniel left 06:17 ufobat joined
ufobat moring perl6 :D 06:18
teatime morning. 06:19
06:20 djbkd joined 06:23 webmind left 06:24 webmind joined, wamba joined 06:27 _nadim joined 06:29 Sgeo joined 06:31 firstdayonthejob joined
Xliff sortiz: OOo! That should work with "self" then, right? 06:38
aleogen `should' 06:39
sortiz Xliff, Yep, I suppose 06:43
06:43 nakiro joined
Xliff # sortiz++ 06:44
method as_blob2 {
return Blob[uint8].new(
nativecast(CArray[uint8], self))[
^nativesizeof(ogg_stream_state_header)
]
);
}
Ugh!
06:44 sue_ joined 06:45 nige1 left
sortiz You can remove 'return' :-) 06:47
06:48 geekosaur left, firstdayonthejob left, geekosaur joined 06:50 domidumont joined
sortiz I see an extra ')' 06:50
06:54 domidumont left 06:55 domidumont joined 06:59 fireartist joined, _mg_ joined 07:03 cibs joined 07:06 sortiz left 07:07 rindolf joined 07:22 djbkd left, nige1 joined 07:24 SalamiTactics joined 07:27 djbkd joined 07:31 djbkd left, djbkd joined 07:33 zakharyas joined 07:34 jack_rabbit left, jack_rabbit joined 07:35 wamba1 joined, wamba left 07:37 ely-se joined 07:51 TEttinger left 07:52 TEttinger joined, fireartist left 08:03 zakharyas left 08:12 djbkd left, fireartist joined, RabidGravy joined
RabidGravy boom 08:14
moritz bang!
08:14 darutoko joined
DrForr Wait, boom *today*? 08:18
psch /o\ 08:23
RabidGravy I'd say so
TEttinger yep, homestuck did end today 08:24
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, wamba1 left
psch well, i suppose it depends on what exactly will go boom vOv 08:36
08:36 wamba joined 08:44 dakkar joined
psch ponders commit directly to ecosystem 08:44
+ing
OTOH, it does feel kinda bad, adding something without a single test
08:45 sue_ left
psch then again, *someone* said "ship it!" yesterday vOv 08:45
RabidGravy :-*
a couple of things I've made I've really struggled to make tests 08:46
08:48 donaldh joined 08:52 donaldh_ joined 08:53 donaldh left, donaldh_ is now known as donaldh
RabidGravy so it appears that whatever was wrong with PAUSE last night got fixed 08:54
psch humm, how do i test that an object does one of a few different roles 08:59
probably by not writing non-deterministic tests vOv 09:00
...and hence testing for one specific role
RabidGravy ok $foo ~~ RoleOne|RoleTwo 09:01
psch it's weird that &does-ok doesn't handle a Junction as second argument :/
yeah, takes Mu for all but the msg
well, i'm ditching the test for now and instead vow to write deterministic tests in the future :P 09:04
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 osystem: 6f7516a | peschwa++ | META.list:
Update META.list

Add Music::Helpers: github.com/peschwa/p6-Music-Helpers/
RabidGravy psch++
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:12
psch can't parse the last part of that sentence 09:13
s/module// maybe?
RabidGravy cpansearch.perl.org/src/MATTBM/DNS-....95/README 09:14
psch still not sure what never worked again with that. the module or the persuading..?
RabidGravy the module
psch well, my module does mostly work 09:15
and whenever it doesn't it's because it got asked to do something impossible :P
like finding a minor third from C4 in C major vOv
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 :)
psch (and it does count intervals only upwards, so $c4.is-interval($f3, P5) returns False)
i distinctly remember that being a thing in music class, and didn't bother to research :P 09:18
there's really a lot of weird in music theory 09:24
09:25 nige1 left
aleogen bachs chorales is all one needs 09:25
DrForr mutters something about the circle of li...fifths.
RabidGravy the thing I struggled with was compound time
aleogen compound time and polyrhythms are the shiznite 09:26
I need to find people who don't hate me
RabidGravy I don't hate you, I don't know you :)
psch huh, compound time actually makes sense to me 09:28
i mean, i didn't know what exactly the difference between 3/4 and 6/8 was supposed to be
aleogen you take a cell, then you divide the FUCK out of it. Same thing with time.
It's pretty helpful
psch but it makes sense as X x X x X x vs X x x X x x
aleogen pretty clear if you map it out
:-)
1 and 2 and 3 and vs 1 and a 2 and a 09:29
when you sing jitly, everything is crystal clear, just take your time 09:30
aleogen puts down the orange
09:31 rindolf left
DrForr Then there's www.youtube.com/watch?v=BXFiq19-KSE :) (time signature e/π) 09:32
psch 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
not quite as theoretical as e/pi i suppose :P
www.youtube.com/watch?v=hF4BkFh1FYs
DrForr IIRC he also experimented with sqrt(2)/2... 09:34
psch that's just mostly hilarious to me
the e/pi one 09:35
not that i can actually make sense of it, but it sounds funny :P
DrForr I guess you could say it was the first black MIDI :) 09:36
DrForr follows up wth www.youtube.com/watch?v=mREi_Bb85Sk :)
09:55 ilogger2 joined, ChanServ sets mode: +v ilogger2 10:05 rudi joined 10:10 sjoshi joined
Xliff *Whew* 10:29
Now I just need to add tests for libvorbis and libvorbisenc.
Oh... and write tests for libogg.
Geez. I will spend more time writing the .t files than I did with the actual modules!
10:32 stmuk joined 10:33 wamba joined
RabidGravy that sounds about right :) I've got modules where the code in the tests is actually an order of magnitude larger 10:33
10:34 domidumont joined, sjoshi left, donaldh joined 10:37 M-matthew joined 10:38 erdic joined, rudi left, ChoHag joined 10:39 b2gills joined
Xliff RabidGravy, not surprising. 10:46
Ideally I'd want to test every routine in each lib, but that will be time consuming. 10:47
And there really is no organic way to do it.
Heck, even though much of this: bluishcoder.co.nz/2009/06/24/readi...ibogg.html 10:48
But I won't know if things are really working right until I start implementing the tests for libvorbis.
10:50 sjoshi joined
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
(though people mean different things when they say "integration tests")
awwaiid indeed, to both points :) 10:53
I think it's all a *degree* of integration test no matter what :)
(kinda like I think all refactoring is a degree of rewrite) 10:54
Xliff awwaiid++ 10:55
I didn't think to look into the lib sources to see if they had tests/examples.
It's another direction to go.
awwaiid ya. Sometimes they can provide good examples too
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™
Yeah. I'm more hoping there are samples for libvorbis. 10:57
Will find out soon enough.
10:58 donaldh left
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 svn.xiph.org/trunk/vorbis/examples..._example.c
Whee!
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
Xliff Say I have variables: $.header00 to $.header35
awwaiid, these are attributes in a class.
11:05 _mg__ joined, _mg__ is now known as _mg_
Xliff And I want to access one of the $.header attributes, but I won't know which one I want until runtime. 11:05
And I really don't want to use EVAL
Although I expect that's the easiest answer. 11:06
jnthn self."$name"()
Xliff Ooh!
jnthn Just call the accessor method by name :)
RabidGravy yeah, I've got plenty-o tests like that 11:07
Xliff Uhh... are $. and $! attributes given default accessor methods?
awwaiid Xliff: yeah ... but in normal programs I'd suggest you are using your attributes when you should be using a hash
Xliff self."$header22"() would work?
awwaiid, It's NativeCall stuff, so I'm limited. 11:08
awwaiid ahh
Xliff particularly for repr('CStruct')
awwaiid I suspected that, so I hedged with "normal programs" :)
jnthn Xliff: Only $.foo has accessor methods
Xliff jnthn: OK, thanks.
Good to know! :D 11:09
jnthn Well, the better answer
has $.foo;
Is equivalent to
has $!foo;
method foo() { $!foo }
Xliff Oooooooo!
(゜◇゜) 11:10
dalek osystem: a16b02c | azawawi++ | META.list:
Change File::HomeDir URL
11:11 _mg_ left, pRiVi joined
Xliff Oh dear god.... this site just pwned me. 11:16
japaneseemoticons.me/
=。:.゚(●ö◡ö●):.。+゚
━╤デ╦︻(▀̿̿Ĺ̯̿̿▀̿ ̿) 11:18
Xliff_Zzzzzz 'night #perl6 11:19
11:25 kid51 joined
RabidGravy concludes that the "add-document-attachment" for Sofa is going to have a rather clunky interface 11:27
11:32 kid51 left, rindolf joined 11:33 nienacko_ joined 11:34 jargan joined 11:35 nightfro` joined, ggoebel113 joined 11:36 krakan left, domm_ left, nightfro` is now known as nightfrog, kmwallio joined, domm_ joined, krakan joined, vendethiel joined 11:37 spanner___ joined, lucs left, jast left, ocbtec joined, inokenty joined, a3r0 joined, ranguard joined 11:38 Gothmog_ joined, lucs joined 11:41 remmie joined 11:42 cosarara joined 11:43 psch joined, captain-adequate joined 11:45 krunen joined, jargan is now known as jast 11:49 Khisanth joined 12:05 cpage_ joined
RabidGravy harsh, but funny: classicprogrammerpaintings.tumblr.c...brandt-van 12:08
12:13 _mg_ joined 12:15 jdukart joined 12:17 jdukart left 12:20 sjoshi left 12:23 lizmat joined, eyck joined 12:25 smls joined
masak RabidGravy: I don't get it. 12:26
El_Che masak: I do, but i would break my heart explaining it ;) 12:27
masak then don't bother. 12:28
"Don't let the bastards grind you down." -- TimToady :) 12:29
12:29 cpage_ left, mr-foobar joined
DrForr Illegitimi non carborundum. 12:30
masak aye, that one. 12:31
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
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
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? :)
smls :crying face emoticon:
12:34 sufrostico joined
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?)
jnthn smls: Well, first loop up the name of signal 11... :)
*look 12:36
Woodi latest R* is 2016.01 but Debian have 2016.03... anyone know what was packaged ?
smls segmentation fault?
masak SIGSEGV
(so, yes)
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?
masak MadcapJake: do you mean `has` as in `has $.x;` ? 12:38
moritz MadcapJake: probably in language/nativecall docs
12:38 domidumont left
MadcapJake I mean `HAS $.x` 12:38
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)"
Do I need to manually compile Rakudo for this?
s/Rakudo/Moar/ 12:41
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
Like `bt` should work
smls This is for `bt full`: gist.githubusercontent.com/smls/97...race_crash 12:44
Also, the culprit is a for (...).race(batch=>1) { ... } 12:45
if I remove the .race, it works fine.
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.
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␤␤»
jnthn smls: Urgh, that looks like something deep/internal/nasty :( 12:47
smls: Could you try it with perl6-valgrind-m to see if it yields more clues?
smls ok
jnthn .race/.hyper are on my "stuff to give a good fixing up soon" list
But that kind of crash looks lower level still 12:48
MadcapJake smls: are you using slurpy/named arguments somewhere above the .race?
smls above? 12:49
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 ;)
MadcapJake heh
jnthn It's some kind of memory corruption. I *hope* that perl6-valgrind-m can tell me the nature of it. 12:51
It's pretty unlikely by this point that it's a fault in smls' program.
12:55 ZoffixW joined
ZoffixW Proposal for a multi subtest in Test.pm6: rt.perl.org/Ticket/Display.html?id=127890 12:55
Woodi, it's probably just plain Rakudo, and not R*
smls jnthn: perl6-valgrind-m finds no errors (and in fact it looks like the program completed without crashing when run this way). 13:00
jnthn :( 13:01
It probably slows it down enough to hide the errors :/
13:02 cpage_ joined 13:03 mr-foobar left
smls Second run, same result. No crash with perl6-valgrind-m. 13:03
Still crashes reliably with perl6-m though.
13:03 mr-foobar joined
smls I guess I'll just wait for your .race overhaul, maybe it sorts itself out... :) 13:04
13:05 Actualeyes joined
[Coke] reminder, release this weekend. (Sunday) 13:06
ZoffixW R*?
[Coke] compiler 13:07
ZoffixW Hm
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 :)
RabidGravy goats 13:11
ZoffixW rabid gravy goats? Sounds delicious... 13:12
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.
[Coke] official is a strong word, but yes, that one.
what's the issue? 13:16
perlpilot wonders where the unofficial pandas are
ZoffixW What's the meaning of colon in regexes?
m: say so '2016-04-13T13:13:48Z' ~~ /^ \d**4 '-' \d\d '-' \d\d 'T' \d\d ':' \d\d : \d\d 'Z' $/
camelia rakudo-moar ae2ae9: OUTPUT«False␤»
ZoffixW But if I quote the second ':' it matches
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 :)
try again for more info :)
Woodi will try
ZoffixW perlpilot, what does it do? Or is 'prevent backtracking' it?
[Coke] ZoffixW: docs.perl6.org/language/regexes#Pre...ing%3A_%3A 13:18
perlpilot yes, you can't backtrack past it.
13:18 skids joined
ZoffixW Thanks. 13:19
[Coke] it's hard getting past all the ::'s on doc.perl6.org, but it's there under ": (regex)"
perlpilot It seems the other cut operators aren't mentioned, though I thought :, ::, and ::: were all implemented. 13:22
13:23 sufrostico left 13:24 sufrostico joined
moritz are they? 13:27
m: rx/a::b/
camelia rakudo-moar ae2ae9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZgKe23gtCP␤:: not yet implemented␤at /tmp/ZgKe23gtCP:1␤------> 3rx/a::7⏏5b/␤»
moritz nope
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
geekosaur hash -r
Woodi ^^ 13:29
perlpilot must've been my imagination then.
moritz perlpilot: iirc it was implemented in The Auld NQP (before NQP-rx)
but probably also with a slightly different semantic than what is specced now 13:30
that was before STD.pm6
13:31 cdg joined, Sgeo joined 13:51 ilogger2 joined, ChanServ sets mode: +v ilogger2, shadowpaste joined 13:54 spebern joined 14:09 nakiro joined, mtj_ joined 14:10 sunnavy_ joined, nakiro left
dalek pan style="color: #395be5">perl6-examples: 0bf61e3 | Ovid++ | categories/99-problems/P36-ovid.pl:
Switch from modulus % to more concise %% check.
14:10
Woodi vim just got DirectX support... and client-server abilities :> 14:13
RabidGravy erk 14:14
14:15 mohae joined 14:16 nakiro joined 14:17 tharkun joined 14:18 zakharyas joined
timotimo april first? 14:18
yoleaux 01:21Z <Xliff> timotimo: The wordy struct idea for the $.header attribute worked! Thanks for the help!
timotimo oh, neat 14:19
.seen froggs
yoleaux I saw FROGGS 27 Mar 2016 22:29Z in #perl6: <FROGGS> jnthn++
timotimo :S
14:20 teatime joined 14:23 zakharyas left
RabidGravy kidnapped by aliens 14:29
14:31 domidumont joined, jolts joined, jolts left 14:33 jolts joined
timotimo he's israeli, not vegetarian; he's israeli, kidnapped by aliens~ 14:37
(Infected Mushroom - She Zoremet) 14:38
14:39 Gothmog_ joined 14:40 jferrero joined, spebern left 14:41 sufrostico joined 14:53 sufrostico left 14:57 ptolemarch joined
hoelzro o/ #perl6 15:08
yoleaux 12 Apr 2016 22:32Z <donaldh> hoelzro: irclog.perlgeek.de/perl6/2016-04-12#i_12326940
hoelzro donaldh: well, your patch has this line: my $self = self.bless(:compiler, :$multi-line-enabled); 15:11
which just sets $.compiler to True
what we want is something like :compiler(compiler), but that blows up in the same spectacular fashion that the current code does 15:12
I don't know what is causing the failure; it's really odd
I ended up adding a patch to just disable REPL6 on the JVM for now
.tell donaldh irclog.perlgeek.de/perl6/2016-04-13#i_12330426
yoleaux hoelzro: I'll pass your message to donaldh.
15:13 pmurias joined
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:18 nakiro left
jnthn pmurias: Some tests in t/moar/02-qast-references.t 15:22
15:22 sufrostico joined 15:33 ilmari joined 15:34 dogbert17 joined, Sqirrel joined 15:35 zakharyas joined, cdg_ joined, TreyHarris joined 15:37 cpage__ joined 15:38 mr-fooba_ joined, mephinet- joined 15:39 jferrero_ joined, sufrosti1o joined 15:40 spanner__ joined, cpage__ is now known as cpage_ 15:41 ggoebel113 joined, nd3i joined, CIAvash joined
nd3i New to p6; just came across this: class ... method new($token) {self.bless(*, token => $token);} 15:42
15:42 Actualeyes joined
nd3i what does the anything star mean in this context? 15:43
15:43 rindolf joined
timotimo it used to be necessary to supply that as the first argument, but that has been removed some time last year 15:43
can you tell us where you came across that? because that would want to be changed
15:44 sufrostico left, jferrero left
nd3i Thanks. github.com/GildedHonour/TelegramBo...am.pm6#L20 15:45
15:46 a3r0 joined, geekosaur joined 15:47 geekosaur left 15:48 geekosaur joined 15:51 ugexe joined 15:52 tim__ joined 15:54 cyberviking joined, skarn joined 15:55 nige1 joined, _nadim joined 15:57 nd3i left
_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:58
skids1 If you are going to constrain on str arrays, you'll need to provide str arrays when you call the sub. 15:59
Though IIRC things can get tacky right now even so. 16:00
16:01 CIAvash left 16:02 domidumont left
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]␤»
skids1 m: sub a (Str @a) { @a.say }; my Str $s = "a"; a(Array.new($s))
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
_nadim ah, let me try to declare the starting variable accordingly. 16:04
16:05 domidumont joined, xugan joined
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
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 domidumont left
ZoffixW Is this a bug? Why is it an Int? 16:06
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
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:08 domidumont left 16:09 raoulvdberge joined
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
moritz, why?
jnthn, but doesn't it work? It works if it's a Str in $s 16:11
m: sub a (@a where { Str ~~ all $_ } ) { @a.say }; my Str $s = 42; my @a = $s; a @a;
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␤␤»
ZoffixW I'm not understanding what it's doing right here.
jnthn You're never getting to the call 16:12
my Str 4s = 42 # a plain assignment failure 16:13
ZoffixW OMG. Brainfart >_<
jnthn Mondays...
no, wait...
ZoffixW :)
moritz non-Mondays :-) 16:14
geekosaur hump days? 16:15
perlpilot Days that end in "y" 16:17
timotimo days that are fit to make you say "whhhyyyyyyy" 16:19
16:20 xugan left 16:21 _nadim left
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␤␤»
ZoffixW How come this fails, even though ... $x where * ~~ Str|Int works fine for single values?
teatime this is a small (7-line) changeset.. I am curious to know if anything I'm doing here is fundamentally wrong: github.com/rakudo/rakudo/pull/742/...9e170c14cf
16:24 CIAvash joined 16:25 Actualeyes left
ZoffixW Ah, I need to slip in <meow bar 42> 16:27
16:28 zakharyas left
ZoffixW Nope, not it. I give up 16:28
m: sub a ( @a where {all(.values) ~~ Int|Str} ) { @a.say }; my @a = <meow bar>, 42; a @a;
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␤␤»
perlpilot m: my @a = <meow bar>, 42; say @a.perl; 16:30
camelia rakudo-moar ae2ae9: OUTPUT«[("meow", "bar"), 42]␤»
16:30 zakharyas joined
geekosaur that's not it though, because I get it if I unroll that manually 16:31
16:33 nige1 left 16:34 tharkun left, tharkun joined
ZoffixW I'm guessing it has to do with Junction ~~ Junction case 16:36
geekosaur hm, possible
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 );
camelia rakudo-moar ae2ae9: OUTPUT«TrueTrueFalse␤»
16:41 Actualeyes joined
pmurias jnthn: thanks, existing tests are always great 16:41
16:45 cyberviking left 16:49 zakharyas left, pyrimidine joined
dalek c/missing-doc: 1bb1550 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
Added documentation for sech and asech to Cool.pod
16:50
16:52 hankache joined
dogbert17 hello #perl6 16:52
is anyone interested in taking a look at github.com/perl6/doc/commit/1bb155018a 16:53
ZoffixW dogbert17, the "or in method form" should be "or in sub form" 16:54
The invocant is what a method is called on
16:55 Actualeyes left
ZoffixW Looks good to me otherwise :) Thanks. 16:55
16:56 sftf joined
dogbert17 ZoffixW: thanks, now I just have to figure out how to make your suggested change without wrecking the commit history 16:58
16:58 Actualeyes joined
dogbert17 is it amend by any chance 16:58
ZoffixW *shrug*. Just add a new commit? 16:59
dogbert17 ok, will do 17:00
hoelzro dogbert17: make the change, git add -A, git commit --amend
17:00 pmurias left
timotimo oh, what's -A do? 17:00
dogbert17 hoelzro: will give it a shot
hoelzro updates any changed files that are already in the index 17:01
so it's like git add ., but it won't add any new files to the repo
timotimo neat
17:02 Actualeyes left
wamba p6: my @a=^3;while @a.pick { $_.perl.say } 17:05
camelia ( no output )
wamba my @a=^3;while @a.pick { $_.perl.say } 17:06
p6: my @a=^3;while @a.pick { $_.perl.say }
camelia ( no output )
wamba p6: my @a=^3;while @a.pick { $^a.perl.say }
camelia rakudo-moar ae2ae9: OUTPUT«2␤»
wamba p6: my @a=^3;while @a.pick { $^a.perl.say }
camelia ( no output )
wamba p6: my @a=^3;while @a.pick { $^a.perl.say }
camelia rakudo-moar ae2ae9: OUTPUT«1␤2␤»
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
travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for sech and asech to Cool.pod' 17:07
travis-ci.org/perl6/doc/builds/122840227 github.com/perl6/doc/commit/1bb155018a8b
17:07 travis-ci left
geekosaur while doesn't set a variable 17:07
did you mean for?
wamba yes while not set $_ 17:08
RabidGravy correct
wamba but i can use $^a
its some documentation for it? sinopsis?
ZoffixW p6: my @a=^3;while @a.pick -> $_ { $_.perl.say }
camelia rakudo-moar ae2ae9: OUTPUT«1␤2␤»
perlpilot ZoffixW++ you beat me to it by secs 17:09
17:10 sufrosti1o left
gregf_ m: my @a=^3; loop { $_ = @a.pick; say $_; last if !$_; } 17:11
camelia rakudo-moar ae2ae9: OUTPUT«2␤1␤0␤»
perlpilot wamba: S04:392 start reading there for while loops specifically
synopsebot6 Link: design.perl6.org/S04.html#392_start...ecifically
perlpilot heh
wamba: S04:392 17:12
synopsebot6 Link: design.perl6.org/S04.html#line_392
perlpilot read there
S04:392 # test
synopsebot6 Link: design.perl6.org/S04.html#392
perlpilot ah, should've remembered that
oh, hrm. that's not right either 17:13
dogbert17: That's the first time I've ever seen "secant hyperbolicus". Usually I see it as "hyperbolic secant" 17:14
17:15 sufrostico joined
dalek c/missing-doc2: e551656 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
Added documentation for sech and asech to Cool.pod
17:16
dogbert17 messed it up a bit, ZoffixW's suggestion is now implemented
perlpilot: found it on google but I believe "hyperbolic secant" is more common 17:17
wamba perlpilot: Ty i found answer in S04-statements/if.t lines 115–197 17:18
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
if .haste { .waste }
while .haste { .waste }
thank you
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.
ZoffixW dogbert17, do it yourself :) 17:21
dogbert17 uh oh, ok :-)
ZoffixW 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
well, and the "# (Unary plus)" comment feels slightly wrong-ish 17:23
teatime I have concerns about the dimensionality stuff too
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
but I am just not sure.
17:24 sufrostico left
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
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
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.
dogbert17 perlpilot: maybe I will if this works :-)
dalek c: e551656 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
Added documentation for sech and asech to Cool.pod
c: edc7dd4 | dogbert17++ | doc/Type/Cool.pod:
Merge pull request #450 from perl6/missing-doc2

Added documentation for sech and asech to Cool.pod
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
17:26 sufrostico joined
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
psch teatime: understandably, maybe: prefix:<+>($) does call .Numeric, yes, but .Numeric is not equivalent to prefix:<+> 17:26
gregf_ m: temp $_ = 4444; loop { $_ = [+] .split(""); .say && last if $_ < 9; } 17:27
camelia rakudo-moar ae2ae9: OUTPUT«7␤»
teatime psch: I just couldn't find anything else that would trigger Numeric besides prefixing with plus
17:27 lizmat joined
psch take a prefix:<+>(Duration $) { Duration.new(rand) } for example 17:27
that doesn't do .Numeric anymore
the contract is that prefix:<+> calls Numeric, but prefix:<+> can be overloaded to do something else
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:28
psch ...in any case, that's really minor anyway
teatime and, fair point.
psch and i still do agree that providing a .Numeric is the right choice
the comment is just slightly misleading :)
perlpilot teatime: btw, you should also consider adding yourself to CREDITS if you're not there already. 17:29
17:29 sftf left
psch m: class C { method Numeric { 5 } }; say C.new + Duration.new(5) 17:29
camelia rakudo-moar ae2ae9: OUTPUT«10␤»
psch that's something i think matters there
wamba m: for <a b c> { my @a=^3;while @a.pick { ($^a,$_).perl.say }}
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")␤»
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
probably infix:<+>(Cool $, Cool $)
or maybe :(Any $, Any $)
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.
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
teatime ah k
perlpilot: really? lol yay 17:32
psch: thx for having a look 17:33
psch :) 17:35
17:35 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for sech and asech to Cool.pod' 17:35
travis-ci.org/perl6/doc/builds/122846366 github.com/perl6/doc/commit/e55165653e08
17:35 travis-ci left 17:38 ZoffixW left
wamba m: my Int $a =123 but role { method Numeric { self.chars} }; say +$a, " ",-$a; 17:40
camelia rakudo-moar ae2ae9: OUTPUT«3 -123␤»
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␤»
psch wamba++
psch doesn't want to think more about that :)
wamba :) 17:43
teatime I think it just demonstrates that unary + is the "explicit numeric context" operator while unary - is the traditional unary - operator
unary prefix + I should say
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
camelia rakudo-moar ae2ae9: OUTPUT«(<anon|64623312>)␤»
teatime his is more anonymous; yours is called $x 17:47
(j/k)
17:48 lizmat left 17:52 kaare_ joined
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
preferrably CLI
17:57 ribasushi joined 18:01 kaare_ left 18:02 tokomer joined
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
masak teatime: en.wikipedia.org/wiki/List_of_comp...ra_systems ? 18:02
wamba teatime: i know that i can do this, but is limeted 18:04
m: my $a = class { method Numeric { 1 }; }; say $a ; put $a.nude;
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
wamba Thus I usually prefer role. 18:05
awwaiid teatime: I got Maxima to work before. I think there's even an android version
teatime: and then there is SAGE, which I think is quite a bit more expansive 18:06
18:08 kaare_ left
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␤␤»
psch m: my $x = class :: is Rat { method Numeric { 1 } }.new; put $x.nude
camelia rakudo-moar ae2ae9: OUTPUT«P6opaque: no such attribute '$!numerator'␤ in block <unit> at /tmp/gAnpFwKcwT line 1␤␤»
psch shrugs
18:08 kaare_ joined
psch the example seems somewhat contrived 18:08
of course, if you have a base class you want to work of augmenting it with an anon mixin is perfectly fine
but it doesn't seem like it should be a categorical decision
18:10 nige1 joined 18:13 cdg_ left 18:21 molaf joined
MadcapJake I think I found a bug :O 18:22
RabidGravy just the one?
MadcapJake my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; my %d = %h<deps>.grep(*<name> ~~ 'foo'); %d.say 18:23
m: my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; my %d = %h<deps>.grep(*<name> ~~ 'foo'); %d.say
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…»
MadcapJake m: my %h = deps => [ { name => 'foo', hash => 'asdasdad' }, { name => 'bar', hash => 'gbafgvsdvsd' } ]; my %d = %h<deps>.grep(*<name> eq 'foo'); %d.say
camelia rakudo-moar ae2ae9: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/836PT4r54t line 1␤␤»
MadcapJake hmm that second one works in my REPL
18:25 CIAvash left
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})␤»
MadcapJake how is that an odd number of elements?
oh it's still a list 18:26
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:27
RabidGravy there are occasional precedence surprises with hashes 18:29
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
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␤␤»
psch m: say (*<name> eq Str)("name" => "foo")
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 tokomer left
geekosaur did you expect that to work? 18:32
MadcapJake why does the error mention Bool? Where is that coming from?
that's the same error I was getting in grep: «Cannot use Bool as Matcher with '.grep'.» 18:33
geekosaur (*<name> ~~ Str)("name" => "foo")
looks to me like the second set of parens are trying to do a function call
on the result of the smartmatch, which is Bool
psch m: say (* ~~ Str).WHAT 18:34
camelia rakudo-moar ae2ae9: OUTPUT«(WhateverCode)␤»
psch m: say (*<name> ~~ Str).WHAT
camelia rakudo-moar ae2ae9: OUTPUT«(Bool)␤»
psch fwiw, i do find "*<key>" looks suspect :P 18:35
MadcapJake m: [{ a => 'foo' }, { a => 'bar' }, { a => 'baz'}].grep(*<a> ~~ 'bar').say
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…»
geekosaur indeed
MadcapJake m: [{ a => 'foo' }, { a => 'bar' }, { a => 'baz'}].grep(*{'a'} ~~ 'bar').say
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…»
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
psch m: say (*.<name> ~~ Str).WHAT 18:37
camelia rakudo-moar ae2ae9: OUTPUT«(Bool)␤»
18:37 [Sno] joined
MadcapJake ahh it's the assoc subscript 18:37
18:38 jevin_ joined, raoulvdberge left, pRiVi_ joined 18:39 ptolemarch left, _jolts joined, _jolts left, spanner_ joined, jolts left, kentnl joined, kentnl left, kentnl joined 18:40 jolts joined, jolts left, _mg_ joined, eyck joined, au joined, ChoHag joined, ruoso joined, jdv79 joined, leedo joined
MadcapJake m: say (*<name> eq 'foo').WHAT 18:41
camelia rakudo-moar ae2ae9: OUTPUT«(WhateverCode)␤»
18:41 stmuk joined, hcit joined, jolts joined, jolts left, siriu5b joined, siriu5b left, siriu5b joined, lucs joined
MadcapJake seems to work okay as long as smart match isn't used 18:41
18:43 cognominal joined 18:44 jolts joined, jolts left, Vitrifur joined, cosarara joined, jolts joined, jolts left 18:45 chansen_ joined, jolts joined 18:46 jolts left 18:47 Bucciarati joined 18:48 atta joined, mindos joined 18:49 M-matthew joined, M-Illandan joined, pnu joined, agentzh joined, agentzh left, agentzh joined 18:50 ggherdov joined 18:52 ptolemarch joined, araujo joined 18:53 mprelude joined
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
oops - meant for ugexe
18:54 jjido joined, inokenty joined
MadcapJake wow that site is beautiful 18:56
really fast too! are you using a client-side framework?
tony-o i'm using mojo
mojo code i wrote in 2014, at that
MadcapJake neat! I've never used it before 18:57
how do you get the download stats?
tony-o those are all made up
so are the test statuses etc
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
the test status stuff was also full suite on rotating VMs on a machine that i no longer have 18:59
win 7, 10, debian, osx
and freebsd
MadcapJake wow! that sounds awesome though
tony-o now it's just a module browser
MadcapJake still cool though, that readme viewer is realy slick 19:00
what are you using for syntax highlighting? 19:01
tony-o github 19:02
MadcapJake tony-o: linguist?
if it's linguist or highlights, you can use my language-perl6fe highlighter ootb 19:03
how expensive are .pm domains? I didn't even realize that TLD existed! 19:07
19:07 hankache left, patrickz joined
MadcapJake heck I didn't even realize there was a Sanit Pierre and Miquelon that is a colony of France still! xD 19:08
19:13 nige1 left, ZoffixW joined
ZoffixW It never occurred to me to ask... but is it possible to write Android apps with Perl 6? 19:14
19:15 peteretep joined
psch ZoffixW: not on r-j. there's no android jvm that supports invokedynamic 19:16
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
...although i did find someone who was working on backporting invokedynamic to dalvik, not sure what came of that though
19:18 raoulvdberge joined
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 :(
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:20
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:22
psch assumed Butterfly Phone™ natively understand moar bytecode 19:24
+s
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
psch then you'd have an equivalent of the current android/ART situation :P 19:25
19:25 sortiz joined
psch 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!
still rules me out though :(
psch looks like they're still on it
and are even planning to get ART to work, which is neat
maybe they get snatched by google eventually and we do get R-J on android :P 19:28
...actually, almost a year no commits vOv
19:30 ZoffixW left
MadcapJake rakudo-js could be wrapped in cordova or something :) 19:30
tony-o MadcapJake: give me a few minutes, i'm in a meetings 19:33
psch .oO( ...then i will have r-js wrapped in cordova for android ) 19:34
19:36 MilkmanDan joined
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
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␤␤»
ufobat well its (Path), why not (IO::Path) ? 19:39
RabidGravy .shortname 19:40
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
19:41 maybekoo2 joined
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:…»
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…»
[Coke] trailing '
RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.shortname
camelia rakudo-moar ae2ae9: OUTPUT«Method 'shortname' not found for invocant of class 'Foo::Bar::Baz'␤ in block <unit> at /tmp/DFzPb8ryqu line 1␤␤»
RabidGravy DOH
19:42 nige1 joined
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␤␤»
RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.^shortname 19:43
camelia rakudo-moar ae2ae9: OUTPUT«Baz␤»
RabidGravy STUPID
ufobat ans .WHAT is identical to .^shortname? 19:44
RabidGravy m: class Foo::Bar::Baz { }; say Foo::Bar::Baz.WHAT 19:45
camelia rakudo-moar ae2ae9: OUTPUT«(Baz)␤»
RabidGravy no
the .gist of a type is "({ self.shortname })"
19:46 pomJ joined
sortiz \o #perl6 19:46
19:47 Gothmog__ joined, Xliff_ joined 19:48 firstdayonthejob joined, hcit left, au left, spanner_ left, spider-mario left, Gothmog_ left, richi235 left, jnthn left, diegok left, khagan_ left, Gothmog__ is now known as Gothmog_
RabidGravy splitters 19:49
19:49 ryand joined
ufobat alright, :-) my confusion is cleared up 19:50
19:50 kaare_ left 19:52 ZoffixWin_ joined
RabidGravy Attachments done in Sofa, now authentication and it's good to go 19:52
19:53 ranguard_ joined, jstimpfl1 joined, pomJ left 19:54 krakan_ joined, richi238 joined, hcit_ joined
RabidGravy well, nearly. 19:55
19:55 yqt joined
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:56
19:58 _mg_ left 19:59 diego_k joined 20:02 au_ joined
MadcapJake How would I ensure that a file is only being written to once at a time? 20:03
20:03 hcit joined, au joined, spanner_ joined, spider-mario joined, orbus_ joined, ranguard joined, krakan joined, bartolin_ joined, autarch1 joined, CurtisOvidPoe joined, tailgate joined, Xliff_Zzzzzz joined, ZoffixWin joined, gensym joined, cpage joined, arnsholt joined, jstimpfle joined, profan joined, richi235 joined, jnthn joined, diegok joined, khagan_ joined 20:04 hcit left, au left, spanner_ left, spider-mario left, orbus_ left, ranguard left, krakan left, bartolin_ left, autarch1 left, CurtisOvidPoe left, Xliff_Zzzzzz left, ZoffixWin left, tailgate left, gensym left, cpage left, arnsholt left, jstimpfle left, profan left, richi235 left, jnthn left, diegok left, khagan_ left
MadcapJake how do I do file locking in Perl 6? 20:05
20:05 mindos left 20:07 PotatoGim joined
hoelzro MadcapJake: does the file already exist? 20:08
MadcapJake yeah
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 tadzik left, mindos joined
mst MadcapJake: also consider write-new-file-and-rename 20:11
20:11 spanner_ joined, spider-mario joined, orbus_ joined, bartolin_ joined, autarch1 joined, CurtisOvidPoe joined, tailgate joined, gensym joined, cpage joined, arnsholt joined, profan joined, jnthn joined, khagan_ joined
MadcapJake sweet! 20:12
teatime file locking is difficult and full of caveats. advisory locking is easier than mandatory.
MadcapJake mst: do you mean creating a temp and overwriting?
teatime mst's solution is excellent whenever you can apply it.
because mv is an atomic operation 20:13
MadcapJake teatime: how do you mean?
20:13 orbus_ left
teatime about which? 20:13
MadcapJake mv being an atomic op, how would that work?
20:15 cdg joined, autarch1 left, CurtisOvidPoe left, gensym left
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
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 spider-mario left, bartolin_ left, tailgate left, arnsholt left, profan left, jnthn left
hoelzro create file + rename is probably the right way to go 20:16
20:16 spanner_ left, cpage left, khagan_ left
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
20:16 CurtisOvidPoe joined, spanner joined
MadcapJake s/tries/succeeds 20:16
20:17 M-tadzik joined, spider-mario joined, spanner is now known as Guest95484, jnthn joined, arnsholt joined
MadcapJake If they just write to the old file, then it will disappear when the other process is mv'ing (overwriting), right? 20:17
20:17 bartolin joined
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
20:17 profan joined, khagan joined
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:18
20:18 ptolemarch left, darutoko left
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!
teatime what kind of file/application is it?
MadcapJake a module manager for Perl 6
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
MadcapJake: (1) I never said "don't lock as well"
MadcapJake: (2) write-and-mv is safe against your process dying mid-writing 20:21
MadcapJake: (3) this is why this is how 'vipw' and friends do it
MadcapJake: (4) your file is not more important than /etc/passwd so maybe consider they might be right
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
teatime assuming you have control over specifying that kind of behavior
what's in the file?
mst MadcapJake: yes, and that's what I'm trying to give you! 20:23
20:23 gensym joined
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:23
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
MadcapJake: what
MadcapJake: lock the original. read the original. write the new version. move it into place. close() your filehandle to the original.
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
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
20:28 tailgate joined, autarch joined
teatime the 'module downloading component' isn't under your control? 20:28
MadcapJake teatime: this: github.com/whyrusleeping/gx 20:29
teatime also, you should probably just accept that you'll, at best, be able to do advisory locking.
and even that has will have lots of gotchas. 20:30
^ how did that sentence come out of my brain. I didn't backspace / rephrase at all.
MadcapJake teatime: what if, instead of modifying their json, I just add to META6 20:31
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
teatime oh, the github link is to your project?
MadcapJake teatime: no that's GX, it's a module management tool that supports any language
you just write a CLI tool that responds to the hooks they call 20:33
it's done over IPFS so it's a distributed network that works over numerous protocols and is resilient to the leftpad situation :)
20:33 zakharyas left 20:34 M-tadzik is now known as tadzik
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
20:37 Xliff__ joined, [particle]1 joined 20:38 sQuEE` joined 20:39 Util_ joined 20:40 arnsholt_ joined, charsbar_____ joined 20:41 esh_ joined, [ptc]_ joined, profan_ joined, diegok joined, agentzh_ joined, agentzh_ left, agentzh_ joined, ilbelkyr_ joined, hahainte1net joined 20:42 huf_ joined, lucs_ joined, shmibs_ joined, jferrero joined 20:43 obarb joined 20:45 emdashcomma_ joined 20:46 dustinm`_ joined, Shozan joined 20:47 profan left, arnsholt left, diego_k left, Xliff_ left, agentzh left, atta left, lucs left, skarn left, jferrero_ left, Sqirrel left, Util left, [ptc]_ is now known as [ptc], captain-adequate joined
ZoffixWin_ Weeeeeee 20:47
20:47 ZoffixWin_ is now known as ZoffixWin 20:48 m0ltar joined 20:49 skarn joined, cfloare joined, ponbiki joined 20:50 ponbiki is now known as Guest48622, PerlJam joined
RabidGravy it's all going off 20:51
20:51 sufrostico left 20:52 ZoffixWin left 20:53 ingy joined, Guest48622 is now known as ponpon 20:56 ZoffixWin joined 20:58 jjido left 20:59 sufrostico joined
dalek c/doc-fixes: 7282667 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
Added documentation for cosech, acosech, cotanh and acotanh
21:01
21:01 nige1 left 21:04 sufrostico left 21:06 pmurias joined
pmurias MadcapJake: I plan to make rakudo-js support react.native 21:07
MadcapJake pmurias: sweeeet!
ZoffixWin pmurias++
dalek c: 7282667 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
Added documentation for cosech, acosech, cotanh and acotanh
21:08
c: 71cab0c | dogbert17++ | doc/Type/Cool.pod:
Merge pull request #451 from perl6/doc-fixes

Added documentation for cosech, acosech, cotanh and acotanh
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.
pmurias MadcapJake: althoug I have to first complete rakudo-js ;) 21:09
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
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"
ZoffixWin In your code, I mean. Say your code only works with rakudo 2016.03 and later.
21:15 obarb is now known as brabo
ZoffixWin I guess it doesn't matter that much.... since 6.d will be released some time this year. /me is pondering rt.perl.org/Ticket/Display.html?id=127890 21:15
21:16 pmurias left
RabidGravy yeah, you're kind of stuck with "use v6.c" 21:16
wamba m:my @x = ( 1, 0, (), 2, "", 3, ); while @x.shift { say $^a } 21:17
m: my @x = ( 1, 0, (), 2, "", 3, ); while @x.shift { say $^a } 21:18
camelia rakudo-moar ae2ae9: OUTPUT«1␤»
wamba m: my @x = ( 1, 0, (), 2, "", 3, ).map:{ $_  but True }; while @x.shift { say $^a }
camelia rakudo-moar ae2ae9: OUTPUT«1␤0␤()␤2␤␤3␤»
21:18 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for cosech, acosech, cotanh and acotanh' 21:18
travis-ci.org/perl6/doc/builds/122898545 github.com/perl6/doc/commit/7282667a80de
21:18 travis-ci left
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
hahah
MadcapJake lol
21:20 yqt left
ZoffixWin Cool. Thanks. 21:20
21:24 felher joined
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: github.com/MoarVM/MoarVM/blob/mast...ll.c#L622, design? bug? Should i try other channel? 21:26
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
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
so, if P6 had -a and -i (and I guess -F), that would be awesome for one-liners 21:29
21:30 _28_ria joined 21:31 sufrostico joined
teatime lol, XKB... is it just me, or does the meaning of this seem beautifully inscrutable: AnyOfOrNone(all) 21:32
like, I can't even begin to guess what that might mean w/o looking it up.
awwaiid teatime: amazing 21:33
ZoffixWin "Note that key+AnyOfOrNone(all) is equivalent to just key, but key is much easier to read." wiki.archlinux.org/index.php/X_Key..._extension 21:34
rofl
awwaiid hahaha 21:35
teatime ZoffixWin: lol! 21:36
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 21:40 diegok left, Sqirrel joined 21:41 Util_ left, tadzik left, cosarara left, ruoso left, Util joined, ruoso joined, diegok joined, Shozan left, lucs_ left, sQuEE` left, bartolin left, hcit_ left, maybekoo2 left 21:42 bartolin joined, TEttinger joined 21:43 SHODAN joined
teatime is there a system in place to warn, but with a category so someone can suppress certain warnings? 21:45
21:46 cosarara joined
RabidGravy I'd recommend Lumberjack, but it's a tad slow at the moment 21:47
21:47 M-tadzik joined
teatime how does rakudo do it in src/core/* files 21:48
21:48 khw left, _nadim joined 21:49 lucs joined, hcit joined
teatime like, Mu.pm has: warn "Use of uninitialized value of type {self.^name} in numeric context"; 21:51
so is there no way to disable that warning?
other than to disable all warnings I suppose.
21:51 Praise joined
teatime which, that's fine actually; I can work with that. 21:51
I do suppose rakudo warnings should be in ASCII, eh? :) 21:52
ZoffixWin You can use quiet block 21:53
Why ASCII?
ZoffixWin points to the last part of the /topic 21:54
Sorry, quietly block
m: quietly say 52 + Any
camelia rakudo-moar 4f3f1c: OUTPUT«52␤»
21:55 maybekoo2 joined
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␤␤[]␤»
ZoffixWin That's a Failure object there 21:59
wamba always false?
ZoffixWin Seems so: github.com/rakudo/rakudo/blob/nom/...ure.pm#L55 22:02
22:02 yqt joined
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:03
22:03 ponpon is now known as ponbiki 22:04 grondilu joined
wamba ZoffixWin: you're right, doc.perl6.org/type/Failure#method_Bool 22:05
ZoffixWin There have been 194 files changed, 7641 insertions(+), 4251 deletions(-) in rakudo since Dec 27, 2015. 22:08
Just pulled into my fork. If anyone curious about seemingly uninteresting info: gist.github.com/zoffixznet/21f44f6...03f2d8dd16 :) 22:09
22:10 bartolin left 22:11 Gothmog_ left, diakopter joined, bartolin joined, xiaomiao joined 22:12 Gothmog_ joined
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
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?
Xliff__ stop and fail.
22:13 Xliff__ is now known as Xliff
ZoffixWin There should be BAILOUT, or maybe I'm conflating P5 here 22:13
Xliff Right now I'm using die() after a flunk(). 22:14
ZoffixWin die 'Aborting'; # should work :D
Xliff LOL
OK.
ZoffixWin :D
Xliff Thanks, Zoffy.
22:15 dg joined, M-tadzik is now known as tadzik 22:16 kid51 joined
ZoffixWin (and BAILOUT is a P5 thing.. never mind me) 22:16
Oh! 22:17
Xliff, looking at the sauce, looks like calling Test::die_on_fail(); at the start of your test should bailout on first failure 22:18
arnsholt_ Bailing out is part of the TAP protocol, so if it's not in Test.pm that's arguably a missing feature 22:22
22:22 arnsholt_ is now known as arnsholt
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:23
teatime Can someone explain what ACCEPTS() does. I don't get it. 22:24
22:24 sufrostico left
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
e.g
m: class Foo { multi method ACCEPTS(Int $i) { say $i }}; 1 ~~ Foo.new 22:27
camelia rakudo-moar 4f3f1c: OUTPUT«1␤»
RabidGravy it should return a Bool as appropriate 22:28
Xliff ZoffixWin, Oh, that's great! Thanks! 22:31
teatime what is the »ö« in the top-... it's camellia. 22:32
ZoffixWin Yes, that's the text version of the logo: raw.githubusercontent.com/perl6/mu...amelia.txt
In June this year, we may get a "butterfly" unicode char too 22:33
22:33 skids joined
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:33
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
ZoffixWin: I've seen fail, never quietly though..
tony-o MadcapJake: I am using Hihglight for syntax highlighting on modules.zef.pm
ZoffixWin `fail` returns a Failure, which is an Exception that doesn't always explode. 22:35
quietly block mutes warnings
m: say 25² × 3
camelia rakudo-moar 4f3f1c: OUTPUT«1875␤»
ZoffixWin teatime, ^ that stuff's in core :) How could we frown
teatime true 22:36
MadcapJake tony-o: github.com/atom/highlights or highlightjs.org/ ?
22:36 spebern joined
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
ZoffixWin True, but my personal opinion is the stuff that can't display it is outdated technology.
teatime I tend to agree.
man, that's refreshing. 22:38
perl6 is refreshing :)
RabidGravy there is no need to be backward compatible
tony-o MadcapJake: high.js - i believe it's the second link 22:39
22:39 Sgeo joined
MadcapJake ah ok, they don't have a perl 6 highlighter :( 22:40
looks quite a bit easier to write than codemirrors modes, I'll take a crack at it later tonight.
tony-o MadcapJake++ 22:44
ZoffixWin How to kill your VM: TEST_JOBS=200 make spectest 22:45
22:47 rindolf left 22:49 ZoffixMobile joined
ZoffixMobile How to kill your Windows host: run TEST_JOBS=20 make spectest on your VM 22:49
lol... no processor left over for anything elsr 22:50
ZoffixWin Is this a normal failure mode for the testsuite? gist.github.com/zoffixznet/11c08ab...b653f083ca 22:52
22:52 spebern left, au_ left
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:55
22:56 spebern joined
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
ZoffixWin heh 22:59
skids running it outside of prove can help.
23:00 au joined
ZoffixWin Thanks. It did. 23:01
Seems to be nothing to do with the change I made.
23:01 firstdayonthejob left
ZoffixWin PR for #127890 github.com/rakudo/rakudo/pull/743 23:03
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127890
23:04 pierrot joined 23:17 arlenik joined
arlenik noob here. perl6.org/language/modules is very confusing. is there a better source? 23:18
23:19 _nadim left 23:20 _nadim joined
ZoffixWin arlenik, don't think so. What are you confused about specifically? That doc could be improved 23:20
RabidGravy I think that document tries to do too much, it could be three separate documents 23:21
anyhow bed time 23:22
toodles
timotimo at least two, yeah
gnite
Hotkeys there needs to be a page on enums in the docs I think
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.
Hotkeys unless they're supposed to be secret
ZoffixWin 'night
arlenik, what's the error?
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
ZoffixWin arlenik, you need to have -Ilib to your perl6 invocation or 'use lib "lib"' or similar somewhere
Hotkeys oh yeah
do 'use lib "lib"' it's a good line
v useful
23:24 spider-mario left
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: ...
ZoffixWin arlenik, that suggests you lib/ is not included in the search path.
s/you/your/;
pass -Ilib to perl6 23:25
arlenik MadcapJack: no. I run 'perl6 Point.pm6' in the command line.
ZoffixWin arlenik, try 'perl6 -Ilib Point.pm6'
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
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
use lib is supposed to be kinda not-preferred though right? 23:27
timotimo that's right
normally you'd want to build a META6.json with a "provides" section
then you'll get it loadable without "use lib"
ZoffixWin Well, yeah. It's like you're hardcoding a system-specific path in your code. 23:28
rather not do that
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
MadcapJake another option is PERL6LIB env var 23:30
teatime ZoffixWin: did you mean to say you prefer 'use lib' over META6.json provides ?
or am I mis-reading
timotimo well, if you're going to distribute your thing anyway, you won't get around a META6.json 23:31
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
MadcapJake arlenik: does any of that help? :)
teatime ah, k.
MadcapJake I'm not sure if it's correct but I like to think of `-I` as "Include this dir"
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
going to work on the search stuff tonight, or i might go ride my bike, probably one of those
MadcapJake bike schmike! ;) 23:38
tony-o racing bikes is a time commitment
23:38 spebern left, Amnez777 joined
ZoffixWin arlenik, would you please report that as a bug? (github.com/rakudo/rakudo/#reporting-bugs). One way to do so is as simple as emailing the details to [email@hidden.address] 23:38
arlenik ZoffixWin: sure, I will. 23:39
ZoffixWin Sweet. Thanks.
23:39 Xliff_ joined
timotimo wow, segfault 23:39
we surely don't want that :)
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
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
timotimo also the output of perl6 --version is always appreciated
23:40 ZoffixMobile left
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:40
i have a cron that updates from 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:41 Xliff left
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 www.npmjs.com/~madcapjake
tony-o i can make that happen
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
for now, though, food.
MadcapJake tony-o: they're supposed to, it's apart of the long-form of distribution names 23:45
23:47 Xliff__ joined
teatime heh, P6 POD should totally allow unicode box drawing characters for tables, if it doesn't already 23:48
timotimo perl6 pod is in want of a rewrite 23:49
teatime tbh I've never been a fan of POD, but I'm pretty choosy about my plain-text minimalist markup 23:50
23:50 Xliff_ left
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
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
teatime are any of the officialish docs written in anything other than POD ? 23:54
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
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.
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:56 patrickz left
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.
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
teatime is POD-in-code really that terrible, or is it the way people tend to do it that's terrible?
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.