News for hackers. Stuff that matters.
Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Tuesday October 20, 2020 @08:06AM (#24836360)
Yes, you are right.

And this is the way it works throughout, with different functions - 'do' aside, that is.

For example, there is the very powerful 'read' function.

This may take a simple string (text), a file location or a URL. You obviously know what it is and the interpreter will figure it out itself as well.

Now, let's say you want to read a file:

read "myfile.txt"

"Reading" a webpage:

read "http://somewebsite.com/somewebpage"

Parsing JSON from a remote source:

read.json "http://somewebsite.com/data.json"

Or parsing it from a string:

read.json "[1,2,3]"

And 'read' also can take different attributes, e.g. .csv (for parsing CSV files), .html etc etc...

Basically you pass a string with its options and the interpreter figures out where to get it from and what to do with it... :)

Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Tuesday October 20, 2020 @08:18AM (#24836430)
Well, the main difference is that - although we do use strings (for files, urls, etc) - the appropriate datatypes are constructed implicitly, that is: no need for newFile("someFile") or %someFile. "someFile", if it is a file path, will be automatically handled as such. If it is a url, accordingly.

The point is to keep the syntax clean. (Ok, that would be an argument of going all the way, like Tcl, where everything ends up being a string - but let's just get the best of every world without overdoing it :) )

Re:Show HN: Arturo – REBOL-inspired programming language and... by 9214 on Tuesday October 20, 2020 @08:23AM (#24836464)
Good point about Tcl, that now makes sense. Thanks for elaborating!
Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Tuesday October 20, 2020 @08:30AM (#24836503)
(I'm replying here, since I don't seem to be able to reply directly)

@9214 Since you are knowledgeable about the topic (included but not limited to Rebol/Red), I would be glad if you joined the effort. Even testing bits here and there would be great. You're welcome :)

Re:Show HN: Arturo – REBOL-inspired programming language and... by 9214 on Tuesday October 20, 2020 @08:14AM (#24836404)
Alright, but personally I fail to see how is that qualitatively different from all the other mainstream languages that use strings as a compensatory kitchen sink to encode literals not present by default.
Re:Show HN: Arturo – REBOL-inspired programming language and... by stchacademy on Monday October 26, 2020 @07:20AM (#24894917)
FYI, I've just published the first complete reference (language reference + full library reference, with tons of examples): https://github.com/arturo-lang/arturo/wiki

Let me know what you think! :)