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…
Show HN: Bolt – A super-fast, statically-typed scripting language written in C
21–30 of 98 posts
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#22I like 99% of this, and the thing I don't like is in the very first line of the example: > import abs, epsilon from math IMHO it's wrong to put the imported symbols first, because the same symbol could come from two different libraries and mean different things. So the library name is pretty important, and putting it last (and burying it after a potentially long list of imported symbols) just feels wrong. I get that…
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.Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#23Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#24Really cool! Roughly how much memory does it take to include it in an engine? Also I'm really interested in the process of creating these really fast scripting languages, have you written anything about how you wrote Bolt?
As for writeups, I'm working on putting out some material about the creation of Bolt and my learnings now that it's out there.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#25Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#26We read here a couple days ago about Q which is compiled. Bolt claims to "plow through code at over 500kloc/thread/second". Q claims to compile in milliseconds--so fast that you can treat it like a script.
Bolt and Q are both newborns. Perhaps you could include each other in your benchmarks to give each other a little publicity.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#27If functions don't have a return signature, does that mean everything must be satisfied in the compilation step? What about memory management/ownership? This would imply that everything must be copy by value in each function callsite, right? How to use references/pointers? Are they supported? I like the matchers which look similar to Rust, but I dislike the error handling because it is neither implicit, and neither e…
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#28I like 99% of this, and the thing I don't like is in the very first line of the example: > import abs, epsilon from math IMHO it's wrong to put the imported symbols first, because the same symbol could come from two different libraries and mean different things. So the library name is pretty important, and putting it last (and burying it after a potentially long list of imported symbols) just feels wrong. I get that…
See https://guide.elm-lang.org/webapps/modules (scroll down to "Using Modules") for examples
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#29I like 99% of this, and the thing I don't like is in the very first line of the example: > import abs, epsilon from math IMHO it's wrong to put the imported symbols first, because the same symbol could come from two different libraries and mean different things. So the library name is pretty important, and putting it last (and burying it after a potentially long list of imported symbols) just feels wrong. I get that…
Though I almost never manually type out imports manually anymore.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#30Is it deterministic like Lua?