News for hackers. Stuff that matters.

mihai_ionic

Re:Will It Optimize? (2010) on Sunday October 26, 2014 @07:56AM (#8510846)
Is there any reason why something like the following should not work?

    while (condition)
    {
        a();
        if (!condition)
            break;
        b();
    }
Re:Don't run 'strings' on untrusted files on Sunday October 26, 2014 @07:34AM (#8510813)
Yes, for example this bug affects 'file': https://sourceware.org/bugzilla/show_bug.cgi?id=16825

The code in 'file' tries to parse the given file with every built-in format loader, so there are likely many more vulnerabilities like this one.

Re:Don't run 'strings' on untrusted files on Sunday October 26, 2014 @07:10AM (#8510777)
The binutils maintainers aren't exactly responsive when it comes to following up on security-impacting bug reports: https://sourceware.org/bugzilla/show_bug.cgi?id=16825
Re:Why your first Rust FizzBuzz implementation may not work on Monday October 13, 2014 @05:01AM (#8447991)
Here's what the final example from the blog would look like, if you were to directly translate it into C++: http://coliru.stacked-crooked.com/a/265c6ec6fb6751a9

Now, of course, no one would program that way, but I think it does help visualize what really happens.

The obvious cost from delaying the printing is that you have to branch a second time, later in the code, to consume the value. I wonder how feasible it would be to introduce some kind of compiler transform that could invert the control flow, essentially pasting the surrounding code into the inner branches, to make this abstraction cost-free.

Re:Postgres full text search is good enough on Monday September 29, 2014 @10:45AM (#8383058)
One use case where Postgres FTS fails spectacularly is when your search has to return results ordered by some field (e.g., timestamp). This is critical for applications that have to return close-to-realtime results due to the queried content being time-sensitive.

Neither GIN nor GiST indices support such document ordering. For a top-N query of the most recent results, the entire result set has to be processed. With common domain-specific words, this can be more than 50% of the entire document set. As you can imagine, this is insanely expensive. When you are in this situation, it helps to set gin_fuzzy_search_limit to a conservative number (20000 works for me, less if you expect heavy traffic) in postgresql.conf, so that pathological queries eventually finish without processing every result. Result quality will take a hit, because many documents are skipped over.

If you need any type of ordered search on more than a hundred thousand documents, do yourself a favor and use something else than Postgres.

I'm not sure what search back-end Wikipedia is using, but it seems like they are not quite immune to this problem either: https://en.wikipedia.org/w/index.php?search=a+the

Re:GPS and Relativity on Wednesday July 16, 2014 @02:42PM (#8043734)
Or, as I prefer to think of it, the state of a distant object is undetermined with respect to your state (in a superposition of all reachable states since your last interaction) until you actually interact with it, at which point both get reconciled into a compatible state. Of course, it's slightly more complicated than that, because this applies to every particle you're made of individually. And then the particles are actually merely excitations of a field.

I'll leave the rest to actual physicists. :)

Re:Reverse Engineering Vendor Firmware [video] on Monday July 14, 2014 @05:37AM (#8030196)
Likewise, I've witnessed a reversible variant of SHA-1. They must have somehow messed up the break condition because it essentially only did one round.
Re:Microsoft takes down No-IP.com domains on Monday June 30, 2014 @06:04PM (#7968020)
This decision is very disturbing indeed.
Re:Undefined behavior can result in time travel on Friday June 27, 2014 @04:05PM (#7956044)
According to the C++11 standard, the compiler may assume that any loop terminates, so unless you mark ring_bell as [[noreturn]], the code will be assumed reachable.

Furthermore, when undefined behaviour is invoked anywhere within a program, the whole program is undefined.

Re:Google Cardboard on Wednesday June 25, 2014 @03:09PM (#7946132)
> Q: Can I use a pizza box for the cardboard? A: Yes. Make sure you order an extra large.

I'm not sure I'd want to stick my phone into a soaked pizza box though.

Re:Static checking of units in Servo on Monday June 23, 2014 @11:27PM (#7936049)
Boost has a neat library that does this and more: http://www.boost.org/doc/libs/release/libs/units/
Re:The MIN Challenge on Sunday June 15, 2014 @10:08PM (#7897078)
I have come to really dislike people who think it's a good idea to define macros such as min, max, major and minor in system headers.

* http://msdn.microsoft.com/en-us/library/windows/desktop/dd75...

* http://msdn.microsoft.com/en-us/library/windows/desktop/dd75...

* https://stackoverflow.com/questions/22240973/major-and-minor...

Re:The MIN Challenge on Sunday June 15, 2014 @08:28PM (#7896850)
Meanwhile, in C++14:

    auto min = [] (auto a, auto b) { return a < b ? a : b; };
Re:YunoHost: Aiming to make hosting accessible on Sunday June 15, 2014 @10:22AM (#7895278)
Y U break my back button? Seriously hate sites that do that.
Re:Introducing DirectWrite (2011) on Sunday June 15, 2014 @10:20AM (#7895275)
I find DirectWrite to be a step down from GDI in terms of crispness and readability, and I don't think I'm alone.

Infinality on Linux can look great on the other hand, if configured properly.

Re:Free SSL Certificate for Open Source Projects on Saturday June 07, 2014 @03:48PM (#7862901)
So no one can do a MITM attack and change the SHA1 checksum, OpenPGP Key ID, file lengths and code signing certificate fingerprints as you download package-integrity.html?
Re:EBay Inc. To Ask All eBay Users To Change Passwords on Wednesday May 21, 2014 @07:24AM (#7777617)
I just made a PayPal account just the other day.

Now I'm really glad that I used `makepasswd --chars 20`, even though I had to paste the password into the input element's value with Inspect Element.

Re:Mandatory encryption on XMPP starts today on Monday May 19, 2014 @11:34AM (#7767925)
I've dropped her a message (kcushing at google dot com) and I suggest you do the same.
It also doesn't fit their app store policy at all, particularly in light of the recent takedowns aimed at guides or utilities for PC games in absence of any copyright claims.
Their customer support may be bad, but their developer support is far worse.

If your application is ever suspended from Google Play, you will be greeted with a message directing you to an appeal form which lets you enter a maximum of 1000 characters to make your case. This is without having an exact idea of the reason your application was suspended in the first place. You are also advised that you may not ask any questions about why you have been suspended, or else they will not reply to your appeal.

A few hours later you will invariably receive the following email:

    Hi,

    We have reviewed your appeal and will not be reinstating
    your app. This decision is final and we will not be
    responding to any additional emails regarding this removal.

    If your account is still in good standing and the nature of
    your app allows for republishing you may consider releasing
    a new, policy compliant version of your app to Google Play
    under a new package name. We are unable to comment further
    on the specific policy basis for this removal or provide
    guidance on bringing future versions of your app into policy
    compliance. Instead, please reference the REASON FOR REMOVAL
    in the initial notification email from Google Play.
    Please note that additional violations may result in a
    suspension of your Google Play Developer account.

Sources:

* http://www.bytesinarow.com/2014/04/skyrim-alchemy-advisor-pr...

* http://blog.hutber.com/how-my-google-devlopers-account-got-t...

* http://arduinodroid.blogspot.de/2014/03/arduinodroid-is-temp...

Re:Why Games Should Enter The Public Domain on Monday February 03, 2014 @04:15PM (#7173541)
There's no such thing as "registering a copyright."
Re:Trolling homework questions - sorting on Friday December 27, 2013 @09:35PM (#6973612)
I would't really count time passing as an operation, since other programs are able to run during that time.
Re:Trolling homework questions - sorting on Friday December 27, 2013 @08:37PM (#6973475)
And it even has the best time bound you can get for a comparison based sort. Most OS schedulers would use a heap/priority queue internally for timers, which makes sleep sort O(n log n).
Re:Federal judge rules NSA phone surveillance legal on Friday December 27, 2013 @05:53PM (#6972987)
Thanks.

The ranking algorithm seems to be acting in strange ways. The top submission only shows up on the third page, which explains how I missed it.

Re:GTFO of my menu bar on Sunday December 01, 2013 @07:29AM (#6827026)
Right. And even then, if you open a resource intensive page in Chrome, it will often kill processes that have ongoing notifications.

Older »