4 ms·
The Arturo Programming Language
- herrherrmann 4y agoOh wow, I wonder what the Boolean value “maybe” is about! (It’s mentioned e.g. on the quickstart page.)
- xamolxix 4y agomaybe "null", can't think of anything else.
- Mathnerd314 4y agoTesting in the playground: and? maybe true = maybe; and? maybe false = false; or? maybe false = maybe; or? maybe true = true; if maybe then "t" else "f" = "t". So some kind of 3-valued logic with a conversion to true.
- ajuc 4y agoif maybe then "t" else "f" = "t". Wow, a very brave design decision :)
- arturo-lang 4y agoIt's three-value logic :) https://discord.com/channels/765519132186640445/829324913097048065/1031355070933127178 https://discord.com/channels/765519132186640445/829324913097...
- h3rald 4y agoWow! Your web site changed a bit since last time I saw it, congratulations Yanis! It's great to see a programming language implemented in Nim to look so polished!
- arturo-lang 4y agoFabio, Hi! Really nice to see you around! And thanks a lot for your very kind words - I'm doing my best to find the time needed and do anything! Definitely, Arturo's is in my priority list! (Big update coming very soon!) Also, don't think that I have forgotten about Min either. I do keep track of its progress as well! Well done to you as well! :)
- Art9681 4y agoI am incredibly thrilled that this exists and incredibly dissapointed I didnt create it. I love everything about it and am eager to learn more about this project. I have been interested in Nim for quite some time and see this is built with it. It even has a net package in the standard library! I would love to see some benchmark comparisons to other languages like Go and Rust, just for fun.
- arturo-lang 4y agoThanks a lot for your kind words!! I really appreciate it and makes me keep working on the project. Feel free to let me know in case you have any question - you are also welcome to post anything you may need in our Discord channel. P.S. Regarding benchmarking, I can assure you I've been working non-stop on optimization so that the VM is as fast as possible. That being said, being an interpreted language, I don't think it could ever fare well against the compiled ones. I would mostly compare it to languages like Python, Ruby, Lua, etc :)
- Supermancho 4y agoStylesheet on documentation is screwing up >= symbols under ; more comparisons and in other places, in chrome. The language is already so spatially dense/verbose, why use the full word "function" when fn would do? Strange that sometimes expressions are in parens and other times sqbrackets: when? [>2] -> print "1 is greater than 2. what?!" when? [<0] -> print "1 is less than 0. nope..." Some things make me do a double take, where consistent style will dictate one way to do something, but will be an endless hassle to watch out for the other: a: (2 > 3)["yes"]["no"] ; a: "no" a: (2 > 3)? -> "yes" -> "no" ; a: "no" (exactly the same as above)
- drkameleon 4y ago
- arturo-lang 4y agoThanks a lot for letting me know about the documentation website. There are some known issues but I've been putting them off until the upcoming update (which will coincide with the new release, which is coming very, very soon). Regarding parentheses vs square brackets, let me explain. Basically, in Arturo, the two things are totally different: - with parentheses, all you do is prioritize the evaluation of a given expression - now square brackets denote a block (of values) - one of the most basic building blocks of Arturo. And a block is not to be evaluated until we need it. The case of `?` (which is an alias to the function `switch`) may look somewhat weird, but it follows Arturo's rules 100%. Have a look at the documentation: https://arturo-lang.io/documentation/library/core/switch/ https://arturo-lang.io/documentation/library/core/switch/ Basically, the "normal", straightforward syntax would be: ``` a: switch 2 > 3 ["yes"]["no"] ``` Now, `-> "yes"` and `["yes"]` are exactly the same. All `->` does is wrap a single, computable value into a block (it's syntactic sugar, nothing more). Now, why would we need parentheses in your example? (as you see, in mine, none was needed, as the order of evaluation is pretty much obvious) if we did it without parentheses, given Arturo's right-to-left evaluation rule, it would mean something like: check if 3, if it's true, return "yes", otherwise return "no" and then compare that with 2. That's why we need the parentheses. But it's because `?` (switch alias) acts as an infix operator. https://arturo-lang.io/documentation/language/#the-right-to-left-rule https://arturo-lang.io/documentation/language/#the-right-to-...
- mlajtos 4y agoI like this a lot. One thing that I miss is the pipeline operator.
- arturo-lang 4y agoThanks a lot for your kind words! Regarding pipes,... we are working on it! :) https://arturo-lang.io/documentation/language/#pipe-operator https://arturo-lang.io/documentation/language/#pipe-operator
- luuuzeta 4y agoInteresting to see another language that uses the `loop` keyword for C-based `for` loops. The only other I know of is Raku[0]. loop(my $i; $i < 10; $i) { say $i } loop { # do something infinitely } [0]: https://docs.raku.org/syntax/loop https://docs.raku.org/syntax/loop
- manbart 4y agoNetRexx uses it too https://www.netrexx.org/Tutorial/nr_9.html https://www.netrexx.org/Tutorial/nr_9.html
- akritid 4y agoAda https://www.adaic.org/learn/materials/intro/part4/ https://www.adaic.org/learn/materials/intro/part4/
- ferrozz_gg 4y ago
- arturo-lang 4y agoWell, why not?! Since, after all, we all know them as "loops" ;-)
- draegtun 4y agoArturo was influenced by Rebol which comes with LOOP - http://www.rebol.com/r3/docs/functions/loop.html http://www.rebol.com/r3/docs/functions/loop.html However there are some differences... loop 10 [ print "hello" ;; prints "hello" 10 times ] repeat n 10 [ print n ;; prints 1 to 10 ] forever [ print "hello" ;; print "hello" forever! ]
- arturo-lang 4y agoArturo has indeed been influenced by Rebol (and many other languages, to be honest). As for looping... loop 1..10 'x -> print x ; prints 1 to 10 loop.with:'i ["one" "two"] 'x -> print [i "=>" x] ; 0 => one, 1 => two do.times: 10 -> print "hello" ; print "hello" 10 times loop.forever 1..10 'x -> print x ; prints 1 to 10, forever loop 1..10 [x y]-> print [x y] ; print 0 1, 2 3, 4 5,... The same works for pretty much every function in the Iterators module: map, select, filter, etc :) https://arturo-lang.io/documentation/library/iterators/ https://arturo-lang.io/documentation/library/iterators/
- drkameleon 4y ago
- arturo-lang 4y agoI guess this posting caught me a bit unprepared! haha Thanks a lot for posting about Arturo in any case! This project is a love child of mine and any input/ideas/feedback is more than welcome obviously! Feel free to follow the project or post any questions you may have on our "official" Discord channel: https://discord.gg/YdVK2CB https://discord.gg/YdVK2CB
- yownv 4y agoMy pleasure ^_^.