I played around with parsers. This time I experimented with parser combinators for twt message text tokenization. Basically, extract mentions, subjects, URLs, media and regular text. It’s kinda nice, although my solution is not completely elegant, I have to say. Especially my communication protocol between different steps for intermediate results is really ugly. Not sure about performance, I reckon a hand-written state machine parser would be quite a bit faster. I need to write a second parser and then benchmark them.
lexer.go and newparser.go resemble the parser combinators: https://git.isobeef.org/lyse/tt2/-/commit/4d481acad0213771fe5804917576388f51c340c0 It’s far from finished yet.
The first attempt in parser.go doesn’t work as my backtracking is not accounted for, I noticed only later, that I have to do that. With twt message texts there is no real error in parsing. Just regular text as a “fallback”. So it works a bit differently than parsing a real language. No error reporting required, except maybe for debugging. My goal was to port my Python code as closely as possible. But then the runes in the string gave me a bit of a headache, so I thought I just build myself a nice reader abstraction. When I noticed the missing backtracking, I then decided to give parser combinators a try instead of improving on my look ahead reader. It only later occurred to me, that I could have just used a rune slice instead of a string. With that, porting the Python code should have been straightforward.
Yeah, all this doesn’t probably make sense, unless you look at the code. And even then, you have to learn the ropes a bit. Sorry for the noise. :-)
It feels like every time I come across a Gemini capsule I find interesting, the owner suddenly stops posting and leaves the protocol. Maybe that’s a lesson for me: if I like their content, reach out to them and let them know.
I’ve been exploring the Fediverse, ActivityPub protocol, Mastodon, etc.
Asking Scientists Questions
⌘ Read more
Decentralization comes at very high costs. A self-authenticating social protocol | Hacker News
New repository: aquilax/indexnow - Go package for submitting URLs for crawling using the IndexNow protocol
You need better pen test scripts. :-) Seriously, the protocol is absurdly simple. Turn it on! Don’t trust any of the implementations? Write your own!
i want to use something similar to ssb producer tokens as the basis for novo atlantis trade protocols. interfacing with scarcity currencies has been a headache, but i think something like taller that does delegated settlement can link coop credits to another currency for foreign trade could work. devil is in the details.
What if due to climate crisis effects and disasters our digital future will depend on low-energy hardware and protocols like Gemini?
Protocol is a virtual writing surface and a mirror. Memory takes a copy and then Forgets.
i’m going to be honest with you here: i despise protocol labs. IPFS/FileCoin is a scam. fuck that shit.
Indeed! I think the first “network protocol client” I ever wrote was something that just did the PING/PONG part and passed everything else raw.
No, totally not useful. 🤣 I mean, the finger protocol is pretty trivial, and it’d be fun to add, but doesn’t replace anything you’re doing.
email-based gossip protocol :ac_mischief:
interesting RFC dated April 1st, 1998: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0):
looking at the date this was published, i think the authors originally meant this as an apil’s fool joke/prank.
funny because now we have IOTs and this is somewhat a reality today :P
I’m unclear if I’m going to do the twtxt.net discovery protocol; neither my web server nor Plan 9’s default capture agent strings. :-/
@prologic@twtxt.net the HKP is http keyserver protocol. it’s what happens when you do gpg --send-keys
makes a POST to the keyserver with your pubkey.
Ready to explore the gemini protocol as it looks awesome so far
Enjoying the constraints of the Gopher protocol as a minimalistic zen-mode kind of online publishing revival.