> Rye is homoiconic, it has no keywords or special forms (everything is a function call, everything is a value) How does it implement and , or , or if ?
This is possible with fexprs or equivalent constructs https://en.wikipedia.org/wiki/Fexpr It looks like that's how Rye does it as well, blocks can be conditionally evaluated: https://ryelang.org/meet_rye/basics/if_either/ "In REBOL, contrary to Lisps, blocks or lists don’t evaluate by default. For better or for worse, this little difference is what makes REBOL - REBOL." https://ryelang.org/meet_rye/basics/doing_block…
Rye: Homoiconic dynamic programming language with some new ideas
21–30 of 86 posts
Re: Rye: Homoiconic dynamic programming language with some new ideas
#22Earlier quoted context omitted.
This is possible with fexprs or equivalent constructs https://en.wikipedia.org/wiki/Fexpr It looks like that's how Rye does it as well, blocks can be conditionally evaluated: https://ryelang.org/meet_rye/basics/if_either/ "In REBOL, contrary to Lisps, blocks or lists don’t evaluate by default. For better or for worse, this little difference is what makes REBOL - REBOL." https://ryelang.org/meet_rye/basics/doing_block…
Why is it difficult?
Since code-is-data, you can swap the if and else clauses around. This applies to all the functions where you've inserted the if statement.
This kind of thing makes it difficult to compile a function to a fast set of machine instructions with the same effect. Not impossible, but difficult.
Re: Rye: Homoiconic dynamic programming language with some new ideas
#23> Rye is homoiconic, it has no keywords or special forms (everything is a function call, everything is a value) How does it implement and , or , or if ?
This took me a minute to get, even after looking at the page about if : https://ryelang.org/meet_rye/basics/if_either/ The tricky thing about if , and , and or --- the reason you can't implement them as functions in most languages --- is that they need to not evaluate all their arguments immediately. Otherwise: // Would print! if(false, print("oops!")) // Would throw an error if the key is not present and(my_hashmap.…
Re: Rye: Homoiconic dynamic programming language with some new ideas
#24Re: Rye: Homoiconic dynamic programming language with some new ideas
#25The blog entry titled "Less variables, more flows example vs Python" is strange. ( https://ryelang.blogspot.com/2021/11/less-variables-more-flo... ) The Python version uses intermediate variables so the author of the code is to blame for verbosity, not the language.
The code examples are a tad too verbose but actually better quality than most real-world Python codebases, I would say.
Python is not very verbose but it's not very concise either (especially compared to Lisp families)
Re: Rye: Homoiconic dynamic programming language with some new ideas
#26> Rye is homoiconic, it has no keywords or special forms (everything is a function call, everything is a value) How does it implement and , or , or if ?
This took me a minute to get, even after looking at the page about if : https://ryelang.org/meet_rye/basics/if_either/ The tricky thing about if , and , and or --- the reason you can't implement them as functions in most languages --- is that they need to not evaluate all their arguments immediately. Otherwise: // Would print! if(false, print("oops!")) // Would throw an error if the key is not present and(my_hashmap.…
Re: Rye: Homoiconic dynamic programming language with some new ideas
#27The detail about input validation is a really nice one that hopefully the next generation of programming languages all do standard.
Re: Rye: Homoiconic dynamic programming language with some new ideas
#28The detail about input validation is a really nice one that hopefully the next generation of programming languages all do standard.
It sounds intriguing, but it doesn't look like there are any examples in the readme, and the documentation for the Validation dialect on ryelang.org is completely blank. How does this feature work?
Here are unit tests / reference for the validation dialect, but they aren't the best source of information: https://ryelang.org/validation.html
Here is an old blogpost with another example: https://ryelang.blogspot.com/2021/01/added-intro-pages-for-h...
It's a dialect with static/builtin rules that can be combined and two rules that accpet blocks of Rye code so they can do anything (check and calc, first checks value for certain condition, second changes / calculates new value from the old)
I've written about validation dialect in previous attempts, but current one "Meet Rye" is still in the process of being written and I will get to this.
Re: Rye: Homoiconic dynamic programming language with some new ideas
#29> Rye is homoiconic, it has no keywords or special forms (everything is a function call, everything is a value) How does it implement and , or , or if ?
This took me a minute to get, even after looking at the page about if : https://ryelang.org/meet_rye/basics/if_either/ The tricky thing about if , and , and or --- the reason you can't implement them as functions in most languages --- is that they need to not evaluate all their arguments immediately. Otherwise: // Would print! if(false, print("oops!")) // Would throw an error if the key is not present and(my_hashmap.…