mir
LuaJIT
mir | LuaJIT | |
---|---|---|
22 | 56 | |
2,422 | 5,032 | |
0.9% | 1.5% | |
8.7 | 8.4 | |
9 months ago | about 1 month ago | |
C | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mir
- A tiny self-remaking C program
- Mir (lightweight JIT) version 1.0.0
- QBE – Compiler Back End
-
Ravi is a dialect of Lua, with JIT and AOT compilers
MIR comes from the Rubyverse and isn't related to LLVM MLIR.
https://github.com/vnmakarov/mir?tab=readme-ov-file#mir
- Mir: Strongly typed IR to implement fast and lightweight interpreters and JITs
- Implementing Interactive Languages
- I developed a faster Ruby interpreter
-
Are Hoistings Possible for C++?
When you say a fork of LLVM, am I correct in assuming that you specifically mean a fork of Clang? I don't see how the compiler backend would affect support for language extensions, regardless of whether it's an exception to that such as Tcc, Cproc, the MIR C jitter, lacc, 8cc, 9cc, and chibicc. Most of those are not for production, excluding Cproc and Tcc (at least according to Suckless or Oasis).
-
Suggestion for a backend?
MIR
- Ask HN: Recommendation for general purpose JIT compiler
LuaJIT
-
My Favorite C++ Pattern: X Macros
I've learned about them, staring endlessly at the luajit source code - for example (not the best example I can remember, but still) - https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_lex.h#L15
there it defines a TOKEN(_,__) macro generator the luajit token/keywords and later generates enums with them.
I've used it recently to wrap a "C" api with lots of functions, such that I can redirect calls.
-
Writing a DSL in Lua (2015)
> This is strictly about how much memory LuaJIT can address on that platform
No it is not.
https://github.com/LuaJIT/LuaJIT/issues/285#issuecomment-197...
> If your workload fits inside 2 GiB (IIRC) it will be fast.
This has nothing to do with the issue being mentioned here.
-
Kickstart insight needed: A new retrofitted C dialect?
I love this idea so much.
I got stuck at how to tackle "new language doesn't compile with a standard C compiler" for many times, but my solution is much worse than yours: Like LuaJIT, they left one unreadable "minilua" C file [1] to bootstrap some stuff, we could have a source-code version of the "new C" compiler, compile things twice. That sounds bad.
For languages with a very advanced type system that compiles to C, I could only think of Koka [2], which translates the "algebraic effect and handlers" code into pure C, achieving pure C generators, coroutines and async/await without the support of setjmp/setcontext. But the generated C code is unreadable, I would definitely think about how to handle the readability and debugging issue with sidecar files.
[1]: https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/host/minilua....
[2]: https://koka-lang.github.io/koka/doc/book.html
-
Show HN: FixBrowser – a lightweight web browser created from scratch
Python may not be the best example, but some other languages also exist and are both less "weird" than https://github.com/denysdovhan/wtfjs and fast (e.g. see http://luajit.org/ which is far less complex than V8).
-
A Walk with LuaJIT
You're probably referring to what he wrote here [1]:
> Is the sponsor prepared to sponsor the initial review and integration into the LuaJIT default code base by me?
> Is the sponsor prepared to sponsor the inevitable initial bug fixes and the extra effort for continued maintenance that a new architecture entails?
Also, I should have be clearer about the new GC I linked to: I have not seen Mike say anything about it, and I wouldn't be surprised in the least if he rejects it and writes his own, because he had his own plan for one. It seems super difficult to get anything past him.
[1] https://github.com/LuaJIT/LuaJIT/issues/628#issuecomment-716...
-
Valve is testing ARM64 support for popular games
Indeed, LuaJIT support for Windows/Arm64 was added in https://github.com/LuaJIT/LuaJIT/issues/593, and there’s experimental out-of-tree support for Windows/Arm64EC in https://github.com/LuaJIT/LuaJIT/issues/1096
-
LuaJIT PR: Add Support for RISC-V 64
The issue linked in the sibling comment is the main one, but for a specific example them having reservations about a feature in more recent version, there's this:
https://github.com/LuaJIT/LuaJIT/issues/1013#issuecomment-16...
-
Twenty Years of Valgrind
> are suppression files ever actually used due to an actual false positive,
There used to be one in LuaJIT because it had an optimized string comparison that compared outside of the allocation (which is allowed by the OS as long as you don't cross a page boundary, which LuaJIT's allocation algorithm made sure it never did)
The suppression was removed in https://github.com/LuaJIT/LuaJIT/commit/ff34b48ddd6f2b3bdd26... when the string hashing got a new implementation
- Hackers Exploited a PC Driving SIM to Pull Off Disney Data Breach
-
Weird things I learned while writing an x86 emulator
For an implementation of logical immediate encoding without the loop, see https://github.com/LuaJIT/LuaJIT/blob/04dca7911ea255f37be799...
What are some alternatives?
Cwerg - The best C-like language that can be implemented in 10kLOC.
quickjs - Public repository of the QuickJS Javascript Engine.
qbe-rs - QBE IR in natural Rust data structures
Wren - The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.
asmjit - Low-latency machine code generation
nelua-lang - Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code.