News for hackers. Stuff that matters.
Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Tuesday October 20, 2020 @05:02AM (#24835250)
Well, I could argue... "why not?".

Rebol - Arturo's ideological grandparent - is a great language (albeit not as well-known as it should be). And Arturo attempts to get the best bits of it and make a modern take on programming.

In the website (and the GitHub repo) you will find more than enough information about it.

Also, have a look at the wiki!

https://github.com/arturo-lang/arturo/wiki

Re:Show HN: Arturo – REBOL-inspired programming language and... by 9214 on Tuesday October 20, 2020 @07:18AM (#24836086)
Could you please elaborate in what aspects Arthuro is ideologically inspired by Rebol, aside from minor syntax resemblance?
Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Tuesday October 20, 2020 @07:27AM (#24836137)
Easy-of-use, flexibility, blocks and dialecting, no-reserved-keywords approach, wide range of datatypes, homoiconicity - to name a few.

That being said, as I've already mentioned, my goal was not to make a Rebol replica. Arturo is a new language.

Now, regarding the "inspiration" part, to anyone that is familiar with Rebol, I think it would be fair to say that Arturo does look more like the Rebol group, than an Algol-type language, or ML, or Python type of language. I don't know... (I would really be intrigued to hear what it reminds you of... :))

Re:Show HN: Arturo – REBOL-inspired programming language and... by 9214 on Tuesday October 20, 2020 @08:20AM (#24836449)
My 2 cents: please add an example or two for dialecting and homoiconicity, because that's IMO not apparent from what I've seen so far (granted, I could have missed some bits), and the terms "dialecting" and esp. "homoiconicity" are so ill-defined that everyone uses them to describe different things.

My understanding so far is that Arturo has VM-based interpreter (perhaps stack-based or even indirect-threaded, hence the mention of Forth as an inspiration) which operates on a syntax tree (either concrete or abstract, although Rebol uses the former) produced from textual source during lexing. Is that correct?

Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Tuesday October 20, 2020 @08:38AM (#24836579)
I want that too - I mean to elaborate more on these aspects with real-use examples, but I guess I'm putting it off until I deal with other small issues.

Regarding "homoiconicity", the way I would succintly put it is that: the line between what is considered code and what is data is super-fine. Basically, anything can be anything - depending on the context. Thus, an Arturo script can manipulate its own code, the way it can manipulate any other type of data.

Regarding Arturo's implementation: It's written in Nim (though I have written it in the past in almost every language you can think of... lol started with C++, went to D, then to Nim, back to C, and now in Nim again). Basically it's a Stack-based Bytecode Virtual Machine. And yes, Forth's influence is also important - although (intentionally) not that obvious at first sight.

The source text is parsed to an abstract structure/tree of words and symbols. That's the part that happens in translator/parse.

Then if it's an executable block, it is evaluated (as valid Arturo code) into Bytecode (this happens in translator/eval), and then this bytecode is executed by the virtual machine (in vm/exec).