Hi Yann,
  I'm glad to see others showing interest in ATS :D.  I'm not very familiar 
with the sort of scientific programming that you are talking about, but 
I'll do my best to respond to your questions regardless.
  You asked whether you could use 128 bit integers, SIMD, multicore, and 
even distributed computing.  Like, holy moly man.  :D  But yea, ATS can do 
basically anything C can, with the caveat that you may need to write FFI 
code due to the small size of the ATS ecosystem.
  As for the static capabilities of ATS, this I believe to be the strongest 
quality of ATS.  Indexing into arrays/matrices is verified at compile time 
so your example should be recreate-able in ATS.  And no, ATS' type system 
doesn't require you to constantly cast to verify the range of an integer, 
but it will force you write your code in such a way that the system knows 
without a doubt that the integer is not out of range.  It's hard to 
explain, but if you are interested I'd recommend working through the Intro 
to ATS book in the documentation on the website.
  I'm not involved with the development of ATS3, so gmhwxi would know more 
about how much it will change.  I'd recommend reading previous posts about 
ATS3 to find out more.
Good luck.

On Sunday, January 23, 2022 at 12:46:12 PM UTC-5 Yann Le Du wrote:

> Dear ATSites,
>
> First, impressed by the power of ATS which unfortunately for me is still 
> inaccessible even after spending the typical time I spend overviewing other 
> languages. For sure, I've listened to many people saying how hard it was, 
> so that didn't help ;-) Maybe they want to keep ATS for themselves and 
> frighten away potential new users ?
>
> I'm a physicist, cosmologist, currently working on setting up a project 
> involving image reconstruction, around what the Chebfun matlab toolbox 
> implements. Now, I've been looking at Dex, he new google research language, 
> because that's typically what I need,for exactly the same reason the 
> designers made Dex (escape Matlab and go for more than its clone on juice, 
> Julia) but it looks very experimental and doesn't really have all I need, 
> especially interfacing with C.
>
> So first, would I be able to massage ATS into allowing some nice syntax, I 
> mean can I code a library (using whatever tools I totally don't understand 
> today) that would allow me to write 
>
> `for i,j: C.i.j = A.i.k * B.k.j`
>
> In a very similar way to Dex (who has ranged integer type for the 
> indices), i.e. which would be interpreted as :
>
> ```
> for i in rows range of A:
>   for j in colums range of B:
>     for k in cols of A == rows of B:
>       C[i,j] = A[i,k] * B[k,j]
> ```
>
> or whatever equivalent in ATS.
>
> You will notice that it loops implicitly on k (Einstein summation), thus 
> without me specifying k, and all the indices getting checked like in Dex at 
> compile time, with inference wherever needed. This means I want to be able 
> to write M.2.3 = 25 (meaning M[2,3]=5) without casting overhead like in Dex 
> (they have to cast from integers to ranged ordinals if I remember).
>
> I would also need support for 128 bit integers and all for cryptographic 
> uses, the possibility of defining
>
> foo(m `Matrix[12 rows, any u32 in [0,23] columns, any float type for the 
> elements, unknown variance]`)
>
> and then call foo with `foo(b)` and b is checked to fit the type declared 
> for foo's arguments, so it wold tell me if I try to put in a matrix with 
> too many rows, but accept a matrix with 12 rows and 21 columns filled with 
> f32, the possibility of defining a set of accepted types, including 
> constants, and check if what I use belongs to that set, abstractions like 
> OO to better contain the math abstractions we manipulate.
>
> Also, the possibility to implement the right structures for SIMD and all 
> that, SOA, etc. This organizing my memory as I want, perhaps not from the 
> start, but as the project progresses.
>
> The possibility of multicores, and distributed computing.
>
> Proving that some functions are right.
>
> And last but not least, how much will I have to [un|re]learn when ATS3 is 
> released ?
>
> And maybe other questions will follow if the above receives positive 
> answers...
>
> By the way, why no Discord channel ? It's so helpful for a community.
>
> It's a big pile of questions, I just want to know if learning ATS could 
> make those features possible. My other path is to go to Rust and hope I can 
> massage the macros to handle my syntax, but Rust doesn't have true range 
> types for the tensor indices I want to use, although some crate imitates 
> them, and ATS looks much more powerful to me.
>
> That's it, I hope ATS can do all that.
>
> Best,
>
> Yann
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/658ea5c8-589f-483d-90c5-9a8c768f9125n%40googlegroups.com.

Reply via email to