In theory it should work fine for any language as long as we can parse it into an AST (or CST). It’s doing a straightforward search through an AST for identifiers and strings. I plan to extend it to other languages beyond JavaScript-family, as long as we can write a shim that parses the source language and feeds the parsed version to JavaScript.
Beyond interest filters, have you heard of retargeting? The idea is this: you put a tracking pixel on your website and if someone is logged in to Facebook when visiting your site then they specifically are added to your audience. You can then run ads that are shown only to your audience (both FB and Google support this).
This is both scary as a consumer and wonderful as someone who has something to sell. For instance, I sell a book on Angular. By putting Facebook tracking on our landing page and blog, I can run ads that only go to potential buyers (i.e. they were searching for Angular content online and came across our content).
The classic cry of an advertiser is “Half the money I spend on advertising is wasted; the trouble is I don’t know which half.” and retargeting can really help (the advertiser) there.
Tom, this library is really sweet. I’m definitely going to give it a try.
For others who are just getting into using promises, checkout domenicdenicola’s presentation on promises in javascript
So I guess that numbers can be illegal. But I have yet to form an opinion. Could someone on the Internet supply one for me, please?
Credit card numbers are obviously numbers. So if I buy something with your number, is it a valid defense to say “you can’t own a number”?
I think the answer would be to sidestep the question entirely. It’s not that the number itself is secret or owned, its that the number in the particular context in which it exists (in this case, as a credit card number) imbues it with a degree of specificity. That is, it is not reasonable to assert you own a number. It is reasonable to assert you own a credit card number (or at least have some vested interest in the protection of the knowledge of what that credit card number is, even if you don’t own it), because the credit card number has a functional utility beyond just being a number.
This logic can be extended to include any information which can be encoded into a number (i.e. any information at all).
That is, it seems like whenever this comes up there is a lot of incredulity that any number should ever be illegal. But tbh, I’ve never found the arguments against “illegal numbers” to be very convincing because there is plenty of information that can be encoded as a number that is (and should be?) illegal to possess.
What exactly is illegal? Possessing the information or willingly acquiring it? Suppose I have the ability to remember very long number sequences, and stumble upon an “illegal number”. Am I a criminal if I don’t forget the number?
as with most “pedantry in law” issues, the answer is “whatever common sense + the context assumes”.
Most things end up in front of a judge that doesn’t care that “theoretically I can generate a text file with all possible credit card numbers, is that illegal?”.
Though in seriousness, there’s a lot of details. (IANAL) For example, there have been cases where insider trading was not considered such, because the information was not explicitly sought out. So the context in which you obtain the information can affect things. Copying data for personal use has usually been legal, but handing it to other people sometimes isn’t.
Read the law and find out?
Ah, Google it. Always a classy answer, a worthy contribution.
But what if the law isn’t black and white, and it doesn’t have a clear answer to this case. Then you need to understand the spirit of the law. Or not. Maybe somebody else is needed to interpret the law. A judge perhaps? A lawyer?
Actually I’m pretty sure the law on failure to forget a number is pretty clear.
In this case, the focus would not be on the number, but on what you did with it. Did you have the right to use these funds? Of course, if the owner of the credit card gave you the number, it might be implied that you have the right to use it. Otherwise you probably obtained the number through illegal means.
A similar case would be breaking in to a place that happens to have its door lock protected a numeric code. You might know or guess the number, but that alone does not grant you the right to enter. Whether it is considered a break in is something that will be addressed without ever considering who owns the code.
Devil’s advocate: they’re definitely illegal. It’s not a number; it’s contraband (in this case, a tarball). Just because you can construct a number (possibly prime) from it does not make the number notable. The number itself is not useful in any arithmetic / geometric way, and would be better thought of as an encoding for the tarball. You can’t just take STARWARS.AVI, tap it with a magic prime-generator-wand, and get away with it.
On the other hand, since they went to the effort to find a truly notable representation of the tarball (a distinctly large prime), they should be able to publish it for prime-number-records purposes. But not for DMCA purposes. So honestly I’d say it’s pseudo-legal for records/historical/cultural purposes, but illegal otherwise (honor policy). Like that Vietnam war photo that caused a kerfuffle at/on Facebook a while back.