I love the concept -- I've often wished that lean languages like Lua had more support for static typing, especially given the potential performance benefits. I also love the focus on performance. I'm curious if you've considered using a tail call design for the interpreter. I've found this to be the best way to get good code out of the compiler: https://blog.reverberate.org/2021/04/21/musttail-efficient-i... Unfortun…
I did experiment with a few different dispatch methods before settling on the one in Bolt now, though not with tailcalls specifically. The approach I landed on was largely chosen cause it in my testing competes with computed goto solutions while also compiling on msvc, but I'm absolutely open to try other things out.
Show HN: Bolt – A super-fast, statically-typed scripting language written in C
61–70 of 98 posts
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#62Run some examples, and it looks like this "High-performance, real-time optimized, super-fast" language is ~ 10 times slower than luajit ~ 3 times slower than lua 5.4
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#63Usually I feel like that's bare minimum before I'd like to try and play around with a language
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#64Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#65Sounds very good, and I can see many use cases in embedded systems. But that probably requires 32-bit arm support. Is that planned ?
As of right now no - my primary target when developing this was realtime and games in particular since that's what I know best, but if there's a real target in embedded that's certainly something that could be explored.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#66Nice language! I am wondering how error handling / exceptions works in bolt? Quickly scanned the programming guide - but wasn't able to find it. Did i miss a section?
https://github.com/Beariish/bolt/blob/main/examples/error_ha...
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#67Earlier quoted context omitted.
Do you think approaching the way typescript does it for Bolt is a reasonable compromise here? Bolt already supports full-module renames like import math as not_math So supporting something along the lines of import abs as absolute, sqrt as square_root from math Would be farily simple to accomplish.
Or: `import math with abs as absolute, sqrt as square_root`
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#68Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#69Run some examples, and it looks like this "High-performance, real-time optimized, super-fast" language is ~ 10 times slower than luajit ~ 3 times slower than lua 5.4
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#70Run some examples, and it looks like this "High-performance, real-time optimized, super-fast" language is ~ 10 times slower than luajit ~ 3 times slower than lua 5.4
That said, somehow I do not believe it is faster than LuaJIT. We will see.