»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 ZoffixWin left 00:03 SCHAAP137 left
autarch AlexDaniel: I think I missed that 00:03
AlexDaniel autarch: irclog.perlgeek.de/perl6/2016-01-25#i_11939486 00:04
autarch: no loop required, no nothing! As simple as that
00:05 vendethiel left, leont joined
autarch AlexDaniel: yeah, that seems better 00:07
00:11 vendethiel joined 00:12 cdg left 00:15 drrho left, drrho joined 00:18 ajr_ left 00:19 firstdayonthejob left 00:26 mohae_ joined 00:27 mohae left 00:33 kid51 joined 00:37 telex left 00:38 telex joined 00:39 laz78 joined 00:52 spider-mario left
gtodd Bags are fascinating :) 00:53
00:55 yqt left, vendethiel left 00:58 yurivish_ left, adu left 00:59 vendethiel joined 01:02 yeahnoob joined
gtodd I wish Set::Bag (p5) could automagically count like that 01:03
01:06 adu joined 01:07 adu left 01:09 Herby_ joined
Herby_ Evening, everyone! 01:09
o/
lucs How do I get the started process's PID after doing 「Proc::Async.new(⋯).start」?
leont .pid on the Proc::Async? 01:10
lucs Hmm...
(trying)
No such method. 01:11
I also got nowhere trying to work with the promise returned by 「start」. 01:12
leont Ah! 01:14
The result of the promise is a Proc, which has a .pid method
No idea how to get it before the process has finished though
konobi $$ in either? 01:15
lucs That's kind of the problem :/
(And even when it has finished, all I seem to get is a PID of 0.)
konobi: Not sure what you mean.. 01:16
leont konobi: $$ is $*PID
konobi sure
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
And I agree with lucs that it not giving the pid is an issue
konobi ugh... not sure how perl6 async works yet 01:18
i'm pretty sure i have a few holes to jab at there... =0/
01:22 vendethiel left 01:24 vendethiel joined 01:25 lizmat joined 01:29 lokien_ left 01:32 BenGoldberg joined 01:42 pochi_ joined 01:43 pochi left 01:45 vendethiel left 01:49 vendethiel joined 01:52 maslan left
timotimo hey Herby_ 02:04
was that talk i showed to you of interest?
Herby_ \o
02:04 adu joined
Herby_ Absolutely! Pretty cool stuff for sure 02:05
timotimo cool & scary
Herby_ been meaning to talk to my hospital's biomed department to see if they have any old hardware I can poke around with
timotimo the whole "internet of things" movement is very, very scary from a security & failure perspective
adu timotimo: there are already people who have died from Pacemaker/Wifi accidents 02:06
Herby_ yeah, very exciting and scary times
adu Herby_: how's it going? 02:07
Herby_ It's coming along. Have you thawed out yet?
timotimo adu: even without biotech in the equation, IoT is very scary 02:08
remember very recently when "nest" thermometers/thermostats/thingies failed for some reason?
in america, at a time when it was very, very cold outside?
people were unable to log in for some stupid reason
Herby_ did they get to play in artic warfare conditions? :) 02:09
aka the heat dont work
timotimo translates to a different place
02:10 vendethiel left
Herby_ timotimo, its kind of like the cars that are getting smarter 02:11
you see that article about the jeep cherokee getting hacked while driving down the road?
02:14 vendethiel joined 02:15 aigan left, aigan_ joined 02:16 xpen joined 02:19 leont left
timotimo yeah 02:22
that was about engineers going at developing a system connected to a network without them knowing about security
maximize profits as much as you can get away with 02:23
Herby_ yep
02:23 ZoffixWin joined, ZoffixWin left, ZoffixWin joined
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:23
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" }; 🕋
camelia rakudo-moar cf7706: OUTPUT«42␤»
ZoffixWin Emoji subs :)
timotimo geekosaur: i'm pretty sure they won't be trying that for long
Herby_ Zoffix!
o/
geekosaur they've been trying it for years. thankfully that means there is now considerable precedent in favor of the researchers
ZoffixWin \o
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
these trans-* pacts are pretty scary
trans-atlantic and trans-pacific, right? 02:26
02:37 vendethiel left
Herby_ ok. rookie question time: using json::fast, how do I pretty print something? 02:38
timotimo to-json([1, 2, 3], :pretty)
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
I want to print it out pretty
instead of this blob
02:43 vendethiel joined, addison_ left
timotimo oh 02:43
in that case you have to parse it with from-json and then print it with to-json
if it's a blob, you may have to decode it with some encoding first. most probably utf-8 02:44
Herby_ you're the man :) 02:46
that seems to work
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?
skids llfourn: "is default" can designate a preferred candidate. Or you can play tricks like $ where { True }. 02:51
llfourn skids: excellent thanks! 02:53
02:53 kalkin-__ joined
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:53
well, i'm getting the content and converting it to-json, then trying to spurt it 02:54
02:55 Herby_ left 02:57 kalkin-_ left
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."
camelia rakudo-moar cf7706: OUTPUT«I'm a Perl 6 program.»
ZoffixWin Run that in Perl 5 and it'll say "Perl 5" :) twitter.com/zoffix/status/691817871446511617
ZoffixWin suspects they're the only one who's excited with it and decides to move on ^_^ 03:01
03:02 Herby_ joined
skids ZoffixWin: that is cute 03:02
ZoffixWin :)
03:03 vendethiel left
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"
ZoffixWin Sounds neat, but maybe not in a book form 03:06
llfourn Jured, I like that idea
Juerd When I say "book", feel free to read "PDF"
But what I'm thinking of, is a fixed size layout
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.
Interactive thing basically
Juerd ZoffixWin: That's nice but not what I'm thinking of
ZoffixWin Ah :)
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
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.
llfourn: Yes! That too!
I find myself constantly explaining Perl 6 to people in terms of their favourite language 03:09
And rosettacode is entirely useless for this, because it's so bloated and hard to navigate
AlexDaniel Juerd: consider “Wiki” instead of a “PDF” :) 03:10
Juerd No, no, no...
AlexDaniel why not?
Juerd Because I want a fixed width layout
03:10 sevvie left
Juerd If it doesn't fit in the box, it's too complicated for a single example 03:11
width + height
AlexDaniel sure, feel free to do that with css ?
ZoffixWin No, no, no, that's when you switch to smaller font, design 101 :D
Juerd Flipping the pages should feel like browsing through a photo book
skids maybe a "practical only" subset of rosettacode could be presented through an alternative portal/search engine.
AlexDaniel sure, feel free to do that with js ?
Juerd I already feel entirely free to do it whichever way I want :) 03:12
ZoffixWin :D
AlexDaniel :)
Herby_ :) 03:13
Juerd I'm thinking of top 3 boxes: Python, C#, PHP
Bottom 3 boxes: Perl 5, Perl 6, text
03:14 kid51 left
ZoffixWin I'd use Ruby instead of Perl 5 03:14
llfourn Javascript instead of PHP :)
Juerd I haven't set my mind on the languages yet
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
Herby_ use assembly for speed
Juerd I considered Javascript but it's a hard one because it doesn't really have that many language features.
ZoffixWin: And that's exactly what I don't want, this one time.
ZoffixWin Juerd, Ruby instead of Perl 5 because there are more Ruby programmers AND many of the Ruby programmers are ex-Perl-5 programmers
Juerd Not interactive, not free form. Very old-fashioned. 03:16
ZoffixWin
.oO( old fart :P )
But it's not webscale!!! :D
Juerd Perl 5 is not negotiable by the way. I'll switch any of the other 3 :)
ZoffixWin heh
Juerd (Note that I haven't decided to do this project yet)
(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 :)
Juerd Fair point
juerd.nl/site.plp/perl_php
ZoffixWin Juerd++ 03:18
Juerd I had to store that quote somewhere
ZoffixWin: scrottie++, it's his text
03:18 adu left 03:19 adu joined
Juerd Also, it's not going te be a showcase of TIMTOWTDI 03:19
I don't care that you can write ... *, because I think it's utterly unreadable, so I will use ... Inf instead :)
The hardest part will probably selecting the 3 non-perl languages :) 03:20
And then figuring out what's idiomatic in those 03:21
Python is the only obvious one, given its popularity.
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
Ruby is interesting because it too has a unique syntax
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
even with your tip of the webpage encoding
Juerd Even Perl 5 often looks nice next to PHP, and Perl 6 would be even better.
03:24 adu left
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
but I think the point is p6 will look great next to even JS
everyone gets that PHP sucks
Juerd I'm torn between excluding PHP because it sucks, and including PHP because it sucks. 03:25
llfourn heh yep :P
skids PHP is too easy a target. It's just not sporting.
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?
Juerd There are many Java programmers who would pick PHP for their personal projects.
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
pastebin.com/HJPqHx5S
Juerd llfourn: Not from what I've seen at hackerspaces
Herby_ ignore the poorly named variables
Juerd Herby_: Instead of asking us to ignore that, why don't you just come up with better names? :)
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
Herby_ good point, Juerd.
llfourn though I hate Java so much I guess even PHP could be some minor imporvement 03:28
or at least bad in different ways
Juerd Herby_: You have the arguments for spurt the wrong way around, it seems.
Herby_ wow, I'm a big dummy 03:29
thought I read that doc right :(
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.
This is not universal, but it seems to be the more common thing.
Herby_ I'll remember that tip 03:31
nightfrog That's more logical
Juerd Also, number and string: string is probably longer, comes last.
string and list: list is probably longer, comes last
(And not just because of its variable length)
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)
skids The former probably because a concatination expression is likely for the long string and the latter due to not wanting a fight over ","
Juerd Herby_: Decoding JSON can be done with a module 03:33
There are several JSON modules
03:39 cognominal left, cognominal joined 03:41 noganex joined 03:44 noganex_ left, mohae_ is now known as mohae
Herby_ ok, making progress. trying to figure out how to loop through an array of dictionaries, and pull data out 03:52
03:54 sufrostico left
Herby_ getting "Type Array does not support associative indexing" 03:56
hmm
03:57 AlexDaniel left 03:58 sufrostico joined
Herby_ solved it, tad ugly though :)( 04:03
Juerd github.com/Juerd/philae/blob/master/braindump 04:04
Off to bed
Good night!
llfourn o/
Herby_ night!
04:05 anthk_ joined 04:09 Actualeyes left, Herby_ left
cognominal Juerd, It would be nice to build it also as grammar show cases. Grammar being the formal counterpart to the informal descriptions. 04:12
anthk_ m: say (my uint $n3 = (0xA2000 +< 8)).fmt("%0b"); 04:19
camelia rakudo-moar cf7706: OUTPUT«1010001000000000000000000000␤»
anthk_ m: say (my uint16 $n3 = (0xA2000 +< 8)).fmt("%0b");
camelia rakudo-moar cf7706: OUTPUT«0␤»
anthk_
say (my uint16 $n3 = (0xA2F0 +< 8)).fmt("%0b"); 04:21
m: say (my uint16 $n3 = (0xA2F0 +< 8)).fmt("%0b");
camelia rakudo-moar cf7706: OUTPUT«1111000000000000␤»
04:26 raiph left, mprelude left 04:27 Actualeyes joined 04:28 alpha123` joined, adu joined 04:34 molaf joined 04:39 sufrosti1o joined, sufrostico left 04:42 vendethiel joined 04:43 mohae left 04:44 sufrosti1o left 04:45 sufrostico joined, regreg left 04:46 mohae joined 04:47 jack_rabbit left 04:49 alpha123` left 04:50 sufrostico left 05:00 revhippie left
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:04 vendethiel left
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␤»
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␤»
orbus well that is actually what I would expect
other than the memory allocation thing
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
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)
camelia rakudo-moar cf7706: OUTPUT«1 1␤2 2␤2 3␤2 4␤2 5␤Memory allocation failed; could not allocate 15944 bytes␤»
05:08 BenGoldberg left 05:10 molaf left, vendethiel joined
orbus well 05:10
actually not really
I thought all the taps were supposed to get the same values 05:12
but here it seems like they're each getting a random allotment of the values
anthk_ m: my uint8 $a = 240; say $a +< 2; 05:13
camelia rakudo-moar cf7706: OUTPUT«960␤»
anthk_ what's the problem with the unsigned integers :\ ?
orbus they don't work?
what the specific problem is, I'm not entirely sure, but I don't think they're really implemented at this time 05:14
I think somebody said it had something to do with all integer types falling back to Int, but not really sure 05:15
05:17 Calibellus left 05:18 jantore left, jack_rabbit joined
llfourn orbus: have you checked out roast? there might be clues re .Supply on channel 05:24
orbus I haven't really looked through there no 05:25
might take a look if I have time
the way it acts is weird
I'm wondering if it's not documented because the implementation is buggy
llfourn This is the Channel method on supply but you are after the other way around: github.com/perl6/roast/blob/master.../Channel.t 05:26
orbus right
llfourn orbus: it is very buggy
in general
orbus supply is?
or channel?
channels seem to work pretty well
haven't messed with supplies a lot yet
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
Supplies*
orbus well my understanding is a supply should supply the same stream of values to all the taps on it 05:28
if you create a supplier
and create a supply off it
and then put a couple taps
that's what happens
the taps get the same values
but the supply that comes off Channel doesn't act like that
llfourn well I'm glad that bit works at least
orbus so I'm not sure if that's intentional or a bug
05:29 yeahnoob left
orbus I looked at the source 05:29
but I'm not entirely sure I understand what it's doing :p
llfourn good luck with that!
orbus it looks like it's trying to emit every value added to the channel onto the supply 05:30
which is more or less what I would expect
but the taps are acting weird
and I don't know why
skids orbus: "on-demand" supplies behave as you expect.
If you want to make an "on-demand" supply from one that is not, use .share. 05:31
orbus hmmm
looking at the docs I still don't entirely understand the distinction 05:32
skids Or maybe I disn't understand that exactly
orbus but it seems like for both types, all open taps should see the same stream of values
05:32 vendethiel left
skids yes all active taps should. 05:32
orbus with the supply I get off a channel
what I'm seeing is
well I had an example
hang on
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␤»
orbus this crashes on camelia
but on my box it doesn't crash and that's still the full output
it's like one tap is seeing some of the values
and the other tap is getting the others
and the distribution seems to be random - you get different results on different runs
05:34 jantore joined
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␤»
orbus a similar exercise with a supplier does what I would expect
05:38 xinming left, xinming joined
orbus that might be by design but I'm not sure 05:40
and I can't submit a documentation patch if I don't know how it's actually intended to behave 05:41
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_ left, aigan_ joined
orbus llfourn: can't write tests if we don't know how it's supposed to behave either 05:45
llfourn precisely :)
orbus I'm leaning towards bug as well, but not sure
we'll see what jnthn says
it came up in a conversation with him the other day
05:45 Cabanossi left, darutoko joined
orbus which is why I started looking in the first place 05:45
05:47 vendethiel joined
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
you send on the channel, you emit on the supplier
practical result is the same 05:49
maybe that's not what's intended
05:49 Cabanossi joined
orbus but maybe that's a stretch too - that's why I'm uncertain 05:50
anyway, getting late
orbus afks
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:52
gist.github.com/skids/fabd0304f40e24db33d0 were some of the areas I could not figure out. 05:54
orbus here there be dragons 05:55
06:01 pierrot left 06:07 Actualeyes1 joined, Actualeyes left, laz78 left 06:08 vendethiel left 06:13 pierrot joined, skids left 06:19 yeahnoob joined 06:24 jme` left 06:28 lokien_ joined 06:29 khw left 06:47 cuonglm joined
cuonglm Hi guys, is anyone getting trouble with reading procfs file with perl6? 06:48
perl6 -ne '.say' /proc/$$/statm 06:49
went into an infinitive loop
It doen't with Perl 5 06:50
perl -pe '' /proc/$$/statm
perl6 -pe '' /proc/$$/statm
llfourn cuonglm: send an example to [email@hidden.address] if you wouldn't mind. Sounds like a bug. 06:51
06:54 domidumont joined
cuonglm llfourn: Thanks, I have sent an email to [email@hidden.address] 06:58
llfourn cuonglm: cheers 06:59
06:59 geraud left, domidumont left 07:00 domidumont joined
cuonglm Here's the ticket for anyone care about it rt.perl.org/Public/Bug/Display.html?id=127370 07:03
geekosaur wonders if /proc is still hypersensitive to how it's accessed 07:08
(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:10
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:11
If that behavior is intentional, then it should be documented else where, so the user won't make mistake 07:12
My laptop was freeze after I do "/proc/<pid>/statm".IO.lines.elems 07:13
07:13 domidumont left
cuonglm the compiler won't guard me from doing elems on lazy list like (1, 1, *+* ...^ *).elems 07:15
the compiler even won't guard me from doing elems on lazy list like (1, 1, *+* ...^ *).elems 07:16
07:24 domidumont joined 07:25 CIAvash joined 07:31 nakiro joined 07:32 cuonglm left, vendethiel joined
moritz \o 07:39
07:42 adu left 07:43 FROGGS joined 07:46 firstdayonthejob joined
FROGGS o/ 07:52
07:54 vendethiel left
moritz wonders why cuonglm would use the ...^ form of the series operator to create an infinite list 07:57
jast probably doesn't want all of infinity 08:00
08:00 _mg_ joined 08:02 MARTIMM joined
moritz [Coke]++ # diplomatic response to RT #127355 08:07
08:10 zakharyas joined 08:11 RabidGravy joined 08:15 abaugher_ left, vendethiel joined, abaugher_ joined
[Tux] csv-ip5xs 17.867 08:23
test 22.454
test-t 12.234
csv-parser 50.351
08:31 ely-se joined 08:32 ely-se left, ely-se joined 08:34 virtualsue joined 08:38 firstdayonthejob left 08:39 lokien_ left 08:44 Peter_WR joined
dalek c: f52538b | RabidGravy++ | doc/Type/ (3 files):
document Channel.Supply, Promise.Supply

Also add link to concurrency doc
Closes #366
08:45
08:45 dakkar_ joined 08:46 sortiz left, karim joined 08:47 karim left 08:48 zakharyas left 08:49 abraxxa joined 08:50 zakharyas joined
RabidGravy Boom! 08:52
08:52 travis-ci joined
travis-ci Doc build errored. Jonathan Stowe 'document Channel.Supply, Promise.Supply 08:52
travis-ci.org/perl6/doc/builds/104843377 github.com/perl6/doc/compare/d78c5...2538b5fae4
08:52 travis-ci left, Actualeyes1 left 08:53 zakharyas left
lizmat clickbaits p6weekly.wordpress.com/2016/01/25/...waiting-4/ 08:53
08:54 zakharyas joined
nine Whenever I read that, I have the Duke's voice in my head... "What are you waiting for? Christmas?" 08:56
RabidGravy lizmat++ # did you do anything in the last week but find all those links? ;-) 08:57
CIAvash lizmat++ 08:58
08:59 vendethiel left
lizmat nine: I was more thinking about www.youtube.com/watch?v=8qPUJhy0Dz...e&t=68 09:01
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, Kogurr joined
lizmat
.oO( isn't it eternally christmas now? )
09:12
09:14 rindolf joined 09:18 Peter_WR left
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:20
something like perl5: for $name (@names) { *{"$class"} = sub {} }; # where the sub body accesses different variables/methods based on $name 09:24
RabidGravy well
lizmat m: class A {}; A.^add_method("foo", method { say self } ); A.foo
camelia rakudo-moar cf7706: OUTPUT«(A)␤»
RabidGravy or at it's simplest just use an "public attribute" 09:25
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
09:26 vendethiel joined
fireartist the add_method() would work, but was hoping for something more declarative - like attributes 09:27
lizmat m: class A { has $.foo }; say A.new(foo => 42).foo 09:28
camelia rakudo-moar cf7706: OUTPUT«42␤»
lizmat fireartist: is that what you mean ?
fireartist it I were to use attributes, it wouldn't be just storing/returning a value 09:30
here's an example of the kind of perl5 code I'm trying to replicate: metacpan.org/source/HALKEYE/Games-...ule.pm#L69
lizmat so you're basically programmatically building a sub and then install that as a method 09:32
fireartist yes
lizmat looks like ^add_method would be the thing then 09:33
fireartist ok, I'll have a try with that - thanks
lizmat afk for a few hours& 09:34
nine fireartist: there are a couple of modules that implement new attribute traits: modules.perl6.org/#q=attrib 09:39
09:39 JimmyZ left, avuserow left
fireartist nine: thanks, I'll check them out! 09:41
09:43 avuserow joined, JimmyZ joined
DrForr Did I mention I hate encodings with a passion?... 09:44
09:47 yeahnoob left 09:48 User00 joined
nine DrForr: if only I didn't understand that so well... 09:51
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 :)
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:55 virtualsue left
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.
yoleaux jnthn: I'll pass your message to orbus.
09:58 Kogurr left 09:59 leont joined
spacebat /buffer 4 10:02
10:03 spacebat left 10:10 vendethiel left 10:17 MARTIMM left 10:25 vendethiel joined 10:32 RabidGravy left 10:37 lokien_ joined 10:41 nige1 joined
nige1 morning * 10:42
10:42 nakiro left 10:43 espadrine joined
nige1 just wanted to pop a meme in the pool ;-) 10:43
nginx - has just released v8 with http/2 support - www.nginx.com/blog/nginx-plus-r8-released/ 10:44
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 left, fireartist joined, vendethiel left
nige1 jnthn - any thoughts on the feasibility of that? 10:47
10:48 xvx joined
timotimo what does it mean to be an adapter? 10:49
10:49 nakiro joined
nige1 there is a Perl 5 module - that can do server side includes 10:49
timotimo lol server side includes
nige1 I was thinking of something similar
sec
timotimo that sounds like antique technology, tbh
nige1 nginx.org/en/docs/http/ngx_http_perl_module.html 10:50
10:50 domidumont left
nige1 it does more than SSI 10:50
10:51 domidumont joined, vendethiel joined
timotimo many things on that documentation page scream "this is only for tiny hacks" to me 10:52
nige1 yes - agreed
10:52 domidumont left 10:53 domidumont joined
timotimo perl6 has the big benefit of having async i/o and true multi-threading, though 10:53
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
timotimo on the other hand, rakudo itself is rather memory-hungry, sadly 10:55
it'll improve a whole lot this year, though
nige1 so there would be a fat process there
timotimo personally, i'd still recommend running a regular server process and make that available via something like mod_proxy 10:56
or fcgi, psgi, whatever
nige1 yes
timotimo not sure if those protocols know anything about the fancy new http/2 features
like "i know you'll want this file, so here it is already"
10:57 avenj left 10:58 nakiro left
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:58
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
timotimo just has to be implemented :)
well, websockets are specifically made to be extremely robust to transports not knowing about it 11:00
i think a mod_proxy like thingie is very likely to support websockets unless it specifically fucks it up
11:04 mattp__ left 11:06 araujo left, araujo joined 11:08 araujo left 11:09 Guest18755 joined 11:11 Guest18755 left, Guest18755 joined 11:13 Guest18755 left, vendethiel left, Guest18755 joined 11:15 leont left, Guest18755 left 11:16 Guest18755 joined 11:17 nakiro joined, Guest18755 left
fireartist is there a way to get the filepath that was used to load a module? equivalent to perl5: $INC{'Module.pm'} 11:18
11:18 jdrab joined 11:19 Guest18755 joined 11:23 Peter_WR joined, Peter_WR left
gfldex fireartist: a module may not be a file and therefor there may not be a path 11:26
fireartist makes sense
11:27 xvx left
fireartist is this a bug...? 11:30
1# run code (lib/.precomp is created)
2# add -I ../other-dir/lib (overriding an already-installed module)
3# run code again (does not load from ../other-dir/lib until I manually delete lib/.precomp)
11:30 nchambers is now known as nnttcc
timotimo "use lib" definitely disables precomp. i'm not sure if "-I" does, too 11:31
11:31 Guest18755 left
fireartist ok, I'll test the same with 'use lib' 11:32
11:33 xpen left
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
11:34 nnttcc is now known as nchambers
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
fireartist PERL6LIB has the same issue as -I -it's not invalidating .precomp 11:36
timotimo seems like a bug, in that case
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 [email@hidden.address] (is it .org?) via mail
fireartist cool - thanks for your help! 11:38
moritz yes, it's .org
timotimo no, thank you 11:39
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 blog.ometer.com/2011/07/24/callback...nchronous/
11:51 vendethiel joined 11:57 gensym left 11:58 sena_kun joined 11:59 Skarsnik joined
llfourn fireartist: you can find the repo the module was loaded from by calling .repo-id on the compunit 12:00
Skarsnik HeHello
llfourn (I think)
DrForr o/
llfourn github.com/rakudo/rakudo/blob/nom/...nit.pm#L12
12:02 gensym joined
llfourn m: $*REPO.need(CompUnit::DependencySpecification.new(short-name => "Test")).repo-id.say 12:02
camelia rakudo-moar cf7706: OUTPUT«39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7␤»
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:07 TEttinger left
fireartist llfourn: thanks! that helps confirm the issue I was seeing 12:08
llfourn \o/ 12:09
12:12 iH2O joined, ZoffixWin is now known as Zoffix
Zoffix . 12:12
12:12 vendethiel left
yoleaux 09:07Z <stmuk> Zoffix: maybe the xmas advent butterfly on perl6.org should finally fly away? 12:12
Zoffix Yeah, probably time 12:13
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
12:14 RabidGravy joined
timotimo does our layout mechanism support that without trouble? 12:14
RabidGravy boom! 12:15
timotimo heyo gravy-man 12:16
12:16 iH2O left
sena_kun We still haven't any way to take c-header and get defined constants from it? 12:17
Pretty way, I meant.
timotimo doesn't gptrixie do that, too? 12:18
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
i haven't actually used it yet
arnsholt I think it generates both function signatures and constant values
sena_kun timotimo, if so, I'll use it.
timotimo it also does classes, i see
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
timotimo well, it already has a --all flag, supposedly it'd also have limiting flags 12:21
[--enums] [--functions] [--structs] [--externs] [--list-types]
Skarsnik It's #| to add doc to parameter in MAIn ?
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
12:22 llfourn left
RabidGravy yes 12:22
timotimo thank you, Zoffix
it's just because i saw so many posts in there are yours :P
how would you feel about giving the pl6anet a bit of styling, too? :3 12:23
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
timotimo oh, skarsnik is here! :) 12:27
Zoffix RabidGravy, compiling it into a lib and using it with NativeCall or compiling it into what?
timotimo well, you could also make it a little CLI binary
RabidGravy er, yes
timotimo either with a flag for every constant or just printing out all constants that are interesting
RabidGravy it's do similar to what the h2xs does and generate a function that allows you to query the values 12:28
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
Skarsnik the issue with this solution you need the lib header
RabidGravy you exactly can't and will never be able to do this
Skarsnik to compile
RabidGravy the issue with not doing it is that the values may differ from platform to platform 12:30
*shrug*
12:31 vendethiel joined
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:32
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:34 ely-se left
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:35
Skarsnik hm 12:36
There are probably some base value always the same
with some extension based on the Os
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 nige1 left
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:38
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:39
Skarsnik, I'd go with the latter myself 12:41
12:41 ajr_ joined
RabidGravy gfldex, it's warmish in London but there is a lot of wind right now 12:43
12:44 User00 left 12:47 sammers left 12:50 ely-se joined
sena_kun Where does panda install binaries when ran from non-root? 12:51
Skarsnik somewhere 12:52
gfldex ~/.perl6
12:52 vendethiel left
Skarsnik .perl6/site/install/panda/stuff/morestuff 12:52
Soomething like that
gfldex well, it depedns on the prefix you use
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:54
12:55 avenj joined, avenj left, avenj joined
gfldex sena_kun: try to build rakudo with --prefix=$HOME/local/ . That worked for me. 12:55
Skarsnik nothing in dist?
sena_kun gfldex, I'll try then.
Skarsnik, exactly.
fireartist if you used rakudobrew, look in ~/.rakudobrew
Skarsnik how did you install rakudo? 12:56
ajr_ Isn't panda for installing modules, not binaries?
12:56 vendethiel joined
sena_kun ajr_, gptrixie installs binary file too. 12:57
Skarsnik, using rakudobrew. I am searching there now.
Skarsnik oh yeah, it's in .rakudobrew 12:58
sena_kun It seems so - .rakudobrew/moar-2015.12/install/share/perl6/site/bin/gptrixie 12:59
Thanks for your help, folks.
12:59 sammers joined
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
13:00 nakiro left
Skarsnik Na panda should say it 13:00
ajr_ I'll try, when I know enough to make useful contributions.
moritz panda says "Please add $directory to your $PATH variable" or so 13:01
timotimo you can never "know enough"! :)
moritz so you can kinda infer that it installs executables to that path
RabidGravy ajr_, panda will install whatever you ask it to, lots of modules install dynamic libraries they have built themself for example
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].
lizmat afk& 13:03
ajr_ Thanks, RG, that's a good clarification.
13:05 lnrdo joined 13:08 psy_ left 13:09 Zoffix left 13:11 Zoffix joined
Skarsnik does putting Array @hello in main make it accept stuff like --hello=1,2,3 ? 13:13
Zoffix doubts it 13:14
moritz Skarsnik: 'Array @hello' would be an array of arrays
Skarsnik: the @ already implies array
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
Zoffix Says: "Usage: foo.p6 <hello>"
moritz --hello=a --hello=b
Zoffix doesn't work
moritz pity 13:16
Zoffix (still says "usage...")
13:19 vendethiel left 13:22 skids joined 13:24 MARTIMM joined
Skarsnik hm is that a bug? I do MAIN(Str $opt1 #| foo (newline) , $opt2 #| bar and Usage show me foo for opt2 13:24
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 :
lizmat $ perl6 4 --hello=1 --hello=2
[IntStr.new(1, "1"), IntStr.new(2, "2")]
moritz ah right, needs to be named
timotimo could be you actually want #= instead of #| ?
moritz lizmat++
El_Che ==> Fetching Text::CSV
Please remove leading 'v' from perl version in Text::CSV's meta info.
Text::CSV requires Perl version 6.0.0. Cannot continue.
Skarsnik Oh it's =
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:26 smash_ is now known as smash
lizmat El_Che: I see "perl" : "6.c", 13:27
13:27 xpen joined
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
...then I'd be wary of using .race
El_Che lizmat: my command is a simple "panda install Text::CSV"
lizmat hmmmm.... 13:28
El_Che let nuke rakudo and try again
lizmat no idea, then
Zoffix El_Che, NOOo
wait
El_Che ok
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
So the META needs to be edited. Clone it, remove "v" and do panda install . and submit a PR to the author
El_Che Zoffix: will do 13:29
13:29 lokien_ left
Zoffix oh 13:29
El_Che, seems like it's updated already. Maybe try running panda update 13:30
Skarsnik hm
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
Should it show the <gccoptions> at the end ? (it's a *@)
13:31 araujo joined, araujo left, araujo joined
El_Che Zoffix: panda update did the trick. I didn't know about that. Maybe that should could automatically? 13:32
13:32 araujo left
Skarsnik hm panda can be broken sometime, you probably don't want it to upgrade itself x) 13:32
Zoffix Yeah, probably.
Skarsnik, the update fetches the fresh ecosystem meta file 13:33
Skarsnik Oh that
timotimo "panda update" could be more explanatory about what exactly it does
El_Che timotimo: I wouldn know why the use case is to do that manually
why -> what
lizmat afk& 13:34
Zoffix It's more of "fetching it before every module install is a bad idea"
timotimo hum?
Skarsnik why USAGE choose a random order to display option lol
El_Che not for every install, for every run
Skarsnik instead of the order in main? x)
timotimo Skarsnik: probably something's using a Hash in the middle
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
I mean I can always write my own USAGE
13:35 Actualeyes joined
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)
El_Che JSON::Tiny seem to be popular
13:36 lnrdo left
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 13:37 kaare_ joined 13:38 vendethiel joined, sena_kun left, AlexDaniel joined
Skarsnik JSON::Marshal/Unmarshal more suited for serializatio with json x) 13:42
how I do multi line WHY ? I used #= on each line but I kind of want a \n added to it? x) 13:45
Zoffix m: sleep 1 for ^8 .hyper; say now - INIT now 13:48
camelia rakudo-moar cf7706: OUTPUT«8.007386665␤»
Zoffix m: sleep 1 for ^8 .hyper: :1batch; say now - INIT now
camelia rakudo-moar cf7706: OUTPUT«2.0091985␤»
Zoffix k
13:48 maslan joined, ely-se left 13:49 lnrdo left 13:54 FROGGS left
Zoffix m: sleep 1 for ^8 .hyper: :4degree; say now - INIT now 13:55
camelia rakudo-moar cf7706: OUTPUT«8.00768867␤»
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␤␤»
Zoffix m: use NativeCall; sub system (Str) is native {}; system 'lscpu'
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 13:59 vendethiel left
flussence m: #|{ foo␤ bar␤ baz}␤my $foo;␤␤ say $foo.WHY 14:00
camelia rakudo-moar cf7706: OUTPUT«(Any)␤»
flussence m: #| foo␤my $foo;␤␤ say $foo.WHY
camelia rakudo-moar cf7706: OUTPUT«(Any)␤»
14:00 lnrdo left
flussence
.oO( how do I do *single* line .WHY...? )
14:01
Zoffix isn't only for subs?
flussence m: #| foo␤sub foo {}␤#= bar␤ say &foo.WHY
camelia rakudo-moar cf7706: OUTPUT«foo␤bar␤»
flussence hum, not how I remember it supposed to work 14:02
m: #|{ foo␤foo2␤foo3 }␤sub foo {}␤#= bar␤ say &foo.WHY
camelia rakudo-moar cf7706: OUTPUT«foo foo2 foo3␤bar␤»
14:05 sammers left
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
Skarsnik #| is for the next thing
you can probably removing calling the sub? 14:07
*remove
Zoffix moritz, yeah, that's probably a safe way to go 14:08
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
Zoffix, na you probably can just remove assigning the NC trait to the sub
14:10 ajr_ left
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'
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…»
Skarsnik I was just saying preventing native sub to be called at all 14:11
not just filter on system
Zoffix Ahh
m: use NativeCall; sub fork is native {}; fork; say 42 14:12
camelia rakudo-moar cf7706: OUTPUT«42␤42␤»
Zoffix This can be useful to show too
14:12 nige1 joined
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 ...
Zoffix nah
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
when a butterfly's wing flaps in ... errm
14:14 rindolf left
Zoffix :D 14:14
gtodd what about a "special" version of NC that says "I'm sorry Dave ..."
14:15 araujo joined, araujo left, araujo joined
Zoffix :F 14:16
*:D
14:16 araujo left 14:17 sammers joined
gtodd wow ... use NativeCall; sub fork is native {}; fork; say 42 ??? 14:17
that is ... pretty cool
for how simple it is :)
14:18 lokien_ joined
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
gtodd :-D
1. Tell your manager that you have turned off NC in your build :) 14:20
14:20 sena_kun joined
gtodd 2. For a truly secure feeling maybe even really do step 1. ... 14:22
DrForr Run it on CP/M :)
Skarsnik Actually that not a bad idea, to have something to cut off NC (or the nqp/vm that make it work) 14:23
14:23 cdg joined
RabidGravy You could make a build with it turned off in the restricted setting I guess 14:24
14:24 cdg left
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:24
14:25 cdg joined
RabidGravy exactly, if you're concerned about a theoretical local loophole than you're probably stuffed anyway 14:25
14:26 ChoHag left
gtodd I just thought perl6 w/ NC was no worse than $OTHERTHING 14:28
hoelzro o/ #perl6
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
14:29 araujo joined, sena_kun left 14:30 araujo left, araujo joined 14:32 lnrdo joined
Skarsnik well you don't need a compiler to make NC work 14:33
14:33 ChoHag joined
Skarsnik You install rakudo/moar and that it 14:33
14:34 ely-se joined
jnthn hoelzro: What're you looking to do? 14:36
14:36 ugexe left
jnthn hoelzro: react already implies non-busy waiting 14:36
hoelzro jnthn: looking to see if rt.perl.org/Ticket/Display.html?id=125343 is still relevant
14:37 jack_rabbit left 14:49 rindolf joined, ugexe joined, jack_rabbit joined 14:50 perlpilot joined 14:54 lnrdo left 14:59 nakiro joined 15:02 lnrdo joined
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:06
BTW hoelzro your 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
RabidGravy 'ang on I'll find the relevant ticket
rt.perl.org/Ticket/Display.html?id=126401 15:10
I don't think I'm able to merge the tickets so if someone else could 15:11
yeah I don't have permission to merge 15:14
hoelzro RabidGravy: I can merge them, but I don't see the similarity
oh, dur
nvm =P
I thought you were talking about my earliest ticket
nine merged
RabidGravy no the IPv6 thing 15:15
:)
cheers
hoelzro damn, nine beat me to it!
15:15 fireartist left
hoelzro nine++ 15:15
Skarsnik I need to use index to see if an element is in an array? 15:25
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
or "without" instead of "unless"
oh, we also have "first"
that may work better for you, depending on your use case
hoelzro also any(@elems) == $target
Skarsnik why Str has a contains but not Array?
timotimo because in Str you can do boyer-moore substring search
:P 15:27
nine obviously...
timotimo also, contains on a Str is very different from contains on Array
Zoffix There are set operators
timotimo aye, (elem) would also be good
Zoffix m: my @valid = <foo bar ber>; say 'foo' ⊆ @valid; say 'blarg' ⊆ @valid
camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
timotimo like, 1234 in [1, 2, 3, 4] giving True would probably surprise you on an array, but not on a string.
Skarsnik what is the texas form? x)
timotimo (>=) for example 15:28
Zoffix m: my @valid = <foo bar ber>; say 'foo' (<=) @valid; say 'blarg' (<=) @valid
camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
timotimo but i'd really use (elem) instead of (<=)
15:28 ely-se left
timotimo that is a simpler check to do. dunno if we optimize that case already or not 15:28
Zoffix Yeah 15:29
I had my mind set on...
timotimo your mind set on Set? :)
15:29 risou is now known as risou_awy
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␤»
ilmari m: my @valid = <foo bar ber>; say 'foo' ∈ @valid;
camelia rakudo-moar cf7706: OUTPUT«True␤»
Zoffix dammit
15:29 risou_awy is now known as risou
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␤»
timotimo note that that coerces the whole iterable to a set first 15:30
Zoffix Premature optimization :)
timotimo whereas .first or .index will short-circuit
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
timotimo .index and .first still work under the assumption that the lazy sequence will at some point really generate that element
if the element isn't in there, both .index/.first and (elem) will infiniloop, though
Zoffix m: my $x = 1..Inf; say so $x.index: "42";
camelia rakudo-moar cf7706: OUTPUT«False␤»
Skarsnik returns Nil when no values match for first
Zoffix m: my $x = 1..Inf; say so $x.first: "42";
camelia rakudo-moar cf7706: OUTPUT«True␤»
Skarsnik hm, should it be just False?
15:32 oldskirt_ joined
Skarsnik I am not if it's really a failure 15:32
Zoffix HAH
timotimo it doesn't smartmatch?
15:32 oldskirt_ left
timotimo m: say 45 ~~ "45" 15:32
camelia rakudo-moar cf7706: OUTPUT«True␤»
Zoffix nemo, somehow, magically, my compose started to work.. WITH the extended file ☺
[Coke] *achoo*
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 ?
timotimo hooray!
Zoffix oh maybe not.. 15:33
Just the regular compose.. oh well, better than it being totally broken :P
m: my $x = 1..Inf; say so 42 ∈ $x 15:34
camelia rakudo-moar cf7706: OUTPUT«(timeout)»
15:37 vytas left
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.
.tell lizmat nom (I guess?) if we can cherry pick it to the release prep branch, great.
yoleaux [Coke]: I'll pass your message to lizmat.
15:38 vytas joined
MadcapJake Any idea why JSON::Fast would be really slow? 15:38
[Coke] MadcapJake: compared to? 15:39
MadcapJake well anything, it seems to just hang indefinitely when given an array of objects
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…»
Skarsnik star-r: say 'hello' 15:41
r-star: say 'hello'
meh whatever xD
Zoffix star: say 'hello' 15:42
camelia star-m 2015.09: OUTPUT«hello␤»
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);
camelia star-m 2015.09: OUTPUT«Method 'append' not found for invocant of class 'Array[A]'␤ in block <unit> at /tmp/1giYzzUeuY:1␤␤»
Zoffix ... it's *that* old? >_< 15:43
MadcapJake Can JSON::Fast not handle class instances?
It seems JSON::Tiny just says "Cannot serialize type A"
Zoffix Dunno.. What's it supposed to do with them?
MadcapJake turn them into hash objects
moritz how? 15:44
Zoffix Interesting. That's not what I'd expect it to do.
ilmari objects are not hashes, regardless of what javascript calls them
MadcapJake but this is json we're talking about...
[Coke] I wouldn't expect to-json to work on classes, but I haven't read json-fast's docs yet.
moritz also note that JSON::Tiny aims to be *Tiny*, like, minimal
so it will never implement fancy conversion schemes
[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
moritz there's room for larger/fatter/more feature-complete JSON implementations out there
Zoffix I'd expect it to call TO-JSON method, if one present, and call .Str if not
or .gist I guess
15:45 kanishka joined
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␤␤»
MadcapJake alright no biggy, i'll just create a class method that turns my objects into hashes
Zoffix ---
perlpilot TO-JSON sounds a little too magical to me.
Skarsnik use json::marshal/unmarshal MadcapJake
Zoffix perlpilot, that's the convention in Perl 5 land
moritz note that you can export your own to-json multis for your types
Zoffix Seems useful (if that convention is widely used that is)
perlpilot IF the class did the Associative role, perhaps to-json would work
MadcapJake Skarsnik: thanks!
Zoffix huggable, Associative 15:47
huggable Zoffix, role Associative [Object that supports looking up values by key]: doc.perl6.org/type/Associative
15:47 jack_rabbit left
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␤␤»
Zoffix huh
moritz perlpilot: what about things like Match and Capture that do both Positional and Associative? 15:48
Zoffix: doc.perl6.org/language/subscripts
perlpilot moritz: ah, good point.
15:48 musiKk joined
Zoffix Ahh 15:48
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
perlpilot there is no magic here.
moritz wants a new laptop
Zoffix m: class Bar is Associative { has $!foo = 42; method AT-KEY { self."$key" } }; Bar.new<foo>.say
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␤»
Zoffix m: class Bar is Associative { has $!foo = 42; method AT-KEY { self."$^key" } }; Bar.new<foo>.say
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…»
Zoffix oh sod off
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␤»
Zoffix (╯°□°)╯︵┻━┻
ilmari Zoffix: that doesn't help with iterating over the keys, though
m: class Bar is Associative { has $!foo = 42; method AT-KEY($key) { self!"$key"() } }; Bar.new<foo>.say
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␤␤»
Zoffix These error messages are so good, they're annoying. It's like, if you're that smart, fix it for me :D
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
camelia rakudo-moar cf7706: OUTPUT«42␤»
perlpilot use fix-it-for-me;
Zoffix :)
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 :)
To learn the hash methods
Skarsnik RabidGravy, there is not already one? x)
RabidGravy Not dumb enough 15:53
Zoffix or Role:: I guess
m: class Bar does Associative { has $.foo = 42; method AT-KEY($key) { self."$key"() } }; Bar.new<foo>.say
camelia rakudo-moar cf7706: OUTPUT«42␤»
15:54 nakiro left 15:55 lnrdo left 15:56 virtualsue joined 15:57 Zoffix left, lnrdo joined 15:59 nige1 left 16:01 sena_kun joined 16:02 ZoffixWin joined, ZoffixWin left, ZoffixWin joined
nemo ZoffixWin: wooohoo! 16:02
ZoffixWin: maybe last reboot killed off some IME or something that was running ☺ 16:03
ZoffixWin maybe
RabidGravy Skarsnik, I mean, really, really, really dumb gist.github.com/jonathanstowe/e0d7...51a9302729
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:04
ZoffixWin tries out fresh install 16:05
sena_kun Of course, .perl6 and .rakudobrew was rm-rf-ed before. Twice. 16:06
perlpilot sena_kun: see, there's your problem ... you didn't rm-rf a third time! ;) 16:07
16:07 Zero_Dogg left
perlpilot rakudobrews to see what happens locally 16:07
dalek href="https://perl6.org:">perl6.org: ad776e2 | (Zoffix Znet)++ | source/downloads/index.html:
Typo
16:08 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
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
ZoffixWin No, despite living in Cakunistan, I don't type in French :) 16:09
*Canukistan too -_- way to ruin a pun 16:10
perlpilot ZoffixWin: oddly, I read it as if you'd typed it correctly
ZoffixWin Not too odd :) en.wikipedia.org/wiki/Typoglycemia 16:11
perlpilot heh
sena_kun: panda seems to have installed just fine here. How did you try to install panda? 16:12
nemo ZoffixWin: ah. cool.. where in canada? 16:13
ZoffixWin Brampton (40m away from Toronto, Ontario)
16:14 domidumont left
nemo 4,0▌🍁 ▌ 16:15
ZoffixWin: ah. I grew up... well, all over the place, but originally from oshawa area
40m O_o
ZoffixWin Ah. Been there
nemo went into a bit of a decline when GM started imploding
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. pastebin.com/aNSWNkwY - here is the log. 16:16
16:16 nige1 joined
ZoffixWin sena_kun, works fine for me too. rakudobrew build moar; rakudobrew build panda; 16:16
16:17 lnrdo left
ZoffixWin sena_kun, I notice in your log, it's not fetching from github 16:17
16:17 lnrdo joined, jme` joined
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: gist.github.com/zoffixznet/8165faf650c53124e5e7
sena_kun ZoffixWin, it's because I rerun installation to show the log and master was already downloaded. 16:18
ZoffixWin oh, heh, right :)
sena_kun, k, lemme try build the Christmas perl and try with panda with that
That's not what I assumed you meant by "latest nqp/moarwm/rakudo" :) 16:19
perlpilot me either
sena_kun ZoffixWin, sorry, I was wrong here.
Started from scratch. 16:20
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
Though, if panda fails with Christmas Perl 6, then it's certainly a problem.
sena_kun ZoffixWin, "rakudobrew build moar latest" will do the trick also? 16:22
ZoffixWin *shrug* never heard of that one
sena_kun ZoffixWin, the whole new world is waiting. (: 16:23
16:24 xvx joined
sena_kun Read rakudobrew readme - okay, I was at fault. But panda certainly fails with Xmas. 16:25
16:25 vendethiel joined 16:27 _mg_ left
ZoffixWin Yup. Reproduced. 16:27
ZoffixWin files an Issue
16:29 regreg joined
ZoffixWin github.com/tadzik/panda/issues/290 16:30
16:30 sftf joined, Kogurr joined 16:33 lnrdo_ joined
nine .tell FROGGS github.com/tadzik/panda/issues/290 16:33
yoleaux nine: I'll pass your message to FROGGS.
nine .tell jnthn github.com/tadzik/panda/issues/290
yoleaux nine: I'll pass your message to jnthn.
16:34 lnrdo left 16:36 mr-foobar joined, psy joined 16:37 psy left, psy joined 16:41 mohae_ joined 16:44 mohae left 16:47 zakharyas left, xpen left 16:49 vendethiel left 16:52 nige1 left
AlexDaniel m: gist.github.com/AlexDaniel/69ff636ffe4053792120 16:56
camelia ( no output )
16:57 abraxxa left 16:59 khw joined 17:00 xvx left 17:03 sena_kun left 17:05 lostinfog joined 17:06 skids1 joined, mohae_ is now known as mohae 17:07 musiKk left, Kogurr left, skids left 17:16 noganex_ joined 17:19 ChoHag_ joined 17:20 noganex left, ChoHag left 17:24 nige1 joined 17:27 _mg_ joined, pmurias joined 17:30 Grauwolf left, johan left, xnrand left, frew left, lnrdo_ left, BooK_ left, zostay left 17:31 zostay joined, BooK joined 17:33 lnrdo joined 17:34 johan joined, xnrand joined 17:35 frew joined
sjn \o 17:35
17:36 sQuEE is now known as sQuEE`
sjn wishes jnthn++ a happy birthday 17:36
17:36 Grauwolf joined 17:38 SCHAAP137 joined 17:42 psy left, psy_ joined 17:43 sQuEE` is now known as sQuEE 17:52 ely-se joined 17:55 Actualeyes left, frew left 17:56 frew joined 18:00 ely-se left 18:04 muraiki joined, vendethiel joined 18:07 firstdayonthejob joined 18:08 araujo left 18:11 sftf left 18:12 mr-foobar left, mr-foobar joined 18:16 lnrdo left, addison joined, lnrdo joined 18:19 dakkar_ left 18:22 _mg_ left 18:29 ely-se joined 18:30 FROGGS joined
FROGGS o/ 18:31
yoleaux 16:33Z <nine> FROGGS: github.com/tadzik/panda/issues/290
vendethiel \o
FROGGS hmmm
18:34 domidumont joined 18:35 araujo joined 18:36 araujo left
ely-se hello world 18:41
FROGGS hi ely-se 18:42
ely-se writing my first type checker in Perl 6
EXCITING
18:42 araujo joined, araujo left, araujo joined
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
18:43 _nadim joined
vendethiel ..around a month or two ago :P. 18:43
[Tux] :) 18:44
ely-se :)
18:44 _nadim left 18:47 lnrdo left 18:48 lnrdo joined, jevin left 18:51 keix left
DrForr .seen nine 18:51
yoleaux I saw nine 16:33Z in #perl6: <nine> .tell jnthn github.com/tadzik/panda/issues/290
nine FROGGS: thanks for the quick fix! 18:52
DrForr nine: Howdy. Got a memory issue I'd like to bounce off you.
FROGGS nine: will start to build the star RC in e few minutes btw
nine: just need to wait for the availability of my left arm, where my youngest falls asleep right now 18:54
18:54 jevin joined, mr-foobar left
timotimo d'aaw 18:54
nine FROGGS: :) 18:55
DrForr: what can I do for you?
18:55 keix joined
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
Which means that something needs to free() that list's memory.
timotimo i wonder who will build Inline::V8 or Inline::Chakra or whatever the firefox one is called 18:57
TraceMonkey?
FROGGS copy the mem and then free it?
nine so far so good?
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) { * }
DrForr That gets passed back as a CArray to Perl, and then when it's done unmarshalling the datastructure, something has to free it.
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.
Plus it's a nested data structure, with malloc'ed string ranges inside.
timotimo doesn't that mean every user of Guile is supposed to do the free-dance?
nine Why couldn't you trust the Perl 6 code to do that?
DrForr timotimo: No, just the Inline::Guile module. 19:00
mst because he wrote it and he knows he's terrible at it? ;)
nine I assume the unmarshalling code is part of Inline::Guile anyway?
19:00 virtualsue left
DrForr Well, it's more complex than just free'ing the arena, so that part is probably best done in C. 19:01
I just don't want to accidentally the free() call and release it into the wild.
19:02 CIAvash left
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:03
19:04 dfcarpenterak joined
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:04
19:05 domidumont left
DrForr I'll play with that and let you know how I get along at FOSDEM, I suppose. 19:05
gfldex 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 nige1 left
mst I don't recall having to do nearly this dance in Guile.pm 19:05
but that may just be because somebody'd already written that part and I failed to understand it
19:05 domidumont joined
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)
camelia ( no output )
DrForr m: (1,2) ~~ (1,2)
camelia ( no output )
DrForr Er?...
ZoffixWin SAY
m: say (1,2) ~~ (1,2)
camelia rakudo-moar cf7706: OUTPUT«True␤»
ZoffixWin m: say (1,2) ~~ (2,1) 19:07
camelia rakudo-moar cf7706: OUTPUT«False␤»
DrForr Ah.
gfldex m: say (1,2,3,4) eqv (1,2,3,4); say (1,2,3,4) eqv (1,2,3,5);
camelia rakudo-moar cf7706: OUTPUT«True␤False␤»
DrForr . o ( Say, say, say what you want... )
ggoebel14 thank you... what is ~~ called?
19:07 domidumont left
gfldex smart match 19:07
19:07 domidumont joined 19:09 laz78 joined, lnrdo left
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.
I still have to do tests to prove that it's retaining the enironment thread in between invocations. 19:10
mst this sounds like "it got more complicated since I last looked at it" 19:15
DrForr Very likely.
19:16 mohae left 19:17 mohae joined 19:18 _mg_ joined
[Coke] how agressive should we be about moving moarvm bug reports into moar rather than RT? 19:19
19:19 sufrostico joined
vendethiel m: multi sub infix:<+>(Str, Str) {}; say 3 + 4; 19:19
camelia rakudo-moar cf7706: OUTPUT«7␤»
[Coke] e.g. rt.perl.org/Ticket/Display.html?id=127374
DrForr Whew, environment tests worked. 19:20
Coupla days and 'guile-sub add($a,$b) { + a b }' may work :) 19:21
MadcapJake where does panda/zef install modules to? 19:22
19:22 _mg_ left, cfedde left, spider-mario joined 19:23 mr-foobar joined, cfedde joined
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:27
19:29 lokien_ left 19:32 yqt joined 19:35 cdg left
ggoebel14 my $a = <x a m a x>; for $a -> $p { say $p.[0..* div 2] ~~ $p.reverse.[0..* div 2] }; 19:35
is it possible to do that without first assigning the list to $a? 19:36
19:36 _mg_ joined 19:37 Kristien joined, musiKk joined 19:38 ely-se left 19:39 perlpilot left 19:40 perlpilot joined, PerlJam left 19:42 Kristien is now known as ely-se
ggoebel14 m: { $^a ~~ $^a.reverse }(<x a m a x>); 19:44
camelia ( no output )
ggoebel14 m: { say $^a ~~ $^a.reverse }(<x a m a x>);
camelia rakudo-moar cf7706: OUTPUT«True␤»
ggoebel14 m: { say $^a ~~ $^a.reverse }(<x a m a t>);
camelia rakudo-moar cf7706: OUTPUT«False␤»
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 }
camelia rakudo-moar cf7706: OUTPUT«True␤»
timotimo musiKk: yeah, it is. sorry about that!
[Coke] musiKk: the specs are the -tests-. the tests are expected to pass.
19:46 Amendil left
[Coke] not everything from the synopses is implemented, and may not be - some of that is speculative. 19:46
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
timotimo ah, right 19:48
yeah the "specs", or rather "speculations" ;), aren't authoritative any more 19:49
the ROAST has surpassed the specs half a year ago, or even earlier?
19:50 dfcarpenterak left
ggoebel14 timotimo: thank you. that reads better left to right... 19:52
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:53
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.
timotimo oh 19:55
[Coke] ... as release manager, I should not get that wrong, but I think I may have. :)
timotimo well, fair enough
i feel like i'm out of the loop :\
[Coke] the targz has tests in it, I think; but we have yet to ship a second released version, so...
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
RT #127370 - do we expect -pe to even work?
huh, guess so. 19:57
MadcapJake when installing modules (via zef/panda) is the source code kept somewhere?
Skarsnik Yes
but it's 'unreadabl'
aka /454545/8989844575454654646464
MadcapJake so no readable code is kept? man, that's a bummer
timotimo yeah, we do expect -pe to work
however, /proc/* has already given us grief once before
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
MadcapJake I thought they added the module name at the beginning now
Skarsnik well you can try a ack 'module*mymodule' in panda stuff, but meh
20:00 mr-foobar left
MadcapJake Skarsnik: what do you mean by `a ack`? 20:00
Skarsnik grep
ack is a fancy grep
MadcapJake oh, what's the format of the filenames? 20:01
20:01 darutoko left 20:02 lnrdo left
Skarsnik well you can try to find the declaration of the class/module you want 20:02
20:02 Sqirrel joined
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
MadcapJake oh i think those are panda required deps 20:04
timotimo that's just the panda folder
like, a git clone of the panda repository
it has a few modules it requires to bootstrap itself
timotimo BBL
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:06
DrForr And I panic MoarVM. Must be doing something right. 20:07
hoelzro does anyone have a problem where panda doesn't get installed into $prefix/share/perl6/site/bin ? 20:08
I think it's since FROGGS' bin-prefix change yesterday
DrForr hoelzro: On my work laptop, yes.
hoelzro DrForr: for a while now? or just recently?
my linenoise canary died yesterday claiming it couldn't find panda
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.
flussence seems missing here too (I've got an hourly cronjob that reinstalls everything on one machine, `perl6` is there)
[Coke] presumably a recent change somewhere in the toolchain.
hoelzro ah ha
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
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.
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
b2gills MadcapJake: Unicode on Posix systems 20:12
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
FROGGS hoelzro: where does panda get installed to? 20:14
hoelzro FROGGS: nowhere, it seems
FROGGS O.o
hoelzro nowhere under my installation prefix, anyway
if I specify --bin-prefix by hand, it works
I imagine specifying --prefix would fix the issue as well
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.
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
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
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, Zero_Dogg left
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
20:16 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
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
yoleaux 15:38Z <[Coke]> lizmat: nom (I guess?) if we can cherry pick it to the release prep branch, great.
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.
dalek kudo/nom: 85d20f3 | lizmat++ | src/core/ (2 files):
STORE_AT_KEY doesn't return anything

Makes initialization of hashes about 10% faster
FROGGS hoelzro: confirmed 20:19
lizmat .tell [Coke] 85d20f3 is the one to cherry pick
yoleaux lizmat: I'll pass your message to [Coke].
hoelzro FROGGS: why do you suppose panda silently fails?
FROGGS hoelzro: no idea
b2gills Sometimes a specialized transform can be more space efficient codegolf.stackexchange.com/a/66454/1147 20:20
FROGGS m: say CompUnit::RepositoryRegistry.repository-for-name('site')
camelia rakudo-moar cf7706: OUTPUT«inst#/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
FROGGS m: say CompUnit::RepositoryRegistry.repository-for-name('site').Str
camelia rakudo-moar cf7706: OUTPUT«/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
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␤»
nine No guessing needed actually
FROGGS m: say CompUnit::RepositoryRegistry.repository-for-name('site').Stringy
camelia rakudo-moar cf7706: OUTPUT«/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
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>)
camelia rakudo-moar cf7706: OUTPUT«"/home/camelia/rakudo-m-inst-1/share/perl6/sources39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7".IO␤»
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>)
[Coke] nine: feel free to cherry pick 85d20f3 if it looks good for you. :)
camelia rakudo-moar cf7706: OUTPUT«"/home/camelia/rakudo-m-inst-1/share/perl6/sources/39D1BEBEB786F0DE0B82489F3F02F5C672CBA1F7".IO␤»
yoleaux 20:19Z <lizmat> [Coke]: 85d20f3 is the one to cherry pick
[Coke] lizmat++
MadcapJake Anyone interested, p6dx can do some completions now! 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:23
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␤»
Amendil m: my @array = 0, 42, 1337; say "I have {+@array} elements";
camelia rakudo-moar cf7706: OUTPUT«I have 3 elements␤»
hoelzro MadcapJake++ # nice, I'll have to check that out! 20:25
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: gist.github.com/niner/06792102587a79940294
20:26 domidumont left
nine flussence: I actually think that punycode would be a good solution since it would keep most file names untouched. 20:27
20:27 molaf joined
diakopter ely-se: what sort of type system? 20:27
Amendil m: my @array = 0, 42, 1337; say "I have {+@array[0,1]} elements";
camelia rakudo-moar cf7706: OUTPUT«I have 2 elements␤»
Amendil oh 20:28
ely-se diakopter: structural
diakopter ely-se: not dependent? 20:29
ely-se no value-dependent types, no
diakopter for a programming language?
MadcapJake nine++ This is perfect! I can just integrate that right in. Thanks so much!
nine Just updated it to print info about the dist meta data 20:30
diakopter ely-se: I just mean, for which language/prover? 20:31
ely-se custom one
doesn't exist yet 20:32
lisp-like
20:33 grondilu left
FROGGS hoelzro: I've got a patch 20:34
20:35 grondilu joined
FROGGS hoelzro: please try latest panda 20:35
20:36 MARTIMM left, lichtkind joined
flussence shell(q{strace -s 255 perl6 -MTest -e 1 2>&1 | fgrep sources}, :out).out.get.comb(/\"(.*?)\"/).put # shorter :) 20:38
dalek kudo/2016.01-preparation: b6c3321 | lizmat++ | src/core/ (2 files):
STORE_AT_KEY doesn't return anything

Makes initialization of hashes about 10% faster
20:39
FROGGS ***ALL*** - please try this release candidate of Rakudo Star: froggs.de/perl6/rakudo-star-2016.01-RC1.tar.gz
***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.
ely-se WTB P6CRE 20:41
DrForr nine: Got it working, lots more trivia to get through though. 20:42
20:42 _mg_ left
nine FROGGS: btw. thanks for taking on R* :) 20:43
FROGGS nine: sure 20:44
nine: hope we get some feedback
Skarsnik FROGGS, you should probably contact distrib maintainer? x)
20:45 laz78 left, molaf left
FROGGS Skarsnik: star is not packagable currently anyway sadly 20:46
Skarsnik: and since star is a distro, they actually are not meant to package it
nine why? 20:47
[Coke] nine: if the method isn't explicitly tested in p6.c, it's fair game.
20:47 dfcarpenterak joined
[Coke] packaging folks can emulate star, but why would they package it directly? 20:47
FROGGS nine: rt.perl.org/Ticket/Display.html?id=126894
[Coke] it was a stopgap for folks until packages packaged.
FROGGS [Coke]: aye
[Coke] FROGGS: is it based on the prep branch? 20:48
(the 2016.01 star you're rc'ing?)
FROGGS e.g. debian should package moar, nqp, rakudo, panda, modules on its own etc
[Coke]: yes
20:48 sufrostico left
[Coke] ok. I assume you need an actual release of the compiler before you pull the trigger. 20:49
or at least, would like.
20:50 laz78 joined 20:52 espadrine left, dfcarpenterak left
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 build.opensuse.org/package/view_fi...c?expand=1
20:53 kaare_ left
FROGGS ahh, hmmm 20:53
nine: please suggest that on RT but I think packaging star is still the wrong approach
nine Always remember: the precomp files created during module installation are pretty useless right now.
FROGGS: yes, individual packages are definitely the way to go 20:54
moritz ==> Fetching JSON::Fast 20:56
Please remove leading 'v' from perl version in JSON::Fast's meta info.
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?
FROGGS moritz: sure, that's timotimo's, right?
nine FROGGS: added the info to the ticket 20:58
FROGGS nine++
moritz FROGGS: right; I'll pull-request
[Coke] if we're happy, I can try to do the release tonight.
20:59 Relsak joined
[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. 20:59
moritz github.com/timo/json_fast/pull/11 21:01
21:02 _mg_ joined 21:04 sortiz joined 21:06 bowtie left 21:07 nige1 joined, bowtie joined
El_Che \o/ bowtie! long time no see 21:08
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 _mg_ left
AlexDaniel is there any way to know how many bytes are there? 21:09
m: say ‘hello’.codes
camelia rakudo-moar 85d20f: OUTPUT«5␤»
leont That question is not sensible
You can only answer that question in the context of a specific encoding, such as utf8
AlexDaniel leont: what would make it more sensible to you?
ah ok, of course. I just default to UTF-8 21:10
moritz AlexDaniel: you can .encode first
AlexDaniel moritz: right!
moritz m: say 'hello'.encode('UTF-8').bytes
camelia rakudo-moar 85d20f: OUTPUT«5␤»
moritz m: say 'hello'.encode('UTF-16').bytes
camelia rakudo-moar 85d20f: OUTPUT«10␤»
AlexDaniel leont: that's a good point, actually. Thank you
moritz m: say 'hello'.encode('UTF-7').bytes
camelia rakudo-moar 85d20f: OUTPUT«Unknown string encoding: 'utf-7'␤ in block <unit> at /tmp/AeB_qA9dDD line 1␤␤»
diakopter FROGGS: seems to install fine on a fresh Mint 17.3 64-bit in VirtualBox on mac
moritz still installing modules here 21:11
FROGGS diakopter: ohh awesome, thank you
AlexDaniel m: m: say 'hello'.encode.bytes
camelia rakudo-moar 85d20f: OUTPUT«5␤»
ZoffixWin is not convinced asking people to remove "v" is a sensible approach.
Why not just regex it out?
FROGGS diakopter: can you use its panda to install a module?
ZoffixWin During install. DWIM and not annoy people.
[Coke] arent' we already dwimming and then warning? 21:12
ZoffixWin panda refuses to install the module.
Unless this changed in the past 24 hours
[Coke] k 21:13
21:13 revhippie joined
diakopter FROGGS: er, do you want the warnings the install outputted? 21:13
21:14 zakharyas joined
FROGGS diakopter: no, just wanna know if the panda is in a good shape 21:15
hoelzro FROGGS: thanks, will do!
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:16
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
also helpful would be a message saying into which path(s) stuff was installed
FROGGS hmmmm, that makes sense
diakopter like, I don't know where to go looking for panda after it finished 21:18
FROGGS yeah
a nice summary at the end would be nice
diakopter (or which dir to add to PATH if I wanted to run panda) 21:19
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
camelia rakudo-moar 85d20f: OUTPUT«/home/camelia/rakudo-m-inst-1/share/perl6/site/bin␤»
diakopter in addition to install/bin
FROGGS: ^
FROGGS diakopter: only the install/bin 21:22
hoelzro FROGGS: works for me now! 21:24
thanks!
21:25 cdg joined, cdg left 21:26 cdg joined
diakopter FROGGS: but if I want to run stuff panda installs? 21:27
FROGGS ummm
ups
yeah, there is a thinko somewhere :/
ZoffixWin You have to add two paths ATM. The ones that are listed on perl6.org/downloads/ 21:28
21:28 rindolf left
ZoffixWin Otherwise binaries you install with panda aren't found 21:28
21:28 lokien_ joined
FROGGS damn, that renders the bindir patch rather useless >.< 21:28
21:29 dfcarpenterak joined
diakopter FROGGS: so we have install/share/perl6/bin and install/share/perl6/site/bin 21:29
in addition to install/bin
21:29 geraud joined
FROGGS C:\rakudo\bin\panda 21:33
Cannot unbox a type object
-.-
moritz I get the same error on LInux 21:35
with a backtrace
FROGGS wait, I seem to have an old perl6 binary somewhere 21:36
moritz too
guess I should patch PATH
FROGGS ~/dev/star/work-m/rakudo-star-2016.01-RC1$ install/bin/panda 21:37
Panda -- Perl 6 Module Installer
[...]
moritz I've removed the other $PATH elements, and I still get the unbox error :(
ah no, sneaky; I had a bin/perl6 in my $HOME 21:38
and didn't notice, because I usually invoke perl6-m directly
FROGGS okay, panda works fine after getting the other perl6 out of PATH 21:42
... on windows that is 21:43
I'll muse about the bindir stuff, and potentially revert the patches to rakudo and panda
moritz can confirm it works here too 21:44
21:44 hankache joined
FROGGS nice 21:45
I'll add a nice welcome msg at the end of the installation as diakopter++ suggested, but that'll happen tomorrow
hankache hi FROGGS 21:47
FROGGS hi hankache 21:48
21:48 zakharyas left, bowtie left, wamba joined
hankache FROGGS i updated 2 weeks back docs/perl6intro.pdf on the master branch of rakudo/star 21:49
FROGGS can you use this version instead of the one in the release branch?
FROGGS the one in master is the updated one.
FROGGS sure, will do 21:50
21:50 bowtie joined
hankache thanks FROGGS++ 21:50
FROGGS ***ALL*** - MS Windows® Rakudo Star release candidate available, please test: froggs.de/perl6/rakudo-star-2016.01...0(JIT).msi 21:53
21:53 [Tux] left
FROGGS gnight 21:55
21:55 FROGGS left 21:57 dfcarpenterak left
moritz sleep well FROGGS++ 21:59
22:00 muraiki left 22:05 [Tux] joined 22:08 pmurias_ joined 22:11 pmurias left 22:13 laz78 left 22:15 pmurias_ is now known as pmurias, laz78 joined, laz78 left
pmurias is there any reason for using --/tests instead of --no-tests? 22:15
(in zef)
jdv79 isn't the convention --no$thing ? 22:16
perlpilot probably becuase rakudo's command line parser doesn't grok --no-tests, but it does grok --/tests ? 22:17
That would be my guess anyway
22:18 hankache left
pmurias --/$options seems really alien 22:18
22:19 sftp left
leont Yeah 22:19
perlpilot ++foo .... ++/foo is pretty alien too 22:20
22:21 sftp joined
jdv79 is that doc'd anywhere? 22:21
perlpilot It's in one of the synopses .... S19 I think 22:22
yeah, S19
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 design.perl6.org/S19.html#Options_and_Values
jdv79 oh, its in s06 22:24
nice
perlpilot oh, S06 too (makes sense since MAIN is a routine :)
Skarsnik good night #perl6 22:29
jdv79 cya
22:29 Skarsnik left
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
22:31 cpage_ left
leont I have no idea on what a good 6ish interface would be like yet, though 22:31
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
jdv79 i keep meaning to try it
hoelzro er, MAIN_HELPER
22:33 nige1 left
perlpilot hoelzro: MAIN_HELPER is alien to P6, it should be MAIN-HELPER ;-) 22:33
hoelzro perlpilot: agreed, we just need to change it =)
that way, you keep the sixey MAIN, but you get Getopt-friendly argument processing 22:34
best of both worlds =)
leont: ↑
22:34 apathor joined
leont Interesting… 22:34
perlpilot indeed.
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
hoelzro does a lot of thinking about writing things 22:36
jdv79 isn't MAIN special? you'd have to grab the old one and replace it, no? 22:37
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
hoelzro zostay: you can always ping me, even if I'm not active =)
I'm always lurking, but my activity varies wildly =)
zostay: if you post the exact source that's abort()ing for you, I'd be happy to take a look
jdv79 but when one runs "perl6 foo.p6" and foo.p6 has a MAIN that get's called, right? 22:39
*gets
hoelzro jdv79: yes; all because rakudo calls MAIN_HELPER to call MAIN ;)
well, rakudo sets up a call to MAIN_HELPER, which in turn calls MAIN
jdv79 oh, i didn't know MAIN_HELPER was a thing. nice.
22:39 RabidGravy left
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
exactly 22:40
I did a PoC on it a week or so ago
perlpilot It should be a spec thing though.
ugexe but if you have 2 modules that do that it doesnt work
hoelzro perlpilot: I completely agree
ugexe so you cant have like a pluggable app that adds commands that sho wup in usage
hoelzro ugexe: yeah, that's tricky
although you can have a single MAIN_HELPER impl be smart about looking at multi candidates 22:41
and inspecting their signatures for things
jdv79 sounds magically complicated
hoelzro it's complicated for the implementor so that the user can benefit 22:42
sound familiar? =P
MAIN_HELPER is responsible for taking @*ARGS and calling MAIN; whatever else you add is up to you
zostay hoelzro: the exact source that's aborting is here, if you run this test: github.com/zostay/HTTP-Supply/blob...http-1.0.t 22:43
hoelzro zostay: thanks, I'll have a look later tonight
22:44 musiKk left 22:45 properly joined 22:46 lichtkind left
hoelzro here's a quick exmaple of a MAIN_HELPER module: gist.github.com/hoelzro/7fd925b4f4617a5c46b5 22:47
apologies for the sloppiness
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:48
hoelzro noted =) 22:49
properly Plse help, from rosettacode 'update a configuration file' we have this line: %changes.=map({; .key.uc => .value }); 22:50
diakopter oh hey Andrew
zostay you, sup matt?
er.. yo
properly Without the initial semicolon in the code block, get this: Method 'count' not found for invocant of class 'Hash'
jdv79 the semi is disambiguating the {} into a code block. without it seems its a hash constructor. 22:51
:(
well, forcing maybe is a better term
perlpilot what's with the :( ?
properly Works by using $^A ie {$^a.key.uc => $^a.value}
jdv79 or -> too, right?
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
properly ok disambiguates
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
properly tk you
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 22:59 cpage_ left
jdv79 it just feels like a p5 style of issue to me 23:00
23:02 cpage_ joined 23:04 lnrdo joined 23:06 ely-se left 23:11 flaviusb left 23:13 lostinfog left 23:15 pmurias left
hoelzro zostay: does that test always abort? 23:15
23:16 firstdayonthejob left
hoelzro zostay: also, which OS is this on? 23:16
23:22 properly left
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:24
23:27 mprelude joined 23:37 lnrdo left, lnrdo joined 23:42 lnrdo left
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.