1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
[[!meta title="New in hyperdrive.el: quick install, peer graph, transclusion!"]]
[[!meta copyright="Copyright © 2024 Joseph Turner"]]
[[!inline pages="internal(2024/info/hyperdrive-nav)" raw="yes"]]
<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->
# New in hyperdrive.el: quick install, peer graph, transclusion!
Joseph Turner - <https://ushin.org> xmpp:discuss@conference.ushin.org (XMPP MUC for USHIN discussion), <mailto:contact@ushin.org>
[[!inline pages="internal(2024/info/hyperdrive-before)" raw="yes"]]
[hyperdrive.el](https://ushin.org/hyperdrive/hyperdrive-manual.html) is an Emacs interface to [hyperdrive](https://docs.holepunch.to/building-blocks/hyperdrive),
a mutable, versioned, peer-to-peer shared
filesystem. Among other things, hyperdrive.el has
these features: Share unlimited files of unlimited
size; Explore file history with built-in
versioning; Stream video and audio; No signup or
account creation; Free as in Freedom!
Since [last year's EmacsConf talk](https://emacsconf.org/2023/talks/hyperdrive), `hyperdrive.el` grew some new features, including:
- Easily install the gateway program with `M-x hyperdrive-install`.
- Visualize your network of sources as a graph or a list.
- Transclude snippets of hyperdrive files with [hyperdrive-org-transclusion](https://elpa.nongnu.org/nongnu/hyperdrive-org-transclusion.html).
This talk will show off these new `hyperdrive.el` features in action!
Feel free to join our public XMPP chat room!
- xmpp:discuss@conference.ushin.org ([Join anonymously from your browser](https://anonymous.cheogram.com/discuss@conference.ushin.org))
- \#\_bifrost\_discuss\_conference.ushin.org:aria-net.org (Matrix bridge)
Bugs can be submitted to the [ushin issue tracker](https://todo.sr.ht/~ushin/ushin). Patches, comments or questions can be submitted to the [ushin public inbox](https://lists.sr.ht/~ushin/ushin).
About the speaker:
I'm Joseph Turner. I enjoy fiddle, Aikido, peer-to-peer networks,
Emacs, and swimming in cold water. I work with
[USHIN](https://ushin.org/), a tiny educational US nonprofit whose
mission is to promote personal, community, and global health through
free and open universal shared information for everybody.
See also: [EmacsConf - 2023 - talks - hyperdrive.el: Peer-to-peer filesystem in Emacs](https://emacsconf.org/2023/talks/hyperdrive/)
# Discussion
## Questions and answers
- Q: Hi there, thank you for your talk - I enjoyed watching it! I
tried this tool last year, and it seemed to work well - but I don't
know anyone who actually uses it. Network effects are tricky - do
you know of any public shares people can join to try this tool out
properly? Thank you!
- A: Yes, network effects are indeed tricky. Hopefully, the peer
graph can help with this. That said, here are some hyperdrives
I know of:
- [https://ushin.org](https://ushin.org) -
hyper://aaj45d88g4eenu76rpmwzjiabsof1w8u6fufq6oogyhjk1ubygxy/
- [https://blog.mauve.moe](https://blog.mauve.moe) -
hyper://1m51x54k3fwbuec5z4edbathiq3aj6bew8b556ezrszizskogo3o/
- [https://hypha.coop](https://hypha.coop) -
hyper://zdouwaei9kc5zbk93w5dakbr8maayupojthf3eafo16s4d5pbsry/
- Q:One usecase for this is sharing and building upon second
brains/zettelkastens"denote or org-roam" but a blocker from me
wanting to make one public is wanting to use a blocklist or
whitelist so I can make them containing useful information for only
my while also being useful with in a public sense
- A: Rephrasing: how to keep the content of a Zettelkasten
private, and only have parts of it be public?
- If the desire is only to share certain files in the
Zettelkasten, M-x hypedrive-mirror can do this
- Can specify either a regexp that matches some of the files
that get uploaded to a directory of files on a machine (and
only those files will be shared)
- It can also be a lambda, i.e. anything that can be
formulated as a function
- E.g., with Karl Voit's filetags (or Prot's Denote
filenaming scheme), you could share only those files which
are tagged as "public".
- Q: idea: try hyperdrive to distribute WORG (and EmacsWiki)
- A: Great idea!
- Q: Could you comment on the "visualization" thing, (org
visualization), and your experience with this type of content in
buffers and the various possibilities (svg, etc.)?
- A: We submited a patch which was merged in Emacs 30 to make
image maps (the "overlay" which makes images clickable and
have hover-over help-echo descriptions) transform along with the
image, e.g., if you zoom in on an image, the clickable map still
matches the zoomed-in image.
- A: In hyperdrive-sbb-view.el, we build a Graphviz string based
on the peer relations data, then call out to the external
graphviz process twice, once for the svg and once for the
cmapx. Then we build an image map based on the cmapx string.
We put the image and image map together and render it in a
buffer. I also adapted some code from image-mode.el to make the
image resize whenever the buffer's window resizes. For
details, see
[https://git.sr.ht/\~ushin/hyperdrive.el/tree/master/item/hyperdrive-sbb-view.el](https://git.sr.ht/~ushin/hyperdrive.el/tree/master/item/hyperdrive-sbb-view.el)
- A: This approach is directly inspired by org-graph-view.el, by
Adam Porter (github alphapapa).
- Q:What is something surprising about how you or somebody else that
you didn't expect from using the hyperdrive network?
- A: Don't quite understand the question. I think the surprising use case for it is to be able to share say a bunch of Org files, link between those Org files... You could use transclusion to to have a discussion and then you could collaborate on on projects using this sort of asynchronous communication using hyperdrive files. If there's a more specific question, I'm happy to answer it better.
- Q: You mentioned streaming audio and video - could you confirm that
this is in reference to consumption of media, and not broadcasting
of it - right?
- A: Since the network is peer-to-peer, audio and video is
streamed between peers.
- So this is all shared on a peer-to-peer network. So if I have a file on my machine that's a video or audio and I'm advertising on the network that people can download it from me, then if you want to download that video and I have a copy of it, when you click on that video in your hyperdrive, not only does it download it from me, but also you can stream it so you don't have to download the whole thing before watching it. So it is both in terms of serving the file and downloading the file.
## Notes
- The "sources, blockers, blocked" idea was influenced by:
- Alex Cobleigh :
[https://cblgh.org/trustnet](https://cblgh.org/trustnet)
- the safe hyperdrive feature was designed in part based on org-safe-remote-resources. I'd be curious to hear thoughts on how something like this could be improved or generalized.
- ooo nice graph
- Perhaps a function which accepts buffer-file-name and returns non-nil if it's safe to call set-auto-mode
- also, there was off list discussion related to CVE: untrusted-content
- untrusted-content is a variable
- we also discussed generalization of this idea with trusted/untrusted files to define them based on file location
- in a way it is similar to code blocks inside Org files
- not sure if all this is relevant to hyperdrive
- It definitely could be. It could be useful to enumerate the different potentially dangerous interactions we could have with files.
- (1) enabling a major mode (2) enabling file-local variables (3) including remote content (4) evaluating code blocks
- You might want a file to automatically set major mode but not evaluate code blocks, so more granular control would be useful.
- I think that allowing the user to set these safety settings based on buffer-file-name would benefit hyperdrive.el, eww, and any other remote protocol.
- nice!
- impressive!
- idea: try hyperdrive to distribute WORG
- better yet, those EmacsWiki "packages" that are getting rediscovered every decade or so, if they're not going to end up on a git host (as per its opinionated author's non-interest to do so if I'm not mistaken)
- putting EmacsWiki on hyperdrive would be useful too!
- YouTube comment: Awesome.
[[!inline pages="internal(2024/info/hyperdrive-after)" raw="yes"]]
[[!inline pages="internal(2024/info/hyperdrive-nav)" raw="yes"]]
|