Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fwsgonzo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
181.
▲
by
fwsgonzo
3y ago
There's also latencies for arguments into and out from the emulators. I'm not sure the custom signal handling alone can account for that. I agree that it could as well have been MIPS or ARM.
182.
▲
by
fwsgonzo
3y ago
Binary translated libriscv vs LuaJIT: https://gist.github.com/fwsGonzo/9132f0ef7d3f009baa5b222eedf... Interpreted libriscv vs LuaJIT: https://gist.github.com/fwsGonzo/1af5b2a9b4f38c1f3d3074d78ac...
183.
▲
by
fwsgonzo
3y ago
This is completely ignoring that RVScript has really nice APIs both ways. While being lower latency.
184.
▲
by
fwsgonzo
3y ago
Only for binary translation or just-in-time compilation (basically producing native code). If you're interpreting RISC-V you can just pretend the registers are an array of register-sized integers. Which is what they are.
185.
▲
by
fwsgonzo
3y ago
The game is quite complex actually, but the script is not doing overmuch right now. The script is doing things that makes sense for a growing modding API, while the engine still does the brunt of the work. That said, there are functions tha
186.
▲
by
fwsgonzo
3y ago
Hm, if you don't actually need a sandbox then I think just using the C# run-time makes a lot of sense. I also like C#, but I've never been in a situation to try the fairly new AOT support. Sounds like a good idea, though. C# is a
187.
▲
by
fwsgonzo
3y ago
Yes, precompilation is not optional. I've used many languages in sandboxes over the years developing both this and other emulators. I really like Nim the most. It's Python spiritually, but with types. Types just really really nece
188.
▲
by
fwsgonzo
3y ago
The sandbox is interpreting RISC-V, just very quickly. It's platform independent. I am actually making a game with a derivative of this repo, and in the server I am building the programs at the same time as the server. Once the server
189.
▲
by
fwsgonzo
3y ago
The fast bytecode is reduced to a simple operation that excludes certain knowns. For example if you have an instruction that stores A0 = A1 + 0, then knowing the immediate is zero, this can be reduced from reading a complex bit pattern to a
190.
▲
by
fwsgonzo
3y ago
He might be talking about having to implement a register allocator/file in order to interpret stack machines faster. Something you get from the compilers on register architectures like RISC-V, ARM and x86. wasmtime uses cranelift, whic
191.
▲
by
fwsgonzo
3y ago
Very cool! One tip: Take the execute segment and produce fast bytecodes instead of interpreting each instruction as a bit pattern. Producing faster bytecodes is something that even WASM emulators do, despite it being a bytecode format.
192.
▲
Fast RISC-V-based scripting back end for game engines
(github.com)
159 points
by
fwsgonzo
3y ago
|
84 comments
193.
▲
by
fwsgonzo
3y ago
http://lua-users.org/wiki/SandBoxes There is a lot of information there, but it doesn't seem to be able to handle resource exhaustion, execution time limits or even give any guarantees. It does indicate that it&#x
194.
▲
by
fwsgonzo
3y ago
Ah yes, it is indeed going to be faster.
195.
▲
by
fwsgonzo
3y ago
There is already Luau if you need a sandbox. Neither Lua nor LuaJIT are sandboxes. There is also my libriscv project if you need a low latency sandbox, without JIT. See: http://lua-users.org/lists/lua-l/2011-02
196.
▲
by
fwsgonzo
3y ago
It's just a wrapper around the abandoned ModSecurity waf.
197.
▲
by
fwsgonzo
3y ago
They've fired so many employees that they (the employees) may as well band together to create a new game engine.
198.
▲
by
fwsgonzo
3y ago
Spaghetti. I know that people like mentioning inheritance, factory and template hells, but trust me. If you've seen spaghetti, where there is no reusability in the entire codebase, then you know. There is a reason we like to think of o
199.
▲
by
fwsgonzo
3y ago
Yes, you're right. I don't know if you can see this: https://i.redd.it/vtswj6s8wh321.jpg But what it says is that it required 24MB of HDD (12MB after installation), and a 386 or equivalent computer. An i386 is qui
200.
▲
by
fwsgonzo
3y ago
For undefined-sanitizer, you can implement your own at least. I did it here: https://github.com/fwsGonzo/barebones Undefined-sanitizer also has a minimal-run-time mode designed to be able to run in production: https:&
201.
▲
by
fwsgonzo
3y ago
That's pretty good if you ask me! I was using an image encoder that had a WebAssembly SIMD CMake option, which is nice, but it only had half of native performance. I suppose it will continue to improve over time.
202.
▲
by
fwsgonzo
3y ago
75% is a stretch. The last time I tested it, it was ~50% of my native program despite my best efforts, with AOT. Which is still good btw, just not as constantly advertised.
203.
▲
Using C++ as a Scripting Language, part 11
(fwsgonzo.medium.com)
1 points
by
fwsgonzo
3y ago
|
0 comments
204.
▲
Using C++ as a Scripting Language, part 10
(fwsgonzo.medium.com)
1 points
by
fwsgonzo
3y ago
|
0 comments
205.
▲
Using C++ as a Scripting Language, part 11
(fwsgonzo.medium.com)
1 points
by
fwsgonzo
3y ago
|
0 comments
206.
▲
by
fwsgonzo
3y ago
Merry Christmas from Norway!
207.
▲
by
fwsgonzo
3y ago
Yep, it's down for me, and they seem to be aware: https://medium.statuspage.io/ EDIT: Back up!
208.
▲
by
fwsgonzo
3y ago
Does it make sense to publish Deb packages for this game? Also this commit: https://github.com/Anuken/Mindustry/commit/5548e727501793479...
209.
▲
Using C++ as a Scripting Language, part 10
(fwsgonzo.medium.com)
1 points
by
fwsgonzo
3y ago
|
0 comments
210.
▲
by
fwsgonzo
3y ago
It is always like that when you venture off the well trodden path. I am studying low latency emulation and it's also isolating.
More ›