I'm the Trystero author and I'd say both libs attempt to accomplish the same goal but with very different APIs. One key difference is PeerJS uses a single centralized server by default for matchmaking, whereas Trystero offers lots of flexibility and redundancy, using various signaling connections in parallel.
I have a side project that aims to organize your ebook highlight collections with on-device semantic search. [1] Right now it only indexes your own content but I'd like to add a mode that allows you to share your collection and let others find relevant ideas via semantic search -- a discovery platform for ideas found in books. It's open source if you want a sense of how it works now. [2]
This looks exciting and I'm pleased to see more and more frictionless ways of making p2p apps. I've been building a somewhat similar hobby project [1] that aims to connect peers in the browser by piggybacking on open protocols out on the net (BitTorrent, MQTT, Nostr, IPFS, etc).
This project seems to be using Hyperswarm which I've looked at for use as a peering medium but it seems like it's not supported in the browser. I'd love to implement it if that story changes since it's so easy to distribute apps on the web.
Sorry if this is silly question but just because I have an ipv6 address doesn't mean anyone else with an ipv6 address can communicate with me, right? Here is my simplified understanding
(You) <-- (lots of stuff) --> my modem <--> my router <--> my phone
So like even if you had my ipv6 address, am I really addressable? Like can you ping my phone? Send me files across the Internet?
Thank you for answering. I have so many questions but I'll start with this... When I ping an ipv4 address from outside the home, if something responds to the ping it is my modem/router, right? As in even if I had no computers in the house, you couldn't tell the difference when you ping my ipv4 address, right? My Internet service provider owns my IPv4 address, not me, right? What changes with ipv6? The ISP still owns the IP addresses and is free to reassign them wherever? It isn't like a phone number where I own the number and have a right (in the US) to port it?
> When I ping an ipv4 address from outside the home, if something responds to the ping it is my modem/router, right? As in even if I had no computers in the house, you couldn't tell the difference when you ping my ipv4 address, right? My Internet service provider owns my IPv4 address, not me, right?
Right. IPv4 addresses are expensive, so it's uncommon to have more than one at home.
> What changes with ipv6?
Not a lot. You just have many addresses instead of one. If there were no firewall, someone could ping your router or individual devices, as they have different addresses.
> The ISP still owns the IP addresses and is free to reassign them wherever?
Yes.
> It isn't like a phone number where I own the number and have a right (in the US) to port it?
Correct. You would need direct BGP access to use a portable IPv4/IPv6 address. That generally is not available on residential connections.
This is a really nice overview of the nuances of WebRTC.
If you want to try this tech at a higher level, I maintain an experimental hobby project that attempts to abstract all the complicated parts of WebRTC into a simple API. Most importantly, it obviates the need to run your own signaling server by piggybacking on various public protocols like torrent trackers or IPFS to match peers. It's well-suited for quick projects/prototypes.
Trystero is magic. I am baffled that it doesn’t have thousands of stars on GitHub. I’ve used it in several projects and it Just Works. Thank you for the incredible library dmotz!
A decade ago I built a silly JS library for folding up DOM elements like paper [1] and I eagerly anticipated using element() instead of tediously cloning nodes for every fold. Here we are ten years later and this niche CSS feature has yet to be adopted by the other browsers. Similarly, I thought I'd soon be using the CSS custom filter spec from the same era (which allows custom GLSL shaders to be applied to elements), but it also has yet to pick up traction.
My understanding was that browser makers looked at the CSS custom filter spec and decided they were too difficult to implement securely[0].
On one hand, I definitely appreciate that, I'm glad to see a feature abandoned if it's being abandoned because it's impossible to do it safely. On the other hand... I wanted CSS custom filters so much and I still regularly think of things I could have done with them :)
There's already enough problems with CSS and what it can do that I want an add-on which either disables it entirely, or allows only a tiny subset of it.
I can appreciate a clever use of CSS the same way I can with JS but for my day to day browsing I don't want either being able to do whatever it wants because far too often what websites use it for is user-hostile.
CSS shaders are the kind of feature that I would get a ton of use out of for specific projects, and would also very likely either turn off entirely or at least put behind a permission in my own personal browser.
I get why they're likely a bad idea, I'm not saying they should be implemented. It's very likely the right decision to get rid of them. I just mean... I want them XD
I built a tool for myself for the purpose of grokking ideas from books called Emdash [1]. Over the years I've collected reams of highlights from books and articles but until recently, rarely reviewed or absorbed them. The core of this app uses on-device ML to show related passages with similar ideas from other books you've read, and I find that going broad and exploring concepts from different angles really helps in comprehension.
I'm testing out a summarization/rephrase feature backed by LLMs that you can try in the demo. In HN fashion I'm trying to build this openly and gather feedback to see what works. I'd like to push this further in the active direction the article mentions with something like a Socratic dialogue mode where you're nudged to re-explain and examine ideas.
If anyone uses this thing/has feedback, let me know. Source is available too [2].
This is cool. I imagine instructors creating instances for their classes so the whole class can engage with each other's notes.
I wonder if one could couple it with OCR so that you could point a phone at a page and drop into an emdash experience on the text that you've got a physical copy of. Or, you know, point it at your kindle so that your notes aren't locked into their ecosystem.
I'm building a backend that would support that kind of thing in a peer to peer kind of way (indexes content by piecewise hash so that you can recognize content you or your peers have annotations for and reattach those annotations despite differences in pagination, etc). If I ever get it into a demo-worthy state, I may reach out to see if we can make them work together.
This is such a neat tool. The presentation is very pleasant. Is the intention to have the snippets/notes be shareable in the future? I actually made a similar tool [1] (though your's is much more complete), which I use to quickly find passages and relevant text when I'm blogging. And, I was thinking it might be really useful to have highly rated notes on a snippet available so that you can get someone else's insight on a particular selection. I'll give this a more in depth look later when I want to write another blog post.
Thanks for sharing, I like the name and I'll try it out. Yes, I'd like to add opt-in sharing features in the future -- seeing others' notes can be very insightful as you said.
I tried 'related' with a couple of passages. For the first passage, the first result was a good semantic match, but the rest were a little too far off. For the second passage, the results were amazing.
Perhaps for the first you just didn't have any more snippets that were closer?
Are the related snippets taken from a selection of snippets you created, or from the full text of other books?
A nice workflow might be to select a passage I'm reading in a book, and then see related passages from other books. But that requires I have DRM-free ebooks, and that these have already been chunked and indexed.
Yes, the demo mode is a random subset of things I've highlighted and it's heavily weighted around certain topics and sparse on others, so that's why some passages don't have the strongest semantic matches.
You're right that it would be nice to see things in situ as you're reading, but it would seem that most e-reading experiences are locked down. I appreciate the feedback!
I've been looking for something like this to review books. Two suggestions: 1. allow to load a book from a url, so notes could be added to arbitrary books; 2. allow to select text and add notes to that selection.
Direct link to the underlying source code.