Skip to content

Instantly share code, notes, and snippets.

View dylanmc's full-sized avatar

Dylan McNamee dylanmc

  • Portland, Oregon
View GitHub Profile

Rust

Rust has been touted as the most loved programming language many years in a row according to respondents in the Stack Overflow Annual Developer Survey , and if you write a blog post without mentioning this you are potentially commiting a crime. But . . . why? What productive things are being done with Rust, right now? Where, exactly, does rust shine? Having tinkered with the language on-again and off-again, I think it clearly shines where its killer application of garbage-collection-less memory safety can shine. That brings us to . . .

WebAssembly (wasm)

WebAssembly. wasm. You've probably heard murmerings of it, things like "it's faster!" or "adoption is coming!". Wasm evangelists haven't won me over, but I am curious about it. Since rust can compile with wasm as a target, rust and wasm feel tied together in my brain. How unfortunate for them both.

Svelte

Svelte is a JavaScript framework without a virtual DOM. But it's actually not that at all, it's

@Kestrer
Kestrer / how-to-write-hygienic-macros.md
Created October 17, 2020 05:35
A guide on how to write hygienic Rust macros

How to Write Hygienic Rust Macros

Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.

Understanding the Module System

First, a little aside on the details of Rust's module system, and specifically paths; it is

@onlurking
onlurking / programming-as-theory-building.md
Last active April 19, 2024 22:31
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@romainl
romainl / Don't use Vim.md
Last active April 15, 2024 22:07
Don't use Vim for the wrong reasons

Don't use Vim

Don't do the crime, if you can't do the time.

-- Anthony Vincenzo "Tony" Baretta

Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.

Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.

/*
* SEP firmware split tool
*
* Copyright (c) 2017 xerub
*/
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
;;; as
;;;
;;; an assembler for the DCPU-16 assembly language
;;;
;;; accepts a file of no more than 512 words indicating the sectors on disk that hold a particular file.
;;; then reads those sectors in the order given, treating them as assembler source
;;; then assembles said source to produce a DCPU-16 binary.
;;; the supported binary format is an image that can be loaded directly from a disk by a bootloader:
;;; it contains an 'initial sector' which is written to the first part of the disk and that loads the rest
;;; of the binary.
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@paniq
paniq / pico8.txt
Last active March 20, 2022 21:11
PICO-8 hacks & secrets
Screen resolutions
------------------
PICO-8 supports different undocumented videomodes that can be activated at runtime,
using poke(0x5F2C, X) where X is one of the following mode numbers:
0: 128x128, 0 pages
1: 64x128, 1 page
2: 128x64, 1 page
3: 64x64, 3 pages
@mondalaci
mondalaci / UhkKeyboardDescriptors.c
Created December 31, 2014 15:28
UHK device and configuration descriptors
const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10),
.Class = USB_CSCP_NoDeviceClass,
.SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = USB_CSCP_NoDeviceProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@quchen
quchen / trolling_haskell
Last active February 24, 2024 01:30
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now