hi,
Whenever I try to get a project building via C/++ I find it kind of a
nightmare. Usually things don’t work for me out of the box for whatever
reasons. I tend to have more luck with e.g. Java.
I wonder if it would be possible to have a version/target of ATS that did
not depend on C, even if it ends up writing out C. There are translators
from C to Java, for example.
I know, I know, it is probably a terrible fool’s errand to even think about
this…
(i think only via emscripten, a route i personally do not like, but ymmv.)
Source to source does seem safest in terms of FFI with that other language.
There are probably bytecodes / sequences thereof that would not be
interoperable with regular Java/C# sources in some weird way that is not
fun to debug.
Well, I am actually thinking about targeting Java.
It is just that there is too much other stuff at my hand right now…
By the way, the atscc2js compiler (for compiling the C code generated from
ATS into Javascript)
is getting more and more mature. I am using it all the time to do what I
call ATS and JS co-programming.
For instance, this is a poor man’s worm game I just wrote in ATS for my
class:
http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring16/assignments/10/Wormlike/Wormlike.html
Will find some time to use JS for the graphics part later.
By the way, I use Bacon.js for control, which is a FRP-based JS library. I
have an interface for it in ATS. Really love it!On Tue, May 3, 2016 at 4:56 PM, Raoul Duke rao...@gmail.com wrote:
(i think only via emscripten, a route i personally do not like, but ymmv.)
–
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/CAJ7XQb5rZNjty1Ni%2Bs%2BHfsEPNhXqBseo9r8-rAnbGN4YdRbXiQ%40mail.gmail.com
https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb5rZNjty1Ni%2Bs%2BHfsEPNhXqBseo9r8-rAnbGN4YdRbXiQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.
Do I recall correctly that ATS is running in the browser now? So
Javascript, not Java. Maybe package it up as node module… (I know
next to nothing about node).On Tue, May 3, 2016 at 4:22 PM, Raoul Duke rao...@gmail.com wrote:
hi,
Whenever I try to get a project building via C/++ I find it kind of a
nightmare. Usually things don’t work for me out of the box for whatever
reasons. I tend to have more luck with e.g. Java.
I wonder if it would be possible to have a version/target of ATS that did
not depend on C, even if it ends up writing out C. There are translators
from C to Java, for example.
I know, I know, it is probably a terrible fool’s errand to even think about
this…
–
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/CAJ7XQb46qtNkC%3DruvjTsWgtYGFU%3D6SP%3DdFgpijdrfu%3DWN9Nw2w%40mail.gmail.com.
Brandon Barker
brandon...@gmail.com
I at least would probably use ATS/Java co-programming for something
eventually – somewhat surprisingly (though not in retrospect) I have
yet to take on even one C/C++ project in the last 1.5 years but have
had three inherited and one new JVM project (which have mostly used
Java and Scala) …On Tue, May 3, 2016 at 5:42 PM, Hongwei Xi gmh...@gmail.com wrote:
Well, I am actually thinking about targeting Java.
It is just that there is too much other stuff at my hand right now…
By the way, the atscc2js compiler (for compiling the C code generated from
ATS into Javascript)
is getting more and more mature. I am using it all the time to do what I
call ATS and JS co-programming.
For instance, this is a poor man’s worm game I just wrote in ATS for my
class:
http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring16/assignments/10/Wormlike/Wormlike.html
Will find some time to use JS for the graphics part later.
By the way, I use Bacon.js for control, which is a FRP-based JS library. I
have an interface for it in ATS. Really love it!
On Tue, May 3, 2016 at 4:56 PM, Raoul Duke rao...@gmail.com wrote:
(i think only via emscripten, a route i personally do not like, but ymmv.)
–
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/CAJ7XQb5rZNjty1Ni%2Bs%2BHfsEPNhXqBseo9r8-rAnbGN4YdRbXiQ%40mail.gmail.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-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/CAPPSPLosBiqRBjetA80A5BYWwqjCcT0fN4hynaMXMSAyHfd%2BeA%40mail.gmail.com.
Brandon Barker
brandon...@gmail.com
Speaking of emscripten, I have a few horror stories of my own.
But I have to say that it is quite an impressive project. I once said
that it was a small miracle that the entire ATS compiler (atsopt) can
actually be compiled into JS successfully via emscripten. The generated
C code alone consists of at least 500K lines. In general, emscripten is
not well-suited for handling C code generated from ATS that makes use
of higher-order functions. I almost gave up. At the end, templates saved
the day: I replaced various higher-order functions in atsopt with templates
to allow them to be properly eliminated (through inlining). This kind of
replacement
had been designed to support the use of higher-order functions in embedded
programming,
but it was used in this very peculiar setting to solve a very peculiar
problem
Cheers!On Tuesday, May 3, 2016 at 4:56:31 PM UTC-4, Raoul Duke wrote:
(i think only via emscripten, a route i personally do not like, but ymmv.)
I at least would probably use ATS/Java co-programming for something
eventually – somewhat surprisingly (though not in retrospect) I have
yet to take on even one C/C++ project in the last 1.5 years but have
had three inherited and one new JVM project (which have mostly used
Java and Scala) …
I think that ATSCC->C# could be a good idea for a project too. I initially
tried to go the ATSCC->CIL route because I was very concerned about
subverting static typing in the target language. I now think it was a
mistake. A source-to-source compiler would make things much easier.> On Tue, May 3, 2016 at 5:42 PM, Hongwei Xi <gmh...@gmail.com <javascript:>> wrote:
Well, I am actually thinking about targeting Java.
It is just that there is too much other stuff at my hand right now…
By the way, the atscc2js compiler (for compiling the C code generated
from
ATS into Javascript)
is getting more and more mature. I am using it all the time to do what I
call ATS and JS co-programming.
For instance, this is a poor man’s worm game I just wrote in ATS for my
class:
http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring16/assignments/10/Wormlike/Wormlike.html
Will find some time to use JS for the graphics part later.
By the way, I use Bacon.js for control, which is a FRP-based JS library.
I
have an interface for it in ATS. Really love it!
On Tue, May 3, 2016 at 4:56 PM, Raoul Duke <rao...@gmail.com <javascript:>> wrote:
(i think only via emscripten, a route i personally do not like, but
ymmv.)
–
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...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
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/CAJ7XQb5rZNjty1Ni%2Bs%2BHfsEPNhXqBseo9r8-rAnbGN4YdRbXiQ%40mail.gmail.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...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
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/CAPPSPLosBiqRBjetA80A5BYWwqjCcT0fN4hynaMXMSAyHfd%2BeA%40mail.gmail.com.
–
Brandon Barker
brand...@gmail.com <javascript:>