atscc doesn't compile hello world

2020-02-26 Thread Temirkhan Myrzamadi
I've installed ATS by typing the following commands:

```
sudo apt install ats2-lang
sudo apt install ats-lang-anairiats
```

My learn.dats file:

```
implement
main0 () = print("Hello, world!\n")
```

But atscc cannot compile it:

```
$ atscc -o hello learn.dats
/usr/lib/ats-anairiats-0.2.11/bin/atsopt --output learn_dats.c --dynamic 
learn.dats
/home/hirrolot/learn.dats: 13(line=4, offs=1) -- 48(line=4, offs=36): 
error(2): the dynamic identifier [main0] is unrecognized.
exit(ATS): uncaught exception: 
ATS_2d0_2e2_2e11_2src_2ats_error_2esats__FatalErrorException(1027)
```

The atscc version:

```
$ atscc --version
ATS/Anairiats version 0.2.11 with Copyright (c) 2002-2013 Hongwei Xi
gcc -I/usr/lib/ats-anairiats-0.2.11/ 
-I/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ 
-L/usr/lib/ats-anairiats-0.2.11/ccomp/lib64/ 
/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ats_prelude.c --version -lats 
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

My OS:

```
   hirrolot@hirrolot-desktop
 Mmds+.OS: Mint 19.1 tessa
 MMm::-://oymNMd+` Kernel: x86_64 Linux 
4.15.0-20-generic
 MMd  /++-sNMd:Uptime: 5h 42m
 MMNso/`  dMM`.::-. .-::.` .hMN:   Packages: 2194
 MMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: bash 4.4.20
 NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 2560x1440
 NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 4.0.10
 NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Muffin
 NMm  dMM  .mmd  `mmm   yMM. dMM   WM Theme: Mint-Y-Dark (Mint-Y)
 NMm  dMM`  ..`   ...   ydm. dMM   GTK Theme: Mint-Y [GTK2/3]
 hMM- +MMd/---...-:sdds  dMM   Icon Theme: Mint-Y
 -NMm- :hNMNNNmdy/`  dMM   Font: Noto Sans 9
  -dMNs-``----.``dMM   CPU: Intel Core i7-6700 @ 8x 4GHz 
[44.0°C]
   `/dMNmy+/:-:/yMMM   GPU: NV136
  ./ydNM   RAM: 3086MiB / 7927MiB
 \.MMM
  
```

I guess that I have an old version of ATS. How can I fix it?

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/b84b962a-1ba5-448b-8150-076dfcd987b0%40googlegroups.com.


Re: atscc doesn't compile hello world

2020-02-26 Thread Artyom Shalkhakov
Hi Temirkhan,

Please use "patscc" instead of "atscc".

ср, 26 февр. 2020 г. в 18:40, Temirkhan Myrzamadi :

> I've installed ATS by typing the following commands:
>
> ```
> sudo apt install ats2-lang
> sudo apt install ats-lang-anairiats
> ```
>
> My learn.dats file:
>
> ```
> implement
> main0 () = print("Hello, world!\n")
> ```
>
> But atscc cannot compile it:
>
> ```
> $ atscc -o hello learn.dats
> /usr/lib/ats-anairiats-0.2.11/bin/atsopt --output learn_dats.c --dynamic
> learn.dats
> /home/hirrolot/learn.dats: 13(line=4, offs=1) -- 48(line=4, offs=36):
> error(2): the dynamic identifier [main0] is unrecognized.
> exit(ATS): uncaught exception:
> ATS_2d0_2e2_2e11_2src_2ats_error_2esats__FatalErrorException(1027)
> ```
>
> The atscc version:
>
> ```
> $ atscc --version
> ATS/Anairiats version 0.2.11 with Copyright (c) 2002-2013 Hongwei Xi
> gcc -I/usr/lib/ats-anairiats-0.2.11/
> -I/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/
> -L/usr/lib/ats-anairiats-0.2.11/ccomp/lib64/
> /usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ats_prelude.c --version -lats
> gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
> Copyright (C) 2017 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ```
>
> My OS:
>
> ```
>hirrolot@hirrolot-desktop
>  Mmds+.OS: Mint 19.1 tessa
>  MMm::-://oymNMd+` Kernel: x86_64 Linux
> 4.15.0-20-generic
>  MMd  /++-sNMd:Uptime: 5h 42m
>  MMNso/`  dMM`.::-. .-::.` .hMN:   Packages: 2194
>  MMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: bash 4.4.20
>  NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 2560x1440
>  NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 4.0.10
>  NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Muffin
>  NMm  dMM  .mmd  `mmm   yMM. dMM   WM Theme: Mint-Y-Dark (Mint-Y)
>  NMm  dMM`  ..`   ...   ydm. dMM   GTK Theme: Mint-Y [GTK2/3]
>  hMM- +MMd/---...-:sdds  dMM   Icon Theme: Mint-Y
>  -NMm- :hNMNNNmdy/`  dMM   Font: Noto Sans 9
>   -dMNs-``----.``dMM   CPU: Intel Core i7-6700 @ 8x 4GHz
> [44.0°C]
>`/dMNmy+/:-:/yMMM   GPU: NV136
>   ./ydNM   RAM: 3086MiB / 7927MiB
>  \.MMM
>
> ```
>
> I guess that I have an old version of ATS. How can I fix it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/b84b962a-1ba5-448b-8150-076dfcd987b0%40googlegroups.com
> 
> .
>


-- 
Cheers,
Artyom Shalkhakov

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAKO6%3DqhijVMG1xXfAxfdgfZR7gigg5Yn5bJDGnLVT0huWjebaA%40mail.gmail.com.


Re: atscc doesn't compile hello world

2020-02-26 Thread Temirkhan Myrzamadi
This helped, thank you!

On Wednesday, February 26, 2020 at 10:43:04 PM UTC+6, Artyom Shalkhakov 
wrote:
>
> Hi Temirkhan,
>
> Please use "patscc" instead of "atscc".
>
> ср, 26 февр. 2020 г. в 18:40, Temirkhan Myrzamadi  >:
>
>> I've installed ATS by typing the following commands:
>>
>> ```
>> sudo apt install ats2-lang
>> sudo apt install ats-lang-anairiats
>> ```
>>
>> My learn.dats file:
>>
>> ```
>> implement
>> main0 () = print("Hello, world!\n")
>> ```
>>
>> But atscc cannot compile it:
>>
>> ```
>> $ atscc -o hello learn.dats
>> /usr/lib/ats-anairiats-0.2.11/bin/atsopt --output learn_dats.c --dynamic 
>> learn.dats
>> /home/hirrolot/learn.dats: 13(line=4, offs=1) -- 48(line=4, offs=36): 
>> error(2): the dynamic identifier [main0] is unrecognized.
>> exit(ATS): uncaught exception: 
>> ATS_2d0_2e2_2e11_2src_2ats_error_2esats__FatalErrorException(1027)
>> ```
>>
>> The atscc version:
>>
>> ```
>> $ atscc --version
>> ATS/Anairiats version 0.2.11 with Copyright (c) 2002-2013 Hongwei Xi
>> gcc -I/usr/lib/ats-anairiats-0.2.11/ 
>> -I/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ 
>> -L/usr/lib/ats-anairiats-0.2.11/ccomp/lib64/ 
>> /usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ats_prelude.c --version -lats 
>> gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
>> Copyright (C) 2017 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
>> PURPOSE.
>> ```
>>
>> My OS:
>>
>> ```
>>hirrolot@hirrolot-desktop
>>  Mmds+.OS: Mint 19.1 tessa
>>  MMm::-://oymNMd+` Kernel: x86_64 Linux 
>> 4.15.0-20-generic
>>  MMd  /++-sNMd:Uptime: 5h 42m
>>  MMNso/`  dMM`.::-. .-::.` .hMN:   Packages: 2194
>>  MMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: bash 4.4.20
>>  NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 2560x1440
>>  NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 4.0.10
>>  NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Muffin
>>  NMm  dMM  .mmd  `mmm   yMM. dMM   WM Theme: Mint-Y-Dark (Mint-Y)
>>  NMm  dMM`  ..`   ...   ydm. dMM   GTK Theme: Mint-Y [GTK2/3]
>>  hMM- +MMd/---...-:sdds  dMM   Icon Theme: Mint-Y
>>  -NMm- :hNMNNNmdy/`  dMM   Font: Noto Sans 9
>>   -dMNs-``----.``dMM   CPU: Intel Core i7-6700 @ 8x 4GHz 
>> [44.0°C]
>>`/dMNmy+/:-:/yMMM   GPU: NV136
>>   ./ydNM   RAM: 3086MiB / 7927MiB
>>  \.MMM
>>   
>> ```
>>
>> I guess that I have an old version of ATS. How can I fix it?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "ats-lang-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ats-lan...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ats-lang-users/b84b962a-1ba5-448b-8150-076dfcd987b0%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Cheers,
> Artyom Shalkhakov
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/015e13f7-cb38-4678-b074-777f1f756b72%40googlegroups.com.


Re: atscc doesn't compile hello world

2020-02-26 Thread Hongwei Xi
I see. You must have installed via the apt tool or something similar.

You can find how to install ATS on www.ats-lang.org

By the way, I think that you can make your program working if you write

implement main() = (print "Hello, world!\n"; 0)

Anyway, please install ATS2 (ATS-Postiats). What you have is ATS1, which is
for
people developing/maintaining ATS2.


On Wed, Feb 26, 2020 at 11:40 AM Temirkhan Myrzamadi 
wrote:

> I've installed ATS by typing the following commands:
>
> ```
> sudo apt install ats2-lang
> sudo apt install ats-lang-anairiats
> ```
>
> My learn.dats file:
>
> ```
> implement
> main0 () = print("Hello, world!\n")
> ```
>
> But atscc cannot compile it:
>
> ```
> $ atscc -o hello learn.dats
> /usr/lib/ats-anairiats-0.2.11/bin/atsopt --output learn_dats.c --dynamic
> learn.dats
> /home/hirrolot/learn.dats: 13(line=4, offs=1) -- 48(line=4, offs=36):
> error(2): the dynamic identifier [main0] is unrecognized.
> exit(ATS): uncaught exception:
> ATS_2d0_2e2_2e11_2src_2ats_error_2esats__FatalErrorException(1027)
> ```
>
> The atscc version:
>
> ```
> $ atscc --version
> ATS/Anairiats version 0.2.11 with Copyright (c) 2002-2013 Hongwei Xi
> gcc -I/usr/lib/ats-anairiats-0.2.11/
> -I/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/
> -L/usr/lib/ats-anairiats-0.2.11/ccomp/lib64/
> /usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ats_prelude.c --version -lats
> gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
> Copyright (C) 2017 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ```
>
> My OS:
>
> ```
>hirrolot@hirrolot-desktop
>  Mmds+.OS: Mint 19.1 tessa
>  MMm::-://oymNMd+` Kernel: x86_64 Linux
> 4.15.0-20-generic
>  MMd  /++-sNMd:Uptime: 5h 42m
>  MMNso/`  dMM`.::-. .-::.` .hMN:   Packages: 2194
>  MMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: bash 4.4.20
>  NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 2560x1440
>  NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 4.0.10
>  NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Muffin
>  NMm  dMM  .mmd  `mmm   yMM. dMM   WM Theme: Mint-Y-Dark (Mint-Y)
>  NMm  dMM`  ..`   ...   ydm. dMM   GTK Theme: Mint-Y [GTK2/3]
>  hMM- +MMd/---...-:sdds  dMM   Icon Theme: Mint-Y
>  -NMm- :hNMNNNmdy/`  dMM   Font: Noto Sans 9
>   -dMNs-``----.``dMM   CPU: Intel Core i7-6700 @ 8x 4GHz
> [44.0°C]
>`/dMNmy+/:-:/yMMM   GPU: NV136
>   ./ydNM   RAM: 3086MiB / 7927MiB
>  \.MMM
>
> ```
>
> I guess that I have an old version of ATS. How can I fix it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/b84b962a-1ba5-448b-8150-076dfcd987b0%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLqG_5h20Eq8NL47PLUH3%3D-vXnLQkxd7-yz6wm9Y0WwNww%40mail.gmail.com.