test¶

include scripts¶

include notebook core¶

In [ ]:
. ../../../../scripts/nbs_header.ps1

Include core functions script¶

In [ ]:
. ../../../../scripts/core.ps1

Include spiral library¶

In [ ]:
. ../../../../deps/spiral/lib/spiral/lib.ps1

execute project commands¶

run notebook with retries using spiral supervisor¶

In [ ]:
{ . ../../../../deps/spiral/workspace/target/release/spiral$(_exe) dib --path test.dib --retries 3 } | Invoke-Block
00:00:00 d #1 spiral.main / { args = Array(MutCell(["dib", "--path", "test.dib", "--retries", "3"])) }
00:00:00 d #2 runtime.execute_with_options / { file_name = dotnet; arguments = ["repl", "--exit-after-run", "--run", "/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib", "--output-path", "/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.ipynb"]; options = { command = dotnet repl --exit-after-run --run "/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib" --output-path "/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None; stderr = true } }
> 
> ── markdown ────────────────────────────────────────────────────────────────────
> │ # test (Polyglot)
> 
> ── spiral ──────────────────────────────────────────────────────────────────────
> //// test
> 
> open testing
> 
> ── spiral ──────────────────────────────────────────────────────────────────────
> //// test
> //// print_code
> 
> inl jp = [[ "J"; "P" ]]
> inl tf = [[ "T"; "F" ]]
> inl sn = [[ "S"; "N" ]]
> inl ie = [[ "I"; "E" ]]
> 
> (ie, ([[]] : _ string))
> ||> listm.foldBack fun ie' acc =>
>     inl ssnn acc' jp' =
>         (sn, acc')
>         ||> listm.foldBack fun sn' acc' =>
>             inl c' ie' sn' tf' jp' =
>                 $'$"{!ie'}{!sn'}{!tf'}{!jp'}"'
> 
>             if listm.length acc' % 4i32 = 2 then
>                 (tf, acc')
>                 ||> listm.foldBack fun tf' acc'' =>
>                     c' ie' sn' tf' jp' :: acc''
>             else
>                 (acc', tf)
>                 ||> listm.fold fun acc'' tf' =>
>                     c' ie' sn' tf' jp' :: acc''
>     if acc = [[]] then
>         (acc, jp)
>         ||> listm.fold fun acc' jp' =>
>             ssnn acc' jp'
>     else
>         (jp, acc)
>         ||> listm.foldBack fun jp' acc' =>
>             ssnn acc' jp'
> |> listm'.box
> |> listm'.to_array'
> |> _assert_eq' ;[[
>     "ISTJ"; "ISFJ"; "INFJ"; "INTJ"
>     "ISTP"; "ISFP"; "INFP"; "INTP"
>     "ESTP"; "ESFP"; "ENFP"; "ENTP"
>     "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"
> ]]
> 
> ── [ 1.16s - stdout ] ──────────────────────────────────────────────────────────
> │ type Mut0 = {mutable l0 : string}
> │ let rec method1 (v0 : bool) : bool =
> │     v0
> │ and method3 () : string =
> │     let v0 : string = ""
> │     v0
> │ and closure0 (v0 : Mut0, v1 : string) () : unit =
> │     let v2 : string = v0.l0
> │     let v4 : string = v2 + v1 
> │     v0.l0 <- v4
> │     ()
> │ and method2 (v0 : string, v1 : (string []), v2 : (string []))
> : string =
> │     let v3 : string = method3()
> │     let v4 : Mut0 = {l0 = v3} : Mut0
> │     let v7 : string = "{ "
> │     let v8 : string = $"{v7}"
> │     let v16 : unit = ()
> │     let v17 : (unit -> unit) = closure0(v4, v8)
> │     let v18 : unit = (fun () -> v17 (); v16) ()
> │     let v26 : string = "name"
> │     let v27 : string = $"{v26}"
> │     let v35 : unit = ()
> │     let v36 : (unit -> unit) = closure0(v4, v27)
> │     let v37 : unit = (fun () -> v36 (); v35) ()
> │     let v45 : string = " = "
> │     let v46 : string = $"{v45}"
> │     let v54 : unit = ()
> │     let v55 : (unit -> unit) = closure0(v4, v46)
> │     let v56 : unit = (fun () -> v55 (); v54) ()
> │     let v63 : string = $"{v0}"
> │     let v71 : unit = ()
> │     let v72 : (unit -> unit) = closure0(v4, v63)
> │     let v73 : unit = (fun () -> v72 (); v71) ()
> │     let v81 : string = "; "
> │     let v82 : string = $"{v81}"
> │     let v90 : unit = ()
> │     let v91 : (unit -> unit) = closure0(v4, v82)
> │     let v92 : unit = (fun () -> v91 (); v90) ()
> │     let v100 : string = "actual"
> │     let v101 : string = $"{v100}"
> │     let v109 : unit = ()
> │     let v110 : (unit -> unit) = closure0(v4, v101)
> │     let v111 : unit = (fun () -> v110 (); v109) ()
> │     let v118 : string = $"{v45}"
> │     let v126 : unit = ()
> │     let v127 : (unit -> unit) = closure0(v4, v118)
> │     let v128 : unit = (fun () -> v127 (); v126) ()
> │     let v136 : string = $"%A{v1}"
> │     let v140 : string = $"{v136}"
> │     let v148 : unit = ()
> │     let v149 : (unit -> unit) = closure0(v4, v140)
> │     let v150 : unit = (fun () -> v149 (); v148) ()
> │     let v157 : string = $"{v81}"
> │     let v165 : unit = ()
> │     let v166 : (unit -> unit) = closure0(v4, v157)
> │     let v167 : unit = (fun () -> v166 (); v165) ()
> │     let v175 : string = "expected"
> │     let v176 : string = $"{v175}"
> │     let v184 : unit = ()
> │     let v185 : (unit -> unit) = closure0(v4, v176)
> │     let v186 : unit = (fun () -> v185 (); v184) ()
> │     let v193 : string = $"{v45}"
> │     let v201 : unit = ()
> │     let v202 : (unit -> unit) = closure0(v4, v193)
> │     let v203 : unit = (fun () -> v202 (); v201) ()
> │     let v211 : string = $"%A{v2}"
> │     let v215 : string = $"{v211}"
> │     let v223 : unit = ()
> │     let v224 : (unit -> unit) = closure0(v4, v215)
> │     let v225 : unit = (fun () -> v224 (); v223) ()
> │     let v233 : string = " }"
> │     let v234 : string = $"{v233}"
> │     let v242 : unit = ()
> │     let v243 : (unit -> unit) = closure0(v4, v234)
> │     let v244 : unit = (fun () -> v243 (); v242) ()
> │     let v250 : string = v4.l0
> │     v250
> │ and closure1 (v0 : string) () : unit =
> │     let v1 : (string -> unit) = System.Console.WriteLine
> │     v1 v0
> │ and method0 () : unit =
> │     let v0 : string = "E"
> │     let v1 : string = "N"
> │     let v2 : string = "T"
> │     let v3 : string = "J"
> │     let v4 : string = $"{v0}{v1}{v2}{v3}"
> │     let v5 : string = "F"
> │     let v6 : string = $"{v0}{v1}{v5}{v3}"
> │     let v7 : string = "S"
> │     let v8 : string = $"{v0}{v7}{v5}{v3}"
> │     let v9 : string = $"{v0}{v7}{v2}{v3}"
> │     let v10 : string = "P"
> │     let v11 : string = $"{v0}{v1}{v2}{v10}"
> │     let v12 : string = $"{v0}{v1}{v5}{v10}"
> │     let v13 : string = $"{v0}{v7}{v5}{v10}"
> │     let v14 : string = $"{v0}{v7}{v2}{v10}"
> │     let v15 : string = "I"
> │     let v16 : string = $"{v15}{v1}{v2}{v10}"
> │     let v17 : string = $"{v15}{v1}{v5}{v10}"
> │     let v18 : string = $"{v15}{v7}{v5}{v10}"
> │     let v19 : string = $"{v15}{v7}{v2}{v10}"
> │     let v20 : string = $"{v15}{v1}{v2}{v3}"
> │     let v21 : string = $"{v15}{v1}{v5}{v3}"
> │     let v22 : string = $"{v15}{v7}{v5}{v3}"
> │     let v23 : string = $"{v15}{v7}{v2}{v3}"
> │     let v24 : string list = []
> │     let v26 : string list = v4 :: v24 
> │     let v30 : string list = v6 :: v26 
> │     let v34 : string list = v8 :: v30 
> │     let v38 : string list = v9 :: v34 
> │     let v42 : string list = v11 :: v38 
> │     let v46 : string list = v12 :: v42 
> │     let v50 : string list = v13 :: v46 
> │     let v54 : string list = v14 :: v50 
> │     let v58 : string list = v16 :: v54 
> │     let v62 : string list = v17 :: v58 
> │     let v66 : string list = v18 :: v62 
> │     let v70 : string list = v19 :: v66 
> │     let v74 : string list = v20 :: v70 
> │     let v78 : string list = v21 :: v74 
> │     let v82 : string list = v22 :: v78 
> │     let v86 : string list = v23 :: v82 
> │     let v93 : (string list -> (string [])) = List.toArray
> │     let v94 : (string []) = v93 v86
> │     let v97 : string = "ISTJ"
> │     let v98 : string = "ISFJ"
> │     let v99 : string = "INFJ"
> │     let v100 : string = "INTJ"
> │     let v101 : string = "ISTP"
> │     let v102 : string = "ISFP"
> │     let v103 : string = "INFP"
> │     let v104 : string = "INTP"
> │     let v105 : string = "ESTP"
> │     let v106 : string = "ESFP"
> │     let v107 : string = "ENFP"
> │     let v108 : string = "ENTP"
> │     let v109 : string = "ESTJ"
> │     let v110 : string = "ESFJ"
> │     let v111 : string = "ENFJ"
> │     let v112 : string = "ENTJ"
> │     let v113 : (string []) = [|v97; v98; v99; v100; v101; 
> v102; v103; v104; v105; v106; v107; v108; v109; v110; v111; v112|]
> │     let v115 : bool = v94 = v113 
> │     let v119 : bool =
> │         if v115 then
> │             true
> │         else
> │             method1(v115)
> │     let v120 : string = "__assert_eq'"
> │     let v121 : string = method2(v120, v94, v113)
> │     let v123 : unit = ()
> │     let v124 : (unit -> unit) = closure1(v121)
> │     let v125 : unit = (fun () -> v124 (); v123) ()
> │     let v127 : bool = v119 = false
> │     if v127 then
> │         failwith<unit> v121
> │ method0()
> │ 
> │ { name = __assert_eq'; actual = [|"ISTJ"; "ISFJ"; "INFJ"; 
> "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; "ESFP";
> │   "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|]; expected 
> = [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; 
> "ESFP";
> │   "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] }
> │ 
> 
> ── spiral ──────────────────────────────────────────────────────────────────────
> //// test
> //// print_code
> 
> inl i_e =
>     listm'.replicate 8i32 "I" ++ listm'.replicate 8i32 "E"
> inl s_n =
>     [[ "S"; "S"; "N"; "N" ]]
>     |> listm'.replicate 4i32
>     |> listm'.collect id
> inl t_f =
>     [[ "T"; "F"; "F"; "T" ]]
>     |> listm'.replicate 4i32
>     |> listm'.collect id
> inl j_p =
>     [[ "J"; "J"; "J"; "J" ]]
>     ++ [[ "P"; "P"; "P"; "P" ]]
>     ++ [[ "P"; "P"; "P"; "P" ]]
>     ++ [[ "J"; "J"; "J"; "J" ]]
> inl mbti =
>     listm'.map4 (fun a b c d => $'$"{!a}{!b}{!c}{!d}"') i_e s_n t_f j_p
> 
> mbti
> |> listm'.box
> |> listm'.to_array'
> |> _assert_eq' ;[[
>     "ISTJ"; "ISFJ"; "INFJ"; "INTJ"
>     "ISTP"; "ISFP"; "INFP"; "INTP"
>     "ESTP"; "ESFP"; "ENFP"; "ENTP"
>     "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"
> ]]
> 
> ── [ 361.97ms - stdout ] ───────────────────────────────────────────────────────
> │ type Mut0 = {mutable l0 : string}
> │ let rec method1 (v0 : bool) : bool =
> │     v0
> │ and method3 () : string =
> │     let v0 : string = ""
> │     v0
> │ and closure0 (v0 : Mut0, v1 : string) () : unit =
> │     let v2 : string = v0.l0
> │     let v4 : string = v2 + v1 
> │     v0.l0 <- v4
> │     ()
> │ and method2 (v0 : string, v1 : (string []), v2 : (string []))
> : string =
> │     let v3 : string = method3()
> │     let v4 : Mut0 = {l0 = v3} : Mut0
> │     let v7 : string = "{ "
> │     let v8 : string = $"{v7}"
> │     let v16 : unit = ()
> │     let v17 : (unit -> unit) = closure0(v4, v8)
> │     let v18 : unit = (fun () -> v17 (); v16) ()
> │     let v26 : string = "name"
> │     let v27 : string = $"{v26}"
> │     let v35 : unit = ()
> │     let v36 : (unit -> unit) = closure0(v4, v27)
> │     let v37 : unit = (fun () -> v36 (); v35) ()
> │     let v45 : string = " = "
> │     let v46 : string = $"{v45}"
> │     let v54 : unit = ()
> │     let v55 : (unit -> unit) = closure0(v4, v46)
> │     let v56 : unit = (fun () -> v55 (); v54) ()
> │     let v63 : string = $"{v0}"
> │     let v71 : unit = ()
> │     let v72 : (unit -> unit) = closure0(v4, v63)
> │     let v73 : unit = (fun () -> v72 (); v71) ()
> │     let v81 : string = "; "
> │     let v82 : string = $"{v81}"
> │     let v90 : unit = ()
> │     let v91 : (unit -> unit) = closure0(v4, v82)
> │     let v92 : unit = (fun () -> v91 (); v90) ()
> │     let v100 : string = "actual"
> │     let v101 : string = $"{v100}"
> │     let v109 : unit = ()
> │     let v110 : (unit -> unit) = closure0(v4, v101)
> │     let v111 : unit = (fun () -> v110 (); v109) ()
> │     let v118 : string = $"{v45}"
> │     let v126 : unit = ()
> │     let v127 : (unit -> unit) = closure0(v4, v118)
> │     let v128 : unit = (fun () -> v127 (); v126) ()
> │     let v136 : string = $"%A{v1}"
> │     let v140 : string = $"{v136}"
> │     let v148 : unit = ()
> │     let v149 : (unit -> unit) = closure0(v4, v140)
> │     let v150 : unit = (fun () -> v149 (); v148) ()
> │     let v157 : string = $"{v81}"
> │     let v165 : unit = ()
> │     let v166 : (unit -> unit) = closure0(v4, v157)
> │     let v167 : unit = (fun () -> v166 (); v165) ()
> │     let v175 : string = "expected"
> │     let v176 : string = $"{v175}"
> │     let v184 : unit = ()
> │     let v185 : (unit -> unit) = closure0(v4, v176)
> │     let v186 : unit = (fun () -> v185 (); v184) ()
> │     let v193 : string = $"{v45}"
> │     let v201 : unit = ()
> │     let v202 : (unit -> unit) = closure0(v4, v193)
> │     let v203 : unit = (fun () -> v202 (); v201) ()
> │     let v211 : string = $"%A{v2}"
> │     let v215 : string = $"{v211}"
> │     let v223 : unit = ()
> │     let v224 : (unit -> unit) = closure0(v4, v215)
> │     let v225 : unit = (fun () -> v224 (); v223) ()
> │     let v233 : string = " }"
> │     let v234 : string = $"{v233}"
> │     let v242 : unit = ()
> │     let v243 : (unit -> unit) = closure0(v4, v234)
> │     let v244 : unit = (fun () -> v243 (); v242) ()
> │     let v250 : string = v4.l0
> │     v250
> │ and closure1 (v0 : string) () : unit =
> │     let v1 : (string -> unit) = System.Console.WriteLine
> │     v1 v0
> │ and method0 () : unit =
> │     let v0 : string = "I"
> │     let v1 : string = "S"
> │     let v2 : string = "T"
> │     let v3 : string = "J"
> │     let v4 : string = $"{v0}{v1}{v2}{v3}"
> │     let v5 : string = "F"
> │     let v6 : string = $"{v0}{v1}{v5}{v3}"
> │     let v7 : string = "N"
> │     let v8 : string = $"{v0}{v7}{v5}{v3}"
> │     let v9 : string = $"{v0}{v7}{v2}{v3}"
> │     let v10 : string = "P"
> │     let v11 : string = $"{v0}{v1}{v2}{v10}"
> │     let v12 : string = $"{v0}{v1}{v5}{v10}"
> │     let v13 : string = $"{v0}{v7}{v5}{v10}"
> │     let v14 : string = $"{v0}{v7}{v2}{v10}"
> │     let v15 : string = "E"
> │     let v16 : string = $"{v15}{v1}{v2}{v10}"
> │     let v17 : string = $"{v15}{v1}{v5}{v10}"
> │     let v18 : string = $"{v15}{v7}{v5}{v10}"
> │     let v19 : string = $"{v15}{v7}{v2}{v10}"
> │     let v20 : string = $"{v15}{v1}{v2}{v3}"
> │     let v21 : string = $"{v15}{v1}{v5}{v3}"
> │     let v22 : string = $"{v15}{v7}{v5}{v3}"
> │     let v23 : string = $"{v15}{v7}{v2}{v3}"
> │     let v24 : string list = []
> │     let v26 : string list = v23 :: v24 
> │     let v30 : string list = v22 :: v26 
> │     let v34 : string list = v21 :: v30 
> │     let v38 : string list = v20 :: v34 
> │     let v42 : string list = v19 :: v38 
> │     let v46 : string list = v18 :: v42 
> │     let v50 : string list = v17 :: v46 
> │     let v54 : string list = v16 :: v50 
> │     let v58 : string list = v14 :: v54 
> │     let v62 : string list = v13 :: v58 
> │     let v66 : string list = v12 :: v62 
> │     let v70 : string list = v11 :: v66 
> │     let v74 : string list = v9 :: v70 
> │     let v78 : string list = v8 :: v74 
> │     let v82 : string list = v6 :: v78 
> │     let v86 : string list = v4 :: v82 
> │     let v93 : (string list -> (string [])) = List.toArray
> │     let v94 : (string []) = v93 v86
> │     let v97 : string = "ISTJ"
> │     let v98 : string = "ISFJ"
> │     let v99 : string = "INFJ"
> │     let v100 : string = "INTJ"
> │     let v101 : string = "ISTP"
> │     let v102 : string = "ISFP"
> │     let v103 : string = "INFP"
> │     let v104 : string = "INTP"
> │     let v105 : string = "ESTP"
> │     let v106 : string = "ESFP"
> │     let v107 : string = "ENFP"
> │     let v108 : string = "ENTP"
> │     let v109 : string = "ESTJ"
> │     let v110 : string = "ESFJ"
> │     let v111 : string = "ENFJ"
> │     let v112 : string = "ENTJ"
> │     let v113 : (string []) = [|v97; v98; v99; v100; v101; 
> v102; v103; v104; v105; v106; v107; v108; v109; v110; v111; v112|]
> │     let v115 : bool = v94 = v113 
> │     let v119 : bool =
> │         if v115 then
> │             true
> │         else
> │             method1(v115)
> │     let v120 : string = "__assert_eq'"
> │     let v121 : string = method2(v120, v94, v113)
> │     let v123 : unit = ()
> │     let v124 : (unit -> unit) = closure1(v121)
> │     let v125 : unit = (fun () -> v124 (); v123) ()
> │     let v127 : bool = v119 = false
> │     if v127 then
> │         failwith<unit> v121
> │ method0()
> │ 
> │ { name = __assert_eq'; actual = [|"ISTJ"; "ISFJ"; "INFJ"; 
> "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; "ESFP";
> │   "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|]; expected 
> = [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; 
> "ESFP";
> │   "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] }
> │ 
> 
> ── spiral ──────────────────────────────────────────────────────────────────────
> //// test
> //// print_code
> 
> fun i =>
>     inl i_e =
>         if i < 8
>         then "I"
>         else "E"
>     inl s_n = 
>         inl group = (i / 2) % 2
>         if group = 0
>         then "S"
>         else "N"
>     inl t_f =
>         match i % 4 with
>         | 0 => "T"
>         | 1 => "F"
>         | 2 => "F"
>         | _ => "T"
>     inl j_p =
>         if i < 4
>         then "J"
>         elif i < 12
>         then "P"
>         else "J"
>     $'$"{!i_e}{!s_n}{!t_f}{!j_p}"'
> |> listm.init 16i32
> |> listm'.box
> |> listm'.to_array'
> |> _assert_eq' ;[[
>     "ISTJ"; "ISFJ"; "INFJ"; "INTJ"
>     "ISTP"; "ISFP"; "INFP"; "INTP"
>     "ESTP"; "ESFP"; "ENFP"; "ENTP"
>     "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"
> ]]
> 
> ── [ 385.35ms - stdout ] ───────────────────────────────────────────────────────
> │ type Mut0 = {mutable l0 : string}
> │ let rec method1 (v0 : bool) : bool =
> │     v0
> │ and method3 () : string =
> │     let v0 : string = ""
> │     v0
> │ and closure0 (v0 : Mut0, v1 : string) () : unit =
> │     let v2 : string = v0.l0
> │     let v4 : string = v2 + v1 
> │     v0.l0 <- v4
> │     ()
> │ and method2 (v0 : string, v1 : (string []), v2 : (string []))
> : string =
> │     let v3 : string = method3()
> │     let v4 : Mut0 = {l0 = v3} : Mut0
> │     let v7 : string = "{ "
> │     let v8 : string = $"{v7}"
> │     let v16 : unit = ()
> │     let v17 : (unit -> unit) = closure0(v4, v8)
> │     let v18 : unit = (fun () -> v17 (); v16) ()
> │     let v26 : string = "name"
> │     let v27 : string = $"{v26}"
> │     let v35 : unit = ()
> │     let v36 : (unit -> unit) = closure0(v4, v27)
> │     let v37 : unit = (fun () -> v36 (); v35) ()
> │     let v45 : string = " = "
> │     let v46 : string = $"{v45}"
> │     let v54 : unit = ()
> │     let v55 : (unit -> unit) = closure0(v4, v46)
> │     let v56 : unit = (fun () -> v55 (); v54) ()
> │     let v63 : string = $"{v0}"
> │     let v71 : unit = ()
> │     let v72 : (unit -> unit) = closure0(v4, v63)
> │     let v73 : unit = (fun () -> v72 (); v71) ()
> │     let v81 : string = "; "
> │     let v82 : string = $"{v81}"
> │     let v90 : unit = ()
> │     let v91 : (unit -> unit) = closure0(v4, v82)
> │     let v92 : unit = (fun () -> v91 (); v90) ()
> │     let v100 : string = "actual"
> │     let v101 : string = $"{v100}"
> │     let v109 : unit = ()
> │     let v110 : (unit -> unit) = closure0(v4, v101)
> │     let v111 : unit = (fun () -> v110 (); v109) ()
> │     let v118 : string = $"{v45}"
> │     let v126 : unit = ()
> │     let v127 : (unit -> unit) = closure0(v4, v118)
> │     let v128 : unit = (fun () -> v127 (); v126) ()
> │     let v136 : string = $"%A{v1}"
> │     let v140 : string = $"{v136}"
> │     let v148 : unit = ()
> │     let v149 : (unit -> unit) = closure0(v4, v140)
> │     let v150 : unit = (fun () -> v149 (); v148) ()
> │     let v157 : string = $"{v81}"
> │     let v165 : unit = ()
> │     let v166 : (unit -> unit) = closure0(v4, v157)
> │     let v167 : unit = (fun () -> v166 (); v165) ()
> │     let v175 : string = "expected"
> │     let v176 : string = $"{v175}"
> │     let v184 : unit = ()
> │     let v185 : (unit -> unit) = closure0(v4, v176)
> │     let v186 : unit = (fun () -> v185 (); v184) ()
> │     let v193 : string = $"{v45}"
> │     let v201 : unit = ()
> │     let v202 : (unit -> unit) = closure0(v4, v193)
> │     let v203 : unit = (fun () -> v202 (); v201) ()
> │     let v211 : string = $"%A{v2}"
> │     let v215 : string = $"{v211}"
> │     let v223 : unit = ()
> │     let v224 : (unit -> unit) = closure0(v4, v215)
> │     let v225 : unit = (fun () -> v224 (); v223) ()
> │     let v233 : string = " }"
> │     let v234 : string = $"{v233}"
> │     let v242 : unit = ()
> │     let v243 : (unit -> unit) = closure0(v4, v234)
> │     let v244 : unit = (fun () -> v243 (); v242) ()
> │     let v250 : string = v4.l0
> │     v250
> │ and closure1 (v0 : string) () : unit =
> │     let v1 : (string -> unit) = System.Console.WriteLine
> │     v1 v0
> │ and method0 () : unit =
> │     let v0 : string = "I"
> │     let v1 : string = "S"
> │     let v2 : string = "T"
> │     let v3 : string = "J"
> │     let v4 : string = $"{v0}{v1}{v2}{v3}"
> │     let v5 : string = "F"
> │     let v6 : string = $"{v0}{v1}{v5}{v3}"
> │     let v7 : string = "N"
> │     let v8 : string = $"{v0}{v7}{v5}{v3}"
> │     let v9 : string = $"{v0}{v7}{v2}{v3}"
> │     let v10 : string = "P"
> │     let v11 : string = $"{v0}{v1}{v2}{v10}"
> │     let v12 : string = $"{v0}{v1}{v5}{v10}"
> │     let v13 : string = $"{v0}{v7}{v5}{v10}"
> │     let v14 : string = $"{v0}{v7}{v2}{v10}"
> │     let v15 : string = "E"
> │     let v16 : string = $"{v15}{v1}{v2}{v10}"
> │     let v17 : string = $"{v15}{v1}{v5}{v10}"
> │     let v18 : string = $"{v15}{v7}{v5}{v10}"
> │     let v19 : string = $"{v15}{v7}{v2}{v10}"
> │     let v20 : string = $"{v15}{v1}{v2}{v3}"
> │     let v21 : string = $"{v15}{v1}{v5}{v3}"
> │     let v22 : string = $"{v15}{v7}{v5}{v3}"
> │     let v23 : string = $"{v15}{v7}{v2}{v3}"
> │     let v24 : string list = []
> │     let v26 : string list = v23 :: v24 
> │     let v30 : string list = v22 :: v26 
> │     let v34 : string list = v21 :: v30 
> │     let v38 : string list = v20 :: v34 
> │     let v42 : string list = v19 :: v38 
> │     let v46 : string list = v18 :: v42 
> │     let v50 : string list = v17 :: v46 
> │     let v54 : string list = v16 :: v50 
> │     let v58 : string list = v14 :: v54 
> │     let v62 : string list = v13 :: v58 
> │     let v66 : string list = v12 :: v62 
> │     let v70 : string list = v11 :: v66 
> │     let v74 : string list = v9 :: v70 
> │     let v78 : string list = v8 :: v74 
> │     let v82 : string list = v6 :: v78 
> │     let v86 : string list = v4 :: v82 
> │     let v93 : (string list -> (string [])) = List.toArray
> │     let v94 : (string []) = v93 v86
> │     let v97 : string = "ISTJ"
> │     let v98 : string = "ISFJ"
> │     let v99 : string = "INFJ"
> │     let v100 : string = "INTJ"
> │     let v101 : string = "ISTP"
> │     let v102 : string = "ISFP"
> │     let v103 : string = "INFP"
> │     let v104 : string = "INTP"
> │     let v105 : string = "ESTP"
> │     let v106 : string = "ESFP"
> │     let v107 : string = "ENFP"
> │     let v108 : string = "ENTP"
> │     let v109 : string = "ESTJ"
> │     let v110 : string = "ESFJ"
> │     let v111 : string = "ENFJ"
> │     let v112 : string = "ENTJ"
> │     let v113 : (string []) = [|v97; v98; v99; v100; v101; 
> v102; v103; v104; v105; v106; v107; v108; v109; v110; v111; v112|]
> │     let v115 : bool = v94 = v113 
> │     let v119 : bool =
> │         if v115 then
> │             true
> │         else
> │             method1(v115)
> │     let v120 : string = "__assert_eq'"
> │     let v121 : string = method2(v120, v94, v113)
> │     let v123 : unit = ()
> │     let v124 : (unit -> unit) = closure1(v121)
> │     let v125 : unit = (fun () -> v124 (); v123) ()
> │     let v127 : bool = v119 = false
> │     if v127 then
> │         failwith<unit> v121
> │ method0()
> │ 
> │ { name = __assert_eq'; actual = [|"ISTJ"; "ISFJ"; "INFJ"; 
> "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; "ESFP";
> │   "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|]; expected 
> = [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; 
> "ESFP";
> │   "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] }
> │ 
> 
> ── fsharp ──────────────────────────────────────────────────────────────────────
> type PhonologicalFeature =
>     | VowelFeature of
>         height: Height
>         * backness: Backness
>         * roundedness: Roundedness
>         * tone: Option<Tone>
>         * stress: Option<Stress>
>         * length: Option<Length>
>     | ConsonantFeature of
>         place: PlaceOfArticulation
>         * manner: MannerOfArticulation
>         * voicing: Voicing
>         * length: Option<Length>
>     | VowelHarmonyFeature
>     | PitchAccentFeature
> 
> and Stress = Primary | Secondary
> and Length = Long | Short | HalfLong
> 
> and Height =
>     | High | NearHigh | HighMid
>     | Mid | LowMid | NearLow
>     | Low
> 
> and Backness = Front | Central | Back
> 
> and Roundedness = Rounded | Unrounded
> 
> and PlaceOfArticulation =
>     | Bilabial | Labiodental | Dental
>     | Alveolar | Postalveolar | Retroflex
>     | Palatal | Velar | Uvular
>     | Pharyngeal | Epiglottal | Glottal
> 
> and MannerOfArticulation =
>     | Plosive | Nasal | Trill
>     | TapOrFlap | Fricative | LateralFricative
>     | Approximant | LateralApproximant
> 
> and Voicing = Voiced | Voiceless
> 
> and SecondaryArticulation =
>     | Labialization | Palatalization | Velarization
>     | Pharyngealization | Aspiration
> 
> and Tone =
>     | LevelTone of int
>     | ContourTone of int list
> 
> and MorphologicalFeature =
>     | RootFeature of string
>     | AffixFeature of AffixType * string
>     | IncorporationFeature of string * MorphologicalFeature
>     | NonConcatenativePattern of string * string
>     | AgglutinativeAffixFeature of AgglutinativeAffixType * string
>     | HonorificFeature of HonorificType * string
> 
> and AgglutinativeAffixType = Suffix | Prefix
> 
> and HonorificType = VerbHonorific | NounHonorific
> 
> and AffixType =
>     | Prefix | Suffix | Infix
>     | Circumfix
> 
> type SyntacticFeature =
>     | WordFeature of MorphologicalFeature list * LexicalCategory
>     | PhraseFeature of PhraseType * SyntacticFeature list
>     | GrammaticalRelation of GrammaticalRelationType * SyntacticFeature list
>     | SOVOrderFeature
>     | TopicCommentFeature
> 
> and GrammaticalRelationType =
>     | Ergative | Absolutive | Nominative
>     | Accusative
> 
> and LexicalCategory =
>     | Noun | Verb | Adjective
>     | Adverb | Pronoun | Preposition
>     | Conjunction | Determiner | Interjection
> 
> and PhraseType =
>     | NP | VP | AP
>     | PP | CP
> 
> and SemanticFeature =
>     | Meaning of string
>     | SemanticRole of SemanticRoleType * SemanticFeature
> 
> and SemanticRoleType =
>     | Agent | Patient | Instrument
>     | Location | Time | Cause
> 
> and PragmaticFeature =
>     | UseContext of string
>     | PolitenessLevel of Politeness
>     | SpeechAct of SpeechActType
>     | SpeechLevel of SpeechLevelType
> 
> and Politeness = Formal | Informal | Neutral
> 
> and SpeechActType =
>     | Assertive | Directive | Commissive
>     | Expressive | Declarative
> 
> and SpeechLevelType =
>     | FormalHigh | FormalLow | InformalHigh
>     | InformalLow | Neutral
> 
> type LinguisticFeature =
>     | Phonological of PhonologicalFeature
>     | Morphological of MorphologicalFeature
>     | Syntactic of SyntacticFeature
>     | Semantic of SemanticFeature
>     | Pragmatic of PragmaticFeature
> 
> type LanguageConstruct =
>     | LanguageElement of LinguisticFeature
>     | LanguageStructure of LanguageConstruct list
>     | TranslationElement of TranslationFeature
> 
> and TranslationFeature =
>     | LinkedPhonological of PhonologicalFeature * PhonologicalFeature
>     | LinkedMorphological of MorphologicalFeature * MorphologicalFeature
>     | LinkedSyntactic of SyntacticFeature * SyntacticFeature
>     | LinkedSemantic of SemanticFeature * SemanticFeature
> 
> type Discourse = DiscourseUnit of LanguageConstruct list
> 
> type LanguageModel =
>     | Model of discourse: Discourse
> 
> ── fsharp ──────────────────────────────────────────────────────────────────────
> let testEnglish =
>     Model(
>         DiscourseUnit [[
>             LanguageElement (Phonological (ConsonantFeature (Alveolar, Nasal, 
> Voiced, Some(HalfLong))));
>             LanguageElement (Phonological (VowelFeature (High, Front, Unrounded,
> Some(LevelTone 1), Some(Primary), Some(Short))));
>             LanguageElement (Phonological (VowelFeature (Low, Front, Unrounded, 
> Some(LevelTone 2), Some(Secondary), Some(Long))));
>             LanguageElement (Phonological (ConsonantFeature (Velar, Plosive, 
> Voiceless, Some(HalfLong))));
>             LanguageElement (Morphological (RootFeature "I"));
>             LanguageElement (Morphological (RootFeature "see"));
>             LanguageElement (Morphological (RootFeature "a"));
>             LanguageElement (Morphological (RootFeature "cat"));
>             LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 
> ([[RootFeature "I"]], Pronoun)]])));
>             LanguageElement (Syntactic (PhraseFeature (VP, [[WordFeature 
> ([[RootFeature "see"]], Verb)]])));
>             LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 
> ([[RootFeature "a"; RootFeature "cat"]], Noun)]])));
>             LanguageElement (Semantic (Meaning "Perception act of a feline by 
> the speaker"));
>             LanguageElement (Pragmatic (UseContext "Statement of an action being
> observed"))
>         ]]
>     )
> 
> let testPortuguese =
>     Model(
>         DiscourseUnit [[
>             LanguageElement (Phonological (VowelFeature (High, Front, Unrounded,
> Some(LevelTone 1), Some(Primary), Some(Short))));
>             LanguageElement (Phonological (VowelFeature (Low, Front, Unrounded, 
> Some(LevelTone 2), Some(Secondary), Some(Long))));
>             LanguageElement (Phonological (VowelFeature (Mid, Back, Rounded, 
> Some(LevelTone 3), Some(Primary), Some(Short))));
>             LanguageElement (Phonological (ConsonantFeature (Velar, Plosive, 
> Voiceless, Some(HalfLong))));
>             LanguageElement (Morphological (RootFeature "Eu"));
>             LanguageElement (Morphological (RootFeature "ver" |> ignore; 
> AffixFeature (Suffix, "o")));
>             LanguageElement (Morphological (RootFeature "um"));
>             LanguageElement (Morphological (RootFeature "gato"));
>             LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 
> ([[RootFeature "Eu"]], Pronoun)]])));
>             LanguageElement (Syntactic (PhraseFeature (VP, [[WordFeature 
> ([[RootFeature "vejo"]], Verb)]])));
>             LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 
> ([[RootFeature "um"; RootFeature "gato"]], Noun)]])));
>             LanguageElement (Semantic (Meaning "Ação de percepção de um felino 
> pelo falante"));
>             LanguageElement (Pragmatic (UseContext "Declaração de uma ação sendo
> observada"))
>         ]]
>     )
> 
> let testKorean =
>     Model(
>         DiscourseUnit [[
>             LanguageElement (Phonological (ConsonantFeature (Alveolar, Nasal, 
> Voiced, Some(Short))));
>             LanguageElement (Phonological (VowelFeature (High, Back, Rounded, 
> None, None, Some(Short))));
>             LanguageElement (Phonological (VowelFeature (Mid, Front, Unrounded, 
> None, None, Some(Long))));
>             LanguageElement (Phonological (ConsonantFeature (Bilabial, Plosive, 
> Voiceless, Some(Short))));
>             LanguageElement (Morphological (RootFeature "나"));
>             LanguageElement (Morphological (RootFeature "보다"));
>             LanguageElement (Morphological (AffixFeature (Suffix, "아")));
>             LanguageElement (Morphological (RootFeature "고양이"));
>             LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 
> ([[RootFeature "나"]], Pronoun)]])));
>             LanguageElement (Syntactic (PhraseFeature (VP, [[WordFeature 
> ([[RootFeature "보다"; AffixFeature (Suffix, "아")]], Verb)]])));
>             LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 
> ([[RootFeature "고양이"]], Noun)]])));
>             LanguageElement (Semantic (Meaning "화자에 의한 고양이의 관찰 
> 행위"));
>             LanguageElement (Pragmatic (UseContext "관찰되고 있는 행동의 진술"))
>         ]]
>     )
> 
> ── markdown ────────────────────────────────────────────────────────────────────
> │ ## main
> 
> ── spiral ──────────────────────────────────────────────────────────────────────
> inl main (_args : array_base string) =
>     0i32
> 
> inl main () =
>     $'let main args = !main args' : ()
> 
> ── spiral ──────────────────────────────────────────────────────────────────────
> inl app () =
>     "test" |> console.write_line
>     0i32
> 
> inl main () =
>     print_static "<test>"
> 
>     app
>     |> dyn
>     |> ignore
> 
>     print_static "</test>"
00:00:11 v #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 40633 }
00:00:11 d #4 runtime.execute_with_options / { file_name = jupyter; arguments = ["nbconvert", "/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"]; options = { command = jupyter nbconvert "/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None; stderr = true } }
00:00:12 v #5 ! [NbConvertApp] Converting notebook /home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.ipynb to html
00:00:12 v #6 ! /opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/nbformat/__init__.py:96: MissingIDFieldWarning: Cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
00:00:12 v #7 !   validate(nb)
00:00:12 v #8 ! /opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/nbconvert/filters/highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3
00:00:12 v #9 !   return _pygments_highlight(
00:00:13 v #10 ! [NbConvertApp] Writing 341234 bytes to /home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.html
00:00:13 v #11 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 916 }
00:00:13 d #12 spiral.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 916 }
00:00:13 d #13 runtime.execute_with_options / { file_name = pwsh; arguments = ["-c", "$counter = 1; $path = '/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"]; options = { command = pwsh -c "$counter = 1; $path = '/home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None; stderr = true } }
00:00:13 v #14 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 }
00:00:13 d #15 spiral.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 }
00:00:13 d #16 spiral.run / dib / { exit_code = 0; result_length = 41608 }

parse the .dib file into .spi format with dibparser¶

In [ ]:
{ . ../../../../apps/parser/dist/DibParser$(_exe) test.dib spi } | Invoke-Block
00:00:00 d #1 writeDibCode / output: Spi / path: test.dib
00:00:00 d #2 parseDibCode / output: Spi / file: test.dib

build .fsx file from .spi using supervisor¶

In [ ]:
{ . ../../../../apps/spiral/dist/Supervisor$(_exe) --build-file test.spi test.fsx } | Invoke-Block
<test>
</test>

compile and format the project¶

compile project with fable targeting optimized rust¶

In [ ]:
dotnet fable --optimize --lang rs --extension .rs
Fable 5.0.0-alpha.9: F# to Rust compiler (status: alpha)

Thanks to the contributor! @xtuc
Stand with Ukraine! https://standwithukraine.com.ua/

Parsing test.fsproj...
Project and references (1 source files) parsed in 2353ms

Started Fable compilation...

Fable compilation finished in 1103ms

./test.fsx(11,0): (11,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!

fix formatting issues in the .rs file using regex and set-content¶

In [ ]:
(Get-Content test.rs) `
    -replace [regex]::Escape("),);"), "));" `
    | FixRust `
| Set-Content test.rs

format the rust code using cargo fmt¶

In [ ]:
cargo fmt --

build and test the project¶

build the project in release mode using nightly rust compiler¶

In [ ]:
cargo build --release
warning: /home/runner/work/polyglot/polyglot/apps/spiral/temp/test/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/spiral/temp/extension/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/spiral/temp/cube/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/chat/contract/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/plot/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/chat/contract/tests/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/examples/rust/exercism/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/lib/math/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
   Compiling syn v2.0.90
   Compiling byteorder v1.5.0
   Compiling linux-raw-sys v0.4.14
   Compiling getrandom v0.2.15
   Compiling rand_core v0.6.4
   Compiling num-traits v0.2.19
   Compiling once_cell v1.20.2
   Compiling libm v0.2.11
   Compiling rustix v0.38.42
   Compiling wait-timeout v0.2.0
   Compiling quick-error v1.2.3
   Compiling bit-vec v0.6.3
   Compiling bit-set v0.5.3
   Compiling rand_xorshift v0.3.0
   Compiling unarray v0.1.4
   Compiling memchr v2.7.4
   Compiling fable_library_rust v0.1.0 (/home/runner/work/polyglot/polyglot/lib/rust/fable/fable_modules/fable-library-rust)
   Compiling nom v7.1.3
   Compiling zerocopy-derive v0.7.35
   Compiling tempfile v3.14.0
   Compiling zerocopy v0.7.35
   Compiling rusty-fork v0.3.0
   Compiling thiserror-impl v1.0.69
   Compiling ppv-lite86 v0.2.20
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling thiserror v1.0.69
   Compiling proptest v1.5.0
   Compiling spiral_temp_test v0.0.1 (/home/runner/work/polyglot/polyglot/apps/spiral/temp/test)
    Finished `release` profile [optimized] target(s) in 10.16s

run release tests with output enabled¶

In [ ]:
{ cargo test --release -- --show-output } | Invoke-Block
warning: /home/runner/work/polyglot/polyglot/lib/math/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/plot/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/chat/contract/tests/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/spiral/temp/test/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/examples/rust/exercism/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/chat/contract/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/spiral/temp/extension/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
warning: /home/runner/work/polyglot/polyglot/apps/spiral/temp/cube/Cargo.toml: the cargo feature `edition2024` has been stabilized in the 1.85 release and is no longer necessary to be listed in the manifest
  See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature.
   Compiling bitflags v2.6.0
   Compiling zerocopy v0.7.35
   Compiling linux-raw-sys v0.4.14
   Compiling fastrand v2.3.0
   Compiling once_cell v1.20.2
   Compiling wait-timeout v0.2.0
   Compiling quick-error v1.2.3
   Compiling fnv v1.0.7
   Compiling bit-vec v0.6.3
   Compiling rustix v0.38.42
   Compiling num-traits v0.2.19
   Compiling ppv-lite86 v0.2.20
   Compiling bit-set v0.5.3
   Compiling rand_xorshift v0.3.0
   Compiling memchr v2.7.4
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling unarray v0.1.4
   Compiling lazy_static v1.5.0
   Compiling minimal-lexical v0.2.1
   Compiling fable_library_rust v0.1.0 (/home/runner/work/polyglot/polyglot/lib/rust/fable/fable_modules/fable-library-rust)
   Compiling nom v7.1.3
   Compiling thiserror v1.0.69
   Compiling tempfile v3.14.0
   Compiling rusty-fork v0.3.0
   Compiling proptest v1.5.0
   Compiling spiral_temp_test v0.0.1 (/home/runner/work/polyglot/polyglot/apps/spiral/temp/test)
    Finished `release` profile [optimized] target(s) in 14.70s
     Running unittests main.rs (/home/runner/work/polyglot/polyglot/workspace/target/release/deps/spiral_temp_test-be45c853cf37e114)

running 3 tests
test test_parse_number ... ok
test prop_parse_format_idempotent ... ok
test adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged ... ok

successes:

---- prop_parse_format_idempotent stdout ----
input=StringLiteral("{^q{;A*oIN:tM/}Kf-")
input=Integer(-783498312442272161)
input=Operator("/")
input=Integer(6656901008445763153)
input=Integer(-3006170582180803873)
input=Identifier("s1")
input=StringLiteral("lUY:OB.Mo=/IMZ$Tq./{<F.PJ39=")
input=Comment("4R|vM%;@0,")
input=Comment("$$X$6V%%-N*")
input=Identifier("w1Kdc6tx8GlWIg471yiNetTkcRU4Xeu")
input=StringLiteral(".:>qO</?^lWD.bjX")
input=Integer(-3801654648727455996)
input=Comment("%E+t`$=URB,?J.:[fM?Q/:*d,/$&R[.Q")
input=Operator(")")
input=Identifier("w35wtHVx66wN03bFtDjG")
input=Identifier("w0y3WVTZDdlV6txeykFEMLzMFK7p59")
input=StringLiteral("`,f=KL5o&;O>H*kF/WG.'8e',ZL+='")
input=Integer(1484173259892452089)
input=Comment("}_*<\\0~N|sR_E8@@r`A;! \"Q9?Y`")
input=Identifier("n99J4ps9c")
input=Identifier("n281uDCG3e8v0nt121Nn8QXTkRR")
input=StringLiteral(")p%`N?&<{,")
input=Operator("-")
input=Integer(-264600127641722069)
input=StringLiteral("rh")
input=StringLiteral("?Z'.v*Y/EcuU")
input=Identifier("mLzuHWgqt8bM21F")
input=Integer(-1953786740257329514)
input=Comment("JW{i%w#pQlb'MM ")
input=Comment("%%j#Dh$L7'=;wYC0^\"=%JF<{&ec@.`")
input=StringLiteral("HCB8x_/B{[")
input=Operator("(")
input=Identifier("OnfnZVp5KNK3b4ROh4")
input=Identifier("Odn3x0ZVaPBrKs5RY1T1C")
input=Comment("Fq{z?&")
input=Operator("(")
input=Comment("=q:(")
input=StringLiteral("s<*^yX&OmF$vS$7h.>")
input=Comment("n<`q*IZ<n/h/N\"bq?d?Ju{6'")
input=Comment("\"=B^B+p`V2*`zYt`\\,\\+l?*E4W2b&h.Y")
input=Integer(-9026580337223446830)
input=Identifier("D")
input=Operator("-")
input=Identifier("eP0A")
input=Identifier("AJap8twD74mw")
input=Operator("=")
input=StringLiteral("'/I%nB:<, S{eIkM0%%3%/$")
input=Integer(-7206074084960861920)
input=StringLiteral("PRoy/.@0-<C/a")
input=Identifier("MISQmnjJ2xHmz29lOEAa6A4FvueCS1")
input=Comment("k.]]48sH\\X$ix")
input=Comment("R_<9@v:wPV$ Kfw[z%F8/jni>GW7")
input=Comment(":Sj.JrED,G | /`q7mP2BEM&?")
input=Identifier("Hj7JTB18kEN1SKNVM1gAw3QKlPzxnk9pL")
input=StringLiteral("_IAT&Wdadch{IorGCO'r<Es")
input=Identifier("lvMqPiac9R9m2EB3")
input=Identifier("Xr36Yh3p9r1K")
input=StringLiteral("O]HJD^sjH!")
input=Comment("'pzPA")
input=Integer(-7802712747953158856)
input=Comment("y05\"@)1,K|f")
input=Comment("%:</kF0")
input=Comment("Xe{ku")
input=Identifier("i78mZ3Ac1BZPZ7Sl6SMB70IcuWLfBaF")
input=Identifier("l6N95ZdWE7LsVQ6dQMCHEqqCI")
input=Comment("-b&)e[r `]>m`")
input=Identifier("OQuLY")
input=StringLiteral("{")
input=Operator("(")
input=Integer(5548233779901595419)
input=StringLiteral("j6Nw{i^bw+%,2:")
input=Identifier("Q8vw")
input=Integer(8845627017356029180)
input=Integer(-937404015976027772)
input=StringLiteral("g$Q0qZ:<Q.}$'M:`|*9H`aA]_VG/l/s")
input=Identifier("NyaP1tnigOklcC5Es")
input=Comment("$&[#\"i{2Q ")
input=Identifier("OtM3DaDvN5N6iy2Zrts3kz66Lxi3")
input=Comment("d+rzK")
input=Identifier("BPm5zwbrpJ5vINEXWExHq7PabPSPn")
input=Integer(-7401299599497781158)
input=Operator("=")
input=StringLiteral(";:R[<%`~)^Em&J|E`N`//&*W/s$")
input=Comment("xo<'{\"")
input=Integer(-417535586042745459)
input=Integer(3774457177682950076)
input=Comment("")
input=Operator("/")
input=StringLiteral("}{`&,o/(h.tX")
input=Identifier("J1j")
input=StringLiteral(";)")
input=StringLiteral("}i<@K<=4cs':BQBv")
input=Identifier("T2RN")
input=Integer(-8026950628763238246)
input=Comment("")
input=Integer(1839320284795969634)
input=Identifier("e82RemqgZXrMfkp3a7Lfx8tDeOgqzi3As")
input=StringLiteral(":_'1yP!~$&$>`*2")
input=Comment("`rtxt")
input=Comment("{Pi")
input=StringLiteral("APB`C#=0x.wdw{p")
input=Integer(-3538823895023690303)
input=Comment("y:13d`EZ&M<{?~'F&?/t:\"%{=5-y\"<")
input=StringLiteral("[OW?x Z5`Wq=%H={JN}=&1D`3]F")
input=Operator("*")
input=StringLiteral("`]7{=&oe;sNn%}5:0.,hy:G=>5.YL")
input=StringLiteral("]9/?c}`=)#ue")
input=Comment("X$?0=")
input=Comment("v-<S<\"\\YT")
input=Identifier("z28Z1fPq4K4H4V")
input=Operator("-")
input=StringLiteral("")
input=StringLiteral("{A(k'kL?/q|T:4")
input=Comment("=-1d);9U_I 6`.%=F:)h@g=M<B")
input=Operator(")")
input=Operator("(")
input=StringLiteral("92wWZ1pj{i{W0{&$")
input=Comment("?<Po5{\"z<T<'Ew`@pm\\iA0|?d\\K")
input=Comment("J\\*^=LIT(tI\"bW~mM:")
input=Integer(-6944100891339678850)
input=Operator(")")
input=StringLiteral("<v2-$?e{&~S/0[_$:+Q")
input=Identifier("Ol")
input=Operator("(")
input=Comment("@RQ\"`zV=")
input=StringLiteral("x.')K{=%e*U^g:")
input=Operator("/")
input=StringLiteral("'5TN")
input=Identifier("ie0pYO1vW7h645kNbIfPDmsXyzvu7U9D")
input=Operator("-")
input=Operator("=")
input=Operator("+")
input=Identifier("G25X5j40r2eCKLg4yEPMxsaHl18x4bzdb")
input=Identifier("E1yBAZUBLCSxrTwTBHGm5cWav719")
input=Integer(7842392086551509438)
input=StringLiteral("")
input=Identifier("ahmsxPQ4Ds0DbLfDENoyXmLK59")
input=StringLiteral("nhfY")
input=Identifier("XhrKe")
input=Comment("$hPZ'';2Ysgnv")
input=Operator("+")
input=Identifier("A9o7")
input=StringLiteral("&U*Fh.")
input=Integer(5555137377653682191)
input=StringLiteral("n$=G)$f%M/~?Rd")
input=Operator("=")
input=Integer(403936982257904102)
input=Identifier("iisazcZhB5R29fU1UK2ZTE4rpRM2sf")
input=StringLiteral("|Ss&j-8GpyGvF1V7`@FyN^{KY[")
input=StringLiteral("O|%/')4os>f@?`.=J'2d-'%0TE.?")
input=Operator("/")
input=Identifier("Om8TQ6jYhBS0u5")
input=Comment("O?pI?vN<Rk{/{'z$D%T.3w?2=")
input=StringLiteral("@$ZT=YR9")
input=Operator("+")
input=Operator("(")
input=Operator("+")
input=Operator(")")
input=Integer(-9017859850632012847)
input=Operator("=")
input=Comment("0tz %w$~=O}/q`Q-]TVe")
input=Operator("+")
input=Operator("(")
input=StringLiteral("|J.s?%?`BJBl>ihX=cj(U76%")
input=StringLiteral("z?prTEL_5v'{I`U")
input=Identifier("nA80EL51lqW5k4aW")
input=Identifier("IFS17s9jI")
input=Integer(1036055419133102259)
input=StringLiteral("C&6q^~{Sty@U/Cd=o9fSm|")
input=Comment("ALl&")
input=Operator("-")
input=Integer(-7089178766501993029)
input=Operator("*")
input=StringLiteral("r{&gwPC6")
input=StringLiteral("PM@CCu0R=Xd0iy*:f]h3WK*J")
input=Identifier("C20GGldV9RSL3MopeJf7VCz56")
input=Operator("(")
input=Operator("(")
input=Operator("*")
input=Identifier("vJFqj2BDyWGqyF0Xm")
input=Operator("(")
input=Integer(-3133798926969914182)
input=Comment("P\\tJqG:yaN]0`")
input=StringLiteral("/n")
input=Integer(-4943033530227650789)
input=StringLiteral("<% xc$<$E$,Ax$~rqs;q")
input=Comment("")
input=Operator("*")
input=Identifier("U")
input=StringLiteral("$61(%.8%lH8@].*t<")
input=Operator("=")
input=StringLiteral("/")
input=StringLiteral("=/2|ul[%z'oS9ovx`:&,2l$")
input=Operator("=")
input=StringLiteral("&nV= I{L`r.yvC*Z('=")
input=Operator("=")
input=Integer(6858368592611446591)
input=Operator(")")
input=Integer(-7476157701708945265)
input=Operator(")")
input=Comment("aA.} :,D\\I")
input=Identifier("l19Uui8x4vNS0")
input=Integer(-5685433002927856652)
input=StringLiteral("e!722Ik<_hW2lo(M`e!h7!,?;m| .")
input=Comment("e@")
input=Comment("|HS?'?P =&`M\\)b&9h?}:`\\!\\=Y0{<\\")
input=Comment("K]`N&F_9DA%QA~\\")
input=Comment("P]fIoo")
input=Operator("(")
input=Identifier("M3wPiWicIJ4N6Pa")
input=Integer(2849056086393693560)
input=Identifier("Opjc9JfUfM44")
input=Operator("+")
input=StringLiteral("o13LHD> v(/Eb8rq=H$&!&:D")
input=Identifier("pSCO4rUSzaBnEvhJf8lA0CF")
input=Comment("oMOt`\"7@.m\\*.U`]\\u*@=")
input=Operator("(")
input=StringLiteral("%P")
input=Integer(-7565699573165095762)
input=StringLiteral("'U+%,9/XT%")
input=Operator("=")
input=Operator("-")
input=Identifier("dNV5P4586l1dH697")
input=Operator("*")
input=Operator("/")
input=Integer(8210267912921340675)
input=Comment("!:\"qU\\'HqD\\-0{^?\"")
input=Identifier("W9")
input=Comment("=d$&9$")
input=Identifier("l7ixH5p2DkZmytO76cVo9LY")
input=StringLiteral("0A=F]Rz'K' :+h%c,? vHBI?")
input=Identifier("LN7v9A300L91gYPBG2QB08sujiWDB")
input=Identifier("Y")
input=Comment("1#\"91;&%R&+vI*<H.{1N#/{/NI\"\"..%:")
input=Operator("-")
input=StringLiteral("s-' Wg`VN!<")
input=StringLiteral("?%R .(<>Ge")
input=Operator("(")
input=Identifier("MKv0AgbCIvYXj8i8zrmlzFz6Q7Ya")
input=Identifier("MWwoO3z28Xnst5q4czANosDDZBfZSC9z")
input=Comment("&/CaOWA%n[$2]6=v/R==^;4h?=Y5=`")
input=Operator("*")
input=Comment("%l>7a[{O*")
input=Identifier("DJLtsJXZ806T11nRfyUCj")
input=Integer(-5551813085294007871)
input=Identifier("l8cx")
input=Comment("7`~(c{uo+9:\"")
input=Integer(6019813581810744448)
input=Integer(-7448440149538356722)
input=Integer(-5847805533978286491)
input=Identifier("PZTIvWIn4N8rN0uA1uITqyjEJiC1g")
input=Integer(8856444247118404768)
input=Operator("(")
input=Operator("*")
input=Integer(3327878944632248319)
input=Comment("pYF_{=")


successes:
    adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged
    prop_parse_format_idempotent
    test_parse_number

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s

execute the binary in release mode¶

In [ ]:
{ . $ScriptDir/../../../../workspace/target/release/spiral_temp_test$(_exe) } | Invoke-Block
app=test