Show newer

@macdonst I got inspired by looking at how some native UI frameworks do it. E.g. on iOS it seems that "veiws" are a lot more lightweight and you offload more of your data to a database. Similar with some desktop UI frameworks?

I think Electron was made to be that way to an extent with the node.js thread, but people are too used to shoving everything under the sun into the UI in JS land.

My brain is kinda exhausted from first wrestling with Linux and Ansible automation, and then wrestling with JavaScript type hell in trying to get some p2p libraries to work.

Gonna decompress before bed by live-coding a lil in with some basic and

So if you haven't yet, try installing the latest pre-release of Agregore and follow along.

github.com/AgregoreWeb/agregor

@am@decept.org BTW this inspired me to make a lil step by step guide on how to use the devtools in Agregore to publish a p2p gemini site. :P mastodon.mauve.moe/@mauve/1100

Alright! Now that v2.0.0 of Agregore is out, the rendering should be fixed up and it can auto-resolve `index.gmi` under hyper://gem.mauve.moe/ when you visit. You can render the raw directory listing by adding `?noResolve` to the end of the URL such as hyper://gem.mauve.moe/?noResolve

Show thread

Hey folks! The 2.0.0 release of has been tagged and compiled! This features fixes for , an upgraded -Protocol, and better support for when loading it from protocols. This also involves an upgrade of Electron to 23 and an overhaul to using ESM for the back ends.

Download it and check it out for yourself!

github.com/AgregoreWeb/agregor

@jonny Oh! Yeah. There's a bunch of stuff. The main thing is that the connections are a lot more reliable since the DHT and wire protocol got overhauled with new "hole punching" capabilities. The way `Hyperdrive` works changed again so any data needs to be migrated again with new keys.

I'm gonna go fix this mime type issue and add the ability to resolve `index.gmi` and make sure the mime types for `.gemini` and `.gmi` work correctly accross protocols.

But hopefully this has shown folks that it's pretty easy to to get something p2p out there.

Show thread

Now that I have some basics in there, lemme add a DNS address: hyper://gem.mauve.moe/index.gmi

I use namecheap for DNS but you should be able to use whatever you want as long as it supports DNS TXT records.

```
TXT _dnslink.gem dnslink=/hyper/sqtc3rcay8hcg3y8ehcrc66zpiceufstcwupukrggf5eukwp7xdo
```

And bam! I now have a nice looking URL for my blog and it just took a few commands in my devtools and a single DNS record. No servers required!

Show thread

K, lets delete the old file and make a new one:

```
await fetch('README.gemini', {method: 'delete'})
await fetch('/index.gmi', {
method: 'PUT',
body: `
# Mauve's Gemblog!
Wow this sure is something.
Way more advanced than my HTML based blog!

=> blog.mauve.moe
`
})
```

hyper://sqtc3rcay8hcg3y8ehcrc66zpiceufstcwupukrggf5eukwp7xdo/index.gmi

Show thread

@jonny This is in the 2.0.0 prerelease of Agregore? That has the new breaking changes from Hyper. :P

Honestly, this is all you need to get a basic blog up and running. From here you an change the URL in the `fetch()` API call to whatever page you want and add the gemtext into the `body`. Each time you'll be overwriting what was there before.

Whoops! I got the file extension wrong. Seems it's just loading it as Markdown. :P Most of the formatting works anyway. Hopefully folks looking at this in the future will see the fixed version. Also I think I got the file extension wrong?

Show thread

@jonny Yeah, along with a total overhaul of the protocol again. :P

Navigating to the URL will give me an empty index. So first thing I'll do is add my "homepage" under `/README.gemini`. Sadly I don't have a thing to resolve `index.gemini` yet, but I wanna add that next time I get a chance. Gonna read these docs to brush up on my gemtext: gemini://gemini.circumlunar.sp

```
res = await fetch('/README.gemini', {
method: 'PUT',
body: `# Mauve's Gemblog!`
})
await res.text()
```

Now I can reload and click to open the page

Show thread

Next I'm going to use the `fetch()` API to create a new `hyper://` website based on a "pet name" for the key. Every time I use this human readable name it will resolve to the same human-unreadable public key URL.

I got back hyper://sqtc3rcay8hcg3y8ehcrc66zpiceufstcwupukrggf5eukwp7xdo/ which is the public URL for my new site (currently empty)

```
res = await fetch('hyper://localhost/?key=gemblog', {method: 'POST'})
await res.text()
```

Show thread

First thing I'm gonna do is open agregore://welcome to get a fresh page and hit ctrl+shift+i to open up the devtools. You can also use `File > Open Dev Tools` or right click on the page and hit `Inspect`.

Show thread

First, I'm going to create a new based website. This used to be called and I think is now called holepunch.to (all very hard to search for :P ).

You can find the docs for the protocol handlers here: github.com/RangerMauve/hyperco

Show thread

My brain is kinda exhausted from first wrestling with Linux and Ansible automation, and then wrestling with JavaScript type hell in trying to get some p2p libraries to work.

Gonna decompress before bed by live-coding a lil in with some basic and

So if you haven't yet, try installing the latest pre-release of Agregore and follow along.

github.com/AgregoreWeb/agregor

@am@decept.org The URLs look nasty as hell by default since the hostname is a public key, but you can wire up a custom DNS domain using the DNSLink spec. add a `TXT` record for `_dnslink.yourdomain.com` which contains `dnslink=/hyper/YOUR_HYPER_KEY_HERE/` and Agregore will resolve `hyper://yourdomain.com` and load your files.

@am@decept.org That's kinda why I've been experimenting with combining gemfiles with protocols. For example in @agregore you can write a `.gemini` file into a `hyper://` website and automatically host it from your computer. Then somebody else can get a link to your file and load it either from you directly or from anyone else seeding it.

Agregore comes with some built in rendering of gemfiles and uses the customiziable color scheme support so you can customize the browser and what you browse at once.

I feel like a lot of devs are sleeping on and using one to store more "data" related state in order to keep logic on actual pages more sparse.

E.g. have your connection to the backend and your IndexedDB caching layer in the shared worker, then have pages load some basic web components and query the backend.

This works better for multi-window/tab setups which used to be the default in desktop apps back in the day.

Now it's all tied in a single page monolith.

Show older
Mauvestodon

Escape ship from centralized social media run by Mauve.