I have written some examples on array and classdec that might be helpful to
some user of ATS. Most of these examples are similar to examples in "doc"
of ATS and some directly taken from sources in ATS contrib and lib.
Where the end aim is to have a linear implementation and safety is not
critical, I wonder if it is better to start out with linear mixed with
unsafe, in order to make the transition easier later on (I do not know if
this is true). It seems hard for most programmers to used to using
unsafe.sats, but I am thinking of breaking the habit by deliberately trying
to use it on some practice code as much as possible for a while.On Wednesday, March 5, 2014 9:55:31 AM UTC-5, gmhwxi wrote:
One thing that sets ATS apart from other programming languages
is the support for gradually transitioning an implementation that depends
on
GC into one that does not. This kind of transitioning can be guided by
typechecking.
There are several ways to use higher-order functions in ATS without the
need for GC:
Using templates.
Using stack-allocated closures.
Using linear closures, which are heap-allocated and can be safely freed.
Note that (1) and (2) do not even rely on malloc/free. So in ATS, you can
use higher-order functions in a setting (e.g., embedded programming) where
dynamic memory allocation is not allowed or supported.
On Wednesday, March 5, 2014 1:08:05 AM UTC-5, H Zhang wrote:
If systems software is the target shouldn’t we try harder to remove
dependence on GC? Or is it your view that non-linear types do not add much
value in ATS? What about higher order functions and closures? If stack
allocation is the answer how does one return a closure that is stack
allocated (I assume functions are first class objects in ATS but I may be
mistaken)? Or is GC dependence acceptable for systems software? Even if
that were the case it is still hard to create portable libraries (which I
think is where ATS could really shine, at least in the beginning) if there
is a dependence on access to runtime GC.
Haitao
On Tuesday, March 4, 2014 6:49:26 PM UTC-8, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer
be too far-stretched to
say that ATS will be able to make a visible positive impact on the
qualify of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be
helpful to some user of ATS. Most of these examples are similar to examples
in “doc” of ATS and some directly taken from sources in ATS contrib and lib.
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer be
too far-stretched to
say that ATS will be able to make a visible positive impact on the qualify
of software in the future.
In particular, the quality of systems software!On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be helpful
to some user of ATS. Most of these examples are similar to examples in
“doc” of ATS and some directly taken from sources in ATS contrib and lib.
One thing that sets ATS apart from other programming languages
is the support for gradually transitioning an implementation that depends on
GC into one that does not. This kind of transitioning can be guided by
typechecking.
There are several ways to use higher-order functions in ATS without the
need for GC:
Using templates.
Using stack-allocated closures.
Using linear closures, which are heap-allocated and can be safely freed.
Note that (1) and (2) do not even rely on malloc/free. So in ATS, you can
use higher-order functions in a setting (e.g., embedded programming) where
dynamic memory allocation is not allowed or supported.On Wednesday, March 5, 2014 1:08:05 AM UTC-5, H Zhang wrote:
If systems software is the target shouldn’t we try harder to remove
dependence on GC? Or is it your view that non-linear types do not add much
value in ATS? What about higher order functions and closures? If stack
allocation is the answer how does one return a closure that is stack
allocated (I assume functions are first class objects in ATS but I may be
mistaken)? Or is GC dependence acceptable for systems software? Even if
that were the case it is still hard to create portable libraries (which I
think is where ATS could really shine, at least in the beginning) if there
is a dependence on access to runtime GC.
Haitao
On Tuesday, March 4, 2014 6:49:26 PM UTC-8, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer
be too far-stretched to
say that ATS will be able to make a visible positive impact on the
qualify of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be helpful
to some user of ATS. Most of these examples are similar to examples in
“doc” of ATS and some directly taken from sources in ATS contrib and lib.
If systems software is the target shouldn’t we try harder to remove
dependence on GC? Or is it your view that non-linear types do not add much
value in ATS? What about higher order functions and closures? If stack
allocation is the answer how does one return a closure that is stack
allocated (I assume functions are first class objects in ATS but I may be
mistaken)? Or is GC dependence acceptable for systems software? Even if
that were the case it is still hard to create portable libraries (which I
think is where ATS could really shine, at least in the beginning) if there
is a dependence on access to runtime GC.
HaitaoOn Tuesday, March 4, 2014 6:49:26 PM UTC-8, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer
be too far-stretched to
say that ATS will be able to make a visible positive impact on the qualify
of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be helpful
to some user of ATS. Most of these examples are similar to examples in
“doc” of ATS and some directly taken from sources in ATS contrib and lib.
I forgot the mention that I added objectify/unobjectify into
prelude/arrayptr.
Give them a try if you have time.On Tuesday, March 4, 2014 9:49:26 PM UTC-5, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer
be too far-stretched to
say that ATS will be able to make a visible positive impact on the qualify
of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be helpful
to some user of ATS. Most of these examples are similar to examples in
“doc” of ATS and some directly taken from sources in ATS contrib and lib.
On Wednesday, March 5, 2014 1:08:05 AM UTC-5, H Zhang wrote:
If systems software is the target shouldn’t we try harder to remove
dependence on GC? Or is it your view that non-linear types do not add much
value in ATS? What about higher order functions and closures? If stack
allocation is the answer how does one return a closure that is stack
allocated (I assume functions are first class objects in ATS but I may be
mistaken)? Or is GC dependence acceptable for systems software? Even if
that were the case it is still hard to create portable libraries (which I
think is where ATS could really shine, at least in the beginning) if there
is a dependence on access to runtime GC.
Haitao
On Tuesday, March 4, 2014 6:49:26 PM UTC-8, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer
be too far-stretched to
say that ATS will be able to make a visible positive impact on the
qualify of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be
helpful to some user of ATS. Most of these examples are similar to examples
in “doc” of ATS and some directly taken from sources in ATS contrib and lib.
My impression is use of GC is often done while prototyping something.
For stack allocated closures see this thread: Redirecting to Google Groups Wednesday, March 5, 2014 1:08:05 AM UTC-5, H Zhang wrote:
If systems software is the target shouldn’t we try harder to remove
dependence on GC? Or is it your view that non-linear types do not add much
value in ATS? What about higher order functions and closures? If stack
allocation is the answer how does one return a closure that is stack
allocated (I assume functions are first class objects in ATS but I may be
mistaken)? Or is GC dependence acceptable for systems software? Even if
that were the case it is still hard to create portable libraries (which I
think is where ATS could really shine, at least in the beginning) if there
is a dependence on access to runtime GC.
Haitao
On Tuesday, March 4, 2014 6:49:26 PM UTC-8, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no longer
be too far-stretched to
say that ATS will be able to make a visible positive impact on the
qualify of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be helpful
to some user of ATS. Most of these examples are similar to examples in
“doc” of ATS and some directly taken from sources in ATS contrib and lib.
One should use whatever he or she finds to be the most effective approach
that suits
his or her problems.On Thursday, March 6, 2014 10:07:15 PM UTC-5, Brandon Barker wrote:
Where the end aim is to have a linear implementation and safety is not
critical, I wonder if it is better to start out with linear mixed with
unsafe, in order to make the transition easier later on (I do not know if
this is true). It seems hard for most programmers to used to using
unsafe.sats, but I am thinking of breaking the habit by deliberately trying
to use it on some practice code as much as possible for a while.
On Wednesday, March 5, 2014 9:55:31 AM UTC-5, gmhwxi wrote:
One thing that sets ATS apart from other programming languages
is the support for gradually transitioning an implementation that depends
on
GC into one that does not. This kind of transitioning can be guided by
typechecking.
There are several ways to use higher-order functions in ATS without the
need for GC:
Using templates.
Using stack-allocated closures.
Using linear closures, which are heap-allocated and can be safely
freed.
Note that (1) and (2) do not even rely on malloc/free. So in ATS, you can
use higher-order functions in a setting (e.g., embedded programming) where
dynamic memory allocation is not allowed or supported.
On Wednesday, March 5, 2014 1:08:05 AM UTC-5, H Zhang wrote:
If systems software is the target shouldn’t we try harder to remove
dependence on GC? Or is it your view that non-linear types do not add much
value in ATS? What about higher order functions and closures? If stack
allocation is the answer how does one return a closure that is stack
allocated (I assume functions are first class objects in ATS but I may be
mistaken)? Or is GC dependence acceptable for systems software? Even if
that were the case it is still hard to create portable libraries (which I
think is where ATS could really shine, at least in the beginning) if there
is a dependence on access to runtime GC.
Haitao
On Tuesday, March 4, 2014 6:49:26 PM UTC-8, gmhwxi wrote:
Thanks for sharing it!
I can see that you are getting more and more comfortable with ATS
If more and more people are willing to contribute, then it may no
longer be too far-stretched to
say that ATS will be able to make a visible positive impact on the
qualify of software in the future.
In particular, the quality of systems software!
On Tuesday, March 4, 2014 10:57:55 AM UTC-5, chotu s wrote:
I have written some examples on array and classdec that might be
helpful to some user of ATS. Most of these examples are similar to examples
in “doc” of ATS and some directly taken from sources in ATS contrib and lib.