Readit News logoReadit News
sabageti commented on Changing the Rules of Rust   without.boats/blog/changi... · Posted by u/kevincox
hedora · 2 years ago
The lack of a Leak-style trait is so painful for me that I’d strongly consider switching to a different language that was basically just rust + Leak. (Adding move and removing pin would be nice to have too.)

The problem with not having Leak is that it forces all futures to be ‘static, which effectively disables the borrow checker whenever you cross an async spawn boundary.

Arc is the standard solution, but, for multi-threaded code, it can be expensive (though also more predictable, in fairness) than having a GC.

The only other solution (which I prefer) is to use an unsafe version of spawn that assumes the future it returns will not be leaked.

This certainly breaks the rust promise of supporting safe, zero cost abstractions.

sabageti · 2 years ago
I have seen many comments like this, and I would like to understand better I feel like I'm missing something. In my daily use case(web api) of async rust we use rarely spawn. What are the use case of intensive spawn usage ?

And there is tokio::spawn_local() that doesn't require Send

sabageti commented on Magnus Carlsen to give up World Championship title   chess24.com/en/read/news/... · Posted by u/CawCawCaw
adrianN · 3 years ago
NP-hardness is indeed often not a big deal in practice because NP-hardness is a statement about asymptotic worst case complexity. In practice you have some finite size problems that are often of average difficulty, not of worst case difficulty. For example, we solve instances of SAT every day, some of them quite large. Even humans are able to solve many Sudoku puzzles, even though Sudoku is NP-hard.

If you hang with the right crowds (for example people into software correctness), PSPACE completeness is easy and you even solve undecidable problems every day.

sabageti · 3 years ago
How Sudoku is NP-Hard?
sabageti commented on Java 18 / JDK 18: General Availability   mail.openjdk.java.net/pip... · Posted by u/todsacerdoti
dfee · 3 years ago
But the problem is that checked exceptions create the same “what color is your function” problem for errors.
sabageti · 3 years ago
It isn't? You have a function red that doesn't throws anything you use a function blue that throws checked exceptions you handle the exception and it's all. The red functions doesn't become blue.
sabageti commented on Eyeo wins German copyright decision, sets legal precedent for who ‘owns’ HTML   eyeo.com/eyeo-wins-copyri... · Posted by u/rmoriz
elsjaako · 4 years ago
Turns out I'm wrong, at least in Germany and France.

Authors have "moral rights of integrity" over their work, which means you can't modify a work without permission of the author, even if you own it.

https://meta.wikimedia.org/wiki/Wikilegal/Moral_right_of_int...

sabageti · 4 years ago
You forgot the important, the moral part is only enforced if: “the modification in question does not have to be detrimental to the author's honor or reputation in order to qualify as a violation of the right of integrity.”
sabageti commented on Ask HN: What problem are you close to solving and how can we help?    · Posted by u/zachrip
graphcolorer · 4 years ago
Can take as long as needed as it only needs to be colored one time. About 10,000 nodes, reasonably dense (about half the nodes will have 1,000+ edges).
sabageti · 4 years ago
What did you try to color the graph ? CSP ? Classic backtracking ? With how many colors it must be colored ?
sabageti commented on Ask HN: What problem are you close to solving and how can we help?    · Posted by u/zachrip
graphcolorer · 4 years ago
I have a graph with weighted edges. I want to remove edges to make the graph colorable with N colors (e.g. N=40) such that the total weight of removed edges is minimized. If I'm able to solve this problem, that will complete a project I've been working on for years now to make a working keyboard for a person I know that has cerebral palsy.
sabageti · 4 years ago
What are the needs in time?

u/sabageti

KarmaCake day11August 29, 2021View Original