Perl 6 - the future is here, just unevenly distributed

IRC log for #inline, 2015-01-02

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

All times shown according to UTC.

Time Nick Message
00:12 ingy Fractal: String::Slice is a module I never got to work right
00:13 ingy have a look and let me know if you could help out
00:13 ingy (it involves unicode strings, so thought of you)
01:12 GitHub109 [inline-c-pm] ingydotnet pushed 1 new commit to master: http://git.io/LJ3N4Q
01:12 GitHub109 inline-c-pm/master d637b58 Ingy döt Net: CPAN Release 0.73...
01:12 GitHub121 [inline-c-pm] ingydotnet tagged 0.73 at master: http://git.io/Dmt_Rg
01:16 mohawk a fairly full makefile parser in 51 lines
01:16 mohawk yay perl
01:23 leont Well, define makefile…
01:23 leont I assume you mean some kind of portable subset of possibilities
01:23 mohawk it's really more of a lexer
01:24 mohawk it can do vars (with \-continuation), rules, recipes, and comments
03:05 ingy mohawk: I updated the Inline::C docs (formatting-wise)
03:06 mohawk ok
03:06 ingy I have new swim plugins to generate the boileryplate junk from the Meta file now
03:06 ingy just in time for 2015 :)
03:07 ingy also I've decided that 2015 is the Year of the 2-space Indent
03:07 ingy the docs are updated that way but not the code yet.
03:08 ingy I somewhat don't like the diff churn of that kinda stuff, but I'm more interested in moving forward
03:08 ingy I just know some debian crank will get cranky on me
03:09 mohawk are they obsessed with 4-space indent?
03:10 ingy All my Bash code is 2 space indent, and swim and yaml are all about 2, but I held off on Perl
03:10 ingy no they just hate whitespace diffs
03:10 ingy or some people do
03:11 mohawk too bad
03:11 ingy Ruby is all about 2. Miyagawa is all about 2 for some years
03:12 mohawk i used to be 4, but when i worked on Gimp-Perl, i had to switch
03:12 mohawk and i like the leanness now
03:12 ingy you do 2?
03:12 mohawk yes?
03:13 ingy I wanna Change my Makefiles to 2!
03:13 ingy ;)
03:13 ingy cmon, Makefile. Get with the program!
03:13 mohawk i think you can with GNU make
03:14 ingy oh speaking of, I have a Pod question for you and/or leont
03:14 ingy sec
03:14 mohawk .RECIPEPREFIX
03:14 mohawk http://www.gnu.org/software/make/manual/make.html#Special-Variables
03:14 mohawk ok
03:15 mohawk of course, that's only GNU make
03:18 ingy https://gist.github.com/anonymous/cefc8149a453c7c157a4
03:18 ingy I want to make code sections that aren't indented when rendered
03:18 ingy I don't think I can in Pod
03:19 ingy maybe metacpan uses different Pod render
03:19 * ingy looks
03:19 mohawk i thought pod stripped off initial indentation
03:19 mohawk (whiile preserving relative0
03:19 ingy https://metacpan.org/pod/Inline::C#EXAMPLES
03:20 ingy looks like it depends on the implementation
03:20 ingy I wonder if a Pod spec deals with it
03:20 ingy so I can make some bugs reports
03:21 ingy http://search.cpan.org/~ingy/Inline-C-0.73/lib/Inline/C.pod
03:21 ingy :(
03:21 ingy metacpan is futuristic in this regard I guess
03:22 ingy I honestly also want leading whitespace to be possible
03:22 mohawk i think you're obsessing a little too much about the presentation
03:22 ingy Swim deals with this nicely. All indents are 2 space, so it just strips off 2 columns
03:22 ingy no way
03:23 ingy copy paste code examples
03:23 ingy see which ones work
03:23 ingy heredocs all break
03:24 mohawk if you're that worried:
03:24 mohawk <<'  EOF';
03:24 mohawk EOF
03:24 ingy __END__
03:24 mohawk fair enough
03:25 ingy how does that heredoc fix help? that's broke on metacpan
03:25 mohawk it seems to me the only burden is on the user to left-indent a bit
03:25 mohawk by all means submit bug reports though, it should be as smooth as possible
03:26 ingy anyway, to create new langs, one must obsess on these things
03:26 ingy yeah
03:26 mohawk well, my EUMM makefile parsed -> data-structure -> makefile is passing all EUMM tests
03:26 ingy where is it?
03:26 mohawk heck, i'll push it
03:27 ingy I want to convert it to Pegex :)
03:27 ingy (for fun)
03:27 ingy you can just gist it if you want
03:27 ingy sounds really cool
03:28 mohawk https://github.com/mohawk2/ExtUtils-MakeMaker/compare/vrr#diff-0
03:29 mohawk you know i won't be able to use Pegex in EUMM, right? ;-)
03:32 mohawk there are various much fancier makefile parsers on cpan
03:32 mohawk this is really more of a lexer than a parser
03:35 ingy nod
03:38 mohawk anyway, enjoy ;-)
03:38 mohawk now to make it not produce lots of blank lines...
04:40 Fractal ingy: yes i've seen string::slice
04:41 Fractal quite interesting module.. also see my module Test::ZeroCopy
04:46 Fractal its tests depend on your module :)
05:02 ingy Fractal: looking
05:06 ingy Fractal: maybe we can port both to I:M
05:08 ingy mohawk, Fractal: I think the next step towards XS only, I:M is to dist the .inline dir. This has the yanked out c code, the XS the Makefile, the .h files etc.
05:09 ingy at first we'll still need Inline::Module and probably Inline, but we can start optimizing towards something leaner
05:09 ingy We definitely won't need the Parser anymore
05:10 ingy Fractal: string::slice main purpose is for pegex parsing.
05:11 ingy pegex does lots of regex matches and the regexes are always anchored to start of string, ie the current parse position
05:12 ingy there are 2 ways to do that
05:12 ingy \A on a substr
05:12 ingy or \G and pos
05:12 ingy \G won't work on non-core regex engines
05:12 ingy like re2
05:13 ingy that forces to use substr
05:13 ingy I'm not even sure when substr copies
05:14 ingy but even if it was CoW or whatever, this: substr($buffer, 100000000000000) =~ /\Afoo/;
05:14 Fractal ingy: yes i think as of 5.20 COW stuff it doesn't in some situations
05:14 ingy would surely take forever
05:15 ingy then substr($buffer, 100000000000005) =~ /\Afoo/;
05:15 ingy etc
05:15 ingy string::slice moves forward a bit at a time, same as a parser does
05:16 ingy so presumably optimal
05:16 ingy this is assuming utf8 kind or char string encoding (not offset based)
05:17 ingy anyway I suck at C, and I recall String::Slice had issues
05:17 ingy I should bring it up to modern
05:18 ingy doing…
05:18 Fractal i'll take a look at S::S.. it's great idea
05:18 Fractal LMDB_File <-- does 0 copy stuff too
05:18 Fractal like zero-copy from the DB
05:20 ingy I think I can convert to I:M
05:31 Fractal yes that would be good candidate
05:32 Fractal bbiab.. i'll fix patch tonight
05:32 ingy Fractal: it's already fixed/released
05:33 Fractal ahh sweet thx
05:33 ingy :)
05:33 Fractal k then i'll release my modules that use it tonight :)
05:56 willthechill joined #inline
06:17 bulk88 joined #inline
09:32 GitHub128 [string-slice-pm] ingydotnet pushed 1 new commit to master: http://git.io/pw3zDg
09:32 GitHub128 string-slice-pm/master f81d741 Ingy döt Net: CPAN Release 0.02...
09:32 GitHub13 [string-slice-pm] ingydotnet tagged 0.02 at master: http://git.io/r4MWWg
09:32 ingy Fractal: I did it! ^^
09:33 ingy My first real I:M module!
09:33 ingy The function takes a variable number of args
09:34 ingy which you can't really do in C, but XS does it for you
09:34 ingy so I had to reverse engineer that part
09:34 ingy and then it worked
09:34 * ingy does a little C dance :)
09:35 ingy It'll be intereting to see how it fares on cpantesters
09:37 mohawk ingy++
11:12 GitHub124 [string-slice-pm] eserte opened issue #1: Test suite fails for perl 5.20.0 and later (0.02) http://git.io/R6UFXQ
11:21 GitHub109 [string-slice-pm] eserte opened issue #2: Inline::Module not in configure_requires or in inc/ (0.02) http://git.io/sRWwSQ
14:46 vicash joined #inline
14:46 vicash left #inline
16:50 Fractal ingy: sweet :)
16:51 ingy Fractal: http://cpantesters.org/distro/S/String-Slice.html
16:51 ingy getting some fails :)
16:52 Fractal FYI: C does support variadic functions: https://en.wikipedia.org/wiki/Variadic_function#Example_in_C
16:53 Fractal but ya i think you have to do something different for XS
16:53 Fractal module looks good.. I::M is so obviously the right way to distribute these things
16:54 Fractal "Attempt to free nonexistent shared string" hrmm odd
17:02 Fractal they all seem to be 5.20 failures.. prolly bad interaction with the COW stuff.. I'll look into that.. I had to fix something similar with IO::Vectored
17:05 ingy Fractal: cool, there's also a couple reports because I forgot to put add inc to lib to .t
17:05 ingy I::M is supposed to catch that
17:06 ingy or maybe I never implemented it
17:06 * ingy looks
17:10 ingy er, nm, ZD/DZ generates that Makefile.PL
17:10 ingy but it looks like stuff is missing in my inc
17:10 ingy :(
17:13 ingy Fractal: it's related to the bundle feature :[
17:14 Fractal oh ya? damn.. sorry about that then :)
17:14 Fractal brb
17:21 ingy Fractal: no. my fault. didn't add bundle to DZ plugin
17:22 ingy surprised it got so far on many smokers
17:31 GitHub19 [string-slice-pm] ingydotnet pushed 1 new commit to master: http://git.io/pXYmIQ
17:31 GitHub19 string-slice-pm/master a21c065 Ingy döt Net: CPAN Release 0.03...
17:31 GitHub51 [string-slice-pm] ingydotnet tagged 0.03 at master: http://git.io/86tK5Q
17:35 GitHub123 [dist-zilla-plugin-inlinemodule-pm] ingydotnet tagged 0.07 at master: http://git.io/sLN3Vw
17:35 GitHub155 [dist-zilla-plugin-inlinemodule-pm] ingydotnet pushed 1 new commit to master: http://git.io/nqNihg
17:35 GitHub155 dist-zilla-plugin-inlinemodule-pm/master f0974a3 Ingy döt Net: CPAN Release 0.07...
17:59 ingy Fractal: I reproduce the error on 5.20.0
18:02 ingy Fractal: also all the pure XS 0.0.1 version never passed on 5.20
18:03 ingy so it's not something new I introduced
18:34 Fractal ya that makes sense
19:29 GitHub17 [inline-module-pm] ingydotnet pushed 1 new commit to master: http://git.io/TIApTA
19:29 GitHub17 inline-module-pm/master 2dac4b7 Ingy döt Net: Add String::Slice to devel test

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