Fortran Bluesky Client: TUI with Rust Firehose Decoder – Fortransky
A fresh client for the decentralized social network Bluesky and the underlying AT Protocol, has emerged with a decidedly retro twist: it’s written in Fortran. Developed by FormerLab, this terminal-only application, dubbed “fortransky,” demonstrates a surprising and effective use of the decades-old programming language alongside modern technologies like Rust. The project highlights the flexibility of the AT Protocol and the potential for unconventional implementations within the growing decentralized social web.
Fortran’s Unexpected Revival
Fortran, short for Formula Translation, was one of the earliest high-level programming languages, gaining prominence in scientific and engineering computing in the 1950s. While largely superseded by languages like C++, Python, and Java for general-purpose development, it remains in use for computationally intensive tasks. The choice to build a social networking client in Fortran is, to say the least, unusual. According to the project’s GitHub page, the client utilizes a C libcurl bridge and a Fortran ISO C binding module to interface with the AT Protocol. A Rust staticlib handles the decoding of the relay-raw stream path, converting data from envelope format through CAR, DAG-CBOR, and NormalizedEvent stages to JSONL. This layered approach allows the Fortran front-end to leverage the strengths of both Rust and existing C libraries.
Understanding the AT Protocol and its Architecture
The AT Protocol (Authenticated Transfer Protocol), likewise known as ATproto, is a decentralized protocol designed to address limitations found in earlier decentralized social networks like ActivityPub and Nostr. As detailed in the Wikipedia entry on the AT Protocol, it aims to provide a more robust and interoperable foundation for social media, focusing on user experience, semantic interoperability, and data portability. The protocol employs a modular microservice architecture and a federated, server-agnostic user identity system. Which means users aren’t tied to a single platform and can theoretically move their data and social graph between different services built on the AT Protocol. Bluesky, the social network founded by Jack Dorsey, is currently the most prominent implementation of the AT Protocol, serving as a reference implementation and driving its development. You can find more detailed information about the protocol’s architecture and core concepts on the Bluesky documentation site.
How fortransky Connects to the Network
fortransky offers two primary methods for connecting to the AT Protocol network. The first, “jetstream,” utilizes Bluesky’s Jetstream WebSocket service, offering lower bandwidth usage and a simpler JSON-native interface. The second, “relay-raw,” connects directly to the raw AT Protocol relay using the com.atproto.sync.subscribeRepos endpoint. This method involves binary CBOR data over WebSocket, which is then decoded by the Rust component of the client. The project documentation notes that a bundled synthetic fixture is used for the relay-raw connection by default, but this can be disabled to connect to the live relay using the FORTRANSKY_RELAY_FIXTURE=0 environment variable. The choice between these modes allows users to prioritize ease of use (jetstream) or direct access to the protocol’s raw data stream (relay-raw).
Installation and Dependencies
Setting up fortransky requires a few steps. On Ubuntu/Debian systems, the necessary system packages – gfortran, cmake, pkg-config, and libcurl4-openssl-dev – can be installed using sudo apt install -y gfortran cmake pkg-config libcurl4-openssl-dev. The project also requires a recent version of Rust (>= 1.70), which can be installed via rustup. For users utilizing the relay-raw stream path, Python dependencies (cbor2 and websockets) are also required. These can be installed system-wide using sudo pip install cbor2 websockets --break-system-packages or within a virtual environment, with appropriate environment variable configuration to ensure the correct Python interpreter is used.
Security Considerations and App Passwords
The project documentation strongly advises against using a user’s main Bluesky password for authentication. Instead, it recommends creating a dedicated app password within the Bluesky settings. This practice minimizes the risk of compromising the primary account in the event of a security breach. Session data is stored locally in ~/.fortransky/session.json, allowing for persistent login between sessions. The use of app passwords is a standard security recommendation for third-party applications accessing online accounts.
What Comes Next for fortransky and the AT Protocol
The fortransky project is actively under development, with version 1.1 recently integrating the native Rust firehose decoder. Future development will likely focus on refining the user interface, expanding feature support, and improving the overall stability and performance of the client. More broadly, the AT Protocol itself is undergoing standardization within the Internet Engineering Task Force (IETF), as noted in the Wikipedia article. This standardization process will further solidify the protocol’s foundation and promote wider adoption. The continued development of both the protocol and its diverse implementations, like fortransky, will be crucial in shaping the future of decentralized social networking.