HNHacker News
TopNewBestAskShowJobs

rklaehn

1,071 karma · joined October 16, 2017

submissionscomments
rklaehn··on Iroh: A New Implementation of IPFS
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 content discovery and content sync in ipfs leaves something to be desired. And also, probably due to this, there is also a lack of tooling for such use cases.

The "shared wikipedia" use case is one I specifically would like to solve. Compared to some other things out there, it is a relatively small data set. And lots of people would be willing to help share wikipedia. So it makes for a great test case.

rklaehn··on Iroh: A New Implementation of IPFS
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 going to experiment with such improvements, and try to work with protocol labs to standardise them if/when we come up with a good solution.

rklaehn··on The Internet needs the InterPlanetary File System
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 when you want some bulk data via bitswap they just ask their current peers. Either the emitter of the data is a current peer, then it obviously has it. Or eventually one of your peers will replicate the data, and then you will get it with some delay.

The latter happens frequently if a part of the swarm is behind a NAT. You have some delay, but eventually everybody gets all events.

rklaehn··on The Internet needs the InterPlanetary File System
ipfs-embed is using rust-libp2p and official protocols like gossipsub. So for that it is fully compatible with the ipfs network. At least as compatible as you can get when the specs are sometimes vague.

Bitswap has a compat mode, but when two ipfs-embed versions talk to each other they use a different protocol.

Note that ipfs-embed is made for a different use case than the global ipfs. It is typically used by private swarms where there are a smaller number of nodes. So e.g. we don't use the DHT at all.

We also found that go-ipfs compat is not that useful for our use case, so the compat layer was mainly done as a service to the community and might not work with the latest go-ipfs / kubo.

rklaehn··on The Internet needs the InterPlanetary File System
I will talk about it at IPFS camp 2022. I hope it will be recorded.

Here is my talk about actyx from IPFS camp 2019: https://www.youtube.com/watch?v=Qzu0xtCT-R0 . It does not go into much technical details, and it does not describe the current architecture but a previous iteration though.

rklaehn··on The Internet needs the InterPlanetary File System
It has some performance and reliability problems. Some of them are just a matter of writing a better implementation, some are more conceptual.

But the basic principle of a content-addressed, distributed file system is desperately needed, and there is a lot of work going on behind the scenes from both protocol labs and others to fix these problems...

Stay tuned :-)

rklaehn··on The Internet needs the InterPlanetary File System
In recent years there has been a large growth of alternative IPFS implementations. Partly because of different needs, partly because of unhappiness with the performance and reliability of the go-ipfs implementation.

At my previous company actyx.com we wrote our own ipfs implementation in rust called ipfs-embed ( https://github.com/ipfs-rust/ipfs-embed ) that serves as the storage for our distributed event sourcing system. It is used in production and is reliable.

The user of an Actyx deployment will not notice in any way that they are using ipfs in the background.

There are also some other interesting developments involving ipfs and rust. See a list of implementations here:

https://docs.ipfs.tech/basics/ipfs-implementations/

rklaehn··on The Internet needs the InterPlanetary File System
If you run an open gateway, people can indeed request content via your gateway unless you have explicitly blacklisted it.

But if you run just a node, everything that is on the node is there because either you have added it or you have explicitly requested it.

IPFS is not like freenet or other systems that shard data over all participants.

rklaehn··on Arrest of suspected developer of Tornado Cash
There are many non criminal use cases for private electronic transactions - just as there are for cash.

So why is it a crime to build a thing that has both legal and illegal applications, like knifes, guns, dollar bills, gold coins, ... ?

And don't get me started with "Most activity on tornado is illegal". It is a privacy service. So unless it is broken we don't know this. Are we going to take the word of the "Authorities" for this?

rklaehn··on How “let it fail” leads to simpler code
In rust, you can use the excellent anyhow crate https://docs.rs/anyhow/latest/anyhow/ . It has various ways to add context to an error, and will automatically attach a stack trace with the backtrace feature.

Explicit or implicit panic of course also attaches a backtrace. It can also be caught, although that is a can of worms. So panicing is the closest thing rust has to exceptions - somewhat similar to java.lang.Error on the jvm. https://docs.oracle.com/javase/7/docs/api/java/lang/Error.ht...

With anyhow, error handling in rust really is quite pleasant.

rklaehn··on Lilium achieves first main wing transition for all-electric aircraft [video]
There are also big cities outside America. Plenty of helicopters in Sao Paulo...

https://www.youtube.com/watch?v=uiybWbyfQIY

rklaehn··on Lilium achieves first main wing transition for all-electric aircraft [video]
> Having motors along the whole trailing edge of the wing surely kills the glide ratio of this, right?

The motors are running at reduced thrust and changed geometry during all parts of the flight.

Regarding power loss: Last time I read about it in more detail, the impellers were organised in groups of 3, and you could lose one such module anywhere on the plane, even on the front canards, without issues. On the wings you could probably lose several.

If you lose all electricity everywhere that would be a bad day, but the same is true for a modern airliner with fly by wire controls.

rklaehn··on Lilium achieves first main wing transition for all-electric aircraft [video]
> Well if we're talking about commercial aviation, we're talking about jet fuel not gasoline. Regardless, it obviously matters a lot. A fully loaded 747 freighter has somewhere around 200 tons of jet fuel and a max payload of about 130 tons.

You only need giant quantities of kerosene for transoceanic or transcontinental travel. The lilium business model requires a range of a few 100 km, which is possible with today's batteries.

Very long distance air travel is impossible with today's commercially available batteries, but is possible with exotic chemistries (see below) or with hydrogen fuel cells.

> This doesn't jive with what I've read. It's my understanding that we're already near the limits of what electrochemistry can give us, and future advancements are likely to come from improved electrode designs, with maybe 2-3x better performance possible if we're lucky.

There are several battery chemistries such as lithium sulfur or lithium air that have extremely high energy densities. But cycle life remains very low, which makes them uneconomical.

There has been decent progress made in improving cycle life, but it is still too low to be economical. There are military applications where a low cycle life is acceptable.

rklaehn··on Lilium achieves first main wing transition for all-electric aircraft [video]
Yes, and they are improving by a few percent every year. No major breakthroughs, but compounding improvements year over year, which do add up.

Batteries have improved incredibly in my lifetime. As a kid I had an electric RC plane that barely made it off the ground. Now you can get pretty cheap aerobatic RC planes that easily compete with gasoline powered models.

Battery powered screwdrivers used to be incredibly underpowered. Now I have a very decent battery powered rotary hammer...

https://cdn.arstechnica.net/wp-content/uploads/2021/05/bnef_...

rklaehn··on Lilium achieves first main wing transition for all-electric aircraft [video]
This is a major milestone for them. Very nice to see the indicators suddenly transitioning to laminar flow.

It is a shame that they only stayed in this flight regime for a few seconds, but they will now gradually expand the envelope.

Here is a good article explaining the tradeoffs they make vs. more traditional VTOL craft with larger propellers: https://ir.lilium.com/news-releases/news-release-details/tec... . TLDR: they accept more inefficient performance during hover because they won't stay in this flight regime for long.

rklaehn··on Lilium achieves first main wing transition for all-electric aircraft [video]
The energy density of gasoline does not matter at all. Batteries are good enough for some applications, like short distance flights. And the operating costs for use cases where batteries work strongly favour batteries.

Power density has not been a problem for a while. We are not anywhere near the theoretical limits of battery energy density. So as soon as there are some commercial applications for battery powered flight, there will be a strong economic incentive to get closer to the theoretical limits.

Current jet engines are absolute engineering miracles that go very close to the physical limits to get maximum efficiency. But it took several decades to get there.

rklaehn··on I may be fired over AI ethics work
While in this particular instance the concerns might be unfounded, I think this raises an interesting question: what criteria do we have to attribute sentience to an entity? These are exactly the questions an AI Ethicist should think about.

You would think that the easiest way to demonstrate that LaMDA does not have sentience would be to have a conversation with it where it "loses the plot". Did Google do that?

Here is a comment from lesswrong.com which is probably what happened: https://www.lesswrong.com/posts/vqgpDoY4eKyNnWoFd/a-claim-th...

"It's neither a hoax nor a HLAI, instead a predictable consequence of prompting a LLM with questions about its sentience: it will imitate the answers a human might give when prompted, or the sort of answers an AI in a science fiction story would give."

rklaehn··on Time-Series Compression Algorithms
I tried this with real data (Satellite and Columbus module telemetry). At least for the timestamps, it is always a big win, because values are typically being sampled at a precisely or at least somewhat regular frequency.

For sample values, it is not as clear cut. The best way I found is to just try both approaches and use the one that results in better compression, if you can afford it. But for values I usually don't bother.

rklaehn··on Time-Series Compression Algorithms
I have found that a very good approach is to apply some very simple transformations such as delta encoding of timestamps, and then letting a good standard compression algorithm such as zstd or deflate take care of the rest.

Delta encoding of timestamps helps a lot though, because it makes the redundancy more visible to a general purpose compression algorithm.

I used this for the telemetry storage of the Columbus module of the International Space Station, back in ~2010, and then a few times since.

http://blog.klaehn.org/2018/06/10/efficient-telemetry-storag...

https://github.com/Actyx/banyan

rklaehn··on Twitter set to accept Musk's $43B offer – sources
Not sure what is so hard about this.

The mission of Tesla is not free speech, but to accelerate the transition to sustainable energy. Tesla seems to be doing just fine without a PR department, so it seems he was right to shut it down.

The mission of SpaceX is to make life multi-planetary. So of course there is no right to free speech for the employees.

But the mission of twitter should be free speech within the bounds of the law, at least according to Elon.

Currently it seems to be to move the Overton window so much to the left that you can be banned for giving the definition of what a woman is that was commonly accepted by everybody in 2010.

rklaehn··on Twitter set to accept Musk's $43B offer – sources
Indeed. The window of opinion that is allowed on twitter is anti space exploration and frankly anti-human. Elon needs a way to sway public opinion to allow mars settlement. Twitter might be that.

Currently, SpaceX is blocked from doing the first starship orbital test. Not for technical reasons, but for frankly totally bullshit bureaucratic reasons. A free speech twitter might be the right way to fight back against this government overreach.

rklaehn··on Show HN: Building mobile apps in rust and flutter
Friend of the author here.

What is nice about this is that it allows you to get started with using rust for mobile development in no time at all. You need the usual tools (e.g. adb, llvm, clang), but once you got them you will have an android or ios app on the phone in a few minutes that has rust business logic.

Before this, I would not have bothered doing mobile dev using rust. While not hard, getting all the tools to work with each other is no fun at all. Nothing I would do for fun.

Tip: x doctor gives you a list of versions for all required tools. This will allow you to figure out if something is missing.

rklaehn··on Locutus: A platform for building decentralized apps, from the creator of Freenet
Yes, there is a lot of awesome stuff that just works. SSB, the entire DAT/hypercore community, tools like syncthing that just do one thing well.

I like the SSB approach of just embracing subjectivity. I was quite amazed when discovering all this at dtn.is (Before I only knew the IPFS community).

But I feel there is still something missing for very wide spread adoption.

What we are trying to do with TLFS is to combine

- a CRDT with strict schema ( Adapted from https://arxiv.org/abs/1603.01529 )

- a built in way to do schema evolution ( Adapted from https://www.inkandswitch.com/cambria/ )

- local first / p2p deployment and operation even for native apps, based on https://github.com/libp2p/rust-libp2p , faciliated by https://github.com/cloudpeers/x

We're not nearly there yet, but ideally it should be so easy to write small collaborative apps that it is a good option even if you don't care about the idealistic motivations for decentralized apps.

rklaehn··on Locutus: A platform for building decentralized apps, from the creator of Freenet
There are plenty of options for long term storage of large assets in a decentralised way. Also, decentralised does not have to mean that you don't use traditional cloud providers.

What is missing is a really polished way to do decentralized apps, so that you don't have to think about the decentralized aspect all the time, but just use it because it is the best option. But it is coming.

Full disclosure: hacking on something to make writing decentralized apps easier: https://github.com/cloudpeers/tlfs

rklaehn··on Locutus: A platform for building decentralized apps, from the creator of Freenet
It is really hard to see how this is intended to work from the README. Where is a good example of the programming model? This one? https://github.com/freenet/locutus/blob/main/contracts/test_...

Since this is written in rust: is there also a version of freenet in rust in the works?

rklaehn··on Show HN: Zaplib – Speed up your webapp with Rust+Wasm
Yes, I also went with the 1st one.

Basically the main thread sends a command to an io executor thread, and then waits on the result, which is done using atomics under the hood.

See e.g. https://github.com/cloudpeers/radixdb/blob/sqlite/browser/sr...

Can't wait to play with zaplib. Can you also use it as just a standard library without the GUI part?

rklaehn··on Show HN: Zaplib – Speed up your webapp with Rust+Wasm
This looks awesome. I have been playing with WASM and rust, trying to get rusqlite to work with persistence, among other things.

I notice that you also came to the conclusion that having all io async is not the way to go for rust.

How do you wrap the async js io apis so they can be used in sync rust? I have seen different approaches for this: 1. an additional service worker / thread and atomics. 2. rewrite the entire WASM in some sort of continuation passing style.

rklaehn··on Veloren is a multiplayer voxel RPG written in Rust
This is great. My kids are very much into minecraft. I am very much into rust.

I would love to help them make the step from playing games to hacking on games. This was very simple back when I was a kid, but is quite hard now. The games you can make are so much less impressive than the games they are used to.

rklaehn··on Starship Update [video]
Once mars settlement gets going, the moons of mars Phobos and Deimos also make for attractive targets.

It might be that once starship works, we do all kinds of things, and it turns out that asteroids work better than planetary surfaces. So the belt becomes the focus of economic activity, and the mars colony is just a novelty kept alive by the Musk Foundation.

rklaehn··on Core War
I remember as a kid, being annoyed that you get penalised for replicating. This is different to nature, where replicating gives you more "processing power".

So I wrote a version where every thread was running at the same speed, but that was always dominated by very simple replicators.

Then I tried to figure out how to have an instruction set where all instructions run at the same time. But I could not come up with something that worked well.

Recently I wrote a "cellular automaton with provenance" thing. Basically game of life, but you track the originator of each cell. That is fun, but also does not lead to a good game as far as I can see.

← PreviousPage 6 of 10Next →