I'm not terribly good at C++, but thanks, will take a look! The v2 of the library in the works, due to be released next week. Fixes a few things and adds some new features.
-----Original Message----- From: "gmhwxi" <gmh...@gmail.com> Sent: 5/20/2017 6:39 PM To: "ats-lang-users" <ats-lang-users@googlegroups.com> Subject: Re: Handling command line arguments? I have just got a bit of time to look at the code. There are quite a few advanced features in use here :) By the way, you could alse use C++ data structures in your code: https://github.com/githwxi/ATS-Postiats/tree/master/contrib/ats2cpp https://github.com/githwxi/ATS-Postiats/tree/master/contrib/ats2cpp/STL On Tuesday, May 16, 2017 at 11:11:22 AM UTC-4, Artyom Shalkhakov wrote: On Monday, May 15, 2017 at 11:00:50 PM UTC+6, gmhwxi wrote: Libats/ML mostly consists of convenience wrappers for functions defined in prelude and libats. If performance is a non-issue, I would prefer to use libats/ML as it can save me a lot of coding time. I wrote a getopt-style, retro 80's library: https://github.com/ashalkhakov/atscntrb-as-getopt Doesn't get more hip than that, I suppose. :-) This one is written primarily to deal with environments where GC is to be avoided (I'm going to use it for ats3d). I also wanted to push forward the ATS-as-a-better-C/C++ idea. On Sunday, May 14, 2017 at 5:16:08 AM UTC-4, Artyom Shalkhakov wrote: On Saturday, May 13, 2017 at 6:38:59 PM UTC+6, gmhwxi wrote: Now, this package is functioning. Please see the test01 example in TEST for a typical case of using it. The package is template-based. One can adapt it by re-implementing some of the templates. Maybe someone could write a bit of documentation on the package, but... In any case, I wrote it in a way that should minimize the need for documentation, which I see as a true luxury in software development that we could not really afford. Ideally, code should document itself :) Templates in ATS can offer great help in this regard. Thank you! I will take a look as soon as time permits. I see that you use libats/ML a lot in this library. I'm not familiar with it, will need some time to explore it. Cheers! On Wednesday, May 10, 2017 at 9:32:01 PM UTC-4, gmhwxi wrote: I have just got started working on it. In case you'd like to see the progress: https://github.com/githwxi/ATS-Postiats/tree/master/contrib/atscntrb-hx-getargs I set things up in a way that allows the code to work inside ATS and also work as a stand-alone package. On Wednesday, May 10, 2017 at 8:59:22 AM UTC-4, gmhwxi wrote: Good point! I have some ideas about this. I will make a package shortly. On Wed, May 10, 2017 at 1:00 AM, Artyom Shalkhakov <artyom...> wrote: Hi all, Is there a ready-made library for handling command line parameters? So far I found the following: https://github.com/githwxi/ATS-Postiats/blob/master/utils/jsonlst2arr/jsonlst2arr.dats Which sets up an example of what HX thinks should be done to deal with command-line arguments. Would somebody like to move it into a library? -- 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 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/3f70c312-504e-417c-8ee4-282cf0e22b41%40googlegroups.com. -- 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 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/421ef998-5577-4fdd-8a90-aac939fbd093%40googlegroups.com. -- 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 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/59204d1c.e0012e0a.e3eb9.db0f%40mx.google.com.