IGNORED

# meta Meta language released

## Recommended Posts

In #344 was incorrect Rebol forum link to FizzBuzz - fixed. It may have looked intentional but it was not.

##### Share on other sites

That forum has a permalink on top of the threads. The normal links change when new posts appear on the forum.

##### Share on other sites

Not everything works as expected in the Rebol world

##### Share on other sites

Which example is more readable and "human-friendly"?

```Meta [
Title:   {FizzBuzz math "game"}
Author:  "Kaj de Vos"
Rights:  "Copyright (c) 2021 Kaj de Vos"
PD/CC0
http://creativecommons.org/publicdomain/zero/1.0/
}
Notes: {
https://wiki.c2.com/?FizzBuzzTest
https://www.rosettacode.org/wiki/FizzBuzz
}
]

For counter 100 [
Third?: unless modulo counter 3 [write "Fizz"]

Any [
unless modulo counter 5 [write "Buzz"]
third?
write counter
]
Write " "
]
Write new-line```

or

```For number 100 [
p: 0

unless modulo number 3 [p: 1 write "Fizz"]
unless modulo number 5 [p: 1 write "Buzz"]

if p = 0 [write number]

Write " "
]
Write new-line
```

1, 2 or none?

maybe this one?

```For number 100 [
p: 0

unless modulo number 3 [p: 1 write "Fizz"]
unless modulo number 5 [p: 1 write "Buzz"]

unless p [write number]

Write " "
]
Write new-line
```

Edited by zbyti
##### Share on other sites

It's probably just a personal preference but I'd say "none"  Lets compare with the Python solution:

```for number in range(1, 100):
if number % 3 == 0 and number % 5 == 0:
print('FizzBuzz')
elif number % 3 == 0:
print('Fizz')
elif number % 5 == 0:
print('Buzz')
else:
print(number)```

##### Share on other sites

I think Zbyti's version follows the Principle of Least Surprise. I optimise my programs heavily with REBOL constructs that are elegant and that I know to generate efficient code, but not all of them are available in other languages. I want the examples to show off Meta's strengths, but in beginners' guides I will start with simpler constructs.

Many REBOL examples are different because they disregard efficiency. I think they make too much use of the dynamic features of the language. I inherited that attitude from Atari.

##### Share on other sites

1 minute ago, ilmenit said:

?

##### Share on other sites

11 hours ago, zbyti said:

Not everything works as expected in the Rebol world

Yep, you get free thinkers with original solutions.

##### Share on other sites

38 minutes ago, Kaj de Vos said:

Many REBOL examples are different because they disregard efficiency. I think they make too much use of the dynamic features of the language. I inherited that attitude from Atari.

Many programmers like to feel smart by writing very dense code and like in their eyes "elegant solutions". In many software houses such approach is considered a "bad habit" leading to "write-only code". Such code is hard to read for the ones who didn't write it, require compilation of the code in the head, is hard to modify and makes life harder for new programmers. While languages nowadays are very powerful and flexible it also takes experience not to use all the fancy features the language provides.

##### Share on other sites

I think my last example shows a problem in trying to talk to the computer with too many words:

[unless modulo number "works" do something] in other words: do something if something happens.

unless p I'm reading - do something if something didn't happen.

Edited by zbyti
##### Share on other sites

I think what we are missing is comments !!!

yes, that age old thing that many programmers just don't do.

As this is a new language, adding a comment alongside each line of code will help explain not

just what the program is doing, but also give insights on how the language works

##### Share on other sites

In the end, these problems are caused because our brains are limited. A language that can express more concepts in the same space is said to be more expressive. Thus, bigger challenges fit in your head when the programs are smaller.

It seems to be a problem of communication between human and machine, but the machine actually concurs. It, too, is limited, and smaller programs perform better.

##### Share on other sites

2 minutes ago, TGB1718 said:

I think what we are missing is comments !!!

yes, that age old thing that many programmers just don't do.

As this is a new language, adding a comment alongside each line of code will help explain not

just what the program is doing, but also give insights on how the language works

This example is ten lines and is compared with equivalent versions in hundreds of other languages. That should be enough for such an example.

As I said, in beginners' guides I will build it up as simple as possible, keeping the feedback here in mind.

##### Share on other sites

I think that symbolic languages are more exact and does not get the brain involved in understanding words but only problems.

##### Share on other sites

22 minutes ago, ilmenit said:

Many programmers like to feel smart by writing very dense code and like in their eyes "elegant solutions". In many software houses such approach is considered a "bad habit" leading to "write-only code". Such code is hard to read for the ones who didn't write it, require compilation of the code in the head, is hard to modify and makes life harder for new programmers. While languages nowadays are very powerful and flexible it also takes experience not to use all the fancy features the language provides.

Meta is not APL:

or K:

Meta is deliberately designed to be more verbose, literally. That's why I claim it to be closer to natural language. It is designed to work at a similar verbosity as human language.

##### Share on other sites

4 minutes ago, zbyti said:

I think that symbolic languages are more exact and does not get the brain involved in understanding words but only problems.

Meta is just as exact. It's Lisp with types added. But it tries to use real English words instead of weird abbreviations, and only the math symbols that many people are familiar with.

##### Share on other sites

@Kaj de Vos you do your job developing META I do mine using it. I have my preferences like K65 over 6502 mnemonics but I'm always open to something new. You demand feedback - I provide one

Edited by zbyti
##### Share on other sites

Because Meta is word based, you will be able to equate existing methods to any weird Unicode symbol you want. Pi would be useful, for example.

##### Share on other sites

1 minute ago, zbyti said:

I think that symbolic languages are more exact and does not get the brain involved in understanding words but only problems.

If I'm correct, adults usually do not read single letters in words but read familiar words as a symbols, leading to these tasks like "count the Fs" or https://www.lookhuman.com/design/58406-if-you-can-read-this-you-are-smart/tshirt (while in case of children just learning it's an issue).

##### Share on other sites

I think John Lennon and Einstein would be able to read that.

##### Share on other sites

28 minutes ago, Kaj de Vos said:

In the end, these problems are caused because our brains are limited. A language that can express more concepts in the same space is said to be more expressive. Thus, bigger challenges fit in your head when the programs are smaller.

It seems to be a problem of communication between human and machine, but the machine actually concurs. It, too, is limited, and smaller programs perform better.

I read the biography of Stanisław Ulam and there was a discussion about what language is better and mor suitable for certain things. The gentlemen knew 3 languages then, maybe four (Latin?).

If I'm not mistaken they found German more suitable for mathematics than Polish, I don't remember what they said about the French language

##### Share on other sites

9 minutes ago, ilmenit said:

If I'm correct, adults usually do not read single letters in words but read familiar words as a symbols, leading to these tasks like "count the Fs" or https://www.lookhuman.com/design/58406-if-you-can-read-this-you-are-smart/tshirt (while in case of children just learning it's an issue).

yes, I think this only happens if the words are relatively small in number and are used frequently - such as key words in programming languages.

##### Share on other sites

7 minutes ago, Kaj de Vos said:

I think John Lennon and Einstein would be able to read that.

I can read that, I often have a bigger problem with what I write myself

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.