HNHacker News
TopNewBestAskShowJobs

asgfoi

44 karma · joined February 1, 2016

submissionscomments
asgfoi··on How undefined signed overflow enables optimizations in GCC
As mentioned by maintainers in the thread there is already a flag to catch unsigned overflows

Too bad such a flag doesn't exist.

asgfoi··on The man who made 'the worst video game in history'
You seem to be unaware of Ludum dare and similar challenges where (literally) thousands of games are created over the weekend that could easily compete with games made in the 80's.

Skill is still here, it is just muted by the modern media. Back then a any game release was huge news, today such games are made all the time every day and don't even get noticed.

asgfoi··on How undefined signed overflow enables optimizations in GCC
Nice example.

More people should know that the second if statement is unreachable code.

asgfoi··on How undefined signed overflow enables optimizations in GCC
As mentioned by maintainers in the thread there is already a flag to catch unsigned overflows. They even mentioned a way to catch those overflows in the code.

I can't seem to find that flag. Only ftrapv for signed, but none for unsigned. Do you know what flag is it exactly?

asgfoi··on Mobile phones are 'cooking' men's sperm
Correlation without causation?

What if people that don't keep the phone in their pants life a different lifestyle that is different enough to cause the observed discrepancy.

asgfoi··on Why the Future of Work Is at Home
That place should be relaxing and should feel like home, because it is. Keeping different levels of authority separated in different houses would be mandatory. Additionally workers living in the same house shouldn't be working on the same project[0] , even if that sounds counter-intuitive. The reason is that it diminishes possible conflicts, because in the case of unsolved argument, there is nowhere you can go, and humans can't always solve them.

[0]: but should certainly work in the same field.

asgfoi··on San Bernardino County tweets it reset attacker iCloud password at FBI's request
Slightly off topic, but it really isn't hard to find partitions. Just run the various software to scan and that's it. I've done it at least twice when accidentally erasing a windows partition (once with fdisk when I misread the output, and at that time I didn't even know what a partition is).
asgfoi··on Apple Letter on iPhone Security Draws Muted Tech Industry Response
Yes I agree. I can't be a coincidence. They deliberately picked the best weapon in this debate, biased public opinion.
asgfoi··on Apple Letter on iPhone Security Draws Muted Tech Industry Response
Do you think they choose to ask Apple to do this in such a public way, because they are very confident the phone will contain information that will help with the investigation, which will make a positive precedent about this method for future requests, and also provide 'lobbying power' when new laws will be considered?
asgfoi··on SF tech bro: ‘I shouldn’t have to see the pain, struggle, despair of homeless’
Don't touch the Rolex.
asgfoi··on Starbucks has 3x the sugar of a whole Coke in some drinks
How sad it is that the can of coke is used as a comparison. It almost makes it look like a reasonable drink.

The World Health Organization has recently suggested cutting the recommended sugar intake for adults in half, to about 25 grams, around 6 teaspoons, of sugar for a normal weight adult a day.

Here is my favorite site that shows the amounts of sugar cubes in various unhealthy food: http://www.sugarstacks.com/

According to that information you can drink a half can of coke (most left one in the picture in the link) to satisfy that daily need. That implies that all other food you eat that day will not include any sugar! That is an impossible standard to reach. Solution, don't drink drinks with sugar.

asgfoi··on A Message to Our Customers
If facebook doesn't want to delete his account, why don't you unfriend him?
asgfoi··on Building a Startup in 45 Minutes per Day While Deployed in Iraq
For the former it really depends on your position. If on foot and on a monotonous route, then maybe if you can handle thinking in 5 minute bursts, anything else, not a chance.

You'd be surprised how much of a workload just sorting and text recognition is.

asgfoi··on Wrong optimization with aliasing
Uh, thanks for pointing that out. I'm familiar with allocated memory and effective type, but I never considered it from this perspective.

This could be quite a nasty surprise when the only change in the code is storage duration.

asgfoi··on Wrong optimization with aliasing
I was also under the impression that the One True Way to type pun was to cast to char, which is allowed to alias, and then cast again to the type you actually want.*

That clearly doesn't work, but I can see from a naive perspective why some think that. It feels like a nice hack, but a cast to char* doesn't "remove" the original type.

To be clear: char* can alias any type, but only char* can alias char*.

asgfoi··on The radical plan to destroy time zones
The problem they are addressing is already solved. Simply say at time X Y, where X is the time and Y is the offset, preferably an established offset.

We meet at 12:00 GMT

Done

Everyone only needs to remember one number, their local offset to GMT. If someone uses an, to the receiver, unknown offset, then look it up and do some first grade math.

asgfoi··on Astrophysicists do a 3-day long AMA about the discovery of gravitational waves
Assuming no accretion disks, there wouldn't be any em radiation as far as I know. Where would it come from?
asgfoi··on My Little Sister Taught Me How to “Snapchat Like the Teens”
It felt nice when you had to physically meet a person to exchange the latest meme. The physical vicinity adds so much quality to the social experience. I cannot talk to friends the same way over char or even the phone than in person, it just feels weird.
asgfoi··on The Sad State of C Strings
I don't think they are insane. It is safe if you follow some rules. Flag -Wformat=2 catches every mistake at compile time. (It wont guard against overflow of course, but this is C)

The last example is explicitly defined in the Standard.

asgfoi··on The Sad State of C Strings
Isn't a modern strlen optimized into vector operations if possible anyway?
asgfoi··on The Sad State of C Strings
That's nothing, you should see the sad sad state of strings in assembly... Oh you're supposed to manage them yourself? Huh, what a concept.

Seriously though, a C programmer should know the downsides of C strings, and act accordingly, i.e. use a library if necessary.

asgfoi··on Olbers’ Paradox: Why Is the Sky Dark at Night? (2000)
The space is expanding and its expansion rate is accelerating. Dark energy is not pushing objects apart, it is causing the acceleration of expansion of space.

What you said isn't even pop science, it is blatantly wrong.

https://en.wikipedia.org/wiki/Metric_expansion_of_space

https://en.wikipedia.org/wiki/Dark_energy

And the money quote:

It is called "dark" because it is not interacting with normal matter, but only with the space time structure.

from http://physics.stackexchange.com/a/206217

asgfoi··on Olbers’ Paradox: Why Is the Sky Dark at Night? (2000)
The galaxy isn't traveling faster than c away from us, but space is being created in between. So, nothing is actually accelerating, there is no problem, Einstein is still right.

In fact, space is being created everywhere, including yourself and the computer screen. However the amount is so small that you don't notice and local forces nullify the change anyway. With large distances, this amount accumulates, and overwhelms the force of gravity and starts to create the apparent acceleration of distant galaxies away from us. Further explanation from paulddraper: https://news.ycombinator.com/item?id=11068125

asgfoi··on How Wired Is Going to Handle Ad Blocking
Methods of both parties will evolve, but ultimately as long as the user has control over his computer(no hardware DRM), he can display whatever he wants.
asgfoi··on How Wired Is Going to Handle Ad Blocking
Here goes another one:

  echo 127.0.0.1 www.wired.com >> hosts
asgfoi··on Oculus Connect 2: Live Coding Session with John Carmack [video]
Watching the video is tech:

John Carmack(from the video): This is in now way replacement for highly sophisticated apps... ...you should clearly be using Unity or Unreal, you should be using a real game engine. If you have to do a lot of interaction with Java or native code, you should be writing a native application.

asgfoi··on Results of the 2015 Underhanded C Contest
I tried to compile it, and I also couldn't find any other flag, than -Wconversion, that would detect this:

  for(i = 0; i < length; i++) sum += a[i] * b[i];
                                     ^
I managed to hide the error if return values, which are double, are replaced with float_t. I believe in that case the bug stays in, but -Wconversion doesn't detect it.

Of course the warning can always be silenced by doing something like:

  for(i = 0; i < length; i++) sum += ( double )( a[i] * b[i] );
and adding a misleading comment about the explicit cast.
asgfoi··on Results of the 2015 Underhanded C Contest
I wonder how many of them would be caught using a very strict compiler flag regime.

For the winner, perhaps the gcc flag, -Wmissing-prototypes would catch it?

asgfoi··on Small, Freestanding Windows Executables
Can you provide the source? I would also like to check.