Live data from Hacker News

The Koto Programming Language

koto.dev

11–20 of 153 posts

Re: The Koto Programming Language

#11
post #3
post #2

The amount of scripting languages _for Rust_ is a symptom of how Rust fails to satisfy the need to write code with less strict requirements. It makes perfect sense to use Rust as the main language for your application but have areas which are either in the prototype stage, need to be written quicker or which simply don't need the performance. But Rust does not offer a way to enter such a less strict context and such…

What are you rambling about, this is a sanboxed scripting language to allow your users to define customization at runtime. This has nothing to do with rust, it could be written in C or C++. You would not run random user provided C# in your application at runtime. It is like saying browser should be coded in C# because C++ can't be use instead of JavaScript...

Since it's written in Rust, that's the easiest place to use the embedding API. https://koto.dev/docs/0.15/api/ I imagine one _could_ use it from C, but it wouldn't be as ergonomic as Lua's C API. And Lua in turn isn't a perfect match for embedding in Rust

Re: The Koto Programming Language

#12
post #2

The amount of scripting languages _for Rust_ is a symptom of how Rust fails to satisfy the need to write code with less strict requirements. It makes perfect sense to use Rust as the main language for your application but have areas which are either in the prototype stage, need to be written quicker or which simply don't need the performance. But Rust does not offer a way to enter such a less strict context and such…

Would you be able to share examples of these "shot down proposals"?

I personally haven't found Rust that difficult to prototype in, when I need to I just liberally use clone/Arc/RefCell.

I see the main benefit of these scripting languages as being able to write/run code at runtime, e.g. live coding music or mods for video games.

Re: The Koto Programming Language

#14
Should compare with Rhai (https://rhai.rs/)

I found rhai's syntax very straightforward, and I could almost accomplish my needs just by looking at some basic examples.

I use Rhai in wasm, and it can handle real-time audio blocks, which is really impressive:

https://glicol.org/tour#meta2

Re: The Koto Programming Language

#16

It seems every scripting language does duck/dynamic typing (as far as I can tell this applies to Koto). I don’t understand why… inferred typing is nearly as easy to use while being more robust. For me the biggest gap in programming languages is a rust like language with a garbage collector, instead of a borrow checker. Rust has a lot of features that should be strongly considered for the next generation of programmin…

Check out Wren. https://wren.io/ Written by Bob Nystrom, author of Crafting Interpretors.

Thanks for your suggestion.

At first glance it appears to be object oriented, which is against preference but not a deal breaker.

However error case looks to be try catch which is a deal breaker.

Re: The Koto Programming Language

#17

It seems every scripting language does duck/dynamic typing (as far as I can tell this applies to Koto). I don’t understand why… inferred typing is nearly as easy to use while being more robust. For me the biggest gap in programming languages is a rust like language with a garbage collector, instead of a borrow checker. Rust has a lot of features that should be strongly considered for the next generation of programmin…

For one thing, inferred types may feel easy to use when implemented (well) but they are not easy to implement.

Re: The Koto Programming Language

#18
post #10

It seems every scripting language does duck/dynamic typing (as far as I can tell this applies to Koto). I don’t understand why… inferred typing is nearly as easy to use while being more robust. For me the biggest gap in programming languages is a rust like language with a garbage collector, instead of a borrow checker. Rust has a lot of features that should be strongly considered for the next generation of programmin…

You're describing Gleam https://gleam.run

Thanks looks great so far.

Also has pattern matching which I should also have mentioned in my top level post.

Re: The Koto Programming Language

#19
post #10

Earlier quoted context omitted.

You're describing Gleam https://gleam.run

Thanks looks great so far. Also has pattern matching which I should also have mentioned in my top level post.

After learning Erlang, it was painful to go back to any language which didn’t offer pattern matching. Such a great language feature.

Re: The Koto Programming Language

#20

It seems every scripting language does duck/dynamic typing (as far as I can tell this applies to Koto). I don’t understand why… inferred typing is nearly as easy to use while being more robust. For me the biggest gap in programming languages is a rust like language with a garbage collector, instead of a borrow checker. Rust has a lot of features that should be strongly considered for the next generation of programmin…

I'd keep an eye on Roc https://www.roc-lang.org/

Also, Elixir is working on gradual types, which is something I would keep an eye on. https://hexdocs.pm/elixir/main/gradual-set-theoretic-types.h...

https://www.youtube.com/watch?v=giYbq4HmfGA&t=1s

Post reply on HN