Re: glot.io, a code pastebin that can also run your code, now supports ATS.

2016-05-09 Thread Steinway Wu
Sure, but where can I find the source file for the logo? On Saturday, May 7, 2016 at 5:28:38 PM UTC-4, gmhwxi wrote: > > Could you also make ATS logo shown in the entry for ATS? > > On Saturday, May 7, 2016 at 2:18:45 PM UTC-4, Steinway Wu wrote: >> >> Hi, >> >

Re: glot.io, a code pastebin that can also run your code, now supports ATS.

2016-05-10 Thread Steinway Wu
Sure, it is merged. It will be published in the next deployment. On Monday, May 9, 2016 at 9:57:03 AM UTC-4, gmhwxi wrote: > > It is here: > > > https://github.com/githwxi/ATS-Postiats/blob/master/doc/PROJECT/MEDIUM/ats2langweb/theLogo/theLogo.png > > On Mon, May 9, 2016 at

Thinking about moving this group to Discourse.

2016-07-14 Thread Steinway Wu
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 the founder of StackOverflow. I think it is beneficial for several reasons. 1.

Re: Linear component may be abandoned.

2016-07-14 Thread Steinway Wu
tion > in ATS is to use call-by-reference when linear data is handled. > > 3. The 'xs' on the right-hand side is a variable (with address); its > content needs to be taken out before free@ can be called. > > > > > On Thu, Jul 14, 2016 at 9:20 AM, Steinway W

Linear component may be abandoned.

2016-07-14 Thread Steinway Wu
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(x, xs) => let val y = stream_vt_map$fopr (x) // fopr is of type {a,b:vt@ype}

StackOverflow Documentation Beta

2016-07-21 Thread Steinway Wu
Hi, @Hongwei I received an ad from StackOverflow, introducing their "Documentation" feature in beta, here http://stackoverflow.com/tour/documentation. It seems useful for us, too. You can have a look. It needs at least five requests for the #ats tag to allow us to create documents. Anyone

Re: A demo of memorizing functions in ATS

2016-07-10 Thread Steinway Wu
Thanks, I forgot to save it after debug. Now it works. On Sunday, July 10, 2016 at 9:38:49 PM UTC-4, gmhwxi wrote: > > Please change > > memo1 > > to > > memo1<int, int> > > Also, please delete the line "staload .../gorder_int.dats" > > On Su

Re: Declaring a static constant with an external name

2016-06-30 Thread Steinway Wu
This is so cool! On Wednesday, June 29, 2016 at 1:24:12 PM UTC-4, gmhwxi wrote: > > > In ATS2-0.2.8, a static constant can now be declared with an external name: > > For instance: > > stacst sine_of_real : real -> real = "ext#sin" > > This is useful when constraints generated during typechecking

Re: Support in ATS for using external packages

2017-01-19 Thread Steinway Wu
It seems that the change breaks the build of ATS-Postiats-contrib. I can no longer compile atscc2js/2erl/2clj etc. It can not find source files any more and reporting errors like ".PATSRELOCROOT-$USER/SATS/json.sats is not available". On Tuesday, January 3, 2017 at 2:45:09 PM UTC-5, gmhwxi

A demo of Union/Find algorithm in ATS

2016-09-09 Thread Steinway Wu
Hi, I was reading a chapter about type inference and constraint solving in ML. It mentioned a quick Union/Find algorithm for testing equivalent classes. I translate the code into ATS, and pasted here at [glot.io: Union/Find]( https://glot.io/snippets/eiaoq3icf1) Just for fun. -- Steinway Wu

Re: A demo of Union/Find algorithm in ATS

2016-09-09 Thread Steinway Wu
Updated, thanks! On Friday, September 9, 2016 at 7:07:55 PM UTC-4, gmhwxi wrote: > > > I suggest: > > fun{} addr_of{a:t@ype} (pt a): ptr > > Casting a pointer(64bit) to an integer(32bit) is a bit dangerous. > > > On Friday, September 9, 2016 at 5:36:35 PM UTC-

Share a Link: a Lisp Machine

2016-09-09 Thread Steinway Wu
Just share a link from hacker news, a lisp machine. http://www.technoblogy.com/show?1GX1 -- Steinway Wu Sent with Airmail -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving e

Sublime Text - Build/Type Check with hot key

2016-10-06 Thread Steinway Wu
Hi, https://gist.github.com/steinwaywhw/27d8fbb569cf178d08d9465aa92c741e I’m sharing my SublimeText script for building/typechecking ATS files. After loading this plugin, and filling the blanks, press the hotkey for Build (on mac, it is cmd+b/cmd+shift+b), it will compile/typecheck the program.

Re: Ask/Answer ATS-related questions on StackOverflow

2016-10-16 Thread Steinway Wu
yes... but not a big issue though. hope we could have more people interested in ATS and ask questions there. On Sunday, October 16, 2016 at 7:02:43 AM UTC-4, Kiwamu Okabe wrote: > > On Sun, Oct 16, 2016 at 3:20 AM, gmhwxi wrote: > > http://stackoverflow.com/tags/ats/info >

Re: Support in ATS for using external packages

2017-01-06 Thread Steinway Wu
I just played with it on my ats-utils package. I published it here, https://www.npmjs.com/package/ats-utils so that others can try out. It is under MIT license. On Tuesday, January 3, 2017 at 2:45:09 PM UTC-5, gmhwxi wrote: > > > > ## > # > # For the moment, I am using ats-lang-users for

Re: Adding join patterns to ATS

2016-12-22 Thread Steinway Wu
Since you already have some experience with JoCaml, would you mind sharing some code examples, or slides that you have? I would like to learn more about it. On Wednesday, December 21, 2016 at 4:23:57 PM UTC-5, Ian MathWiz wrote: > > I've seen some other feature/roadmap ideas on this list, so I

Re: Adding join patterns to ATS

2016-12-22 Thread Steinway Wu
I didn't know Join-calculus before, but this definitely looks interesting to me. It seems that it can encode pi-calculus to some degree, but I haven't fully investigate that paper. But just for your information, ATS supports session types which I think is relevant here. You may want to have a

Re: (Co)monads in ATS

2017-03-17 Thread Steinway Wu
Great note! On Thursday, March 16, 2017 at 11:20:54 AM UTC-4, August Alm wrote: > > Hi all! > > I just wrote down some sketchy thoughts on monads and comonads in ATS. ATS > has a very unique type system, so there are (co)monads in ATS that simply > do not exist in other languages. I'm wondering

pandoc supports ATS syntax highlighting

2017-04-17 Thread Steinway Wu
Hey friends, I just came across this, https://github.com/jgm/skylighting/blob/master/xml/ats.xml, when I was writing a latex documents indirectly by using markdown/pandoc. I found that Pandoc natively supports ATS syntax highlighting, which generates pretty LaTex/PDF files. That's AMAZING! I

Re: Deech's talk and slides from StrangeLoop 2017

2017-10-02 Thread Steinway Wu
Hi Aditya, Great talk! You did a great job presenting a difficult system in a easy-to-understand way :) Just wanna point out a detail. Proofs are dynamic terms (of sort "prop"). So they are not really "type-level". But I guess it is ok to say "type-level" in the talk since they will be

Re: Deech's talk and slides from StrangeLoop 2017

2017-10-02 Thread Steinway Wu
Hi Aditya, Your talk is also featured on *The Verge*! Congratulations! https://www.theverge.com/2017/10/2/16404152/strange-loop-2017-programming-talks-youtube On Monday, October 2, 2017 at 3:02:03 AM UTC-4, Artyom Shalkhakov wrote: > > Seen on reddit: > > >

Re: Static Templates

2017-10-22 Thread Steinway Wu
ain of meta-programming. > > In general, it is very difficult to do meta-programming in a typeful > manner. Often one tries to write code to generate code that may > contain type-error and then apply typechecking to the generated code. > > On Friday, October 20, 2017 at 5:45:45 PM UTC-4,

Re: Linear lazy stream, $ldelay, and freeing a single element.

2018-05-06 Thread Steinway Wu
I was playing with a utility library based on type classes, implemented as templates. As you mentioned, I experienced "interface explosion". For things like a fold, or a fmap, I have a t@ype version that is probably garbage collected, a vt@ype version that is call-by-value, and a vt@ype

Re: Linear lazy stream, $ldelay, and freeing a single element.

2018-05-06 Thread Steinway Wu
And the `free` method is defined to be the second argument of $ldelay? Is that understanding correct? On Sunday, May 6, 2018 at 12:19:55 AM UTC-4, gmhwxi wrote: > > > A linear stream is a bit like an object with two methods: > one for eval and the other for free; !xs calls the eval method > and

Re: Linear lazy stream, $ldelay, and freeing a single element.

2018-05-05 Thread Steinway Wu
I have a follow up question. How does `~xs` as in `$ldelay(..., ~xs)` handle a stream of linear elements, or even linear closures? On Saturday, May 5, 2018 at 11:23:33 PM UTC-4, Steinway Wu wrote: > > Oh, there's a gfree_val and gfree_ref > > On Saturday, May 5, 2018 at 11:01

Linear lazy stream, $ldelay, and freeing a single element.

2018-05-05 Thread Steinway Wu
Hi, Even though `stream_vt (a)` is defined on `a: vt@ype`, many library functions for `stream_vt (a)` is only defined on `a: t@ype`. It feels like `a: t@ype` is easier to work with since there's no need to free a single element in some of the library functions, like `stream_vt_make_cons`. Is

Re: Linear lazy stream, $ldelay, and freeing a single element.

2018-05-05 Thread Steinway Wu
Oh, there's a gfree_val and gfree_ref On Saturday, May 5, 2018 at 11:01:16 PM UTC-4, gmhwxi wrote: > > Is there a template called gfree? You can put gfree(x) there. > For non-linear x, > > implement(a:t@ype) gfree(x) = (). > > On Saturday, May 5, 2018 at 10:51:34 PM UTC

ATS-Redis

2018-05-01 Thread Steinway Wu
Hi all, I just updated the ats-redis bindings to work with the latest hiredis. https://github.com/steinwaywhw/ats-redis It is a binding at its bare minimum, but still useful. Pull requests are welcomed. Npm package is on the way. I did something wrong and need to wait 24hr before I can

Re: Template-based implementation for functors

2018-05-01 Thread Steinway Wu
Oh I see. But anyway, here's a monad type class. Just for the record. https://glot.io/snippets/f0nejek645 On Tuesday, May 1, 2018 at 11:27:29 PM UTC-4, gmhwxi wrote: > > > This approach can only handle simple type constructors like list and maybe. > It would not handle List defined as follows:

Re: Template-based implementation for functors

2018-05-01 Thread Steinway Wu
Hi Hongwei and August, https://glot.io/snippets/f0nd233vde I have this functor code working without any "name" hack. @Hongwei, did you make any improvements on templates to make it happen? Or am I missing something? And btw, glot.io is still running ATS 0.2.11. On Wednesday, March 29, 2017

Re: Template-based implementation for functors

2018-05-01 Thread Steinway Wu
I actually just tried it, and it works with `[n:nat] List (a, n)`. See https://glot.io/snippets/f0nf39m7lk. On Tuesday, May 1, 2018 at 11:59:32 PM UTC-4, Steinway Wu wrote: > > Oh I see. But anyway, here's a monad type class. Just for the record. > > https://glot.io/snippet

Re: Nix

2018-05-01 Thread Steinway Wu
Cool! I just learned about Nix recently, and it looks (at first glance, at least) promising. Do you (or Brandon) have any experiences comparing packaging individual ATS libraries using NPM vs using Nix? On Tuesday, May 1, 2018 at 11:29:29 PM UTC-4, Artyom Shalkhakov wrote: > > Hi Steinway, >

Nix

2018-04-30 Thread Steinway Wu
Hi, I just noticed that there are some Nix scripts. I never knew we have Nix efforts. Could someone provide some insights into the experiences using Nix for ATS? Is it working? Does someone maintain a Nix package for ATS? -- You received this message because you are subscribed to the Google

Templates and Closures

2018-05-03 Thread Steinway Wu
Hi, If a put a template function invocation inside a closure function, it seems that the template is resolved at the closure definition time. I know one way to work around this is to use templates all the way, and replace closures with something like `foobar$fwork`. But is there another way

Re: Templates and Closures

2018-05-03 Thread Steinway Wu
Well, I sort of find a way around, that is to write a eta-expanded version that is a template. So the template get's invoked right before it is used to generate a closure. https://glot.io/snippets/f0pf8h25o9 On Thursday, May 3, 2018 at 8:05:28 PM UTC-4, Steinway Wu wrote: > > Hi, > &

Re: ATS3: ATS/Xanadu

2018-04-28 Thread Steinway Wu
ATS uses late-binding. On Tuesday, February 13, 2018 at 2:52:29 PM UTC-5, Steinway Wu wrote: > > Hi Hongwei, just for the record, let me put down some offline discussions. > > 1. Programmers can decide how a literal is parsed, or even write some > plugins to parse some custom

Re: Best way to handle short-living linear objects

2017-10-20 Thread Steinway Wu
I guess you can define \cross and * as functions that consumes the linear list and return a new one? On Friday, October 20, 2017 at 10:11:00 AM UTC-4, Russoul wrote: > > Let's treat `list_vt(a,n)` as algebraic vector of dim 'n'. Then let's > perform some operations on a bunch of them: > >

Re: ATS3: ATS/Xanadu

2018-02-13 Thread Steinway Wu
Hi Hongwei, just for the record, let me put down some offline discussions. 1. Programmers can decide how a literal is parsed, or even write some plugins to parse some custom literals. For instance, 1 can be interpreted as int, nat, and int(1) etc. Programmers should be able to either turn a

Re: Theoretical underpinnings for ATS's type system

2018-03-07 Thread Steinway Wu
Hi Brandon, ATS, as formulated in http://www.ats-lang.org/MYDATA/ATSfoundation.pdf, is proven sound. See Section 3. ATS with theorem-proving is proven sound by proof erasure, in Section 4. As far as I know, the soundness is proven directly, following the traditional approach of Progress +

Re: Intro to ATS - How to code productively

2018-04-11 Thread Steinway Wu
Hi Artyom, Yes, I think it's good :) (Sorry for the delay. I was offline for the past week. ) On Monday, April 2, 2018 at 1:48:19 AM UTC-4, Artyom Shalkhakov wrote: > > > Hi Steinway, > > On Sunday, April 1, 2018 at 11:39:34 PM UTC+6, Steinway Wu wrote: >> >> Hi Art

Re: ATS3: ATS/Xanadu

2018-04-11 Thread Steinway Wu
Did anyone mention operators definition/overloading? I think currently in ATS2, one can only overload a symbol with a function. But I actually prefer how OCaml and Haskell handles operators: they are just functions whose names happen to be symbols instead of alphabets. One use parenthesis

Re: Intro to ATS - How to code productively

2018-04-01 Thread Steinway Wu
Hi Artyom, This is awesome :) I have a question about "gradual improvement" of performance. I personally feels it is more about gradual improvement of specification, e.g. change a simple data type into a more refined type, to catch more bugs. So the sales pitch is more like "write dirty code