Building the fastest Lua interpreter.. automatically!
https://sillycross.github.io/2022/11/22/2022-11-22/ [sillycross.github.io]
2022-11-22 23:10
tags:
compiler
jit
lua
perf
programming
I have been working on a research project to make writing VMs easier. The idea arises from the following observation: writing a naive interpreter is not hard (just write a big switch-case), but writing a good interpreter (or JIT compiler) is hard, as it unavoidably involves hand-coding assembly. So why can’t we implement a special compiler to automatically generate a high-performance interpreter (and even the JIT) from “the big switch-case”, or more formally, a semantical description of what each bytecode does?
source: HN
An unexpected Redis sandbox escape affecting only Debian, Ubuntu, and other derivatives
https://www.ubercomp.com/posts/2022-01-20_redis_on_debian_rce [www.ubercomp.com]
2022-03-09 21:26
tags:
bugfix
exploit
linux
lua
security
turtles
This post describes how I broke the Redis sandbox, but only for Debian and Debian-derived Linux distributions. Upstream Redis is not affected. That makes it a Debian vulnerability, not a Redis one. The culprit, if you will, is dynamic linking, but there will be more on that later.
source: HN
More consistent LuaJIT performance
https://blog.cloudflare.com/more-consistent-luajit-performance/ [blog.cloudflare.com]
2018-12-13 02:34
tags:
benchmark
jit
lua
perf
So, did we achieve everything we wanted to in 12 months? Inevitably the answer is yes and no. We did a lot more benchmarking than we expected; we’ve been able to make a lot of programs (particularly large programs) have more consistent performance; and we’ve got a fair way down the road of implementing a new GC. To whoever takes on further LuaJIT work – best of luck, and I look forward to seeing your results!
source: L
A Look at the Design of Lua
https://cacm.acm.org/magazines/2018/11/232214-a-look-at-the-design-of-lua/fulltext [cacm.acm.org]
2018-10-31 03:59
tags:
lua
programming
Lua has a unique set of design goals that prioritize simplicity, portability, and embedding. The Lua core is based on three well-known, proven concepts—associative arrays, first-class functions, and coroutines—all implemented with no artificial restrictions. On top of these components, Lua follows the motto “mechanisms instead of policies,” meaning Lua’s design aims to offer basic mechanisms to allow programmers to implement more complex features.
Reads like a short version of the Programming in Lua book.
source: L
Adventures in Lua stack overflows
http://cmsj.net/2018/04/13/lua-stack-adventures.html [cmsj.net]
2018-04-15 16:25
tags:
c
lua
programming
If you’ve never used it before, Lua’s C API is designed to be very simple to integrate with other code, but it also places a fairly high burden on developers to integrate it properly.
I never thought the burden was high, rather convenient compared to other languages actually, but this is one potential trouble spot.
source: L
An Introduction to Urn
http://urn-lang.com/tutorial/01-introduction.html [urn-lang.com]
2017-11-01 14:10
tags:
compiler
intro-programming
lisp
lua
These tutorials aim to guide you through Urn, a Lisp dialect which compiles to Lua. We’ll assume you have some prior programming knowledge. A little Lua knowledge is useful in places, though not required.
Helping to make LuaJIT faster
https://blog.cloudflare.com/helping-to-make-luajit-faster/ [blog.cloudflare.com]
2017-10-22 00:48
tags:
jit
lua
perf
update
This project will also naturally help us advance our wider research interests centred around understanding how VM performance can be improved. I’m hopeful that what we learn from LuaJIT will, in the long run, also help other VMs improve. Indeed, we have big ideas for what the next generation of VMs might look like, and we’re bound to learn important lessons from this project.
LuaJIT Hacking: Getting next() out of the NYI list
https://blog.cloudflare.com/luajit-hacking-getting-next-out-of-the-nyi-list/ [blog.cloudflare.com]
2017-02-22 17:00
tags:
compiler
jit
lua
perf
programming
One of the first pieces of advice anyone receives when writing Lua code to run quickly using LuaJIT is “avoid the NYIs”: the language or library features that can’t be compiled because they’re NYI (not yet implemented). And that means they run in the interpreter.
A very long post with lots of details.
in which four pieces are placed in a row
http://technomancy.us/182 [technomancy.us]
2017-02-13 20:30
tags:
gaming
intro-programming
lua
Of course there’s a lot more that Polywell can do, but it doesn’t take much code to get a simple game going. Try it for yourself; you might have a lot of fun.
source: L
Lua: A Guide for Redis Users
https://www.redisgreen.net/blog/intro-to-lua-for-redis-programmers/ [www.redisgreen.net]
2016-11-21 20:29
tags:
database
intro-programming
lua
More specifically a short intro to the Lua environment in Redis.