# meta Meta language released

## Recommended Posts

14 hours ago, zbyti said:

Interesting:

```count: 10

repeat count [write/line count: 10 - count]

write/line "end"```

In REBOL:

```REBOL []

count: 10

loop count [print count: 10 - count]

print "end"```

it gives the same result:

```0
10
0
10
0
10
0
10
0
10
end```

This is also a good example why we do need documentation (or at least description of differences from REBOL) for writing even basic code:

• In META repeat has different use/meaning than in REBOL
• In META write has different use/meaning than in REBOL
Edited by ilmenit

##### Share on other sites

I still don't get it

10 - 10 = 0 // OK

0 - 10 = 10 // it's new to me

In 8-bit world a expect rather 246.

Edited by zbyti

##### Share on other sites
13 hours ago, zbyti said:

the first produces 0 and 1000 alternately (which I don't understand), and the second of course 0.

in Meta repeat behaves like loop in Rebol, and the parameter count ONLY tells how many times the following block will be evaluated, where the count parameter seems to be evaluated only once, not after each loop iteration.

Take a look at the differences between loop, repeat and for in Loop functions sections of https://www.cis.upenn.edu/~matuszek/Concise Guides/Concise Rebol.html

I do not know the reason why loop exists in this language as a dedicated keyword (sorry, Rebol has no keywords, it's a "control function" ).

##### Share on other sites
```count: 10

repeat count [write/line count: count - 1]

write/line "end"```

this acts as I expected. I know count its not a repeat counter. Seems 0-x = x.

##### Share on other sites
25 minutes ago, zbyti said:

I still don't get it

10 - 10 = 0 // OK

0 - 10 = 10 // it's new to me

In 8-bit world a expect rather 246.

This is not how it works.

10-10 is 0

there is no 0-10 in your example, there is always count = 10-count, so it's either 10-0 or 10-10, depending if count is 0 or 10.

Here is the equivalent in C

```/*
count: 10
repeat count [write/line count: 10 - count]
write/line "end"
*/

#include <stdio.h>

int main()
{
int count = 10;

// loop count [] will only tell how many times execute the block
int times = count; // evaluated only once
for (int loop = 0; loop < times; ++loop)
{
count = 10 - count;
printf("%d\n", count);
}
printf("end");
}```

that gives:

```0
10
0
10
0
10
0
10
0
10
end```

Edited by ilmenit

##### Share on other sites

Yes, you are right

```var
count, i :byte;

begin

count := 10;

for i := count downto 1 do begin
count := 10 - count;
writeln(count);
end;

end.```

give the same result.

Edited by zbyti

##### Share on other sites

seems to be a serious dimness on my part

##### Share on other sites
```var
count, i :byte;

begin

count := 10;

for i := count downto 1 do begin
count := count - 10;
writeln(count);
end;

end.```
```0
246
236
226
216
206
196
186
176
166
```

Again, I was sure I was write something else

Edited by zbyti

##### Share on other sites

I can't explain why I was so sure what I wrote even looking at different code:

```count: 10

repeat count [write/line count: count - 10]

write/line "end"```

Edited by zbyti

##### Share on other sites

You can use DECREMENT COUNT to make it clearer, but it will have a different effect.

##### Share on other sites

Ok. No more programming for me... I swap my profession to baking donuts. I see things...

##### Share on other sites

When I come back to programming I will surely need you.

• 1
• 1

##### Share on other sites
7 hours ago, ilmenit said:

curl: (60) SSL certificate problem: unable to get local issuer certificate

7 hours ago, ilmenit said:

I tried to use the compile.ape with curl.exe to compile a sample program, however with "Result is in file program.xex" there is no program.xex in the current directory. Any hints?

Edited by Kaj de Vos

##### Share on other sites
3 hours ago, ilmenit said:

Maybe less time consuming would be pointing the differences from REBOL?

14 hours ago, Kaj de Vos said:

I have a solution in the works for conversion from REBOL.

##### Share on other sites
15 hours ago, zbyti said:
```ping atari8.metaproject.frl
ping: atari8.metaproject.frl: Temporary failure in name resolution
```

this makes it difficult to play with. I wanted to write something more in Meta.

You can add atari8.metaproject.frl to your /etc/hosts file. That will make your DNS reliable for you.

##### Share on other sites

Thanks for trying Meta! It's really cool to see someone else using my language, especially on Atari.

##### Share on other sites
29 minutes ago, Kaj de Vos said:

Thanks for trying Meta! It's really cool to see someone else using my language, especially on Atari.

A very basic feature we are waiting for is ability to set some (preferably defined) memory array on an aligned memory location, and getting a 16bit pointer to it, so we can create a display list, screen memory and show some PMG 🙂

Edited by ilmenit

##### Share on other sites

Again, no pointers, but you can always get around it with little snippets of integrated assembly, so no need to wait.

##### Share on other sites
18 minutes ago, Kaj de Vos said:

Again, no pointers, but you can always get around it with little snippets of integrated assembly, so no need to wait.

Could you give an example how to do it? In the most basic case we need to:

1. Reserve some aligned (to \$800) memory location for PMG, but making sure that it won't be overwritten by the program code and data. From DeRe "The pointer to the beginning of the player-missile area is labelled PMBASE. Because of internal limitations of ANTIC, PMBASE must be on a 2K address boundary for single-line resolution, or a 1K address boundary for double-line resolution.".

2. Set the PMBASE (\$D407) to this aligned memory location (PMBASE= ~D407, from rainbow example, but still we need address of this reserved memory)

3. If possible, having this memory predefined with data, without need to copy of data to this location (something like binary inclusion or Bin2C approach to transform binary to the language array).

Edited by ilmenit

##### Share on other sites
19 hours ago, Kaj de Vos said:

Then you can do

```unsafe!!! [
LDA byte
STA/via SAVMSC
]```

What you call basic and simple is actually a complex challenge. Examples will come in due time.

##### Share on other sites
8 minutes ago, Kaj de Vos said:

What you call basic and simple is actually a complex challenge. Examples will come in due time.

Sure, I understand. By basic I mean here the basic use cases for 8bit Atari programming:

- using PMG

- using Display lists and Screen memory

- using custom fonts for text-modes

- having an excluded window in the middle of Atari memory (\$4000-\$8000) for banked memory

Without having it covered it's hard to come up with other program than one that is printing some text and values in the default text screen.

Edited by ilmenit

##### Share on other sites

Yes and no. I know all those use cases and have wanted for decades to make nice REBOL abstractions for them, even though they are very low-level. As Carl Sassenrath says, it is very hard to make things simple. Those abstractions simplify things and make them much more readable, but they take a lot of time to design and create.

That's why I also wanted the PL65 way of enabling everything right away through integrated assembly. You can do anything you want, but the nicer abstractions will come slowly over time.

##### Share on other sites
36 minutes ago, Kaj de Vos said:

Then you can do

```unsafe!!! [
LDA byte
STA/via SAVMSC
]```

and this does not align with "Human Readable" it requires some knowledge of assembler

##### Share on other sites

Comparing it with other assemblers may bring some enlightenment.

##### Share on other sites
12 minutes ago, Kaj de Vos said:

That's why I also wanted the PL65 way of enabling everything right away through integrated assembly. You can do anything you want, but the nicer abstractions will come slowly over time.

This is a good idea. Still integrated assembly may not solve all the issues that e.g. linker in C language is resolving (placement of symbolic addresses as numeric addresses in the memory). Also if Meta is going to address different platforms (even for 6502) then they may have different loaders (e.g. on Atari it's common that programs are split into multiple segments, on C64 programs have only one segment, and when compiled as cart images the output is made of cartridge memory banks).

## 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.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

• ### Recently Browsing   0 members

×
• Forums
• Clubs

• All Activity

• #### Subscriptions

×
• Create New...