Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rklaehn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
121.
▲
by
rklaehn
3y ago
I think this blog post by tomaka gives a good summary of the current issues with async rust. Certainly much more comprehensive than what you can write in a hacker news post: https://tomaka.medium.com/a-look-back-at-asynchron
122.
▲
by
rklaehn
3y ago
Indeed. That means that the interop story for golang is horrible. Golang can somewha work with libraries with C bindings. But you can not publish a golang lib as a lib.so with C bindings because of the runtime.
123.
▲
by
rklaehn
3y ago
I fully agree that the async story needs attention. Something as drastic as backwards-incompatible changes might not be needed. But definitely much more documentation about best practices, highlighting the option of local async tasks, makin
124.
▲
by
rklaehn
3y ago
If you use rust async with a local executor such as the tokio current thread runtime, it provides lightweight cooperative concurrency. There is nothing ever happening at the same time, since you are on a single thread. That is why you don&#
125.
▲
by
rklaehn
3y ago
It's not always that simple. What if your sync lib has some callbacks, and you want to do something in the callbacks that requires async. You could argue that this mismatch exists even with rust itself, where you have Drop, which is sy
126.
▲
by
rklaehn
3y ago
Let's say you are using a low level networking library that is async to the core, like hyper or quinn. Then you will have some ugliness at the boundary. You might get by with just spawning a current thread runtime to use your async lib
127.
▲
by
rklaehn
3y ago
There is quite some support for the second option. But it is not advertised at all . E.g. there is an entire local task pool impl in tokio_util, but it is not enabled by default and at least for me was difficult to find. https://
128.
▲
by
rklaehn
3y ago
Look at the extremely popular async_trait macro crate: https://crates.io/crates/async-trait . What it does under the hood is to box everything. See https://github.com/dtolnay/async-trait#explanatio
129.
▲
by
rklaehn
3y ago
Not sure what you mean by "returning a rust promise". But yes, Arc<Mutex<...>> is a thread safe smart pointer containing a mutex, which has quite some overhead. You will see this in many places in the internals of asyn
130.
▲
by
rklaehn
3y ago
It's OK but not great. Ideally library authors should provide a sync facade so people don't have to deal with this, like reqwest does.
131.
▲
by
rklaehn
3y ago
I can see where you are coming from. But you can do most things purely in sync rust. There are sync rust multithreading libs like rayon that are a joy to use, and there are even blocking versions of popular http libraries like reqwest: htt
132.
▲
by
rklaehn
3y ago
Anecdotal evidence, but many large rust async code bases perform significantly better if you are using a single threaded runtime vs. a multithreaded runtime. Here is an issue for the quinn crate that implements QUIC: https://gith
133.
▲
by
rklaehn
3y ago
Multi threading and concurrency are not the same. You can have a very high performance server that handles thousands of requests concurrently on a single thread. That's how node/deno do things. But the way to do things in async ru
134.
▲
by
rklaehn
3y ago
I think rust does it right in many cases. Raw rust multithreading is a pleasure to use, and some libraries like rayon are extremely unobtrusive. That is why I am somewhat unhappy with the state of async rust. It does not yet have the qualit
135.
▲
by
rklaehn
3y ago
Yeah, it is old. But I only found it recently and did not see a discussion of it yet. I found this quite interesting. I love rust, but async rust always seems almost like a different language. Lifetimes become much more complex and much les
136.
▲
Local async executors and why they should be the default
(maciej.codes)
220 points
by
rklaehn
3y ago
|
306 comments
137.
▲
Local Async Executors and Why They Should Be the Default
(maciej.codes)
7 points
by
rklaehn
3y ago
|
0 comments
138.
▲
by
rklaehn
4y ago
I find cargo (rust package manager) relatively pleasant to use. It's not perfect, but it also is not a constant source of confusion like sbt (scala package manger) was back when I did scala. In the long term, I think the whole notion o
139.
▲
by
rklaehn
4y ago
I don't get the strong opposition to it. Yes, CO2 is a byproduct. And yes, that CO2 might leak out of the wells. But it would still be much better than the status quo, which is hydrogen from fossil fuels, with the CO2 being emitted 1
140.
▲
by
rklaehn
4y ago
This is a very clear cut case of a copyright violation by github copilot: https://twitter.com/docsparse/status/1581461734665367554?lan... In this instance the weights of the AI system just contain an obfuscated co
141.
▲
by
rklaehn
4y ago
In some cases the model will spit out verbatim copies of code. E.g. https://twitter.com/docsparse/status/1581461734665367554?lan... So in this case the weights are not even a derivative work but just a compressed
142.
▲
by
rklaehn
4y ago
But if the AI has been trained on open source licensed code and occasionally can produce verbatim copies of said code, shouldn't the weights of the AI then also become open source under the same license? You could argue that training i
143.
▲
by
rklaehn
4y ago
We will reach out to you once we think iroh is usable enough for your use case. Not before.
144.
▲
by
rklaehn
4y ago
Interesting. I would be fine with an AI being trained on my code, provided that the weights of said AI would then be published under the same license as my code. Is there a license for that?
145.
▲
by
rklaehn
4y ago
I am working on iroh, a rust implementation of ipfs. I have to say that while this dismissal is shallow, it is ...not entirely incorrect... . There is certainly a lot of room for improvement in the current state of ipfs. We would love to ch
146.
▲
by
rklaehn
4y ago
I helped build the mission planning system for several earth observation missions, most notably the TerraSAR-X / TanDEM-X SAR mission. It has created the best global digital elevation map (DEM), surpassing the SRTM data set. https:&#
147.
▲
by
rklaehn
4y ago
In theory, you would create an IPNS entry for the root of wikipedia, then update that on each change. Wikipedia is a relatively static data set, so on a day probably much less than 1% gets changed. So the new wikipedia tree reuses the vast
148.
▲
by
rklaehn
4y ago
iroh contributor here You can kind of handle this use case today. You can download a part of wikipedia, and then people should retrieve content from your node in addition to the official mirrors. The problem is that the performance of conte
149.
▲
by
rklaehn
4y ago
We are going to first try to reach feature parity with the go implementation in the areas we care about. But it is quite clear that there are some drastic improvements needed at the protocol level to get the desired performance. We are goin
150.
▲
by
rklaehn
4y ago
Yes, pretty much. Basically the nodes of the swarm (around 100 at most) gossip events to each other. That is also how they learn about the presence of the other nodes. They try to stay connected as well as the network topology allows. Then
More ›