Skip to content

Instantly share code, notes, and snippets.

View dvtate's full-sized avatar
🐧
chilling

Dustin Van Tate Testa dvtate

🐧
chilling
View GitHub Profile
@dvtate
dvtate / postfix-haskell.md
Last active August 1, 2023 21:37
Postfix Haskell Devlog Archive

Postfix Haskell Devlog

Here is a timeline of development for a programming language I worked on 2020-2023

2020.10.7 - Idea and PoC

This is a POC for first ~1/3 of compiler for new language I'm working on... This demo is just a shell for part of compiler that handles:

  • Lexing
  • Parsing (weird bc lang is postfix)
  • Some optimizations
  • Majority of type-checking and validation
@dvtate
dvtate / ssd.cpp
Created July 14, 2023 21:02
determine if a file/folder resides on a ssd or rotating media
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <mntent.h>
#include <limits.h>
struct MountPointEntity {
@dvtate
dvtate / how_to_make_deb_packages.md
Last active December 5, 2022 15:42
A short guide on how to package software into .deb packages for debian, ubuntu and linux mint based linux distros

How To Create Debian Packages

This guide is copied from this video: https://www.youtube.com/watch?v=ep88vVfzDAo

Note: Commands here are just for examples. They will NOT run as they are shown here. You have to adapt them to your own needs and system.

  1. Create the directory to hold the project:

    mkdir /home/USER/debpkgs/my-program_version_architecture

  2. Create a directory called "DEBIAN" inside the project directory:

@dvtate
dvtate / guise.ts
Created July 8, 2022 01:23
idk just thinking
// Contains entire app state
type State = {
name: String;
// ...
}
// Initializes state
function init(): State {
return {
#!/bin/sh
# configure the system proxy in gnome settings
gnome_sys_proxy () {
# $1 - 'enable' | 'disable'
# toggle proxy
if [ $1 -eq 'status' ]
then
gsettings get org.gnome.system.proxy mode
const { expect } = require('chai');
const { Vector3 } = require('three');
describe('lookup', function callback() {
it('does not crash', function callback() {
const jsdom = new (require('jsdom')).JSDOM();
const canvas = jsdom.window.document.createElement('canvas');
global.window = jsdom.window;
global.document = jsdom.window.document;
# Developer: qorg11
# Maintainer: Dustin Testa <[email protected]>
pkgname=lainsafecli
pkgver=0.4.r0.g47312a4 # updated by pkgver()
pkgrel=1
pkgdesc="CLI interface for lainsafe"
arch=('any')
url='https://github.com/qorg11/lainsafe'
license=('GPL')
#include <stdio.h>
#include <time.h>
// expects ret to be a char buffer with length 8*sizeof(int)
inline void bitwise_itobin(const int n, char* ret) {
const unsigned char l = sizeof(int) * 8;
for (unsigned char i = 0; i < l; i++)
ret[i - 1] = (n & (1 << i)) ? '1' : '0';
}
@dvtate
dvtate / rmc_ctl_sys.md
Created September 13, 2019 23:54
A summary of why we chose to change control system

Why switch?

Problems with old system

  • Required Use of old software that had bugs, was no longer maintained and was poorly documented
  • Delicate, expensive components
  • Required a middleman controller to translate
  • System involved maintaining 3 separate libraries in 2 languages on 3 devices
    • massive time investment
    • In addition, motor controllers and arduino had custom instruction sets we had to use
  • encoders:
    • Previous system used hardware PID controllers