ATS-Postiats-extra-npm

53 views
Skip to first unread message

gmhwxi

unread,
Jan 20, 2017, 11:44:42 AM1/20/17
to ats-lang-users

I have recently packaged many ATS-utils and npm-published them.

However, these packages are not typical npm-packages; therefore, their
handling is a bit special. For the moment, the following repository contains
a Makefile that can be conveniently used to build all the packaged ATS-utils:

https://github.com/ats-lang/ATS-Postiats-extra-npm

After git-cloning it, you can put ATS-Postiats-extra-npm/bin on your PATH.
Then the ATS-utils can be called right away after they are built.

Cheers!



gmhwxi

unread,
Jan 22, 2017, 10:33:23 AM1/22/17
to ats-lang-users
It is renamed to:

https://github.com/ats-lang/ATS-Postiats-npm-utils

This repository is partially included in ATS-Postiats/npm-utils

William Blair

unread,
Jan 23, 2017, 10:05:45 AM1/23/17
to ats-lang-users
This looks like a great way to distribute ATS code. I just tried it out and used npm to install the ATS bindings for the libjson-c library in a project.

This allows us to publish ATS libraries as npm packages. When we want to use an ATS library, we list it as a dependency in our project's package.json file and run

  npm install

After that command, any libraries listed as dependencies will be downloaded into our project's node_modules folder. If we set PATSHOMELOCS in our Makefile to refer to node_modules, we can construct a local path to any ATS code we want to use for our project. Is this the right way to think about using npm for ATS?

Hongwei Xi

unread,
Jan 23, 2017, 11:02:21 AM1/23/17
to ats-lan...@googlegroups.com
I am also experimenting, When the dust settles, I will write a short article on this.

For npm, you can use:

export PATSHOMELOCS=./node_modules:./../../node_modules

In each package, there should be a mydep.hats file containing all the external
packages used by that package. When staloading these external pakcages in mydep.hats,
please use PATSHOMELOCS. For instance,

staload CS = "$PATSHOMELOCS/atscntrb-hx-cstream/SATS/cstream.sats"

In this way, the way in which ATS searches for packages is in alignment with the way npm installs
packages (based on their version numbers).


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/a223cc3c-35c0-45a8-b8fe-cb77b12b00b3%40googlegroups.com.

gmhwxi

unread,
Jan 23, 2017, 11:17:36 AM1/23/17
to ats-lang-users

You may take a look at the following published packages:

atscntrb-hx-intinf
atscntrb-hx-mygrading

As a bit of convention, I suggest that atscntrb be used as the
prefix of the name of an ATS-related package. This should make search
for ATS-related pakcages at npmjs very convenient to do.


On Monday, January 23, 2017 at 11:02:21 AM UTC-5, gmhwxi wrote:
I am also experimenting, When the dust settles, I will write a short article on this.

For npm, you can use:

export PATSHOMELOCS=./node_modules:./../../node_modules

In each package, there should be a mydep.hats file containing all the external
packages used by that package. When staloading these external pakcages in mydep.hats,
please use PATSHOMELOCS. For instance,

staload CS = "$PATSHOMELOCS/atscntrb-hx-cstream/SATS/cstream.sats"

In this way, the way in which ATS searches for packages is in alignment with the way npm installs
packages (based on their version numbers).

Reply all
Reply to author
Forward
0 new messages