Those things don't seem to be working.
And it isn't a future armed standoff that I am warning about. It is a future where any protest is impossible.
5,314 karma · joined February 16, 2015
Blog: https://gavinhoward.com/
Contact: https://gavinhoward.com/contact/
Those things don't seem to be working.
And it isn't a future armed standoff that I am warning about. It is a future where any protest is impossible.
I am talking to both. Programmers should set the rules and impose them on their empoyers or the "tech industrialists" won't accept them.
Rules from above and rules by us should be in different galaxies as far as how well they work.
[1]: https://git.yzena.com/Yzena/Yc/src/branch/master/src/yao/exa...
Yao is already fully designed. And while I haven't updated its example file [1] to include everything, it would only be a max of two or three times bigger.
This includes generics, an equivalent to Zig comptime, something like traits but more powerful, a solution to the expression problem, etc.
The solution is structured concurrency.
The only reason I am not working more on Yao is because I worked on it for three years at full tilt (because I constantly refactor to eliminate tech debt), and I am burned out.
But adding a new feature takes only about two hours max; I just add a new client-defined keyword.
[1]: https://git.yzena.com/Yzena/Yc/src/branch/master/src/yao/exa...
And the rantiness comes as a side effect of that.
Fixed, Thank you!
Mine too, but my post implied it, and it was already too ranty.
Good minds think alike, I guess.
But as a sibling comment says, this is essentially what io_uring is. Read Lord of the io_uring [1] if you want to know more. Polling mode is the key.
> I feel like you are among what is probably a very small group of people who could write something security-sensitive in C, and I would feel comfortable using it.
This is probably the most complimentary thing anyone has ever said to me. Thank you! I hope I can live up to that.
Yes, you should only use them on POSIX.
My utility does build natively on Windows, though.
And a lot of magic, with special variables, macros, and functions that you must know. And unclear scoping.
[1]: https://gavinhoward.com/2023/02/why-i-use-c-when-i-believe-i...
I am partial to hand-coded recursive descent purely because I struggled with Lex and Yacc too much when I tried.
POSIX utilities are not great. Lex and Yacc included.
Yes, and so should every person that works for them.
I used to have only one blog. Now I have a tech/professional blog and a personal one.
(I literally copied the repo and removed posts from each copy.)
Before I split them, I would get a ton of personal attacks here on HN and on Reddit because people would go to other posts on the blog, find some personal issue, real or imagined, that they didn't like. Once I split, people focused on the tech stuff.
I don't know for sure, but it got so bad that I suspect dang considered downranking posts from my domain. I think he even considered banning me. (I had thinner skin back then.)
I still wish that there would be no liability until money changes hands between the parties.
According to your link, liability still may exist if the FOSS project is a "commercial beneficiary." Does this mean that there could be liability even if the third party doesn't pay for it, just because others do?
https://gavinhoward.com/2023/02/make-the-leap-second-first-c...
https://gavinhoward.com/2023/12/is-source-available-really-t...
GUIs are a lot of work. People should be more willing to pay for work like that. Wanting everything free is one reason Big Tech has so much control.
[1]: https://gavinhoward.com/2024/05/a-new-architecture-for-a-gui...
Both of those should use unsigned integers, and they are limited by the size of the machine, so no, they don't need a mathematical model of integers. A good machine will have a size_t size that can hold any size of object, and by extension, any number of elements of any size, including char.
So for counting things and loop indices, size_t should be used, not any signed types.
In my code, I essentially use just size_t and unsigned char (because the standard did not specify the signedness of char up to at least C11). If I use something else, I am checking bounds.
> Most people could not calculate with higher number in their head, are you saying their mental model of integers is a small integer model different from mathematical model?
Are you seriously trying to accuse me of this? I am the one saying that hardware integers are not a sufficient abstraction for mathematical integers, yet you say that I assume that people have a small integer mental model?
No, I am not. I am the one telling you that using hardware integers in place of big ints is not good.
> Models for true mathematical integers do not exist in the physical world, so that "int" isn't one, is meaningless pedantry.
True, every abstraction is leaky, but big integers and rationals can get so large that it doesn't matter.
And yes, big ints are a leaky abstraction, but they leak so much less than hardware integers because they don't wrap and because they are not subject to 00UB when unsigned types are used.
00UB does need fixing, and C needs less UB. If you don't think so anymore, then C will become untenable for me to use.
> I understand C way better than i used to.
Maybe, but I did not see it in that video.
What I do know is that you do not know much about the humans using C or the environments where C is used. C is a tool for humans, not machines. Prioritizing machines over humans will make C worse over time, and implementors will use that to further excuse their behavior.
Nothing on you, but in my mind, this is a sign of just how brain dead and unprofessional our industry is.
Using hardware integers as mathematical integers is like using aluminum instead of titanium for a high-stress part in a fighter aircraft. Sure, it does just fine in normal flight; what's the big deal?
And then the pilot needs to pull a 10-g maneuver, putting 10 times the stress on that part. And then the pilot dies because the aircraft breaks apart in midair.
If you need mathematical integers, use GMP. Or implement your own. It isn't hard. I implemented rationals using 32 bytes and no allocations when integers are no bigger than hardware integers.
Adding all of that with this:
> You realize that I am part of the standard's committee? ;-)
makes me geuinely fear for the direction of C.
I think I may need to write boringcc to rescue C from itself. https://groups.google.com/forum/m/#!msg/boring-crypto/48qa1k...