HNHacker News
TopNewBestAskShowJobs

jagthebeetle

76 karma · joined November 2, 2016

submissionscomments
jagthebeetle··on ECMAScript modules in Node.js: the new plan
I'm not strongly opinionated or informed about this, so why does Node need file extensions when Other languages don't?

Is it because of non-JS imports? I know that when Ryan dahl announced Deno, he mentioned it as an obviously good change, but, I'm not sure what the problems with extension-less imports are.

(Edit for context: at work, we either use Closure or put everything under a global root, and only import JS, so maybe I've been shielded from the state of the world.)

jagthebeetle··on Google Cloud Global Loadbalancer Outage
I'd wait for further details from the status page, but as a GCP employee (for whatever that claim's worth on the internet), I'm not seeing evidence of an issue earlier than 12:15 PDT.
jagthebeetle··on Browser extension that strips Google Analytics tokens from URL query strings
Unfortunately, or not, GA makes it very easy to work around this. By default, it will do its UTM parsing serverside these days based on the page URL the webmaster sends to it.

So all I have to do as a webmaster is start using `?aaa_source=foo&aaa_medium=bob`

Then I do `ga(‘send’, ‘pageview’, location.pathname.replace(/aaa/g, ‘utm’)`

A more robust implementation would have to modify the web request to GA itself, assuming the goal is to destroy that data.

EDIT: Upon looking at the actual implementation (`chrome.webRequest.onBeforeRequest`), the points above should be addressable: the key is to strip out potentially URL-encoded utm values in the requets sent to GA [1], which may be either in the query string or the (beacon) POST payload shipped to google-analytics.com).

i.e. `google-analytics.com/collect?v=1&dp={url-encoded-path-with-utm-values}` should be purged as well.

[1]: https://developers.google.com/analytics/devguides/collection...

jagthebeetle··on Browser extension that strips Google Analytics tokens from URL query strings
Missing, among possibly others, coremetrics tracking tags (cm_mmc)
jagthebeetle··on Why is Pi² so close to 10?
Isn't this just by definition of equal temperament? If you want a pitch to double after 12 steps (multiplicatively), you choose 12-TET. Other musical systems exist (e.g. quarter-tone scales), and have existed.

So the musical notes thing is by human fiat, which at least pi^2 isn't. Perhaps I'm missing your meaning though?

jagthebeetle··on The cure proposed for the crisis of the humanities is worse than the disease
As a sometime English major, I’m biased, but the main objective (or perhaps side-effect) of the humanities, in my experience, was to teach one how to write. Regardless of “truth,” “values,” pottery, or poetry, modular, well-structured arguments were the main thing I got from that degree. Attempts to justify the actual content of humanities studies seem futile, if valiant, and nobody has been good at articulating deeper aims for English, at least. (I found anyway that I was able to write A papers without reading the material.)

(At any rate, this author might have taken a more Orwellian pen to their monograph.)

jagthebeetle··on Secretary Problem
There's probably no lack of toy code, but since I am a skeptic / sceptic, quick nonsense code for pythonistas : https://gist.github.com/anonymous/ef975cdcb26044de9ba93e4e74...

Guess what? Skepticism allayed!

jagthebeetle··on The Strange Loop in Deep Learning
Don't recurrent neural networks (which have been around in several variants for a few decades) incorporate feedback loops in the sense described in this article?

I'm curious how a data flow graph could learn representations of itself and of arbitrary human concepts, but I somehow suspect you'd end up with an unilluminating generator of JSON strings with many of our current architectures.

jagthebeetle··on Deconstructing the Google Analytics tracking script
I'm not sure if it's actually intentional, but given the command-queue nature of the ga function, i[r].q's resemblance to IRQ could be a cute reference. (Assuming i and r were fixed, p=1/26 for using q... science!)

(Originally noted in some old article that I can't find right now.)

jagthebeetle··on The scourge of web analytics
Disclaimer: I'm a bit of a GA power user; although being on the technical side, I'm not really sympathetic towards the marketing uses for analytical data.

There's a tough line to draw between excessive and sufficient instrumentation for a given app, and a business will probably opt for more than less data. I'm not sure that's a moral argument against tools like GA, though.

Especially given one particularly compelling feature of Universal Analytics (GA's latest incarnation): you can definitely water down what you collect. (https://developers.google.com/analytics/devguides/collection...)

Want to opt out of collecting advertising info? Say so in the UI. Anonymize/obliterate the IP/geolocation info? Override the IP field to a static value. Override the intrusive collection of User-Agent values? Override the ua parameter. Prevent collection of granular page info? Override the dl, dp, dt fields. Stop collecting referral info? Blank out the dr, cs, cm, cn, and remove UTMs/GCLIDs from the URLs you report.

In fact, you can even implement measurement protocol serverside – GA's ancient forebear, Urchin Analytics, actually began as a server-log parsing utility! (https://urchin.biz/urchin-software-corp-89a1f5292999)

Reduce JavaScript use altogether but keep it clientside? Implement a static GA pixel:

  <img src="https://google-analytics.com/collect?v=1&tid=UA-XXXXX-Y&cid=somevalue&dp=%2Fsomepath&ua=YourUserAgent&...">
Now, mistrust of a third party with said data is a relevant issue, but slightly different from the technical bones of this piece's argument.
jagthebeetle··on Prepack helps make JavaScript code more efficient
This was my immediate question. For want of a more rigorous test, the online closure compiler service (https://closure-compiler.appspot.com/home) failed to produce equivalent or shorter output for all but the first example.
jagthebeetle··on Princeton’s Ad-Blocker May Put an End to the Ad-Blocking Arms Race
Not seeing a whole lot of discussion about the implementation. Looking through the extension's code (which should be somewhere under your Chrome app files, if not online), briefly, it seems like an unsung hero here is Tesseract.js: http://tesseract.projectnaptha.com/.

The extension itself seems to do OCR (using Tesseract) on images and look for the string "adchoices", or else the adchoices icon, which yes, is cool: but just want to clarify that the folks at Tesseract seem to be doing the meaty "computer vision" part.

EDIT: oh, this isn't markdown.

jagthebeetle··on A demonstration of browser events used to monitor online behaviour
Suspect it must be checking time, below didn't really trigger anything:

for (var i = 0; i < 30; i++) { setTimeout(()=> button.click(), Math.random()*1500) }

I wish bundle.js weren't minified, it could be fun to read.

jagthebeetle··on Getting Started with Webpack 2
Has anyone played with Bazel/Closure?

You get dependency management (resolution, pruning) for free from Closure and declarative build targets from Bazel. (Including dependencies on other targets, e.g. non-module-bundle.js)

To be fair, I don't think the (publicly) available rule set grants parity with webpack, but the syntax is a lot less gross and the concepts have been there from the start.

(Re gross: Instantiation in a config file?)

← PreviousPage 2 of 2