Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sik_the_hedgehog

Member Since 31 Jan 2009
Offline Last Active Private

Posts I've Made

In Topic: Some people just want to watch the world burn

Yesterday, 02:38 PM

I'm open to hearing about why it's insidious, but have yet to hear a good reason.

That the -> operator is actually a thing and I had to stop and think to figure out how it was supposed to be parsed (because I kept seeing - -> instead of -- >). You definitely don't want to slow down people like that, especially not during crunch period. (and yes, this is all a matter of where whitespace goes, the operation itself is fine)

 

Also I can attest to the string thing, I swear. I reduced loading times from 4-5 seconds to a fraction of a second just by computing a "quickhash" of each string (just add every character) when the list was first generated, then when it searched for a string it'd compare the quickhash first. Turns out that a lot of filenames differed only in their suffix (e.g. run_1, run_2, run_3, and so on - yeah, talking about animations here). A naïve comparison would have to scan practically the whole strings before failing, but the quickhash made them fail immediately. That the quickhash was stored alongside the pointer (and hence didn't need an extra dereference) probably also helped regarding the cache.

 

Obviously only useful for things like lists where you compute the quickhash of those strings only once then reuse it over and over, but it's definitely worth it even though it's quite simple to implement.


In Topic: Question about encryption and ransomware.

21 May 2016 - 09:34 AM

You know, even if you could somehow figure out the key from that and all... who said it's the same key being used on every file?


In Topic: Billborad is not aligned to view

26 April 2016 - 12:29 PM

Why are you pushing the matrix when you aren't using it? (and more importantly, you aren't even calling the matrix functions, not using the parenthesis means they're function pointers instead and on their own they do absolutely nothing)

 

Anyway, I'd argue that probably the easiest way for you would be to rotate (glRotate3f) the billboard the same angle as the camera, but the other way (i.e. -angle instead of angle). Less headaches to cope with. And if you ever switch to a more modern API than the old OpenGL 1.1, remember you can do whatever is the equivalent there.


In Topic: When you realize how dumb a bug is...

25 April 2016 - 09:03 PM

Today wondering why a file was 4KB instead of 3KB. Checked the parameters, they were fine. I had just changed the tool not much earlier on the feature that particular file was using so I wondered if I had introduced a bug? But wait, then why the other files relying on that feature aren't broken? Is this one of those subtle bugs?

 

Then I realized I was looking at the wrong file (ノ_<)


In Topic: GPL wtf?

25 April 2016 - 01:14 PM

The biggest problem with copyleft licenses, they usually aren't compatible with each other because they forbid additional restrictions (and copyleft works by imposing restrictions).

 

That said, to the question in the first post: programs running under Linux don't link to the kernel, they communicate through syscalls, so the GPL is never relevant here.


PARTNERS