Re: N3.js 0.2.0: now with browser support

Hi Adrian,

>> I'm pretty strict about that, even enforcing stylistic things such as proper indentation
>> [2]. I have a pre-commit hook that a) runs JSHint and b) executes
>> unit tests. I cannot commit if either fails.
> 
> that's cool, do you share that somewhere?

For safety reasons, git does not allow to directly commit the hooks as-is.
However, for me it is simply an executable file .git/hooks/pre-commit with content
    #!/bin/sh
    exec make jshint test
The details of both operations are in my Makefile [1].

> The whole test driven
> development stuff scares me as well as I lack the experience of how to
> start with tests, confuses me more than JS itself ;)

Miško Hevery really made me see the light [2].
There's also this great theory on how testing makes you a user of your library.

> wow impressive with the tests in testling, didn't think of that.
> Browserfy is pretty crazy too :) But I see your argument with heavy
> libraries and Streams are not always needed.

Streams would not come in handy in most browsers,
who have different mechanisms of dealing with HTTP requests than Node.
Funnily, I think browserify mostly helps making code compatible with other non-browser JS engines.
That, and when compiling other Node modules using your library for browsers.
Also, size-wise: with browserify, N3.js is 71kB; without 21kB.

> With your code I was able to create a basic SPARQL lexer within a few hours and as
> I said I'm not the fastest JS coder. Which means I found your code very
> easy to understand and well commented, which is not very common in the JS world IMHO.

Thanks, I'm glad it apparently  pays off :-)

> BTW would you mind to have a look on what I did and give
> me a feedback? Can put it on Github.

Perfect, I'd love to!

Best,

Ruben

[1] https://github.com/RubenVerborgh/N3.js/blob/master/Makefile
[2] http://googletesting.blogspot.ie/search/label/Misko%20Hevery

Received on Wednesday, 4 December 2013 17:54:45 UTC