Live data from Hacker News

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

github.com

91–98 of 98 posts

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

#91
post #86
post #66

Earlier quoted context omitted.

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

That's definitely not universally true, with even the core library getting into the "null indicates error" game https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand... or this fun middle ground where it could be Error or null https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand... But I think OP was asking about whatever the hell this means by "native error callback" https://github.com/Beariish/bolt/b…

I think I was looking for both error / exception handling within the language and across the C api.

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

#92

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…

You may be interested in Luau, which is the gradually-typed dialect of Lua maintained by Roblox. The game Alan Wake 2 also used it for level scripting.

The author seems to be aware as Luau is mentioned in the performance section of the documentation.

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

#93
post #37

I 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…

According to the Programming Guide, it supports aliases for imports "In case of conflict or convenience, you can give modules an alias as well."

This isn't about conflict, it's about how humans read it.

Let's say I have two modules, "telnet" and "ssh", and both have a "connect" function. When I read "import connect, (long list of other imports here)" I don't know which connect it is, and I might form the wrong mental connection, which I then have to revise when I start to read the module name.

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

#94

Looks great, I'm especially a fan of the more C and Python syntax. Lua works, but its syntax has always been bugging me. On the feature side, is there any support for breakpoints or a debugging server, and if not is it planned?

There's nothing like that right now, but it's absolutely something I want to explore in the future.

Sounds good, this is really one of lua's edge when it comes to feature completeness, so I'm excited at the prospects of this feature for Bolt!

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

#95
post #73

I don't understand why people still choose the syntax `import xxx from yyy` in the current year. It is a major source of complaining for languages like python or javascript, because it makes autocomplete does not work well. make me instantly lost interest in the language.

well the situation may improve, so when one types `log10`, it can just fill in `math`. I tend to remember the function, not the library, so that would work better for me.

so it seems to me you're hung up on the current limitations of the language server, which is an implementation detail.

if what you want is actually important, the syntax should have been `import yyy.xxx as xxx` or similar, with optional `as xxx`, instead of a Cobol inspired syntax detail to remember.

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

#97
post #73

I don't understand why people still choose the syntax `import xxx from yyy` in the current year. It is a major source of complaining for languages like python or javascript, because it makes autocomplete does not work well. make me instantly lost interest in the language.

Imagine not picking and language based on the module import keyword order.

This cannot be a reasonable factor in lang selection.

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

#98
post #73

I don't understand why people still choose the syntax `import xxx from yyy` in the current year. It is a major source of complaining for languages like python or javascript, because it makes autocomplete does not work well. make me instantly lost interest in the language.

Two potential suggestions: 1. Ask - the author is very much available, right here in this comment section they made specifically for such a prospect. 2. Contribute - Code the change you wish to see in the world. Follow the OP’s example, and do something about it.

There are likes 10 similar languages out there with the same promise, why I need to specifically choose this one to contribute?

The point is pretty simple, if the author is too lazy to do some basic research about this common problem, he is probably too lazy to do other important stuff, too.

Time is short, there is always new languages out there to test.

Post reply on HN