An idea: How about make ATS language IDE based on drracket?

306 views
Skip to first unread message

Kiwamu Okabe

unread,
Oct 11, 2014, 11:50:39 PM10/11/14
to ats-lang-users, ats-lang-users
Hi all,

I'm learning Racket language with following slide:

2014-10-11: Introduction to Functional Programming « Articles « Extellisys
http://www.extellisys.com/articles/20141011-tlug-intro-to-functional-programming

How wonderful the racket IDE named drracket!!!
How about make ATS language IDE based on drracket?

http://docs.racket-lang.org/drracket/

Thank's,
--
Kiwamu Okabe at METASEPI DESIGN

Artyom Shalkhakov

unread,
Oct 12, 2014, 12:02:18 AM10/12/14
to Kiwamu Okabe, ats-lang-users, ats-lang-users
Hello Kiwamu,

2014-10-12 9:50 GMT+06:00 Kiwamu Okabe <kiw...@debian.or.jp>:
Hi all,

I'm learning Racket language with following slide:

2014-10-11: Introduction to Functional Programming « Articles « Extellisys
http://www.extellisys.com/articles/20141011-tlug-intro-to-functional-programming

How wonderful the racket IDE named drracket!!!
How about make ATS language IDE based on drracket?

http://docs.racket-lang.org/drracket/

It is very nice, indeed. I am all for making an IDE based on DrRacket. Another candidate would be MonoDevelop (besides, it has an F# bindings so we/I can take a look at how it works -- I don't know Racket much, unfortunately).

 

Thank's,
--
Kiwamu Okabe at METASEPI DESIGN

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
ats-lang-users mailing list
ats-lan...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ats-lang-users



--
Cheers,
Artyom Shalkhakov

gmhwxi

unread,
Oct 12, 2014, 3:10:55 AM10/12/14
to ats-lan...@googlegroups.com, ats-lan...@lists.sourceforge.net, kiw...@debian.or.jp
Or using the Eclipse framework? Alex Ren tried it a few years ago
and it was a very positive experience.

Using racket means that we ourselves have to do so many things
from scratch. Eclipse can provide a much needed ecosystem for us.

I assume that using MonoDevelop will give us a big ecosystem as well.

Kiwamu Okabe

unread,
Oct 12, 2014, 3:52:18 AM10/12/14
to ats-lang-users, ats-lang-users
Hi,

On Sun, Oct 12, 2014 at 4:10 PM, gmhwxi <gmh...@gmail.com> wrote:
> Using racket means that we ourselves have to do so many things
> from scratch. Eclipse can provide a much needed ecosystem for us.

Umm...
However drracket IDE is great.
Do you try to use it?

http://www.extellisys.com/static/articles/20141011-tlug-intro-to-functional-programming/20141011-IntroToFP.pdf

It's a good tutorial for drracket.
How wonderful showing many information at mouse hover!

And also eclipse is very slow, big and having messy architecture.

Hongwei Xi

unread,
Oct 12, 2014, 11:03:32 AM10/12/14
to ats-lan...@googlegroups.com

>>However drracket IDE is great.
>>Do you try to use it?

No, I have never used DrRacket. I had some experience with DrScheme.
I don't doubt DrRacket being great. The IDE that impressed me most in the
past was the one for SmallTalk; it was truly revolutionary in its days. I heard that
Self's IDE is great as well.

If you go ahead to build an IDE for ATS based on DrRacket, it will certainly help
the ats-lang-users community!


>>And also eclipse is very slow, big and having messy architecture.

This is absolutely true. We can probably say the same thing about Linux as well :)

In the long run, we can and probably should build several IDEs for ATS: ones for
light duties, ones for heavy duties, and maybe commercial ones as well :)





--
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 http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dnNbxnoNo1vTNiem_Q%3DP_vdKuQyV2q1w%3Dq3c6%2BOUmLSbw%40mail.gmail.com.

Brandon Barker

unread,
Oct 12, 2014, 1:42:03 PM10/12/14
to ats-lang-users
I'm curious where the eclipse-related plugins (if any) are now located, since I'll be using eclipse for some unrelated java work 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-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.

Yannick Duchêne

unread,
Oct 12, 2014, 2:44:04 PM10/12/14
to ats-lan...@googlegroups.com, ats-lan...@lists.sourceforge.net, kiw...@debian.or.jp


Le dimanche 12 octobre 2014 09:10:55 UTC+2, gmhwxi a écrit :
Or using the Eclipse framework? Alex Ren tried it a few years ago
and it was a very positive experience.

Using racket means that we ourselves have to do so many things
from scratch. Eclipse can provide a much needed ecosystem for us.

I assume that using MonoDevelop will give us a big ecosystem as well.


For the bad points, Eclipse is huge and is Java (I had a bad feeling of both Eclipse and jEdit, both Java), and MonoDevelop rely on Mono which is not mainstream any‑more on some platforms, including at least Ubuntu (I'm not even sure it's still supported at all).

What is exactly expected?

 

Yannick Duchêne

unread,
Oct 12, 2014, 2:53:59 PM10/12/14
to ats-lan...@googlegroups.com


Le dimanche 12 octobre 2014 17:03:32 UTC+2, gmhwxi a écrit :

>>However drracket IDE is great.
>>Do you try to use it?

No, I have never used DrRacket. I had some experience with DrScheme.
I don't doubt DrRacket being great. The IDE that impressed me most in the
past was the one for SmallTalk; it was truly revolutionary in its days. I heard that
Self's IDE is great as well.

If you go ahead to build an IDE for ATS based on DrRacket, it will certainly help
the ats-lang-users community!

True enough for the SmallTalk IDE (I tried it some many years ago). But in my opinion, the main issue with all IDEs, is that there is no standard abstract interface for language support… even a such basic thing as precise syntax colourization is often an issue (for someone who is dreaming about syntactical / semantic support, and not only token colourization, that's rather bad).
 

>>And also eclipse is very slow, big and having messy architecture.

This is absolutely true. We can probably say the same thing about Linux as well :)

Yes, while at least it has the advantage of being more lightweight than any of the latest Windows versions (I don't know for Mac OS).

In the long run, we can and probably should build several IDEs for ATS: ones for
light duties, ones for heavy duties, and maybe commercial ones as well :)

Would require precise specifications.
 

Yannick Duchêne

unread,
Oct 12, 2014, 2:56:51 PM10/12/14
to ats-lan...@googlegroups.com


Le dimanche 12 octobre 2014 20:53:59 UTC+2, Yannick Duchêne a écrit :


Would require precise specifications.
 
I forget to add: and an abstract one, if possible.

gmhwxi

unread,
Oct 12, 2014, 3:02:56 PM10/12/14
to ats-lan...@googlegroups.com
Absolument! That is the way to go.

I think ATS is very good for writing this abstract one :)

gmhwxi

unread,
Oct 12, 2014, 3:07:54 PM10/12/14
to ats-lan...@googlegroups.com
I don't know where to find it :(

When Alex sees this, he should be able to let us know.

Kiwamu Okabe

unread,
Oct 12, 2014, 6:06:07 PM10/12/14
to ats-lang-users, Takayuki Muranushi, Travis Cardwell
Hi Hongwei,

On Mon, Oct 13, 2014 at 12:03 AM, Hongwei Xi <gmh...@gmail.com> wrote:
> No, I have never used DrRacket. I had some experience with DrScheme.

I think you should try to use it.
It's fun!
Please type following:

casper$ sudo apt-get install racket
casper$ drracket

Then you will see the following result.

https://www.flickr.com/photos/masterq/15333007879/

Mouse hovers information is beautiful!!!

> If you go ahead to build an IDE for ATS based on DrRacket, it will certainly
> help
> the ats-lang-users community!

Sometimes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, I would like to try to do it!
However, I can't promise to do that.

I think they use the cairo simply.

casper$ grep anonscm .git/config
url = git://anonscm.debian.org/collab-maint/racket.git
casper$ grep -i -A 5 build-dep debian/control
Build-Depends: cdbs, debhelper (>= 7.0.0), patchutils, libffi-dev,
libfreetype6-dev, libjpeg-dev, libpango1.0-dev, libpng-dev, libssl-dev,
libxaw7-dev, xbitmaps, libxft-dev, libgl1-mesa-dev | libgl-dev,
libglu1-mesa-dev | libglu-dev, libx11-dev, libxrender-dev, libcairo2-dev,
sqlite3
Vcs-Git: git://anonscm.debian.org/collab-maint/racket.git

And the IDE is useful for Functional IoT project http://fpiot.metasepi.org/.

I think ATS2 needs a better IDE than drracket.
Because many beginner panics ATS2's strong type.
A good IDE helps them to understand ATS2's type.

>>>And also eclipse is very slow, big and having messy architecture.
>
> This is absolutely true. We can probably say the same thing about Linux as
> well :)

Ah,,,, sorry.
I decide Metasepi Bohai iteration http://metasepi.org/ chooses Linux
kernel as the target. ;)

Brandon Barker

unread,
Oct 12, 2014, 6:42:47 PM10/12/14
to ats-lang-users
On Sun, Oct 12, 2014 at 6:05 PM, Kiwamu Okabe <kiw...@debian.or.jp> wrote:
Hi Hongwei,

On Mon, Oct 13, 2014 at 12:03 AM, Hongwei Xi <gmh...@gmail.com> wrote:
> No, I have never used DrRacket. I had some experience with DrScheme.

I think you should try to use it.
It's fun!
Please type following:

casper$ sudo apt-get install racket
casper$ drracket

Then you will see the following result.

https://www.flickr.com/photos/masterq/15333007879/

That's pretty neat. 


Mouse hovers information is beautiful!!!

> If you go ahead to build an IDE for ATS based on DrRacket, it will certainly
> help
> the ats-lang-users community!

Sometimes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, I would like to try to do it!
However, I can't promise to do that.

I think they use the cairo simply.

casper$ grep anonscm .git/config
        url = git://anonscm.debian.org/collab-maint/racket.git
casper$ grep -i -A 5 build-dep debian/control
Build-Depends: cdbs, debhelper (>= 7.0.0), patchutils, libffi-dev,
 libfreetype6-dev, libjpeg-dev, libpango1.0-dev, libpng-dev, libssl-dev,
 libxaw7-dev, xbitmaps, libxft-dev, libgl1-mesa-dev | libgl-dev,
 libglu1-mesa-dev | libglu-dev, libx11-dev, libxrender-dev, libcairo2-dev,
 sqlite3
Vcs-Git: git://anonscm.debian.org/collab-maint/racket.git

And the IDE is useful for Functional IoT project http://fpiot.metasepi.org/.

I think ATS2 needs a better IDE than drracket.
Because many beginner panics ATS2's strong type.
A good IDE helps them to understand ATS2's type.


I agree as well, and have said the same on this forum a few months ago. But I don't see myself as the person to do this in the near future either.

 
>>>And also eclipse is very slow, big and having messy architecture.
>
> This is absolutely true. We can probably say the same thing about Linux as
> well :)

Ah,,,, sorry.
I decide Metasepi Bohai iteration http://metasepi.org/ chooses Linux
kernel as the target. ;)

Thank's,
--
Kiwamu Okabe at METASEPI DESIGN

--
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 http://groups.google.com/group/ats-lang-users.

Kiwamu Okabe

unread,
Oct 12, 2014, 7:00:19 PM10/12/14
to ats-lang-users
BTW. Racket is faster than Python.

Racket vs Python 3 | Computer Language Benchmarks Game
http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=racket&lang2=python3&data=u64q

Yannick Duchêne

unread,
Oct 12, 2014, 11:57:37 PM10/12/14
to ats-lan...@googlegroups.com, kiw...@debian.or.jp
While that's not hard to be faster than Python (red-face). Thanks for the mention of Raket and DrRacket. I never cared about neither before, and will give it a quick look out of curiosity.

Thanks to you for that :p

Artyom Shalkhakov

unread,
Oct 14, 2014, 12:28:51 PM10/14/14
to ats-lan...@googlegroups.com, ats-lan...@lists.sourceforge.net, kiw...@debian.or.jp
On Sunday, October 12, 2014 9:50:39 AM UTC+6, Kiwamu Okabe wrote:
Hi all,

I'm learning Racket language with following slide:

2014-10-11: Introduction to Functional Programming « Articles « Extellisys
http://www.extellisys.com/articles/20141011-tlug-intro-to-functional-programming

How wonderful the racket IDE named drracket!!!
How about make ATS language IDE based on drracket?

http://docs.racket-lang.org/drracket/


What is necessary to implement IDE support for ATS? I guess this question should be narrowed down to:

1. what API is expected from the IDE side for language support?
2. what information can the Postiats compiler currently provide?

Regarding point 1: I can take a look at MonoDevelop so we can elaborate the question further.

Hongwei (or anybody who knows this stuff): what's this JSON output from the compiler? Can we form some sort of a database from compiler output? Such a database would contain concrete syntax tree (presumably) together with information about various identifiers (e.g. to allow navigation from function name to location of function declaration or to highlight free occurrences of a let-bound identifier in scope). I guess what the database must contain/provide answers to is up to IDE requirements, but it's helpful to make a few general assumptions now.

Also, note that F# and OCaml both implement IDE-neutral facilities for use in IDEs of one's choice (called F# bindings and Typerex, respectively).
 

Hongwei Xi

unread,
Oct 14, 2014, 1:32:25 PM10/14/14
to ats-lan...@googlegroups.com
>> 1. what API is expected from the IDE side for language support?

For a basic IDE:

1.1. Syntax support (highlighting, autocompletion, etc.)
1.2. Typechecking support (error messages can be mapped to source code)
1.3. Compilation support (File dependency)
1.4. Runtime support for debugging
1.5. Library support

1.2 and 1.3 should be given higher priority. 1.5 is also very important and needs to be built gradually.

For a commercial one:

1.6. Support for external constraint-solving
1.7. Support for advanced meta-programming (that is, tools for generating ATS code)
...

>> 2. what information can the Postiats compiler currently provide?

So far, the compiler can generate JSON for level-2 abstract syntax trees (level-2 refers to the stage
where name-bindings are resolved). It should be straightforward to add more support like this.


>> Regarding point 1: I can take a look at MonoDevelop so we can elaborate the question further.

Following a real example should be very helpful.

Thanks for taking the initiative.

Cheers!

--Hongwei


--
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 http://groups.google.com/group/ats-lang-users.

Barry Schwartz

unread,
Oct 14, 2014, 4:31:02 PM10/14/14
to ats-lan...@googlegroups.com
Hongwei Xi <gmh...@gmail.com> skribis:
> >> 1. what API is expected from the IDE side for language support?

We are forgetting documentation and help, including contextual help.

:)

Zhiqiang Ren

unread,
Oct 15, 2014, 12:00:28 AM10/15/14
to ats-lan...@googlegroups.com
I used to build an IDE for ATS (not ATS 2) in Eclipse  using XText. (https://sites.google.com/site/alex2ren/what-i-built/atsintegreteddevelepmentenvironment). However, the whole project is now obsolete since both Xtext and ATS have been updated. Admittedly, Xtext is a very good platform for building IDE for Domain Specific Language, but it's not that useful for a full-fledged language like ATS. It requires an encoding of ATS' syntax using Antlr, based on which Xtext can work its magic, like syntax highlighting and cross-reference. Basically, most semantics has to be syntax based, I have to tweak here and there to ask Xtext to do what I want. And it's difficult to add new features pertaining to ATS language such as caching the result of the parsing of local ATS library (e.g. prelude).

For light weight development of ATS, I would say using emacs or Vim is sufficient with simple syntax highlighting and ctags support. IMHO, a common usage is to blend ATS with other programming languages such as C, Java, or JavaScript. Therefore I favour the platform of Eclipse, which already has plug-in supports for such languages. To be ambitious, I believe a production level IDE of ATS would be something similar to CDT (Eclipse C/C++ Development Toolkit) supporting multiple files, cross-reference for terms in both statics and dynamics, prompt for type error, and etc.

To be really ambitious, we should add support of local template code management. :)

Kiwamu Okabe

unread,
Oct 15, 2014, 7:25:56 AM10/15/14
to ats-lang-users, ats-lang-users
Hi Artyom,

On Wed, Oct 15, 2014 at 1:28 AM, Artyom Shalkhakov
<artyom.s...@gmail.com> wrote:
> What is necessary to implement IDE support for ATS? I guess this question
> should be narrowed down to:

First, I would like to share my hope for IDE.
I think IDE is for beginners, not for professional people.

The beginners would like to understand dependent type and linear type smoothly,
and write a small program running on POSIX API.
However ATS2's type system is hard for the beginners.
I needed much time to understand the type system.
Please imagine some ATS2's IDE support the understanding ATS2's type system,
with showing a relationship between static value and dynamic value.

The other side, professional people would like to challenge some tricky things,
such like designing own operating system using ATS2. :)
Then they will love vi or Emacs than IDE.

Racket's drracket IDE is focusing for beginners and for education.
Arduino IDE also focus for beginners.

http://www.arduino.cc/

> 1. what API is expected from the IDE side for language support?

I think such like IDE needs following information from ATS2 compiler.

* Type of source code location (such like OCaml's annot)
* Relationship between statics and dynamics with source code location
* Relationship binding with source code location

> 2. what information can the Postiats compiler currently provide?

Sorry, I don't know ATS2 compiler internal...

> Regarding point 1: I can take a look at MonoDevelop so we can elaborate the
> question further.

For me, I think MonoDevelop design is better than Eclipse.
However,,,,,,, sometime not good for the others...
I should survey MonoDevelop more.

> Also, note that F# and OCaml both implement IDE-neutral facilities for use
> in IDEs of one's choice (called F# bindings and Typerex, respectively).

Yes.
F# programming on VisualStudio is a good experience for me!
However the drracket is more beautiful than F# on VisualStudio for education.

Barry Schwartz

unread,
Oct 15, 2014, 12:11:35 PM10/15/14
to ats-lan...@googlegroups.com
Kiwamu Okabe <kiw...@debian.or.jp> skribis:
> The other side, professional people would like to challenge some tricky things,
> such like designing own operating system using ATS2. :)
> Then they will love vi or Emacs than IDE.
>
> Racket's drracket IDE is focusing for beginners and for education.

Tangentially related: Racket also has good Emacs support via Geiser. I
know of it because Geiser also supports Guile, and I am a Guile user
and diehard Emacs user. If IDE development goes along with
corresponding Emacs support, I’ll be quite happy. (I’m not much of an
elisper, myself.)

Humor: Racket also is interesting because of the Typed Racket dialect,
which seems unusually well thought out, judging from the docs. What we
need next, however, is Applied Typed Racket.

gmhwxi

unread,
Oct 15, 2014, 1:25:12 PM10/15/14
to ats-lan...@googlegroups.com

Tangentially tangentially related:

I started my functional experience with Common Lisp and taught
Scheme for a couple of years.  I do miss programming in Scheme a bit.
I think that the "right" way of programming in Scheme is that you do the
planning in ATS and the plumbing in Scheme. I will try to find a bit of
time to write a code generator from ATS-target to Scheme.

Cheers!

gmhwxi

unread,
Oct 15, 2014, 1:39:31 PM10/15/14
to ats-lan...@googlegroups.com, ats-lan...@lists.sourceforge.net, kiw...@debian.or.jp
As a rule of thumb, keeping things simple is the first priority.
If you do it, then you should model it after something you yourself are
familiar with.

I remember seeing someone using Eclipse's C plugin for writing ATS programs.
It actually worked reasonably well (given the circumstance).  Is it
possible to use the setting in MonoDevelop for Ocaml or F# to write ATS programs
(after some minor changes)? If so, then it could a good starting point.

Barry Schwartz

unread,
Oct 15, 2014, 1:46:00 PM10/15/14
to ats-lan...@googlegroups.com
gmhwxi <gmh...@gmail.com> skribis:
> Tangentially tangentially related:
>
> I started my functional experience with Common Lisp and taught
> Scheme for a couple of years. I do miss programming in Scheme a bit.
> I think that the "right" way of programming in Scheme is that you do the
> planning in ATS and the plumbing in Scheme. I will try to find a bit of
> time to write a code generator from ATS-target to Scheme.

I would imagine the guaranteed tail-call optimization is advantageous;
also dynamic wind (which Guile makes available in C). The main trouble
I see is you cannot take advantage of syntax-case at the ATS level.

I started with Caml Light and progressed next to OCaml. Which means
camlp4/camlp5 for syntax extension, and it is a painful,
trouble-causing mess. Is it at all possible to do something like
syntax-case with an ML-like syntax and compiler? (Pure manages to have
a clunky version with a Haskell-like syntax.)

Yannick Duchêne

unread,
Oct 15, 2014, 4:15:02 PM10/15/14
to ats-lan...@googlegroups.com


Le mercredi 15 octobre 2014 19:25:12 UTC+2, gmhwxi a écrit :

Tangentially tangentially related:

I started my functional experience with Common Lisp and taught
Scheme for a couple of years.  I do miss programming in Scheme a bit.
I think that the "right" way of programming in Scheme is that you do the
planning in ATS and the plumbing in Scheme.

Do you know a tiny example? I'm don't understand what's nice with “plumbing in Scheme”.

Hongwei Xi

unread,
Oct 15, 2014, 10:06:21 PM10/15/14
to ats-lan...@googlegroups.com
Say you want to implement something and you think the feature of callcc
can be a big help for your implementation. Then you can do your design in
ATS and use Scheme to provide callcc.

When using ATS to teach programming concepts, I often introduce an abstract
type:

abstype cont(a:type)

cont(T) is for a continuation receiving a value of type T.

Unfortunately, I could not create continuations in ATS. I had to use closures
as fake continuations. If I have a tool from ATS to Scheme, then I can create
genuine continuations.


--
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 http://groups.google.com/group/ats-lang-users.

Artyom Shalkhakov

unread,
Oct 16, 2014, 1:39:58 AM10/16/14
to ats-lan...@googlegroups.com
Hello Zhiqiang,


On Wednesday, October 15, 2014 10:00:28 AM UTC+6, Zhiqiang Ren wrote:
I used to build an IDE for ATS (not ATS 2) in Eclipse  using XText. (https://sites.google.com/site/alex2ren/what-i-built/atsintegreteddevelepmentenvironment). However, the whole project is now obsolete since both Xtext and ATS have been updated. Admittedly, Xtext is a very good platform for building IDE for Domain Specific Language, but it's not that useful for a full-fledged language like ATS. It requires an encoding of ATS' syntax using Antlr, based on which Xtext can work its magic, like syntax highlighting and cross-reference. Basically, most semantics has to be syntax based, I have to tweak here and there to ask Xtext to do what I want. And it's difficult to add new features pertaining to ATS language such as caching the result of the parsing of local ATS library (e.g. prelude).

For light weight development of ATS, I would say using emacs or Vim is sufficient with simple syntax highlighting and ctags support. IMHO, a common usage is to blend ATS with other programming languages such as C, Java, or JavaScript. Therefore I favour the platform of Eclipse, which already has plug-in supports for such languages. To be ambitious, I believe a production level IDE of ATS would be something similar to CDT (Eclipse C/C++ Development Toolkit) supporting multiple files, cross-reference for terms in both statics and dynamics, prompt for type error, and etc.


Thank you for providing feedback on Xtext.
 
To be really ambitious, we should add support of local template code management. :)

I am wondering what do you mean by this?
 

Barry Schwartz

unread,
Oct 16, 2014, 5:22:51 PM10/16/14
to ats-lan...@googlegroups.com
Hongwei Xi <gmh...@gmail.com> skribis:
> Say you want to implement something and you think the feature of callcc
> can be a big help for your implementation. Then you can do your design in
> ATS and use Scheme to provide callcc.
>
> When using ATS to teach programming concepts, I often introduce an abstract
> type:
>
> abstype cont(a:type)
>
> cont(T) is for a continuation receiving a value of type T.
>
> Unfortunately, I could not create continuations in ATS. I had to use
> closures
> as fake continuations. If I have a tool from ATS to Scheme, then I can
> create
> genuine continuations.

I think you would have to actual ‘go Scheme’ for a call/cc using
libguile, though you could probably without much trouble construct and
evaluate the necessary Scheme objects all in C/ATS. But you would have
to live with the inefficiencies of the implementation.

In my libguile example yesterday I left out that you have to go into
‘Guile mode’, which is easy to do, and trivial unless you are worried
about obscure architectures. I think this is basically so Guile knows
where the stack is. (I suspect getting Guile to work on something with
a truly oddball stack like a 3Bx would be a formidable task.)

(Incidentally, I wrote the AMD64 stack switching support for
co-expressions in Unicon; it also works in Arizona Icon if you
backport it. It’s my little contribution to the world of programming
languages and the only time I wrote AMD64 assembly code. I would look
at ObjectIcon instead for ideas about how to implement such things,
however; he’s got some entirely different method that is faster and
involves no such tricks.)

Kiwamu Okabe

unread,
Oct 21, 2014, 1:01:08 AM10/21/14
to ats-lang-users, ats-lang-users
Hi all,

On Sun, Oct 12, 2014 at 12:50 PM, Kiwamu Okabe <kiw...@debian.or.jp> wrote:
> How about make ATS language IDE based on drracket?

Today I know there is IntelliJ plugin for Haskell.

https://groups.google.com/forum/#!topic/haskell-cafe/dZ_M7OQIims
https://github.com/rikvdkleij/intellij-haskell

I think this approach may be applied to ATS2.

> This plugin is written mainly in Scala and is not mentioned to support GHC/Cabal directly.

We needs Scala backend on ATS2. :)

Hongwei Xi

unread,
Oct 21, 2014, 1:08:08 AM10/21/14
to ats-lan...@googlegroups.com, ats-lang-users
We should recruit him to write one for ATS :)


--
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 http://groups.google.com/group/ats-lang-users.

Artyom Shalkhakov

unread,
Oct 21, 2014, 1:09:45 AM10/21/14
to ats-lan...@googlegroups.com, ats-lan...@lists.sourceforge.net, kiw...@debian.or.jp
On Sunday, October 12, 2014 9:50:39 AM UTC+6, Kiwamu Okabe wrote:
Hi all,

I'm learning Racket language with following slide:

2014-10-11: Introduction to Functional Programming « Articles « Extellisys
http://www.extellisys.com/articles/20141011-tlug-intro-to-functional-programming

How wonderful the racket IDE named drracket!!!
How about make ATS language IDE based on drracket?

http://docs.racket-lang.org/drracket/


I've actually created a simple plugin for MonoDevelop 4 that provides highlighting support for D4 programming language:

https://github.com/ashalkhakov/d4-mode

I will update it to work with the current version of MonoDevelop. Also, it's now very easy to obtain a Mono environment for a Linux distro of your choice (Mono Project folks provide the builds):

http://www.mono-project.com/download/#download-lin

I also created a similar plugin for ATS, but it isn't on Github yet. It sports a functioning syntax highlighting, but not much else yet. Things to do:

1. find out how to organize ATS as a non-.NET language (this has implications on building, profiling, deploying code) -- it is currently stubbed as a .NET language

2. devise an approach to converting JSONized level-2 ATS parse trees into a format that is useable within the plugin

I will put the ATS plugin on Github soon (most likely today).
 

Kiwamu Okabe

unread,
Oct 21, 2014, 1:26:27 AM10/21/14
to ats-lang-users, ats-lang-users
Hi Artyom,

On Tue, Oct 21, 2014 at 2:09 PM, Artyom Shalkhakov
<artyom.s...@gmail.com> wrote:
> I will put the ATS plugin on Github soon (most likely today).

Mu-fu-----.
I should wait your monodevelop plugin with Seiza.

http://upload.wikimedia.org/wikipedia/commons/0/0b/JimmyWales_wearing_Kimono.jpg

Artyom Shalkhakov

unread,
Oct 21, 2014, 9:47:51 AM10/21/14
to ats-lan...@googlegroups.com, ats-lan...@lists.sourceforge.net, kiw...@debian.or.jp
Hi Kiwamu,


On Tuesday, October 21, 2014 11:26:27 AM UTC+6, Kiwamu Okabe wrote:
Hi Artyom,

On Tue, Oct 21, 2014 at 2:09 PM, Artyom Shalkhakov
<artyom.s...@gmail.com> wrote:
> I will put the ATS plugin on Github soon (most likely today).

Mu-fu-----.
I should wait your monodevelop plugin with Seiza.

http://upload.wikimedia.org/wikipedia/commons/0/0b/JimmyWales_wearing_Kimono.jpg


I've uploaded the (early, barely working) ATS language binding for MonoDevelop:

https://github.com/ashalkhakov/ATS-Postiats-ide

At this point, it can (only) highlight various ATS keywords -- it's basically a stub. Hopefully it will become much better over time.

Have a rest, please. J
 

Kiwamu Okabe

unread,
Oct 21, 2014, 2:04:01 PM10/21/14
to ats-lang-users, ats-lang-users
Hi Artyom,

On Tue, Oct 21, 2014 at 10:47 PM, Artyom Shalkhakov
<artyom.s...@gmail.com> wrote:
> I've uploaded the (early, barely working) ATS language binding for
> MonoDevelop:
>
> https://github.com/ashalkhakov/ATS-Postiats-ide
>
> At this point, it can (only) highlight various ATS keywords -- it's
> basically a stub. Hopefully it will become much better over time.

It's a GREAT product!!!
I can build it and use to edit ATS dats file.

https://github.com/master-q/ATS-Postiats-ide/blob/feature/add-screenshot-on-readme/screenshots/screenshot_as_editor.png

I have a question for the plugin.
Where is a correct location for MonoDevelop.ATSBinding.dll?
I selected MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.sln, and build all.
Then I got DLLs at the following PATH.

> $ find . -name "*.dll"
> ./MonoDevelop.ATSBinding/bin/Debug/MonoDevelop.ATSBinding.dll
> ./MonoDevelop.ATSBinding/obj/Debug/MonoDevelop.ATSBinding.dll

However, mdtool did not find the DLLs.

> $ mdtool setup pack MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.addin.xml
> MonoDevelop Add-in Setup Utility
> WARNING: [MonoDevelop.ATSBinding,0.0.1] Could not load some add-in assemblies: Could not find file "/home/kiwamu/src/ATS-Postiats-ide/MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.dll".
> Creating package MonoDevelop.ATSBinding_0.0.1.mpack
> FATAL ERROR [2014-10-22 02:57:50Z]: System.IO.FileNotFoundException: Could not find file "/home/kiwamu/src/ATS-Postiats-ide/MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.dll".

Then, I copied the DLL.

> $ cp MonoDevelop.ATSBinding/bin/Debug/MonoDevelop.ATSBinding.dll \
> MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.dll
> $ mdtool setup pack MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.addin.xml
> MonoDevelop Add-in Setup Utility
> Creating package MonoDevelop.ATSBinding_0.0.1.mpack
> $ file MonoDevelop.ATSBinding_0.0.1.mpack
> MonoDevelop.ATSBinding_0.0.1.mpack: Zip archive data, at least v2.0 to extract

Is it a correct build flow?

Thank's!!!

P.S.
And also report it in Japanese. http://togetter.com/li/735137

gmhwxi

unread,
Oct 21, 2014, 2:13:27 PM10/21/14
to ats-lan...@googlegroups.com

I changed the title of the dicussion.

Hongwei Xi

unread,
Oct 21, 2014, 9:20:54 PM10/21/14
to ats-lan...@googlegroups.com
Any taker :)

---------- Forwarded message ----------
From: Mateusz Kowalczyk <fuuz...@fuuzetsu.co.uk>
Date: Tue, Oct 21, 2014 at 8:49 PM
Subject: Re: [ats-lang-users] An idea: How about make ATS language IDE based on drracket?
To: ats-lan...@lists.sourceforge.net



On 10/21/2014 07:03 PM, Kiwamu Okabe wrote:
> Hi Artyom,
>
> On Tue, Oct 21, 2014 at 10:47 PM, Artyom Shalkhakov
> <artyom.s...@gmail.com> wrote:
>> I've uploaded the (early, barely working) ATS language binding for
>> MonoDevelop:
>>
>> https://github.com/ashalkhakov/ATS-Postiats-ide
>>
>> At this point, it can (only) highlight various ATS keywords -- it's
>> basically a stub. Hopefully it will become much better over time.
>
> It's a GREAT product!!!
> I can build it and use to edit ATS dats file.
>
> https://github.com/master-q/ATS-Postiats-ide/blob/feature/add-screenshot-on-readme/screenshots/screenshot_as_editor.png

If you're only starting out writing such a thing, then maybe you would
consider Yi as a platform too. We certainly can do highlighting (our
lexers are generated by ‘alex’).

We plan in the future to allow better editing, something like Agda mode
for emacs. The advantage is that you can write your ATS editing mode in
Haskell, not ELisp ;) I would certainly like to see another party come
and hack stuff in, request features &c. Maybe ATS would be our first
dependently-typed language. We certainly can't claim to have the feature
set of an IDE though so I guess it depends what you're after.
Mateusz K.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
ats-lang-users mailing list
ats-lan...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ats-lang-users

Artyom Shalkhakov

unread,
Oct 21, 2014, 11:11:24 PM10/21/14
to ats-lan...@googlegroups.com
On Wednesday, October 22, 2014 7:20:54 AM UTC+6, gmhwxi wrote:
Any taker :)


Hi Mateusz,
 

That's an interesting possibility to consider!
 

Brandon Barker

unread,
Nov 25, 2014, 9:24:40 AM11/25/14
to ats-lang-users, ats-lang-users, Kiwamu Okabe
Has anyone had experience with netbeans? I tend to like it better than eclipse, though I'm new to both. I was surprised to see netbeans using more memory on my system than eclipse, but that is not a lot of data to go on.

On Sun, Oct 12, 2014 at 3:10 AM, gmhwxi <gmh...@gmail.com> wrote:
Or using the Eclipse framework? Alex Ren tried it a few years ago
and it was a very positive experience.

Using racket means that we ourselves have to do so many things
from scratch. Eclipse can provide a much needed ecosystem for us.

I assume that using MonoDevelop will give us a big ecosystem as well.


On Saturday, October 11, 2014 11:50:39 PM UTC-4, Kiwamu Okabe wrote:
Hi all,

I'm learning Racket language with following slide:

2014-10-11: Introduction to Functional Programming « Articles « Extellisys
http://www.extellisys.com/articles/20141011-tlug-intro-to-functional-programming

How wonderful the racket IDE named drracket!!!
How about make ATS language IDE based on drracket?

--
Kiwamu Okabe at METASEPI DESIGN

--
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 http://groups.google.com/group/ats-lang-users.

Raoul Duke

unread,
Nov 25, 2014, 12:19:43 PM11/25/14
to ats-lang-users, ats-lang-users, Kiwamu Okabe
generally speaking, i think intellij is the more hip and trendy thing
than anything else in java land; they are now the sweet honey friend
of google android, eclipse is getting the shaft sorta. and they have
ides for other things as well like appcode. and they support other
languages via plug-ins e.g. scala or erlang or whatever. on the whole
i sorta like intellij better than eclipse, although at work for
android we still use eclipse. (i haven't used netbeans in years. it is
an underdog in terms of mindshare, fwiw.) all 3 of eclipse, intellij,
and netbeans are java-based i think which tends to mean they are not
very snappy. try using xcode by comparison. what the heck is
visualstudio written in these days, i assume .net?

no, there's not much of a point to this message.

i think the only way the ATS IDE choice should be made is by somebody
dusting off their hands and making a plugin for whichever IDE they
favor. then everybody can follow that blazed trail. just sitting
around doing bike shed discussions isn't as useful :-)

Brandon Barker

unread,
Nov 25, 2014, 12:34:04 PM11/25/14
to ats-lang-users, ats-lang-users, Kiwamu Okabe
True enough, but I have the ulterior motive of needing to use Java anyway...
Probably for now, any of them will do the trick. I like to not have to deal with licenses unless absolutely necessary, costs aside, so I didn't try IntelliJ. Maybe it is worth 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 http://groups.google.com/group/ats-lang-users.

Raoul Duke

unread,
Nov 25, 2014, 12:39:52 PM11/25/14
to ats-lang-users, ats-lang-users, Kiwamu Okabe
intellij has a 'free' version, too.

Artyom Shalkhakov

unread,
Nov 25, 2014, 10:26:04 PM11/25/14
to Brandon Barker, ats-lang-users, ats-lang-users
Hello Brandon, all,

2014-11-25 23:33 GMT+06:00 Brandon Barker <brandon...@gmail.com>:
>
>
> On Tue, Nov 25, 2014 at 12:19 PM, Raoul Duke <rao...@gmail.com> wrote:
>>
>> generally speaking, i think intellij is the more hip and trendy thing
>> than anything else in java land; they are now the sweet honey friend
>> of google android, eclipse is getting the shaft sorta. and they have
>> ides for other things as well like appcode. and they support other
>> languages via plug-ins e.g. scala or erlang or whatever. on the whole
>> i sorta like intellij better than eclipse, although at work for
>> android we still use eclipse. (i haven't used netbeans in years. it is
>> an underdog in terms of mindshare, fwiw.) all 3 of eclipse, intellij,
>> and netbeans are java-based i think which tends to mean they are not
>> very snappy. try using xcode by comparison. what the heck is
>> visualstudio written in these days, i assume .net?
>>

Some plugins are written in C#. The core? No idea, probably C++.

>> no, there's not much of a point to this message.
>>
>> i think the only way the ATS IDE choice should be made is by somebody
>> dusting off their hands and making a plugin for whichever IDE they
>> favor. then everybody can follow that blazed trail. just sitting
>> around doing bike shed discussions isn't as useful :-)
>>
> True enough, but I have the ulterior motive of needing to use Java anyway...
> Probably for now, any of them will do the trick. I like to not have to deal
> with licenses unless absolutely necessary, costs aside, so I didn't try
> IntelliJ. Maybe it is worth it.
>

I tried to implement an ATS IDE on top of MonoDevelop. MD's
documentation is quite outdated, so I didn't get past basic stuff.
Perhaps IntelliJ is better in this regard.

>>
>> --
>> 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 http://groups.google.com/group/ats-lang-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb6j7F%3Do%2BjvAswUvLj2jyxg1kJQeQDwO_PpTEUdUFRwARA%40mail.gmail.com.
>
>
>
>
> --
> Brandon Barker
> brandon...@gmail.com
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> ats-lang-users mailing list
> ats-lan...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ats-lang-users
>



--
Cheers,
Artyom Shalkhakov

Artyom Shalkhakov

unread,
Nov 25, 2014, 11:17:33 PM11/25/14
to Brandon Barker, ats-lang-users, ats-lang-users
I wanted to add that web browser-based IDE may be a better decision in
the long term. There aren't many IDEs like that currently, and those
that do exist aren't as sophisticated as their desktop counterparts,
but they seem to be gaining traction.

Browser-based applications are much easier to distribute than desktop
applications, and nowadays they are easier to develop as well. For
instance, a responsive desktop application involves multi-threading,
which is quite tricky even with language support (think F#'s async),
while browser-based application doesn't involve threading at all (and
most likely never will). With WebSockets, a web application can access
various resources of the machine easily (much easier than with
specially-crafted browser plugins, which major browser vendors seem to
deprecate).
--
Cheers,
Artyom Shalkhakov

john skaller

unread,
Nov 26, 2014, 3:05:00 AM11/26/14
to Artyom Shalkhakov, Brandon Barker, ats-lang-users, ats-lang-users

On 26/11/2014, at 3:17 PM, Artyom Shalkhakov wrote:

> I wanted to add that web browser-based IDE may be a better decision in
> the long term.

I have a basic "colouring" system for Felix based on CodeWarrior.
It can also do folding etc.

However such an editor is a LONG way from a what a basic editor
can do .. I never use IDE's but obviously a good IDE is a long way
from a basic editor.

Browser based IDE has two problems.

The core problem is that it cannot save files. This means a browser
based idea is impossible in principle and in practice. It cannot
be done, end of story :-)

So now, we have to change our tune. We need SERVER based IDE
with a custom web server which happens to use a browser as a front end.
I have such a thing, in primitive form. The browser says POST and the
server does SAVE. (Roughly .. you get the idea I hope).

Note a problem already: sure, the browser code runs on all
compliant browsers (good), but it only works connected to
a compliant server. Mine is written in Felix which generates C++.
I would hate to have to write the server code in rubbish like PHP.

OK, so now we come to the second problem.

LAG. To do anything, integration operations, such as hyperlinking
a symbol to its definition in another file, must be done on the server.
We don't want to do such difficult things in Javascript!

So now, whenever you type a character things can change.
In Emacs or Vim, or Desktop IDE, the changes can propagate
more or less instantly.

Until Google et al get WebSockets running, there's no way we can
do that efficiently on a desktop using a server model supported by
HTTP, let alone HTTPS to a remote server.

It's true, I have a good IDE in my browser already .. Firebug. But it's
an IDE for Javascript, and for the code actually running in the browser.

Much as I think it is a horrible badly written piece of junk .. the
best IDE inexistence is already available for ATS.

Its called BASH.


--
john skaller
ska...@users.sourceforge.net
http://felix-lang.org



Artyom Shalkhakov

unread,
Nov 26, 2014, 3:41:43 AM11/26/14
to john skaller, Brandon Barker, ats-lang-users, ats-lang-users
Hello John,

2014-11-26 14:03 GMT+06:00 john skaller <ska...@users.sourceforge.net>:
>
> On 26/11/2014, at 3:17 PM, Artyom Shalkhakov wrote:
>
>> I wanted to add that web browser-based IDE may be a better decision in
>> the long term.
>
> I have a basic "colouring" system for Felix based on CodeWarrior.
> It can also do folding etc.
>
> However such an editor is a LONG way from a what a basic editor
> can do .. I never use IDE's but obviously a good IDE is a long way
> from a basic editor.
>
> Browser based IDE has two problems.
>
> The core problem is that it cannot save files. This means a browser
> based idea is impossible in principle and in practice. It cannot
> be done, end of story :-)
>

Yes, right. A browser-based IDE can nevertheless make use of some
locally-hosted webserver via WebSockets.

(We recently used this trick to interact with an RFID reader, it works
fine if you use something other than IE < 9. Also, in this particular
case, the application is much easier to package and distribute/fix,
than a full-blown desktop Windows application.)
--
Cheers,
Artyom Shalkhakov

john skaller

unread,
Nov 26, 2014, 9:25:09 AM11/26/14
to Artyom Shalkhakov, Brandon Barker, ats-lang-users, ats-lang-users

On 26/11/2014, at 7:41 PM, Artyom Shalkhakov wrote:

>>
>> The core problem is that it cannot save files. This means a browser
>> based idea is impossible in principle and in practice. It cannot
>> be done, end of story :-)
>>
>
> Yes, right. A browser-based IDE can nevertheless make use of some
> locally-hosted webserver via WebSockets.

Sure, or even POST. Still, the main problem is that for an IDE the graphics
and extremely complex state information are tightly coupled and it's hard
to provide the mandatory maximum lag of 1/10 second required for
editing. In fact it's hard enough to do that with a native graphic interface.

Zhiqiang Ren

unread,
Nov 26, 2014, 1:00:21 PM11/26/14
to ats-lan...@googlegroups.com, artyom.s...@gmail.com, brandon...@gmail.com, ats-lan...@lists.sourceforge.net
IMHO, browser based app is more difficult to build than client application. The reason it seems easy is that the web app has less functionality and is less responsive.

Let's not worry too much about the maintenance, distribution about the ATS IDE at the moment. (Platform like eclipse has good support for that.) Let's focus on functionality. Keywords based syntax highlighting is basic. What else do we want?

1. semantics based highlighting
2. When I hover upon an expression, I want prompt of type.
3. Cross reference
4. auto completion (at least for function name)
5. some visual indication for error in the file

My list is quite influenced by what JDT in eclipse can do. I have no doubt that a web based IDE can do all of that, but I guess it would be slow.
Message has been deleted

Brandon Barker

unread,
Nov 26, 2014, 1:28:56 PM11/26/14
to ats-lang-users
Very nice!

In addition to your list, I would really like to see a list of
in-scope values/vars of the correct type for a particular function
argument (if the list of them is reasonably small).
This is sort of the inverse of the method-completion feature in OO
languages, but it seems that it would be something of a time-saver.

I can think of other cool features for later, but kind of pointless to
discuss for now.

On Wed, Nov 26, 2014 at 1:19 PM, Zhiqiang Ren <alex.r...@gmail.com> wrote:

>> 2. devise an approach to converting JSONized level-2 ATS parse trees into a format that is useable within the plugin

I have built a parser in Java to convert the "JSONized level-2 ATS parse trees" into Java. It doesn't support all of ATS' syntax yet. The support it lacks goes as follows: datatype, case expression, template, call by reference. (I will add datatype and case expression soon.) Simply put, it accepts ML-like ATS program.

--
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 http://groups.google.com/group/ats-lang-users.

Raoul Duke

unread,
Nov 26, 2014, 10:21:21 PM11/26/14
to ats-lang-users, artyom.s...@gmail.com, Brandon Barker, ats-lang-users
I am not generally an apologist for the web, BUT... there are enough
web and cloud based IDEs that I think existence proofs are out there,
with several different and possibly complementary approaches to e.g.
storing the files.

Further more, WebGL would be more than enough power to make a snappy UI.

So technically I don't see any impossibilities.

Brandon Barker

unread,
Nov 28, 2014, 5:46:45 PM11/28/14
to ats-lang-users
I did not realize until today that IntelliJ is not only free, but open source. I'm liking it as well so far.

On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke <rao...@gmail.com> wrote:
intellij has a 'free' version, too.
--
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 http://groups.google.com/group/ats-lang-users.

Brandon Barker

unread,
Dec 11, 2014, 8:00:59 PM12/11/14
to ats-lang-users
I'm a bit rusty on this topic, and also, I don't know enough about the ATS grammar even if I wasn't. Is it worth trying to lex ATS using such a tool: http://jflex.de/?
--
Brandon Barker
brandon...@gmail.com

Artyom Shalkhakov

unread,
Dec 11, 2014, 10:07:16 PM12/11/14
to ats-lan...@googlegroups.com
On Friday, December 12, 2014 7:00:59 AM UTC+6, Brandon Barker wrote:
I'm a bit rusty on this topic, and also, I don't know enough about the ATS grammar even if I wasn't. Is it worth trying to lex ATS using such a tool: http://jflex.de/?


I think it should work. ATS1 was lexed with a home-grown tool called atslex:


I think HX rewrote the whole lexing/parsing stage in ATS2 to be able to output better error messages.

gmhwxi

unread,
Dec 12, 2014, 1:29:42 AM12/12/14
to ats-lan...@googlegroups.com

It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.

Given an ATS2 source file, the lexer can output a file of tokens in JSON format.
There could be many ways to use such a file. For instance, use it for doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a file as another form of input.
For such uses, it is important to attach location information to tokens.

The datatype for tokens in ATS2 is declared in the following file:

https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing.sats

Brandon Barker

unread,
Dec 20, 2014, 12:13:46 AM12/20/14
to ats-lan...@googlegroups.com
Thanks,

I've gotten most of the way through it. It has made me realize that ATS is even more rich (potentially) than I know, since I saw a number of reserved tokens for either unused or rarely used features.


I have a question about the following:

  | T_IDENT_alp of string


It seems this token can have several lexical matches. Maybe I am interpreting incorrectly, but in any case, this group seems to consist of proof-related words:
implement PERCENT = T_IDENT_alp "%"
implement QMARK = T_IDENT_alp "?"
implement REF = T_IDENT_alp "ref"
// HX: ref@ for flattened reference

But there are other tokens too in this class (e.g. T_VIEWAT).  What distinguishes the words that make up the T_IDENT_alp  token?

Hongwei Xi

unread,
Dec 20, 2014, 2:06:07 AM12/20/14
to ats-lan...@googlegroups.com
It is getting a bit involved.

If T_VIEWT is followed by "@type", then these two pieces are combined to form "viewt@ype".
I kind of regret to form such a strange identifier :(

However, you don't really need to deal with this kind of complexity. At least, not at this stage.
You can always write "viewt0ype" instead, which is a normal identifier.



Brandon Barker

unread,
Dec 20, 2014, 12:10:07 PM12/20/14
to ats-lang-users

Thanks, I think this helped, but I am still not sure on some points (this can be worried about later, as you say).

More importantly, which parsing source file, if any, contains the most straightforward definitions of various literal types in ATS?

Brandon Barker

unread,
Dec 20, 2014, 12:10:09 PM12/20/14
to ats-lang-users

Hongwei Xi

unread,
Dec 20, 2014, 12:21:02 PM12/20/14
to ats-lan...@googlegroups.com
What do mean by 'literal types'?


Brandon Barker

unread,
Dec 20, 2014, 12:45:59 PM12/20/14
to ats-lang-users

Brandon Barker

unread,
Dec 20, 2014, 12:47:19 PM12/20/14
to ats-lang-users

E.g. T_FLOAT, T_CHAR

Brandon Barker

unread,
Dec 20, 2014, 12:56:11 PM12/20/14
to ats-lang-users

Also, comment tokens (which I am pretty clear on, but I do not know what a rest-of-file comment is in ATS).

Hongwei Xi

unread,
Dec 20, 2014, 1:06:57 PM12/20/14
to ats-lan...@googlegroups.com

Hongwei Xi

unread,
Dec 20, 2014, 1:11:02 PM12/20/14
to ats-lan...@googlegroups.com
The symbol //// (four lashes) in a file introduces a comment that spans until the end of the file.

Brandon Barker

unread,
Dec 20, 2014, 1:15:13 PM12/20/14
to ats-lang-users

I found this one, but in case my ATS is rusty/incomplete, I was hoping to find a definitive reference for the form of all literals. Not the names of the tokens.

gmhwxi

unread,
Dec 20, 2014, 1:25:32 PM12/20/14
to ats-lan...@googlegroups.com
The literals (chars, integers, floats, strings) are taken from C.

Brandon Barker

unread,
Dec 20, 2014, 1:31:27 PM12/20/14
to ats-lang-users

OK, thanks, I seem to recall that there were differences in writing down some of the literals in ATS versus C, but probably I am mistaken. Also I can't easily check much as I only have internet on my phone for a few hours. Good time to translate the lexer though.

Brandon Barker

unread,
Dec 22, 2014, 9:05:00 PM12/22/14
to ats-lang-users
Which token is for identifiers? 
--
Brandon Barker
brandon...@gmail.com

gmhwxi

unread,
Dec 22, 2014, 9:09:23 PM12/22/14
to ats-lan...@googlegroups.com

(*
i0de
  : IDENTIFIER_alp
  | IDENTIFIER_sym
  | EQ
  | GT
  | LT
  | AMPERSAND
  | BACKSLASH
  | BANG
  | TILDE
  | MINUSGT
  | MINUSLTGT
  | GTLT
; /* i0de */
*)

Please see pats_parsing_base.dats.

Brandon Barker

unread,
Jan 6, 2015, 12:52:00 AM1/6/15
to ats-lang-users
  | {n:int}
    T_CDATA of (array (char, n), size_t (n))
  | T_STRING of (string)

What is CDATA used for in lexing? It looks as though it could also be used for strings.


Hongwei Xi

unread,
Jan 6, 2015, 1:06:49 AM1/6/15
to ats-lan...@googlegroups.com
I think it is not used at the moment.
It was meant for some kind of binary data (possibly containing null chars).


Brandon Barker

unread,
Jan 6, 2015, 1:39:14 PM1/6/15
to ats-lang-users
Is classdec also currently unused? 

gmhwxi

unread,
Jan 6, 2015, 1:44:25 PM1/6/15
to ats-lan...@googlegroups.com

It is used. For instance, it used in ATS2-contrib/GTK.

Brandon Barker

unread,
Jan 6, 2015, 8:14:36 PM1/6/15
to ats-lang-users
Thanks, forgot to grep contrib. 

What is the 'T_REC' token used for? I

gmhwxi

unread,
Jan 6, 2015, 8:52:05 PM1/6/15
to ats-lan...@googlegroups.com
T_REC is for the keyword 'rec'. For instance, following is
another way to implement the factorial function:

//
val
rec
fact
: int -> int =
  lam
(x) => if x > 0 then x*fact(x-1) else 1
//

gmhwxi

unread,
Jan 6, 2015, 8:53:20 PM1/6/15
to ats-lan...@googlegroups.com
val rec f = ...

means that f is defined *recursively*, that is, f can occur in
its own definition.
Reply all
Reply to author
Forward
0 new messages