SSCSM is still not implemented, after years.
First, implement a SSCSM that has just client-provided (checksumed, to avoid cheating) builtin (SSCSMCPB).
| Goal: Reduce release delay and uncertainty. | |
| Reasons I saw why releases get delayed: | |
| * the milestone doesn't get empty | |
| * there's some regression(s). and a bugfix is not in sight | |
| * someone wants a 90% complete feature in the next release | |
| * coredevs inactive. (no active work being done to get progress in the remaining | |
| issues) |
| general remarks: | |
| * a shape is a bitmap where bit i is 0 iff slot i is "" | |
| * all recipes get a number at registration, this number is an index into an array. | |
| higher number was registered later => can be used for priority | |
| * caching should also be added later | |
| (1) PRIORITY_SHAPED |
| // copied and adapted from the example in man page futex(2) ("futex_demo.c") | |
| // requires libfmt (because of personal dislike of c++ stream output) | |
| // compile with: | |
| // g++ -O2 -Wall -Wextra -std=c++17 -g -o "test_futex" "test_futex.cpp" -lfmt | |
| // The busy waiting uses x86-64 intrinsics: | |
| // * rdtsc: IIRC, the timestamp values are processor-specific. (No longer used, | |
| // benchmark runs faster without it.) | |
| // * pause: always available on x86-64 |
| -- by DS, MIT | |
| -- Note: texture coordinates are currently completely wrong and broken | |
| -- Please insert your nodebox here: | |
| local input_nodebox = { | |
| type = "fixed", | |
| fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, | |
| } |
| local lfs = require("lfs") | |
| local sqlite3 = require("lsqlite3") | |
| local cache_path = "path_to_minetest/cache/" -- please edit this! | |
| local function check(expected, ...) | |
| if select(1, ...) == expected then | |
| return ... | |
| end |
LuaJIT does not compile creating closures (see http://wiki.luajit.org/NYI#bytecode). However, sometimes we do want to create closures at runtime and pass them as callback parameters.
Example:
-- load time
local function maybe_call_callback(f)| local n = 1000 | |
| minetest.register_chatcommand("swi", { | |
| params = "", | |
| description = "", | |
| privs = {}, | |
| func = function(name, param) | |
| local player = minetest.get_player_by_name(name) | |
| local item = player:get_wielded_item() |