Recent submissions

Comment · 1 year ago
Comment · 1 year ago
This reminds me of Asimov's Jokester story where the same themes are explored - there is an all-knowing computer but someone needs to ask the correct questions.

"Early in the history of Multivac, it had become apparent that the bottleneck was the questioning procedure. Multivac could answer the problem of humanity, all the problems, if it were asked meaningful questions. But as knowledge accumulated at an ever-faster rate, it became ever more difficult to locate those meaningful questions. Reason alone wouldn't do. What was needed was a rare type of intuition; the same faculty of mind (only much more intensified) that made a grand master at chess. A mind was needed of the sort that could see through the quadrillions of chess patterns to find the one best move, and do it in a matter of minutes."

Comment · 1 year ago
This fallacy also assumes that free will exists (it does not) and you could have made different choices (you couldn't have). Accepting that your choices are not free and are influenced by multiple factors (such as your current state, your knowledge at the time, your emotions, your past, upbringing, genetics even, the people you interact with) makes you realize that regret is meaningless.
Comment · 1 year ago
The bug in question was a out of bounds writing to a stack allocated buffer. The compiler would choose to store some variables to registers for optimization purposes. When calling a function - these registers' contents would get pushed to the stack. The faulty called function would modify those same register contents on the stack. When returning to the parent function and restoring the context - the registers would have faulty values.

When adding a print or a check - the compiler would choose different variables to store in the registers. They would still get overwritten by the faulty function but the bug would not be observed.

I agree that it's almost never the compiler's fault though - but sometimes its optimization choices make it harder to reproduce a bug.

Edit: The faulty function was a somewhat standard function, part of the SDK. This taught me that the standard functions are almost never faulty. Until they are :-)

Comment · 1 year ago
Those are the kind of bugs one remembers for life.
Comment · 1 year ago
And then there are those rare cases where inserting a print or a new condition to use for conditional breakpoint forces the compiler to output slightly different code which does not produce the bug. Essentially this is similar to the Observer effect in quantum mechanics where the system is disturbed simply by observing it. Also the bug cannot be reproduced with optimizations disabled.

How are those cases debugged then? By enabling the debug symbols AND the optimizations and using the debugger, looking at the code and the disassembly side by side and trying to keep your sanity as the steps hop back and forth through the code. Telling yourself that the bug is real and it just cannot be reproduced easily because it depends on multiple factors + hardware states. Ah! I sometimes miss those kinds of bugs which make you question your reality.

Comment · 2 years ago
This sketch is a gem, I liked it! It is absolutely correct - people can and will divide if this is their goal. Sadly this mass social disintegration on all levels affects negatively various free software products. I don't even hold any extreme political beliefs (I think) but nevertheless I avoid discussing any politics in any professional environment because it's just not the place for these types of discussions and it usually doesn't lead to anything constructive or positive. I never cared what my peers' political/religious beliefs were and through the years never had problems with any of them. It was a simple life - as long as all of us did our job the final products were of decent quality.

Perhaps some kind of a policy which would treat politics as off-topic and would discourage discussing it would be beneficial to such projects in the long run.

Comment · 2 years ago
Comment · 2 years ago
In my opinion politics should stay out of software but sadly it gets harder and harder every day. In any case - banning people (some of them contributors and developers) from all platforms only because they suggested that Godot should "focus on software instead of politics" is terrible and harms the project and its community. And all of this started because of a woke tweet which had nothing to do with Godot engine whatsoever. We are living in interesting times. I hope Godot does not follow all the other companies who walked the "go woke go broke" route.
Comment · 2 years ago
Good article, also has references to the glib's source. I've never dived deep into the random() system function before. This is from the man pages:

"The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose."

Perhaps the notes should be updated to state that the performance of multi-threaded programs is also affected due to the shared global resource?

Comment · 3 years ago
RC Cars
Comment · 4 years ago
>In terms of capability, I speculate that the best an attacker can achieve is a sticky, privileged process that accepts arbitrary commands at runtime, which can be used to read the disk, analyze other running processes, install and exfil sensor data, etc.

The worst-case scenario would be if the attacker somehow manages to rewrite your motherboard and/or SSD's firmware with a malicious firmware. And even if you reinstall your OS - he still manages to re-install the rootkit afterwards. I've only read about such type of malware but never have I seen or heard of anything like that in the wild.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton