Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 186 words in the discussion.

Trending Topics

#iroh#fan#javascript#api#typescript#docs#webassembly#example#comes#peer

Discussion (4 Comments)Read Original on HackerNews

shermantanktop•about 4 hours ago
This is interesting as an example of just how complicated and elaborate a toolchain you can use to build something dead simple.

There’s a lot that comes for free by adding all these libraries and crates and steps. But from what I can tell it comes down to:

let _ = if fan_on { fan.set_high() } else { fan.set_low() };

klooj•about 3 hours ago
iroh is a peer to peer networking technology so the project example of controlling a fan isn't so much about the fan but rather that it's controllable from anywhere through an esp32 microcontroller that can maintain a resilient connection endpoint even through power cycles and so on. I think iroh was posted about on HN a few weeks ago and I had a similar reaction of like...what in the world is this blog post even saying haha. But I found their docs page and found it pretty fascinating learning! https://docs.iroh.computer/what-is-iroh
rwmj•22 minutes ago
I use a fan with an on/off button.
skybrian•about 4 hours ago
It's unclear to me why they needed to compile Rust to WebAssembly to write a website. It looks like iroh has a JavaScript API:

https://docs.iroh.computer/languages/javascript

Edit: actually, that's a Node.js-specific API. For browsers, it seems like they should have a platform-independent JavaScript/TypeScript API that includes a WebAssembly file (if needed) instead of expecting you to compile WebAssembly yourself.

nine_k•about 3 hours ago
Not touching JavaScript might be a reason enough. (Though I bet it has a Typescript API, and Typescript is great.)
croes•37 minutes ago
Typescript is nothing without JavaScript