skysight-inc/HackerNews huggingface dataset:
> defer just changes the problem from forgetting to write free to forgetting to write defer.

That's the case only the first time you write code:

{
foo *f = new_foo(); // step 1
/* lots of code */ // step 3
free(f); // step 2
}

vs

{
foo *f = new_foo(); // step 1
defer free(f); // step 2
/* lots of code */ // step 3
}

Sure, in both cases you can forget step 2. But what about review? With defer, the init and cleanup code are besides each other, and a missing defer would be immediately suspicious. Without defer, you'd have to check the end of the block to make sure the cleanup code is there. The absence of the cleanup code wouldn't jump to your eyes the same way the absence of defer would. In the long run, this makes defer significantly harder to forget.

---

Another significant advantage of defer is that it can handle several exit points. Imagine this code:

Foo f = new_foo();
defer free(f);
if (!f) {
return FAIL_FOO;
}
Bar b = new_bar();
defer free(b);
if (!b) {
return FAIL_BAR;
}
Baz z = new_baz();
defer free(z);
if (!z) {
return FAIL_BAZ;
}
/* business logic */
/* business logic */
/* business logic */
return SUCCESS;

Now the same, without defer:

Foo f = new_foo();
if (!f) {
free(f);
return FAIL_FOO;
}
Bar b = new_bar();
if (!b) {
free(f);
free(b);
return FAIL_BAR;
}
Baz z = new_baz();
if (!z) {
free(f);
free(b);
free(z);
return FAIL_BAZ;
}
/* business logic */
/* business logic */
/* business logic */
free(f);
free(b);
free(z);
return SUCCESS;

You really don't want to repeat yourself like that, you'd be liable to forget something. Now we could use `goto` and a return value:

ReturnValue retval = SUCCESS;
Foo f = new_foo();
if (!f) {
retval = FAIL_FOO;
goto cleanup;
}
Bar b = new_bar();
if (!b) {
retval FAIL_BAR;
goto cleanup;
}
Baz z = new_baz();
if (!z) {
retval FAIL_BAZ;
goto cleanup;
}
/* business logic */
/* business logic */
/* business logic */
cleanup:
free(f);
free(b);
free(z);
return retval;

Better, except maybe the fact that Q/A hates you. All is not lost, you can still please them with a single exit point (pattern seen in the real world):

ReturnValue retval = SUCCESS;
Foo f = new_foo();
if (f) {
Bar b = new_bar();
if (b) {
Baz z = new_baz();
if (z) {
/* business logic */
/* business logic */
/* business logic */
} else {
retval FAIL_BAZ;
}
free(z);
} else {
retval FAIL_BAR;
}
free(b);
} else {
retval = FAIL_FOO;
}
free(f);
return retval;

To be honest this may be the worst of them all.

---

The only real contenders for this use case are defer and goto, and even then I think I prefer defer.
Writing Good Interview Feedback
yeah but we had email before that. It wasn't "free" but it was cheap and worked across everything and no-one stole your personal data.
Also (and keep in mind I'm just repeating the rumor) wasn't it supposedly replaced with the slogan "do the right thing"? It was something else fairly harmless.
> I haven't seen one (at least for a SaaS company) that will compensate for loss of productivity/revenue

They won't show up on automated systems aimed at SMEs, but anybody taking out an "enterprise plan" with tailored pricing from a SaaS, will likely ask for tailored SLA conditions too (or rather should ask for them).
Ask HN: How can I make live dynamic linking in embedded systems?
Hi, I'm a firmware programmer, with little/no compiler/parsing experience. I have experimented with dynamically linking C libraries upon each file save in Ubuntu. I find this a very productive way to work. My dream is to make this happen in embedded systems as well. I know enough to know it's non-trivial. But if I never ask, it might not ever happen. Is anyone working on this? How can I contribute/encourage/motivate?

Clearly, there are many copmlicating issues, such as flash memory, optimization, initialization, etc. But having seen Bret Victor's famous livecoding experiments, I know there are others who also want this. Any advice besides "learn everything myself and make it happen alone?" Where should I look? What's a good strategy? What are some good in-between steps? Does this exist somewhere? Does anyone want this to happen? Is anyone else working on this?
And I here to tell you that regulatory reforms won't bring back manufacturing jobs because they aren't what's stopping them. The reason items aren't manufactured in the US is due to the dollar being so strong. That's what makes American products so expensive.

No regulation changes bring manufacturing back with this strong of a dollar.
We could have speed governors with an opt-out button, where use of the opt-out button gets logged and has to be justified.
Funny how few people seem to understand a "mixed" economic system, despite it being virtually the only extant economic system.
The issue is that the author expects to ask Google whether his or her cat can eat blueberries and expects and instant, accurate answer, free of charge.

That isn't free. It takes someone writing something about whether cats can eat blueberries, and then it takes a search engine having the incentives to index that content and point you to it. All this to answer what is, in the end, an extraordinarily trivial question that is of no consequence to anyone.

All told, it's quite amazing that Google and the gusher of cash that its advertising produces has led to the provision of a service that people regularly consult for extraordinarily specific yet silly questions such as "can a cat eat blueberries." It's even more amazing that there are farms of people spending time to produce content to provide to this search engine. Yet all the author can think to do is complain that she gets a crappy answer to a silly question.

The alternative to free, crappy answers to silly questions is not an amazing, perfect answer to silly questions. The author seems to think such answers once existed. They never did. Before Google you would get nothing but nonsense in response to a query like this. There isn't some vet clinic somewhere that crafts answers to this. There isn't some university professor doing it. There is no government doing it. This isn't like vital government data that taxes pay to produce, or commercially valuable information that someone will produce and post. This is the kind of content that is junk and that exists at all only because it's worthwhile for someone to create mounds of this crap and have Google index it so they can post ads.

Google or its successor will likely improve over time--that is, they'll get better at creating incentives for the creation of low-value content like this so that people can ask their phones silly questions like this and get answers that are, perhaps, better than nothing. (Perhaps the answers are worse than nothing! In that case, stop looking for them! I never cared when my cat ate blueberries.) But Google did not somehow make the Internet worse. Google led to the creation of stuff that wasn't there at all before. That's a positive, not a net negative.
What normally (should) happens in that unusual case is that the engineer is issued a special short-lifetime credential to do what needs to be done. An audit trail is kept of when and to whom the credential was issued, for what purpose, when it was revoked, etc.
What's "Rx-type programming"?
I think EA is depreacating Origin in favour of Steam, or at least not making Origin the centre of their universe. That's why you can buy FIFA21 on Steam and games like Dragon Age and their EA Origin Pass subscription.
For just faces, there's this website, if anyone is unaware: https://thispersondoesnotexist.com/
Nope, instead of providing another live chat solution our team integrates with the customer service software that you are currently using (e.g. HelpScout & Zendesk) and resolves user requests for you on-demand.
Refreshing Server-Side Props in Next.js
> They stalk you, collect data and build a profile

Again, not generally a problem when using paid services.
> but is that to mean that engineers are supposed to turn a blind eye to ethical issues in the products their employers sell?

Those engineers understand the obvious problems with facial recognition software. Everyone does.

The engineers building this software don't need philosophical training. Instead, they need a personal/professional ethics (or, in lieu of such self-regulatory instincts, government regulation). Again, neither of those presents a philosophical problem.

> Other engineering disciplins whole-heartedly disagree. Regulation is besides the point.

I disagree. Other engineers disagree precisely because they operate in highly regulated disciplines. PE codes of ethics are not (just) personal ethical commitments; rather, they are (also) backed by the force of law. BTW, lots of engineers build WMDs.
> The pdl files are the canonical protocol definitions and are maintained manually by the devtools team [0].

The JSON protocol definition files are then in fact being generated from those pdl files. You find them mirrored in the devtools-protocol-repo [1]

[0] https://chromedevtools.github.io/devtools-protocol/
[1] https://github.com/ChromeDevTools/devtools-protocol/
It's an annoying game because by this tactic philosophy is always good and important and can never be useless, because when you argue that it's useless, a philosopher will say "Gotcha! Now you are doing philosophy! You just proved how important philosophy is! Thanks for your contributions to it!" But if I don't do philosophy you keep prodding me "Hey, hey, philosophy is important, do philosophy!". If I tell you to go away because I don't need it for this and this reason, then I've fallen into the trap because I'm now doing philosophy.

But I guess science-denying people argue just like I did above when they dislike the idea that science admits that it may be wrong and will update itself with new evidence. But I can see how someone with a different epistemological footing would be annoyed with this.

Something of this sort can never be "wrong", because it will just incorporate an update when it's proven wrong. But is that updated thing really the same?

It's a cheap trick to try and get around of being ever truly wrong. If you turn out to be wrong you can just say "but I knew I may be wrong and would have to update" so you weren't really wrong in the deeper sense!

Note that I adhere to this scientific ethos as well, but I can see it has a wobbly structure in this way.
Elon Musk and the SpaceX team inspects the remains of Starship SN8
16 GB if you can afford. Yes it's always a pain to pay a premium for RAM now, but you have no idea how much memory will your apps consume or how much what you do on your device will have changed in 5 years.

> 256 GB is enough RAM.

You probably meant disk.

I'd feel more comfortable with 512, but it starts to get very expensive.
The cap is set at $145M. I think that EA will be agree to enforce that limit for each user.
This is amazing, thanks! It's a bit different though - it executes a cleanup function when the variable goes out of scope, rather than a statement at the end of the enclosing guard block. It might be better though - it avoids some footguns that would be possible with a defer implementation.
> gave birth to the notion of "facts."

Somewhat ironically, around the same time (+/- 40 yrs) that it gave birth to the notion there is no ultimate truth.

Nietzsche, Beyond Good and Evil (1886)

Carnap, The Logical Structure of the World (1928)
South Georgia Island is where Shackleton and his small crew landed, intentionally, in a storm using only dead reckoning in a lashed together boat, then did a never-before attempted 36 hour wintertime crossing over the island from the remote side to the populated side in the dead of winter.

They had to do this because their exploration ship, the Endurance, got crushed and sank as they attempted (again) to trek to the south pole.

https://www.pbs.org/wgbh/nova/shackleton/1914/timeline.html

One of the most amazing things about it is there are a lot of photographs from the ordeal. Despite barely getting off the ice floes and having a low chance of living, they carried with them hundreds of pounds of glass photographic exposures. Why? Because if they lived, publication rights of their stories and the photographs were necessary to pay off the debt they incurred in undertaking the mission.
Looking into performance of the new EBS gp3 volumes
Proton collisions probe final frontier of the standard model of particle physics
There used to be hystry.com [0] but it isn't functional anymore.

Another workflow, though cumbersome, is: Search for a username on hn.algolia, select "comments" and "past months" as filters, then press enter.

Ex: https://hn.algolia.com/?dateRange=pastMonth&query=nostrademo...

[0] https://news.ycombinator.com/item?id=71827
It's mind-boggling. I can easily view videos on desktop or mobile hosted on youtube, streamable, clippuser, imgur, gfycat. All load and play really quickly even on an old, crummy phone. Meanwhile v.reddit.com is slow as hell, can't scrub, controls don't work in full-screen. And it's been that way for years with no improvement.
> This, in my opinion, overlays very well with doom scrolling partisan entertainment on facebook/instagram. No one enjoys it, but the intensity drives them back.

But enjoyment-seeking isn't the only thing that motivates people to do things. Fear and anxiety can too, and I think doomscrolling is more of an example of that. It's like vigilantly looking for lions on the savanna and rallying your tribe to react the ones you've spotted.
Hexagonal Grids, how do you find which hexagon a point is in? (2011)
Yup. I guess one way to "secure" it would be to try to make them promise to keep working for you for a certain amount of time, but even if there's a legal way to do it, that just seems icky, who wants to force people to keep working for you when they don't want to, or the environment that will come from working with people who would rather be somewhere else but are being forced to stay. That's not a good solution.
I used to use dev.to a lot, they definitely do great community building, at least as of a couple of years ago. Aren't they more aimed towards beginners?
About 70% are without a speed limit in Germany https://de.statista.com/infografik/16725/tempolimitregelunge...
I think you'll find nature will always get the last word on this, no matter what anyone believes politically.
I don’t know why v.reddit doesn’t work, all I know is that if I get the hls address and stick it in a video tag, it’s pretty reliable.

This likely means that they’re doing something so badly that they break something that already works. Good job.
It's as much hidden behaviour as destructors being called magically on an object that goes out of scope. In practice it doesn't hinder understandability as much as you think.
I don't either, but that's not how VC backed companies work. It's not good enough to stay usable for the current users, you need growth, and preferably as much as possible. I don't know what kind of service they're aiming for, but it's basically a meme feed now, with some political echo chambers thrown in.
Left:
/r/progressives

Center left:
/r/neoliberal

Right:
/r/neoconnwo

Center right:
/r/tuesday

Neutral:
/r/neutralpolitics
/r/geopolitics
/r/politicalfactchecking
/r/truepolitics

A spectrum of subreddits across ideological views, all with discussions you may actually learn something from. You’ll notice that none of those subreddits have been suspended because their members and moderators are repeatedly calling for violence against their political opponents, nor are they just recruiting boards for Stormfront. Again, finding the fringe conspiracy theorists repeatedly calling for violence doesn’t actually give you a well informed or balanced perspective.
Just wondering, what is that community for startup stories? Dark blue in theme.
> More likely they’re just average people who had to become party members to get the jobs they wanted.

... and would now like to keep those jobs.
If you remember the "good old days" of Microsoft, Internet Explorer monopoly only when they were forced out of being default and had to actively ask the users which browser they want and make the users' effort equal for every choice.

Power of defaults is just too massive to be ignored. And default is always easier than any "easy way of changing".
> it's relatively easy to measure, has more-or-less a standard agreed and universal method of measurement and it is quantitative.

Our tools have improved so much since we started measuring GDP. Maybe we should raise the bar on metrics: we're bound to find ones that are not-terribly-difficult-to-measure in 2020.
I noticed polls don't work on old reddit. Then don't even show in the feed. If you visit the poll directly it expands as some sort of embedded new reddit.
IIRC, the problem with C++ is that you can declare anonymous object instances... With surprising results (the object is destroyed at the semicolon, instead of being destroyed at the end of the block).
I just want to point out a few question-able statements about history made in the article:

> Does it ever strike you as just a teeny bit odd that after a brief period where philosophy flourished, from maybe 400 B.C.E. to ~100 C.E., we went through a follow-on period of well over one thousand five hundred years during which the Roman Catholic Church enslaved everyone's minds and killed anyone who dared think differently?

First, let's not forget that it was the Athenians (the Greeks) who put Socrates to death! So it's not like Ancient Greece was all about this philosophy stuff and we can just go blame the Christians ...

I don't know why we saw an 'end' to the golden age of ancient Greek philosophy. BUT .... the Greeks were conquered by the Romans. Christianity developed in the Holy Land and spread through Rome. Early Christianity was highly influenced by Platonism (Plato). So in some ways Christianity is an outgrowth of Greek Philosophy. Or at least not orthogonal to it. And if anything, maybe blame the Romans for the end of Greek philosophy? Though the

https://en.wikipedia.org/wiki/Ancient_Greek_philosophy#Helle...

> It was philosophers that got us out of that Dark Ages mess, and no small number of them lost their lives in doing so.

The Dark Ages weren't really "dark"

"As the accomplishments of the era came to be better understood in the 19th and 20th centuries, scholars began restricting the "Dark Ages" appellation to the Early Middle Ages (c. 5th–10th century),[3][7][8] and now scholars also reject its usage in this period.[9] The majority of modern scholars avoid the term altogether due to its negative connotations, finding it misleading and inaccurate.[10][11][12] Petrarch's pejorative meaning remains in use,[1][2][13] typically in popular culture which often mischaracterises the Middle Ages as a time of violence and backwardness."

https://en.wikipedia.org/wiki/Dark_Ages_(historiography)

Since Steve's article uses this history as an analogy for the state of Computer Science / Programming, and then draws on it as an argument for why we need "philosophers" (IMHO philosophers of computer science might well do something completely unexpected and not what is suggested here), I think it's important to address the historical inaccuracies.

If anything I think more Science & Technology Studies folks / Philosophy of Computer Science, or anthropology folks studying the culture and implicit biases of computer scientists and software engineers would be useful & kinda awesome.
Thanks for the article!

I think it's even worse actually, because this is not something that needs to be done explicitly or on purpose.

Simply training AIs with a target goal of maximizing engagement could lead to models discovering and exploiting superstimuli or superstimuli-like bias in humans.
Shit for you. Shit for me. Great for the Reddit bottom line and new user numbers.
>I don't think you can learn much from this presentation. It's not that special compared to how other companies present performance differences.

I beg to differ. Other companies can't even be bothered to come up with proper names for their products, and you get the nth "XV356E-52 mark II" style product in their catalogues...
My lay understanding is that we don't know about the plastics themselves as other commenters have said. However, apparently, other toxic chemicals in the environment bond readily to the plastics and that becomes a mechanism by which those chemicals get into our bodies.
Also, security conscious companies would flag a connection to Ethereum as suspicious in itself, so your effort to hide yourself could in fact draw more attention.
I hope the opposite. I haven’t installed Reddit’s app and never will. That only means that my engagement will drop (like it already happens when they want me to log in when opening a subreddit)

One can only hope.
I think individual engineers absolutely have a duty to act ethically, and that that duty includes not working on unethical things. However, I don't think that stating that the behaviour is unethical and that people shouldn't do it helps solve the problem, whereas I do think that we could ban bullshit ML woo or reform our institutions so that they don't use it to spy on people
> There's plenty of other reasons to criticize Google, changing default settings doesn't seem to be a hill to die on.

This statement is ironic considering that when Google was the profit driven upstart, changing default settings on IE was literally the hill Google chose to die on, as far as anti trust regulation against Microsoft was concerned.

https://www.zdnet.com/article/google-seeks-to-join-internet-...
All Austin or in fact anyone from lambda does is pr speak questions/comments he thinks are softballs. Simply search every lambda post on hn.

He and his pyramid scheme lost the benefit of doubt years ago.
Sidenote:

Low tech magazine runs a solar powered website:

https://solar.lowtechmagazine.com
I'm intensely skeptical of this idea of "inclusive wealth" they're pushing for. It sounds a lot like it's intended to be a general and all-inclusive "what should we do" index, constructed to ensure all good changes increase it and all bad changes decrease it. I don't think such an index is possible to construct, and there's a lot of well-intentioned harm you could do if you think you have one.
The main use case is not forgetting to free resources. It's when you do have resource-freeing code, but it's tricky to make sure you free only the resources you know for sure you have already allocated. This is common in the Linux kernel. A great example is this function I found at random from fork.c: https://github.com/torvalds/linux/blob/master/kernel/fork.c#...

Notice that there are five different goto targets, each for a specific case of what has-and-has-not been allocated. The resources are memory, locks, and even TLB flushing. This code would probably be cleaner with defer.
The bootcamp I went to had someone with a perfect SAT and an engineering degree from Princeton. She is wicked smart and works for google. You would be crazy not to hire her just because she went to a bootcamp.
The Decentralized Web of Hate
This compromise supposedly goes back to March 2020. We're just learning about it now.
I can believe the latter.
From what I've seen it has very little value if you aren't into trendy web dev or mobile apps. + the dark patterns soured me on it (although they've gotten rid of at least the worst ones)
>Apple's graphs without labels, and comparing to "top PC laptops" without naming them actually made me assume the M1 was going to be a flop

That's because you aren't the target audience for the graphs.

The targed audience (the average user) would be confused and bored for with labels, and axis, and statistical minituae.
This confusion is easily avoided by saying “country,” or if you still want your writing to be verbose you could say “government” or “government-backed actor.”