Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 autarch AlexDaniel: I think I missed that
00:04 AlexDaniel autarch: http://irclog.perlgeek.de/perl6/2016-01-25#i_11939486
00:04 AlexDaniel autarch: no loop required, no nothing! As simple as that
00:05 leont joined #perl6
00:07 autarch AlexDaniel: yeah, that seems better
00:11 vendethiel joined #perl6
00:15 drrho joined #perl6
00:26 mohae_ joined #perl6
00:33 kid51 joined #perl6
00:38 telex joined #perl6
00:39 laz78 joined #perl6
00:53 gtodd Bags are fascinating  :)
00:59 vendethiel joined #perl6
01:02 yeahnoob joined #perl6
01:03 gtodd I wish Set::Bag (p5) could automagically count like that
01:06 adu joined #perl6
01:09 Herby_ joined #perl6
01:09 Herby_ Evening, everyone!
01:09 Herby_ o/
01:09 lucs How do I get the started process's PID after doing 「Proc::Async.new(⋯).start」?
01:10 leont .pid on the Proc::Async?
01:10 lucs Hmm...
01:10 lucs (trying)
01:11 lucs No such method.
01:12 lucs I also got nowhere trying to work with the promise returned by 「start」.
01:14 leont Ah!
01:14 leont The result of the promise is a Proc, which has a .pid method
01:14 leont No idea how to get it before the process has finished though
01:15 konobi $$ in either?
01:15 lucs That's kind of the problem :/
01:15 lucs (And even when it has finished, all I seem to get is a PID of 0.)
01:16 lucs konobi: Not sure what you mean..
01:16 leont konobi: $$ is $*PID
01:16 konobi sure
01:17 konobi that's why you have a conditional after a fork... one should continue on... the other should just be in the background
01:17 leont That's not how Proc::Async works
01:17 leont And I agree with lucs that it not giving the pid is an issue
01:18 konobi ugh... not sure how perl6 async works yet
01:18 konobi i'm pretty sure i have a few holes to jab at there... =0/
01:24 vendethiel joined #perl6
01:25 lizmat joined #perl6
01:32 BenGoldberg joined #perl6
01:42 pochi_ joined #perl6
01:49 vendethiel joined #perl6
02:04 timotimo hey Herby_
02:04 timotimo was that talk i showed to you of interest?
02:04 Herby_ \o
02:04 adu joined #perl6
02:05 Herby_ Absolutely!  Pretty cool stuff for sure
02:05 timotimo cool & scary
02:05 Herby_ been meaning to talk to my hospital's biomed department to see if they have any old hardware I can poke around with
02:05 timotimo the whole "internet of things" movement is very, very scary from a security & failure perspective
02:06 adu timotimo: there are already people who have died from Pacemaker/Wifi accidents
02:06 Herby_ yeah, very exciting and scary times
02:07 adu Herby_: how's it going?
02:07 Herby_ It's coming along.  Have you thawed out yet?
02:08 timotimo adu: even without biotech in the equation, IoT is very scary
02:08 timotimo remember very recently when "nest" thermometers/thermostats/thingies failed for some reason?
02:08 timotimo in america, at a time when it was very, very cold outside?
02:08 timotimo people were unable to log in for some stupid reason
02:09 Herby_ did they get to play in artic warfare conditions? :)
02:09 Herby_ aka the heat dont work
02:09 * timotimo translates to a different place
02:11 Herby_ timotimo, its kind of like the cars that are getting smarter
02:11 Herby_ you see that article about the jeep cherokee getting hacked while driving down the road?
02:14 vendethiel joined #perl6
02:15 aigan_ joined #perl6
02:16 xpen joined #perl6
02:22 timotimo yeah
02:22 timotimo that was about engineers going at developing a system connected to a network without them knowing about security
02:23 timotimo maximize profits as much as you can get away with
02:23 Herby_ yep
02:23 ZoffixWin joined #perl6
02:23 ZoffixWin joined #perl6
02:23 timotimo that's why we're lucky to have independent security researchers find those things and smack the greedy up-highs on the fingers every now and again
02:24 geekosaur also why the greedy up-highs keep trying to get independent security research like that declared illegal
02:24 ZoffixWin m: sub term:<🕋> { say "42" }; 🕋
02:24 camelia rakudo-moar cf7706: OUTPUT«42␤»
02:24 ZoffixWin Emoji subs :)
02:24 timotimo geekosaur: i'm pretty sure they won't be trying that for long
02:24 Herby_ Zoffix!
02:24 Herby_ o/
02:24 geekosaur they've been trying it for years. thankfully that means there is now considerable precedent in favor of the researchers
02:24 ZoffixWin \o
02:25 geekosaur at least in the US. but as corporations get more and more powerful in the US, I wonder how long that will last
02:25 timotimo hmm
02:25 timotimo these trans-* pacts are pretty scary
02:26 timotimo trans-atlantic and trans-pacific, right?
02:38 Herby_ ok. rookie question time: using json::fast, how do I pretty print something?
02:38 timotimo to-json([1, 2, 3], :pretty)
02:40 MadcapJake i thought the default was pretty?
02:40 Herby_ I don't I'm asking it right... RottenTomatoes has an API which returns JSON content
02:40 Herby_ I want to print it out pretty
02:40 Herby_ instead of this blob
02:46 vendethiel joined #perl6
02:46 timotimo oh
02:46 timotimo in that case you have to parse it with from-json and then print it with to-json
02:46 timotimo if it's a blob, you may have to decode it with some encoding first. most probably utf-8
02:46 Herby_ you're the man :)
02:46 Herby_ that seems to work
02:46 llfourn when you have "Ambiguous call to infix<blah>", where blah is your own custom infix, is there a way to specify who should win in a tiebreaker?
02:51 skids llfourn: "is default" can designate a preferred candidate.  Or you can play tricks like $ where { True }.
02:53 llfourn skids: excellent thanks!
02:53 kalkin-__ joined #perl6
02:53 Herby_ so, if I'm using HTTP::UserAgent to retrieve a web page, how would I decode/encode that?  Right now, I'm getting the content but when I try to spurt it to a text file, I get a "malformed utf-8" file
02:54 Herby_ well, i'm getting the content and converting it to-json, then trying to spurt it
03:00 skids Herby_: the defacto www standard encoding, if the headers do not specify otherwise, is windows-1252 (even if iso8859-1 is specified in the headers, as a special case)
03:00 ZoffixWin m: print "I'm a Perl ", 5 + !!"0", " program."
03:00 camelia rakudo-moar cf7706: OUTPUT«I'm a Perl 6 program.»
03:00 ZoffixWin Run that in Perl 5 and it'll say "Perl 5" :) https://twitter.com/zoffix/status/691817871446511617
03:01 * ZoffixWin suspects they're the only one who's excited with it and decides to move on ^_^
03:02 Herby_ joined #perl6
03:02 skids ZoffixWin: that is cute
03:02 ZoffixWin :)
03:04 ZoffixWin I'm curious of the length you could take this to: (a) one program that runs with both P5 and P6 and does the same thing in both; or (b) one program that runs with both, but does a completely different thing :)
03:04 * Juerd considers beginning a Rosetta-like thing, maybe in book form, for a very limited number of languages, and only language features, not full programs or "problems"
03:06 ZoffixWin Sounds neat, but maybe not in a book form
03:06 llfourn Jured, I like that idea
03:06 Juerd When I say "book", feel free to read "PDF"
03:06 Juerd But what I'm thinking of, is a fixed size layout
03:06 ZoffixWin I sorta envision this could become some sort of a "lookup ifelse" and it gives you a nice side-by-side comparison of each feature.
03:06 ZoffixWin Interactive thing basically
03:06 Juerd ZoffixWin: That's nice but not what I'm thinking of
03:06 ZoffixWin Ah :)
03:07 Juerd I'm thinking of a landscape layout, 5 languages
03:07 llfourn when I read book I read chapters with topic areas which I think is good
03:07 Juerd In a full-page 3x2 matrix, where Perl 6 gets a double-width box, because it doesn't just get code, it also gets explanation in how it differs.
03:07 Juerd llfourn: Yes! That too!
03:09 Juerd I find myself constantly explaining Perl 6 to people in terms of their favourite language
03:09 Juerd And rosettacode is entirely useless for this, because it's so bloated and hard to navigate
03:10 AlexDaniel Juerd: consider “Wiki” instead of a “PDF” :)
03:10 Juerd No, no, no...
03:10 AlexDaniel why not?
03:10 Juerd Because I want a fixed width layout
03:10 Juerd If it doesn't fit in the box, it's too complicated for a single example
03:11 Juerd width + height
03:11 AlexDaniel sure, feel free to do that with css ?
03:11 ZoffixWin No, no, no, that's when you switch to smaller font, design 101 :D
03:11 Juerd Flipping the pages should feel like browsing through a photo book
03:11 skids maybe a "practical only" subset of rosettacode could be presented through an alternative portal/search engine.
03:11 AlexDaniel sure, feel free to do that with js ?
03:12 Juerd I already feel entirely free to do it whichever way I want :)
03:12 ZoffixWin :D
03:12 AlexDaniel :)
03:13 Herby_ :)
03:13 Juerd I'm thinking of top 3 boxes: Python, C#, PHP
03:13 Juerd Bottom 3 boxes: Perl 5, Perl 6, text
03:14 ZoffixWin I'd use Ruby instead of Perl 5
03:14 llfourn Javascript instead of PHP :)
03:14 Juerd I haven't set my mind on the languages yet
03:15 Juerd But when suggesting them, please let me know why :)
03:15 ZoffixWin And this is where a webapp solution shines better than a PDF: you can add any number of languages and mix-and-match them for your audience
03:15 Herby_ use assembly for speed
03:15 Juerd I considered Javascript but it's a hard one because it doesn't really have that many language features.
03:15 Juerd ZoffixWin: And that's exactly what I don't want, this one time.
03:15 ZoffixWin Juerd, Ruby instead of Perl 5 because there are more Ruby programmers AND many of the Ruby programmers are ex-Perl-5 programmers
03:16 Juerd Not interactive, not free form. Very old-fashioned.
03:16 ZoffixWin .oO( old fart :P )
03:16 ZoffixWin But it's not webscale!!! :D
03:16 Juerd Perl 5 is not negotiable by the way. I'll switch any of the other 3 :)
03:16 ZoffixWin heh
03:16 Juerd (Note that I haven't decided to do this project yet)
03:17 Juerd (It's going to be a lot of work because I want to edit everything myself; I'll accept contributions but only if I like them :P)
03:17 ZoffixWin Ruby instead of PHP then :) Mostly because some of the PHP coders I've seen online scare me with their incompetence so much, I don't want them anywhere near me :)
03:17 Juerd Fair point
03:17 Juerd http://juerd.nl/site.plp/perl_php
03:17 ZoffixWin Juerd++
03:18 Juerd I had to store that quote somewhere
03:18 Juerd ZoffixWin: scrottie++, it's his text
03:19 adu joined #perl6
03:19 Juerd Also, it's not going te be a showcase of TIMTOWTDI
03:19 Juerd I don't care that you can write ... *, because I think it's utterly unreadable, so I will use ... Inf instead :)
03:20 Juerd The hardest part will probably selecting the 3 non-perl languages :)
03:20 Juerd And then figuring out what's idiomatic in those
03:21 Juerd Python is the only obvious one, given its popularity.
03:22 Juerd Java/C++/C# are all so similar, when it comes to basic syntax, that if you pick one, those who prefer the other language from that syntax family, will probably understand the code anyway.
03:22 Juerd Ruby is interesting because it too has a unique syntax
03:23 Juerd But PHP is interesting because it's such a great showcase of ugliness
03:23 Herby_ skids, I'm not still sure how to solve that "malformed utf-8" problem
03:23 Herby_ even with your tip of the webpage encoding
03:23 Juerd Even Perl 5 often looks nice next to PHP, and Perl 6 would be even better.
03:24 llfourn I suggest JS over PHP because it's a more formidable language. It has promises built in with ECMA6, and arrays and hashes are very natural. If you want uglyness then go with PHP :P
03:24 llfourn but I think the point is p6 will look great next to even JS
03:24 llfourn everyone gets that PHP sucks
03:25 Juerd I'm torn between excluding PHP because it sucks, and including PHP because it sucks.
03:25 llfourn heh yep :P
03:25 skids PHP is too easy a target.  It's just not sporting.
03:26 Juerd skids: It is, however, a lot of people's favourite language, and the go-to language for many programmers, even if they primarily write code in another language for their dayjob.
03:26 llfourn isn't it the other way around?
03:26 Juerd There are many Java programmers who would pick PHP for their personal projects.
03:27 Herby_ could someone take a peek at my crap code and tell me how to fix my "malformed UTF-8" error when I try to spurt to text file?
03:27 Herby_ http://pastebin.com/HJPqHx5S
03:27 Juerd llfourn: Not from what I've seen at hackerspaces
03:27 Herby_ ignore the poorly named variables
03:27 Juerd Herby_: Instead of asking us to ignore that, why don't you just come up with better names? :)
03:27 llfourn I would expect that people are forced to do awful wordpress plugins for work and then go home and detox with some nice perl,python or ruby
03:27 Herby_ good point, Juerd.
03:28 llfourn though I hate Java so much I guess even PHP could be some minor imporvement
03:28 llfourn or at least bad in different ways
03:28 Juerd Herby_: You have the arguments for spurt the wrong way around, it seems.
03:29 Herby_ wow, I'm a big dummy
03:29 Herby_ thought I read that doc right :(
03:30 Herby_ thanks, Juerd.
03:30 Juerd Herby_: Most functions that take a short string and a long string, will have the short string as the first argument.
03:30 Juerd This is not universal, but it seems to be the more common thing.
03:31 Herby_ I'll remember that tip
03:31 nightfrog That's more logical
03:31 Juerd Also, number and string: string is probably longer, comes last.
03:31 Juerd string and list: list is probably longer, comes last
03:31 Juerd (And not just because of its variable length)
03:32 Herby_ so at this point I have a variable containing JSON data.  Are there any tutorials on how to extract info from JSON in Perl 6?
03:32 Juerd I'd be surprised if I saw xyzzy(@quux, $foo), because I'd expect xyzzy($foo, @quux)
03:32 skids The former probably because a concatination expression is likely for the long string and the latter due to not wanting a fight over ","
03:33 Juerd Herby_: Decoding JSON can be done with a module
03:33 Juerd There are several JSON modules
03:39 cognominal joined #perl6
03:41 noganex joined #perl6
03:52 Herby_ ok, making progress. trying to figure out how to loop through an array of dictionaries, and pull data out
03:56 Herby_ getting "Type Array does not support associative indexing"
03:56 Herby_ hmm
03:58 sufrostico joined #perl6
04:03 Herby_ solved it, tad ugly though :)(
04:04 Juerd https://github.com/Juerd/philae/blob/master/braindump
04:04 Juerd Off to bed
04:04 Juerd Good night!
04:04 llfourn o/
04:04 Herby_ night!
04:05 anthk_ joined #perl6
04:12 cognominal Juerd, It would be nice to build it also as grammar show cases. Grammar being the formal counterpart to the informal descriptions.
04:19 anthk_ m: say (my uint $n3 = (0xA2000 +< 8)).fmt("%0b");
04:19 anthk_
04:19 camelia rakudo-moar cf7706: OUTPUT«1010001000000000000000000000␤»
04:19 anthk_ m:    say (my uint16 $n3 = (0xA2000 +< 8)).fmt("%0b");
04:19 anthk_
04:19 camelia rakudo-moar cf7706: OUTPUT«0␤»
04:21 anthk_ say (my uint16 $n3 = (0xA2F0 +< 8)).fmt("%0b");
04:21 anthk_
04:21 anthk_ m: say (my uint16 $n3 = (0xA2F0 +< 8)).fmt("%0b");
04:21 anthk_
04:21 camelia rakudo-moar cf7706: OUTPUT«1111000000000000␤»
04:27 Actualeyes joined #perl6
04:28 alpha123` joined #perl6
04:28 adu joined #perl6
04:34 molaf joined #perl6
04:39 sufrosti1o joined #perl6
04:42 vendethiel joined #perl6
04:45 sufrostico joined #perl6
04:46 mohae joined #perl6
05:00 revhippie left #perl6
05:03 orbus .tell jnthn when you have a moment, do you think you could describe how the Supply method on Channel is supposed to work?  It's not documented and I wanted to fix that - but it doesn't seem to work like I would expect.
05:03 yoleaux orbus: I'll pass your message to jnthn.
05:05 orbus m: my $c=Channel.new; my $s=$c.Supply; my $t1=$s.tap(-> $x {put "1 $x"}); my $c2=$s.Channel; for (1,2,3,4,5) {$c.send($_)}; await Promise.in(3)
05:05 camelia rakudo-moar cf7706: OUTPUT«1 1␤Memory allocation failed; could not allocate 15960 bytes␤»
05:05 orbus :/
05:06 orbus m: my $c=Channel.new; my $s=$c.Supply; my $t1=$s.tap(-> $x {put "1 $x"}); my $t2=$s.tap(-> $x {put "2 $x"}); for (1,2,3,4,5) {$c.send($_)}; await Promise.in(3);
05:06 camelia rakudo-moar cf7706: OUTPUT«2 2␤1 1␤2 3␤1 4␤2 5␤Memory allocation failed; could not allocate 15944 bytes␤»
05:06 orbus well that is actually what I would expect
05:06 orbus other than the memory allocation thing
05:07 orbus my $c=Channel.new; my $s=$c.Supply; my $t1=$s.tap(-> $x {put "1 $x"}); my $t2=$s.tap(-> $x {put "2 $x"}); for (1,2,3,4,5) {$c.send($_)}; await Promise.in(1)
05:07 orbus m: my $c=Channel.new; my $s=$c.Supply; my $t1=$s.tap(-> $x {put "1 $x"}); my $t2=$s.tap(-> $x {put "2 $x"}); for (1,2,3,4,5) {$c.send($_)}; await Promise.in(1)
05:07 camelia rakudo-moar cf7706: OUTPUT«1 1␤2 2␤2 3␤2 4␤2 5␤Memory allocation failed; could not allocate 15944 bytes␤»
05:10 vendethiel joined #perl6
05:10 orbus well
05:10 orbus actually not really
05:12 orbus I thought all the taps were supposed to get the same values
05:12 orbus but here it seems like they're each getting a random allotment of the values
05:13 anthk_ m: my uint8 $a = 240; say $a +< 2;
05:13 anthk_
05:13 camelia rakudo-moar cf7706: OUTPUT«960␤»
05:13 anthk_ what's the problem with the unsigned integers :\ ?
05:13 orbus they don't work?
05:14 orbus what the specific problem is, I'm not entirely sure, but I don't think they're really implemented at this time
05:15 orbus I think somebody said it had something to do with all integer types falling back to Int, but not really sure
05:18 jack_rabbit joined #perl6
05:24 llfourn orbus: have you checked out roast? there might be clues re .Supply on channel
05:25 orbus I haven't really looked through there no
05:25 orbus might take a look if I have time
05:25 orbus the way it acts is weird
05:25 orbus I'm wondering if it's not documented because the implementation is buggy
05:26 llfourn This is the Channel method on supply but you are after the other way around: https://github.com/perl6/roast/blob/master/S17-supply/Channel.t
05:26 orbus right
05:26 llfourn orbus: it is very buggy
05:26 llfourn in general
05:26 orbus supply is?
05:26 orbus or channel?
05:26 orbus channels seem to work pretty well
05:26 orbus haven't messed with supplies a lot yet
05:27 llfourn In my experience all async is fairly buggy but TBH I haven't delved into Channels and Supplied just Promises with start {}
05:27 llfourn Supplies*
05:28 orbus well my understanding is a supply should supply the same stream of values to all the taps on it
05:28 orbus if you create a supplier
05:28 orbus and create a supply off it
05:28 orbus and then put a couple taps
05:28 orbus that's what happens
05:28 orbus the taps get the same values
05:28 orbus but the supply that comes off Channel doesn't act like that
05:28 llfourn well I'm glad that bit works at least
05:28 orbus so I'm not sure if that's intentional or a bug
05:29 orbus I looked at the source
05:29 orbus but I'm not entirely sure I understand what it's doing :p
05:29 llfourn good luck with that!
05:30 orbus it looks like it's trying to emit every value added to the channel onto the supply
05:30 orbus which is more or less what I would expect
05:30 orbus but the taps are acting weird
05:30 orbus and I don't know why
05:30 skids orbus: "on-demand" supplies behave as you expect.
05:31 skids If you want to make an "on-demand" supply from one that is not, use .share.
05:31 orbus hmmm
05:31 orbus looking at the docs I still don't entirely understand the distinction
05:32 skids Or maybe I disn't understand that exactly
05:32 orbus but it seems like for both types, all open taps should see the same stream of values
05:32 skids yes all active taps should.
05:32 orbus with the supply I get off a channel
05:32 orbus what I'm seeing is
05:32 orbus well I had an example
05:32 orbus hang on
05:33 orbus m: my $c=Channel.new; my $s=$c.Supply; my $t1=$s.tap(-> $x {put "1 $x"}); my $t2=$s.tap(-> $x {put "2 $x"}); for (1,2,3,4,5) {$c.send($_)}; await Promise.in(1)
05:33 camelia rakudo-moar cf7706: OUTPUT«2 2␤1 1␤2 3␤1 4␤1 5␤Memory allocation failed; could not allocate 15944 bytes␤»
05:33 orbus this crashes on camelia
05:33 orbus but on my box it doesn't crash and that's still the full output
05:33 orbus it's like one tap is seeing some of the values
05:33 orbus and the other tap is getting the others
05:33 orbus and the distribution seems to be random - you get different results on different runs
05:34 jantore joined #perl6
05:35 orbus m: my $sr=Supplier.new; my $s=$sr.Supply; my $t1=$s.tap(-> $x {put "1 $x"}); my $t2=$s.tap(-> $x {put "2 $x"}); for (1,2,3,4,5) {$sr.emit($_)}; await Promise.in(1)
05:35 camelia rakudo-moar cf7706: OUTPUT«1 1␤2 1␤1 2␤2 2␤1 3␤2 3␤1 4␤2 4␤1 5␤2 5␤»
05:35 orbus a similar exercise with a supplier does what I would expect
05:38 xinming joined #perl6
05:40 orbus that might be by design but I'm not sure
05:41 orbus and I can't submit a documentation patch if I don't know how it's actually intended to behave
05:43 llfourn orbus: I'd say the first patch that's needed is tests if there aren't any :)
05:43 skids I think it's a bug.
05:44 aigan_ joined #perl6
05:45 orbus llfourn: can't write tests if we don't know how it's supposed to behave either
05:45 llfourn precisely :)
05:45 orbus I'm leaning towards bug as well, but not sure
05:45 orbus we'll see what jnthn says
05:45 orbus it came up in a conversation with him the other day
05:45 darutoko joined #perl6
05:45 orbus which is why I started looking in the first place
05:47 vendethiel joined #perl6
05:48 orbus it could be by design, because creating a Supply off a Channel and creating a Supply off a Supplier otherwise work out to basically the same thing
05:48 orbus you send on the channel, you emit on the supplier
05:49 orbus practical result is the same
05:49 orbus maybe that's not what's intended
05:49 Cabanossi joined #perl6
05:50 orbus but maybe that's a stretch too - that's why I'm uncertain
05:50 orbus anyway, getting late
05:50 * orbus afks
05:52 skids I was actually working on updating the design docs WRT to Supplies but then the "serial supply" changes came in and went too far and made even the supplies that are not supposed to be serial into serial supplies.
05:54 skids https://gist.github.com/skids/fabd0304f40e24db33d0 were some of the areas I could not figure out.
05:55 orbus here there be dragons
06:07 Actualeyes1 joined #perl6
06:13 pierrot joined #perl6
06:19 yeahnoob joined #perl6
06:28 lokien_ joined #perl6
06:47 cuonglm joined #perl6
06:48 cuonglm Hi guys, is anyone getting trouble with reading procfs file with perl6?
06:49 cuonglm perl6 -ne '.say' /proc/$$/statm
06:49 cuonglm went into an infinitive loop
06:50 cuonglm It doen't with Perl 5
06:50 cuonglm perl -pe '' /proc/$$/statm
06:50 cuonglm perl6 -pe '' /proc/$$/statm
06:51 llfourn cuonglm: send an example to rakudobug@perl.org if you wouldn't mind. Sounds like a bug.
06:54 domidumont joined #perl6
06:58 cuonglm llfourn: Thanks, I have sent an email to rakudobug@perl.org
06:59 llfourn cuonglm: cheers
07:00 domidumont joined #perl6
07:03 cuonglm Here's the ticket for anyone care about it https://rt.perl.org/Public/Bug/Display.html?id=127370
07:08 * geekosaur wonders if /proc is still hypersensitive to how it's accessed
07:10 geekosaur (used to be that you needed to read it buffered with a block size larger than the "file" or you'd get inconsistent data(
07:11 cuonglm geekosaur: Yes, there're some ways to work around. But in user perspective, I want the behavior will be the same as in Perl 5.
07:12 cuonglm If that behavior is intentional, then it should be documented else where, so the user won't make mistake
07:13 cuonglm My laptop was freeze after I do "/proc/<pid>/statm".IO.lines.elems
07:15 cuonglm the compiler won't guard me from doing elems on lazy list like (1, 1, *+* ...^ *).elems
07:16 cuonglm the compiler even won't guard me from doing elems on lazy list like (1, 1, *+* ...^ *).elems
07:24 domidumont joined #perl6
07:25 CIAvash joined #perl6
07:31 nakiro joined #perl6
07:32 vendethiel joined #perl6
07:39 moritz \o
07:43 FROGGS joined #perl6
07:46 firstdayonthejob joined #perl6
07:52 FROGGS o/
07:57 * moritz wonders why cuonglm would use the ...^ form of the series operator to create an infinite list
08:00 jast probably doesn't want all of infinity
08:00 _mg_ joined #perl6
08:02 MARTIMM joined #perl6
08:07 moritz [Coke]++ # diplomatic response to RT #127355
08:10 zakharyas joined #perl6
08:11 RabidGravy joined #perl6
08:15 vendethiel joined #perl6
08:15 abaugher_ joined #perl6
08:23 [Tux] csv-ip5xs       17.867
08:23 [Tux] test            22.454
08:23 [Tux] test-t          12.234
08:23 [Tux] csv-parser      50.351
08:31 ely-se joined #perl6
08:32 ely-se joined #perl6
08:34 virtualsue joined #perl6
08:44 Peter_WR joined #perl6
08:45 dalek doc: f52538b | RabidGravy++ | doc/Type/ (3 files):
08:45 dalek doc: document Channel.Supply,  Promise.Supply
08:45 dalek doc:
08:45 dalek doc: Also add link to concurrency doc
08:45 dalek doc:
08:45 dalek doc: Closes #366
08:45 dalek doc: review: https://github.com/perl6/doc/commit/f52538b5fa
08:45 dakkar_ joined #perl6
08:46 karim joined #perl6
08:47 karim left #perl6
08:49 abraxxa joined #perl6
08:50 zakharyas joined #perl6
08:52 RabidGravy Boom!
08:52 travis-ci joined #perl6
08:52 travis-ci Doc build errored. Jonathan Stowe 'document Channel.Supply,  Promise.Supply
08:52 travis-ci https://travis-ci.org/perl6/doc/builds/104843377 https://github.com/perl6/doc/compare/d78c5efb024b...f52538b5fae4
08:52 travis-ci left #perl6
08:53 * lizmat clickbaits https://p6weekly.wordpress.com/2016/01/25/2016-123-what-are-we-waiting-4/
08:54 zakharyas joined #perl6
08:56 nine Whenever I read that, I have the Duke's voice in my head... "What are you waiting for? Christmas?"
08:57 RabidGravy lizmat++ # did you do anything in the last week but find all those links? ;-)
08:58 CIAvash lizmat++
09:01 lizmat nine: I was more thinking about https://www.youtube.com/watch?v=8qPUJhy0Dz4&amp;feature=youtu.be&amp;t=68
09:07 stmuk .tell zoffix maybe the xmas advent butterfly on perl6.org should finally fly away?
09:07 yoleaux stmuk: I'll pass your message to zoffix.
09:12 fireartist joined #perl6
09:12 Kogurr joined #perl6
09:12 lizmat .oO( isn't it eternally christmas now? )
09:14 rindolf joined #perl6
09:20 fireartist what would be the best way to create/generate multiple methods with almost-identical functionality - basically fancy accessors which I would have used Class::Accessor to make in perl5?
09:24 fireartist something like perl5: for $name (@names) { *{"$class"} = sub {} }; # where the sub body accesses different variables/methods based on $name
09:24 RabidGravy well
09:24 lizmat m: class A {}; A.^add_method("foo", method { say self } ); A.foo
09:24 camelia rakudo-moar cf7706: OUTPUT«(A)␤»
09:25 RabidGravy or at it's simplest just use an "public attribute"
09:26 fireartist I was hoping I could use attributes, but augment them with something like traits to gain extra functionality - but can't find anything like that in the docs
09:26 vendethiel joined #perl6
09:27 fireartist the add_method() would work, but was hoping for something more declarative - like attributes
09:28 lizmat m: class A { has $.foo }; say A.new(foo => 42).foo
09:28 camelia rakudo-moar cf7706: OUTPUT«42␤»
09:28 lizmat fireartist: is that what you mean ?
09:30 fireartist it I were to use attributes, it wouldn't be just storing/returning a value
09:30 fireartist here's an example of the kind of perl5 code I'm trying to replicate: https://metacpan.org/source/HALKEYE/Games-Lacuna-Client-0.003/lib/Games/Lacuna/Client/Module.pm#L69
09:32 lizmat so you're basically programmatically building a sub and then install that as a method
09:32 fireartist yes
09:33 lizmat looks like ^add_method would be the thing then
09:33 fireartist ok, I'll have a try with that - thanks
09:34 lizmat afk for a few hours&
09:39 nine fireartist: there are a couple of modules that implement new attribute traits: http://modules.perl6.org/#q=attrib
09:41 fireartist nine: thanks, I'll check them out!
09:43 avuserow joined #perl6
09:43 JimmyZ joined #perl6
09:44 DrForr Did I mention I hate encodings with a passion?...
09:48 User00 joined #perl6
09:51 nine DrForr: if only I didn't understand that so well...
09:53 DrForr I think this data was run through UCS-2, UTF-9 and WTF-8 before arriving at Latin-Pig.
09:53 jnthn The trouble with encodings is that there's more than one of them :)
09:53 yoleaux 05:03Z <orbus> jnthn: when you have a moment, do you think you could describe how the Supply method on Channel is supposed to work?  It's not documented and I wanted to fix that - but it doesn't seem to work like I would expect.
09:57 DrForr And a woodchipper somewhere between UCS-2 and WTF-8, for good measure. It has the dubious distinction of being a new kind of mojibake I have not seen.
09:57 jnthn .tell orbus .Supply on a Channel gives a Supply that will emit values that are sent on the Channel. The emit will be scheduled on the thread pool. If there are multiple active supplies on the Channel, or other readers, then they compete over the values.
09:57 yoleaux jnthn: I'll pass your message to orbus.
09:59 leont joined #perl6
10:02 spacebat /buffer 4
10:25 vendethiel joined #perl6
10:37 lokien_ joined #perl6
10:41 nige1 joined #perl6
10:42 nige1 morning *
10:43 espadrine joined #perl6
10:43 nige1 just wanted to pop a meme in the pool ;-)
10:44 nige1 nginx - has just released v8 with http/2 support - https://www.nginx.com/blog/nginx-plus-r8-released/
10:45 nige1 I wonder if a Perl 6 adapter could be added
10:45 jnthn .oO( I made you a http/2, but I JavaScript'd it? )
10:46 fireartist joined #perl6
10:47 nige1 jnthn - any thoughts on the feasibility of that?
10:48 xvx joined #perl6
10:49 timotimo what does it mean to be an adapter?
10:49 nakiro joined #perl6
10:49 nige1 there is a Perl 5 module - that can do server side includes
10:49 timotimo lol server side includes
10:49 nige1 I was thinking of something similar
10:49 nige1 sec
10:49 timotimo that sounds like antique technology, tbh
10:50 nige1 http://nginx.org/en/docs/http/ngx_http_perl_module.html
10:50 nige1 it does more than SSI
10:51 domidumont joined #perl6
10:51 vendethiel joined #perl6
10:52 timotimo many things on that documentation page scream "this is only for tiny hacks" to me
10:52 nige1 yes - agreed
10:53 domidumont joined #perl6
10:53 timotimo perl6 has the big benefit of having async i/o and true multi-threading, though
10:54 timotimo so the "if you do long-running operations in perl code, no other perl code will execute" problem wouldn't be a problem with a perl6 adapter
10:54 nige1 yes - so it would the stop-the-world during request handling problem
10:55 timotimo on the other hand, rakudo itself is rather memory-hungry, sadly
10:55 timotimo it'll improve a whole lot this year, though
10:55 nige1 so there would be a fat process there
10:56 timotimo personally, i'd still recommend running a regular server process and make that available via something like mod_proxy
10:56 timotimo or fcgi, psgi, whatever
10:56 nige1 yes
10:56 timotimo not sure if those protocols know anything about the fancy new http/2 features
10:56 timotimo like "i know you'll want this file, so here it is already"
10:58 timotimo i can imagine a mod_proxy'd thingie would have no problem tunneling multiple requests through the same outbound tcp connection while the underlying application serves one resource per one socket
10:59 nige1 hmmm - yes - it's going to be interesting to see how things work with http/2 - it seems to be picking up pace now
10:59 jast some proxy mods can even handle websockets these days, so it seems fairly realistic
10:59 timotimo just has to be implemented :)
11:00 timotimo well, websockets are specifically made to be extremely robust to transports not knowing about it
11:00 timotimo i think a mod_proxy like thingie is very likely to support websockets unless it specifically fucks it up
11:06 araujo joined #perl6
11:09 Guest18755 joined #perl6
11:11 Guest18755 joined #perl6
11:13 Guest18755 joined #perl6
11:16 Guest18755 joined #perl6
11:17 nakiro joined #perl6
11:18 fireartist is there a way to get the filepath that was used to load a module? equivalent to perl5: $INC{'Module.pm'}
11:18 jdrab joined #perl6
11:19 Guest18755 joined #perl6
11:23 Peter_WR joined #perl6
11:26 gfldex fireartist: a module may not be a file and therefor there may not be a path
11:26 fireartist makes sense
11:30 fireartist is this a bug...?
11:30 fireartist 1# run code (lib/.precomp is created)
11:30 fireartist 2# add -I ../other-dir/lib (overriding an already-installed module)
11:30 fireartist 3# run code again (does not load from ../other-dir/lib until I manually delete lib/.precomp)
11:31 timotimo "use lib" definitely disables precomp. i'm not sure if "-I" does, too
11:32 fireartist ok, I'll test the same with 'use lib'
11:34 timotimo "use lib" invalidates the precompilation because now things that are used transitively have to consider that folder, too ... or something like that?
11:34 fireartist yes, adding "use lib '../other-dir/lib';" after the "use 'lib';" doesn't have the issue
11:34 timotimo i regret to say i haven't kept up much since these improvements were made before christmas
11:36 fireartist PERL6LIB has the same issue as -I -it's not invalidating .precomp
11:36 timotimo seems like a bug, in that case
11:37 fireartist would it be the rakudo tracker I should submit this to? (I'm running rakudo/moar 6.c)
11:37 timotimo those bugs go into rakudobug@perl.org (is it .org?) via mail
11:38 fireartist cool - thanks for your help!
11:38 moritz yes, it's .org
11:39 timotimo no, thank you
11:51 nine Plese note that a "use lib" after using any module will disable all precompilation. That may be the cause of this difference to PERL6LIB or -I
11:51 timotimo damn you, jnthn. because of your excellent design of async stuff and our event loop in perl6 i never would have thought of the problems raised in the hammersmith and akka sections of http://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/
11:51 vendethiel joined #perl6
11:58 sena_kun joined #perl6
11:59 Skarsnik joined #perl6
12:00 llfourn fireartist: you can find the repo the module was loaded from by calling .repo-id on the compunit
12:00 Skarsnik HeHello
12:00 llfourn (I think)
12:00 DrForr o/
12:00 llfourn https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit.pm#L12
12:02 gensym joined #perl6
12:02 llfourn m: $*REPO.need(CompUnit::DependencySpecification.new(short-name => "Test")).repo-id.say
12:02 camelia rakudo-moar cf7706: OUTPUT«39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7␤»
12:03 llfourn m: $*REPO.need(CompUnit::DependencySpecification.new(short-name => "Test")).repo.say # more useful
12:03 camelia rakudo-moar cf7706: OUTPUT«inst#/home/camelia/rakudo-m-inst-1/share/perl6␤»
12:08 fireartist llfourn: thanks! that helps confirm the issue I was seeing
12:09 llfourn \o/
12:12 iH2O joined #perl6
12:12 Zoffix .
12:12 yoleaux 09:07Z <stmuk> Zoffix: maybe the xmas advent butterfly on perl6.org should finally fly away?
12:13 Zoffix Yeah, probably time
12:14 timotimo how about we move the "jump in" button to the right where "recent blog posts" is now and make "recent blog posts" as tall as "jump in" and "advent calendar" used to be together?
12:14 RabidGravy joined #perl6
12:14 timotimo does our layout mechanism support that without trouble?
12:15 RabidGravy boom!
12:16 timotimo heyo gravy-man
12:16 iH2O left #perl6
12:17 sena_kun We still haven't any way to take c-header and get defined constants from it?
12:17 sena_kun Pretty way, I meant.
12:18 timotimo doesn't gptrixie do that, too?
12:19 sena_kun timotimo, isn't it generates signatures, etc? I need to rtfm then.
12:19 timotimo i think it's supposed to do more than just signatures
12:20 timotimo i haven't actually used it yet
12:20 arnsholt I think it generates both function signatures and constant values
12:20 sena_kun timotimo, if so, I'll use it.
12:20 timotimo it also does classes, i see
12:20 arnsholt If you just want the constants, you can either dump everything and delete what you don't want, or patch it to only dump constants
12:21 timotimo well, it already has a --all flag, supposedly it'd also have limiting flags
12:21 timotimo [--enums] [--functions] [--structs] [--externs] [--list-types]
12:21 Skarsnik It's #| to add doc to parameter in MAIn ?
12:22 Zoffix timotimo, good idea. Yeah, it should be doable. I'll look into it sometime this week unless anyone else does it before that.
12:22 RabidGravy yes
12:22 timotimo thank you, Zoffix
12:22 timotimo it's just because i saw so many posts in there are yours :P
12:23 timotimo how would you feel about giving the pl6anet a bit of styling, too? :3
12:26 RabidGravy really the most sensible way of getting #define FOO is by making a C wrapper and compiling it
12:26 Skarsnik there is a define-enum to generate enum from #define
12:27 timotimo oh, skarsnik is here! :)
12:27 Zoffix RabidGravy, compiling it into a lib and using it with NativeCall or compiling it into what?
12:27 timotimo well, you could also make it a little CLI binary
12:27 RabidGravy er, yes
12:27 timotimo either with a flag for every constant or just printing out all constants that are interesting
12:28 RabidGravy it's do similar to what the h2xs does and generate a function that allows you to query the values
12:29 sena_kun RabidGravy, you meant we can get #define's stuff from lib just using NativeCall? How exactly?
12:29 RabidGravy no I don't mean that
12:29 Skarsnik the issue with this solution you need the lib header
12:29 RabidGravy you exactly can't and will never be able to do this
12:29 Skarsnik to compile
12:30 RabidGravy the issue with not doing it is that the values may differ from platform to platform
12:30 RabidGravy *shrug*
12:31 vendethiel joined #perl6
12:32 gfldex Larry went to Hawaii. A smart move given the weather back home. He may also come to my hometown here in Eastern Germany, where we have 14°C and spotty sunshine.
12:33 sena_kun RabidGravy, you're right. Anyway, I'm trying to write a module with fnctl constants/call and the only way to achieve it seems to be just parse header and build the module for a host OS. Am I right?
12:33 RabidGravy obviously if the define is just a literal value then you stand a pretty good chance of it staying the same, but some library generate the public .h file based on what it finds at configure time
12:35 RabidGravy sena_kun, well fcntl is defined by POSIX so there is a reasonable chance that the values will stay the same, but not guaranteed, which is why it expressed in terms of the defines in the documentation
12:36 Skarsnik hm
12:36 Skarsnik There are probably some base value always the same
12:36 Skarsnik with some extension based on the Os
12:37 nine As it is you're going to need a C compiler on the target system in any case. So you may as well compile a small helper library with functions which you can call via NativeCall
12:37 RabidGravy an operating system that has a POSIX interface but is not at all Unixy they may be entirely different
12:38 Skarsnik and question: I am handling filtering generated stuff based of the file it came from. Should I try to gather everything from the same file (struct/func/..) or keep displaying by stuff and just add from what file it came from?
12:39 RabidGravy which is why e.g. Sys::Utmp has a helper library as the struct utmp that is returned by getutent and friends differs from OS to OS
12:41 RabidGravy Skarsnik, I'd go with the latter myself
12:41 ajr_ joined #perl6
12:43 RabidGravy gfldex, it's warmish in London but there is a lot of wind right now
12:50 ely-se joined #perl6
12:51 sena_kun Where does panda install binaries when ran from non-root?
12:52 Skarsnik somewhere
12:52 gfldex ~/.perl6
12:52 Skarsnik .perl6/site/install/panda/stuff/morestuff
12:52 Skarsnik Soomething like that
12:52 gfldex well, it depedns on the prefix you use
12:54 sena_kun Skarsnik, gfldex then something is wrong with my installation, since I have only .perl6/2015.12/(dist|precomp). No way for panda.
12:55 avenj joined #perl6
12:55 avenj joined #perl6
12:55 gfldex sena_kun: try to build rakudo with --prefix=$HOME/local/ . That worked for me.
12:55 Skarsnik nothing in dist?
12:55 sena_kun gfldex, I'll try then.
12:55 sena_kun Skarsnik, exactly.
12:55 fireartist if you used rakudobrew, look in ~/.rakudobrew
12:55 Skarsnik how did you install rakudo?
12:56 ajr_ Isn't panda for installing modules, not binaries?
12:56 vendethiel joined #perl6
12:57 sena_kun ajr_, gptrixie installs binary file too.
12:57 sena_kun Skarsnik, using rakudobrew. I am searching there now.
12:58 Skarsnik oh yeah, it's in .rakudobrew
12:59 sena_kun It seems so - .rakudobrew/moar-2015.12/install/share/perl6/site/bin/gptrixie
12:59 sena_kun Thanks for your help, folks.
12:59 sammers joined #perl6
12:59 ajr_ It would be nice if the documentation for installers (of all sorts) stated explicitly what they're installing and where.
12:59 moritz ajr_: then please contribute to that documentation
13:00 Skarsnik Na panda should say it
13:00 ajr_ I'll try, when I know enough to make useful contributions.
13:01 moritz panda says "Please add $directory to your $PATH variable" or so
13:01 timotimo you can never "know enough"! :)
13:01 moritz so you can kinda infer that it installs executables to that path
13:01 RabidGravy ajr_, panda will install whatever you ask it to, lots of modules install dynamic libraries they have built themself for example
13:02 lizmat .tell [Coke] I have a small patch that makes hash inits (like %h = a => 42) about 10% faster, should I commit now and if so, where ?
13:02 yoleaux lizmat: I'll pass your message to [Coke].
13:03 lizmat afk&
13:03 ajr_ Thanks, RG, that's a good clarification.
13:05 lnrdo joined #perl6
13:11 Zoffix joined #perl6
13:13 Skarsnik does putting Array @hello in main make it accept stuff like --hello=1,2,3 ?
13:14 * Zoffix doubts it
13:14 moritz Skarsnik: 'Array @hello' would be an array of arrays
13:14 moritz Skarsnik: the @ already implies array
13:15 Skarsnik yeah without the Array
13:15 moritz it could be that using the @ sigil means you're allowed to pass that option mutliple times
13:15 Zoffix Says: "Usage:  foo.p6 <hello>"
13:15 moritz --hello=a --hello=b
13:15 Zoffix doesn't work
13:16 moritz pity
13:16 Zoffix (still says "usage...")
13:22 skids joined #perl6
13:24 MARTIMM joined #perl6
13:24 Skarsnik hm is that a bug? I do MAIN(Str $opt1 #| foo (newline) , $opt2 #| bar and Usage show me foo for opt2
13:25 lizmat Zoffix: multi sub MAIN(:@hello) { dd @hello }   # seems to do the trick for me
13:25 Zoffix lizmat, ah, I didn't use the :
13:25 lizmat $ perl6 4 --hello=1 --hello=2
13:25 lizmat [IntStr.new(1, "1"), IntStr.new(2, "2")]
13:25 moritz ah right, needs to be named
13:25 timotimo could be you actually want #= instead of #| ?
13:25 moritz lizmat++
13:25 El_Che ==> Fetching Text::CSV
13:25 El_Che Please remove leading 'v' from perl version in Text::CSV's meta info.
13:25 El_Che Text::CSV requires Perl version 6.0.0. Cannot continue.
13:25 Skarsnik Oh it's =
13:26 El_Che need to update ly fairly recent rakudo or panda setup?
13:26 Zoffix moritz, RE RT#127364, I kinda expected race to split up those 100000 calls to .base into two threads and do 500,000 calls in each. That'd make it be heavy lifting
13:27 lizmat El_Che: I see "perl"         : "6.c",
13:27 xpen joined #perl6
13:27 lizmat no v in sight
13:27 Zoffix Otherwise, there's not much use to it. I'd only use it if I want my program to be faster, but if there's a chance for it to be 5 times SLOWER than raceless version just because some box my program is run on can crunch each iteration very fast
13:27 Zoffix ...then I'd be wary of using .race
13:27 El_Che lizmat: my command is a simple "panda install Text::CSV"
13:28 lizmat hmmmm....
13:28 El_Che let nuke rakudo and try again
13:28 lizmat no idea, then
13:28 Zoffix El_Che, NOOo
13:28 Zoffix wait
13:28 El_Che ok
13:28 Zoffix El_Che, recently there was a change that requires the perl key in META to NOT have the "v" in front of version. That module does have it
13:28 Zoffix So the META needs to be edited. Clone it, remove "v" and do panda install . and submit a PR to the author
13:29 El_Che Zoffix:  will do
13:29 Zoffix oh
13:30 Zoffix El_Che, seems like it's updated already. Maybe try running panda update
13:30 Skarsnik hm
13:30 Skarsnik Usage: bin/gptrixie [--all] [--define-enum=<Str>] [--ooc=<Str>] [--enums] [--functions] [--structs] [--externs] [--list-types] [--list-files] [--files=<Str>] [--hello=<Positional>] <header-file> [<gccoptions> ...] -- The header file to use
13:30 Skarsnik Should it show the <gccoptions> at the end ? (it's a *@)
13:31 araujo joined #perl6
13:31 araujo joined #perl6
13:32 El_Che Zoffix: panda update did the trick. I didn't know about that. Maybe that should could automatically?
13:32 Skarsnik hm panda can be broken sometime, you probably don't want it to upgrade itself x)
13:32 Zoffix Yeah, probably.
13:33 Zoffix Skarsnik, the update fetches the fresh ecosystem meta file
13:33 Skarsnik Oh that
13:33 timotimo "panda update" could be more explanatory about what exactly it does
13:33 El_Che timotimo: I wouldn know why the use case is to do that manually
13:33 El_Che why -> what
13:34 lizmat afk&
13:34 Zoffix It's more of "fetching it before every module install is a bad idea"
13:34 timotimo hum?
13:34 Skarsnik why USAGE choose a random order to display option lol
13:34 El_Che not for every install, for every run
13:34 Skarsnik instead of the order in main? x)
13:34 timotimo Skarsnik: probably something's using a Hash in the middle
13:35 Zoffix Still, sounds excessive. Our servers will be hammered pretty often (assuming we get a ton of users)
13:35 Skarsnik That kind of bad probably
13:35 Skarsnik I mean I can always write my own USAGE
13:35 Actualeyes joined #perl6
13:36 Skarsnik but order it quite meaning full
13:36 Zoffix I'd do it like "fetch fresh one if the local copy is older than $n days"... and maybe do it like 2-3 days (at the current ecosystem rates)
13:36 El_Che JSON::Tiny seem to be popular
13:36 Skarsnik timotimo, should I repport that as LAA?
13:36 El_Che (looking at the serialization options in the eco system)
13:36 lnrdo joined #perl6
13:37 kaare_ joined #perl6
13:38 vendethiel joined #perl6
13:38 AlexDaniel joined #perl6
13:42 Skarsnik JSON::Marshal/Unmarshal more suited for serializatio with json x)
13:45 Skarsnik how I do multi line WHY ? I used #= on each line but I kind of want a \n added to it? x)
13:48 Zoffix m: sleep 1 for ^8 .hyper; say now - INIT now
13:48 camelia rakudo-moar cf7706: OUTPUT«8.007386665␤»
13:48 Zoffix m: sleep 1 for ^8 .hyper: :1batch; say now - INIT now
13:48 camelia rakudo-moar cf7706: OUTPUT«2.0091985␤»
13:48 Zoffix k
13:48 maslan joined #perl6
13:55 Zoffix m: sleep 1 for ^8 .hyper: :4degree; say now - INIT now
13:55 camelia rakudo-moar cf7706: OUTPUT«8.00768867␤»
13:56 Zoffix m: run 'lscpu'
13:56 camelia rakudo-moar cf7706: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub run at src/RESTRICTED.setting line 14␤  in block <unit> at /tmp/RqpYWDj0go line 1␤␤»
13:56 Zoffix m: use NativeCall; sub system (Str) is native {}; system 'lscpu'
13:56 camelia rakudo-moar cf7706: OUTPUT«Architecture:          x86_64␤CPU op-mode(s):        32-bit, 64-bit␤Byte Order:            Little Endian␤CPU(s):                4␤On-line CPU(s) list:   0-3␤Thread(s) per core:    1␤Core(s) per socket:    1␤Socket(s):             4␤NUMA nod…»
13:56 lnrdo joined #perl6
14:00 flussence m: #|{ foo␤ bar␤ baz}␤my $foo;␤␤ say $foo.WHY
14:00 camelia rakudo-moar cf7706: OUTPUT«(Any)␤»
14:00 flussence m: #| foo␤my $foo;␤␤ say $foo.WHY
14:00 camelia rakudo-moar cf7706: OUTPUT«(Any)␤»
14:01 flussence .oO( how do I do *single* line .WHY...? )
14:01 Zoffix isn't only for subs?
14:01 flussence m: #| foo␤sub foo {}␤#= bar␤ say &foo.WHY
14:01 camelia rakudo-moar cf7706: OUTPUT«foo␤bar␤»
14:02 flussence hum, not how I remember it supposed to work
14:02 flussence m: #|{ foo␤foo2␤foo3 }␤sub foo {}␤#= bar␤ say &foo.WHY
14:02 camelia rakudo-moar cf7706: OUTPUT«foo foo2 foo3␤bar␤»
14:06 Skarsnik lol Zoffiw with the system work around
14:06 moritz well, I guess I'll have to remove NativeCall from the camelia rakudo build
14:06 Skarsnik #| is for the next thing
14:07 Skarsnik you can probably removing calling the sub?
14:07 Skarsnik *remove
14:08 Zoffix moritz, yeah, that's probably a safe way to go
14:09 Zoffix Removing calling a sub sounds iffy... You'd have to regex it out or something and that (a) might leave some bypass (b) might mess with different code that's trying to run
14:09 Skarsnik na keep NC, it useful to show how guess_library_name work for people asking about how NC handle libraryname
14:09 Skarsnik Zoffix, na you probably can just remove assigning the NC trait to the sub
14:10 Skarsnik and it will act like a 'normal' sub
14:10 Zoffix m: use NativeCall; sub not-a-system (Str) is native is symbol('system') {}; not-a-system 'lscpu'
14:10 camelia rakudo-moar cf7706: OUTPUT«Architecture:          x86_64␤CPU op-mode(s):        32-bit, 64-bit␤Byte Order:            Little Endian␤CPU(s):                4␤On-line CPU(s) list:   0-3␤Thread(s) per core:    1␤Core(s) per socket:    1␤Socket(s):             4␤NUMA nod…»
14:11 Skarsnik I was just saying preventing native sub to be called at all
14:11 Skarsnik not just filter on system
14:11 Zoffix Ahh
14:12 Zoffix m: use NativeCall; sub fork is native {}; fork; say 42
14:12 camelia rakudo-moar cf7706: OUTPUT«42␤42␤»
14:12 Zoffix This can be useful to show too
14:12 nige1 joined #perl6
14:12 Zoffix *shrug* I'm fine with NC being removed completely :)
14:12 gtodd I always thought camelia ran inside a VM inside a jail in a zone in a cave under a glacier with someone nearby ready to pull the power-cord ...
14:12 Zoffix nah
14:13 Zoffix last week I killed her accidentally.... Then restarted using the nativecall hack using a copy of her running on another server XD
14:13 gtodd sheesh
14:13 gtodd when a butterfly's wing flaps in ... errm
14:14 Zoffix :D
14:14 gtodd what about a "special" version of NC that says "I'm sorry Dave ..."
14:15 araujo joined #perl6
14:15 araujo joined #perl6
14:16 Zoffix :F
14:16 Zoffix *:D
14:17 sammers joined #perl6
14:17 gtodd wow ... use NativeCall; sub fork is native {}; fork; say 42  ???
14:17 gtodd that is ... pretty cool
14:17 gtodd for how simple it is :)
14:18 lokien_ joined #perl6
14:19 gtodd maybe an entire chapter in the docs should be dedicated to NC security  so people don't become needlessly nervous :)
14:19 moritz gtodd: you're welcome to provide that
14:19 gtodd :-D
14:20 gtodd 1. Tell your manager that you have turned off NC in your build :)
14:20 sena_kun joined #perl6
14:21 gtodd 2. For a truly secure feeling maybe even really do step 1. ...
14:22 DrForr Run it on CP/M :)
14:23 Skarsnik Actually that not a bad idea, to have something to cut off NC (or the nqp/vm that make it work)
14:23 cdg joined #perl6
14:24 RabidGravy You could make a build with it turned off in the restricted setting I guess
14:24 gtodd ... of course a lot of internet facing machines have 3 compilers 14 scripting languages 12 shells and  a partridge in a pear tree ... :-)
14:25 cdg joined #perl6
14:25 RabidGravy exactly, if you're concerned about a theoretical local loophole than you're probably stuffed anyway
14:28 gtodd I just thought perl6 w/ NC was no worse than $OTHERTHING
14:28 hoelzro o/ #perl6
14:29 hoelzro when the earliest/more syntax changed to react/whenever, did anything similar to wait appear? or should one just use another channel to implement a timeout?
14:29 araujo joined #perl6
14:30 araujo joined #perl6
14:32 lnrdo joined #perl6
14:33 Skarsnik well you don't need a compiler to make NC work
14:33 ChoHag joined #perl6
14:33 Skarsnik You install rakudo/moar and that it
14:34 ely-se joined #perl6
14:36 jnthn hoelzro: What're you looking to do?
14:36 jnthn hoelzro: react already implies non-busy waiting
14:36 hoelzro jnthn: looking to see if https://rt.perl.org/Ticket/Display.html?id=125343 is still relevant
14:49 rindolf joined #perl6
14:49 ugexe joined #perl6
14:49 jack_rabbit joined #perl6
14:50 perlpilot joined #perl6
14:59 nakiro joined #perl6
15:02 lnrdo joined #perl6
15:06 RabidGravy And if you want to end the react in some period of time then "react { whenever Promise.in($t) { done } ...... }" is probably the puppy
15:09 RabidGravy BTW hoelzro your https://rt.perl.org/Ticket/Display.html?id=123282 is a duplicate of one I did
15:09 hoelzro ah, it is? thanks for pointing that out; we should probably merge them
15:09 RabidGravy 'ang on I'll find the relevant ticket
15:10 RabidGravy https://rt.perl.org/Ticket/Display.html?id=126401
15:11 RabidGravy I don't think I'm able to merge the tickets so if someone else could
15:14 RabidGravy yeah I don't have permission to merge
15:14 hoelzro RabidGravy: I can merge them, but I don't see the similarity
15:14 hoelzro oh, dur
15:14 hoelzro nvm =P
15:14 hoelzro I thought you were talking about my earliest ticket
15:14 nine merged
15:15 RabidGravy no the IPv6 thing
15:15 RabidGravy :)
15:15 RabidGravy cheers
15:15 hoelzro damn, nine beat me to it!
15:15 hoelzro nine++
15:25 Skarsnik I need to use index to see if an element is in an array?
15:26 timotimo i think so. and if you use index, don't forget that "0" is a valid index, too. so you need "with" instead of "if"
15:26 timotimo or "without" instead of "unless"
15:26 timotimo oh, we also have "first"
15:26 timotimo that may work better for you, depending on your use case
15:26 hoelzro also any(@elems) == $target
15:26 Skarsnik why Str has a contains but not Array?
15:26 timotimo because in Str you can do boyer-moore substring search
15:27 timotimo :P
15:27 nine obviously...
15:27 timotimo also, contains on a Str is very different from contains on Array
15:27 Zoffix There are set operators
15:27 timotimo aye, (elem) would also be good
15:27 Zoffix m: my @valid = <foo bar ber>; say 'foo' ⊆ @valid; say 'blarg' ⊆ @valid
15:27 camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
15:27 timotimo like, 1234 in [1, 2, 3, 4] giving True would probably surprise you on an array, but not on a string.
15:27 Skarsnik what is the texas form? x)
15:28 timotimo (>=) for example
15:28 Zoffix m: my @valid = <foo bar ber>; say 'foo' (<=) @valid; say 'blarg' (<=) @valid
15:28 camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
15:28 timotimo but i'd really use (elem) instead of (<=)
15:28 timotimo that is a simpler check to do. dunno if we optimize that case already or not
15:28 Zoffix Yeah
15:29 Zoffix I had my mind set on...
15:29 timotimo your mind set on Set? :)
15:29 Zoffix m: my @given = <foo bar>; my @valid = <foo bar ber>; say @given ⊆ @valid; @given.append: "blarg"; say @gtiven ⊆ @valid
15:29 camelia rakudo-moar cf7706: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3FerWi__Kj␤Variable '@gtiven' is not declared. Did you mean '@given'?␤at /tmp/3FerWi__Kj:1␤------> 3n ⊆ @valid; @given.append: "blarg"; say 7⏏5@gtiven ⊆ @valid␤»
15:29 ilmari m: my @valid = <foo bar ber>; say 'foo' ∈ @valid;
15:29 camelia rakudo-moar cf7706: OUTPUT«True␤»
15:29 Zoffix dammit
15:29 Zoffix m: my @given = <foo bar>; my @valid = <foo bar ber>; say @given ⊆ @valid; @given.append: "blarg"; say @given ⊆ @valid
15:29 camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
15:30 timotimo note that that coerces the whole iterable to a set first
15:30 Zoffix Premature optimization :)
15:30 timotimo whereas .first or .index will short-circuit
15:31 timotimo more importantly, perhaps, coercing a lazy sequence to a set will never terminate even if the element can already be found
15:31 Zoffix ahh
15:31 timotimo .index and .first still work under the assumption that the lazy sequence will at some point really generate that element
15:31 timotimo if the element isn't in there, both .index/.first and (elem) will infiniloop, though
15:31 Zoffix m: my $x = 1..Inf; say so $x.index: "42";
15:31 camelia rakudo-moar cf7706: OUTPUT«False␤»
15:31 Skarsnik returns Nil when no values match for first
15:31 Zoffix m: my $x = 1..Inf; say so $x.first: "42";
15:31 camelia rakudo-moar cf7706: OUTPUT«True␤»
15:31 Skarsnik hm, should it be just False?
15:32 oldskirt_ joined #perl6
15:32 Skarsnik I am not if it's really a failure
15:32 Zoffix HAH
15:32 timotimo it doesn't smartmatch?
15:32 oldskirt_ left #perl6
15:32 timotimo m: say 45 ~~ "45"
15:32 camelia rakudo-moar cf7706: OUTPUT«True␤»
15:32 Zoffix nemo, somehow, magically, my compose started to work.. WITH the extended file ☺
15:32 [Coke] *achoo*
15:32 yoleaux 13:02Z <lizmat> [Coke]: I have a small patch that makes hash inits (like %h = a => 42) about 10% faster, should I commit now and if so, where ?
15:32 timotimo hooray!
15:33 Zoffix oh maybe not..
15:33 Zoffix Just the regular compose.. oh well, better than it being totally broken :P
15:34 Zoffix m: my $x = 1..Inf; say so 42 ∈ $x
15:34 camelia rakudo-moar cf7706: OUTPUT«(timeout)»
15:38 * gfldex .oO( Never start at the wrong end of an infinite list. )
15:38 [Coke] lizmat: nom. if we can cherry pick it to the release prep branch, great.
15:38 [Coke] .tell lizmat nom (I guess?) if we can cherry pick it to the release prep branch, great.
15:38 yoleaux [Coke]: I'll pass your message to lizmat.
15:38 vytas joined #perl6
15:38 MadcapJake Any idea why JSON::Fast would be really slow?
15:39 [Coke] MadcapJake: compared to?
15:39 MadcapJake well anything, it seems to just hang indefinitely when given an array of objects
15:40 MadcapJake m: class A {has $!value = 1, has $!string = 'A'}; my A @arr; for 0..15 { @arr.append: A.new }; use JSON::Fast; say to-json(@arr, :pretty);
15:40 camelia rakudo-moar cf7706: OUTPUT«===SORRY!===␤Could not find JSON::Fast in:␤    /home/camelia/.perl6/2015.12-220-gcf7706f␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    C…»
15:41 Skarsnik star-r: say 'hello'
15:41 Skarsnik r-star: say 'hello'
15:41 Skarsnik meh whatever xD
15:42 Zoffix star: say 'hello'
15:42 camelia star-m 2015.09: OUTPUT«hello␤»
15:42 Zoffix star: class A {has $!value = 1, has $!string = 'A'}; my A @arr; for 0..15 { @arr.append: A.new }; use JSON::Fast; say to-json(@arr, :pretty);
15:42 camelia star-m 2015.09: OUTPUT«Method 'append' not found for invocant of class 'Array[A]'␤  in block <unit> at /tmp/1giYzzUeuY:1␤␤»
15:43 Zoffix ... it's *that* old? >_<
15:43 MadcapJake Can JSON::Fast not handle class instances?
15:43 MadcapJake It seems JSON::Tiny just says "Cannot serialize type A"
15:43 Zoffix Dunno.. What's it supposed to do with them?
15:43 MadcapJake turn them into hash objects
15:44 moritz how?
15:44 Zoffix Interesting. That's not what I'd expect it to do.
15:44 ilmari objects are not hashes, regardless of what javascript calls them
15:44 MadcapJake but this is json we're talking about...
15:44 [Coke] I wouldn't expect to-json to work on classes, but I haven't read json-fast's docs yet.
15:44 moritz also note that JSON::Tiny aims to be *Tiny*, like, minimal
15:44 moritz so it will never implement fancy conversion schemes
15:45 [Coke] It should probably die or give up instead of hanging, though.
15:45 Zoffix MadcapJake, but you don't get a Perl 6 object out of a JSON hash
15:45 moritz there's room for larger/fatter/more feature-complete JSON implementations out there
15:45 Zoffix I'd expect it to call TO-JSON method, if one present, and call .Str if not
15:45 Zoffix or .gist I guess
15:45 kanishka joined #perl6
15:46 Zoffix m: say IO::Socket::INET.new.Str
15:46 camelia rakudo-moar cf7706: OUTPUT«IO::Socket::INET is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/P7nTXH4fwu line 1␤␤»
15:46 MadcapJake alright no biggy, i'll just create a class method that turns my objects into hashes
15:46 Zoffix ---
15:46 perlpilot TO-JSON sounds a little too magical to me.
15:46 Skarsnik use json::marshal/unmarshal MadcapJake
15:46 Zoffix perlpilot, that's the convention in Perl 5 land
15:46 moritz note that you can export your own to-json multis for your types
15:46 Zoffix Seems useful (if that convention is widely used that is)
15:46 perlpilot IF the class did the Associative role, perhaps to-json would work
15:46 MadcapJake Skarsnik: thanks!
15:47 Zoffix huggable, Associative
15:47 huggable Zoffix, role Associative [Object that supports looking up values by key]: http://doc.perl6.org/type/Associative
15:47 Zoffix m: class Bar is Associative { has $!foo = 42; }; Bar.new<foo>.say
15:47 camelia rakudo-moar cf7706: OUTPUT«Associative indexing implementation missing from type Bar␤  in block <unit> at /tmp/Sj7jziP7LP line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Sj7jziP7LP line 1␤␤»
15:47 Zoffix huh
15:48 moritz perlpilot: what about things like Match and Capture that do both Positional and Associative?
15:48 moritz Zoffix: http://doc.perl6.org/language/subscripts
15:48 perlpilot moritz: ah, good point.
15:48 musiKk joined #perl6
15:48 Zoffix Ahh
15:49 moritz Zoffix: you told it to be associative, but not *how* it's supposed to associate
15:49 Zoffix I wanted it magically figure that out :P
15:49 perlpilot there is no magic here.
15:49 * moritz wants a new laptop
15:49 Zoffix m: class Bar is Associative { has $!foo = 42; method AT-KEY { self."$key" } }; Bar.new<foo>.say
15:49 camelia rakudo-moar cf7706: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9WvkPmbMks␤Variable '$key' is not declared␤at /tmp/9WvkPmbMks:1␤------> 3{ has $!foo = 42; method AT-KEY { self."7⏏5$key" } }; Bar.new<foo>.say␤»
15:49 Zoffix m: class Bar is Associative { has $!foo = 42; method AT-KEY { self."$^key" } }; Bar.new<foo>.say
15:49 camelia rakudo-moar cf7706: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ro3kkDUwAL␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/Ro3kkDUwAL:1␤------> 3$!foo = 42; method AT-KEY { self."$^key"7⏏5 } }; Bar.ne…»
15:49 Zoffix oh sod off
15:49 Zoffix m: class Bar is Associative { has $!foo = 42; method AT-KEY { self."$^key"() } }; Bar.new<foo>.say
15:50 camelia rakudo-moar cf7706: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_Zb66kJwRE␤Placeholder variables cannot be used in a method␤at /tmp/_Zb66kJwRE:1␤------> 3 is Associative { has $!foo = 42; method7⏏5 AT-KEY { self."$^key"() } }; Bar.new<fo␤»
15:50 Zoffix (╯°□°)╯︵┻━┻
15:50 ilmari Zoffix: that doesn't help with iterating over the keys, though
15:50 ilmari m: class Bar is Associative { has $!foo = 42; method AT-KEY($key) { self!"$key"() } }; Bar.new<foo>.say
15:50 camelia rakudo-moar cf7706: OUTPUT«No such private method '!foo' for invocant of type 'Bar'␤  in method AT-KEY at /tmp/ebzsoO29Ld line 1␤  in block <unit> at /tmp/ebzsoO29Ld line 1␤␤»
15:50 Zoffix These error messages are so good, they're annoying. It's like, if you're that smart, fix it for me :D
15:51 perlpilot Zoffix: that's where there's room for magic in user-land :)
15:51 ilmari m: class Bar is Associative { has $.foo = 42; method AT-KEY($key) { self."$key"() } }; Bar.new<foo>.say
15:51 camelia rakudo-moar cf7706: OUTPUT«42␤»
15:51 perlpilot use fix-it-for-me;
15:51 Zoffix :)
15:52 * RabidGravy writes a really, really dumb HTTP echo server for testing purposes
15:52 Zoffix perlpilot, I think I'll churn out Class::MagicAssociative right here and now :)
15:52 Zoffix To learn the hash methods
15:52 Skarsnik RabidGravy, there is not already one? x)
15:53 RabidGravy Not dumb enough
15:53 Zoffix or Role:: I guess
15:53 Zoffix m: class Bar does Associative { has $.foo = 42; method AT-KEY($key) { self."$key"() } }; Bar.new<foo>.say
15:53 camelia rakudo-moar cf7706: OUTPUT«42␤»
15:56 virtualsue joined #perl6
15:57 lnrdo joined #perl6
16:01 sena_kun joined #perl6
16:02 ZoffixWin joined #perl6
16:02 ZoffixWin joined #perl6
16:02 nemo ZoffixWin: wooohoo!
16:03 nemo ZoffixWin: maybe last reboot killed off some IME or something that was running ☺
16:03 ZoffixWin maybe
16:03 RabidGravy Skarsnik, I mean, really, really, really dumb https://gist.github.com/jonathanstowe/e0d76e413751a9302729
16:04 sena_kun I've built latest nqp/moarwm/rakudo using rakudobrew, then tried to install panda and got "Method 'bindir' not found for invocant of class 'CompUnit::Repository::Installation'". It seems panda is broken for me by last commit.
16:05 * ZoffixWin tries out fresh install
16:06 sena_kun Of course, .perl6 and .rakudobrew was rm-rf-ed before. Twice.
16:07 perlpilot sena_kun: see, there's your problem ... you didn't rm-rf a third time!   ;)
16:07 * perlpilot rakudobrews to see what happens locally
16:07 dalek perl6.org: ad776e2 | (Zoffix Znet)++ | source/downloads/index.html:
16:07 dalek perl6.org: Typo
16:07 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/ad776e2ad7
16:08 Zero_Dogg joined #perl6
16:08 Zero_Dogg joined #perl6
16:08 sena_kun perlpilot, I just like to remove things.
16:08 nemo ZoffixWin: BTW, I don't know if you type in french like I do, but I had to disable some of that ridiculously large .XCompose for breaking accents. for some reason compose + ` + [a-z] is remapped to ᴀ..ᴇ... instead of à..è.. etc.  Doing `a instead of a` seems to avoid it, but I don't like remembering order, so I just disabled the characters I actually needed for french
16:09 ZoffixWin No, despite living in Cakunistan, I don't type in French :)
16:10 ZoffixWin *Canukistan too -_- way to ruin a pun
16:10 perlpilot ZoffixWin: oddly, I read it as if you'd typed it correctly
16:11 ZoffixWin Not too odd :) https://en.wikipedia.org/wiki/Typoglycemia
16:11 perlpilot heh
16:12 perlpilot sena_kun: panda seems to have installed just fine here.   How did you try to install panda?
16:13 nemo ZoffixWin: ah. cool.. where in canada?
16:13 ZoffixWin Brampton (40m away from Toronto, Ontario)
16:15 nemo 4,0▌🍁 ▌
16:15 nemo ZoffixWin: ah. I grew up... well, all over the place, but originally from oshawa area
16:15 nemo 40m O_o
16:15 ZoffixWin Ah. Been there
16:15 nemo went into a bit of a decline when GM started imploding
16:16 sena_kun perlpilot, just as written at /downloads page. When I installed it about a week ago it was fine. git clone rakudobrew, then build moar, then tried to rakudobrew build panda. http://pastebin.com/aNSWNkwY - here is the log.
16:16 nige1 joined #perl6
16:16 ZoffixWin sena_kun, works fine for me too. rakudobrew build moar; rakudobrew build panda;
16:17 ZoffixWin sena_kun, I notice in your log, it's not fetching from github
16:17 lnrdo joined #perl6
16:17 jme` joined #perl6
16:17 perlpilot sena_kun: /home/sena/.rakudobrew/moar-2015.12  doesn't look like the "latest" to me.
16:17 ZoffixWin sena_kun, this is my output, note the "cloning" at the start: https://gist.github.com/zoffixznet/8165faf650c53124e5e7
16:18 sena_kun ZoffixWin, it's because I rerun installation to show the log and master was already downloaded.
16:18 ZoffixWin oh, heh, right :)
16:18 ZoffixWin sena_kun, k, lemme try build the Christmas perl and try with panda with that
16:19 ZoffixWin That's not what I assumed you meant by "latest nqp/moarwm/rakudo" :)
16:19 perlpilot me either
16:19 sena_kun ZoffixWin, sorry, I was wrong here.
16:20 sena_kun Started from scratch.
16:21 ZoffixWin sena_kun, if you run "rakudobrew build moar" instead of "rakudobrew build moar 2015.12", *then* you'll get latest and greatest.
16:21 ZoffixWin Though, if panda fails with Christmas Perl 6, then it's certainly a problem.
16:22 sena_kun ZoffixWin, "rakudobrew build moar latest" will do the trick also?
16:22 ZoffixWin *shrug* never heard of that one
16:23 sena_kun ZoffixWin, the whole new world is waiting. (:
16:24 xvx joined #perl6
16:25 sena_kun Read rakudobrew readme - okay, I was at fault. But panda certainly fails with Xmas.
16:25 vendethiel joined #perl6
16:27 ZoffixWin Yup. Reproduced.
16:27 * ZoffixWin files an Issue
16:29 regreg joined #perl6
16:30 ZoffixWin https://github.com/tadzik/panda/issues/290
16:30 sftf joined #perl6
16:30 Kogurr joined #perl6
16:33 lnrdo_ joined #perl6
16:33 nine .tell FROGGS https://github.com/tadzik/panda/issues/290
16:33 yoleaux nine: I'll pass your message to FROGGS.
16:33 nine .tell jnthn https://github.com/tadzik/panda/issues/290
16:33 yoleaux nine: I'll pass your message to jnthn.
16:36 mr-foobar joined #perl6
16:36 psy joined #perl6
16:37 psy joined #perl6
16:41 mohae_ joined #perl6
16:56 AlexDaniel m: https://gist.github.com/AlexDaniel/69ff636ffe4053792120
16:56 camelia rakudo-moar cf7706: ( no output )
16:59 khw joined #perl6
17:00 xvx left #perl6
17:05 lostinfog joined #perl6
17:06 skids1 joined #perl6
17:16 noganex_ joined #perl6
17:19 ChoHag_ joined #perl6
17:24 nige1 joined #perl6
17:27 _mg_ joined #perl6
17:27 pmurias joined #perl6
17:31 zostay joined #perl6
17:31 BooK joined #perl6
17:33 lnrdo joined #perl6
17:34 johan joined #perl6
17:34 xnrand joined #perl6
17:35 frew joined #perl6
17:35 sjn \o
17:36 * sjn wishes jnthn++ a happy birthday
17:36 Grauwolf joined #perl6
17:38 SCHAAP137 joined #perl6
17:42 psy_ joined #perl6
17:52 ely-se joined #perl6
17:56 frew joined #perl6
18:04 muraiki joined #perl6
18:04 vendethiel joined #perl6
18:07 firstdayonthejob joined #perl6
18:12 mr-foobar joined #perl6
18:16 addison joined #perl6
18:16 lnrdo joined #perl6
18:29 ely-se joined #perl6
18:30 FROGGS joined #perl6
18:31 FROGGS o/
18:31 yoleaux 16:33Z <nine> FROGGS: https://github.com/tadzik/panda/issues/290
18:31 vendethiel \o
18:31 FROGGS hmmm
18:34 domidumont joined #perl6
18:35 araujo joined #perl6
18:41 ely-se hello world
18:42 FROGGS hi ely-se
18:42 ely-se writing my first type checker in Perl 6
18:42 ely-se EXCITING
18:42 araujo joined #perl6
18:42 araujo joined #perl6
18:43 ely-se the last time I've been this excited must have been when I was writing my first type checker in C#
18:43 _nadim joined #perl6
18:43 vendethiel ..around a month or two ago :P.
18:44 [Tux] :)
18:44 ely-se :)
18:48 lnrdo joined #perl6
18:51 DrForr .seen nine
18:51 yoleaux I saw nine 16:33Z in #perl6: <nine> .tell jnthn https://github.com/tadzik/panda/issues/290
18:52 nine FROGGS: thanks for the quick fix!
18:52 DrForr nine: Howdy. Got a memory issue I'd like to bounce off you.
18:52 FROGGS nine: will start to build the star RC in e few minutes btw
18:54 FROGGS nine: just need to wait for the availability of my left arm, where my youngest falls asleep right now
18:54 jevin joined #perl6
18:54 timotimo d'aaw
18:55 nine FROGGS: :)
18:55 nine DrForr: what can I do for you?
18:55 keix joined #perl6
18:56 DrForr Well, I'm fiddling with Inline::Guile stuff, and the way getting a list back from Scheme will have to work involves me malloc'ing a block inside C and having P6 deal with the resultant chunk.
18:56 DrForr Which means that something needs to free() that list's memory.
18:57 timotimo i wonder who will build Inline::V8 or Inline::Chakra or whatever the firefox one is called
18:57 timotimo TraceMonkey?
18:57 FROGGS copy the mem and then free it?
18:57 nine so far so good?
18:58 DrForr Right. I can do that easily enough, just buiild a struct, malloc the array and return it, no problem.
18:58 timotimo sub free(Pointer $p) is native(Str) { * }
18:58 DrForr That gets passed back as a CArray to Perl, and then when it's done unmarshalling the datastructure, something has to free it.
18:59 FROGGS DrForr: free it from Perl 6
18:59 DrForr Yeah, that's the simple but a bit unsatisfying way because that means I have to trust the Perl 6 code to free it.
18:59 DrForr Plus it's a nested data structure, with malloc'ed string ranges inside.
18:59 timotimo doesn't that mean every user of Guile is supposed to do the free-dance?
18:59 nine Why couldn't you trust the Perl 6 code to do that?
19:00 DrForr timotimo: No, just the Inline::Guile module.
19:00 mst because he wrote it and he knows he's terrible at it? ;)
19:00 nine I assume the unmarshalling code is part of Inline::Guile anyway?
19:01 DrForr Well, it's more complex than just free'ing the arena, so that part is probably best done in C.
19:01 DrForr I just don't want to accidentally the free() call and release it into the wild.
19:03 nine That's not much different from what I've got to do in Inline::Perl5. I also need to keep the reference counts correct which is quite a struggle.
19:04 dfcarpenterak joined #perl6
19:04 DrForr I'm thinking the best solution for that is to pass both the string we want eval'ed and a callback that does the unarshalling. That way the free() call can be in the same function that does the malloc, so I won't forget.
19:05 DrForr I'll play with that and let you know how I get along at FOSDEM, I suppose.
19:05 gfldex http://design.perl6.org/S26.html#Placement_links does not make sense because there is no way to tell the renderer what the content type is
19:05 mst I don't recall having to do nearly this dance in Guile.pm
19:05 mst but that may just be because somebody'd already written that part and I failed to understand it
19:05 domidumont joined #perl6
19:06 ggoebel14 how would one check if two lists are equivalent?  (1,2,3,4) == (1,2,3,4)
19:06 DrForr m: (1,2) ~~ (2,1)
19:06 camelia rakudo-moar cf7706: ( no output )
19:06 DrForr m: (1,2) ~~ (1,2)
19:06 camelia rakudo-moar cf7706: ( no output )
19:06 DrForr Er?...
19:06 ZoffixWin SAY
19:06 ZoffixWin m: say (1,2) ~~ (1,2)
19:06 camelia rakudo-moar cf7706: OUTPUT«True␤»
19:07 ZoffixWin m: say (1,2) ~~ (2,1)
19:07 camelia rakudo-moar cf7706: OUTPUT«False␤»
19:07 DrForr Ah.
19:07 gfldex m: say (1,2,3,4) eqv (1,2,3,4); say (1,2,3,4) eqv (1,2,3,5);
19:07 camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
19:07 DrForr . o ( Say, say, say what you want... )
19:07 ggoebel14 thank you... what is ~~ called?
19:07 gfldex smart match
19:07 domidumont joined #perl6
19:09 laz78 joined #perl6
19:09 El_Che |Tux| corrupted me after using Text::CSV. Weird bug was "sprintf ('%02d', $<day>)" <- with the extra space :)
19:09 DrForr mst - That may be the case, but the only way I've found to do eval involves running scm_with_guile() which takes a callback I create. That callbac does scm_eval_string() and passes the marshalled list back out of the Guile thread, which I have to tear apart and pass back.
19:10 DrForr I still have to do tests to prove that it's retaining the enironment thread in between invocations.
19:15 mst this sounds like "it got more complicated since I last looked at it"
19:15 DrForr Very likely.
19:17 mohae joined #perl6
19:18 _mg_ joined #perl6
19:19 [Coke] how agressive should we be about moving moarvm bug reports into moar rather than RT?
19:19 sufrostico joined #perl6
19:19 vendethiel m: multi sub infix:<+>(Str, Str) {}; say 3 + 4;
19:19 camelia rakudo-moar cf7706: OUTPUT«7␤»
19:19 [Coke] e.g. https://rt.perl.org/Ticket/Display.html?id=127374
19:20 DrForr Whew, environment tests worked.
19:21 DrForr Coupla days and 'guile-sub add($a,$b) { + a b }' may work :)
19:22 MadcapJake where does panda/zef install modules to?
19:22 spider-mario joined #perl6
19:23 mr-foobar joined #perl6
19:23 cfedde joined #perl6
19:27 ggoebel14 is it possible to use pointy block syntax on a list comparision with smart match? To turn something like: <x a m a x>[0..* div 2] ~~ <x a m a x>.reverse.[0..* div 2] into <x a m a x> -> $p { $p ~~ $p.reverse }
19:32 yqt joined #perl6
19:35 ggoebel14 my $a = <x a m a x>; for $a -> $p { say $p.[0..* div 2] ~~ $p.reverse.[0..* div 2] };
19:36 ggoebel14 is it possible to do that without first assigning the list to $a?
19:36 _mg_ joined #perl6
19:37 Kristien joined #perl6
19:37 musiKk joined #perl6
19:40 perlpilot joined #perl6
19:44 ggoebel14 m: { $^a ~~ $^a.reverse }(<x a m a x>);
19:44 camelia rakudo-moar cf7706: ( no output )
19:44 ggoebel14 m: { say $^a ~~ $^a.reverse }(<x a m a x>);
19:44 camelia rakudo-moar cf7706: OUTPUT«True␤»
19:44 ggoebel14 m: { say $^a ~~ $^a.reverse }(<x a m a t>);
19:44 camelia rakudo-moar cf7706: OUTPUT«False␤»
19:46 musiKk Is it expected that Rakudo doesn't implement everything from the specs yet? For example user-defined array indexing gives compile errors.
19:46 timotimo m: given <x a m a x> { say $^a ~~ $^a.reverse }
19:46 camelia rakudo-moar cf7706: OUTPUT«True␤»
19:46 timotimo musiKk: yeah, it is. sorry about that!
19:46 [Coke] musiKk: the specs are the -tests-. the tests are expected to pass.
19:46 [Coke] not everything from the synopses is implemented, and may not be - some of that is speculative.
19:47 timotimo [Coke]: do we only ship tests that pass and we've stripped out everything that's skipped?
19:47 musiKk [Coke]: Yeah, that's true. I'm just perusing the design documents because I like to do that. :)
19:48 lnrdo joined #perl6
19:48 timotimo ah, right
19:49 timotimo yeah the "specs", or rather "speculations" ;), aren't authoritative any more
19:49 timotimo the ROAST has surpassed the specs half a year ago, or even earlier?
19:52 ggoebel14 timotimo: thank you. that reads better left to right...
19:53 musiKk The Synopses are a great source of information though. There is a lot of stuff I just don't find any documentation for.
19:54 timotimo ggoebel14: if you need it to, you can also put the given at the end of the statement
19:54 [Coke] timotimo: we don't "ship" tests.
19:55 timotimo oh
19:55 [Coke] ... as release manager, I should not get that wrong, but I think I may have. :)
19:55 timotimo well, fair enough
19:55 timotimo i feel like i'm out of the loop :\
19:55 [Coke] the targz has tests in it, I think; but we have yet to ship a second released version, so...
19:56 [Coke] but if we do, it'll be the 6.c branch, which is just the test files that we run, still with all the fudging in them.
19:56 [Coke] RT #127370 - do we expect -pe to even work?
19:57 [Coke] huh, guess so.
19:57 MadcapJake when installing modules (via zef/panda) is the source code kept somewhere?
19:57 Skarsnik Yes
19:57 Skarsnik but it's 'unreadabl'
19:57 Skarsnik aka /454545/8989844575454654646464
19:57 MadcapJake so no readable code is kept? man, that's a bummer
19:57 timotimo yeah, we do expect -pe to work
19:57 timotimo however, /proc/* has already given us grief once before
19:58 timotimo last time it was because the kernel said "it's 0 bytes big" and we were like "empty string it is!"
19:58 Skarsnik MadcapJake, it's readable, it just the way compunit work make it impossible to find the file
19:58 MadcapJake I thought they added the module name at the beginning now
19:58 Skarsnik well you can try a ack 'module*mymodule' in panda stuff, but meh
20:00 MadcapJake Skarsnik: what do you mean by `a ack`?
20:00 Skarsnik grep
20:00 Skarsnik ack is a fancy grep
20:01 MadcapJake oh, what's the format of the filenames?
20:02 Skarsnik well you can try to find the declaration of the class/module you want
20:02 Sqirrel joined #perl6
20:03 MadcapJake Skarsnik: I'm seeing ~/.rakudobrew/moar-nom/panda/ext has a set of modules I've installed (and not mangled), is this old?
20:03 Skarsnik No idea
20:04 MadcapJake oh i think those are panda required deps
20:04 timotimo that's just the panda folder
20:04 timotimo like, a git clone of the panda repository
20:04 timotimo it has a few modules it requires to bootstrap itself
20:04 * timotimo BBL
20:06 MadcapJake isn't there at least a folder where they're all placed? I'm not having luck finding anything (`find ~/.rakudobrew -name *File*`)
20:07 DrForr And I panic MoarVM. Must be doing something right.
20:08 hoelzro does anyone have a problem where panda doesn't get installed into $prefix/share/perl6/site/bin ?
20:08 hoelzro I think it's since FROGGS' bin-prefix change yesterday
20:08 DrForr hoelzro: On my work laptop, yes.
20:08 hoelzro DrForr: for a while now? or just recently?
20:08 hoelzro my linenoise canary died yesterday claiming it couldn't find panda
20:09 hoelzro and sure enough, panda wasn't installed to my perl6 directory
20:09 [Coke] hoelzro: that's been hitting a bunch of ecosystem travis builds, IIRC.
20:09 flussence seems missing here too (I've got an hourly cronjob that reinstalls everything on one machine, `perl6` is there)
20:09 [Coke] presumably a recent change somewhere in the toolchain.
20:09 hoelzro ah ha
20:10 b2gills .ask TimToady Should the right alternation take precedence? 「say 'abc' ~~ / <:L> | <:L><:L><:L>+ /」
20:10 yoleaux b2gills: I'll pass your message to TimToady.
20:10 TEttinger joined #perl6
20:11 b2gills .tell fireartist Please tell me that you aren't copying Games::Lacuna::Client wholesale to Perl 6. It is in desperate need of restructuring. I already did some of it. I would have done more, but I decided it would be easier to start from scratch (even in Perl 5). (never got a round tuit though)
20:11 yoleaux b2gills: I'll pass your message to fireartist.
20:11 MadcapJake what advantage does having these crazy long file/folder names have over just building a name from meta6.json (lib name + version, or something)
20:12 Amendil joined #perl6
20:12 b2gills MadcapJake:  Unicode on Posix systems
20:13 hoelzro MadcapJake: well, for one, we don't have to worry about FS-specific details like which characters are illegal, or case sensitivity
20:13 FROGGS hoelzro: >.<
20:13 ChoHag_ left #perl6
20:14 FROGGS hoelzro: where does panda get installed to?
20:14 hoelzro FROGGS: nowhere, it seems
20:14 FROGGS O.o
20:14 hoelzro nowhere under my installation prefix, anyway
20:14 hoelzro if I specify --bin-prefix by hand, it works
20:14 hoelzro I imagine specifying --prefix would fix the issue as well
20:15 FROGGS hoelzro: hmmmm
20:15 MadcapJake couldn't that just be easily worked though? Just create a translator that turns any name into the most stable name, all-lowercase, replace unicode with number, etc.
20:15 hoelzro I'm guessing it has something to do with the stringification of the CUR, so you end up with something like "#inst/tmp/nom/...".IO
20:15 leont joined #perl6
20:15 FROGGS ohh
20:15 hoelzro MadcapJake: I think nine settled on a less-than-ideal solution that works, with the notion of revisiting it later
20:15 perlpilot MadcapJake: a "generic transform" (like SHA for instance :) is better than a "highly specific to this one thing transform" like you just described.
20:16 nanis joined #perl6
20:16 MadcapJake ok, i just want to be able to find these files for my completion generator, and i'm going to need to understand the whole shebang, no ways around it :P
20:16 Zero_Dogg joined #perl6
20:16 Zero_Dogg joined #perl6
20:17 MadcapJake i found ~/.rakudobrew/moar-nom/install/share/perl6/site/dist/ has files that appear to describe each module and the name given to each subfile, is that accurate?
20:17 lizmat computer: messages
20:17 yoleaux 15:38Z <[Coke]> lizmat: nom (I guess?) if we can cherry pick it to the release prep branch, great.
20:18 flussence .oO( let's use punycode mangling for filenames, that way everyone's equally dissatisfied :)
20:18 MadcapJake perlpilot: totally fine by me! just would love an easier experience delving into module files,  I guess I'm spoiled by npm.
20:18 dalek rakudo/nom: 85d20f3 | lizmat++ | src/core/ (2 files):
20:18 dalek rakudo/nom: STORE_AT_KEY doesn't return anything
20:18 dalek rakudo/nom:
20:18 dalek rakudo/nom: Makes initialization of hashes about 10% faster
20:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/85d20f3a44
20:19 FROGGS hoelzro: confirmed
20:19 lizmat .tell [Coke] 85d20f3 is the one to cherry pick
20:19 yoleaux lizmat: I'll pass your message to [Coke].
20:19 hoelzro FROGGS: why do you suppose panda silently fails?
20:19 FROGGS hoelzro: no idea
20:20 b2gills Sometimes a specialized transform can be more space efficient https://codegolf.stackexchange.com/a/66454/1147
20:20 FROGGS m: say CompUnit::RepositoryRegistry.repository-for-name('site')
20:20 camelia rakudo-moar cf7706: OUTPUT«inst#/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
20:20 FROGGS m: say CompUnit::RepositoryRegistry.repository-for-name('site').Str
20:20 camelia rakudo-moar cf7706: OUTPUT«/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
20:21 nine m: my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name<Test>)); say $cu.repo.prefix.child($cu.distribution.provides<Test>.values[0]<file>)
20:21 camelia rakudo-moar cf7706: OUTPUT«"/home/camelia/rakudo-m-inst-1/share/perl6/39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7".IO␤»
20:21 nine No guessing needed actually
20:21 FROGGS m: say CompUnit::RepositoryRegistry.repository-for-name('site').Stringy
20:21 camelia rakudo-moar cf7706: OUTPUT«/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
20:21 nine m: my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name<Test>)); say $cu.repo.prefix.child('sources' ~ $cu.distribution.provides<Test>.values[0]<file>)
20:21 camelia rakudo-moar cf7706: OUTPUT«"/home/camelia/rakudo-m-inst-1/share/perl6/sources39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7".IO␤»
20:21 nine m: my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name<Test>)); say $cu.repo.prefix.child('sources/' ~ $cu.distribution.provides<Test>.values[0]<file>)
20:21 [Coke] nine: feel free to cherry pick 85d20f3 if it looks good for you. :)
20:21 camelia rakudo-moar cf7706: OUTPUT«"/home/camelia/rakudo-m-inst-1/share/perl6/sources/39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7".IO␤»
20:21 yoleaux 20:19Z <lizmat> [Coke]: 85d20f3 is the one to cherry pick
20:21 [Coke] lizmat++
20:23 MadcapJake Anyone interested, p6dx can do some completions now! https://github.com/madcapjake/p6dx It still needs to traverse any subfolders and I want to allow you to specify `--meta` and it will provide completions from any depended on module (that's where my questions come from)
20:24 Amendil m: @array = 0, 42, 1337; say "I have {+@array} elements";
20:24 camelia rakudo-moar cf7706: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hfxIOlvbv7␤Variable '@array' is not declared. Did you mean any of these?␤    Array␤    array␤␤at /tmp/hfxIOlvbv7:1␤------> 3<BOL>7⏏5@array = 0, 42, 1337; say "I have {+@arr␤»
20:24 Amendil m: my @array = 0, 42, 1337; say "I have {+@array} elements";
20:24 camelia rakudo-moar cf7706: OUTPUT«I have 3 elements␤»
20:25 hoelzro MadcapJake++ # nice, I'll have to check that out!
20:26 MadcapJake Thanks! It can generate ctags and a json format too. Eventually it will also have a linter with customizable rulesets.
20:26 nine MadcapJake: https://gist.github.com/niner/06792102587a79940294
20:27 nine flussence: I actually think that punycode would be a good solution since it would keep most file names untouched.
20:27 molaf joined #perl6
20:27 diakopter ely-se: what sort of type system?
20:27 Amendil m: my @array = 0, 42, 1337; say "I have {+@array[0,1]} elements";
20:27 camelia rakudo-moar cf7706: OUTPUT«I have 2 elements␤»
20:28 Amendil oh
20:28 ely-se diakopter: structural
20:29 diakopter ely-se: not dependent?
20:29 ely-se no value-dependent types, no
20:29 diakopter for a programming language?
20:29 MadcapJake nine++ This is perfect! I can just integrate that right in.  Thanks so much!
20:30 nine Just updated it to print info about the dist meta data
20:31 diakopter ely-se: I just mean, for which language/prover?
20:31 ely-se custom one
20:32 ely-se doesn't exist yet
20:32 ely-se lisp-like
20:34 FROGGS hoelzro: I've got a patch
20:35 grondilu joined #perl6
20:35 FROGGS hoelzro: please try latest panda
20:36 lichtkind joined #perl6
20:38 flussence shell(q{strace -s 255 perl6 -MTest -e 1 2>&1 | fgrep sources}, :out).out.get.comb(/\"(.*?)\"/).put # shorter :)
20:39 dalek rakudo/2016.01-preparation: b6c3321 | lizmat++ | src/core/ (2 files):
20:39 dalek rakudo/2016.01-preparation: STORE_AT_KEY doesn't return anything
20:39 dalek rakudo/2016.01-preparation:
20:39 dalek rakudo/2016.01-preparation: Makes initialization of hashes about 10% faster
20:39 dalek rakudo/2016.01-preparation: review: https://github.com/rakudo/rakudo/commit/b6c3321066
20:39 FROGGS ***ALL*** - please try this release candidate of Rakudo Star: http://froggs.de/perl6/rakudo-star-2016.01-RC1.tar.gz
20:40 FROGGS ***ALL*** - please test it and report bugs to the rakudo/star repository, but keep in mind it is an RC0, so dont update your production servers just now
20:40 nine For the record: I'm not entirely happy with picking this patch, as it _does_ change semantics of a method. But it's an upper case method apparently unused in the ecosystem and if we change this, we'd better do it right away.
20:41 ely-se WTB P6CRE
20:42 DrForr nine: Got it working, lots more trivia to get through though.
20:43 nine FROGGS: btw. thanks for taking on R* :)
20:44 FROGGS nine: sure
20:44 FROGGS nine: hope we get some feedback
20:44 Skarsnik FROGGS, you should probably contact distrib maintainer? x)
20:46 FROGGS Skarsnik: star is not packagable currently anyway sadly
20:46 FROGGS Skarsnik: and since star is a distro, they actually are not meant to package it
20:47 nine why?
20:47 [Coke] nine: if the method isn't explicitly tested in p6.c, it's fair game.
20:47 dfcarpenterak joined #perl6
20:47 [Coke] packaging folks can emulate star, but why would they package it directly?
20:47 FROGGS nine: https://rt.perl.org/Ticket/Display.html?id=126894
20:47 [Coke] it was a stopgap for folks until packages packaged.
20:47 FROGGS [Coke]: aye
20:48 [Coke] FROGGS: is it based on the prep branch?
20:48 [Coke] (the 2016.01 star you're rc'ing?)
20:48 FROGGS e.g. debian should package moar, nqp, rakudo, panda, modules on its own etc
20:48 FROGGS [Coke]: yes
20:49 [Coke] ok. I assume you need an actual release of the compiler before you pull the trigger.
20:49 [Coke] or at least, would like.
20:49 laz78 joined #perl6
20:52 moritz [Coke]: fwiw you have my green light on the prep branch
20:52 nine FROGGS: actually the right solution seems to be to delete the generated precomp files before packaging as I do in https://build.opensuse.org/package/view_file/home:niner9:branches:devel:languages:parrot/rakudo/rakudo.spec?expand=1
20:53 FROGGS ahh, hmmm
20:53 FROGGS nine: please suggest that on RT but I think packaging star is still the wrong approach
20:53 nine Always remember: the precomp files created during module installation are pretty useless right now.
20:54 nine FROGGS: yes, individual packages are definitely the way to go
20:56 moritz ==> Fetching JSON::Fast
20:56 moritz Please remove leading 'v' from perl version in JSON::Fast's meta info.
20:57 flussence is there an RT# for that particular precomp bug, for reference?
20:57 moritz any chance we can get that cleaned up for the star release?
20:57 FROGGS moritz: sure, that's timotimo's, right?
20:58 nine FROGGS: added the info to the ticket
20:58 FROGGS nine++
20:58 moritz FROGGS: right; I'll pull-request
20:58 [Coke] if we're happy, I can try to do the release tonight.
20:59 Relsak joined #perl6
20:59 [Coke] (for the prep) - nine did all the hard work; I'll try to include some of the points from the blog post I just made about what the plans are going forward.
21:01 moritz https://github.com/timo/json_fast/pull/11
21:02 _mg_ joined #perl6
21:04 sortiz joined #perl6
21:07 nige1 joined #perl6
21:07 bowtie joined #perl6
21:08 El_Che \o/ bowtie! long time no see
21:09 AlexDaniel m: say ‘hello’.bytes
21:09 camelia rakudo-moar 85d20f: OUTPUT«Method 'bytes' not found for invocant of class 'Str'␤  in block <unit> at /tmp/ZhAKeaWz1W line 1␤␤»
21:09 AlexDaniel is there any way to know how many bytes are there?
21:09 AlexDaniel m: say ‘hello’.codes
21:09 camelia rakudo-moar 85d20f: OUTPUT«5␤»
21:09 leont That question is not sensible
21:09 leont You can only answer that question in the context of a specific encoding, such as utf8
21:09 AlexDaniel leont: what would make it more sensible to you?
21:10 AlexDaniel ah ok, of course. I just default to UTF-8
21:10 moritz AlexDaniel: you can .encode first
21:10 AlexDaniel moritz: right!
21:10 moritz m: say 'hello'.encode('UTF-8').bytes
21:10 camelia rakudo-moar 85d20f: OUTPUT«5␤»
21:10 moritz m: say 'hello'.encode('UTF-16').bytes
21:10 camelia rakudo-moar 85d20f: OUTPUT«10␤»
21:10 AlexDaniel leont: that's a good point, actually. Thank you
21:10 moritz m: say 'hello'.encode('UTF-7').bytes
21:10 camelia rakudo-moar 85d20f: OUTPUT«Unknown string encoding: 'utf-7'␤  in block <unit> at /tmp/AeB_qA9dDD line 1␤␤»
21:10 diakopter FROGGS: seems to install fine on a fresh Mint 17.3 64-bit in VirtualBox on mac
21:11 moritz still installing modules here
21:11 FROGGS diakopter: ohh awesome, thank you
21:11 AlexDaniel m: m: say 'hello'.encode.bytes
21:11 camelia rakudo-moar 85d20f: OUTPUT«5␤»
21:11 * ZoffixWin is not convinced asking people to remove "v" is a sensible approach.
21:11 ZoffixWin Why not just regex it out?
21:11 FROGGS diakopter: can you use its panda to install a module?
21:11 ZoffixWin During install. DWIM and not annoy people.
21:12 [Coke] arent' we already dwimming and then warning?
21:12 ZoffixWin panda refuses to install the module.
21:12 ZoffixWin Unless this changed in the past 24 hours
21:13 [Coke] k
21:13 revhippie joined #perl6
21:13 diakopter FROGGS: er, do you want the warnings the install outputted?
21:13 zakharyas joined #perl6
21:15 FROGGS diakopter: no, just wanna know if the panda is in a good shape
21:15 hoelzro FROGGS: thanks, will do!
21:16 ZoffixWin Ahh, never mind me. It does DWIM and warn. Last night, along with the "v" a person was using "v6.0.0", so panda was refusing to install it for 6.c
21:17 diakopter FROGGS: only suggestion for top-level `make install` - add some message echo saying the Rakudo Star installation is done; currently the last line is ==> Successfully installed Debugger::UI::CommandLine
21:17 diakopter also helpful would be a message saying into which path(s) stuff was installed
21:17 FROGGS hmmmm, that makes sense
21:18 diakopter like, I don't know where to go looking for panda after it finished
21:18 FROGGS yeah
21:18 FROGGS a nice summary at the end would be nice
21:19 diakopter (or which dir to add to PATH if I wanted to run panda)
21:21 diakopter like, do I need to add install/share/perl6/bin
21:21 flussence m: put $*REPO.repo-chain[1].writeable-path.child(‘bin’) # least-insane way to determine panda path, afaik
21:21 diakopter in addition to install/bin
21:21 camelia rakudo-moar 85d20f: OUTPUT«/home/camelia/rakudo-m-inst-1/share/perl6/site/bin␤»
21:21 diakopter FROGGS: ^
21:22 FROGGS diakopter: only the install/bin
21:24 hoelzro FROGGS: works for me now!
21:24 hoelzro thanks!
21:25 cdg joined #perl6
21:26 cdg joined #perl6
21:27 diakopter FROGGS: but if I want to run stuff panda installs?
21:27 FROGGS ummm
21:27 FROGGS ups
21:27 FROGGS yeah, there is a thinko somewhere :/
21:28 ZoffixWin You have to add two paths ATM. The ones that are listed on http://perl6.org/downloads/
21:28 ZoffixWin Otherwise binaries you install with panda aren't found
21:28 lokien_ joined #perl6
21:28 FROGGS damn, that renders the bindir patch rather useless >.<
21:29 dfcarpenterak joined #perl6
21:29 diakopter FROGGS: so we have install/share/perl6/bin and install/share/perl6/site/bin
21:29 diakopter in addition to install/bin
21:29 geraud joined #perl6
21:33 FROGGS C:\rakudo\bin\panda
21:33 FROGGS Cannot unbox a type object
21:33 FROGGS -.-
21:35 moritz I get the same error on LInux
21:35 moritz with a backtrace
21:36 FROGGS wait, I seem to have an old perl6 binary somewhere
21:36 * moritz too
21:36 moritz guess I should patch PATH
21:37 FROGGS ~/dev/star/work-m/rakudo-star-2016.01-RC1$ install/bin/panda
21:37 FROGGS Panda -- Perl 6 Module Installer
21:37 FROGGS [...]
21:37 moritz I've removed the other $PATH elements, and I still get the unbox error :(
21:38 moritz ah no, sneaky; I had a bin/perl6 in my $HOME
21:38 moritz and didn't notice, because I usually invoke perl6-m directly
21:42 FROGGS okay, panda works fine after getting the other perl6 out of PATH
21:43 FROGGS ... on windows that is
21:43 FROGGS I'll muse about the bindir stuff, and potentially revert the patches to rakudo and panda
21:44 moritz can confirm it works here too
21:44 hankache joined #perl6
21:45 FROGGS nice
21:45 FROGGS I'll add a nice welcome msg at the end of the installation as diakopter++ suggested, but that'll happen tomorrow
21:47 hankache hi FROGGS
21:48 FROGGS hi hankache
21:48 wamba joined #perl6
21:49 hankache FROGGS i updated 2 weeks back docs/perl6intro.pdf on the master branch of rakudo/star
21:49 hankache FROGGS can you use this version instead of the one in the release branch?
21:49 hankache FROGGS the one in master is the updated one.
21:50 FROGGS sure, will do
21:50 bowtie joined #perl6
21:50 hankache thanks FROGGS++
21:53 FROGGS ***ALL*** - MS Windows® Rakudo Star release candidate available, please test: http://froggs.de/perl6/rakudo-star-2016.01-x86_64-RC1%20(JIT).msi
21:55 FROGGS gnight
21:59 moritz sleep well FROGGS++
22:05 [Tux] joined #perl6
22:08 pmurias_ joined #perl6
22:15 laz78 joined #perl6
22:15 pmurias is there any reason for using --/tests instead of --no-tests?
22:15 pmurias (in zef)
22:16 jdv79 isn't the convention --no$thing ?
22:17 perlpilot probably becuase rakudo's command line parser doesn't grok --no-tests, but it does grok --/tests  ?
22:17 perlpilot That would be my guess anyway
22:18 pmurias --/$options seems really alien
22:19 leont Yeah
22:20 perlpilot ++foo .... ++/foo  is pretty alien too
22:21 sftp joined #perl6
22:21 jdv79 is that doc'd anywhere?
22:22 perlpilot It's in one of the synopses .... S19 I think
22:22 perlpilot yeah, S19
22:23 * leont is tempted to write a Getopt::Long, but it's actually rather non-trivial to do it well
22:23 perlpilot jdv79: start reading at http://design.perl6.org/S19.html#Options_and_Values
22:24 jdv79 oh, its in s06
22:24 jdv79 nice
22:24 perlpilot oh, S06 too (makes sense since MAIN is a routine  :)
22:29 Skarsnik good night #perl6
22:29 jdv79 cya
22:31 El_Che leont: please do. I love the batteries-include Main approach. But it's just too basic. E.g. the order of switches is significant, also the --option=value instead of "--option value" is pretty alien on *nix (e.g. when you can use shell autocompletion)
22:31 leont I have no idea on what a good 6ish interface would be like yet, though
22:32 jdv79 can DrForr's p5 to p6 thing work on that?
22:32 hoelzro you could always write a MAIN::Getopt module that exports a MAIN-HELPER that calls MAIN the "right" way
22:32 jdv79 i keep meaning to try it
22:32 hoelzro er, MAIN_HELPER
22:33 perlpilot hoelzro: MAIN_HELPER is alien to P6, it should be MAIN-HELPER   ;-)
22:33 hoelzro perlpilot: agreed, we just need to change it =)
22:34 hoelzro that way, you keep the sixey MAIN, but you get Getopt-friendly argument processing
22:34 hoelzro best of both worlds =)
22:34 hoelzro leont: ↑
22:34 apathor joined #perl6
22:34 leont Interesting…
22:34 perlpilot indeed.
22:35 hoelzro I've been thinking about writing that for a while, but I'm lazy =P
22:35 RabidGravy right that's me done for the day
22:35 Kogurr joined #perl6
22:36 * hoelzro does a lot of thinking about writing things
22:37 jdv79 isn't MAIN special?  you'd have to grab the old one and replace it, no?
22:38 hoelzro jdv79: you just need to make sure to call it from MAIN_HELPER
22:38 zostay hoelzro: hey, you said you had an idea regarding my threading pains, this is the first time i've seen you and i've been too lazy so far to enter #moarvm
22:38 hoelzro zostay: you can always ping me, even if I'm not active =)
22:38 hoelzro I'm always lurking, but my activity varies wildly =)
22:38 hoelzro zostay: if you post the exact source that's abort()ing for you, I'd be happy to take a look
22:39 jdv79 but when one runs "perl6 foo.p6" and foo.p6 has a MAIN that get's called, right?
22:39 jdv79 *gets
22:39 hoelzro jdv79: yes; all because rakudo calls MAIN_HELPER to call MAIN ;)
22:39 hoelzro well, rakudo sets up a call to MAIN_HELPER, which in turn calls MAIN
22:39 jdv79 oh, i didn't know MAIN_HELPER was a thing. nice.
22:39 ugexe if yuo have a module that has a MAIN_HELPER `use`d by foo.p6 then it loads the modules version
22:39 hoelzro it's not a spec'd thing, but it's a rakudo thing
22:40 hoelzro exactly
22:40 hoelzro I did a PoC on it a week or so ago
22:40 perlpilot It should be a spec thing though.
22:40 ugexe but if you have 2 modules that do that it doesnt work
22:40 hoelzro perlpilot: I completely agree
22:40 ugexe so you cant have like a pluggable app that adds commands that sho wup in usage
22:40 hoelzro ugexe: yeah, that's tricky
22:41 hoelzro although you can have a single MAIN_HELPER impl be smart about looking at multi candidates
22:41 hoelzro and inspecting their signatures for things
22:41 jdv79 sounds magically complicated
22:42 hoelzro it's complicated for the implementor so that the user can benefit
22:42 hoelzro sound familiar? =P
22:42 hoelzro MAIN_HELPER is responsible for taking @*ARGS and calling MAIN; whatever else you add is up to you
22:43 zostay hoelzro: the exact source that's aborting is here, if you run this test: https://github.com/zostay/HTTP-Supply/blob/master/t/http-1.0.t
22:43 hoelzro zostay: thanks, I'll have a look later tonight
22:45 properly joined #perl6
22:47 hoelzro here's a quick exmaple of a MAIN_HELPER module: https://gist.github.com/hoelzro/7fd925b4f4617a5c46b5
22:47 hoelzro apologies for the sloppiness
22:48 zostay awesome, i'm terrible at responding on irc, btw... it'd be better to file a ticket on github or email me at the address listed on github/cpan/etc.
22:49 hoelzro noted =)
22:50 properly Plse help, from rosettacode 'update a configuration file' we have this line:  %changes.=map({; .key.uc => .value });
22:50 diakopter oh hey Andrew
22:50 zostay you, sup matt?
22:50 zostay er.. yo
22:50 properly Without the initial semicolon in the code block, get this: Method 'count' not found for invocant of class 'Hash'
22:51 jdv79 the semi is disambiguating the {} into a code block.  without it seems its a hash constructor.
22:51 jdv79 :(
22:51 jdv79 well, forcing maybe is a better term
22:51 perlpilot what's with the :( ?
22:51 properly Works by using $^A   ie {$^a.key.uc => $^a.value}
22:51 jdv79 or -> too, right?
22:52 properly yes pointy block also works, but the ; is so good , why does it work?
22:52 jdv79 its just unfortunate we still have that issue of {} being used for 2 things and the choice is not always obvious
22:52 properly ok disambiguates
22:53 properly thanks
22:53 geekosaur yes, it has to guess what it is and while it is smarter than perl 5 was about it, your {} looks like a pair inside and therefore a hash constructor
22:53 properly tk you
22:54 geekosaur it's the price of using the same syntax for two different things
22:54 perlpilot jdv79: well, that's why we have some syntactic disambiguation  :)
22:57 cpage_ joined #perl6
23:00 jdv79 it just feels like a p5 style of issue to me
23:02 cpage_ joined #perl6
23:04 lnrdo joined #perl6
23:11 flaviusb left #perl6
23:15 hoelzro zostay: does that test always abort?
23:16 hoelzro zostay: also, which OS is this on?
23:24 nanis FROGGS: RC0 built without problems on Windows 10 using VS2015. nmake rakudo-test passed all. I expect there will be two failures with spec tests, but I don't know if there is anything that can be done about those.
23:27 mprelude joined #perl6
23:37 lnrdo joined #perl6
23:54 hoelzro .tell zostay I can't reproduce the issue on my box (64-bit Arch Linux); let me know when you're around so we can figure this out =)
23:54 yoleaux hoelzro: I'll pass your message to zostay.

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

Perl 6 | Reference Documentation | Rakudo