3 ms·
Hey, this is pretty cool. Does this style of annotation exist for any other libraries/projects? I think the left side could be expanded into a pretty good ped
by jliechti1 13y ago
Hey, this is pretty cool.
Does this style of annotation exist for any other libraries/projects?
I think the left side could be expanded into a pretty good pedagogical tool using mini-examples and explanations to focus on key concepts in the code.
- muriithi 13y agoBackbone.js http://documentcloud.github.io/backbone/docs/backbone.html http://documentcloud.github.io/backbone/docs/backbone.html Underscore.js http://underscorejs.org/docs/underscore.html http://underscorejs.org/docs/underscore.html
- emillon 13y agoIt's similar to literate programming, which consists in exchanging the focus between code and comments. I believe that Coffeescript just got a literate processor, so the community may benefit from this in the near future. Because GHC supports it, it is also very popular in the Haskell community.
- romaniv 13y agoMany (around 5) years ago I wrote a library that parsed PHP files and generated logical "anchors" after classes and functions. I combined that with a simple CRUD application that allowed anyone to view source code in the browser and add/change comments dynamically. No one cared.
- kristopolous 13y agohave the source posted anywhere?
- romaniv 13y agoThe main website it was on no longer exists, but there are bits and pieces here and there. http://code.ohloh.net/project?pid=LOfjD4AHjNo&prevcid=1&browser=Default&did=libs%2FDoc&cid=ks-xq0gsZHA http://code.ohloh.net/project?pid=LOfjD4AHjNo&prevcid=1&... doc_code2html() takes PHP code as argument, and uses built-in PHP tokenizer to add CSS classes to code. After that, you can use vanilla CSS to color things up. Up to this day this is the simplest and most accurate PHP highlighter I've seen. doc_getCodeAnchors() takes php code as argument and returns an associative array of anchors. I.e.: array( 'MyClass.methodName' => array('line' => 3, 'type' => 'class', 'name' => "methodName"), ) Comments class was a controller that actually displayed files with highlighting and comments, allowing you to add and edit comments. And yes, I am fully aware of deficiencies of that code, but I still think the core ideas there are pretty cool.
- pavel_lishin 13y agoOne of backbone.js's example apps does this, and it was my favorite thing about their docs: http://backbonejs.org/docs/todos.html http://backbonejs.org/docs/todos.html
- malingo 13y agoraganwald put together annotated source for his coffeescript implementation of hashlife, also using Docco: http://recursiveuniver.se/docs/cafeaulife.html http://recursiveuniver.se/docs/cafeaulife.html
- rossriley 13y agoI did one for PHP a while back. Not perfect, but here's the project: https://github.com/oneblackbear/phrocco https://github.com/oneblackbear/phrocco And here's an example: http://media.oneblackbear.com.s3.amazonaws.com/WaxUrl.html http://media.oneblackbear.com.s3.amazonaws.com/WaxUrl.html