Re: ATS mode indentation

2017-10-12 Thread Andrew Knapp
ually add indentation. With the current ats-mode, you get two spaces > if you hit the > tab key. So you are pretty much in control of indentation. As far as I > know, a lot of programmers > want this kind of control :) > > > On Wed, Oct 11, 2017 at 3:43 PM, Andrew Knapp <a

ATS mode indentation

2017-10-11 Thread Andrew Knapp
precedence grammars.) Here is the temporary link. Let me know what I need to do to get this upstream. https://github.com/ajknapp/ats-mode-indent Best, Andrew Knapp -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from

Re: ML/OCaml style functors via includes

2017-10-18 Thread Andrew Knapp
more. > > On Wednesday, October 18, 2017 at 3:53:34 PM UTC-4, Andrew Knapp wrote: >> >> >> Hello, >> >> Chapter 3 of "A Tutorial on Programming Features in ATS" mentions that >> file inclusion can be used to emulate SML or OCaml style functors i

ML/OCaml style functors via includes

2017-10-18 Thread Andrew Knapp
Hello, Chapter 3 of "A Tutorial on Programming Features in ATS" mentions that file inclusion can be used to emulate SML or OCaml style functors in a limited manner. Is there an example of this technique somewhere? I would use the record-based functor method, as described in the

Re: ATS mode indentation

2017-10-18 Thread Andrew Knapp
; > Could you post a video on youtube to show potential users > how to set up and then use the mode? > > I will be happy to recommend it to my class. > > Thanks! > > On Friday, October 13, 2017 at 3:24:17 PM UTC-4, Andrew Knapp wrote: >> >> Both of those test case

Arrays, lists, and records

2017-10-22 Thread Andrew Knapp
I'd like to write something like the following code: #include "share/atspre_staload.hats" #include "share/atspre_define.hats" typedef test = () -> int(* better type later *) typedef suite(data:t0ype,n:int) = @{ name = string, setup = (data -> void), teardown = (data -> void),

Re: ATS3: ATS/Xanadu

2018-08-04 Thread Andrew Knapp
Just some miscellaneous thoughts and questions. - Here's a paper ("Beyond Type Classes") that I found interesting. It's a generalization of Haskell's type class system that does type-directed overloading via user-defined Constraint Handling Rules (CHRs). It fits nicely with the logic

Re: Shared memory IPC in ATS

2018-04-08 Thread Andrew Knapp
Nanomq is as bare-bones as you can possibly get. Unlike zeromq, it only works for a small number of local processes, and makes every possible tradeoff for low latency. Nanomq (in the ATS port and original C++) only offers blocking reads in the public interface (I'll probably change this),

Shared memory IPC in ATS

2018-04-08 Thread Andrew Knapp
Hi all, I've extracted some ipc code from a larger codebase. https://github.com/ajknapp/ats-nanomq It's basically a bunch of SPSC ring buffers in shared memory, and is ported from a C++ library https://github.com/rigtorp/nanomq Fair warning: there aren't many scenarios where this design is a

Re: Functions from datasorts to datasorts

2018-04-09 Thread Andrew Knapp
My one example, serialization of nested records from a tlist of @(string,t0ype), turned out to not need append. Anyhow, that's blocked for now, since I don't think you can reflect a template-argument string literal to the value level. But more generally, a convenient way to write functions

Re: Flat memory underlying dataviewtypes

2018-04-01 Thread Andrew Knapp
I'll put it on github sometime this week. It's an ATS port of this c++ library https://github.com/rigtorp/nanomq -- 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

Re: ATS3: ATS/Xanadu

2018-03-20 Thread Andrew Knapp
After writing several thousand lines of ATS, I'd say there isn't terribly much I'd change, honestly. A lot less than when I got started, for sure. What I would like to see changed: 1. Real module system. MixML might not be a bad source of inspiration, as it would essentially be a better

Re: Flat memory underlying dataviewtypes

2018-03-21 Thread Andrew Knapp
The code on glot also fails if you change Bar to Baz in all the appropriate places. -- 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

Re: Flat memory underlying dataviewtypes

2018-03-21 Thread Andrew Knapp
Yes, that works well. Thank you! -- 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-users+unsubscr...@googlegroups.com. To post to this group, send

Flat memory underlying dataviewtypes

2018-03-20 Thread Andrew Knapp
Hello, I'd like to be able to send dataviewtypes as messages in a low-latency ipc library I've written. In this scenario, any use of malloc is unacceptable. Everything must be allocated from a memory pool or the stack, but datavtype constructors always allocate on the heap. What is the best