Skip to content

Instantly share code, notes, and snippets.

View viluon's full-sized avatar
👁️
stop the race towards misaligned AI

Andrew Kvapil viluon

👁️
stop the race towards misaligned AI
View GitHub Profile

Hello world!

This is a Gist intended for testing applications which use the GitHub API.

@viluon
viluon / Time to Party.md
Last active July 7, 2016 11:49
A list of party music, manually compiled by @viluon
@viluon
viluon / coloured_string_standard.lua
Last active August 21, 2016 20:08
A way of encoding ComputerCraft terminal colours inside strings.
-- Made by viluon, copyright 2016 under the MIT License (https://opensource.org/licenses/MIT)
local str = [[
@t5Hello@ta World!
@tf@b0How are you people?
I am viluon;@b1@t0 <@tdviluon@t0\@@tbespiv.net@t0>]]
local pos, escape = 1
local set_fg = term.setTextColour
@viluon
viluon / .gitignore
Created September 17, 2016 21:46
GitHub Desktop's Default Gitignore
#################
## Eclipse
#################
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
@viluon
viluon / Luo.md
Created November 14, 2016 13:13
Luo spec changes for @oeed!

Luo Spec

Luo is derived directly from Lua and all syntax should be aligned as close to vanilla Lua as possible.

Luo Design Principles

Design-wise, Luo is heavily based upon Swift.

  • any Lua code should be valid Luo code
  • Luo syntax should be 'Lua-like' in appearance
@viluon
viluon / sample.vsl
Created November 19, 2016 11:51
FIKS VM
// viluon's simple language
// Test modulo
mod 10 11
--- Port of https://github.com/forrestthewoods/lib_fts/blob/master/code/fts_fuzzy_match.js
-- to Lua
--- Check if ptrn is found sequentially within str
local function matchSimple(str, ptrn)
local ptrnCtr, strCtr = 1, 1
local ptrnLen, strLen = #ptrn, #str
while ptrnCtr <= ptrnLen and strCtr <= strLen do
local ptrnChar = ptrn:sub(ptrnCtr, ptrnCtr):lower()
@viluon
viluon / socketlanes.lua
Created June 14, 2017 06:55 — forked from Deco/socketlanes.lua
Multi-threaded LuaSocket with Lua Lanes example
--[[ socketlanes.lua
Multi-threaded LuaSocket with Lua Lanes example
===============================================
Depends on the following LuaSocket 2.0.2 patch:
http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch
(via http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible)
(provided at end of file)
-- LICENSE
--
-- This software is dual-licensed to the public domain and under the following
-- license: you are granted a perpetual, irrevocable license to copy, modify,
-- publish, and distribute this file as you see fit.
-- VERSION 0.1.0
-- Author: Forrest Smith (github.com/forrestthewoods/lib_fts)
-- Translated to Lua by Blake Mealey (github.com/blake-mealey)
import io.ebean.EbeanServer;
import io.ebean.annotation.SoftDelete;
import me.factorify.server.common.MapperTools;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import javax.persistence.*;