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
@ofan
ofan / lisp.cpp
Last active October 23, 2024 10:37
Lisp interpreter in 90 lines of C++
Lisp interpreter in 90 lines of C++
I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second.
Just for fun I wondered if I could write one in C++. My goals would be
1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly...
2. ...in no more than 90 lines of C++.
Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake!
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is based on the javascript.lang file of GtkSourceView.
It has additional Typescript keywords defined.
Author: Johannes Bergmann
Copyright (C) 2014 Johannes Bergmann
###
@z3t0
z3t0 / README.md
Last active August 4, 2021 20:21
Installing Arch Linux on Chuwi Vi8

Installing Linux on the Chuwi Vi8

This gist is a work in progress with various tips and bits of information designed to aid anyone in trying to get linux working on their Chuwi Vi8.

NOTE: As of yet, none of the information has been CONFIRMED by myself!!! I will be providing links that point to all the resources where other users have reported certain things to be working. This disclaimer will be removed once I test and confirm everything.

Support

This project aims to get Arch Linux running on the device with wifi and touch working. Other priorities can be added through requests.

Specifications and Drivers

@tailriver
tailriver / dlopen_sample.c
Created November 18, 2015 04:21
A sample of using dlopen library.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
int main(int argc, char** argv)
{
void *handle;
void (*func_print_name)(const char*);
@dvtate
dvtate / RPN.cpp
Last active August 17, 2024 05:44
a simple RPN calculator written in C++
#include <iostream>
#include <stack>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#define MAX_LEN 200
According to all known laws
of aviation,
there is no way a bee
should be able to fly.
Its wings are too small to get
its fat little body off the ground.
<!doctype>
<html>
<body>
<script type="text/javascript">
/* by m0nt0y4 */
function binaryAgent(arr) {
var charcoded = [],
finalStr = '',
i;
@nadavrot
nadavrot / Matrix.md
Last active November 15, 2024 16:00
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@ColinEberhardt
ColinEberhardt / gist:0ab739f18576e6e90ce784a765c26b75
Created May 29, 2018 09:35
WebAssembly transform giving support for multi return values
const fs = require("fs");
const { parse } = require("@webassemblyjs/wast-parser");
const { print } = require("@webassemblyjs/wast-printer");
const identifiedToIndex = require("@webassemblyjs/ast/lib/transform/wast-identifier-to-index/index");
const t = require("@webassemblyjs/ast");
const traverse = t.traverse;
const insert = (a1, a2, index) => [
...a1.slice(0, index),
...a2,
// ==UserScript==
// @name NoPerformanceNow
// @namespace https://yuki.network/
// @version 0.2
// @description Disables performance.now() to make JavaScript exploits harder.
// @author ReimuNotMoe, ClassicOldSong
// @match *://*/*
// @grant unsafeWindow
// ==/UserScript==