Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
properparity
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
properparity
3y ago
Yep, that's how the world works. Politicians only starts caring about peoples problems if they are either personally effected or one of their close friends/benefactors are effected.
2.
▲
by
properparity
3y ago
Vector* vector_create(size_t itemSize) { Vector* vec = (Vector*)malloc(sizeof(Vector)); // ... return vec; } This just immediately strike me as poor code. C is not java, you do not have to "new" up
3.
▲
by
properparity
3y ago
A capacitor is a few extra cents on the bom which is a no go for profit maximizing companies.
4.
▲
by
properparity
3y ago
What exactly is it that costs so much money when it comes to space stuff? Is the materials, exotic and rare stuff? Do you need custom microchips/fabs or something? Is it the engineer salaries, thousands of highly paid people times N ye
5.
▲
by
properparity
3y ago
If an AI is ever capable of replacing a human programmer it would also be capable of replacing a manager and running its own company. So why would you even be in a position to hire anyone? In fact why are you working at all? The robots are
6.
▲
by
properparity
4y ago
My findings as a spartan C programmer: I've been using a simple unity-build ad-hoc build.bat/build.sh "system" for years now, works wonders. YAGNI will serve you well, 99.99999(repeating)% of everyone's code will on
7.
▲
by
properparity
4y ago
>This would prevent integer operation reordering as an optimization, leading to slower code. The sane way to address that is to add explicit opt-in annotations like 'restrict'. #push_optimize(assume_no_integer_overflow) i
8.
▲
by
properparity
4y ago
But why put in unreachable? Doesn't make any sense to me. If a branch is truly not supposed to ever happen, why have a branch at all? Just remove that code from the source entirely- that helps the optimizer even more, because the most
9.
▲
by
properparity
4y ago
That is something a decent type system should solve - make it impossible to pass 'incomplete values' on, so any state further on which depends on the error handled/not handled will expect the appropriate type and compiler wil
10.
▲
by
properparity
4y ago
How? By making text flow to 100% of the width you can easily resize the browser window for everyone's perfect reading width. I usually run my browser tiled to 50% of the screen, the new design wastes a lot of space at that size (you ha
11.
▲
by
properparity
4y ago
Yes like errno, except not global of course, you add one per struct/context/module/thread/whatever. And you design the functions to early return if the error state is set. >how do you know which call introduced the er
12.
▲
by
properparity
4y ago
You don't have to code like that in Go, C or other languages without exceptions or fancy option-type sugar. A sensible thing that often works great is to have a sticky error state (either a single int, or list of stuff you append to) t
13.
▲
by
properparity
4y ago
Why would I ever care if something is a struct or not a struct? Just that is almost zero useful information. I do care about the size of a struct sometimes, but that would require me to go to the definition of the struct, so just seeing the
14.
▲
by
properparity
4y ago
>even BIGGER no. This is completely misunderstanding what a typedef is and what it should be used for. Hard disagree. Life safer when dealing with things like SI unit types. I used to use lots of suffixes - _km, _m, _seconds, _hours, but
15.
▲
by
properparity
4y ago
Mass starvation and mass migration due to climate change will most likely result in WW3.
16.
▲
by
properparity
4y ago
Also been thinking this. What I want from a text editor is: - Like you said, running tasks with a button/keybind, easily customizable (Like I wanna open a config file, add a function/script, bind to key/create UI button, done
17.
▲
by
properparity
4y ago
We need to let it completely loose and get everyone exposed to it everywhere so that maybe we can finally get rid of this insane taboo and uptightness about sex and nudity we have in society.
18.
▲
by
properparity
4y ago
There's several GB/s of bandwidth from disk to screen these days, so unless you're processing several GB of data you have no excuse for anything in your programs to take more than a second. It's an insult really, such i
19.
▲
by
properparity
4y ago
Why limit yourself to crusty text when you can have live visualizations of data structures in various formats, graph dx/dy over time of some variable, stop and inspect data on some condition without having to modify code, quickly start
20.
▲
by
properparity
4y ago
How is w=add(u, v) more explicit than w=u+v? Because operators "should not be function calls"? That would make zig unusable on soft float/soft div architectures, or would have to get rid of / for division and operators f
21.
▲
by
properparity
4y ago
> incremental builds I've found that to not matter that much these days - unless your projects is hundreds of thousands (or maybe millions even) of LOC, full builds are instant on modern machines.
22.
▲
by
properparity
4y ago
If you open up the image in a new tab to see the full resolution and look at fine details it's very easy to spot AI ones - AI seems to especially struggle on reflective details, it obviously doesn't know it's meant to be a re
23.
▲
by
properparity
4y ago
Not necessarily divisible, but requires power of 2 bufsize with this code (but you probably want that anyway to avoid division). With non-power-2 bufsize you need some extra logic for write/readix++, but the rest of the code can stay t
24.
▲
by
properparity
4y ago
Meh, I find C syntax a total non-problem. Don't think I've ever constructed a more complicated type ('directly' so to speak, i.e without typedefs) than an array of function pointers (array of interrupt handlers, taking n
25.
▲
by
properparity
5y ago
>For comparison, Microchip (formerly atmel) SAMD21 (also Cortex-M0+, of Arduino Zero fame) is about 3-4 $, single core, less RAM. But it has built in flash. Sure, external flash is still cheaper* (512K for ~$0.2) but it's a major do
26.
▲
by
properparity
5y ago
It's not worse, but then seizing a billionaires boat is also not a huge grievance in the grand scheme of things, so it's not really a thorny ethical problem. I'm OK living in a world where elites might have higher risks of ha
27.
▲
by
properparity
5y ago
I guess people have forgotten the lessons of 90s Windows: Don't download and run random .exe from the internet, assume they are hostile until proven otherwise. Don't download, install and run random code libraries from the interne
28.
▲
by
properparity
5y ago
C++ shouldn't be a problem? Just add a new namespace: std::move_fast_and_break_things::vector Or maybe the other way around so you can keep using std::vector: move_fast_and_break_things::std::vector Then you can add a 'using names
29.
▲
by
properparity
5y ago
Oh jesus, the model code is in rust? I was assuming a dsl with kernel in rust.
30.
▲
by
properparity
5y ago
Standard C is not suitable for writing kernels anymore due to all the ridiculous hostile interpretions of the standard (mainly typed based aliasing rules). I mean you can't even write an allocator in standard C.
More ›