Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-27

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:02 cire joined #perl6
00:04 tadzik joined #perl6
00:05 sortiz jnthn, my last one today: There are many MoarVM ops not exposed at the nqp level?
00:05 lizmat good night, #perl6!
00:06 kjs_ good evening. I’m using JSON::Tiny to parse large files most of which have simple key-value entries, but some value entries are arrays. However, when parsing it (using the “from-json” method), I can’t seem to iterate over the values of arrays.
00:06 sortiz gnight lizmat
00:09 sortiz kjs_, Do you have a minimal example that shows the problem?
00:09 jnthn sortiz: Not that many, no.
00:10 jnthn sortiz: Provided you discount spesh ops, but those aren't part of the VM interface, and you can't even use them in a bytecode file.
00:10 jnthn sortiz: Those ones are marked .s in oplist
00:10 kjs_ nopaste?
00:10 sortiz kjs_, sure.
00:11 kjs_ eh, that used to give a link many years ago :-)
00:12 kjs_ sortiz: http://nopaste.linux-dev.org/?958277
00:12 kjs_ sortiz: that isn’t the code, that’s the result of the parse
00:13 jnthn Time for some rest...'night o/
00:13 sortiz jnthn, thanks and gnight
00:13 kjs_ the “technologies” field has an array of values, but I don’t understand how I can iterate over them.
00:17 sortiz kjs_, seems that technologies in fact has [Objective C iOS 5.0] as value, so not a problem with JSON::Tiny, can be in your iteration code.
00:18 kjs_ sortiz: yes, it’s probably in the code alright. Only starting out with Perl 6 (no Perl experience)
00:19 cognominal joined #perl6
00:20 sortiz kjs_, I suggest you write a small test program to test the concepts of nested arrays.
00:20 kjs_ sortiz: http://nopaste.linux-dev.org/?958297.
00:21 kjs_ if I run this, I just get a b c, but I think I need to write for @a -> @e , and then a nested loop
00:21 tadzik joined #perl6
00:22 sortiz kjs_, nop, you should test inside the loop the kind of $e and act accordingly, may be with an inner loop.
00:24 skids joined #perl6
00:25 sortiz m: my %h = (a => 1, b => [1,2,3]); for %h { say .value if .value ~~ Array }
00:25 camelia rakudo-moar 08ad4b: OUTPUT«[1 2 3]␤»
00:26 kjs_ sortiz: ah thanks, I’ll try that
00:27 kjs_ I think I got it. I’ll work further on it.
00:28 sortiz kjs_, you can use a Hash directly in a for, the element will be a Pair
00:30 abaugher joined #perl6
00:32 kent\n joined #perl6
00:32 kent\n joined #perl6
00:33 timotimo yo
00:33 dalek specs: e441a27 | skids++ | S17-concurrency.pod:
00:33 dalek specs: Pass 2 at react/supply blocks, clarify some grammar, add some examples
00:33 dalek specs: review: https://github.com/perl6/specs/commit/e441a27c70
00:35 timotimo saw deadpool now
00:37 hankache joined #perl6
01:06 wamba joined #perl6
01:43 SmokeMachine____ I think I found a bug on rakudo.. shouldn't be printing 2 different counters? https://www.irccloud.com/pastebin/s6erYoU2/
01:44 SmokeMachine____ and if I kill the first one (the bged one) the second starts counting...
01:45 geekosaur I think the only bug visible there is that your shell doesn't tell you the first one caught SIGTTOU when it tried to do output?
01:46 SmokeMachine____ the same thing happens if I run the code on two different terminals...
01:49 iloveunix joined #perl6
01:49 SmokeMachine____ I think this version is easier to see what I'm talking about... https://www.irccloud.com/pastebin/PE4rbDVa/
01:50 SmokeMachine____ geekosaur: ^^
01:51 SmokeMachine____ I don't know how, but it looks like one process is "pausing" the other process...
01:55 ugexe what if you dont use `-I. -MNode -MData`
01:57 zpmorgan joined #perl6
01:58 ugexe without those it works for me. and thats because module loading/precomp uses locks, which is what is "pausing" your second process
01:58 SmokeMachine____ ugexe: removing the -MData from the 2nd one works for me too... https://www.irccloud.com/pastebin/PL4G21Ws/
01:58 SmokeMachine____ ugexe: but shouldn't the first works too?
01:59 ugexe first what?
01:59 SmokeMachine____ the one with the -MData on both scripts...
02:00 ugexe get rid of the =I. and it probably will
02:00 ugexe -I.
02:01 ugexe dont misunderstand, they all *should* work. but its a known bug
02:02 llfourn https://rt.perl.org/Public/ # down for me
02:03 SmokeMachine____ oh! is it a known issue?! ok! thanks!
02:03 AlexDaniel joined #perl6
02:03 AlexDaniel huh! RT is down?
02:04 llfourn AlexDaniel: yep
02:04 AlexDaniel nice
02:04 AlexDaniel :/
02:04 llfourn .oO( where do I send the RT for that )
02:05 llfourn I just had a pub report to file too :(
02:05 llfourn try: perl6 -e 'sub MAIN($foo,*%) { }'
02:06 AlexDaniel llfourn: perhaps you can send an email and it will be processed once it is up
02:06 llfourn it probably would work
02:09 llfourn hmm it processed the email immediately
02:09 molaf_ joined #perl6
02:12 AlexDaniel llfourn: awesome bug by the way
02:12 llfourn XD
02:23 dalek rakudo-star-daily: 839ed18 | coke++ | log/ (9 files):
02:23 dalek rakudo-star-daily: today (automated commit)
02:23 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/839ed18568
02:25 llfourn is there a way to get the current Distribution object?
02:27 llfourn inside a distribution's bin/some-script.p6 in this case.
02:32 AlexDaniel llfourn: does it say Usage: -e '…' ?
02:32 AlexDaniel why does it say*
02:32 AlexDaniel llfourn: it seems like it treats the first arg as a file name or something?
02:33 AlexDaniel and in this case it is ‘-e’?
02:33 * geekosaur would suspect -e is implemented with a custom MAIN and addition of a second one breaks things?
02:33 ugexe use $?FILE to get the sha1 of the bin script, grep CURLI/dist/* for the one containing  the sha1 ($?FILE), and from-json(slurp($that-file)). if its not installed then use from-json(slurp("../META6.json")). then Distribution.new(|%meta)
02:34 llfourn AlexDaniel: that usage -e thing is normal
02:34 llfourn what geekosaur said
02:34 llfourn ugexe: :D ahhhhh
02:35 AlexDaniel oh, right, it actually works
02:35 timotimo well, RT may be down, but at least synopsebot6 is happy
02:37 llfourn Ok what I want to do is get the version of the thing I am currently in so I can so in the USAGE 'blah blah v3.2' or whatever
02:39 ugexe i dont think it can know that
02:40 llfourn hmmm so how does it figure out %?RESOURCES if it doesn't already parse MET6.json
02:40 ugexe if you have it installed already and you run bin/myscript without -Ilib, then its not running in your local Distribution, but you arent really running the installed one either
02:40 ugexe its because if you are in a root module path its a ::FileSystem or whatever
02:41 ugexe so it'll use the resources locally before the installed i believe
02:41 llfourn so what if it's an ::Installation?
02:41 llfourn is there a way to do it there?
02:45 ugexe https://github.com/ugexe/zef/blob/master/lib/Zef/Client.pm6#L453
02:46 llfourn I guess that makes sense now that I think about. You don't want your bin/ stuff reading META6.json.
02:46 ugexe you can do that with a regular Distribution (doesnt have to be Zef::Distribution
02:48 llfourn ugexe: yep thanks. I'm going to do something like that in USAGE. $?FILE.parent.parent.child("META6.json").slurp.&from-json<version>
02:49 telex joined #perl6
02:49 llfourn $?FILE.IO*
02:51 ugexe for that specifically you might be able to use BEGIN { } to just do it once
02:52 ugexe i output the current config file being used (its dynamic) so i didnt think about that
02:52 llfourn ugexe++ that is a splendid idea
02:53 llfourn hmm maybe I should add this to CompUnit::Util
02:55 llfourn since I can find the meta from the repo I think. I could say given a compunit try and find its version.
02:57 labster joined #perl6
03:04 llfourn AlexDaniel: it actually works fine if you do '*%foo' instead of '*%'
03:04 llfourn it's sometime to do with printing usage with 0-length variable name
03:05 llfourn also *%vars in MAIN seem to be goofy in general in terms of printing out usage
03:11 kid511 joined #perl6
03:36 BenGoldberg joined #perl6
03:41 colomon joined #perl6
03:42 ugexe shouldnt the version be available without loading the meta though?
03:44 llfourn It would be nice. You could insert some variable at compile time into each compunit, assuming you have the MET6.json at compile time.
03:44 ugexe you can get at the namespace, seems like you should be able to get at the identity
03:44 llfourn $?DISTRIBUTION #?
03:44 ugexe well CURLI has a .resolve method. and there is *supposed* to be a $?PACKAGE
03:45 ugexe note that .resolve requires a newer rakudo
03:45 ugexe then you couuld theoretically do .resolve($?PACKAGE).distribution.ver
03:46 llfourn What do we call .resolve on?
03:46 llfourn $?PACKAGE?
03:47 adu joined #perl6
03:47 ugexe $*REPOS>>.can-install # you get the idea
03:47 ugexe its a method in compunit::repository::installation
03:47 llfourn oh ok
03:48 ugexe it will do the lookup for you
03:48 llfourn can ::filesystem do it too?
03:48 ugexe no
03:48 llfourn ah
03:49 ugexe it probably could, it would be trivial i'd think
03:50 llfourn ugexe: according to S02: $?MODULE    Which module am I in?
03:50 ugexe zef does it. but it uses its own ::DependencySpecification to match against
03:51 llfourn I think $?MODULE means distribution?
03:51 ugexe it should just mean module not distribution, but you can look up a distribution from the module
03:51 llfourn what is a module then?
03:51 ugexe the key is it needs to include the version
03:51 llfourn there is already $?PACKAGE
03:51 llfourn $?MODULE ~~ CompUnit?
03:52 ugexe package { } vs module { }, but both would be in `provides` id imagine
03:52 ugexe so your lookup needs to look at provides
03:52 llfourn ugexe: ah anyway in S02: %?META      The META6.json data associated with the module
03:52 ugexe now that would be nice
03:54 llfourn it should be doable -- though I'm not sure how it works for stuff in bin/ of a distribution
03:54 llfourn seeing as they are not loaded via CompUnit:: afaik
03:54 llfourn (which is where I want it)
03:54 ugexe it also goes well with Distribution as an interface
03:55 ugexe then it would be trivial
03:55 ugexe bin/ gets listed in `files` of the META6 that gets installed (the META6 that gets installed is slightly different from the original META6)
03:56 llfourn I see.
03:56 ugexe or maybes its resources, but it gets *added* in the install process
03:57 llfourn right but if you are just doing perl6 -Ilib bin/whatever.pl it might be tricky to set any compile time variables
03:57 noganex_ joined #perl6
03:57 llfourn but not impossible. There could just be a static check like $?FILE.parent.parent('META6.json').e in the case of directly running a .pl.
03:57 ugexe not if you have Distribution as an interface
03:58 ugexe role files { } role sources { } for example. now you can switch role files with whatever parses the correct META6 file
03:58 ugexe Distribution does LocalMeta { method meta { slurp(...) } }
03:59 llfourn hmm yeah I'm not really familar with how Distribution is used
03:59 llfourn I'm sure i will learn from your PR that implements these things :D
03:59 ugexe excellent, so think of how you would *want* to use it
04:00 llfourn well my curreny use case is doing have a bin/script.pl --version thing that just gives the right answer
04:00 llfourn (we could even include it as part of the default USAGE generation)
04:03 ugexe as long as you dont use --ver heh
04:03 ugexe (https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L39 install wrapper will eat it)
04:04 llfourn ugexe: yeah... do we have to do that install wrapping thing?
04:04 ugexe i think so yes
04:05 ugexe you have 2 versions of a Distribution installed. which bin/ script wins? what if you want to use the older version?
04:06 llfourn I'd suggest that the newest one should just be in the path, then if you want the old one just use the absolute path
04:06 llfourn obviously it's a bit of work
04:06 ugexe it could be improved though; if it actually did like `use <bin/script.pl6>` then we could precompile the bin scripts
04:06 llfourn but most of the time you just want the newest one
04:06 ugexe (instead of running in a new proc)
04:06 llfourn yeah the new proc thing is what bugs me :\
04:06 ugexe because there has to be a perl6 entry point
04:07 ugexe to get the fastest start up time my bin script is just `use Zef::CLI;`, and all my MAINs are in Zef::CLI which gets precompiled as a module
04:07 mst needing to do an exec may not have to be forever, or at least not actually always required, but for the moment it's a good way to give us freedom of movement later
04:07 ugexe make the perl6 entry point as bare as possible
04:08 * llfourn wonders if the wrapper is preserving STDIN
04:09 mst er. I'm unsure what you're imagining, but it doesn't read anything, so fd 0 will be handed on untouched
04:09 llfourn hmm ok I didn't know what's how run works
04:09 llfourn phew
04:10 mst try and avoid imagining extra problems that don't exist - programming is hard enough when you only have to deal with the real ones.
04:11 llfourn docs: $in, $out and $err are the three standard streams of the to-be-launched program, and default to "-" # :)
04:14 mst writing a wrapper that does an exec is a time honoured unix tradition and generally it's difficult to screw it up *subtly*
04:14 mst i.e. either it works or it's completely foobar
04:15 mst note: I have seen it be completely foobar, briefly. diagnosing that and proposing a fix (which lizmat then improved in the process of writing it competently, which I couldn't've done ;) is one of the few useful things I've done so far
04:16 MadcapJake1 joined #perl6
04:16 llfourn run isn't exec though afaik. But its default seems to emulate it.
04:17 llfourn mst++ for useful things :)
04:17 mst I'm reasonably sure we don't fork a child process and leave it around? or maybe my lack of knowledge is showing
04:19 mst do remember that if I ever appear to know what I'm talking about, it's usually because I'm talking about toolchain-y stuff which I know too much about from other areas combined with reasoning from first principles and frantically diving the rakudo sources to provide the illusion of knowing things about perl6 ;)
04:19 autarch joined #perl6
04:20 llfourn heh gotcha. I don't know much either. But you can definetly use run create a new process not exec.
04:20 llfourn if called wihtout args it just seems to attach the fds in all the right places
04:20 llfourn my $proc = run 'echo', 'Hallo world', :out; #eg
04:21 llfourn s/args/options/
04:21 llfourn but that's a good point why doesn't it just exec..
04:22 llfourn m: say &exec
04:22 camelia rakudo-moar 08ad4b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_66z0AJuUF␤Undeclared routine:␤    exec used at line 1␤␤»
04:22 llfourn can we even do exec?
04:24 labster joined #perl6
04:24 mst ... surely ...
04:24 llfourn I know we don't have a direct way of doing fork
04:25 Ben_Goldberg joined #perl6
04:25 ugexe the wrapper indeeds leaves a process living, waiting for the spawned process to finish
04:25 mst huh
04:25 mst is there some writeup of the 'no direct fork' thing?
04:26 llfourn mst: http://docs.perl6.org/language/5to6-perlfunc#fork
04:26 llfourn Nothing in Perl 6 exactly replicates the Perl 5 exec. shell and run are similar to Perl 5's system, but exec's behavior of not returning after executing a system command would have to be emulated by something like shell($command);exit(); or possibly exit shell($command);
04:26 ugexe exit run($*EXECUTABLE, @binaries[0].hash.<files><bin/#name#>, @*ARGS).exitcode
04:26 llfourn so there's our explanation
04:26 ugexe i believe the .exitcode should wait for the process to finish
04:26 mst that doesn't explain anything though.
04:27 llfourn well it exlpains why the implementor of the wrapper didn't use exec
04:27 ugexe probably should use Proc::Async?
04:27 llfourn ugexe: why?
04:28 ugexe i guess its still has to wait for the exitcode
04:28 llfourn run is blocking isn't it?
04:29 mst ugexe: if you've forked, you don't want the parent process to exit before the child does, because somebody may be waitpid()ing on you
04:29 llfourn ah no it isn't... I see what you mean :P
04:29 ugexe its blocking once its sunk, or something
04:29 llfourn ugexe: k thanks for the info :)
04:30 llfourn I wonder if by "Nothing in Perl 6 exactly replicates the Perl 5 exec" it means nothing in "rakudo" or that Perl 6 by desgin is really not meant to have exec...
04:31 adu joined #perl6
04:31 geekosaur exec isn't portable. I was under the impression that things like fork and exec would be left to an ecosystem POSIX module
04:32 geekosaur and likewise for win32-specific things
04:32 llfourn ah right.. windows
04:34 geekosaur perl 5 has to do fairly disgusting things to emulate both on windows
04:38 mst oh, yes, I'd be perfectly happy with saying "this isn't going to be portable"
04:41 mst but "you can't have exec(), even when exec() is available on your platform and would have exactly the behaviour you want", seems ... distinctly LTA to me
04:50 tmch joined #perl6
04:57 sortiz joined #perl6
04:58 sortiz \o #perl6
04:59 llfourn \o
05:10 llfourn ugexe: putting BEGIN my $ver = $?FILE.IO.parent.parent.child("META6.json").slurp.&from-json<version>;
05:10 llfourn doesn't work because when you run it after intalling it aint relative to META6.json anymore :\
05:10 llfourn eg Failed to open file /home/travis/rakudo/install/share/perl6/site/META6.json
05:11 llfourn ($?DISTRIBUTION or w/e seems all the more necessary it seems)
05:19 ugexe right, you have to slurp all the files in site/dist, turn it into a meta6 hash, and determine if thats the distribution you want or not
05:20 llfourn :S
05:21 ugexe you determine that by looking at $?FILE, which will have a sha1 basename. that sha1 basename will be in the site/dist/whatever-file that you are looking for
05:21 ugexe under `files` or `resources` or some such as a `bin/script` => `<SHA1>` pair
05:22 llfourn ugexe++ for figuring that out
05:24 ugexe maybe you can abuse RAKUDO_MODULE_DEBUG=1 output to skip slurping random files to find the right one
05:25 ugexe but from what i see its just shows the source files, not the dist file that would have the version info easy to find
05:26 llfourn I guess if I'm going to do the work to do that though I might as well try and implement %?META or w/e
05:26 llfourn a lot of work for just getting the 5 or so characters of the version :P
05:27 ugexe there are changes coming to the distribution layout / meta format i think
05:27 ugexe that will make this stuff easier
05:27 llfourn \o/
05:28 ugexe if you look at that wrapper code in ::Installation though it uses a .files method to look up a Distribution it looks like
05:29 ugexe that or a CompUnit that has a Distribution attached?
05:30 llfourn compunits have distributions attached?
05:31 ugexe well, they *could*: https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L314
05:31 llfourn ahh ha...they do
05:32 llfourn so yeah I could do a fun work around where I get the compunit from a module in the distribution
05:32 llfourn and grab the distribution from it to get the version
05:32 ugexe .files looks like it returns an array of META info
05:32 llfourn it's slightly odd but it should work
05:33 ka joined #perl6
05:33 ugexe so .files('bin/original-script-name')[0].ver
05:33 ugexe $?FILE wouldnt work if it was installed, as it would be the precomp sha1 path
05:33 ugexe but a fix for that is in the works too i think
05:33 llfourn right I think I have a hacky way forward at least :P
05:38 tmch joined #perl6
05:40 kaare_ joined #perl6
05:50 Cabanossi joined #perl6
05:57 sortiz m: use Test; for $*REPO.repo-chain { for .loaded { say .short-name, .version } }
05:57 camelia rakudo-moar 08ad4b: OUTPUT«Testv6.c␤»
06:03 tmch joined #perl6
06:07 llfourn I've been using ES6 over the past day. It makes JS quite a lot better. Continuations, Promises, () => { } anonymous function syntax.
06:07 llfourn also.. lexical scoping with let and const
06:10 llfourn or at least they seemed lexical... I'm just reading now and they're calling it "block scoping"
06:11 llfourn I guess that's the same thing?
06:12 geekosaur sort of? I'd expect block scoping to allow use-before-"declaration" since the declaration gets re-scoped to the beginning of the block
06:13 geekosaur but for all I know they expected block scoping and lexical scoping to be "the same thing"
06:14 anaeem1_ joined #perl6
06:14 llfourn I've seen this "Also, just like var, variables declared with let are visible before they are declared in their enclosing block" but I don't get what they means
06:15 geekosaur what I said. basically
06:15 geekosaur strict lexical scope would begin the scope at the point of declaration and end it at the end of the containing block
06:15 geekosaur block scope means variables declared in the block come into existence *when the block does*
06:16 geekosaur so they can be used before their declaration as long as you're in the same block
06:16 llfourn I had no idea that var/let did that...
06:16 llfourn I wonder why they made that decision
06:16 llfourn but you still get new copies of the variables for each invocation of the block I hope
06:17 llfourn I haven't tested that yet..
06:17 geekosaur it's actually easier to implement if you make all such names part of the structure representing the block
06:17 geekosaur ancient (into the 1960s) languages did that rather than have to track scope properly
06:18 geekosaur come to think of it, perl 5 does that under some circumstances iirc --- only visible when doing some BEGIN hackery
06:18 llfourn makes sense I think.. but then don't you have to parse the block twice. Once to figure out what variables are declared and then once to actually compile it?
06:19 geekosaur no, you can compile the block as you go, it's the runtime representation that in block scope begins when the block comes into scope vs. when the declaration does
06:19 llfourn but maybe since JS allows globals it just figures that later on
06:19 llfourn yep I getcha
06:20 geekosaur JS beiing untyped there is no real reason to care about the declaration /per se/ at compile time
06:20 geekosaur er, JS variables
06:56 hippie joined #perl6
07:02 CIAvash joined #perl6
07:19 pierrot joined #perl6
07:24 xiaomiao joined #perl6
07:35 pierrot joined #perl6
07:36 domidumont joined #perl6
07:36 masak I think there is a bit of confusion above as to let/const's "can be used before their declaration"
07:36 masak see https://dzone.com/articles/learning-es6-using-let-const-and-temporal-dead-zon
07:37 masak "The variables are created when their containing Lexical Environment is instantiated, but may not be accessed in any way until the variable’s LexicalBinding is evaluated."
07:39 masak what makes the TDZ a bit tricky is that the "temporal" and the "until" mean that (for example) a nested function is allowed to precede a `let` declaration (and use that variable), as long as it's *called* after the `let` declaration
07:41 domidumont joined #perl6
07:55 RabidGravy joined #perl6
07:59 dh7320 joined #perl6
08:06 firstdayonthejob joined #perl6
08:10 darutoko joined #perl6
08:17 sammers joined #perl6
08:22 neilb joined #perl6
08:30 Actualeyes joined #perl6
08:46 TreyHarris joined #perl6
08:48 moritz \o
08:49 SCHAAP137 joined #perl6
08:55 rindolf joined #perl6
08:55 cgfbee joined #perl6
08:56 cfloare joined #perl6
09:13 llfourn masak: Thanks for clearing that up. It's a bit weird but I get it now.
09:15 FROGGS joined #perl6
09:18 masak it's weird. I greatly prefer Perl 6's semantics: uses need to be textually downstream of declarations.
09:19 masak but I suspect things like function hoisting made that not an option in JavaScript.
09:20 llfourn I don't really understand what is meant by hoisting
09:20 llfourn but ES6 seems to have a lot of really handy perl6ish features
09:20 llfourn like being able to something similar to some.method(:$foo,:$bar)
09:21 llfourn or at least being able to do that in hash construction
09:21 masak aye
09:22 masak function hoisting is what makes it possible to call a JS function before it was declared, if it was declared using the `function foo() {}` statement form
09:23 llfourn foo(); function foo() { ... } # you can do this?
09:23 masak conceptually, it's a little bit as if all the function declarations were "lifted" (hoisted) to the top of their surrounding block
09:23 masak llfourn: yes
09:23 llfourn ah ok
09:23 masak one of the uses of that is mutual recursion
09:23 llfourn yep makes sense
09:23 neilb joined #perl6
09:23 masak but it's useful just in general -- for example, many people prefer a style where they have the "mainline code" first, and utility functions later
09:24 llfourn m: foo(); sub foo() {};
09:24 camelia rakudo-moar 08ad4b: ( no output )
09:24 masak note that Perl 6 doesn't do function hoisting. it's just lenient with calls, resolving them at the latest possible time during the compile
09:25 llfourn hmm right foo() will still fail at compile time if it isn't declared later
09:25 masak m: say abs(5); sub abs() { "OH HAI" }
09:25 camelia rakudo-moar 08ad4b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KFPHhufhUL␤Calling abs(Int) will never work with declared signature ()␤at /tmp/KFPHhufhUL:1␤------> 3say 7⏏5abs(5); sub abs() { "OH HAI" }␤»
09:25 masak m: say abs(5); sub abs($n) { "OH HAI" }
09:25 camelia rakudo-moar 08ad4b: OUTPUT«OH HAI␤»
09:26 masak note that there's already an `abs($)` in the setting. but ours in the program overrides that -- and Perl 6 won't know that until it's parsed the whole program
09:26 masak same thing with operators, incidentally
09:27 masak m: say 4 + 4; sub infix:<+>($, $) { "ha-haa!" }
09:27 camelia rakudo-moar 08ad4b: OUTPUT«ha-haa!␤»
09:27 llfourn yes subs declarations are lexical
09:28 masak aye
09:28 masak my point is that the call doesn't "bind" right away when we see it. it binds after we parsed the compunit and know about all the declarations.
09:30 llfourn understood. I've never actually seen that code. It creates a list of things to bind later?
09:30 llfourn or is it something to do with a special QAST node
09:31 masak not sure where it's implemented, actually
09:31 masak in 007, we install "deferred checks" that go back and check after the parse that everything resolves
09:32 azawawi joined #perl6
09:32 azawawi hi #perl6
09:32 llfourn o/
09:32 azawawi anyone know how to get lexically scoped variables information from rakudo?
09:33 llfourn azawawi: like get a list of them?
09:33 azawawi im working on something like this https://atom.io/packages/refactor
09:33 azawawi yup
09:33 azawawi in each scope
09:33 llfourn m: my ($a,$b,$c); .say for MY::.keys
09:33 camelia rakudo-moar 08ad4b: OUTPUT«$=pod␤!UNIT_MARKER␤$c␤EXPORT␤$_␤$!␤$b␤::?PACKAGE␤GLOBALish␤$¢␤$a␤$=finish␤$/␤$?PACKAGE␤»
09:33 polyfloyd joined #perl6
09:34 llfourn hmm in each scode
09:34 llfourn in what context is this code executing?
09:34 azawawi js will be executing a `perl6` process
09:34 azawawi like the linter is currently doing a `perl6 -c`
09:35 llfourn hmmm
09:35 azawawi wrap the source code at END { ... } ?
09:36 azawawi i remember there was a perl6 --target command line for that information
09:36 llfourn you can get a text version of the AST
09:36 llfourn with --target=ast
09:37 llfourn but will that help you?
09:37 llfourn it sounds like you want to descend each lexical scope in the file and get a list of variables in each one?
09:38 llfourn i suppose you could grab some of that from the AST
09:38 llfourn look for QAST::Var declarations
09:39 azawawi im looking at it... thanks :)
09:39 llfourn good luck :)
09:39 azawawi https://atom.io/packages/refactor  # way too cool animation :)
09:40 llfourn pretty nice
09:40 pmurias joined #perl6
09:42 azawawi llfourn: it is perfect with one exception... line/column number information
09:42 llfourn HrrmHm
09:42 pmurias azawawi: is the info in QAST::Var.node incorrect?
09:43 llfourn pmurias: he's just looking at the text output which doesn't have it I don't think
09:43 llfourn --target=ast
09:43 azawawi yup
09:43 llfourn azawawi: maybe you can try and get your hands on the actual QAST...
09:44 llfourn and then tell me how you did it!
09:44 pmurias azawawi: did you try disabling the optimizer?
09:44 azawawi :)
09:45 kurahaupo joined #perl6
09:46 pmurias azawawi: --target=ast is for human consumption only
09:47 azawawi pmurias: so how do I get the line number information?
09:47 llfourn pmurias: is there some nqp code where you can get the perl6  compiler to return you a QAST tree given some code
09:48 pmurias I'm trying to work out the snippet to get to the QAST tree
09:48 azawawi i like also the message "For more information, see the perl6(1) man page." which rakudobrew doesnt install any man page lol
09:49 llfourn pmurias++ # It would be great to be able to do it
09:50 azawawi llfourn: the reason that i asked for `perl6 --target=something` is that some time ago we had that line number information while i was doing syntax highlighting via rakudo :)
09:50 llfourn oh ok so there used to be line number info?
09:50 azawawi .tell moritz http://irclog.perlgeek.de/perl6/search is forbidden (403)
09:50 yoleaux azawawi: I'll pass your message to moritz.
09:51 azawawi llfourn: yup because that's what an AST is :)
09:51 llfourn well it could be that :P
09:57 _dolmen_ joined #perl6
09:57 shadowpaste "pmurias" at 217.168.150.38 pasted "getting the QAST from some chunk of Perl6 code" (4 lines) at http://fpaste.scsys.co.uk/506347
09:58 llfourn pmurias: awesome!
10:00 llfourn azawawi: so I guess you need to write a nqp helper script that will descend the tree and give you what you want.
10:00 azawawi cool
10:00 azawawi pmurias++
10:00 azawawi llfourn+
10:01 llfourn you could do some pretty spectactular things in atom with that I bet
10:02 llfourn you might need to write/copy some stuff from rakudo to do lexical lookups
10:08 azawawi pmurias: your excellent rakudo-js could work wonderfully with atom given that electron is chromium
10:09 azawawi pmurias: it means we could run it natively and that's way faster than the currrent `perl6 -c` process
10:09 llfourn that would be pretty nice
10:10 azawawi also it could be a perfect match for my `Electron` module :)
10:10 Actualeyes joined #perl6
10:10 azawawi now im using a JSON::RPC bridge to call electron js API
10:11 Red_ joined #perl6
10:11 nine How can loading a precompiled NativeCall error out with "Missing or wrong version of dependency '&return_hash_for'" when return_hash_for is defined _in_ NativeCall?
10:11 Red_ hi everyone
10:12 azawawi once rakudo-js is working, electron can host it and native Perl 6 can be truly written as desktop web apps :)
10:12 Red_ How can we move people from perl5 to perl6?
10:12 nine Red_: do we want to?
10:13 Red_ nine: If Perl6 is the future, why not?
10:13 llfourn I'd say we'd like to move python, ruby people just as much as perl people :)
10:13 llfourn or people that don't know any language yet
10:14 nine Red_: if Perl 6 is _the_ future of Perl, people will come one their own.
10:14 masak Perl 5 still has speed, stability, features, and modules on Perl 6. there are plenty of legitimate reasons not to move yet.
10:14 nine There are fewer reasons for not using both ;)
10:15 Red_ PHP, Perl, Python, Ruby. I hope that one day all 4 of these languages gets merged into one...
10:15 masak why?
10:15 llfourn with all these nice things in ES6 I am move likely to move p5 code to node than p6
10:16 masak heh.
10:16 Red_ in a world of Django, Rails and PHP where will Perl6 stand?
10:17 llfourn Red_: Django and rails and PHP are all losing ground to other things as far as I can tell
10:17 masak it will stand with web framewords of its own?
10:17 llfourn and Perl6 is growing and improving
10:18 pmurias joined #perl6
10:19 azawawi llfourn: es6 is not that perfect btw yet... im using it already in atom-perl6-editor-tools :)
10:19 llfourn azawawi: do you have any good JS atom workflow
10:19 llfourn im just trying out atom -- what's the best way to run a node file?
10:20 azawawi llfourn: install `script`
10:20 llfourn azawawi: right this looks like what I'm missing
10:20 azawawi llfourn: script has already perl6 support :)
10:21 llfourn azawawi: I think I'll get used to it in node and then see if atom is a better fit than emacs for p6
10:21 azawawi it is :)
10:21 azawawi Perl 6 FE is way too cool
10:21 llfourn I am mostly just missing the way emacs feels
10:22 azawawi https://github.com/MadcapJake/language-perl6fe
10:22 azawawi https://atom.io/packages/atom-perl6-editor-tools
10:22 llfourn like where it puts my cursor when I move to different frames
10:22 llfourn I'm excited to see what the above^ can do
10:23 kjs_ joined #perl6
10:24 azawawi llfourn: install https://github.com/DanBrooker/file-icons and minimap ... and you'll never look back :)
10:24 llfourn will do thanks
10:24 azawawi llfourn: mind you... emacs and vim are better match for editing big data files
10:24 azawawi llfourn: s/better/a better/
10:35 pmurias azawawi: putting rakudo-js in electron/atom plugins/react.native/other cool places is definietly part of the plan for Perl 6
10:36 azawawi pmurias: so when does the grant start? :)
10:37 pmurias hopefully soon, it's currently voted on
10:43 pmurias azawawi: I'm hoping for next week
10:43 azawawi pmurias: good luck :)
10:44 pmurias thanks
10:45 Hotkeys Grant?
10:46 pmurias_ joined #perl6
10:48 dalek rakudo/nom: 138441c | lizmat++ | src/core/Buf.pm:
10:48 dalek rakudo/nom: Make ~|, ~& and ~^ about 600x faster
10:48 dalek rakudo/nom:
10:48 dalek rakudo/nom: - for two 10K buffers, YMMV for larger / smaller buffers
10:48 dalek rakudo/nom: - no longer creates work copies of buffers in P6 space
10:48 dalek rakudo/nom: - buffers of unequal length just copy (~| and ~^) or set to 0 (~&)
10:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/138441c97d
10:50 vendethiel joined #perl6
10:51 azawawi Hotkeys: http://news.perlfoundation.org/2016/02/ian-hague-perl-6-grant-applica.html
10:54 lizmat afk for most of the rest of the day&
11:10 Skarsnik joined #perl6
11:10 Skarsnik Hello
11:10 sortiz \o Skarsnik
11:13 cognominal m: my class A {}; say A.WHICH; say A.^attributes; { my class A { has $a }; say A.WHICH; say A.^attributes }; say A.^attributes
11:13 camelia rakudo-moar 138441: OUTPUT«A␤()␤A␤(Mu $!a)␤()␤»
11:14 cognominal Hi. Two different homonymous classes with same .WHICH  This must be wrong.
11:15 cognominal On a different but related matter, I think that class default scope should be lexical in interactive mode.
11:16 llfourn I guess Mu.WHICH isn't quite right?
11:18 cognominal m: say Mu.WHICH
11:18 camelia rakudo-moar 138441: OUTPUT«Mu␤»
11:18 cognominal m: say Mu.WHICH does True
11:18 camelia rakudo-moar 138441: OUTPUT«Mu␤»
11:18 cognominal oops
11:19 cognominal m: say (Mu does True).WHICH
11:19 camelia rakudo-moar 138441: OUTPUT«Cannot use 'does' operator with a type object.␤  in block <unit> at /tmp/o7nIoRqmlQ line 1␤␤»
11:19 cognominal m: say (1 does True).WHICH
11:19 camelia rakudo-moar 138441: OUTPUT«Int+{Bool}|1␤»
11:19 cognominal m: say (1 but True).WHICH
11:19 camelia rakudo-moar 138441: OUTPUT«Int+{<anon|68546912>}|1␤»
11:20 cognominal m: say (Mu but True).WHICH
11:20 camelia rakudo-moar 138441: OUTPUT«Mu+{<anon|62720752>}␤»
11:39 wamba joined #perl6
11:53 tmch joined #perl6
12:01 masak m: say ((1 does True) does False).WHICH
12:01 camelia rakudo-moar 138441: OUTPUT«Int+{Bool}+{Bool}|1␤»
12:05 musiKk joined #perl6
12:08 timotimo o/
12:18 vendethiel joined #perl6
12:46 dbrunton joined #perl6
12:52 wamba joined #perl6
12:52 cire` joined #perl6
12:55 musiKk joined #perl6
12:55 vendethiel joined #perl6
12:59 MadcapJake1 joined #perl6
13:08 cire` left #perl6
13:17 baest joined #perl6
13:25 yqt joined #perl6
13:33 kid51 joined #perl6
13:43 brrt joined #perl6
13:57 MadcapJake1 joined #perl6
14:01 wamba joined #perl6
14:01 QORRiE joined #perl6
14:17 RabidGravy joined #perl6
14:18 _dolmen_ joined #perl6
14:20 wamba joined #perl6
14:31 Skarsnik joined #perl6
14:49 rindolf joined #perl6
15:00 neilb joined #perl6
15:09 sena_kun joined #perl6
15:09 sena_kun left #perl6
15:20 zpmorgan joined #perl6
15:31 khw joined #perl6
15:48 secwang joined #perl6
15:50 sftp joined #perl6
15:53 sufrostico joined #perl6
15:53 brrt joined #perl6
15:59 RabidGravy is the resolution of Supply.interval milliseconds?
16:00 psch m: Supply.interval(1).tap(-> $_ { say now }); sleep 5
16:00 camelia rakudo-moar 138441: OUTPUT«Instant:1456588847.753151␤Instant:1456588848.753479␤Instant:1456588849.754596␤Instant:1456588850.755744␤Instant:1456588851.756780␤»
16:00 psch not sure how to interpret "resolution" there
16:00 psch m: Supply.interval(.1).tap(-> $_ { say now }); sleep 1
16:00 camelia rakudo-moar 138441: OUTPUT«Instant:1456588881.599752␤Instant:1456588881.699183␤Instant:1456588881.799324␤Instant:1456588881.899514␤Instant:1456588881.999679␤Instant:1456588882.099817␤Instant:1456588882.199981␤Instant:1456588882.300210␤Instant:1456588882.400348␤Inst…»
16:03 RabidGravy perl6 -e 'my $a = 0; Supply.interval(0.01).tap({$a++}); sleep 1; say $a
16:03 RabidGravy m: my $a = 0; Supply.interval(0.01).tap({$a++}); sleep 1; say $a
16:03 camelia rakudo-moar 138441: OUTPUT«99␤»
16:03 RabidGravy so good for hundreds
16:03 psch m: my $a = 0; Supply.interval(0.00001).tap({$a++}); sleep 1; say $a
16:03 camelia rakudo-moar 138441: OUTPUT«1␤»
16:03 psch m: my $a = 0; Supply.interval(0.001).tap({$a++}); sleep 1; say $a
16:03 camelia rakudo-moar 138441: OUTPUT«932␤»
16:04 RabidGravy so sorta kinda
16:12 RabidGravy just about good enough for 96ppqn for a sane tempo
16:16 psch heh, the repo i played around with just went with Supply.interval(1/8)
16:17 xpen joined #perl6
16:17 psch i probably showed that off already, it's definitely broken in current nom, and i'm not sure it'd work on the jvminterop branch either vOv
16:18 xpen left #perl6
16:18 psch m: my $a = 0; Supply.interval(0.001).tap({$a++}); sleep 1; say $a # curious about variance...
16:18 camelia rakudo-moar 138441: OUTPUT«934␤»
16:19 psch m: my $a = 0; Supply.interval(0.001).tap({$a++}); sleep 1; say $a # curious about variance...
16:19 camelia rakudo-moar 138441: OUTPUT«937␤»
16:19 timotimo relying on exact timing from a Supply.interval is likely foolish. running a measurement on camelia is also a very bad idea, as the server camelia runs on also does other stuff
16:20 psch timotimo: oh, it's not about exact measurements for me right now, just a completely unscientific first impression :)
16:20 timotimo i'd even go as far as to call it anti-scientific :P
16:20 RabidGravy I'm calling it "close enough for jazz"
16:20 psch haha
16:21 timotimo hehe, jazz
16:21 RabidGravy Roger Linn spent years perfecting the "swing" in the MPC devices and then the DSI Tempest, we just get it for free
16:22 RabidGravy I'll leave the 960ppqn resolution to the hardware though
16:23 [Tux] joined #perl6
16:24 * psch wonders what ex tempore (or similar) support on that front
16:24 psch i've been meaning to have an actual look at that for a year or so, but (1) lisp and (2) tuits... vOv
16:24 timotimo you wanna see how my local machine fares with the 0.001 thing?
16:25 psch sure
16:25 psch i don't have a local rakudo atm
16:25 timotimo https://gist.github.com/timo/fcc7e78808dd2dda89ca
16:25 RabidGravy mine's actually a lot worse
16:25 psch huh
16:26 jnthn Hah, mine's owning it: https://gist.github.com/jnthn/77ad2eed127aafe4f1c0
16:26 timotimo wow, windows!
16:27 * jnthn was a little surprised :)
16:27 timotimo i've updated mine with more results
16:28 timotimo mine basically makes a sawtooth wave
16:29 RabidGravy doesn't Windows have a millis event in the eventloop thingy (years since I touched any of that)
16:31 ilbelkyr joined #perl6
16:32 nowan_ joined #perl6
16:34 FreezerburnV joined #perl6
16:37 nowan joined #perl6
16:44 skids joined #perl6
16:44 musiKk joined #perl6
16:50 Ben_Goldberg joined #perl6
16:52 BenGoldberg_ joined #perl6
17:04 kent\n joined #perl6
17:04 kent\n joined #perl6
17:04 rburkholder joined #perl6
17:04 kjs_ joined #perl6
17:10 sjoshi joined #perl6
17:19 Ven joined #perl6
17:22 Skarsnik hu, what kind of error is that
17:22 kid511 joined #perl6
17:22 Skarsnik ===SORRY!===
17:22 Skarsnik Missing serialize REPR function for REPR VMException
17:23 kjs_ joined #perl6
17:28 kurahaupo joined #perl6
17:30 ugexe the 'ol randomly change things until it works error
17:30 zakharyas joined #perl6
17:32 RabidGravy Skarsnik, it almost certainly means that you are doing something in the compile time mainline that is causing a Failure
17:32 RabidGravy such as "try require Foo" which seems quite common
17:33 kurahaupo joined #perl6
17:33 RabidGravy horrible, horrible error message though,  almost my least favourite after "cannot invoke this object"
17:34 Skarsnik Oh must have been UA when missing the ssl module
17:34 Skarsnik because I don't have it anymore x)
17:34 RabidGravy that's fixed in H::UA now
17:34 Skarsnik maybe, but I am using a old rakudo
17:34 Skarsnik or should I forget to panda update?
17:34 ka joined #perl6
17:35 FROGGS try require Foo shouldnt return anything when being sink
17:35 RabidGravy it was indeed "try require IO::Socket::SSL" in the mainline
17:35 Skarsnik I just installed H::UA
17:35 RabidGravy well it definitely causes that error in the mainline
17:47 sufrostico joined #perl6
17:58 timotimo "panda update" doesn't actually update packages, just the ecosystem list
18:01 Skarsnik oh just a list
18:01 timotimo yeah
18:02 Skarsnik hm \w does not catch line return?
18:02 firstdayonthejob joined #perl6
18:02 timotimo m: say "\n\n\n".comb(/\w/).perl
18:02 camelia rakudo-moar 138441: OUTPUT«().Seq␤»
18:02 timotimo seems like
18:02 timotimo m: say "\n\n\n".comb(/\W/).perl
18:02 camelia rakudo-moar 138441: OUTPUT«("\n", "\n", "\n").Seq␤»
18:04 Skarsnik m: say "dd \n\r\n\n    dd" ~~ /dd\w+dd/
18:04 camelia rakudo-moar 138441: OUTPUT«Nil␤»
18:04 timotimo i think \w is for "horizontal whitespace" and \s is for "whitespace", eh?
18:04 timotimo and then \v is for "vertical whitespace" if i'm not mistaken
18:05 Skarsnik m: say "dd \n\r\n\n    dd" ~~ /dd\s+dd/
18:05 camelia rakudo-moar 138441: OUTPUT«「dd ␤
18:05 geekosaur mrrr
18:06 geekosaur looks to me like \w is the same as in perl 5: word characters
18:08 Skarsnik Oh yeah
18:08 Skarsnik nvm
18:08 Skarsnik w = word, not whitespace xD
18:10 CIAvash joined #perl6
18:12 psch m: say " \n" ~~ /\h\v/
18:12 camelia rakudo-moar 138441: OUTPUT«「 ␤」␤»
18:21 BenGoldberg_ joined #perl6
18:26 lucs A WHAT is showing me 「(Foo])」 -- what's that closing square bracket?
18:27 Skarsnik a capture
18:28 Skarsnik huggable, Capture
18:28 huggable Skarsnik, class Capture [Argument list suitable for passing to a]: http://doc.perl6.org/type/Capture
18:28 Skarsnik hm
18:29 Skarsnik or it's an ast. I am not sure, it's the type a regex return you when you capture thing
18:30 lucs Uh, okay.
18:32 timotimo uh, what
18:32 timotimo that's weird
18:33 moritz Skarsnik: that's a Match
18:33 yoleaux 09:50Z <azawawi> moritz: http://irclog.perlgeek.de/perl6/search is forbidden (403)
18:33 moritz is that forbidden for anybody else?
18:33 timotimo i get the search page
18:34 lucs No problem here either.
18:34 * moritz too
18:34 moritz .tell azawawi cannot reproduce (re 403 for http://irclog.perlgeek.de/perl6/search); if the problem persists, please /msg me your public IP address
18:34 yoleaux moritz: I'll pass your message to azawawi.
18:38 ugexe m: for ^5 { next() R, say $_ if 1; say 666; } # i like being able to put the next() before the message it should produce sometimes. is there a better way to express it?
18:38 camelia rakudo-moar 138441: OUTPUT«0␤1␤2␤3␤4␤»
18:38 ugexe as to why i like to do that, its usually because the message itself is long and would otherwise conceal the small `next` itself
18:39 ugexe if it were on the right side
18:39 moritz just put it on the next line
18:40 moritz that way the long message doesn't obscure the next
18:40 ugexe i could, but many times the conditional is postfix and thus on the next line
18:42 moritz if the message is so long that you fear it obscures the next, you shouldn't use a postfix conditional
18:44 moritz it seems to me you're stretching some shortcuts to (and maybe past) their limits, but instead of recognizing that, and stopping to use the shortcut, you're looking for more tricks to stretch those limits
18:45 moritz which won't lead to readable code, in my experience
18:49 cdg joined #perl6
18:53 atweiden joined #perl6
18:54 atweiden flussence: with the libtommath 1.0 release, are you building moarvm with system libtommath?
18:56 atweiden i ask because you note in your ebuild "Note that the bundled libtommath has patches that have been sent upstream, but aren't in any released version; 0.42 will compile but causes slight bugs."
18:56 flussence didn't know it had a release, I'll go try it
18:56 flussence it *can* build with the system libtommath already, I've just force-disabled the option due to that bug
18:59 ugexe i suppose it just depends. for debugging/output/unimportant details of a routine i prefer to be as concise as possible, letting the important bits express themselves verbosely and (to me) improving the overall readability
19:03 rudi_s Hi. I know you can exclude a function from a stacktrace but I can't find it anymore. Any ideas?
19:03 flussence sub foo() is hidden-from-backtrace
19:04 rudi_s Thank you!
19:04 * rudi_s feels stupid, first hit in the search doc.perl6.org - but didn't find it using $SEARCH-ENGINE.
19:08 rudi_s Can I modify the message of an existing exception?
19:09 kent\n joined #perl6
19:14 yqt joined #perl6
19:22 FROGGS rudi_s: do you ask if you can do it technically or do you ask whether this will be a back-compat breaking change?
19:24 rudi_s FROGGS: Technically. I want to include additional information in a X::Proc::Unsuccessful exception.
19:24 FROGGS rudi_s: you can augment it at first
19:25 FROGGS rudi_s: and also augment the class/method that throws it
19:25 FROGGS and when you are happy, you move your changes to the rakudo sources, and create a pull request
19:26 rudi_s FROGGS: It's not because there's an issue in rakudo. I just want to add additional information which are then later used in my program.
19:27 rudi_s Hm. Now that I think about it, maybe it would be nice to have in Rakudo. I want to add the original command to the exception message.
19:27 FROGGS then perhaps subclass it, and throw your own
19:27 FROGGS ohh...
19:27 FROGGS sounds helpful indeed
19:43 secwang joined #perl6
19:45 ugexe maybe should be added to Proc object itself
19:45 Ven joined #perl6
19:46 RabidGravy yeah, that would make sense
19:48 rudi_s That was the plan.
19:49 rudi_s Btw. I'm confused. Should run 'foo'; cause an exception?
19:49 rudi_s :m run 'foo';
19:49 rudi_s m: run 'foo';
19:49 camelia rakudo-moar 138441: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub run at src/RESTRICTED.setting line 14␤  in block <unit> at /tmp/EQC2apOtT1 line 1␤␤»
19:49 rudi_s Obviously it failed to start the program so I'd except an exception, but it seems to work fine.
19:50 timotimo well, it gives an exception on camelia
19:50 timotimo timo@schmetterling ~> perl6 -e 'run "false"'
19:50 timotimo The spawned process exited unsuccessfully (exit code: 1)
19:50 Skarsnik false is a real cmd
19:51 rudi_s > run 'wtf'
19:51 rudi_s Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => -1, pid => Any, signal => 254, args => ["wtf"])
19:51 rudi_s (The args part is from my workings on a patch.)
19:52 rudi_s Hm, even more confused:
19:52 rudi_s $ ./perl6 -e 'run "foo"'
19:52 rudi_s The program foo exited unsuccessfully (exit code: -1)
19:52 rudi_s in block <unit> at -e line 1
19:52 rudi_s But when I run that in perl6's interactive mode it doesn't raise an exception.
19:53 rudi_s Ok, it works in a normal program.
19:54 rudi_s FROGGS: Proposed patch regarding the arguments: https://pbot.rmdir.de/awHAobg1S4lbaTPxu-Ka7g
19:55 ugexe i wouldnt just dump $.proc.args, that could be a pretty long line of text
19:56 rudi_s Basically that's the idea. Personally I often want to know which exact program failed to run - and normally I have to fall back to strace. Printing everything sounds like a good solution to me.
19:56 ugexe its a good idea if you only run process with a few arguments
19:56 ugexe if you run processes with many arguments, often times long such as absolute paths, it would be confusing
19:57 timotimo if you have code that tries to run, it can catch the exception and just decorate it with the extra information from local variables
19:57 ugexe if you want to dump all of that, just catch the exception and dump if if you want
19:58 ugexe its like the JSON exception that dumps the entire json data structure, so most times you dont even know it just dumped out an exception. just that a bunch of json was printed on your screen for some reason
19:59 FROGGS I +1 outputting the cmd that failed by default... I'd just print it below the known error message
19:59 cdg_ joined #perl6
20:01 RabidGravy I'd actually go for putting it in the exception and not printing it
20:02 rudi_s Like this? "The spawned process exited unsuccessfully (exit code: $.proc.exitcode())\n" ~ "Process arguments: {$.proc.args}"
20:02 rudi_s That doesn't help me as user of the program which just raised the exception.
20:02 ugexe it does if its caught and then output
20:03 RabidGravy "/usr/lib64/erlang/erts-6.3/bin/beam.smp -W w -A 64 -P 1048576 -K true -B i -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7/sbin/../ebin -noshell -noinput -s rabbit boot -sname rabbit@coriolanus -boot start_sasl -config /etc/rabbitmq/rabbitmq -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"
20:03 RabidGravy /var/log/rabbitmq/rabbit@coriolanus.log"} -rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@coriolanus-sasl.log"} -rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7/sbin/../plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@coriolanus-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/v
20:03 RabidGravy ar/lib/rabbitmq/mnesia/rabbit@coriolanus" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672"
20:03 rudi_s But I want to get the output per default.
20:03 RabidGravy just saying
20:03 rudi_s RabidGravy: So? Looks good to me. I can immediately see which program failed.
20:03 ugexe CATCH { when X::Proc::Unsuccessful { say $_.proc.args }; };
20:03 Hotkeys Morning nerds
20:03 rudi_s ugexe: But the program must do this. And most of them won't.
20:03 RabidGravy no
20:05 ugexe that is a fault of the program
20:05 rudi_s My work flow without full output is always this: 1.) swearing that the programm is stupid, 2.) starting the program with strace -e execve -f ..., 3.) finding the command line - I'd like to skip that step.
20:05 rudi_s Sure, but I don't see the problem of providing good defaults. If you don't like the long exception, just catch it and replace it with something shorter.
20:06 ugexe because thats backwards compared to catching it and outputting the additional details as needed if you ask me
20:06 RabidGravy or if you want the full command just catch it and print it
20:06 rindolf joined #perl6
20:07 rudi_s RabidGravy: And how do I do that for a program I don't write? Sure I can patch it, but that doesn't help if it's distributed on the system and I don't have root access.
20:07 rudi_s ugexe: But it helps all users who need the additional information. Which is IMHO everybody who stumbles over that exception.
20:07 RabidGravy sorry, I'm confused
20:08 rudi_s "failed to start program" <- how is that useful? - it's like "failed to open file" <- wow, thanks, I really know whats going on.
20:08 rudi_s I want to see "failed to start /usr/bin/program-which-is-not-installed" or "failed to start /usr/bin/foo file-which-doesnt-exist" so I know exactly what's going on.
20:08 RabidGravy right, but you can catch the exception and it will have which command it is, i don't understand how that requires changing the program
20:08 timotimo can't we just extract the first argument, which ought to be the command name?
20:09 RabidGravy you want tto change the way the exception is constructed, changing it so that it has the command
20:09 rudi_s RabidGravy: I'm not talking about what I'd do in the programs _I_ write, but what happens when other people use run in their programs without catching the exception.
20:09 RabidGravy so you put that it in the exception, you catch the exception
20:09 kurahaupo joined #perl6
20:09 dalek rakudo/nom: b7db53a | (Salvador Ortiz)++ | src/Perl6/Compiler.nqp:
20:09 dalek rakudo/nom: Multi-line REPL: Detect grammar's failed goals.
20:09 dalek rakudo/nom:
20:09 dalek rakudo/nom: That allows the following session:
20:09 dalek rakudo/nom: > my $a = <
20:09 timotimo anyway, exceptions are now a thing of 6.c conformance; adding new attributes, is that fine? probably only for 6.d, eh?
20:09 RabidGravy that isn't *your* problem, or mine or anyone apart from the author of the program
20:10 rudi_s timotimo: I'd prefer the full command line.
20:10 dalek joined #perl6
20:10 rudi_s RabidGravy: Well, it's mine as a user of Perl6 programs.
20:11 ugexe i'd argue the average user who isnt a develoeper is not interested in the full path of the command that failed. if you are catering to developers, then catch the exception and add stuff they would be interested in
20:11 RabidGravy sticking 2048 characters of garbage into an exception message is profoundly unhelpful to most people
20:11 rudi_s Of course the author could have checked the exception and whatever. But I just want to make it easier for all users of the program.
20:12 ugexe maybe it only seems easier to you, a developer
20:12 rudi_s Of ourse.
20:12 rudi_s If a program raises an exception then it won't be easy for the user even if we don't print the full path.
20:12 RabidGravy I'll paste that rabbitmq command line again if you insist and you tell me how that is useful to a *user*
20:13 ugexe joe blow who doesnt care about the details will likely be able to do more with a short sensible default than some multi line monster
20:13 rudi_s RabidGravy: It's useful because he can paste it and send it in the bug report to the dev without starting strace.
20:14 buharin joined #perl6
20:15 psch i'd suggest RAKUDO_VERBOSE_EXCEPTIONS
20:15 ugexe the developer who isnt catching the exception to do that themselves probably isnt the developer who cares about bug reports
20:15 psch as env var
20:15 rudi_s ugexe: Are you serious?
20:15 psch otoh, that might as well be something a given developer wants to put into their script vOv
20:16 rudi_s I really really like to program without ever catching any exception which will "never" occour. Why should I make my program more complicated with useless exception checks when it can just die if an unlikely error occurs. And when that happens, I really want to get the full output so I can fix it.
20:16 timotimo actually i wouldn't mind if the exception had a field for the args
20:17 timotimo but putting it into the output by default - especially in full - i wouldn'n be for
20:17 FROGGS ugexe: did you ever write services that run unattended and where your only source of information is log files?
20:17 FROGGS wrote*
20:18 FROGGS timotimo: that's like "Unable to fetch file" without stating the url or protocol or anything
20:18 timotimo hmm
20:18 ugexe yes. i generally log the commands I run when the settings are at a somewhat high verbosity level
20:18 timotimo but why would you not catch the exception close to the code that uses &run?
20:18 psch fwiw, i don't like using programs that give me untreated, language specific exception
20:19 timotimo yes, exactly
20:19 mspo rudi_s: let it crash
20:19 psch so i do agree with ugexe here.  if the developer doesn't anticipate a &run call ever failing he's not paying enough attention
20:19 mspo oh wait, wrong channel :)
20:19 rudi_s timotimo: Because the developper is/was stupid or lacy.
20:19 rudi_s Still I was user, want to get the information I need to debug this issue.
20:20 rudi_s Like FROGGS said, it's like "could not open file". Absolutely useless error message.
20:20 timotimo it also gives you a backtrace
20:20 rudi_s And I want software (and languages) which generate helpful error messages per default. And to debug the issue, I need the path.
20:20 timotimo hmm
20:21 rudi_s timotimo: Sure, and what? I don't speak perl6 (assuming I'm a normal user/sys admin) and can't read the code.
20:21 psch rudi_s: note i don't disagree with having the field, but i don't think always printing (potentially 2**11 chars long) command lines is the right idea
20:21 psch hence RAKUDO_VERBOSE_EXCEPTIONS
20:21 timotimo rudi_s: well, hopefully methods and subs are named well by the developer
20:21 psch i'm pretty sure there's other Exceptions that could benefit form that, if not now then later
20:21 rudi_s psch: RAKUDO_VERBOSE_EXCEPTIONS doesn't help, because I (as user) don't know about it.
20:21 timotimo i.e. "load_configuration_file" rather than "a"
20:21 FROGGS timotimo: often enough the files you work with or the commands you rung are kinda dynamic... and you need a way to get information to reproduce the case
20:21 FROGGS what if that command only fails one out of 100 runs?
20:22 psch eh, nevermind then vOv
20:22 timotimo k
20:22 FROGGS how do you debug that just with the stack trace
20:22 rudi_s timotimo: That's besides the point. I want sane defaults even if (or especially when) the programmer was lazy/stupid. I want the language to help _me_, the user of the program.
20:22 FROGGS aye
20:22 * psch thinks there's different definitions of "user" at work here
20:22 timotimo 'k
20:22 psch which is part of what makes this an actual argument
20:22 ugexe you mean _you_, a developer who uses the program. not _regular user_, the user of most programs
20:22 FROGGS psch: surely
20:23 FROGGS psch: if we had dba we could generate messages for the "real user"
20:23 psch when i say "user" i mean the person who i can tell to type < RAKUDO_VERBOSE_EXCEPTION=1 $program > instead of < $program >, because they don't have any idea why it doesn't work in the first place
20:24 psch FROGGS: oh, :dba yeah
20:24 psch that's something i wanted to look into as well
20:24 psch iirc there was even a bug that stopped happening with :dba or something..?
20:24 rudi_s When I say user, I mean a person who knows to use a command line but has no idea about perl6 or what exactly the program is doing. Think of an sys-admin or a programmer.
20:24 ugexe why not just dump :err too?
20:24 FROGGS psch: it's not that easy... I've got a middleware service and I cant just "rerun the program"
20:25 rudi_s Of course there might be users which are discomforted by a longer error message, but I think the debug aid with the full output is more important than that.
20:25 FROGGS ... not when something starts to fail after weeks of incoming traffic from foreign company servers
20:25 FROGGS so, the default should add enough information that you can start investigating
20:25 rudi_s +1
20:26 FROGGS imagine a "file not found" without the actual filename :D
20:26 FROGGS and it really is the same here
20:26 psch FROGGS: like < mkdir $nested-path > ?
20:26 RabidGravy yes, but not a full unadorned possibly multi line bunch of command like
20:26 psch without -p that is
20:26 _dolmen_ joined #perl6
20:27 FROGGS psch: what do you mean?
20:27 FROGGS psch: it should print the path it tried (and failed) to create, no?
20:27 psch $ mkdir bar/baz/quux
20:27 psch mkdir: cannot create directory ‘bar/baz/quux’: No such file or directory
20:27 ugexe run 'perl6', '-e', $large-perl-script.IO.slurp
20:27 psch FROGGS: it does, yes, but doesn't say which level doesn't exist
20:27 psch that error might mean bar doesn't exist or bar/bar doesn't exist
20:27 FROGGS psch: yes, but you can check now easily without rerunning the program
20:28 FROGGS and that's my point
20:32 psch well, i'm definitely back at "i don't have a strong opinion either way", from "i like this one solution" :)
20:32 psch the thing with mkdir, in my opinion, is that it still doesn't tell me enough
20:33 psch similar to a Proc::Unsuccessful that only tells me the line number and not the exact args
20:33 psch line number of the p6 program that is
20:33 psch mind, mkdir isn't supposed to be an example for what to strive for, but an example of what people deal with just fine
20:34 rudi_s I've just created a pull request for rakudo and I'd really like to get it merged.
20:36 ugexe mkdir isnt quite the same because its argument/exception output will always be a single line
20:37 ugexe run 'perl6', '-e', $large-perl-script.IO.slurp # it does not have the potential for gargantuan exception messages like this
20:38 FROGGS then we limit it to 100 chars
20:39 RabidGravy or less, such that it would fit in one line of an average terminal
20:42 rudi_s Could we at least say something like 300 or so? 100 is way too short to be useful. - I'm against cutting the output, but if we do, could we cut it in the middle, so the file names (which are most of the time at the end) are still present?
20:43 pmurias joined #perl6
20:43 pmurias maybe it would make sense to print the command line arguments to a failed executions if they are short?
20:44 RabidGravy why is 100 too short to be useful
20:44 Ven joined #perl6
20:46 lizmat good *, #perl6!
20:46 pmurias lizmat: hi
20:46 rindolf lizmat: hello.
20:46 lizmat pmurias rindolf o/
20:47 rindolf lizmat: how are you?
20:48 lizmat pretty good: spent most of the afternoon at a NL comic-con like event (Stripdagen)
20:49 rindolf lizmat: ah, nice.
20:49 rindolf lizmat: I quite enjoy Sci-Fi/Fantasy/etc. cons.
20:50 rindolf lizmat: did you take any photos?
20:50 lizmat alas... none: too busy nosing around comics and associated memorabilia  :-)
20:51 rindolf lizmat: ah.
20:52 lizmat still another day tomorrow... but we won't go there then.
20:54 rindolf lizmat: ah.
20:55 atweiden do p6 sub signatures allow for referencing parameters in the sig, e.g.
20:55 atweiden sub path-is-child-of-from(@from where *.elems == @path.elems, @path where *.elems == @from.elems) {*}
20:55 atweiden is there some other way to do that in the sig?
20:56 Ven joined #perl6
20:56 buharin hey
20:56 buharin can I put smh like has constant $?MAIN_LINK
20:56 buharin in my class?
20:56 buharin I get an error
20:56 psch m: sub f(@a, @b where @a.elems == @b.elems) { }
20:56 camelia rakudo-moar 7c6254: ( no output )
20:56 psch m: sub f(@a, @b where @a.elems == @b.elems) { }; f [1,2], [3,4,5]
20:56 camelia rakudo-moar 7c6254: OUTPUT«Constraint type check failed for parameter '@b'␤  in sub f at /tmp/BA4a_R6W1F line 1␤  in block <unit> at /tmp/BA4a_R6W1F line 1␤␤»
20:57 FROGGS buharin: dont use the question mark twigil for now
20:57 buharin ok
20:57 atweiden psch: got it
20:58 buharin FROGGS, how to make class constant
20:58 FROGGS m: class Foo { my constant $.bar = 42 }; say Foo.bar
20:58 camelia rakudo-moar 7c6254: OUTPUT«5===SORRY!5=== Error while compiling /tmp/14e4eVkE2o␤Variable $.bar used where no 'self' is available␤at /tmp/14e4eVkE2o:1␤------> 3class Foo { my constant $.bar7⏏5 = 42 }; say Foo.bar␤»
20:58 FROGGS m: class Foo { my $.bar = 42 }; say Foo.bar
20:58 camelia rakudo-moar 7c6254: OUTPUT«42␤»
20:58 FROGGS m: class Foo { constant $.bar = 42 }; say Foo.bar
20:58 camelia rakudo-moar 7c6254: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ycaTKnkI8l␤Variable $.bar used where no 'self' is available␤at /tmp/ycaTKnkI8l:1␤------> 3class Foo { constant $.bar7⏏5 = 42 }; say Foo.bar␤»
20:58 FROGGS m: class Foo { my $.bar := 42 }; say Foo.bar
20:58 camelia rakudo-moar 7c6254: OUTPUT«42␤»
20:58 buharin use :=?
20:59 FROGGS buharin: binding
20:59 FROGGS buharin: this binds the constant value 42 to the class attribute
20:59 buharin ok
21:00 labster joined #perl6
21:02 dalek rakudo/nom: 241e5e5 | lizmat++ | src/core/IO/ (2 files):
21:02 dalek rakudo/nom: Make .slurp-rest(:bin)/.slurp(:bin) 8x faster
21:02 dalek rakudo/nom:
21:02 dalek rakudo/nom: for a 2.5MB file
21:02 dalek rakudo/nom:
21:02 dalek rakudo/nom: More importantly, it no longer allocates a new Buf to accomodate
21:02 dalek rakudo/nom: for data already read + new chunk.  So this is now *much* more
21:02 dalek rakudo/nom: memory friendly than before.  All thanks to wonder that is Buf.push.
21:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/241e5e5847
21:03 ugexe sounds like i need to redo some project benchmarks soon
21:06 dalek rakudo/nom: cc0472b | FROGGS++ | src/core/CompUnit/PrecompilationRepository.pm:
21:06 dalek rakudo/nom: fix precompiling a file that outputs to stdout
21:06 dalek rakudo/nom:
21:06 dalek rakudo/nom: A file that gets precompiled outputs the hash and path of the compilation
21:06 dalek rakudo/nom: units it depends on. The process that invoked the precompilation records
21:06 dalek rakudo/nom: it and puts it into a file. Writing to stdout can therefore mess with this
21:06 dalek rakudo/nom: mechanism.
21:06 dalek rakudo/nom: This patch is just a bandaid until a more robust solution arrives.
21:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cc0472b43e
21:07 lizmat FROGGS++
21:07 FROGGS hoelzro: ^^ that should fix the issue we were talking about yesterday
21:07 FROGGS there was an rt ticket but I cant find it
21:07 musiKk joined #perl6
21:07 ely-se joined #perl6
21:09 FROGGS .tell FreezeburnV This patch should solve your issue: https://github.com/rakudo/rakudo/commit/cc0472b43e
21:09 yoleaux FROGGS: I'll pass your message to FreezeburnV.
21:16 jnthn lizmat: You may be able to get binary slurp-rest even fasterer by asking for the length of the file. Be careful when that returns 0 'cus it's not actually a normal file, though.
21:17 jnthn lizmat: Or just by asking for a bigger amount
21:17 lizmat jnthn: yeah, I was thinking about that... but would that take info from directory, or would it actually do a seek to the end of the file internally at the OS level ?
21:17 jnthn lizmat: The former, I think
21:18 jnthn Since you can .s a file that ain't been opened
21:19 lizmat so that could work for IO::Path.slurp, but not IO::Handle.slurp-rest
21:19 lizmat jnthn: do you think a 64K buffer for reading is too conservative ?
21:20 jnthn Can perhaps got a bit bigger... Asking for more than is available isn't really a problem though.
21:21 lizmat wouldn't it allocate a buffer of that size beforehand ?
21:21 lizmat I mean, I'd like to see things go faster, but I would also like to see things run on R Pi's
21:22 jnthn Yeah...which is why I suggested using file size as a guess
21:23 lizmat yeah, that's for IO::Path, will do that shortly
21:23 lizmat but that won't work for IO::Handle, or I should also find out its current seek position
21:24 moritz oooh, Monday is leap day!
21:24 moritz I wonder if some big site or service goes down again :-)
21:25 moritz like Azure for years ago
21:26 moritz (wow, Azure is already 4 years old?)
21:30 RabidGravy leap monday!
21:31 lizmat I guess we should also run the 6.c-errata spectest on Monday, to check for any artefacts  :-)
21:34 pdcawley_ joined #perl6
21:35 pnu joined #perl6
21:36 [particle]1 joined #perl6
21:36 sQuEE` joined #perl6
21:36 mattp__ joined #perl6
21:36 emdashcomma_ joined #perl6
21:36 rvchangu- joined #perl6
21:37 Jonis joined #perl6
21:37 ab5tract joined #perl6
21:37 nebuchad` joined #perl6
21:37 kst` joined #perl6
21:37 sm0x_ joined #perl6
22:06 ilbot3 joined #perl6
22:06 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!
22:06 diegok joined #perl6
22:06 ggoebel17 joined #perl6
22:07 bitmap_ joined #perl6
22:07 TreyHarris joined #perl6
22:07 shmibs joined #perl6
22:07 Some-body_ joined #perl6
22:07 camelia joined #perl6
22:07 Util_ joined #perl6
22:07 Psyche^ joined #perl6
22:07 ambs_ joined #perl6
22:07 lizmat moritz: your comment isn't actually in the backlog
22:07 Woodi_ joined #perl6
22:07 lizmat nor is mine
22:07 mst joined #perl6
22:08 gfldex joined #perl6
22:08 andrewalker joined #perl6
22:08 ranguard joined #perl6
22:08 gypsydave5 joined #perl6
22:08 [Coke] joined #perl6
22:08 arnsholt joined #perl6
22:08 xnrand joined #perl6
22:08 moritz joined #perl6
22:08 gtodd joined #perl6
22:08 grondilu joined #perl6
22:08 Khisanth joined #perl6
22:08 woodruffw joined #perl6
22:09 inokenty joined #perl6
22:09 leedo joined #perl6
22:09 petercom1and joined #perl6
22:09 woodruffw joined #perl6
22:09 sortiz joined #perl6
22:10 sftp joined #perl6
22:10 woodruffw joined #perl6
22:10 burnersk joined #perl6
22:11 diego_k joined #perl6
22:12 nchambers joined #perl6
22:12 ribasushi joined #perl6
22:13 TEttinger joined #perl6
22:14 revhippie joined #perl6
22:16 noganex joined #perl6
22:16 zpmorgan joined #perl6
22:16 rjbs joined #perl6
22:16 mls joined #perl6
22:16 dsp- joined #perl6
22:17 pyrimidi_ joined #perl6
22:17 domm_ joined #perl6
22:18 yubimusubi joined #perl6
22:19 konobi joined #perl6
22:19 smash joined #perl6
22:20 rhr joined #perl6
22:20 zacts joined #perl6
22:20 nowan joined #perl6
22:20 pnu joined #perl6
22:20 solarbunny joined #perl6
22:20 rntz joined #perl6
22:20 richi235 joined #perl6
22:20 ponbiki joined #perl6
22:20 pnu joined #perl6
22:20 notostraca joined #perl6
22:20 mohae_ joined #perl6
22:21 xnrand joined #perl6
22:21 ely-se joined #perl6
22:21 felher joined #perl6
22:21 breinbaas joined #perl6
22:22 inokenty1 joined #perl6
22:22 [particle] joined #perl6
22:22 saaki_ joined #perl6
22:23 Amnez777 joined #perl6
22:23 cpage_ joined #perl6
22:23 nebuchad` joined #perl6
22:24 bartolin joined #perl6
22:24 Ulti_ joined #perl6
22:24 baest joined #perl6
22:25 Exodist joined #perl6
22:25 wamba joined #perl6
22:25 [Coke]_ joined #perl6
22:25 apathor joined #perl6
22:26 neilb_ joined #perl6
22:26 notbenh joined #perl6
22:26 adrusi joined #perl6
22:26 rdleon joined #perl6
22:26 Roamer` joined #perl6
22:27 lizmat_ joined #perl6
22:27 shmibs_ joined #perl6
22:27 vendethiel joined #perl6
22:27 jameslenz joined #perl6
22:27 bakedb joined #perl6
22:27 Lucas_One_ joined #perl6
22:28 boegel joined #perl6
22:28 synopsebot6 joined #perl6
22:28 dalek joined #perl6
22:28 khw joined #perl6
22:28 lsm-desktop joined #perl6
22:28 mkz joined #perl6
22:28 olinkl joined #perl6
22:28 jnap joined #perl6
22:28 ggherdov joined #perl6
22:28 flussence joined #perl6
22:28 jsimonet1 joined #perl6
22:28 jast joined #perl6
22:28 TEttinger joined #perl6
22:28 zhmylove_ joined #perl6
22:29 jnthn joined #perl6
22:29 k-man joined #perl6
22:29 TreyHarr1 joined #perl6
22:29 domm_ joined #perl6
22:29 mre joined #perl6
22:29 abaugher joined #perl6
22:29 sergot joined #perl6
22:29 f3ew joined #perl6
22:29 profan joined #perl6
22:29 nemo joined #perl6
22:29 mohae joined #perl6
22:30 Gothmog_ joined #perl6
22:30 lucs joined #perl6
22:30 masak joined #perl6
22:30 dalek joined #perl6
22:30 krakan joined #perl6
22:30 TimToady joined #perl6
22:30 yeltzooo joined #perl6
22:30 esh_ joined #perl6
22:30 erdic joined #perl6
22:30 uruwi joined #perl6
22:30 gypsydave5 joined #perl6
22:31 SHODAN joined #perl6
22:31 dg joined #perl6
22:31 sammers joined #perl6
22:32 revhippie joined #perl6
22:32 llfourn joined #perl6
22:32 Upasaka joined #perl6
22:32 sortiz joined #perl6
22:32 LGD joined #perl6
22:33 Celelibi joined #perl6
22:33 musca joined #perl6
22:33 orbus joined #perl6
22:33 ambs joined #perl6
22:34 Grrrr joined #perl6
22:34 lizmat .tell jnthn there's something strange with reading a 2.5MB file with slurp: with nqp::readallfh it takes about 80ms, with nqp::readfh with the size of the file as a buffer, it takes 350 msec (like 4x as long)
22:34 a3r0 joined #perl6
22:34 Vitrifur joined #perl6
22:34 lizmat aw, no yoleaux
22:34 RabidGravy joined #perl6
22:35 ChoHag_ joined #perl6
22:35 pederindi joined #perl6
22:35 timotimo huh, that seems quite strange
22:35 cosimo joined #perl6
22:35 timotimo i think strace has a mode that can time individual system calls for you
22:35 lizmat .tell jnthn I would expect the unicode handling to make things *slower*, but instead it's 4x faster than binary ?
22:35 mkz__ joined #perl6
22:35 timotimo perhaps we can see what's up by observing that?
22:35 timotimo oh, is that binary vs string reading?
22:35 decent joined #perl6
22:36 eyck joined #perl6
22:37 go|dfish joined #perl6
22:37 BenGoldberg joined #perl6
22:37 petercommand joined #perl6
22:37 lizmat timotimo: oddly enough, I can only see your replies in the backlog
22:37 flussenc1 joined #perl6
22:37 boegel|quassel joined #perl6
22:38 mathw joined #perl6
22:38 TEttinger joined #perl6
22:38 dalek rakudo/nom: 763d430 | lizmat++ | src/core/IO/ (2 files):
22:38 dalek rakudo/nom: Streamline slurp/slurp-rest a bit further
22:38 dalek rakudo/nom:
22:38 dalek rakudo/nom: As suggested by jnthn++ at http://irclog.perlgeek.de/perl6/2016-02-27#i_12109550
22:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/763d430fcb
22:39 lizmat jnthn: please check backlog of past minutes
22:40 hoelzro_ FROGGS++
22:41 stux|RC-only joined #perl6
22:41 tharkun joined #perl6
22:41 zhmylove joined #perl6
22:41 bhm joined #perl6
22:42 ilogger2 joined #perl6
22:42 dustinm` joined #perl6
22:43 vytas joined #perl6
22:43 kipd joined #perl6
22:44 mst joined #perl6
22:44 cfloare joined #perl6
22:45 lizmat timotimo: did you just repeat those lines?
22:45 olinkl joined #perl6
22:45 * lizmat is seeing weird timewarps
22:46 raydiak_ joined #perl6
22:47 lsm-desktop joined #perl6
22:47 sunnavy joined #perl6
22:47 autarch joined #perl6
22:49 kshannon joined #perl6
22:50 Amnez777 joined #perl6
22:51 rodarmor joined #perl6
22:51 timotimo i did not, i think?
22:52 cxreg joined #perl6
22:52 timotimo since we're just coming out of a netsplit, i guess things are just wacky in general
22:54 khw joined #perl6
22:54 revhippie it's astounding!
22:54 gregf__ joined #perl6
22:55 brabo joined #perl6
22:55 atta joined #perl6
22:56 lizmat timotimo: your lines from 22:35 GMT in the backlog, arrived with me at 22:44 GMT
22:56 nchambers joined #perl6
22:57 ggherdov joined #perl6
22:57 SmokeMachine____ joined #perl6
22:57 musiKk joined #perl6
22:58 TEttinger joined #perl6
22:58 cosimo joined #perl6
23:00 kipd joined #perl6
23:00 timotimo weird timowarps?
23:01 riatre joined #perl6
23:01 esh joined #perl6
23:02 rhr joined #perl6
23:02 apejens joined #perl6
23:04 jnap joined #perl6
23:06 zacts joined #perl6
23:10 dylanwh_ joined #perl6
23:11 mohae joined #perl6
23:12 xinming joined #perl6
23:16 jsimonet1 joined #perl6
23:18 gregf__ joined #perl6
23:19 [particle] joined #perl6
23:19 dalek rakudo/nom: fb74abc | lizmat++ | src/core/Buf.pm:
23:19 dalek rakudo/nom: Make prefix ~^ Blob:D about 300x faster
23:19 dalek rakudo/nom:
23:19 dalek rakudo/nom: - on a 10K buffer
23:19 dalek rakudo/nom: - more importantly, it now also handles Buf's correctly
23:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb74abc314
23:19 lizmat joined #perl6
23:20 leedo joined #perl6
23:20 RabidGravy right, bed time for bonzo
23:20 decent joined #perl6
23:20 lizmat yeah, was just about to say the same
23:20 lizmat RabidGravy: toodles
23:21 lizmat #perl6: hope to see you tomorrow after the storm is over
23:21 polyfloyd joined #perl6
23:23 nchambers joined #perl6
23:25 sivoais joined #perl6
23:26 [Coke] joined #perl6
23:26 musiKk_ joined #perl6
23:26 tony-o joined #perl6
23:27 esh joined #perl6
23:27 bakedb joined #perl6
23:30 Sgeo joined #perl6
23:32 sivoais joined #perl6
23:32 dalek joined #perl6
23:33 telex joined #perl6
23:35 firstdayonthejob joined #perl6
23:36 xnrand joined #perl6
23:37 esh_ joined #perl6
23:40 jnap joined #perl6
23:41 TEttinger joined #perl6
23:43 cdg joined #perl6
23:48 mls joined #perl6
23:48 pdcawley joined #perl6
23:51 hahainternet joined #perl6
23:58 kid51 joined #perl6
23:59 cxreg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo