Skip to content

Commit

Permalink
Updating: very very minorly
Browse files Browse the repository at this point in the history
  • Loading branch information
githwxi committed Sep 14, 2024
1 parent ee05ffe commit a0452f2
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
55 changes: 53 additions & 2 deletions prelude/SATS/VT/list001_vt.sats
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ list_vt_nchoose0_lstrm$llist
(* ****** ****** *)
(* ****** ****** *)
//
(*
HX-2024-09-14:
Sat 14 Sep 2024 03:34:58 PM EDT
*)
//
fun
<x0:vt>
<y0:vt>
Expand All @@ -250,21 +255,67 @@ fun
list_vt_map0_f1un
{ln:nat}
(xs:
~list_vt(x0, ln), (~x0)->y0): list_vt(y0, ln)
~list_vt(x0, ln)
,fopr: ( ~x0 ) -> y0): list_vt(y0, ln)
fun
<x0:vt>
<y0:vt>
list_vt_map1_f1un
{ln:nat}
(xs:
!list_vt(x0, ln), (!x0)->y0): list_vt(y0, ln)
!list_vt(x0, ln)
,fopr: ( !x0 ) -> y0): list_vt(y0, ln)
//
#symload map0_fun with list_vt_map0_f1un of 1000
#symload map1_fun with list_vt_map1_f1un of 1000
//
(* ****** ****** *)
(* ****** ****** *)
//
(*
HX-2024-09-14:
Sat 14 Sep 2024 03:34:58 PM EDT
*)
//
fun
<x0:vt>
<y0:vt>
list_vt_maprev0
{ln:nat}
(xs: ~list_vt(x0, ln)): list_vt(y0, ln)
fun
<x0:vt>
<y0:vt>
list_vt_maprev1
{ln:nat}
(xs: !list_vt(x0, ln)): list_vt(y0, ln)
//
#symload maprev0 with list_vt_maprev0 of 1000
#symload maprev1 with list_vt_maprev1 of 1000
//
fun
<x0:vt>
<y0:vt>
list_vt_maprev0_f1un
{ln:nat}
(xs:
~list_vt(x0, ln)
,fopr: ( ~x0 ) -> y0): list_vt(y0, ln)
fun
<x0:vt>
<y0:vt>
list_vt_maprev1_f1un
{ln:nat}
(xs:
!list_vt(x0, ln)
,fopr: ( !x0 ) -> y0): list_vt(y0, ln)
//
#symload maprev0_fun with list_vt_maprev0_f1un of 1000
#symload maprev1_fun with list_vt_maprev1_f1un of 1000
//
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)

Expand Down
10 changes: 9 additions & 1 deletion prelude/TEST/CATS/JS/test09_llist00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@ For testing prelude/JS!
val ns =
list_vt_nfun
(10, lam(i) => i)
//
val ns =
map0_fun(ns, lam(i:sint)=>i*i)
val () = print0s("ns = ", ns, "\n")
//
(* ****** ****** *)
(* ****** ****** *)
//
val ns =
list_vt_nfun
(10, lam(i) => i)
val ns =
maprev0_fun(ns, lam(i:sint)=>i*i)
val () = print0s("ns = ", ns, "\n")
//
(* ****** ****** *)
Expand Down

4 comments on commit a0452f2

@sedererdj
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even while i still dont know the syntax, it seems that syntax is <> {} () -heavy, which i really like.

i am currently learning OCaml, syntax is fine but it has a little 'implicit-ness' going on with it, specially compared to C-like languages, i glanced at ReasonML and syntax looked a bit more explicit (as in more {}'s)

is ATS3 syntax in same direction to ML that ReasonML is to ocaml?

@githwxi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ATS3 syntax extends that of ML with additional support for type annotations.
Types in ATS3 are not just for catching programming errors at compile-time; they
are heavily used for the purpose of auto-generation of code.

It is certainly possible (and probably desired) in the future to have other languages
built on top of ATS3 (like ReasonML built on top of OCaml). I personally like to build
something based on Python's syntax :)

@sedererdj
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?!!
ReasonML uses OCaml as it's codegen, so a programming langue that is built atop ATS3 will use
ATS3 as codegen, ie meta-transpiler, is it true?

what paradigm do you want this language to be?
any top-level set of ideas or design goals you have in mind?

@githwxi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will also be ATS3 extension using ATS3 as codegen.

The essential design goal is something like Python productivity + C++ performance
together with a level of security that ATS2 has already achieved.

Please sign in to comment.