Perl 6 - the future is here, just unevenly distributed

IRC log for #perl11, 2016-07-30

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

All times shown according to UTC.

Time Nick Message
00:04 kentnl :)
00:06 willthechill kentnl: I have added you to the special RPerl groups in Facebook and Trello
00:13 kentnl I've had a question in my mind but haven't gotten around to asking it: Does something like this make sense in an RPerl context, or is the nature of what I'm doing (loading modules by CLI name, iterating their globs, traversing their method lookup cache) inherently too dynamic to do something similar to in RPerl?
00:13 kentnl https://metacpan.org/pod/Devel::Isa::Explainer#DESCRIPTION
00:13 willthechill checking
00:16 willthechill well it does seem to include a fair amount of high magic stuff, although I would say it is possible to refactor the code to use RPerl
00:17 willthechill it would probably require some updates to the RPerl core, which can happen between now and the next maor release of RPerl v3.0
00:18 kentnl Conceptually, how does "Program X refers to arbitrary module Y that wasn't woven in at compile time" actually work?. Or can you JIT things that aren't compiled?
00:18 willthechill we don't have JIT yet
00:18 willthechill what you can do is choose 1 subroutine at a time to upgrade
00:19 willthechill start with a subroutine which does not rely on dynamic runtime features
00:19 willthechill obviously RPerl is meant to optimize runtime performance, have you experienced slow runtime with this Devel::Isa::Explainer software?
00:19 kentnl At this point I'm not so much caring about /performance/, this is more an exercise in making my mental model of RPerl "correct"
00:20 willthechill ah well then you just need to review Learning RPerl and some of the RPerl example apps
00:20 willthechill http://rperl.org/learning_rperl.html
00:21 willthechill the n-body example app, see the .pm files in this directory   https://github.com/wbraswell/physicsperl/tree/master/lib/PhysicsPerl/Astro
00:21 willthechill the fractal example app     https://github.com/wbraswell/mathperl/tree/master/lib/MathPerl/Fractal
00:21 willthechill digits of pi example app     https://github.com/wbraswell/mathperl/blob/master/lib/MathPerl/Geometry/PiDigits.pm
00:22 willthechill bubblesort example app    https://github.com/wbraswell/rperl/blob/master/lib/RPerl/Algorithm/Sort/Bubble.pm
00:22 kentnl Here the questions are basically "loading arbitrary perl modules that aren't compiled to inspect them" -> Sense Y/N?  and "Can one even iterate a given namespaces list of subs" -> Y/N , the first of those seems the less likely of the two. .  I'm not so much tied to my specific implementation here
00:22 willthechill and in Learning RPerl you may want to skip to the exercise answers in the appendix:   http://rperl.org/learning_rperl.html#APPENDIX_A%3A_EXERCISE_ANSWERS
00:23 kentnl Just "Can I make something /like/ this from scratch"
00:23 willthechill you can open each *.pm file using normal file I/O
00:23 willthechill then iterate through each line
00:23 willthechill find what you need to find in each *.pm file
00:23 willthechill close the file
00:23 willthechill and operate on that data
00:24 willthechill building hashes or arrays or whatever data structures along the way
00:24 kentnl I should clarify: For what that code does, it has to "require" the given PM file, because it can't do so statically.
00:24 kentnl Its dynamically implemented.
00:24 willthechill Perl "use" is compiled to C++ "#include"
00:24 willthechill (we don't support require at this time)
00:24 kentnl ( ie: requires the PM file and then explains what the interpreter decided to make of it )
00:24 willthechill and C++ "#include" is compile-time only
00:25 willthechill I am not aware of any mechanism to runtime-include a file in C++
00:25 kentnl Right, that was my expectation. I was imagining for the sorts of things I'd be doing, you'd need some rather special C++ magic in place to make it viable
00:25 willthechill well again, only 1 part of your code needs to the high-magic runtime "require"
00:25 willthechill surely you can split off some other parts of your code into a subroutine which does not need that high-magic stuff
00:25 kentnl ( ie: even if the .pm files were precompiled as .so libraries somehow, you'd need compile time to inject special symbols to fake that behaviour )
00:25 willthechill then compile that subroutine
00:26 willthechill and yes you are likely correct about the .so injection solution
00:28 kentnl I suspect in order for my code to be anywhere viable, it would need to essentially /compile/ a diagnostic program that simply printed the tree of the given class, which makes the alure of such a tool much less (its just for debugging after all)
00:28 * kentnl intentionally tries hard/impossible things to learn ;)
00:28 willthechill *nods*
00:29 willthechill it may be advisable to choose a different starting project
00:29 willthechill but I will help you either way!  :-)
00:31 kentnl my next question would be "would code using version.pm be RPerl-compileable" ( I highly suspect it might be, because despite using XS for one path, it has C-written-in-Perl for the PP version )
00:32 kentnl ( the motivation behind this is more portability / static isolation from Perl than speed )
00:32 kentnl (* if you don't know off the top of your head, don't go hunting )
00:32 kentnl I just suspected version.pm is one of the things you'd have fun with early on
00:33 willthechill the only modules on CPAN which can currently be compiled by RPerl are the MathPerl & PhysicsPerl examples I linked above
00:33 willthechill so we can not actually compile version.pm or any other pre-existing CPAN modules
00:34 * kentnl nods
00:34 willthechill what you do is, again, choose only the part of your code which does not require pre-existing magic and compile that subroutine
00:34 willthechill then you can call the compiled subroutine from your high-magic code, which may also use version.pm freely
00:34 kentnl I'm trying to hard to fly without walking :).
00:34 willthechill yes that is correct
00:35 willthechill the links I sent you are a good place to start
00:35 willthechill of course I don't mind answering your questions
00:36 willthechill :-)
00:36 mako left #perl11
00:36 willthechill also you will want to actually get RPerl installed
00:36 kentnl Now I just have to work out why Inline::CPP fails tests so I can do that.
00:37 * kentnl blames GCC 5.4
00:37 willthechill no it is failing because of ExtUtils::CppGuess
00:37 willthechill probably
00:37 willthechill https://github.com/daoswald/Inline-CPP/issues/38
00:37 willthechill we are still waiting for that issue to be resolved
00:38 willthechill I believe you can just use `cpan` or `cpanm` to force install of Inline::CPP and be okay for now
00:38 willthechill while installing, please follow the instructions in the install notes file   https://github.com/wbraswell/rperl/blob/master/INSTALL
00:40 willthechill kentnl: for you I strongly suggest installing the latest RPerl from GitHub, because we have many updates and fixes since July 4th; this means you will need to follow the INSTALL steps 0, 1A, 2B, 3
00:42 kentnl Why is the 2A/2B combination problematic? ( Asking in case I end up vendorizing either/both )
00:44 willthechill if you do both 2A and 2B then you will have at least 2 copies of RPerl installed
00:44 willthechill not good
00:44 willthechill you only want to start out with 1 copy of RPerl installed
00:44 willthechill once you graduate from RPerl App Dev to RPerl System Dev, then you can have as many copies of RPerl installed as you like, haha!  ;-)
00:45 willthechill and what precisely do you mean by "vendorizing"?
00:46 kentnl well, at some point down the line if I get interested enough and I can make an argument for it, I can make RPerl turn up for installation in gentoo. Only CPAN releases are going to arrive for the bottom 2 layers of stability, "stable" and "unstable", but we can also add "live" and "snapshot" levels for people who just want to test things out ( and both of these can be installed to $SYSTEM straight from git,  because we give users the power to shoot their feet
00:46 kentnl off with sufficient warning )
00:47 kentnl so it was more a question of "if you have one version of these and you're just upgrading to another, will that be a problem"
00:48 willthechill I always run my own custom uninstall script before installing a new copy of RPerl
00:48 willthechill https://github.com/wbraswell/rperl/blob/master/script/development/rperl_locallib_uninstall.sh
00:48 kentnl but is there a /technical/ reason why you do that?
00:49 willthechill maybe
00:50 willthechill when you use the `cpan` or `cpanm` command to install an upgraded RPerl, I don't know the process involved, so in that case it may do some smart stuff and make sure the old version of RPerl is basically "uninstalled" or the equivalent
00:50 willthechill that would be step 2A
00:50 kentnl sort of things I'm looking for are "accidentally links from old version instead of new one if an existing one is In PATH while compiling"
00:51 willthechill for step 2B, when you install from github code using `make install`, it still goes into either ~/perl5 for local::lib single-user installs, or somewhere global for system-wide installs, which is the same as step 2A
00:51 willthechill but it almost certainly does NOT do anything "smart" to try and uninstall old files
00:51 willthechill RPerl contains lots of files and those files do change from release to release
00:52 kentnl right, so I think I've just over-interpreted the "Do not mix", its just "eh, you might confuse yourself if you have more than one"
00:52 kentnl or "Installing both to the same place and not properly cleaning up might be bad"
00:52 kentnl (* neither of those are problems for me ;) )
00:52 willthechill well yes, you can actually cause unpredictable or incorrect behavior if you have more than 1 copy of RPerl installed and you don't know what you're doing
00:53 willthechill RPerl has a somewhat complex path and file handling system, so I try not to have 2 copies installed simultaneously
00:53 willthechill you don't want 1 copy of RPerl linking to stuff from a different installed copy
00:53 willthechill etc.
00:54 willthechill gentoo would be cool, I only use Xubuntu so I'm not personally familiar with the portage package system
00:54 willthechill but we definitely need to start working on that at some point
01:13 travis-ci RPerl build passed. Will Braswell says 'Code Generation, Update Hand-Compiled Bubble Files, Part 2'
01:13 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148465516 https://github.com/wbraswell/rperl/compare/7503507d2789...106f39dd5f4f
01:19 willthechill yay
01:22 willthechill bulk88: now we are passing in v5.24 on travis
01:22 willthechill bulk88++
08:28 kentnl joined #perl11
09:13 travis-ci RPerl build failed. Will Braswell says 'Learning RPerl, If Control Structure'
09:13 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148504357 https://github.com/wbraswell/rperl/compare/106f39dd5f4f...567ec7275351
10:30 travis-ci perl11/cperl#1361 (smoke/gh126-mderef_u - e384950 : Reini Urban): The build passed. https://travis-ci.org/perl11/cperl/builds/148511385
12:39 mako joined #perl11
15:19 travis-ci perl11/cperl#1362 (smoke/gh126-mderef_u - ade850b : Reini Urban): The build passed. https://travis-ci.org/perl11/cperl/builds/148539362
16:19 mako joined #perl11
18:02 travis-ci RPerl build passed. Will Braswell says 'Learning RPerl, If Control Structure, Part 2'
18:02 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148559001 https://github.com/wbraswell/rperl/compare/567ec7275351...ee4da1cc1bb3
18:16 travis-ci perl11/cperl#1363 (smoke/gh126-mderef_u - c221dd1 : Reini Urban): The build was broken. https://travis-ci.org/perl11/cperl/builds/148561330
18:58 mako joined #perl11
19:02 travis-ci perl11/cperl#1364 (smoke/gh126-mderef_u - 21e57a7 : Reini Urban): The build is still failing. https://travis-ci.org/perl11/cperl/builds/148565185
19:19 kentnl joined #perl11
21:34 travis-ci perl11/cperl#1364 (smoke/gh126-mderef_u - 21e57a7 : Reini Urban): The build was fixed. https://travis-ci.org/perl11/cperl/builds/148565185

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