# Google Group

**URL:** https://discourse.ats-lang.org/c/google-group/5.md

[Latest](https://discourse.ats-lang.org/latest.md) · [Categories](https://discourse.ats-lang.org/categories.md) · [Tags](https://discourse.ats-lang.org/tags.md)

---

## [About the Google Group category](https://discourse.ats-lang.org/t/about-the-google-group-category/13)

<div class="topic-metadata">

**Author:** [@system](https://discourse.ats-lang.org/u/system)\
**Replies:** 0\
**Last updated:** [August 26, 2016, 4:04pm UTC](https://discourse.ats-lang.org/t/about-the-google-group-category/13 "2016-08-26T16:04:43Z")

</div>

This category contains old threads imported from Google Groups. We prefer to use it as a search-able archive. Please post new topics in other appropriate categories.

---

## [How to use mutual struct?](https://discourse.ats-lang.org/t/how-to-use-mutual-struct/784)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 8\
**Last updated:** [August 25, 2016, 2:41pm UTC](https://discourse.ats-lang.org/t/how-to-use-mutual-struct/784 "2016-08-25T14:41:18Z")

</div>

Recursion in views cannot be handled this way. You need to define dataviews for this.On Friday, August 19, 2016 at 7:01:35 AM UTC-4, Kiwamu Okabe wrote: Hi all, Now I’m trying to define mutual struct: https://github…

---

## [How about adding short and ushort primitive type into ATS prelude?](https://discourse.ats-lang.org/t/how-about-adding-short-and-ushort-primitive-type-into-ats-prelude/752)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 1\
**Last updated:** [August 22, 2016, 1:25am UTC](https://discourse.ats-lang.org/t/how-about-adding-short-and-ushort-primitive-type-into-ats-prelude/752 "2016-08-22T01:25:22Z")

</div>

They are already available: short is sint in ATS. ushort is usint in ATS.On Saturday, August 20, 2016 at 8:41:40 AM UTC-4, Kiwamu Okabe wrote: Hi Hongwei, How about adding short and ushort primitive types into ATS p…

---

## [I'm seeking better way to use global struct](https://discourse.ats-lang.org/t/im-seeking-better-way-to-use-global-struct/52)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 5\
**Last updated:** [August 20, 2016, 5:02am UTC](https://discourse.ats-lang.org/t/im-seeking-better-way-to-use-global-struct/52 "2016-08-20T05:02:11Z")

</div>

Please try the following code: #include “share/atspre\_define.hats” #include “share/atspre\_staload.hats” %{^ struct foo { int a; int \*p; }; struct foo foo\_var; %} absvt@ype struct\_foo vtypedef struct\_foo\_impl =…

---

## [Lexical format for floating-point constants](https://discourse.ats-lang.org/t/lexical-format-for-floating-point-constants/633)

<div class="topic-metadata">

**Author:** [@Artyom\_Shalkhakov](https://discourse.ats-lang.org/u/Artyom_Shalkhakov)\
**Replies:** 10\
**Last updated:** [August 17, 2016, 6:53pm UTC](https://discourse.ats-lang.org/t/lexical-format-for-floating-point-constants/633 "2016-08-17T18:53:43Z")

</div>

I'm doing a syntax highlighter for ATS based on the Monarch editor (used in Visual Studio Code) and I'm interested to know what's the lexical grammar for floating-point constants? I've tried looking through the lexer…

---

## [Template and Overloading](https://discourse.ats-lang.org/t/template-and-overloading/577)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 4\
**Last updated:** [August 15, 2016, 3:00pm UTC](https://discourse.ats-lang.org/t/template-and-overloading/577 "2016-08-15T15:00:40Z")

</div>

Hi, Is it possible to do overloadings like below? \`\`\` fun {a:t@ype} gcomapre\_val\_val (a, a): int symintr compare overload compare with gcompare\_val\_val overload compare with gcompare\_val\_val \`\`\` I'm as…

---

## [Template and Effect](https://discourse.ats-lang.org/t/template-and-effect/279)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 2\
**Last updated:** [August 12, 2016, 4:14pm UTC](https://discourse.ats-lang.org/t/template-and-effect/279 "2016-08-12T16:14:47Z")

</div>

Hi, I'm trying to implement \`gcompare\_val\_val\` for a datatype \`list\`, but encounters an error saying "some disallowed effects may be incurred: 1" \`\`\` datatype list (a:t@ype) = ... fun {a:t@ype} list\_compare .…

---

## [Exception and sats file](https://discourse.ats-lang.org/t/exception-and-sats-file/152)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 1\
**Last updated:** [August 10, 2016, 2:14pm UTC](https://discourse.ats-lang.org/t/exception-and-sats-file/152 "2016-08-10T14:14:41Z")

</div>

Hi, When I define an exception in SATS file \`exn.sats\`, I need to compile it like \`patscc \*.dats \*exn.sats\*\` to have the symbol defined. However, when I define a normal datatype in some sats file, I usually can com…

---

## [Patsopt services](https://discourse.ats-lang.org/t/patsopt-services/650)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 4\
**Last updated:** [August 10, 2016, 1:40am UTC](https://discourse.ats-lang.org/t/patsopt-services/650 "2016-08-10T01:40:16Z")

</div>

I am preparing some assignments for a programming language course based on ATS. Here is a web-based sample: http://ats-lang.github.io/EXAMPLE/BUCASCS320/assign01.html In this sample, one can clearly see how the fo…

---

## [Xanadu/dtal](https://discourse.ats-lang.org/t/xanadu-dtal/262)

<div class="topic-metadata">

**Author:** [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Replies:** 1\
**Last updated:** [August 9, 2016, 10:32pm UTC](https://discourse.ats-lang.org/t/xanadu-dtal/262 "2016-08-09T22:32:45Z")

</div>

Are they available for use?

---

## [ATS Tutorials](https://discourse.ats-lang.org/t/ats-tutorials/109)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 1\
**Last updated:** [August 5, 2016, 7:37pm UTC](https://discourse.ats-lang.org/t/ats-tutorials/109 "2016-08-05T19:37:41Z")

</div>

Hi, Following up on Hongwei's \*ats-as-a-service\*, I wrote a pandoc plugin for automating some of the tasks of writing interactive ats tutorials, shown here https://steinwaywhw.github.io/ats-tutorials/. If you a fam…

---

## [ATS for OpenShift-python](https://discourse.ats-lang.org/t/ats-for-openshift-python/777)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 3\
**Last updated:** [August 4, 2016, 1:31am UTC](https://discourse.ats-lang.org/t/ats-for-openshift-python/777 "2016-08-04T01:31:24Z")

</div>

OpenShift is a PaaS by Redhat. It offers a free plan to attract users. The following simple project demonstrates a straightforward way to use python3 code generated by patsopt+atscc2py3: https://github.com/githwxi/A…

---

## [Pats2xhtmlization as a service](https://discourse.ats-lang.org/t/pats2xhtmlization-as-a-service/87)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 1\
**Last updated:** [August 1, 2016, 3:29pm UTC](https://discourse.ats-lang.org/t/pats2xhtmlization-as-a-service/87 "2016-08-01T15:29:07Z")

</div>

I am thinking about building some on-line services for easing the use of the ATS programming language system. For the moment, I managed to finish one that supports syntax-hiliting for ATS code: http://www.ats-lang.org…

---

## [Design for supporting meta-programming in ATS2](https://discourse.ats-lang.org/t/design-for-supporting-meta-programming-in-ats2/611)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 0\
**Last updated:** [August 1, 2016, 3:38am UTC](https://discourse.ats-lang.org/t/design-for-supporting-meta-programming-in-ats2/611 "2016-08-01T03:38:15Z")

</div>

In the following project, I outlined a design for supporting meta-programming in ATS2: https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/LAMCAL Broadly speaking, meta-programming means to wr…

---

## [One-liner solution to the N-queens puzzle](https://discourse.ats-lang.org/t/one-liner-solution-to-the-n-queens-puzzle/621)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 2\
**Last updated:** [July 27, 2016, 5:04pm UTC](https://discourse.ats-lang.org/t/one-liner-solution-to-the-n-queens-puzzle/621 "2016-07-27T17:04:01Z")

</div>

Here it is: ((fix f(n:int):stream\_vt(list0(int))=\>if(n \> 0)then((f(n-1)\*intrange(0,N)). filter()(lam(xsy)=\>let val(xs,y)=xsy in $effmask\_all(xs.iforall()(lam(i,x )=\>(x != y && abs(x-y) != i+1)))end)).map()(lam(xs\_y)=\>l…

---

## [Gprint](https://discourse.ats-lang.org/t/gprint/128)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 0\
**Last updated:** [July 23, 2016, 4:27pm UTC](https://discourse.ats-lang.org/t/gprint/128 "2016-07-23T16:27:07Z")

</div>

Gprint in ATS kind of means 'generic print'. However it does not have to do with print. Basically, it supports a generic way to process primitive data and also defined data structures. For instance, the following code …

---

## [StackOverflow Documentation Beta](https://discourse.ats-lang.org/t/stackoverflow-documentation-beta/537)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 1\
**Last updated:** [July 21, 2016, 4:03pm UTC](https://discourse.ats-lang.org/t/stackoverflow-documentation-beta/537 "2016-07-21T16:03:59Z")

</div>

Hi, @Hongwei I received an ad from StackOverflow, introducing their "Documentation" feature in beta, here http://stackoverflow.com/tour/documentation. It seems useful for tutorials, too. You can have a look. It n…

---

## [ATS2-0.2.9 released](https://discourse.ats-lang.org/t/ats2-0-2-9-released/793)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 0\
**Last updated:** [July 19, 2016, 3:15am UTC](https://discourse.ats-lang.org/t/ats2-0-2-9-released/793 "2016-07-19T03:15:46Z")

</div>

Hi, I am pleased to announce the release of ATS2-0.2.9. This is the 32nd release of ATS2, the successor of the ATS (currently referred to as ATS1) programming language. The compiler for ATS2 is given the name ATS/…

---

## [Code for testing ATSLIB](https://discourse.ats-lang.org/t/code-for-testing-atslib/185)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 0\
**Last updated:** [July 19, 2016, 2:39am UTC](https://discourse.ats-lang.org/t/code-for-testing-atslib/185 "2016-07-19T02:39:26Z")

</div>

Hi, I have just initiated a project for testing the code in ATSLIB: https://github.com/githwxi/ATS-Postiats-test/tree/master/core/ATSLIB Any help from the community is welcome. You can simply send your testing c…

---

## [Embedding differential equations into types](https://discourse.ats-lang.org/t/embedding-differential-equations-into-types/737)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 10\
**Last updated:** [July 17, 2016, 12:48pm UTC](https://discourse.ats-lang.org/t/embedding-differential-equations-into-types/737 "2016-07-17T12:48:30Z")

</div>

I'd like to report an interesting example of using types in ATS. Here are two animations of bouncing balls: http://www.cs.bu.edu/~hwxi/Github/ATS-Postiats-contrib/projects/LARGE/DREACH/SCRATCH/bouncing\_ball/ http:/…

---

## [Atscc2clj](https://discourse.ats-lang.org/t/atscc2clj/816)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 4\
**Last updated:** [July 17, 2016, 1:37am UTC](https://discourse.ats-lang.org/t/atscc2clj/816 "2016-07-17T01:37:15Z")

</div>

I am pleased to announce that ATS code can now be compiled to Clojure (and then to JVM). I include an example as follows. Obviously, the generated Clojure code is not so-called idiomatic Clojure code. But it is…

---

## [Linear component may be abandoned](https://discourse.ats-lang.org/t/linear-component-may-be-abandoned/141)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 4\
**Last updated:** [July 14, 2016, 6:34pm UTC](https://discourse.ats-lang.org/t/linear-component-may-be-abandoned/141 "2016-07-14T18:34:00Z")

</div>

Hi, In \`stream\_vt.dats\`, I saw the following snippets, fun {a:vt0p} {b:vt0p} stream\_vt\_map\_con (xs: stream\_vt (a)) : stream\_vt\_con (b) = let val xs\_con = !xs in case+ xs\_con of | @stream\_vt\_cons(…

---

## [A demo of memorizing functions in ATS](https://discourse.ats-lang.org/t/a-demo-of-memorizing-functions-in-ats/601)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 5\
**Last updated:** [July 14, 2016, 3:02pm UTC](https://discourse.ats-lang.org/t/a-demo-of-memorizing-functions-in-ats/601 "2016-07-14T15:02:16Z")

</div>

Hi, In a practice, I encountered a problem of memorizing functions. Given a function \`f\`, a memorized version of \`f\`, called \`memo f\` should cache the results of \`f\` applying on some \`input\`. I tried a demo here h…

---

## [Thinking about moving this group to Discourse](https://discourse.ats-lang.org/t/thinking-about-moving-this-group-to-discourse/220)

<div class="topic-metadata">

**Author:** [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Replies:** 0\
**Last updated:** [July 14, 2016, 1:53pm UTC](https://discourse.ats-lang.org/t/thinking-about-moving-this-group-to-discourse/220 "2016-07-14T13:53:04Z")

</div>

Hi friends, I'm thinking about moving Google Group to a self-hosted Discourse. Discourse is an online discussion kit, http://www.discourse.org, very much like a forum version of Stack Overflow. It's founded by t…

---

## [Support for tail-call optimization in atscc2erl and atscc2scm](https://discourse.ats-lang.org/t/support-for-tail-call-optimization-in-atscc2erl-and-atscc2scm/625)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 1\
**Last updated:** [July 14, 2016, 6:50am UTC](https://discourse.ats-lang.org/t/support-for-tail-call-optimization-in-atscc2erl-and-atscc2scm/625 "2016-07-14T06:50:44Z")

</div>

I took some time to improve atscc2erl and atscc2scm. Now they both support code generated from patsopt when tail-call optimization is turned on. Currently, mutually defined tail-recursive functions are required to have…

---

## [Effective ATS: linear streams for memory-clean programs](https://discourse.ats-lang.org/t/effective-ats-linear-streams-for-memory-clean-programs/662)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 3\
**Last updated:** [July 13, 2016, 1:28am UTC](https://discourse.ats-lang.org/t/effective-ats-linear-streams-for-memory-clean-programs/662 "2016-07-13T01:28:04Z")

</div>

I wrote a new article on using linear streams to construct memory-clean programs, where being memory-clean means that a program must free every byte allocated during its execution before it terminates. Here is the link: …

---

## [Real-time OS system state captured by ATS language (and questions)](https://discourse.ats-lang.org/t/real-time-os-system-state-captured-by-ats-language-and-questions/131)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 12\
**Last updated:** [July 10, 2016, 11:24pm UTC](https://discourse.ats-lang.org/t/real-time-os-system-state-captured-by-ats-language-and-questions/131 "2016-07-10T23:24:59Z")

</div>

val () = if true then chEvtBroadcastI (pss | inserted\_event\_p) The system does not know what type should be given to pss. You need state type annotation: https://groups.google.com/forum/?utm\_medium=email&utm\_sourc…

---

## [I found a quine using ATS language](https://discourse.ats-lang.org/t/i-found-a-quine-using-ats-language/806)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 0\
**Last updated:** [July 1, 2016, 9:22pm UTC](https://discourse.ats-lang.org/t/i-found-a-quine-using-ats-language/806 "2016-07-01T21:22:52Z")

</div>

Great! I put it here: Since you have mentioned source of the code, I assume that there is no copyright infringement here.On Friday, July 1, 2016 at 4:59:11 PM UTC-4, Kiwamu Okabe wrote: Hi all, Today, I found a q…

---

## [Disabling tail-call optimization](https://discourse.ats-lang.org/t/disabling-tail-call-optimization/214)

<div class="topic-metadata">

**Author:** [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Replies:** 1\
**Last updated:** [July 1, 2016, 5:58pm UTC](https://discourse.ats-lang.org/t/disabling-tail-call-optimization/214 "2016-07-01T17:58:56Z")

</div>

In ATS/Postiats, a recursive tail-call is compiled into a local jump by default. One can disable tail-call optimization with the flag '--tlcalopt-disable': patscc --tlcalopt-disable ... patsopt --tlcalopt-disable …

---

## [Error compiling package in more recent ATS builds](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704)

<div class="topic-metadata">

**Author:** [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Replies:** 6\
**Last updated:** [July 1, 2016, 4:11pm UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704 "2016-07-01T16:11:11Z")

</div>

Hi, When trying to build a package \<https://github.com/bbarker/FALCON\> using more recent versions of ATS includes, I get the following error: $ make PATSCC=gcc MYCCRULE=PORTABLE -f ../Makefile gcc -I"/home/Brand…

[Next page](https://discourse.ats-lang.org/c/google-group/5.md?page=1)
