Skip to content

Instantly share code, notes, and snippets.

@starius
starius / luacrypto-0.3.2-2.rockspec
Created May 13, 2015 14:17
luacrypto rockspec pointing to my fork (Lua 5.3 compatible)
package = "LuaCrypto"
version = "0.3.2-2"
description = {
summary = "A Lua frontend to OpenSSL",
detailed = [[LuaCrypto is a Lua frontend to the OpenSSL cryptographic library. The OpenSSL features that are currently exposed are:
digests (MD5, SHA-1, HMAC, and more), encryption, decryption and crypto-grade random number generators.]],
homepage = "http://mkottman.github.com/luacrypto/",
license = "MIT",
}
dependencies = {
@starius
starius / brainfuck-to-c.lua
Last active August 29, 2015 14:21
Brainfuck to C translator written in Lua
local brainfuckToC_map = {
['>'] = '++ptr;',
['<'] = '--ptr;',
['+'] = '++*ptr;',
['-'] = '--*ptr;',
['.'] = 'putchar(*ptr);',
[','] = '*ptr=getchar();',
['['] = 'while (*ptr) {',
[']'] = '}',
}
@starius
starius / Makefile
Created May 16, 2015 12:38
Luaprompt with LuaJIT's options -j and -O
PREFIX=/usr/
BINDIR=${PREFIX}/bin
LIBDIR=$(PREFIX)/lib/x86_64-linux-gnu
LUA_CFLAGS=`pkg-config --cflags luajit`
LUA_LDFLAGS=`pkg-config --libs luajit`
CFLAGS= -g -Wall -Wextra -Wno-unused-parameter -I.. -DHAVE_ASPRINTF
CFLAGS+= -DHAVE_LIBREADLINE -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY -DHAVE_READLINE_HISTORY_H
CFLAGS+= -D_GNU_SOURCE
@starius
starius / luajit-2.1-segfault.lua
Last active August 29, 2015 14:21
LuaJIT segfault 4a146cac9a00f5a1a7877db847ff5b
function badFunction(t)
t.__metatable = nil
local b = assert(t.field)
end
code = string.rep([[
(function()
badFunction {
field={
aaaaa={}
}
@starius
starius / filter.lua
Created June 16, 2015 14:36
filter.lua - pipe of applications of Lua methods
-- Usage:
-- filter = require 'filter'
-- command = filter.lower.trim:split(' ')
-- command(input) --> input:lower():trim():split(' ')
-- command(input2) --> input2:lower():trim():split(' ')
local unpack = unpack or table.unpack
local function makeFilter(func, parent_f, parent, method_name)
return setmetatable({}, {
This file has been truncated, but you can view the full file.
make[1]: Entering directory `/usr/lib/mxe'
uname -a
Linux sd-68075 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64 GNU/Linux
git show-branch --list --reflog=1
[refs/heads/master@{0}] (10 hours ago) clone: from https://github.com/LuaAndC/mxe
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Debian
Description: Debian GNU/Linux 7.8 (wheezy)
Release: 7.8
Codename: wheezy
@starius
starius / dups.txt
Created June 28, 2015 14:43
Overlaps of files produced by MXE packages
usr/bin/config.guess
usr/include/gmp.h
usr/include/isl/aff.h
usr/include/isl/aff_type.h
usr/include/isl/arg.h
usr/include/isl/ast_build.h
usr/include/isl/ast.h
usr/include/isl/ast_type.h
usr/include/isl/band.h
usr/include/isl/constraint.h
@starius
starius / history-of-failure.log
Last active September 4, 2015 07:47
Passing and failed build logs of pango
[using autodetected 6 job(s)]
rm -rf /usr/lib/mxe/tmp-* /usr/lib/mxe/usr build-matrix.html versions.json
find: `usr': No such file or directory
[using autodetected 6 job(s)]
[check requirements]
[download] flex
[no-build] flex i686-w64-mingw32.static
[using autodetected 6 job(s)]
[download] gcc-gmp
[build] gcc-gmp i686-w64-mingw32.static
@starius
starius / build-30Aug2015.log
Created August 31, 2015 06:47
MXE pango build failed
rm -rf /usr/lib/mxe/tmp-* /usr/lib/mxe/usr build-matrix.html versions.json
find: `usr': No such file or directory
[check requirements]
[download] flex
[no-build] flex i686-w64-mingw32.static
[download] gcc-gmp
[build] gcc-gmp i686-w64-mingw32.static
[done] gcc-gmp i686-w64-mingw32.static 28480 KiB 0m21.159s
[download] m4
[no-build] m4 i686-w64-mingw32.static
@starius
starius / gtk3_i686-w64-mingw32.static
Created August 31, 2015 20:15
MXE build log for gtk3 (pull request 795)
make[1]: Entering directory `/home/mxe/mxe-gtk3-795'
uname -a
Linux sd-68075 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64 GNU/Linux
git show-branch --list --reflog=1
[refs/heads/gtk3@{0}] (19 seconds ago) pull: Fast-forward
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Debian
Description: Debian GNU/Linux 7.8 (wheezy)
Release: 7.8
Codename: wheezy