Perl 6 - the future is here, just unevenly distributed

IRC log for #perl11, 2015-05-07

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

All times shown according to UTC.

Time Nick Message
04:01 willthechill joined #perl11
05:18 travis-ci RPerl build passed. Will Braswell says 'Generator, Perl Ops Perl Types, Hash Ref Part 1'
05:18 travis-ci http://travis-ci.org/wbraswell/rperl/builds/61569112 https://github.com/wbraswell/rperl/compare/e47d451651f4...51d261069aae
05:23 willthechill cool beans
05:54 travis-ci RPerl build passed. Will Braswell says 'Generator, Perl Ops Perl Types, Hash Ref Part 2'
05:54 travis-ci http://travis-ci.org/wbraswell/rperl/builds/61571227 https://github.com/wbraswell/rperl/compare/51d261069aae...1316e69c4719
09:10 basiliscos joined #perl11
11:00 bulk88_2 joined #perl11
18:11 willthechill joined #perl11
18:18 ToApolytoXaos joined #perl11
18:26 willthechill ToApolytoXaos:  https://github.com/wbraswell/rperl/blob/master/lib/RPerl/Algorithm/Sort/Bubble.cpp
18:27 willthechill learn how that C++ code works and you can help
18:27 willthechill it is dual-mode, split by an IFDEF
18:27 ToApolytoXaos oh lovely :D
18:27 willthechill CPPOPS_PERLTYPES in the top half, CPPOPS_CPPTYPES in the bottom half
18:27 willthechill I want to assign you to implement the push() and pop() routines
18:27 ToApolytoXaos give me a second
18:27 ToApolytoXaos you want me to implement the Bubblesort algorithm in RPerl or in C++?
18:28 willthechill which means 4 seperate routines, because each of those 2 (push, pop) has 2 versions of itself (PERLTYPES, CPPTYPES)
18:28 willthechill no no no
18:28 willthechill no bubblesort implementing for you
18:28 willthechill I want you to implement the push() and pop() routines
18:28 willthechill I sent you the bubblesort code as an example to see how C++ works
18:28 ToApolytoXaos oh, okay
18:29 willthechill so again, the bubblesort code is implemented exactly the same, twice, in that one file, split by an IFDEF
18:29 willthechill the top half uses PERLTYPES and the bottom half uses CPPTYPES
18:29 willthechill both halves do exactly the same thing
18:29 willthechill but using different data types
18:29 willthechill we need push() and pop() to be the same way
18:29 willthechill so we will have 2 versions of push(), one for Perl types and one for C++ types
18:29 willthechill and likewise 2 versions of pop()
18:29 ToApolytoXaos what should be the difference then?
18:29 willthechill 4 functions total
18:30 willthechill written in C++
18:30 willthechill the difference is they use different data types!
18:30 ToApolytoXaos ah ok
18:30 willthechill totally different data types
18:30 willthechill again, Perl data types are different than C++ data types
18:30 ToApolytoXaos obviously
18:30 willthechill so we must have 2 versions of every Perl builtin operator
18:31 willthechill push() and pop() are just 2 of the easy Perl builtins I chose for you
18:31 willthechill this job is to write C++ code only
18:31 ToApolytoXaos alright, let me see what i can do
18:32 willthechill because obviously push() and pop() are already implemented for PERLOPS_PERLTYPES test mode, by which I mean test mode utilized the Perl 5 interpreter and the normal original push() and pop() implementations
18:32 ToApolytoXaos is there a specific flag for perl types and separate for C++ types?
18:32 willthechill yes look for the IFDEF
18:32 ToApolytoXaos ok
18:32 willthechill the middle of the file is line 274
18:32 ToApolytoXaos should i fetch the latest updates of yours so i can work locally?
18:33 willthechill yes you should
18:33 ToApolytoXaos great!
18:33 willthechill you should create a new branch
18:33 willthechill call the branch push_pop
18:33 willthechill line 10
18:33 willthechill # ifdef __PERL__TYPES
18:33 ToApolytoXaos OK, let me run the steps for compiling the new changes you have made
18:33 willthechill line 274
18:33 willthechill # elif defined __CPP__TYPES
18:34 ToApolytoXaos oh man i suck with git :/
18:34 ToApolytoXaos give me a second
18:34 willthechill so again, we should end up with 4 functions written in C++: push() PERLTYPES, push() CPPTYPES, pop() PERLTYPES, pop() CPPTYPES
18:35 willthechill and you definitely need to fully understand the bubblesort C++ code before you can try to actually write any C++ code for push() or pop()
18:35 ToApolytoXaos i understand your point
18:36 willthechill this is not your standard C++ code, this is special wacky magical C++ code which is compatible with both Inline::CPP and the Perl 5 core, SUPER DUPER SPECIAL!
18:37 willthechill it took me years to figure out how to write such C++ code
18:37 ToApolytoXaos i should switch to double super sayan then
18:37 willthechill yes, ASCENDED SAYAN EVEN
18:37 ToApolytoXaos oh?
18:37 ToApolytoXaos what's that? :D
18:37 willthechill the fact that such C++ code exists is why RPerl can exist
18:38 willthechill http://dragonball.wikia.com/wiki/2nd_Grade_Super_Saiyan
18:38 ToApolytoXaos question: is there a specific reason that lines like 23 are so huge?
18:38 ToApolytoXaos ah yeah, i remember that form, but could not recall the name; cheers for clarifying it to me :D
18:43 ToApolytoXaos i guess it would be a lot easier to reimplement our own C++ mechanism from scratch lol
18:43 ToApolytoXaos what a chaos! :s
18:44 willthechill lines like 23 are compact debugging statements
18:44 willthechill anything with TEST_VERBOSE is debugging
18:44 willthechill it is hard to get at the data you want so the debugging statements tend to be long
18:45 willthechill to which "C++ mechanism from scratch" are you referring?
18:45 ToApolytoXaos in my humble opinion, each statement should be in a separate line
18:45 willthechill yes well maybe someday in the future we can have prettier code
18:45 ToApolytoXaos a much clearer syntax it would surely be
18:45 willthechill but for now it is enough to just have WORKING code
18:45 ToApolytoXaos lol i understand
18:46 willthechill I have tried my very very best to be meticulously clear in my code
18:46 willthechill the fact that this code is chaotic is due to the extremely difficult nature of getting it to work at all
18:47 ToApolytoXaos well, to make it clearer there are many ways; beautification websites or using Code::Blocks's AStyle plugin
18:47 ToApolytoXaos it beautifies it within seconds
18:47 willthechill yes I know how auto-formatting works, I use perltidy extensively
18:48 ToApolytoXaos sorry if it sound like an offense to you
18:48 willthechill what you call "beautification" I call "potentially breaking this crazy-complicated code"
18:48 willthechill no not offended, I just don't think you understand what we're dealing with here just yet  :)
18:48 ToApolytoXaos yes, if you beautify javascript code lol
18:48 ToApolytoXaos oh trust me, i really DO understand
18:48 willthechill let me remind you, this is NOT normal C++ code
18:48 willthechill this is C++ AND Inline::CPP AND Perl 5 core code all combined together
18:48 willthechill into 1 sub-syntax
18:49 ToApolytoXaos that would do :D
18:49 willthechill so a beautification mechanism for C++ is not appropriate
18:49 ToApolytoXaos well...how about those debug lines? :(
18:49 ToApolytoXaos can't we place it on a separate line?
18:49 ToApolytoXaos all these multiple fprintf()
18:50 willthechill haha no no no you don't get to change this code
18:50 ToApolytoXaos i have to scroll left and right to read it and by the time i do so, i lose my concentration
18:50 willthechill you get to write some new code
18:50 willthechill well you can download your own copy of the code
18:50 willthechill and reformat it however you like
18:50 ToApolytoXaos ok
18:50 willthechill but you may not push it back to the repo
18:50 ToApolytoXaos i won't push anything, have no worries
18:50 ToApolytoXaos brb
18:53 willthechill gotta go run some errands, back in a while
20:52 travis-ci RPerl build passed. Will Braswell says 'Generator, Perl Ops Perl Types, Hash Ref Part 3'
20:52 travis-ci http://travis-ci.org/wbraswell/rperl/builds/61672764 https://github.com/wbraswell/rperl/compare/1316e69c4719...a225b2badd88
21:46 willthechill cool
23:29 bulk88_3 joined #perl11
23:52 rurban joined #perl11

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