Live data from Hacker News

JSDev: Executable comments (by Douglas Crockford)

github.com

1–10 of 18 posts

Re: JSDev: Executable comments (by Douglas Crockford)

#3
post #2

As much as I respect Douglas Crockford, did he just reinvent Python's Doctest ( http://docs.python.org/library/doctest.html )?

This doesn't really intersect with doctest as far as I can tell. That is a rather simple feature, while this is complicated.

You might be doing something wrong when your comment-specific syntax _itself_ has comments, but I'm probably not the target audience for this tool.

Re: JSDev: Executable comments (by Douglas Crockford)

#5

Not to knock the work that's been done or disparage the author of this code or similar work that's hosted on github. But these link's to a github repo with minimal documentation and no instructions on how to use the code are frustrating.

Documentation with examples in the code comments:

https://github.com/douglascrockford/JSDev/blob/master/jsdev....

Keepin' it real, a tool about comments must have documentation in the comments ;)

Re: JSDev: Executable comments (by Douglas Crockford)

#6
This does look really interesting and something that we could potentially use ... but I wouldn't know where to start without a little more documentation I'm afraid. Is it a browser extension? Where do I install it? etc.

I like the concept of the dev comments automatically being removed by minification, though, no extra buildy stuff required.

Re: JSDev: Executable comments (by Douglas Crockford)

#7
post #5

Not to knock the work that's been done or disparage the author of this code or similar work that's hosted on github. But these link's to a github repo with minimal documentation and no instructions on how to use the code are frustrating.

Documentation with examples in the code comments: https://github.com/douglascrockford/JSDev/blob/master/jsdev.... Keepin' it real, a tool about comments must have documentation in the comments ;)

Yeah I noticed that but in what context can I run this other than command line? I assume its C code but how do I get it to work in the browser? or is it something you'd use in node.js? Guess it's just over my head

Re: JSDev: Executable comments (by Douglas Crockford)

#8
post #5

Earlier quoted context omitted.

Documentation with examples in the code comments: https://github.com/douglascrockford/JSDev/blob/master/jsdev.... Keepin' it real, a tool about comments must have documentation in the comments ;)

Yeah I noticed that but in what context can I run this other than command line? I assume its C code but how do I get it to work in the browser? or is it something you'd use in node.js? Guess it's just over my head

A program is read from stdin, and a modified program is written to stdout.

https://plus.google.com/118095276221607585885/posts/CTZ7BNx7...

Re: JSDev: Executable comments (by Douglas Crockford)

#9

This does look really interesting and something that we could potentially use ... but I wouldn't know where to start without a little more documentation I'm afraid. Is it a browser extension? Where do I install it? etc. I like the concept of the dev comments automatically being removed by minification, though, no extra buildy stuff required.

You type `make jsdev` and away you go:

    ./jsdev  output.js

Re: JSDev: Executable comments (by Douglas Crockford)

#10
post #3
post #2

As much as I respect Douglas Crockford, did he just reinvent Python's Doctest ( http://docs.python.org/library/doctest.html )?

This doesn't really intersect with doctest as far as I can tell. That is a rather simple feature, while this is complicated. You might be doing something wrong when your comment-specific syntax _itself_ has comments, but I'm probably not the target audience for this tool.

> I'm probably not the target audience for this tool.

Who is?

Post reply on HN