Re: About scientific computing with ATS and notation

2022-01-25 Thread d4v3y_5c0n3s
Hi Yann, I'm glad to see others showing interest in ATS :D. I'm not very familiar with the sort of scientific programming that you are talking about, but I'll do my best to respond to your questions regardless. You asked whether you could use 128 bit integers, SIMD, multicore, and even dist

Re: general questions about ats postiats and upcoming xanadu compatibility

2022-01-25 Thread d4v3y_5c0n3s
I'll try to answer your questions to the best of my ability. 1. ATS Postiats (also known as ATS2) does not currently support MSVC, and likely never will since ATS Xanadu (a.k.a. ATS3) is the main focus of the lead developer. 2. I don't know what C standard ATS compiles to, but it's p

Re: Help with Templates, cannot find missing implementation somewhere...

2022-01-01 Thread d4v3y_5c0n3s
nitize$clear (i, x) = >> bucket_delete_recursive(x) >> >> On Thursday, December 30, 2021 at 6:07:31 PM UTC-5 d4v3y_5c0n3s wrote: >> >>> Here are the files, with some of the functions that are never used in >>> the example removed. >>> The

Re: Help with Templates, cannot find missing implementation somewhere...

2021-12-30 Thread d4v3y_5c0n3s
UTC-5 gmhwxi wrote: > Where can I find your source code so that I can produce the error you are > referring to? > > --Hongwei > > > On Thu, Dec 30, 2021 at 12:47 PM d4v3y_5c0n3s wrote: > >> Ok, so I've been able to get the "dict" type to be abstract, but I can&#x

Re: Help with Templates, cannot find missing implementation somewhere...

2021-12-30 Thread d4v3y_5c0n3s
^ /usr/local/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro ‘ATSINSmove_void’ 284 | #define ATSINSmove_void(tmp, command) command | ^~~ On Tuesday, Dec

Re: How to define linear abstract types based on records

2021-12-10 Thread d4v3y_5c0n3s
C but they should be based on two types in ATS that are > structurally equal. > > I may be able to suggest something if I could produce the error on my side. > > --Hongwei > > > On Fri, Dec 10, 2021 at 8:58 PM d4v3y_5c0n3s wrote: > >> So, I've got the following

How to define linear abstract types based on records

2021-12-10 Thread d4v3y_5c0n3s
So, I've got the following defined in my ".sats" file: absvt@ype mesh = @{v=int, t=int} In my ".dats" file, I've defined the following: assume mesh = [v,t:nat | v == t*3] @{ v=int v, t=int t } in implement mesh_new ( ) = let in @{ v=3, t=1 }:mesh end Where "mesh_new()" is simply a fu

Re: What is the best way to turn a file into a lazy linear stream?

2021-12-07 Thread d4v3y_5c0n3s
> To me, this seems to be the only type-safe solution (as the alternative > you mentioned above must make use of some unsafe features). > > --Hongwei > > > On Sunday, October 17, 2021 at 9:14:04 AM UTC-4 d4v3y_5c0n3s wrote: > >> Okay, so looking back I should have

Re: Help with Templates, cannot find missing implementation somewhere...

2021-12-07 Thread d4v3y_5c0n3s
on your machine, then I may be able >> to suggest something. >> >> >> >> On Tue, Nov 30, 2021 at 8:27 PM d4v3y_5c0n3s wrote: >> >>> Update 2: >>> After investigating the prelude, I've determined that templates in ATS2 >>> j

Re: Help with Templates, cannot find missing implementation somewhere...

2021-11-30 Thread d4v3y_5c0n3s
ber 30, 2021 at 7:08:48 PM UTC-5 d4v3y_5c0n3s wrote: > Update: > I was able to get the code I provided above running by staloading the > dict.dats file from the dict_test.dats file using " staload _ = > "./dict.dats" ". Now, my only problem is that if I make the &

Re: Help with Templates, cannot find missing implementation somewhere...

2021-11-30 Thread d4v3y_5c0n3s
ng. On Tuesday, November 30, 2021 at 1:39:39 PM UTC-5 d4v3y_5c0n3s wrote: > You are right, including " share/atspre_staload.hats" causes the code to > compile. However, I'm still having issues. You see, the code I provided I > had taken from a static (.sats) and dynamic

Re: Help with Templates, cannot find missing implementation somewhere...

2021-11-30 Thread d4v3y_5c0n3s
ementations > were not > available to the compiler (patsopt). > > --Hongwei > > > On Tue, Nov 30, 2021 at 10:52 AM d4v3y_5c0n3s wrote: > >> Okay, so I've been struggling with my use of templates for a while >> now, and I'm making this post to get some mo

Help with Templates, cannot find missing implementation somewhere...

2021-11-30 Thread d4v3y_5c0n3s
Okay, so I've been struggling with my use of templates for a while now, and I'm making this post to get some more eyes on the issue. I've been getting really frustrated, because nothing I've tried seems to work, and I have no way to understand what is going wrong whatsoever besides becoming

Re: Template Issue

2021-11-29 Thread d4v3y_5c0n3s
t; *datavtype maybe(a:vt@ype) =| NAH of ()| YAH of (a)fn{a:vt@ype} maybe_nah > () : maybe(a) = NAH()fn{a:vt@ype} maybe_yah ( x: a ) : maybe(a) = YAH(x)* > > *val () = let* > > > > > > > *var m1 = maybe_nah()var m2 = maybe_yah(6) val-~NAH() > = m1val-~Y

Re: Template Issue

2021-11-29 Thread d4v3y_5c0n3s
in/11/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccVVVRVe.o:metap_test_dat:(.text+0x160): undefined reference to `atsruntime_malloc_undef' collect2: error: ld returned 1 exit status I have no idea what it means or what caused it. On Monday, November 29, 2021 at 11:03:29 AM UTC-5 d4v3y_5c0n3s wrote: >

Re: Template Issue

2021-11-29 Thread d4v3y_5c0n3s
there a way for me to generate the error you are referring to? > The above code works fine on my end. > > --Hongwei > > > On Mon, Nov 29, 2021 at 10:16 AM d4v3y_5c0n3s wrote: > >> I think I've been able to break down a problem I've been having with ATS&#x

Template Issue

2021-11-29 Thread d4v3y_5c0n3s
I think I've been able to break down a problem I've been having with ATS' templates into a simple example provided below. The following code type-checks, and can easily tested using Try-ATS-on-line. *datavtype maybe(a:vt@ype) =| NAH of ()| YAH of (a)fn{a:vt@ype} maybe_nah () : may

Re: Template Debugging Tips?

2021-11-27 Thread d4v3y_5c0n3s
1 AM UTC-5 vamc...@gmail.com wrote: > I recall getting errors in the generated C code when I forgot to implement > some function! > > (I was able to use them :) > > > http://blog.vmchale.com/article/ats-templates > > Cheers, > Vanessa McHale > > On Nov 27, 20

Template Debugging Tips?

2021-11-27 Thread d4v3y_5c0n3s
Recently, I've been working on testing the code for an ATS project I've been working on for a while now. Everything (that I've implemented) passes type-checking so far. However, I've encountered some kind of issue with the templates that I've written (which all typecheck) where when I try to

Re: Why aren't the MUL() prop functions in the prelude docs? (on the site, that is)

2021-10-30 Thread d4v3y_5c0n3s
Done. On Saturday, October 30, 2021 at 10:53:30 AM UTC-4 gmhwxi wrote: > Yes, please open an issue about it. Thanks! > > On Saturday, October 30, 2021 at 10:20:03 AM UTC-4 d4v3y_5c0n3s wrote: > >> I just noticed that the MUL() proof functions like "mul_gte_gte_gte()"

Why aren't the MUL() prop functions in the prelude docs? (on the site, that is)

2021-10-30 Thread d4v3y_5c0n3s
I just noticed that the MUL() proof functions like "mul_gte_gte_gte()" are actually not listed in the prelude reference on the "ats-lang.org" site. Is this intended? Should open an issue on Github about it or something? -- You received this message because you are subscribed to the Google Gro

Re: What is the best way to turn a file into a lazy linear stream?

2021-10-17 Thread d4v3y_5c0n3s
you have any questions. On Monday, October 4, 2021 at 9:17:38 PM UTC-4 d4v3y_5c0n3s wrote: > > What the title says. Basically, I want to use a solution that: > - does not require GC > - uses the type system to prevent the user from freeing the file before > they are done with t

Re: Lambdas that use linear resources

2021-10-07 Thread d4v3y_5c0n3s
First, let me say that lambdas are one part of ATS that I'm not super experienced in myself. However, if you haven't been there already, I'd recommend reading the chapters on linear & stack-allocated closures in the " A Tutorial on Programming Features in ATS " here

What is the best way to turn a file into a lazy linear stream?

2021-10-04 Thread d4v3y_5c0n3s
What the title says. Basically, I want to use a solution that: - does not require GC - uses the type system to prevent the user from freeing the file before they are done with the lazy evaluation - is not too inconvenient for the user to use Let me know if you need an example of what I'm talk

Re: FILEREF type is non-linear?

2021-07-22 Thread d4v3y_5c0n3s
to FILEptr and the typechecker will then lead me to all the places > where subsequent changes are needed for such a change. > > On Sunday, July 11, 2021 at 8:02:39 PM UTC-4 d4v3y_5c0n3s wrote: > >> Just a quick question: I noticed that the "FILEREF" type in ATS is >&

FILEREF type is non-linear?

2021-07-11 Thread d4v3y_5c0n3s
Just a quick question: I noticed that the "FILEREF" type in ATS is non-linear. Does this mean that I need to enable garbage collection to work with files? Or is the value freed but hidden from the linear type system? -- You received this message because you are subscribed to the Google Group

Re: Trying to get a dependent type working in ATS

2021-07-01 Thread d4v3y_5c0n3s
> Clearly, no value can be given the above type as 0 <= un and un+1 <= 0 > yields a contradiction. > > > On Wed, Jun 30, 2021 at 10:12 PM d4v3y_5c0n3s wrote: > >> So, I'm trying to get the following code to work: >> *typedef tri_test2(v:int) = [un:int | 0 &l

Trying to get a dependent type working in ATS

2021-06-30 Thread d4v3y_5c0n3s
So, I'm trying to get the following code to work: *typedef tri_test2(v:int) = [un:int | 0 <= un; un+1 <= v; un == 0; v == 0] int(un)* *val test2 = (0):tri_test2(0)* But I get the following error: */tmp/patsopt_tcats_TCES3d: 196(line=6, offs=14) -- 197(line=6, offs=15): error(3): unsolved constrai

Re: Memory Mapped IO

2021-06-26 Thread d4v3y_5c0n3s
w. Now, you can call the first function again since you've finished touching that memory. The benefit of doing this is that wouldn't have to worry about things like calling the function at the same time in concurrent code. It also looks better, so there's that. On Thursday, J

Re: Moving forward with ATS3

2021-06-03 Thread d4v3y_5c0n3s
Exciting! I can't wait! :D On Thursday, June 3, 2021 at 6:31:11 PM UTC-4 gmhwxi wrote: > > Hi, there, > > I wish I could announce that ATS is ready. But it is not. > > I had actually gotten stuck for quite some time in the middle of > implementing a type-checker for ATS3 (that supports both line

Re: "Number is smaller than 0x8000, trust me"

2021-05-29 Thread d4v3y_5c0n3s
Hey David, have you tried using the "praxi" syntax? It allows you to define an axiom, essentially telling ATS: "I'm not going to prove that X is true, but just assume it is." I'd recommend reading the theorem proving sections of Intro to ATS if you haven't already. Here's an example of a prax

Re: Having Trouble Finding a Constraint Which is Failing

2021-05-08 Thread d4v3y_5c0n3s
021 г. в 22:09, d4v3y_5c0n3s : > >> Thanks, I appreciate the help. I'm glad that the issue was a simple fix. >> :D >> >> On Saturday, May 8, 2021 at 3:14:33 PM UTC-4 gmhwxi wrote: >> >>> This is due to a missing type annotation for 'ifcase'

Re: Having Trouble Finding a Constraint Which is Failing

2021-05-08 Thread d4v3y_5c0n3s
> > (FBT_CONS(fbc.0) | fbc.1+1, fbc.2) > | tr=1 => > (FBT_CONS(fbc.0) | fbc.1, fbc.2+1) > | _ => (FBT_CONS(fbc.0) | fbc.1+1, fbc.2+1) > ) : [f1,b1:nat] fb_count(a, f1, b1) > > In general, if-exp, case-exp and ifcase-exp should all be given a type > annotation. &g

Having Trouble Finding a Constraint Which is Failing

2021-05-08 Thread d4v3y_5c0n3s
So, I'm having difficulty understanding a constraint that is failing in my code. The constraint that is failing is "f1 + f1 = 1", which I am confused by, because there appears to be no such constraint in my code. *Here's what (most of) my code is:* dataprop FBT_IN (int, a:addr) =

Re: Finding Strings within Strings in ATS

2021-03-05 Thread d4v3y_5c0n3s
linear and dependent types. > After that, I suppose I can polish it a bit and then make a release. > > --Hongwei > > > > On Monday, March 1, 2021 at 9:11:13 PM UTC-5 d4v3y_5c0n3s wrote: > >> Thank you for the suggestions. I decided to sidestep my need to _ for >>

Re: Finding Strings within Strings in ATS

2021-03-01 Thread d4v3y_5c0n3s
Thank you for the suggestions. I decided to sidestep my need to _ for now. While atscntrb-hx-libpcre seems like it would suit my needs, I'd rather not require people to install too many external libraries. Is ATS3 suitable for writing libraries for currently? Because if I were to implement

Finding Strings within Strings in ATS

2021-02-25 Thread d4v3y_5c0n3s
I was searching through the prelude looking for a way to find a formatted string within another string in ATS, but there doesn't seem to be a built-in way to do this. Before I make something myself, I just wanted to see what opinions there are on the best way to perform this operation in A

Re: A talk by Deech on ATS

2021-02-22 Thread d4v3y_5c0n3s
Actually, "A (not so) Gentle Introduction to Systems Programming in ATS" was what really sold me on ATS too. I wish I could thank him for making the talk, learning ATS has been an amazing experience. :D On Sunday, February 21, 2021 at 12:41:32 AM UTC-5 ice.r...@gmail.com wrote: > I would like

Re: Having Trouble Using Call-By-Reference

2021-01-22 Thread d4v3y_5c0n3s
gt; > BTW, (x: &int) means that the argument is read-only call-by-reference, but > it is not enforced in ATS2 > > Note that (&T >> _) is just a shorthand for (&T >> T). > > > > On Fri, Jan 22, 2021 at 8:24 AM d4v3y_5c0n3s wrote: > >> Thanks, t

Re: Having Trouble Using Call-By-Reference

2021-01-22 Thread d4v3y_5c0n3s
&int >> _ ) : void = i := i + 1 > > > fn test_chnge () : int = let > var i: int = 0 > > val () = chng_int_test(i) > in > i > end > On Fri, Jan 22, 2021 at 12:51 AM d4v3y_5c0n3s wrote: > >> I'm trying to use call by reference in the foll

Having Trouble Using Call-By-Reference

2021-01-21 Thread d4v3y_5c0n3s
I'm trying to use call by reference in the following example, but I'm running into issues trying to get it to compile. It's late, so I'll explain more tomorrow, but any help is appreciated. fn chng_int_test ( i: &int? >> _ ) : void = i + 1 fn test_chnge () : int = let var i = 0 val ()

Re: Is It Possible to Pass a Function Template as a Parameter?

2021-01-05 Thread d4v3y_5c0n3s
mhwxi wrote: > > Sorry, this is still a bit unclear to me. What does a typical instance of > map_test look like? > On Sunday, January 3, 2021 at 1:19:38 AM UTC-5 d4v3y_5c0n3s wrote: > >> Here's what I'm talking about: >> I know that I can currently c

Re: Is It Possible to Pass a Function Template as a Parameter?

2021-01-02 Thread d4v3y_5c0n3s
ndeed do this. I've already found a way to work around this via the use of local template instantiation, which may be the better way to handle things anyways. Please let me know if this example is insufficient. On Saturday, January 2, 2021 at 9:59:20 PM UTC-5 gmhwxi wrote: > Yes, I would

Is It Possible to Pass a Function Template as a Parameter?

2021-01-02 Thread d4v3y_5c0n3s
So, I know that it's possible to pass a function to another function as a parameter, but what if I want to pass a function template specifically? If anyone would like some clarification, I can try to provide some examples of what I'm trying to achieve. -- You received this message because yo

Re: How do I work around the limitations of the typechecker?

2020-12-23 Thread d4v3y_5c0n3s
num(0, 0))), size) > > > On Wed, Dec 23, 2020 at 2:26 PM d4v3y_5c0n3s wrote: > >> So, I'm trying to implement the following hash function: >> fn hash {n:int | n > 0} >> ( s: string(n), size: int(n) ) : [o:int | o >= 0; o < n] int o = let >> fu

How do I work around the limitations of the typechecker?

2020-12-23 Thread d4v3y_5c0n3s
So, I'm trying to implement the following hash function: fn hash {n:int | n > 0} ( s: string(n), size: int(n) ) : [o:int | o >= 0; o < n] int o = let fun hash_num {i:nat | i <= n} ( i: int i, h: int ) : int = if i < size then let val c_at_i = string_get_at_gint(s, i) in hash_num(i+1, h * 101 +

Re: Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread d4v3y_5c0n3s
in ATS3 to support > this kind of type-based meta-programming. > > On Tue, Dec 15, 2020 at 11:43 AM d4v3y_5c0n3s wrote: > >> Okay, so what you are saying is that in order for the code to compile, I >> will need to implement the template for the given type. That makes sens

Re: Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread d4v3y_5c0n3s
lls array_uninitize$clear to free all > the stored elements. > It is your obligation to implement the latter. > > > On Tue, Dec 15, 2020 at 9:54 AM d4v3y_5c0n3s wrote: > >> I just have a question about using arrayptr_freelin() (which frees an >> arrayptr that contains a v

Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread d4v3y_5c0n3s
I just have a question about using arrayptr_freelin() (which frees an arrayptr that contains a vt@ype.) I have an arrayptr which contains datavtypes, and these datavtypes act like a list in that they can contain a reference to another of the same datavtype. The typechecker lets me simply

Re: Current Status of ATS3 (2020-11-22)

2020-11-25 Thread d4v3y_5c0n3s
er :) > I will strive to structure the compiler in a way that should be easy for > others to contribute. > > On Monday, November 23, 2020 at 11:20:59 PM UTC-5 d4v3y_5c0n3s wrote: > >> Thanks for the update, Hongwei. It's really awesome to hear about the >> progress bein

Re: Current Status of ATS3 (2020-11-22)

2020-11-23 Thread d4v3y_5c0n3s
Thanks for the update, Hongwei. It's really awesome to hear about the progress being made on ATS3! I have a question I'd like to ask about ATS3's compilation. You mentioned that rather than compiling ATS code straight into a C file, that ATS3 first compiles it into XATSCML, and in the future

Re: Accessing the contents of a pointer(pointing to a linear type) within a record

2020-11-03 Thread d4v3y_5c0n3s
You're awesome! :) On Monday, November 2, 2020 at 11:23:07 PM UTC-5 d4v3y_5c0n3s wrote: > Thanks for the reply, I really appreciate the help. I'll try this > suggestion out tomorrow. One question though: if I use the t@ype sort, can > I still store a vt@ype within the point

Re: Accessing the contents of a pointer(pointing to a linear type) within a record

2020-11-02 Thread d4v3y_5c0n3s
р. о 20:40 d4v3y_5c0n3s пише: > > Hey, so, I'm trying to figure out how to make an accessor to a type that > I've created in a personal project. The type resembles the following: > > >- vtypedef pointer_in_rec = [a:vt@ype][l:addr] @{ pointer=(a @ l, >mf

Accessing the contents of a pointer(pointing to a linear type) within a record

2020-11-02 Thread d4v3y_5c0n3s
Hey, so, I'm trying to figure out how to make an accessor to a type that I've created in a personal project. The type resembles the following: - vtypedef pointer_in_rec = [a:vt@ype][l:addr] @{ pointer=(a @ l, mfree_gc_v(l) | ptr l) } What I'm trying to do, is create a function which take

Re: The current status of ATS3

2020-11-02 Thread d4v3y_5c0n3s
Thanks for the update! I've still got much to learn about ATS2, but ATS3 has got me very excited. I'll check out the Github page, perhaps I could help the project by doing some tests or the like. Please post if you could use some help on anything. On Sunday, November 1, 2020 at 9:42:19 AM UT

Re: Strange mismatch of equal terms

2020-10-12 Thread d4v3y_5c0n3s
The thread you linked me answered my problem perfectly. Thanks, you are awesome! On Monday, October 12, 2020 at 6:31:14 AM UTC-4 d4v3y_5c0n3s wrote: > Thanks Ice, I thought that something may have been posted about this, but > I wasn't sure what to search for. I'll check t

Re: Strange mismatch of equal terms

2020-10-12 Thread d4v3y_5c0n3s
tegory/forums/QgrcJHsBrnXTtpBcBJPBCfzSNNVXkQVSFQv >> >> пн, 12 окт. 2020 г. в 02:16, d4v3y_5c0n3s : >> >>> Here's my problem: >>> I'm encountering this weird error where the compiler is for some reason >>> telling me that I cannot produce an &

Strange mismatch of equal terms

2020-10-11 Thread d4v3y_5c0n3s
Here's my problem: I'm encountering this weird error where the compiler is for some reason telling me that I cannot produce an "asset_hndl" record type because it expects a "fpath" type and I gave an "fpath" type. I'm really baffled by this, any help is appreciated. Here's my code: assume asse

Re: How do I store a viewtype in an array and then access that value?

2020-09-29 Thread d4v3y_5c0n3s
t_loop((m.0)-1, m.1) end On Sunday, September 27, 2020 at 9:09:23 PM UTC-4 d4v3y_5c0n3s wrote: > Also, as a side note, I noticed that the "array_ptr_takeout()" function > calls the array_v_takeout() proof function, but why is there no > array_v_addback()? > > On Sunday,

Re: How do I store a viewtype in an array and then access that value?

2020-09-27 Thread d4v3y_5c0n3s
Also, as a side note, I noticed that the "array_ptr_takeout()" function calls the array_v_takeout() proof function, but why is there no array_v_addback()? On Sunday, September 27, 2020 at 5:13:32 PM UTC-4 d4v3y_5c0n3s wrote: > Ice, thank you for your suggestion, once I get t

Re: How do I store a viewtype in an array and then access that value?

2020-09-27 Thread d4v3y_5c0n3s
t 12:10:11 PM UTC-4 d4v3y_5c0n3s wrote: > Awesome! Thanks for all of these suggestions! I'll try them later on and > then post how it went. > > On Saturday, September 26, 2020 at 10:56:07 AM UTC-4 artyom.s...@gmail.com > wrote: > >> Hi d4v3y, >> >> I will make

Re: How do I store a viewtype in an array and then access that value?

2020-09-26 Thread d4v3y_5c0n3s
you only want to map an array (i.e. apply a function to each element), > then you probably don't want to hand-roll a loop. > > сб, 26 сент. 2020 г. в 16:54, d4v3y_5c0n3s : > >> So, I tried to call the prelude's array_ptr_takeout() function, but that >> only works

Re: How do I store a viewtype in an array and then access that value?

2020-09-26 Thread d4v3y_5c0n3s
the ".." part. Any help is appreciated, and thanks for the previous suggestion. On Friday, September 25, 2020 at 8:43:10 AM UTC-4 d4v3y_5c0n3s wrote: > Thanks for the help! Once I get the opportunity to test your suggestion > of using array_ptr_takeout, I'll post whether it

Re: How do I store a viewtype in an array and then access that value?

2020-09-25 Thread d4v3y_5c0n3s
Thanks for the help! Once I get the opportunity to test your suggestion of using array_ptr_takeout, I'll post whether it worked or not. On Friday, September 25, 2020 at 8:00:15 AM UTC-4 artyom.s...@gmail.com wrote: > пт, 25 сент. 2020 г. в 13:52, d4v3y_5c0n3s : > >> So, what

How do I store a viewtype in an array and then access that value?

2020-09-25 Thread d4v3y_5c0n3s
So, what I'm trying to do is create a type which resembles the following: absvt@ype model = [l:addr][n:nat] ( int n, arrayptr(mesh, l, n) ) Where "mesh" is also an absvt@ype. ATS lets me create this type fine, but I run into an issue when I try to index the array in the following code: impleme

Re: unsolved constraint for termetric being well-founded

2020-09-03 Thread d4v3y_5c0n3s
This worked! Thank you. :D On Thursday, September 3, 2020 at 4:27:00 PM UTC-4 gmhwxi wrote: > A termination metric is required to be non-negative. Try to change .. > into .. > > On Thu, Sep 3, 2020 at 2:57 PM d4v3y_5c0n3s wrote: > >> So, I've been encountering thi

Re: unsolved constraint for termetric being well-founded

2020-09-03 Thread d4v3y_5c0n3s
Okay, thanks. I'll try to rework the loop then. Thank you, you've been a big help. :) On Thursday, September 3, 2020 at 3:24:59 PM UTC-4 ice.r...@gmail.com wrote: > that i >= 0 * > > чт, 3 сент. 2020 г. в 19:24, Dambaev Alexander : > >> hi >> as far as I can see, the error message asks to prov

unsolved constraint for termetric being well-founded

2020-09-03 Thread d4v3y_5c0n3s
So, I've been encountering this "unsolved constraint for termetric being well-founded" error message, and I'm not sure how to fix it. Does this mean that I'm not being strict enough with types? Here's my code: absvt@ype mesh assume mesh = [v,t:nat] [vl,tl:addr] @{ v=int v, t=int t, vap=arra

Re: How to Free a Pointer to a viewt@ype

2020-09-03 Thread d4v3y_5c0n3s
; arrayptr_free(m1.tap); > ptr_free(mpff, mpf | m) > end > > > > On Wed, Sep 2, 2020 at 11:04 PM d4v3y_5c0n3s wrote: > >> So, I've got the following code: >> absvt@ype mesh >> >> assume mesh = >> [v,t:int] >> [vl,tl:addr] >

How to Free a Pointer to a viewt@ype

2020-09-02 Thread d4v3y_5c0n3s
So, I've got the following code: absvt@ype mesh assume mesh = [v,t:int] [vl,tl:addr] @{ v=int v, t=int t, vap=arrayptr(vertex, vl, v), tap=arrayptr(uint32, tl, t) } fun mesh_delete {l:addr} ( mpf: mesh @ l, mpff: mfree_gc_v(l) | m: ptr l ) : void = "sta#%" implement mesh_delete ( mpf, mpff |

Re: Initializing An Array Within a Record Allocated Within a Pointer

2020-09-01 Thread d4v3y_5c0n3s
It was really that simple? Well, your solution worked. Thanks, I was completely dumbfounded there. On Tuesday, September 1, 2020 at 6:05:54 PM UTC-4 gmhwxi wrote: > Please try: > > !res_ptr := (@{...} : mesh); > > > On Tue, Sep 1, 2020 at 4:57 PM d4v3y_5c0n3s wrote:

Initializing An Array Within a Record Allocated Within a Pointer

2020-09-01 Thread d4v3y_5c0n3s
Good evening, So, here's a snippet of code where I'm trying to create a record type that gets allocated within a pointer. Also, I am trying to allocate arrays within this record type. I've been stuck on this for too long, so I was looking for an outsider's perspective on how I might solve

Re: ATS Github repos Twitter bot

2020-08-20 Thread d4v3y_5c0n3s
That's pretty cool! I'm not really the Twitter type, but I like the idea of this project. :D On Wednesday, August 19, 2020 at 12:07:02 PM UTC-4 Timmy Jose wrote: > > Hello, > > I have created a new Twitter bot that queries Github for newly-created ATS > lang repos and tweets a brief summary ab

Re: Issue with conditionally mutating a var twice

2020-07-18 Thread d4v3y_5c0n3s
Thanks everyone, you were all extremely helpful! I appreciate the advice too, and I'll look into using your suggestions to improve the code. Again, thanks! :D On Thursday, July 16, 2020 at 8:12:39 AM UTC-4, d4v3y_5c0n3s wrote: > > So, I'm trying to mutate a var twice in or

Re: Issue with conditionally mutating a var twice

2020-07-17 Thread d4v3y_5c0n3s
t) of 0 /home/d4v3y/Goldelish-Engine/source/g_engine.dats: 35557(line=1375, offs=5) -- 35568(line=1375, offs=16): error(3): assignment cannot be performed: mismatch of bef/aft type-sizes: bef: [S2Eapp(S2Ecst(g1int_int_t0ype); S2Eextkind(atstype_int), S2Eintinf(0))] aft: [S2Eerrexp()] On Thu

Re: Issue with conditionally mutating a var twice

2020-07-16 Thread d4v3y_5c0n3s
Thanks everyone, I will be trying all of your suggestions and let you know whether they resolve my issue. :D On Thursday, July 16, 2020 at 8:12:39 AM UTC-4, d4v3y_5c0n3s wrote: > > So, I'm trying to mutate a var twice in order to replicate some C code > that I am trying to por

Issue with conditionally mutating a var twice

2020-07-16 Thread d4v3y_5c0n3s
So, I'm trying to mutate a var twice in order to replicate some C code that I am trying to port to ATS. But, I've been scratching my head as to why this would happen, so any help is appreciated. In an effort to not waste your time, I will be showing you the function with my issue along with

Re: Issues with SDL_mixer interface

2020-04-30 Thread d4v3y_5c0n3s
Thanks so much, this fixed the issue! On Wednesday, April 29, 2020 at 11:59:21 PM UTC-4, Chris Double wrote: > > On Thu, Apr 30, 2020 at 1:28 PM d4v3y_5c0n3s > wrote: > > > > Okay, so Mix_FadeInMusic() is still producing errors. I will update my > Github repo s

Re: Issues with SDL_mixer interface

2020-04-29 Thread d4v3y_5c0n3s
continue to investigate this issue. On Wednesday, April 29, 2020 at 8:39:26 PM UTC-4, d4v3y_5c0n3s wrote: > > Yea, so, the reason that the suggestion you had for Mix_GetError() wasn't > working for me was that in the function definition I put "... = > "mac#Mix_GetError&quo

Re: Issues with SDL_mixer interface

2020-04-29 Thread d4v3y_5c0n3s
"mac#%"", which caused it to work without a hitch. I will see if the same issue is partially behind the issue I am having with Mix_FadeInMusic(). On Wednesday, April 29, 2020 at 5:54:42 PM UTC-4, d4v3y_5c0n3s wrote: > > Actually, I think I've figured out (at least

Re: Issues with SDL_mixer interface

2020-04-29 Thread d4v3y_5c0n3s
Actually, I think I've figured out (at least partially) what's wrong with my code. I will post my results once I get the opportunity to test my theory out. On Wednesday, April 29, 2020 at 7:31:27 AM UTC-4, d4v3y_5c0n3s wrote: > > So, I made the changes which yo

Re: Issues with SDL_mixer interface

2020-04-29 Thread d4v3y_5c0n3s
hwxi/ATS-Postiats-contrib/blob/master/contrib/SDL2/SATS/SDL_error.sats > ) > > Here is my guess: > > Mx_GetError() returns a const string; but it is assigned to a variable > (tmp) which is not declared to be a const. > > I did the following: > > #define atscntrb_SDL2_SDL_GetError SDL_Get

Issues with SDL_mixer interface

2020-04-28 Thread d4v3y_5c0n3s
Ever since my previous question, I've been running into two issues with my SDL_mixer bindings. The first, is that I get a warning message whenever I use the function Mix_GetError() (the definition for this function may be found here: https://github.com/d4v3y5c0n3s/Goldelish-Engine/blob/ma

Re: Declarations of external values & functions from separate file showing up as "undeclared"

2020-04-20 Thread d4v3y_5c0n3s
he >> following form into a single SATS file called, say, >> SDL2_headers.sats: >> >> %{# >> ... >> %} >> >> Then just make sure that this file is staloaded in a file like >> g_audio.dats. >> >> By the way, you don'

Declarations of external values & functions from separate file showing up as "undeclared"

2020-04-19 Thread d4v3y_5c0n3s
For roughly a week now, I've been having this issue where PATSCC successfully typechecks my file, but when it tries to compile it to C an error is produced due to GCC not seeing the values/functions that I am using. These values and functions are declared in a separate file, which is stal

Re: "error(parsing): the keyword [:] is needed" message despite code appearing to be fine

2020-03-22 Thread d4v3y_5c0n3s
I think that was the issue. Thanks for the help! :) On Saturday, March 21, 2020 at 10:33:12 PM UTC-4, Richard wrote: > > > Looks like the issue is from a few lines before 171, unterminated string, > here: > > fn vec2_to_array {} ( v: vec2, out: ptr ) : void = "sta#% > -- You received this mess

Re: "error(parsing): the keyword [:] is needed" message despite code appearing to be fine

2020-03-21 Thread d4v3y_5c0n3s
Nice catch. I guess I've just been looking at the same code for too long. Unfortunately, fixing it doesn't resolve the problem. I'll update my code on Github with that fix, and get back to it tomorrow. By the way, thanks for the swift response! :D On Saturday, March 21, 2020 at 9:14:23 PM U

"error(parsing): the keyword [:] is needed" message despite code appearing to be fine

2020-03-21 Thread d4v3y_5c0n3s
So, I've been encountering this "keyword [:] is needed" error, and I can't figure out what the issue is. I've been compiling my code in with a Makefile, and I know that there are many issues the compiler would pick up on because much of the code is incomplete. Here are the first errors which

Re: "fopen: No such file or directory" Issue When Compiling a Simple Project

2019-12-01 Thread d4v3y_5c0n3s
leading ':' in the filename from? > > On Sun, Dec 1, 2019 at 10:40 AM d4v3y_5c0n3s > wrote: > >> Hello, so I've installed ATS and I am trying to compile a simple 'hello >> world' program. Here's what I enter into the terminal: >

Re: "fopen: No such file or directory" Issue When Compiling a Simple Project

2019-12-01 Thread d4v3y_5c0n3s
Let me check my path... I'll get back to you on this. Thanks. On Sunday, December 1, 2019 at 10:47:06 AM UTC-5, gmhwxi wrote: > > >> fopen(":/home/...") > > Where is leading ':' in the filename from? > > On Sun, Dec 1, 2019 at 10:40 AM d4v3y_5c0n3

"fopen: No such file or directory" Issue When Compiling a Simple Project

2019-12-01 Thread d4v3y_5c0n3s
Hello, so I've installed ATS and I am trying to compile a simple 'hello world' program. Here's what I enter into the terminal: *patscc -o test test.dats* It finds the file fine, but I keep getting this error: *fopen: No such file or directory exit(ATS): [fopen(":/home/d4v3y/ATS2-Postiats/prelud

Re: Problem in Makefile: Can't Find 'atsmake-post.mk' and Other Probelms

2019-11-17 Thread d4v3y_5c0n3s
Thank you for the fast reply. This is really helpful. :) -- 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 view

Problem in Makefile: Can't Find 'atsmake-post.mk' and Other Probelms

2019-11-16 Thread d4v3y_5c0n3s
First off, I would like to say that I am new to ATS, and have been beginning to learn it. I've really been enjoying it so far, and I decided to start a long-term project in order to help me get better at ATS. So, I found the Corange game engine (https://github.com/orangeduck/Corange) and