Patrick S. Barrett

Tools

PatchLAN

PatchLAN, currently in a very early state, is a go at making a Peer-to-Peer private mesh overlay network that aims to be especially user friendly. There's not much to see publicly yet, most work currently exists as a series of hacked up examples from various libraries like libp2p and webrtc, that play with the basics of p2p signaling and NAT hole-punching.

The current plan is to use libp2p for a public p2p signaling and discovery protocol. Then, use that channel to perform a separate bare UDP hole-punch (either manually or modify libp2p to allow that). And finally give that resulting socket (directly or indirectly depending on the exact API) to wireguard to establish the end network link to a given peer.

Libraries

cosock

cosock is a from-scratch, built in pure Lua, coroutine runtime that offers (essentially) a full LuaSocket API, but coroutine-aware. This allows existing code written against LuaSocket to be cooperatively scheduled on a single thread.

Most importantly it allows you to write libraries against the blocking LuaSocket API, doing all your testing and development without the use of cosock, and then simply use cosock.asyncify("mymod") in place of require("mymod") without modifying the code itself and have it execute asynchronously, blocking only the coroutine it's running in when the LuaSocket would normally block, blocking the entire Lua runtime.

Source

Tokio-CoAP

tokio-coap is a low-level CoAP library written in Rust for Tokio. Because it is built on tokio it uses fully async interactions. It is built to be as simple to use as possible.

tokio-coap is still a work in progress, and hasn't seen much love while I've been busy with work. Though, I have some new ideas that I've played around with, but that haven't made it into a release that I think will make for a really nice interface for both one-and-done client requests as well as highly concurrent servers utilizing some of CoAP's fancier interaction models beyond simple request-response.

Source

Bronze

On hold, see tokio-coap.

Bronze is a CoAP library and framework written in Rust and loosely modeled after the Iron web framework. It is currently under development but already provides features comparable to most basic CoAP libraries.

Source

PicoCoAP

PicoCoAP is an incredibly light weight CoAP message serialization and deserialization library.

Source

libexositecoap

libexosite coap is an implementation of a CoAP client that wraps Exosite's CoAP API. It uses PicoCoAP for message processing and internally implements all behaviors required for both standard and observed requests, handling all message reliability and message routing.

Source

Web

Stock Faces

Stock Faces is a collection of free (CC0) images of faces, intended to be used for avatars in UI mockups. It has a front end single page app written in Elm and a backend server written in Rust.

Backend Source Frontend Source

Virgil - Static Site Generator

The site you are reading right now is a static site generated by scratch-built static site generator written in Rust that I've called Virgil.

Source

Notes to Self

A simple service hosted on Heroku, again using the Tornado framework. It allows you to create notes in markdown for saving. Notes can be organized by a tagging system.

Unfortunately no longer available, lost with the great Heroku purge.

Miscellaneous

MetroGnome

A Pebble watchapp that finds your location and lists nearby MetroTransit bus stops and the real-time arrivals at the selected stop. Written in C and JavaScript.

Source

3D Printers

I've been into 3D printing for almost as long as they've been a thing in the hobbyist realm. I built, what I believe was, the first RepRap Mendel in the US and one of the first in the World. I previously built and/or maintained the Mahtomedi High School FabLab's 3d printers which includes: a MakerGear Mosaic, a PP3DP Up!, and a Projet 3d printer.

Currently, I'm ~being lazy~ choosing my battles and printing on a nearly stock Prusa MK3S because I want my projects to be the projects rather than my printer being the project.

I design all kinds of assorted functional things for my personal use. I design almost everything in OpenSCAD and release the designs CC0 over here: printables