Perl 6 - the future is here, just unevenly distributed

IRC log for #metacpan, 2016-01-22

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

All times shown according to UTC.

Time Nick Message
02:19 vroom joined #metacpan
07:44 oiami joined #metacpan
08:14 neilb joined #metacpan
09:06 neilb joined #metacpan
09:16 Relequestual joined #metacpan
09:31 neilb joined #metacpan
13:12 punter joined #metacpan
13:43 vroom joined #metacpan
14:13 vroom joined #metacpan
15:35 bowtie joined #metacpan
18:15 neilb joined #metacpan
19:17 kentnl joined #metacpan
19:53 kentnl an idea I'm kicking with #statocles, it would be "nice" if we could find some way of hinting *inside* a verbatim code-block which highlight language should be used, ( in POD that is )
19:54 kentnl I initially thought we could just stash vim/emacs modelines inside these verbatim code-blocks and it might be useful enough, but the downside of those approaches is vim doesn't really care about your indent levels / context
19:54 kentnl so a vim mode line in a code-block *could* trigger vim into rendering the whole file like that, which would be bad.
19:54 kentnl ( vim normally only scans the first and last 5 lines of a file, but that value is an arbitrary setting, `:set modelines=5000` would break everything.
19:55 kentnl So an alternative idea would be to mimic the vim modeline syntax, but not in a way that would trigger vim specifically.
19:56 kentnl such as {whitespace?}{non-whitespace}{whitespace}syntax={language}\n
19:56 kentnl or as {whitespace?}{non-whitespace}{whitespace}filename={name}.{ext}\n
19:57 kentnl but surely such a hinting feature would be nice to get "Right" so it worked everywhere instead of just metacpan and statocles, so this is just a call-for-ideas and I might kick off an email to the pod mailing list once we get some decent candidates
19:58 kentnl ( using =begin and =for are out of the question for me, because they basically conspire to hide whatever you wanted to highlight to an unsupporting POD renderer )
21:33 rwstauner but you could use =for syntax-highlight \n language-name \n \n \x20 verbatim block
21:33 rwstauner i believe there is already a proposal out there that does essentially that
21:34 rwstauner a block is assumed to be of the last syntax specified by a `=for syntax-hightlight` tag
21:34 * rwstauner &
21:35 ether kentnl: could you clarify why =begin/=for are objectionable?
21:38 kentnl well, if you put =begin *around* a code block, then the code will become invisible to any formatter that doesn't recognize the `=begin NAME`, and will make your synopsis vanish in a puff of smoke.
21:38 kentnl And that would be bad.
21:39 kentnl so the only other option is having some non-structural correlation where a "=for"/"=begin" structure contains metadata that applies to the /next/ code block.
21:40 kentnl but my reservation there is those structures can get too easily detached from the code block in question when pumped through Pod::Weaver or similar.
21:40 kentnl ( due to its non-structural nature, there's no strong association between the elements, even though you mean to imply one )
21:43 kentnl ether: ^ though I may be mis-remembering how things work here, I do have strong memories of "=begin FOO" blocks turning up where I didn't ask for them to be  and  having fun dicking around getting `=begin html` blocks rendering in the place I intended instead of at the end of the document.
22:09 neilb joined #metacpan
23:27 communicator joined #metacpan

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