This is the translation of my blog posts. You can find them here (in Russian).
The following Lua program generates a Lua bytecode program called lua-sandbox-rce.luac
, which in turn spawns a shell from within Lua 5.1 sandbox. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.
function outer()
local magic -- In bytecode, the stack slot corresponding to this local is changed
local function middle()
local co, upval
local ub1 = {[0] = -- Convert uint8_t to char[1]
One of the most common projects I've seen for ComputerCraft is to write an operating system. People look at the limited command-line interface that CraftOS provides, and think, "I want this to work like my normal computer does!" Time and time again, a new post pops up on the ComputerCraft forums or Discord either announcing an OS, or asking for help with an OS, or releasing an OS. Usually, there are some very obvious flaws in these "OS"es, ranging from poor design choices, to overstating what they are and underdelivering. There are many common misunderstandings and undersights that newbie developers run into when writing an operating system, and these end up creating mediocre products at best.
The term "OS" is thrown around a lot, and in my opinion it's very overused. According to [Wikipedia]: "An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs." However, m
This is a list of Minecraft 1.7.10 mods that are not focused on adding new original content. Instead, they make the base game run better, or port over features from other versions of vanilla.
These lists try to comprehensively list all the available options. You will not want to use all of the listed mods at once.
Some of the listed mods require a Mixin bootstrap mod in order to work. See the Mixin mods section near the end of the document for information about that.
/*** MIT LICENSE | |
Copyright (c) 2022 torcado | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following |
as
does a huge number of things. Probably too many. Here's a comprehensive list of everything it can do.
Entries in italics
are the names of functions that actually exist in the standard library, while all entries attempt to have a descriptive name for what a function that does the same thing as that particular as
would do.
- int <-> int
zero_extend
: unsigned int -> bigger unsigned int. Pads the number with leading zeroes. This preserves the numeric value.sign_extend
: signed int -> bigger signed int. Pads the number with leading zeroes if positive, and leading ones if negative. This preserves the numeric value.truncate
: bigger int -> smaller int (regardless of signedness). Throws away the high bits of the number.reinterpret_sign
: int -> int of the same size and opposite signedness. Does nothing to the bits.
- int <-> float
cast_saturate_to_infinity
: Yields the float closest to the specified integer. Yields infinity if the integer is out of boun
/////////////////////////////////////////////////////////////////////////////// | |
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader | |
// AUTHOR: Freya Holmér | |
// LICENSE: Use for whatever, commercial or otherwise! | |
// Don't hold me liable for issues though | |
// But pls credit me if it works super well <3 | |
// LIMITATIONS: There's some precision loss beyond 3 decimal places | |
// CONTRIBUTORS: yes please! if you know a more precise way to get | |
// decimal digits then pls lemme know! | |
// GetDecimalSymbolAt() could use some more love/precision |