Skip to content

Commit

Permalink
xs is actually right-to-left
Browse files Browse the repository at this point in the history
  • Loading branch information
mlochbaum committed Oct 14, 2023
1 parent 7e58770 commit 15c837b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions commentary/ltr.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ I've thought about adding some sort of pipe notation (the `$` character is open)
As for programming precedent, stack-based languages such as Forth go from left to right. In Java-style object-oriented programming, methods go from left to right. This style of "method chaining" is particularly prevalent in Javascript.

- There's an [APL Wiki category](https://aplwiki.com/wiki/Category:Left_to_right) that gathers some left-to-right languages. [Jelly](https://github.com/DennisMitchell/jellylanguage) is likely the most widely used of these, but being a code golfing language it's explicitly designed for brevity first and usability second.
- [xs](https://github.com/smabie/xs) is a concatenative (or stack-based) array language not yet on APL Wiki.
- Milan Lajtoš is working on the Fluent language for his "new kind of paper". Its LtR nature is mentioned in [this post](https://mlajtos.mu/posts/new-kind-of-paper-2).
- Adám Brudzewsky and others did some investigation into LtR APL specifically in the [LPA/NQB thread](https://topanswers.xyz/apl?q=1660).

Contrarily, the BQN-inspired language Uiua is stack-based but evaluates RtL, a decision [defended here](https://www.uiua.org/rtl).
Contrarily, the BQN-inspired language Uiua is stack-based but evaluates RtL, a decision [defended here](https://www.uiua.org/rtl). [xs](https://aplwiki.com/wiki/Xs) takes this approach as well.

## General considerations

Expand Down
3 changes: 1 addition & 2 deletions docs/commentary/ltr.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ <h2 id="other-attempts"><a class="header" href="#other-attempts">Other attempts<
<p>As for programming precedent, stack-based languages such as Forth go from left to right. In Java-style object-oriented programming, methods go from left to right. This style of &quot;method chaining&quot; is particularly prevalent in Javascript.</p>
<ul>
<li>There's an <a href="https://aplwiki.com/wiki/Category:Left_to_right">APL Wiki category</a> that gathers some left-to-right languages. <a href="https://github.com/DennisMitchell/jellylanguage">Jelly</a> is likely the most widely used of these, but being a code golfing language it's explicitly designed for brevity first and usability second.</li>
<li><a href="https://github.com/smabie/xs">xs</a> is a concatenative (or stack-based) array language not yet on APL Wiki.</li>
<li>Milan Lajtoš is working on the Fluent language for his &quot;new kind of paper&quot;. Its LtR nature is mentioned in <a href="https://mlajtos.mu/posts/new-kind-of-paper-2">this post</a>.</li>
<li>Adám Brudzewsky and others did some investigation into LtR APL specifically in the <a href="https://topanswers.xyz/apl?q=1660">LPA/NQB thread</a>.</li>
</ul>
<p>Contrarily, the BQN-inspired language Uiua is stack-based but evaluates RtL, a decision <a href="https://www.uiua.org/rtl">defended here</a>.</p>
<p>Contrarily, the BQN-inspired language Uiua is stack-based but evaluates RtL, a decision <a href="https://www.uiua.org/rtl">defended here</a>. <a href="https://aplwiki.com/wiki/Xs">xs</a> takes this approach as well.</p>
<h2 id="general-considerations"><a class="header" href="#general-considerations">General considerations</a></h2>
<p>English text is read left to right. This in itself is not decisive in either direction: many contend that the way to read a function is first to read the function, then its argument. Although I usually read the other way, I do find that order to be useful sometimes.</p>
<ul>
Expand Down

0 comments on commit 15c837b

Please sign in to comment.