Hacker Newsnew | past | comments | ask | show | jobs | submit | neutrono's commentslogin

It should have been called _Overload or something similar, since it's not really a generic.


How to kill your company in one week?


Microsoft always wanted to kill it.


It’s only been the weekend, it just feels like a week. The announcement that OpenAI’s board had fired Sam Altman came shortly before markets closed on Friday and as of this writing we’re about 5.5 hours away from when they open again.


In C23 you can use the attribute

    [[nodiscard]]
on functions to mark that the result from function shouldn't be discarded. I think there is also a

    [[reproducible]]
attribute for saying a function doesn't do side effects.


I think he means that the C API is stack based?


What is nano lacking in power?


Last time I try it, I wasn't able to figure out an equivalence of « d)Gp »


Nano doesn't have a default keystroke for "match an end-of-sentence" character, though creating such a binding in .nanorc is trivial.

However, since what this typically means in practice is you'd either cut until the next period, or until the end of the line, in the absence of an "end of sentence" keybinding, my approach to this would simply be to either cut until the next period, or until the end of the line as required, which I believe is a wholly reasonable alternative.

The former would be:

  {mark} {search} . {enter} {cut} {endoffile} {paste}    (7 keystrokes)
The latter would be

  {cuttoend} {endoffile} {paste} (3 keystrokes)
The 7 keystrokes become very vim-competitive when you realise that d)Gp actually fucks up in the typical scenario, since usually what you want is NOT to paste after the first character of the last line, but actually in a new line below the last one. Which means you don't actually just do `p`, but something like `o ESC p` instead.


One can always use Home and End in that case.


Only my Model M has a full keyboard


The declaration syntax and the lack of a proper module/namespacing system is also a mistake, but perhaps not as big as the way arrays decays into pointers. Implicit conversions I suppose could also be classified as a mistake.


What you're calling "mistakes" look to me like intentional design decisions made in order to optimize for specific kinds of problems.

C is not a high level language, nor should it be. If you're doing the sort of work that is better suited for a high level language, then using a different language is the right call.


Well, IIRC even in the K&R book, a book which many C programmers admire for it's excellent documentation and prose, and rightly so, there is a specific section mentioning that C's declaration syntax has been castigated.

Next, even if C is not a "high level language", which depend on your definition of "high level language", the perks of a proper module system for low level coding cannot go unmentioned.

- Rust, a language that lives in a somewhat similar abstraction and power space as C, has a module system.

- C++, a language that lives closer to C in features, also now, in C++23 I believe, has a module system, and before that, had namespaces.

On implicit conversions, I think having implicit conversions are hard to get right, and I think that C has them is not a feature, but rather a bug. Languages that have taken some inspirations from C, has chosen usually to do away with implicit conversions, or at the very least, limit their use.

And the array -> pointer in functions, I percieve to be a big mistake, not at the time, perhaps it was not known better ways, but as the years roll by, I think it's a misfeature given the countless exploits that have taken place due to a read past the bounds of an array.

I think C is a good language, but these misfeatures burdens the language in an undue way, and I think a better way to design a language is to be more explicit. Something like Rust's

    unsafe { /* Here be dragons */ }
is better design, in my opinion. I think if you want implicit conversions, there should be an explicit way to declare that you want things to be implicit.

That's just my 2¢


Citizens have a huge amount of power within the government, being able to vote in elections and pursue ballot initiatives. How is that not a democracy?


Citizens don’t. Because of two senators per state, people in sparsely populated states have far more power than people living in larger states.

Even within states since people are concentrated in urban areas, it’s easy for the minority to engage in gerrymandering so that the rural population voting power is more than urban voters.

That’s not to mention the fact that even in conservative states, on singular issues like abortion, drug legalization and the right for felons to vote, the population runs to the left of the legislation. When those initiatives are put on the ballot, they win. So the legislators in those states are making it harder for initiatives to get on the ballots.

You can look at states like Texas that are taking more power out of the hands of the city.

https://thehill.com/homenews/state-watch/4007362-texas-passe...


We don't have ballot initiatives at the federal level. The US is a democratic republic, so it's a bit pedantic, but if you had to classify as one or the other the U.S. is a republic.


Republic means not having a monarch. The US is a representative democracy. So is the United Kingdom, but they are a monarchy.


No, that's not what a republic means. The U.S. is a republic. It is mentioned explicitly in the U.S. Constitution in Article 4, Section 4:

"The United States shall guarantee to every State in this Union a Republican Form of Government, and shall protect each of them against Invasion; and on Application of the Legislature, or of the Executive (when the Legislature cannot be convened) against domestic Violence."

As mentioned, the definitions of republics and democracies have blurred over the years as people often use them interchangeably. Republics have representatives. Just as the ancient Roman Republic did, with its famous Senate. Pure democracies run on majority rule and direct voting on laws.

https://constitution.congress.gov/browse/essay/artIV-S4-1/AL...']

https://constitution.congress.gov/search/republic


Only one I could think of is posix_spawn[0], although it has different constraints than fork()/exec()...

[0]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/p...


Ada 2012 has expression functions

    declare
        function f (i: Integer) returns Integer is ( i * 2 );
         x : Integer;
    begin
        x := f(21);
    end;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: