skysight-inc/HackerNews huggingface dataset:
After writing a lot of Rust, I recently did a small project with Zig to learn the language.

I'm especially impressed with the C interop. You can just import C headers, and Zig will use clang to analyze the header and make all symbols available as regular Zig functions etc. No need for manually writing bindings, which is always an awkward and error-prone chore, or use external tools like bindgen, which still takes quite a bit of effort. Things just work. Zig can also just compile C code.

Rust indeed can feel very heavy, bloated and complicated. The language has a lot of complex features and a steep learning curve.

On the other hand, Rust has an extremely powerful type system that allows building very clean abstractions that enforce correctness. I've never worked with a language that makes it so easy to write correct, maintainable and performant code. With Rust I can jump into almost any code base and contribute, with a high confidence that the compiler will catch most of the obvious issues.

The defining feature of Rust is also the borrow checker and thread safety (Send/Sync), which contribute a lot to the mentioned correctness. Zigs doesn't help you much here. The language is not much of an improvement over C/C++ in this regard. The long-term plan for Zig seems to be static analysis, but if the many attempts for C/C++ in this domain show anything is that this is not possible without severe restrictions and gaps.

Choosing to forego generics and do everything with a comptime abstraction makes Zig a lot easier to understand, compared to Rust generics and traits. The downside is that documentation and predictability suffers. Comptime abstractions can fail to compile with unexpected inputs and require quite a bit of effort. They are also problematic for composability, and require manual documentation, instead of getting nicely autogenerated information about traits and bounds.

Many design decisions in Rust are not inherently tied to the borrow checker. Rust could be a considerably simpler, more concise language. But I also think Rust has gotten many aspects right.

It will be very interesting to see how Zig evolves, but for me, the borrow checker, thread safety and ability to tightly scope `unsafe` would make me chose Rust over Zig for almost all projects.

The complexity of Rust is a pill you have to swallow to get those guarantees, unless you use something like Ada/Spark or verifiable subsets of C - which are both more powerful than Rust in this regard, but also a lot more effort.

Some smaller paper cuts, which are partially just due to the relative youth of Zig:

* no (official) package manager yet, though this is aparently being worked on

* documentation is often incomplete and lacking

* error handling with inferred error sets and `try` is very nice! But for now errors can't hold any data, they are just identifiers, which is often insufficient for good error reporting or handling.

* No closures! (big gotcha)
I know it sounds catchy to say that NFTs are an ecological disaster, but that statement is sensational and not accurate.

NFTs do not cause carbon emissions themselves, just like you don't add carbon emissions by occupying a seat on a public transportation bus. The bus is doing its daily route and has a fixed amount of emissions per day whether it has any occupants or not. This analogy breaks quickly, so I wouldn't look too much into it.

Maybe a better analogy is to think of your WiFi router. Its energy use is (predominantly) static regardless of how many packets you route through it. So by browsing, you are not causing additional carbon emissions.

In more technical terms: more transactions do not cause more hashrate. Ethereum's CO2 footprint does not scale with transactional count. So asking people to use the network less will not cause the hashrate to go down. The only way you reduce energy consumption is by getting miners to mine less, which triggers the protocol to adjust the mining difficulty accordingly. As laid out above, this has nothing to do with how many transactions are happening on ETH, or whether NFTs are being minted on it.
This is something I have been reading more and more lately - "Rust is complex". In the past, people usually brushed it off saying that it's much simpler than C++. But that always felt like saying that a mountain is not very high because it's smaller than the Everest
Is there anything like this for intercourse?
We could then scientifically compare.
you are taking me too seriously. I just take what i'm given and don't second guess it. If i don't like it, i move on.
Organ transplant ethic comitee guidelines are a horrible example on how a fair algorithm can make things worser. Every patient gets points by sickness, which means a mother of 4 needing a liver, is way behind a multi organ failing coma case, and only gets it, if she has damaged other organs due to the wait. Every now and then the doctors, who want to help patients that can be helped, juice the charts, to get ahead of the undead zombie hordes , and of those, even rarer one gets found out and dragged through the streets. https://www.google.com/url?q=https://m.dw.com/en/organ-donat...
those outside of the system, there is the red market if you are rich (usually in poor regions) or nothing. Comitee + fair algorithm + ethics is a recipe for disasters.
what about the milk? I'm not surprised you getting downvotes.
In France, "a country with better social protection than the US", apps ask for a tip too.

In the Uber app it shows up after the trip / rating. I think the options are +1, +2, +5. Maybe there's a custom, I don't remember.

However, what surprises me, is that for example on Uber Eats, they ask for the tip before the delivery, at the end of the order. The way I see it, even in the US, the tip is supposed to at least take into account the quality of service. How can you judge that before you've been served?
Google announces major shift away from precision-targeting of ads
Finally make some money with my SaaS
Hi Hacker fellow,

We're all seeing SaaS reports in term on 10K-100K per month. But not many people reports when the income is just a few dozen bucks per month.

So just want to share story of my app: https://hanami.run an email forwarding service I made a few months ago. This month I finally generate about $78 https://www.indiehackers.com/product/hanami/revenue

I have a panic moment when Stripe mistakenly terminate my account and I was helpless but thanks to HN I was able to find some help: https://news.ycombinator.com/item?id=26320429

I feel awesome making money with my SaaS app. It's still a journey and a long way to go.

Sometimes I look up to other SaaS app in my market and realized how far they are ahead of me, then I reflect back and I realized I myself use a few small SaaS app as well such as BitWarden. No matter how far your competitor is, try to push your own product, make your user happy and make something you want to use daily yourself. To me, I have been dog fooding route all of my emails through my app and learn so much last few months.

Not much money, but this small monthly amount are enough to make me happy knowing that I'm able to make my customers happy.

So all of people who are building a SaaS on hacker news, keep pushing and good luck.
you know what you doing!
The Cat Is Out of the Bag: Orientalism, Anti-Blackness [pdf]
This is what we call boomer speak. Stop wallowing in your nostalgia, and look at reality as it is.
Furthermore, why not use the transporter as a weapon, creating bombs next to / inside enemy ships
As many others here have pointed out, we stumble upon a fundamental issue with blockchains here. The thing that's inside the blockchain can be verified but as long as it points to something in the physical world or to be more precise, outside the chain, you have a weak link. People can ignore to respect the NFT, or simply choose to reject it. Tokens in themselves have no intrinsic value, unlike a painting, a commodity (like gold or even uranium). Of course, there is one exception to this; money. That's why bitcoin was a slightly better idea (but it suffers from different problems in my opinion). The ultimate conclusion for me at least is this one, ownership, art, justice (legal blockchains, smart contracts), these are all social problems and they cannot be solved with mere technology. Technology may help of course, but in the end I strongly believe that social problems require social solutions, not technical ones. For instance, consider bitcoin, with a 51% attack you could gain control over the chain, with PoS big stakers have control, this means you just traded the bankers of today with some other bankers. In the case of NFT, you could have a token that indicates you're the owner of a painting, but if that painting is stolen and sold by people who don't care about your NFT, what's the point? Stealing, in this case is a social problem, not a technological one.
Have you probed a bit further to ask them why they like Austen and not Dickens, and vice versa. I for one like reading works of both Austen, and Dickens.
I was wondering in the P0, P1 issue, why the auther didn't use an Enum, Enums are the easiest way to handle that sort of mixed type.

On my phone something like:

enum Pin {
Pin0(P0, usize)
Pin1(P1, usize)
}

Assuming that would work in the embedded device which I don't know.

I know the above doesn't affect the general point, but I have found lots of people struggling with Rust haven't yet discovered that you can easily combine types in Enums.
Isn't this just science?

We routinely replace every other part except the brain, whether by mechanical, artificial biological, or donor/transplant means.

Prosthetic arms and legs are normal, millions need things like insulin replaced in their bodies that is manufactured by yeast, and every day thousands donate blood to be put into other people and replacing kidneys, hearts, lungs, and various other organs from those who are brain dead is routine.

Everything except the brain is a swappable part (quality/success of swap may vary).
It is easier to macro bullshit than it is to micro bullshit.
Quote: "When I asked Weinstein for certain mathematical details about how he had arrived at the Seiberg-Witten equations, his vague responses led me to doubt his claims."—and this is the crux I guess. There have been people who went unknown and unrecognized in their times, there have been theories that got laughed at before being confirmed. There are people who just dreamed up something with no real foundations or data to back up that later got vindicated. But likelihood was never in favor of grand theories being correct when not grounded solidly. I for one find Weinstein creepy and just downvote any Youtube suggestion that pops up in my stream. When someone like Roger Penrose comes up with a far-flung theory (multiverse, quantum foundations of consciousness, etcpp) at least you can be confident he has thought long and hard about what he's talking about (and tons of other stuff that does have standing). Not this guy. Weinstein makes a claim and when you ask for proof, he gets evasive, pointing fingers at people. I'm sorry sir but if you feel unjustly ostracized from the scientific community you still have to publish and discuss. If you don't we can know for pretty sure your exclusion was either self-induced or done for good reason. No research department benefits from a grifter.

That said, I'd give him the benefit of a doubt. Many people seriously believe in counterfactual stuff as we now, sadly, know so much better than a mere twelve months ago.
Why keep two competing languages in your toolbox? I personally do C++ and Python and will pretty much never voluntarily choose another language from their respective niches... Except I'm looking forward to replacing C++ with Rust (any year now), at which point I'll not choose C++ again.
Is this article seriously naming potential informants? Unbelievable
I hope you have good measures to stop spam and to stop people abusing your run features. Or even just to stop things like infinite loops in this code sample (if the syntax error is fixed) https://harigami.net/cd?hsh=0b7c2f43-bf85-4efe-bedb-f6b60c8f... (I didn't submit that sample btw)
The value in HN for me lies in the comments. I mostly don’t read the articles because I feel the comment quality is often a lot higher. Here I have the unique opportunity to read what a significant number of very very bright minds with a lot of experience in tech have to say about a certain topic. Nowhere else in my life do I have the opportunity to hear what a so diverse, experienced, global and intelligent group of people has to say about any given topic and I have to admit that this has given me much more with respect to developing my own thoughts and understanding the world than any exchange with a coworker or any other social media platform.

I have learned new hobbies, new programming languages, I constantly challenge myself and learn new aspects of my work, I had great and interesting political discussions, I found great advice for career and handling bosses and colleagues, I got into new interesting topics, I developed and challenged my view on things in the world, and last but not least, I found my true passion to which I probably otherwise would not have been exposed as much.

I think HN is such a unique opportunity, especially for people like me, who are not from the US tech scene, to engage with and be part of a global community if like-minded, interested, interesting, and rational people. I am so glad I found this place.
it speeds up the network?
One mans obscure find is another mans daily bread, but...

Marco Reps[1] has a lot of interesting maker stuff, along with some (IMHO) great humor.

I've been enjoying Robert Feranecs[2] channel for some detailed PCB design stuff. Has had some great interviews and deep dives.

CuriousMarc[3] has some really great stuff on restoring the Apollo Guidance Computer, with explanations of the hardware and what they have to do to try to reverse engineer it and so on.

I've also enjoyed a lot of what Robert Baruch[4] has put out. He had some great explanation and practical demonstration of line termination, as well as got me into FPGAs.

[1]: https://www.youtube.com/channel/UC1O0jDlG51N3jGf6_9t-9mw

[2]: https://www.youtube.com/channel/UCJQkHVpk3A8bgDmPlJlOJOA

[3]: https://www.youtube.com/channel/UC3bosUr3WlKYm4sBaLs-Adw

[4]: https://www.youtube.com/channel/UCBcljXmuXPok9kT_VGA3adg
"Shelter" sounds like a modest expectation, but at least for me, and a lot of other people, a decent level of "shelter" requires you to be pretty well off. The average house here in the UK costs £~305k, so a mortgage on that requires like 30k deposit + 60k income, which means being a top 10% earner. I've no real aspiration to be "rich" in a superyacht sense, but I would like to be able to remain in my home city and own a modest flat, which requires me to be rich.
Ole should repeat it on more occasions, since this is what it's all about: economic unit is not an average of the same imaginary economic units following different paths, some of which can end in a bankruptcy. Instead single bankruptcy will end the whole process, this is a ruin problem.
That is economic unit is an average on its own timeline, not space.
This one for instance to grab my desktop quickly without starting another program when I want to make a quick demo for a colleague:

#!/bin/bash

size=${1:-"1920x1080"}
offset=${2:-"0,0"}
name=${3:-"video"}

ffmpeg -video_size $size -framerate 25 -f x11grab -i :0.0+$offset -c:v libx264 -crf 0 -preset ultrafast "$name.mkv"
ffmpeg -i "$name.mkv" -movflags faststart -pix_fmt yuv420p "$name.mp4"
I’m not trying to persuade.
I am a long-time C++ developer and have been playing around with Rust recently. I really love the language, but one thing I miss about Rust from C++ is the ability to manipulate and play around with types. The features that really enable this are variadic templates and generic lambdas. I wish Rust would get something like them in the future.

In C++17, the author's issues with trying to do port and pin with different pin types, has a pretty elegant solution in C++.

Here is a toy solution.

#include <iostream>
#include <tuple>

/*
for (port, pin) in &[(P0, 10), (P1, 7), ...] {
port.pin_cnf[pin].write(|w| {
w.input().disconnect();
w.dir().output();
w
});
}
*/

template <typename PinTuple, typename F>
void for_each_port_and_pin(PinTuple& tuple, F f) {
std::apply(
[&](auto&&... p) {
auto apply_pin = [&](auto& t) { std::apply(f, t); };
(apply_pin(p), ...);
},
tuple);
}

struct P0 {
void write(int pin) {
std::cout << "Writing on Port P0, pin " << pin << "\n";
}
};
struct P1 {
void write(int pin) {
std::cout << "Writing on Port P1, pin " << pin << "\n";
}
};

int main() {
auto ports_and_pins =
std::tuple{std::tuple{P0{}, 10}, std::tuple{P1{}, 7}};
for_each_port_and_pin(ports_and_pins,
[](auto& port, int pin) { port.write(pin); });
}

Runnable godbolt link

https://gcc.godbolt.org/z/dcxnTo
What's better than repairing your phone is not having it fail in the first place.
You set it yourself and its part of your budget when you raise. So it's up to you really, but its got to be fair as your VC might not back the terms.
Totally agree with it. It is not only the ancient classics, there are quite awful translations of greats like Dostovesky, Tolstoy etc. After reading Dostovesy in some bad translations, before venturing on reading any of his works I spend some time checking who are the transaltors.
I'm a product owner and much of my "education" comes from HN. Well or at least originates, including e.g. book recommendations.
Right, I would like a study on how discussing relationship movies increases the marriage rate for couples.
If there's no legally binding contract attached that you won't do it, then it should be just fine to sell as many instances as you want, no? In the absence of a contract you're just buying a unique tag, not the work itself.
The Book of Tea is a really awesome work on the Japanese Tea Ceremony and historical tea culture. Originally written in English, too.

https://en.wikipedia.org/wiki/The_Book_of_Tea

https://www.gutenberg.org/ebooks/769
I missed the collaborative editor part. I think that is really great for teaching and for learning group collaboration.
Nope, I have no idea which path Zig will take, but I somewhat doubt it will do the same Rust did. Rusts later stage development reminds me a bit of the design by committee approach and it doesn't seem like Zig has that problem, but it's also hard to make it to a mainstream language without a hugely popular project that's associated to it.

I was generally rooting for mainstream usage of Rust, but I don't see it happening with the path it has taken. I also don't really hope it will for the same reasons.
> It's not meant to be any one thing.

Well more so than other federated protocols. matrix has a strong emphasis on resistance to censorship and network splits, at the price of metadata leakage. In contrast, AP/XMPP assume every server is a tiny kingdom (no content is owned by more than one server). matrix usecase is really cool but could have been built on top of existing federated protocols without reinventing a new ecosystem.

Can't wait for proper interoperability between the three big federated networks (Matrix, XMPP, ActivityPub). The previous discussion on HN about this topic didn't go very far: https://news.ycombinator.com/item?id=26279906
Desire for superiority over other people is instinctive. I don’t believe it’s something that can be “taught” out of existence.
Web Component: Why You Should Stick to React
The vast majority of software engineers can’t change employer?
I am very curious about this idea of yours.

Do you have a draft drawing of the concept or could you otherwise elaborate a bit more?
people don't care about privacy, but at the same time if facebook (or whatever) didn't mine your information when you signed up first and you had to go deep into the settings to turn on tracking, nobody would care about that either. they just care about being able to do xyz for free.

do you know about the safe network? that seems relatively easy. the way its being designed is that you will have to log-in to access the network (which does add complexity compared to now) but the idea will be that you can sign up for websites and services using your log in ID. so you dont have to share your name or email address and there will be no need for a service to store your password
Congrats and thanks for sharing.
On the contrary, knowledge of aesthetic standards is something that is sorely lacking these days. Thousands of very thoughtful, very intelligent people have spent time thinking about things like the proper way to drink tea.

Perhaps instead of brushing them away with a middlebrow dismissal, open your mind a little to the possibility that the world is more complex than you think it is.

Edit: to add to that, for anyone that is curious. There is a pretty rich history in writing on tea, especially in China and Japan. Food aesthetics is also becoming a bigger subfield in philosophy too, usually categorized under everyday aesthetics.

https://en.m.wikipedia.org/wiki/The_Book_of_Tea

https://en.m.wikipedia.org/wiki/Japanese_tea_ceremony

https://plato.stanford.edu/entries/aesthetics-of-everyday/

https://www.gutenberg.org/ebooks/769
You should also try D to see that seamless C interop has always been there for many years.
This is what happens when several orthogonal concepts are distilled into two categories. Nobody actually knows what left or right actually mean. Originally it was just about economic policy, left being larger government, right being smaller (no party was extreme because that's insane). Now right can also mean authoritarian or racist. To many it's simply left=good, right=bad.
Anecdotal counterpoint - 7 Segs can provide a hard to beat minimalist esthetic to a design, to me it is one of the major appeals o the KORG microKORG synthesizer. (not really arguing with the point of the paper, but design also can matters)
I think Rust macros are actually more powerful than templates
The example you give - reselling tickets, is actually something that is directly something ticket sellers want to discourage, crypto doesn’t solve that.
Just because you are the one who said no does not mean the other one is whimsy or buying stupid things.

It really depends on whose non essential wishes are getting more funds in familly overall, whether there would be a strategic problem and so on.

But if your partner is annoyed so much over how money are spend, something is very wrong. Because regardless of who is right or whether split is fair, you are building long term ressentment problem. The attitude of "I get to have last word them partner not liking it is childish meltdown" destroys relationships.
Which suffer just as many security issues if you try to do something complex with them.
Maybe defining a "Port" trait and using the dynamic type instead of the static one is a solution.
> The Kobo firmware includes (but doesn't advertise) ZIM support

This is one of the nicest hidden features/easter eggs I've ever come across. Thanks for sharing this!
> smelled like elitism and I had to call it out

It's not elitism. It might be a lack of empathy, but it's not premeditated.

The thing is that, being the live environment in the vein of Smalltalk is a major selling point of Emacs. Being able to interactively evaluate and debug code of the running system is meaningless if you don't use it to code and debug. It's easy to assume that if you don't want to do this, you should choose another tool.

This doesn't mean that "not going deep" is somehow wrong, obviously, but it also doesn't mean that going there is elitist. And from the perspective of someone who did "go deep", debugging your config once in a while is actually not a big deal. It's certainly more pleasant than debugging most anything else.