HNHacker News
TopNewBestAskShowJobs

dsfuoi

91 karma · joined April 14, 2016

submissionscomments
dsfuoi··on Hillary Clinton and Electoral Fraud
Good point, I agree. Until we get computer literate humans, we can't really use computers for such things.
dsfuoi··on Hillary Clinton and Electoral Fraud
If it is already happening, they switching to certificates is better because you don't need a special voting machine, as every internet access point becomes one.

Available in: libraries, coffee places, public wifi, neighbours, friends, mobile phone, etc...

dsfuoi··on Hillary Clinton and Electoral Fraud
Those 1% can visit public issued computers, public wifi, libraries, etc...

Internet is a basic human right in most developed countries, this is a non-issue.

dsfuoi··on Hillary Clinton and Electoral Fraud
Why do we even have to leave the house? Everyone should get a government issued digital certificate, and vote using email.
dsfuoi··on On the (Small) Number of Atoms in the Universe
The surface of the ballon represents a 2d space, where you cannot look "up-down" in the 3rd dimension, just like in our 3d space you cannot look "up-down" in the 4th dimension.
dsfuoi··on SpaceX undercut ULA rocket launch pricing by 40 percent: U.S. Air Force
Errata: The lowest bidder that met the mission/project requirements.

Cheapest != worst, see SpaceX.

dsfuoi··on On the (Small) Number of Atoms in the Universe
Radius of the visible universe is actually 45.7 billion ly.
dsfuoi··on On the (Small) Number of Atoms in the Universe
It could be infinite.
dsfuoi··on Who Was Ramanujan?
So according to your logic, link to this article should be removed and anyone wanting to find it should manage.

I also find it delightfully ironic that you used the term to Google "Sanskrit". and not to WolframAlpha "Sanskrit".

Hypocrisy is oozing out of your comment.

dsfuoi··on GCC 6.1 Released
You can easily implement malloc. I don't understand what relevance with this your paragraph has.

C11 has atomics and all the necessary primitives, fences, locking, etc..., to implement pthread_mutex, including its own mutex.

dsfuoi··on GCC 6.1 Released
By definition made in the C Standard, undefined behavior is: behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements

If you're using some other definition, then say so, otherwise your comments make no sense.

dsfuoi··on GCC 6.1 Released
There are other exceptions. Signed or unsigned or a qualified type may alias the corresponding type. A type that includes the type as a member.
dsfuoi··on The Water in Your Glass Might Be Older Than the Sun
And with every breath you take, you inhale millions of molecules of air that were once inside Hitler (and every other person that was alive sufficiently long ago).
dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
I don't see how that would work. Casting -1 to an unsigned type is independent of representation and will always give the max unsigned value.

C has _Static_assert.

dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
Why? Because programmers learned that it is correct, even though it wasn't.(Or at least it stopped being, in C99 an on.)

Here is a car analogy. It is like learning to drive and thinking that you are allowed to drive over a yellow-turning-to-red light. However the rules say, you should stop if you are physically able to. In reality almost everyone tries to get over than yellow. On a rare occasion they get spotted and pay the fine.

C strives for maximum performance, it will not check things for you if you don't ask it to. Having a library function that performs those checks for everyone, would go against that rule. Why would someone else have to pay the performance penalty for you? Write a wrapper or a macro that performs the check, couple of lines, it is that easy.

If you strive to write portable C code it should work regardless of signed representation. C defines all the range macros for types, and gives you types that guarantee certain ranges. Assuming you use those types and macros, I'm really curious what incantations, that couldn't been solved in a portable manner, require you to know the signed representation.

dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
I strongly agree. There is a serious lack of respect of the C rules even among those who teach and this is passed onto their students. It is really hard to convince them to change ways after that.

A couple months ago, as a curiosity, I watched a few videos in a series on programming in C in Windows environment. The teacher was a serious programmer, but the first thing that went out the window was strict aliasing. After that assumptions of integer sizes and range started creeping in. It came apparent that the teacher knew C, but only superficially, signedness, integer promotions and usual arithmetic conversions were treated like a nuisance. If the code compiled and ran, it was good. Those videos were the first C programming experience for at least several hundred people.

dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
I believe you have been using a definition of Friendly C, as seen here: http://blog.regehr.org/archives/1180.

I wasn't aware of that and my idea of it is different.

Aliasing rules help the compiler decide what values have to be reloaded. The stricter those rules less chance there is for pointers to alias the same memory.

dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
Performance of real code, not micro-benchmarks, won't change.

And this can work both ways. Friendly C would almost certainly forbid non-compatible type pointer castings, which would actually enable additional optimizations.

dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
C is designed to be capable of running of vastly different architectures, allowing the programmer to use that flexibility when it actually isn't needed, or is harmful.

I think the C coding mindset should be this: if an approach requires code that isn't unambiguously defined, change the approach. If this means more boring coding, to circumvent cute tricks, so be it. If you need that extra 5% speed, use assembly instead of bending C.

dsfuoi··on “Fiercely resist any further broadening of the scope of the C UB problem”
Can you elaborate? Hopefully they don't have straight UB do they?
dsfuoi··on Every shot Kobe Bryant ever took
How is this recorded; and so accurately?
← PreviousPage 2 of 2