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/a9e2e3d0-80db-454f-9cfb-aa0cf6e1fa20n%40googlegroups.com.
