hazel
2021-6-15 15:25:12

<define> <fib>n</fib> <if><leq>n 2</leq> 1 <plus><fib><minus>n 1</minus></fib> <fib><minus>n 2</minus></fib></plus> </if> </define> questions comments concerns


massung
2021-6-15 15:36:02

I feel like it needs tags around the literals and symbols, too. <leq><var>n</var><lit>2</lit></leq> :wink:


laurent.orseau
2021-6-15 15:42:25

ALL CAPS WOULD BE MORE READABLE


laurent.orseau
2021-6-15 15:43:37

and don’t use / for end tags, that’s so 2000. Use words in backward, like bif.


hazel
2021-6-15 16:24:35

DEFINE FIB n IF LEQ n 2 QEL THEN 1 ELSE PLUS FIB MINUS n 2 SUNIM BIF FIB MINUS n 2 SUNIM BIF SULP FI ENIFED


hazel
2021-6-15 16:24:42

rhombus take notes


laurent.orseau
2021-6-15 16:25:49

Nice! But I was thinking you’d keep the <> anyway :thinking_face:


hazel
2021-6-15 16:29:12

[DEFINE [FIB &lt;VAR TYPE=fixnum?&gt;n&lt;/VAR&gt;] [IF [LEQ &lt;REF&gt;n&lt;/REF&gt; &lt;LIT TYPE=fixnum?&gt;2&lt;/LIT&gt; QEL] 1 [PLUS [FIB [MINUS &lt;REF&gt;n&lt;/REF&gt; &lt;LIT TYPE=fixnum?&gt;1&lt;/LIT&gt; SUNIM] BIF] [FIB [MINUS &lt;REF&gt;n&lt;/REF&gt; &lt;LIT TYPE=fixnum?&gt;2&lt;/LIT&gt; SUNIM] BIF] SULP] FI] ENIFED]


laurent.orseau
2021-6-15 16:29:14

Also macros should be prefixed with __ for clarity, and keywords that can be omitted (due to redundancy) should be marked as such with a **# prefix and a #** suffix


laurent.orseau
2021-6-15 16:30:18

And numbers should be roman numerals for simplicity, obviously!


ben.knoble
2021-6-15 17:13:52

Next time on random langs: a generator for this fibonacci program in your (least) favorite syntaxes


jesse697
2021-6-15 18:11:47

there’s also @joel’s #lang tabloid, based on Tabloid: https://github.com/otherjoel/tabloid


jesse697
2021-6-15 18:13:36

DISCOVER HOW TO fibonacci WITH a, b, n RUMOR HAS IT WHAT IF n SMALLER THAN 1 SHOCKING DEVELOPMENT b LIES! RUMOR HAS IT YOU WON'T WANT TO MISS b SHOCKING DEVELOPMENT fibonacci OF b, a PLUS b, n MINUS 1 END OF STORY END OF STORY EXPERTS CLAIM limit TO BE 10 YOU WON'T WANT TO MISS 'First 10 Fibonacci numbers' EXPERTS CLAIM nothing TO BE fibonacci OF 0, 1, limit PLEASE LIKE AND SUBSCRIBE