Now ATS3-to-PY-in-ATS3.py can compile itself. In my first trial, it took about 9 hours for it to finish compiling itself. This means that ATS3-to-PY-in-ATS3.py is close to being *20* times slower when compared to ATS3-to-PY-in-ATS3.js. Therefore, one should always use the latter to generate Python3 code from ATS3 as long as one can run 'node'. We should expect compilers for ATS3 in the near future that can compile much faster than ATS3-to-PY-in-ATS3.js does.
Cheers! On Sunday, May 4, 2025 at 9:26:07 PM UTC-4 gmhwxi wrote: > Hi, > > I have finally managed to produce ATS3-to-PY-in-ATS3.py. However, this > compiler is not yet able to bootstrap itself. > > One major issue with this compiler is that its compilation speed is very > very slow when compared to its counterpart > in JS. It seems to be *10* times slower (or more). Still, it can be useful > if you are interested in write scripts in ATS3, which > I think I will do a great deal of in the near future. > > Cheers! > > --Hongwei > > > On Sunday, April 27, 2025 at 8:52:30 PM UTC-4 gmhwxi wrote: > >> >> I have just added a compiler from ATS3 to python3 (ATS3-to-PY-in-ATS3). >> >> Here is an example of using this compiler (which needs to be run using >> Node or Bun): >> >> >> https://github.com/githwxi/XATSHOME/tree/main/contrib/githwxi/pground/proj001%40250424/misc002 >> >> NodeJS is async, and it is not a good fit for developing compilers. I >> should have probably employed Python3 >> (instead of JS) in the first place as the target language for >> bootstrapping ATS3. I guess one big reason for this >> is that I had been burnt badly long ago by Python2's non-standard way of >> handling variable bindings. Awful! >> Anyway, given what we have, the good news is that it should be fairly >> straightforward now to get a compiler for >> ATS3 that can be run inside a browser. >> >> What we have now is ATS3-to-PY-in-ATS3.js. I hope we will soon have >> ATS3-to-PY-inATS3.py. Then we don't need >> Node for compiling ATS3 programs; we can use Python3 in place of Node. >> >> Cheers! >> >> --Hongwei >> >> On Friday, April 25, 2025 at 12:44:38 PM UTC-4 gmhwxi wrote: >> >>> It is released. >>> >>> The ATS3-to-JS-in-ATS3 compiler released >>> was generated this morning. It is still warm :) >>> Yes, you need to have access to 'node' or 'nodejs' >>> (probably a fairly recent version) in order to run the >>> compiler and the JS code generated by the compiler. >>> >>> I created a repository for those interested in trying ATS3: >>> >>> https://github.com/githwxi/XATSHOME >>> >>> Here is an example of computing a linear stream of prime numbers: >>> >>> >>> https://github.com/githwxi/XATSHOME/blob/main/contrib/githwxi/pground/proj001%40250424/misc001/pstrm000.dats >>> >>> Will gradually write more and more documentation. It is an on-going >>> process that has no ending in sight. >>> >>> Cheers! >>> >>> --Hongwei >>> >>> PS: Just checked my notes to learned that developing ATS3-to-JS-in-ATS3 >>> has taken about 3 years so far. The whole ATS-Xanadu >>> project started in April, 2018, since when 7 years has passed. >>> On Thursday, April 24, 2025 at 2:52:10 PM UTC-4 gmhwxi wrote: >>> >>>> Hi, there, >>>> >>>> I will be releasing the first version of ATS3 shortly. >>>> More will be said in a followup email. >>>> >>>> For those who are familiar with ATS2, I would like to emphasize >>>> that ATS3 is very different from ATS2 at this point. Many advanced >>>> features of ATS2 have yet to be incorporated into ATS3. >>>> >>>> As you can see, there are two words in 'program verification'. >>>> Verification needs to be built on top of a productive approach >>>> to program construction. >>>> >>>> While ATS2 focuses on program verification, ATS3 has shifted the >>>> focus on program construction. The first priority of ATS3 is to provide >>>> a means for programmers to construct programs in a higher productive >>>> manner. The feature of templates in ATS3 is my attempt at it, and it is >>>> likely my last attempt at it as well. One could only experiment for so >>>> much >>>> and so long in one's own limited capacity. >>>> >>>> Cheers! >>>> >>>> Hongwei Xi >>>> Principal Designer and Implementer of ATS PL System >>>> >>>> >>>> >>>> -- 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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/ats-lang-users/d2701ddb-8133-474b-bf26-dfa4a0f4dc2fn%40googlegroups.com.
