[ create a new paste ] login | about

Corsix

Name:
Email:
Site/Blog:
Location:
Default language:
Favorite languages:
About:

Saved pastes by Corsix:

Lua, pasted on Oct 4:
1
2
3
4
5
                                                                _={_=_G
                                                              }for--[[--]]__
                                                            in(next),_["_"]do
                                                           (_)[_]=(__)_[#_[_]]
                                                          =_[_]_[_]="sub"end(_)
...
view (42 lines, 1 line of output)
Lua, pasted on Oct 3:
1
2
3
4
5
_={_=_G}for--[[]]__--[[]]in(next),_["_"]do(_)[_]=(__)_[#_[_]],_[_[_]:byte(-#"#"
)+#_[_]-(#{}+#"(#''"*#"*#*#*"*#"_[_[]]")]=_[_],_[_]end(_)[_]=_._[_[#""]]{[_._[_
[#""]]]=_}_[""]=_._[_._[_[#[=[=#=]=]*-((#[=[#[=]#]=]))]](_._[_[-#[[_[-#[#_[_]]]
](_))]_[";"]=_._[_[#"#"+(#")#^")^#"#^"]]_["'"]=[[sub]]_['"']=_[""][_["'"]]_["/"
]=[[/_)=.,[#"('*:^;+]]_["'"]=_[""][_['"'](_[-#[[=[=]=]]],-#",_",-#"..").._["'"]
...
view (16 lines, 1 line of output)
Lua, pasted on Oct 3:
1
2
3
4
5
_={_=_G}for __ in next,_["_"]do _[_]=__;_[#_[_]],_[_[_]:byte(-#"#")+#_[_]-(#{}+
#"(#''"*#"*#*#*"*#"_[_[]]")]=_[_],_[_],_[_]end;_[_]=_._[_[#""]]{[_._[_[#""]]]=_
};_[""]=_._[_._[_[#[=[=#=]=]*-((#[=[#[=]#]=]))]](_._[_[-#[[_[-#[#_[_]]]](_))]_[
";"]=_._[_[#"#"+(#")#^")^#"#^"]]_["'"]="sub"_['"']=_[""][_["'"]]_["/"]=[[/_)=]]
..[[.,[#"('*:^;+]]_["'"]=_[""][_['"'](_[-#[[=[=]=]]],-#{_,_},-#{_,_}).._["'"]]_
...
view (16 lines, 1 line of output)
Lua, pasted on Aug 14:
1
2
3
4
5
local lpeg = require "lpeg"
assert(tonumber(lpeg.version()) >= 0.9, "LPEG version >= 0.9 is required")

local function set(t)
  local s = {}
...
view (207 lines)
Lua, pasted on Apr 19:
1
2
3
4
5
    L=           {}           for          k,v
    in          next          ,_G          ._G
    do          L[#k          ]=v          end
   L[10        ](([[p        =prin        t;for
  'q=99,      1,-1'do'      gg'q>1'      th{n'p(
...
view (17 lines, 297 lines of output)
Lua, pasted on Feb 9:
1
2
3
4
5
#! /usr/local/bin/lua

-- Helper functions to encode VM operations
local function int(value) -- convert value to a 32-bit unsigned little-endian integer
  local b1, b2, b3, b4
...
view (79 lines, 5 lines of output)
Lua, pasted on Feb 8:
1
2
3
4
5
-- A Lua vararg function with a decent number of non-vararg parameters
function Consumer(a, b, c, d, e, f, g, h, i, j, k, l, m, ...)
  print "3"
  local t = {...} -- use the vararg so that we aren't given an arg table
  print "4"
...
view (28 lines, 1 line of output)
Lua, pasted on Dec 31:
1
2
3
4
5
function fooIter(n,x)
 local i = string.len(x)

 if i < 10 then
   if 0 == i%2 then
...
view (29 lines, 16 lines of output)
Lua, pasted on Oct 20:
1
2
3
4
5
function Evil()
  local Experimental, _2
  
  Experimental = function()
    -- Erase all references in the stack to this (currently running) function
...
view (40 lines, 1 line of output)