After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Major releases of external packages for ATS2 are available at:
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
It seems like in that case ‘get’ (or ‘get()’) would be the function part of
the function all, and c0 would be the rest of it.
Also, why is it not an issue for nonlinear values; why must linear values
require () for their dot-notation overloading? I suspect it may be a not so
interesting complexity in the grammar, in which case, I’m happy to stop
there :).On Thu, Oct 2, 2014 at 6:38 PM, gmhwxi gmh...@gmail.com wrote:
In a function call, you have a function and some arguments; c0.get should
be the
function part inside a function call.
On Thursday, October 2, 2014 4:31:14 PM UTC-4, Brandon Barker wrote:
Regarding dot-notation overloading for linear values, I can appreciate
that the handling might need to be different, but I don’t actually see
where the linearity comes in to play. I also don’t really understand the
statement: Instead, one needs to use c0.get *as the function inside a
function call *in order to call counter_get on c0:
val n0 = c0.get() // = counter_get(c0)
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on >>compilation.
I would say that being able to handle ‘foo’ does not really make ATS more
useful.
For one thing, there is no easy way in ATS to initialize array fields in a
safe manner.
While it can be done, it is so involved that I doubt anyone wants to do it
after going
through the trouble once.
If ‘foo2’ can be handled, why require a compiler argument?
To make sure that the user really knows what he is doing.On Fri, Oct 3, 2014 at 4:27 PM, Brandon Barker brandon...@gmail.com wrote:
This seems to raise two questions:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be
unsafe (without using dependent types for array length), so the default is
to disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,
On Fri, Oct 3, 2014 at 3:18 PM, Hongwei Xi gmh...@gmail.com wrote:
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be given
a name in C and then
this name can be used in ATS. However, the following type declaration can
be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have -D_ATS_ARRAY_FIELD
when compiling.
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
I just don’t feel that it is worth the effort to support this
kind of read-only arrays in ATS. If it is really needed, then
there is always a way to do it in C.
This isOn Saturday, October 4, 2014 6:33:23 PM UTC-4, Brandon Barker wrote:
I thought this implied it was stack allocated. I also thought that record
types starting with ‘@’ are stack allocated unless explicitly put on the
heap (just like a struct in c), so it would seem these would be compatible.
But something does seem off. I actually thought
val x = …
implied stack allocation by default, unless some function using malloc is
employed or a nonlinear type is used. While, both of these typecheck, only
the latter compiles:
On Friday, October 3, 2014 7:54:33 PM UTC-4, gmhwxi wrote:
It is safe, but where do you store a value like @[int]5?
On Fri, Oct 3, 2014 at 6:02 PM, Brandon Barker brand...@gmail.com wrote:
On Fri, Oct 3, 2014 at 4:44 PM, Hongwei Xi gmh...@gmail.com wrote:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on >>compilation.
I would say that being able to handle ‘foo’ does not really make ATS
more useful.
For one thing, there is no easy way in ATS to initialize array fields
in a safe manner.
While it can be done, it is so involved that I doubt anyone wants to do
it after going
through the trouble once.
What am I missing here? (this typechecks with the above ‘foo’ type, but
does not compile):
This looks safe to me; field3 should be an integer array of length 5
with each entry initialized to 1?
If ‘foo2’ can be handled, why require a compiler argument?
To make sure that the user really knows what he is doing.
On Fri, Oct 3, 2014 at 4:27 PM, Brandon Barker brand...@gmail.com wrote:
This seems to raise two questions:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be
unsafe (without using dependent types for array length), so the default is
to disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,
On Fri, Oct 3, 2014 at 3:18 PM, Hongwei Xi gmh...@gmail.com wrote:
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be
given a name in C and then
this name can be used in ATS. However, the following type declaration
can be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have
-D_ATS_ARRAY_FIELD when compiling.
On Fri, Oct 3, 2014 at 10:04 AM, Brandon Barker <brand...@gmail.com wrote:
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a
short example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last
release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of
explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with
OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from
$extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
In a function call, you have a function and some arguments; c0.get should
be the
function part inside a function call.
In programming languages, the right terminology for this is to say that
c0.get must be
in an applied position.On Thursday, October 2, 2014 7:00:50 PM UTC-4, Brandon Barker wrote:
It seems like in that case ‘get’ (or ‘get()’) would be the function part
of the function all, and c0 would be the rest of it.
Also, why is it not an issue for nonlinear values; why must linear values
require () for their dot-notation overloading? I suspect it may be a not so
interesting complexity in the grammar, in which case, I’m happy to stop
there :).
On Thu, Oct 2, 2014 at 6:38 PM, gmhwxi <gmh...@gmail.com <javascript:>> wrote:
In a function call, you have a function and some arguments; c0.get should
be the
function part inside a function call.
On Thursday, October 2, 2014 4:31:14 PM UTC-4, Brandon Barker wrote:
Regarding dot-notation overloading for linear values, I can appreciate
that the handling might need to be different, but I don’t actually see
where the linearity comes in to play. I also don’t really understand the
statement: Instead, one needs to use c0.get *as the function inside a
function call *in order to call counter_get on c0:
val n0 = c0.get() // = counter_get(c0)
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Ah, yes now I see the intent a bit better - thanks.On Thu, Oct 2, 2014 at 7:08 PM, gmhwxi gmh...@gmail.com wrote:
You can do
foo.x := x0
but you cannot do
foo.x() := x0
The plain dot notation and the functional dot notation have to be handled
differently.
On Thursday, October 2, 2014 7:00:50 PM UTC-4, Brandon Barker wrote:
It seems like in that case ‘get’ (or ‘get()’) would be the function part
of the function all, and c0 would be the rest of it.
Also, why is it not an issue for nonlinear values; why must linear values
require () for their dot-notation overloading? I suspect it may be a not so
interesting complexity in the grammar, in which case, I’m happy to stop
there :).
In a function call, you have a function and some arguments; c0.get
should be the
function part inside a function call.
On Thursday, October 2, 2014 4:31:14 PM UTC-4, Brandon Barker wrote:
Regarding dot-notation overloading for linear values, I can appreciate
that the handling might need to be different, but I don’t actually see
where the linearity comes in to play. I also don’t really understand the
statement: Instead, one needs to use c0.get *as the function inside a
function call *in order to call counter_get on c0:
val n0 = c0.get() // = counter_get(c0)
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
I just don’t feel that it is worth the effort to support this
kind of read-only arrays in ATS. If it is really needed, then
there is always a way to do it in C.
That sounds reasonable and fair. I just didn’t know that was the issue at hand.
I’ll try to add some of this to the wiki soon.
I thought this implied it was stack allocated. I also thought that record
types starting with ‘@’ are stack allocated unless explicitly put on the
heap (just like a struct in c), so it would seem these would be compatible.
But something does seem off. I actually thought
val x = …
implied stack allocation by default, unless some function using malloc is
employed or a nonlinear type is used. While, both of these typecheck, only
the latter compiles:
It is safe, but where do you store a value like @[int]5?
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on >>compilation.
I would say that being able to handle ‘foo’ does not really make ATS
more useful.
For one thing, there is no easy way in ATS to initialize array fields
in a safe manner.
While it can be done, it is so involved that I doubt anyone wants to do
it after going
through the trouble once.
What am I missing here? (this typechecks with the above ‘foo’ type, but
does not compile):
This looks safe to me; field3 should be an integer array of length 5
with each entry initialized to 1?
If ‘foo2’ can be handled, why require a compiler argument?
To make sure that the user really knows what he is doing.
This seems to raise two questions:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be
unsafe (without using dependent types for array length), so the default is
to disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,
but could you post a short example about the use case for
-D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be
given a name in C and then
this name can be used in ATS. However, the following type declaration
can be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have
-D_ATS_ARRAY_FIELD when compiling.
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a
short example about the use case for -D_ATS_ARRAY_FIELD?
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last
release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other
languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of
explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with
OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from
$extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
In a function call, you have a function and some arguments; c0.get
should
be the
function part inside a function call.
In programming languages, the right terminology for this is to say that
c0.get must be
in an applied position.
IMO this OOPish notation is confusing, but that’s not your fault.
The problem (obvious after some use of Python) is that the thing to
the left of the period is an argument, and so has to be thought of as
if it were the first thing after the ‘(’.
I actually use python a bit, so this part wasn’t confusing for me, and
indeed reminded me of python immediately.
I still think it is convenient - you can
tab-complete a method name in IPython. But, if you had a functionally
oriented (or type oriented?) IPython,
maybe you could tab complete existing object names for a particular
function.
This seems easier to do in some sense, as it is usually much easier to
remember a function name and type
that in than a variable name.
Still, it might prove useful even for OOP-skeptical me, one day.
(20 years ago I was OOP-boosting, but now I am OOP-skeptical. )
In a function call, you have a function and some arguments; c0.get should
be the
function part inside a function call.On Thursday, October 2, 2014 4:31:14 PM UTC-4, Brandon Barker wrote:
Regarding dot-notation overloading for linear values, I can appreciate
that the handling might need to be different, but I don’t actually see
where the linearity comes in to play. I also don’t really understand the
statement: Instead, one needs to use c0.get *as the function inside a
function call *in order to call counter_get on c0:
val n0 = c0.get() // = counter_get(c0)
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi <gmh...@gmail.com <javascript:>> wrote:
---------- Forwarded message ----------
From: Hongwei Xi <hw…@bu.edu <javascript:>>
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net <javascript:>
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
The plain dot notation and the functional dot notation have to be handled
differently.On Thursday, October 2, 2014 7:00:50 PM UTC-4, Brandon Barker wrote:
It seems like in that case ‘get’ (or ‘get()’) would be the function part
of the function all, and c0 would be the rest of it.
Also, why is it not an issue for nonlinear values; why must linear values
require () for their dot-notation overloading? I suspect it may be a not so
interesting complexity in the grammar, in which case, I’m happy to stop
there :).
On Thu, Oct 2, 2014 at 6:38 PM, gmhwxi <gmh...@gmail.com <javascript:>> wrote:
In a function call, you have a function and some arguments; c0.get should
be the
function part inside a function call.
On Thursday, October 2, 2014 4:31:14 PM UTC-4, Brandon Barker wrote:
Regarding dot-notation overloading for linear values, I can appreciate
that the handling might need to be different, but I don’t actually see
where the linearity comes in to play. I also don’t really understand the
statement: Instead, one needs to use c0.get *as the function inside a
function call *in order to call counter_get on c0:
val n0 = c0.get() // = counter_get(c0)
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
However, C does not have special syntax for supporting OOP. Take a look at
GTK.
Basically, a method call looks like this: method(object, arg_1, …, arg_n).
You can actually use the (functional) dot-notation overloading in ATS to
make these
calls look like calls in OOP: object.method(arg_1, …, arg_n).On Fri, Oct 3, 2014 at 10:04 AM, Brandon Barker brandon...@gmail.com wrote:
Is there any way to use $extmcall in C - perhaps if the object is a struct
and one of its fields is a function pointer? Admittedly this is probably a
rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
It is safe, but where do you store a value like @[int]5?On Fri, Oct 3, 2014 at 6:02 PM, Brandon Barker brandon...@gmail.com wrote:
On Fri, Oct 3, 2014 at 4:44 PM, Hongwei Xi gmh...@gmail.com wrote:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on >>compilation.
I would say that being able to handle ‘foo’ does not really make ATS more
useful.
For one thing, there is no easy way in ATS to initialize array fields in
a safe manner.
While it can be done, it is so involved that I doubt anyone wants to do
it after going
through the trouble once.
What am I missing here? (this typechecks with the above ‘foo’ type, but
does not compile):
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be
unsafe (without using dependent types for array length), so the default is
to disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,
On Fri, Oct 3, 2014 at 3:18 PM, Hongwei Xi gmh...@gmail.com wrote:
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be
given a name in C and then
this name can be used in ATS. However, the following type declaration
can be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have
-D_ATS_ARRAY_FIELD when compiling.
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of
explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with
OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
Regarding dot-notation overloading for linear values, I can appreciate that
the handling might need to be different, but I don’t actually see where the
linearity comes in to play. I also don’t really understand the
statement: Instead,
one needs to use c0.get *as the function inside a function call *in order
to call counter_get on c0:
val n0 = c0.get() // = counter_get(c0)On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
Is there any way to use $extmcall in C - perhaps if the object is a struct
and one of its fields is a function pointer? Admittedly this is probably a
rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example using
‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be unsafe
(without using dependent types for array length), so the default is to
disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,On Fri, Oct 3, 2014 at 3:18 PM, Hongwei Xi gmh...@gmail.com wrote:
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be given a
name in C and then
this name can be used in ATS. However, the following type declaration can
be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have -D_ATS_ARRAY_FIELD
when compiling.
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
I thought this implied it was stack allocated. I also thought that record
types starting with ‘@’ are stack allocated unless explicitly put on the
heap (just like a struct in c), so it would seem these would be compatible.
But something does seem off. I actually thought
val x = …
implied stack allocation by default, unless some function using malloc is
employed or a nonlinear type is used. While, both of these typecheck, only
the latter compiles:
Thanks,On Friday, October 3, 2014 7:54:33 PM UTC-4, gmhwxi wrote:
It is safe, but where do you store a value like @[int]5?
On Fri, Oct 3, 2014 at 6:02 PM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:
On Fri, Oct 3, 2014 at 4:44 PM, Hongwei Xi <gmh...@gmail.com <javascript:>> wrote:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on >>compilation.
I would say that being able to handle ‘foo’ does not really make ATS
more useful.
For one thing, there is no easy way in ATS to initialize array fields in
a safe manner.
While it can be done, it is so involved that I doubt anyone wants to do
it after going
through the trouble once.
What am I missing here? (this typechecks with the above ‘foo’ type, but
does not compile):
This looks safe to me; field3 should be an integer array of length 5 with
each entry initialized to 1?
If ‘foo2’ can be handled, why require a compiler argument?
To make sure that the user really knows what he is doing.
On Fri, Oct 3, 2014 at 4:27 PM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:
This seems to raise two questions:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be
unsafe (without using dependent types for array length), so the default is
to disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,
On Fri, Oct 3, 2014 at 3:18 PM, Hongwei Xi <gmh...@gmail.com <javascript:>> wrote:
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be
given a name in C and then
this name can be used in ATS. However, the following type declaration
can be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have
-D_ATS_ARRAY_FIELD when compiling.
On Fri, Oct 3, 2014 at 10:04 AM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a
short example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi <gmh...@gmail.com <javascript:>> wrote:
---------- Forwarded message ----------
From: Hongwei Xi <hw…@bu.edu <javascript:>>
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-l...@lists.sourceforge.net <javascript:>
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of
explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with
OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on >>compilation.
I would say that being able to handle ‘foo’ does not really make ATS more
useful.
For one thing, there is no easy way in ATS to initialize array fields in a
safe manner.
While it can be done, it is so involved that I doubt anyone wants to do it
after going
through the trouble once.
What am I missing here? (this typechecks with the above ‘foo’ type, but
does not compile):
This looks safe to me; field3 should be an integer array of length 5 with
each entry initialized to 1?
If ‘foo2’ can be handled, why require a compiler argument?
To make sure that the user really knows what he is doing.
This seems to raise two questions:
Why can’t ‘foo’ be handled?
It seems to not be an issue of typechecking, as I can make an example
using ‘foo’ that typechecks. But of course it errors on compilation.
If ‘foo2’ can be handled, why require a compiler argument?
My guess for this one is that having arrays of arbitrary size can be
unsafe (without using dependent types for array length), so the default is
to disallow it. This seems especially dangerous for an unboxed record as it
might create some issues on the stack?
Thanks,
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be given
a name in C and then
this name can be used in ATS. However, the following type declaration
can be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have -D_ATS_ARRAY_FIELD
when compiling.
Is there any way to use $extmcall in C - perhaps if the object is a
struct and one of its fields is a function pointer? Admittedly this is
probably a rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in
records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
but could you post a short example about the use case for -
D_ATS_ARRAY_FIELD?
Say you declare a type foo as follows:
typedef foo = @{
field= int
, field2= string
, field3= @[int][5] // this cannot be handled
}
ATS will not be able to handle it correctly. Such a type should be given a
name in C and then
this name can be used in ATS. However, the following type declaration can
be handled in ATS:
typedef foo2 = @{
field= int
, field2= string
, field3= @[int] // this can be handled correctly.
If you want foo2 to be handled, then you need to have -D_ATS_ARRAY_FIELD
when compiling.On Fri, Oct 3, 2014 at 10:04 AM, Brandon Barker brandon...@gmail.com wrote:
Is there any way to use $extmcall in C - perhaps if the object is a struct
and one of its fields is a function pointer? Admittedly this is probably a
rare situation, but am just curious.
Sorry for being possibly obtuse once again, but could you post a short
example about the use case for -D_ATS_ARRAY_FIELD?
On Mon, Sep 29, 2014 at 1:39 PM, Hongwei Xi gmh...@gmail.com wrote:
---------- Forwarded message ----------
From: Hongwei Xi hw...@bu.edu
Date: Mon, Sep 29, 2014 at 1:37 PM
Subject: [ats-lang-users] ATS2-0.1.3 released
To: ats-lan...@lists.sourceforge.net
After installing ATS-Postiats-include, one can compile
the C code generated from ATS source without installing
the ATS compiler. So a convenient way to distribute software
written in ATS is to simply release the C code generated
from the ATS source.
See below for some major additions and changes in ATS2-0.1.3.
Cheers!
–Hongwei
This is the 12th release of ATS2, the successor of the ATS
programming language. The compiler for ATS2 is given the name
ATS/Positats, ATS2/Postiats or simply Postiats.
Here is a list of major additions and changes since the last release:
Adding support for dot-notation overloading in assignments.
This feature is mostly for interacting ATS with other languages.
See ATS2TUTORIAL/CHAP_DOTOVERLD for a short article of explanation.
Adding support for functional style o dot-notation overloading.
This feature makes it very convenient for ATS to interact with OOP.
Generally improving level-2 jsonization (pats_dynexp2_jsonize)
Adding support for extvar decl. (which is different from $extval):
extvar “external_name” = internal_value
ATS_DYNLOADFLAG is set to 1 by default only for DATS-files. So
dynloading SATS-files is no longer necessary (but it is still
harmless).
Adding support for $extmcall(ret_type, obj, “method”, arglst),
which translates into the method invocation: obj.method(arglst)
Adding -D_ATS_ARRAY_FIELD to safe-guard using array fields in records.
Slashdot TV. Videos for Nerds. Stuff that Matters.
In a function call, you have a function and some arguments; c0.get should
be the
function part inside a function call.
In programming languages, the right terminology for this is to say that
c0.get must be
in an applied position.
IMO this OOPish notation is confusing, but that’s not your fault.
The problem (obvious after some use of Python) is that the thing to
the left of the period is an argument, and so has to be thought of as
if it were the first thing after the ‘(’.
Still, it might prove useful even for OOP-skeptical me, one day.
(20 years ago I was OOP-boosting, but now I am OOP-skeptical. )
Sort of similar for me, though less expert and a more condense timeline