Insane Coding
insanecoding.blogspot.com · Personal blog · on HN since 2009
An anonymous programmer writes about C and systems programming topics, including /dev/urandom, LibreSSL porting, OAuth and PATH_MAX.
What HN saysCommenters recommend it as an interesting blog worth reading through, and link its post arguing OAuth is a poor choice for APIs.
30HN people shared it
10linked it in comments
30stories submitted
523story points
4 years agolast shared
2009people per year2026
Most-shared posts
- 1A good idea with bad usage: /dev/urandom4 people · 45 points · first shared 2014 · 14 comments on HN
- 2OAuth – A great way to cripple your API4 people · 9 points · first shared 2013 · discussion on HN
- 3Homepage2 people · first shared 2016
- 4HTTP 308 Incompetence Expected1 people · 234 points · first shared 2014 · 43 comments on HN
- 5Common LibreSSL porting mistakes1 people · 185 points · first shared 2014 · 66 comments on HN
- 6PATH_MAX simply isn't (2007)1 people · 8 points · first shared 2022 · discussion on HN
- 7We got excellent documentation1 people · 6 points · first shared 2009 · 3 comments on HN
- 8A good idea with bad usage: /dev/urandom1 people · 6 points · first shared 2014 · 4 comments on HN
- 9OAuth – Why it doesn't work, and how to Zero-day attack existing services1 people · 4 points · first shared 2016 · discussion on HN
- 10LibReSSL: The good and the bad1 people · 3 points · first shared 2014 · discussion on HN
- 11Is SHA-3 (Keccak) Already Broken?1 people · 3 points · first shared 2019 · discussion on HN
- 12LibreSSL: The good and the bad1 people · 3 points · first shared 2014 · discussion on HN
- 13LibreSSL porting update1 people · 2 points · first shared 2014 · discussion on HN
- 14Dealing with Randomness1 people · 2 points · first shared 2014 · discussion on HN
- 15Suggestions not to make when starting a new programming job (2016)1 people · 2 points · first shared 2019 · discussion on HN
What HN people wrote when they linked it
rasz · 2022-08-02
Ill give you one example. Just yesterday I stumbled on https://insanecoding.blogspot.com . Interesting blog, so I opened all of the individual blog posts (~20 going back to 2007) and will spend the next ~week reading them in my spare time. If I just bookmarked instead I would quickly forgot about it.
Tabs are a live TODO list.
asamarin · 2016-04-25
Some extra suggestions:
- Null Program: http://nullprogram.com/index/
- Insane Coding: http://insanecoding.blogspot.com
- Agner Fog's Blog: http://www.agner.org/optimize/blog
flashman · 2014-10-15
Let's review the many reasons to use something simpler than OAuth: http://insanecoding.blogspot.com/2013/03/oauth-great-way-to-cripple-yo…
slacka · 2013-05-06
For watching movies or listening to music, the Linux audio system is fine, but ALSA and PulseAudio introduce unacceptable latency for game devs. For example the WINE developers are having major issues with PulseAudio's latency[1]
There are actually 2 low level audio stacks that apps can use in Linux, OSS and ALSA.
Only OSS offers great sound and low latency,[2] but the kernel developers have refused to add the free GPL'd OSSv4 updates into the kernel, so we are all stuck with OSSv3 legacy and ALSA's latency and poor design decisions. Using the PA layer only makes the latency situation worse and added another layer for things to go wrong.
[1]http://www.phoronix.com/scan.php?page=news_item&px=MTEyODM
[2]http://insanecoding.blogspot.hk/2009/06/state-of-sound-in-linux-not-so…
teh_klev · 2016-04-05
In the olden days the standard was the "Common File Dialog" [0], I think this existed on both Windows 2000 and XP. The CFD evolved over time.
Then Windows Vista came along and we were introduced to the "Common Item Dialog" [1] which is now the recommended way to File Open/Save.
> Acrobat has a sidebar with large icons of Recent Places, Desktop, Libraries, Computer, and Network.
Possibly your version of Acrobat is either older, or Adobe haven't bothered themselves to get with the present and implement the Common Item Dialog, or if they do they're customising it...or even worse it's a subclassed franken-dialogue. But I feel and appreciate your pain.
These two (fairly old) blog posts discuss the maddening situation with Windows file dialogues:
http://insanecoding.blogspot.co.uk/2007/03/file-dialogs.html
http://insanecoding.blogspot.co.uk/2007/04/file-dialogs-take-2.html
[0]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms646960%28v=…
[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb776913(v=vs…
modeless · 2009-09-14
When ALSA was imported into the mainline kernel, software mixing became possible without servers and they largely died out.
My experience was completely different. A few years ago, ALSA software mixing was not enabled by default and didn't work well when enabled. When not enabled, apps couldn't share the audio device at all. KDE created aRts to allow sharing at the app level, but aRts sucked, plus it hogged the audio device so non-aRts apps wouldn't work at all. Later aRts added a timeout after which it would release the device but this obviously wasn't a good solution. Gnome had ESD which I didn't use but it conflicted with aRts. JACK came along but was only ever used by high-end audio programs.
ALSA finally did get decent software mixing support, but now people are used to running sound servers. PulseAudio is the newest thing but last I heard a lot of people are still unsatisfied with it (e.g. http://jeffreystedfast.blogspot.com/2008/06/pulseaudio-solution-in-sea… ). Furthermore, people who know what they're talking about are recommending a move away from PulseAudio and ALSA and back toward OSS! Personally, I think the case is quite convincing: http://insanecoding.blogspot.com/2009/06/state-of-sound-in-linux-not-s…
To my knowledge, the only filesystem which has poor performance when using fsync() is ext3 in data=ordered mode (which is not the default).
Not according to http://lwn.net/Articles/351422/
beefhash · 2018-03-20
Here's all the ways this can possibly go wrong:
https://insanecoding.blogspot.com/2014/05/a-good-idea-with-bad-usage-d…
userbinator · 2016-06-03
Win32 actually gives you a way of getting lengths most of the time, like this example:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa364934(v=vs…
... but the corresponding POSIX one doesn't:
http://pubs.opengroup.org/onlinepubs/009695399/functions/getcwd.html
http://insanecoding.blogspot.ca/2007/11/pathmax-simply-isnt.html
miles · 2016-04-13
"/dev/urandom and CryptGenRandom which are known to be good"
Check out "A good idea with bad usage: /dev/urandom":
http://insanecoding.blogspot.com/2014/05/a-good-idea-with-bad-usage-de…
Just stumbled onto it in the new submissions queue:
https://news.ycombinator.com/item?id=11485876
AnIdiotOnTheNet · 2022-02-08
A few links gathered from a quick google search as a primer:
http://stevehanov.ca/blog/?id=97
https://www.evanjones.ca/portable-linux-binaries.html
https://insanecoding.blogspot.com/2012/07/creating-portable-linux-bina…
https://rpg.hamsterrepublic.com/ohrrpgce/Portable_GNU-Linux_binaries
https://github.com/wheybags/glibc_version_header
In other words: there are a lot of steps and a lot of gotchyas to doing this that you're glossing over. Linux userland libraries are generally designed with the intention that an army of third-party maintainers will integrate all of this desperately developed software together and place it in a repo. Naturally every distribution wants to do things a little differently too, and they have a habit of changing it up every couple years. When you try to step out of that mold, even just to static link, things unsurprisingly become more difficult. Whereas Windows, Mac, Android, etc. have been designed since the beginning not to require that sort of thing and it is consequently a much, much more straightforward process.
I'm curious why, since you seem to believe the process is so straight-forward, you think it is that so few people distribute a simple binary? Why were Flatpak and AppImage invented?