Category:Arturo: Difference between revisions

From Rosetta Code
Content added Content deleted
m (updated description)
m (added better intro example)
Line 16: Line 16:


<lang rebol>
<lang rebol>
factorial: function [n][
print "Hello world!"
if? n > 0 -> n * factorial n-1
else -> 1
]


loop 1..10 'x [
loop 1..19 [x]->
print ["Factorial of" x "=" factorial x]
if? even? x -> print [x "is even"]
</lang>
else -> print [x "is odd"]
]
</rebol>


===Implementation===
===Implementation===

Revision as of 09:20, 20 February 2021

Language
Arturo
This programming language may be used to instruct a computer to perform a task.
Official website
Execution method: Interpreted
Garbage collected: Yes
Type strength: Strong
Type expression: Implicit
Type checking: Dynamic
Lang tag(s): arturo
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Arturo.

Arturo is an independently-developed, modern programming language, vaguely related to various other ones - including but not limited to Logo, Rebol, Forth, Ruby, Haskell, D, SmallTalk, Tcl and Lisp.

The language has been designed following some very simple and straightforward principles:

  • Code is just a list of words and symbols
  • Words and symbols within a block are interpreted - when needed - according to the context
  • No reserved words or keywords - look for them as hard as you can; there are absolutely none

<lang rebol> factorial: function [n][ if? n > 0 -> n * factorial n-1 else -> 1 ]

loop 1..19 [x]-> print ["Factorial of" x "=" factorial x] </lang>

Implementation

The main compiler is implemented in Nim/C as a Bytecode interpreter / Stack-based VM and should run in most architectures.

The main goals are: expressiveness, brevity, performance and portability. (With that exact order)

License

Arturo is released under the MIT/X11 License.

Todo

Reports:Tasks_not_implemented_in_Arturo

{{language programming paradigm|Declarative}

Subcategories

This category has only the following subcategory.

@

Pages in category "Arturo"

The following 200 pages are in this category, out of 779 total.

(previous page) (next page)

C

(previous page) (next page)