News for hackers. Stuff that matters.
Re:Dyon – A Rusty dynamically typed scripting language by echelon on Tuesday December 22, 2020 @02:51AM (#25503988)
This is awesome and something I've felt could be a (another) killer app for Rust.

If Rust interfaced well with a convenient scripting language that runs fast and safely, the language would morph into a platform where you could quickly prototype in the high level language and then convert well-defined structures to hardened Rust.

It'd be fantastic for games (no wonder the Piston folks are exploring this), web backends, and native apps.

If this reaches the ease of use of Python, I'll never look back.

Re:Dyon – A Rusty dynamically typed scripting language by irh on Tuesday December 22, 2020 @08:19AM (#25505943)
I've been working on Koto which is intended for this kind of use case. I've been thinking about extending Rust applications with scripting, and I have games in mind but more generally I'm interested in rapid iteration in creative applications. It's still very early so I haven't shared it more widely but I'd be curious to hear what you think.

https://github.com/koto-lang/koto

Re:Dyon – A Rusty dynamically typed scripting language by qaq on Tuesday December 22, 2020 @03:13AM (#25504104)
For web backends Deno kindah fits the bill here
Re:Dyon – A Rusty dynamically typed scripting language by jokethrowaway on Tuesday December 22, 2020 @07:01AM (#25505434)
Typescript type system is not that great to use. I've spent way too much time writing definitions for dependencies in JS or chasing bugs that the compiler should've caught (just because someone, in some layer used an any).

It's also quite slow to parse, making for a not great developer experience. One of Deno's priorities was in fact to rewrite the TS parser to speed it up.

Dyon looks nice and it's definitely a more rusty alternative.

Re:Dyon – A Rusty dynamically typed scripting language by kkirsche on Tuesday December 22, 2020 @06:42AM (#25505327)
For anyone else curious, I believe Deno is a reference to https://github.com/denoland/deno please correct me though if that’s wrong
Re:Dyon – A Rusty dynamically typed scripting language by pansa2 on Tuesday December 22, 2020 @02:56AM (#25504020)
I’ve also recently come across Rune, which seems similar?

https://github.com/rune-rs/rune

Re:Dyon – A Rusty dynamically typed scripting language by k__ on Tuesday December 22, 2020 @11:38AM (#25508078)
Rune seems to use RC instead of lifetimes.
Re:Dyon – A Rusty dynamically typed scripting language by k__ on Tuesday December 22, 2020 @07:52AM (#25505748)
I found Dyon last year by searching for a scripting language with lifetimes. After looking into Rust, I got the impression lifetimes were a part of the type-system that didn't static typing per se.

You need to keep track where your variables point to and how long they do it, but what they point at isn't that important, at least in scripting.

Dyon seems to be a scripting language with many features for games, so it probably seems a bit overloaded for people who use stuff like Lua.

Re:Dyon – A Rusty dynamically typed scripting language by hardwaresofton on Tuesday December 22, 2020 @04:37AM (#25504543)
Also check out conrod[0] which is from the same group. One of the really awesome GUI projects in rust that sticks out in my mind.

[0]: https://github.com/PistonDevelopers/conrod

Re:Dyon – A Rusty dynamically typed scripting language by qalmakka on Tuesday December 22, 2020 @03:00AM (#25504046)
It looks nice, but I don't get how "link" is supposed to work, it seems like some kind of strange tuple type. Does anyone have any example of how it can be used, except the few bits they linked from the readme?
Re:Dyon – A Rusty dynamically typed scripting language by arnarbi on Tuesday December 22, 2020 @03:18AM (#25504136)
An array will carry type information for each element.

Link looks like an optimized array which only allows three types so it can more efficiently pack the type (and presence) information for a block of items into a a couple of words. Plus it doesn’t hold references so managing its lifetime is simple, and you get cheap concatenation by chaining blocks.

I’d guess it’s good for lookup tables or large indexes.

Re:Dyon – A Rusty dynamically typed scripting language by ellis0n on Tuesday December 22, 2020 @02:24PM (#25510053)
Looks good :) The syntax is very impressive