»ö« 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:00 Util joined, perlpilot joined, jojotus_ joined, d4l3k_ joined, dalek left, corbyhaas left, Cabanossi left, Xor_ left, clkao left, ggherdov left, siriu5b left, jasanj left, mattp__ left, frew left, klapperl left, olinkl left, skarn left, pRiVi left, lsm left, Axord left, vike left, dalek joined, BuildTheRobots left, PerlJam left, maddingue left, xnrand left, ilmari left, hacst left, avalenn left, Util_ left, bartolin left, tony-o_ left, mindos left, pnu left, psch left, JimmyZ left, tipdbmp left, deniska left, jojotus left, Cabanoss- is now known as Cabanossi, ChanServ sets mode: +v dalek, integral left, inokenty left, parisba left, corbyhaas_ is now known as corbyhaas, tipdbmp joined, tony-o joined, ZoffixWin left 00:01 psch joined, JimmyZ joined, emdashcomma joined, mattp__ joined, frew joined, deniska joined, ZoffixWin joined, ZoffixWin left, ZoffixWin joined, deniska left, deniska joined, dalek left, lsm joined, xnrand joined, d4l3k_ is now known as dalek, ggherdov_ joined, Axord joined, hacst joined, ChanServ sets mode: +v dalek 00:02 skarn joined, integral joined, integral left, integral joined, inokenty joined, llfourn left 00:03 vike joined, ggherdov_ is now known as ggherdov 00:04 SwellJoe left, pierre-vigier left 00:05 mindos joined 00:06 pnu joined 00:07 BuildTheRobots_ is now known as BuildTheRobots 00:09 olinkl joined 00:10 clkao joined, nzkindest joined 00:11 BenGoldberg left 00:12 BenGoldberg joined
nzkindest Happy new year everyone 00:13
TimToady likewise! 00:14
00:14 parisba joined 00:15 parisba is now known as Guest77985
_nadim Is ther a mesh operator, like Z, that doesnt stop at the end of the shortest list 00:17
TimToady well, hypers, if you don't mind APL semantics 00:18
but there's never been consensus on what the semantics for "missing" values should be on something Z-ish but over longest list 00:19
so xx * is where it's at
or bind to an optional parameter with a defualt 00:20
_nadim that I don't know how to do, or undertand. given to lists, how does one do that? 00:21
TimToady well, that's assuming you have something that is returning (x,y),(x,y),(x),(x) that you -> to a map block
roundrobin can do that if you know which one's gonna run out first, but there's no easy answers here 00:22
well, I guess even roundrobin wouldn't group pairs 00:23
we did spec that a list ending in * would automatically repeat the final arg, but I dunno where that ended up
_nadim OK, I'll generate the equivalent length lists or append data manually. Thanks
TimToady m: say 1,2,3 Z+ 4, * 00:24
camelia rakudo-moar 3568c1: OUTPUT«(5 6 7)␤»
TimToady I guess it got hacked into Z anyway
so maybe that'd work for you
00:24 ZoffixWin left
TimToady m: say (1,2),(3,4),(5,6) ZX~ <a b>, * 00:26
gfldex S03: "For any kind of zip or dwimmy hyper operator, any list ending with * is assumed to be infinitely extensible by taking its final element and replicating it:"
camelia rakudo-moar 3568c1: OUTPUT«((1a 1b 2a 2b) (3a 3b 4a 4b) (5a 5b 6a 6b))␤»
00:26 Zoffix joined
TimToady looks like it'll replicate a list for you too 00:27
it's slightly shorter than <a b> xx *
and in theory works even if you don't know the last element
m: my @mystery = <a b>,<c d>; say (1,2),(3,4),(5,6) ZX~ @mystery, * 00:28
camelia rakudo-moar 3568c1: OUTPUT«((1a b 1c d 2a b 2c d) (3a b 3c d 4a b 4c d) (5a b 5c d 6a b 6c d))␤»
TimToady m: my $mystery = <a b>,<c d>; say (1,2),(3,4),(5,6) ZX~ |$mystery, * 00:29
camelia rakudo-moar 3568c1: OUTPUT«WARNINGS for /tmp/UykNSmCF3H:␤Useless use of constant value c d in sink context (lines 1, 1, 1, 1)␤((1a 2a) (3b 4b) (5b 6b))␤»
TimToady m: my $mystery = (<a b>,<c d>); say (1,2),(3,4),(5,6) ZX~ |$mystery, *
camelia rakudo-moar 3568c1: OUTPUT«((1a 1b 2a 2b) (3c 3d 4c 4d) (5c 5d 6c 6d))␤»
TimToady there we go
it replicates the <c d> even though we can't use xx directly on the final element of the list
I dunno if that was implemented for hypers 00:30
m: my $mystery = (<a b>,<c d>); say (1,2),(3,4),(5,6) «X~» |$mystery, *
camelia rakudo-moar 3568c1: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by addding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/0yeZfU20WA line 1␤␤»
TimToady m: my $mystery = (<a b>,<c d>); say (1,2),(3,4),(5,6) »X~« |$mystery, * 00:31
camelia rakudo-moar 3568c1: OUTPUT«Lists on either side of non-dwimmy hyperop of are not of the same length␤left: 3 elements, right: 2 elements␤ in block <unit> at /tmp/y0U1vqp6Te line 1␤␤»
TimToady m: my $mystery = (<a b>,<c d>); say (1,2),(3,4),(5,6) »X~» |$mystery, *
camelia rakudo-moar 3568c1: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by addding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/hDBdwTCMW5 line 1␤␤»
TimToady well, it don't work too good...
_nadim hmm, I am not that lucky :) I get either some totaly weird output, a compile error or a segfault depending on what I try. my list contain strings 00:32
TimToady m: my $mystery = (<a b>,<c d>); say ((1,2),(3,4),(5,6)) »X~» (|$mystery, *)
camelia rakudo-moar 3568c1: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by addding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/Y6lMvP8Hyf line 1␤␤»
TimToady m: my $mystery = (<a b>,<c d>); say ((1,2),(3,4),(5,6)) «X~» (|$mystery, *)
camelia rakudo-moar 3568c1: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by addding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/A2ziai8pOC line 1␤␤»
TimToady m: my $mystery = (<a b>,<c d>); say ((1,2),(3,4),(5,6)).cache «X~» (|$mystery, *)
camelia rakudo-moar 3568c1: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by addding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/WEU4X2viq2 line 1␤␤»
TimToady m: my $mystery = (<a b>,<c d>); say ((1,2),(3,4),(5,6)).cache «X~» (|$mystery.cache, *)
camelia rakudo-moar 3568c1: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by addding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/Bt6BjgAPHh line 1␤␤»
TimToady scratches head 00:33
in any case, Z is more intended for lists, and hypers more for matrices and such
(which is why the precedence is so different) 00:34
00:35 sprocket joined
_nadim in my case i just want to take two lists and print them side by side 00:35
TimToady oh, I see Mouq++ already brought up the ,* trick
_nadim looks like I'll have to generate elements to fill in
Rotwang m: say 0 == 0e0, 0 ∈ (0e0,)
camelia rakudo-moar 3568c1: OUTPUT«TrueFalse␤»
Rotwang why is that? ^
TimToady sets are type based 00:36
m: say 0 === 0e0
camelia rakudo-moar 3568c1: OUTPUT«False␤»
Zoffix m: say 0.WHAT, 0e0.WHAT
camelia rakudo-moar 3568c1: OUTPUT«(Int)(Num)␤»
dalek c: 1962a97 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod:
doc list expension with * for Zip operators
c: 8247afb | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod:
Merge pull request #310 from gfldex/master

doc list expension with * for Zip operators
Rotwang I see, thanks!
btw. where are the unicode operators documented? 00:37
can't find them here: doc.perl6.org/language/operators
Zoffix Rotwang, doc.perl6.org/language/setbagmix
which should probably be least mentioned on /operators 00:38
gfldex Rotwang: in gerneral with the class they operate on
Zoffix: i disagree. If we put every operator that is defined in core in there, that list would be far to long. We should however mention that operators are documented with their class in general, unless there is no class. 00:40
00:41 eddiejr joined
Rotwang gfldex: so for example ∘ operator should be documented along with Block? 00:42
Zoffix How to call methods from the same object? I'm doing self.handle-event here github.com/zoffixznet/perl6-IRC-Cl...nt.pm6#L43 but now I'm getting an error here github.com/zoffixznet/perl6-IRC-Cl...nt.pm6#L75 saying "Cannot understand @!plugs in this context", even though that code was working fine before I moved it into a method 00:43
gfldex Rotwang: Callable seams better, see github.com/rakudo/rakudo/blob/nom/...rs.pm#L655 00:45
00:46 aindilis joined
gfldex Zoffix: that should work. Could you try @tmp := @!plugs and replace the @!plugs before .grep? 00:47
dalek osystem: fe4516e | (brad clawsie)++ | / (4 files):
Merge pull request #1 from perl6/master

update from upstream
osystem: 528bf43 | (brad clawsie)++ | META.list:
Add Hash::Consistent

see github.com/bradclawsie/Hash-Consistent
osystem: 07d23bb | (Zoffix Znet)++ | META.list:
Merge pull request #110 from bradclawsie/master

Added Hash::Consistent
Zoffix gfldex, says "Cannot understand @!plugs in this context ... my @tmp := @!plugs⏏;" 00:49
gfldex Zoffix: try self!replay 00:50
Zoffix What's that and how do I try it?
gfldex err self!plugs
m: class C { has $!s; has @!s } 00:51
camelia ( no output )
Zoffix "Private method call to plugs must be fully qualified with the package containing the method"
gfldex now i'm as much confused as you are :( 00:52
Zoffix What was the signature syntax to get the invocant in a variable?
m: class C { has $.s = 42; method bar ($foo:) { say $foo.s } }; C.new.bar 00:53
camelia rakudo-moar 3568c1: OUTPUT«42␤»
Zoffix k
gfldex m: my method m(Any:D $s:){}
camelia ( no output )
Zoffix No love if I explicitly use a variable instead of self. >_< 00:54
gfldex @!plugs should work, so there is something really odd going on
Rotwang gfldex: thanks
Zoffix m: class Foo { has @!s = <foo bar>; method bar { self.ber }; method ber {say @!s} }; Foo.new.bar 00:55
camelia rakudo-moar 3568c1: OUTPUT«[foo bar]␤»
00:55 itaipu joined
Zoffix hm 00:55
00:55 lichtkind joined
gfldex Zoffix: if i clone IRC::Client, how do i test that? 00:56
Zoffix gfldex, perl6 examples/bot.pl6
gfldex clones
Zoffix: i get the same error 00:57
00:59 llfourn joined
dalek pan style="color: #395be5">perl6-examples: b052f85 | (Rodrigo Siqueira)++ | categories/shootout/mandelbrot.p6:
Mandelbrot Set algorithm in Perl6

Generates the Mandelbrot Set fractal using Perl 6. To be submitted to "The Computer Language Benchmarks Game".
00:59
pan style="color: #395be5">perl6-examples: 018a746 | (Zoffix Znet)++ | categories/shootout/mandelbrot.p6:
Merge pull request #40 from rsiqueira/patch-2

Mandelbrot Set algorithm in Perl6
Zoffix I'm an idiot 01:01
01:02 lichtkind left
Zoffix gfldex, I totally missed that it's not a `unit class IRC::Client` but a `class IRC::Client { ... }` and I declared the .handle-event method outside of those curlies 01:02
gfldex Zoffix: i just spotted line 70 as well :) 01:04
01:04 llfourn left
gfldex however, it should have complained because it's method out of a class and not my method 01:04
m: class C {}; method foo(){}
camelia rakudo-moar 3568c1: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in mainline (did you mean 'my method foo'?)␤ at /tmp/NOgngVXFhB:1␤ ------> 3class C {}; method7⏏5 foo(){}␤»
Zoffix Yeah, probably 01:05
gfldex may be worth to find out why it didn't complain like that
but it's nice to see that you expect rakudos error message to be awesome :)
TimToady++ # for successful propaganda 01:06
01:06 pmurias left
dalek kudo-star-daily: dac4f99 | coke++ | log/ (8 files):
today (automated commit)
01:08
[Coke] (2015.12.1) we have a lot of stuff to iron out before we do a post christmas release. 01:09
01:09 yurivish_ left 01:12 ugexex joined, adhoc is now known as vk5fj
ugexex m: say $*CWD.abspath.WHAT; say $*CWD.absolute.WHAT; # docs say abspath returns string and absolute returns an IO::Path 01:13
camelia rakudo-moar 3568c1: OUTPUT«(Str)␤(Str)␤»
Zoffix I created a ticket for my LTA error in the conversation above: rt.perl.org/Ticket/Display.html?id=127117
Hm. The other question is: why is the error shown twice? Seems like it's trying to compile it twice 01:14
01:16 zwu joined
gfldex Zoffix: maybe you should like the git repro URL and the commit the wrong error showed up on that RT 01:17
Zoffix I don't understand what you just said. What do you mean "like the git repro URL"? 01:18
zwu I tried to understand how the module / package related with the file structures, a naive code failed in one file module A { class B {}; } use A::B; #failed
gfldex s/like/link/ i cloned the module that have a look, so that is helpful 01:19
gfldex is out of proper english
zwu Output is "could not find A::B"
However, I do can use the my $s = A::B.new;
Zoffix gfldex, I reduced it to a much smaller example that I included in the ticket 01:20
(same error)
gfldex sorry, i missed that
zwu: if it's a class inside a module you use 'use A'. Given that B is export it should show up in the local scope. 01:22
zwu: have a look at this failry simple example: github.com/nxadm/StrictNamedArguments 01:23
01:23 itaipu left
zwu gfldex, thanks, still failed for that module A { class B{}} use A; 01:23
gfldex zwu: you would start examples/basic.p6 with 'perl6 -I ./lib examples/basic.p6' from the modules root 01:24
_nadim I core dumped at least 20 times tonight, running concurent code, what surprised me the most is that it happens after I made a few modifications, the second run is fine as are all the runs after.
gfldex _nadim: i have the same problem. It's totally random. Do you use Lock.new ?
_nadim No, I use Channel, start, await 01:30
01:30 SwellJoe joined 01:31 pjscott joined 01:32 pjscott left 01:36 thundergnat joined
ugexex have you inspected during all those times if its taking place in the same thread or not? 01:36
regardless of you using start { }
thundergnat Hey, #perl6 peeps 01:37
Should panda work with github tags for module versions?
ugexex start { } might schedule your work on the current thread if it can
thundergnat I've been trying to install Data::Dump::Tree and panda is distinctly unhappy. The only thing I can see "wrong" is that the ecosystem link points to a tagged version rather than master. 01:39
_nadim thundergnat: yes the source url indicated the tag, or the lates in whatever branch, master normaly
thundergnat It seems to be the only one in the ecosystem so far that does that.
01:40 pjscott joined, pjscott left
thundergnat It seems like it SHOULD work... but doesn't yet. 01:40
At least not for me.
_nadim it is, I wrote it, but we had a discussion this morning about it and using the tags is what should work
i guess that makes me the gunea pig 01:41
thundergnat Hmm. I keep getting the error -> fetch stage failed for Data::Dump::Tree: Unable to handle source 'github.com/nkh/P6-Data-Dump-Tree/
01:41 wamba joined
_nadim thundergnat: you can always clone it an do "panda install ." to install from the local code 01:41
thundergnat _nadim heh, lucky you.
_nadim yeah, it's my day ;) 01:42
thundergnat Yeah, I know, I just figured I would raise the issue on channel in case it was unknown.
Zoffix thundergnat, can you run panda update?
thundergnat Did
Zoffix thundergnat, that module had an incorrect URL earlier today... hm
k, then I dunno
_nadim I saw an update , I can check, 1 mn 01:43
thundergnat Just did again and tried again... still same failure.
Zoffix Oh, I may know
v1.0.0 doesn't match \w+ which is probably used somewhere
thundergnat oooo, that seems likely. 01:44
_nadim the ecosystem is up to date
thundergnat: will you open a ticket?
thundergnat Sure.
_nadim thanks.
and please install with git and test the module :) 01:45
thundergnat _nadim Yeah, plan to, Looks like a cool/useful module. 01:46
ugexex source-url":"github.com/nkh/P6-Data-Dump-Tree/" 01:47
thats not valid
s{/}{.git} 01:48
s{/$}{.git} rather
_nadim thundergnat: the filters are fun to play with. It's not very fast but it it is readable. Let me know if you have problems or if you want to use it in any specific way. I need input
Zoffix ugexex, why is it not valid? 01:49
Those URLs get normalized and half our ecosystem would be broken if it were invalid.
ugexex because the ecosystem isnt build on the url in the meta file?
_nadim you mean that it should be "github.com/nkh/P6-Data-Dump-Tree.git"? 01:50
ugexex yes
Zoffix It will get normalized back to github.com/nkh/P6-Data-Dump-Tree/
_nadim hmm, well it get redirected by git hub so i guess that it is as good to use the .git address
Zoffix ugexex, what do you mean by "because the ecosystem isnt build on the url in the meta file?"? 01:51
ugexex why is the ecosystem modifying meta files?
Zoffix Because people put all sorts of URLs in there and we coerce them to fewer options for our tooling to handle
But, it does look like you're right 01:53
ugexex but unless it explicitly has a license that allows you to do that im not sure you should
Zoffix panda install Text::Wrap fails with same error
ugexex, it's generating metadata. I highly doubt licensing applies on that aspect 01:54
(this discussion is moot though, as we're moving onto the PAUSE system anyway) 01:55
ugexex i personally dont care, im just channeling my inner project manager
Zoffix works on the commit to fix this issue
dalek osystem: 32efec1 | (Zoffix Znet)++ | server/updatelist.pl:
Normalized HTTPS URLs need to have .git

Otherwise panda fails to install them (see irclog.perlgeek.de/perl6/2016-01-02#i_11817181)
01:57
Zoffix thundergnat, _nadim ^ that should fix the install issue whenever the ecosystem-api.p6c.org/projects.json gets updated
thundergnat _nadim rt.perl.org/Public/Bug/Display.html?id=127118 01:58
Hah! Zoffix, you keep fixing bugs just before I can report them!
01:59 pierre-vigier joined, pierre-vigier left 02:00 llfourn joined
_nadim Zoffix: is that what panda updat does? 02:00
Zoffix _nadim, no, panda update fetches that list. And that list is updated with a cronjob being run somewhere 02:01
awwaiid gfldex++ # for all the doc work
_nadim Then I just have to get asleep and it will be fine by morning (if I don't break something else ;)) 02:02
Zoffix :)
02:05 llfourn left 02:06 pjscott joined 02:07 pjscott left, pjscott joined, yurivish_ joined 02:09 pjscott left
dalek osystem: 535c1f7 | (Zoffix Znet)++ | server/updatelist.pl:
Fix code formatting
02:13
02:14 pjscott joined, pjscott left
Zoffix k, it got updated and panda update; panda install Text::Wrap now works for me 02:15
Should work for Data::Dump::Tree too
thundergnat, if you can confirm the install works for Data::Dump::Tree (or Text::Wrap, if you already installed Data::Dump::Tree), then please close your ticket 02:16
Run panda update first
thundergnat 'k, I'll give it a try. 02:17
hmmm. Now I get a new and different failure... 02:18
Failed to copy '/lib/Data/Dump/Tree/ExtraRoles.pm' to '/home/steve/.perl6/share/perl6/site/sources/31496E05158CBFE737C208168641BEF9FE417 02:19
May need to nuke and start over...
Zoffix nah wait
thundergnat 'k
Zoffix thundergnat, that's an error with the META file in that distro. The '/lib' should be 'lib' 02:20
Zoffix submits a PR
thundergnat Ah. 02:21
Zoffix _nadim, sent: github.com/nkh/P6-Data-Dump-Tree/pull/3
thundergnat Zoffix: While you're at it, shouldn't "author" : "Nadim Khemir", be "authors" : ["Nadim Khemir"], ? 02:23
02:23 ELBeavers left
thundergnat oops. too late 02:23
leont Rumor has it PRs are cheap 02:24
yoleaux 31 Dec 2015 18:46Z <TimToady> leont: I'd use something like: .return with $!exit-status.status;
thundergnat leont heh. I've heard that.
02:25 sprocket left
Zoffix Never too late with git rebase :) 02:25
And yeah, it should be "authors" : ["Nadim Khemir"] (PR Updated)
_nadim never too late when I can do that too
Zoffix :D 02:26
thundergnat :D
_nadim hmm, that went through Test::META without problem
02:26 FROGGS_ joined 02:27 pjscott joined
pjscott I installed raked on OS X with "brew install rakudo-star" and this put perl6 in /usr/local/bin but no panda. What's the preferred way of installing panda from this position? 02:28
s/raked/rakudo/ # damn autocorrect
ugexex well technically an absolute path is fine if existed. it used to be a trick to install modules to {$PREFIX} long ago 02:29
Zoffix Test::META checks for file's existence though
Zoffix investigates why that did not work correctly
02:30 FROGGS left
Zoffix pjscott, three things: (1) R* comes with panda, so it's weird that you did not receive it. Are you sure it's not installed elsewhere? (2) rakudo-star for the Christmas release hasn't been released yet to my knowledge, so your rakudo is way old. (3) You can still get panda with git clone github.com/tadzik/panda.git; perl6 bootstrap.pl; Not exactly sure *where* that would install it though 02:31
pjscott "whereis panda" doesn't find it. The brew command didn't gripe. Note that this was *brew*, not *rakudobrew* 02:33
Following OS X instructions on rakudo.org/how-to-get-rakudo/
Zoffix Yeah, everyone's on holidays, so I think that's why the Rakudo Star distro hasn't been updated yet
m: say '/'.IO.child('dev').e; say '/'.IO.child('/dev').e
camelia rakudo-moar 3568c1: OUTPUT«True␤True␤»
02:34 vendethiel left
Zoffix ^ cause of Test::META not detecting the '/lib' problem 02:34
pjscott Hmm, looks pretty Christmassy to me: bash-3.2$ perl6 -v
This is Rakudo version 2015.12 built on MoarVM version 2015.12
implementing Perl 6.c.
Zoffix And `authors` is optional, which is why it's not complaining about it
pjscott, no idea then :| I don't see a 2015.12 release on rakudo.org/downloads/star/ 02:35
You can problably rakudobrew with the 4 commands listed here: perl6.org/downloads/
pjscott ==> Installing rakudo-star 02:36
==> Downloading homebrew.bintray.com/bottles/rakud...12.el_capi
Yes, I can, I've done it that way before but I wanted to try the 'brew' version.
Zoffix Ah
02:41 Zoffix left 02:43 _nadim left, pjscott left 02:45 ZoffixWin joined, ZoffixWin left, ZoffixWin joined 02:48 molaf_ joined 02:49 pjscott joined 02:51 xpen joined 02:52 molaf left 02:53 pjscott left 02:57 pjscott joined 02:59 pierre-vigier joined, pierre-vigier left 03:01 llfourn joined
awwaiid rakudo.org doesn't even mention the 2015.12 release on the front page :( 03:02
llfourn o/ 03:03
flussence you're right; the only process for a new user to get 2015.12 right now is via rakudobrew. Everything else via that domain is a dead end
awwaiid tangentally, is debian packaging waiting for the next Star? 03:06
flussence unfortunately that site's had a bus factor of 0 over christmas, so there's nothing we can do about it until the people who can show up
03:06 bpmedley left
flussence debian packaging is, IIRC, mostly the same set of people... 03:06
03:07 wamba left 03:09 yqt left 03:10 noganex_ joined 03:12 noganex left 03:14 kid51 left
llfourn m: say ForeignCode; # What is this for? 03:24
camelia rakudo-moar 3568c1: OUTPUT«(ForeignCode)␤»
flussence from the name, I'm guessing Inline::$foo? 03:25
llfourn hmm yes I thought something like that too
flussence oh, docs/announce/2013.04
it's for autoboxing stuff on native ints and nqp stuff, sounds like 03:26
llfourn well spotted. But I think that means low level code rather than native types.
03:27 pjscott left 03:28 colomon left
llfourn m: role { sub foo { }; BEGIN &foo.^find_method("clone").^name.say } # .clone is a ForeignCode when it should be getting the one from Mu :( 03:28
camelia rakudo-moar 3568c1: OUTPUT«ForeignCode␤»
llfourn this only happens inside roles
(I think) 03:29
ah no nvm it's always like that .clone just breaks when it's inside a role... 03:30
03:30 BenGoldberg left
zwu just understand the module and search interface L<CompUnitRepo::Local::File> and L<CompUnitRepo::Local::Installation>, my question is: each file is a compunit, which is the search based for the Local::File, 03:30
llfourn zwu: I didn't understand the question part 03:31
zwu however, if I have multiple embedded module in a single file, how can I make the use module; work
llfourn zwu: 'use' only works for compunits. If you use the compunit you will get all the modules,classes roles etc inside
03:32 pjscott joined
zwu such as module X{ sub x is export {} ; module Y { sub y is export {} };} ; 03:32
use X::Y; 03:33
llfourn zwu: give "import" a short instead of use
shot*
import => for packages (like module), use => for compunits like X/Y.pm use X::Y; 03:34
zwu yes, "use" is actually combination of "need" and "import"
03:34 brad_ joined
llfourn zwu: actually it isn't. I wrote that lie on the docs before I knew it wasn't true ;_; 03:34
03:35 leont left
brad_ So do anyone have a redesign of the Perl6 logo? 03:35
llfourn zwu: I promise to fix it soon sorry!
zwu: but FYI the design docs say it should be like that but the implementation has decided to go a different way that probably makes more sense. 03:36
zwu in so, if I have distributed the same module in a file.pm and embedded in another module, kind like of partial in c#, will the two same modules being merged and imported? 03:37
03:38 ugexe joined
llfourn zwu: I think so in that the things that the "embedded" modules "is export" will be merged. 03:38
"is export" doesn't care about what module it's in if I remember correctly 03:39
it works on the compunit level -- but take that with a grain of salt
03:41 pjscott left
llfourn zwu: ah so I kinda re-read your question. Whether the modules are notionally merged or not I'm not sure but the exported symbols should be merged at least. 03:43
03:43 pjscott joined 03:45 xxpor_lap joined 03:48 z8 left
zwu thanks 03:51
I like the flexibility that perl 6 has designed. 03:52
03:53 brad_ left
llfourn zwu: yep it sure it designed well :) 03:53
*it sure is
03:57 pjscott left 03:58 pjscott joined 04:00 pierre-vigier joined, pierre-vigier left, ParsonsNose joined 04:01 colomon joined 04:02 bpmedley_ joined 04:03 pjscott left 04:04 xxpor_lap left 04:05 xxpor_lap joined 04:06 pjscott joined 04:09 molaf_ left 04:10 molaf_ joined 04:11 kaare_ joined 04:17 dcymbala joined
dcymbala Hi all - I'm new to perl6 and had questions on writing a new module - which email list would be best? 04:18
04:19 AlexDani` joined
awwaiid dcymbala: the users list might work 04:19
04:19 AlexDani` is now known as AlexDaniel
dcymbala Hi awwaiid - [email@hidden.address] is what you mean? 04:21
Mouq dcymbala: Often the best place to ask questions is actually here, though maybe not at this hour 04:22
dcymbala I understand
awwaiid dcymbala: yep!
dcymbala thanks!
awwaiid and yeah, here is grea
great
dcymbala Is there a preference to provide classes over roles or vice versa in modules? 04:24
ParsonsNose My gut feel is that you should avoid exposing roles in an API but prefer them internally. But there are many people here with more valuable opinions than I 04:28
04:29 user74747 left 04:41 SwellJoe left 04:44 xpen left, zwu left
gfldex ParsonsNose: roles are interfaces and as such one might want to test if a class or a sub-class implements that role. It may be worth it to export it with a tag ofc. 04:45
04:51 sprocket joined 05:02 yurivish_ left 05:08 mcmillhj left
awwaiid Progress on Inline::Ruby -- this now works: say EVAL('[2, 6, 8, 4]', :lang<Ruby>).sort.slice(1,2).to_s; #=> "[4, 6]" 05:11
Also: EVAL('Time', :lang<Ruby>).now.to_s #=> 2016-01-02 00:12:20 -0500 05:12
05:14 nige1 joined 05:21 pjscott left 05:26 vendethiel joined 05:27 zwu joined
dcymbala gfldex: I suppose I could define a Role in one module and then have a class implement it in another. 05:27
zwu how to call superclass's method if it has been overrided
should I use the meta object? 05:28
05:33 zwu left 05:34 labster joined
gfldex m: class A { method m () { say 'A::m' } }; class B is A { method m () { say 'B::m'; nextsame } }; B.new.m; 05:34
camelia rakudo-moar 3568c1: OUTPUT«B::m␤A::m␤»
gfldex zwu: ^^^ 05:35
m: class A { method m () { 'A::m' } }; class B is A { method m () { nextsame } }; say B.new.m;
camelia rakudo-moar 3568c1: OUTPUT«A::m␤»
05:37 regreg left
gfldex m: class A { method m () { 'A::m' } }; class B is A { method m () { 'B::m' ~ nextsame } }; class C is B { method m () { 'C::m' ~ nextsame } }; say C.new.m; 05:38
camelia rakudo-moar 3568c1: OUTPUT«A::m␤»
gfldex zwu: please note the MMD can complicate things. see design.perl6.org/S12.html#Calling_s...of_methods 05:39
awwaiid gfldex: wasn't that last one supposed to say like: C::mB::mA::m ? 05:40
gfldex no, nextsame will do odd things to return values
awwaiid ah 05:41
maybe it doesn't return
05:41 labster left, nbrown joined
gfldex you basicly send the method call back to the dispacher and ask him to call the next candidate 05:41
05:43 Cabanossi left, SwellJoe joined 05:45 xpen joined, Cabanossi joined
awwaiid gfldex: you ever ready ruby docs? If you look at say ruby-doc.org/core-2.2.0/String.html and roll over some of the entries there is a "click to toggle source" link, does what it says. I'm thinking something like that for reference docs which would show a block from roast 05:45
05:49 xpen left, vendethiel left 05:53 pjscott joined
gfldex m: class A { method m () { 'A::m' } }; class B is A { method m () { 'B::m' ~ nextsame } }; class C is B { method m () { 'C::m' Z~ self.WALK(:name<m>, :super)>>.(self) } }; say C.new.m; 05:54
camelia rakudo-moar 3568c1: OUTPUT«(C::mA::m)␤»
gfldex if you need the return value of the parents class methods (there is MMD), this is one way. I think there is another but can't quite remember. 05:55
05:57 labster joined
gfldex m: class A { method m () { 'A::m' } }; class B is A { multi method m () { 'B::m' ~ nextsame }; multi method m (A:D:) { 'B::m2' } }; class C is B { method m () { 'C::m' Z~ self.WALK(:name<m>, :super)>>.(self) } }; say C.new.m; 05:57
camelia rakudo-moar 3568c1: OUTPUT«(C::mB::m2)␤»
05:58 khw left 06:13 pjscott left, pjscott joined 06:14 _Vi left, bitmap joined 06:16 _Vi joined 06:17 skids joined 06:20 pjscott left, pjscott joined 06:24 pjscott left 06:25 pjscott joined
dalek c: e36415e | skids++ | doc/Type/Scalar.pod:
Clarify language and narrow an unitentionally wide C<>
06:27
skids wonders if there is a way to exempt Scalar.pod from sutolisting Any/Mu methods since those methods delegate. 06:28
sprocket has anyone encountered an “Invalid GC status observed; aborting” error before? 06:29
ugexe m: my %meta = "/home/camelia/star-2015.09/share/perl6/META6.json".IO.slurp.&from-json.hash; CompUnit::RepositoryRegistry.repository-for-name('home').install(Distribution.new(|%meta), %(%meta<provides>.map({.key => .value.IO.absolute("/home/camelia/star-2015.09/share/perl6/")})));
camelia ( no output )
06:29 vividsnow left
sprocket currently rebuilding the latest rakudo, but wondering if it’s something else i’ve done to cause that error 06:30
ugexe m: use JSON::Fast;
camelia rakudo-moar 3568c1: OUTPUT«Use of uninitialized value % of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in any load_module at src/Perl6/World.nqp line 978␤»
skids sprocket: new one on me.
sprocket skids: we’ll see what the latest build has to say then :)
06:33 dcymbala left
ugexe m: say CompUnit::RepositoryRegistry.repository-for-name("site").Str.IO.child("dist").dir[0].IO.slurp.&from-json.hash<depends> 06:34
camelia rakudo-moar 3568c1: OUTPUT«[[]]␤»
ugexe CU is generating messed up `depends`
on install
06:34 Psyche^_ joined
ugexe should be using |%(%meta.grep(?*.value.elems)) to generate Distribution 06:36
06:37 vividsnow joined
ugexe i mean doing the above fixes that, but shouldnt be neccesary rather 06:37
06:38 Psyche^ left 06:39 vividsnow left 06:40 vividsnow joined
awwaiid I think I'm starting to be able to articulate this idea better... 06:41
06:42 vividsnow left
awwaiid The "Perl 6 Design Documents" say that Roast is the official specification. But right now Roast links to Synopsis docs; I think we need to reverse those links. We need to be able to link to specific parts of Roast from design docs and user docs. For the user docs, I also want a list of the link-able things we have not yet linked, which will serve as a TODO list. 06:43
06:43 vividsnow joined 06:45 vividsnow left, xpen joined 06:46 peyman joined
awwaiid Basically a new type of special-comment in roast, and deprecate the L<S0*/...> links. I've been using things like "#| DOC: String comparison with eq and ne", embedded in S03-operators/equality.t ideally attached to a block of tests. 06:46
peyman hello 06:47
awwaiid greetings peyman
peyman whats happening
awwaiid talking to myself
actually, going to bed :)
peyman thats ok as long as nobody sees you 06:48
awwaiid ya
peyman sure g'night
awwaiid g'night :)
06:49 pjscott left, peyman left 06:51 nexysno_ left 06:52 xpen left 06:53 ugexe left 06:54 bitmap left
AlexDaniel m: say ‘have fun working on perl’.wordcase(:filter(&uc), :where(*.chars > 3 )) 06:57
camelia rakudo-moar 3568c1: OUTPUT«HAVE fun WORKING on PERL␤»
06:58 vividsnow joined 07:00 _Vi left 07:01 pierre-vigier joined, pierre-vigier left 07:02 labster left 07:04 vividsnow left 07:08 _Vi joined
AlexDaniel m: say NaN cmp 42 07:13
camelia rakudo-moar 3568c1: OUTPUT«More␤»
skids Is now a good time to pull nom vis-a-vis panda/curli/ecosystem issues? 07:15
07:15 vividsnow joined
AlexDaniel it seems like it does string comparison with NaN, is it correct? 07:16
hm, perhaps it is 07:17
07:19 vividsnow left 07:20 average left 07:21 vividsnow joined
perigrin AlexDaniel: cmp would yes I think. 07:21
skids AlexDaniel: well design docs say it should do a "canonical" compare a-la eqv.
TimToady design docs are incomplete there 07:22
07:23 vividsnow left, vividsnow joined
TimToady deciding to treat NaN as stringy is a fairly recent decision 07:24
it doesn't really fit into any orderable Numeric or composite type
so string is the best default we have 07:25
perigrin too bad you can't return "Not A Truth" :)
07:26 vividsnow left
TimToady but there's no perfect solution here, so the best we can be is a kind of mostly consistent most of the time 07:26
so cmp is really quite a bit more forgiving than eqv is 07:27
skids Yeah it's not like there's an IEEE value for "not orderable"
07:28 virtualsue joined, itaipu joined
TimToady we consider it kind of antisocial to refuse to return a list in some order merely because some of the values are not the same type 07:28
07:30 CIAvash joined 07:33 ugexex left 07:35 azawawi joined
azawawi hi 07:35
happy 2016 #perl6
grondilu m: say NaN < 42 07:36
camelia rakudo-moar 3568c1: OUTPUT«False␤»
azawawi question, are the lexical scoping of Perl 6 the same as Perl in all aspects? Are there any differences?
A nice thing to do also is to add a Perl 6 entry with examples to en.wikipedia.org/wiki/Scope_%28com...y_language 07:37
grondilu but NaN is a Numeric thing fundamentally, I don't get why it should be treated as a String by cmp. 07:38
07:38 vividsnow joined
grondilu oh wait, cmp can not return False, I forgot that. 07:39
maybe it should just die.
perigrin grondilu: TimToady just said that would be antisocial though 07:41
grondilu ok, did not pay enough attention
07:42 vividsnow1 joined, vividsnow left, vividsnow1 is now known as vividsnow 07:43 hankache joined
hankache Happy new year #perl6 07:43
07:44 bitmap joined
skids azawawi: Perl 6 made many more aspects of the language subject to lexical scoping. 07:44
azawawi cool then we need to add a new Perl 6 entry to that wikipedia article. 07:45
07:45 vividsnow left
AlexDaniel m: say [5, -Inf, 10, Inf, 25, NaN, 35].sort 07:45
camelia rakudo-moar 3568c1: OUTPUT«(-Inf 5 10 25 35 Inf NaN)␤»
07:47 vividsnow joined, SwellJoe left 07:48 ugexe joined
AlexDaniel m: say [-Inf, Inf, 0, True, False, NaN].sort 07:49
camelia rakudo-moar 3568c1: OUTPUT«(-Inf 0 False True Inf NaN)␤»
grondilu AlexDaniel: is that ok to you?
AlexDaniel m: say [-Inf, Inf, True, False, 0, NaN].sort
camelia rakudo-moar 3568c1: OUTPUT«(-Inf False 0 True Inf NaN)␤»
AlexDaniel grondilu: I think that it is, but this ↑ – I'm not sure… 07:50
ah wait, it is stable
that's why
07:51 Tonik joined
azawawi do we have a raspberry pi rakudo star release? 07:51
skids azawawi: See the very top of S04 for a description of Perl 6 scoping
azawawi skids: thx 07:52
07:52 vividsnow left 07:53 vk5fj is now known as adhoc
ChoHag Can I create an anonymous code reference which returns from its containing block? 07:57
07:57 _nadim joined
AlexDaniel m: say Bool.invert 07:58
camelia rakudo-moar 3568c1: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/mwyroG9HZg line 1␤Cannot call invert(Bool); none of these signatures match:␤ in block <…»
07:58 vividsnow joined
ChoHag ie. sub foo { my $bar = sub { return-from-foo 42 if ... }; $bar("baz") } 07:58
AlexDaniel ChoHag: hmm, have you tried “return” ? :)
I think that it should work
m: sub foo { my $x = { return ‘blah’}; $x() }; say foo 07:59
camelia rakudo-moar 3568c1: OUTPUT«blah␤»
ChoHag That doesn't quite prove it. 08:00
azawawi i am planning on doing regular rakudo star releases for RPi for 2016 (starting with 2015.12) with github.com/cspencer/perl6-raspberry-pi and github.com/cspencer/perl6-raspberr...ce-ds18b20
ChoHag m: sub foo { my $x = { return ‘blah’}; $x(); say "still in foo"; }; say foo
camelia rakudo-moar 3568c1: OUTPUT«blah␤»
ChoHag That does.
AlexDaniel ChoHag: indeed :)
ChoHag m: sub foo { my $x = -> $bar { return "blah-$bar" }; $x("baz"); say "still in foo"; }; say foo 08:01
camelia rakudo-moar 3568c1: OUTPUT«blah-baz␤»
ChoHag Good good...
08:01 vividsnow left
ChoHag hmm 08:01
m: sub foo { my $x = { return "blah-$^bar" }; $x("baz"); say "still in foo"; }; say foo
camelia rakudo-moar 3568c1: OUTPUT«blah-baz␤»
ChoHag m: sub foo { my $x = { "just blah-$^bar" }; $x("baz"); say "still in foo"; }; say foo 08:02
camelia rakudo-moar 3568c1: OUTPUT«still in foo␤True␤»
ChoHag Excellent.
08:03 hankache left
azawawi DrForr: ping 08:03
AlexDaniel what happens if you pass that sub somewhere else? What would this “return” mean then?
08:03 vividsnow joined
AlexDaniel and how do you “return” without returning from the outer sub? 08:04
that is, if you want this anonymous sub to return some value
azawawi .tell DrForr Any update on the OpenCV bindings for Perl 6? Can you please share your WIP github repo?
yoleaux azawawi: I'll pass your message to DrForr.
ChoHag AlexDaniel: I think { ... } and sub { ... } are different. 08:06
AlexDaniel ChoHag: right! Indeed
08:06 vividsnow left
AlexDaniel that answers the second question… maybe 08:06
ChoHag m: sub foo { my $bar = { "don't return $^this" }; my $baz = $bar("anything"); say "still in foo"; return $baz } 08:07
camelia ( no output )
ChoHag m: sub foo { my $bar = { "don't return $^this" }; my $baz = $bar("anything"); say "still in foo"; return $baz }; say foo
camelia rakudo-moar 3568c1: OUTPUT«still in foo␤don't return anything␤»
ChoHag m: sub foo { my $bar = sub { return "don't return $^this" }; my $baz = $bar("anything"); say "still in foo"; return $baz }; say foo 08:08
camelia rakudo-moar 3568c1: OUTPUT«still in foo␤don't return anything␤»
08:12 vividsnow joined 08:13 darutoko joined 08:14 virtualsue left, avalenn_ left 08:15 avalenn joined 08:16 virtualsue joined, nbrown left
ChoHag m: my Bool $something = True; say "? $something"; 08:16
camelia rakudo-moar 3568c1: OUTPUT«? True␤»
ChoHag I got this: Cannot call Str(Bool: ); none of these signatures match: (Bool:D $: *%_) 08:17
08:17 vividsnow left
ChoHag m: sub foo (Bool :$something) { say "? $something" } foo(:something) 08:17
camelia rakudo-moar 3568c1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E01uT91gxh␤Strange text after block (missing semicolon or comma?)␤at /tmp/E01uT91gxh:1␤------> 3Bool :$something) { say "? $something" }7⏏5 foo(:something)␤ expecting any of:␤ infix␤…»
ChoHag m: sub foo (Bool :$something) { say "? $something" }; foo(:something)
camelia rakudo-moar 3568c1: OUTPUT«? True␤»
ChoHag Hmm 08:18
08:20 Guest77985 is now known as DrParis_ 08:21 pierre-vigier joined 08:23 vividsnow joined
dalek osystem: 49a1dee | cspencer++ | META.list:
Added RPi::Device::DS18B20 to ecosystem.
08:25
osystem: 056ca1c | (Zoffix Znet)++ | META.list:
Merge pull request #111 from cspencer/master

Added RPi::Device::DS18B20 to ecosystem.
08:26 bitmap left, ugexe left 08:28 vividsnow left, vividsnow joined 08:29 domidumont joined
azawawi ZoffixWin: ping 08:32
ZoffixWin azawawi, pong 08:33
azawawi ZoffixWin: just noticed the merge of RPi::Device::DS18B20
ZoffixWin: im planning on doing some RPi work for rakudo star on 2016 :)
ZoffixWin: regular rakudo star release
ZoffixWin sweet
08:34 domidumont left
azawawi ZoffixWin: that way we do not waste the time of people trying out Perl 6 on RPi 08:34
08:34 vividsnow left, vividsnow joined 08:35 domidumont joined
azawawi ZoffixWin: also given i played with OpenCV lately a lot on python im planning on doing stuff with DrForr hopefully to get OpenCV bindings ready 08:35
ChoHag Is there an equivalent to prove(1) for perl6?
Or Test::*?
of
azawawi ZoffixWin: attract scientific + hobbyist community that is
ZoffixWin prove -e 'perl6' is what I use
08:36 krunen left
ZoffixWin azawawi, good plan. I recall RabidGravy compiling P6 on RPi and it was taking ages 08:36
azawawi ChoHag: to be exact prove -e 'perl6 -Ilib' if you're using your local directory (not installed)
ChoHag: prove -e "perl6 -Ilib" 08:37
08:37 vividsnow left
azawawi ZoffixWin: doing anything on RPi takes ages lol 08:37
skids ChoHag: Rakudo ships with a Test module in ./lib and the roast repo has numerous submodules for running the spectests.
azawawi ZoffixWin: perlbrew took like 4 hours if i recall correctly on the older B model 08:38
AlexDaniel azawawi: holy…
azawawi AlexDaniel: 512MB 08:39
ZoffixWin :o
ChoHag I've seen Rakudo's tests but didn't pay a great deal of attention to how they're run, given that they need to deal with the chicken & egg problem which compilers face.
azawawi it will be slower given the lower memory and paging that occurs
ChoHag azawawi: It's the need to add -I and friends *within the -e argument* that I wondered about a perl 6 aware prove. 08:40
azawawi ChoHag: i see 08:41
come to think of it, why are we using 'prove' and not something in perl6 like 'prove6'? 08:42
ChoHag It's fine though, it works. I didn't really expect there to be something specific yet.
From the other angle, can I make perl 5 exec itself with perl6 when it encounters use v6 rather than telling me off?
08:43 vividsnow joined
azawawi ofcourse given this tweet "SunSpider Javascript benchmark completes in 4452.1ms on Raspberry Pi 2, compared with 23692.7ms on Raspberry Pi Model B+.". I think the new RPi2 will be way faster for perl6 08:43
www.raspberry-projects.com/pi/pi-ha...ifications 08:44
08:45 virtualsue left
ChoHag Or, can I make prove consider the #!? 08:48
08:48 vividsnow left 08:49 vividsnow joined
skids There is a TAP::Harness module in the ecosystem -- not sure how complete it is. 08:50
azawawi to be exact, 'perlbrew install perl-5.16.1' takes like 12,667 seconds ~ 3.5 hours on RPi 1 B model (512MB) 08:56
newer perls can take more (running the test suite takes most of the time)
ChoHag If only there was some way of building things on one machine to run on another...
08:57 wamba joined
ChoHag FWIW, the core stack (master/nom, not the tagged releases) builds successfully on openbsd 5.7. 08:57
azawawi ChoHag: the fun thing when it fails lol
08:57 vividsnow1 joined 09:00 vividsnow left, vividsnow1 is now known as vividsnow, vividsnow left 09:01 sunnavy left 09:02 sunnavy joined, pierre-vigier left 09:04 vividsnow joined
azawawi ChoHag: im going to try build instructions at test.asenjo.nl/index.php/Perlbrew # cross compiling for RPi 09:05
ChoHag: and later try to apply them to rakudo hopefully. This will speed building/testing a lot for RPi 09:06
09:06 vividsnow left
azawawi The problem is i have an older RPi model and not the newer one (1GB) so i couldnt test on it atm 09:06
09:12 nige1 left 09:15 pjscott joined
nine azawawi: leont++ is working on a test harness (prove6) for Perl 6 09:20
azawawi nine: cool
ChoHag Where did panda's bootstrap.pl install its modules to?
nine ChoHag: CompUnit::RepositoryRegistry.repository-for-name("site") with fallback to ~/.perl6 09:22
Oooh! There's a bug!
m: say CompUnit::RepositoryRegistry.repository-for-name("home")
camelia rakudo-moar 3568c1: OUTPUT«inst#/home/camelia/.perl6/2015.12-69-g3568c1e␤»
azawawi ChoHag: on my machine, it looks to be ~/.rakudobrew/moar-2015.12/panda
nine oh, not a but at all
09:24 bitmap joined
nine not even a bug 09:24
ChoHag Is not installing any .pm or .pm6 files a bug or a feature?
A Microsoft style feature. 09:25
09:29 firstdayonthejob joined 09:30 bitmap left 09:35 pjscott left 09:38 nige1 joined 09:47 krunen joined 09:48 RabidGravy joined
RabidGravy marning! 09:53
lizmat good *, #perl6! 09:55
RabidGravy o/
Best wishes for 210 Perl 6 !
*sigh*
TEttinger heh
lizmat 201 Perl 6
still not quite awake
ChoHag 210? Is that like half a 420? 09:56
Because that's not a good idea while still waking up.
God that joke was lame. 09:57
RabidGravy 116
lizmat yeah... I know... :-(
it can only get better this year (I hope :-)
09:59 bpetering joined, z8 joined 10:00 AlexDaniel left
bpetering Happy new year everyone and congrats to * for getting to v6.0.0 10:00
azawawi RabidGravy: hi :) 10:01
bpetering I have some NativeCall questions if anyone can help
10:03 pierre-vigier joined, pierre-vigier left, pierre-v_ joined 10:04 pierre-v_ left
moritz \o 10:05
bpetering Firstly, is it currently possible in Rakudo to interface with a function that takes a pointer and writes back through that pointer?
moritz yes
bpetering e.g. my Pointer[int32] $p (and the C code sets $p.defer 10:06
hai moritz, long time :)
moritz sub foo($x is rw) is native(...) for example
or you can declare a CArray
because arrays and pointers are really interchangable in C land
10:07 llfourn left
bpetering moritz: thanks. will try both approaches for my use case 10:08
moritz bpetering: you're welcome. Are you aware of doc.perl6.org/language/nativecall ? 10:09
feedback and/or improvements to that page would be very much appreciated
RabidGravy azawawi, yo! you good?
bpetering moritz: yep, I'm following that but getting segfault when I'm not expecting it
10:09 rindolf joined
bpetering I'll do what I can to improve it seeing I'm coming back to perl6 after a few years away 10:10
moritz huh, it doesn't even mention the "is rw" trick
10:10 user74747 joined
bpetering (happy to contribute sorta-newbie eyes) 10:11
azawawi RabidGravy: yup... looking at www.numberempire.com/2016
RabidGravy bpetering, you may find (in the case of an unexpected segfault) that perl6-gdb-m and/or perl6-valgrind-m may help
bpetering RabidGravy: cheers, I'll see what I can find out 10:12
10:13 CIAvash left, nige1 left 10:16 FROGGS_ left 10:18 apejens joined, azawawi left
masak good antenoon, #perl6 10:18
apejens hey, I get an error when I do `rakudobrew build-panda`: gist.github.com/omega/4b7def9db6598539b887 10:19
just installed rakudobrew and built moar 2015.12
10:20 lnrdo joined
RabidGravy woah, that's a good one 10:21
:)
isn't it something to do with setting some environment variable <mumble and hand wave>? 10:22
apejens perl6.org/downloads/ I tried following the quick start thingy
I can run perl6
RabidGravy I think someone else reported this a few momths ago and they tracked it down to being some Perl 5 specific environment being set for some reason 10:23
apejens hmm
RabidGravy I think it's one of PERL5LIB, PERLLIB or similar 10:24
apejens yeah, I have PERL5LIB set
RabidGravy what happens if you do "PERL5LIB= rakudobrew build-panda"? 10:25
apejens yeah, that works, just tested
10:25 spider-mario joined
RabidGravy cool 10:26
apejens and it's only a problem during teh bootstraping of the deps 10:27
10:27 lnrdo left
RabidGravy I'm not sure that anyone actually found out *why* this was happening 10:28
10:28 nige1 joined 10:29 lnrdo joined 10:30 ilmari_ is now known as ilmari, bitmap joined 10:34 bitmap left 10:35 llfourn joined
RabidGravy "494 494 37045 META.list" - ooh so getting there 10:36
10:41 CIAvash joined, vendethiel joined
bpetering moritz: the 'is rw' trick still isn't working, and CArray is doing something I think is equivalent 10:44
here's what I'm up to... gist.github.com/bpetering/02f5062933ba6db2933f
the idea is to "init", take a pointer-to-pointer and give back an initialized object through the p-t-p 10:45
anyway, on the last line of test.pl6, i get 10:46
"Invocant requires an instance of type NativeCall::Types::Pointer[foo], but a type object was passed."
can anyone tell me if I'm doing anything silly there?
moritz bpetering: uhm, I might be confused, but aren't you using one pointer level too much? 10:47
Pointer[...] AND is rw?
bpetering if you look at test.c, that's the correct C API I'm coding to 10:49
as for the perl6, i'm less certain
moritz maybe try with one level of pointering first?
[Tux] csv-ip5xs 50000 19.785 19.672
test 50000 23.612 23.499
test-t 50000 13.045 12.932
And a happy new year to all 10:50
lizmat [Tux] o/ 10:51
10:55 itaipu left
bpetering moritz: one level of pointering works fine, but when it comes to C constructs with two levels of indirection I can't get it working 10:57
so suggestion #1 for language/nativecall is "explain how to do **pointer things" 10:58
moritz CArray[CArray[foo]] ?
also, have you tried Pointer[Pointer[foo]] ? 10:59
bpetering that's where I'm getting confused, since foo is already "is repr('CPointer')"
I'm assuming that "is repr..." gives me one level of pointering
does it?
RabidGravy yeah 11:00
it works fine for things where you have an init function that returns a pointer to a "handle" and pass that to all the other functions 11:01
for instance
bpetering the library I'm trying to attach with NativeCall has an extra level of indirection 11:03
you declare a pointer, pass the address of *that*, and the init function fills it in with the address of an object
RabidGravy but the pointer to a pointer interface here it is entirely possible that no-one has used it before :)
bpetering RabidGravy: that's what I'm suspecting
:o)
RabidGravy yeah so, I' go with "my Pointer[foo] $a = Pointer[foo].new" 11:04
I'd
in the first instance 11:05
11:05 pierre-vigier joined
RabidGravy m: use NativeCall; my Pointer[foo] $a = Pointer[foo].new; 11:05
camelia rakudo-moar 3568c1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Jhw5DFKNCS␤An exception occurred while parameterizing Pointer␤at /tmp/Jhw5DFKNCS:1␤Exception details:␤ 5===SORRY!5=== Error while compiling ␤ Cannot invoke this object␤ at :␤»
11:05 _mg_ joined
RabidGravy m: use NativeCall; class foo is repr('CPointer') {}; my Pointer[foo] $a = Pointer[foo].new; 11:06
camelia ( no output )
bpetering RabidGravy: that line works for me with Rakudo 2015.12
(but I also have 'foo' defined ;)
11:06 pierre-vigier left
RabidGravy yeah, confusing error message from rakudo there 11:06
nine Sounds like sub init-foo(Pointer is rw) is native(...) { * }; my $p = Pointer.new; init-foo($p); should do the trick?
RabidGravy yeah, there is a little bit of that 11:07
nine One day I will replace the CArray[OpaquePointer] in Inline::Perl5 with that... 11:08
moritz wasn't there something about "is rw" in nativecall only working with natives?
nine moritz: Could be. I'm a bit out of date WRT NativeCall advances in the past yesr 11:09
RabidGravy bpetering, so this interface is in reality a 3rd party library you can't change?
11:09 vendethiel left
moritz bpetering: if "is repr('CPointer')" gives you one level of pointer, doing both Pointer and is rw gives you total of three levels of pointer 11:11
bpetering RabidGravy: it's libgit2, so I can't really change it :)
RabidGravy because if so and if all else fails I would go with making a tiny helper wrapper
in C
bpetering moritz: thanks, that's clearer than the docs are currently 11:12
RabidGravy yeah the nativecall docs probably could do with some love
11:12 dakkar joined
bpetering RabidGravy: I might go the wrapper route for now, since libgit2 is on the most-wanted nativecall list 11:13
cheers
Other improvements to language/nativecall: 11:14
what type/syntax to use for C structs with bitfields
why/when to use is repr('CPointer') vs plain is Pointer 11:15
RabidGravy yeah, I don't think there is anything for that right now
11:15 nige1 left
RabidGravy I think I'd go with some uint8 $!fields and then some accessor methods to pick the bits out 11:15
11:16 itaipu joined, fjk left
bpetering RabidGravy: that makes sense, I'd make the accessor methods return Int/Bool for width >1/1 11:16
(also assuming bit-fields pack on 8-bit boundaries, I can't remember)
Two other things I'm unclear about reading languages/nativecall for first time 11:17
1) are there any gotchas with translating certain C semantics like "volatile" into Perl 6 terms? 11:18
2) any issues to be aware of with threading/reentrancy?
So, the above, and how to sanely handle multiple levels of pointers
I'm happy to write things up but I don't myself understand any of this yet :o( 11:19
nine bpetering: well do you still have questions WRT multiple levels of pointers?
RabidGravy 1) dunno 2) depends on the library I think - some libraries keep static data which shags concurrency
11:20 Skarsnik joined
bpetering RabidGravy: i infer from that that threading/reentrancy is a per-library issue, might be worth making that clear in the docs 11:20
RabidGravy bear in mind you are treading a path not so well trodden with this stuff, of the nearly 500 modules in the ecosystem there are only two dozen that use NativeCall 11:21
11:21 rindolf left
bpetering nine: I still can't get my example working. Updated gist: gist.github.com/bpetering/031934a05ca1242a7def 11:22
RabidGravy: yeah. I couldn't see any existing NativeCall code that does what I'm trying to 11:23
nine bpetering: have you tried sub foo_init(foo is rw) ... ; my $p = foo.new; foo_init($p)?
11:23 fjk joined 11:24 hankache joined, lnrdo left
bpetering nine: "Method 'deref' not found for invocant of class 'foo'" 11:25
11:25 lnrdo joined, dakkar left
bpetering I'm trying to call .deref since (to my mind) I want to remove one layer of pointers 11:25
nine bpetering: if that doesn't work, this should do the trick: sub foo_init(CArray[foo]) ... ; my $foo_ptr = CArray[foo].new; $foo_ptr[0] = foo.new; foo_init($foo_ptr); 11:26
bpetering: I don't see a reason for deref??
bpetering: is rw means, "don't pass this as is, but pass a pointer to it". Just like foo_init(&myfoo) in C
11:28 itaipu left
bpetering yay! 11:29
11:29 lnrdo left
Skarsnik hm, your code should work x) 11:29
bpetering nine: that last example ends up working
Skarsnik hellp
*hello 11:30
bpetering (_shutdown sees the same pointer)
11:30 nige1 joined
bpetering o/ Skarsnik 11:30
RabidGravy yay!
bpetering thanks everyone :)
Ok, that's the really annoying bit 11:31
I think I'm unblocked for the rest of libgit2 now (it doesn't do that very often)
11:31 krunen left, bitmap joined
Skarsnik you can put say $p.WHAT before the deref in your original code? 11:32
I mean the gist you linked x)
hankache hello everyone! 11:33
haapy new year
happy**
nine bpetering: "is rw" works just as well: gist.github.com/niner/6cc82bfcbb6615acadd0
Skarsnik: ^^^
bpetering Skarsnik: 'say $p.WHAT' just results in segfault 11:35
11:35 bitmap left
bpetering nine: that's awesome 11:36
Skarsnik hm, that's really bad x)
bpetering moritz: the reason "is rw" didn't work in the beginning is because I wasn't calling foo.new 11:37
nine: that's a much nicer way to do it 11:38
I reckon it'd be worth putting a few examples into nativecall docs (with C code) that show how to handle cases like this one 11:40
I wouldn't have gotten to a solution without asking here
bpetering offers to (I had commit access to the spec tests years ago but have lost it) 11:41
Skarsnik That does not work to just class foo is repr('CStruct') {}; and playing with Pointer[foo] Pointer[Pointer[foo]]
RabidGravy yeah, that segfaulting shouldn't happen, but I imagine it would be very difficult to fix as the Ponter is as near to the metal as it gets in Perl 6 and may not have the infrastructure to support that
Skarsnik ?
bpetering Skarsnik: as far as I can tell, no 11:42
Skarsnik it should
bpetering Skarsnik: I'll try and get that case working for you
RabidGravy bpetering, I think you hit the channel at the optimum time :)
Skarsnik anyway afk lunch
11:45 vividsnow joined 11:46 TEttinger left
RabidGravy bpetering++ # make these things so we don't have to 11:46
bpetering RabidGravy: thanks :) 11:47
definitely right time
Skarsnik: no joy. segfaults all the way 11:48
11:48 rindolf joined 11:54 ugexe joined 11:57 spider-mario left 12:02 spider-mario joined 12:03 hankache left 12:07 pierre-vigier joined 12:08 nige1 left 12:09 kid51 joined
dalek kudo/nom: 42326d1 | lizmat++ | src/core/Array.pm:
Fix for RT #127093

It turned out that somehow the default value of the ContainerDescriptor for a typed, shaped array, wasn't set. By setting it explicitely, the described problem goes away. Perhaps this has something to do with the fact that you cannot set default values on shaped arrays yet.
  Jonathan: I was wondering whether the .new of ContainerDescriptor should
not just set the default attribute with the :of value if no :default is specified. OTOH, I'm not sure how to detect :default not being passed in nqp.
12:11
12:11 pierre-vigier left
Skarsnik bpetering, hm that pretty sad
12:15 iH2O joined 12:16 zengargoylew left 12:17 wamba left
bpetering Skarsnik: if you think so... it's workaroundable for me for now 12:17
12:17 zengargoylew joined
bpetering m: my $s = "foo"; explicitly-manage($s); 12:17
camelia rakudo-moar 3568c1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IoWrdUz_vz␤Undeclared routine:␤ explicitly-manage used at line 1␤␤»
bpetering why do I get "undeclared routine" there? 12:18
m: use NativeCall; my $s = "foo"; explicitly-manage($s);
camelia ( no output )
bpetering ah
RabidGravy gah, I thought I had got my head round sub-signatures in traits, but it seems I haven't 12:20
ah yes, I had to make more than one candidate 12:25
RabidGravy gets his refactoring thang on
12:25 _mg_ left 12:28 cpage_ left 12:29 loren joined
loren Evening, #Perl 6 12:30
lizmat loren o/
Skarsnik that look like a type github.com/rakudo/rakudo/blob/nom/...ll.pm6#L89 it should probably be char x) 12:31
RabidGravy eh up
loren lizmat, o//
RabidGravy Skarsnik, "signed" , isn't a "char" a uint8 12:32
Skarsnik char is signed 12:33
there is uchar and uint8 in the list that use this
ChoHag How can I write a test to prove that a class exists (and can be subclassed)? 12:35
Skarsnik if ::("classnmae") ? 12:36
RabidGravy use Test; ok ::('Int')
m: use Test; ok ::('Int')
camelia rakudo-moar 42326d: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/bItGc9i1RI line 1␤»
RabidGravy eh?
ChoHag Quite.
Skarsnik m: use Test; ok ::('Core::Int') 12:37
camelia rakudo-moar 42326d: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/icW_3ywoB9 line 1␤»
12:37 _nadim left
RabidGravy m: use Test; ok ::('Int').defined 12:37
camelia rakudo-moar 42326d: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/HrTF2p8PBL line 1␤»
RabidGravy is why 12:38
lizmat m: use Test; ok ::('Int').DEFINITE
camelia rakudo-moar 42326d: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/BxocsWQnER line 1␤»
lizmat hmmm
m: use Test; ok ::('Foo')
camelia rakudo-moar 42326d: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/2bOf50rx3U line 1␤»
RabidGravy use Test; ok ::("Foo") ~~ Failure ?? False !! True 12:41
m: use Test; ok ::("Foo") ~~ Failure ?? False !! True
camelia rakudo-moar 42326d: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/BLhCTmhqyf line 1␤»
RabidGravy m: use Test; ok ::("Int") ~~ Failure ?? False !! True
camelia rakudo-moar 42326d: OUTPUT«ok 1 - ␤»
RabidGravy may even merit a sub in Test: type-ok or somesuch 12:42
12:44 lucasb joined
ChoHag I want to write more than 0 tests before I start adding to existing test modules. 12:44
Skarsnik how the hell t/04/04.t passed in NC
ChoHag Now I have 1, so I'm on my way.
dalek kudo/nom: e63d878 | lizmat++ | src/core/Variable.pm:
We don't need a try to have a CATCH
12:45
RabidGravy as to be able to sub-class it's probably something in the manner of 12:48
12:48 SwellJoe joined
RabidGravy m: role F {}; class G {}; G.^add_parent(F); 12:49
camelia rakudo-moar 42326d: OUTPUT«Parents cannot be added to a class after it has been composed␤ in any add_parent at gen/moar/m-Metamodel.nqp line 787␤ in block <unit> at /tmp/hX6_aCV1pI line 1␤␤»
12:49 Actualeyes joined
RabidGravy m: role F {}; my $g := Metamodel::ClassHOW.new_type(name => "G"); $g.^add_parent(F); 12:50
camelia ( no output )
RabidGravy m: role F {}; my $g := Metamodel::ClassHOW.new_type(name => "G"); $g.^add_parent(F); $g.^compose
camelia rakudo-moar 42326d: OUTPUT«Cannot find method 'mro'␤ in any compute_mro at gen/moar/m-Metamodel.nqp line 931␤ in any compose at gen/moar/m-Metamodel.nqp line 3003␤ in block <unit> at /tmp/50Pp8pueeL line 1␤␤»
RabidGravy m: class F {}; my $g := Metamodel::ClassHOW.new_type(name => "G"); $g.^add_parent(F); $g.^compose
camelia ( no output )
RabidGravy yeah, so if it craps out when you compose you can't inherit from it :) 12:51
ChoHag Under what circumstances would it be impossible to inherit from a class? 12:52
RabidGravy well, well a "type" if it's a role as above
bpetering /quit 12:54
12:54 bpetering left
RabidGravy probably stuff that is pretending to be a class but doesn't have ClassHOW as an ancestor of its HOW 12:54
which is not impossible given enough crack 12:55
m: enum F <a b>; my $g := Metamodel::ClassHOW.new_type(name => "G"); $g.^add_parent(F); $g.^compose 12:56
camelia ( no output )
RabidGravy obviously I need more crack 12:57
12:57 iH2O left 12:59 flaviusb joined 13:02 cpage_ joined 13:04 thundergnat left, spider-mario left
ChoHag Can a Failure not be assigned to typed variables? Any more? 13:08
gfldex ChoHag: it can
ChoHag m: my Str $thing = Failure.new("wtf?") 13:09
camelia rakudo-moar e63d87: OUTPUT«Earlier failure:␤ wtf?␤␤Final error:␤ Type check failed in assignment to $thing; expected Str but got Failure␤ in block <unit> at /tmp/gZ6NaVERq3 line 1␤␤»
13:09 pierre-vigier joined, pierre-vigier left
ChoHag m: my Str $foo = fail("wtf?"); say so $foo ~~ Failure; 13:09
camelia rakudo-moar e63d87: OUTPUT«wtf?␤ in block <unit> at /tmp/DYPEHfZlar line 1␤␤»
ChoHag m: my Str $foo = fail("wtf?"); say "Still here."; say so $foo ~~ Failure; 13:10
camelia rakudo-moar e63d87: OUTPUT«wtf?␤ in block <unit> at /tmp/WUF376qNaE line 1␤␤»
lucasb 'fail' always throws; Failure.new does not
ChoHag m: sub foo { fail "wtf?" }; my Str $thing = foo; say "OK"; say so $thing ~~ Failure; 13:11
camelia rakudo-moar e63d87: OUTPUT«Earlier failure:␤ wtf?␤ in sub foo at /tmp/hSVZe4cmI3 line 1␤ in block <unit> at /tmp/hSVZe4cmI3 line 1␤␤Final error:␤ Type check failed in assignment to $thing; expected Str but got Failure␤ in block <unit> at /tmp/hSVZe4cmI3 line 1␤␤»
lucasb I always thought 'fail' was just shortcut for Failure.new, but apparently it's not
13:12 _nadim joined
ChoHag Still can't assign the Failure to Str $foo. 13:12
13:13 nige1 joined
lizmat m: say Failure.^mro # the probable reason 13:13
camelia rakudo-moar e63d87: OUTPUT«((Failure) Nil (Cool) (Any) (Mu))␤»
lucasb ChoHag: yes, I agree
lizmat m: my Cool $a = Failure.new 13:14
camelia ( no output )
ChoHag m: my Str $thing = Failure.new("wtf?") but Str
camelia rakudo-moar e63d87: OUTPUT«Cannot mix in non-composable type Str into object of type Failure␤ in block <unit> at /tmp/tGHnOLIYZD line 1␤␤»
13:14 darutoko left
ChoHag Didn't think so. 13:14
bonsaikitten bpaste.net/show/047e0947db71 I have no idea why make install implodes :( 13:16
AndyDee Worth a watch if anyone is having a little break or so : www.youtube.com/watch?v=kwxHXgiLsFE 13:17
rindolf Hi all! Sup? 13:18
13:18 CIAvash left
ChoHag So am I not supposed to be able to assign a Failure to a typed object? 13:19
I'm reasonably sure I could before, although it's been a while since I wrote that part of the code.
Skarsnik m: my Str $f = Nil; 13:20
camelia ( no output )
13:21 xpen joined, spider-mario joined
Skarsnik bonsaikitten, what did you do? give us more context ^^ 13:21
gfldex bonsaikitten: could you change 'M_RUNNER = perl6-m' to 'M_RUNNER = perl6-m --ll-exception' in the Makefile to make it more talkative? 13:24
13:25 xpen left
lucasb well, it's at least a little inconsistent that failures do *not* respect subroutine return type constraints, but it *does* respect type constraints in variables 13:26
ChoHag It's kind of annoying. I was using it to trick a class into being instantiated before I had all the required values, then supplying them afterwards. 13:27
And why is an idle VM using ~35% of the host CPU?
Skarsnik m: use NativeCall; my Pointer[Pointer[int32]] $a. say $a.WHAT;
camelia rakudo-moar e63d87: OUTPUT«5===SORRY!5=== Error while compiling /tmp/N0Q8v0AJG4␤Two terms in a row␤at /tmp/N0Q8v0AJG4:1␤------> 3Call; my Pointer[Pointer[int32]] $a. say7⏏5 $a.WHAT;␤ expecting any of:␤ infix␤ infix stopper␤ statement e…»
Skarsnik m: use NativeCall; my Pointer[Pointer[int32]] $a; say $a.WHAT; 13:28
camelia rakudo-moar e63d87: OUTPUT«(NativeCall::Types::Pointer[NativeCall::Types::Pointer[int32]])␤»
13:29 spider-mario left, fjk left 13:31 spider-mario joined
lucasb yeah, I found the ticket I was looking for: rt.perl.org/Public/Bug/Display.html?id=126631 13:32
m: Exception.new.fail; say 'hi'
camelia ( no output )
lucasb ^^ I think this is the same case
the fail subroutine was fixed, but the issue still lives in the Exception.fail method 13:33
Skarsnik RabidGravy, gist.github.com/Skarsnik/31a1099ceb0ea595e173 do you think it's fine like this? (I really don't like the .new on $ptr2) It work but maybe a is alloc trait could be more explicit x) 13:36
13:37 loren left
ChoHag Shouldn't an unhandled Failure report itself? 13:37
m: sub foo { my $bar = Failure.new("wtf"); True }; foo
camelia ( no output )
lucasb I think this only happens in sink context 13:39
ChoHag According to Failure.pm it's checked for whenever the Failure's DESTROY is called.
bonsaikitten gfldex: bpaste.net/show/782742b7f6a1 13:45
Skarsnik: I'm trying to upgrade from 2015.11 to .12 :)
gfldex bonsaikitten: please nuke your rakudo/install or whatever is your --target 13:47
ChoHag That's not it.
13:47 theorbtwo left
bonsaikitten gfldex: the what in the what? 13:47
ChoHag Smells to me like precompilation as non-root into the prefix rather than workdir. 13:48
Besides, installing at this early juncture into /usr is insanity. 13:49
gfldex bonsaikitten: in that one month the module loader code was changed quite heavily, leading to all sorts of problems
13:49 regreg joined 13:50 virtualsue joined
gfldex ChoHag: somebody has to test it at some point. That way it's him not you who gets burned. :) 13:50
bonsaikitten I always find the best bugs
13:50 kid51 left
ChoHag I already got burned :) 13:50
Skarsnik and 2012.12 is still buggy for it?
ChoHag bonsaikitten: Build with and install into a prefix under your user's control. And in general don't mix pre- or early-release code with your base system. 13:51
bonsaikitten ChoHag: since this is a relatively pristine chroot ... already there, mate :) 13:52
ChoHag Well if it's just for rakudo then go nuts.
But ISTR issues around the build process requiring write access to the install location. 13:53
Run as root or, preferably, install elsewhere.
bonsaikitten or sandbox it
if it tries to misbehave it dies :)
ChoHag It's perl. Misbehaving is what it's for.
nine ChoHag: I'd just write use Test; use MyClass; class MySubClass is MyClass {}; MySubClass.new; plan 1; ok; # that way you test that MyClass does exist and is subclassable. 13:55
RabidGravy Skarsnik, that looks sane-ish at least 13:57
Skarsnik I did not change a thing
I am just addding test in 04-pointer.t x)
ChoHag I prefer to have my tests fail individually than have the entire script blow up where possible. 13:58
Plus I can't .new because there are required attributes, but that's another story.
13:59 leont joined
moritz m: say ::('Int') !~~ Failure 14:00
camelia rakudo-moar e63d87: OUTPUT«True␤»
moritz m: say ::('Nosuchclass') !~~ Failure
camelia rakudo-moar e63d87: OUTPUT«False␤»
moritz m: say ::('Nosuchclass').^name
camelia rakudo-moar e63d87: OUTPUT«Failure␤»
14:03 darutoko joined
RabidGravy ChoHag, maybe use eval-live-ok and put the class definition in a string? 14:08
ouch 14:09
14:10 pierre-vigier joined
RabidGravy m: class Foo:ver<v0.0.1> {}; say Foo.^ver 14:10
camelia rakudo-moar e63d87: OUTPUT«vv.0.0.1␤»
RabidGravy IT'S VERSION BOUNCING TIME!
Skarsnik ?
that... interesting
14:11 perlawhirl joined, pierre-vigier left
RabidGravy all my modules that are versioned like that have the v which is not what is intended 14:11
14:11 nash joined
ChoHag Why are private multi-methods not supported? 14:12
Skarsnik It's most likely a bug
14:12 cygx joined
cygx m: class Foo:ver(v1) {}; class Bar:ver<1> {}; say Foo.^ver; say Bar.^ver 14:12
camelia rakudo-moar e63d87: OUTPUT«v1␤v1␤»
14:12 deniska left
RabidGravy yeah, it's not a bug, it's my brane being useless 14:13
perlawhirl m: say (1...Inf).grep(*.is-prime)[10000];
Skarsnik Union in C are not named?
camelia rakudo-moar e63d87: OUTPUT«(timeout)»
ChoHag RabidGravy: Seems like it might make sense to treat versions of 'v.*' as '*'.
perlawhirl m: say (1...Inf).grep(*.is-prime)[100];
camelia rakudo-moar e63d87: OUTPUT«547␤»
14:14 deniska joined
lizmat I'm still not sure it is a good idea to allow versioning on a class :-( 14:14
perlawhirl Was just looking at perl6 examples... are the Euler solutions neglected? Looking at this: examples.perl6.org/categories/euler...ettix.html
ChoHag Why?
RabidGravy ChoHag, I made some code that hacks around it in META6 but it's doing what is being asked for here
lizmat, not so sure my self 14:15
anyway off out to the shops and maybe the pub
timotimo o/
masak perlawhirl: what makes you think they're neglected? 14:17
14:17 virtualsue left
perlawhirl the one i posted... would it not be better as: say (1...Inf).grep(*.is-prime)[10000]; 14:18
is faster on my machine, less verbose 14:19
14:19 RabidGravy left
cygx perlawhirl: also, probabilistic and using a built-in instead of low-level 14:20
14:20 virtualsue joined
perlawhirl cygx: exactly... showing off perl's operators 14:20
14:21 wamba joined
cygx perlawhirl: feel frww to add your own version to github.com/perl6/mu/tree/master/examples/euler 14:21
*free
perlawhirl cygs: k
14:22 xpen joined
cygx jold on, I think that's the wrong repository 14:22
(fails at typing more than ordinary today)
masak perlawhirl: people's tastes differ, but using a built-in to trivially get an answer does not feel to me like solving a Euler problem. I'm none the wiser afterwards.
(but I can also argue the other side of that. "if there's a one-line solution to something, then we should use that") 14:23
cygx perlawhirl: here we go: github.com/perl6/perl6-examples/tr...ries/euler 14:24
perlawhirl I guess I understand... a one-liner implementation is a Rosetta Code solution; a low-level implementation is more of a Euler solution.
cygx depends on what you're trying to show off 14:25
14:26 xpen left
masak it does. I wouldn't mind having both solutions :) 14:26
perlawhirl cygs: you right... though my own prejudice is i that the faster solution should win out.
masak faster, more elegant, simpler 14:27
14:27 nanis joined 14:29 nanis left
cygx (but successible to attacks via pseudoprimes in a cryptographic setting) 14:29
*susceptible 14:30
perlawhirl :D was about to correct you... i understood
masak cygx: I'm not sure that's applicable here, though
perlawhirl nah... euler puzzles, like most programming puzzle, favour simple solutions. like error checking is unneccessary overhead 14:31
14:31 nash left, iH2O joined
nine m: class Foo:ver(v0.0.1) {}; say Foo.^ver 14:31
camelia rakudo-moar e63d87: OUTPUT«v0.0.1␤»
leont Searching for cryptographic primes uses different algorithms than what imagine we use for smallish numbers
nine .tell RabidGravy class Foo:ver(v0.0.1) {}; say Foo.^ver 14:32
yoleaux nine: I'll pass your message to RabidGravy.
cygx and now for something completely different: anyone else amazed by the fact that of all things, Oracle is apparently succeeding at bringing the Parrot vision to fruition?
leont There is some irony in there, yes 14:33
cygx nine: already brought to RabidGravy's attention
14:34 iH2O left, SwellJoe left
cygx is talking about Graal/Truffle, cf eg lists.ruby-lang.org/pipermail/jruby...00262.html or www.youtube.com/watch?v=OUo3BFMwQFo ) 14:35
14:38 nbrown joined, ParsonsNose left, nbrown left 14:39 nbrown joined 14:40 _mg_ joined 14:41 hankache joined 14:42 lucasb left
ChoHag I'd say Oracle want their own java ecosystem, but they have one. 14:44
Or rather, it.
Maybe part of Oracle hasn't realised that they bought Sun yet?
Part of them still doesn't realise that they have ZFS, for example. 14:45
14:45 pmurias joined
pmurias cygx: from a quick look at it Graal/Truffle seems like it would be really awesome for Perl 6 14:46
14:47 arthur_ joined 14:48 nowan left 14:49 virtualsue_ joined, virtualsue left, virtualsue_ is now known as virtualsue, bpmedley_ left, ugexe left
Skarsnik the fact that is written in java sounds scary x) 14:51
14:52 nowan joined, vendethiel joined
ChoHag They've written a VM in java? 14:52
That sounds redundant, but nothing from Orrible would surprise me.
pmurias ChoHag: they have added support for having your own jit for your dynamic language runnning on top of the jvm, with a tool to generate such a git 14:55
14:56 virtualsue left
pmurias IMHO Graal/Truffle is one of the most promising ways to get killer speed for Perl 6 14:58
15:00 vividsnow left, vividsnow joined
leont It is interesting for sure 15:00
15:00 virtualsue joined
blub + 15:00
oops
15:04 zakharyas joined 15:08 mscha joined
dalek kudo/nom: 3ea4dff | lizmat++ | src/core/Variable.pm:
Make error messages on "is default/dynamic" better

This is really the result of trying to make "is default/dynamic" work on shaped arrays. This has failed, because at the moment the trait code is run, the shaped array does not have a descriptor initialized yet. Which means we're trying to look up attributes in a type object, and thus fail.
15:08
15:11 pierre-vigier joined, pierre-vigier left 15:12 pierre-vigier joined 15:13 pierre-vigier left 15:15 AlexDaniel joined 15:16 perlawhirl left 15:29 nige1 left 15:31 _mg_ left
timotimo has anybody been able to figure out where the "The Perl Jam 2" guy found the "only scalars are considered safe" concept? 15:31
15:31 _mg_ joined
Skarsnik No idea 15:31
timotimo since i have no clue about p5, how likely is it that he found that concept somewhere vs. that he just plain made it up? 15:33
lizmat <cynic mode=on>the guy is only interested in looking good for his boss</cynic>
pmurias timotimo: what's the "only scalars are considered safe" concept? 15:34
lizmat fwiw, having this guy work for the company he works for, would be a reason for me to never do business with that company
timotimo lizmat: hey now, you're just giving him more food for his "the perl community is mad, evil and aggressive" thing 15:35
pmurias: did you see the "The Perl Jam 2" talk?
pmurias no?
lizmat timotimo: I'm stating a business reason
timotimo media.ccc.de/v/32c3-7130-the_perl_jam_2#video
stmuk_ booo 15:36
timotimo BBIAB
15:36 z8 left
autarch timotimo: I've been doing p6 for about 17 years and I've never heard anyone say "only scalars are considered safe" or anything like that 15:37
I'm not sure given this guy attention is a good idea, btw - when someone says something ridiculous arguing with them is not necessarily useful
timotimo it's not about p6, it's about p5 15:38
stmuk_ its a mix of a little good stuff with a lot of FUD
timotimo also, on media.ccc.de alone it has 25k views, no clue how many on youtube on top of that ...
people will very likely be believing what he says and thinking perl5 is Really Bad™ 15:39
BinGOs he'll do p6 next time.
cygx as far as I could see, the take-away of that talk: enable taint mode
timotimo yeah, so what? p6 doesn't have 20 year old modules that are already very deprecated and warned against that he can claim are "perl6 core" and deconstruct in a silly manner
leont It does feel like arguing with him is like playing chess with a pigeon, he'll shit on the board and proclaim himself a winner anyway
cygx timotimo: yes, our code modules are only 10 years old ;) 15:40
15:40 bpmedley joined
cygx *core 15:40
timotimo no, our core modules are Test.pm, lib.pm (if it's still in there?), and NativeCall.pm 15:41
cygx I'd include the setting with that
timotimo our rakudo star modules, however, that's something we should be giving special care to anyway
not just because we have someone out there who would like to give a talk on how terrible our stuff is.
15:42 wamba left
timotimo in general, i expect it'd be a good idea to pretend there's someone out to shit all over your project all the time :P 15:42
let fear inform your every decision
anyway, BBIAB 15:43
15:43 nexysno_ joined
autarch actually, Test.pm has a lot of issues ;) I'm working on something I hope can supercede it soonish 15:44
I really don't want to see p6 paint itself into the corner that p5 has with tests
nine There is no lib.pm anymore 15:48
15:50 khw joined 15:51 pjscott joined, lucasb joined
dalek c: 099bf5c | lizmat++ | doc/Language/setbagmix.pod:
Emphasize actual code point values of set ops
15:52
pmurias timotimo:
15:53 nexysno_ left
leont autarch: actually, I have a similar project (though in a very early stage), we should talk 15:53
autarch leont: yeah, definitely - basically I'm working on a minimal Test::Stream implementation
hankache yeay!! keep up the good work!! 15:54
autarch although long term I'd really love to move us away from TAP - TAP is really not a very good protocol, unfortunately
leont I could have said exactly the same, it seems it's the obvious good idea
autarch or maybe we just need TAP14
lizmat afk&
leont I've been on the fence about that for some time
autarch there's a lot of information missing from TAP as it stands currently
like timing, subtests, more structured diagnostics, etc.
leont Agreed. Extended diagnostics and better subtests could help, but it's all hacks on top of it 15:55
15:55 azawawi joined
azawawi moritz: ping 15:55
awwaiid true, but the simplicity of starting out with TAP is hard to beat
Skarsnik hello azawawi, I merged your work on PG array in DBIish 15:56
azawawi is irclog.perlgeek.de/perl6/search down?
15:56 nexysno_ joined
hankache azawawi not working for me 15:57
azawawi Skarsnik: thx but unfortunately it was not 100% finished
autarch leont: well, that's why I say it'd be TAP14 rather than just jamming stuff into the space TAP currently doesn't parse
github.com/autarch/perl6-Test-Stream - here's my WIP 15:58
moritz azawawi: pong
Skarsnik azawawi, well feel free to refork DBIish, at least you will not have to bother with merging your change
azawawi moritz: happy new year first of all :)
moritz azawawi: same to you 15:59
15:59 nexysno_ left
leont should push mine to github too 15:59
azawawi moritz: also i thank you for all the years you maintained irclog.perlgeek.de/perl6/today. :)
moritz++ 16:00
moritz: that saying it seems that irclog.perlgeek.de/perl6/search is giving "Internal Server Error". Any chance you could please fix it?
any Encode::Detect for perl 6? 16:02
moritz azawawi: willl take a look at it; most likely the OS updated broke it
leont Awesome, it doesn't load with a "Failed to open file /home/leon/.rakudobrew/moar-nom/install/share/perl6/site/dist/096147B105DF24C279985A3228849EACD85B1C83: no such file or directory" error
16:03 lnrdo joined
autarch leont: do you mean my code or yours? 16:03
leont Mine
autarch ok, cause mine won't even compile, I'd guess ;)
azawawi i like the 096147B105DF24C279985A3228849EACD85B1C83 part :)
leont (I tried running tests before pushing)
autarch azawawi: I think there are plans to fix that so it has a sane filename 16:04
16:04 ugexe joined
leont (whatever, it's a stub anyway) 16:04
cygx autarch: I believe the filename is supposed to stay, but the error reporting is supposed to list the original one 16:05
16:05 Actualeyes left
autarch ah, ok 16:05
moritz azawawi: irclog.perlgeek.de/perl6/search/?ni...&q=foo works again, thanks for the report
16:09 mscha left, zwu joined
leont github.com/Leont/test-stream6 16:10
azawawi moritz: thx
moritz++
autarch: cool
autarch leont: heh, we started on opposite ends of the implementation 16:11
dalek p: ed8ed36 | (Pawel Murias)++ | src/vm/js/ (6 files):
[js] Add very basic start of an implementation of the nativecall ops.

Pass t/nativecall/01-basic.t
leont Pretty much :-p
autarch leont: I'm trying to get away from some of the p5 Test::Stream design decisions - conflating results with todo and skip events, for example
I think that'll make it easier to handle other output formats for one thing 16:12
16:12 _mg_ left
leont I did the same for skip, but not for todo. I did consider it. 16:12
16:12 kk_ joined
autarch it also makes dispatching event receivers easier since you can have a multi dispatch on the event type distinguish between test output, todo, skip, etc. 16:12
timotimo pmurias: you highlighted me; was there something you wanted to say?
autarch my reasoning is that non-TAP formats may want to handle this quite differently 16:13
leont Yeah, I split up all types of plans into different types, but I wasn't sure if that'd make sense for testing events too, mainly from the emitter's point of view
autarch like maybe a non-TAP format has some output it prints before a set of todo tests - so the todo event should come in separately
16:13 pierre-vigier joined, pierre-vigier left, azawawi left
leont You mean setting the $TODO? 16:13
16:14 pierre-vigier joined
autarch leont: Test.pm6 has a todo() sub as opposed to a global 16:14
which was a good design choice
16:14 CIAvash joined
leont I don't really like either, but I'm not sure what'd be better 16:14
A todo block may be nice, but lacks some of the flexibility that a variable has (for conditionally setting it) 16:15
16:15 pierre-vigier left
pmurias timotimo: just pressed enter by accident :/, was meaning to complain about that talk (and the speaker in it) being ultra annoying, then decided not so as not to diverge the discussion 16:15
autarch well, providing a Proxy variable is always an option - the actual provider of test tools to .t files can do whatever it wants to do 16:16
leont True
timotimo pmurias: that's just because he's french. he can't help it! 16:18
leont Wasn't planning to really tackle it until I had a Test::Context equivalent.
timotimo (just a silly stereotype, i know)
stmuk_ what happens if one ecosystem module lists the same dependency as another which is already installed? the panda install of the second will fail without --force?
16:18 pjscott left
leont There is a good idea in there, even if I'd implemented it differently than Exodist did 16:18
stmuk_ oh "errornous" is mispelt as well 16:19
autarch leont: what's the good idea?
leont Not having to deal with $Test::Builder::Level
autarch ah, right, that is definitely something to avoid
hankache stmuk_ yes 16:20
16:20 llfourn left
autarch I hadn't event gotten that far because I wasn't thinking about the Test.pm6-equivalent side of things yet 16:20
I note that with p6 we can write things like "temp context() = new-context()" 16:21
stmuk_ shouldn't it just skip the installed dependency?
autarch I wonder if there's a way to inject LEAVE blocks into the caller's scope - then you can just write 'new-context();' 16:22
leont I suspect a todo block is the cleanest thing in most cases. It could just be a filter that turns all test results in todo events.
autarch yeah, that would probably be the nicest to read
16:22 ugexe left 16:23 xpen joined
hankache stmuk_ yes but i got no idea what is going on 16:23
leont Some solution for conditional todo is needed too, but that's uncommon enough that it shouldn't be optimized for
hankache stmuk_ github.com/tadzik/panda/issues/269 16:24
autarch leont: that's very simple ... todo-if $boolean, { ... }, 'reason for todo'; - or something like that 16:25
if boolean is true, emit the Todo event, if not, don't
leont Yeah, though I dislike the comma there (but getting rid of that is probably not worth it)
stmuk_ hankache: thanks that's useful 16:26
16:27 xpen left
leont autarch: splitting out todo does complicate subtests :-/ 16:30
autarch leont: why?
16:30 kkrev joined
leont I have different types for simple tests and subtests, so splitting out todo means adding two classes instead of one. May be able to handle that with roles, but… 16:31
autarch I'm not sure you need to separate tests and subtests 16:32
kkrev is rakduobrew + panda broken? pastebin.com/tgipKUx3
autarch I think the only difference is what goes in the summary when one ends, but if there's a separate "Finalize" event or something like that, that could trigger the "end of .t" summary
leont It's the difference between a scalar and an array, really
16:34 RabidGravy joined
leont (I'm joining the subtest early, I suppose one could join it later too, but that may get tricky with multi-threading) 16:35
autarch leont: I think that should be left up to the event listener, not the emitter 16:36
leont Maybe
autarch if you're running in parallel you set up one listener per thread, then do ... whatever you want in each listener
and have some sort of orchestrator object that manages all the listeners, doing the right thing when one receives a Finalize event
16:37 hankache left
timotimo kkrev: can you tell us perl6 --version for this? i'll look into the test failure of shell::command 16:37
(need to build an up-to-date perl6 first)
stmuk_ I have installed a module (HTML::Parser::XML) but 'use HTML::Parser::XML' fails in the REPL 16:40
16:42 kk_ left
Rotwang quick question: in src/core/Mu.pm I see multi sub infix:<=:=>($?) { Bool::True } 16:42
How infix can get one argument?
lucasb when reducing 16:43
cygx m: say [=:=] 42
camelia rakudo-moar 3ea4df: OUTPUT«True␤»
AlexDaniel I've just realized that you can write a whole program inside double quotes
m: say “{sub foo { say ‘hello world’; return ‘test’}; foo }”
camelia rakudo-moar 3ea4df: OUTPUT«hello world␤test␤»
Rotwang second question, what is $? 16:44
some kind of "garbage container"?
lucasb anonimous scalar variable?
cygx Rotwang: optional anonymous scalar parameter
lucasb *anonymous :)
Rotwang cool,thanks!
16:45 nexysno_ joined
cygx which means zero-arg =:= is true as well 16:45
AlexDaniel m: say “{sub foo { say ‘hello world’}; ‘test’ }”; foo
camelia rakudo-moar 3ea4df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vKHbpVAIKM␤Undeclared routine:␤ foo used at line 1␤␤»
cygx m: say [=:=]
camelia rakudo-moar 3ea4df: OUTPUT«True␤»
lucasb I wish a single "$" meant "my $", not "state $", since using 'my' is more common, but ok, I can live with it 16:46
leont Subtests are annoyingly full of complications :-/ 16:47
dalek ecs: 71d0c0c | util++ | S32-setting-library/Containers.pod:
[S32::Containers] Change duplicate =item of `pairs` into `antipairs`; Fix typo from db834e73 .
16:48
ecs: b0657be | util++ | S32-setting-library/Containers.pod:
[S32::Containers] Add =item for `enum`.
AlexDaniel m: say “{“{“{“{“{“{“uhh!”}”}”}”}”}”}” 16:51
camelia rakudo-moar 3ea4df: OUTPUT«uhh!␤»
zwu the calling set of method is so cool. I have another question, is there any convenient call method wrapper that automatically captures all exceptions and returns a default value if the method fails 16:52
16:54 nexysno_ left, nexysno_ joined
lucasb zwu: maybe (try foo()) // 'default value' 16:54
16:55 nexysno_ left, protium left 16:57 nexysno_ joined
kkrev timotimo, I blew away the rakudo directory and rebuilt everything from scratch and now no problems. No idea what the issue was. 16:59
timotimo ah, OK
hopefully it was just an outdated version of rakudo or some old modules sticking around that should ahve been cleared or something like that
vendethiel lucasb: well, I argued for that as well, but in hindsight I recognize it's more useful that way 17:00
cygx reminds me of the windows experience in the days of yonder: "Have you tried rebooting yet?"
lucasb vendethiel: the "state $" thing? ok. but some new user will eventually use it inside subroutines and get surprised to see previous results getting cached :) 17:02
vendethiel then the way the learned it is wrong ;-)
mst the whole point of state over my is caching, no?
I mean, that's what makes it ... state ... 17:03
vendethiel mst: the point is "lone $"
mst ah
what's that even for? :) 17:04
lucasb to be honest, I don't know why 'state' outside subroutines work
17:04 kkrev left
lucasb (I'll try with p5, just a sec) 17:04
sprocket hello, p6!
lucasb hum, ok, no warnigs with P5 too 17:05
flussence $ is kinda like a capacitor, needs something on the left hand side of the statement to be useful because you can't refer to it again in that scope
TimToady sprocket: howdy!
sprocket i’m experiencing some odd behaviours with perl6 on my raspberry pi, was wondering if anyone might have any insight
mst flussence: oh, right, so basically you'd do something like sub () { $ = foo() }
flussence: to memoize the foo() call?
flussence yep, though with more //= 17:06
sprocket i’d written bindings onto the wiringPi library, and one of the subroutines allows one to register a callback function
AlexDaniel lucasb: why should it only work inside subroutines?
17:06 blub left
AlexDaniel m: for ^5 { state $s; say $s += 50 } 17:06
camelia rakudo-moar 3ea4df: OUTPUT«50␤100␤150␤200␤250␤»
sprocket but it seems everytime that an interrupt happens and the callback is supposed to be run, perl6 dies with a GC error: “Invalid GC status observed; aborting”
lucasb AlexDaniel: well, that was how I learned about 'static' variables in C. but ok, Perl is more flexible 17:07
sprocket i suppose that’s actually more of a MoarVM thing than perl6, actually
TimToady yeah, and most of the pi people hang out there too
leont Don't know about state in p6, but in p5 it gets tricky to intuit about it when closures come into play
flussence reads backlog then goes to fix these f'ing github notifications to actually notify me, because I only saw Zoffix's bug report there by chance...
TimToady though the pifolk are a rare breed, due to the need for extreme patience :) 17:09
RabidGravy sprocket, is there a supply involved somehow? I've seen that trying to schedule a Supply.interval on the GTK::Simple scheduler
yoleaux 14:32Z <nine> RabidGravy: class Foo:ver(v0.0.1) {}; say Foo.^ver
sprocket RabidGravy: no supply yet…the section of code in MoarVM that die’s is dealing with interrupts however, and as that’s how the callback function was supposed to be called, i had suspicions they were related 17:10
RabidGravy nine, yeah it's just my stupid I'd been writing :ver<v0.0.1> everywhere
17:10 vendethiel- joined
sprocket however, it’s been a long time since i’ve done any interrupt related stuff, so i’m just making assumptions 17:11
timotimo sprocket: you may have to read the "gc_enter_from_interrupt" thing again; what "interruption" means in this case is mostly "one thread wants to GC and others have to join in so that it can start" 17:12
TimToady is it possible that interrupts are running on a different stack?
RabidGravy :)
TimToady I could imagine that would confuse a GC
timotimo interrupts like posix signals are handled on a dedicated thread
sprocket TimToady: i have no idea :)
17:12 vendethiel left
timotimo then they are handed off to other parts because what you can do in a signal handler is extremely limited 17:13
sprocket TimToday: is that sometime i’d have to worry about, or MoarVM would be concerned with?
RabidGravy TimToady, well I know there are at least two people *here* making stuff for the RPi (except i got pre-empted by something else)
TimToady timotimo: if the GC examines the stack, and it's in an unexpected place...
timotimo we don't use the C stack, though :)-
moar bytecode stack frames are on the heap
mst flussence: I keep meaning to write a bot so my github notifications arrive in irssi rather than by email
TimToady Moar itself has various things on the C stack 17:14
some of which are related to GC
timotimo right 17:15
but it doesn't let the GC loose on the C stack, that's what i meant
RabidGravy and I blame ZoffixWin for the pre-emption :)
sprocket is it possible for me to generate a more usefull (moar useful?) backtrace?
timotimo sprocket: MVM_JIT_DISABLE usually gets rid of the "??" stack frames
17:15 llfourn joined
TimToady isn't jit already disabled on RPi? 17:16
sprocket timotimo: is that an $ENV variable, or a compile time flag?
timotimo an env variable
oh, raspberry pi?
TimToady did you try --ll-exception?
timotimo yeah, if it's a 32bit x86 or an arm processor we can't jit
TimToady (yet)
timotimo doc.perl6.org/language/operators#Hyper_Operators - i think the part "Hyper operators are defined recursivly on nested arrays" wants to read "unary hyper operators" or be fixed another way
yeah, can't jit yet. x86 jit would be super annoying because of the low amount of registers 17:17
and arm jit would be a totally new piece of work, as the instruction set is so different
sprocket TimToady: running with --ll-exception now 17:19
RabidGravy with some arm processors you could jit to a subset of java bytecode and have the processor do the actual jit itself :)
timotimo haha, yeah
17:19 ugexex joined 17:20 llfourn left
timotimo m: (1, (1, 2), 2, (3, 4), 4).duckmap(*.++) # maybe this shouldn't work, but what it should definitely not do is time out ... 17:20
sprocket —ll-exception didn’t work - it looks like it’s Moar that’s having a panic, not perl6
17:20 _nadim left
camelia rakudo-moar 3ea4df: OUTPUT«(timeout)» 17:20
sprocket line 255 is the error i’m getting: github.com/MoarVM/MoarVM/blob/mast...hestrate.c 17:21
mst sprocket: maybe try running the moar test suite and see if that blows up?
timotimo sprocket: you can attach gdb, let it break in the line before it panics and then "print MVM_dump_backtrace(tc)" to get the perl6-level backtrace
17:21 _nadim joined
sprocket timotimo: will do 17:21
timotimo mst: moar doesn't have its own test suite, though. we rely on the nqp test suite to test stuff
lucasb moar doesn't have a test suite, has it?
mst or listen to the people like timotimo with less generic advice
ah
timotimo :)
ugexex this darn linode DoS is seriously effecting my irc idling 17:22
mst ok, what I meant was "run the lowest level test suite you can find" 17:23
since that's often a common debuggering approach
17:23 zwu left 17:24 xpen joined
timotimo the nqp tests don't exercise multi-threading much, i fear 17:24
if at all
pmurias timotimo: there is t/concurrency 17:26
lucasb m: (1).duckmap({die}) 17:27
camelia rakudo-moar 3ea4df: OUTPUT«(timeout)»
timotimo OK 17:28
lucasb: nice golf ;)
17:28 dnmfarrell joined 17:30 patrickz joined
pmurias timotimo: I haven't worked on expanding that as node.js doesn't support threading 17:31
timotimo yeah, that's fair
no worries, you're still doing excellent work :)
also ... i thought it supports threading now?
anyway, gotta be AFK for a bit
17:31 AlexDaniel left, firstdayonthejob left 17:34 firstdayonthejob joined
dnmfarrell Hey folks, I'm running the latest Perl6 and panda, and for my distribution, Pod-Perl5 the tests all pass when run locally. However if I do "panda install ./", ("The spawned process exited unsuccessfully (exit code: 1)"). Anyone have a hunch as to what could have changed? Repo is here: github.com/dnmfarrell/Pod-Perl5 17:37
17:38 pierre-vigier joined 17:39 pierre-vigier left, pierre-vigier joined
timotimo dnmfarrell: that sounds like tests aborted? doesn't it give more info up above? 17:39
17:40 pierre-vigier left
dnmfarrell timotimo: yeah the tests fail with a variety of things: strings not initialized or expected counts of Pod tokens are wrong etc. 17:40
lucasb that is the same message kkrev had in the backlog and he said nuking everything and starting again fixed it 17:41
I mean, the message 'The spawned process exited unsuccessfully'
dnmfarrell Does Panda create a "blib" style directory?
timotimo lucasb: that message means absolutely nothing 17:42
lucasb: it's what panda says when the tap suite returns non-success
which means tests failed
lucasb yes, it's pretty vague, sorry :)
17:43 SwellJoe joined
timotimo but yeah, maybe nuking the rakudo install folder helps; could be a stale module in the installation cache that still uses the old versioning scheme 17:43
dnmfarrell I can only find files like "~/.rakudobrew/moar-nom/install/share/perl6/site/resources/E056605C0EECCF0E15C1CD8BD30FD092C74B683D "
ok
let me try it
timotimo ... or was that only for precomp? 17:44
dnmfarrell lol, I nuked the install dir and now I get: ".rakudobrew/bin/panda: Argument list too long" 17:45
RabidGravy dnmfarrell, no blib anymore
Skarsnik damn we have nothing to parse yml file?
mst there's several YAML modules IIRC
Skarsnik oh I was searching only yml ><
mst of course, YAML is usually a terrible idea :)
Skarsnik json syntax is annoying
autarch hmm, there's no destructuring return declarations? sub foo (--> Int, Str) { ... }
dnmfarrell I was wondering if some files are not being copied across during the build phase, as the module has a lot of sample pod files that are used by the unit tests
17:46 lnrdo left
autarch I can declare (--> List) but that's not very useful 17:46
Skarsnik autarch, to say it can return multiple object?
leont Skarsnik: I have written a YAML parser, it's in the module list as YAMLish
autarch Skarsnik: to say it will return exactly N things of X, Y, Z types
TimToady autarch: a subset type might work
autarch TimToady: ah, yeah, that probably would
RabidGravy autarch, I've used subsets for this 17:47
autarch but is returning more than one value discouraged or something? it seems like this is harder than it should be
17:47 zakharyas left
dnmfarrell ok I'm rebuilding moar and then panda, let's see if that does the trick 17:47
RabidGravy e.g github.com/jonathanstowe/Audio-Lib...ut.pm#L313
leont autarch: Returning a Slip may be what you want
But no you can't destructure it 17:48
TimToady the question is how you expect the caller to deal with it downstream
Skarsnik or I will go with ini format x)
TimToady it's pretty easy to return things that only work right when bound, not when assigned 17:49
sprocket argh, i don’t with my gdb skills are sharp enough to handle this issue :)
timotimo www.reddit.com/r/perl6/comments/3z...d_modules/
TimToady sprocket: one can improve one's skills... :P
timotimo sprocket: it'd also be interesting to see what the exact value is that it complains about
pmurias timotimo: there is a threads module for node.js by au++ but it seems to be only web-worked-style threads 17:50
17:50 lnrdo joined
autarch TimToady: can I write "my ($int, $str) = returns-int-and-str()" ? 17:51
sprocket TimToady: working on it! ;)
pmurias timotimo: which are not powerful enough for Perl 6
TimToady yes, it works with scalars, but falls down as soon as you want to return a list or array early
autarch I guess my bigger question is ... what's the best practice for a sub that returns multiple unrelated values (as opposed to a list or array)?
lucasb return multiple values is to return a list, right? 17:52
nine dnmfarrell: panda doesn't create a blib anymore. Couldn't find a reason to create one.
lucasb iiuc, there is no multiple return values like Common Lisp
TimToady well, there's also rw params
autarch but a list implies "0+ values" - what if I'm trying to say "I'm returning 2 values"
sprocket timotimo: what do i have to do to get that value? will that be displayed in the MVM_dump_backtrace(tc)? 17:53
autarch this is something we can do easily in p5, so I'd think there's some (better?) way to do this in p6
TimToady our backtraces are not good at displaying values yet
dnmfarrell nine: that's good to know, thanks
autarch rw params seems grossly C-ish - I'm not a huge fan ;)
mst blib is mostly only important for C compilation anyway
within pp perl5 modules it's basically a big no-op 17:54
TimToady nevertheless, putting unrelated things together is also a smell
leont Well, it's also used to fix up executables in p5
TimToady and params can type-check, and can force the user to agree to a particular in/out contract
leont And generating man-pages 17:55
17:55 nadim joined
TimToady but it may also mean that the problem is not sufficiently decomposed 17:55
nine mst: that's how I saw it. We compile C libs to resources/libraries/ anyway, so I removed the useless copying.
leont It's mainly there just so make install is litterallly only copying files, nothing more
nine autarch: if your sub returns multiple, unrelated things, maybe your sub is doing too much?
autarch: too many unrelated things
timotimo sprocket: no, it'd show up in "bt full", though
mst leont: due to local::lib centric usage for so many years I always forget about the man pages
dnmfarrell bah, I rebuilt moar and panda with rakudobrew, now trying to install Pod::Perl5 returns "Could not find Shell::Command in: ...". panda won't install Shell::Command either 17:56
lucasb I think he just wants to return a "tuple", a fixed N-elements list, that make sure every element is of the right type. Did I get it right?
17:56 xpen left
leont nine: I can think of many valid use-cases, for example a row from a database 17:56
timotimo sprocket: actually, looking at the code it should already show the exact value? or maybe i'm looking in the wrong place
17:57 _nadim left
timotimo oh, maybe i was 17:57
flussence bonsaikitten: STOP RIGHT THERE. There's already a patch for that bug, and it's only going to be needed for 2015.12: gitlab.com/flussence/perl6-overlay...lled.patch
bonsaikitten flussence: oh hello there :)
Skarsnik is there a keyweord to say : export everything in this module?
sprocket timotimo: here’re the results from ‘bt full’: pastebin.com/yTziRKsH
flussence fixing that one was *fun*
timotimo and then it wouldn't show up, either
bonsaikitten flussence: why are you hiding such things in random places and not, like, bugtrackers and stuff? :) 17:58
leont Skarsnik: why would you do that?
timotimo sprocket: that's not the thread that'd have given that error, though
Skarsnik to not write is export on everything
timotimo sprocket: you can try "thread apply all bt full"
flussence bonsaikitten: cause my code's a horrible mess at the best of times and I'd like to at least not inflict a version 1 of it on anyone else :)
bonsaikitten flussence: so you just hide it so I have to re-find the bugs? peh.
leont IMHO you already have to write too little, given that "is export" default to default export (really!?) 17:59
flussence I've been poking upstream to do a 2015.12.1 with this stuff in it, cause gentoo's not the only one having problems...
leont exporting is useful, but easily overused
Skarsnik leont, I mean in the module
leont I know
Skarsnik it's more a file to say "Here some class I will use everywhere" than a real module 18:00
bonsaikitten greeeeeeeeeeh
timotimo sprocket: did you set a breakpoint to the line that panics?
bonsaikitten flussence: please to use website that uses html
can't browse that junk :(
I'm mildly impressed by the level of idiocy involved
flussence oh right, gitlab is one of those ajax things... sorry :( 18:01
want me to throw it on gh instead? I can do that.
bonsaikitten at least my mind doesn't filter it as ad like bitbucket
sprocket timotimo: output from “thread apply all bt full”: pastebin.com/Enh2yBGe
bonsaikitten flussence: a tarball would also work ;)
flussence oh that's easy, gitlab.com/flussence/perl6-overlay...ref=master
18:03 cygx left 18:04 lucasb left
timotimo sprocket: that's weird. what did this program exit with? 18:04
sprocket “Invalid GC status observed; aborting”
18:04 nexysno_ left 18:05 _mg_ joined
flussence bonsaikitten: I should add though, this build system is like, fractally awful. I spent most of christmas week trying to push QA fixes up to them, that's mainly why I haven't tried to get gentoo guys involved yet 18:06
ugexex fwiw blib originally made it easier to delete your local precompiled files instead of running a command to recursively delete *.moarvm|*.par|*.jar next to your *.pm (which is what the default output location was), as well as a way to test against either the source (-Ilib) or the precomp (-Iblib) to test for precompilation specific bugs
bonsaikitten flussence: I've debugged Semantic Mediawiki, it can't be THAT bad
flussence oh god
alright, it's not *that* bed.
*/bad 18:07
it *does*, however, try to make-install header files for MSVC...
(you might wanna look at /usr/include after moarvm*.ebuild, if you haven't fixed it already...) 18:08
timotimo sprocket: yeah, but i see the call to MVM_panic nowhere
18:10 zwu joined 18:11 ZoffixWin left, _mg_ left
dnmfarrell ok, nuking rakudobrew and rebuilding moar and panda gets me back to the original test failures 18:12
18:12 nige1 joined
sprocket timotimo: sorry, this should have it: pastebin.com/NiuTuXhB 18:13
timotimo: still bad at gdb, but getting marginally getter :)
dnmfarrell this is the output when trying to install: github.com/dnmfarrell/Pod-Perl5/issues/4 18:15
nine leont: but rows from a database are related data and you'd return a List or Hash or even better an object for them.
Skarsnik maybe something cool will be to be able to have moar making a NC stuff backtrace 18:16
18:16 llfourn joined 18:17 ugexex left
timotimo sprocket: okay, try this: frame 1 , then print tc->gc_status 18:18
18:19 ugexex joined 18:20 nexysno_ joined, nexysno_ left 18:21 llfourn left
sprocket timotimo: it’s complaining about the symbol table not being loaded - do i have to recompile moarvm with debug symbols enabled? 18:22
timotimo could be
i always build mine with --debug=3 --optimize=3
sprocket ah, ok. i just have whatever rakudobrew installed for me, which likely doesn’t have those flags by default 18:23
timotimo ah, yeah 18:24
rakudobrew may have --moar-options available for you
but i don't know about it
sprocket i’ll check it out, and recompile somehow. on a pi it takes a while, so i’ll check to see if you’re around in a bit :) 18:25
thanks for your help
timotimo it should be enough to recompile only moar in this case
you probably can go into the moar source folder wherever it is inside .rakudobrew 18:26
and then perl Configure.pl --... and then make install
sprocket ah, ok
ugexex i missed the rpi conversation... what is the problem? installing via rakudobrew?
TimToady a GC problem on interrupt 18:27
ugexex ah :(
18:27 skids left
sprocket ugexex: no, working out some issues with the wiringPiISR function which causes the GC to exit unhappily 18:28
TimToady we can't blame *everything* on rakudobrew :)
timotimo :) 18:29
18:29 hankache joined
Skarsnik We can! 18:29
TimToady well, I suppose we could at that. 18:30
hankache evening everyone
18:31 psy_ joined
ugexex donald trump can blame everything on anything 18:32
sprocket has rakudobrew become the scapegoat for everyone’s ills? 18:36
tadzik toolchain is a scapegoat for everything that breaks in core 18:37
18:37 pdcawley joined
mst that's part of the charm of working on it 18:37
you get to learn so much about core that way ...
TimToady blames Unix
ugexex rakudobrew is my favorite part of the perl6 toolchain 18:38
mst thinks
aha! I know!
mst blames the author of 'patch' for enabling the entire thing
leont Heh!
TimToady "Smile when you say that." --The Virginian
mst from ear to ear :D 18:39
18:42 vendethiel- left, vendethiel joined, pdcawley left
flussence wonders if that double-heredoc in moar's configure.pl is a practical joke on vim users... 18:44
18:48 _mg_ joined
RabidGravy in the "use Foo:ver<0.0.3>" is there a way to say "at least that version" rather than "exactly that version"? 18:52
timotimo hmm
flussence :ver(v0.0.3..*) ?
RabidGravy let me try that 18:53
leont Yeah, current semantics aren't well huffmanized 18:55
RabidGravy no, that's not it find META6:ver<0.0.3..*>
"Could not find META6:ver<0.0.3..*> in:"
flussence I've seen a form like :ver({$_ >= v0.0.3}) mentioned once or twice too... 18:56
timotimo i think it'd be nice to have the info be more computer-readable, so that instead of searching the whole space we can binary search or directly select 18:57
like, if you have a piece of code, nothing promises us that it's not like sha1 of supplied version matches "udaitrsnudiare" 18:58
but if we have a range with two end-points, or a version with * in it, that's much better
RabidGravy I'm not sure that the "exactly this version" is working properly either 19:00
leont Yeah, this idea of versioning is suboptimal
RabidGravy or rather, when I know I have v0.0.3 installed because the code works but I had to use --force to install it, use META6:ver<0.0.3> says not 19:02
but use META6:ver<0.0.2> (the version that was installed I forced over) is fine
nine m: use Test:ver({$_ eq EVAL "qw(6.c)", :lang<Perl5>}); plan 1; 19:03
camelia rakudo-moar 3ea4df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V9ev86dSDS␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/V9ev86dSDS:1␤------> 3:ver({$_ eq EVAL…»
nine Bug!
RabidGravy: <> quotes a string, so :ver<0.0.3..*> expects "0.0.3..*" as version
19:03 hankache left
RabidGravy yeah, I realised that 19:04
nine use META6:ver(0.0.3..*) should do the trick
19:04 hankache joined 19:06 pierre-vigier joined
RabidGravy well v0.0.3..* 19:06
19:06 ugexex left
RabidGravy and indeed it does 19:07
(doing a "panda update" and force installing the dependency again seemed to work as well)
19:07 pierre-vigier left
RabidGravy everyone++ # this is all going swimmingly 19:07
19:07 jojotus_ is now known as jojotus
nine m: sub foo(:$ver) { dd $ver }; foo :ver<* after v6.b>; 19:09
camelia rakudo-moar 3ea4df: OUTPUT«List $ver = $("*", "after", "v6.b")␤»
nine That ^^^ is what use Foo:ver<* after 6.b>; actually requires as version
autarch m: sub foo (*@a) { say .perl for @a }; foo( { foo => 42 }, { bar => 84 } ) 19:10
camelia rakudo-moar 3ea4df: OUTPUT«:foo(42)␤:bar(84)␤»
autarch m: sub foo (*@a) { .say for @a }; foo( { foo => 42 }, { bar => 84 } ) 19:11
camelia rakudo-moar 3ea4df: OUTPUT«foo => 42␤bar => 84␤»
autarch m: sub foo (*@a) { .say for @a }; foo( { foo => 42 }, { bar => 84, baz => 1 } )
camelia rakudo-moar 3ea4df: OUTPUT«foo => 42␤bar => 84␤baz => 1␤»
autarch m: sub foo (*@a) { say .perl for @a }; foo( { foo => 42 }, { bar => 84, baz => 1 } )
camelia rakudo-moar 3ea4df: OUTPUT«:foo(42)␤:bar(84)␤:baz(1)␤»
RabidGravy however panda doesn't like that sort of locution in the dependencies at all 19:12
autarch so how can I pass a list of hashes to a sub without turning into a list of pairs?
TimToady 6c+ means "after 6b" 19:13
autarch ah, another set of parens to wrap the whole thing
RabidGravy sub foo(Hash @hashes) ?
nine m: sub foo (*@a) { .say for @a }; foo( ${ foo => 42 }, ${ bar => 84, baz => 1 } )
camelia rakudo-moar 3ea4df: OUTPUT«foo => 42␤bar => 84, baz => 1␤»
nine autarch: ^^^
itemize them
autarch nine: ah, that's better - I think I need to better understand how that sigil prefix works
19:15 cdg joined
autarch nine: thanks 19:15
nine m: use Test:ver({$_ after v6.b});
camelia ( no output )
19:15 llfourn joined
nine mst: ^^^ 19:15
mst nine: boo :) 19:16
19:20 llfourn left 19:22 vendethiel left 19:30 hankache left
RabidGravy .tell Zoffix, I updated Test::Meta with your suggestions but you will need to upgrade META6 manually too 19:31
yoleaux RabidGravy: What kind of a name is "Zoffix,"?!
RabidGravy .tell Zoffix I updated Test::Meta with your suggestions but you will need to upgrade META6 manually too
yoleaux RabidGravy: I'll pass your message to Zoffix.
19:32 yurivish_ joined 19:35 Tonik left 19:37 dnmfarrell left
dalek c: e089b27 | (Jake Russo)++ | bin/p6doc:
Add -n flag for no pager
19:40
c: 29406ea | sylvarant++ | bin/p6doc:
Merge pull request #301 from MadcapJake/master

Yes this doesnt break anything ;)
19:42 cdg left 19:45 autarch left 19:46 autarch joined 19:52 nige1 left 19:59 domidumont left 20:00 nmp joined, darutoko left 20:01 nmp left 20:02 pierre-vigier joined, pierre-vigier left 20:03 pierre-vigier joined 20:04 FROGGS joined
Rotwang Whats the policy on advent calendar posts? If I found slight mistake should I report it, where? 20:06
20:06 wamba joined
awwaiid Are there any good examples of literate (inline) pod6 in a module I can look at? 20:07
Skarsnik there is nothing to avoid writing say $foo ~ $a.name.defined ?? $a.name !! '' 20:12
Rotwang, You can try here or in the comments 20:13
autarch Rotwang: there are a bunch of people with editing perms in here so here's probably good 20:15
Rotwang Day 23 – Webscale sorting of the sleepy kind 20:16
DECEMBER 23, 2014 BY MORITZ
I've added a comment
20:16 llfourn joined
Skarsnik m: my @tmp = (); say @tmp.join(','); 20:21
camelia rakudo-moar 3ea4df: OUTPUT«␤»
20:22 llfourn left 20:24 average joined
average i.imgur.com/U7EhJV4.jpg 20:24
timotimo omg, why does it do that 20:25
that's not a toothpick!
FROGGS it's just sitting behind it 20:26
20:26 Sqirrel joined
autarch Rotwang: I don't follow your comment on day 23 - are you saying that Seq.map is undefined? 20:28
Rotwang: also, do you mind if I delete comments once they're fixed? 20:30
20:31 pdcawley joined
Skarsnik flussence, sqlite.h gist.github.com/Skarsnik/fedc2d7532d092bb32ac 20:34
flussence Skarsnik++ :D 20:35
Skarsnik I don't handle func ptr yet ^^
average gentlemen, may I make a proposal ? 20:36
flussence it even (mostly) recognises that weird double-pointer thing sqlite does for the DB handle
Skarsnik I realise I did not put $ in from on names lol 20:37
average I'll make my proposal later
Skarsnik flussence, they are pointer of funcptr? 20:38
20:38 pierre-vigier left
flussence the thing sqlite3_open_v2 gives back, in the C code it's a **sqlite3 and I've never figured out why they do it that way 20:40
20:40 regreg left 20:41 terjekv joined, pierre-vigier joined
terjekv I seem to have broken panda: ===SORRY!=== P6M Merging GLOBAL symbols failed: duplicate definition of symbol Find 20:42
This happens immediately upon loading, to the point where not even --help works. 20:43
sprocket timotimo: i think i found a better workaround for that issue we were talking about earlier :)
20:44 pierre-vigier left
Exodist late to the party, and not reading all scrollback, but leont and autarch you should look at the Test2 repo, which incorperates changes from feedback you all have given. Skip is its own result, and there is a pr where I am stipping out the todo stuff (I don't just ignore feedback) 20:44
20:44 cdg joined
Skarsnik flussence, hm, I need the PP ast to get the #define SQLITE_FLOAT 1. or do you think just parsing them in perl6 could be enought? 20:44
timotimo sprocket: cool. do tell! but also, it'd be nice if we could figure out what's going wrong so it can be fixed forever
autarch Exodist: I kind of assumed you did certain things that way because of the limits of back compat too
I think if we can get a core p6 Test::Stream real soon now we can have a bit more freedom with how it's designed
Exodist autarch, well, Test-Stream started as a Test-Builder refactor, so that is how things ended up that way, but I am working on removing more and more garbage like that and maintaining backwords compatability in better ways. 20:45
autarch makes sense
Exodist autarch, that worries me if only because the Test-Stream namespace is likely to fade in favor of Test2.
autarch what worries you? 20:46
mst it could end up being called Test2 in p6 as well
Exodist I am worried that P6 will move forward with a namespace p5 is likely going to let die.
sprocket timotimo: i was poking around the wiringPi code and it looks like the interupt handlers were doing some other their own pthread_* stuff - could that have had adverse affects with some of MoarVM’s pthread’ing?
Exodist then again thats probably not an issue
I am also worried that you might adopt the loader stuff from Test/Stream.pm, which is going away. 20:47
leont It's just a name, at this stage it doesn't matter much yet, back-compat far from being an issue yet
Exodist true.
leont No, loading stuff in p6 is quite different anyway
Exodist Ok.
autarch Exodist: yeah, the namespace is entirely open to change - but I don't think Test2 makes much sense in p6 land either
there's barely a Test1
timotimo sprocket: if a callback comes from a thread other than what moar expects, things will explode, yeah
sprocket: maybe i can put in a sanity check that'll make the issue more easily visible.
sprocket timotimo: ok, then that was probably the issue 20:48
Exodist I *think* I am close to getting Test2 to a state where people can at least accept it. I would recommend judging its design decisions after they are finalized, not while people are still arguing both ways about certain thing.
sprocket timotimo: i think i can just do a work around in pure-Perl6, no NativeCall necessary
Exodist *things
sprocket timotimo: it looks like the wiringPi code was just monitoring a file handle in “/sys/class/gpio/*” for changes, then triggering the interupt 20:49
timotimo: so i’m hoping i can replicate that behaviour using just perl6, but without external wiringPi thread issues
timotimo yeah, should just be able to .IO.watch or what it's called 20:50
20:50 vendethiel joined
Exodist leont, speaking of that, I was hoping you would weigh in a bit on both pr's ont he test2 repo on github 20:50
flussence Skarsnik: most of the #defines there are really enums, but I guess sqlite has to be C89-compatible, so it can't just say "enum{}" in the C itself... things would be much easier if it did 20:51
20:52 yurivish_ left
sprocket timotimo: IO::Notification.watch-path(..) i think? 20:52
timotimo IO has a watch method that calls that for you 20:53
sprocket oooh, ok, i’ll take a look
20:53 zwu left
timotimo IO::Local in this case 20:53
20:53 pierre-vigier joined
Skarsnik flussence, Yes, but I still want the tool to extract this stuff, my first goal is not to generate whole binding just with it, but at least for a dev to use it and copy the output in his code 20:54
20:55 pierre-vigier left
Skarsnik could be with a --define-as-enum="SQLITE_*" 20:55
Exodist anyway, leont, autarch my goal in voicing up here was 2 fold: 1) If you still have feedback to provide on my p5 test stuff please give it to me. I want to make the stuff in p5 as good as it can be. So if you do not like an implementation detail tell me so I can work on it before it is locked in.
2) I would be happy to talk to you about why I am doing things 1 way or another in Test2/stream on p5, hopefully the knowledge sharing will avoid mistake repetition 20:56
awwaiid How can I have mutually dependent classes in separate files? I have RbValue.pm6 and RbObject.pm6 and they each refer to the other. Putting a use statement in each class seems to cause a looper during compile time 20:57
timotimo BBIAB
Skarsnik awwaiid, I think you can't and it's bad 20:58
I mean it's bad that you can't
awwaiid ah. I'm now exploring faking it with some class RbValue { ... } stubs
when I have them all in one file it works fine, but I want to break this up a bit 20:59
Skarsnik I had the same issue. I removed the type constraint on one class
20:59 CIAvash left
flussence Skarsnik: I tried writing some sqlite3 bindings by hand "for fun" a few weeks back, and it was picking all the defines out that made me give up, so I can say having a parser like this would definitely make those kind of modules 90% easier to write. :) 20:59
even if it doesn't do everything perfect :) 21:00
Skarsnik well feel free to play around with it x)
21:02 pierre-vigier joined
RabidGravy sprocket, I was wondering about "#define FOO 1" kind of stuff whether you can generate a function that returned them in a manner that could be used to create an enum 21:03
sorry not sprocket 21:04
Skarsnik ^^
teach me to try and touch type when there's tab completion involved 21:05
flussence handles irc input like nuclear reactor fuel rods because of things like that 21:07
dalek kudo/nom: 261993c | (Dan Kogai)++ | src/core/Complex.pm:
Decent sqrt()
kudo/nom: b8a75b9 | lizmat++ | src/core/Complex.pm:
Merge pull request #667 from dankogai/nom

Decent sqrt()
RabidGravy yeah like the look of that one
flussence, before I forget, y'know the spec-v1 branch of S22 you made, did you change the example version strings for "perl" and "version" to not have the "v"? 21:10
(too slack to look)
flussence yes
I gave those special attention, cause they were what bothered me enough to do something in the first place :) 21:11
masak I find myself wanting to put a trait on a grammar rule -- has anyone done that before? 21:12
21:13 krunen joined
RabidGravy I've already added the meta6 thing to the META6 which underlies the Test::META, I'm going to make strings with "v" a warning for meta6 = v0 and fail hard later 21:13
flussence sounds like I better go s/v6/6/ all my modules :) 21:15
RabidGravy yeah, I've got lot of version stuff to sort out 21:16
autarch Exodist: another thing I'm doing differently in my prototype is treating the main test just like a subtest - they all get their own start & end events - this will make life easier for people implementing other output formats (like TeamCity)
21:17 dududuedu joined
flussence something else I want to clarify in that branch: which places should/n't allow module names with details like :auth/:ver appended 21:18
21:19 llfourn joined
RabidGravy well currently "depends" and friends it definitely doesn't work (with panda at least, ) though it should so fixing it might be good 21:19
Skarsnik I still want my extern-depends field in meta6 x) 21:20
flussence versioned modules doesn't work in "provides" at all either, and I think there might be a good case to allow it there
Skarsnik: you mean like a C lib dependency list? 21:21
awwaiid bleh. I give up... shoving them all back into one file :( 21:22
Skarsnik should be allowed to have provide : ["Foo::v1"; "Foo:v2" ] or whatever the format look like
flussence, more generally anything that is not perl6 that the module need to run. it could be even just informative for panda x)
21:23 _mg_ left 21:24 llfourn left
Skarsnik could be usefull for tool like dh_make that generate package from cpan 21:24
awwaiid Is this use circular-dependency bug-reported?
Exodist In Test2 subtests can be implemented multiple ways. Currently there is 1 implementation that works pretty well for Test-Builder back-compat. It would be easy for anyone to implement an alternative subtest implementation if they wanted, the mechanisms that make subtests possible are generic and anyone can use them to write their own.
flussence I was thinking about that a bit too... there's nothing obviously wrong with extending depends to allow things like "sndfile:from<native>:ver<1>". Perl 6 itself doesn't use that syntax of course, but there's nothing saying it has to be a valid perl6 «use» line either. 21:25
awwaiid yeah it is ... #126688
Skarsnik flussence, gist.github.com/Skarsnik/83bb883378bbf2b21b82 my though on it 21:26
21:26 pierre-v_ joined
flussence oh, yeah we definitely need a way to specify optional deps. CPAN's meta spec does something that looks similar. 21:28
leont No one ever really implemented the optional dependency section of CPAN Meta 21:29
RabidGravy flussence, Skarsnik yeah external dependencies would really help packagers I guess
21:29 pierre-vigier left
leont Though stealing the format of prereqs is probably a good idea, it scales much better than flattened combinations of phase (build, test, runtime) and requiredness (required, recommended, suggested) 21:30
Skarsnik The 'can be provided' is like on win32 for my gumbo binding I probably want to build the lib aside the module
leont Having external dependencies in there is useful, but difficult to get right 21:31
Skarsnik I think even if it's just informationnal for panda/whatever install stuff. it's better than nothing
flussence optional deps would make debian peoples' lives easier (cause most apt PMs have a concept of "recommended"/"optional" deps already), native lib deps would make gentoo and arch efforts easier. Even if most of this stuff ends up totally useless to panda/zef/etc :)
leont But mapping libfoo to package foo-devel/libfoo-dev is not always straightforward 21:32
Specially in large packages that skip with many libraries (e.g. QT)
Skarsnik it's up to the distrib to make a choice 21:33
flussence that doesn't have to be our problem; we'll give the distros enough information, it's up to them to make good use of it
leont Fair enough 21:35
My biggest advice here would be to experiment before making promises
flussence going out of one's way to support specific distros' ways of doing things quickly leads to insanity, it's bad enough when there are accidental distro-specific assumptions caused by only testing in one place (and we've already got enough of those to fix...) 21:36
Skarsnik and even if it's only informative for something like DBIish it will be useful to give the name of the lib
21:36 dududuedu left
RabidGravy yeah, if different OSes/Distributions are to be dealt with they should be individually in the ecosystem rather than one module trying to get them all 21:38
Skarsnik like I do panda install DBIish; "This module requiere the optionnal lib C 'mysqlclient' to work, the otionnal lib C 'Pq v5' to work, the optionnal lib C 'sqlite v3'
RabidGravy this is part of the reason I made LibraryCheck 21:39
it can warn up front rather than just failing all the tests with what (to the user) may be a confusing message 21:40
21:41 SwellJoe left 21:42 xxpor_lap left 21:43 arthur_ left, notbenh joined
El_Che spinning a solaris 11 vm, see if we get rakudo built there. No luck on solaris 10: libuv need porting before rakudo can even be attemted 21:44
flussence in general I'm leaning toward making declarative things out of everything that reasonably can be, because it's almost always preferable to executing code to get at metadata (/me glares at whoever thought sysvrc was a good idea)
Skarsnik damn, still opened github.com/google/gumbo-parser/issues/349 21:46
leont Yeah, declarative things are generally good :-) 21:48
21:50 pierre-v_ left, pierre-vigier joined 21:54 nbrown left
autarch btw, before anyone else starts, I should mention that I'm working on porting Net::FullAuto to p6 22:01
RabidGravy which sounds great, but I don't know what it is :) 22:02
RabidGravy looks
flussence time cube, perl 5 edition
masak "Fully Automate ANY Process with *Persistent* SSH/SFTP from One Host"
22:02 vividsnow left
leont autarch: I wonder what the install side of that would like like in p6 22:03
22:03 SwellJoe joined
autarch just look at the Makefile.PL - metacpan.org/source/REEDFISH/Net-F...akefile.PL 22:03
flussence I don't think unicode has a suitable one-character reaction for this
leont Yeah, that
22:03 vividsnow joined
RabidGravy ah cool 22:03
autarch it's a quick read - no more than 7,100 lines or so
22:03 pierre-vigier left 22:04 pierre-vigier joined
RabidGravy I forsee fields of hirsute yaks 22:04
leont It solves various problems discussed here by «sudo apt-get install $package» (or yum, or whatever cygwin uses, etcetera)!
autarch I thought there actually was a p5 timecube module out there ... finds github.com/ltp/Acme-Timecube
22:06 pierre-vigier left, pierre-vigier joined
Rotwang autarch: parameters of the sleepsort subroutine are: "*@values, :$factor" and in the body you can see: "await @unsorted.map:" and @values not being used in a subroutine 22:06
22:07 pierre-v_ joined, pierre-vigier left
Rotwang so it should be await @values.map: instead 22:07
code would work if @unsorted was defined in parent scope, but I guess it wasn't authors intention
autarch: don't mind removing comments [: 22:08
autarch Rotwang: aha, now I get you, I'll fix day 23 22:09
Rotwang: fixed - thanks for the bug spotting! 22:10
22:11 Praise left, Praise joined
Rotwang autarch: I'm going through perl6 advent calendar backwards, there is a chance I'll find more 22:12
Skarsnik Have fun ^^
autarch Rotwang: sounds good - I don't get notified unless you comment on _my_ posts but you can ping me here
and if I'm not around hopefully someone else will fix it
Rotwang Skarsnik: perl6 brought back joy of writing code to my life ;f 22:13
it is going to be fun indeed
22:13 vendethiel left, vendethiel joined
RabidGravy Rotwang, you may find things that use earlier experimental versions of some concurrency stuff, they probably should be left as-is with some comment with the new code rather than fixing 22:15
autarch RabidGravy: in the 2015 calendar, or just earlier? 22:17
RabidGravy earlier, I think all the changes were in before december 22:18
autarch it might be nice to go back to _everything_ pre-2015 and add some boilerplate to the top along the lines of "Perl 6 has changed a lot since this was written. Don't be surprised if this code no longer works."
mst .oO If only we could to that with google results for CGI
RabidGravy there's stuff using earliest/winner whatever on channels
22:18 espadrine joined
leont mst: or online tutorials for perl5 in general :-/ 22:19
Rotwang advetn calendar will be top spot on google search, so it should be accurate (should contain disclaimers that this or that has changed) 22:20
22:20 llfourn joined 22:22 pjscott joined
RabidGravy go back and kill Matt Wright and the author of cgi-lib.pl and we'll be cool 22:23
virtualsue sighs
mst RabidGravy: cgi-lib.pl was neat for its time
FormMail ... managed to be new-user-friendly 22:24
mspo cgi is cool
mst about 85% of the tutorials I'd gladly 451 with a rubber hose
RabidGravy vector for a squillion spams
mst mspo: the protocol's great. the old libraries are ... old.
mspo mst: shocking :)
22:25 pierre-v_ left, llfourn left
mst I used to have a cron job that ran over a shared hosting cluster every night 22:25
mspo mojo works as cgi
22:25 pierre-vigier joined
mst though people usually complain if you try to do that 22:25
El_Che I wonder how many time people have thought mst was "the" Matt
RabidGravy it was when people carried on using cgi-lib with perl 5 it all went wrong
mst whereas Web::Simple was actually designed to allow fatpackable CGI scripts
El_Che: I'm never entirely sure whether people are joking. 22:26
which is a shame, because it means I have to let them live
El_Che mst: I am pretty sure the feeling is mutual :)
(about the joking part)
mspo even fork per request is a good pattern for a lot of stuff
launch a unikernel via cgi on a docker or something ;) 22:28
moritz start a new docker container per request?
SCNR
mspo sure
El_Che "oh, that guy there is from formmail.pl. He spends now his days hacking away in dbix/moose/catalyst just to get his karma right"
mspo moritz: why not?
El_Che (I am pretty sure I once heard something similar :)
) 22:29
moritz mspo: like, performance :-)
mspo: and also it seems like pretty much overkill
RabidGravy I spent a good few years helping davorg unscrew the internet from the MSA stuff, it largely worked too
moritz I know, the theory is that a docker container should be lean, but you have to to take care of stuff like logging
also you might want to keep some caches between requests 22:31
mst El_Che: bah, I'm not even old enough for that. I was 17 when I started maintaining a private fork of FormMail.PL out of sheer rage 22:33
that was the cron job. it overwrote people's screwed up insecure copies with mine.
El_Che :) :)
virtualsue there are a lot of people that ought to be allowed to re-architect websites i don't like
mst most people just bulk-uploaded their sites and wiped it out again sadly
virtualsue such as oracle.com ;-) 22:34
*people here
mst I tried setting up a scanner to open tickets for customer support to talk to them, but that just killed my RT instance
moritz virtualsue: ah yes, one of my favorites
RabidGravy oh oracle.com is truly, truly awful
flussence moritz: you joke, but the Erlang people actually pulled that one off with VMs... 22:35
virtualsue interesting, plausible and not working thanks
leont Yeah, oracle's website is terrible
moritz flussence: well, the Erlang "process" is a lot more light weight than a UNIX process
El_Che about Oracle, has someone got moarvm built on solaris 11. Trying and failing atm
virtualsue but make it LOOK nice
leont Worst part is when they buy some company with a good website, and mess it all up :-/ 22:36
moritz virtualsue: I don't even remember how it looks; I just remember the pain in trying to find the right download, and finding the right click path so I don't have enter my email address and 20+ other form fields
RabidGravy hasn't it looked the same since forever?
moritz dunno; I'm not a visual person 22:37
mspo but java
El_Che oracle support? no it had changed a few times. Always for the worst 22:38
22:38 ugexe joined, terjekv left
flussence compiles openjdk nowadays for the sole reason of it being a ready-made 10 foot bargepole for not touching oracle with 22:40
El_Che sadly --very sadly-- openjdk does not always delivers and in does cases you're forced to use oracle jdk 22:41
e.g. for Shibboleth SSO. Openjdk results in hard locks every few months (on a busy setup). Oracle jdk works just fine 22:42
RabidGravy did IBM stop making jdks?
El_Che I don't think so, but probably only AIX people use it 22:43
22:43 vendethiel left, vendethiel joined
RabidGravy I remember using their Win 3.11 version like a million years ago, it actuall worked too 22:45
virtualsue this is disheartening. i was being sarcastic and now look where we are 22:46
flussence RabidGravy: they had one as late as Java 6. I don't think I ever got that one working properly 22:47
RabidGravy it stopped me thinking about the six modules I have in various states of repair 22:48
22:48 Ven joined 22:49 Ven left
virtualsue ;-) 22:50
nine on external dependencies: I really would not use any package names, those are distro dependent. I'd refer to package capabilities like library names.
El_Che ok, I give up this solaris moarvm thing for today. I'll watch a x-file episode. Feeling retro
nine nine@sphinx:~> zypper -q search --provides libperl.so 22:51
i | perl | The Perl interpreter | package
Skarsnik we never talk about pagkages names ^^
just the libname
moritz that's in perl-base in Debian
nine moritz: exactly. Library names are much more stable than package names. And there should be a way to find a package providing a library for pretty much every distro. 22:52
El_Che $ dpkg -S libperl.so 22:53
libperl5.20: /usr/lib/x86_64-linux-gnu/libperl.so.5.20
libperl5.20: /usr/lib/x86_64-linux-gnu/libperl.so.5.20.2
Skarsnik .so is a bad idea 22:54
pmurias nine: won't we sometimes also need the dev package?
Skarsnik root@testperl6:~/piko/gptrixie# apt-file search libperl.so
libperl-dev: /usr/lib/i386-linux-gnu/libperl.so
nine well we can apply some $*VM.plattform-library-name there
El_Che Skarsnik: apt-file is not part of the default install 22:55
nine pmurias: we can also require certain header files. That may then pull in some -devel package
notbenh any one know if there's a way to make a lazy infinate list of a repeating range? for example 1..9,1..9,1..9
Skarsnik dpkg only search on installed stuff probably?
moritz notbenh: something like flat (1..9) xx * maybe? 22:56
nine El_Che: doesn't have to be in the default install. It's needed only for creating the distro package for your module.
moritz m: my \seq = flat (1..9) xx *; say seq[5..11]
camelia rakudo-moar b8a75b: OUTPUT«(6 7 8 9 1 2 3)␤»
moritz notbenh: seems to work
notbenh moritz: rad thanks
pmurias nine: while installing modules using cpanm it's often annoying that you have to install external dependencies manually 22:57
nine: it would be great if panda (or it's future replacement) could install those for you 22:58
nine At least on openSUSE, Perl 5 packages are also package capabilities:
nine@sphinx:~> zypper -q se --provides 'perl(DBI)' | grep package
i | perl-DBI | Database independent interface for Perl | package
pmurias nine: re automatically finding the right packages, one possible problem is if there are two packages that provide a given lib/header 22:59
Skarsnik pmurias, I always use dh_make or the debian package to install perl module
22:59 nadim left
pmurias Skarsnik: does it take care of doing stuff like installing libxml2? 23:00
nine pmurias: then the user has to decide which one to pick. Distributions have the same challenges and I know openSUSE has moved to capabilities instead of package names and I'm sure other distos do as well. 23:01
geck any rpm-based distro you can do deps based on file names
Skarsnik I think it's up to the distrib to patch panda/whatever if they want auto isntall 23:02
nine I can actually say sudo zypper in -C libperl.so to install the package providing this library
geck yum/dnf you have to look up, same with debian iirc
23:03 nadim joined
Skarsnik Two packages can provide the same file 23:03
geck yeah, that's the problem with that approach, you look it up then go "derp, which one?"
Skarsnik a (bad) example /usr/bin/cc
nine Skarsnik: my point is: with this you have to write code once to support a distro. That's much better than having to support all distros by every module.
23:04 BenGoldberg joined
Skarsnik That why it need to be in the meta file :) 23:04
23:07 pierre-vigier left, rindolf left
ugexe that should be the job of a recommendation manager, of which the end user can decide which ones they wish to use 23:09
then you can do either
RabidGravy sure but having the info in the meta file makes it possible 23:10
ugexe sure, that was one of the original purposes of resources, a source of additional arbitrary rich meta data
not just a file mapping, although it can be its own field or whatever as well 23:11
pmurias nine: we can have both the ability to specify a header/file or a bunch of packages 23:12
Skarsnik unrelated, is a new rakudo release for soon or is there some blocking stuff?
23:13 wamba left 23:14 pmurias left 23:15 pjscott left
Skarsnik rt.perl.org/Ticket/Display.html?id=112262 maybe than can be closed? x) 23:16
23:17 pjscott joined 23:19 joydon joined 23:20 lucasb joined 23:21 llfourn joined
RabidGravy yeah, even on the assumption parrot aint coming back any time real soon now ;-) 23:22
23:24 yqt joined
masak somehow read that as "the assumption patron saint" 23:24
'night, #perl6 :)
RabidGravy :) 23:25
Skarsnik 'night #perl6 23:26
23:26 llfourn left
lizmat gnight Skarsnik masak 23:26
23:27 Skarsnik left 23:29 nadim left
lucasb if I reply to ticket in my email client, will it get attached to the same ticket or will end up creating a new one? 23:29
RabidGravy with the number it should attach 23:30
notbenh another question that I can't seem to find in the docs. Does p6 have a native memoize notion or do we still use the hash trick from p5? 23:32
leont is cached, I think 23:33
23:33 nadim joined
lucasb thanks, RabidGravy 23:33
RabidGravy "is cached" is speculated but not completely implemented, free for ecosystem implementation 23:34
23:35 lnrdo left
RabidGravy m: sub foo($a) is cached { } 23:35
camelia rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HExJmKT7oD␤Use of the 'is cached' trait is experimental; please 'use experimental :cached'␤at /tmp/HExJmKT7oD:1␤»
23:38 bitmap joined 23:39 kaare_ left 23:41 pjscott left 23:44 zw joined 23:45 pjscott joined
zw hello, how to get partially applied function. I mean f($a, $b), g($b) = f("hello", $b). 23:45
23:45 pdcawley left
ugexe .assuming 23:47
geekosaur &f.assuming("hello") ?
timotimo yup
lucasb m: say .signature for class C { multi method foo(1) {}; multi method foo(2) {} }.^can('foo')[0].candidates 23:48
camelia rakudo-moar b8a75b: OUTPUT«(C $: Int $ where { ... }, *%_)␤(C $: Int $ where { ... }, *%_)␤»
lucasb m: say .signature for role R { multi method foo(1) {}; multi method foo(2) {} }.new.^can('foo')[0].candidates
camelia rakudo-moar b8a75b: OUTPUT«(R $: Int $ where { ... }, *%_)␤»
lucasb ^^ I thinks this is related to rt.perl.org/Public/Bug/Display.html?id=127129
RabidGravy partial application was a feature I got quite excited about but have never actually used
zw thanks 23:49
23:49 virtualsue left
lucasb iow, the class retains multiple multis, but roles do not (iiuc) 23:50
23:50 pjscott left
lucasb but I thinks this only shows when using multiple multis that have the same parameter type, but uses values to pattern match/dispatch 23:51
vendethiel RabidGravy: you need more functions, obviously :P (and more askele!) 23:52
lucasb anyone confirms (or not) my assumption? :) 23:53
dalek c: 5d3f2f3 | lizmat++ | doc/Language/setbagmix.pod:
The codepoint in the header rendered way too ugly

So move the actual codepoint information to the text.
23:53 zw left
lizmat good night, #perl6! 23:55
23:58 nzkindest left
lucasb one more data point: I my example, if you try to call foo(1), it works, but if you call foo(2) it fails because it can't find a suitable signature, even though the method was defined 23:58
*In my example; (I'm making lots typos and mistake :)
timotimo oh, huh.
23:59 nzkindest joined