Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_cogg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
_cogg
7mo ago
Python supports arithmetic on mixed numeric types, so it makes sense that floats and ints should have a hash function that behaves somewhat consistently. I don't write a lot of python, but having used other scripting languages it would
2.
▲
by
_cogg
1y ago
Yeah, I expect the real advantage of a JIT is that you can perform proper register allocation and avoid a lot of stack and/or virtual register manipulation. I wrote a toy copy-patch JIT before and I don't remember being impressed
3.
▲
by
_cogg
2y ago
Thank you! Not the author, but I'm also building a compiler. I've stumbled across these tests before and mostly just been irritated and confused about what to do with them.
4.
▲
by
_cogg
2y ago
Yeah, I was totally unaware of this. The namespace appears to be blocked in the sandbox -- probably rightfully so -- but now I'm curious as well. I might have to test it out and write a little addendum. Edit: Looks like it's slowe
5.
▲
by
_cogg
2y ago
Author here. My background is in rust if anything. Honestly, I prefer to avoid playing these clever games with type systems unless it's really necessary. It just ended up being the perfect tool for this very specific problem. (How do I
6.
▲
by
_cogg
2y ago
Writing bindings isn't something I have a lot of experience with. The main difference I'm aware of is the FFI system, which creates bindings from C headers, and will result in faster calls with good JIT support. I assume it introd
7.
▲
by
_cogg
2y ago
You used to have to be extremely careful to keep the JIT happy, but I think this has been partially solved in LuaJIT 2.1. Calling C functions using the old stack API would cause the JIT to abort. In Garrysmod's case, that includes such
8.
▲
by
_cogg
2y ago
I've been thinking a lot about embedded scripting lately, to the extent that I've decided to roll my own language. I agree with all your points, but here are some of my own thoughts: It should strive to be familiar for users of th