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"
> ]]
> 
> ── [ 317.94ms - 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"
> ]]
> 
> ── [ 312.77ms - 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! @njlr
Stand with Ukraine! https://standwithukraine.com.ua/

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

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/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/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/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.
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/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/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.
   Compiling syn v2.0.90
   Compiling byteorder v1.5.0
   Compiling getrandom v0.2.15
   Compiling linux-raw-sys v0.4.14
   Compiling rand_core v0.6.4
   Compiling num-traits v0.2.19
   Compiling once_cell v1.20.2
   Compiling rustix v0.38.42
   Compiling libm v0.2.11
   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 memchr v2.7.4
   Compiling unarray v0.1.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.15s

run release tests with output enabled¶

In [ ]:
{ cargo test --release -- --show-output } | Invoke-Block
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/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/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/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/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/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/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.
   Compiling zerocopy v0.7.35
   Compiling linux-raw-sys v0.4.14
   Compiling bitflags v2.6.0
   Compiling once_cell v1.20.2
   Compiling fastrand v2.3.0
   Compiling wait-timeout v0.2.0
   Compiling quick-error v1.2.3
   Compiling rustix v0.38.42
   Compiling fnv v1.0.7
   Compiling bit-vec v0.6.3
   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 minimal-lexical v0.2.1
   Compiling rand_chacha v0.3.1
   Compiling unarray v0.1.4
   Compiling lazy_static v1.5.0
   Compiling memchr v2.7.4
   Compiling rand v0.8.5
   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.37s
     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=Operator("/")
input=Comment("[\\#{]{\"/")
input=Identifier("nuru8IvvDPAOP")
input=Integer(-3991240708967483999)
input=StringLiteral("")
input=StringLiteral("4~U%3=%<x-t_EYgHzkSA/zI~6:")
input=Integer(-7871791948284259420)
input=Identifier("nMVgikr0W04yjQ")
input=Comment("]?5?*<<@*]$n[=$0+A:05 \"(")
input=Operator("-")
input=StringLiteral("2'QvK=H")
input=Operator("(")
input=Integer(2908128011873202454)
input=Integer(4479360746082183080)
input=Integer(1030717549947965666)
input=Integer(-6362514526621132816)
input=Identifier("JOfBSu6G")
input=Comment("d$=468z`1T{*$4v\\")
input=Comment("[6\\>?w`y#\"<vNYOfz*N{NS")
input=Comment("dC``.w?.9%^:?")
input=StringLiteral("M][-tGrE.:'&,c$M%'X")
input=Operator("*")
input=Comment("cKX]`<h7%U*$wQ")
input=Comment("V`&VE\\g4")
input=StringLiteral("Z%iPy=M+n{&")
input=Comment("*``.[e]\\f.A@Nl\"'")
input=Comment("")
input=Integer(-5006936807271874032)
input=StringLiteral("?h.&^G+|.%%`B?WaF")
input=StringLiteral("")
input=Integer(-7434336372641585262)
input=StringLiteral("'|")
input=Identifier("Ph0xs4L66Rn8ABk")
input=Comment("\"g4MF:0Uk{#s`/9&g\"mWEpr(,")
input=Operator("=")
input=Operator("=")
input=StringLiteral("9<0m%;i'X-/`[x{h</$U%nI")
input=Integer(1378112013846986692)
input=Integer(-3538243670007216229)
input=Identifier("Li94BOTlow")
input=Operator("+")
input=Comment("1xmK%'hzpPY\"s|~E@`\"1][?Ci'>wFt")
input=Operator("(")
input=Operator("+")
input=Identifier("T8aK9wAcKtA9to1P13w")
input=Identifier("gV0T7phahBUxLLU")
input=Comment("&=n$\"Y_iu")
input=Operator("+")
input=Identifier("VYDrC94JscS6s6nu5S")
input=StringLiteral("!U/0t<Tm=C=;iU")
input=StringLiteral("pWt")
input=StringLiteral("&_Do/ww.qc:*gI*%")
input=StringLiteral("c^V#%{")
input=Integer(2940969731699842684)
input=Operator("(")
input=Operator("=")
input=StringLiteral("%Q{tI-&r;[?G%b*_T`:<7uo(i")
input=Identifier("gnA1YlX4PcllcGk70TI3KVcRVvzOV7")
input=Integer(-9095919589650871977)
input=Identifier("FidTQcDu4Oo2bHus1t")
input=Identifier("QS7x0BzYaspgYfsEJl512oIia38u45")
input=StringLiteral("2J!WID.@gS<aL")
input=Operator("-")
input=StringLiteral("W9>e.*'WtTZoGw")
input=Identifier("b80j1C5EpU7B")
input=StringLiteral("BGEyy|H`l0vOZ9)hG'H`/)/F")
input=Identifier("JOiM65Wl6J")
input=Identifier("eyIJha6XWO6Q0Gztqdc3n")
input=Identifier("L3mohRqHIL4ipQw8lRcRgYLX")
input=StringLiteral("6{<&8V&")
input=StringLiteral("{gj*$&<*B/yGxo:]$|.>%b=[j*Jr9'0.")
input=Comment("8<:1Ng^t%:u$Oi?OG")
input=Integer(8588296583823383529)
input=Operator("(")
input=Identifier("Lg")
input=Identifier("zYB5m3CTyzH3KQZAvMU06K2x4v87A135t")
input=StringLiteral(":`mMe`/p=f9&lCvG")
input=Integer(-8063871794532765867)
input=Identifier("C1lb69UtL83KRJ59")
input=StringLiteral("-T)q,`-*CW:$7{7pX5r")
input=Identifier("b5j")
input=Identifier("D7zh781eE5x9V6")
input=Comment("Y:}A*(#.7{ ")
input=Comment("h%YhzIvt<kG ?\"h'bJh_~kH&/q")
input=Integer(-2424375238850091033)
input=Comment("(:$MP.|=0$FbPN}/m<${i_HC<;|AI<")
input=Operator("/")
input=Comment("?G:\"U@u%")
input=Operator("(")
input=Identifier("l")
input=StringLiteral("m|E<W?7Zn-Z(q_")
input=Identifier("S8ilEN1Rmb3FL6J6NGYQaWdok")
input=Integer(-7327895851957338174)
input=Operator("*")
input=Operator("=")
input=Operator("-")
input=Integer(6111339454893140159)
input=Comment("FR(,$3$^.f`w?=.w;Mg$/{`x|,26 *{/")
input=Identifier("M1224G1c")
input=StringLiteral("Jg")
input=Comment("^")
input=Operator("=")
input=Comment("*$A6zN&&&|%$P")
input=Comment(",l,&T\\nU&`L4")
input=Identifier("b8jEF8CVXU3H9K")
input=Operator("=")
input=Operator("=")
input=Identifier("vlx2")
input=Identifier("gH9")
input=Operator("(")
input=Identifier("io8")
input=Comment("?Z(){")
input=Integer(333121562901633079)
input=Operator("=")
input=StringLiteral("j<(*?*1~Q$")
input=Integer(3261317894458149051)
input=StringLiteral("W.PE&3:CUC%l2M/OK.f$l4L%w#;.=")
input=Identifier("xG")
input=Comment("i\".")
input=Operator("-")
input=Operator(")")
input=Integer(-8124259148730699894)
input=Operator("-")
input=Comment("H{5`N/SX<i?=l9)yw/,&B@")
input=Identifier("tfpCycL01oq158J0xXGZi8y")
input=Identifier("t1G48wX6QGZgt5AjAlmmw5")
input=Operator("/")
input=Identifier("kZrR9A6X5p9H3AQpxEy3")
input=Operator(")")
input=Identifier("itC48fm4hOkI1dn1CRIvCdAn2g")
input=Identifier("bDBb9N2XqLCuvqiQnD34JtUEMoJFTis")
input=StringLiteral("<x.|")
input=StringLiteral("$Pydbm`@:4")
input=Comment("/7D$")
input=Identifier("ybOfly3o0")
input=Operator("/")
input=Operator("=")
input=Comment("=CU&8\"mH6h&./[UrT")
input=Comment("rfcr+`~<j3eIA\\&vSDbG")
input=Comment("Mzo!J*-{Qt+zCf?kx#}")
input=StringLiteral("?^:IXM&dc``.%WVei5X")
input=Comment("X'6/<`Jm\\\\?ak\\Tx\\y9$fss")
input=StringLiteral("f[$?9]@5;&g+/),ew=.umQY")
input=Operator("=")
input=StringLiteral("_w:Os?`d")
input=Identifier("a5R0D534167eK8HxfW4pJ6b8ij2M")
input=StringLiteral("%aN&")
input=StringLiteral("N~%n*^C%>W{$D_J8{R_|%gK*J ")
input=Comment("',lL")
input=Identifier("hkade58Kl15MYVp6XQ6Imq2aW7wE2x")
input=Comment("a.GdKW\\:4,mLSqY!Vo$.7\"`.F%iB")
input=Identifier("jO7xPNDDOau7ctpDqI717FCsz5e35n")
input=Integer(6440578356213754231)
input=Operator("(")
input=Comment("%(vF{{2/H.+B<=-")
input=Operator("-")
input=Comment("")
input=Comment("M-/=JN'.KpM+J!{;ps'2oukZ{yi")
input=Integer(-1662112758604541672)
input=StringLiteral("_jQq%'$u*`}|/^%|/X<K'")
input=StringLiteral("}JetY$ ka(%G1bT")
input=StringLiteral(">C")
input=Integer(194688314762420651)
input=Comment("RFodMrpZg+\"n^J\"!#kIH`$w?.a&0 ")
input=Identifier("jLWWkDB2uAdg24Cy8Go")
input=Operator("/")
input=Identifier("OQLBqpM0X7Pcv316Io")
input=Integer(7854897335239817984)
input=StringLiteral("R}:Vl")
input=Comment("j9:/:6[pbWQ$j&y::oQ$?@@J")
input=Integer(-1904540592200367300)
input=Operator(")")
input=StringLiteral("tD`e/MS,gW$&6=-~$7k~P'uJ~")
input=Comment("%EVo|%/$'}jM1^<j\"<(qc3&K5'VQQ%`u")
input=StringLiteral("uqc-{g%IC$NUoM'(/=")
input=Operator("*")
input=Operator("-")
input=Operator("=")
input=Identifier("dQr0S8IDt7hrNoF")
input=Comment("%3A/")
input=Integer(-2219470851928519101)
input=Integer(155255116527808607)
input=Comment("nb`Xy*Ix6:\"{P*d!\\@\"")
input=Identifier("xYeCvas43w6LTZw2oW17J39ME5WVui")
input=Comment("*bG6:sJ.v%")
input=Identifier("iT2xXgtV")
input=StringLiteral("*{[**&{tFD&=.A`KaDdLe<F0o./z{")
input=Integer(-7131186643700707744)
input=Identifier("Q9CB4w3Z0rmBc2N7Fj60lE2xaXTMIEs")
input=StringLiteral("~'!(FI`&fP;.Cgr/'qC|1=t")
input=Operator(")")
input=Integer(-6673225877083352381)
input=Operator("*")
input=Comment("JQ{K ymb%")
input=Identifier("Y9r0SuK7V11LxrfPZ990ARm")
input=Identifier("bOUS7eRZS578Gh60sQyPcBR7fDxB4S")
input=Comment("'\\\\:|`IjV\"V<,)F\"")
input=StringLiteral("ik2pN^/g=<")
input=Comment("s'.-~$NV<\\c#zYs")
input=Operator("=")
input=Identifier("m2wb2twKp58")
input=Integer(8147444456466482156)
input=StringLiteral("/HpgBi{Hkn&$w")
input=Comment("*d`,\"2e\"<c6$/?\\(Z*'=2$")
input=Comment("%E@rU>\" a:`")
input=Identifier("hiFinRVfbY3n7FS")
input=StringLiteral("<^sf{mX=*t*uwA.{")
input=StringLiteral("~wq@PJ`_A9[w|kfheW$;+?^Eu*Ms")
input=Identifier("hgqi8ADutRSE85tjIP8g6JM3z")
input=Comment("YNiGS*D@b6o^;")
input=StringLiteral("Fnu&M'idY)hRF@%seF,yf^qhI")
input=Operator("(")
input=Identifier("b467DmI0km6086AYH")
input=Identifier("q")
input=Operator("/")
input=StringLiteral("Pt{|Evu*{>,S~a|>)&G.*h.nsS=Y")
input=StringLiteral("`%<ed;D@8 %{*oe={`")
input=Operator("(")
input=Identifier("qpc4Q0OhWZRnRW96phYait3ij")
input=Operator("/")
input=Identifier("AOvzklCO")
input=Identifier("jRLijE")
input=StringLiteral("WTBt/8#]hBHjYQ")
input=StringLiteral(")D:zW%")
input=Operator("+")
input=StringLiteral("[<'<*{qx&*_i?7a/c'_:W*;{j'C2")
input=StringLiteral("z7j")
input=Operator("-")
input=Identifier("aJPAi7f1k1J")
input=Comment("%:\"& e6U*:_&Eb\\")
input=Integer(-8932401817024897307)
input=Identifier("A5AQ6wOTtWz6YRfU")
input=Operator("=")
input=Operator("/")
input=Integer(7326208535821109641)
input=Integer(-8573041863519611155)
input=Comment("'D\"")
input=Integer(9007843693564174520)
input=Identifier("yxdqQFTOG3LmYKVnDoZ")
input=StringLiteral("E]")
input=Identifier("ClU5jro3B0")
input=Integer(2866093496567051696)
input=Identifier("EmN")
input=Integer(-2938637709573004926)
input=StringLiteral("%)Ww/03y?/K")
input=StringLiteral("%[I*,UT ,E2[9?9=:X?<$zQJ=ogMP+")
input=Operator("/")
input=StringLiteral("Up[G=j")
input=Operator("(")
input=StringLiteral("^=2,6D?`%'X-")
input=Comment("<'\"~['jwWra/.<:74{/g.T|%f\\Z/<v")
input=Identifier("sKPn4I3Cz")
input=Integer(-5868395199481692460)
input=Identifier("O1qd8Fxv0cTz71owiVvVVhH03ROcjW0")
input=Integer(-3208710685172579897)
input=Comment("pcb$\"$")


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