Better HN
topnewbestaskshowjobs
Log inSign up

nitrix

260 karma · joined Apr 17, 2013 (13y ago) · 79 submissions

https://nitrix.me

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

Submissions

comment 3w ago · link · parent

You're confused. It's not Anthropic's responsibility to monitor and fix everything that's said correctly or incorrectly about them. They're doing excellent given what they're capable to do in this situation.

comment 3mo ago · link · parent

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.

comment 3mo ago · link · parent

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.

comment 4mo ago · link · parent

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.

comment 6mo ago · link · parent

I'm doubtful the venn diagram intersection of engineers and the world cup is as big as you think it is.

comment 10mo ago · link · parent

I’m the Alex mentioned in the acknowledgments, feel free to ask your questions.

comment 11mo ago · link · parent

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.

comment 11mo ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

That's fine. Not every platform has to work the same way and attract the same communities.

comment 1y ago · link · parent

> "The C standard library provides malloc/free/resize"

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

comment 1y ago · link · parent

Okay, but put the panels on rooftops, not over that nice greenery.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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).

comment 3y ago · link · parent

> 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.

comment 3y ago · link · parent

C11 3.6p1 byte "addressable unit of data storage large enough to hold any member of the basic character set of the execution environment"

comment 3y ago · link · parent

The width is defined as CHAR_BIT >= 8 (C11 5.2.4.2.1p1). The size, sizeof (char), is always 1.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Tesla stock plunges 250 dollars, all four shareholders survive.

comment 4y ago · link · parent

The actual typo in the URL slug is on the nose too ("worlkd").

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

You have complete freedom.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

You mean Erlang?
123