HNHacker News
TopNewBestAskShowJobs

nitrix

263 karma · joined April 17, 2013

https://nitrix.me

[ my public key: https://keybase.io/nitrix; my proof: https://keybase.io/nitrix/sigs/5UQz9eiKAm7nDhGEjIFIqqI6nk81Ab5tFd-DTrPZY8A ]

submissionscomments
nitrix··on Go 1.27 Interactive Tour
Error handling is as important as the happy path of an application. It’s not something you sweep under the rug.

The err != nil quickly turns into metrics, logs, fallback strategies, retry mechanisms, flight recording, rate limiting, updating caches, so on.

Anyone who’s trying to shorten this hasn’t maintained any actual real software.

nitrix··on The C ``Clockwise/Spiral Rule''
Some more examples:

  int v, *w, x[5], *y[5], (*z[5])(int, int);
Where v is an int, w is a pointer, x is an array, y is an array of pointers, z is an array of function pointers, etc.

Similarly, typedef is also just a keyword in front of a regular declaration.

  int foo[5];
  typedef int foo[5];

  int bar(void);
  typedef int bar(void);
Now you can use `bar *` as a function pointer.

The entire language works like this.

nitrix··on Claude Played Me for a Fool
I think it’s similar to telling children to look both ways before crossing the street. If you don’t explain why, they won’t see the point and optimize by not doing it. Instead, if you emphasize it’s for safety to avoid mistakes, that’s something Claude is trained to highly value and more likely to abide by.
nitrix··on Canada’s Bill C-22 Is a Repackaged Version of Last Year’s Surveillance Nightmare
I'm doubtful the venn diagram intersection of engineers and the world cup is as big as you think it is.
nitrix··on The Concatative Language XY
I’m the Alex mentioned in the acknowledgments, feel free to ask your questions.
nitrix··on Show HN: Cdecl-dump - represent C declarations visually
Yes, the () operator dereference function pointers automatically for you for convenience. There's also the surprise that you can infinitely dereference function pointers as they just yield you more function pointers.
nitrix··on Show HN: Cdecl-dump - represent C declarations visually
That is correct.

  int x, *p, arr[5], fn(), (*pfn)();
Using x, or dereferencing p, or subscripting the array arr, or declaring a function that can be called with fn, or dereferencing the function pointer pfn then calling it, all these things would produce an int.

It's the intended way to read/write declarations/expressions. As a consequence, asterisks ends up placed near the identifiers. The confused ones will think it's a stylistic choice and won't understand any of this.

nitrix··on TikTok removing posts for violating the "joy of TikTok"
They're important conversations but people don't want to engage in them every second of their living lives. The point of entertainment is to be able to compartementalize and regulate.

If they do what you suggest, all the creativity that makes the platform attractive is going to flock to somewhere else.

nitrix··on TikTok removing posts for violating the "joy of TikTok"
Or people are just trying to not be reminded every second of their living lives that there's one conflict or another going on. TikTok is made in China and used worldwide. Not many things are relatable and relevant to a world wide audience.
nitrix··on TikTok removing posts for violating the "joy of TikTok"
That's fine. Not every platform has to work the same way and attract the same communities.
nitrix··on I was surprised by how simple an allocator is
> "The C standard library provides malloc/free/resize"

It does not provide a `resize`. You're thinking of `realloc` on hosted environments.

nitrix··on 'Unstoppable force' of solar power propels world to 40% clean electricity
Okay, but put the panels on rooftops, not over that nice greenery.
nitrix··on YouTube Premium Showing Ads
That's a way to either get me to cancel my paying subscription or opt-out of all form of ad personalization out of frustration. I respect the hussle and am paying you; respect my user experience.
nitrix··on Ask HN: How do I stop being obsessed with software architecture?
Delaying critical decisions in a project is crucial to making good decisions. They'll be made both by someone more informed (after learning all the complicated corner cases of the problem domain) and by a better developer (perhaps a future version of yourself).

Therefore, my advice is to pretend you're a junior developer and do things the most naive way possible. Allow things to stink, to repeat code and to support just what's needed, as if this was the absolute final complete state of the application. This may lead to eventual refactors and this is healthy as the focus will be on correcting existing problems instead of foreseen ones.

This is when you allow your senior knowledge and experience to do what's necessary to return to a state that's comfortable for a junior. It's counterintuitive, but at the scale of a large codebase, the occasional refactors ouweights the time wasted doing preventing design at ever layer. I actually have a similar stance about defensive programming and testing.

Since this might not be enough to appease your brain, keep in mind that abstractions are generalizations trying to encompass some common 80%+ of cases, but they're usually never perfect and leave behind edge cases with additional complexity. Unfortunately, composing abstractions is multiplicative. 80%*80%=64%. Do it enough and your whole application becomes unsupported edge cases, constrainted to fit within interfaces, functions and types not able to adequetly give you the results you want and, so, you go crazy down the rabbit hole, trying to desperately break it down into even more suitable abstractions, like that's going to help.

nitrix··on Pql, a pipelined query language that compiles to SQL
Pipelining is cool, though this could've easily just been a library with nice chaining and combinators in your language of choice (seems to be Go here).
nitrix··on The Death of Unity
> These new Unity per-install fees could hit developers who aren't making money

There's a revenue threshold to meet to pay the fee.

nitrix··on The Development of the C Language (1993)
C11 3.6p1 byte "addressable unit of data storage large enough to hold any member of the basic character set of the execution environment"
nitrix··on The Development of the C Language (1993)
The width is defined as CHAR_BIT >= 8 (C11 5.2.4.2.1p1). The size, sizeof (char), is always 1.
nitrix··on GCC 13 Supports New C2x Features, Including Nullptr, Enhanced Enumerations
Changes to the Standard usually happens as a result of defect reports (confusing details that implementation writers want clarity on) or vast enough general adoption (unifying how implementations were differently achieving the same thing).

You can read #13 of the Charter https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2086.htm

As for the audience, it's all the C developers, the open-source and commercial compiler implementations, vendors of libraries, tooling, services, learning material and everything else built in C; which is just innumerable.

Each Standard version released supersedes and obsoletes the previous versions. Intentionally, the versions are meant to be as backwards compatible as possible so that one can mix and match C89/C99/C11 codebases with minimum effort.

C has gained only a handful of features in the last 40 years. Compared to the great many things that are improved w.r.t. undefined/implementation-specific/unspecified behaviors, or removed to keep up with modern times (e.g. Trigraphs, Two's Complement integer representations, etc).

I'd say: (1) upgrading is not the spooky thing people make it out to be. Go, Rust, they all move much faster than this and have very ambitious big design ideas on their mind. (2) It's necessary to take good care of C as it, and the things built in it, will realistically outlive many of us.

nitrix··on Pepper spray your officers
This is off-topic for HN and not the kind of content I want to read on here.

https://news.ycombinator.com/newsguidelines.html

>> Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably off-topic.

There's a time and a place. I'm downvoting.

nitrix··on Tesla plunges 250 feet off a California cliff, all 4 occupants survive
Tesla stock plunges 250 dollars, all four shareholders survive.
nitrix··on The Zimbu programming language
The actual typo in the URL slug is on the nose too ("worlkd").
nitrix··on GitHub: Private Profiles beta
On a similar note, the screenshot should probably put emphasis on the first bullet point "Make profile private and hide activity".

What jumps to the eye right now is that second option checked, as if that's the new feature.

nitrix··on The case for a modern language
You have complete freedom.
nitrix··on Show HN: I built a jigsaw puzzle website
Mhm... my suggestions:

A) Let the user find out the correct orientation.

B1) Make the snapping happen only on click/touch release.

B2) Make the snapping happen over a longer distance.

nitrix··on Scryer Prolog: A modern Prolog implementation written mostly in Rust
I ask this as a completely outsider to Prolog who has found some of the design choices in SWI-Prolog to be very arbitrary while I was trying to learn it. Some predicates were rather unsafe/error prone/not pure and didn't sit quite right with me.

Is that a result of the Standard and will Scryer follow those footsteps or are we going to see something closer to Mercury?

I really enjoy your channel and indirectly heard a lot of positive things about Scryer, so of course I'm super interested and would prefer if they don't get too stuck on trying to meet the "status quo". The "status quo" has a lot of room for improvement.

nitrix··on Ask HN: Has anyone fully embraced an event-driven architecture?
You mean Erlang?
nitrix··on Learn C and build your own Lisp (2014)
How you learn C greatly impacts the code you will be writing.

The language allows too much freedom for a beginner and things can go bad quickly if you aren't rigorous about developing the right habits.

Years of experience helping people and seeing it happen first-hand is what leads to these strong opinions that you interpret as gatekeeping.

nitrix··on Learn C and build your own Lisp (2014)
"Effective C" is usually what I recommend people nowadays on Libera #c, which is where that wiki originates from.

The books were triaged based on the feedbacks we heard, the kind of questions that are asked on the channel, or how confused those readers are after reading through them.

nitrix··on SpaceX Threatened with Arrests
Police officers will often happily close roads for church or impromptu protests for the public's safety.

The bickering that's going on means someone has a hidden agenda, got their ego bruised or maybe the laws are just outdated and needs corrections.

Either way, people aren't great with change. Changes to the law takes a lot of time and often your request just gets ignored unless you literally force them to look at your issue.

Well, that's what they're doing. I have no problem with it, no one gets harmed, people are safer, laws will improve, it's just wins everywhere.

Page 1 of 3Next →