HNHacker News
TopNewBestAskShowJobs

outsomnia

687 karma · joined October 4, 2018

submissionscomments
outsomnia··on C and returning values quickly or safely, but not both
Guy seems a bit new to C.

pointers-to-structs ARE pointers-to-objects. That's the default way to operate on objects in a huge amount of code.

Don't use strncpy(), if it hits the limit it doesn't end the copy with NUL, causing random crashes.

Quite a few people have concluded that generally, despite the standard library using them, NUL-terminated C string were not the Right Way and it's better to have a struct with the pointer and a size_t length (and perhaps a size_t representing the possibly larger allocated length). This eliminates NUL handling, and strlen() as well and since everything can cheaply know the length, can be the basis of more secure code.

outsomnia··on Isn't It Obvious That C Programmers Wrote Git?
Guy brought up on gui hates shell, blames whatever is to hand when he feels bad about it.
outsomnia··on Ask HN: Doing everything myself, where would be the biggest pain points?
You'll lose the most time on the rough edges of each thing, the one or two minor things you didn't get around to solving on each effectively stack as the pieces are expected to work together. It's like multiplying probabilities, even though each is 95 - 98 % done, the whole is like 40% done when there are many pieces like this.

This has a terrible effect on morale since it presents as insurmountable.

outsomnia··on It's not microservice or monolith; it's cognitive load
This whole business has had few conceptual ideas that stand apart from fashion and stood the tests of time. A lot of people look down on C now for various reasons, but it's still extremely useful and going strong 50+ years later. Even though I'm older than C itself in the last year or two using it intensively, I found new insights in how to arrange things and what to avoid to make things more robust and maintainable.

It's not likely that hundreds of "microrepos" on github and even rails are The Last Word that people will eventually converge on and be using into the 2100s. It sounds like each repo is its own standalone thing with its own deps. There are advantages and disadvantages to maintaining this kind of thing, some of the disadvantages will only become clear as the deps evolve and mutate. Although you may feel you are in a local optimum with this architecture in 2023, ahead of the game, energized by your belief in it, you probably are not finished evolving your understanding even on the scale of one or five years.

One way or another almost everything in this business is ephemeral, disposable and will be disposed of in favour of something else.

outsomnia··on Thanks to Don Bateman, airplanes don't crash into mountains anymore (2016)
Well they might not *accidentally* crash into mountains

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

outsomnia··on MIT's trillion-frames-per-second camera can capture light as it travels
> This article originally appeared on 09.08.17
outsomnia··on China dumps $21B of US stock and Treasury bonds
From Oct 19th 2023... sky did not seem to fall in the last month.
outsomnia··on We have reached an agreement in principle for Sam to return to OpenAI as CEO
> Almost all employees resigned in protest.

That never happened, right?

outsomnia··on Lessons learned by a software guy venturing into hardware
Spend the extra to gold flash your edge connectors unless you want a painful chemistry lesson.
outsomnia··on Gender-Affirming Care Is Dangerous - I Know Because I Helped Pioneer It
I use NoScript, if you browse the linked page with JS disabled by default, it says "May 19, 2021" at the end.

If you allow JS for "thefp.com", it is indeed updated to today's date.

outsomnia··on Gender-Affirming Care Is Dangerous - I Know Because I Helped Pioneer It
At the bottom of the article, it says

May 19, 2021

> why would you lie

Yeah that should perhaps suggest to you that the person you are addressing is not "lying".

outsomnia··on Gender-Affirming Care Is Dangerous - I Know Because I Helped Pioneer It
From 2021
outsomnia··on Linux Foundation Report Finds Serious Issues with WebAssembly
This medium post seems incomplete, half of it is how serious the denunciation is but the only point given is that it's supposed to be slow.

It's not that slow since you can run quake with it https://quake.m-h.org.uk/ ...

outsomnia··on Ask HN: 20% of LinkedIn's recent layoffs were managers
That may be related to the fact they are not paid their weight in gold.
outsomnia··on Rank–Raglan Mythotype
> 5. Hero surrendered to the water in a box > Freudian

...

outsomnia··on My personal C coding style as of late 2023
You're right, I also mark array definitions as const to control the section they go in, I was thinking about things like const int a = 5; ... anything I want a simple const var for is done with #define for me.

const is indeed viral when eg, used in apis, but it's a strong indication at a glance for api users what they can expect to happen to the memory the pointer points to, whether it's just for input or is modified... and the virality is only a pain (it can be a pain) if you didn't use it from the start so all the things it might call are already kitted out with it.

outsomnia··on My personal C coding style as of late 2023
It wasn't clear to me if he's talking about const as a variable declaration qualifier - I never used it - or const in pointer types, which is very useful.
outsomnia··on My personal C coding style as of late 2023
In isolation, they're not crazy.

But much C code is bringing in library headers which contain their author's own pet choices for these, which inevitably are not the same and the result is extremely confusing when you have that in play as well as the stdint.h ones.

The kernel contains a mixture of "pet" types like u32 and stdint ones, it's already confusing.

He also does make a "crazy" choice later to call his string class "s8" which clashes with his nomenclature here.

outsomnia··on CinePI: Open-Source Cinema Camera Using Raspberry Pi
No example media taken with it?
outsomnia··on Did you Remember Vanessa West Tripod website
AI generated snuff porn...
outsomnia··on Time for the UK to Tax Inflation
That sounded like a great idea at first. But the proposal is actually taxing higher wages:

> The government might also consider a measure that would directly operate to bring inflation expectations down without necessitating a rise in unemployment. This would be a tax on inflation. For example, they might announce a baseline reference level of the growth of average hourly earnings over the next year of 3 per cent. They could then implement a tax whereby each firm who grants a wage increase above 3 per cent would be required to pay a 100 per cent tax on the excess.

No... that's not the problem. Demands for higher wages are a downstream effect of windfall profits. The excessive profits should be taxed to hell.

outsomnia··on I watched society collapse at Stansted Airport
Middle-aged guy complains people don't seem to care about him and everything is going to the dogs.
outsomnia··on Charging capacitors from thermal fluctuations using diodes
There's an article with much better background on the whole thing and how they're trying to commercialize it

https://scitechdaily.com/long-considered-impossible-in-physi...

outsomnia··on Charging capacitors from thermal fluctuations using diodes
... I was going to write it off as someone just diddling themselves with simulating ideal components

> Of course, real diodes leak in the low conducting region, and the system will eventually relax to thermal equilibrium.

... but at the end they have Appendix F with an "experiment" on a "TSMC chip" showing an impulse to 300mV.

outsomnia··on Finish your projects
Good job you're there to lift the tone!
outsomnia··on Finish your projects
"Finish your projects", finger wags cheerful guy full of certainties, paid by large American corporation that makes money from your finished projects and doesn't care what happens to you before, during or afterwards.
outsomnia··on Digital Audio Workstation Front End Development Struggles
I am suggesting confirming if it is actually "slow" for the "key aspects".

You and the OP are just assuming it can't do whatever it is at "30fps"... if you're right, it will only take ten minutes if it's so bad, or an hour or two if it's subtle, to actually confirm whatever the worst thing is.

The "extra frame" I was thinking of is graphics pipeline latency, not redraw time.

outsomnia··on Digital Audio Workstation Front End Development Struggles
Yeah. The OP should spend a day or two making HTML5 prototypes for the key aspects and see if it's really true that it's "slow".

The UI is not the hot code, it's the audio mixing. So long as the audio mising is faultless, it doesn't matter too much if it takes an extra video frame to update the dB display.

Because there are thousands of people working to maintain the code in the browser stack every day that are on his side then.

outsomnia··on PC Engines EOL
I used these for home router + wifi until last week... they were pretty good, low power and low heat / fanless, relatively normal x86 with a BIOS tailored for embedded. I can see they're a bit niche both themselves, and using a niche cpu for the vendor and arm64 wants to eat their lunch. But it was good while it lasted.

I coincidentally replaced mine just before this with 2.5G arm64 based board, also fanless.

outsomnia··on The Free Software Foundation is dying
That way of interacting with the Internet wouldn't be that strange at the very beginning... it probably seems like integrating things into emacs from his point of view.

I use noscript and uBlock... my wife thinks about that the same as you think about RMS' 12ft pole browsing. However she is just perfectly fine with Linux as her OS for 20 years now. How Linux came about IS bound up with - is thanks to - RMS and his particular place in the autistic spectrum. If he wants to use email as a frontend to the web instead of wget what's really the problem when his other activities have led to net wins that have affected everyone positively? Can you really sum both things up fairly with one word, "Lunatic", because it's not how you'd browse the web?

← PreviousPage 2 of 11Next →