Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-10

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:00 tweakism Juerd: he probably wants to load the functions etc. defined and then interactively do stuff with them
00:00 ridthyself hats it
00:00 tweakism most REPLs let you do that, too
00:00 Juerd I don't know. I come from Perl 5 that doesn't even ship with a usable repl
00:00 Juerd It's not part of my work flow, or even the way I experiment.
00:01 ridthyself right, that's what I was after -- I have a lot functions that i want to test with various inputs
00:02 Juerd Is there any reason why you don't want to turn that into a module?
00:02 Juerd It's not hard
00:02 Juerd http://doc.perl6.org/language/modules
00:02 ridthyself lack of skill, mostly
00:03 ridthyself if I turn it into a module, how would I interact with it for testing purposes
00:03 Juerd You could then start the repl and type "use MyModule;"
00:03 Juerd Or even start the repl with "perl6 -MMyModule"
00:04 DoverMo joined #perl6
00:05 ridthyself what is the difference between a .p6 file and module
00:05 Juerd Put everything in a file called MyModule.pm, have "unit module MyModule;" on the first line, and turn every "sub foo { ... }" into "sub foo is export { ... }", if you want the function to be exported (callable by whatever 'use's the module)
00:05 Juerd The way you use it
00:06 Juerd Modules (.pm6 or .pm) are loaded with 'use' and use namespaces. Programs (.p6 or .pl, or anything you like) are run from the command line.
00:06 ridthyself wow, so like  function within a function
00:06 [Coke] do we have anyone attending yapc::na and if so hackathon before or after?
00:06 Juerd Typically, anything that isn't a full program, should be a module.
00:07 [Coke] Trying to budget the trip and more days are 'spensive.
00:07 johndau joined #perl6
00:07 Juerd ridthyself: I don't understand the 'function within a function' comment. You can have functions within functions, but I don't see how that's relevant here :)
00:08 ridthyself what I mean is composing a program out of modules made of functions might be the way to go for me
00:09 ridthyself thanks for your help, now I have something fun to play with.
00:10 Juerd One last thing: you need to tell perl6 where your modules are. There are several ways to do this. You can use "-I path" on the command line, the PERL6LIB environment variable, or "use lib 'path';" in your program.
00:11 ridthyself okay
00:13 ridthyself so perl6 -I /path/to/file.pm
00:13 Juerd Sure, or a relative path
00:13 Juerd I often use perl6 -Ilib for quick one-off tests
00:13 Juerd That'll use the directory called 'lib' in the current working directory
00:14 Juerd Or if I'm too lazy even to create a directory for a quick hack, I'll just use -I. and use the current working directory itself.
00:14 skids perl6 -I /path/to/ and then "use file" either in the repl or in the -e
00:14 Juerd Yes, or perl6 -Ipath -Mmodule
00:15 Juerd Note that the filename and the name you use with 'unit module' should be the same thing (except that the filename has a .pm or .pm6 extension), and it's case sensitive.
00:15 Juerd If you want to create a hierarchy, the module name Foo::Bar corresponds to Foo/Bar.pm
00:16 Juerd Many modules from the ecosystem use that: http://modules.perl6.org/
00:17 Juerd afk
00:17 ridthyself okay i just have to make my methods public and I'm set
00:17 solarbunny joined #perl6
00:17 ridthyself or make my "subs" um... exportable?
00:18 ridthyself perl is weird fun, i've been missin out. thanks again everyone!
00:20 pnu joined #perl6
00:34 sortiz .tell lizmat I bisected the regression reported (20x Buf.list to slurpy arg) to https://github.com/rakudo/rakudo/commit/​f25d41c6782a4a2f32b6f01722b475cffbe9c3be , updated bench details in https://gist.github.com/sal​ortiz/4ef300b4d7f2e9738024
00:34 yoleaux sortiz: I'll pass your message to lizmat.
00:35 kid51 joined #perl6
00:35 cdg joined #perl6
00:44 d4l3k_ joined #perl6
00:45 yeahnoob joined #perl6
00:46 kipd_ joined #perl6
00:46 * [Coke] decides against yapc::na.
00:47 perigrin :(
00:47 nadim joined #perl6
00:48 perigrin [Coke]: Orlando loves you. That said I'd only be here for one day anyway so don't let my sadness make you re-consider too hard.
00:48 DrForr_ joined #perl6
00:48 Brock joined #perl6
00:49 xinming joined #perl6
00:49 DoverMoo joined #perl6
00:49 nowan_ joined #perl6
00:49 riatre joined #perl6
00:49 timotimo joined #perl6
00:49 BenGoldberg joined #perl6
00:50 tweakism joined #perl6
00:51 mephinet joined #perl6
00:51 skids joined #perl6
00:51 hacst joined #perl6
00:51 JRaspass joined #perl6
00:53 John[Lisbeth] rakudobrew build moar take to in progress. The patient seems lively and responsive.
00:53 xxpor joined #perl6
00:56 kipd joined #perl6
01:01 dj_goku joined #perl6
01:01 John[Lisbeth] Sometimes it lags for a bit I get real nervous, then it reassures me with it's verboseness.
01:10 adu joined #perl6
01:11 Brock [Coke]: pong :)
01:12 Actualeyes joined #perl6
01:13 kid51 joined #perl6
01:13 colomon_ joined #perl6
01:13 ugexe darn, i hope some perl6 talks got submitted
01:24 John[Lisbeth] joined #perl6
01:25 John[Lisbeth] My machine didn't like it and now somehow I have alot of latency although it could be because of network issues and not because of anything to do with my machine. I am in a coffee house and there is an asian kid with a mac in front of me so perhaps he is running some intense shit i have no idea probably league or something.
01:26 John[Lisbeth] I suspect it could have been because I was running rakudobrew from within a bash shell within emacs, and it might not have been able to handle the text streams.
01:27 timotimo if your machine doesn't have a whole lot of ram, maybe it ran out while compiling rakudo
01:27 timotimo compiling rakudo takes at least one gigabyte of free ram, i'm guessing
01:27 John[Lisbeth] oh snap bro I don't have the funds for that
01:28 John[Lisbeth] Perhaps I can add some kind of virtual swap
01:28 John[Lisbeth] dump the ram into a file someplace
01:28 John[Lisbeth] let it churn for a few weeks or so
01:28 John[Lisbeth] till it's nice an done
01:28 John[Lisbeth] Just like slow cookin'
01:30 John[Lisbeth] I also have the ability to clone my os, open a virtual machine of whatever size I'd like, then plop the install onto the new machine, as this is done with a mouseclick in azure. So I could switch to a more powerful machine for a few hours at least and then switch back, incurring only a little extra cost.
01:31 [Coke] awwaiid: I think I'm set. I might be able to come up with a tutorial or something.
01:32 awwaiid [Coke]: that would be cool. I was thinking of running an intro-to-perl6 tutorial, and I was also thinking of runing a Randori session. But I probably shouldn't do both. I could also do the Randori (or an additional one) on the second day (Hackathon Day)
01:32 timotimo you can definitely have a swap file; it'll likely become ridiculously slow, and if you have the swap file on the SSD, better be sure the SSD has plenty of space to shuffle things around
01:32 timotimo otherwise, get a cheap SD card with like a gigabyte of space and use that for a swap file %)
01:33 ugexe it took days to compile a jvm rakudo on a rpi running netbsd about a year ago. that was after 3-4 days to compile a jdk
01:34 timotimo well, to be fair, the rpi is also packing a ridiculously underpowered CPU
01:34 ugexe i was amazed any of it worked
01:34 ugexe but soon after the 2gb of ram wasnt enough to compile a jvm rakudo anymore
01:34 itaipu joined #perl6
01:36 * timotimo goes to bed
01:37 awwaiid m: -> ::T $x, T $y { say $y.VAR.WHAT; $x ~ $y }("fish", "food").say;
01:37 camelia rakudo-moar 59adbe: OUTPUT«(Str)␤fishfood␤»
01:37 awwaiid m: -> ::T $x, T $y --> T { say $y.VAR.WHAT; $x ~ $y }("fish", "food").say;
01:37 camelia rakudo-moar 59adbe: OUTPUT«(Str)␤Type check failed for return value; expected T but got Str ("fishfood")␤  in block <unit> at /tmp/OHuneW3goE line 1␤␤»
01:38 awwaiid So I can say param 2 must be the same type as param 1, but that doesn't work on the return type. That by design, or NYI?
01:38 gfldex NYI and there is a RT for that already
01:38 awwaiid Gracias
01:49 TimToady joined #perl6
01:50 bpmedley joined #perl6
01:53 awwaiid I added Perl 6 to https://en.wikipedia.org/wiki/Dependent_type#​Comparison_of_languages_with_dependent_types, we'll see if I am technically wrong :)
01:54 awwaiid Hmm. But maybe they don't count since it doesn't happen at compile time?
01:56 TEttinger hehe I wonder who brought that to the attention of #perl6 :)
01:56 awwaiid hehe
01:56 TEttinger glad it's on there though
01:56 awwaiid Now I'm trying to decide if I should add a talk entry saying that I'm not sure Perl 6 qualifies, or try to fly under the radar
01:58 TEttinger make it saying "I'm not sure perl 6... or <insert existing entry on list that is just as dubious>... qualifies"
02:01 awwaiid Good idea. Sage is a hybrid which does some compile-time and some run-time checks ... and specifically for complex cases with dependent types does it at runtime. Great idea!
02:02 adu joined #perl6
02:06 awwaiid So if I do my Int $x where * > 5; Is there any way to ask $x what it is and get some indicatory that it is a subtype/constraint of Int?
02:11 * TEttinger hides between the couch cushions
02:13 kalkin-- joined #perl6
02:18 Juerd awwaiid: $x still is an Int, according to $x.WHAT
02:21 awwaiid $x.WHAT tells you what the type of the value of $x is, I think
02:21 awwaiid m: my Int $x where * > 5; $x.WHAT.say; $x = 10; $x.WHAT.say
02:21 camelia rakudo-moar 59adbe: OUTPUT«(<anon>)␤(Int)␤»
02:21 awwaiid When it is an undefined value it seems to kinda know that it isn't quite Int
02:23 skids joined #perl6
02:25 zpmorgan joined #perl6
02:26 Juerd I guess you could check for $x.HOW ~~ Perl6::Metamodel::SubsetHOW
02:26 Juerd Oh, that doesn't work
02:28 Hotkeys there's a .constraints method documented
02:28 Hotkeys but I have no idea how it's used
02:28 Juerd I think that's for parameters
02:28 Hotkeys ah
02:29 Juerd For subsets there's $x.^refinement
02:29 Juerd But I don't know any good way to test that.
02:29 Juerd No .^can or .can('^...'), no .^? (or would that be .?^ perhaps?) that works
02:30 colomon joined #perl6
02:30 awwaiid those are things you tried that don't work you mean?
02:31 Juerd Yes.
02:31 Juerd m: my Int $x where * > 5; say $x.^refinement
02:31 camelia rakudo-moar 59adbe: OUTPUT«{ ... }␤»
02:32 Juerd m: my Int $x; say $x.^refinement
02:32 camelia rakudo-moar 59adbe: OUTPUT«Method 'refinement' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/e5KE7Lw_Rq line 1␤␤»
02:32 Juerd Except for 'try' I don't know how to use this :)
02:33 Hotkeys I'm confused about https://p6weekly.wordpress.com​/2016/03/07/2016-10-enchante/
02:33 Juerd m: my Int $x where * > 5; say $x.^refinement.($_) for <1 3 5 7 9>;
02:33 camelia rakudo-moar 59adbe: OUTPUT«False␤False␤False␤True␤True␤»
02:33 Hotkeys for example what does Lamdu have to do with p6
02:33 awwaiid Juerd: huh. interesting
02:34 awwaiid This doesn't matter too much to me other than defending it if wikipedia removes Perl 6 from the Dependent Types page :)
02:36 Roamer` joined #perl6
02:37 Hotkeys or a better question
02:37 Hotkeys what is 'the backlog'
02:38 [particle] joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:50 awwaiid Hotkeys: I believe 'the backlog' are links from this week but in previous years; not sure how they are mined
02:50 Hotkeys ah
02:57 johndau joined #perl6
02:58 mattp_ joined #perl6
03:03 bjz joined #perl6
03:04 bjz joined #perl6
03:05 itaipu joined #perl6
03:16 grassass joined #perl6
03:17 PerlJam joined #perl6
03:44 noganex_ joined #perl6
04:29 kent\n joined #perl6
04:29 kent\n joined #perl6
05:01 skids joined #perl6
05:23 wamba joined #perl6
05:25 bjz joined #perl6
05:32 vendethiel joined #perl6
05:46 dalek joined #perl6
05:46 pnu joined #perl6
05:46 solarbunny joined #perl6
05:46 abaugher joined #perl6
05:46 baest joined #perl6
05:46 21WAAEBUL joined #perl6
05:55 Cabanossi joined #perl6
06:01 adu joined #perl6
06:08 dalek joined #perl6
06:08 pnu joined #perl6
06:08 solarbunny joined #perl6
06:08 abaugher joined #perl6
06:08 baest joined #perl6
06:08 21WAAEBUL joined #perl6
06:14 [Coke] joined #perl6
06:22 bjz_ joined #perl6
06:33 dakkar joined #perl6
06:33 quester joined #perl6
06:43 musiKk_ joined #perl6
06:48 vendethiel joined #perl6
06:51 domidumont joined #perl6
06:56 domidumont joined #perl6
06:58 FROGGS[mobile] joined #perl6
07:06 firstdayonthejob joined #perl6
07:09 CIAvash joined #perl6
07:21 orbus joined #perl6
07:25 [Sno] joined #perl6
07:28 domidumont joined #perl6
07:30 nakiro joined #perl6
07:36 domidumont joined #perl6
07:36 darutoko joined #perl6
07:38 domidumont joined #perl6
07:39 JRaspass joined #perl6
07:40 LazyJoe joined #perl6
07:42 LazyJoe Hello. Is there anything like "Perl6 for a Perl5 programmer"?
07:43 tadzik http://perlgeek.de/en/article/5-to-6 is what you're after, LazyJoe :)
07:43 TEttinger under a minute, wow
07:43 LazyJoe Thanks!
07:43 tadzik TEttinger: really? I thought the latency on my client is higher than that... :P
07:44 tadzik LazyJoe: for the record, it's listed at http://perl6.org/documentation/ too :)
07:44 domidumont joined #perl6
07:44 LazyJoe tadzik: Following Larry, and, as my nick indicates: I am a lazy person. :-)
07:45 tadzik :)
07:45 tadzik welcome to the party
07:46 masak the lazy party
07:46 * masak .oO( we've been trying to get it going for three years )
07:58 FROGGS[mobile] lizmat: the "Introducing Perl 6" flyer is awesome :o)
07:59 FROGGS[mobile] lizmat: but there is a blank missing on the backside, where the IRC channel is mentioned
08:00 abraxxa joined #perl6
08:03 notostraca joined #perl6
08:07 rindolf joined #perl6
08:09 azawawi joined #perl6
08:09 azawawi hi
08:12 domidumont joined #perl6
08:16 azawawi https://github.com/azawawi/perl6-libzip/blo​b/master/examples/01-create-zip-archive.pl6    # C-style libzip :)
08:16 azawawi Perl 6 rocks
08:27 masak :)
08:28 [Sno] joined #perl6
08:28 zakharyas joined #perl6
08:29 FROGGS[mobile] I dont understand the magic numbers in zip_source_file
08:29 brrt joined #perl6
08:29 lizmat Good *, #perl6
08:29 yoleaux 00:34Z <sortiz> lizmat: I bisected the regression reported (20x Buf.list to slurpy arg) to https://github.com/rakudo/rakudo/commit/​f25d41c6782a4a2f32b6f01722b475cffbe9c3be , updated bench details in https://gist.github.com/sal​ortiz/4ef300b4d7f2e9738024
08:30 lizmat FROGGS[mobile]: alas, that's not the only thing wrong with the flyer...  :-(   the next one will be better
08:30 FROGGS[mobile] but I must admit that I also dont grok what zip_source_file is actually doing
08:30 sortiz \o lizmat
08:31 FROGGS[mobile] lizmat: it is still an awesome flyer :o)
08:31 lizmat :-)
08:32 abraxxa joined #perl6
08:33 dalek rakudo/nom: 3c7ea05 | (Salvador Ortiz)++ | lib/NativeCall/Types.pm6:
08:33 dalek rakudo/nom: Add non slurply candidate for method new to CArray
08:33 dalek rakudo/nom:
08:33 dalek rakudo/nom: Much faster when creating from a List, Array, Iterables, Seq, etc.
08:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c7ea05257
08:33 dalek rakudo/nom: 72faf30 | lizmat++ | lib/NativeCall/Types.pm6:
08:33 dalek rakudo/nom: Merge pull request #721 from salortiz/patch-1
08:33 dalek rakudo/nom:
08:33 dalek rakudo/nom: Add non slurply candidate for method new to CArray
08:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72faf3090f
08:34 lizmat sortiz: I'm not sure if there'e something else that needs to be done now?
08:34 azawawi FROGGS[mobile]: man zip_source_file :)
08:35 azawawi FROGGS[mobile]: http://linux.die.net/man/3/zip_source_file
08:35 azawawi im trying to make the memory-based data source work since it is the most useful to us
08:35 azawawi i.e. zip_source_buffer
08:36 johndau`` joined #perl6
08:38 FROGGS[mobile] azawawi: ahh, I thought your are exposing your own api
08:38 FROGGS[mobile] I see now
08:38 azawawi FROGGS[mobile]: it is a first step
08:39 azawawi FROGGS[mobile]: the $archive (handle) is going to be the class....
08:39 azawawi FROGGS[mobile]: and that was deprecated File::Zip :)
08:39 azawawi FROGGS[mobile]: why reinvent the wheel
08:39 SmokeMachine____ joined #perl6
08:39 kipd joined #perl6
08:40 btyler ugexe: re perl6 talks at YAPC::NA, I submitted https://gist.github.com/kanat​ohodets/e7ab4fe1950b124a5556 ; if it gets accepted I'll be both excited and terrified :D
08:40 fireartist joined #perl6
08:41 azawawi btyler++
08:41 brrt btyler++ looks cool
08:41 peteretep joined #perl6
08:42 jnap joined #perl6
08:42 pnu joined #perl6
08:43 Spot__ joined #perl6
08:43 ashleydev joined #perl6
08:43 olinkl joined #perl6
08:43 mithaldu_ joined #perl6
08:44 azawawi FROGGS[mobile]: $zip-archive.IO API to be exact is the thing im targeting over the weekend hopefully
08:44 PotatoGim joined #perl6
08:44 mrsolo joined #perl6
08:44 notbenh joined #perl6
08:46 lizmat sortiz: make test hangs for me  :-(
08:48 sortiz I was waiting for travis... :-(
08:48 lizmat reverting makes make test pass again  :-(
08:49 sortiz Weird, the change is trivial imo. :-(
08:50 Hotkeys can I use an array in a regex
08:50 lizmat yeah, that's why I merged it  :-)
08:50 Hotkeys like to match the string to an item in the array
08:51 Hotkeys like $foo ~~ /:s baz qux any(@array) thump/
08:52 Hotkeys I suppose I could match (.+) and then do {$0 eq any(@array)}
08:52 Hotkeys but is there a better way?
08:52 sortiz lizmat, I'm suspect nextsame is somehow looping.
08:53 lizmat yeah... but why is that in there anyway ?
08:54 brrt ouch, /me has a huge memory leak on my hand in moar it seems
08:54 lizmat yuck... quickly, wash your hands!  It may be contagious  :-)
08:55 caasih joined #perl6
08:55 johndau joined #perl6
08:55 lizmat sortiz: taking out the nextsame doesn't make a difference
08:55 lizmat hangs at the same place
08:57 lizmat m: use NativeCall; my @a := CArray[num].new()  # the hanging one
08:58 camelia rakudo-moar 72faf3: OUTPUT«(timeout)»
08:58 sortiz lizmat, Dunno, seemed so simple.
08:58 lizmat perhaps we're tickling a bug  :-)
08:59 brrt seems that way lizmat
08:59 brrt a nasty one too
08:59 zakharyas joined #perl6
08:59 sortiz A bug that new() chooses the slurpy candidate!
09:00 lizmat sortiz: that's actually correct
09:02 lizmat testing a fix
09:02 sortiz Well, that can be solved by 'if(!@values) { nqp::create(self) } else { self.new(@values }' in that candidate.
09:02 lizmat or just adding a new() { nqp::create(self) } candidate
09:03 sortiz Where are one at the top!
09:03 sortiz Nop, sorry.
09:04 CIAvash Hotkeys: I think you can just use the array, it will do the alternation. Have you tried this: $foo ~~ /:s baz qux @array thump/
09:05 sortiz Fingers crossed.
09:05 Hotkeys oh
09:05 dalek rakudo/nom: 67e1ecc | lizmat++ | lib/NativeCall/Types.pm6:
09:05 dalek rakudo/nom: Fix looping issue, sortiz++
09:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67e1eccafd
09:05 Hotkeys I just tried that CIAvash
09:05 RabidGravy joined #perl6
09:05 Hotkeys didn't work
09:05 lizmat sortiz: with this out of the way, is there something else I should look at ?
09:07 sortiz lizmat, taking advantage of the question and based on your BlobbyIterator, I though why not make Blob/Buf does Iterable?
09:08 lizmat what would that give us ?
09:08 * lizmat must not be quite awake yet  :-)
09:09 [Tux] test            22.482
09:09 [Tux] test-t          12.608
09:09 [Tux] csv-parser      52.312
09:09 azawawi so i start my android studio today to work on it and it asks me to download 3.2 GB worth of updates... :(
09:09 tadzik new android release, eh?
09:10 sortiz For example:  my @Buf := Buf.new; for @Buf { $_++ }
09:10 azawawi sucks right? like an IDE's whole purpose is to develop fast... and a 3.2 GB download is not my idea of fast :)
09:11 azawawi tadzik: :)
09:11 azawawi tadzik: i have some PRs for you since you popped up :)
09:11 sortiz lizmat, And all Any-iterable-methods
09:11 tadzik yeah, Shell::Command
09:11 azawawi tadzik: https://github.com/tadzik/Shell-Command/pull/10
09:13 sortiz lizmat, And its enough with removing the Seq.new in both .list methods, renaming them to .iterator and adding new list() { List.from-iterator(self.iterator) } :)
09:13 tadzik I was reluctant at first since it's a dependency of panda, but I now noticed that I don't neceserilly have to update panda's Shell::Command just yet :P
09:13 azawawi tadzik: the biggest problem as far as i see it
09:13 azawawi tadzik: Shell-Command's which is bad
09:14 azawawi tadzik: please at least remove the tests from it in panda version
09:14 azawawi tadzik: it is breaking appveyor windows builds constantly
09:14 tadzik I see
09:14 lizmat so where would the pull-one then live ?
09:14 tadzik honestly, I'm not sure if which() even belongs in Shell::Command
09:14 lizmat sortiz: because we need a dedicated one?
09:15 tadzik especially now that there's File::Which for it
09:15 azawawi remove it :)
09:15 azawawi please
09:15 tadzik that can certainly be arranged :)
09:15 azawawi tadzik++
09:15 tadzik can I easily pull in the rest of the changes from the PR?
09:15 * azawawi wonders why "perl6 -Ilib -c script.pl6" creates a lib/.precomp
09:16 azawawi lizmat: is that a side effect or by design?
09:16 tadzik azawawi: well, people may rely on its existence now that it's there
09:16 brrt it is a designed side effect
09:17 azawawi brrt: :)
09:17 lizmat nine would be able to tell exactly, but the -Ilib creates a new REPO chain
09:17 tadzik so I can't just remove it, a deprecation notice maybe
09:17 azawawi tadzik: i see... at least remove the tests on windows?
09:17 tadzik azawawi: will they still not work if we use File::Which?
09:18 azawawi tadzik: they pass on File::Which
09:18 tadzik ok, perfect
09:18 tmch joined #perl6
09:18 sortiz lizmat, right now .list in Blob and .list in Buf uses an anon class that does BlobblyIterator + an specific pull-one
09:18 azawawi tadzik: but if you want to be conservative, deprecate it and make tests non-win32
09:19 azawawi tadzik: since File::Which is still missing tests
09:19 tadzik ah
09:19 tadzik azawawi: does File::Which work fine on Win32 (yet?)
09:19 azawawi tadzik: File::Which works on all :)
09:20 azawawi tadzik: but it is not 100% tested that is what im saying
09:20 RabidGravy plan 9? AmigaOS?
09:20 tadzik right, so if S::C uses that, when I merge the PR, everything is perfect
09:20 tadzik right
09:20 azawawi RabidGravy: MSDOS also
09:20 azawawi RabidGravy: :)
09:21 tadzik azawawi: may I ask you to split commits like this: https://github.com/azawawi/Shell-Command/com​mit/afc6ffaa1570f4165970fe9d5bd9ac07305eea7b into separate ones next time? :)
09:21 brrt tadzik: maybe my python impl of which might be of assistance
09:21 tadzik if we decide to only keep part of it
09:21 azawawi RabidGravy: also i still have the whence request from you to do :)
09:22 sortiz lizmat, A prof-of-concept: https://gist.github.com/sal​ortiz/62085f61250f14a01ebd
09:22 brrt https://github.com/bdw/GridKi​t/blob/master/gridkit.py#L27
09:22 azawawi tadzik: sure
09:22 tadzik awesome
09:23 azawawi tadzik: atomic commits programming mode enabled.  :)
09:23 tadzik \o/
09:24 CIAvash m: my @a = 'a'..'d'; 'foo a bar' ~~ /:s foo @a bar/
09:24 camelia rakudo-moar 67e1ec: ( no output )
09:25 CIAvash m: my @a = 'a'..'d'; say so 'foo a bar' ~~ /:s foo @a bar/
09:25 camelia rakudo-moar 67e1ec: OUTPUT«True␤»
09:25 CIAvash m: my @a = 'a'..'d'; say so 'foo e bar' ~~ /:s foo @a bar/
09:25 camelia rakudo-moar 67e1ec: OUTPUT«False␤»
09:26 sortiz m-star: my @values := Buf.new(0 xx 100).list;
09:27 CIAvash Hotkeys: Maybe I misunderstood, but I thought this is what you wanted to do ↑
09:27 sortiz star-m: my @values := Buf.new(0 xx 100).list;
09:27 camelia star-m 2015.09: ( no output )
09:28 azawawi tadzik: please enable AppVeyor support on Shell-Command
09:28 azawawi tadzik: so it will have windows CI
09:28 sortiz m: my @values := Buf.new(0 xx 100).list;  # This now don't work
09:28 camelia rakudo-moar 67e1ec: OUTPUT«Type check failed in binding; expected Positional but got Seq ((0, 0, 0, 0, 0, 0, 0,...)␤  in block <unit> at /tmp/OJlU0pJs7T line 1␤␤»
09:29 lizmat sortiz: I'm about to be away for a few hours: I'll kick off a build and a spectest with your changes and look at them when I'm back
09:30 sortiz Ok, thank you. CY later.
09:30 azawawi tadzik: https://ci.appveyor.com/project/azaw​awi/shell-command/build/1.0.2#L1061
09:31 azawawi tadzik: also travis CI https://travis-ci.org/tadzik/Shell-Command/builds
09:32 tadzik right, I have to do that
09:32 tadzik I never heard of appveyor before though, is that the only one that supports windows?
09:32 lizmat sortiz: Method 'pull-one' must be implemented by utf8 because it is required by a role   :-(
09:32 bjz joined #perl6
09:34 lizmat afk&
09:34 nine azawawi: I'm gonna explain that in my talk at the German Perl Workshop this afternoon
09:35 azawawi tadzik: yup
09:35 azawawi tadzik: https://www.appveyor.com/
09:36 azawawi nine: explain appveyor ci?
09:37 nine Explain lib/.precomp
09:38 nine Starting at page 34: http://niner.name/talks/A%20look%20behind%20t​he%20curtains%20-%20module%20loading%20in%20P​erl%206/Module%20loading%20in%20Perl%206.pdf
09:40 azawawi nine: cool
09:40 * azawawi reads it
09:40 nine I've not even given this talk yet and it already becomes usefull :)
09:42 tadzik azawawi: ok, I think it's done
09:43 brabo joined #perl6
09:44 wamba joined #perl6
09:45 azawawi tadzik: https://ci.appveyor.com/project/t​adzik/Shell-Command/branch/master # build started :)
09:45 azawawi tadzik: appveyor queues them one at a time unlike travis ci
09:46 azawawi tadzik: now chicken and egg problem
09:46 azawawi tadzik: panda depends on shell-command which broken on win32
09:46 nine azawawi: If you have comments or criticism for my explanation, there's still time to include your feedback in the talk ;)
09:46 tadzik azawawi: ah, so I do need to fix the bootstrap
09:47 azawawi nine: well perl6 -Ilib -c script.pl6 => create lib/.precomp is wrong imho
09:47 nine azawawi: is it wrong that we do that or is my description wrong?
09:47 azawawi nine: imagine who will be using -c syntax check... IDEs, editors... creating a folder there isnt is bad
09:48 azawawi nine: nah i skimmed through it... it explains a lot of information. thanks :)
09:49 nine azawawi: your argument could be phrased as "creating those .pyc files or .o files or .jar files is bad" because IDEs or editors will do it.
09:49 jack_rabbit joined #perl6
09:50 travis-ci joined #perl6
09:50 travis-ci Rakudo build errored. lizmat 'Merge pull request #721 from salortiz/patch-1
09:50 travis-ci https://travis-ci.org/raku​do/rakudo/builds/115002708 https://github.com/rakudo/rakudo/c​ompare/59adbefdef51...72faf3090f29
09:50 travis-ci left #perl6
09:50 nine Actually we do already better than these others because we store the binaries in a single directory instead of scattering them around the source tree.
09:54 azawawi nine: perl6 -c is not javac :)
09:54 azawawi nine: the objective a of -c is to syntax check, not create side effects. That's what i meant
09:55 azawawi https://github.com/azawawi/perl6-libzip/blob/​master/examples/01-create-zip-archive.pl6#L28  # add a zip entry from memory data source... finally :)
09:56 brrt joined #perl6
09:58 brrt is GPW today?
09:58 brrt btw, the fosdem videos are now quite watchable :-)
09:58 timotimo wow, how did that happen?
09:58 tadzik today is the middle of gpw, yes
09:58 jnthn azawawi: fwiw, you can't very properly parse Perl 6 without doing side-effects anyway. BEGIN blocks, use statements, constant evaluations, etc. all need to happen during the parse if you want an accurate one (which you do for perl6 -c, though you can get away with a huge amount in a syntax highlighter).
09:58 timotimo the middl already? wow.
10:01 jnthn lizmat, sortiz: Nooo, Buf should NOT BE Iterable! Just like Str and Uni should not. They're items.
10:02 tadzik nine: did you have a chance to look at Dancer importing issue?
10:02 sortiz jnthn, Ok.
10:03 jnthn If you want iterable + mutable + native, native arrays are The Thing
10:08 RabidGravy Oh I hate APIs which do "if ret < 0 then error else if ret > 0 then maybe an error depending on what it is"
10:13 donaldh joined #perl6
10:19 azawawi jnthn: yeah I agree. Anyway i will make my atom syntax check linter check for lib folder existence before doing a 'perl6 -Ilib -c' in the first place :)
10:19 timotimo it'd be great if CPUs had support for complex numbers
10:20 timotimo then you could return a complex number and the real part is "error?" and the imaginary part gives you other kinds of status information
10:20 RabidGravy well you could get yourself an FPGA or two and fake one up
10:21 timotimo it's a lot of work, though
10:23 RabidGravy they make little fpga shields for the RPi - I'm avoiding picking one up to avoid the inevitable blackhole of distraction
10:25 abaugher joined #perl6
10:27 RabidGravy Ooh just got a fabulous promo from David Meiser, that'll get the day off to a good start
10:28 llfourn does anyone know what "token finishpad { <?> }" does in p6 grammar?
10:31 jnthn llfourn: <?> just means "always match"
10:32 llfourn jnthn: ah so it's like a marker?
10:32 jnthn llfourn: Well, and it triggers an Action method, which does the interesting stuff
10:32 llfourn ah right yep makes sense
10:32 llfourn thanks!
10:40 maybekoo2 joined #perl6
10:54 llfourn RabidGravy: what do you do with your RPi?
10:56 mr-foobar joined #perl6
11:04 espadrine_ joined #perl6
11:06 nine tadzik: not yet. Everything will be better once my talk is over :)
11:06 pmurias joined #perl6
11:06 tadzik oh :]
11:06 tadzik understood
11:11 timotimo https://github.com/HackerFantastic/Publi​c/blob/master/exploits/cve-2016-1531.sh  -  whee!
11:17 nakiro joined #perl6
11:19 pmurias joined #perl6
11:21 pmurias awwaiid: re precompiling when checking -c, it's actually something you should want. There is no need to syntax check something again when it's already checked
11:23 RabidGravy llfourn, well they just sit there occasionally blinking a light or two at the moment
11:23 tmch joined #perl6
11:23 psch .tell skids the rw-ness regression from yesterday is in commit fdd37a9e0bef16eb3e4bb24ddd59247e379b5038, fyi
11:23 yoleaux psch: I'll pass your message to skids.
11:23 kjs_ joined #perl6
11:24 RabidGravy really need to make the PiLite interface at some point
11:25 llfourn RabidGravy: Do you have any cool plans? I'm thinking of getting one but not sure what to do yet.
11:25 llfourn I think I want to try it out as a classic console emulator
11:25 timotimo is PiLite about light or about being the "lite" version of something else?
11:26 RabidGravy it's a small board with 64 leds in a grid
11:26 RabidGravy so loadsalights
11:26 timotimo ah, ok
11:27 RabidGravy llfourn, medium term plan is make a "live streaming appliance"
11:27 llfourn for your TV?
11:27 RabidGravy nah, for real live music
11:28 llfourn oh cool.
11:28 llfourn ie it pushes the live stream?
11:28 RabidGravy so you're a DJ or a musician and you're doing a gig and you want to stream to the internet live, plug one end into the internet, plug audio in the other and away you go
11:29 dalek nqp: 78e5fe9 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
11:29 dalek nqp: [js] Don't name js functions _ as we don't walk the js call stack anymore.
11:29 dalek nqp: review: https://github.com/perl6/nqp/commit/78e5fe9f85
11:29 dalek nqp: 359fa7c | (Pawel Murias)++ | src/vm/js/RegexCompiler.nqp:
11:29 dalek nqp: [js] Set $¢ when entering a QAST::Regex.
11:29 dalek nqp: review: https://github.com/perl6/nqp/commit/359fa7c0e6
11:29 dalek nqp: 8966cfd | (Pawel Murias)++ | src/vm/js/ (2 files):
11:29 dalek nqp: [js] Eval freshly produced js code when nqp-js is running on top of JavaScript.
11:29 llfourn hmm yeah sounds sweet.
11:29 dalek nqp:
11:29 dalek nqp: This allows nqp-js-on-js to pass test 49 where regexes are compiled at runtime.
11:29 dalek nqp: review: https://github.com/perl6/nqp/commit/8966cfd148
11:30 llfourn what is nqp-js-on-js?
11:30 RabidGravy a couple of manufacturers make these kind of things but they're fairly expensive or built in to expensive digital mixers or it's built in to DJ software like Traktor
11:31 pmurias llfourn: nqp-js compiled to js (and running on node.js)
11:32 pmurias as opposed to nqp-js running on MoarVM and emitting js (which is then passed to node.js)
11:33 llfourn pmurias: cool.
11:33 llfourn I didn't know there was a like a js transpiler and then a JS backend
11:33 llfourn I thought that all the work was in the backend
11:34 llfourn RabidGravy: I would be interested to know how people make configurations available for RPi
11:34 jnthn Well, NQP is written in NQP, so once you get a sufficiently good NQP to JS compiler, you can use it to compile NQP itself. :)
11:35 llfourn so lets say you want to create a new RPi streamer for your friend or w/e is there a way you can auto deploy your thing as script?
11:36 llfourn jnthn: self-bootstrapping compilers sorta blow my mind :)
11:37 FROGGS[mobile] joined #perl6
11:37 kalkin- joined #perl6
11:37 lizmat jnthn: message received
11:38 buharin joined #perl6
11:40 timotimo oh, wow
11:41 timotimo guess who spends 54% time inside get (IO::Handle:D:)? apparently, compiling SDL2::Raw ... ?!?!
12:02 Skarsnik joined #perl6
12:03 kid51 joined #perl6
12:18 DarthGandalf joined #perl6
12:19 awwaiid pmurias: I think the -c question was from someone else
12:21 awwaiid I didn't know NQP was self-hosting! neat
12:24 FROGGS joined #perl6
12:27 kaare_ joined #perl6
12:30 timotimo of course it is! :)
12:34 erez joined #perl6
12:36 erez Hey all, anyone had a chance to attempt to build a website on p6 Web::App or any other p6 module?
12:37 DrForr_ erez: Well, I'm working on getting https://github.com/drforr/perl6-App-prancer into fighting shape, especially since I'm giving what'll probably be 3 talks on it.
12:37 FROGGS erez: I did a Bailador website once
12:37 musca joined #perl6
12:38 DrForr_ It's not quite ready for prime time, but what's in github should give you an idea of its flavor.
12:38 FROGGS erez: but this was more than a year ago
12:41 erez I want to try this as a learning experience, and wonder how much would I need to wrestle with the modules...
12:41 dalek Inline-Perl5: 7d648a9 | (Stefan Seifert)++ | / (3 files):
12:41 dalek Inline-Perl5: Fix calling imported functions that don't exist in the source package
12:41 dalek Inline-Perl5:
12:41 dalek Inline-Perl5: When a loaded module exported a symbol that doesn't exist in the module
12:41 dalek Inline-Perl5: itself because it was for example generated at runtime or pulled from
12:41 dalek Inline-Perl5: some other module, the call would fail because we always looked in the
12:41 dalek Inline-Perl5: loaded module directly. Just call the imported function instead.
12:41 dalek Inline-Perl5:
12:41 dalek Inline-Perl5: This fixes Dancer2's DSL.
12:41 dalek Inline-Perl5:
12:41 dalek Inline-Perl5: Thanks to tadzik++ for pointing this out!
12:41 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/7d648a9ce2
12:42 llfourn is there a way to automatically throw a failure returned from something wihtout having to check the value returned is a failure?
12:43 psch m: use fatal; sub f { fail "foo" }; my $x = f(); say "alive"
12:43 camelia rakudo-moar 67e1ec: OUTPUT«foo␤  in sub f at /tmp/vau18m98hZ line 1␤  in block <unit> at /tmp/vau18m98hZ line 1␤␤»
12:43 psch m: sub f { fail "foo" }; my $x = f(); say "alive"
12:43 camelia rakudo-moar 67e1ec: OUTPUT«alive␤»
12:43 llfourn psch: hmm cool thanks
12:43 llfourn hopefully that's lexical?
12:44 dalek rakudo/nom: b2324ed | lizmat++ | lib/NativeCall.pm6:
12:44 dalek rakudo/nom: Make signed_ints_by_size lookup faster
12:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2324ed9d4
12:44 dalek rakudo/nom: 9aa0144 | lizmat++ | lib/NativeCall.pm6:
12:44 dalek rakudo/nom: Streamline type and REPR lookups / mapping
12:44 dalek rakudo/nom:
12:44 dalek rakudo/nom: Also alphabetize lookup maps for easier maintenance
12:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9aa0144f72
12:44 psch yeah, use is lexical
12:44 tadzik nine++ \o/
12:44 tadzik ermagherd, I can't wait to try it
12:46 timotimo lizmat: wow, did that actually make a noticable difference? impressive
12:47 buharin joined #perl6
12:47 lizmat timotimo: took a few secs off of make test
12:48 timotimo OK, that's impressive
12:48 timotimo well done :)
12:49 tadzik nine: you didn't increase the version number and now it doesn't install :P
12:55 dalek rakudo/nom: f0a21b6 | FROGGS++ | src/core/Env.pm:
12:55 dalek rakudo/nom: push environment variable values through val()
12:55 dalek rakudo/nom:
12:55 dalek rakudo/nom: This fixes the issue where `FOO=0 perl6 -e "say so %*ENV<FOO>"` said True.
12:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f0a21b6f2c
12:55 dalek Inline-Perl5: 78e1f44 | (Stefan Seifert)++ | META.info:
12:55 dalek Inline-Perl5: Version 0.5
12:55 dalek Inline-Perl5:
12:55 dalek Inline-Perl5: Changes:
12:55 dalek Inline-Perl5: * Fix calling imported functions that don't exist in the source package
12:55 dalek Inline-Perl5: * Fix examples in the README
12:55 dalek Inline-Perl5: * Fix calling inherited package methods of Perl 5 packages
12:55 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/78e1f441c9
12:57 timotimo tadzik: i'm working on some changes to the profiler's output right now that'll make profiles smaller, but the format changed a bit from what the qt profiler expects
12:58 timotimo remind me how much was the arbitrary limit for our json parser there?
13:00 FROGGS joined #perl6
13:00 nine m: my &foo = sub { say "foo!"; }; &foo(1);
13:00 camelia rakudo-moar 9aa014: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub  at /tmp/ZlZ23cCDtT line 1␤  in block <unit> at /tmp/ZlZ23cCDtT line 1␤␤»
13:00 nine Why are we so picky here?
13:03 moritz we're always picky with subs
13:03 moritz it's just that blocks get an implicit, optional argument, which is why it looks less picky
13:03 nine I thought not declaring any signature at all would give you the same semantics as perl 5
13:03 psch nine: only when you actually use @_
13:04 tadzik timotimo: about the size of CORE.setting profile I think :P
13:04 moritz only if @_ is actually used in the body
13:04 psch m: my &foo = sub { @_; say "foo!"; }; &foo(1);
13:04 camelia rakudo-moar 9aa014: OUTPUT«foo!␤»
13:04 tadzik nine++! \o/
13:04 timotimo tadzik: let me have a look what the core setting profile is with the new changes
13:05 tadzik right, it might suddenly be small enough
13:05 tadzik timotimo: does the format change impact qt profiler but not the angular profiler?
13:05 timotimo it affects both
13:05 timotimo i've already changed the angular profiler, though
13:07 timotimo https://gist.github.com/timo/2d4bf518f27465cd7a51 <- tadzik
13:07 tadzik ah
13:08 tadzik so it doesn't repeat strings anymore, that's the idea?
13:09 tadzik wait, no
13:09 bjz joined #perl6
13:10 timotimo the repetitions it kicks out are names of types in allocations and filename, line number and routine name in the callgraph
13:12 telex joined #perl6
13:13 tadzik nine: sooooo, what are the hopes of passing regexes to Dancer routes? :D
13:13 tadzik timotimo: right, makes sense
13:14 DrForr_ Prancer will support REs :)
13:15 pmurias Prancer?
13:15 DrForr_ https://github.com/drforr/perl6-App-prancer
13:15 garu hi everyone! quick question: I have %hash = (a => 'foo') and @array = (42, 'bla'). What's the most idiomatic way of turning %hash into (a => ('foo', 42, 'bla'))?
13:16 pmurias why use 'prance;' instead of 'start;'? ;)
13:16 jnthn For one, start is a built-in
13:17 ilmari m: my %hash = (a => 'foo'); my @array = (42, 'bla'); %hash<a>.push: @array; say %hash
13:17 camelia rakudo-moar f0a21b: OUTPUT«Cannot call push(Str: Array); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at /tmp/lHe7JUIgCG line 1␤␤»
13:17 pmurias jnthn: that's a good reason ;)
13:18 DrForr_ No really good reason, it just sounded decent.
13:18 garu ilmari: that's where I'm stalled... no idea how to treat Str as the first element of an array :(
13:18 psch m: my %hash = (a => 'foo'); my @array = (42, 'bla'); %hash<a> = (|%hash<a>, |@array); say %hash
13:18 camelia rakudo-moar f0a21b: OUTPUT«a => (foo 42 bla)␤»
13:19 timotimo m: my %hash = (a => 'foo'); my @array = (42, 'bla'); %hash.push(a => @array); say %hash.perl
13:19 camelia rakudo-moar f0a21b: OUTPUT«{:a("foo")}␤»
13:19 timotimo m: my %hash = (a => 'foo'); my @array = (42, 'bla'); %hash.push(a => |@array); say %hash.perl
13:19 camelia rakudo-moar f0a21b: OUTPUT«{:a("foo")}␤»
13:19 timotimo m: my %hash = (a => 'foo'); my @array = (42, 'bla'); %hash.push((a => |@array)); say %hash.perl
13:19 camelia rakudo-moar f0a21b: OUTPUT«{:a($["foo", 42, "bla"])}␤»
13:19 timotimo there we go.
13:19 psch yeah, that's neater
13:19 garu thanks!
13:19 buharin joined #perl6
13:20 timotimo tadzik: a core setting profile just got sigkilled :(
13:20 buharin joined #perl6
13:21 tadzik that's harsh
13:21 timotimo maximum effort.
13:24 timotimo i think i just have to free up some ram so it can finish
13:25 nine tadzik: get '/' => { 'Hello World' }; # you don't need a sub there :)
13:25 tadzik :o
13:25 tadzik correct!
13:27 DrForr_ And in Prancer, sub GET( '/' ) is route { 'Hello World' }
13:28 garu okay, looks like it worked! but Test's "is-deeply" is failing, claiming I got ${:bar($["12", "13", "14"]), :foo("42")} and expected $(:foo("42"), :bar(("12", "13", "14"))). my test is is-deeply( $data, (foo => '42', bar => ('12', '13', '14' ))). What am I doing wrong?
13:30 garu nine, tadzik: are you talking about bailador? or something else?
13:30 tadzik garu: better. Stay tuned :)
13:30 garu hahaha
13:31 garu tadzik: I'm asking because I'm doing a project in bailador and it's extremely incomplete
13:31 garu this very question is from a PR I'm making
13:32 * timotimo is freeing up even more ram
13:32 garu I already sent a minor PR yesterday, but now I'm adding several missing methods to Bailador::Request
13:33 garu this particular question (turning an Str value into an array is because current Bailador doesn't suppoort "?foo=bar&foo=baz"
13:33 garu tadzik: should I skip those PR's and just wait for whatever it is you're cooking? :)
13:34 dalek rakudo/nom: 3bb8b2f | lizmat++ | lib/NativeCall.pm6:
13:34 dalek rakudo/nom: Streamline string_encoding_to_nci_type
13:34 dalek rakudo/nom:
13:34 dalek rakudo/nom: Also make "ascii" the second one to test, as I feel it's more likely
13:34 dalek rakudo/nom: to match than "utf16".  But of course, YMMV.
13:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3bb8b2fa75
13:34 tadzik garu (IRC): I'm gonna give you a spoiler :)
13:35 timotimo Unhandled exception: Cannot find method 'handle-exception'
13:38 timotimo wtf.
13:38 timotimo now i can't open the source file, because vim gives an error and then segfaults
13:39 [Coke] awwaiid: how does a tutorial differ from a presentation, btw? :)
13:39 tadzik m: { our sub bar { say "ok" } }; bar()
13:39 camelia rakudo-moar f0a21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KEt34MfWXH␤Undeclared routine:␤    bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
13:39 tadzik what did I forget about?
13:40 awwaiid [Coke]: Longer. You may invite people to bring laptops. The focus is on learning to DO something rather than learning ABOUT something. But mostly longer.
13:40 psch tadzik: scopes are not packages?
13:40 tadzik bah
13:41 psch m: package Foo { our sub bar { say "ok" } }; Foo::bar()
13:41 camelia rakudo-moar f0a21b: OUTPUT«ok␤»
13:41 timotimo why wouldn't that land in the scope of the unit?
13:41 psch m: { our sub bar { say "ok" } }; say OUR::.keys
13:41 camelia rakudo-moar f0a21b: OUTPUT«(&bar)␤»
13:42 psch m: our sub bar { say "ok" }; bar
13:42 camelia rakudo-moar f0a21b: OUTPUT«ok␤»
13:42 psch m: our sub bar { say "ok" }; say MY::.keys
13:42 camelia rakudo-moar f0a21b: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ &bar $=finish $/ $?PACKAGE)␤»
13:42 psch m: { our sub bar { say "ok" } }; say MY::.keys
13:42 camelia rakudo-moar f0a21b: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish $/ $?PACKAGE)␤»
13:43 psch so we don't look through OUR:: for name resolution..?
13:43 timotimo apparently not
13:44 psch i think don't i know enough about how it should work to say whether that's as it should be :)
13:45 jnthn Sub calls always look in the lexical scope only
13:45 psch m: { our &f = sub { say "ok" } }; &f()
13:45 camelia rakudo-moar f0a21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WyVTR6UDDq␤Undeclared routine:␤    f used at line 1␤␤»
13:45 psch vOv
13:45 jnthn So, that error is correct
13:46 psch m: { our $f = "foo" }; say $f
13:46 camelia rakudo-moar f0a21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g6CSxJHC8t␤Variable '$f' is not declared␤at /tmp/g6CSxJHC8t:1␤------> 3{ our $f = "foo" }; say 7⏏5$f␤»
13:46 jnthn In fact, if we had to factor in package scopes, we couldn't do any compile-time checking of sub calls
13:46 jnthn Or variables
13:47 jnthn Because the set of symbols in a package can change at any time, but the set of symbols in lexical scope is fixed by CHECK time
13:47 timotimo profiling the core settings' compilation takes almost as much ram as i have
13:47 psch jnthn++
13:47 psch i would've been fine with "yeah it's supposed to be like that", but i enjoy learning about the reasons :)
13:48 dalek rakudo/nom: 79589da | lizmat++ | lib/NativeCall.pm6:
13:48 dalek rakudo/nom: Use the temporary variable that is available
13:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/79589da5d4
13:50 molaf joined #perl6
13:55 tadzik star: use HTTP::UserAgent: simple; # LTA error message
13:55 camelia star-m 2015.09: OUTPUT«===SORRY!===␤Could not find HTTP::UserAgent in any of:␤  file#/home/camelia/.perl6/2015.09/lib␤  inst#/home/camelia/.perl6/2015.09␤  file#/home/camelia/star-2015.09/share/perl6/lib␤  file#/home/camelia/star-2015​.09/share/perl6/vendor/lib␤  file#/ho…»
13:55 tadzik booo!
13:55 tadzik it actually says "Confused"
13:59 skids joined #perl6
13:59 psch m: use Test: foo;
13:59 camelia rakudo-moar 3bb8b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E6SlNLtLf4␤Confused␤at /tmp/E6SlNLtLf4:1␤------> 3use Test7⏏5: foo;␤»
14:03 buharin joined #perl6
14:04 dalek rakudo/nom: cacb874 | (Steve Mynott)++ | src/Perl6/Compiler.nqp:
14:04 dalek rakudo/nom: display REPL exit instructions as requested on perl6-compiler@
14:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cacb87449e
14:04 dalek rakudo/nom: f93babf | lizmat++ | src/Perl6/Compiler.nqp:
14:04 dalek rakudo/nom: Merge pull request #722 from stmuk/nom
14:04 dalek rakudo/nom:
14:04 dalek rakudo/nom: display REPL exit instructions as requested on perl6-compiler@
14:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f93babfbd7
14:04 lizmat afk for a few hours again&
14:12 [ptc] specifying version numbers for moar/nqp/rakudo and panda in travis-ci now works again :-)
14:15 sufrostico joined #perl6
14:17 pmurias joined #perl6
14:18 sftp joined #perl6
14:25 hoelzro o/ #perl6
14:25 pmurias hoelzro: \o
14:25 hoelzro is there anyway to suppress dalek messaging about a set of commits? I have a bunch of stuff I want to push up but I don't want to flood the channel
14:25 hoelzro o/ pmurias
14:29 skids hoelzro: Maybe if you do them all at once dalek will get kicked/rejoin and problem solved?
14:29 yoleaux 11:23Z <psch> skids: the rw-ness regression from yesterday is in commit fdd37a9e0bef16eb3e4bb24ddd59247e379b5038, fyi
14:29 hoelzro heh
14:31 skids .oO(Huh.  Strange.  I could have sworn I was running a version before the accessor changes and was seing that locally.)
14:31 garu [ptc]: how can I say in travis.yml that I want to test against 'v6.c' and the latest version (blead? latest? head?)
14:31 psch i'm fairly sure i bisected correctly, fwiw
14:32 RabidGravy joined #perl6
14:32 garu [ptc]: asking because of https://github.com/travis-ci/travis-c​i/issues/4910#issuecomment-194810199
14:32 kjs_ joined #perl6
14:33 skids psch: I'll file a bug, if you haven't.  Thanks.
14:42 cdg joined #perl6
14:44 dalek Heuristic branch merge: pushed 16 commits to rakudo/repl6 by hoelzro
14:45 hoelzro oh, that wasn't so bad.
14:50 [ptc] garu: I think using "6.c" inside the "perl6:" list should work
14:50 edehont joined #perl6
14:55 garu [ptc]: it does! (actually, it's 'v6.c', '6.c' fails) Question is, if I specify nothing it tests against blead. But how can I specify "this version, that version, and blead"?
14:56 prammer joined #perl6
14:56 buharin joined #perl6
14:58 garu apparently rakudobrew doesn't know what 'latest' is so if you need panda to install deps then 'rakudobrew build-panda' should be 'rakudobrew build-panda $VERSION'
14:58 garu only in blead perl6 it should be only 'rakudobrew build-panda'
14:59 garu which leads to a bad looking setup like the one in https://github.com/travis-ci/travis-c​i/issues/4910#issuecomment-194810199
15:02 nine tadzik: seats are for free btw
15:03 garu tadzik: should 'rakudobrew build-panda' build the panda tagged with the same version as the active perl6 from rakudobrew itself?
15:03 [ptc] garu: just extend the list: "perl6:\n- latest\n- v6.c\n 2015.09\n"
15:03 [ptc] garu: hopefully you understand what I mean!
15:03 [ptc] garu: also cool to know that it works with 'v6.c' :-)
15:03 garu [ptc]: I do, that's not really my point though. Nevermind :)
15:03 garu [ptc]: it is, right? I loved it
15:04 tadzik nine: ...oh
15:05 [ptc] garu: the 'rakudobrew build-panda $VERSION' thing actually looks like this: $([ "$TRAVIS_PERL6_VERSION" == "latest" ] && echo "" || echo $TRAVIS_PERL6_VERSION)
15:05 [ptc] garu: I worked it out today :-)  See also https://github.com/travis-ci/travis-c​i/issues/4910#issuecomment-147107862 if you're insterested
15:07 [ptc] garu: of course the code could be improved, but one would have to get rakudobrew to use blead when it doesn't know what the version is
15:11 skids psch,JRasPass: Filed ticket #127686 about the rw-ness issue.
15:11 garu [ptc]: I... I... I know, I'm the garu in that thread :D
15:11 garu [ptc]: >> 14:32 < garu> [ptc]: asking because of https://github.com/travis-ci/travis-c​i/issues/4910#issuecomment-194810199
15:12 garu [ptc]: >> 14:58 < garu> apparently rakudobrew doesn't know what 'latest' is so if you need panda to install deps then 'rakudobrew build-panda' should be 'rakudobrew build-panda $VERSION'
15:12 garu [ptc]: >> 14:59 < garu> which leads to a bad looking setup like the one in https://github.com/travis-ci/travis-c​i/issues/4910#issuecomment-194810199
15:12 stmuk [ptc]: https://github.com/tadzik/rakudobrew/pull/75 did build the last release!
15:12 garu [ptc]: my point is just "I wish there was a better way to do this" :P
15:13 tadzik garu: should, yeah
15:13 tadzik that'd make sense :)
15:13 garu tadzik: can I interest you in PR then? I'll try to cook something up sometime this weekend
15:14 tadzik garu: lovely
15:15 dalek perl6-examples: 1b86ca0 | Nic++ | categories/tutorial/01-word-wrap.pl:
15:15 dalek perl6-examples: Fixed skipping the last word
15:15 dalek perl6-examples:
15:15 dalek perl6-examples: This would originally skip the last word in the line without printing it to the next line.
15:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/1b86ca0e44
15:15 dalek perl6-examples: 96af943 | paultcochrane++ | categories/tutorial/01-word-wrap.pl:
15:15 dalek perl6-examples: Merge pull request #41 from nicqrocks/patch-1
15:15 dalek perl6-examples:
15:15 dalek perl6-examples: Fixed skipping the last word
15:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/96af943b09
15:15 garu [ptc]: your patch works remarkably well, btw, thanks! [ptc]++
15:15 stmuk [ptc]: I don't think it applies cleanly anymore though and it should be "rakudobrew build release" now I guess
15:15 garu (by patch I mean workaround on travis)
15:16 perl6newbee joined #perl6
15:19 dakkar joined #perl6
15:34 dalek rakudo/nom: 04c46cc | (Stefan Seifert)++ | src/core/CompUnit/RepositoryRegistry.pm:
15:34 dalek rakudo/nom: No longer tie modules in the home repo to rakudo versions
15:34 dalek rakudo/nom:
15:34 dalek rakudo/nom: Since we can actually share modules between rakudo versions, there's no
15:34 dalek rakudo/nom: point in keeping the version directories in the home repo (~/.perl6). So
15:34 dalek rakudo/nom: safe the user from having to install the same dists again after
15:34 dalek rakudo/nom: upgrading rakudo.
15:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/04c46cc42e
15:34 rudi_s m: my %x; %x<a> = <1 2 3>; for %x<a> { .say }
15:34 camelia rakudo-moar f93bab: OUTPUT«(1 2 3)␤»
15:34 rudi_s Is there a simple way to get the for loop to iterate over each element in the array?
15:35 rudi_s m: my %x; %x<a> = <1 2 3>.Slip; for %x<a> { .say } # works, but I don't know if this is the best way
15:35 camelia rakudo-moar f93bab: OUTPUT«1␤2␤3␤»
15:35 jnthn m: m: my %x; %x<a> = <1 2 3>; for %x<a>.list { .say }
15:35 camelia rakudo-moar f93bab: OUTPUT«1␤2␤3␤»
15:35 jnthn m: m: my %x; %x<a> = <1 2 3>; for @(%x<a>) { .say }
15:35 camelia rakudo-moar f93bab: OUTPUT«1␤2␤3␤»
15:36 jnthn m: my %x; %x<a> = <1 2 3>; %x<a>.map: { .say }
15:36 camelia rakudo-moar f93bab: OUTPUT«1␤2␤3␤»
15:37 rudi_s jnthn: Thanks, but I want to get the effect without modifying the for loop.
15:38 rudi_s I find the current behavior in perl6 not very intuitive that I can't just iterate over an array in a hash table. I know it was that way in perl5 too, but it still feels weird in perl6.
15:41 jnthn rudi_s: Oh, then the sensible way is just to bind to the hash, not assign
15:41 jnthn m: m: my %x; %x<a> := <1 2 3>; for %x<a> { .say }
15:41 camelia rakudo-moar f93bab: OUTPUT«1␤2␤3␤»
15:42 jnthn The "current behavior" won't be changing, so better to get used to it. :)
15:42 jnthn We've already been though 7-8 different lists implementations and the more things you make DWIM, the more overall confused everyone is.
15:43 rudi_s jnthn: Hm. Maybe I'll just use .list in the for loop. Makes it more clear to the reader. - Yeah, I know.
15:43 jnthn Yeah, I prefer to make sure of it at the point of the iteration
15:44 nine I have to admint however that this use case was complicated to make for $@arr { } iterate only once which is...disputable
15:45 jnthn nine: Yeah, I think there was a reason we ended up insisting on that...
15:46 nine I don't remember anyone mentioning the auto-itemization of Array and Hash in the discussion. It certainly surprised me just now.
15:47 nine Well it's moot now anyway :)
15:49 nine jnthn: would you object to me completely redesigning CompUnit::PrecompilationStore without regards for backwards compatibility? It's undocumented, untested, has only one user and I'm certain noone ever did anything with it outside the core.
15:49 RabidGravy someone be a love and make an MP3 decoder
15:55 jnthn nine: If it's not covered by the tests, it's not part of 6.c :)
15:55 jnthn nine: Has one user? :)
15:55 jnthn An in-core one?
15:56 RabidGravy I should have done it when I made the encoder
16:00 adu joined #perl6
16:03 nine jnthn: yes, only PrecompilationRepository even interacts with it
16:03 jnthn nine: OK. Then sounds like you're not going to cause any trouble by doing so.
16:04 nine tadzik: that was just awesome! You really should do the talking about Inline::Perl5 from now on :)
16:04 tadzik :D
16:04 tadzik I think I'll turn that into a blogpost, in which I don't forget some other motivational slogans I made up :P
16:05 nine I'm glad that I decided to fix the Dancer bug instead of overpreparing my talk :)
16:06 tadzik :)
16:11 * [Coke] boggles at a j2ee context root oddity.
16:16 * RabidGravy boggles at the portaudio designers using a double for "samplerate" when it would be better as a long
16:17 prammer joined #perl6
16:19 * perlpilot wonders what tadzik did that was so awesome
16:24 Actualeyes joined #perl6
16:25 gregf_ joined #perl6
16:26 rudi_s perlpilot: Did you have a look at my comment to the Tempfile bug report? Your fix introduces a race condition.
16:26 bioexpress joined #perl6
16:27 wamba joined #perl6
16:29 Houl joined #perl6
16:31 perlpilot rudi_s: Looked just now  :)
16:33 perlpilot I didn't realize that open/mkdir had a :mode option that had the same capability as chmod
16:33 timotimo can someone tell me what happened to my system here and what status my system is now in? https://gist.github.com/timo/fb96aabfc67ea1df96c5
16:35 khw joined #perl6
16:37 perlpilot And looking at the source, mkdir's mode does, but it doesn't look like open's mode can do fine grained permissions.
16:37 tadzik perlpilot: I loaded Dancer2 from Inline::Perl5 and presented a port of http://perldancer.org/ to Perl 6, running on stage :)
16:38 perlpilot tadzik: sweet!
16:40 tadzik I think I'll turn it into a blogpost to reach some broader audience :)
16:42 prammer joined #perl6
16:44 pmurias joined #perl6
16:44 RabidGravy timotimo, :-\ It shouldn't have broken anything it failed to install, and it will have failed any that the dependencies didn't go in, I'd go with running dnf upgrade again and see what happens
16:44 timotimo doing so now
16:45 timotimo but wth happened >_>
16:45 RabidGravy run out of disk space?
16:45 timotimo only if 20 gigabytes free isn't enough for a bunch of updates
16:45 timotimo (i've heard of xml being verbose, but *this* takes the *cake*!)
16:46 * geekosaur reminded of a game patch that used over 50GB working space
16:46 timotimo oh my, that's pretty bad
16:46 RabidGravy is it one big filesystem, it may use /var /boot /tmp
16:46 timotimo it's two btrfs subvolumes
16:47 timotimo one is / and the other is /home
16:47 timotimo this time it run through to completion
16:47 timotimo (potentially because i moved a few more gigabytes from the ssd to the hdd)
16:47 timotimo i guess i'm saved
16:48 RabidGravy aooo
16:48 timotimo let's boot into the new kernel and see how that breaks!
16:49 RabidGravy I'm running that kernel and it works fine for me
16:50 dalek nqp/profile-jvm: b9ab366 | donaldh++ | / (19 files):
16:50 dalek nqp/profile-jvm: Add moar compatible --profile to JVM backend
16:50 dalek nqp/profile-jvm: review: https://github.com/perl6/nqp/commit/b9ab366933
16:50 dalek nqp/profile-jvm: 265e780 | donaldh++ | / (2 files):
16:50 dalek nqp/profile-jvm: Temporarily borrow the moar profiler template.html
16:50 dalek nqp/profile-jvm: review: https://github.com/perl6/nqp/commit/265e7800d6
16:50 timotimo well, it still came up
16:50 timotimo 4.4.3-300?
16:54 ptolemarch joined #perl6
16:57 perlpilot rudi_s: I reopened the issue and fixed it for mkdir.   I didn't see a good way to do it with open since the $mode parameter only seems to take a string like "ro" or "wo" etc, and not full permissions.
16:57 perlpilot rudi_s: if you want to patch nqp + rakudo so that you can pass permissions like mkdir, that would be awesome :)
16:58 perlpilot rudi_s: keep in mind about language compatibility though
17:04 araujo_ joined #perl6
17:05 rudi_s perlpilot: Thanks. I've to admit I only checked if perms was there, not if it was sane :-/
17:05 dalek perl6-examples: 7381d5d | paultcochrane++ | categories/tutorial/01-word-wrap.pl:
17:05 dalek perl6-examples: [tutorial] allow filename def on command line
17:05 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/7381d5d516
17:06 araujo_ joined #perl6
17:07 rudi_s I've to admit I'm disappointed. Neither nqp + rakudo seem to be able to either set umask or allow passing the mask to open.
17:07 rudi_s So nobody thought about having to create files which are not public.
17:12 rudi_s Wow. It seems to use the stupid string args even throughout nqp ... looks like that's a major overhaul.
17:12 rudi_s I've really expected more from the successor of perl5.
17:12 RabidGravy timotimo, actually no it appears 4.4.3-201
17:13 domidumont joined #perl6
17:13 rudi_s perlpilot: There are two solutions I can think of. Either use nativecall and umask to restrict the umask during creation or create the file in a temporary directory with the correct permissions.
17:13 FROGGS[mobile] joined #perl6
17:14 MadcapJake joined #perl6
17:15 MadcapJake Skarsnik, I've tried gptrixie on a couple header files but I keep getting this error: «'--castxml-gccxml' does not work with c11»
17:16 Skarsnik you have cast not gccxml
17:16 MadcapJake oh, how do i fix that?
17:16 Skarsnik cast is something that supposed to replace gccxml (it use clang) but it does not like c99 or highter
17:17 Skarsnik hm, I don't remember, I think a gccxml binary is installed aside it on some distrib
17:17 Skarsnik with another name
17:18 tweakism about the topic from yesterday: https://pbs.twimg.com/media/CdMNh8DWIAATwKU.jpg
17:18 perlpilot rudi_s: If you make a patch I'll consider it.  Though, adding open mode to NQP might not be too onerous; then you'd just have to figure out how to expose it in rakudo
17:18 MadcapJake Skarsnik, «gccxml -v» says that it's available as `gccxml.real` how do i make gptrixie use that?
17:19 rudi_s perlpilot: I don't have any knowledge of nqp and a short look revealed that the mode seems to be always a string even in nqp.
17:19 Skarsnik edit the script or replace gccxml with gccxml.real?
17:20 Skarsnik I should probably add something to be able to change the binary used
17:22 tadzik argh, of course I can't grep for Inline::Perl5 code in the profiler outupt
17:22 tadzik the name is actually mangled :/
17:22 perlpilot rudi_s: aye, it's a special string, but NQP is a little more malleable than rakudo, so you can add a routine or parameter or whatever is needed
17:22 tadzik or so I think
17:24 rudi_s perlpilot: Well, but I don't know how the nqp interface to moarvm/jvm (everything I found looks like it passes strings as well to moarvm/jvm) and that must be adapted as well.
17:24 dalek perl6-examples: 549c81a | paultcochrane++ | categories/tutorial/01-word-wrap.pl:
17:24 dalek perl6-examples: Replace self-built words() with .words builtin
17:24 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/549c81a162
17:24 dalek perl6-examples: ac38395 | paultcochrane++ | categories/tutorial/01-word-wrap.pl:
17:24 dalek perl6-examples: Remove useless count variable
17:24 dalek perl6-examples:
17:24 dalek perl6-examples: ... it wasn't doing anything
17:24 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/ac38395f34
17:24 dalek perl6-examples: f69f12f | paultcochrane++ | categories/tutorial/01-word-wrap.pl:
17:24 dalek perl6-examples: Rename 'lines' sub to 'wrap'
17:24 dalek perl6-examples:
17:24 dalek perl6-examples: "at least that isn't quite so confusing"
17:24 dalek perl6-examples:                                 -- nine++
17:24 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/f69f12f4a8
17:24 dalek perl6-examples: 329d4a6 | paultcochrane++ | categories/tutorial/01-word-wrap.pl:
17:24 dalek perl6-examples: Get file lines directly from IO object
17:24 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/329d4a6c5b
17:25 * perlpilot lunch &
17:26 MadcapJake Skarsnik, how can I tell gptrixie to use gccxml.real *without* changing the script?
17:26 tadzik nine: hey, I managed to segfault stuff :P
17:27 tadzik nine: https://gist.github.com/ta​dzik/48b9886ed9d5357b8ccd
17:28 hoelzro what's the proper way to make sure attributes provided by a role are initialized when a consuming class is instantiated? if I provide BUILD in the role, it may be excluded by a BUILD in the consuming class
17:28 hoelzro (the role I'm talking about: https://github.com/rakudo/rakudo​/blob/repl6/src/core/REPL.pm#L88)
17:29 MadcapJake Skarsnik, aliasing in shell (in a shellscript or directly) doesn't seem to do it
17:32 geekosaur maybe in .bash_aliases. in the script itself won't work (aliases do not take effect in the file in which they are defined, to avoid loops)
17:32 MadcapJake geekosaur, oh never knew that, i tried bashrc but not bash_aliases
17:32 arnsholt Making a script with the same name and adding the directory it's in to the front of $PATH should work too
17:33 ugexe m: for 1,2,3 { once &say(1); once &?BLOCK(1); } # is this a bug? (&?BLOCK thinking its inside a `once` block)
17:33 camelia rakudo-moar 04c46c: OUTPUT«1␤Too many positionals passed; expected 0 arguments but got 1␤  in block  at /tmp/lY5d6qAnmn line 1␤  in block <unit> at /tmp/lY5d6qAnmn line 1␤␤»
17:33 MadcapJake arnsholt, sneaky :P
17:35 jnthn ugexe: I think so, yeah
17:35 jnthn ugexe: Probably something not marked as a thunk that should be
17:37 garu nine++ # DBIx::Class on Perl 6!
17:37 rudi_s I'm not sure if I already asked this. But what is the shortest/best way to do if %foo<bar>{$baz}:exists { say %foo<bar>{$baz}; } without duplicating the access?
17:37 garu tadzik++ # Dancer2 on Perl 6!
17:38 tadzik it's all nine's work, don't praise the messenger :P
17:40 vendethiel joined #perl6
17:43 MadcapJake Skarsnik, i get an error when I try to add "-I /another/include/path" after the header file
17:44 MadcapJake oops nvm :P thought it was an l but it was an I (github's font misled me)
17:44 ugexe jnthn: i see. i shall RT it
17:46 MadcapJake hmm, still doesn't want to find these header files
17:46 Skarsnik some header want a lot of -I
17:47 MadcapJake most of them are in /usr/include/glib-2.0 but when i `-I` that folder, it doesn't locate them
17:47 timotimo http://morepypy.blogspot.de/2​016/03/pypy-50-released.html - cool
17:48 lostinfog joined #perl6
17:50 Skarsnik oh the glib? it's quite tricky
17:50 dhunt joined #perl6
17:51 Skarsnik there could have stuff in /usr/lib/include for some glib/gtk stuff
17:51 Skarsnik like the gsk-conf.h I think
17:51 ilmari pkg-config --cflags glib-2.0
17:52 SCHAAP137 joined #perl6
17:52 dhunt Hi folks.  My name is Doug Hunt.  I work at UCAR, an atmospheric research institute in Boulder, CO.  I've been using perl5 for around 20 years now.
17:52 mst well, welcome to the other awesome perl :D
17:52 dhunt We have build up a large production system for processing weather satellite data using perl5 and PDL that is currently being put into operation
17:52 timotimo hello doug hunt!
17:52 dhunt for a NOAA satellite program.
17:53 dhunt As part of looking into future directions for our system, I'm looking into perl6!
17:54 mst I suspect quite a few of us are expecting a future where we end up with both perl5 and perl6 in production
17:54 mst (and given Inline::Perl6 for perl5 and Inline::Perl5 for perl6 quite possibly 'both in the same process' in some cases ;)
17:55 dhunt In an effort to painlessly start integrating perl6 functionality into our system, I'm trying to get Inline::Perl6 working.
17:56 mst have you already got a rakudobrew-ed moar install built and setup and confirmed working?
17:56 dhunt Yes.
17:56 MadcapJake Skarsnik, all my include errors are gone, but i still get this: http://hastebin.com/gocesanigi.txt
17:56 ugexe m: my $a := gather for 1,2,3,4 { take $_; say "xxx"; }; say $a[0]; # hmm i'm just now noticing this. i would have expected it to say 'xxx'
17:56 camelia rakudo-moar 04c46c: OUTPUT«1␤»
17:57 mst right, so, I guess the next thing is going to be to show us make/make test logs for Inline::Perl6
17:57 mst assuming that's where it blows up
17:57 dhunt Here is my trouble:  cat test62.pl shows this:  use Inline::Perl6; $p6 = Inline::Perl6->new; $p6->run('say "hello from perl 6"');
17:57 Skarsnik MadcapJake, Oh I get the same error when playing around with glib stuff, sadly I am not sure how to solve this, it's probably a gcc tag?
17:58 dhunt This takes 13 seconds to run!  time perl test62.pl; hello from perl 6\nreal0m13.690s
17:58 ugexe m: my $a := gather for 1,2,3,4 { take $_; say "xxx"; }; say $a[4];
17:58 camelia rakudo-moar 04c46c: OUTPUT«xxx␤xxx␤xxx␤xxx␤Nil␤»
17:58 ugexe m: my $a := gather for 1,2,3,4 { take $_; say "xxx"; }; say $a[3];
17:58 camelia rakudo-moar 04c46c: OUTPUT«xxx␤xxx␤xxx␤4␤»
17:59 dhunt Is this normal?  Or perhaps something is wrong with my installation?
18:00 mst I wouldn't be surprised if it's basically because Inline::Perl6 is embedding MoarVM even though MoarVM isn't really designed for that yet and then things like precompilation may not kick in for the weird setup approach
18:00 Skarsnik dhunt, 13 sec seems like a lot, can you add stuff in the p5 script to see where all the time is lost?
18:00 mst basically, I would *suspect* it's "normal", for values of "normal" involving nobody having tried to optimise it yet
18:01 mst but I would be hopeful that most of the time is spend in init, i.e. the ->new step
18:01 firstdayonthejob joined #perl6
18:02 ugexe i see that is indeed how its supposed to work. now to figure out how to use this to my advantage
18:03 MadcapJake Skarsnik, apparently it has to do with gcc version less than 4.5 but i'm using 5.2.1 o_O
18:03 Actualeyes joined #perl6
18:03 dhunt You are right!  When I run this through a perl5 debugger, ~13 seconds is spent on the 'new' line.  The 'run' line is instant.
18:03 Skarsnik MadcapJake, gccxml is supposed to be 4.9 x)
18:04 mst dhunt: right, so, basically, the awesome lunatic who wrote Inline::Perl6 (nine) has waaayy too many projects and has been focusing on other things, but I'm sure that's 'unoptimised' rather than 'unoptimisable'
18:05 ilmari $ time perl6 -e 'use Inline::Perl5'
18:05 ilmari real0m6.896s
18:05 TimToady ugexe: in general, using laziness to intentionally trigger side effects is going to be a bit dicey, since we might optimize some laziness into batches
18:05 ilmari dhunt: how long does that take on your machine?
18:05 MadcapJake c programming tools are so confusing
18:06 dhunt [dhunt@fox src]$ time perl6 -e 'use Inline::Perl5'; real0m12.635s
18:06 timotimo dhunt: is that only on the first try or also on later tries?
18:07 MadcapJake Skarsnik, the irony is, i'm trying to use gptrixie to extract an api for libgirepository that extracts an api for .gir xml files :P
18:07 dhunt All tries.  Caching does not help :-(
18:07 MadcapJake well technically it libgirepository works on .typelib files generated from .gir xml files xO
18:08 ugexe TimToady: i thought for some reason that each lazy iteration would complete the entire gather block (so i've been doing things like `take $a; ... take $b;` and expecting both to happen in the same iteration. again im not sure how i came to this conclusion) but it makes sense now
18:08 timotimo MadcapJake: omg, you're going to build something for gir? thank you so much!
18:08 MadcapJake trying to
18:09 timotimo maybe you can build something better than GTK::Simple on top of that :)
18:09 Skarsnik MadcapJake, damn I think gccxml is using a 'profil' based on gcc 4.2 4.5
18:10 MadcapJake Skarsnik, yeah that's why then
18:10 TimToady ugexe: yes, each take is its own yield-point
18:11 TimToady you can take $a, $b to get two things at once, of course
18:11 TimToady might have to slip it though
18:11 dhunt Does anyone know the best way to try to optimize Inline::Perl5?  Should I contact nine?  Or is there some other way to get perl6 functionality when using many perl5 libraries?
18:12 MadcapJake timotimo, my plan is to try and make it all happen programmatically. so all you'd have to do is «use GIR; import('GTK-3.0')» and the GIR library will use the .gir xml files to build out the classes for you
18:12 domidumont joined #perl6
18:12 mst dhunt: the question becomes, how long does perl6 -e 'say "hi"' take?
18:12 timotimo dhunt: this year is all about improving performance; Inline::Perl5 relies on NativeCall, which is currently plagued by not-so-great performance.
18:13 dhunt time perl6 -e 'say "hi"'; real0m0.274s
18:13 dhunt Not long...
18:13 TimToady hmm, with a fresh recompile, the first time of I::P5 takes 8 seconds, the second one takes 4 seconds
18:13 Skarsnik well I:p5 should be fast enought if you don't run small thing
18:13 ugexe first run it precompiles
18:13 Skarsnik i:p5 is not precompiled
18:14 mst dhunt: my basic plan was to have a separate hybrid process running as a daemon attached to a unix socket and talk Object::Remote to it
18:14 ilmari huh, if I've got a perl6 repl with Inline::Perl5 loaded, starting another one hangs
18:14 Skarsnik MadcapJake, try to find how to compile with gcc 4.5? it's maybe just a define to have or something
18:14 mst that's probably the locking bug of doom that we've been trying to beat with a shovel for a while
18:15 ugexe it precompiles. it just doesnt precompile everything
18:15 * mst is hoping YAPC::NA accepts his 'raptor and the butterfly' talk so he has an excuse to dig into this from both ends
18:15 dhunt mst:  We use 'persistentperl' in a similar way for cases when the compilation start-up is a problem.  Is something similar available for p6?
18:16 mst I always found that to be a fragile hack and stick to things that attach themselves to unix domain sockets
18:16 mst see for example http://p3rl.org/App::Procapult for the sort of pattern I use in perl5
18:16 ilmari mst: the second one hangs trying to write-lock precomp/.lock
18:17 mst there we go
18:17 zpmorgan joined #perl6
18:17 MadcapJake why has CastXML succeeded GCC-XML if it only works on old C files...
18:17 Skarsnik No idea
18:17 ilmari the same happens with just NativeCall, no Inline::Perl5 required
18:18 Skarsnik I try it first and it was like "no C99" and I was like, what the point?
18:18 MadcapJake lol
18:19 Skarsnik MadcapJake, maybe try to compile the last castxml from the github? I give up trying to compile stuff that involve libclang/libllvm
18:19 MadcapJake oi yeah that sounds like an afternoon of grinding my teeth
18:19 * ugexe has nightmares of having to use C89 to pass ActivePerl PPM build matrix
18:20 MadcapJake honestly i was trying to use gptrixie to avoid reading libgirepository :P it might be complicated enough that even if i get it working i'll have to dig in and read it anyways :P (no docs available for some ungodly reason)
18:21 timotimo MadcapJake: you saw this? https://wiki.gnome.org/action/sh​ow/Projects/GObjectIntrospection
18:21 MadcapJake i'm heading dangerously into yak shaving territory
18:21 MadcapJake timotimo, yeah i've read that whole thing a few times but there's no API to libgirepository in there anywhere
18:22 MadcapJake just a few tutorials from like 15 years ago and most of them skip over anything good in favor of just discussing how to use gjs
18:22 timotimo right
18:22 timotimo gjs?
18:22 mohae joined #perl6
18:22 MadcapJake gnome javascript
18:22 timotimo ah, right
18:23 patrickz joined #perl6
18:26 prammer joined #perl6
18:27 dhunt OK, I'll look into http://p3rl.org/App::Procapult and Object::Remote if I have time.  Perhaps just waiting for performance improvements in NativeCall would also be in order.
18:27 mst dhunt: assuming my YAPC::NA talk gets accepted I'll hopefully have some pre-pack stuff doing what I describe by summer
18:28 mst for the moment, what you might consider is the simple way
18:28 mst which would basically be 'open a perl6 process with IPC::Open2 and talk JSON strings over the wire to it'
18:28 MadcapJake 90% of the libgirepository GTK-Doc blocks just say "TODO" :P
18:28 Azry joined #perl6
18:28 timotimo ugh
18:28 * [Coke] squees at the new captain america trailer.
18:29 timotimo well, the target audience for working with girepository is tiny
18:29 timotimo it's like one person per programming language
18:29 MadcapJake lol this is true
18:29 vendethiel joined #perl6
18:30 timotimo hmm. is "madcap" a bit similar to "the mad hatter"?
18:30 MadcapJake timotimo, yeah it's an old phrase for a crazy person :)
18:30 SCHAAP137 joined #perl6
18:31 timotimo oh
18:31 MadcapJake mad hatter came from hat makers going crazy due to mercury
18:31 timotimo right, that part i know
18:31 timotimo wasn't it similar with shoe makers?
18:31 MadcapJake madcap was because `cap` used to mean `head` so it was just like saying `mad brain`
18:31 timotimo ah
18:32 MadcapJake timotimo, not sure, people used to use mercury for so many things :P
18:33 timotimo fwiw, mercury is super cool
18:33 timotimo pretty poisonous, but still super cool
18:34 MadcapJake yeah it's quite fascinating
18:34 dhunt left #perl6
18:35 dhunt joined #perl6
18:36 dhunt OK, mst, I'll look for it!  Any other ideas on speeding up I::P6?
18:38 sufrostico joined #perl6
18:38 Skarsnik if you don't do small call it should be fast enough
18:40 dalek nqp: fcdb29f | timotimo++ | src/vm/moar/ (2 files):
18:40 dalek nqp: deduplicate filename/lineno/routine name and type names in profile
18:40 dalek nqp: review: https://github.com/perl6/nqp/commit/fcdb29f997
18:42 Azry Hi, I'm new to p6 and irc, Is this the place for some help on building a good p6 class ? (can't wrap my head around build/buildall/new/callsame ...) =)
18:42 dhunt Skarsnik:  What is small call?
18:42 ugexe sure. go ahead and ask away
18:43 Skarsnik like if you spam stuff like $p6->run('say hello'); but if you launch a huge process the overhead should be very irrelevant
18:46 dhunt OK, I see.  I don't think the overhead on 'run' was a concern.  It was more the 'init' overhead which causes a problem.
18:49 buharin joined #perl6
18:50 perlpilot Azry: yes, this is the place. (in case it didn't register that ugexe was talking to you :)
18:50 Azry thanks, i'm just trying to sort my thoughts right now :D
18:51 perlpilot Azry: have you used Perl 5?
18:51 Azry yes i liked it until this week :P
18:51 perlpilot What happened this week?
18:51 Azry well i discovered p6 =)
18:52 Azry A pastbins ok here ?
18:53 perlpilot sure, as long as it's not obnoxious :)
18:53 zakharyas joined #perl6
18:53 captain-adequate joined #perl6
18:53 perlpilot I usually use gist myself
18:56 maybekoo2 joined #perl6
18:57 perlpilot Azry: btw, note that Perl5 and Perl6 are separate languages with separate evolutionary paths.  You can learn both  (and you will probably continue to wish Perl 5 was more like Perl 6)
18:57 dhunt left #perl6
18:58 vendethiel joined #perl6
18:59 Azry well, i still like perl5, i just don't use it much for educational purposes anymore, p6 seems better to write cleaner code
18:59 buharin joined #perl6
18:59 domidumont joined #perl6
19:00 prammer joined #perl6
19:00 perlpilot Azry: yep.
19:00 Azry i'm trying to port IO:: Pty to p6 as an exercise, http://pastebin.com/BC4Sgjp9 but i don't know how to build my constructor so that it returns a IO::Pty with attributes initialized the same as IO::Handle plus a few others
19:00 Azry here is the pastebin http://pastebin.com/BC4Sgjp9
19:05 Azry the nativecall subs work well, but i don't understand how you should use the objects initialisation to use "IO:: Pty.new.allocate" while keeping IO::Handle as a inherited class
19:08 prammer joined #perl6
19:08 perlpilot Azry: have you seen http://doc.perl6.org/language/classtut ?
19:13 kjs_ joined #perl6
19:18 Azry yes, i understand how classic classes are initialized, but i don't fully get how inherited constructors are used i feel like "inheritance" in p5 was easier to understand
19:18 Azry i'll keep reading it tho, thanks
19:19 prammer joined #perl6
19:20 perlpilot Azry: did you use Moose or Moo in Perl 5?
19:20 Azry no, i used only bless/isa
19:21 Azry (should i use your name before answering you :D ?)
19:21 perlpilot whatever :)
19:21 perlpilot It *might* help if you played with Moose or Moo in Perl 5 first.  I dunno.
19:21 ugexe Moose/Moo never clicked with me until i got into perl6. Now my perl5 code gets better the more perl6 i learn
19:29 mst right, because perl6's current metamodel is inspired by Moose which was inspired by perl6's previous metamodel, roughly
19:32 buharin joined #perl6
19:33 Azry ok i didn't know that. I worked a little on a project written with Moo. bad memories =D Maybe i'm more accepting of it because it's a whole new language
19:35 bioexpress joined #perl6
19:36 perlpilot If you've got bad memories of Moo, then either you were doing it wrong, or ... no, you were just doing it wrong  :)
19:37 Azry =)
19:37 bioexpress Hello, when I use the `NCurses` I cannot print correctly strings with wide-charaters. I guess this is because there is no Perl6 type for the Native Calling Interface which matches `const wchar_t *wstr`. Is it planned to add such a type?
19:37 nadim I am a bit puzzled, I have "$d1.get_element_glyphs(%glyphs1, ..." %glyph1 is a hash, i dumpit to check but then I get this error: Type check failed in binding %glyphs; expected Associative but got List ($(3, "|- ", "|  ", "|...)
19:38 nadim In which case do a hash, called %hash, become a List?
19:41 perlpilot nadim: show the code?
19:42 [Coke] m: my %hash = (1,2,3); say %hash.WHAT; # just checking
19:42 camelia rakudo-moar 04c46c: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/OY443ef1eU line 1␤␤»
19:42 prammer joined #perl6
19:42 skids nadim: Especially what are the signatures of get_element_glyphs?
19:43 nadim method get_element_glyphs(%glyphs, Bool $is_last)
19:44 Skarsnik bioexpress, wchar_t is a mess up type x)
19:44 nadim that function is used elsewhere and doesn't show any problem there
19:44 nadim the hash i pass to it transits via a variable inside another hash, that's the only difference I can see
19:45 nadim but as I wrote I dumped it and it is a hash
19:46 nadim I justchecked wwith a dumper that is not mine, just in case
19:46 bioexpress Skarsnik: is my guess right, that lack of  a wchar_t data-type is the reason why wide-charaters with NCurses don't work?
19:47 Skarsnik I don't think so
19:47 skids m: sub a (%h, Bool $) { %h.perl.say }; my %g = :a({:a(1)}); my %f = %g<a>; a(%f, True) # no luck reproducing so far.
19:47 camelia rakudo-moar 04c46c: OUTPUT«{:a(1)}␤»
19:47 nadim skids: I golfed it and then it worked just fine
19:48 skids nadim: go back to the tee and golf less agressively, I guess :-)
19:49 bioexpress Skarsnik: Is my statement, that wide-characters don't work with NCurses right?
19:49 Skarsnik I have no idea. I never tried this binding
19:50 nadim skids: it's a big chunk, not easy to gold but here is the context http://nopaste.linux-dev.org/?992322
19:51 bioexpress Skarsnik: thx
19:52 Skarsnik what function use wchar?
19:53 geekosaur the unicode-enabled version of ncurses
19:53 geekosaur (which is the default on OS X)
19:54 Skarsnik Not sure if we want the wchar type on NC, are they standadized?
19:55 geekosaur yes, it's ANSI C
19:57 Skarsnik The width of wchar_t is compiler-specific and can be as small as 8 bits. Consequently, programs that need to be portable across any C or C++ compiler should not use wchar_t for storing Unicode text. The wchar_t type is intended for storing compiler-defined wide characters, which may be Unicode characters in some compilers.
19:57 Skarsnik hm
19:57 Skarsnik probably not that easy to solve
19:58 prammer joined #perl6
19:59 geekosaur also note that wchar_t in C++ (a distinct basic type) is different from wchar_t in C (a typedef to some other basic type)
20:00 jjido joined #perl6
20:01 perl6newbee joined #perl6
20:01 sufrostico joined #perl6
20:02 musiKk_ joined #perl6
20:08 labster joined #perl6
20:14 JRaspass joined #perl6
20:21 jjido joined #perl6
20:22 Azry is it ok in a p6 module to have to write my own C library for portability purposes ? I don't know how else i could make my module run on both my debian and freebsd
20:23 mst how so? can't you NativeCall whichever bits of the OS you need, and just set up the NativeCall stuff based on the OS you're on?
20:23 hoelzro if Azry is making pty bindings and that needs fcntl, the flags for fcntl may have different values on different OSes
20:23 skids Azry: some modules already do have C components.
20:24 Azry okay
20:24 hoelzro I do this with Linenoise
20:24 hoelzro https://github.com/hoelzro/p6-linen​oise/blob/master/fill-constants.pl
20:24 nadim Is there a Z operator that doesn't stop when the first list stops? EG: returns Nils for the short side.
20:24 skids And... there's a utility module of some sort which name escapes me.
20:24 hoelzro https://github.com/hoelzro/p6-linenois​e/blob/master/lib/Linenoise.pm.in#L11
20:25 skids nadim: There's one that repeats the last element IIRC.  It's an adverb on Z.
20:26 jnthn m: say 1, 2, 3 Z 4, Nil, *
20:26 camelia rakudo-moar 04c46c: OUTPUT«((1 4) (2 Nil) (3 Nil))␤»
20:26 nadim thanks, I didn't find the Z adverbs (I suspected it was something like that), must dig more in the docs
20:26 jnthn m: say 1, 2, 3, 4, 5 Z 7, Nil, *
20:26 camelia rakudo-moar 04c46c: OUTPUT«((1 7) (2 Nil) (3 Nil) (4 Nil) (5 Nil))␤»
20:26 jnthn nadim: ^^
20:27 nadim jnthn: pretty nice
20:27 nadim m: say 1, 2, 3, 4, 5, * Z 7, Nil, *
20:27 camelia rakudo-moar 04c46c: OUTPUT«((1 7) (2 Nil) (3 Nil) (4 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (5 Nil) (…»
20:28 nadim m: say 1, 2, * Z 7, 8, *
20:28 camelia rakudo-moar 04c46c: OUTPUT«((1 7) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 8) (2 …»
20:28 jnthn Ah, you want on either side
20:29 nadim yes, actually it is a double Z on the line
20:29 nadim and yes on both sides
20:29 nadim the result of the above is a little surprising
20:29 jnthn Not really, * just means "keep repeating the last item"
20:30 jnthn And Z is lazy and infinite
20:30 jnthn You could combine it with a termination construct
20:30 nadim right, I didn see the elipsis at the end
20:30 jnthn m: say (1, 2, 3, 4, 5, Nil, * Z 7, 8, Nil, *) ...^ * ~~ (Nil, Nil)
20:30 camelia rakudo-moar 04c46c: OUTPUT«((1 7) (2 8) (3 Nil) (4 Nil) (5 Nil))␤»
20:30 jnthn m: say (1, 2, Nil, * Z 7, 8, Nil, *) ...^ * ~~ (Nil, Nil)
20:30 camelia rakudo-moar 04c46c: OUTPUT«((1 7) (2 8))␤»
20:31 vendethiel cute
20:32 jnthn Probably worth factoring out
20:32 jnthn If using it more than once :)
20:32 jnthn But yeah, using ...^ to lop the end off things once you match a certain point is kinda cute.
20:33 nadim I think that needs to be expained in lengths, I am still thinking
20:34 spider-mario joined #perl6
20:35 jnthn nadim: ... is the sequence operator, the thing on the right of it says how to know when you've reached the end of the sequence, and ...^ is a form of it that means "and don't include the final value", just like 1..^5 means 1..4 in ranges
20:35 dalek rakudo/nom: 84a84f2 | lizmat++ | lib/NativeCall.pm6:
20:35 dalek rakudo/nom: Streamline param_list_for
20:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/84a84f218d
20:44 nadim m: say (1, 2, * Z 7, 8, 9, *) ...^ * ~~ (Nil, Nil)
20:44 nadim m: say (1, 2, * Z 7, 8, 9, *) ...^ * ~~ (Nil, Nil)
20:44 nadim meh!
20:44 jnthn Those'll last forever
20:44 nadim of course
20:44 camelia rakudo-moar 04c46c: OUTPUT«(timeout)»
20:44 camelia rakudo-moar 04c46c: OUTPUT«(timeout)»
20:44 nadim 2 is repeated, Nil never comes
20:45 nadim it's cute but it foces one to add Nils, could be worth it. I will try tomakealine with the two Zs, it will probably need to be factor out as you said :)
20:55 nadim jnthn: Could you please have a look at this http://nopaste.linux-dev.org/?992495? I think it is  a Bug but don't want to report it if I am just being blind.
20:55 nadim one compile, and run, the other one not, only difference is that I move two lines in a loop. IMO it should work the same
20:57 geraud joined #perl6
20:58 jnthn Well, something odd's going on, but hinges on what diff_data is doing
20:59 jnthn (As in, it's really interesting you're inside an iteration of it, when you see the behavior difference.)
21:00 nadim It's made me crazy all evening.
21:01 nadim if I dump the variable just before using it, it says it is a hash but when it gets to the function it's a list
21:02 skids Try dumping $%glyphs
21:02 skids Or wait, you never have an opportunity I guiess.
21:04 nadim dumping %glyphs isn't good enough?
21:05 Sqirrel joined #perl6
21:06 skids Dempends on what the signature of the sumper function is.
21:06 skids *dumper
21:08 skids a: sub dump (*@_) { @_.perl.say }; my %g = :a, :b; %g.perl.say; dump(%g);
21:08 skids m: sub dump (*@_) { @_.perl.say }; my %g = :a, :b; %g.perl.say; dump(%g);
21:08 camelia rakudo-moar 84a84f: OUTPUT«{:a, :b}␤[:a, :b]␤»
21:08 * skids obviously should give up typing for the day
21:11 yqt joined #perl6
21:14 prammer joined #perl6
21:14 timotimo thankfully, you can have perl6 without typing if you want
21:14 dalek rakudo/nom: 69426bd | lizmat++ | lib/NativeCall.pm6:
21:14 dalek rakudo/nom: Streamline CALL-ME
21:14 dalek rakudo/nom:
21:14 dalek rakudo/nom: Shaves off a few % CPU
21:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/69426bd8b3
21:16 TreyHarris Say I have: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False))
21:16 TreyHarris m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False))
21:16 camelia rakudo-moar 84a84f: ( no output )
21:16 TreyHarris m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False)); say %h6.perl
21:16 camelia rakudo-moar 84a84f: OUTPUT«{:false($(Bool::False, Bool::False)), :half-false($(Bool::False, Bool::True)), :half-true($(Bool::True, Bool::False)), :true($(Bool::True, Bool::True))}␤»
21:17 TreyHarris How can I slice across it? Like, %h6{mumble}[0] to get "True, False, True, False"?
21:18 TreyHarris I mean, aside from doing it directly with a map or loop?
21:18 timotimo m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False)); say %h6{*}>>.[0].perl
21:18 camelia rakudo-moar 84a84f: OUTPUT«(Bool::False, Bool::True, Bool::False, Bool::True)␤»
21:18 timotimo m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False)); say %h6>>.[0].perl
21:18 camelia rakudo-moar 84a84f: OUTPUT«{:!false, :!half-false, :half-true, :true}␤»
21:18 timotimo oops
21:18 timotimo m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False)); say %h6.values.[0].perl
21:18 camelia rakudo-moar 84a84f: OUTPUT«$(Bool::False, Bool::True)␤»
21:18 timotimo m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False)); say %h6.values>>.[0].perl
21:18 camelia rakudo-moar 84a84f: OUTPUT«(Bool::False, Bool::True, Bool::False, Bool::True)␤»
21:19 timotimo hm.
21:19 TreyHarris yeah, I was driving myself crazy with all of those
21:21 TreyHarris m: my %h6; %h6<true half-true half-false false> = ((True, False) X (True, False)); say %h6<true half-false false half-true>.values>>.[0].perl
21:21 camelia rakudo-moar 84a84f: OUTPUT«(Bool::True, Bool::False, Bool::False, Bool::True)␤»
21:21 timotimo oh, hooray, i was able to improve the framerate of this script by almost 2x by turning profiling ... on
21:22 RabidGravy psch, I can confirm that Audio::PortAudio can output fine to a jackd using alsa as a backend,  I'm feeling a bit slack to hook up a multi-channel sound card on firewire
21:22 timotimo now i turned it off again and it's even faster than it was
21:23 TheCoder joined #perl6
21:23 RabidGravy timotimo, just upgraded the other computer to fc23 BTW, so now I am running the same kernel ;-)
21:24 timotimo mhm
21:24 TheCoder Hello
21:24 RabidGravy erp
21:24 timotimo hi
21:24 TheCoder I am also running Fedora 23
21:26 RabidGravy well this laptop is still on 22 'cause I'm always half way through something
21:26 timotimo :)
21:29 TreyHarris how would I express "all the elements of this list are equal to each other"? I can do "so all(@l) == all(@l)" or "so all(@l) == @l[0]", but is there a better way?
21:30 perlpilot I'd probably use [==] @stuff
21:31 jnthn What perlpilot said; it should short-circuit and be cheaper
21:32 colomon joined #perl6
21:33 skids m: my %h6; %h6<true> := { 0 => True, 1 => True }; %h6<half-true> := { 0 => True, 1 => False }; %h6{*;"0"}.say; %h6{*;"1"}.say; # TreyHarris
21:33 camelia rakudo-moar 69426b: OUTPUT«(True True)␤(True False)␤»
21:33 TreyHarris I forgot about the reduction [ ] operators
21:34 RabidGravy so, next up let's get audio data into a program
21:37 lizmat m: say Version.new   # should we even allow this ?
21:37 camelia rakudo-moar 69426b: OUTPUT«v␤»
21:37 perlpilot m: my $x = Version.new;  $x++;  say $x;
21:37 camelia rakudo-moar 69426b: OUTPUT«Method 'succ' not found for invocant of class 'Version'␤  in block <unit> at /tmp/L6hqeX2w4l line 1␤␤»
21:38 perlpilot lizmat: if that worked it *might* be useful
21:38 perlpilot lizmat: but right now, I'm leaning towards "no"  :)
21:38 * jnthn abstains :)
21:38 lizmat perlpilot: but but, Versions are supposed to be immutable, no ?
21:38 jnthn Int is immutable too
21:38 jnthn It's the Scalar that ain't
21:39 skids .oO(It should default to v11.5 to remember the 5th of November :-)
21:39 jnthn :D
21:39 jnthn You can burn that thought with fire :P
21:39 lizmat m: my $v = v1.2.3.4; $_++ for $v.parts; dd $v   #hmmm....
21:39 camelia rakudo-moar 69426b: OUTPUT«Version $v = Version.new('2.3.4.5')␤»
21:39 TreyHarris skids: but that only works because it's associative-of-associative. i was specifically asking about associative-of-array. And "%h6{*;0]" is a syntax error :)
21:39 lizmat jnthn: opinions on that one ?
21:40 jnthn lizmat: That doesn't look too immutable...
21:40 lizmat indeed   :-(
21:40 lizmat not sure if that is an implementation detail or not
21:40 jnthn We should maybe nail that one down :)
21:40 lizmat so make it immutable ?
21:40 jnthn I'm sure we have no spectests preventing us from doing so...
21:40 jnthn Yeah
21:40 jnthn Just a .List in the build or something
21:41 lizmat ok, will do so
21:41 lizmat yeah... found that versions quite heavy on the NativeCall stuff...
21:41 vendethiel joined #perl6
21:42 jnthn NativeCall uses versions stuff?
21:42 lizmat finding libraries
21:43 jnthn ah
21:43 vendethiel m: multi sub sayit(Str $n){say "String";} multi sub sayit(Int $n){ "Int $n"; }; sayit(True);
21:43 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/32UhAVJEnL␤Strange text after block (missing semicolon or comma?)␤at /tmp/32UhAVJEnL:1␤------> 3multi sub sayit(Str $n){say "String";}7⏏5 multi sub sayit(Int $n){ "Int $n"; }; s␤    expecting any …»
21:43 vendethiel m: multi sub sayit(Str $n) { say "String";} multi sub sayit(Int $n){ "Int $n"; }; sayit(True);
21:43 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7_eWpuL5tq␤Strange text after block (missing semicolon or comma?)␤at /tmp/7_eWpuL5tq:1␤------> 3multi sub sayit(Str $n) { say "String";}7⏏5 multi sub sayit(Int $n){ "Int $n"; }; s␤    expecting an…»
21:43 jnthn But that should be one-off, not each call, I hope?
21:43 vendethiel m: multi sub sayit(Str $n) { say "String";}; multi sub sayit(Int $n){ "Int $n"; }; sayit(True);
21:43 camelia rakudo-moar 69426b: ( no output )
21:43 vendethiel ...what?
21:43 jnthn m: say Bool ~~ Int
21:43 camelia rakudo-moar 69426b: OUTPUT«True␤»
21:43 vendethiel ???
21:43 jnthn vendethiel: As a result of Bool being an enum
21:43 jnthn Enum values take on their base type
21:44 lizmat jnthn: yeah, but it came out quite high in my profile of a nativecall test file
21:44 jnthn m: enum Coin <Head Tail>; say Head.^mro
21:44 camelia rakudo-moar 69426b: OUTPUT«((Coin) (Int) (Cool) (Any) (Mu))␤»
21:44 jnthn lizmat: OK, phew, and thanks for looking into making it cheaper. :)
21:44 vendethiel that's still very surprising. looks like an implicit conversion upfront
21:44 * perlpilot bets that ends up in a FAQ somewhere
21:44 vendethiel (when really it's upcasting)
21:44 vendethiel m: my Int $a = True;
21:44 camelia rakudo-moar 69426b: ( no output )
21:44 vendethiel :(
21:46 vendethiel the explanation makes sense though, thanks
21:47 jnthn Can't win 'em all... :)
21:48 aindilis joined #perl6
21:54 nadim jnthn: I found the source of the problem, not a bug, there was a side effect and the same hash entry contains a hash some time and a list other.
21:54 perlpilot vendethiel: if you wanted it to be strictly Int, you could do something like   multi sub foo($n where $n.WHAT eqv Int) { ... }
21:55 vendethiel ECUREWORSETHANTHEDISEASE :P
21:55 perlpilot vendethiel: aye.
21:55 vendethiel .oO( ECUREISACURSE )
21:56 perlpilot When you give your multi the wrong type, you get a helpful message that says "none of these signatures match: ($ where { ... })  (Str $)"   ;)
21:57 perlpilot .oO( so, I have to pass it a Str or a ... something )
21:57 skids .oO(A flag to pull .WHYs into error messages)
21:58 vendethiel Lol, did github really just add reaction to comments?
21:59 jnthn nadim: Phew :)
22:00 jnthn nadim: Mixing laziness and side-effects is a recipe for headache... :)
22:00 lizmat jnthn: is Version.new(""), '', "can we handle empty string versions";
22:00 lizmat so it is spectested
22:00 jnthn m: say Version.new("").Str
22:00 camelia rakudo-moar 69426b: OUTPUT«␤»
22:00 jnthn lizmat: OK, then guess it can stay
22:00 jnthn lizmat: I don't really see it as a big issue
22:01 jnthn lizmat: The accidental mutability is much more of a problem
22:01 lizmat yeah, fixing that now
22:01 jnthn lizmat++
22:01 jnthn Glad the profiler is helping find stuff
22:02 jnthn Today I started work on another profiling tool (heap snapshots)
22:02 jnthn Well, technically I started on it yesterday on paper, but tonight translit'd those thoughts into data structures :)
22:02 jnthn It should help us understand where memory actually goes, anyways.
22:03 cpage_ joined #perl6
22:04 TreyHarris m: multi sub foo (Str|Bool $x) { say $x.WHAT }
22:05 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cK8wSxszkZ␤Malformed parameter␤at /tmp/cK8wSxszkZ:1␤------> 3multi sub foo (Str|Bool7⏏5 $x) { say $x.WHAT }␤    expecting any of:␤        constraint␤»
22:05 TreyHarris I thought this was possible... is there a different syntax for that?
22:05 ugexe where Str|Bool
22:05 TreyHarris riiight
22:05 nadim jnthn: I could have at least used two different names and let the compiler catch it
22:06 nadim the funny part is that it is almost the same contents
22:06 nadim tomorrow I'll have a Data::Dump::Tree than can display diffs I hope
22:08 jnthn ooh :)
22:09 mst jnthn: you may find leonerd's Devel::MAT interesting as prior art for memory dump analysis
22:10 nadim jnthn: http://imgur.com/yE9a6il  I need to integate the Nil,* ^ ... (Nil, Ni) thingy you posted earlier
22:10 jnthn .oO( Does Devel::MAT sound like Русский::Мат? )
22:11 TreyHarris I can't find the perl6/docs page where that form of "where" is discussed directly.  It's mentioned in passing in language/functions#Defining_Operators but I don't see a full explanation... It's in the synopsis though.
22:11 mst wat
22:11 hoelzro hehe
22:12 hoelzro TreyHarris: http://doc.perl6.org/type/Signature might help
22:13 jnthn mst: Will take a look at that, thanks. :)
22:13 mst jnthn: admittedly, I do most of my memory debugging with Devel::Gladiator's arena_table and diff
22:14 TreyHarris jnthn: no, /dəvel/ sounds nothing like /ruːski/ ;-)
22:14 jnthn :D
22:14 mst but I'm sure you've already internalised "given a selection of tools, mst will usually pick the one closest to the metal that provides useful console output" so
22:15 jnthn mst: Yeah...what I'm doing is somewhat inspired by the v8 heap profiler
22:15 TreyHarris hoelzro: thanks, my eyes slid over that when i was grepping
22:16 jnthn mst: I might well write a console app for analyzing the data first.
22:16 hoelzro jnthn: sometimes developing makes me want to use мат =P
22:17 b2gills .tell bioexpress You will probably need to convert from a Str to a Buf to work with wchar_t functions
22:17 yoleaux b2gills: I'll pass your message to bioexpress.
22:18 jnthn I didn't figure I'd write the heap profiler so soon, but ran into a problem where buliding the tool to let me figure out what the heck is going on quickly might well beat the time it takes figuring it out ad-hoc anyway.
22:18 TEttinger joined #perl6
22:18 mst I know that feeling
22:19 jnthn I also hold this hope that if I build the guts to get the raw data out, others might be willing to help build shiny visualization etc. for it. :)
22:20 mst one of the reasons I mentioned Devel::MAT is because it comes with a gtk introspector thing that I was hoping you might be able to use to give other people ideas
22:20 mst since there seem to be a bunch of people doing gtk stuff already
22:20 jnthn Ah, cool
22:21 mst after all, shouting "well volunteered" is not a restricted skill ;)
22:21 jnthn ;)
22:29 timotimo what does the MAT do?
22:29 pdcawley joined #perl6
22:32 colomon joined #perl6
22:35 mst timotimo: memory allocation tracker, lets you dig through everything your perl5 code allocated to see where things came from
22:35 prammer joined #perl6
22:36 colomon_ joined #perl6
22:47 geekosaur (CyberMAT?)
22:49 [Sno] joined #perl6
22:49 jnthn 'night, #perl6
22:51 timotimo gnite jnthn
22:59 [ptc] is it possible to match a Num in a regex?  In other words, match numbers such as 1234.567 and 1234/56?
23:12 dalek perl6-examples: a9fda07 | paultcochrane++ | t/categories/cookbook/09directories.t:
23:12 dalek perl6-examples: Accept Rat-like strings in filetime output
23:12 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/a9fda07f36
23:12 timotimo 1234/56 isn't a num, it's a Rat :)
23:12 timotimo and no, you'll have to build that rule yourself, i'm afraid :(
23:13 timotimo well, perhaps it's possible to call the rule in question from Perl6::Grammar or somethin
23:14 kid51 joined #perl6
23:20 skids joined #perl6
23:23 Actualeyes joined #perl6
23:24 nadim I want to send arrays into a sub, a variable amount, and I want to get, in the sub, an array of those arrays. I can quite get the signature right
23:24 Sgeo_ joined #perl6
23:25 nadim do_x(@a1, @a2, ...) ;   sub do_x(*@all); puts all the contents in @all but Iwant references
23:25 nadim to each array
23:25 skids sub a (**@s) { @s.perl.say }; a((1,2),[3,4],5,6);
23:25 lizmat if you are sure there are at least 2 arrays, you could use the + signature?
23:25 skids m: sub a (**@s) { @s.perl.say }; a((1,2),[3,4],5,6);
23:25 camelia rakudo-moar 69426b: OUTPUT«[(1, 2), [3, 4], 5, 6]␤»
23:25 lizmat or that  :-)
23:27 nadim perfect, thanks both, I didn't tink about the ** and I didn't find it anywere documented
23:30 * lizmat is getting too tired
23:30 lizmat good night, #perl6!
23:30 nadim night :)
23:31 skids o/
23:31 jack_rabbit joined #perl6
23:36 sufrostico joined #perl6
23:54 RabidGravy right, off to bed. toodles!
23:57 rudi_s Hi. Is it expected that my $p = run @cmd, :in; $p.in.native-descriptor returns -1 ?
23:58 ugexe what makes method(@foo) faster than method(*@foo)?
23:58 rudi_s (My plan was to use a C library to write to stdin of the command but without native-descriptor that won't work.)

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

Perl 6 | Reference Documentation | Rakudo