Live data from Hacker News

Show HN: Bolt – A super-fast, statically-typed scripting language written in C

github.com

61–70 of 98 posts

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#61

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.

Take look at the Nostradamus Distributor:

http://www.emulators.com/docs/nx25_nostradamus.htm

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#62

Run 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

Not bad for version 0.1.0. lua(jit) is no slowpoke and has had decades of performance improvements.

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#64
Really impressive, great job! I was interested to see how you had solved Result type and that seems quite developer-friendly—no wrappers just value & error union. I should try it out to see how it's to write if I can run it on ARM64. I wish Godot Script looked like this.

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#65
post #5

Sounds 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.

Looks like I misinterpreted both embedded and real-time then.

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#66
post #51

Nice 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?

As far as i can see it is simple, everything can return an Error, so you have to check the return value if it is an error.

https://github.com/Beariish/bolt/blob/main/examples/error_ha...

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#67
post #46

Earlier 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`

Oooh, bikeshedding! To me your `import math with x as y` reads like "import all of math, making all of its symbols visible, just renaming some of them". That's different from the intended "from math, import only x (maybe with a renaming)".

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#69

Run 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

Where do you get these numbers from? Looking at https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Perfor... doesn’t seem to support these numbers.

Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C

#70

Run 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

With this and https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Perfor..., it is indeed confusing without testing it out myself.

That said, somehow I do not believe it is faster than LuaJIT. We will see.

Post reply on HN