Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 skrshn joined #perl6
00:06 telex joined #perl6
00:10 pnu joined #perl6
00:10 jnap joined #perl6
00:10 kanishka joined #perl6
00:12 kent\n joined #perl6
00:12 TEttinger joined #perl6
00:13 Spot__ joined #perl6
00:15 mrsolo joined #perl6
00:16 BuildTheRobots joined #perl6
00:16 caasih joined #perl6
00:17 pnu joined #perl6
00:19 kent\n joined #perl6
00:23 ugexe joined #perl6
00:25 vendethiel joined #perl6
00:25 ugexe install of perl6 module from jdv's metacpan clone: https://gist.github.com/ugexe/9f382c8595226aa9bae0
00:42 ZoffixWin w00t! awesome :D
00:42 wamba joined #perl6
00:46 pnu joined #perl6
00:52 vendethiel joined #perl6
00:57 a3r0 joined #perl6
01:02 Actualeyes joined #perl6
01:04 labster joined #perl6
01:06 krakan joined #perl6
01:11 yeahnoob joined #perl6
01:13 AlexDaniel “Internal error: zeroed target thread ID in work pass” hmm
01:20 geekosaur we already have a few reports of that?
01:30 AlexDaniel geekosaur: ah, ok then
01:31 AlexDaniel I just ran it again and it worked. Weird thing
01:35 cdg joined #perl6
01:35 labster joined #perl6
01:40 ugexe i get them randomly too. usually related to run()
01:50 pierrot joined #perl6
01:55 vendethiel joined #perl6
01:55 ely-se .tell masak I started working on the type concatenative thing again, got the arity part of type inference working now: https://gist.github.com/rightfold/9​e9ba03a02ea4ac3d60f#file-js-L38-L53
01:55 yoleaux ely-se: I'll pass your message to masak.
01:55 ely-se .botsnack
01:55 yoleaux :D
01:59 pierrot_ joined #perl6
02:02 sortiz joined #perl6
02:02 xpen joined #perl6
02:04 ely-se .tell masak well, to some extent :p
02:04 yoleaux ely-se: I'll pass your message to masak.
02:07 BenGoldberg joined #perl6
02:09 BenGoldberg joined #perl6
02:20 vendethiel joined #perl6
02:33 abaugher joined #perl6
02:36 psy_ joined #perl6
02:47 vendethiel joined #perl6
02:56 timotimo here's a fun bug for you:
02:56 timotimo m: my Int:D @foo; say @foo[1]
02:56 camelia rakudo-moar a5fe34: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/iofmqLuglf line 1␤␤»
02:56 timotimo whoever wants to can file that in RT
02:58 azawawi joined #perl6
02:58 azawawi good morning #perl6
02:59 azawawi http://pasteboard.co/1dCMZs5g.png   # More image effects implemented
03:09 AlexDaniel azawawi: nice. What's the module?
03:09 kid51_ joined #perl6
03:10 azawawi https://github.com/azawawi/perl6-magickw​and/blob/master/examples/02-effects.pl6 # MagickWand
03:12 AlexDaniel azawawi++
03:12 AlexDaniel azawawi: thanks
03:12 azawawi thx
03:13 AlexDaniel azawawi: what is $o in in $o.cleanup example?
03:13 AlexDaniel in README.md
03:13 AlexDaniel was it meant to be $wand ?
03:14 azawawi think of it as a handle to an image
03:14 azawawi or multiple images
03:15 azawawi because you could for example add multiple images and then create an animated gif
03:15 azawawi or an AVI or MP4 movie via ffmpeg
03:16 azawawi it is really a powerful api
03:17 AlexDaniel azawawi: I'm not sure if I'm folliwing it. Should the example actually show something that does not compile?
03:18 AlexDaniel or perhaps consider adding a comment like # $o is a handle to some image
03:18 azawawi sure i will update it
03:18 azawawi https://github.com/azawawi/perl6-magick​wand/blob/master/examples/01-hello.pl6
03:19 azawawi i will add a user guide after finishing 02-effects.pl6
03:19 azawawi https://github.com/azawawi​/perl6-magickwand/issues/1
03:20 raiph joined #perl6
03:22 AlexDaniel azawawi: why nobody made it earlier?
03:22 AlexDaniel :)
03:22 azawawi AlexDaniel: i see what you mean... yes $o.cleanup should be $wand.cleanup
03:24 azawawi AlexDaniel: help is welcome :)
03:24 azawawi AlexDaniel: i started this project like 10 days ago
03:26 AlexDaniel azawawi: yeah, I see. Well, earlier I was doing that kind of stuff through 「run」 and command line tools, so… as soon as I rewrite my code you'll possibly see some bug reports. But that takes time :)
03:28 MadcapJake Anyone interested in joining (i.e., helping grow) the Perl 6 Slack community? Get an invite here: http://perl6.bestforever.com/
03:28 azawawi im learning imagemagick as i wrap more OO sugar around it :)
03:28 azawawi MadcapJake: what's that?
03:28 azawawi MadcapJake: and hi :)
03:28 MadcapJake hi!
03:29 MadcapJake It's a new communication tool that some other languages/devs use: https://slack.com
03:30 llfourn m: say :("foo") ~~ :("bar")
03:30 camelia rakudo-moar a5fe34: OUTPUT«True␤»
03:30 llfourn :S
03:31 MadcapJake I created one for Perl 6 as a community to grow adoption and it really has some cool features (unfortunately no Slack evalbot yet)
03:32 AlexDaniel MadcapJake: if you bridge it to IRC then perhaps you can filter messages with m: and other commands
03:32 AlexDaniel MadcapJake: this way camelia will reply to your bot
03:32 Hotkeys is there a hash type in which order matters?
03:32 MadcapJake AlexDaniel: yeah I can, I'll need to make a bot for that too, so I was thinking making a server app that does both
03:33 MadcapJake plus current evalbot is written in Perl 5 :)
03:33 AlexDaniel MadcapJake: that would mean rewriting camelia, which is probably not cool
03:34 azawawi MadcapJake: joined
03:34 noganex_ joined #perl6
03:34 MadcapJake azawawi++
03:36 danzulla joined #perl6
03:36 MadcapJake AlexDaniel: yeah it would be, but I was thinking I'd write it in Perl 6 and using supplies and taps.  Zoffix wrote an irc bot tutorial that will help too.
03:37 danzulla oh perl6 is actually working nowadays?
03:37 sortiz timotimo, The bug reduces to "<Type>:U.gist" or "<Type>:D.gist", will give a try.
03:37 MadcapJake o_0
03:37 danzulla i used to learn perl5 with chatbots, years ago. i loved it.
03:37 MadcapJake it might be slow, but won't know unless i try xD
03:38 AlexDaniel danzulla: by “actually working” you mean?
03:38 danzulla i got rakudo and some CPAN stuff that claimed to implement perl6. it never seemed to be "official"
03:38 AlexDaniel danzulla: because to me it was “actually working” for a few years now
03:38 danzulla but i might have been just a stupid slave to perl online marketing
03:39 MadcapJake danzulla: have you used panda yet?
03:39 danzulla nope
03:39 danzulla what's panda?
03:39 MadcapJake oh then you are definitely out of date
03:39 MadcapJake panda is the current defacto module installer for rakudo
03:40 MadcapJake rakudobrew is the easiest method atm to install a full working suite of moarvm,nqp,rakudo,panda,Task::Star (that last one is a collection of useful modules to get you started)
03:40 danzulla did you guys write anything meaningful in perl6? i'd love to take a look.
03:41 MadcapJake http://modules.perl6.org/
03:41 danzulla hah
03:41 Sgeo_ joined #perl6
03:41 Juerd danzulla: Yes, I write several kinds of one-off scripts in Perl 6 now. Mostly just to figure out how everything works.
03:42 Juerd danzulla: Eventually I expect to use Perl 6 in production, and I want to get to know the language well before that :)
03:43 Juerd One issue for me is that we tend to run high traffic web stuff on small and cheap virtual servers, and Perl 6 is still rather memory hungry and slowish. But it's improving.
03:43 danzulla It'd be interesting to see some Perl6 job offerings.
03:44 Juerd A simple script taking 300 MB of memory is a problem for me, given that most of the "machines" I work with, have 512 MB of RAM :)
03:44 danzulla @Juerd: Is Perl6 JIT or is there an Ahead of Time compiler as in Google Go already?
03:44 danzulla Or is somebody working on it?
03:45 danzulla That's what I really like about Go.
03:45 Juerd danzulla: I'm not familiar with the details but I believe Perl 6 has a JIT.
03:46 AlexDaniel it has JIT, but a bunch of optimizations are done without JIT :)
03:46 danzulla @Juerd: Seems like you have some experience with Perl6 on VMs. Which is useful.
03:46 Juerd danzulla: Not really, I've only used Perl 6 on my own computer so far
03:47 AlexDaniel danzulla: that being said, some things are relatively slow right now. 2016 is supposed to be a big year for Perl 6 speed
03:47 AlexDaniel danzulla: earlier efforts were focused on other things
03:47 AlexDaniel e.g. getting things to work correctly
03:47 Juerd Or getting things to work at all :)
03:48 Juerd Good night everyone :)
03:48 Juerd z &
03:56 spags joined #perl6
04:03 sortiz m: Int:D.gist
04:03 camelia rakudo-moar a5fe34: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/3vJXmqV_i_ line 1␤␤»
04:06 M-eternaleye joined #perl6
04:07 cdg joined #perl6
04:07 llfourn sortiz: mmm probably worth RTing
04:08 geekosaur I thought that was in response to the earlier RT
04:08 * llfourn I havae no idea
04:08 sortiz llfourn, I have a proposed patch, PRing :)
04:09 Zero_Dogg joined #perl6
04:09 Zero_Dogg joined #perl6
04:09 llfourn sortiz: nice!
04:09 geekosaur mm, no, that was in here, not an RT
04:09 geekosaur so it probably should be
04:09 geekosaur danzulla, brrt has been working on JIT for moarvm
04:12 sortiz llfourn, Now in PR#701
04:13 llfourn sortiz: you might want to write a test or two like is Str:D.gist,'Str:D' in roast
04:15 sortiz llfourn, I'll search for the proper place.
04:17 skids BTW, anyone know how to send a PR when you have write access?  Sometimes I don't want to push roast tests just leave a PR to accompany the rakudo PR.
04:17 Hotkeys is there a better way to write this http://i.imgur.com/85ap9tV.png
04:17 Hotkeys er
04:17 Hotkeys pretend that's a hash
04:17 Hotkeys typo
04:18 llfourn skids: same as usual just push to your roast branch
04:18 llfourn your roast fork*
04:18 skids Last time I tried that I think it auto-merged the PR when I made it.  Maybe I a miremembering.
04:19 llfourn sortiz: I think S04-declrations/smiley.t is a good place
04:19 skids m: if 42 -> $a { say $a }
04:19 camelia rakudo-moar a5fe34: OUTPUT«42␤»
04:19 skids Hotkeys: ^^
04:19 llfourn skids: well I have write and I do it all the time :) https://github.com/perl6/roast/pull/100
04:22 skids Maybe I'll try again sometime with something harmless
04:24 llfourn after googling it looks like there is no automerging feature maybe someone just had a trigger merge finger
04:26 Hotkeys skids: I decided to do it this way, is this reasonable http://i.imgur.com/GEk2H4i.png
04:29 skids Hotkeys: sure, if die is what you want.  You'd use the if block if you anticipate wanting to edit before/after the call to yaml2qtree while still knowing it is defined.
04:30 Hotkeys die is what I want I'd say, this is just a script that takes a yaml file formatted a certain way
04:30 Hotkeys so if it isn't formatted right it might as well die
04:30 Hotkeys formatted right -> isn't a tree
04:34 labster joined #perl6
04:34 Hotkeys er
04:34 Hotkeys is a tree
04:50 Hotkeys any idea what might be going on here http://i.imgur.com/mPWbcd1.png
04:51 Hotkeys I feel like one of the signatures totally matches
04:53 skids The signature :(Hash %h) means a Hash of Hashes.
04:53 Hotkeys oh
04:53 Hotkeys how do I do a hash of anythings
04:53 skids Do you really care that it is a Hash, or will any Associative do?
04:54 Hotkeys multi yaml2qtree (Hash %h) { ... } is what the declaration looks like
04:54 Hotkeys I assumed it meant it took a hash
04:54 skids just :(%h) will take any Associative, which is probably good enough.
04:54 Hotkeys ah
04:54 geekosaur % already means hash (or at leasr Associative)
04:54 Hotkeys okay
04:56 Hotkeys great thanks, all is working now
04:56 skids (Note that Array @a is also an Array of Arrays)
05:00 Hotkeys Right I did that too
05:00 Hotkeys http://i.imgur.com/BRQOTE5.png woo
05:01 Hotkeys it isn't much
05:01 Hotkeys but it's the first thing I've actually used perl 6 for besides various programming puzzles etc.
05:01 skids congrats :-)
05:05 vendethiel joined #perl6
05:09 llfourn does anyone know what this nqp::scwbenable() means?
05:09 skids I am guessing "serialization context write barrier"
05:10 llfourn skids: thanks. What's a write barrier?
05:10 skids It's a mechanism to keep data syncronized between threads.
05:11 llfourn ah ok. I guess that's all I need to know :)
05:12 Hotkeys skids: yep you're right
05:12 Hotkeys just did a quick scouring of the repo
05:13 Hotkeys first to figure out the wb and then the sc
05:32 CurtisOvidPoe joined #perl6
05:40 pochi_ joined #perl6
05:40 jameslen_ joined #perl6
05:41 sQuEE joined #perl6
05:41 Gruber joined #perl6
05:42 Cabanossi joined #perl6
05:42 colomon_ joined #perl6
05:44 labster1 joined #perl6
05:44 cognominal joined #perl6
05:44 ilmari_ joined #perl6
05:45 kst` joined #perl6
05:45 Quom joined #perl6
05:45 perigrin_ joined #perl6
05:45 zostay_ joined #perl6
05:45 Jonis_ joined #perl6
05:45 bhm joined #perl6
05:45 Rotwang_ joined #perl6
05:45 Ulti_ joined #perl6
05:45 cosimo joined #perl6
05:45 hoelzro_ joined #perl6
05:45 jojotus_ joined #perl6
05:45 broquain1 joined #perl6
05:45 nowan_ joined #perl6
05:47 xpen joined #perl6
05:47 edenc_ joined #perl6
05:48 gensym_ joined #perl6
05:48 roguelazer_ joined #perl6
05:48 musca` joined #perl6
05:51 moznion joined #perl6
05:56 simcop2387 joined #perl6
05:56 mtj_ joined #perl6
05:58 azawawi http://pasteboard.co/1dOtczQb.png # like 95% of the effects done in Perl 6 :)
05:59 flaviusb joined #perl6
06:09 protium joined #perl6
06:18 cdg joined #perl6
06:19 skarn joined #perl6
06:27 AlexDaniel m: my @l; if True { my @l.push: 42 }
06:27 camelia rakudo-moar a5fe34: ( no output )
06:27 AlexDaniel just had this in my code…
06:28 AlexDaniel now I'm wondering, how does it work?
06:28 AlexDaniel m: my @l; if True { my @l.push: 42; say @l }; say @l
06:28 camelia rakudo-moar a5fe34: OUTPUT«[42]␤[]␤»
06:28 AlexDaniel so I can decleare variables like this??
06:29 AlexDaniel declare*
06:29 AlexDaniel m: my @l.push: 42; say @l
06:29 camelia rakudo-moar a5fe34: OUTPUT«[42]␤»
06:29 llfourn apparently!
06:30 AlexDaniel O_o
06:30 nakiro joined #perl6
06:32 AlexDaniel what's the practical use for this?
06:35 sjoshi joined #perl6
06:38 AlexDaniel “Error in `/home/alex/.rakudobrew/mo​ar-nom/install/bin/moar': double free or corruption (fasttop): 0xec9d8eb0” – woops!
06:44 _Gustaf_ joined #perl6
06:48 _Gustaf__ joined #perl6
06:56 sortiz AlexDaniel, A declaration is a term and can be used as such:
06:56 sortiz m: say: class A { has $.a; }.new(:a<3>).a
06:56 camelia rakudo-moar a5fe34: ( no output )
06:57 dolmen joined #perl6
07:06 CIAvash joined #perl6
07:15 cibs joined #perl6
07:17 [Tux] test            22.663
07:17 [Tux] test-t          12.419
07:21 milwaukee joined #perl6
07:24 milwaukee o/ all, I must be doing something seriously wrong cause I've run into something I can't find anything about online.
07:25 milwaukee ~/.radukobrew has disappeared from all of my shells. Thunar and Emacs can browse it just fine, but bash and zsh both cannot cd into it for whatever reason.
07:36 domidumont joined #perl6
07:40 domidumont joined #perl6
07:44 firstdayonthejob joined #perl6
07:45 FROGGS joined #perl6
07:46 FROGGS o/
07:50 avenj joined #perl6
07:53 FROGGS donaldh++ # rakudo/pull/697
07:59 domidumont joined #perl6
08:02 abraxxa joined #perl6
08:03 ggoebel15 joined #perl6
08:07 ecocode joined #perl6
08:08 kurahaupo joined #perl6
08:10 ecocode hi. Which module should I use to read/write to a serial device ? I need to be able to specify parity/baudrate..
08:12 * kurahaupo listens intently, wanting an answer to the same question. posix-something.tcsetattr perhaps?
08:13 cosimo I should think about porting Device::Modem to perl6 perhaps :)
08:13 RabidGravy joined #perl6
08:14 vendethiel joined #perl6
08:15 darutoko joined #perl6
08:39 sno joined #perl6
08:43 rindolf joined #perl6
08:48 kurahaupo joined #perl6
08:49 kanishka joined #perl6
08:56 krshn joined #perl6
08:59 kurahaupo_ joined #perl6
08:59 ecocode cosimo: that would help me :)
09:01 ecocode porting Device::SerialPort would be sufficient though
09:02 masak good antenoon, #perl6
09:02 yoleaux 01:55Z <ely-se> masak: I started working on the type concatenative thing again, got the arity part of type inference working now: https://gist.github.com/rightfold/9​e9ba03a02ea4ac3d60f#file-js-L38-L53
09:02 yoleaux 02:04Z <ely-se> masak: well, to some extent :p
09:02 masak ely-se: wow, cool
09:02 cosimo ecocode: of course, Device::SerialPort does the real work there. How could I forget? :)
09:03 ecocode I've checked Device::SerialPort and there is some XS code envolved :/
09:04 cosimo ecocode: yeah, not the easiest beast to deal with
09:04 ecocode I wish I had the knowledge to port it
09:06 RabidGravy ecocode, gwan do it, saves me from doing it
09:06 ecocode I wrote a perl5 app to scrape info from the net and from custom serial devices. I used anyevent for the event loop, but perl6 promises looks so much nicier to handle async
09:08 ecocode hmmm.. Device::SerialPort isn't listed on https://github.com/perl6/perl6-most-wan​ted/blob/master/most-wanted/modules.md !
09:09 RabidGravy a lot of the XS in Device::SerialPort is just a wrapper to deal with certain cross platform issues, however because Perl 6 doesn't have fcntl, ioctl or a raw open there would be more NativeCall code
09:11 dakkar_ joined #perl6
09:11 RabidGravy still, not too difficult if one is sufficiently motivated
09:11 ecocode :)
09:14 spebern joined #perl6
09:14 wamba joined #perl6
09:14 spebern left #perl6
09:23 espadrine_ joined #perl6
09:30 Perleone_ joined #perl6
09:35 crux joined #perl6
09:43 pmurias joined #perl6
09:44 khagan_ joined #perl6
09:49 kjs_ joined #perl6
09:52 vendethiel joined #perl6
09:52 pierrot joined #perl6
09:54 zakharyas joined #perl6
09:54 |Tux| joined #perl6
09:56 lnrdo_ joined #perl6
09:58 lnrdo_ joined #perl6
09:58 burnersk joined #perl6
10:06 pmurias hi
10:07 pmurias my JavaScript backend for Rakudo grant application is up for community review: [Act: 1]
10:07 pmurias http://news.perlfoundation.org/2016/0​2/ian-hague-perl-6-grant-applica.html
10:08 llfourn pmurias: another one?
10:09 arnsholt No, another compiler
10:09 arnsholt AFAIK pmurias has been working on a JS backend for NQP only so far
10:11 FROGGS "Improve the JavaScript backend from handling NQP (Not Quite Perl) to full Perl 6."
10:11 El_Che can someone point to the latest rakudo rc?
10:11 llfourn anyway ++ from me, I wasn't sure because I thought I saw one like this a month ago
10:13 FROGGS El_Che: http://rakudo.org/downloads/rakudo/
10:17 El_Che ah, ok, I was under the impression that there was a RC2
10:25 FROGGS El_Che: I did a rakudo star RC2
10:27 pmurias joined #perl6
10:28 pmurias llfourn: you might have seen a pre-submission draft of the grant proposal ;)
10:29 llfourn pmurias: ah that explains it. Anyway this time I will read it. pmurias++
10:39 fireartist joined #perl6
10:42 domidumont joined #perl6
10:42 nebuchadnezzar joined #perl6
10:42 matt_ joined #perl6
10:42 eiro joined #perl6
10:57 vendethiel joined #perl6
11:01 leont joined #perl6
11:01 iH2O joined #perl6
11:01 lnrdo_ joined #perl6
11:02 iH2O great room lol
11:08 iH2O :)
11:14 nowan joined #perl6
11:16 rurban joined #perl6
11:19 lnrdo_ joined #perl6
11:19 bowtie joined #perl6
11:23 lokien_ joined #perl6
11:26 Skarsnik joined #perl6
11:29 kaare__ joined #perl6
11:39 donaldh joined #perl6
11:47 RabidGravy What is "No concretization found for Foo" trying to tell me?
11:48 El_Che my $p = run 'false'; say $p.exitcode; $p = run 'false', :out; say $p.exitcode
11:48 El_Che damn
11:48 El_Che m: my $p = run 'false'; say $p.exitcode; $p = run 'false', :out; say $p.exitcode
11:48 camelia rakudo-moar a5fe34: 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/OHwB4sTs5s line 1␤␤»
11:48 El_Che ok
11:48 El_Che it output 1 and 0
11:48 donaldh pwd
11:48 moritz El_Che: at the very least you must close $p.out
11:48 * donaldh ahem
11:49 El_Che moritz: sure, if you like explosions
11:49 vendethiel joined #perl6
11:49 El_Che $p = run 'false', :out; $p.out.close -> boom
11:49 El_Che The spawned process exited unsuccessfully (exit code: 1)
11:51 iH2O left #perl6
11:51 El_Che that seems to be by design, but it results in a chicken-and-egg problem: no way to check the exitcode
11:52 ely-se joined #perl6
11:52 ely-se hello world
11:54 jnthn ely-se: And if you try $p.out.close, then look at $p.exitcode?
11:54 jnthn oops
11:54 jnthn El_Che: ^^
11:54 El_Che jnthn: boom
11:54 jnthn The try fails to catch the exception?
11:54 El_Che now building rc1, but I don't think it has changed
11:55 El_Che in summary: an run fail (non zero) will:
11:55 El_Che - closing out: boom
11:55 El_Che - checking exitcode without closing out == 0
11:56 El_Che of course you can wrap stuff with try-catch blocks, but you will never be able to get the correct exitcode
11:56 El_Che (in case the application uses relevant exitcode, pretty common in unix)
11:57 jnthn El_Che: You still don't seem to have tried why I suggested.
11:57 jnthn *what
11:57 El_Che ok, rereading what you wrote
11:58 RabidGravy it does fail irrespective of a try
11:58 jnthn OK, that's very odd.
11:58 jnthn What is $p.out.close doing that's not catchable?!
11:59 RabidGravy the Pipe seems otherwise okay
11:59 El_Che because p6 is still lacking modules, shelling out will be pretty common in the beginning. Hence my whining :)
12:00 kid51 joined #perl6
12:01 nine nine@sunshine:~> perl6 -e 'my $p = run "false", :out; $p.out.close; CATCH { default { say "cought" } }'
12:02 nine cought
12:02 nine Looks fine to me?
12:02 jnthn nine: Does this work for you: `my $p = run "false", :out; try $p.out.close; say $p.exitcode`
12:02 El_Che nine: my point is not that it isn't catchable. But that the exitcode is lost
12:04 RabidGravy the Proc status is set by .close from the return from nqp::closefh_i which appears to crap out in some uncatchable way
12:05 * leont is confused, why would it need to throw an exception
12:05 jnthn RabidGravy: Yeah, managed to reproduce that here too
12:05 jnthn Very odd
12:05 bowtie_ joined #perl6
12:08 RabidGravy and closefh_i is a straight up moar op so I'll stop looking there
12:09 Skarsnik joined #perl6
12:09 Skarsnik Hello
12:10 El_Che \o/ (for the reproducible part)
12:18 cognominal joined #perl6
12:24 Skarsnik When changing somehting in src/core/ I have to make again?
12:25 FROGGS Skarsnik: just 'make install'
12:26 FROGGS no configure needed, unless you add files to src/, which also means you need to add stuff to the Makefile.in files for moar and jvm
12:27 Skarsnik I am changing how Usage display stuff for main. Like put the slurpy at the end instead of before the positionnal
12:28 FROGGS yeah, just make install
12:28 Skarsnik because foo --a --b [...slurpy] hello bar
12:28 Skarsnik make no sense
12:31 rindolf joined #perl6
12:32 Skarsnik Also I want to change the order of display for the arguments help. it use a hash so it's displayed in a 'random' order. should I sort like by alphebetic order or keep the order in MAIN signature?
12:32 perlawhirl joined #perl6
12:32 moritz either makes sense
12:33 moritz and either is better than random ordering
12:33 Skarsnik I should look at the spec x)
12:35 perlawhirl El_Che: it's not much consolation for proc that exit without sending anything to stderr... but for ones that do, you catch :err and check for output, ie: run('proc', :out, :err); if $proc.err.lines { ... }
12:35 st_iron joined #perl6
12:35 perlawhirl thats how i've worked around it.
12:35 st_iron hi
12:35 Skarsnik whelp there is nothing x)
12:39 gfldex m: say "Hi st_iron!"
12:39 camelia rakudo-moar a5fe34: OUTPUT«Hi st_iron!␤»
12:40 Skarsnik ah interesting Pod error? sub MAIN( $hello #= the hello arg     the doc get attached to MAIN and not hello
12:40 st_iron m: say "Greetings!"
12:40 camelia rakudo-moar a5fe34: OUTPUT«Greetings!␤»
12:41 jnthn Skarsnik: What if you put the , after $hello ?
12:42 * jnthn vaguely recalls the attachment code being in the actino run when parameter is reduced, but we won't have considered the parameter full parsed at that point..
12:43 Skarsnik sub MAIN( $hello, #= the hello arg   do the same
12:43 Skarsnik If I put on the next line it work
12:44 Skarsnik it just surprised me x)
12:45 Skarsnik Usage: testmain.p6 [--all] [--define-enum=<Str>] <header-file> [<gccoptions> ...]  Ok that definitly better at least
12:48 jnthn Skarsnik: Yeah. It may be fixable by moving the attachment logic to param_var. hoelzro is probably the person "in the know" about this :)
12:52 Skarsnik hm, how I can keep a hash (or some an eqv) that keep an ordered based on insertion?
12:55 Skarsnik and my english is aweful today
12:55 kjs_ joined #perl6
12:58 cognominal joined #perl6
13:00 st_iron maybe a stupid idea, but you can put keys in an array
13:00 st_iron that's ordered
13:00 Skarsnik Yes, actually I can maybe use a array of Pair
13:02 juu joined #perl6
13:06 Skarsnik m: my @tab; for ^10 {my $k = ("a".."z").pick; @tab.push($k => $_); say $k }; for @tab -> $v { say $v.key, $v.value}
13:06 camelia rakudo-moar a5fe34: OUTPUT«x␤j␤p␤e␤w␤s␤z␤x␤f␤q␤x0​␤j1␤p2␤e3␤w4␤s5␤z6␤x7␤f8␤q9␤»
13:16 flaviusb joined #perl6
13:21 milwaukee joined #perl6
13:24 hoelzro_ Skarsnik: hmm...interesting bug; I'm surprised roast didn't catch that
13:24 hoelzro_ jnthn is right; attaching docs to params is a bit odd
13:24 * hoelzro has a look
13:25 Skarsnik odd?
13:26 Skarsnik That how the full usage is generated, by using the WHY x)
13:27 [Coke] .
13:29 dolmen joined #perl6
13:29 flaviusb joined #perl6
13:30 hoelzro it'd odd that the doc is attaching to MAIN, I mean
13:30 lizmat joined #perl6
13:30 gfldex m: my Int:D @a; say @a[0];
13:30 camelia rakudo-moar a5fe34: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/b1rcL3md69 line 1␤␤»
13:30 gfldex m: try { my Int:D @a; say @a[0]; CATCH { default { say .^name } } }
13:30 camelia rakudo-moar a5fe34: OUTPUT«X::Method::NotFound␤»
13:31 gfldex that's LTA
13:37 moritz agreed
13:37 [Coke] if I want to cherry pick 8c406bf, do I also need to cherry pick the  merge commit?
13:37 Sgeo joined #perl6
13:37 moritz m: say Int:D
13:37 camelia rakudo-moar a5fe34: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/yr9QJdyGgl line 1␤␤»
13:37 moritz golf'd
13:38 Skarsnik m: say Int:D.^shortname
13:38 camelia rakudo-moar a5fe34: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/mhK2uAmgB4 line 1␤␤»
13:39 gfldex that still leaves the question how autovivication works with Arrays that don't like undefined values.
13:39 vendethiel joined #perl6
13:40 FROGGS gfldex: there should be an exception talking about a missing initializer I guess
13:40 lnrdo joined #perl6
13:41 gfldex .tell TimToady please have a look at http://irclog.perlgeek.de/p​erl6/2016-02-01#i_11972281
13:41 yoleaux gfldex: I'll pass your message to TimToady.
13:41 FROGGS there wont be autoviv, because the constructor of the desired type might require some options
13:43 * [Coke] just skims scrollback
13:44 hoelzro oh, duh.
13:44 hoelzro Skarsnik's bug isn't actually a bug at all
13:45 hoelzro #= attaches to the first declaration on the most recent line to contain a declaration
13:45 hoelzro in sub MAIN($hello,
13:45 hoelzro MAIN is the first decl on the line
13:47 gfldex is there a 6.d wishlist?
13:47 moritz you mean, besides ponies?
13:48 dalek rakudo/2016.01-preparation: 8dff411 | (Andy Weidenbaum)++ | tools/lib/NQP/Configure.pm:
13:48 dalek rakudo/2016.01-preparation: fix parse_revision subroutine regex
13:48 dalek rakudo/2016.01-preparation:
13:48 dalek rakudo/2016.01-preparation: - compare release candidate versions, e.g. 2016.01-RC1
13:48 dalek rakudo/2016.01-preparation: - use extended p5 regex for readability
13:48 dalek rakudo/2016.01-preparation: - quiet warnings when regex captures undefined
13:48 dalek rakudo/2016.01-preparation: review: https://github.com/rakudo/rakudo/commit/8dff4111d4
13:48 dalek rakudo/2016.01-preparation: fb743c6 | coke++ | docs/announce/2016.01.md:
13:48 dalek rakudo/2016.01-preparation: Thank author of last minute commit
13:48 dalek rakudo/2016.01-preparation: review: https://github.com/rakudo/rakudo/commit/fb743c6a7b
13:51 [Coke] (computer mediated communication) (irc ugly) this is why I still use an alternative my classmates at RPI came up with 20+ years ago on a daily basis that doesn't even support latin-1, because it's nicer than IRC.
13:51 [Coke] (of course, it's only got a relatively tiny community on it.)
13:53 SCHAAP137 joined #perl6
13:54 wamba joined #perl6
13:58 [Coke] gfldex: no, there is not, but there are already people asking how they can submit their wishlist items.
13:59 [Coke] I think once jnthn++'s notes on how he thinks releases should be done come out, we can put up a workflow of sorts for what might get included in 6.d and what it'll look like before 6.d is actually released.
13:59 jnthn We could have an RT meta-ticket for the wishlist
13:59 Actualeyes joined #perl6
13:59 jnthn (Where individual feature requests are RTs)
13:59 [Coke] in the meantime, a discussion on the  mailing list might work; a pull request if you've alredy got it mapped out (and we will probably have you change it at some point once we figure out what it should look like)
13:59 [Coke] or an R... what jnthn said.
14:00 jnthn I also found that using a gist as a request for input worked fairly well
14:00 gfldex jnthn: i would prefer a .md in mu on github to keep the wishlist items in one spot. That may help greatly with duplicated items.
14:01 [Coke] Oh. jnthn, we also need to add a version field to the basic info.
14:01 [Coke] (on RT)
14:03 [Coke] We can add 6.c/6.d for now? Anyone think we need other values, or that it's not worth adding?
14:03 jnthn [Coke]: What's the purpose of it?
14:03 jnthn (Just want to make sure we're not confusing compiler/language version.)
14:03 [Coke] I guess if everything is in the same binary, not much?
14:04 jnthn Aye. Having a way to tag tickets with compiler backend/version otoh may help.
14:04 jnthn We already have backend iirc
14:04 [Coke] but it would give us a way to say "these are issues that need to be fixed in 6.c" vs. "these are for discussion in an upcoming 6.d"
14:04 jnthn *nod*
14:04 [Coke] jnthn: platform, tag, vm
14:05 * jnthn is busily working on said verioning/release notes, btw :)
14:05 skids joined #perl6
14:06 cdg joined #perl6
14:08 tadzik ...am I the only one who completely missed the news about possible gravitation waves discovery?
14:08 nine err....no?
14:09 tadzik oh, goood :)
14:09 geekosaur ...nope
14:09 nine Well ok, I've read about rumors. But those come and go
14:10 [Coke] jnthn: we can always use [**] in a subject line. Or just close more tickets, I guess. :)
14:11 perlpilot joined #perl6
14:11 molaf joined #perl6
14:25 st_iron joined #perl6
14:28 ZoffixW joined #perl6
14:28 ZoffixW Is there a way to unflatten this so that the two say()s are the same?
14:28 ZoffixW m: 'ABC'.lc.say; 'ABC'.map({slip .lc}).say;
14:28 camelia rakudo-moar a5fe34: OUTPUT«abc␤(abc)␤»
14:28 ZoffixW m: 'ABC'.lc.say; 'ABC'.map({slip .lc}).Slip.say;
14:28 camelia rakudo-moar a5fe34: OUTPUT«abc␤(abc)␤»
14:29 hoelzro m: role R { has $!thing }; class C does R { method foo { $!thing = 17 } }; C.new.foo
14:29 camelia rakudo-moar a5fe34: ( no output )
14:29 ZoffixW hm, I guess hyper op can do it
14:29 ZoffixW m: 'ABC'.lc.say; 'ABC'.map({.lc})».say;
14:29 camelia rakudo-moar a5fe34: OUTPUT«abc␤abc␤»
14:29 ZoffixW never mind :P
14:29 hoelzro ↑ should classes be able to access a private attribute declared by a role they consume?
14:30 moritz hoelzro: yes
14:30 hoelzro ah, ok; I just couldn't find that in S12
14:30 moritz it was a long matter of dispute
14:31 jnthn Well, it's in S14 if anywhere, and falls under the "behaves as if it was declared in the class the role was composed into" rule
14:31 moritz there was a time when rakudo would disallow it, but declaring the same private attribute again in the class would lead to collision
14:31 hoelzro ahhhh
14:31 hoelzro that makes sense
14:31 hoelzro thanks all(<moritz jnthn>)!
14:32 raiph joined #perl6
14:35 nebuchadnezzar joined #perl6
14:37 ZoffixW hm
14:37 ZoffixW m: 'ABC'.&( -> ($self, $who = 'Anonymous') {"Know your $self, $who!"} ).say;
14:37 camelia rakudo-moar a5fe34: OUTPUT«Too few positionals passed; expected 1 or 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/TyrxGz_0G7 line 1␤␤»
14:37 ZoffixW m: 'ABC'.&("Know your $self!").say;
14:37 camelia rakudo-moar a5fe34: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FxWr4YZ8Bn␤Variable '$self' is not declared␤at /tmp/FxWr4YZ8Bn:1␤------> 3'ABC'.&("Know your 7⏏5$self!").say;␤»
14:38 ZoffixW m: 'ABC'.&("Know your " ~ *).say;
14:38 camelia rakudo-moar a5fe34: OUTPUT«Know your ABC␤»
14:38 ZoffixW Is there a way to shove in a signature in such a construct somehow?
14:39 gfldex m: 'ABC'.&(-> Str $s {"Know your " ~ $s}).say;
14:39 camelia rakudo-moar a5fe34: OUTPUT«Know your ABC␤»
14:39 gfldex ZoffixW: i just pointyed you in the right direction
14:40 ZoffixW gfldex, ah, thanks. I had one too many sets of parens.
14:40 ZoffixW m: 'ABC'.&( -> $self, $who = 'Anonymous' {"Know your $self, $who!"} )('Zoffix').say;
14:40 camelia rakudo-moar a5fe34: OUTPUT«Know your ABC, Zoffix!␤»
14:40 ZoffixW gfldex++
14:53 CIAvash joined #perl6
14:55 raiph joined #perl6
14:56 xpen joined #perl6
14:59 vendethiel joined #perl6
15:00 Zero_Dogg Is there any datatype like a Hash but where the keys are static (ie. you can't add a new key to it after creation) but where the values can be changed?
15:01 gfldex Zero_Dogg: NYI
15:01 Skarsnik hoelzro, Oh ok, It's just confusing
15:01 Skarsnik hoelzro, maybe it should warn?
15:03 jnthn Zero_Dogg: Not built in (at least not for now); probably quite easy to do through a subclass though
15:05 Zero_Dogg gfldex, jnthn: Thanks. I figured I could subclass or even just implement a simple one myself, but that's overkill for the program I wanted to use it in :)
15:07 Juerd Zero_Dogg: Typically, when people want a hash with a fixed set of keys, they want several of those hashes, all with the same structure, and it represents some kind of object. And in those many cases, actual objects are probably better anyway :)
15:07 gfldex m: my %h where { say .^name; True }; %h<a> = 1;
15:07 camelia rakudo-moar a5fe34: OUTPUT«Mu␤Mu␤Int␤Int␤Int␤»
15:08 Juerd Wha, that 'where' gets executed 5 times?
15:08 Skarsnik duh
15:08 gfldex i'm not surprised because i wrote an advent post :)
15:09 Zero_Dogg Juerd: aye, it might even be better in this case, but it's a simple single-file command-line program, right now resting at around 800 lines of code, not really sure it'd be worth it. I'm just passing a bunch of variables around now, which gets a bit ugly
15:09 Juerd Zero_Dogg: Making a class is not much work or code in Perl 6 :)
15:09 moritz Zero_Dogg: classes aren't very verbose
15:10 jnthn Especially when you can has ($.a, $.b, $.c)
15:10 moritz Zero_Dogg: in fact 800 lines is *way* beyond the point where I'd start to use classes
15:10 Juerd m: class Foo { has $.bar; has $.baz; has $.quux; has $.xyzzy }; my $x = Foo.new(bar => 1, baz => 2, quux => 3, xyzzy => 4); say $x.perl
15:10 camelia rakudo-moar a5fe34: OUTPUT«Foo.new(bar => 1, baz => 2, quux => 3, xyzzy => 4)␤»
15:10 moritz (to the degree that such things can be measured in lines of code)
15:11 Zero_Dogg moritz, jnthn: Interesting, guess I'll go look at that then. My brain might still be a bit too stuck in perl5-land.
15:11 Juerd Zero_Dogg: In Perl 5 you had to do a lot of things manually, or pull in a module from CPAN.
15:11 Juerd Zero_Dogg: In Perl 6 you just get very usable objects out of the box. You don't even have to write your own 'new' method ;)
15:12 Zero_Dogg Juerd: woah, not even my own new method, it's like magic ;)
15:12 Juerd That!
15:12 Zero_Dogg guess this is as good a time as any to learn more about perl6 classes then, thanks!
15:12 FROGGS ... magic and unicorns all the way down!
15:12 Zero_Dogg haha
15:12 Juerd Zero_Dogg: Okay, see you in 10 minutes then :)
15:13 Zero_Dogg Juerd: hehe :p
15:13 arnsholt To a first approximation, Perl 6 OO is similar to Moose OO
15:13 Juerd No, really, if you're going to learn only class stuff, not roles, 10 minutes is probably what it takes.
15:13 Zero_Dogg nod, I've used Moose a lot, from what little I've looked at perl6 classes, they are quite familiar
15:13 Juerd If you'd also learn roles, add another 5 minutes if you're already familiar with the concept, or 15 if you need to learn that too ;P
15:14 RabidGravy and roles only take a few seconds more ;)
15:14 arnsholt Which isn't surprising, given that a lot of Moose is inspired by Perl 6 (and related MOP-based OO-systems)
15:14 Juerd I think I understand roles, but I haven't yet used them.
15:14 Juerd My brain's still too much in isa-land.
15:15 Zero_Dogg Juerd: hehe, nice! I'm really liking what I've used of perl6 so far. This one command-line app is my «learning/playing-with-perl6» project
15:15 Skarsnik Nobody working on a websocket async client? (could be useful if we want a slack module probably)
15:15 Juerd I like most things too. And the few things I don't like yet, are being worked on :)
15:16 gfldex m: subset StrictKeys of Str where * eq <I dont need no stinking class>; my %h{StrictKeys}; %h<I> = 1;
15:16 camelia rakudo-moar a5fe34: OUTPUT«Type check failed in binding key; expected StrictKeys but got Str␤  in block <unit> at /tmp/YM3P9fxrGW line 1␤␤»
15:16 Juerd There are some things that I find hard to figure out. I still don't know how to implement automatic reconnects in a program that uses 'react { ... }' and IO::Socket::Async.
15:16 RabidGravy I did find a quirk with role composition today
15:17 Juerd gfldex: any(<...>)?
15:18 gfldex m: subset StrictKeys of Str where * eq any(<I dont need no stinking class>); my %h{StrictKeys}; %h<I> = 1; %h<stinking> = 2; say 'alive'; %h<false> = 3;
15:18 camelia rakudo-moar a5fe34: OUTPUT«alive␤Type check failed in binding key; expected StrictKeys but got Str␤  in block <unit> at /tmp/_x4QFwHksq line 1␤␤»
15:18 gfldex Juerd: indeed
15:18 gfldex Zero_Dogg: see ^^^
15:21 nine m: class Foo { has ($.I, $.dont, $.need, $.no, $.stinking, $.hash) is rw; }; my $f = Foo.new; $f.I = 1; $f.stinking = 1; say "alive"; $f.false = 3;'
15:21 camelia rakudo-moar a5fe34: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kfhw1mbC0Q␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/kfhw1mbC0Q:1␤------> 3tinking = 1; say "alive"; $f.false = 3;'7⏏5<EOL>␤    expecting any of:␤        sing…»
15:21 nine The class example is actually shorter!
15:21 nine m: class Foo { has ($.I, $.dont, $.need, $.no, $.stinking, $.hash) is rw; }; my $f = Foo.new; $f.I = 1; $f.stinking = 1; say "alive"; $f.false = 3;
15:21 camelia rakudo-moar a5fe34: OUTPUT«alive␤Method 'false' not found for invocant of class 'Foo'␤  in block <unit> at /tmp/xPvdrV7crf line 1␤␤»
15:21 nine And gives better error messages ;)
15:21 jnthn Juerd: Something like: sub auto-retap($supply) { supply { sub tap-it-now() { whenever $supply { emit $_; LAST { tap-it-now() }; QUIT { tap-it-now() } } }; tap-it-now() } }
15:23 ZoffixW is $!foo just sugar for my $foo; method !foo is rw { $foo }; ?
15:23 ZoffixW is $!foo just sugar for method !foo is rw { state $foo }; ?
15:24 gfldex ZoffixW: no, private attributes are also optimiser food
15:24 jnthn No, it's not sugar at all really
15:25 Juerd jnthn: I'm not sure where this would go. I'd like to reconnect things like MQTT::Client or your Stomp::Client...
15:25 ZoffixW m: class Foo { method !foo is rw { state $foo }; method bar { self!foo }; }; my $o = Foo.new; $o.bar = 42; say $o.bar
15:25 camelia rakudo-moar a5fe34: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at /tmp/OQhdmnFWLj line 1␤␤»
15:25 Juerd jnthn: So the supplies I have in the main program are made in modules
15:26 ZoffixW m: class Foo { method !foo is rw { state $foo }; method bar is rw { self!foo }; }; my $o = Foo.new; $o.bar = 42; say $o.bar; $o.bar = 72; say $o.bar
15:26 camelia rakudo-moar a5fe34: OUTPUT«42␤72␤»
15:26 ZoffixW neat :D
15:26 Juerd But knowing that phasers exist in 'whenever' is useful. I might be able to figure something out :)
15:27 Juerd ZoffixW: You can do this in Perl 5 with lvalue methods, but that induces headaches :)
15:27 jnthn ZoffixW: Yes, but note that state variables are not per instance!
15:28 ZoffixW Ahhh
15:28 AlexDaniel joined #perl6
15:29 jnthn Juerd: Provided the module exposes a Supply and does the right thing (e.g. connect again) when it's tapped a second time, it shouldn't matter overly much where in the pipeline it goes.
15:29 jnthn Juerd: We may end up with a pattern where modules provide hooks for async "middleware" though
15:30 jnthn To allow a sub that takes a supply and returns another supply to be plugged in at strategic points.
15:30 Juerd jnthn: Reconnect on retap, that's where I have no idea how to implement it. Currently I haven't even figured out how to tell whether it's still connected even :)
15:31 Juerd Although the protocol has ping, so I could just use that ;)
15:31 Zero_Dogg gfldex: haha, thanks
15:32 adu joined #perl6
15:33 ugexe is it possible for a piece of code to know if was precompiled before it was run? for instance: MAIN_HELPER being able to use it to change the displayed application path (bin/whatever instead of some long absolute sha1 path)
15:34 ugexe otherwise, maybe some sort of option for wrappers to override the displayed path?
15:36 sena_kun joined #perl6
15:39 nine On my way home from FOSDEM a dug a little into how hard it would be to make it possible to precompile modules and move both source and precomp file to a different directory afterwards, i.e. the distro package use case.
15:39 nine Looks like it's not impossible but not exactly simple either.
15:40 sena_kun Is there any way to find out is argument was sent in subroutine by caller or default value was used? Something like this exists in lisp, for example.
15:41 musiKk joined #perl6
15:42 ugexe whats the techinical reasons it doesnt work now? i assume absolute paths, but then why use absolute paths?
15:42 Skarsnik The path is compiled within the module?
15:43 Skarsnik sena_kun, that a weird usage, checking if not default is not enought?
15:43 jnthn sena_kun: First, see if the problem isn't better solved by multiple dispatch. :-) But if you really need to do it, then you can also grab the argument capture and look at that.
15:43 jnthn m: sub foo(|c, $a, $b = 42) { say c.list.elems }; foo(1); foo(1,2)
15:43 camelia rakudo-moar a5fe34: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8YTIqET2V3␤Cannot put required parameter $a after variadic parameters␤at /tmp/8YTIqET2V3:1␤------> 3sub foo(|c, $a7⏏5, $b = 42) { say c.list.elems }; foo(1);␤    expecting any of:␤        constr…»
15:43 jnthn ah
15:44 jnthn m: sub foo($a, |c, $b = 42) { say c.list.elems }; foo(1); foo(1,2)
15:44 MadcapJake sena_kun: no explicit feature, i believe.  however you could make it a named param, then do «$param.defined ?? $param !! "<default-value>"»
15:44 camelia rakudo-moar a5fe34: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4TDi94BmHR␤Cannot put optional positional parameter $b after variadic parameters␤at /tmp/4TDi94BmHR:1␤------> 3sub foo($a, |c, $b = 427⏏5) { say c.list.elems }; foo(1); foo(1,2)␤    expecting any …»
15:44 jnthn Oh, unpack...
15:44 domidumont joined #perl6
15:44 jnthn m: sub foo(|c ($a, $b = 42)) { say c.list.elems }; foo(1); foo(1,2)
15:44 camelia rakudo-moar a5fe34: OUTPUT«1␤2␤»
15:44 jnthn That'll do it
15:44 jnthn But yeah, it's generally a "design smell" to want to do it.
15:45 sena_kun MadcapJake, it's a bit sad. Anyway, it's really rare feature to use, so it's not a problem, I suppose.
15:45 nine ugexe: yes, the precomped file contains the full path to the source file (available as $?FILE). Usually, you will want the full path there.
15:45 MadcapJake in CL you'd still need to hinge on the param-supplied-p to do it, so it's gonna add at least a line of code either way
15:45 sena_kun jnthn, thanks for your code. I'm writing a little temportary patch now, so I assume it'll be replaced by some better design later.
15:47 AlexDaniel ZoffixW: huggable is dead!
15:48 RabidGravy alternatively
15:48 RabidGravy m: role Default {}; sub foo($a, $b = ( 1 but Default )) { say $b ~~ Default ?? "got default" !! "not default"; }; foo(1); foo(1,2)
15:48 camelia rakudo-moar a5fe34: OUTPUT«got default␤not default␤»
15:48 jnthn Cute!
15:49 Skarsnik x)
15:49 AlexDaniel El_Che: I'm reading through the backlog, it seems like you've stumbled upon this: https://rt.perl.org/Public/​Bug/Display.html?id=125757
15:49 sena_kun RabidGravy, seems legal and readable.
15:50 ZoffixW AlexDaniel, weird. The script itself is still running with last message in the debug being a pong response to "[server 2016-02-01T05:37:54.641548Z] PING :leguin.freenode.net"
15:50 * ZoffixW still hasn't had any chance to hack on the IRC stuff
15:50 huggable joined #perl6
15:51 ZoffixW huggable, Bag
15:51 huggable ZoffixW, class Bag [Immutable collection of distinct objects with integer weights]: http://doc.perl6.org/type/Bag
15:56 MadcapJake RabidGravy: that's neat!
15:56 RabidGravy or crack-addled
15:59 gregf_ m: role Foo { }; class Bar { method baz($a,$b = ( 1 but Foo)){ print $b; } }; Bar.new.baz(1)
15:59 camelia rakudo-moar a5fe34: OUTPUT«1»
15:59 ZoffixW New blog post exploring some of shortcuts in Perl 6: http://blogs.perl.org/users/zoffix_zne​t/2016/02/perl-6-shortcuts-part-1.html
16:00 geekosaur ZoffixW, sounds like it got netsplit and never recovered
16:00 geekosaur [01 05:49] * huggable has quit (*.net *.split)
16:00 geekosaur (timestamp is utc)
16:00 ZoffixW geekosaur, ah, *phew*. Then that should be easy to fix
16:05 * ZoffixW is hoping threads like these to have Perl 6 in them by 2018: https://news.ycombinator.com/item?id=11012044
16:05 ZoffixW No match for "Perl" at all ATM. Depressing :/
16:08 _Gustaf_ joined #perl6
16:12 ZoffixW Heh. UK gets approval to genetically modify humans. Illegal to birth them, but still, what a time to be alive :) I guess Gataka will be the next movie after Idiocracy to become a documentary :D http://www.bbc.com/news/health-35459054
16:12 kurahaupo joined #perl6
16:14 khw joined #perl6
16:24 nemo Zero_Dogg: well. it is a rather short thread
16:24 hoelzro Skarsnik: it's definitely weird; I wouldn't be against a warning
16:26 BenGoldberg joined #perl6
16:29 pi4 joined #perl6
16:31 MadcapJake added an svg badge generator: perl6.bestforever.com/badge.svg
16:35 AlexDaniel MadcapJake: what does it mean?
16:36 Zero_Dogg joined #perl6
16:36 Skarsnik MadcapJake, you managed to host image with baillador? x)
16:37 AlexDaniel Skarsnik: that's svg
16:37 AlexDaniel Skarsnik: which is still text :)
16:37 Skarsnik Oh yeah, that cheating
16:37 tadzik hahah
16:37 tadzik cheating is technique!
16:38 Skarsnik I should patch my Gumbo module to offer svg parsing x)
16:38 Skarsnik not sure how useful it can be
16:39 FROGGS joined #perl6
16:40 AlexDaniel Skarsnik: thank you again for Gumbo :)
16:41 Skarsnik I needed to parse fimfiction.net with 260kb html page and h:p:x was slow and giving me wrong result... so I needed something else x)
16:41 ZoffixW joined #perl6
16:41 ZoffixW MadcapJake, Why? Are you having issues with that? "Skarsnik MadcapJake, you managed to host image with baillador? x)"
16:42 AlexDaniel ZoffixW: yeah, last time we couldn't figure out how to do that
16:42 Skarsnik Me? No, but I think MadcapJake did not find how to provide binary content
16:43 ZoffixW You just send appropriate content type and write the image. Here's my use of MIME::Type for CSS/JS files: https://github.com/zoffixznet/p6high​.xtatik.org/blob/master/site.pl6#L50 O
16:43 ZoffixW s/O$/I'm sure it works for images and any other files too/;
16:43 AlexDaniel ZoffixW: CSS/JS files are not binary
16:43 ZoffixW Lemme try with images :) 1 sec
16:43 AlexDaniel yeah, try it
16:44 perl6newbee joined #perl6
16:45 vendethiel joined #perl6
16:46 ZoffixW (still installing Bailador... more secs) :)
16:48 AlexDaniel By the way, generating svgs with perl6 is fun: https://files.progarm.org/both.svg (hover over pins to highlight the net)
16:50 Skarsnik it's confusing, what is that?
16:50 FROGGS looks like a mainboard without pci slots
16:51 FROGGS though these five-pin-ground-thingies are weird
16:51 FROGGS ohh, is this a raspi?
16:52 FROGGS hmmm, no, it has a volume switch
16:52 AlexDaniel I think this was some tablet that we had to fix. However, we couldn't find schematic or anything else that would help us to do that. But we managed to find some files that were used for flying probe tests
16:52 FROGGS it might be a phone
16:52 MadcapJake AlexDaniel: it's a generated badge showing the current total users on Perl 6 slack and the number active currently
16:53 FROGGS hehe
16:53 MadcapJake Skarsnik: yep I did! Bailador works great! As long as I don't have to serve anything that isn't text xD
16:53 AlexDaniel these files were in some weird format, but it was all text, so… Turned out it had enough information (pin locations and nets) to get the work done
16:54 ZoffixW Ahhh "Type check failed in assignment to $output; expected Str but got Buf"
16:54 MadcapJake ZoffixW: i'll check that out, but i tried setting the content type and it would only send a little white box
16:55 AlexDaniel oh, and it's both sides of the board at the same time. E.g. here's just the top side: https://files.progarm.org/top.svg
16:55 MadcapJake ZoffixW: yeah it doesn't want to accept a Buf, but I thought that PSGI was supposed to work on IO.handle so I tried just returning the result of an open call, and that's when it just sends a 1 pixel white box :P
16:55 pecastro joined #perl6
16:55 AlexDaniel FROGGS++ for figuring it out immediately :)
16:56 dmaiocchi joined #perl6
16:56 FROGGS :o)
16:58 MadcapJake m: 'a+b'.trans( '+' => '%2b' ).say # why does this just replace with the first char?
16:58 camelia rakudo-moar a5fe34: OUTPUT«a%b␤»
16:59 AlexDaniel FROGGS: the components are actually fake. The files had information like “these pads belong to this component” but no sizes of the component itself, so I just drew a box around the pins :) otherwise it's just too hard to see what's going on if it's just a bunch of dots
16:59 RabidGravy MadcapJake, because that's what trans does
16:59 FROGGS ahh, interesting
16:59 AlexDaniel too bad it was just a one-time throwaway script
16:59 RabidGravy if you want what you want it's subst
17:00 MadcapJake RabidGravy: the example in the docs says otherwise
17:00 AlexDaniel I didn't even feel like posting it on github because I don't think that someone will ever face exactly the same problem…
17:00 MadcapJake http://doc.perl6.org/routine/trans#class_Str
17:00 MadcapJake it shows someone replacing `<` with `&lt;`
17:01 MadcapJake m: 'say $x<b> && $y<a>'.trans( '<' => '&lt;', '>' => '&gt;' ).say
17:01 camelia rakudo-moar a5fe34: OUTPUT«say $x&b& && $y&a&␤»
17:02 ZoffixW AlexDaniel, MadcapJake http://xtatik.org:3000/public/pics/camelia.png
17:02 ZoffixW :)
17:02 MadcapJake ZoffixW: O_O how?!
17:03 MadcapJake RabidGravy: either the docs are completely off on how trans should work or there is a bug
17:03 ZoffixW lol.. I had to modify PSGI
17:03 ZoffixW MadcapJake, remove "Str" from this line: https://github.com/supernovus/perl6​-psgi/blob/cb8e26e57bb104a64d89b75a​da6d02cdd0949aa4/lib/PSGI.pm6#L18
17:03 RabidGravy Nope it's the docs
17:04 MadcapJake haha nice! You should submit a PR for that!
17:04 ZoffixW Then it doesn't choke when you give it a buf. And you just slurp it up and send with :bin as in here: https://github.com/zoffixznet/p6high​.xtatik.org/blob/master/site.pl6#L57
17:04 * ZoffixW submits an Issue
17:04 MadcapJake ZoffixW: the comment above the multi specifically says it can be an array,str, or buf
17:04 ZoffixW heh
17:05 AlexDaniel ZoffixW: ISSUE? Submit a pull request!!
17:05 MadcapJake RabidGravy: this was added only 25 days ago, are you positive?
17:06 MadcapJake gfldex: are you around?
17:06 gfldex partly
17:06 MadcapJake the trans docs you merged, show a use of trans replacing one char `<` with `&lt;`, is that actually accurate?
17:06 ZoffixW AlexDaniel, I'm not familiar with that module. I described what fixes the problem in the Issue and I'll leave it to the author to decide whether the fix is sane: https://github.com/supernovus/perl6-psgi/issues/6
17:07 ZoffixW But it's by supernovus :/ They don't check github much, I noticed.
17:07 gfldex MadcapJake: i have to check
17:08 RabidGravy Well if it's a "bug" then some put it in there very deliberately, " return Rakudo::Internals.TRANSPOSE(self, $from, substr($to,0,1)) if $from.chars == 1;"
17:08 RabidGravy *shrug*
17:08 ZoffixW The name suggests it'd work like Perl 5's tr///, which does operate on single chars.
17:08 MadcapJake RabidGravy: http://design.perl6.org/S05.html#Transliteration shows it being used as shown in the docs, so i think it's a goof
17:08 gfldex m: my $str = 'say $x<b> && $y<a>'; $str.=trans( '<' => '&lt;' ); dd $str
17:08 camelia rakudo-moar a5fe34: OUTPUT«Str $str = "say \$x\&b> \&\& \$y\&a>"␤»
17:09 ZoffixW m: 'say $x<b> && $y<a>'.trans( '<>' => '[]' ).say
17:09 gfldex MadcapJake: seams not to work that well
17:09 camelia rakudo-moar a5fe34: OUTPUT«say $x[b] && $y[a]␤»
17:09 RabidGravy but why wouldn't you use subst for that
17:09 ZoffixW Because you can do multiple chars :)
17:10 ZoffixW m: 'zoomba'.trans( 'a..b' => 'A..B' ).say
17:10 camelia rakudo-moar a5fe34: OUTPUT«zoomBA␤»
17:10 gfldex m: my $str = 'say $x<b> && $y<a>'; $str.=trans( [ '<'   , '>'   , '&' ] => [ '&lt;', '&gt;', '&amp;' ]); dd $str
17:10 camelia rakudo-moar a5fe34: OUTPUT«Str $str = "say \$x\&lt;b\&gt; \&amp;\&amp; \$y\&lt;a\&gt;"␤»
17:10 RabidGravy yeah I know how it works
17:10 ZoffixW Hm, Perl 5 version lets you use ranges, and much faster than using a regex, which is why you'd ever use it in the first place.
17:10 leont Did IO.e start caching recently?
17:10 MadcapJake RabidGravy: that would require multiple subst calls otherwise
17:11 ZoffixW m: 'zoomba'.trans( 'a..z' => 'A..Z' ).say
17:11 camelia rakudo-moar a5fe34: OUTPUT«ZOOMBA␤»
17:11 ZoffixW -_-
17:11 gfldex m: my $str = 'say $x<b> && $y<a>'; $str.=trans( ['a'..'y'] => ['A'..'z'] ); dd $str
17:11 camelia rakudo-moar a5fe34: OUTPUT«Str $str = "SAY \$X<B> \&\& \$Y<A>"␤»
17:12 gfldex m: my $str = 'say $x<b> && $y<a>'; $str.=trans( '<' => '&lt;', '>' => '&gt;' ); dd $str
17:12 camelia rakudo-moar a5fe34: OUTPUT«Str $str = "say \$x\&b\& \&\& \$y\&a\&"␤»
17:12 RabidGravy yeah, if the from is a string of 1 char then it gets changed to 1 char
17:12 flussence leont: recently on what timescale? I remember someone complaining and something changing around christmas-time...
17:12 RabidGravy other uses are possible
17:13 gfldex not overly consitent
17:13 leont I was more thinking about January
17:13 leont I forgot on which version my code worked, but on a more recent rakudo it doesn't anymore
17:13 gfldex anyway, the docs must describe behaviour that actually works
17:14 leont Not saying this is a bad change, just surprised
17:15 RabidGravy to be honest i thought it had always done it
17:15 flussence if it were up to me, I would've made the stat result less invisible so it can be scoped like any other variable...
17:20 dalek doc: 444f8c0 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Str.pod:
17:20 dalek doc: fix trans for Pairs and list of Pairs
17:20 dalek doc: review: https://github.com/perl6/doc/commit/444f8c0b3a
17:20 leont That would make more sense, yes
17:23 MadcapJake so trans isn't supposed to work that way? I thought the design docs showed it like that too.
17:24 gfldex if you think it's a bug you should report it. As long as it doesn't make roast unhappy it's correct. The design docs are design docs, not Written Down Truth.
17:25 psy_ joined #perl6
17:28 ZoffixW joined #perl6
17:31 CIAvash but the design docs only shows the array version
17:31 CIAvash "The array version can map one-or-more characters to one-or-more characters"
17:32 raiph joined #perl6
17:34 ZoffixW m: for ^3 { when 0 { say "Almost there!" }; when 1 { say "There!!!" };  .say }
17:34 camelia rakudo-moar a5fe34: OUTPUT«Almost there!␤There!!!␤2␤»
17:34 ZoffixW m: for ^3 { say "Almost there!" when 0; say "There!!!" when 1;  .say }
17:34 camelia rakudo-moar a5fe34: OUTPUT«Almost there!␤0␤There!!!␤1␤2␤»
17:35 ZoffixW Is this difference supposed to be there? ^ Postfix form doesn't short-curcuit the block
17:36 ZoffixW "A when statement will also do this (but a when statement modifier will not.)"
17:36 ZoffixW I guess I should get more used to there being docs for things :P
17:36 awwaiid hah
17:38 Actualeyes left #perl6
17:39 vendethiel joined #perl6
17:49 keix joined #perl6
17:57 dha joined #perl6
17:59 Relsak joined #perl6
18:02 firstdayonthejob joined #perl6
18:08 vendethiel joined #perl6
18:11 khw joined #perl6
18:16 eiro joined #perl6
18:22 addison_ joined #perl6
18:24 MadcapJake is there a way to print all arguments provided?
18:24 MadcapJake to a sub/method
18:31 LLamaRider joined #perl6
18:34 perlpilot MadcapJake: if you capture them, sure.
18:37 MadcapJake nothing like JS's arguments object?
18:39 nine MadcapJake: what exactly are you trying to do?
18:40 vendethiel joined #perl6
18:41 Hotkeys m: sub foo ($x, $y, $z) { say @_; }; say foo(1,2,4)
18:41 camelia rakudo-moar a5fe34: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZBpG7YaFEW␤Placeholder variable '@_' cannot override existing signature␤at /tmp/ZBpG7YaFEW:1␤------> 3sub7⏏5 foo ($x, $y, $z) { say @_; }; say foo(1␤»
18:41 Hotkeys Darn
18:41 Hotkeys Thought I'd give it a shot
18:42 MadcapJake nine: I just am working on a sub and trying to debug all these positional arg errors; in JS, I'd just print arguments and figure out how things were being provided
18:43 perlpilot m: sub foo( |c ( $this, @that) ) { say "this($this), that({@that}),  all({c})" };  foo "this", <other stuff>;
18:43 camelia rakudo-moar a5fe34: OUTPUT«this(this), that(other stuff),  all(this other stuff)␤»
18:44 MadcapJake cool! thanks!
18:45 gfldex you could also wrap the sub in question
18:46 spider-mario joined #perl6
18:46 perlpilot maybe we could repurpose _ to be a special capture for the sub/method args  but I don't know if that would have any deleterious effects (besides the obvious one of using _ for the name :)
18:47 musiKk joined #perl6
18:47 gfldex that may make the optimiser unhappy
18:50 psy_ joined #perl6
18:55 cpage_ joined #perl6
18:55 araujo joined #perl6
18:56 araujo joined #perl6
18:56 araujo joined #perl6
18:57 retupmoca .botsnack
18:57 yoleaux :D
18:59 circ-user-zCdXs joined #perl6
18:59 circ-user-bFgx6 joined #perl6
19:00 [Coke] m: ("z".ord+1).chr.say
19:00 camelia rakudo-moar a5fe34: OUTPUT«{␤»
19:01 leont I get a "Could not find Shell::Command" from travis, even though I declare a test-demands on it :-s
19:01 leont depends
19:02 geekosaur maybe thecapture can be gotten from caller/callframe? (granting that some of that is NYI)
19:02 ecocode joined #perl6
19:03 ecocode left #perl6
19:03 [Coke] is our travis stuff smart enough for test-depends?
19:05 ecocode joined #perl6
19:06 ecocode hi.. Where can I find docs about 'repr' ?
19:07 ecocode and more generally: is there something like perl6doc ?
19:07 perlpilot ecocode: I'm not sure that we have "docs" per se for repr
19:07 perlpilot ecocode: there's p6doc
19:08 [Coke] ecocode: something like it, yes, but it's not as functional yet as what you expect from p5
19:08 [Coke] docs.perl6.org
19:08 MadcapJake how do you provide a group of submodules in one all-inclusive module? (I want there to be choice between using the whole package or just the bit you need)
19:08 [Coke] ecocode: http://docs.perl6.org/language/nativecall
19:09 MadcapJake I thought having a base pm file with a bunch of 'use' statements would work, but it doesn't seem to
19:09 domidumont joined #perl6
19:10 [Coke] MadcapJake: the p6 style is more to have one thing per file at the moment.
19:10 ecocode OK. thanks for the info (and especially p6doc :) )
19:10 eiro joined #perl6
19:10 ugexe MadcapJake: see TAP::Harness
19:10 ecocode has someone made an epub or pdf from the docs on docs.perl6.org ?
19:12 MadcapJake [Coke]: ok, I do have one module per file, I just wanted to add a module at .. that included all those in the subdir
19:14 FROGGS[mobile] joined #perl6
19:17 domidumont joined #perl6
19:19 musiKk joined #perl6
19:21 rindolf joined #perl6
19:23 [Coke] MadcapJake: that seems... reasonable.
19:23 perlpilot MadcapJake: A use statement will only import into the current lexical scope.  If you want a file with a bunch of use statements to provide those same routines, you'll need to re-export the symbols.
19:23 [Coke] no works?
19:24 [Coke] ah, perlpilot++
19:29 cognominal left #perl6
19:32 domidumont joined #perl6
19:32 eiro joined #perl6
19:32 matt_ joined #perl6
19:33 tmtowtdi joined #perl6
19:34 frobisher joined #perl6
19:35 MadcapJake perlpilot: how would i re-export them?
19:38 MadcapJake I tried doing «require Sub::Module ('exported-sub', 'another-exported-sub')» but it said Sub::Module didn't export anyting. o_O
19:38 perlpilot MadcapJake: well ... you're *supposed* to be able to say  "use Foo :EXPORT;" but that's NYI.   (maybe you could champion that :)
19:38 edenc joined #perl6
19:39 perlpilot MadcapJake: for now, you can provide an EXPORT sub that returns what you want exported.
19:40 perlpilot MadcapJake: See the top of https://github.com/perlpilot/p6-Test-​Class/blob/master/lib/Test/Class.pm6 for an example.
19:41 MadcapJake cool thanks! I don't know if my perl6 wizardy level is high enough to implement the NYI :EXPORT adverb :(
19:41 MadcapJake wizardry*
19:44 perlpilot MadcapJake: This is how you learn :)
19:45 flussence I've an odd question: how the heck does --stagestats keep getting printed to my console? It's circumventing both the redirects in the wrapper script I'm using and my *system package manager's* output capture layer!
19:46 perlpilot flussence: maybe it's sent to FD #3  :)
19:47 cpage_ joined #perl6
19:47 perlpilot um ... looking at the code, it seems to be sent to stderr normally though
19:48 dmaiocchi joined #perl6
19:48 * perlpilot work &
19:49 flussence yeah, I don't get it. I run this script and get a nice big log full of compiler spam, gcc warnings and all... and then my terminal prints the stage stats and an "installed!" line.
19:51 flussence and that's a «note» line, so should be stderr...
19:56 wamba joined #perl6
19:58 * geekosaur gets lost looking for stderr redirections
19:58 geekosaur (the easiest way to accomplish that is the equivalent of freopen("/dev/tty", "w+", stderr))
20:01 geekosaur also when I went looking for stagestats I landed in nqp code, no "note" commands visible...
20:02 nine "note" is a Perl 6 sub. In NQP it's nqp::say(nqp::getstderr(), ...)
20:02 nine nqp::saysf(nqp::getstderr(), ...)
20:03 nine Darn... it's nqp::sayfh(nqp::getstderr(), ...)
20:03 geekosaur yep
20:03 geekosaur that was my point
20:03 geekosaur there was one mention of stagestats in perl6 code, most of the rest were in nqp/HLL/*
20:06 ecocode joined #perl6
20:07 Relsak joined #perl6
20:07 * geekosaur suddenly wonders if this might be libuv being "helpful"
20:08 flussence hm, that was my gut feeling too
20:11 dmaiocchi hi all, i want to make a rpm package for perl6
20:11 dmaiocchi :)
20:11 flussence you might want to wait for 2016.01 then, last months was broken for almost everyone that tried to package it
20:12 flussence should be arriving this week, if we're lucky
20:13 dmaiocchi ok, thx
20:14 dmaiocchi was some nice conference @fossdem, so they motivated to help also perl6
20:14 dmaiocchi :)
20:14 dolmen joined #perl6
20:15 dha flussence - what are the chances of us being lucky? :-)
20:16 flussence no idea, I'll admit I haven't been paying much attention this month, kinda worn out with it all...
20:16 dha I'm actually curious, as NY.pm is having a p6 beginners study group on saturday, and it would be great if those attending could have a relatively up to date release to work with.
20:18 lokien_ joined #perl6
20:21 AlexDaniel m: say [~] ‘hello world’.ords».succ».chr
20:21 camelia rakudo-moar a5fe34: OUTPUT«ifmmp!xpsme␤»
20:21 moritz rot1
20:22 marmay joined #perl6
20:22 geekosaur well, aside from the fact that rotN ignores non-alphabetic (and non-ASCII range)
20:23 lizmat m: say [~] ‘hello world’.comb>>.succ   # rot1
20:23 camelia rakudo-moar a5fe34: OUTPUT«ifmmp xpsme␤»
20:23 AlexDaniel lizmat: I don't think that it works
20:23 lizmat m: ‘hello world’.comb>>.succ.join.say   # functionally
20:23 camelia rakudo-moar a5fe34: OUTPUT«ifmmp xpsme␤»
20:23 AlexDaniel m: say [~] ‘az’.comb».succ
20:23 camelia rakudo-moar a5fe34: OUTPUT«baa␤»
20:24 lizmat ah, AlexDaniel: good point
20:24 lizmat .oO( bad spectest )
20:25 lizmat m: say [~] ‘az’.ords».succ».chr
20:25 camelia rakudo-moar a5fe34: OUTPUT«b{␤»
20:25 lizmat AlexDaniel : ^^^ not really rot1 either
20:25 AlexDaniel lizmat: it's unicode-aware rot1 :D
20:25 lizmat AlexDaniel :  :-)
20:26 AlexDaniel though this is a lie and it will actually break
20:26 * lizmat is tired and goes to bed
20:27 MadcapJake Made clojurish thread-first/thread-last operators: https://github.com/MadcapJake/Op​-Thread/blob/master/t/010-use.t
20:28 musiKk joined #perl6
20:28 MadcapJake I can't seem to get the texas-style thread-first operator (->>) to work as intended though
20:30 jdv79 FROGGS put out a release candidate a few days ago iirc
20:30 jdv79 maybe we can use that, dha.  i haven't looked myself.
20:31 dha I'll try to take a look. In this context, it's really about ease of use.
20:31 dha so an RC may or may not be helpful.
20:32 jdv79 i guess.  is installing from source and using panda too hard?
20:32 jdv79 idk if everyone needs r*
20:33 MadcapJake yes
20:33 Hotkeys I haven't bothered with r* in a while because something always breaks
20:33 Hotkeys I just install what I need
20:34 yqt joined #perl6
20:35 sevvie joined #perl6
20:39 dha jdv79 -  I have no problem with it, but Jim wants to make it as easy as possible for those with no p6 experience at all, I think. r* should give them everything they need in one shot. *shrug*
20:39 MadcapJake my problem is that I'm trying to create builds for heroku and solus, and both of these move the directories of the built files after the whole build process is complete, this renders a bunch of paths broken (I'm not the greatest bashfu artist so maybe i'm going about it wrong)
20:39 dha Hotkeys -  yeah, I just get whatever's on github. *shrug*
20:40 dha I'm *guessing* that Jim wants to minimize time devoted to setup issues so we can concentrate on actually learning the language.
20:40 MadcapJake also, have any of you tried installing rakudo to /usr?
20:42 Hotkeys I just use rakudobrew
20:42 Hotkeys I update like once a week or whenever I can be bothered
20:43 MadcapJake right rakudobrew is nice but I wouldn't want to use it on a server, i would rather have everything installed neatly in /usr dirs
20:43 MadcapJake and distros like Solus, NixOS want everything neatly boxed up too rather than sitting in a hidden home dir folder
20:43 cognominal joined #perl6
20:44 laz78 joined #perl6
20:45 mst MadcapJake: which is precisely what rakudobrew is for
20:45 mst MadcapJake: .rakudobrew is merely *a* location to put it in
20:45 jdv79 dha: maybe we should have some shell accts setup before hand.  idk.
20:45 mst MadcapJake: mine isn't
20:46 dha Yeah, idk either... I'm looking to be helpful if possible, but... not really my show.
20:46 MadcapJake but you can rakudobrew place everything in the /usr dirs?
20:46 jdv79 at least there'll be ok beer
20:47 dha Yes. :-)
20:47 mst MadcapJake: I wouldn't do that
20:47 mst MadcapJake: I'd create an independent tree of files, so everything is neatly boxed up, ala NiXOS
20:47 mst MadcapJake: and if I then wanted to, symlink from /usr/bin
20:47 MadcapJake right but they want things to *look* like a set of /usr dirs
20:48 ecocode left #perl6
20:49 MadcapJake $build_dir/usr/bin, $build_dir/usr/share, etc. unfortunately if this independent tree gets moved, perl6 bin fails
20:49 mst oh, yes, if you want DESTDIR and PREFIX to be different you have to do it more by hand
20:50 mst flussence got a gentoo ebuild working you could crib from
20:51 dalek doc: 37e7816 | (Zoffix Znet)++ | doc/Language/unicode_texas.pod:
20:51 dalek doc: Clarify ⁺⁻¯
20:51 dalek doc:
20:51 dalek doc: The Texas variants are not 'N/A', they simply require explit numbers fors power: as in 2¯ is 2**-1 and 2**- doesn't work.
20:51 dalek doc: review: https://github.com/perl6/doc/commit/37e7816976
20:52 MadcapJake mst: which flags would i use for building in a $build_dir and then moving to somewhere else? I'm kind of confused on what the different is between DESTDIR/sysroot/prefix or others.
20:52 mst MadcapJake: don't remember, hence saying 'crib from flussence'
20:53 FROGGS[mobile]2 joined #perl6
20:53 MadcapJake mst: ok, i'm checking it out now, thanks for the reference!
21:00 JustThisGuy_ joined #perl6
21:01 nchambers joined #perl6
21:01 cdg joined #perl6
21:02 ely-se joined #perl6
21:11 AlexDaniel “If you have a sub you're dying to call as a method on something, just prefix it with an ampersand.” – O-o-oh! That's how you do it!
21:11 AlexDaniel having to write $_ is annoying :)
21:12 AlexDaniel m: sub foo($x) { say $x }; $_ = 42; .&foo
21:12 camelia rakudo-moar a5fe34: OUTPUT«42␤»
21:12 ugexe @arr>>.&foo
21:13 JustThisGuy_ I'm trying to understand how something works with NativeCall. I'm trying to write a module that binds to GDBM files. The GDBM file is here: http://rnc.veritablesoftware.com/foo.gdbm. The script is here: http://pastebin.com/3aCB7pHD. The module is here: http://pastebin.com/H1UavFqQ. The output is here: http://pastebin.com/gvMBUKG5.
21:16 Skarsnik JustThisGuy_, you should try gist.github.com it alow to put multiple file
21:16 JustThisGuy_ What I don't understand is why "my datum $key_datum = datum.new(dptr => $key, dsize => $key.chars);" gives me a datum instance, and "my datum $content_datum = gdbm_fetch($!dbf, $key_datum);" gives me a datum class. Is the ability to have native subs return objects not implemented, or am I just doing it wrong?
21:17 JustThisGuy_ Skarsnik: Thanks for the tip. I don't currently have a github account, sadly.
21:19 RabidGravy I actually started the same thing, I stopped working on it https://github.com/jonathanstowe/p6-GDBM
21:19 Skarsnik what are the c signatures?
21:20 RabidGravy but in your case it's returning a type object because the native sub is returning null
21:24 JustThisGuy_ Sorry, I was putting it together in gist.github.com: https://gist.github.com/JustT​hisGuyAZ/2a32ba2ff53025710201
21:24 Skarsnik I want to kill the guy that write minixml... the api is aweful node = mxmlFindElement(tree, tree,NULL,NULL, NULL,MXML_DESCEND) ....
21:24 JustThisGuy_ Just a sec... I'll add the C signatures to the gist.
21:26 JustThisGuy_ Thanks RabidGravy! I'll take a look at what you have when I get a chance.
21:26 addison_ joined #perl6
21:27 Skarsnik RabidGravy, did callback to native sub work in function arg btw?
21:28 Skarsnik *do
21:29 RabidGravy Skarsnik, yeah seemed to, there's a good example somewhere of someone made an expat binding which is all about the callbacks
21:29 JustThisGuy_ Skarsnik, I added gdbm.h to the gist: https://gist.github.com/JustT​hisGuyAZ/2a32ba2ff53025710201
21:30 azawawi joined #perl6
21:30 azawawi hi
21:32 JustThisGuy_ Another question I have from looking at RabidGravy's code is, what's the difference between making the class "is rw" and making the attributes "is rw"?
21:32 Skarsnik JustThisGuy_, GDBM_FILE is a Pointer not a struct. You probably want to use Pointer for it
21:33 Skarsnik class is rw make all the attribute is rw
21:33 JustThisGuy_ Good catch. Thanks!
21:33 hankache joined #perl6
21:34 JustThisGuy_ So it's redundant to make the attributes "is rw" if the class "is rw"? Right?
21:34 Skarsnik yes
21:34 JustThisGuy_ K, good to know.
21:35 RabidGravy yeah, I don't know why I made both rw for Datum
21:35 azawawi what's the best strategy for POD documentation in your opinion ... inline pod or at the top or end of a file?
21:35 JustThisGuy_ You can never have too much rw! :)
21:35 RabidGravy azawawi, I keep changing my mind
21:35 nowan joined #perl6
21:36 * azawawi is reading Audio::Sndfile code to learn more :)
21:36 hankache evening #perl6
21:36 dha azawawi -  My gut reaction is that that would be context-dependent.
21:36 RabidGravy wahah!
21:36 Skarsnik azawawi, get back at Pg Array!
21:36 azawawi Skarsnik: no :)
21:36 JustThisGuy_ So, since RabidGravy said that the native sub worked, I'll take a look at that code and see if I can figure out what I'm doing wrong. Thanks all!
21:37 Skarsnik I was hopping someone fix to have Array in the hash returned and not Array of Array x)
21:38 azawawi RabidGravy: so what did you end up with? :)
21:40 RabidGravy I've just been sticking it all at the top more recently, it's less ugly, however doing inline makes refactoring to another file easier
21:40 azawawi also i hear that a lot while reading module reviews... Perl-ish API design. What makes an API Perlish in your opinion?
21:42 RabidGravy I don't really know, but I know it when I see it ;-)
21:42 Skarsnik lol
21:42 RabidGravy and I think Perl 6-ish is probably different to Perl 5-ish given we have multis and stuff
21:43 hankache I propose we instead of saying Perl 6-ish we say 6xy
21:44 azawawi what about positional vs named arguments? and using hyphens in method names?
21:44 Skarsnik Oh yeah that x)
21:44 * azawawi starts writing POD documentation for MagickWand
21:44 Skarsnik providing at key/pos on container?
21:45 hankache "that module is Perl 6-ish" becomes "that module is 6xy"
21:46 RabidGravy always use hyphens in method-names
21:47 azawawi also using named parameters and sensible default values
21:50 RabidGravy well it's if there are one or two mandatory arguments then positional, if there are twenty optional then named, there's a happy medium between the two
21:52 RabidGravy not always defaults, sometimes a multi which calls the one with the most arguments with the defaults
21:55 azawawi RabidGravy: cool thanks for the input
21:58 tony-o_ .
22:00 addison_ joined #perl6
22:01 laz78 joined #perl6
22:01 sno joined #perl6
22:06 dmaiocchi joined #perl6
22:12 donaldh_ joined #perl6
22:16 donaldh35 joined #perl6
22:22 donaldh35 joined #perl6
22:23 ZoffixWin joined #perl6
22:23 donaldh joined #perl6
22:29 azawawi https://github.com/JoelBesada/activate-power-mode # Pure editing fun in atom... Makes me wanna hit space and ENTER harder :)
22:29 ZoffixWin :)
22:31 Hotkeys lol
22:31 ZoffixWin Goes well with https://www.youtube.com/watch?v=AQ3-R5XB098
22:31 * ZoffixWin is power hax0r now
22:35 azawawi im thinking of re-writing farabi6 as an atom plugin :)
22:35 ZoffixWin What's that?
22:35 azawawi https://github.com/azawawi/farabi6
22:38 azawawi ZoffixWin: it was something like this https://p6weekly.files.wordp​ress.com/2014/10/uwgmvwh.png :)
22:39 ZoffixWin k
22:42 * azawawi starts writing pod-preview for atom (like https://atom.io/packages/markdown-preview) :)
22:57 vendethiel joined #perl6
23:01 Skarsnik damn that nice
23:02 ZoffixWin Oh damn. I have that installed but didn't even know it existed :) I was using online previewers :) azawawi++
23:17 [Sno] joined #perl6
23:25 skids joined #perl6
23:25 Herby_ joined #perl6
23:25 Herby_ Afternoon, everyone!
23:25 yoleaux 31 Jan 2016 10:37Z <CIAvash> Herby_: Is this what you want? my $var = 42; given $var { when * < 50 { say "it's less than 50" } }
23:25 Herby_ o/
23:28 Herby_ Knowing this crowd, I'm suspecting we have one or two Vim experts
23:29 Herby_ How would I delete all lines in a text file that do not start with a number | letter and a .  :  ex "1." or "a."
23:29 Herby_ i'd like to delete all lines that do not match that pattern'
23:29 timotimo i think you :g/some_regex_you_like/d to make that happen
23:29 timotimo however, i don't know how to invert the regex non-manually
23:29 timotimo oh
23:29 timotimo easy
23:30 timotimo :g!/pattern/d
23:30 timotimo alternatively, you can just :v/pattern/d, which is just short for :g!/pattern/d
23:30 Herby_ hmmm
23:31 timotimo so like :g!/[a-z0-9]./d  maybe you have to backslash parts of that
23:31 timotimo seriously, when to backslash and when not to backslash stuff in vim regex ... most difficult thing in my whole life
23:31 Herby_ you're the man :)
23:31 timotimo eh. sometimes
23:32 Herby_ i got tasked with a mind numbing project at work, trying to think how I can work Perl 6 into it
23:32 Herby_ I have a 500 page PDF that is full of chapters and test questions.  I need to pull out all the test questions and answers, and write it to an excel sheet
23:33 Herby_ it looks like Perl 6 has a PDF module, not so sure on the excel part
23:33 Herby_ so now i'm just trying to 'copy all' from the pdf, and weed out everything but the test questions and answers using Vim regex
23:33 Herby_ then figure out the write-to-excel part
23:34 Herby_ it would probably be shorter to manually copy/paste everything from the pdf into an excel document, but i can't bring myself to do it
23:42 AlexDaniel Herby_: what about trying some random tool to convert PDF to text file?
23:43 AlexDaniel Herby_: and then manipulating it to get it completely right
23:43 Herby_ i was looking at that too. wasn't sure how much more it would give me than '
23:43 Herby_ 'copy all + paste'
23:50 cpage_ joined #perl6
23:50 Herby_ .tell CIAvash That was it, thanks!
23:50 yoleaux Herby_: I'll pass your message to CIAvash.
23:52 vendethiel joined #perl6
23:59 timotimo at some point i used a pdf-to-text tool to extract a bunch of data out of a pdf

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

Perl 6 | Reference Documentation | Rakudo