News for hackers. Stuff that matters.

concise_unicorn

Re:macOS 14 will support JPEG XL on Monday June 05, 2023 @07:20PM (#36205708)
No, DICOM is a container format that can contain JPEG XL image data
Re:Show HN: Auto install npm dependencies as you code on Monday August 08, 2016 @02:50PM (#12250000)
It literally takes about 50ms to parse libraries like jQuery (mobile), angular and React with acorn[1].

Wether the choice was deliberate or not is debatable, but given the speed of these parsers I'd reason that there isn't any advantage to using regexes.

Reducing the amount of false positives is also one step closer to making this tool somewhat more secure, though certainly doesn't address any of the previous comments in this thread.

[1] http://esprima.org/test/compare.html

Re:Show HN: Auto install npm dependencies as you code on Monday August 08, 2016 @01:58PM (#12249625)
Tools like acorn[1] and Esprima[2] can parse the JavaScript source and output an ESTree compliant syntax tree.

Then you can traverse it and modify it like any other AST.

[1] https://github.com/ternjs/acorn [2] http://esprima.org/ [3] https://github.com/estree/estree

Re:Show HN: Auto install npm dependencies as you code on Monday August 08, 2016 @01:21PM (#12249341)
Regular expressions are a very naive way of detecting calls to 'require'. For correctness you're better off recursively walking the AST.

I've successfully used Detective in a couple of my personal projects to find all require statements.

Relevant issue on Detective: https://github.com/substack/node-detective/issues/8

Re:Show HN: Light Bootstrap Dashboard on Tuesday September 08, 2015 @07:52PM (#10188876)
Awesome stuff!

Here's a pet peeve of mine though: why isn't the entire surface area of the tasks clickable? I'm horrible at precisely targeting checkboxes.

Re:Microsoft Project Siena (Beta) on Sunday December 22, 2013 @04:50PM (#6951926)
Is it just me or does it fail to explain just what it is, exactly?
Re:How to intern in Silicon Valley with a J1 visa on Thursday December 12, 2013 @03:05AM (#6893398)
Having just secured my own J1 visa, I can attest to how relatively easy it was.
Re:Vagrant 1.4 on Tuesday December 10, 2013 @03:00AM (#6879528)
Thanks for the screencasts, now I may finally get around to giving it a try.