Re: Difficulties getting equality working with higher-kinded types

2018-02-13 Thread vamchale
Great, thanks for the reply! I'll have a look at updating it soon. 

-- 
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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/641eb202-abf3-4cb1-979c-fd0c8f1e3b23%40googlegroups.com.


Re: ATS3: ATS/Xanadu

2018-02-13 Thread gmhwxi

Thanks for writing it down.

Hopefully, this does not end up a merely pipe dream :)

I would also put 'type inference' high up there. Some variant
of Hindley-Milner type inference should be a crucial part of ATS3.

On Tuesday, February 13, 2018 at 2:52:29 PM UTC-5, Steinway Wu wrote:
>
> Hi Hongwei, just for the record, let me put down some offline discussions. 
>
> 1. Programmers can decide how a literal is parsed, or even write some 
> plugins to parse some custom literals. For instance, 1 can be interpreted 
> as int, nat, and int(1) etc. Programmers should be able to either turn a 
> knob, or annotate the literal, to switch among interpretations. 
> 2. Some meta-programming supports via templates. E.g. `derive` of Haskell. 
> 3. Formalization of templates.
> 4. Module systems. 
> 5. Session types :)
> 6. Modular design of the whole tool chain. E.g. parsing, type equality, 
> constraints solving, template dispatch, type erasure, etc. 
> 7. Maybe database-based compilations? We can store compiled blocks as a 
> (hash, binary IR) pairs in some file-based databases, for easy reuse. Not 
> sure how feasible it is. 
> 8. Interpreter, REPL, language servers, documentation tools, standard 
> libraries, type inference, etc. 
> 9. More importantly, a process for open source contribution. 
>
> Exciting!
>
> On Friday, February 9, 2018 at 1:15:22 PM UTC-5, gmhwxi wrote:
>>
>> For the moment, I just want to open a thread for ATS3.
>>
>> I decided to pick ATS/Xanadu for the full project name. I like the name 
>> Xanadu
>> because it is poetic and brings a feel of exoticness.
>>
>> ATS3 is supposed to be compiled to ATS2. At least at the beginning. I 
>> will try to
>> write more about what I have in mind regarding ATS3.
>>
>> I know that a lot of people have been complaining about the syntax of 
>> ATS2. So
>> we can start the effort of designing some "nice" syntax for ATS3. Please 
>> feel free
>> to post here if you would like share your opinions and ideas.
>>
>> I will be happy to take the lead but we definitely need to have some form 
>> of community
>> effort on this project given its size and scope.
>>
>> Cheers!
>>
>> --Hongwei
>>
>> PS: I felt rushed every time up to now when implementing ATS. This time I 
>> am hoping
>> to have the luxury of thinking about implementation a bit before actually 
>> doing 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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/2cc788cc-a31f-4431-9d49-e73545ae36fe%40googlegroups.com.


Re: ATS3: ATS/Xanadu

2018-02-13 Thread gmhwxi

It is not that I like pan-syntax. What I really like is syntax-independence,
but we are still very far from it :)

When facing uncertainties, I would say that one's natural reaction is to 
keep
the options open.

On Tuesday, February 13, 2018 at 2:24:08 PM UTC-5, August Alm wrote:
>
> I realize it may have sounded as if I like the feature of being able to 
> write the same thing in a multitude of ways. I don't. It's something both 
> Scala and ATS have in common and that I think it's problematic. In both 
> Haskell and C the are many ways of doing things, but not many ways/styles 
> of writing.

-- 
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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/865f623a-7b2a-4a6f-9d8f-ae111e95f8a2%40googlegroups.com.


Re: ATS3: ATS/Xanadu

2018-02-13 Thread Steinway Wu
Hi Hongwei, just for the record, let me put down some offline discussions. 

1. Programmers can decide how a literal is parsed, or even write some 
plugins to parse some custom literals. For instance, 1 can be interpreted 
as int, nat, and int(1) etc. Programmers should be able to either turn a 
knob, or annotate the literal, to switch among interpretations. 
2. Some meta-programming supports via templates. E.g. `derive` of Haskell. 
3. Formalization of templates.
4. Module systems. 
5. Session types :)
6. Modular design of the whole tool chain. E.g. parsing, type equality, 
constraints solving, template dispatch, type erasure, etc. 
7. Maybe database-based compilations? We can store compiled blocks as a 
(hash, binary IR) pairs in some file-based databases, for easy reuse. Not 
sure how feasible it is. 
8. Interpreter, REPL, language servers, documentation tools, standard 
libraries, type inference, etc. 
9. More importantly, a process for open source contribution. 

Exciting!

On Friday, February 9, 2018 at 1:15:22 PM UTC-5, gmhwxi wrote:
>
> For the moment, I just want to open a thread for ATS3.
>
> I decided to pick ATS/Xanadu for the full project name. I like the name 
> Xanadu
> because it is poetic and brings a feel of exoticness.
>
> ATS3 is supposed to be compiled to ATS2. At least at the beginning. I will 
> try to
> write more about what I have in mind regarding ATS3.
>
> I know that a lot of people have been complaining about the syntax of 
> ATS2. So
> we can start the effort of designing some "nice" syntax for ATS3. Please 
> feel free
> to post here if you would like share your opinions and ideas.
>
> I will be happy to take the lead but we definitely need to have some form 
> of community
> effort on this project given its size and scope.
>
> Cheers!
>
> --Hongwei
>
> PS: I felt rushed every time up to now when implementing ATS. This time I 
> am hoping
> to have the luxury of thinking about implementation a bit before actually 
> doing 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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/73f8357d-fdd7-4949-8515-6cd2abe96e1a%40googlegroups.com.


Re: ATS3: ATS/Xanadu

2018-02-13 Thread gmhwxi
Let's experiment.

My rough plan for now is to have something largely based
on the current syntax of ATS2 (modulo some minor fixes) as
the "ground" syntax. This syntax is going to be explicit and
verbose. There will be an interface for it (e.g., via JSON).

Then we can embrace a "pan-syntax" design. For instance,
Hakell-like syntax can be supported as long as it can be translated
to the ground syntax.

I think that Python-like syntax is a good idea, too. The seemingly
simple idea of using indentation to structure code can go a long way.
It is brilliant!

On Tuesday, February 13, 2018 at 12:11:28 PM UTC-5, August Alm wrote:
>
> Fine by me! As long as the syntax encourages a uniform and readable coding 
> style. Also, I think it would help ATS
> if it looked more (seemingly) familiar to a more widely known language. 
> For example, at the moment we have the
> abbreviated syntax " = {...}" for "= () where {...}", which allows us to 
> write function bodies of void-functions in a style
> that looks C-ish, but there is no nice way, I think, to write functions 
> with a non-void return type in the same way.
>
> Maybe Scala offers a good solution? Functions in Scala have the default 
> form:
>
> def functionName ([list of parameters]) : [return type] = {
>function body
>return [expr]
> }
>
>
> A different way is, e.g.,
>
> val add1: Int => Int = (i) => i + 1
>
>
> My point is that it is always allowed to put curly braces on the body 
> (same goes with 
> if-statements, etc.) so that it is possible to write consistently in a 
> C-ish style.
>
>
> Den tisdag 13 februari 2018 kl. 16:56:52 UTC+1 skrev Artyom Shalkhakov:
>
> If we talk syntax, why not adopt that of C? :-)
>>
>> 13 февр. 2018 г. 8:43 ПП пользователь "August Alm"  
>> написал:
>>
>> I second the preference for Haskell-style "let" and "where", which is to 
>> say no "end"s and no curly braces.
>> Of course, this requires indentation to be syntactic and not just a 
>> matter of aesthetics/readability. I think this
>> is a good thing, not just because it is more concise but maybe even more 
>> so because it enforces readability
>> (non-indented code will not compile) and stylistic uniformity in the 
>> community.
>>
>> As a side-note, Haskell allows curly braces and semi-colons as an 
>> optional form of writing.
>> One may write "foo f = let {x=a; y=b; ...} in ...", etc. Useful for 
>> one-liners or for people who want their code
>> to look like more C-ish.
>>
>>
>> Den måndag 12 februari 2018 kl. 19:59:54 UTC+1 skrev gmhwxi:
>>>
>>> Thanks.
>>>
>>> Haskell and Idris are definitely on my radar.
>>>
>>> Type inference in ATS is very week (largely due to the support
>>> for dependent types and linear types). To support concise syntax,
>>> type inference in ATS needs to greatly strengthened.
>>>
>>> On Sunday, February 11, 2018 at 8:34:48 PM UTC-5, vamchale wrote:

 I don't have any concrete suggestions, but I would suggest Idris as an 
 example to follow. Haskell syntax is relatively popular and concise, and 
 Idris' is even more refined.

 I will say I'd prefer syntax that eases functional programming, but 
 that might just be me. And I think that replacing - with 
 something more concise like -o would be a good decision either way.

 On Friday, February 9, 2018 at 12:15:22 PM UTC-6, gmhwxi wrote:
>
> For the moment, I just want to open a thread for ATS3.
>
> I decided to pick ATS/Xanadu for the full project name. I like the 
> name Xanadu
> because it is poetic and brings a feel of exoticness.
>
> ATS3 is supposed to be compiled to ATS2. At least at the beginning. I 
> will try to
> write more about what I have in mind regarding ATS3.
>
> I know that a lot of people have been complaining about the syntax of 
> ATS2. So
> we can start the effort of designing some "nice" syntax for ATS3. 
> Please feel free
> to post here if you would like share your opinions and ideas.
>
> I will be happy to take the lead but we definitely need to have some 
> form of community
> effort on this project given its size and scope.
>
> Cheers!
>
> --Hongwei
>
> PS: I felt rushed every time up to now when implementing ATS. This 
> time I am hoping
> to have the luxury of thinking about implementation a bit before 
> actually doing 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-user...@googlegroups.com.
>> To post to this group, send email to ats-lan...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/ats-lang-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ats-lang-users/7bf25292-2094-4d32-9d74-6937e298a240%40googlegroups.com
>>  
>> 

Re: ATS3: ATS/Xanadu

2018-02-13 Thread August Alm
Fine by me! As long as the syntax encourages a uniform and readable coding 
style. Also, I think it would help ATS
if it looked more (seemingly) familiar to a more widely known language. For 
example, at the moment we have the
abbreviated syntax " = {...}" for "= () where {...}", which allows us to 
write function bodies of void-functions in a style
that looks C-ish, but there is no nice way, I think, to write functions 
with a non-void return type in the same way.

Maybe Scala offers a good solution? Functions in Scala have the default 
form:

def functionName ([list of parameters]) : [return type] = {
   function body
   return [expr]
}


A different way is, e.g.,

val add1: Int => Int = (i) => i + 1


My point is that it is always allowed to put curly braces on the body (same 
goes with 
if-statements, etc.) so that it is possible to write consistently in a 
C-ish style.


Den tisdag 13 februari 2018 kl. 16:56:52 UTC+1 skrev Artyom Shalkhakov:

If we talk syntax, why not adopt that of C? :-)
>
> 13 февр. 2018 г. 8:43 ПП пользователь "August Alm"  > написал:
>
> I second the preference for Haskell-style "let" and "where", which is to 
> say no "end"s and no curly braces.
> Of course, this requires indentation to be syntactic and not just a matter 
> of aesthetics/readability. I think this
> is a good thing, not just because it is more concise but maybe even more 
> so because it enforces readability
> (non-indented code will not compile) and stylistic uniformity in the 
> community.
>
> As a side-note, Haskell allows curly braces and semi-colons as an optional 
> form of writing.
> One may write "foo f = let {x=a; y=b; ...} in ...", etc. Useful for 
> one-liners or for people who want their code
> to look like more C-ish.
>
>
> Den måndag 12 februari 2018 kl. 19:59:54 UTC+1 skrev gmhwxi:
>>
>> Thanks.
>>
>> Haskell and Idris are definitely on my radar.
>>
>> Type inference in ATS is very week (largely due to the support
>> for dependent types and linear types). To support concise syntax,
>> type inference in ATS needs to greatly strengthened.
>>
>> On Sunday, February 11, 2018 at 8:34:48 PM UTC-5, vamchale wrote:
>>>
>>> I don't have any concrete suggestions, but I would suggest Idris as an 
>>> example to follow. Haskell syntax is relatively popular and concise, and 
>>> Idris' is even more refined.
>>>
>>> I will say I'd prefer syntax that eases functional programming, but that 
>>> might just be me. And I think that replacing - with something 
>>> more concise like -o would be a good decision either way.
>>>
>>> On Friday, February 9, 2018 at 12:15:22 PM UTC-6, gmhwxi wrote:

 For the moment, I just want to open a thread for ATS3.

 I decided to pick ATS/Xanadu for the full project name. I like the name 
 Xanadu
 because it is poetic and brings a feel of exoticness.

 ATS3 is supposed to be compiled to ATS2. At least at the beginning. I 
 will try to
 write more about what I have in mind regarding ATS3.

 I know that a lot of people have been complaining about the syntax of 
 ATS2. So
 we can start the effort of designing some "nice" syntax for ATS3. 
 Please feel free
 to post here if you would like share your opinions and ideas.

 I will be happy to take the lead but we definitely need to have some 
 form of community
 effort on this project given its size and scope.

 Cheers!

 --Hongwei

 PS: I felt rushed every time up to now when implementing ATS. This time 
 I am hoping
 to have the luxury of thinking about implementation a bit before 
 actually doing 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-user...@googlegroups.com .
> To post to this group, send email to ats-lan...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ats-lang-users/7bf25292-2094-4d32-9d74-6937e298a240%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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/da6ba929-3070-440d-be9f-1c19a0e637c7%40googlegroups.com.


Re: ATS3: ATS/Xanadu

2018-02-13 Thread Artyom Shalkhakov
If we talk syntax, why not adopt that of C? :-)

13 февр. 2018 г. 8:43 ПП пользователь "August Alm" 
написал:

I second the preference for Haskell-style "let" and "where", which is to
say no "end"s and no curly braces.
Of course, this requires indentation to be syntactic and not just a matter
of aesthetics/readability. I think this
is a good thing, not just because it is more concise but maybe even more so
because it enforces readability
(non-indented code will not compile) and stylistic uniformity in the
community.

As a side-note, Haskell allows curly braces and semi-colons as an optional
form of writing.
One may write "foo f = let {x=a; y=b; ...} in ...", etc. Useful for
one-liners or for people who want their code
to look like more C-ish.


Den måndag 12 februari 2018 kl. 19:59:54 UTC+1 skrev gmhwxi:
>
> Thanks.
>
> Haskell and Idris are definitely on my radar.
>
> Type inference in ATS is very week (largely due to the support
> for dependent types and linear types). To support concise syntax,
> type inference in ATS needs to greatly strengthened.
>
> On Sunday, February 11, 2018 at 8:34:48 PM UTC-5, vamchale wrote:
>>
>> I don't have any concrete suggestions, but I would suggest Idris as an
>> example to follow. Haskell syntax is relatively popular and concise, and
>> Idris' is even more refined.
>>
>> I will say I'd prefer syntax that eases functional programming, but that
>> might just be me. And I think that replacing - with something
>> more concise like -o would be a good decision either way.
>>
>> On Friday, February 9, 2018 at 12:15:22 PM UTC-6, gmhwxi wrote:
>>>
>>> For the moment, I just want to open a thread for ATS3.
>>>
>>> I decided to pick ATS/Xanadu for the full project name. I like the name
>>> Xanadu
>>> because it is poetic and brings a feel of exoticness.
>>>
>>> ATS3 is supposed to be compiled to ATS2. At least at the beginning. I
>>> will try to
>>> write more about what I have in mind regarding ATS3.
>>>
>>> I know that a lot of people have been complaining about the syntax of
>>> ATS2. So
>>> we can start the effort of designing some "nice" syntax for ATS3. Please
>>> feel free
>>> to post here if you would like share your opinions and ideas.
>>>
>>> I will be happy to take the lead but we definitely need to have some
>>> form of community
>>> effort on this project given its size and scope.
>>>
>>> Cheers!
>>>
>>> --Hongwei
>>>
>>> PS: I felt rushed every time up to now when implementing ATS. This time
>>> I am hoping
>>> to have the luxury of thinking about implementation a bit before
>>> actually doing 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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/7bf25292-2094-4d32-9d74-6937e298a240%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 post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAKO6%3DqitoDCyXydY2ZsnwKtT8RP%2B51mkjNsYt5gyf_YUEN1u3A%40mail.gmail.com.