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 } } > > ── 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.19s - 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 v135 : string = $"%A{v1}" > │ let v139 : string = $"{v135}" > │ let v147 : unit = () > │ let v148 : (unit -> unit) = closure0(v4, v139) > │ let v149 : unit = (fun () -> v148 (); v147) () > │ let v156 : string = $"{v81}" > │ let v164 : unit = () > │ let v165 : (unit -> unit) = closure0(v4, v156) > │ let v166 : unit = (fun () -> v165 (); v164) () > │ let v174 : string = "expected" > │ let v175 : string = $"{v174}" > │ let v183 : unit = () > │ let v184 : (unit -> unit) = closure0(v4, v175) > │ let v185 : unit = (fun () -> v184 (); v183) () > │ let v192 : string = $"{v45}" > │ let v200 : unit = () > │ let v201 : (unit -> unit) = closure0(v4, v192) > │ let v202 : unit = (fun () -> v201 (); v200) () > │ let v209 : string = $"%A{v2}" > │ let v213 : string = $"{v209}" > │ let v221 : unit = () > │ let v222 : (unit -> unit) = closure0(v4, v213) > │ let v223 : unit = (fun () -> v222 (); v221) () > │ let v231 : string = " }" > │ let v232 : string = $"{v231}" > │ let v240 : unit = () > │ let v241 : (unit -> unit) = closure0(v4, v232) > │ let v242 : unit = (fun () -> v241 (); v240) () > │ let v248 : string = v4.l0 > │ v248 > │ 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 v90 : (string list -> (string [])) = List.toArray > │ let v91 : (string []) = v90 v86 > │ let v94 : string = "ISTJ" > │ let v95 : string = "ISFJ" > │ let v96 : string = "INFJ" > │ let v97 : string = "INTJ" > │ let v98 : string = "ISTP" > │ let v99 : string = "ISFP" > │ let v100 : string = "INFP" > │ let v101 : string = "INTP" > │ let v102 : string = "ESTP" > │ let v103 : string = "ESFP" > │ let v104 : string = "ENFP" > │ let v105 : string = "ENTP" > │ let v106 : string = "ESTJ" > │ let v107 : string = "ESFJ" > │ let v108 : string = "ENFJ" > │ let v109 : string = "ENTJ" > │ let v110 : (string []) = [|v94; v95; v96; v97; v98; v99; > v100; v101; v102; v103; v104; v105; v106; v107; v108; v109|] > │ let v112 : bool = v91 = v110 > │ let v116 : bool = > │ if v112 then > │ true > │ else > │ method1(v112) > │ let v117 : string = "__assert_eq'" > │ let v118 : string = method2(v117, v91, v110) > │ let v120 : unit = () > │ let v121 : (unit -> unit) = closure1(v118) > │ let v122 : unit = (fun () -> v121 (); v120) () > │ let v124 : bool = v116 = false > │ if v124 then > │ failwith<unit> v118 > │ 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" > ]] > > ── [ 406.37ms - 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 v135 : string = $"%A{v1}" > │ let v139 : string = $"{v135}" > │ let v147 : unit = () > │ let v148 : (unit -> unit) = closure0(v4, v139) > │ let v149 : unit = (fun () -> v148 (); v147) () > │ let v156 : string = $"{v81}" > │ let v164 : unit = () > │ let v165 : (unit -> unit) = closure0(v4, v156) > │ let v166 : unit = (fun () -> v165 (); v164) () > │ let v174 : string = "expected" > │ let v175 : string = $"{v174}" > │ let v183 : unit = () > │ let v184 : (unit -> unit) = closure0(v4, v175) > │ let v185 : unit = (fun () -> v184 (); v183) () > │ let v192 : string = $"{v45}" > │ let v200 : unit = () > │ let v201 : (unit -> unit) = closure0(v4, v192) > │ let v202 : unit = (fun () -> v201 (); v200) () > │ let v209 : string = $"%A{v2}" > │ let v213 : string = $"{v209}" > │ let v221 : unit = () > │ let v222 : (unit -> unit) = closure0(v4, v213) > │ let v223 : unit = (fun () -> v222 (); v221) () > │ let v231 : string = " }" > │ let v232 : string = $"{v231}" > │ let v240 : unit = () > │ let v241 : (unit -> unit) = closure0(v4, v232) > │ let v242 : unit = (fun () -> v241 (); v240) () > │ let v248 : string = v4.l0 > │ v248 > │ 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 v90 : (string list -> (string [])) = List.toArray > │ let v91 : (string []) = v90 v86 > │ let v94 : string = "ISTJ" > │ let v95 : string = "ISFJ" > │ let v96 : string = "INFJ" > │ let v97 : string = "INTJ" > │ let v98 : string = "ISTP" > │ let v99 : string = "ISFP" > │ let v100 : string = "INFP" > │ let v101 : string = "INTP" > │ let v102 : string = "ESTP" > │ let v103 : string = "ESFP" > │ let v104 : string = "ENFP" > │ let v105 : string = "ENTP" > │ let v106 : string = "ESTJ" > │ let v107 : string = "ESFJ" > │ let v108 : string = "ENFJ" > │ let v109 : string = "ENTJ" > │ let v110 : (string []) = [|v94; v95; v96; v97; v98; v99; > v100; v101; v102; v103; v104; v105; v106; v107; v108; v109|] > │ let v112 : bool = v91 = v110 > │ let v116 : bool = > │ if v112 then > │ true > │ else > │ method1(v112) > │ let v117 : string = "__assert_eq'" > │ let v118 : string = method2(v117, v91, v110) > │ let v120 : unit = () > │ let v121 : (unit -> unit) = closure1(v118) > │ let v122 : unit = (fun () -> v121 (); v120) () > │ let v124 : bool = v116 = false > │ if v124 then > │ failwith<unit> v118 > │ 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" > ]] > > ── [ 401.15ms - 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 v135 : string = $"%A{v1}" > │ let v139 : string = $"{v135}" > │ let v147 : unit = () > │ let v148 : (unit -> unit) = closure0(v4, v139) > │ let v149 : unit = (fun () -> v148 (); v147) () > │ let v156 : string = $"{v81}" > │ let v164 : unit = () > │ let v165 : (unit -> unit) = closure0(v4, v156) > │ let v166 : unit = (fun () -> v165 (); v164) () > │ let v174 : string = "expected" > │ let v175 : string = $"{v174}" > │ let v183 : unit = () > │ let v184 : (unit -> unit) = closure0(v4, v175) > │ let v185 : unit = (fun () -> v184 (); v183) () > │ let v192 : string = $"{v45}" > │ let v200 : unit = () > │ let v201 : (unit -> unit) = closure0(v4, v192) > │ let v202 : unit = (fun () -> v201 (); v200) () > │ let v209 : string = $"%A{v2}" > │ let v213 : string = $"{v209}" > │ let v221 : unit = () > │ let v222 : (unit -> unit) = closure0(v4, v213) > │ let v223 : unit = (fun () -> v222 (); v221) () > │ let v231 : string = " }" > │ let v232 : string = $"{v231}" > │ let v240 : unit = () > │ let v241 : (unit -> unit) = closure0(v4, v232) > │ let v242 : unit = (fun () -> v241 (); v240) () > │ let v248 : string = v4.l0 > │ v248 > │ 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 v90 : (string list -> (string [])) = List.toArray > │ let v91 : (string []) = v90 v86 > │ let v94 : string = "ISTJ" > │ let v95 : string = "ISFJ" > │ let v96 : string = "INFJ" > │ let v97 : string = "INTJ" > │ let v98 : string = "ISTP" > │ let v99 : string = "ISFP" > │ let v100 : string = "INFP" > │ let v101 : string = "INTP" > │ let v102 : string = "ESTP" > │ let v103 : string = "ESFP" > │ let v104 : string = "ENFP" > │ let v105 : string = "ENTP" > │ let v106 : string = "ESTJ" > │ let v107 : string = "ESFJ" > │ let v108 : string = "ENFJ" > │ let v109 : string = "ENTJ" > │ let v110 : (string []) = [|v94; v95; v96; v97; v98; v99; > v100; v101; v102; v103; v104; v105; v106; v107; v108; v109|] > │ let v112 : bool = v91 = v110 > │ let v116 : bool = > │ if v112 then > │ true > │ else > │ method1(v112) > │ let v117 : string = "__assert_eq'" > │ let v118 : string = method2(v117, v91, v110) > │ let v120 : unit = () > │ let v121 : (unit -> unit) = closure1(v118) > │ let v122 : unit = (fun () -> v121 (); v120) () > │ let v124 : bool = v116 = false > │ if v124 then > │ failwith<unit> v118 > │ 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:12 v #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 40615 } 00:00:12 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 } } 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.9/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:13 v #8 ! /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/site-packages/nbconvert/filters/highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3 00:00:13 v #9 ! return _pygments_highlight( 00:00:13 v #10 ! [NbConvertApp] Writing 341216 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 = 914 } 00:00:13 d #12 spiral.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 914 } 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 } } 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 = 41588 }
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! @mastoj Stand with Ukraine! https://standwithukraine.com.ua/ Parsing test.fsproj... Project and references (1 source files) parsed in 2497ms Started Fable compilation... Fable compilation finished in 1153ms ./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/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/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/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/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/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. Compiling byteorder v1.5.0 Compiling syn v2.0.90 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 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 nom v7.1.3 Compiling tempfile v3.14.0 Compiling zerocopy-derive v0.7.35 Compiling thiserror-impl v1.0.69 Compiling rusty-fork v0.3.0 Compiling fable_library_rust v0.1.0 (/home/runner/work/polyglot/polyglot/lib/rust/fable/fable_modules/fable-library-rust) Compiling zerocopy v0.7.35 Compiling thiserror v1.0.69 Compiling ppv-lite86 v0.2.20 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 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.70s
run release tests with output enabled¶
In [ ]:
{ cargo test --release -- --show-output } | Invoke-Block
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/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/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/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/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/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/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. Compiling linux-raw-sys v0.4.14 Compiling zerocopy v0.7.35 Compiling bitflags v2.6.0 Compiling once_cell v1.20.2 Compiling fastrand v2.3.0 Compiling wait-timeout v0.2.0 Compiling rustix v0.38.42 Compiling fnv v1.0.7 Compiling quick-error v1.2.3 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 memchr v2.7.4 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling unarray v0.1.4 Compiling minimal-lexical v0.2.1 Compiling lazy_static v1.5.0 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 15.28s 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=Integer(-1972463774821727395) input=Operator("(") input=StringLiteral(")cys?Y%K>!'W_=S<E!D .Cw!") input=Integer(4043063982685069544) input=StringLiteral("") input=Identifier("v8JZomOvYA9L") input=Identifier("flQWS3T19D4gDej9HZYQLHglU") input=StringLiteral("~L[q&=!Ry(E'z%") input=Operator("*") input=Integer(7350456065520614105) input=StringLiteral("**.p") input=Integer(4155338374821091612) input=Operator("=") input=StringLiteral("c&%kZ`?=b_q6V|?&sxZr&C") input=Integer(3006500736605474129) input=Operator(")") input=Identifier("q1Rv19R48z3L1GE") input=Identifier("gLpbyL13QqMb3yh7EGqetmidFDZSO") input=Identifier("V4QGLZpZV9mGv7IV6AEzCy4FLBJ9Kk6w") input=Integer(8949584778029530783) input=StringLiteral(";^`N:vT?`$&n.5{='gx`") input=Operator("*") input=Comment("d:\"]o.(") input=Comment("85x`W&[s'5Qa'<4/e") input=StringLiteral("F&am{{K=*%Tp3(~IB:lML:/UJ-M") input=Identifier("nPL4RGKhZEV9Ihq70X") input=StringLiteral("$.g/<D?^>'2{d[)NkYXi*9$/9v1`3e") input=Integer(513477855344942808) input=Comment("x><L\\?$HUiCh<V.(\"@%&k>\"") input=StringLiteral("k15y<?Sq*Y!;9>u") input=StringLiteral("16>zg2{)AdXA;x6Sae.Y*[lqZ?o'q") input=Operator("=") input=Comment("O3D{sWuw&jJ._") input=Integer(-4924559377274983518) input=Integer(-1159543980304031360) input=Operator("+") input=Comment("&O^`.{|-fOe@j.V4-~k$S$X%q'") input=StringLiteral("::OQx2f.%M3,~>^./|") input=Comment(">/'v,Hs'Q:OC-.OMDt{*u`O[g<G?\\7") input=Integer(-6248396176639853868) input=StringLiteral("5:oQ#nK~.)>9W/5*<a/#(") input=StringLiteral("<") input=Operator("=") input=StringLiteral("{B@G") input=Identifier("J3nl9CbwVJAO2LX1RO93YpC0zggGbl") input=StringLiteral(":jst8]Wk-&qc*;W") input=Identifier("KGvHk8w") input=Operator("/") input=StringLiteral("%K6O&am+G]:G?`") input=Identifier("lrN8sly45z062M5h5JRDa7") input=StringLiteral(":{") input=Identifier("ObCis") input=Operator("/") input=Identifier("VNPKdPaboKBkN3L5aGtPBn6k6f1sj") input=Integer(2334738767703132352) input=Integer(-3750149586504217948) input=StringLiteral("l#v(;") input=Operator("*") input=Operator(")") input=Integer(989683601795740879) input=StringLiteral("<-Wx=zV{h[RUY:=6{X&*<8{") input=StringLiteral("$0'lWY4sT2Lr3:xgy{u8'mG!Z") input=Integer(1156660779832525058) input=Integer(-6527729600878701681) input=Identifier("S9NQ3UNWiFXd3qAu") input=Identifier("xy3ogSiO4") input=Comment("3}") input=Identifier("a8Y933vE4bd9dqED7H3G") input=Identifier("tTYYCWbVG6") input=Comment("a6c[%<$C=/&?bk'gsr7Na0N{ACY#+") input=Integer(-7775509357863794735) input=StringLiteral("8$'#Fq|/M.bz&34<") input=Identifier("y9E6QrrZ") input=Identifier("jRYMYiZ68fL2vTywd7yKfIZ60ur2") input=Integer(290623164736633668) input=StringLiteral("N>}-^ik") input=StringLiteral("=.z(?3h={/$s?~4") input=Identifier("bAuepceI") input=StringLiteral("4-") input=StringLiteral("p{&{") input=Operator("(") input=Integer(-8324300195135210597) input=Identifier("qpls5QYn3") input=Comment("\"w'b") input=Comment("w)RJN&G*E0%Tn") input=Integer(-6988371647869676115) input=StringLiteral("8RZ?Vt=xGH-%}|") input=Operator("(") input=Comment("") input=StringLiteral("?2m=/>") input=Comment("D^(s[G\\T;TM%`sJzT{\\A41?+") input=Operator(")") input=Integer(5551757420801652884) input=StringLiteral("'=2w&0#v!L") input=StringLiteral("Z>-.~&]p$=A.''b%-Tf}%") input=Identifier("g1ZrVQ8pLM7mIEAnWp0dQUp0F") input=Integer(8299767960462983213) input=StringLiteral("_pN(]= +==:8'3)EzN|.:QB/kn'*") input=Operator("*") input=Identifier("X0xrIoIm") input=Integer(-5028786170388332161) input=StringLiteral("-)/V5{HUQw}&l'9]<?FN3E$<%.y:<(") input=Integer(-2734168504813036053) input=Comment("\\-303/&8FX b]\"_*\\") input=StringLiteral("q`jB<Y:8") input=Integer(-8034044248528718325) input=StringLiteral("Mv") input=StringLiteral(".aJ!(iV") input=Operator("/") input=StringLiteral("t?jP('<<wK_.c:`l~Jj E<Un*th/KO") input=Comment("a$K%2*>;Xn\\)0\"h'i{{}*29:") input=Identifier("i9ouVa6D3gQvY1TASRuuUevev6c3eej9") input=Integer(1058815959425794060) input=Identifier("iqiUHzOmh825Gm") input=Comment("<~TB*s>l&{") input=Integer(4918244746631162265) input=Comment("?gY*j<{FUk/v|xxu") input=Operator("/") input=Integer(5757587406098432856) input=Integer(2499161110147957785) input=StringLiteral(" Bt4FeT*`(FZ<~::'Cj") input=Integer(-3060192467123388157) input=Comment("l \"&2U5ze>;") input=Integer(-78566931641297308) input=Operator(")") input=Comment("SE<p%`U") input=Integer(679113558390222469) input=Operator("(") input=Operator("(") input=Comment("_$lq?7.%sLy") input=Operator("/") input=Operator("/") input=Identifier("hd3qHPLA") input=Identifier("daV0TI76wUr3r2i7H") input=StringLiteral(" W?%`DB?$j$5?f:::,~vCP`^c).y") input=StringLiteral("R=R$?|M{x)C/+*i*6&N<<[3G$.aI*9=g") input=Comment(":D{/V.7<0r$:g1<C8cP\\(;y+[\\#QG{<u") input=Operator(")") input=StringLiteral("*i)#O6X_`t9]@c*H<`Yim5Dd.Tbud") input=Integer(-3432646738696083761) input=StringLiteral("U3|kYsmC@8_Yr):~@Lgxsbh.RSG") input=Identifier("Bj10q4IvG5") input=Operator("=") input=Integer(-5630033425118821339) input=Integer(233076618950281174) input=StringLiteral("+,%-PR$%o`&K*m{5YN") input=Identifier("KE28PK7984k4Svh28ic9WBQE") input=Identifier("XB2HuMN61NxBZ6Ai7mn2K") input=StringLiteral("2s.x,") input=Integer(1379919889235175274) input=Integer(-9118904988273115882) input=Comment("F`b*NRJv[@8J/AGU") input=Integer(-3275613456017711125) input=Identifier("pYRO522q2mK27SvLHa") input=Integer(1727672328525155017) input=Identifier("aRZWvZ17VTsx5jh") input=Integer(-3922245139274543790) input=Identifier("av4rvg7K8pkOYXaccZ1GwTFZJptmt6") input=Operator("*") input=StringLiteral("$wKUkD/.%5g?$*?gw~L7'0nRC") input=StringLiteral(":I^D:='^x@&j%'{BfNKhe") input=Identifier("lS6S6jib8BTXq4") input=Comment("&") input=StringLiteral("'S=,Y`bLx<_=_,=h") input=Identifier("F6kCcb4tEiR9s3Fu88ZGHH") input=Identifier("cI01xbX01") input=Comment("{VWh$9_") input=Comment("`uXH.{*Ar8+DTN:GEf);<F") input=StringLiteral("cr~?%e/<'Eq$;f") input=StringLiteral("{<kI{B&=sx%$ePg$`xH(9&/o*C4{s*") input=StringLiteral("$U?'&r[K5c?xR=o&= 4OO*;") input=Integer(-2671786489133120822) input=Identifier("lGl53NCE6ly7XQuD4WK") input=Operator("/") input=StringLiteral("%]zl%") input=Operator("=") input=Integer(-7724873312768285679) input=Identifier("k62") input=Integer(-1588672770331779024) input=Operator("-") input=Comment("*MD\"yp*#\\@fh\\+f_M8") input=Identifier("Jf7Ge7") input=Operator("-") input=Operator("-") input=Operator("-") input=StringLiteral("^}h") input=Identifier("rj7ZxGu8bHc") input=Identifier("I18y533GJ3z1KI9gg92OPX7fc") input=Comment("{:f[UE)<&qp/-$") input=StringLiteral("b<Jx1%<I_;") input=Comment("`G\\uFw+=%P4*IZ`)!a<{\\&r<d6^EY.hl") input=Operator("=") input=Operator("/") input=Comment("z:0_8C4n\\a\\{.Z*(*FMho") input=Integer(-2750063949168710633) input=Integer(3034355175292419004) input=Comment("x/,-<! 5h#pp-)>e'X") input=Identifier("LbQTe7") input=Integer(720928152136414720) input=StringLiteral("C-*t=IG HE'g!p&*%S??/EYh<JU") input=Operator("-") input=StringLiteral("`eAv}?',-g(R&") input=Integer(-7039161791314532663) input=Comment("0C?&.(s?$qr[-oq") input=Identifier("EzA9xO11TehgifkU4ZG30FhNL") input=Operator("*") input=Identifier("IpzEV") input=Identifier("ANrdWqRDCg3TkkFLQ6MLz0S0") input=Integer(8883757912030519195) input=Identifier("SW3Jzky4ROsgI9n5") input=Identifier("MQ8M") input=Integer(5292195887080356868) input=Integer(-5246526831305916146) input=Identifier("ujWvx5WBek2A4h8nWGkwu4Rv") input=Comment("ev+%5:4&%.e/==:<") input=StringLiteral("G)u=x.$;!/`sZ:%IgH4;") input=Operator("/") input=Comment("$<_(") input=Operator("=") input=Comment("=T$1p4E2HS.5vQ:K$L8%).:6cA`.*") input=Operator("=") input=Integer(-1922330270243941016) input=StringLiteral("aBr") input=Integer(-3328217971960057027) input=Integer(-8758519691645812975) input=StringLiteral("Bfwl/:$D5|Jwu[") input=Integer(-2531372241655726711) input=Identifier("KG8jBUsJ4gtjbP") input=Identifier("aIJzXbk") input=Operator("*") input=Operator(")") input=Integer(4129895811108521911) input=Operator("*") input=Operator("=") input=Comment("&7,%(%&%G~/n0I2]svvwH`K!CI+7") input=StringLiteral("` '") input=Operator("/") input=Comment("8B\"G|uw$FU!-JYsi=<z:'H9r") input=Operator("=") input=Operator("=") input=Operator("=") input=Identifier("y9qQ91MJi87f2iC8Kk") input=Integer(-8654896414805801181) input=StringLiteral("/A2:&f0`?R`{") input=Operator("(") input=Integer(371556088405434434) input=Integer(-8794707397855171363) input=StringLiteral("U") input=Operator("(") input=Operator("(") input=Integer(7601108597954119828) input=Comment("t<%.Bi:F\"ex' \"%%") input=Operator("*") input=Comment(")\"&`JCM(X<<$O5&") input=Comment("*09c`oH{O<>`Axs0U$`9(J2-8KUk.4") input=Integer(-1946398728305740403) 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