Perl 6 - the future is here, just unevenly distributed

IRC log for #perl11, 2017-08-03

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

All times shown according to UTC.

Time Nick Message
01:04 ribasushi joined #perl11
05:37 anton joined #perl11
11:08 yukikimoto joined #perl11
11:09 yukikimoto Today I effort to improve SPVM call_sub perforamnce.
11:10 yukikimoto From now, I used strcmp and strEQ, but this method is slow. so I chane the implementation to id comparison.
11:10 yukikimoto Comparison of integer is very fast than string comparison.
11:20 panitaliemom joined #perl11
11:24 yukikimo_ joined #perl11
12:38 yukikimoto joined #perl11
12:41 yukikimoto I implement duplicate switch now
14:05 jnap joined #perl11
14:07 jnap willthechill: is there any coordination possible you think between rPerl and SPVM?  SPVM is a little closer to the Moose/Moo syntax I'm struggling to get compatibility with.  Just thinking out loud
14:15 yukikimoto hi, jnap
14:15 jnap good (insert timezone here) yukikimoto
14:16 yukikimoto I receive mail from willthecill to join perl11 project and this irc.
14:17 yukikimoto a few days ago, I start to post the information of SPVM.
14:18 jnap yukikimoto: I'm still getting up to speed with enough understanding of low level code to get all this stuff.  right now I'm helping willthechill with rPerl but pretty hopeful to see people exploring different things
14:19 jnap one of my first important deliverables for willthechill revolves around code written in Moose/Moo so I am thinking about that a lot
14:19 jnap is possible in the end we might need some sort of BabelPerl translator I guess.
14:20 yukikimoto What is BabelPerl?
14:23 yukikimoto You mean that you want to use Moo/Moose on RPerl?
14:25 jnap BabelPerl would be a mythical universal translator I guess, something like could take Moose/Moo and produce rPerl / SPVM
14:25 jnap its just my first guess I could be totally wrong
14:25 jnap right I promised willthechill  I'd figure out how to best integrate a large project using Moose
14:26 jnap Moo has this thing where you can produce the 'pure perl' code, I'm playing with that right now.  Might not fully understand the feature of course
14:30 yukikimoto Moose use XS and C level API.
14:31 yukikimoto Moo is pure perl. If so, RPerl will be run Moo code.
14:32 yukikimoto If RPerl compatible is close to Perl, it will be OK.
14:33 jnap right, I concluded that earlier on :)  However I thought there was still Moose::PP stuff for when you didn't have a compiler.  It used to have it at least
14:33 jnap maybe they stopped supporting the perl pure version of Moose
14:35 yukikimoto Moose use subroutine hook, for example, after_xxx, before_xxx. In theory, this is impossible if only use Pure Perl code.
14:36 jnap I kinda drifted away from the project a number of years ago and lost track.  I despaired when it became clear Perl wasn't going to move toward integrating a Moo and the Moose features.
14:36 jnap yukikimoto: yeah looks like you are 100% correct, I guess I missed that change :)
14:37 willthechill yukikimoto: hi!  :)
14:38 yukikimoto hi
14:39 willthechill jnap: as of TPC a few weeks ago, it looks like Steven Little's new OO system may be integrated into Perl 5 core at some point soon
14:40 willthechill yukikimoto: I have disabled the need for a new GCC compiler in Alien::JPCRE2
14:40 jnap well at least that would give us all a common target
14:40 willthechill yukikimoto: this should help you on your system which has an old GCC compiler
14:40 jnap willthechill: is that heading to CPAN, I was having trouble withAlien::JPCRE2 myself
14:40 willthechill jnap: LOL yeah except for all the existing Moo* code :P
14:41 yukikimoto I try to install RPerl yesterday. but not yet success.
14:41 willthechill jnap: Alien::PCRE2 and Alien::JPCRE2 are already updated on CPAN
14:41 jnap but I think we need some compiler flags for MacOXS and xcode
14:41 willthechill jnap: please make sure you are trying the latest versions of Alien* from CPAN, then send me any errors so I can help fix it
14:41 jnap yeah let me get the trace for install on Mac
14:41 jnap right I might not have the latest, sec
14:42 willthechill ah yes you may be right about the MacOSX flags, etc.  I don't have access to any Macs whatsoever.
14:42 jnap I do :)
14:42 jnap I think the Xcode clang compiler needs some flags for the std lib in c++11
14:42 willthechill yukikimoto: please try to just install Alien::PCRE2 first, then see if that works; if it does work, then go on to install just Alien::JPCRE2
14:42 jnap I gotta log somehwere
14:43 willthechill jnap: in theory rurban already added those C++11 flags for MacOS a long time ago, he is the only person (I think) who actually did RPerl testing on Mac
14:43 jnap willthechill: right is why I was saying we need a Babelfish like translater
14:43 jnap willthechill: I'm on an older Xcode I think...
14:44 willthechill RPerl already generates a platform-independent and language-indepenent abstract syntax tree (AST) as output, the back-end code generator currently produces C++ but can be made to generate any target
14:44 yukikimoto cpanm Alien::JPCRE2 is OK, but cpanm RPerl is not OK
14:46 jnap willthechill: we might need the other side of it something that translates a mythical Moo or new MOP stuff into that AST.
14:46 jnap that's going to be in your Grammar.pm I guess
14:46 willthechill yes that will all be contained within GrammarMedium.pm
14:46 willthechill which will generate the same AST but with Moo abilities
14:47 jnap I don't know enough about SPVM to wonder outloud about how to make the integration.  Its possible yukikimoto doesn't have that type of integration as a goal?
14:47 willthechill yukikimoto: okay if Alien::JPCRE2 is good then you are partway there!  now please create a pastebin with the full output of errors from installing RPerl
14:47 willthechill jnap: RPerl and SPVM are entirely independent projects, I added SPVM as the newest member of the Perl 11 philosophy umbrella
14:48 yukikimoto jnap: you can use all Moo code and Moose code with SPVM.
14:49 yukikimoto SPVM is a module. You don't need to integrate your old projects.
14:49 jnap yukikimoto: I'm going to play with that when i get a chance then :)
14:51 yukikimoto willthecaill: I will report error message of RPerl tommorow or next tommorow.
14:51 willthechill yukikimoto: sounds good!  :-)
14:53 yukikimoto jnap: tyanks!
14:53 yukikimoto tyanks -> thanks
14:56 yukikimoto Now sleepling time.
14:56 yukikimoto I'm going to sleep.
14:58 yukikimoto Good night.
14:59 willthechill yukikimoto: goodnight my friend!  :)
15:08 jnap willthechill:
15:08 jnap willthechill:  here's the error log https://gist.github.com/jjn1056/bdb5aa5545bbce366bcf975845c77062
15:20 jnap I think its either or both some sort of path issue and some flag the clang based Xcode version of g++ needs to find th std: namespace
15:20 jnap mytest.c:1:10: fatal error: 'jpcre2.hpp' file not found
15:20 jnap #include <jpcre2.hpp>
15:21 jnap and then  error: no member named 'setlocale' in namespace 'std'; did you mean simply 'setlocale'?
15:21 jnap https://www.irccloud.com/pastebin/YENa669U/
15:22 jnap ^^ in my g++ info
15:22 jnap I think I need 4.6  right, to make rPerl work (for the C++11 stuff)
15:23 jnap ideally this would compile on macoxs with Xcode command line tools since that's what most Mac people have an in general everything else on CPAN works ok with it
15:52 jnap the odd thing is it complains about not find jpcre2.hpp but its there in the cpanm working directory for example
15:53 jnap ./Users/jnapiorkowski/.cpanm/work/1501171063.39243/Alien-JPCRE2-0.008000/_alien/build_Z8dT/jpcre2-10.30.02/src/jpcre2.hpp
15:53 jnap which is why Ikep thinking include path issues
17:19 anton joined #perl11
17:26 willthechill jnap: the initial error is not actually an error...     fatal error: 'jpcre2.hpp' file not found
17:27 jnap ok yeah I was starting to think that
17:27 willthechill that particular "fatal error" occurs during the Alien build phase
17:27 jnap its just how Alien bootstraps itself I guess
17:27 jnap so that's good
17:27 jnap so I think its just the last issue
17:27 willthechill it is because Alien tries to find jpcre2.hpp to see if there is a "system" install already present
17:27 jnap ok makes total sense
17:27 willthechill if no "system" install exists, then it falls back to "share" install where it downloads & compiles JPCRE2
17:28 jnap for the error: "  error: no member named 'setlocale' in namespace 'std'; did you mean simply 'set locale'?"
17:28 willthechill this extremely-misleading output is supposed to be fixed or augmented somehow in the latest Alien production release
17:28 willthechill then all the warnings are annoying but possibly harmless
17:28 jnap I did some checking and I guess its some sort of missing flag or something with the Xcode g++
17:28 willthechill so yes, I think setlocale is the only real error
17:28 willthechill and it must be some kind of clang error
17:29 willthechill as you said, a missing flag or preprocessor directive perhaps
17:29 jnap I 'think' that should be easy to fix just I'm not familiar enough with how Alient works
17:29 willthechill something which gcc does but clang does not?
17:29 jnap I have some examples hang on
17:31 willthechill here is the pertinent section of the A::J alienfile for providing compiler flags...    https://github.com/wbraswell/alien-jpcre2/blob/master/alienfile#L33-L39
17:32 willthechill we probably just need to figure out what's wrong with clang and put the fix in the alienfile, then I can update on CPAN
17:32 jnap people are saying "import into the std namespace is implementation dependent"
17:32 jnap yeah I think that is is
17:32 jnap I thought I had some examples
17:32 willthechill ah nice "implementation dependent" *sigh*
17:35 jnap maybe
17:35 jnap clang++ -o prog prog.C -stdlib=libc++
17:35 jnap or
17:35 jnap clang++ -o prog prog.C -std=c++11 -stdlib=libc++
17:35 jnap how could I test this local?
17:36 jnap could I do cpanm A::J --look
17:36 jnap and then modify some file and try to compile it?
17:45 jnap yeah it must be trying to compile with the wrong std lib just not sure how to debug it
17:45 jnap won't be great to get a clean install on Mac since a lot of dev use it
17:51 willthechill we would need to copy the failing compiler command from A::J and run that same command manually, then try to add flags until we fix it
18:05 jnap will try it
19:29 jnap willthechill:  how to (in alien) turn off the compiler setting pthreads?
19:30 jnap mac os doesn't like it :)
20:26 jnap Alien docs are wild.  just trying to figure out how to add -stdlib=libc++
21:05 jnap drat I was messing around with the jpcre2 tarball and I accidentally got it installed :) I'd have to delete it if I wanted to keep messing with it
21:05 jnap RPerl has a lot of tests
21:06 willthechill jnap: I'm back
21:09 willthechill is it Alien itself which is turning on pthreads?
21:10 jnap I guess so
21:10 jnap honestlyst ./configure && make && make install was enough :)
21:10 jnap configure does a ton of system checking that is redundant with what the alien stuff does
21:11 willthechill well Alien itself is calling those exact commands in that order
21:12 willthechill https://github.com/wbraswell/alien-jpcre2/blob/master/alienfile#L35-L38
21:12 willthechill well close to exact :P
21:13 willthechill you are skipping `make check` which is JPCRE2's version of `make test`
21:13 willthechill and the alienfile call to ./configure does pass flags
21:22 jnap right
21:22 jnap but if I download the tarball and just compile it myself it works with just ./compile :)
21:22 jnap when I get some time I'll delete it and try again to narrow down the difference
21:34 willthechill ah well we need it to work via CPAN so manually installing it counts as "cheating" in this case, haha!
22:25 jnap on to the next mac issue ;)
22:26 jnap willthechill: after I got rperl installed locally on my mac (on the mac os not my linux VM where it works fine) I tried to run the bubble sort demo from the rperl git repo
22:26 jnap got the following err => https://gist.github.com/jjn1056/de1646814d6a1f9733efb26968d01e31
22:26 jnap there's a ton in the __Inline directory, you interested in peeking at it?
22:27 jnap probably another clang thing
22:27 jnap or possible my install of JPCRE2 is bork
22:30 willthechill no I don't need to look at _Inline
22:30 willthechill JPCRE2 is only used for regular expressions, not in bubble sort
22:33 jnap probably compiler differences then
22:34 jnap https://www.irccloud.com/pastebin/1YbMtNGE/
22:34 jnap g++ version info ^^
22:37 jnap maybe /Users/jnapiorkowski/Desktop/rperl/script/demo/_Inline/build/eval_142_737e/Filters23531.c:1:1: error: expected unqualified-id
22:37 willthechill first problem: you aren't supposed to be calling rperl on bubble_sort.pl
22:37 willthechill you are only supposed to compile Bubble.pm
22:37 willthechill that won't work at all, trying to compile bubble_sort.pl
22:37 jnap 'k
22:38 willthechill second problem: your failure is occuring before it even tries to parse bubble_sort.pl
22:39 willthechill RPerl has to bootstrap itself by compiling HelperFunctions.*
22:39 willthechill if your compiling fails there (which yours does) then that's a compiler problem
22:39 willthechill in other words, another clang issue
22:40 jnap yeah I was just doing rperl Bubble_sort.pl
22:40 jnap if I recall from when I set this up on Linux a few weeks ago that just worked
22:41 jnap ?   https://stackoverflow.com/questions/10135244/c-error-expected-unqualified-id
22:42 willthechill bubble_sort.pl is the driver, in this case not meant to be compiled, but again we're not even reaching that far
22:43 jnap that Filters*.c file only contains stuff like
22:43 jnap /Users/jnapiorkowski/.perlbrew/libs/perl-5.20.3@default/lib/perl5/RPerl/HelperFunctions.cpp
22:44 willthechill anything which triggers an error inside _Inline is 99% likely to be a problem with your OS, HelperFunctions.cpp and _Inline should be stable by this time
22:44 willthechill the Filters.c file is auto-generated by crazy magic code inside Inline::C or Inline::CPP, we'll never touch that ever
22:44 willthechill it's solid and should just work
22:46 jnap I'm searching for people that get this on macosx

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